diff --git a/static/js/mermaid.min.js b/static/js/mermaid.min.js index 19d9bd3..a90bc24 100644 --- a/static/js/mermaid.min.js +++ b/static/js/mermaid.min.js @@ -1,67 +1,67 @@ -var __esbuild_esm_mermaid_nm;(__esbuild_esm_mermaid_nm||={}).mermaid=(()=>{var w,k,M,T,C,_,S,A,N,I,R,B,F,$=Object.create,z=Object.defineProperty,G=Object.getOwnPropertyDescriptor,U=Object.getOwnPropertyNames,q=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty,me=(t,e)=>z(t,"name",{value:e,configurable:!0}),t=(t,e)=>()=>e=t?t(t=0):e,W=(e,r,n,i)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let t of U(r))j.call(e,t)||t===n||z(e,t,{get:()=>r[t],enumerable:!(i=G(r,t))||i.enumerable});return e},Y=(t,e,r)=>(W(t,e,"default"),r&&W(r,e,"default")),tt=(t,e,r)=>(r=null!=t?$(q(t)):{},W(!e&&t&&t.__esModule?r:z(r,"default",{value:t,enumerable:!0}),t)),et=(rPt=(t,e)=>()=>(e||t((e={exports:{}}).exports,e),e.exports))((t,e)=>{function r(){var i="millisecond",u="second",d="minute",p="hour",g="day",f="week",m="month",y="year",v="date",e="Invalid Date",s=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,t={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:me(function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"},"ordinal")},n=me(function(t,e,r){var n=String(t);return!n||n.length>=e?t:""+Array(e+1-n.length).join(r)+t},"m"),r={s:n,z:me(function(t){var t=-t.utcOffset(),e=Math.abs(t),r=Math.floor(e/60),e=e%60;return(t<=0?"+":"-")+n(r,2,"0")+":"+n(e,2,"0")},"z"),m:me(function t(e,r){var n,i,a;return e.date(){var t=a.date,e=a.utc;if(null===t)return new Date(NaN);if(w.u(t))return new Date;if(!(t instanceof Date||"string"!=typeof t||/Z$/i.test(t))){var r,n,i=t.match(s);if(i)return r=i[2]-1||0,n=(i[7]||"0").substring(0,3),e?new Date(Date.UTC(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)):new Date(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)}return new Date(t)})(),this.init()},t.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},t.$utils=function(){return w},t.isValid=function(){return this.$d.toString()!==e},t.isSame=function(t,e){return t=b(t),this.startOf(e)<=t&&t<=this.endOf(e)},t.isAfter=function(t,e){return b(t){switch(t){case"YY":return String(d.$y).slice(-2);case"YYYY":return w.s(d.$y,4,"0");case"M":return s+1;case"MM":return w.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 w.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(n);case"HH":return w.s(n,2,"0");case"h":return h(1);case"hh":return h(2);case"a":return u(n,a,!0);case"A":return u(n,a,!1);case"m":return String(a);case"mm":return w.s(a,2,"0");case"s":return String(d.$s);case"ss":return w.s(d.$s,2,"0");case"SSS":return w.s(d.$ms,3,"0");case"Z":return r}return null})()||r.replace(":","")})):p.invalidDate||e},t.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},t.diff=function(t,e,r){var n,i=this,e=w.p(e),a=b(t),s=6e4*(a.utcOffset()-this.utcOffset()),o=this-a,l=me(function(){return w.m(i,a)},"D");switch(e){case y:n=l()/12;break;case m:n=l();break;case"quarter":n=l()/3;break;case f:n=(o-s)/6048e5;break;case g:n=(o-s)/864e5;break;case p:n=o/36e5;break;case d:n=o/6e4;break;case u:n=o/1e3;break;default:n=o}return r?n:w.a(n)},t.daysInMonth=function(){return this.endOf(m).$D},t.$locale=function(){return l[this.$L]},t.locale=function(t,e){var r;return t?(r=this.clone(),(t=h(t,e,!0))&&(r.$L=t),r):this.$L},t.clone=function(){return w.w(this.$d,this)},t.toDate=function(){return new Date(this.valueOf())},t.toJSON=function(){return this.isValid()?this.toISOString():null},t.toISOString=function(){return this.$d.toISOString()},t.toString=function(){return this.$d.toUTCString()},E),T=k.prototype;function E(t){this.$L=h(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[a]=!0}return b.prototype=T,[["$ms",i],["$s",u],["$m",d],["$H",p],["$W",g],["$M",m],["$y",y],["$D",v]].forEach(function(e){T[e[1]]=function(t){return this.$g(t,e[0],e[1])}}),b.extend=function(t,e){return t.$i||(t(e,k,b),t.$i=!0),b},b.locale=h,b.isDayjs=c,b.unix=function(t){return b(1e3*t)},b.en=l[o],b.Ls=l,b.p={},b}"object"==typeof t&&typeof e<"u"?e.exports=r():"function"==typeof define&&define.amd?define(r):(t=typeof globalThis<"u"?globalThis:t||self).dayjs=r()}),e=t(()=>{w=tt(et(),1),k={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},M={trace:me(()=>{},"trace"),debug:me(()=>{},"debug"),info:me(()=>{},"info"),warn:me(()=>{},"warn"),error:me(()=>{},"error"),fatal:me(()=>{},"fatal")},T=me(function(t="fatal"){let e=k.fatal;"string"==typeof t?t.toLowerCase()in k&&(e=k[t]):"number"==typeof t&&(e=t),M.trace=()=>{},M.debug=()=>{},M.info=()=>{},M.warn=()=>{},M.error=()=>{},M.fatal=()=>{},e<=k.fatal&&(M.fatal=console.error?console.error.bind(console,C("FATAL"),"color: orange"):console.log.bind(console,"",C("FATAL"))),e<=k.error&&(M.error=console.error?console.error.bind(console,C("ERROR"),"color: orange"):console.log.bind(console,"",C("ERROR"))),e<=k.warn&&(M.warn=console.warn?console.warn.bind(console,C("WARN"),"color: orange"):console.log.bind(console,"",C("WARN"))),e<=k.info&&(M.info=console.info?console.info.bind(console,C("INFO"),"color: lightblue"):console.log.bind(console,"",C("INFO"))),e<=k.debug&&(M.debug=console.debug?console.debug.bind(console,C("DEBUG"),"color: lightgreen"):console.log.bind(console,"",C("DEBUG"))),e<=k.trace&&(M.trace=console.debug?console.debug.bind(console,C("TRACE"),"color: lightgreen"):console.log.bind(console,"",C("TRACE")))},"setLogLevel"),C=me(t=>`%c${(0,w.default)().format("ss.SSS")} : ${t} : `,"format")}),rt=t(()=>{_=Object.freeze({left:0,top:0,width:16,height:16}),S=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),A=Object.freeze({..._,...S}),N=Object.freeze({...A,body:"",hidden:!1})}),nt=t(()=>{rt(),I=Object.freeze({width:null,height:null}),R=Object.freeze({...I,...S})}),it=t(()=>{B=me((t,e,r,n="")=>{var i,a=t.split(":");if("@"===t.slice(0,1)){if(a.length<2||3!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),"validateIconName")});function st(t,e){var r={};return!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0),(t=((t.rotate||0)+(e.rotate||0))%4)&&(r.rotate=t),r}var ot=t(()=>{me(st,"mergeIconTransformations")});function lt(t,e){var r,n=st(t,e);for(r in N)r in S?r in t&&!(r in n)&&(n[r]=S[r]):r in e?n[r]=e[r]:r in t&&(n[r]=t[r]);return n}var ct=t(()=>{rt(),ot(),me(lt,"mergeIconData")});function ht(t,e){let n=t.icons,i=t.aliases||Object.create(null),a=Object.create(null);function s(t){var e,r;return n[t]?a[t]=[]:(t in a||(a[t]=null,(r=(e=i[t]&&i[t].parent)&&s(e))&&(a[t]=[e].concat(r))),a[t])}return me(s,"resolve"),(e||Object.keys(n).concat(Object.keys(i))).forEach(s),a}var ut=t(()=>{me(ht,"getIconsTree")});function dt(t,e,r){let n=t.icons,i=t.aliases||Object.create(null),a={};function s(t){a=lt(n[t]||i[t],a)}return me(s,"parse"),s(e),r.forEach(s),lt(t,a)}function pt(t,e){var r;return t.icons[e]?dt(t,e,[]):(r=ht(t,[e])[e])?dt(t,e,r):null}var gt=t(()=>{ct(),ut(),me(dt,"internalGetIconData"),me(pt,"getIconData")});function ft(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;var n,i=t.split(mt);if(null===i||!i.length)return t;let a=[],s=i.shift(),o=yt.test(s);for(;;){if(!o||(n=parseFloat(s),isNaN(n))?a.push(s):a.push(Math.ceil(n*e*r)/r),void 0===(s=i.shift()))return a.join("");o=!o}}var mt,yt,vt=t(()=>{mt=/(-?[0-9.]*[0-9]+[0-9.]*)/g,yt=/^-?[0-9.]*[0-9]+[0-9.]*$/g,me(ft,"calculateSize")});function xt(t,e="defs"){let r="",n=t.indexOf("<"+e);for(;0<=n;){var i=t.indexOf(">",n),a=t.indexOf("",a);if(-1===s)break;r+=t.slice(i+1,a).trim(),t=t.slice(0,n).trim()+t.slice(s+1)}return{defs:r,content:t}}function bt(t,e){return t?""+t+""+e:e}function wt(t,e,r){return bt((t=xt(t)).defs,e+t.content+r)}var kt=t(()=>{me(xt,"splitSVGDefs"),me(bt,"mergeDefsAndContent"),me(wt,"wrapSVGContent")});function Tt(t,e){let r={...A,...t},n={...R,...e},s={left:r.left,top:r.top,width:r.width,height:r.height},o=r.body,i=([r,n].forEach(t=>{let e=[],r=t.hFlip,n=t.vFlip,i=t.rotate;r?n?i+=2:(e.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),e.push("scale(-1 1)"),s.top=s.left=0):n&&(e.push("translate("+(0-s.left).toString()+" "+(s.height+s.top).toString()+")"),e.push("scale(1 -1)"),s.top=s.left=0);let a;switch(i<0&&(i-=4*Math.floor(i/4)),i%=4){case 1:a=s.height/2+s.top,e.unshift("rotate(90 "+a.toString()+" "+a.toString()+")");break;case 2:e.unshift("rotate(180 "+(s.width/2+s.left).toString()+" "+(s.height/2+s.top).toString()+")");break;case 3:a=s.width/2+s.left,e.unshift("rotate(-90 "+a.toString()+" "+a.toString()+")")}i%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),e.length&&(o=wt(o,'',""))}),n.width),a=n.height,l=s.width,c=s.height,h,u,d=(null===i?(u=null===a?"1em":"auto"===a?c:a,h=ft(u,l/c)):(h="auto"===i?l:i,u=null===a?ft(h,c/l):"auto"===a?c:a),{}),p=me((t,e)=>{Et(e)||(d[t]=e.toString())},"setAttr");return p("width",h),p("height",u),t=[s.left,s.top,l,c],d.viewBox=t.join(" "),{attributes:d,viewBox:t,body:o}}var Et,Ct=t(()=>{rt(),nt(),vt(),kt(),Et=me(t=>"unset"===t||"undefined"===t||"none"===t,"isUnsetKeyword"),me(Tt,"iconToSVG")});function _t(n,i=At){for(var t,e=[];t=St.exec(n);)e.push(t[1]);if(e.length){let r="suffix"+(16777216*Math.random()|Date.now()).toString(16);e.forEach(t=>{var e="function"==typeof i?i(t):i+(Lt++).toString(),t=t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");n=n.replace(new RegExp('([#;"])('+t+')([")]|\\.[a-z])',"g"),"$1"+e+r+"$3")}),n=n.replace(new RegExp(r,"g"),"")}return n}var St,At,Lt,Nt=t(()=>{St=/\sid="(\S+)"/g,At="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),Lt=0,me(_t,"replaceIDs")});function It(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(var n in e)r+=" "+n+'="'+e[n]+'"';return'"+t+""}var Rt,Mt,Dt,Ot,Pt,Bt,Ft,$t=t(()=>{me(It,"iconToHTML")}),zt=rPt((t,e)=>{function n(t){if(!(100<(t=String(t)).length)&&(t=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(t))){var e=parseFloat(t[1]);switch((t[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*e;case"weeks":case"week":case"w":return 6048e5*e;case"days":case"day":case"d":return 864e5*e;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*e;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*e;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*e;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return e;default:return}}}function i(t){var e=Math.abs(t);return 864e5<=e?Math.round(t/864e5)+"d":36e5<=e?Math.round(t/36e5)+"h":6e4<=e?Math.round(t/6e4)+"m":1e3<=e?Math.round(t/1e3)+"s":t+"ms"}function a(t){var e=Math.abs(t);return 864e5<=e?r(t,e,864e5,"day"):36e5<=e?r(t,e,36e5,"hour"):6e4<=e?r(t,e,6e4,"minute"):1e3<=e?r(t,e,1e3,"second"):t+" ms"}function r(t,e,r,n){return e=1.5*r<=e,Math.round(t/r)+" "+n+(e?"s":"")}e.exports=function(t,e){e=e||{};var r=typeof t;if("string"==r&&0{function r(e){function t(e){let r=0;for(let t=0;t{var r;return"%%"===t?"%":(i++,"function"==typeof(e=o.formatters[e])&&(r=a[i],t=e.call(n,r),a.splice(i,1),i--),t)}),o.formatArgs.call(n,a),(n.log||o.log).apply(n,a)}}return me(s,"debug"),s.namespace=t,s.useColors=o.useColors(),s.color=o.selectColor(t),s.extend=a,s.destroy=o.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:me(()=>null!==e?e:(n!==o.namespaces&&(n=o.namespaces,i=o.enabled(t)),i),"get"),set:me(t=>{e=t},"set")}),"function"==typeof o.init&&o.init(s),s}function a(t,e){return(e=o(this.namespace+("u""-"+t)].join(",");return o.enable(""),t}function s(t){for(var e of o.skips)if(n(t,e))return!1;for(var r of o.names)if(n(t,r))return!0;return!1}function l(t){return t instanceof Error?t.stack||t.message:t}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return((o.debug=o).default=o).coerce=l,o.disable=i,o.enable=r,o.enabled=s,o.humanize=zt(),o.destroy=c,Object.keys(e).forEach(t=>{o[t]=e[t]}),o.names=[],o.skips=[],o.formatters={},me(t,"selectColor"),o.selectColor=t,me(o,"createDebug"),me(a,"extend"),me(r,"enable"),me(n,"matchesTemplate"),me(i,"disable"),me(s,"enabled"),me(l,"coerce"),me(c,"destroy"),o.enable(o.load()),o}me(r,"setup"),e.exports=r}),Ut=rPt((e,r)=>{function t(){if(typeof window<"u"&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let t;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(t=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&31<=parseInt(t[1],10)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function n(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+r.exports.humanize(this.diff),this.useColors){var n="color: "+this.color;t.splice(1,0,n,"color: inherit");let e=0,r=0;t[0].replace(/%[a-zA-Z%]/g,t=>{"%%"!==t&&(e++,"%c"===t)&&(r=e)}),t.splice(r,0,n)}}function i(t){try{t?e.storage.setItem("debug",t):e.storage.removeItem("debug")}catch{}}function a(){let t;try{t=e.storage.getItem("debug")}catch{}return t=!t&&typeof process<"u"&&"env"in process?process.env.DEBUG:t}function s(){try{return localStorage}catch{}}e.formatArgs=n,e.save=i,e.load=a,e.useColors=t,e.storage=s(),e.destroy=(()=>{let t=!1;return()=>{t||(t=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),e.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],me(t,"useColors"),me(n,"formatArgs"),e.log=console.debug||console.log||(()=>{}),me(i,"save"),me(a,"load"),me(s,"localstorage"),r.exports=Gt()(e),r.exports.formatters.j=function(t){try{return JSON.stringify(t)}catch(t){return"[UnexpectedJSONParseError]: "+t.message}}}),qt=t(()=>{it(),gt(),Ct(),Nt(),$t(),tt(Ut(),1)}),jt=t(()=>{e(),qt(),Rt={body:'?',height:80,width:80},Mt=new Map,Dt=new Map,Ot=me(t=>{for(var e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(M.debug("Registering icon pack:",e.name),"loader"in e)Dt.set(e.name,e.loader);else{if(!("icons"in e))throw M.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');Mt.set(e.name,e.icons)}}},"registerIconPacks"),Pt=me(async(t,e)=>{var r=B(t,!0,void 0!==e);if(!r)throw new Error("Invalid icon name: "+t);if(!(e=r.prefix||e))throw new Error("Icon name must contain a prefix: "+t);let n=Mt.get(e);if(!n){var i=Dt.get(e);if(!i)throw new Error("Icon set not found: "+r.prefix);try{n={...await i(),prefix:e},Mt.set(e,n)}catch(t){throw M.error(t),new Error("Failed to load icon set: "+r.prefix)}}if(i=pt(n,r.name))return i;throw new Error("Icon not found: "+t)},"getRegisteredIconData"),Bt=me(async t=>{try{return await Pt(t),!0}catch{return!1}},"isIconAvailable"),Ft=me(async(t,e,r)=>{let n;try{n=await Pt(t,e?.fallbackPrefix)}catch(t){M.error(t),n=Rt}return It(_t((t=Tt(n,e)).body),{...t.attributes,...r})},"getIconSVG")});function Wt(t){for(var e=[],r=1;r{me(Wt,"dedent")}),zr=t(()=>{Yt=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,Ht=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Vt=/\s*%%.*\n/gm}),Gr=t(()=>{Xt=class extends Error{static{me(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}}}),Ur=t(()=>{e(),zr(),Gr(),Kt={},Zt=me(function(t,e){t=t.replace(Yt,"").replace(Ht,"").replace(Vt,` -`);for(var[r,{detector:n}]of Object.entries(Kt))if(n(t,e))return r;throw new Xt("No diagram type detected matching given configuration for text: "+t)},"detectType"),Qt=me((...t)=>{for(var{id:e,detector:r,loader:n}of t)Jt(e,r,n)},"registerLazyLoadedDiagrams"),Jt=me((t,e,r)=>{Kt[t]&&M.warn(`Detector with key ${t} already exists. Overwriting.`),Kt[t]={detector:e,loader:r},M.debug(`Detector with key ${t} added`+(r?" with loader":""))},"addDetector"),te=me(t=>Kt[t].loader,"getDiagramLoader")}),qr=t(()=>{function B(){this.yy={}}var t=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,24],r=[1,25],F=[1,26],$=[1,27],z=[1,28],n=[1,63],i=[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],x=[1,37],b=[1,38],w=[1,39],k=[1,40],T=[1,41],E=[1,42],C=[1,43],_=[1,44],S=[1,45],A=[1,46],L=[1,47],N=[1,48],I=[1,50],G=[1,51],U=[1,52],q=[1,53],j=[1,54],W=[1,55],Y=[1,56],H=[1,57],V=[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],R=[1,82],M=[1,83],D=[1,84],O=[1,85],P=[12,14,42],tt=[12,14,33,42],et=[12,14,33,42,76,77,79,80],rt=[12,33],nt=[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],e={trace:me(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:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 3:n.setDirection("TB");break;case 4:n.setDirection("BT");break;case 5:n.setDirection("RL");break;case 6:n.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:n.setC4Type(a[o-3]);break;case 19:n.setTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 20:n.setAccDescription(a[o].substring(15)),this.$=a[o].substring(15);break;case 21:this.$=a[o].trim(),n.setTitle(this.$);break;case 22:case 23:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 28:a[o].splice(2,0,"ENTERPRISE"),n.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 29:a[o].splice(2,0,"SYSTEM"),n.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 30:n.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 31:a[o].splice(2,0,"CONTAINER"),n.addContainerBoundary(...a[o]),this.$=a[o];break;case 32:n.addDeploymentNode("node",...a[o]),this.$=a[o];break;case 33:n.addDeploymentNode("nodeL",...a[o]),this.$=a[o];break;case 34:n.addDeploymentNode("nodeR",...a[o]),this.$=a[o];break;case 35:n.popBoundaryParseStack();break;case 39:n.addPersonOrSystem("person",...a[o]),this.$=a[o];break;case 40:n.addPersonOrSystem("external_person",...a[o]),this.$=a[o];break;case 41:n.addPersonOrSystem("system",...a[o]),this.$=a[o];break;case 42:n.addPersonOrSystem("system_db",...a[o]),this.$=a[o];break;case 43:n.addPersonOrSystem("system_queue",...a[o]),this.$=a[o];break;case 44:n.addPersonOrSystem("external_system",...a[o]),this.$=a[o];break;case 45:n.addPersonOrSystem("external_system_db",...a[o]),this.$=a[o];break;case 46:n.addPersonOrSystem("external_system_queue",...a[o]),this.$=a[o];break;case 47:n.addContainer("container",...a[o]),this.$=a[o];break;case 48:n.addContainer("container_db",...a[o]),this.$=a[o];break;case 49:n.addContainer("container_queue",...a[o]),this.$=a[o];break;case 50:n.addContainer("external_container",...a[o]),this.$=a[o];break;case 51:n.addContainer("external_container_db",...a[o]),this.$=a[o];break;case 52:n.addContainer("external_container_queue",...a[o]),this.$=a[o];break;case 53:n.addComponent("component",...a[o]),this.$=a[o];break;case 54:n.addComponent("component_db",...a[o]),this.$=a[o];break;case 55:n.addComponent("component_queue",...a[o]),this.$=a[o];break;case 56:n.addComponent("external_component",...a[o]),this.$=a[o];break;case 57:n.addComponent("external_component_db",...a[o]),this.$=a[o];break;case 58:n.addComponent("external_component_queue",...a[o]),this.$=a[o];break;case 60:n.addRel("rel",...a[o]),this.$=a[o];break;case 61:n.addRel("birel",...a[o]),this.$=a[o];break;case 62:n.addRel("rel_u",...a[o]),this.$=a[o];break;case 63:n.addRel("rel_d",...a[o]),this.$=a[o];break;case 64:n.addRel("rel_l",...a[o]),this.$=a[o];break;case 65:n.addRel("rel_r",...a[o]),this.$=a[o];break;case 66:n.addRel("rel_b",...a[o]),this.$=a[o];break;case 67:a[o].splice(0,1),n.addRel("rel",...a[o]),this.$=a[o];break;case 68:n.updateElStyle("update_el_style",...a[o]),this.$=a[o];break;case 69:n.updateRelStyle("update_rel_style",...a[o]),this.$=a[o];break;case 70:n.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:e,23:r,24:F,26:$,28:z,29:49,30:61,32:62,34:n,36:i,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:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,73:X,74:K},{13:70,19:20,20:21,21:22,22:e,23:r,24:F,26:$,28:z,29:49,30:61,32:62,34:n,36:i,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:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,73:X,74:K},{13:71,19:20,20:21,21:22,22:e,23:r,24:F,26:$,28:z,29:49,30:61,32:62,34:n,36:i,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:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,73:X,74:K},{13:72,19:20,20:21,21:22,22:e,23:r,24:F,26:$,28:z,29:49,30:61,32:62,34:n,36:i,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:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,73:X,74:K},{13:73,19:20,20:21,21:22,22:e,23:r,24:F,26:$,28:z,29:49,30:61,32:62,34:n,36:i,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:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,73:X,74:K},{14:[1,74]},t(Z,[2,13],{43:23,29:49,30:61,32:62,20:75,34:n,36:i,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:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,73:X,74:K}),t(Z,[2,14]),t(Q,[2,16],{12:[1,76]}),t(Z,[2,36],{12:[1,77]}),t(J,[2,19]),t(J,[2,20]),{25:[1,78]},{27:[1,79]},t(J,[2,23]),{35:80,75:81,76:R,77:M,79:D,80:O},{35:86,75:81,76:R,77:M,79:D,80:O},{35:87,75:81,76:R,77:M,79:D,80:O},{35:88,75:81,76:R,77:M,79:D,80:O},{35:89,75:81,76:R,77:M,79:D,80:O},{35:90,75:81,76:R,77:M,79:D,80:O},{35:91,75:81,76:R,77:M,79:D,80:O},{35:92,75:81,76:R,77:M,79:D,80:O},{35:93,75:81,76:R,77:M,79:D,80:O},{35:94,75:81,76:R,77:M,79:D,80:O},{35:95,75:81,76:R,77:M,79:D,80:O},{35:96,75:81,76:R,77:M,79:D,80:O},{35:97,75:81,76:R,77:M,79:D,80:O},{35:98,75:81,76:R,77:M,79:D,80:O},{35:99,75:81,76:R,77:M,79:D,80:O},{35:100,75:81,76:R,77:M,79:D,80:O},{35:101,75:81,76:R,77:M,79:D,80:O},{35:102,75:81,76:R,77:M,79:D,80:O},{35:103,75:81,76:R,77:M,79:D,80:O},{35:104,75:81,76:R,77:M,79:D,80:O},t(P,[2,59]),{35:105,75:81,76:R,77:M,79:D,80:O},{35:106,75:81,76:R,77:M,79:D,80:O},{35:107,75:81,76:R,77:M,79:D,80:O},{35:108,75:81,76:R,77:M,79:D,80:O},{35:109,75:81,76:R,77:M,79:D,80:O},{35:110,75:81,76:R,77:M,79:D,80:O},{35:111,75:81,76:R,77:M,79:D,80:O},{35:112,75:81,76:R,77:M,79:D,80:O},{35:113,75:81,76:R,77:M,79:D,80:O},{35:114,75:81,76:R,77:M,79:D,80:O},{35:115,75:81,76:R,77:M,79:D,80:O},{20:116,29:49,30:61,32:62,34:n,36:i,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:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,73:X,74:K},{12:[1,118],33:[1,117]},{35:119,75:81,76:R,77:M,79:D,80:O},{35:120,75:81,76:R,77:M,79:D,80:O},{35:121,75:81,76:R,77:M,79:D,80:O},{35:122,75:81,76:R,77:M,79:D,80:O},{35:123,75:81,76:R,77:M,79:D,80:O},{35:124,75:81,76:R,77:M,79:D,80:O},{35:125,75:81,76:R,77:M,79:D,80:O},{14:[1,126]},{14:[1,127]},{14:[1,128]},{14:[1,129]},{1:[2,8]},t(Z,[2,15]),t(Q,[2,17],{21:22,19:130,22:e,23:r,24:F,26:$,28:z}),t(Z,[2,37],{19:20,20:21,21:22,43:23,29:49,30:61,32:62,13:131,22:e,23:r,24:F,26:$,28:z,34:n,36:i,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:x,53:b,54:w,55:k,56:T,57:E,58:C,59:_,60:S,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,73:X,74:K}),t(J,[2,21]),t(J,[2,22]),t(P,[2,39]),t(tt,[2,71],{75:81,35:132,76:R,77:M,79:D,80:O}),t(et,[2,73]),{78:[1,133]},t(et,[2,75]),t(et,[2,76]),t(P,[2,40]),t(P,[2,41]),t(P,[2,42]),t(P,[2,43]),t(P,[2,44]),t(P,[2,45]),t(P,[2,46]),t(P,[2,47]),t(P,[2,48]),t(P,[2,49]),t(P,[2,50]),t(P,[2,51]),t(P,[2,52]),t(P,[2,53]),t(P,[2,54]),t(P,[2,55]),t(P,[2,56]),t(P,[2,57]),t(P,[2,58]),t(P,[2,60]),t(P,[2,61]),t(P,[2,62]),t(P,[2,63]),t(P,[2,64]),t(P,[2,65]),t(P,[2,66]),t(P,[2,67]),t(P,[2,68]),t(P,[2,69]),t(P,[2,70]),{31:134,42:[1,135]},{12:[1,136]},{33:[1,137]},t(rt,[2,28]),t(rt,[2,29]),t(rt,[2,30]),t(rt,[2,31]),t(rt,[2,32]),t(rt,[2,33]),t(rt,[2,34]),{1:[2,9]},{1:[2,10]},{1:[2,11]},{1:[2,12]},t(Q,[2,18]),t(Z,[2,38]),t(tt,[2,72]),t(et,[2,74]),t(P,[2,24]),t(P,[2,35]),t(nt,[2,25]),t(nt,[2,26],{12:[1,138]}),t(nt,[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:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"{var w,k,M,T,C,S,_,A,N,I,R,B,$,F=Object.create,z=Object.defineProperty,G=Object.getOwnPropertyDescriptor,U=Object.getOwnPropertyNames,q=Object.getPrototypeOf,j=Object.prototype.hasOwnProperty,mt=(e,t)=>z(e,"name",{value:t,configurable:!0}),e=(e,t)=>()=>t=e?e(e=0):t,W=(t,r,n,i)=>{if(r&&"object"==typeof r||"function"==typeof r)for(let e of U(r))j.call(t,e)||e===n||z(t,e,{get:()=>r[e],enumerable:!(i=G(r,e))||i.enumerable});return t},Y=(e,t,r)=>(W(e,t,"default"),r&&W(r,t,"default")),ee=(e,t,r)=>(r=null!=e?F(q(e)):{},W(!t&&e&&e.__esModule?r:z(r,"default",{value:e,enumerable:!0}),e)),te=(VBe=(e,t)=>()=>(t||e((t={exports:{}}).exports,t),t.exports))((e,t)=>{function r(){var i="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+)?$/,x=/\[([^\]]+)]|Y{1,4}|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,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")},n=mt(function(e,t,r){var n=String(e);return!n||n.length>=t?e:""+Array(t+1-n.length).join(r)+e},"m"),r={s:n,z:mt(function(e){var e=-e.utcOffset(),t=Math.abs(e),r=Math.floor(t/60),t=t%60;return(e<=0?"+":"-")+n(r,2,"0")+":"+n(t,2,"0")},"z"),m:mt(function e(t,r){var n,i,a;return t.date(){var e=a.date,t=a.utc;if(null===e)return new Date(NaN);if(w.u(e))return new Date;if(!(e instanceof Date||"string"!=typeof e||/Z$/i.test(e))){var r,n,i=e.match(s);if(i)return r=i[2]-1||0,n=(i[7]||"0").substring(0,3),t?new Date(Date.UTC(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)):new Date(i[1],r,i[3]||1,i[4]||0,i[5]||0,i[6]||0,n)}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 w},e.isValid=function(){return this.$d.toString()!==t},e.isSame=function(e,t){return e=b(e),this.startOf(t)<=e&&e<=this.endOf(t)},e.isAfter=function(e,t){return b(e){switch(e){case"YY":return String(d.$y).slice(-2);case"YYYY":return w.s(d.$y,4,"0");case"M":return s+1;case"MM":return w.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 w.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(n);case"HH":return w.s(n,2,"0");case"h":return h(1);case"hh":return h(2);case"a":return u(n,a,!0);case"A":return u(n,a,!1);case"m":return String(a);case"mm":return w.s(a,2,"0");case"s":return String(d.$s);case"ss":return w.s(d.$s,2,"0");case"SSS":return w.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 n,i=this,t=w.p(t),a=b(e),s=6e4*(a.utcOffset()-this.utcOffset()),o=this-a,l=mt(function(){return w.m(i,a)},"D");switch(t){case y:n=l()/12;break;case m:n=l();break;case"quarter":n=l()/3;break;case f:n=(o-s)/6048e5;break;case g:n=(o-s)/864e5;break;case p:n=o/36e5;break;case d:n=o/6e4;break;case u:n=o/1e3;break;default:n=o}return r?n:w.a(n)},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 w.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()},E),T=k.prototype;function E(e){this.$L=h(e.locale,null,!0),this.parse(e),this.$x=this.$x||e.x||{},this[a]=!0}return b.prototype=T,[["$ms",i],["$s",u],["$m",d],["$H",p],["$W",g],["$M",m],["$y",y],["$D",v]].forEach(function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])}}),b.extend=function(e,t){return e.$i||(e(t,k,b),e.$i=!0),b},b.locale=h,b.isDayjs=c,b.unix=function(e){return b(1e3*e)},b.en=l[o],b.Ls=l,b.p={},b}"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()}),t=e(()=>{w=ee(te(),1),k={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},M={trace:mt(()=>{},"trace"),debug:mt(()=>{},"debug"),info:mt(()=>{},"info"),warn:mt(()=>{},"warn"),error:mt(()=>{},"error"),fatal:mt(()=>{},"fatal")},T=mt(function(e="fatal"){let t=k.fatal;"string"==typeof e?e.toLowerCase()in k&&(t=k[e]):"number"==typeof e&&(t=e),M.trace=()=>{},M.debug=()=>{},M.info=()=>{},M.warn=()=>{},M.error=()=>{},M.fatal=()=>{},t<=k.fatal&&(M.fatal=console.error?console.error.bind(console,C("FATAL"),"color: orange"):console.log.bind(console,"",C("FATAL"))),t<=k.error&&(M.error=console.error?console.error.bind(console,C("ERROR"),"color: orange"):console.log.bind(console,"",C("ERROR"))),t<=k.warn&&(M.warn=console.warn?console.warn.bind(console,C("WARN"),"color: orange"):console.log.bind(console,"",C("WARN"))),t<=k.info&&(M.info=console.info?console.info.bind(console,C("INFO"),"color: lightblue"):console.log.bind(console,"",C("INFO"))),t<=k.debug&&(M.debug=console.debug?console.debug.bind(console,C("DEBUG"),"color: lightgreen"):console.log.bind(console,"",C("DEBUG"))),t<=k.trace&&(M.trace=console.debug?console.debug.bind(console,C("TRACE"),"color: lightgreen"):console.log.bind(console,"",C("TRACE")))},"setLogLevel"),C=mt(e=>`%c${(0,w.default)().format("ss.SSS")} : ${e} : `,"format")}),re=e(()=>{S=Object.freeze({left:0,top:0,width:16,height:16}),_=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),A=Object.freeze({...S,..._}),N=Object.freeze({...A,body:"",hidden:!1})}),ne=e(()=>{re(),I=Object.freeze({width:null,height:null}),R=Object.freeze({...I,..._})}),ie=e(()=>{B=mt((e,t,r,n="")=>{var i,a=e.split(":");if("@"===e.slice(0,1)){if(a.length<2||3!!e&&!(!(t&&""===e.prefix||e.prefix)||!e.name),"validateIconName")});function se(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 oe=e(()=>{mt(se,"mergeIconTransformations")});function le(e,t){var r,n=se(e,t);for(r in N)r in _?r in e&&!(r in n)&&(n[r]=_[r]):r in t?n[r]=t[r]:r in e&&(n[r]=e[r]);return n}var ce=e(()=>{re(),oe(),mt(le,"mergeIconData")});function he(e,t){let n=e.icons,i=e.aliases||Object.create(null),a=Object.create(null);function s(e){var t,r;return n[e]?a[e]=[]:(e in a||(a[e]=null,(r=(t=i[e]&&i[e].parent)&&s(t))&&(a[e]=[t].concat(r))),a[e])}return mt(s,"resolve"),(t||Object.keys(n).concat(Object.keys(i))).forEach(s),a}var ue=e(()=>{mt(he,"getIconsTree")});function de(e,t,r){let n=e.icons,i=e.aliases||Object.create(null),a={};function s(e){a=le(n[e]||i[e],a)}return mt(s,"parse"),s(t),r.forEach(s),le(e,a)}function pe(e,t){var r;return e.icons[t]?de(e,t,[]):(r=he(e,[t])[t])?de(e,t,r):null}var ge=e(()=>{ce(),ue(),mt(de,"internalGetIconData"),mt(pe,"getIconData")});function fe(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 n,i=e.split(me);if(null===i||!i.length)return e;let a=[],s=i.shift(),o=ye.test(s);for(;;){if(!o||(n=parseFloat(s),isNaN(n))?a.push(s):a.push(Math.ceil(n*t*r)/r),void 0===(s=i.shift()))return a.join("");o=!o}}var me,ye,ve=e(()=>{me=/(-?[0-9.]*[0-9]+[0-9.]*)/g,ye=/^-?[0-9.]*[0-9]+[0-9.]*$/g,mt(fe,"calculateSize")});function xe(e,t="defs"){let r="",n=e.indexOf("<"+t);for(;0<=n;){var i=e.indexOf(">",n),a=e.indexOf("",a);if(-1===s)break;r+=e.slice(i+1,a).trim(),e=e.slice(0,n).trim()+e.slice(s+1)}return{defs:r,content:e}}function be(e,t){return e?""+e+""+t:t}function we(e,t,r){return be((e=xe(e)).defs,t+e.content+r)}var ke=e(()=>{mt(xe,"splitSVGDefs"),mt(be,"mergeDefsAndContent"),mt(we,"wrapSVGContent")});function Te(e,t){let r={...A,...e},n={...R,...t},s={left:r.left,top:r.top,width:r.width,height:r.height},o=r.body,i=([r,n].forEach(e=>{let t=[],r=e.hFlip,n=e.vFlip,i=e.rotate;r?n?i+=2:(t.push("translate("+(s.width+s.left).toString()+" "+(0-s.top).toString()+")"),t.push("scale(-1 1)"),s.top=s.left=0):n&&(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(i<0&&(i-=4*Math.floor(i/4)),i%=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()+")")}i%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=we(o,'',""))}),n.width),a=n.height,l=s.width,c=s.height,h,u,d=(null===i?(u=null===a?"1em":"auto"===a?c:a,h=fe(u,l/c)):(h="auto"===i?l:i,u=null===a?fe(h,c/l):"auto"===a?c:a),{}),p=mt((e,t)=>{Ee(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 Ee,Ce=e(()=>{re(),ne(),ve(),ke(),Ee=mt(e=>"unset"===e||"undefined"===e||"none"===e,"isUnsetKeyword"),mt(Te,"iconToSVG")});function Se(n,i=Ae){for(var e,t=[];e=_e.exec(n);)t.push(e[1]);if(t.length){let r="suffix"+(16777216*Math.random()|Date.now()).toString(16);t.forEach(e=>{var t="function"==typeof i?i(e):i+(Le++).toString(),e=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");n=n.replace(new RegExp('([#;"])('+e+')([")]|\\.[a-z])',"g"),"$1"+t+r+"$3")}),n=n.replace(new RegExp(r,"g"),"")}return n}var _e,Ae,Le,Ne=e(()=>{_e=/\sid="(\S+)"/g,Ae="IconifyId"+Date.now().toString(16)+(16777216*Math.random()|0).toString(16),Le=0,mt(Se,"replaceIDs")});function Ie(e,t){let r=-1===e.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(var n in t)r+=" "+n+'="'+t[n]+'"';return'"+e+""}var Re,Me,De,Oe,Pe,Be,$e,Fe=e(()=>{mt(Ie,"iconToHTML")}),ze=VBe((e,t)=>{function n(e){if(!(100<(e=String(e)).length)&&(e=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e))){var t=parseFloat(e[1]);switch((e[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return 315576e5*t;case"weeks":case"week":case"w":return 6048e5*t;case"days":case"day":case"d":return 864e5*t;case"hours":case"hour":case"hrs":case"hr":case"h":return 36e5*t;case"minutes":case"minute":case"mins":case"min":case"m":return 6e4*t;case"seconds":case"second":case"secs":case"sec":case"s":return 1e3*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return t;default:return}}}function i(e){var t=Math.abs(e);return 864e5<=t?Math.round(e/864e5)+"d":36e5<=t?Math.round(e/36e5)+"h":6e4<=t?Math.round(e/6e4)+"m":1e3<=t?Math.round(e/1e3)+"s":e+"ms"}function a(e){var t=Math.abs(e);return 864e5<=t?r(e,t,864e5,"day"):36e5<=t?r(e,t,36e5,"hour"):6e4<=t?r(e,t,6e4,"minute"):1e3<=t?r(e,t,1e3,"second"):e+" ms"}function r(e,t,r,n){return t=1.5*r<=t,Math.round(e/r)+" "+n+(t?"s":"")}t.exports=function(e,t){t=t||{};var r=typeof e;if("string"==r&&0{function r(t){function e(t){let r=0;for(let e=0;e{var r;return"%%"===e?"%":(i++,"function"==typeof(t=o.formatters[t])&&(r=a[i],e=t.call(n,r),a.splice(i,1),i--),e)}),o.formatArgs.call(n,a),(n.log||o.log).apply(n,a)}}return mt(s,"debug"),s.namespace=e,s.useColors=o.useColors(),s.color=o.selectColor(e),s.extend=a,s.destroy=o.destroy,Object.defineProperty(s,"enabled",{enumerable:!0,configurable:!1,get:mt(()=>null!==t?t:(n!==o.namespaces&&(n=o.namespaces,i=o.enabled(e)),i),"get"),set:mt(e=>{t=e},"set")}),"function"==typeof o.init&&o.init(s),s}function a(e,t){return(t=o(this.namespace+("u""-"+e)].join(",");return o.enable(""),e}function s(e){for(var t of o.skips)if(n(e,t))return!1;for(var r of o.names)if(n(e,r))return!0;return!1}function l(e){return e instanceof Error?e.stack||e.message:e}function c(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")}return((o.debug=o).default=o).coerce=l,o.disable=i,o.enable=r,o.enabled=s,o.humanize=ze(),o.destroy=c,Object.keys(t).forEach(e=>{o[e]=t[e]}),o.names=[],o.skips=[],o.formatters={},mt(e,"selectColor"),o.selectColor=e,mt(o,"createDebug"),mt(a,"extend"),mt(r,"enable"),mt(n,"matchesTemplate"),mt(i,"disable"),mt(s,"enabled"),mt(l,"coerce"),mt(c,"destroy"),o.enable(o.load()),o}mt(r,"setup"),t.exports=r}),Ue=VBe((t,r)=>{function e(){if(typeof window<"u"&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if(typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;let e;return typeof document<"u"&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||typeof window<"u"&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||typeof navigator<"u"&&navigator.userAgent&&(e=navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/))&&31<=parseInt(e[1],10)||typeof navigator<"u"&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)}function n(e){if(e[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+e[0]+(this.useColors?"%c ":" ")+"+"+r.exports.humanize(this.diff),this.useColors){var n="color: "+this.color;e.splice(1,0,n,"color: inherit");let t=0,r=0;e[0].replace(/%[a-zA-Z%]/g,e=>{"%%"!==e&&(t++,"%c"===e)&&(r=t)}),e.splice(r,0,n)}}function i(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch{}}function a(){let e;try{e=t.storage.getItem("debug")}catch{}return e=!e&&typeof process<"u"&&"env"in process?process.env.DEBUG:e}function s(){try{return localStorage}catch{}}t.formatArgs=n,t.save=i,t.load=a,t.useColors=e,t.storage=s(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],mt(e,"useColors"),mt(n,"formatArgs"),t.log=console.debug||console.log||(()=>{}),mt(i,"save"),mt(a,"load"),mt(s,"localstorage"),r.exports=Ge()(t),r.exports.formatters.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}}),qe=e(()=>{ie(),ge(),Ce(),Ne(),Fe(),ee(Ue(),1)}),je=e(()=>{t(),qe(),Re={body:'?',height:80,width:80},Me=new Map,De=new Map,Oe=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(M.debug("Registering icon pack:",t.name),"loader"in t)De.set(t.name,t.loader);else{if(!("icons"in t))throw M.error("Invalid icon loader:",t),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');Me.set(t.name,t.icons)}}},"registerIconPacks"),Pe=mt(async(e,t)=>{var r=B(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 n=Me.get(t);if(!n){var i=De.get(t);if(!i)throw new Error("Icon set not found: "+r.prefix);try{n={...await i(),prefix:t},Me.set(t,n)}catch(e){throw M.error(e),new Error("Failed to load icon set: "+r.prefix)}}if(i=pe(n,r.name))return i;throw new Error("Icon not found: "+e)},"getRegisteredIconData"),Be=mt(async e=>{try{return await Pe(e),!0}catch{return!1}},"isIconAvailable"),$e=mt(async(e,t,r)=>{let n;try{n=await Pe(e,t?.fallbackPrefix)}catch(e){M.error(e),n=Re}return Ie(Se((e=Te(n,t)).body),{...e.attributes,...r})},"getIconSVG")});function We(e){for(var t=[],r=1;r{mt(We,"dedent")}),zr=e(()=>{Ye=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s,He=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Ve=/\s*%%.*\n/gm}),Gr=e(()=>{Xe=class extends Error{static{mt(this,"UnknownDiagramError")}constructor(e){super(e),this.name="UnknownDiagramError"}}}),Ur=e(()=>{t(),zr(),Gr(),Ke={},Ze=mt(function(e,t){e=e.replace(Ye,"").replace(He,"").replace(Ve,` +`);for(var[r,{detector:n}]of Object.entries(Ke))if(n(e,t))return r;throw new Xe("No diagram type detected matching given configuration for text: "+e)},"detectType"),Qe=mt((...e)=>{for(var{id:t,detector:r,loader:n}of e)Je(t,r,n)},"registerLazyLoadedDiagrams"),Je=mt((e,t,r)=>{Ke[e]&&M.warn(`Detector with key ${e} already exists. Overwriting.`),Ke[e]={detector:t,loader:r},M.debug(`Detector with key ${e} added`+(r?" with loader":""))},"addDetector"),et=mt(e=>Ke[e].loader,"getDiagramLoader")}),qr=e(()=>{function B(){this.yy={}}var e=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),t=[1,24],r=[1,25],$=[1,26],F=[1,27],z=[1,28],n=[1,63],i=[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],x=[1,37],b=[1,38],w=[1,39],k=[1,40],T=[1,41],E=[1,42],C=[1,43],S=[1,44],_=[1,45],A=[1,46],L=[1,47],N=[1,48],I=[1,50],G=[1,51],U=[1,52],q=[1,53],j=[1,54],W=[1,55],Y=[1,56],H=[1,57],V=[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],R=[1,82],M=[1,83],D=[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],ne=[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,n,i,a,s){var o=a.length-1;switch(i){case 3:n.setDirection("TB");break;case 4:n.setDirection("BT");break;case 5:n.setDirection("RL");break;case 6:n.setDirection("LR");break;case 8:case 9:case 10:case 11:case 12:n.setC4Type(a[o-3]);break;case 19:n.setTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 20:n.setAccDescription(a[o].substring(15)),this.$=a[o].substring(15);break;case 21:this.$=a[o].trim(),n.setTitle(this.$);break;case 22:case 23:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 28:a[o].splice(2,0,"ENTERPRISE"),n.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 29:a[o].splice(2,0,"SYSTEM"),n.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 30:n.addPersonOrSystemBoundary(...a[o]),this.$=a[o];break;case 31:a[o].splice(2,0,"CONTAINER"),n.addContainerBoundary(...a[o]),this.$=a[o];break;case 32:n.addDeploymentNode("node",...a[o]),this.$=a[o];break;case 33:n.addDeploymentNode("nodeL",...a[o]),this.$=a[o];break;case 34:n.addDeploymentNode("nodeR",...a[o]),this.$=a[o];break;case 35:n.popBoundaryParseStack();break;case 39:n.addPersonOrSystem("person",...a[o]),this.$=a[o];break;case 40:n.addPersonOrSystem("external_person",...a[o]),this.$=a[o];break;case 41:n.addPersonOrSystem("system",...a[o]),this.$=a[o];break;case 42:n.addPersonOrSystem("system_db",...a[o]),this.$=a[o];break;case 43:n.addPersonOrSystem("system_queue",...a[o]),this.$=a[o];break;case 44:n.addPersonOrSystem("external_system",...a[o]),this.$=a[o];break;case 45:n.addPersonOrSystem("external_system_db",...a[o]),this.$=a[o];break;case 46:n.addPersonOrSystem("external_system_queue",...a[o]),this.$=a[o];break;case 47:n.addContainer("container",...a[o]),this.$=a[o];break;case 48:n.addContainer("container_db",...a[o]),this.$=a[o];break;case 49:n.addContainer("container_queue",...a[o]),this.$=a[o];break;case 50:n.addContainer("external_container",...a[o]),this.$=a[o];break;case 51:n.addContainer("external_container_db",...a[o]),this.$=a[o];break;case 52:n.addContainer("external_container_queue",...a[o]),this.$=a[o];break;case 53:n.addComponent("component",...a[o]),this.$=a[o];break;case 54:n.addComponent("component_db",...a[o]),this.$=a[o];break;case 55:n.addComponent("component_queue",...a[o]),this.$=a[o];break;case 56:n.addComponent("external_component",...a[o]),this.$=a[o];break;case 57:n.addComponent("external_component_db",...a[o]),this.$=a[o];break;case 58:n.addComponent("external_component_queue",...a[o]),this.$=a[o];break;case 60:n.addRel("rel",...a[o]),this.$=a[o];break;case 61:n.addRel("birel",...a[o]),this.$=a[o];break;case 62:n.addRel("rel_u",...a[o]),this.$=a[o];break;case 63:n.addRel("rel_d",...a[o]),this.$=a[o];break;case 64:n.addRel("rel_l",...a[o]),this.$=a[o];break;case 65:n.addRel("rel_r",...a[o]),this.$=a[o];break;case 66:n.addRel("rel_b",...a[o]),this.$=a[o];break;case 67:a[o].splice(0,1),n.addRel("rel",...a[o]),this.$=a[o];break;case 68:n.updateElStyle("update_el_style",...a[o]),this.$=a[o];break;case 69:n.updateRelStyle("update_rel_style",...a[o]),this.$=a[o];break;case 70:n.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:n,36:i,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:x,53:b,54:w,55:k,56:T,57:E,58:C,59:S,60:_,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,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:n,36:i,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:x,53:b,54:w,55:k,56:T,57:E,58:C,59:S,60:_,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,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:n,36:i,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:x,53:b,54:w,55:k,56:T,57:E,58:C,59:S,60:_,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,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:n,36:i,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:x,53:b,54:w,55:k,56:T,57:E,58:C,59:S,60:_,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,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:n,36:i,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:x,53:b,54:w,55:k,56:T,57:E,58:C,59:S,60:_,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,73:X,74:K},{14:[1,74]},e(Z,[2,13],{43:23,29:49,30:61,32:62,20:75,34:n,36:i,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:x,53:b,54:w,55:k,56:T,57:E,58:C,59:S,60:_,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,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:R,77:M,79:D,80:O},{35:86,75:81,76:R,77:M,79:D,80:O},{35:87,75:81,76:R,77:M,79:D,80:O},{35:88,75:81,76:R,77:M,79:D,80:O},{35:89,75:81,76:R,77:M,79:D,80:O},{35:90,75:81,76:R,77:M,79:D,80:O},{35:91,75:81,76:R,77:M,79:D,80:O},{35:92,75:81,76:R,77:M,79:D,80:O},{35:93,75:81,76:R,77:M,79:D,80:O},{35:94,75:81,76:R,77:M,79:D,80:O},{35:95,75:81,76:R,77:M,79:D,80:O},{35:96,75:81,76:R,77:M,79:D,80:O},{35:97,75:81,76:R,77:M,79:D,80:O},{35:98,75:81,76:R,77:M,79:D,80:O},{35:99,75:81,76:R,77:M,79:D,80:O},{35:100,75:81,76:R,77:M,79:D,80:O},{35:101,75:81,76:R,77:M,79:D,80:O},{35:102,75:81,76:R,77:M,79:D,80:O},{35:103,75:81,76:R,77:M,79:D,80:O},{35:104,75:81,76:R,77:M,79:D,80:O},e(P,[2,59]),{35:105,75:81,76:R,77:M,79:D,80:O},{35:106,75:81,76:R,77:M,79:D,80:O},{35:107,75:81,76:R,77:M,79:D,80:O},{35:108,75:81,76:R,77:M,79:D,80:O},{35:109,75:81,76:R,77:M,79:D,80:O},{35:110,75:81,76:R,77:M,79:D,80:O},{35:111,75:81,76:R,77:M,79:D,80:O},{35:112,75:81,76:R,77:M,79:D,80:O},{35:113,75:81,76:R,77:M,79:D,80:O},{35:114,75:81,76:R,77:M,79:D,80:O},{35:115,75:81,76:R,77:M,79:D,80:O},{20:116,29:49,30:61,32:62,34:n,36:i,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:x,53:b,54:w,55:k,56:T,57:E,58:C,59:S,60:_,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,73:X,74:K},{12:[1,118],33:[1,117]},{35:119,75:81,76:R,77:M,79:D,80:O},{35:120,75:81,76:R,77:M,79:D,80:O},{35:121,75:81,76:R,77:M,79:D,80:O},{35:122,75:81,76:R,77:M,79:D,80:O},{35:123,75:81,76:R,77:M,79:D,80:O},{35:124,75:81,76:R,77:M,79:D,80:O},{35:125,75:81,76:R,77:M,79:D,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:n,36:i,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:x,53:b,54:w,55:k,56:T,57:E,58:C,59:S,60:_,61:A,62:L,63:N,64:I,65:G,66:U,67:q,68:j,69:W,70:Y,71:H,72:V,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:R,77:M,79:D,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(ne,[2,25]),e(ne,[2,26],{12:[1,138]}),e(ne,[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,n=[0],i=[],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"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0{ne=me((e,r,{depth:n=2,clobber:i=!1}={})=>{let a={depth:n,clobber:i};return Array.isArray(r)&&!Array.isArray(e)?(r.forEach(t=>ne(e,t,a)),e):Array.isArray(r)&&Array.isArray(e)?(r.forEach(t=>{e.includes(t)||e.push(t)}),e):void 0===e||n<=0?null!=e&&"object"==typeof e&&"object"==typeof r?Object.assign(e,r):r:(void 0!==r&&"object"==typeof e&&"object"==typeof r&&Object.keys(r).forEach(t=>{"object"!=typeof r[t]||void 0!==e[t]&&"object"!=typeof e[t]?(i||"object"!=typeof e[t]&&"object"!=typeof r[t])&&(e[t]=r[t]):(void 0===e[t]&&(e[t]=Array.isArray(r[t])?[]:{}),e[t]=ne(e[t],r[t],{depth:n-1,clobber:i}))}),e)},"assignWithDepth"),ie=ne}),Wr=t(()=>{ae={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:me(t=>255<=t?255:t<0?0:t,"r"),g:me(t=>255<=t?255:t<0?0:t,"g"),b:me(t=>255<=t?255:t<0?0:t,"b"),h:me(t=>t%360,"h"),s:me(t=>100<=t?100:t<0?0:t,"s"),l:me(t=>100<=t?100:t<0?0:t,"l"),a:me(t=>1<=t?1:t<0?0:t,"a")},toLinear:me(t=>{var e=t/255;return.03928(r<0&&(r+=1),1{if(!e)return 2.55*r;t/=360,e/=100;var i=(r/=100)<.5?r*(1+e):r+e-r*e,a=2*r-i;switch(n){case"r":return 255*ae.hue2rgb(a,i,t+.3333333333333333);case"g":return 255*ae.hue2rgb(a,i,t);case"b":return 255*ae.hue2rgb(a,i,t-.3333333333333333)}},"hsl2rgb"),rgb2hsl:me(({r:t,g:e,b:r},n)=>{t/=255,e/=255,r/=255;var i=Math.max(t,e,r),a=Math.min(t,e,r),s=(i+a)/2;if("l"===n)return 100*s;if(i===a)return 0;var o=i-a;if("s"===n)return 100*(.5{oe={clamp:me((t,e,r)=>rMath.round(1e10*t)/1e10,"round")},le=oe}),Hr=t(()=>{ce={dec2hex:me(t=>1<(t=Math.round(t).toString(16)).length?t:"0"+t,"dec2hex")},he=ce}),Vr=t(()=>{Wr(),Yr(),Hr(),ue={channel:se,lang:le,unit:he}}),Xr=t(()=>{Vr(),de={};for(let t=0;t<=255;t++)de[t]=ue.unit.dec2hex(t);pe={ALL:0,RGB:1,HSL:2}}),Kr=t(()=>{Xr(),ge=class{static{me(this,"Type")}constructor(){this.type=pe.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=pe.ALL}is(t){return this.type===t}},fe=ge}),Zr=t(()=>{Vr(),Kr(),Xr(),ve=class{static{me(this,"Channels")}constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new fe}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=pe.ALL,this}_ensureHSL(){var t=this.data,{h:e,s:r,l:n}=t;void 0===e&&(t.h=ue.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=ue.channel.rgb2hsl(t,"s")),void 0===n&&(t.l=ue.channel.rgb2hsl(t,"l"))}_ensureRGB(){var t=this.data,{r:e,g:r,b:n}=t;void 0===e&&(t.r=ue.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=ue.channel.hsl2rgb(t,"g")),void 0===n&&(t.b=ue.channel.hsl2rgb(t,"b"))}get r(){var t=this.data,e=t.r;return this.type.is(pe.HSL)||void 0===e?(this._ensureHSL(),ue.channel.hsl2rgb(t,"r")):e}get g(){var t=this.data,e=t.g;return this.type.is(pe.HSL)||void 0===e?(this._ensureHSL(),ue.channel.hsl2rgb(t,"g")):e}get b(){var t=this.data,e=t.b;return this.type.is(pe.HSL)||void 0===e?(this._ensureHSL(),ue.channel.hsl2rgb(t,"b")):e}get h(){var t=this.data,e=t.h;return this.type.is(pe.RGB)||void 0===e?(this._ensureRGB(),ue.channel.rgb2hsl(t,"h")):e}get s(){var t=this.data,e=t.s;return this.type.is(pe.RGB)||void 0===e?(this._ensureRGB(),ue.channel.rgb2hsl(t,"s")):e}get l(){var t=this.data,e=t.l;return this.type.is(pe.RGB)||void 0===e?(this._ensureRGB(),ue.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(pe.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(pe.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(pe.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(pe.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(pe.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(pe.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}},xe=ve}),Qr=t(()=>{Zr(),be=new xe({r:0,g:0,b:0,a:0},"transparent"),we=be}),Jr=t(()=>{Qr(),Xr(),ke={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:me(t=>{if(35===t.charCodeAt(0)){var e,r,n,i,a,s=t.match(ke.re);if(s)return s=s[1],e=parseInt(s,16),s=s.length,we.set({r:(e>>(n=(r=4>n*(2+i)&a)*r,b:(e>>n*(1+i)&a)*r,a:s?(e&a)*r/255:1},t)}},"parse"),stringify:me(t=>{var{r:t,g:e,b:r,a:n}=t;return n<1?"#"+de[Math.round(t)]+de[Math.round(e)]+de[Math.round(r)]+de[Math.round(255*n)]:"#"+de[Math.round(t)]+de[Math.round(e)]+de[Math.round(r)]},"stringify")},Te=ke}),tn=t(()=>{Vr(),Qr(),Ee={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:me(t=>{if(r=t.match(Ee.hueRe)){var[,e,r]=r;switch(r){case"grad":return ue.channel.clamp.h(.9*parseFloat(e));case"rad":return ue.channel.clamp.h(180*parseFloat(e)/Math.PI);case"turn":return ue.channel.clamp.h(360*parseFloat(e))}}return ue.channel.clamp.h(parseFloat(t))},"_hue2deg"),parse:me(t=>{var e,r,n,i,a=t.charCodeAt(0);if((104===a||72===a)&&(a=t.match(Ee.re)))return[,a,e,r,n,i]=a,we.set({h:Ee._hue2deg(a),s:ue.channel.clamp.s(parseFloat(e)),l:ue.channel.clamp.l(parseFloat(r)),a:n?ue.channel.clamp.a(i?parseFloat(n)/100:parseFloat(n)):1},t)},"parse"),stringify:me(t=>{var{h:t,s:e,l:r,a:n}=t;return n<1?`hsla(${ue.lang.round(t)}, ${ue.lang.round(e)}%, ${ue.lang.round(r)}%, ${n})`:`hsl(${ue.lang.round(t)}, ${ue.lang.round(e)}%, ${ue.lang.round(r)}%)`},"stringify")},Ce=Ee}),en=t(()=>{Jr(),_e={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:me(t=>{if(t=t.toLowerCase(),t=_e.colors[t])return Te.parse(t)},"parse"),stringify:me(t=>{var e,r=Te.stringify(t);for(e in _e.colors)if(_e.colors[e]===r)return e},"stringify")},Se=_e}),rn=t(()=>{Vr(),Qr(),Ae={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:me(t=>{var e,r,n,i,a,s,o,l=t.charCodeAt(0);if((114===l||82===l)&&(l=t.match(Ae.re)))return[,l,e,r,n,i,a,s,o]=l,we.set({r:ue.channel.clamp.r(e?2.55*parseFloat(l):parseFloat(l)),g:ue.channel.clamp.g(n?2.55*parseFloat(r):parseFloat(r)),b:ue.channel.clamp.b(a?2.55*parseFloat(i):parseFloat(i)),a:s?ue.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},t)},"parse"),stringify:me(t=>{var{r:t,g:e,b:r,a:n}=t;return n<1?`rgba(${ue.lang.round(t)}, ${ue.lang.round(e)}, ${ue.lang.round(r)}, ${ue.lang.round(n)})`:`rgb(${ue.lang.round(t)}, ${ue.lang.round(e)}, ${ue.lang.round(r)})`},"stringify")},Le=Ae}),nn=t(()=>{Jr(),tn(),en(),rn(),Xr(),Ne={format:{keyword:Se,hex:Te,rgb:Le,rgba:Le,hsl:Ce,hsla:Ce},parse:me(t=>{if("string"!=typeof t)return t;var e=Te.parse(t)||Le.parse(t)||Ce.parse(t)||Se.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},"parse"),stringify:me(t=>!t.changed&&t.color?t.color:(t.type.is(pe.HSL)||void 0===t.data.r?Ce:t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?Le:Te).stringify(t),"stringify")},Ie=Ne}),an=t(()=>{Vr(),nn(),Re=me((t,e)=>{var r,n=Ie.parse(t);for(r in e)n[r]=ue.channel.clamp[r](e[r]);return Ie.stringify(n)},"change"),Me=Re}),sn=t(()=>{Vr(),Qr(),nn(),an(),De=me((t,e,r=0,n=1)=>"number"!=typeof t?Me(t,{a:e}):(t=we.set({r:ue.channel.clamp.r(t),g:ue.channel.clamp.g(e),b:ue.channel.clamp.b(r),a:ue.channel.clamp.a(n)}),Ie.stringify(t)),"rgba"),Oe=De}),on=t(()=>{Vr(),nn(),Pe=me((t,e)=>ue.lang.round(Ie.parse(t)[e]),"channel"),Be=Pe}),ln=t(()=>{Vr(),nn(),Fe=me(t=>{var{r:t,g:e,b:r}=Ie.parse(t),t=.2126*ue.channel.toLinear(t)+.7152*ue.channel.toLinear(e)+.0722*ue.channel.toLinear(r);return ue.lang.round(t)},"luminance"),$e=Fe}),cn=t(()=>{ln(),ze=me(t=>.5<=$e(t),"isLight"),Ge=ze}),hn=t(()=>{cn(),Ue=me(t=>!Ge(t),"isDark"),qe=Ue}),un=t(()=>{Vr(),nn(),je=me((t,e,r)=>{var n=(t=Ie.parse(t))[e];return n!==(r=ue.channel.clamp[e](n+r))&&(t[e]=r),Ie.stringify(t)},"adjustChannel"),We=je}),dn=t(()=>{un(),Ye=me((t,e)=>We(t,"l",e),"lighten"),a=Ye}),pn=t(()=>{un(),He=me((t,e)=>We(t,"l",-e),"darken"),Ve=He}),gn=t(()=>{nn(),an(),Xe=me((t,e)=>{var r,n=Ie.parse(t),i={};for(r in e)e[r]&&(i[r]=n[r]+e[r]);return Me(t,i)},"adjust"),r=Xe}),fn=t(()=>{nn(),sn(),Ke=me((t,e,r=50)=>{var{r:t,g:n,b:i,a}=Ie.parse(t),{r:e,g:s,b:o,a:l}=Ie.parse(e),c=2*(r/=100)-1,h=a-l;return Oe(t*(c=(1+(c*h==-1?c:(c+h)/(1+c*h)))/2)+e*(h=1-c),n*c+s*h,i*c+o*h,a*r+l*(1-r))},"mix"),Ze=Ke}),mn=t(()=>{nn(),fn(),Qe=me((t,e=100)=>{var r=Ie.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Ze(r,t,e)},"invert"),n=Qe}),yn=t(()=>{sn(),on(),hn(),dn(),pn(),gn(),mn()}),vn=t(()=>{yn()}),xn=t(()=>{Je="#ffffff",tr="#f2f2f2"}),bn=t(()=>{vn(),er=me((t,e)=>r(t,e?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder")}),wn=t(()=>{vn(),xn(),bn(),rr=class{static{me(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||r(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||r(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||er(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||er(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||er(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||er(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||n(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||n(this.tertiaryColor),this.lineColor=this.lineColor||n(this.background),this.arrowheadColor=this.arrowheadColor||n(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?Ve(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||Ve(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||n(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||a(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||Ve(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Ve(this.mainBkg,10)):(this.rowOdd=this.rowOdd||a(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||a(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||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},nr=me(t=>{var e=new rr;return e.calculate(t),e},"getThemeVariables")}),kn=t(()=>{vn(),bn(),ir=class{static{me(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=a(this.primaryColor,16),this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=n(this.background),this.secondaryBorderColor=er(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=er(this.tertiaryColor,this.darkMode),this.primaryTextColor=n(this.primaryColor),this.secondaryTextColor=n(this.secondaryColor),this.tertiaryTextColor=n(this.tertiaryColor),this.lineColor=n(this.background),this.textColor=n(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=a(n("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Oe(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=Ve("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=Ve(this.sectionBkgColor,10),this.taskBorderColor=Oe(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Oe(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||a(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Ve(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=a(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=a(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=a(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=r(this.primaryColor,{h:64}),this.fillType3=r(this.secondaryColor,{h:64}),this.fillType4=r(this.primaryColor,{h:-64}),this.fillType5=r(this.secondaryColor,{h:-64}),this.fillType6=r(this.primaryColor,{h:128}),this.fillType7=r(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||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330});for(let t=0;t{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},ar=me(t=>{var e=new ir;return e.calculate(t),e},"getThemeVariables")}),Tn=t(()=>{vn(),bn(),xn(),sr=class{static{me(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=r(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=er(this.primaryColor,this.darkMode),this.secondaryBorderColor=er(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=er(this.tertiaryColor,this.darkMode),this.primaryTextColor=n(this.primaryColor),this.secondaryTextColor=n(this.secondaryColor),this.tertiaryTextColor=n(this.tertiaryColor),this.lineColor=n(this.background),this.textColor=n(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Oe(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Ve(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Ve(this.tertiaryColor,40);for(let t=0;t{"calculated"===this[t]&&(this[t]=void 0)}),"object"!=typeof e?this.updateColors():((t=Object.keys(e)).forEach(t=>{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},or=me(t=>{var e=new sr;return e.calculate(t),e},"getThemeVariables")}),En=t(()=>{vn(),xn(),bn(),lr=class{static{me(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=a("#cde498",10),this.primaryBorderColor=er(this.primaryColor,this.darkMode),this.secondaryBorderColor=er(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=er(this.tertiaryColor,this.darkMode),this.primaryTextColor=n(this.primaryColor),this.secondaryTextColor=n(this.secondaryColor),this.tertiaryTextColor=n(this.primaryColor),this.lineColor=n(this.background),this.textColor=n(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=Ve(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||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Ve(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Ve(this.tertiaryColor,40);for(let t=0;t{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},cr=me(t=>{var e=new lr;return e.calculate(t),e},"getThemeVariables")}),Cn=t(()=>{vn(),bn(),xn(),hr=class{static{me(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=a(this.contrast,55),this.background="#ffffff",this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=er(this.primaryColor,this.darkMode),this.secondaryBorderColor=er(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=er(this.tertiaryColor,this.darkMode),this.primaryTextColor=n(this.primaryColor),this.secondaryTextColor=n(this.secondaryColor),this.tertiaryTextColor=n(this.tertiaryColor),this.lineColor=n(this.background),this.textColor=n(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||a(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=a(this.contrast,55),this.border2=this.contrast,this.actorBorder=a(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 t=0;t{this[t]=e[t]}),this.updateColors(),t.forEach(t=>{this[t]=e[t]}))}},ur=me(t=>{var e=new hr;return e.calculate(t),e},"getThemeVariables")}),_n=t(()=>{wn(),kn(),Tn(),En(),Cn(),dr={base:{getThemeVariables:nr},dark:{getThemeVariables:ar},default:{getThemeVariables:or},forest:{getThemeVariables:cr},neutral:{getThemeVariables:ur}}}),Sn=t(()=>{pr={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},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}}),An=t(()=>{_n(),Sn(),gr={...pr,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:dr.default.getThemeVariables(),sequence:{...pr.sequence,messageFont:me(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:me(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:me(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{hideEmptyMembersBox:!1},gantt:{...pr.gantt,tickInterval:void 0,useWidth:void 0},c4:{...pr.c4,useWidth:void 0,personFont:me(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...pr.flowchart,inheritDir:!1},external_personFont:me(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:me(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:me(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:me(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:me(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:me(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:me(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:me(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:me(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:me(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:me(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:me(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:me(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:me(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:me(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:me(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:me(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:me(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:me(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:me(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:me(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...pr.pie,useWidth:984},xyChart:{...pr.xyChart,useWidth:void 0},requirement:{...pr.requirement,useWidth:void 0},packet:{...pr.packet},radar:{...pr.radar}},fr=me((r,n="")=>Object.keys(r).reduce((t,e)=>Array.isArray(r[e])?t:"object"==typeof r[e]&&null!==r[e]?[...t,n+e,...fr(r[e],"")]:[...t,n+e],[]),"keyify"),mr=new Set(fr(gr,"")),yr=gr}),Ln=t(()=>{An(),e(),vr=me(t=>{if(M.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach(t=>vr(t));else{for(var e of Object.keys(t)){var r;if(M.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!mr.has(e)||null==t[e])M.debug("sanitize deleting key: ",e),delete t[e];else if("object"==typeof t[e])M.debug("sanitizing object",e),vr(t[e]);else for(r of["themeCSS","fontFamily","altFontFamily"])e.includes(r)&&(M.debug("sanitizing css option",e),t[e]=xr(t[e]))}if(t.themeVariables)for(var n of Object.keys(t.themeVariables)){var i=t.themeVariables[n];i?.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[n]="")}M.debug("After sanitization",t)}},"sanitizeDirective"),xr=me(t=>{let e=0,r=0;for(var n of t){if(e{jr(),e(),_n(),An(),Ln(),br=Object.freeze(yr),wr=ie({},br),Tr=[],Er=ie({},br),Cr=me((t,e)=>{let r=ie({},t),n={};for(var i of e)Rr(i),n=ie(n,i);return r=ie(r,n),n.theme&&n.theme in dr&&(t=ie({},kr),e=ie(t.themeVariables||{},n.themeVariables),r.theme)&&r.theme in dr&&(r.themeVariables=dr[r.theme].getThemeVariables(e)),Fr(Er=r),Er},"updateCurrentConfig"),_r=me(t=>(wr=ie({},br),wr=ie(wr,t),t.theme&&dr[t.theme]&&(wr.themeVariables=dr[t.theme].getThemeVariables(t.themeVariables)),Cr(wr,Tr),wr),"setSiteConfig"),Sr=me(t=>{kr=ie({},t)},"saveConfigFromInitialize"),Ar=me(t=>(wr=ie(wr,t),Cr(wr,Tr),wr),"updateSiteConfig"),Lr=me(()=>ie({},wr),"getSiteConfig"),Nr=me(t=>(Fr(t),ie(Er,t),Ir()),"setConfig"),Ir=me(()=>ie({},Er),"getConfig"),Rr=me(e=>{e&&(["secure",...wr.secure??[]].forEach(t=>{Object.hasOwn(e,t)&&(M.debug("Denied attempt to modify a secure key "+t,e[t]),delete e[t])}),Object.keys(e).forEach(t=>{t.startsWith("__")&&delete e[t]}),Object.keys(e).forEach(t=>{"string"==typeof e[t]&&(e[t].includes("<")||e[t].includes(">")||e[t].includes("url(data:"))&&delete e[t],"object"==typeof e[t]&&Rr(e[t])}))},"sanitize"),Mr=me(t=>{vr(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),Tr.push(t),Cr(wr,Tr)},"addDirective"),Dr=me((t=wr)=>{Cr(t,Tr=[])},"reset"),Or={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Pr={},Br=me(t=>{Pr[t]||(M.warn(Or[t]),Pr[t]=!0)},"issueWarning"),Fr=me(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&Br("LAZY_LOAD_DEPRECATED")},"checkConfig")});function In(i){return function(t){t instanceof RegExp&&(t.lastIndex=0);for(var e=arguments.length,r=new Array(1Bn(t),"DOMPurify");if(u.version="3.2.5",u.removed=[],!t||!t.document||t.document.nodeType!==Li.document||!t.Element)return u.isSupported=!1,u;let i=t.document,c=i,O=c.currentScript,{DocumentFragment:P,HTMLTemplateElement:B,Node:F,Element:$,NodeFilter:e,NamedNodeMap:z=t.NamedNodeMap||t.MozNamedAttrMap,HTMLFormElement:G,DOMParser:U,trustedTypes:d}=t,r=$.prototype,q=Pn(r,"cloneNode"),j=Pn(r,"remove"),W=Pn(r,"nextSibling"),Y=Pn(r,"childNodes"),s=Pn(r,"parentNode");var H;"function"==typeof B&&(H=i.createElement("template")).content&&H.content.ownerDocument&&(i=H.content.ownerDocument);let p,h="",{implementation:V,createNodeIterator:X,createDocumentFragment:K,getElementsByTagName:Z}=i,Q=c.importNode,g=Ri(),{MUSTACHE_EXPR:J,ERB_EXPR:tt,TMPLIT_EXPR:et,DATA_ATTR:rt,ARIA_ATTR:nt,IS_SCRIPT_OR_DATA:it,ATTR_WHITESPACE:at,CUSTOM_ELEMENT:st}=(u.isSupported="function"==typeof Fn&&"function"==typeof s&&V&&void 0!==V.createHTMLDocument,Ai),ot=Ai.IS_ALLOWED_URI,f=null,lt=Mn({},[...oi,...li,...ci,...ui,...pi]),m=null,ct=Mn({},[...gi,...fi,...mi,...yi]),o=Object.seal(jn(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}})),y=null,ht=null,ut=!0,dt=!0,pt=!1,gt=!0,v=!1,ft=!0,x=!1,mt=!1,yt=!1,b=!1,w=!1,k=!1,vt=!0,xt=!1,bt=!0,T=!1,n,l=null,wt=Mn({},["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"]),kt=null,Tt=Mn({},["audio","video","img","source","image","track"]),Et=null,Ct=Mn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),a="http://www.w3.org/1998/Math/MathML",E="http://www.w3.org/2000/svg",C="http://www.w3.org/1999/xhtml",_=C,_t=!1,St=null,At=Mn({},[a,E,C],Jn),S=Mn({},["mi","mo","mn","ms","mtext"]),A=Mn({},["annotation-xml"]),Lt=Mn({},["title","style","font","a","script"]),L=null,Nt=["application/xhtml+xml","text/html"],N=null,I=null,It=i.createElement("form"),Rt=me(function(t){return t instanceof RegExp||t instanceof Function},"isRegexOrFunction"),Mt=me(function(){var t=0"+t:(n=ti(t,/^[\r\n\t ]+/),r=n&&n[0]),"application/xhtml+xml"===L&&_===C&&(t=''+t+"");var n=p?p.createHTML(t):t;if(_===C)try{e=(new U).parseFromString(n,L)}catch{}if(!e||!e.documentElement){e=V.createDocument(_,"template",null);try{e.documentElement.innerHTML=_t?h:n}catch{}}return n=e.body||e.documentElement,t&&r&&n.insertBefore(i.createTextNode(r),n.childNodes[0]||null),_===C?Z.call(e,x?"html":"body")[0]:x?e.documentElement:n},"_initDocument"),Ft=me(function(t){return X.call(t.ownerDocument||t,t,e.SHOW_ELEMENT|e.SHOW_COMMENT|e.SHOW_TEXT|e.SHOW_PROCESSING_INSTRUCTION|e.SHOW_CDATA_SECTION,null)},"_createNodeIterator"),$t=me(function(t){return t instanceof G&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof z)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},"_isClobbered"),zt=me(function(t){return"function"==typeof F&&t instanceof F},"_isNode");function D(t,e,r){Hn(t,t=>{t.call(u,e,r,I)})}me(D,"_executeHooks");let Gt=me(function(e){let r=null;if(D(g.beforeSanitizeElements,e,null),!$t(e)){var t=N(e.nodeName);if(D(g.uponSanitizeElement,e,{tagName:t,allowedTags:f}),!(e.hasChildNodes()&&!zt(e.firstElementChild)&&ai(/<[/\w!]/g,e.innerHTML)&&ai(/<[/\w!]/g,e.textContent)||e.nodeType===Li.progressingInstruction||ft&&e.nodeType===Li.comment&&ai(/<[/\w]/g,e.data))){if(f[t]&&!y[t])return e instanceof $&&!Pt(e)||("noscript"===t||"noembed"===t||"noframes"===t)&&ai(/<\/no(script|embed|frames)/i,e.innerHTML)?(R(e),!0):(v&&e.nodeType===Li.text&&(r=e.textContent,Hn([J,tt,et],t=>{r=ei(r,t," ")}),e.textContent!==r)&&(Kn(u.removed,{element:e.cloneNode()}),e.textContent=r),D(g.afterSanitizeElements,e,null),!1);if(!y[t]&&qt(t)&&(o.tagNameCheck instanceof RegExp&&ai(o.tagNameCheck,t)||o.tagNameCheck instanceof Function&&o.tagNameCheck(t)))return!1;if(bt&&!l[t]){var n=s(e)||e.parentNode,i=Y(e)||e.childNodes;if(i&&n)for(let t=i.length-1;0<=t;--t){var a=q(i[t],!0);a.__removalCount=(e.__removalCount||0)+1,n.insertBefore(a,W(e))}}}}return R(e),!0},"_sanitizeElements"),Ut=me(function(t,e,r){if(vt&&("id"===e||"name"===e)&&(r in i||r in It))return!1;if((!dt||ht[e]||!ai(rt,e))&&(!ut||!ai(nt,e)))if(!m[e]||ht[e]){if(!(qt(t)&&(o.tagNameCheck instanceof RegExp&&ai(o.tagNameCheck,t)||o.tagNameCheck instanceof Function&&o.tagNameCheck(t))&&(o.attributeNameCheck instanceof RegExp&&ai(o.attributeNameCheck,e)||o.attributeNameCheck instanceof Function&&o.attributeNameCheck(e))||"is"===e&&o.allowCustomizedBuiltInElements&&(o.tagNameCheck instanceof RegExp&&ai(o.tagNameCheck,r)||o.tagNameCheck instanceof Function&&o.tagNameCheck(r))))return!1}else if(!Et[e]&&!ai(ot,ei(r,at,""))&&("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==ri(r,"data:")||!kt[t])&&(!pt||ai(it,ei(r,at,"")))&&r)return!1;return!0},"_isValidAttribute"),qt=me(function(t){return"annotation-xml"!==t&&ti(t,st)},"_isBasicCustomElement"),jt=me(function(l){D(g.beforeSanitizeAttributes,l,null);var c=l.attributes;if(c&&!$t(l)){let s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:m,forceKeepAttr:void 0},o=c.length;for(;o--;){let t=c[o],{name:e,namespaceURI:r,value:n}=t,i=N(e),a="value"===e?n:ni(n);if(s.attrName=i,s.attrValue=a,s.keepAttr=!0,s.forceKeepAttr=void 0,D(g.uponSanitizeAttribute,l,s),a=s.attrValue,!xt||"id"!==i&&"name"!==i||(M(e,l),a="user-content-"+a),ft&&ai(/((--!?|])>)|<\/(style|title)/i,a))M(e,l);else if(!s.forceKeepAttr&&(M(e,l),s.keepAttr))if(!gt&&ai(/\/>/i,a))M(e,l);else{v&&Hn([J,tt,et],t=>{a=ei(a,t," ")});var h=N(l.nodeName);if(Ut(h,i,a)){if(p&&"object"==typeof d&&"function"==typeof d.getAttributeType&&!r)switch(d.getAttributeType(h,i)){case"TrustedHTML":a=p.createHTML(a);break;case"TrustedScriptURL":a=p.createScriptURL(a)}try{r?l.setAttributeNS(r,e,a):l.setAttribute(e,a),$t(l)?R(l):Xn(u.removed)}catch{}}}}D(g.afterSanitizeAttributes,l,null)}},"_sanitizeAttributes"),Wt=me(function t(e){var r,n=Ft(e);for(D(g.beforeSanitizeShadowDOM,e,null);r=n.nextNode();)D(g.uponSanitizeShadowNode,r,null),Gt(r),jt(r),r.content instanceof P&&t(r.content);D(g.afterSanitizeShadowDOM,e,null)},"_sanitizeShadowDOM");return u.sanitize=function(t){let e=1 -`+l),v&&Hn([J,tt,et],t=>{l=ei(l,t," ")}),p&&k?p.createHTML(l):l},u.setConfig=function(){var t=0{({entries:Fn,setPrototypeOf:$n,isFrozen:zn,getPrototypeOf:Gn,getOwnPropertyDescriptor:Un}=Object),{freeze:qn,seal:Si,create:jn}=Object,{apply:Wn,construct:Yn}=typeof Reflect<"u"&&Reflect,qn=qn||me(function(t){return t},"freeze"),Si=Si||me(function(t){return t},"seal"),Wn=Wn||me(function(t,e,r){return t.apply(e,r)},"apply"),Yn=Yn||me(function(t,e){return new t(...e)},"construct"),Hn=In(Array.prototype.forEach),Vn=In(Array.prototype.lastIndexOf),Xn=In(Array.prototype.pop),Kn=In(Array.prototype.push),Zn=In(Array.prototype.splice),Qn=In(String.prototype.toLowerCase),Jn=In(String.prototype.toString),ti=In(String.prototype.match),ei=In(String.prototype.replace),ri=In(String.prototype.indexOf),ni=In(String.prototype.trim),ii=In(Object.prototype.hasOwnProperty),ai=In(RegExp.prototype.test),si=Rn(TypeError),me(In,"unapply"),me(Rn,"unconstruct"),me(Mn,"addToSet"),me(Dn,"cleanArray"),me(On,"clone"),me(Pn,"lookupGetter"),oi=qn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),li=qn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ci=qn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),hi=qn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ui=qn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),di=qn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),pi=qn(["#text"]),gi=qn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),fi=qn(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),mi=qn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),yi=qn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),vi=Si(/\{\{[\w\W]*|[\w\W]*\}\}/gm),xi=Si(/<%[\w\W]*|[\w\W]*%>/gm),bi=Si(/\$\{[\w\W]*/gm),wi=Si(/^data-[\-\w.\u00B7-\uFFFF]+$/),ki=Si(/^aria-[\-\w]+$/),Ti=Si(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ei=Si(/^(?:\w+script|data):/i),Ci=Si(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),_i=Si(/^html$/i),Si=Si(/^[a-z][.\w]*(-[.\w]+)+$/i),Ai=Object.freeze({__proto__:null,ARIA_ATTR:ki,ATTR_WHITESPACE:Ci,CUSTOM_ELEMENT:Si,DATA_ATTR:wi,DOCTYPE_NAME:_i,ERB_EXPR:xi,IS_ALLOWED_URI:Ti,IS_SCRIPT_OR_DATA:Ei,MUSTACHE_EXPR:vi,TMPLIT_EXPR:bi}),Li={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ni=me(function(){return"u"ga[t])}function Bi(t){if(t.default)return t.default;if(t=t.type,"string"!=typeof(t=Array.isArray(t)?t[0]:t))return t.enum[0];switch(t){case"boolean":return!1;case"string":return"";case"number":return 0;case"object":return{}}}function Fi(t){for(var e=0;e=i[0]&&t<=i[1])return r.name}return null}function $i(t){for(var e=0;e but got "+String(t)+".")}function o(t,e,r,n,i,a){fs[t][i]={font:e,group:r,replace:n},a&&n&&(fs[t][n]=fs[t][i])}function l(t){for(var{type:t,names:e,props:r,handler:n,htmlBuilder:i,mathmlBuilder:a}=t,s={type:t,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:n},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 e)z(t,r,{get:e[r],enumerable:!0})})(Oi,{default:()=>xc});var ua,da,X,pa,ga,fa,ma,ya,va,xa,ba,wa,ka,Ta,Ea,Ca,_a,Sa,Aa,La,Na,Ia,Ra,Ma,Da,Oa,Pa,Ba,Fa,$a,za,Ga,Ua,qa,ja,Wa,Ya,Ha,Va,Xa,Ka,Za,Qa,Ja,ts,K,es,rs,ns,is,as,ss,os,ls,cs,hs,us,ds,ps,gs,fs,u,d,p,ms,g,ys,vs,xs,bs,ws,ks,Ts,Es,Cs,_s,Ss,As,Ls,Ns,Is,Rs,Ms,Ds,Os,Ps,Bs,Fs,$s,zs,Gs,Us,qs,js,Ws,Ys,Hs,Vs,Xs,Z,Ks,Zs,Qs,Js,to,eo,ro,no,io,ao,so,oo,lo,co,ho,uo,po,go,fo,mo,yo,E,vo,xo,bo,wo,ko,To,Eo,Co,_o,So,Ao,Lo,No,Io,Ro,Mo,Do,Oo,Po,Bo,Fo,$o,zo,Go,Uo,qo,jo,Wo,Yo,Ho,Vo,Xo,Ko,Zo,Qo,Jo,tl,el,rl,nl,il,al,sl,ol,ll,cl,hl,ul,dl,pl,gl,fl,ml,yl,vl,xl,bl,wl,kl,Tl,El,Cl,_l,Sl,Al,Ll,Nl,Il,Rl,Ml,Dl,Ol,Pl,Bl,Fl,$l,zl,Gl,Ul,ql,jl,Wl,Yl,Hl,Vl,Xl,Kl,f,Zl,Ql,Jl,tc,ec,rc,nc,ic,ac,sc,oc,lc,cc,hc,uc,dc,pc,gc,m,fc,mc,yc,vc,y,xc,bc=t(()=>{for(ua=class r{static{me(this,"SourceLocation")}constructor(t,e,r){this.lexer=void 0,this.start=void 0,this.end=void 0,this.lexer=t,this.start=e,this.end=r}static range(t,e){return e?t&&t.loc&&e.loc&&t.loc.lexer===e.loc.lexer?new r(t.loc.lexer,t.loc.start,e.loc.end):null:t&&t.loc}},da=class n{static{me(this,"Token")}constructor(t,e){this.text=void 0,this.loc=void 0,this.noexpand=void 0,this.treatAsRelax=void 0,this.text=t,this.loc=e}range(t,e){return new n(e,ua.range(this,t))}},(X=class s{static{me(this,"ParseError")}constructor(t,e){this.name=void 0,this.position=void 0,this.length=void 0,this.rawMessage=void 0;var r,n,i,a="KaTeX parse error: "+t;return(e=e&&e.loc)&&e.start<=e.end&&(r=e.lexer.input,n=e.start,i=e.end,n===r.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ",e=r.slice(n,i).replace(/[^]/g,"$&̲"),a+=(15":">","<":"<",'"':""","'":"'"},fa=/[&><"']/g,me(Pi,"escape"),ma=me(function t(e){return"ordgroup"===e.type||"color"===e.type?1===e.body.length?t(e.body[0]):e:"font"===e.type?t(e.body):e},"getBaseElem"),m=me(function(t){return"mathord"===(t=ma(t)).type||"textord"===t.type||"atom"===t.type},"isCharacterBox"),ya=me(function(t){if(t)return t;throw new Error("Expected non-null, but got "+String(t))},"assert"),Rl=me(function(t){return(t=/^[\x00-\x20]*([^\\/#?]*?)(:|�*58|�*3a|&colon)/i.exec(t))?":"===t[2]&&/^[a-zA-Z][a-zA-Z0-9+\-.]*$/.test(t[1])?t[1].toLowerCase():null:"_relative"},"protocolFromUrl"),va={contains:Fl,deflt:y,escape:Pi,hyphenate:sc,getBaseElem:ma,isCharacterBox:m,protocolFromUrl:Rl},xa={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:me(t=>"#"+t,"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:me((t,e)=>(e.push(t),e),"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:me(t=>Math.max(0,t),"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:me(t=>Math.max(0,t),"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:me(t=>Math.max(0,t),"processor"),cli:"-e, --max-expand ",cliProcessor:me(t=>"Infinity"===t?1/0:parseInt(t),"cliProcessor")},globalGroup:{type:"boolean",cli:!1}},me(Bi,"getDefaultValue"),ba=class{static{me(this,"Settings")}constructor(t){for(var e 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,t=t||{},xa){var r;xa.hasOwnProperty(e)&&(r=xa[e],this[e]=void 0!==t[e]?r.processor?r.processor(t[e]):t[e]:Bi(r))}}reportNonstrict(t,e,r){var n=this.strict;if((n="function"==typeof n?n(t,e,r):n)&&"ignore"!==n){if(!0===n||"error"===n)throw new X("LaTeX-incompatible input and strict mode is set to 'error': "+e+" ["+t+"]",r);"warn"===n?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+e+" ["+t+"]"):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+e+" ["+t+"]")}}useStrictBehavior(t,e,r){var n=this.strict;if("function"==typeof n)try{n=n(t,e,r)}catch{n="error"}return!(!n||"ignore"===n||!0!==n&&"error"!==n&&("warn"===n?typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to 'warn': "+e+" ["+t+"]"):typeof console<"u"&&console.warn("LaTeX-incompatible input and strict mode is set to unrecognized '"+n+"': "+e+" ["+t+"]"),1))}isTrusted(t){if(t.url&&!t.protocol){var e=va.protocolFromUrl(t.url);if(null==e)return!1;t.protocol=e}return!!("function"==typeof this.trust?this.trust(t):this.trust)}},Fl=class{static{me(this,"Style")}constructor(t,e,r){this.id=void 0,this.size=void 0,this.cramped=void 0,this.id=t,this.size=e,this.cramped=r}sup(){return wa[ka[this.id]]}sub(){return wa[Ta[this.id]]}fracNum(){return wa[Ea[this.id]]}fracDen(){return wa[Ca[this.id]]}cramp(){return wa[_a[this.id]]}text(){return wa[Sa[this.id]]}isTight(){return 2<=this.size}},wa=[new Fl(0,0,!1),new Fl(1,0,!0),new Fl(2,1,!1),new Fl(3,1,!0),new Fl(4,2,!1),new Fl(5,2,!0),new Fl(6,3,!1),new Fl(7,3,!0)],ka=[4,5,4,5,6,7,6,7],Ta=[5,5,5,5,7,7,7,7],Ea=[2,3,4,5,6,7,6,7],Ca=[3,3,5,5,7,7,7,7],_a=[1,1,3,3,5,5,7,7],Sa=[0,1,2,3,2,3,2,3],Aa={DISPLAY:wa[0],TEXT:wa[2],SCRIPT:wa[4],SCRIPTSCRIPT:wa[6]},La=[{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]]}],me(Fi,"scriptFromCodepoint"),Na=[],La.forEach(t=>t.blocks.forEach(t=>Na.push(...t))),me($i,"supportedCodepoint"),Ia=me(function(t,e){return"M95,"+(622+t+e)+` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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{nt=mt((t,r,{depth:n=2,clobber:i=!1}={})=>{let a={depth:n,clobber:i};return Array.isArray(r)&&!Array.isArray(t)?(r.forEach(e=>nt(t,e,a)),t):Array.isArray(r)&&Array.isArray(t)?(r.forEach(e=>{t.includes(e)||t.push(e)}),t):void 0===t||n<=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]||void 0!==t[e]&&"object"!=typeof t[e]?(i||"object"!=typeof t[e]&&"object"!=typeof r[e])&&(t[e]=r[e]):(void 0===t[e]&&(t[e]=Array.isArray(r[e])?[]:{}),t[e]=nt(t[e],r[e],{depth:n-1,clobber:i}))}),t)},"assignWithDepth"),it=nt}),Wr=e(()=>{at={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 i=(r/=100)<.5?r*(1+t):r+t-r*t,a=2*r-i;switch(n){case"r":return 255*at.hue2rgb(a,i,e+.3333333333333333);case"g":return 255*at.hue2rgb(a,i,e);case"b":return 255*at.hue2rgb(a,i,e-.3333333333333333)}},"hsl2rgb"),rgb2hsl:mt(({r:e,g:t,b:r},n)=>{e/=255,t/=255,r/=255;var i=Math.max(e,t,r),a=Math.min(e,t,r),s=(i+a)/2;if("l"===n)return 100*s;if(i===a)return 0;var o=i-a;if("s"===n)return 100*(.5{ot={clamp:mt((e,t,r)=>rMath.round(1e10*e)/1e10,"round")},lt=ot}),Hr=e(()=>{ct={dec2hex:mt(e=>1<(e=Math.round(e).toString(16)).length?e:"0"+e,"dec2hex")},ht=ct}),Vr=e(()=>{Wr(),Yr(),Hr(),ut={channel:st,lang:lt,unit:ht}}),Xr=e(()=>{Vr(),dt={};for(let e=0;e<=255;e++)dt[e]=ut.unit.dec2hex(e);pt={ALL:0,RGB:1,HSL:2}}),Kr=e(()=>{Xr(),gt=class{static{mt(this,"Type")}constructor(){this.type=pt.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=pt.ALL}is(e){return this.type===e}},ft=gt}),Zr=e(()=>{Vr(),Kr(),Xr(),vt=class{static{mt(this,"Channels")}constructor(e,t){this.color=t,this.changed=!1,this.data=e,this.type=new ft}set(e,t){return this.color=t,this.changed=!1,this.data=e,this.type.type=pt.ALL,this}_ensureHSL(){var e=this.data,{h:t,s:r,l:n}=e;void 0===t&&(e.h=ut.channel.rgb2hsl(e,"h")),void 0===r&&(e.s=ut.channel.rgb2hsl(e,"s")),void 0===n&&(e.l=ut.channel.rgb2hsl(e,"l"))}_ensureRGB(){var e=this.data,{r:t,g:r,b:n}=e;void 0===t&&(e.r=ut.channel.hsl2rgb(e,"r")),void 0===r&&(e.g=ut.channel.hsl2rgb(e,"g")),void 0===n&&(e.b=ut.channel.hsl2rgb(e,"b"))}get r(){var e=this.data,t=e.r;return this.type.is(pt.HSL)||void 0===t?(this._ensureHSL(),ut.channel.hsl2rgb(e,"r")):t}get g(){var e=this.data,t=e.g;return this.type.is(pt.HSL)||void 0===t?(this._ensureHSL(),ut.channel.hsl2rgb(e,"g")):t}get b(){var e=this.data,t=e.b;return this.type.is(pt.HSL)||void 0===t?(this._ensureHSL(),ut.channel.hsl2rgb(e,"b")):t}get h(){var e=this.data,t=e.h;return this.type.is(pt.RGB)||void 0===t?(this._ensureRGB(),ut.channel.rgb2hsl(e,"h")):t}get s(){var e=this.data,t=e.s;return this.type.is(pt.RGB)||void 0===t?(this._ensureRGB(),ut.channel.rgb2hsl(e,"s")):t}get l(){var e=this.data,t=e.l;return this.type.is(pt.RGB)||void 0===t?(this._ensureRGB(),ut.channel.rgb2hsl(e,"l")):t}get a(){return this.data.a}set r(e){this.type.set(pt.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(pt.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(pt.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(pt.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(pt.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(pt.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}},xt=vt}),Qr=e(()=>{Zr(),bt=new xt({r:0,g:0,b:0,a:0},"transparent"),wt=bt}),Jr=e(()=>{Qr(),Xr(),kt={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:mt(e=>{if(35===e.charCodeAt(0)){var t,r,n,i,a,s=e.match(kt.re);if(s)return s=s[1],t=parseInt(s,16),s=s.length,wt.set({r:(t>>(n=(r=4>n*(2+i)&a)*r,b:(t>>n*(1+i)&a)*r,a:s?(t&a)*r/255:1},e)}},"parse"),stringify:mt(e=>{var{r:e,g:t,b:r,a:n}=e;return n<1?"#"+dt[Math.round(e)]+dt[Math.round(t)]+dt[Math.round(r)]+dt[Math.round(255*n)]:"#"+dt[Math.round(e)]+dt[Math.round(t)]+dt[Math.round(r)]},"stringify")},Tt=kt}),en=e(()=>{Vr(),Qr(),Et={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(Et.hueRe)){var[,t,r]=r;switch(r){case"grad":return ut.channel.clamp.h(.9*parseFloat(t));case"rad":return ut.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return ut.channel.clamp.h(360*parseFloat(t))}}return ut.channel.clamp.h(parseFloat(e))},"_hue2deg"),parse:mt(e=>{var t,r,n,i,a=e.charCodeAt(0);if((104===a||72===a)&&(a=e.match(Et.re)))return[,a,t,r,n,i]=a,wt.set({h:Et._hue2deg(a),s:ut.channel.clamp.s(parseFloat(t)),l:ut.channel.clamp.l(parseFloat(r)),a:n?ut.channel.clamp.a(i?parseFloat(n)/100:parseFloat(n)):1},e)},"parse"),stringify:mt(e=>{var{h:e,s:t,l:r,a:n}=e;return n<1?`hsla(${ut.lang.round(e)}, ${ut.lang.round(t)}%, ${ut.lang.round(r)}%, ${n})`:`hsl(${ut.lang.round(e)}, ${ut.lang.round(t)}%, ${ut.lang.round(r)}%)`},"stringify")},Ct=Et}),tn=e(()=>{Jr(),St={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=St.colors[e])return Tt.parse(e)},"parse"),stringify:mt(e=>{var t,r=Tt.stringify(e);for(t in St.colors)if(St.colors[t]===r)return t},"stringify")},_t=St}),rn=e(()=>{Vr(),Qr(),At={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,n,i,a,s,o,l=e.charCodeAt(0);if((114===l||82===l)&&(l=e.match(At.re)))return[,l,t,r,n,i,a,s,o]=l,wt.set({r:ut.channel.clamp.r(t?2.55*parseFloat(l):parseFloat(l)),g:ut.channel.clamp.g(n?2.55*parseFloat(r):parseFloat(r)),b:ut.channel.clamp.b(a?2.55*parseFloat(i):parseFloat(i)),a:s?ut.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},e)},"parse"),stringify:mt(e=>{var{r:e,g:t,b:r,a:n}=e;return n<1?`rgba(${ut.lang.round(e)}, ${ut.lang.round(t)}, ${ut.lang.round(r)}, ${ut.lang.round(n)})`:`rgb(${ut.lang.round(e)}, ${ut.lang.round(t)}, ${ut.lang.round(r)})`},"stringify")},Lt=At}),nn=e(()=>{Jr(),en(),tn(),rn(),Xr(),Nt={format:{keyword:_t,hex:Tt,rgb:Lt,rgba:Lt,hsl:Ct,hsla:Ct},parse:mt(e=>{if("string"!=typeof e)return e;var t=Tt.parse(e)||Lt.parse(e)||Ct.parse(e)||_t.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(pt.HSL)||void 0===e.data.r?Ct:e.a<1||!Number.isInteger(e.r)||!Number.isInteger(e.g)||!Number.isInteger(e.b)?Lt:Tt).stringify(e),"stringify")},It=Nt}),an=e(()=>{Vr(),nn(),Rt=mt((e,t)=>{var r,n=It.parse(e);for(r in t)n[r]=ut.channel.clamp[r](t[r]);return It.stringify(n)},"change"),Mt=Rt}),sn=e(()=>{Vr(),Qr(),nn(),an(),Dt=mt((e,t,r=0,n=1)=>"number"!=typeof e?Mt(e,{a:t}):(e=wt.set({r:ut.channel.clamp.r(e),g:ut.channel.clamp.g(t),b:ut.channel.clamp.b(r),a:ut.channel.clamp.a(n)}),It.stringify(e)),"rgba"),Ot=Dt}),on=e(()=>{Vr(),nn(),Pt=mt((e,t)=>ut.lang.round(It.parse(e)[t]),"channel"),Bt=Pt}),ln=e(()=>{Vr(),nn(),$t=mt(e=>{var{r:e,g:t,b:r}=It.parse(e),e=.2126*ut.channel.toLinear(e)+.7152*ut.channel.toLinear(t)+.0722*ut.channel.toLinear(r);return ut.lang.round(e)},"luminance"),Ft=$t}),cn=e(()=>{ln(),zt=mt(e=>.5<=Ft(e),"isLight"),Gt=zt}),hn=e(()=>{cn(),Ut=mt(e=>!Gt(e),"isDark"),qt=Ut}),un=e(()=>{Vr(),nn(),jt=mt((e,t,r)=>{var n=(e=It.parse(e))[t];return n!==(r=ut.channel.clamp[t](n+r))&&(e[t]=r),It.stringify(e)},"adjustChannel"),Wt=jt}),dn=e(()=>{un(),Yt=mt((e,t)=>Wt(e,"l",t),"lighten"),a=Yt}),pn=e(()=>{un(),Ht=mt((e,t)=>Wt(e,"l",-t),"darken"),Vt=Ht}),gn=e(()=>{nn(),an(),Xt=mt((e,t)=>{var r,n=It.parse(e),i={};for(r in t)t[r]&&(i[r]=n[r]+t[r]);return Mt(e,i)},"adjust"),r=Xt}),fn=e(()=>{nn(),sn(),Kt=mt((e,t,r=50)=>{var{r:e,g:n,b:i,a}=It.parse(e),{r:t,g:s,b:o,a:l}=It.parse(t),c=2*(r/=100)-1,h=a-l;return Ot(e*(c=(1+(c*h==-1?c:(c+h)/(1+c*h)))/2)+t*(h=1-c),n*c+s*h,i*c+o*h,a*r+l*(1-r))},"mix"),Zt=Kt}),mn=e(()=>{nn(),fn(),Qt=mt((e,t=100)=>{var r=It.parse(e);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,Zt(r,e,t)},"invert"),n=Qt}),yn=e(()=>{sn(),on(),hn(),dn(),pn(),gn(),mn()}),vn=e(()=>{yn()}),xn=e(()=>{Jt="#ffffff",er="#f2f2f2"}),bn=e(()=>{vn(),tr=mt((e,t)=>r(e,t?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder")}),wn=e(()=>{vn(),xn(),bn(),rr=class{static{mt(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||r(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||r(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||tr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||tr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||tr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||n(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||n(this.tertiaryColor),this.lineColor=this.lineColor||n(this.background),this.arrowheadColor=this.arrowheadColor||n(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?Vt(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||Vt(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||n(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||a(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||Vt(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Vt(this.mainBkg,10)):(this.rowOdd=this.rowOdd||a(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||a(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||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},nr=mt(e=>{var t=new rr;return t.calculate(e),t},"getThemeVariables")}),kn=e(()=>{vn(),bn(),ir=class{static{mt(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=a(this.primaryColor,16),this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=n(this.background),this.secondaryBorderColor=tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=tr(this.tertiaryColor,this.darkMode),this.primaryTextColor=n(this.primaryColor),this.secondaryTextColor=n(this.secondaryColor),this.tertiaryTextColor=n(this.tertiaryColor),this.lineColor=n(this.background),this.textColor=n(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=a(n("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=Ot(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=Vt("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=Vt(this.sectionBkgColor,10),this.taskBorderColor=Ot(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Ot(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||a(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||Vt(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=a(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=a(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=a(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=r(this.primaryColor,{h:64}),this.fillType3=r(this.secondaryColor,{h:64}),this.fillType4=r(this.primaryColor,{h:-64}),this.fillType5=r(this.secondaryColor,{h:-64}),this.fillType6=r(this.primaryColor,{h:128}),this.fillType7=r(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||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330});for(let e=0;e{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},ar=mt(e=>{var t=new ir;return t.calculate(e),t},"getThemeVariables")}),Tn=e(()=>{vn(),bn(),xn(),sr=class{static{mt(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=r(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=tr(this.primaryColor,this.darkMode),this.secondaryBorderColor=tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=tr(this.tertiaryColor,this.darkMode),this.primaryTextColor=n(this.primaryColor),this.secondaryTextColor=n(this.secondaryColor),this.tertiaryTextColor=n(this.tertiaryColor),this.lineColor=n(this.background),this.textColor=n(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=Ot(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Vt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Vt(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]}))}},or=mt(e=>{var t=new sr;return t.calculate(e),t},"getThemeVariables")}),En=e(()=>{vn(),xn(),bn(),lr=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=a("#cde498",10),this.primaryBorderColor=tr(this.primaryColor,this.darkMode),this.secondaryBorderColor=tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=tr(this.tertiaryColor,this.darkMode),this.primaryTextColor=n(this.primaryColor),this.secondaryTextColor=n(this.secondaryColor),this.tertiaryTextColor=n(this.primaryColor),this.lineColor=n(this.background),this.textColor=n(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.actorBorder=Vt(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||r(this.primaryColor,{h:30}),this.cScale4=this.cScale4||r(this.primaryColor,{h:60}),this.cScale5=this.cScale5||r(this.primaryColor,{h:90}),this.cScale6=this.cScale6||r(this.primaryColor,{h:120}),this.cScale7=this.cScale7||r(this.primaryColor,{h:150}),this.cScale8=this.cScale8||r(this.primaryColor,{h:210}),this.cScale9=this.cScale9||r(this.primaryColor,{h:270}),this.cScale10=this.cScale10||r(this.primaryColor,{h:300}),this.cScale11=this.cScale11||r(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||Vt(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||Vt(this.tertiaryColor,40);for(let e=0;e{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]}))}},cr=mt(e=>{var t=new lr;return t.calculate(e),t},"getThemeVariables")}),Cn=e(()=>{vn(),bn(),xn(),hr=class{static{mt(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=a(this.contrast,55),this.background="#ffffff",this.tertiaryColor=r(this.primaryColor,{h:-160}),this.primaryBorderColor=tr(this.primaryColor,this.darkMode),this.secondaryBorderColor=tr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=tr(this.tertiaryColor,this.darkMode),this.primaryTextColor=n(this.primaryColor),this.secondaryTextColor=n(this.secondaryColor),this.tertiaryTextColor=n(this.tertiaryColor),this.lineColor=n(this.background),this.textColor=n(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||a(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=a(this.contrast,55),this.border2=this.contrast,this.actorBorder=a(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]}))}},ur=mt(e=>{var t=new hr;return t.calculate(e),t},"getThemeVariables")}),Sn=e(()=>{wn(),kn(),Tn(),En(),Cn(),dr={base:{getThemeVariables:nr},dark:{getThemeVariables:ar},default:{getThemeVariables:or},forest:{getThemeVariables:cr},neutral:{getThemeVariables:ur}}}),_n=e(()=>{pr={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showTitle:!0,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:""},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},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}}),An=e(()=>{Sn(),_n(),gr={...pr,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF"},themeCSS:void 0,themeVariables:dr.default.getThemeVariables(),sequence:{...pr.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},gantt:{...pr.gantt,tickInterval:void 0,useWidth:void 0},c4:{...pr.c4,useWidth:void 0,personFont:mt(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...pr.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:{...pr.pie,useWidth:984},xyChart:{...pr.xyChart,useWidth:void 0},requirement:{...pr.requirement,useWidth:void 0},packet:{...pr.packet},radar:{...pr.radar},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","}},fr=mt((r,n="")=>Object.keys(r).reduce((e,t)=>Array.isArray(r[t])?e:"object"==typeof r[t]&&null!==r[t]?[...e,n+t,...fr(r[t],"")]:[...e,n+t],[]),"keyify"),mr=new Set(fr(gr,"")),yr=gr}),Ln=e(()=>{An(),t(),vr=mt(e=>{if(M.debug("sanitizeDirective called with",e),"object"==typeof e&&null!=e)if(Array.isArray(e))e.forEach(e=>vr(e));else{for(var t of Object.keys(e)){var r;if(M.debug("Checking key",t),t.startsWith("__")||t.includes("proto")||t.includes("constr")||!mr.has(t)||null==e[t])M.debug("sanitize deleting key: ",t),delete e[t];else if("object"==typeof e[t])M.debug("sanitizing object",t),vr(e[t]);else for(r of["themeCSS","fontFamily","altFontFamily"])t.includes(r)&&(M.debug("sanitizing css option",t),e[t]=xr(e[t]))}if(e.themeVariables)for(var n of Object.keys(e.themeVariables)){var i=e.themeVariables[n];i?.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/)&&(e.themeVariables[n]="")}M.debug("After sanitization",e)}},"sanitizeDirective"),xr=mt(e=>{let t=0,r=0;for(var n of e){if(t{jr(),t(),Sn(),An(),Ln(),br=Object.freeze(yr),wr=it({},br),Tr=[],Er=it({},br),Cr=mt((e,t)=>{let r=it({},e),n={};for(var i of t)Rr(i),n=it(n,i);return r=it(r,n),n.theme&&n.theme in dr&&(e=it({},kr),t=it(e.themeVariables||{},n.themeVariables),r.theme)&&r.theme in dr&&(r.themeVariables=dr[r.theme].getThemeVariables(t)),$r(Er=r),Er},"updateCurrentConfig"),Sr=mt(e=>(wr=it({},br),wr=it(wr,e),e.theme&&dr[e.theme]&&(wr.themeVariables=dr[e.theme].getThemeVariables(e.themeVariables)),Cr(wr,Tr),wr),"setSiteConfig"),_r=mt(e=>{kr=it({},e)},"saveConfigFromInitialize"),Ar=mt(e=>(wr=it(wr,e),Cr(wr,Tr),wr),"updateSiteConfig"),Lr=mt(()=>it({},wr),"getSiteConfig"),Nr=mt(e=>($r(e),it(Er,e),Ir()),"setConfig"),Ir=mt(()=>it({},Er),"getConfig"),Rr=mt(t=>{t&&(["secure",...wr.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(M.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]&&Rr(t[e])}))},"sanitize"),Mr=mt(e=>{vr(e),e.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables={...e.themeVariables,fontFamily:e.fontFamily}),Tr.push(e),Cr(wr,Tr)},"addDirective"),Dr=mt((e=wr)=>{Cr(e,Tr=[])},"reset"),Or={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead."},Pr={},Br=mt(e=>{Pr[e]||(M.warn(Or[e]),Pr[e]=!0)},"issueWarning"),$r=mt(e=>{e&&(e.lazyLoadedDiagrams||e.loadExternalDiagramsAtStartup)&&Br("LAZY_LOAD_DEPRECATED")},"checkConfig")});function In(i){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var t=arguments.length,r=new Array(1Bn(e),"DOMPurify");if(u.version="3.2.5",u.removed=[],!e||!e.document||e.document.nodeType!==Li.document||!e.Element)return u.isSupported=!1,u;let i=e.document,c=i,O=c.currentScript,{DocumentFragment:P,HTMLTemplateElement:B,Node:$,Element:F,NodeFilter:t,NamedNodeMap:z=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:G,DOMParser:U,trustedTypes:d}=e,r=F.prototype,q=Pn(r,"cloneNode"),j=Pn(r,"remove"),W=Pn(r,"nextSibling"),Y=Pn(r,"childNodes"),s=Pn(r,"parentNode");var H;"function"==typeof B&&(H=i.createElement("template")).content&&H.content.ownerDocument&&(i=H.content.ownerDocument);let p,h="",{implementation:V,createNodeIterator:X,createDocumentFragment:K,getElementsByTagName:Z}=i,Q=c.importNode,g=Ri(),{MUSTACHE_EXPR:J,ERB_EXPR:ee,TMPLIT_EXPR:te,DATA_ATTR:re,ARIA_ATTR:ne,IS_SCRIPT_OR_DATA:ie,ATTR_WHITESPACE:ae,CUSTOM_ELEMENT:se}=(u.isSupported="function"==typeof $n&&"function"==typeof s&&V&&void 0!==V.createHTMLDocument,Ai),oe=Ai.IS_ALLOWED_URI,f=null,le=Mn({},[...oi,...li,...ci,...ui,...pi]),m=null,ce=Mn({},[...gi,...fi,...mi,...yi]),o=Object.seal(jn(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}})),y=null,he=null,ue=!0,de=!0,pe=!1,ge=!0,v=!1,fe=!0,x=!1,me=!1,ye=!1,b=!1,w=!1,k=!1,ve=!0,xe=!1,be=!0,T=!1,n,l=null,we=Mn({},["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"]),ke=null,Te=Mn({},["audio","video","img","source","image","track"]),Ee=null,Ce=Mn({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),a="http://www.w3.org/1998/Math/MathML",E="http://www.w3.org/2000/svg",C="http://www.w3.org/1999/xhtml",S=C,Se=!1,_e=null,Ae=Mn({},[a,E,C],Jn),_=Mn({},["mi","mo","mn","ms","mtext"]),A=Mn({},["annotation-xml"]),Le=Mn({},["title","style","font","a","script"]),L=null,Ne=["application/xhtml+xml","text/html"],N=null,I=null,Ie=i.createElement("form"),Re=mt(function(e){return e instanceof RegExp||e instanceof Function},"isRegexOrFunction"),Me=mt(function(){var e=0"+e:(n=ei(e,/^[\r\n\t ]+/),r=n&&n[0]),"application/xhtml+xml"===L&&S===C&&(e=''+e+"");var n=p?p.createHTML(e):e;if(S===C)try{t=(new U).parseFromString(n,L)}catch{}if(!t||!t.documentElement){t=V.createDocument(S,"template",null);try{t.documentElement.innerHTML=Se?h:n}catch{}}return n=t.body||t.documentElement,e&&r&&n.insertBefore(i.createTextNode(r),n.childNodes[0]||null),S===C?Z.call(t,x?"html":"body")[0]:x?t.documentElement:n},"_initDocument"),$e=mt(function(e){return X.call(e.ownerDocument||e,e,t.SHOW_ELEMENT|t.SHOW_COMMENT|t.SHOW_TEXT|t.SHOW_PROCESSING_INSTRUCTION|t.SHOW_CDATA_SECTION,null)},"_createNodeIterator"),Fe=mt(function(e){return e instanceof G&&("string"!=typeof e.nodeName||"string"!=typeof e.textContent||"function"!=typeof e.removeChild||!(e.attributes instanceof z)||"function"!=typeof e.removeAttribute||"function"!=typeof e.setAttribute||"string"!=typeof e.namespaceURI||"function"!=typeof e.insertBefore||"function"!=typeof e.hasChildNodes)},"_isClobbered"),ze=mt(function(e){return"function"==typeof $&&e instanceof $},"_isNode");function D(e,t,r){Hn(e,e=>{e.call(u,t,r,I)})}mt(D,"_executeHooks");let Ge=mt(function(t){let r=null;if(D(g.beforeSanitizeElements,t,null),!Fe(t)){var e=N(t.nodeName);if(D(g.uponSanitizeElement,t,{tagName:e,allowedTags:f}),!(t.hasChildNodes()&&!ze(t.firstElementChild)&&ai(/<[/\w!]/g,t.innerHTML)&&ai(/<[/\w!]/g,t.textContent)||t.nodeType===Li.progressingInstruction||fe&&t.nodeType===Li.comment&&ai(/<[/\w]/g,t.data))){if(f[e]&&!y[e])return t instanceof F&&!Pe(t)||("noscript"===e||"noembed"===e||"noframes"===e)&&ai(/<\/no(script|embed|frames)/i,t.innerHTML)?(R(t),!0):(v&&t.nodeType===Li.text&&(r=t.textContent,Hn([J,ee,te],e=>{r=ti(r,e," ")}),t.textContent!==r)&&(Kn(u.removed,{element:t.cloneNode()}),t.textContent=r),D(g.afterSanitizeElements,t,null),!1);if(!y[e]&&qe(e)&&(o.tagNameCheck instanceof RegExp&&ai(o.tagNameCheck,e)||o.tagNameCheck instanceof Function&&o.tagNameCheck(e)))return!1;if(be&&!l[e]){var n=s(t)||t.parentNode,i=Y(t)||t.childNodes;if(i&&n)for(let e=i.length-1;0<=e;--e){var a=q(i[e],!0);a.__removalCount=(t.__removalCount||0)+1,n.insertBefore(a,W(t))}}}}return R(t),!0},"_sanitizeElements"),Ue=mt(function(e,t,r){if(ve&&("id"===t||"name"===t)&&(r in i||r in Ie))return!1;if((!de||he[t]||!ai(re,t))&&(!ue||!ai(ne,t)))if(!m[t]||he[t]){if(!(qe(e)&&(o.tagNameCheck instanceof RegExp&&ai(o.tagNameCheck,e)||o.tagNameCheck instanceof Function&&o.tagNameCheck(e))&&(o.attributeNameCheck instanceof RegExp&&ai(o.attributeNameCheck,t)||o.attributeNameCheck instanceof Function&&o.attributeNameCheck(t))||"is"===t&&o.allowCustomizedBuiltInElements&&(o.tagNameCheck instanceof RegExp&&ai(o.tagNameCheck,r)||o.tagNameCheck instanceof Function&&o.tagNameCheck(r))))return!1}else if(!Ee[t]&&!ai(oe,ti(r,ae,""))&&("src"!==t&&"xlink:href"!==t&&"href"!==t||"script"===e||0!==ri(r,"data:")||!ke[e])&&(!pe||ai(ie,ti(r,ae,"")))&&r)return!1;return!0},"_isValidAttribute"),qe=mt(function(e){return"annotation-xml"!==e&&ei(e,se)},"_isBasicCustomElement"),je=mt(function(l){D(g.beforeSanitizeAttributes,l,null);var c=l.attributes;if(c&&!Fe(l)){let s={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:m,forceKeepAttr:void 0},o=c.length;for(;o--;){let e=c[o],{name:t,namespaceURI:r,value:n}=e,i=N(t),a="value"===t?n:ni(n);if(s.attrName=i,s.attrValue=a,s.keepAttr=!0,s.forceKeepAttr=void 0,D(g.uponSanitizeAttribute,l,s),a=s.attrValue,!xe||"id"!==i&&"name"!==i||(M(t,l),a="user-content-"+a),fe&&ai(/((--!?|])>)|<\/(style|title)/i,a))M(t,l);else if(!s.forceKeepAttr&&(M(t,l),s.keepAttr))if(!ge&&ai(/\/>/i,a))M(t,l);else{v&&Hn([J,ee,te],e=>{a=ti(a,e," ")});var h=N(l.nodeName);if(Ue(h,i,a)){if(p&&"object"==typeof d&&"function"==typeof d.getAttributeType&&!r)switch(d.getAttributeType(h,i)){case"TrustedHTML":a=p.createHTML(a);break;case"TrustedScriptURL":a=p.createScriptURL(a)}try{r?l.setAttributeNS(r,t,a):l.setAttribute(t,a),Fe(l)?R(l):Xn(u.removed)}catch{}}}}D(g.afterSanitizeAttributes,l,null)}},"_sanitizeAttributes"),We=mt(function e(t){var r,n=$e(t);for(D(g.beforeSanitizeShadowDOM,t,null);r=n.nextNode();)D(g.uponSanitizeShadowNode,r,null),Ge(r),je(r),r.content instanceof P&&e(r.content);D(g.afterSanitizeShadowDOM,t,null)},"_sanitizeShadowDOM");return u.sanitize=function(e){let t=1 +`+l),v&&Hn([J,ee,te],e=>{l=ti(l,e," ")}),p&&k?p.createHTML(l):l},u.setConfig=function(){var e=0{({entries:$n,setPrototypeOf:Fn,isFrozen:zn,getPrototypeOf:Gn,getOwnPropertyDescriptor:Un}=Object),{freeze:qn,seal:_i,create:jn}=Object,{apply:Wn,construct:Yn}=typeof Reflect<"u"&&Reflect,qn=qn||mt(function(e){return e},"freeze"),_i=_i||mt(function(e){return e},"seal"),Wn=Wn||mt(function(e,t,r){return e.apply(t,r)},"apply"),Yn=Yn||mt(function(e,t){return new e(...t)},"construct"),Hn=In(Array.prototype.forEach),Vn=In(Array.prototype.lastIndexOf),Xn=In(Array.prototype.pop),Kn=In(Array.prototype.push),Zn=In(Array.prototype.splice),Qn=In(String.prototype.toLowerCase),Jn=In(String.prototype.toString),ei=In(String.prototype.match),ti=In(String.prototype.replace),ri=In(String.prototype.indexOf),ni=In(String.prototype.trim),ii=In(Object.prototype.hasOwnProperty),ai=In(RegExp.prototype.test),si=Rn(TypeError),mt(In,"unapply"),mt(Rn,"unconstruct"),mt(Mn,"addToSet"),mt(Dn,"cleanArray"),mt(On,"clone"),mt(Pn,"lookupGetter"),oi=qn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),li=qn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ci=qn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),hi=qn(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),ui=qn(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),di=qn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),pi=qn(["#text"]),gi=qn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),fi=qn(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),mi=qn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),yi=qn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),vi=_i(/\{\{[\w\W]*|[\w\W]*\}\}/gm),xi=_i(/<%[\w\W]*|[\w\W]*%>/gm),bi=_i(/\$\{[\w\W]*/gm),wi=_i(/^data-[\-\w.\u00B7-\uFFFF]+$/),ki=_i(/^aria-[\-\w]+$/),Ti=_i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Ei=_i(/^(?:\w+script|data):/i),Ci=_i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),Si=_i(/^html$/i),_i=_i(/^[a-z][.\w]*(-[.\w]+)+$/i),Ai=Object.freeze({__proto__:null,ARIA_ATTR:ki,ATTR_WHITESPACE:Ci,CUSTOM_ELEMENT:_i,DATA_ATTR:wi,DOCTYPE_NAME:Si,ERB_EXPR:xi,IS_ALLOWED_URI:Ti,IS_SCRIPT_OR_DATA:Ei,MUSTACHE_EXPR:vi,TMPLIT_EXPR:bi}),Li={element:1,attribute:2,text:3,cdataSection:4,entityReference:5,entityNode:6,progressingInstruction:7,comment:8,document:9,documentType:10,documentFragment:11,notation:12},Ni=mt(function(){return"u"ga[e])}function Bi(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 $i(e){for(var t=0;t=i[0]&&e<=i[1])return r.name}return null}function Fi(e){for(var t=0;t but got "+String(e)+".")}function o(e,t,r,n,i,a){fs[e][i]={font:t,group:r,replace:n},a&&n&&(fs[e][n]=fs[e][i])}function l(e){for(var{type:e,names:t,props:r,handler:n,htmlBuilder:i,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:n},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)z(e,r,{get:t[r],enumerable:!0})})(Oi,{default:()=>xc});var ua,da,X,pa,ga,fa,ma,ya,va,xa,ba,wa,ka,Ta,Ea,Ca,Sa,_a,Aa,La,Na,Ia,Ra,Ma,Da,Oa,Pa,Ba,$a,Fa,za,Ga,Ua,qa,ja,Wa,Ya,Ha,Va,Xa,Ka,Za,Qa,Ja,es,K,ts,rs,ns,is,as,ss,os,ls,cs,hs,us,ds,ps,gs,fs,u,d,p,ms,g,ys,vs,xs,bs,ws,ks,Ts,Es,Cs,Ss,_s,As,Ls,Ns,Is,Rs,Ms,Ds,Os,Ps,Bs,$s,Fs,zs,Gs,Us,qs,js,Ws,Ys,Hs,Vs,Xs,Z,Ks,Zs,Qs,Js,eo,to,ro,no,io,ao,so,oo,lo,co,ho,uo,po,go,fo,mo,yo,E,vo,xo,bo,wo,ko,To,Eo,Co,So,_o,Ao,Lo,No,Io,Ro,Mo,Do,Oo,Po,Bo,$o,Fo,zo,Go,Uo,qo,jo,Wo,Yo,Ho,Vo,Xo,Ko,Zo,Qo,Jo,el,tl,rl,nl,il,al,sl,ol,ll,cl,hl,ul,dl,pl,gl,fl,ml,yl,vl,xl,bl,wl,kl,Tl,El,Cl,Sl,_l,Al,Ll,Nl,Il,Rl,Ml,Dl,Ol,Pl,Bl,$l,Fl,zl,Gl,Ul,ql,jl,Wl,Yl,Hl,Vl,Xl,Kl,f,Zl,Ql,Jl,ec,tc,rc,nc,ic,ac,sc,oc,lc,cc,hc,uc,dc,pc,gc,m,fc,mc,yc,vc,y,xc,bc=e(()=>{for(ua=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}},da=class n{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 n(t,ua.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,n,i,a="KaTeX parse error: "+e;return(t=t&&t.loc)&&t.start<=t.end&&(r=t.lexer.input,n=t.start,i=t.end,n===r.length?a+=" at end of input: ":a+=" at position "+(n+1)+": ",t=r.slice(n,i).replace(/[^]/g,"$&̲"),a+=(15":">","<":"<",'"':""","'":"'"},fa=/[&><"']/g,mt(Pi,"escape"),ma=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"),m=mt(function(e){return"mathord"===(e=ma(e)).type||"textord"===e.type||"atom"===e.type},"isCharacterBox"),ya=mt(function(e){if(e)return e;throw new Error("Expected non-null, but got "+String(e))},"assert"),Rl=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"),va={contains:$l,deflt:y,escape:Pi,hyphenate:sc,getBaseElem:ma,isCharacterBox:m,protocolFromUrl:Rl},xa={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(Bi,"getDefaultValue"),ba=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||{},xa){var r;xa.hasOwnProperty(t)&&(r=xa[t],this[t]=void 0!==e[t]?r.processor?r.processor(e[t]):e[t]:Bi(r))}}reportNonstrict(e,t,r){var n=this.strict;if((n="function"==typeof n?n(e,t,r):n)&&"ignore"!==n){if(!0===n||"error"===n)throw new X("LaTeX-incompatible input and strict mode is set to 'error': "+t+" ["+e+"]",r);"warn"===n?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 '"+n+"': "+t+" ["+e+"]")}}useStrictBehavior(e,t,r){var n=this.strict;if("function"==typeof n)try{n=n(e,t,r)}catch{n="error"}return!(!n||"ignore"===n||!0!==n&&"error"!==n&&("warn"===n?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 '"+n+"': "+t+" ["+e+"]"),1))}isTrusted(e){if(e.url&&!e.protocol){var t=va.protocolFromUrl(e.url);if(null==t)return!1;e.protocol=t}return!!("function"==typeof this.trust?this.trust(e):this.trust)}},$l=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 wa[ka[this.id]]}sub(){return wa[Ta[this.id]]}fracNum(){return wa[Ea[this.id]]}fracDen(){return wa[Ca[this.id]]}cramp(){return wa[Sa[this.id]]}text(){return wa[_a[this.id]]}isTight(){return 2<=this.size}},wa=[new $l(0,0,!1),new $l(1,0,!0),new $l(2,1,!1),new $l(3,1,!0),new $l(4,2,!1),new $l(5,2,!0),new $l(6,3,!1),new $l(7,3,!0)],ka=[4,5,4,5,6,7,6,7],Ta=[5,5,5,5,7,7,7,7],Ea=[2,3,4,5,6,7,6,7],Ca=[3,3,5,5,7,7,7,7],Sa=[1,1,3,3,5,5,7,7],_a=[0,1,2,3,2,3,2,3],Aa={DISPLAY:wa[0],TEXT:wa[2],SCRIPT:wa[4],SCRIPTSCRIPT:wa[6]},La=[{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($i,"scriptFromCodepoint"),Na=[],La.forEach(e=>e.blocks.forEach(e=>Na.push(...e))),mt(Fi,"supportedCodepoint"),Ia=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`+t/2.075+" -"+t+` +l`+e/2.075+" -"+e+` c5.3,-9.3,12,-14,20,-14 -H400000v`+(40+t)+`H845.2724 +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+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},"sqrtMain"),Ra=me(function(t,e){return"M263,"+(601+t+e)+`c0.7,0,18,39.7,52,119 +M`+(834+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},"sqrtMain"),Ra=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`+t/2.084+" -"+t+` +l`+e/2.084+" -"+e+` c4.7,-7.3,11,-11,19,-11 -H40000v`+(40+t)+`H1012.3 +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+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},"sqrtSize1"),Ma=me(function(t,e){return"M983 "+(10+t+e)+` -l`+t/3.13+" -"+t+` -c4,-6.7,10,-10,18,-10 H400000v`+(40+t)+` +M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},"sqrtSize1"),Ma=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+t)+" "+e+"h400000v"+(40+t)+"h-400000z"},"sqrtSize2"),Da=me(function(t,e){return"M424,"+(2398+t+e)+` +M`+(1001+e)+" "+t+"h400000v"+(40+e)+"h-400000z"},"sqrtSize2"),Da=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`+t/4.223+" -"+t+`c4,-6.7,10,-10,18,-10 H400000 -v`+(40+t)+`H1014.6 +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+t)+" "+e+` -h400000v`+(40+t)+"h-400000z"},"sqrtSize3"),Oa=me(function(t,e){return"M473,"+(2713+t+e)+` -c339.3,-1799.3,509.3,-2700,510,-2702 l`+t/5.298+" -"+t+` -c3.3,-7.3,9.3,-11,18,-11 H400000v`+(40+t)+`H1017.7 +c-8,0,-12,-0.7,-12,-2z M`+(1001+e)+" "+t+` +h400000v`+(40+e)+"h-400000z"},"sqrtSize3"),Oa=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+t)+" "+e+"h400000v"+(40+t)+"H1017.7z"},"sqrtSize4"),Pa=me(function(t){return"M400000 "+t+" H0 L"+t/2+" 0 l65 45 L145 "+(t-80)+" H400000z"},"phasePath"),Ba=me(function(t,e,r){return"M702 "+(t+e)+"H400000"+(40+t)+` -H742v`+(r-54-e-t)+`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 +606zM`+(1001+e)+" "+t+"h400000v"+(40+e)+"H1017.7z"},"sqrtSize4"),Pa=mt(function(e){return"M400000 "+e+" H0 L"+e/2+" 0 l65 45 L145 "+(e-80)+" H400000z"},"phasePath"),Ba=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 `+e+"H400000v"+(40+t)+"H742z"},"sqrtTall"),Fa=me(function(t,e,r){e*=1e3;var n="";switch(t){case"sqrtMain":n=Ia(e,80);break;case"sqrtSize1":n=Ra(e,80);break;case"sqrtSize2":n=Ma(e,80);break;case"sqrtSize3":n=Da(e,80);break;case"sqrtSize4":n=Oa(e,80);break;case"sqrtTall":n=Ba(e,80,r)}return n},"sqrtPath"),$a=me(function(t,e){switch(t){case"⎜":return"M291 0 H417 V"+e+" H291z M291 0 H417 V"+e+" H291z";case"∣":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145z";case"∥":return"M145 0 H188 V"+e+" H145z M145 0 H188 V"+e+" H145zM367 0 H410 V"+e+" H367z M367 0 H410 V"+e+" H367z";case"⎟":return"M457 0 H583 V"+e+" H457z M457 0 H583 V"+e+" H457z";case"⎢":return"M319 0 H403 V"+e+" H319z M319 0 H403 V"+e+" H319z";case"⎥":return"M263 0 H347 V"+e+" H263z M263 0 H347 V"+e+" H263z";case"⎪":return"M384 0 H504 V"+e+" H384z M384 0 H504 V"+e+" H384z";case"⏐":return"M312 0 H355 V"+e+" H312z M312 0 H355 V"+e+" H312z";case"‖":return"M257 0 H300 V"+e+" H257z M257 0 H300 V"+e+" H257zM478 0 H521 V"+e+" H478z M478 0 H521 V"+e+" H478z";default:return""}},"innerPath"),za={doubleleftarrow:`M262 157 +219 661 l218 661zM702 `+t+"H400000v"+(40+e)+"H742z"},"sqrtTall"),$a=mt(function(e,t,r){t*=1e3;var n="";switch(e){case"sqrtMain":n=Ia(t,80);break;case"sqrtSize1":n=Ra(t,80);break;case"sqrtSize2":n=Ma(t,80);break;case"sqrtSize3":n=Da(t,80);break;case"sqrtSize4":n=Oa(t,80);break;case"sqrtTall":n=Ba(t,80,r)}return n},"sqrtPath"),Fa=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"),za={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 @@ -236,38 +236,38 @@ M93 435 v40 H400000 v-40z M500 241 v40 H400000 v-40z M500 241 v40 H400000 v-40z` 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`},Ga=me(function(t,e){switch(t){case"lbrack":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+` v1759 h347 v-84 -H403z M403 1759 V0 H319 V1759 v`+e+" v1759 h84z";case"rbrack":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+` v1759 H0 v84 H347z -M347 1759 V0 H263 V1759 v`+e+" v1759 h84z";case"vert":return"M145 15 v585 v"+e+` v585 c2.667,10,9.667,15,21,15 -c10,0,16.667,-5,20,-15 v-585 v`+-e+` v-585 c-2.667,-10,-9.667,-15,-21,-15 -c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+e+" v585 h43z";case"doublevert":return"M145 15 v585 v"+e+` v585 c2.667,10,9.667,15,21,15 -c10,0,16.667,-5,20,-15 v-585 v`+-e+` v-585 c-2.667,-10,-9.667,-15,-21,-15 -c-10,0,-16.667,5,-20,15z M188 15 H145 v585 v`+e+` v585 h43z -M367 15 v585 v`+e+` v585 c2.667,10,9.667,15,21,15 -c10,0,16.667,-5,20,-15 v-585 v`+-e+` v-585 c-2.667,-10,-9.667,-15,-21,-15 -c-10,0,-16.667,5,-20,15z M410 15 H367 v585 v`+e+" v585 h43z";case"lfloor":return"M319 602 V0 H403 V602 v"+e+` v1715 h263 v84 H319z -MM319 602 V0 H403 V602 v`+e+" v1715 H319z";case"rfloor":return"M319 602 V0 H403 V602 v"+e+` v1799 H0 v-84 H319z -MM319 602 V0 H403 V602 v`+e+" v1715 H319z";case"lceil":return"M403 1759 V84 H666 V0 H319 V1759 v"+e+` v602 h84z -M403 1759 V0 H319 V1759 v`+e+" v602 h84z";case"rceil":return"M347 1759 V0 H0 V84 H263 V1759 v"+e+` v602 h84z -M347 1759 V0 h-84 V1759 v`+e+" 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 +M500 241 v40 H399408 v-40z M500 435 v40 H400000 v-40z`},Ga=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,`+(e+84)+`c0.2,6,0,26,0,60c2,159.3,10,310.7,24,454c53.3,528,210, +-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,-`+(e+92)+`c0,-162.7,5.7,-314,17,-454c20.7,-272,63.7,-513,129,-723c65.3, +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,`+(e+9)+` +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,-`+(e+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"),Ua=class{static{me(this,"DocumentFragment")}constructor(t){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=t,this.classes=[],this.height=0,this.depth=0,this.maxFontSize=0,this.style={}}hasClass(t){return va.contains(this.classes,t)}toNode(){for(var t=document.createDocumentFragment(),e=0;et.toText(),"toText");return this.children.map(t).join("")}},qa={"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]}},ja={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]},Wa={"Å":"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"},me(zi,"setFontMetrics"),me(Gi,"getCharacterMetrics"),Ya={},me(Ui,"getGlobalMetrics"),Ha=[[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]],Va=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Xa=me(function(t,e){return e.size<2?t:Ha[t-1][e.size-1]},"sizeAtStyle"),(Ka=class i{static{me(this,"Options")}constructor(t){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=t.style,this.color=t.color,this.size=t.size||i.BASESIZE,this.textSize=t.textSize||this.size,this.phantom=!!t.phantom,this.font=t.font||"",this.fontFamily=t.fontFamily||"",this.fontWeight=t.fontWeight||"",this.fontShape=t.fontShape||"",this.sizeMultiplier=Va[this.size-1],this.maxSize=t.maxSize,this.minRuleThickness=t.minRuleThickness,this._fontMetrics=void 0}extend(t){var e,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(e in t)t.hasOwnProperty(e)&&(r[e]=t[e]);return new i(r)}havingStyle(t){return this.style===t?this:this.extend({style:t,size:Xa(this.textSize,t)})}havingCrampedStyle(){return this.havingStyle(this.style.cramp())}havingSize(t){return this.size===t&&this.textSize===t?this:this.extend({style:this.style.text(),size:t,textSize:t,sizeMultiplier:Va[t-1]})}havingBaseStyle(t){t=t||this.style.text();var e=Xa(i.BASESIZE,t);return this.size===e&&this.textSize===i.BASESIZE&&this.style===t?this:this.extend({style:t,size:e})}havingBaseSizing(){var t;switch(this.style.id){case 4:case 5:t=3;break;case 6:case 7:t=1;break;default:t=6}return this.extend({style:this.style.text(),size:t})}withColor(t){return this.extend({color:t})}withPhantom(){return this.extend({phantom:!0})}withFont(t){return this.extend({font:t})}withTextFontFamily(t){return this.extend({fontFamily:t,font:""})}withTextFontWeight(t){return this.extend({fontWeight:t,font:""})}withTextFontShape(t){return this.extend({fontShape:t,font:""})}sizingClasses(t){return t.size!==this.size?["sizing","reset-size"+t.size,"size"+this.size]:[]}baseSizingClasses(){return this.size!==i.BASESIZE?["sizing","reset-size"+this.size,"size"+i.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Ui(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}).BASESIZE=6,Za={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},Qa={ex:!0,em:!0,mu:!0},Ja=me(function(t){return(t="string"!=typeof t?t.unit:t)in Za||t in Qa||"ex"===t},"validUnit"),ts=me(function(t,e){var r;if(t.unit in Za)r=Za[t.unit]/e.fontMetrics().ptPerEm/e.sizeMultiplier;else if("mu"===t.unit)r=e.fontMetrics().cssEmPerMu;else{var n=e.style.isTight()?e.havingStyle(e.style.text()):e;if("ex"===t.unit)r=n.fontMetrics().xHeight;else{if("em"!==t.unit)throw new X("Invalid unit: '"+t.unit+"'");r=n.fontMetrics().quad}n!==e&&(r*=n.sizeMultiplier/e.sizeMultiplier)}return Math.min(t.number*r,e.maxSize)},"calculateSize"),K=me(function(t){return+t.toFixed(4)+"em"},"makeEm"),es=me(function(t){return t.filter(t=>t).join(" ")},"createClass"),rs=me(function(t,e,r){this.classes=t||[],this.attributes={},this.height=0,this.depth=0,this.maxFontSize=0,this.style=r||{},e&&(e.style.isTight()&&this.classes.push("mtight"),t=e.getColor())&&(this.style.color=t)},"initNode"),ns=me(function(t){var e,r,n=document.createElement(t);for(e in n.className=es(this.classes),this.style)this.style.hasOwnProperty(e)&&(n.style[e]=this.style[e]);for(r in this.attributes)this.attributes.hasOwnProperty(r)&&n.setAttribute(r,this.attributes[r]);for(var i=0;i"},"toMarkup"),as=class{static{me(this,"Span")}constructor(t,e,r,n){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,rs.call(this,t,r,n),this.children=e||[]}setAttribute(t,e){this.attributes[t]=e}hasClass(t){return va.contains(this.classes,t)}toNode(){return ns.call(this,"span")}toMarkup(){return is.call(this,"span")}},ss=class{static{me(this,"Anchor")}constructor(t,e,r,n){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,rs.call(this,e,n),this.children=r||[],this.setAttribute("href",t)}setAttribute(t,e){this.attributes[t]=e}hasClass(t){return va.contains(this.classes,t)}toNode(){return ns.call(this,"a")}toMarkup(){return is.call(this,"a")}},os=class{static{me(this,"Img")}constructor(t,e,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=e,this.src=t,this.classes=["mord"],this.style=r}hasClass(t){return va.contains(this.classes,t)}toNode(){var t,e=document.createElement("img");for(t in e.src=this.src,e.alt=this.alt,e.className="mord",this.style)this.style.hasOwnProperty(t)&&(e.style[t]=this.style[t]);return e}toMarkup(){var t,e=''+va.escape(this.alt)+'"}},ls={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"},cs=class{static{me(this,"SymbolNode")}constructor(t,e,r,n,i,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=t,this.height=e||0,this.depth=r||0,this.italic=n||0,this.skew=i||0,this.width=a||0,this.classes=s||[],this.style=o||{},this.maxFontSize=0,(t=Fi(this.text.charCodeAt(0)))&&this.classes.push(t+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=ls[this.text])}hasClass(t){return va.contains(this.classes,t)}toNode(){var t,e=document.createTextNode(this.text),r=null;for(t in 0":i}},hs=class{static{me(this,"SvgNode")}constructor(t,e){this.children=void 0,this.attributes=void 0,this.children=t||[],this.attributes=e||{}}toNode(){var t,e=document.createElementNS("http://www.w3.org/2000/svg","svg");for(t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);for(var r=0;r"}},us=class{static{me(this,"PathNode")}constructor(t,e){this.pathName=void 0,this.alternate=void 0,this.pathName=t,this.alternate=e}toNode(){var t=document.createElementNS("http://www.w3.org/2000/svg","path");return this.alternate?t.setAttribute("d",this.alternate):t.setAttribute("d",za[this.pathName]),t}toMarkup(){return this.alternate?'':''}},ds=class{static{me(this,"LineNode")}constructor(t){this.attributes=void 0,this.attributes=t||{}}toNode(){var t,e=document.createElementNS("http://www.w3.org/2000/svg","line");for(t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);return e}toMarkup(){var t,e=""}},me(qi,"assertSymbolDomNode"),me(ji,"assertSpan"),ps={bin:1,close:1,inner:1,open:1,punct:1,rel:1},gs={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},fs={math:{},text:{}},me(o,"defineSymbol"),d="text",y="ams",sc="accent-token",m="bin",Rl="close",Fl="inner",ms="mathord",ac="op-token",mc="open",Pl="punct",fc="spacing",g="textord",o(u="math",p="main",f="rel","≡","\\equiv",!0),o(u,p,f,"≺","\\prec",!0),o(u,p,f,"≻","\\succ",!0),o(u,p,f,"∼","\\sim",!0),o(u,p,f,"⊥","\\perp"),o(u,p,f,"⪯","\\preceq",!0),o(u,p,f,"⪰","\\succeq",!0),o(u,p,f,"≃","\\simeq",!0),o(u,p,f,"∣","\\mid",!0),o(u,p,f,"≪","\\ll",!0),o(u,p,f,"≫","\\gg",!0),o(u,p,f,"≍","\\asymp",!0),o(u,p,f,"∥","\\parallel"),o(u,p,f,"⋈","\\bowtie",!0),o(u,p,f,"⌣","\\smile",!0),o(u,p,f,"⊑","\\sqsubseteq",!0),o(u,p,f,"⊒","\\sqsupseteq",!0),o(u,p,f,"≐","\\doteq",!0),o(u,p,f,"⌢","\\frown",!0),o(u,p,f,"∋","\\ni",!0),o(u,p,f,"∝","\\propto",!0),o(u,p,f,"⊢","\\vdash",!0),o(u,p,f,"⊣","\\dashv",!0),o(u,p,f,"∋","\\owns"),o(u,p,Pl,".","\\ldotp"),o(u,p,Pl,"⋅","\\cdotp"),o(u,p,g,"#","\\#"),o(d,p,g,"#","\\#"),o(u,p,g,"&","\\&"),o(d,p,g,"&","\\&"),o(u,p,g,"ℵ","\\aleph",!0),o(u,p,g,"∀","\\forall",!0),o(u,p,g,"ℏ","\\hbar",!0),o(u,p,g,"∃","\\exists",!0),o(u,p,g,"∇","\\nabla",!0),o(u,p,g,"♭","\\flat",!0),o(u,p,g,"ℓ","\\ell",!0),o(u,p,g,"♮","\\natural",!0),o(u,p,g,"♣","\\clubsuit",!0),o(u,p,g,"℘","\\wp",!0),o(u,p,g,"♯","\\sharp",!0),o(u,p,g,"♢","\\diamondsuit",!0),o(u,p,g,"ℜ","\\Re",!0),o(u,p,g,"♡","\\heartsuit",!0),o(u,p,g,"ℑ","\\Im",!0),o(u,p,g,"♠","\\spadesuit",!0),o(u,p,g,"§","\\S",!0),o(d,p,g,"§","\\S"),o(u,p,g,"¶","\\P",!0),o(d,p,g,"¶","\\P"),o(u,p,g,"†","\\dag"),o(d,p,g,"†","\\dag"),o(d,p,g,"†","\\textdagger"),o(u,p,g,"‡","\\ddag"),o(d,p,g,"‡","\\ddag"),o(d,p,g,"‡","\\textdaggerdbl"),o(u,p,Rl,"⎱","\\rmoustache",!0),o(u,p,mc,"⎰","\\lmoustache",!0),o(u,p,Rl,"⟯","\\rgroup",!0),o(u,p,mc,"⟮","\\lgroup",!0),o(u,p,m,"∓","\\mp",!0),o(u,p,m,"⊖","\\ominus",!0),o(u,p,m,"⊎","\\uplus",!0),o(u,p,m,"⊓","\\sqcap",!0),o(u,p,m,"∗","\\ast"),o(u,p,m,"⊔","\\sqcup",!0),o(u,p,m,"◯","\\bigcirc",!0),o(u,p,m,"∙","\\bullet",!0),o(u,p,m,"‡","\\ddagger"),o(u,p,m,"≀","\\wr",!0),o(u,p,m,"⨿","\\amalg"),o(u,p,m,"&","\\And"),o(u,p,f,"⟵","\\longleftarrow",!0),o(u,p,f,"⇐","\\Leftarrow",!0),o(u,p,f,"⟸","\\Longleftarrow",!0),o(u,p,f,"⟶","\\longrightarrow",!0),o(u,p,f,"⇒","\\Rightarrow",!0),o(u,p,f,"⟹","\\Longrightarrow",!0),o(u,p,f,"↔","\\leftrightarrow",!0),o(u,p,f,"⟷","\\longleftrightarrow",!0),o(u,p,f,"⇔","\\Leftrightarrow",!0),o(u,p,f,"⟺","\\Longleftrightarrow",!0),o(u,p,f,"↦","\\mapsto",!0),o(u,p,f,"⟼","\\longmapsto",!0),o(u,p,f,"↗","\\nearrow",!0),o(u,p,f,"↩","\\hookleftarrow",!0),o(u,p,f,"↪","\\hookrightarrow",!0),o(u,p,f,"↘","\\searrow",!0),o(u,p,f,"↼","\\leftharpoonup",!0),o(u,p,f,"⇀","\\rightharpoonup",!0),o(u,p,f,"↙","\\swarrow",!0),o(u,p,f,"↽","\\leftharpoondown",!0),o(u,p,f,"⇁","\\rightharpoondown",!0),o(u,p,f,"↖","\\nwarrow",!0),o(u,p,f,"⇌","\\rightleftharpoons",!0),o(u,y,f,"≮","\\nless",!0),o(u,y,f,"","\\@nleqslant"),o(u,y,f,"","\\@nleqq"),o(u,y,f,"⪇","\\lneq",!0),o(u,y,f,"≨","\\lneqq",!0),o(u,y,f,"","\\@lvertneqq"),o(u,y,f,"⋦","\\lnsim",!0),o(u,y,f,"⪉","\\lnapprox",!0),o(u,y,f,"⊀","\\nprec",!0),o(u,y,f,"⋠","\\npreceq",!0),o(u,y,f,"⋨","\\precnsim",!0),o(u,y,f,"⪹","\\precnapprox",!0),o(u,y,f,"≁","\\nsim",!0),o(u,y,f,"","\\@nshortmid"),o(u,y,f,"∤","\\nmid",!0),o(u,y,f,"⊬","\\nvdash",!0),o(u,y,f,"⊭","\\nvDash",!0),o(u,y,f,"⋪","\\ntriangleleft"),o(u,y,f,"⋬","\\ntrianglelefteq",!0),o(u,y,f,"⊊","\\subsetneq",!0),o(u,y,f,"","\\@varsubsetneq"),o(u,y,f,"⫋","\\subsetneqq",!0),o(u,y,f,"","\\@varsubsetneqq"),o(u,y,f,"≯","\\ngtr",!0),o(u,y,f,"","\\@ngeqslant"),o(u,y,f,"","\\@ngeqq"),o(u,y,f,"⪈","\\gneq",!0),o(u,y,f,"≩","\\gneqq",!0),o(u,y,f,"","\\@gvertneqq"),o(u,y,f,"⋧","\\gnsim",!0),o(u,y,f,"⪊","\\gnapprox",!0),o(u,y,f,"⊁","\\nsucc",!0),o(u,y,f,"⋡","\\nsucceq",!0),o(u,y,f,"⋩","\\succnsim",!0),o(u,y,f,"⪺","\\succnapprox",!0),o(u,y,f,"≆","\\ncong",!0),o(u,y,f,"","\\@nshortparallel"),o(u,y,f,"∦","\\nparallel",!0),o(u,y,f,"⊯","\\nVDash",!0),o(u,y,f,"⋫","\\ntriangleright"),o(u,y,f,"⋭","\\ntrianglerighteq",!0),o(u,y,f,"","\\@nsupseteqq"),o(u,y,f,"⊋","\\supsetneq",!0),o(u,y,f,"","\\@varsupsetneq"),o(u,y,f,"⫌","\\supsetneqq",!0),o(u,y,f,"","\\@varsupsetneqq"),o(u,y,f,"⊮","\\nVdash",!0),o(u,y,f,"⪵","\\precneqq",!0),o(u,y,f,"⪶","\\succneqq",!0),o(u,y,f,"","\\@nsubseteqq"),o(u,y,m,"⊴","\\unlhd"),o(u,y,m,"⊵","\\unrhd"),o(u,y,f,"↚","\\nleftarrow",!0),o(u,y,f,"↛","\\nrightarrow",!0),o(u,y,f,"⇍","\\nLeftarrow",!0),o(u,y,f,"⇏","\\nRightarrow",!0),o(u,y,f,"↮","\\nleftrightarrow",!0),o(u,y,f,"⇎","\\nLeftrightarrow",!0),o(u,y,f,"△","\\vartriangle"),o(u,y,g,"ℏ","\\hslash"),o(u,y,g,"▽","\\triangledown"),o(u,y,g,"◊","\\lozenge"),o(u,y,g,"Ⓢ","\\circledS"),o(u,y,g,"®","\\circledR"),o(d,y,g,"®","\\circledR"),o(u,y,g,"∡","\\measuredangle",!0),o(u,y,g,"∄","\\nexists"),o(u,y,g,"℧","\\mho"),o(u,y,g,"Ⅎ","\\Finv",!0),o(u,y,g,"⅁","\\Game",!0),o(u,y,g,"‵","\\backprime"),o(u,y,g,"▲","\\blacktriangle"),o(u,y,g,"▼","\\blacktriangledown"),o(u,y,g,"■","\\blacksquare"),o(u,y,g,"⧫","\\blacklozenge"),o(u,y,g,"★","\\bigstar"),o(u,y,g,"∢","\\sphericalangle",!0),o(u,y,g,"∁","\\complement",!0),o(u,y,g,"ð","\\eth",!0),o(d,p,g,"ð","ð"),o(u,y,g,"╱","\\diagup"),o(u,y,g,"╲","\\diagdown"),o(u,y,g,"□","\\square"),o(u,y,g,"□","\\Box"),o(u,y,g,"◊","\\Diamond"),o(u,y,g,"¥","\\yen",!0),o(d,y,g,"¥","\\yen",!0),o(u,y,g,"✓","\\checkmark",!0),o(d,y,g,"✓","\\checkmark"),o(u,y,g,"ℶ","\\beth",!0),o(u,y,g,"ℸ","\\daleth",!0),o(u,y,g,"ℷ","\\gimel",!0),o(u,y,g,"ϝ","\\digamma",!0),o(u,y,g,"ϰ","\\varkappa"),o(u,y,mc,"┌","\\@ulcorner",!0),o(u,y,Rl,"┐","\\@urcorner",!0),o(u,y,mc,"└","\\@llcorner",!0),o(u,y,Rl,"┘","\\@lrcorner",!0),o(u,y,f,"≦","\\leqq",!0),o(u,y,f,"⩽","\\leqslant",!0),o(u,y,f,"⪕","\\eqslantless",!0),o(u,y,f,"≲","\\lesssim",!0),o(u,y,f,"⪅","\\lessapprox",!0),o(u,y,f,"≊","\\approxeq",!0),o(u,y,m,"⋖","\\lessdot"),o(u,y,f,"⋘","\\lll",!0),o(u,y,f,"≶","\\lessgtr",!0),o(u,y,f,"⋚","\\lesseqgtr",!0),o(u,y,f,"⪋","\\lesseqqgtr",!0),o(u,y,f,"≑","\\doteqdot"),o(u,y,f,"≓","\\risingdotseq",!0),o(u,y,f,"≒","\\fallingdotseq",!0),o(u,y,f,"∽","\\backsim",!0),o(u,y,f,"⋍","\\backsimeq",!0),o(u,y,f,"⫅","\\subseteqq",!0),o(u,y,f,"⋐","\\Subset",!0),o(u,y,f,"⊏","\\sqsubset",!0),o(u,y,f,"≼","\\preccurlyeq",!0),o(u,y,f,"⋞","\\curlyeqprec",!0),o(u,y,f,"≾","\\precsim",!0),o(u,y,f,"⪷","\\precapprox",!0),o(u,y,f,"⊲","\\vartriangleleft"),o(u,y,f,"⊴","\\trianglelefteq"),o(u,y,f,"⊨","\\vDash",!0),o(u,y,f,"⊪","\\Vvdash",!0),o(u,y,f,"⌣","\\smallsmile"),o(u,y,f,"⌢","\\smallfrown"),o(u,y,f,"≏","\\bumpeq",!0),o(u,y,f,"≎","\\Bumpeq",!0),o(u,y,f,"≧","\\geqq",!0),o(u,y,f,"⩾","\\geqslant",!0),o(u,y,f,"⪖","\\eqslantgtr",!0),o(u,y,f,"≳","\\gtrsim",!0),o(u,y,f,"⪆","\\gtrapprox",!0),o(u,y,m,"⋗","\\gtrdot"),o(u,y,f,"⋙","\\ggg",!0),o(u,y,f,"≷","\\gtrless",!0),o(u,y,f,"⋛","\\gtreqless",!0),o(u,y,f,"⪌","\\gtreqqless",!0),o(u,y,f,"≖","\\eqcirc",!0),o(u,y,f,"≗","\\circeq",!0),o(u,y,f,"≜","\\triangleq",!0),o(u,y,f,"∼","\\thicksim"),o(u,y,f,"≈","\\thickapprox"),o(u,y,f,"⫆","\\supseteqq",!0),o(u,y,f,"⋑","\\Supset",!0),o(u,y,f,"⊐","\\sqsupset",!0),o(u,y,f,"≽","\\succcurlyeq",!0),o(u,y,f,"⋟","\\curlyeqsucc",!0),o(u,y,f,"≿","\\succsim",!0),o(u,y,f,"⪸","\\succapprox",!0),o(u,y,f,"⊳","\\vartriangleright"),o(u,y,f,"⊵","\\trianglerighteq"),o(u,y,f,"⊩","\\Vdash",!0),o(u,y,f,"∣","\\shortmid"),o(u,y,f,"∥","\\shortparallel"),o(u,y,f,"≬","\\between",!0),o(u,y,f,"⋔","\\pitchfork",!0),o(u,y,f,"∝","\\varpropto"),o(u,y,f,"◀","\\blacktriangleleft"),o(u,y,f,"∴","\\therefore",!0),o(u,y,f,"∍","\\backepsilon"),o(u,y,f,"▶","\\blacktriangleright"),o(u,y,f,"∵","\\because",!0),o(u,y,f,"⋘","\\llless"),o(u,y,f,"⋙","\\gggtr"),o(u,y,m,"⊲","\\lhd"),o(u,y,m,"⊳","\\rhd"),o(u,y,f,"≂","\\eqsim",!0),o(u,p,f,"⋈","\\Join"),o(u,y,f,"≑","\\Doteq",!0),o(u,y,m,"∔","\\dotplus",!0),o(u,y,m,"∖","\\smallsetminus"),o(u,y,m,"⋒","\\Cap",!0),o(u,y,m,"⋓","\\Cup",!0),o(u,y,m,"⩞","\\doublebarwedge",!0),o(u,y,m,"⊟","\\boxminus",!0),o(u,y,m,"⊞","\\boxplus",!0),o(u,y,m,"⋇","\\divideontimes",!0),o(u,y,m,"⋉","\\ltimes",!0),o(u,y,m,"⋊","\\rtimes",!0),o(u,y,m,"⋋","\\leftthreetimes",!0),o(u,y,m,"⋌","\\rightthreetimes",!0),o(u,y,m,"⋏","\\curlywedge",!0),o(u,y,m,"⋎","\\curlyvee",!0),o(u,y,m,"⊝","\\circleddash",!0),o(u,y,m,"⊛","\\circledast",!0),o(u,y,m,"⋅","\\centerdot"),o(u,y,m,"⊺","\\intercal",!0),o(u,y,m,"⋒","\\doublecap"),o(u,y,m,"⋓","\\doublecup"),o(u,y,m,"⊠","\\boxtimes",!0),o(u,y,f,"⇢","\\dashrightarrow",!0),o(u,y,f,"⇠","\\dashleftarrow",!0),o(u,y,f,"⇇","\\leftleftarrows",!0),o(u,y,f,"⇆","\\leftrightarrows",!0),o(u,y,f,"⇚","\\Lleftarrow",!0),o(u,y,f,"↞","\\twoheadleftarrow",!0),o(u,y,f,"↢","\\leftarrowtail",!0),o(u,y,f,"↫","\\looparrowleft",!0),o(u,y,f,"⇋","\\leftrightharpoons",!0),o(u,y,f,"↶","\\curvearrowleft",!0),o(u,y,f,"↺","\\circlearrowleft",!0),o(u,y,f,"↰","\\Lsh",!0),o(u,y,f,"⇈","\\upuparrows",!0),o(u,y,f,"↿","\\upharpoonleft",!0),o(u,y,f,"⇃","\\downharpoonleft",!0),o(u,p,f,"⊶","\\origof",!0),o(u,p,f,"⊷","\\imageof",!0),o(u,y,f,"⊸","\\multimap",!0),o(u,y,f,"↭","\\leftrightsquigarrow",!0),o(u,y,f,"⇉","\\rightrightarrows",!0),o(u,y,f,"⇄","\\rightleftarrows",!0),o(u,y,f,"↠","\\twoheadrightarrow",!0),o(u,y,f,"↣","\\rightarrowtail",!0),o(u,y,f,"↬","\\looparrowright",!0),o(u,y,f,"↷","\\curvearrowright",!0),o(u,y,f,"↻","\\circlearrowright",!0),o(u,y,f,"↱","\\Rsh",!0),o(u,y,f,"⇊","\\downdownarrows",!0),o(u,y,f,"↾","\\upharpoonright",!0),o(u,y,f,"⇂","\\downharpoonright",!0),o(u,y,f,"⇝","\\rightsquigarrow",!0),o(u,y,f,"⇝","\\leadsto"),o(u,y,f,"⇛","\\Rrightarrow",!0),o(u,y,f,"↾","\\restriction"),o(u,p,g,"‘","`"),o(u,p,g,"$","\\$"),o(d,p,g,"$","\\$"),o(d,p,g,"$","\\textdollar"),o(u,p,g,"%","\\%"),o(d,p,g,"%","\\%"),o(u,p,g,"_","\\_"),o(d,p,g,"_","\\_"),o(d,p,g,"_","\\textunderscore"),o(u,p,g,"∠","\\angle",!0),o(u,p,g,"∞","\\infty",!0),o(u,p,g,"′","\\prime"),o(u,p,g,"△","\\triangle"),o(u,p,g,"Γ","\\Gamma",!0),o(u,p,g,"Δ","\\Delta",!0),o(u,p,g,"Θ","\\Theta",!0),o(u,p,g,"Λ","\\Lambda",!0),o(u,p,g,"Ξ","\\Xi",!0),o(u,p,g,"Π","\\Pi",!0),o(u,p,g,"Σ","\\Sigma",!0),o(u,p,g,"Υ","\\Upsilon",!0),o(u,p,g,"Φ","\\Phi",!0),o(u,p,g,"Ψ","\\Psi",!0),o(u,p,g,"Ω","\\Omega",!0),o(u,p,g,"A","Α"),o(u,p,g,"B","Β"),o(u,p,g,"E","Ε"),o(u,p,g,"Z","Ζ"),o(u,p,g,"H","Η"),o(u,p,g,"I","Ι"),o(u,p,g,"K","Κ"),o(u,p,g,"M","Μ"),o(u,p,g,"N","Ν"),o(u,p,g,"O","Ο"),o(u,p,g,"P","Ρ"),o(u,p,g,"T","Τ"),o(u,p,g,"X","Χ"),o(u,p,g,"¬","\\neg",!0),o(u,p,g,"¬","\\lnot"),o(u,p,g,"⊤","\\top"),o(u,p,g,"⊥","\\bot"),o(u,p,g,"∅","\\emptyset"),o(u,y,g,"∅","\\varnothing"),o(u,p,ms,"α","\\alpha",!0),o(u,p,ms,"β","\\beta",!0),o(u,p,ms,"γ","\\gamma",!0),o(u,p,ms,"δ","\\delta",!0),o(u,p,ms,"ϵ","\\epsilon",!0),o(u,p,ms,"ζ","\\zeta",!0),o(u,p,ms,"η","\\eta",!0),o(u,p,ms,"θ","\\theta",!0),o(u,p,ms,"ι","\\iota",!0),o(u,p,ms,"κ","\\kappa",!0),o(u,p,ms,"λ","\\lambda",!0),o(u,p,ms,"μ","\\mu",!0),o(u,p,ms,"ν","\\nu",!0),o(u,p,ms,"ξ","\\xi",!0),o(u,p,ms,"ο","\\omicron",!0),o(u,p,ms,"π","\\pi",!0),o(u,p,ms,"ρ","\\rho",!0),o(u,p,ms,"σ","\\sigma",!0),o(u,p,ms,"τ","\\tau",!0),o(u,p,ms,"υ","\\upsilon",!0),o(u,p,ms,"ϕ","\\phi",!0),o(u,p,ms,"χ","\\chi",!0),o(u,p,ms,"ψ","\\psi",!0),o(u,p,ms,"ω","\\omega",!0),o(u,p,ms,"ε","\\varepsilon",!0),o(u,p,ms,"ϑ","\\vartheta",!0),o(u,p,ms,"ϖ","\\varpi",!0),o(u,p,ms,"ϱ","\\varrho",!0),o(u,p,ms,"ς","\\varsigma",!0),o(u,p,ms,"φ","\\varphi",!0),o(u,p,m,"∗","*",!0),o(u,p,m,"+","+"),o(u,p,m,"−","-",!0),o(u,p,m,"⋅","\\cdot",!0),o(u,p,m,"∘","\\circ",!0),o(u,p,m,"÷","\\div",!0),o(u,p,m,"±","\\pm",!0),o(u,p,m,"×","\\times",!0),o(u,p,m,"∩","\\cap",!0),o(u,p,m,"∪","\\cup",!0),o(u,p,m,"∖","\\setminus",!0),o(u,p,m,"∧","\\land"),o(u,p,m,"∨","\\lor"),o(u,p,m,"∧","\\wedge",!0),o(u,p,m,"∨","\\vee",!0),o(u,p,g,"√","\\surd"),o(u,p,mc,"⟨","\\langle",!0),o(u,p,mc,"∣","\\lvert"),o(u,p,mc,"∥","\\lVert"),o(u,p,Rl,"?","?"),o(u,p,Rl,"!","!"),o(u,p,Rl,"⟩","\\rangle",!0),o(u,p,Rl,"∣","\\rvert"),o(u,p,Rl,"∥","\\rVert"),o(u,p,f,"=","="),o(u,p,f,":",":"),o(u,p,f,"≈","\\approx",!0),o(u,p,f,"≅","\\cong",!0),o(u,p,f,"≥","\\ge"),o(u,p,f,"≥","\\geq",!0),o(u,p,f,"←","\\gets"),o(u,p,f,">","\\gt",!0),o(u,p,f,"∈","\\in",!0),o(u,p,f,"","\\@not"),o(u,p,f,"⊂","\\subset",!0),o(u,p,f,"⊃","\\supset",!0),o(u,p,f,"⊆","\\subseteq",!0),o(u,p,f,"⊇","\\supseteq",!0),o(u,y,f,"⊈","\\nsubseteq",!0),o(u,y,f,"⊉","\\nsupseteq",!0),o(u,p,f,"⊨","\\models"),o(u,p,f,"←","\\leftarrow",!0),o(u,p,f,"≤","\\le"),o(u,p,f,"≤","\\leq",!0),o(u,p,f,"<","\\lt",!0),o(u,p,f,"→","\\rightarrow",!0),o(u,p,f,"→","\\to"),o(u,y,f,"≱","\\ngeq",!0),o(u,y,f,"≰","\\nleq",!0),o(u,p,fc," ","\\ "),o(u,p,fc," ","\\space"),o(u,p,fc," ","\\nobreakspace"),o(d,p,fc," ","\\ "),o(d,p,fc," "," "),o(d,p,fc," ","\\space"),o(d,p,fc," ","\\nobreakspace"),o(u,p,fc,null,"\\nobreak"),o(u,p,fc,null,"\\allowbreak"),o(u,p,Pl,",",","),o(u,p,Pl,";",";"),o(u,y,m,"⊼","\\barwedge",!0),o(u,y,m,"⊻","\\veebar",!0),o(u,p,m,"⊙","\\odot",!0),o(u,p,m,"⊕","\\oplus",!0),o(u,p,m,"⊗","\\otimes",!0),o(u,p,g,"∂","\\partial",!0),o(u,p,m,"⊘","\\oslash",!0),o(u,y,m,"⊚","\\circledcirc",!0),o(u,y,m,"⊡","\\boxdot",!0),o(u,p,m,"△","\\bigtriangleup"),o(u,p,m,"▽","\\bigtriangledown"),o(u,p,m,"†","\\dagger"),o(u,p,m,"⋄","\\diamond"),o(u,p,m,"⋆","\\star"),o(u,p,m,"◃","\\triangleleft"),o(u,p,m,"▹","\\triangleright"),o(u,p,mc,"{","\\{"),o(d,p,g,"{","\\{"),o(d,p,g,"{","\\textbraceleft"),o(u,p,Rl,"}","\\}"),o(d,p,g,"}","\\}"),o(d,p,g,"}","\\textbraceright"),o(u,p,mc,"{","\\lbrace"),o(u,p,Rl,"}","\\rbrace"),o(u,p,mc,"[","\\lbrack",!0),o(d,p,g,"[","\\lbrack",!0),o(u,p,Rl,"]","\\rbrack",!0),o(d,p,g,"]","\\rbrack",!0),o(u,p,mc,"(","\\lparen",!0),o(u,p,Rl,")","\\rparen",!0),o(d,p,g,"<","\\textless",!0),o(d,p,g,">","\\textgreater",!0),o(u,p,mc,"⌊","\\lfloor",!0),o(u,p,Rl,"⌋","\\rfloor",!0),o(u,p,mc,"⌈","\\lceil",!0),o(u,p,Rl,"⌉","\\rceil",!0),o(u,p,g,"\\","\\backslash"),o(u,p,g,"∣","|"),o(u,p,g,"∣","\\vert"),o(d,p,g,"|","\\textbar",!0),o(u,p,g,"∥","\\|"),o(u,p,g,"∥","\\Vert"),o(d,p,g,"∥","\\textbardbl"),o(d,p,g,"~","\\textasciitilde"),o(d,p,g,"\\","\\textbackslash"),o(d,p,g,"^","\\textasciicircum"),o(u,p,f,"↑","\\uparrow",!0),o(u,p,f,"⇑","\\Uparrow",!0),o(u,p,f,"↓","\\downarrow",!0),o(u,p,f,"⇓","\\Downarrow",!0),o(u,p,f,"↕","\\updownarrow",!0),o(u,p,f,"⇕","\\Updownarrow",!0),o(u,p,ac,"∐","\\coprod"),o(u,p,ac,"⋁","\\bigvee"),o(u,p,ac,"⋀","\\bigwedge"),o(u,p,ac,"⨄","\\biguplus"),o(u,p,ac,"⋂","\\bigcap"),o(u,p,ac,"⋃","\\bigcup"),o(u,p,ac,"∫","\\int"),o(u,p,ac,"∫","\\intop"),o(u,p,ac,"∬","\\iint"),o(u,p,ac,"∭","\\iiint"),o(u,p,ac,"∏","\\prod"),o(u,p,ac,"∑","\\sum"),o(u,p,ac,"⨂","\\bigotimes"),o(u,p,ac,"⨁","\\bigoplus"),o(u,p,ac,"⨀","\\bigodot"),o(u,p,ac,"∮","\\oint"),o(u,p,ac,"∯","\\oiint"),o(u,p,ac,"∰","\\oiiint"),o(u,p,ac,"⨆","\\bigsqcup"),o(u,p,ac,"∫","\\smallint"),o(d,p,Fl,"…","\\textellipsis"),o(u,p,Fl,"…","\\mathellipsis"),o(d,p,Fl,"…","\\ldots",!0),o(u,p,Fl,"…","\\ldots",!0),o(u,p,Fl,"⋯","\\@cdots",!0),o(u,p,Fl,"⋱","\\ddots",!0),o(u,p,g,"⋮","\\varvdots"),o(u,p,sc,"ˊ","\\acute"),o(u,p,sc,"ˋ","\\grave"),o(u,p,sc,"¨","\\ddot"),o(u,p,sc,"~","\\tilde"),o(u,p,sc,"ˉ","\\bar"),o(u,p,sc,"˘","\\breve"),o(u,p,sc,"ˇ","\\check"),o(u,p,sc,"^","\\hat"),o(u,p,sc,"⃗","\\vec"),o(u,p,sc,"˙","\\dot"),o(u,p,sc,"˚","\\mathring"),o(u,p,ms,"","\\@imath"),o(u,p,ms,"","\\@jmath"),o(u,p,g,"ı","ı"),o(u,p,g,"ȷ","ȷ"),o(d,p,g,"ı","\\i",!0),o(d,p,g,"ȷ","\\j",!0),o(d,p,g,"ß","\\ss",!0),o(d,p,g,"æ","\\ae",!0),o(d,p,g,"œ","\\oe",!0),o(d,p,g,"ø","\\o",!0),o(d,p,g,"Æ","\\AE",!0),o(d,p,g,"Œ","\\OE",!0),o(d,p,g,"Ø","\\O",!0),o(d,p,sc,"ˊ","\\'"),o(d,p,sc,"ˋ","\\`"),o(d,p,sc,"ˆ","\\^"),o(d,p,sc,"˜","\\~"),o(d,p,sc,"ˉ","\\="),o(d,p,sc,"˘","\\u"),o(d,p,sc,"˙","\\."),o(d,p,sc,"¸","\\c"),o(d,p,sc,"˚","\\r"),o(d,p,sc,"ˇ","\\v"),o(d,p,sc,"¨",'\\"'),o(d,p,sc,"˝","\\H"),o(d,p,sc,"◯","\\textcircled"),ys={"--":!0,"---":!0,"``":!0,"''":!0},o(d,p,g,"–","--",!0),o(d,p,g,"–","\\textendash"),o(d,p,g,"—","---",!0),o(d,p,g,"—","\\textemdash"),o(d,p,g,"‘","`",!0),o(d,p,g,"‘","\\textquoteleft"),o(d,p,g,"’","'",!0),o(d,p,g,"’","\\textquoteright"),o(d,p,g,"“","``",!0),o(d,p,g,"“","\\textquotedblleft"),o(d,p,g,"”","''",!0),o(d,p,g,"”","\\textquotedblright"),o(u,p,g,"°","\\degree",!0),o(d,p,g,"°","\\degree"),o(d,p,g,"°","\\textdegree",!0),o(u,p,g,"£","\\pounds"),o(u,p,g,"£","\\mathsterling",!0),o(d,p,g,"£","\\pounds"),o(d,p,g,"£","\\textsterling",!0),o(u,y,g,"✠","\\maltese"),o(d,y,g,"✠","\\maltese"),vs='0123456789/@."',bs=0;bs{if(es(t.classes)!==es(e.classes)||t.skew!==e.skew||t.maxFontSize!==e.maxFontSize)return!1;if(1===t.classes.length){var r=t.classes[0];if("mbin"===r||"mord"===r)return!1}for(var n in t.style)if(t.style.hasOwnProperty(n)&&t.style[n]!==e.style[n])return!1;for(var i in e.style)if(e.style.hasOwnProperty(i)&&t.style[i]!==e.style[i])return!1;return!0},"canCombine"),m=me(t=>{for(var e=0;ee&&(e=a.height),rnew as(t,e,r,n),"makeSvgSpan"),mc=me(function(t,e,r){return(t=qs([t],[],e)).height=Math.max(r||e.fontMetrics().defaultRuleThickness,e.minRuleThickness),t.style.borderBottomWidth=K(t.height),t.maxFontSize=1,t},"makeLineSpan"),Rl=me(function(t,e,r,n){return t=new ss(t,e,r,n),Us(t),t},"makeAnchor"),Ws=me(function(t){return t=new Ua(t),Us(t),t},"makeFragment"),f=me(function(t,e){return t instanceof Ua?qs([],[t],e):t},"wrapFragment"),Ys=me(function(t){if("individualShift"===t.positionType){for(var e=t.children,r=[e[0]],n=-e[0].shift-e[0].elem.depth,i=n,a=1;a{var r=qs(["mspace"],[],e),t=ts(t,e);return r.style.marginRight=K(t),r},"makeGlue"),Hs=me(function(t,e,r){var n="";switch(t){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=t}return n+"-"+("textbf"===e&&"textit"===r?"BoldItalic":"textbf"===e?"Bold":"textit"===e?"Italic":"Regular")},"retrieveTextFontName"),Vs={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"},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"}},Xs={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},sc=me(function(t,e){var[t,r,n]=Xs[t],t=new us(t),t=new hs([t],{width:K(r),height:K(n),style:"width:"+K(r),viewBox:"0 0 "+1e3*r+" "+1e3*n,preserveAspectRatio:"xMinYMin"});return(t=js(["overlay"],[t],e)).height=n,t.style.height=K(n),t.style.width=K(r),t},"staticSvg"),Z={fontMap:Vs,makeSymbol:$s,mathsym:fc,makeSpan:qs,makeSvgSpan:js,makeLineSpan:mc,makeAnchor:Rl,makeFragment:Ws,wrapFragment:f,makeVList:ac,makeOrd:Pl,makeGlue:Fl,staticSvg:sc,svgData:Xs,tryCombineChars:m},Ks={mord:{mop:y={number:3,unit:"mu"},mbin:fc={number:4,unit:"mu"},mrel:mc={number:5,unit:"mu"},minner:y},mop:{mord:y,mop:y,mrel:mc,minner:y},mbin:{mord:fc,mop:fc,mopen:fc,minner:fc},mrel:{mord:mc,mop:mc,mopen:mc,minner:mc},mopen:{},mclose:{mop:y,mbin:fc,mrel:mc,minner:y},mpunct:{mord:y,mop:y,mrel:mc,mopen:y,mclose:y,mpunct:y,minner:y},minner:{mord:y,mop:y,mbin:fc,mrel:mc,mopen:y,mpunct:y,minner:y}},Zs={mord:{mop:y},mop:{mord:y,mop:y},mbin:{},mrel:{},mopen:{},mclose:{mop:y},mpunct:{},minner:{mop:y}},Qs={},Js={},to={},me(l,"defineFunction"),me(Wi,"defineFunctionBuilders"),eo=me(function(t){return"ordgroup"===t.type&&1===t.body.length?t.body[0]:t},"normalizeArgument"),ro=me(function(t){return"ordgroup"===t.type?t.body:[t]},"ordargument"),no=Z.makeSpan,io=["leftmost","mbin","mopen","mrel","mop","mpunct"],ao=["rightmost","mrel","mclose","mpunct"],so={display:Aa.DISPLAY,text:Aa.TEXT,script:Aa.SCRIPT,scriptscript:Aa.SCRIPTSCRIPT},oo={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},lo=me(function(t,e,r,n){void 0===n&&(n=[null,null]);for(var i,a,s=[],o=0;o{var r=e.classes[0],n=t.classes[0];"mbin"===r&&va.contains(ao,n)?e.classes[0]="mord":"mbin"===n&&va.contains(io,r)&&(t.classes[0]="mord")},{node:a},n,r="root"===r),co(s,(t,e)=>{var e=po(e),r=po(t);if(t=e&&r?(t.hasClass("mtight")?Zs:Ks)[e][r]:null)return Z.makeGlue(t,i)},{node:a},n,r)),s},"buildExpression"),co=me(function t(r,e,n,i,a){i&&r.push(i);for(var s=0;st=>{r.splice(e+1,0,t),s++})(s))}i&&r.pop()},"traverseNonSpaceNodes"),ho=me(function(t){return t instanceof Ua||t instanceof ss||t instanceof as&&t.hasClass("enclosing")?t:null},"checkPartialGroup"),uo=me(function t(e,r){var n=ho(e);if(n&&(n=n.children).length){if("right"===r)return t(n[n.length-1],"right");if("left"===r)return t(n[0],"left")}return e},"getOutermostNode"),po=me(function(t,e){return t&&(e&&(t=uo(t,e)),oo[t.classes[0]])||null},"getTypeOfDomTree"),go=me(function(t,e){return t=["nulldelimiter"].concat(t.baseSizingClasses()),no(e.concat(t))},"makeNullDelimiter"),fo=me(function(t,e,r){if(!t)return no();var n;if(Js[t.type])return n=Js[t.type](t,e),r&&e.size!==r.size&&(n=no(e.sizingClasses(r),[n],e),e=e.sizeMultiplier/r.sizeMultiplier,n.height*=e,n.depth*=e),n;throw new X("Got group of unknown type: '"+t.type+"'")},"buildGroup"),me(Yi,"buildHTMLUnbreakable"),me(Hi,"buildHTML"),me(Vi,"newDocumentFragment"),mo=class{static{me(this,"MathNode")}constructor(t,e,r){this.type=void 0,this.attributes=void 0,this.children=void 0,this.classes=void 0,this.type=t,this.attributes={},this.children=e||[],this.classes=r||[]}setAttribute(t,e){this.attributes[t]=e}getAttribute(t){return this.attributes[t]}toNode(){var t,e=document.createElementNS("http://www.w3.org/1998/Math/MathML",this.type);for(t in this.attributes)Object.prototype.hasOwnProperty.call(this.attributes,t)&&e.setAttribute(t,this.attributes[t]);0"}toText(){return this.children.map(t=>t.toText()).join("")}},yo=class{static{me(this,"TextNode")}constructor(t){this.text=void 0,this.text=t}toNode(){return document.createTextNode(this.text)}toMarkup(){return va.escape(this.toText())}toText(){return this.text}},Rl=class{static{me(this,"SpaceNode")}constructor(t){this.width=void 0,this.character=void 0,this.width=t,this.character=.05555<=t&&t<=.05556?" ":.1666<=t&&t<=.1667?" ":.2222<=t&&t<=.2223?" ":.2777<=t&&t<=.2778?"  ":-.05556<=t&&t<=-.05555?" ⁣":-.1667<=t&&t<=-.1666?" ⁣":-.2223<=t&&t<=-.2222?" ⁣":-.2778<=t&&t<=-.2777?" ⁣":null}toNode(){var t;return this.character?document.createTextNode(this.character):((t=document.createElementNS("http://www.w3.org/1998/Math/MathML","mspace")).setAttribute("width",K(this.width)),t)}toMarkup(){return this.character?""+this.character+"":''}toText(){return this.character||" "}},E={MathNode:mo,TextNode:yo,SpaceNode:Rl,newDocumentFragment:Vi},vo=me(function(t,e,r){return!fs[e][t]||!fs[e][t].replace||55349===t.charCodeAt(0)||ys.hasOwnProperty(t)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(t=fs[e][t].replace),new E.TextNode(t)},"makeText"),xo=me(function(t){return 1===t.length?t[0]:new E.MathNode("mrow",t)},"makeRow"),bo=me(function(t,e){var r;return"texttt"===e.fontFamily?"monospace":"textsf"===e.fontFamily?"textit"===e.fontShape&&"textbf"===e.fontWeight?"sans-serif-bold-italic":"textit"===e.fontShape?"sans-serif-italic":"textbf"===e.fontWeight?"bold-sans-serif":"sans-serif":"textit"===e.fontShape&&"textbf"===e.fontWeight?"bold-italic":"textit"===e.fontShape?"italic":"textbf"===e.fontWeight?"bold":(e=e.font)&&"mathnormal"!==e?(r=t.mode,"mathit"===e?"italic":"boldsymbol"===e?"textord"===t.type?"bold":"bold-italic":"mathbf"===e?"bold":"mathbb"===e?"double-struck":"mathfrak"===e?"fraktur":"mathscr"===e||"mathcal"===e?"script":"mathsf"===e?"sans-serif":"mathtt"===e?"monospace":!va.contains(["\\imath","\\jmath"],t=t.text)&&Gi(t=fs[r][t]&&fs[r][t].replace?fs[r][t].replace:t,Z.fontMap[e].fontName,r)?Z.fontMap[e].variant:null):null},"getVariant"),wo=me(function(t,e,r){var n;if(1===t.length)return n=To(t[0],e),r&&n instanceof mo&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n];for(var i,a=[],s=0;s{t&&"supsub"===t.type?(o=(r=Ki(t.base,"accent")).base,t.base=o,n=ji(fo(t,e)),t.base=r):o=(r=Ki(t,"accent")).base;var r,n,i,a,t=fo(o,e.havingCrampedStyle()),s=0,o=(r.isShifty&&va.isCharacterBox(o)&&(o=va.getBaseElem(o),s=qi(fo(o,e.havingCrampedStyle())).skew),"\\c"===r.label),l=o?t.height+t.depth:Math.min(t.height,e.fontMetrics().xHeight),c=r.isStretchy?(c=Io.svgSpan(r,e),Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"elem",elem:c,wrapperClasses:["svg-align"],wrapperStyle:0{var r=t.isStretchy?Io.mathMLnode(t.label):new E.MathNode("mo",[vo(t.label,t.mode)]);return(t=new E.MathNode("mover",[To(t.base,e),r])).setAttribute("accent","true"),t},"mathmlBuilder$9"),Mo=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(t=>"\\"+t).join("|")),l({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:me((t,e)=>{var e=eo(e[0]),r=!Mo.test(t.funcName),n=!r||"\\widehat"===t.funcName||"\\widetilde"===t.funcName||"\\widecheck"===t.funcName;return{type:"accent",mode:t.parser.mode,label:t.funcName,isStretchy:r,isShifty:n,base:e}},"handler"),htmlBuilder:Ro,mathmlBuilder:Fl}),l({type:"accent",names:["\\'","\\`","\\^","\\~","\\=","\\u","\\.",'\\"',"\\c","\\r","\\H","\\v","\\textcircled"],props:{numArgs:1,allowedInText:!0,allowedInMath:!0,argTypes:["primitive"]},handler:me((t,e)=>{var e=e[0],r=t.parser.mode;return"math"===r&&(t.parser.settings.reportNonstrict("mathVsTextAccents","LaTeX's accent "+t.funcName+" works only in text mode"),r="text"),{type:"accent",mode:r,label:t.funcName,isStretchy:!1,isShifty:!0,base:e}},"handler"),htmlBuilder:Ro,mathmlBuilder:Fl}),l({type:"accentUnder",names:["\\underleftarrow","\\underrightarrow","\\underleftrightarrow","\\undergroup","\\underlinesegment","\\utilde"],props:{numArgs:1},handler:me((t,e)=>{var{parser:t,funcName:r}=t,e=e[0];return{type:"accentUnder",mode:t.mode,label:r,base:e}},"handler"),htmlBuilder:me((t,e)=>{var r=fo(t.base,e),n=Io.svgSpan(t,e),t="\\utilde"===t.label?.12:0,n=Z.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:t},{type:"elem",elem:r}]},e);return Z.makeSpan(["mord","accentunder"],[n],e)},"htmlBuilder"),mathmlBuilder:me((t,e)=>{var r=Io.mathMLnode(t.label);return(t=new E.MathNode("munder",[To(t.base,e),r])).setAttribute("accentunder","true"),t},"mathmlBuilder")}),Do=me(t=>((t=new E.MathNode("mpadded",t?[t]:[])).setAttribute("width","+0.6em"),t.setAttribute("lspace","0.3em"),t),"paddedNode"),l({type:"xArrow",names:["\\xleftarrow","\\xrightarrow","\\xLeftarrow","\\xRightarrow","\\xleftrightarrow","\\xLeftrightarrow","\\xhookleftarrow","\\xhookrightarrow","\\xmapsto","\\xrightharpoondown","\\xrightharpoonup","\\xleftharpoondown","\\xleftharpoonup","\\xrightleftharpoons","\\xleftrightharpoons","\\xlongequal","\\xtwoheadrightarrow","\\xtwoheadleftarrow","\\xtofrom","\\xrightleftarrows","\\xrightequilibrium","\\xleftequilibrium","\\\\cdrightarrow","\\\\cdleftarrow","\\\\cdlongequal"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){var{parser:t,funcName:n}=t;return{type:"xArrow",mode:t.mode,label:n,body:e[0],below:r[0]}},htmlBuilder(t,e){var r,n=e.style,i=e.havingStyle(n.sup()),a=Z.wrapFragment(fo(t.body,i,e),e),s="\\x"===t.label.slice(0,2)?"x":"cd",n=(a.classes.push(s+"-arrow-pad"),t.below&&(i=e.havingStyle(n.sub()),(r=Z.wrapFragment(fo(t.below,i,e),e)).classes.push(s+"-arrow-pad")),Io.svgSpan(t,e)),i=-e.fontMetrics().axisHeight+.5*n.height,s=-e.fontMetrics().axisHeight-.5*n.height-.111;return(.25"atom"!==(t="ordgroup"===t.type&&t.body.length?t.body[0]:t).type||"bin"!==t.family&&"rel"!==t.family?"mord":"m"+t.family,"binrelClass"),l({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(t,e){return{type:"mclass",mode:(t=t.parser).mode,mclass:Po(e[0]),body:ro(e[1]),isCharacterBox:va.isCharacterBox(e[1])}}}),l({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(t,e){var{parser:t,funcName:r}=t,n=e[1],e=e[0],i="\\stackrel"!==r?Po(n):"mrel",n={type:"op",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==r,body:ro(n)},n={type:"supsub",mode:e.mode,base:n,sup:"\\underset"===r?null:e,sub:"\\underset"===r?e:null};return{type:"mclass",mode:t.mode,mclass:i,body:[n],isCharacterBox:va.isCharacterBox(n)}},htmlBuilder:Ji,mathmlBuilder:ta}),l({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(t,e){return{type:"pmb",mode:(t=t.parser).mode,mclass:Po(e[0]),body:ro(e[0])}},htmlBuilder(t,e){var r=lo(t.body,e,!0);return(t=Z.makeSpan([t.mclass],r,e)).style.textShadow="0.02em 0.01em 0.04px",t},mathmlBuilder(t,e){return t=wo(t.body,e),(e=new E.MathNode("mstyle",t)).setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),e}}),Bo={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},Fo=me(()=>({type:"styling",body:[],mode:"math",style:"display"}),"newCell"),$o=me(t=>"textord"===t.type&&"@"===t.text,"isStartOfArrow"),zo=me((t,e)=>("mathord"===t.type||"atom"===t.type)&&t.text===e,"isLabelEnd"),me(ea,"cdArrow"),me(ra,"parseCD"),l({type:"cdlabel",names:["\\\\cdleft","\\\\cdright"],props:{numArgs:1},handler(t,e){var{parser:t,funcName:r}=t;return{type:"cdlabel",mode:t.mode,side:r.slice(4),label:e[0]}},htmlBuilder(t,e){var r=e.havingStyle(e.style.sup());return(r=Z.wrapFragment(fo(t.label,r,e),e)).classes.push("cd-label-"+t.side),r.style.bottom=K(.8-r.depth),r.height=0,r.depth=0,r},mathmlBuilder(t,e){return e=new E.MathNode("mrow",[To(t.label,e)]),(e=new E.MathNode("mpadded",[e])).setAttribute("width","0"),"left"===t.side&&e.setAttribute("lspace","-1width"),e.setAttribute("voffset","0.7em"),(e=new E.MathNode("mstyle",[e])).setAttribute("displaystyle","false"),e.setAttribute("scriptlevel","1"),e}}),l({type:"cdlabelparent",names:["\\\\cdparent"],props:{numArgs:1},handler(t,e){return{type:"cdlabelparent",mode:(t=t.parser).mode,fragment:e[0]}},htmlBuilder(t,e){return(t=Z.wrapFragment(fo(t.fragment,e),e)).classes.push("cd-vert-arrow"),t},mathmlBuilder(t,e){return new E.MathNode("mrow",[To(t.fragment,e)])}}),l({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(t,e){for(var t=t.parser,r=Ki(e[0],"ordgroup").body,n="",i=0;i>10),56320+(1023&e))),{type:"textord",mode:t.mode,text:e}}}),sc=me((t,e)=>(e=lo(t.body,e.withColor(t.color),!1),Z.makeFragment(e)),"htmlBuilder$8"),m=me((t,e)=>(e=wo(t.body,e.withColor(t.color)),(e=new E.MathNode("mstyle",e)).setAttribute("mathcolor",t.color),e),"mathmlBuilder$7"),l({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(t,e){var t=t.parser,r=Ki(e[0],"color-token").color;return{type:"color",mode:t.mode,color:r,body:ro(e[1])}},htmlBuilder:sc,mathmlBuilder:m}),l({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(t,e){var{parser:t,breakOnTokenText:r}=t,e=Ki(e[0],"color-token").color,r=(t.gullet.macros.set("\\current@color",e),t.parseExpression(!0,r));return{type:"color",mode:t.mode,color:e,body:r}},htmlBuilder:sc,mathmlBuilder:m}),l({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(t,e,r){var n="["===(t=t.parser).gullet.future().text?t.parseSizeGroup(!0):null,i=!t.settings.displayMode||!t.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:t.mode,newLine:i,size:n&&Ki(n,"size").value}},htmlBuilder(t,e){var r=Z.makeSpan(["mspace"],[],e);return t.newLine&&(r.classes.push("newline"),t.size)&&(r.style.marginTop=K(ts(t.size,e))),r},mathmlBuilder(t,e){var r=new E.MathNode("mspace");return t.newLine&&(r.setAttribute("linebreak","newline"),t.size)&&r.setAttribute("height",K(ts(t.size,e))),r}}),Go={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Uo=me(t=>{var e=t.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(e))throw new X("Expected a control sequence",t);return e},"checkControlSequence"),qo=me(t=>{var e=t.gullet.popToken();return"="===e.text&&" "===(e=t.gullet.popToken()).text?t.gullet.popToken():e},"getRHS"),jo=me((t,e,r,n)=>{var i=t.gullet.macros.get(r.text);null==i&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!t.gullet.isExpandable(r.text)}),t.gullet.macros.set(e,i,n)},"letCommand"),l({type:"internal",names:["\\global","\\long","\\\\globallong"],props:{numArgs:0,allowedInText:!0},handler(t){var{parser:t,funcName:e}=t,r=(t.consumeSpaces(),t.fetch());if(Go[r.text])return"\\global"!==e&&"\\\\globallong"!==e||(r.text=Go[r.text]),Ki(t.parseFunction(),"internal");throw new X("Invalid token after macro prefix",r)}}),l({type:"internal",names:["\\def","\\gdef","\\edef","\\xdef"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:e,funcName:t}=t,r=e.gullet.popToken(),n=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new X("Expected a control sequence",r);for(var i,a=0,s=[[]];"{"!==e.gullet.future().text;)if("#"===(r=e.gullet.popToken()).text){if("{"===e.gullet.future().text){i=e.gullet.future(),s[a].push("{");break}if(r=e.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=e.gullet.consumeArg().tokens;return i&&o.unshift(i),"\\edef"!==t&&"\\xdef"!==t||(o=e.gullet.expandTokens(o)).reverse(),e.gullet.macros.set(n,{tokens:o,numArgs:a,delimiters:s},t===Go[t]),{type:"internal",mode:e.mode}}}),l({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:t,funcName:e}=t,r=Uo(t.gullet.popToken()),n=(t.gullet.consumeSpaces(),qo(t));return jo(t,r,n,"\\\\globallet"===e),{type:"internal",mode:t.mode}}}),l({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t){var{parser:t,funcName:e}=t,r=Uo(t.gullet.popToken()),n=t.gullet.popToken(),i=t.gullet.popToken();return jo(t,r,i,"\\\\globalfuture"===e),t.gullet.pushToken(i),t.gullet.pushToken(n),{type:"internal",mode:t.mode}}}),Wo=me(function(t,e,r){if(r=Gi(fs.math[t]&&fs.math[t].replace||t,e,r))return r;throw new Error("Unsupported symbol "+t+" and font size "+e+".")},"getMetrics"),Yo=me(function(t,e,r,n){return e=r.havingBaseStyle(e),n=Z.makeSpan(n.concat(e.sizingClasses(r)),[t],r),t=e.sizeMultiplier/r.sizeMultiplier,n.height*=t,n.depth*=t,n.maxFontSize=e.sizeMultiplier,n},"styleWrap"),Ho=me(function(t,e,r){r=e.havingBaseStyle(r),r=(1-e.sizeMultiplier/r.sizeMultiplier)*e.fontMetrics().axisHeight,t.classes.push("delimcenter"),t.style.top=K(r),t.height-=r,t.depth+=r},"centerSpan"),Vo=me(function(t,e,r,n,i,a){return t=Z.makeSymbol(t,"Main-Regular",i,n),i=Yo(t,e,n,a),r&&Ho(i,n,e),i},"makeSmallDelim"),Xo=me(function(t,e,r,n){return Z.makeSymbol(t,"Size"+e+"-Regular",r,n)},"mathrmSize"),Ko=me(function(t,e,r,n,i,a){return t=Xo(t,e,i,n),i=Yo(Z.makeSpan(["delimsizing","size"+e],[t],n),Aa.TEXT,n,a),r&&Ho(i,n,Aa.TEXT),i},"makeLargeDelim"),Zo=me(function(t,e,r){return{type:"elem",elem:Z.makeSpan(["delimsizinginner","Size1-Regular"===e?"delim-size1":"delim-size4"],[Z.makeSpan([],[Z.makeSymbol(t,e,r)])])}},"makeGlyphSpan"),Qo=me(function(t,e,r){var n=(qa["Size4-Regular"][t.charCodeAt(0)]?qa["Size4-Regular"]:qa["Size1-Regular"])[t.charCodeAt(0)][4],t=new us("inner",$a(t,Math.round(1e3*e))),t=new hs([t],{width:K(n),height:K(e),style:"width:"+K(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*e),preserveAspectRatio:"xMinYMin"});return(t=Z.makeSvgSpan([],[t],r)).height=e,t.style.height=K(e),t.style.width=K(n),{type:"elem",elem:t}},"makeInner"),Jo={type:"kern",size:-.008},tl=["|","\\lvert","\\rvert","\\vert"],el=["\\|","\\lVert","\\rVert","\\Vert"],rl=me(function(t,e,r,n,i,a){var s,o,l,c="",h=0,u=s=o=t,d=null,p="Size1-Regular",t=("\\uparrow"===t?s=o="⏐":"\\Uparrow"===t?s=o="‖":"\\downarrow"===t?u=s="⏐":"\\Downarrow"===t?u=s="‖":"\\updownarrow"===t?(u="\\uparrow",s="⏐",o="\\downarrow"):"\\Updownarrow"===t?(u="\\Uparrow",s="‖",o="\\Downarrow"):va.contains(tl,t)?(s="∣",c="vert",h=333):va.contains(el,t)?(s="∥",c="doublevert",h=556):"["===t||"\\lbrack"===t?(u="⎡",s="⎢",o="⎣",p="Size4-Regular",c="lbrack",h=667):"]"===t||"\\rbrack"===t?(u="⎤",s="⎥",o="⎦",p="Size4-Regular",c="rbrack",h=667):"\\lfloor"===t||"⌊"===t?(s=u="⎢",o="⎣",p="Size4-Regular",c="lfloor",h=667):"\\lceil"===t||"⌈"===t?(u="⎡",s=o="⎢",p="Size4-Regular",c="lceil",h=667):"\\rfloor"===t||"⌋"===t?(s=u="⎥",o="⎦",p="Size4-Regular",c="rfloor",h=667):"\\rceil"===t||"⌉"===t?(u="⎤",s=o="⎥",p="Size4-Regular",c="rceil",h=667):"("===t||"\\lparen"===t?(u="⎛",s="⎜",o="⎝",p="Size4-Regular",c="lparen",h=875):")"===t||"\\rparen"===t?(u="⎞",s="⎟",o="⎠",p="Size4-Regular",c="rparen",h=875):"\\{"===t||"\\lbrace"===t?(u="⎧",d="⎨",o="⎩",s="⎪",p="Size4-Regular"):"\\}"===t||"\\rbrace"===t?(u="⎫",d="⎬",o="⎭",s="⎪",p="Size4-Regular"):"\\lgroup"===t||"⟮"===t?(u="⎧",o="⎩",s="⎪",p="Size4-Regular"):"\\rgroup"===t||"⟯"===t?(u="⎫",o="⎭",s="⎪",p="Size4-Regular"):"\\lmoustache"===t||"⎰"===t?(u="⎧",o="⎭",s="⎪",p="Size4-Regular"):"\\rmoustache"!==t&&"⎱"!==t||(u="⎫",o="⎩",s="⎪",p="Size4-Regular"),(t=Wo(u,p,i)).height+t.depth),g=(g=Wo(s,p,i)).height+g.depth,f=(f=Wo(o,p,i)).height+f.depth,m=0,y=1,e=(null!==d&&(m=(v=Wo(d,p,i)).height+v.depth,y=2),(v=t+f+m)+Math.max(0,Math.ceil((e-v)/(y*g)))*y*g),v=n.fontMetrics().axisHeight,y=(r&&(v*=n.sizeMultiplier),e/2-v),g=[],v=(0","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],ol=[0,1.2,1.8,2.4,3],mc=me(function(t,e,r,n,i){if("<"===t||"\\lt"===t||"⟨"===t?t="\\langle":">"!==t&&"\\gt"!==t&&"⟩"!==t||(t="\\rangle"),va.contains(il,t)||va.contains(sl,t))return Ko(t,e,!1,r,n,i);if(va.contains(al,t))return rl(t,ol[e],!1,r,n,i);throw new X("Illegal delimiter: '"+t+"'")},"makeSizedDelim"),ll=[{type:"small",style:Aa.SCRIPTSCRIPT},{type:"small",style:Aa.SCRIPT},{type:"small",style:Aa.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],cl=[{type:"small",style:Aa.SCRIPTSCRIPT},{type:"small",style:Aa.SCRIPT},{type:"small",style:Aa.TEXT},{type:"stack"}],hl=[{type:"small",style:Aa.SCRIPTSCRIPT},{type:"small",style:Aa.SCRIPT},{type:"small",style:Aa.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],ul=me(function(t){if("small"===t.type)return"Main-Regular";if("large"===t.type)return"Size"+t.size+"-Regular";if("stack"===t.type)return"Size4-Regular";throw new Error("Add support for delim type '"+t.type+"' here.")},"delimTypeToFont"),dl=me(function(t,e,r,n){for(var i=Math.min(2,3-n.style.size);i"!==t&&"\\gt"!==t&&"⟩"!==t||(t="\\rangle");var s=va.contains(sl,t)?ll:va.contains(il,t)?hl:cl;return"small"===(s=dl(t,e,s,n)).type?Vo(t,s.style,r,n,i,a):"large"===s.type?Ko(t,s.size,r,n,i,a):rl(t,e,r,n,i,a)},"makeCustomSizedDelim"),y=me(function(t,e,r,n,i,a){var s=n.fontMetrics().axisHeight*n.sizeMultiplier,o=5/n.fontMetrics().ptPerEm,e=Math.max(e-s,r+s),r=Math.max(e/500*901,2*e-o);return pl(t,r,!0,n,i,a)},"makeLeftRightDelim"),gl={sqrtImage:fc,sizedDelim:mc,sizeToMaxHeight:ol,customSizedDelim:pl,leftRightDelim:y},fl={"\\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}},ml=["(","\\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","."],me(na,"checkDelimiter"),l({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:me((t,e)=>(e=na(e[0],t),{type:"delimsizing",mode:t.parser.mode,size:fl[t.funcName].size,mclass:fl[t.funcName].mclass,delim:e.text}),"handler"),htmlBuilder:me((t,e)=>"."===t.delim?Z.makeSpan([t.mclass]):gl.sizedDelim(t.delim,t.size,e,t.mode,[t.mclass]),"htmlBuilder"),mathmlBuilder:me(t=>{var e=[],e=("."!==t.delim&&e.push(vo(t.delim,t.mode)),new E.MathNode("mo",e)),t=("mopen"===t.mclass||"mclose"===t.mclass?e.setAttribute("fence","true"):e.setAttribute("fence","false"),e.setAttribute("stretchy","true"),K(gl.sizeToMaxHeight[t.size]));return e.setAttribute("minsize",t),e.setAttribute("maxsize",t),e},"mathmlBuilder")}),me(ia,"assertParsed"),l({type:"leftright-right",names:["\\right"],props:{numArgs:1,primitive:!0},handler:me((t,e)=>{var r=t.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:t.parser.mode,delim:na(e[0],t).text,color:r}},"handler")}),l({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:me((t,e)=>{var e=na(e[0],t),r=(++(t=t.parser).leftrightDepth,t.parseExpression(!1)),n=(--t.leftrightDepth,t.expect("\\right",!1),Ki(t.parseFunction(),"leftright-right"));return{type:"leftright",mode:t.mode,body:r,left:e.text,right:n.delim,rightColor:n.color}},"handler"),htmlBuilder:me((t,e)=>{ia(t);for(var r,n=lo(t.body,e,!0,["mopen","mclose"]),i=0,a=0,s=!1,o=0;o{ia(t);var r,e=wo(t.body,e);return"."!==t.left&&((r=new E.MathNode("mo",[vo(t.left,t.mode)])).setAttribute("fence","true"),e.unshift(r)),"."!==t.right&&((r=new E.MathNode("mo",[vo(t.right,t.mode)])).setAttribute("fence","true"),t.rightColor&&r.setAttribute("mathcolor",t.rightColor),e.push(r)),xo(e)},"mathmlBuilder")}),l({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:me((t,e)=>{if(e=na(e[0],t),t.parser.leftrightDepth)return{type:"middle",mode:t.parser.mode,delim:e.text};throw new X("\\middle without preceding \\left",e)},"handler"),htmlBuilder:me((t,e)=>{var r;return"."===t.delim?r=go(e,[]):(r=gl.sizedDelim(t.delim,1,e,t.mode,[]),t={delim:t.delim,options:e},r.isMiddle=t),r},"htmlBuilder"),mathmlBuilder:me((t,e)=>(t="\\vert"===t.delim||"|"===t.delim?vo("|","text"):vo(t.delim,t.mode),(t=new E.MathNode("mo",[t])).setAttribute("fence","true"),t.setAttribute("lspace","0.05em"),t.setAttribute("rspace","0.05em"),t),"mathmlBuilder")}),Rl=me((t,e)=>{var r,n,i,a,s,o=Z.wrapFragment(fo(t.body,e),e),l=t.label.slice(1),c=e.sizeMultiplier,h=0,u=va.isCharacterBox(t.body);return"sout"===l?((r=Z.makeSpan(["stretchy","sout"])).height=e.fontMetrics().defaultRuleThickness/c,h=-.5*e.fontMetrics().xHeight):"phase"===l?(a=ts({number:.6,unit:"pt"},e),s=ts({number:.35,unit:"ex"},e),c/=e.havingBaseSizing().sizeMultiplier,n=o.height+o.depth+a+s,o.style.paddingLeft=K(n/2+a),c=Math.floor(1e3*n*c),i=Pa(c),i=new hs([new us("phase",i)],{width:"400em",height:K(c/1e3),viewBox:"0 0 400000 "+c,preserveAspectRatio:"xMinYMin slice"}),(r=Z.makeSvgSpan(["hide-tail"],[i],e)).style.height=K(n),h=o.depth+a+s):(/cancel/.test(l)?u||o.classes.push("cancel-pad"):"angl"===l?o.classes.push("anglpad"):o.classes.push("boxpad"),n=i=c=0,i=/box/.test(l)?(n=Math.max(e.fontMetrics().fboxrule,e.minRuleThickness),c=e.fontMetrics().fboxsep+("colorbox"===l?0:n)):"angl"===l?(c=4*(n=Math.max(e.fontMetrics().defaultRuleThickness,e.minRuleThickness)),Math.max(0,.25-o.depth)):c=u?.2:0,r=Io.encloseSpan(o,l,c,i,e),/fbox|boxed|fcolorbox/.test(l)?(r.style.borderStyle="solid",r.style.borderWidth=K(n)):"angl"===l&&.049!==n&&(r.style.borderTopWidth=K(n),r.style.borderRightWidth=K(n)),h=o.depth+i,t.backgroundColor&&(r.style.backgroundColor=t.backgroundColor,t.borderColor)&&(r.style.borderColor=t.borderColor)),s=t.backgroundColor?Z.makeVList({positionType:"individualShift",children:[{type:"elem",elem:r,shift:h},{type:"elem",elem:o,shift:0}]},e):(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}]},e)),/cancel/.test(l)&&(s.height=o.height,s.depth=o.depth),/cancel/.test(l)&&!u?Z.makeSpan(["mord","cancel-lap"],[s],e):Z.makeSpan(["mord"],[s],e)},"htmlBuilder$7"),Pl=me((t,e)=>{var r=new E.MathNode(-1{if(!t.parser.settings.displayMode)throw new X("{"+t.envName+"} can be used only in display mode.")},"validateAmsEnvironmentContext"),me(oa,"getAutoTag"),me(la,"parseArray"),me(ca,"dCellStyle"),f=me(function(t,e){var r=t.body.length,P=t.hLinesBeforeRow,n=0,i=new Array(r),a=[],s=Math.max(e.fontMetrics().arrayRuleWidth,e.minRuleThickness),o=1/e.fontMetrics().ptPerEm,l=5*o,c=(t.colSeparationType&&"small"===t.colSeparationType&&(l=e.havingStyle(Aa.SCRIPT).sizeMultiplier/e.sizeMultiplier*.2778),"CD"===t.colSeparationType?ts({number:3,unit:"ex"},e):12*o),B=3*o,F=.7*(o=t.arraystretch*c),$=.3*o,h=0;function u(t){for(var e=0;et))for(M=0;Mt.length)),i.cols=new Array(n).fill({type:"align",align:r}),e?{type:"leftright",mode:t.mode,body:[i],left:e[0],right:e[1],rightColor:void 0}:i},htmlBuilder:f,mathmlBuilder:ac}),aa({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(t){return(t=la(t.parser,{arraystretch:.5},"script")).colSeparationType="small",t},htmlBuilder:f,mathmlBuilder:ac}),aa({type:"array",names:["subarray"],props:{numArgs:1},handler(t,e){if(1<(e=(Qi(e[0])?[e[0]]:Ki(e[0],"ordgroup").body).map(function(t){var e=Zi(t).text;if(-1!=="lc".indexOf(e))return{type:"align",align:e};throw new X("Unknown column alignment: "+e,t)})).length)throw new X("{subarray} can contain only one column");if(0<(t=la(t.parser,{cols:e,hskipBeforeAndAfter:!1,arraystretch:.5},"script")).body.length&&1{var r=t.font,e=e.withFont(r);return fo(t.body,e)},"htmlBuilder$5"),m=me((t,e)=>{var r=t.font,e=e.withFont(r);return To(t.body,e)},"mathmlBuilder$4"),kl={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"},l({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\mathbb","\\mathcal","\\mathfrak","\\mathscr","\\mathsf","\\mathtt","\\Bbb","\\bold","\\frak"],props:{numArgs:1,allowedInArgument:!0},handler:me((t,e)=>{var{parser:t,funcName:r}=t,e=eo(e[0]);return{type:"font",mode:t.mode,font:(r=r in kl?kl[r]:r).slice(1),body:e}},"handler"),htmlBuilder:sc,mathmlBuilder:m}),l({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:me((t,e)=>{var t=t.parser,e=e[0],r=va.isCharacterBox(e);return{type:"mclass",mode:t.mode,mclass:Po(e),body:[{type:"font",mode:t.mode,font:"boldsymbol",body:e}],isCharacterBox:r}},"handler")}),l({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:me((t,e)=>{var{parser:t,funcName:r,breakOnTokenText:n}=t,i=t.mode,n=t.parseExpression(!0,n);return{type:"font",mode:i,font:"math"+r.slice(1),body:{type:"ordgroup",mode:t.mode,body:n}}},"handler"),htmlBuilder:sc,mathmlBuilder:m}),Tl=me((t,e)=>("display"===t?e=e.id>=Aa.SCRIPT.id?e.text():Aa.DISPLAY:"text"===t&&e.size===Aa.DISPLAY.size?e=Aa.TEXT:"script"===t?e=Aa.SCRIPT:"scriptscript"===t&&(e=Aa.SCRIPTSCRIPT),e),"adjustStyle"),fc=me((t,e)=>{var r,n,i,a,s=Tl(t.size,e.style),o=s.fracNum(),l=s.fracDen(),o=e.havingStyle(o),c=fo(t.numer,o,e),h=(t.continued&&(h=8.5/e.fontMetrics().ptPerEm,u=3.5/e.fontMetrics().ptPerEm,c.height=c.height{var r=new E.MathNode("mfrac",[To(t.numer,e),To(t.denom,e)]),n=(t.hasBarLine?t.barSize&&(n=ts(t.barSize,e),r.setAttribute("linethickness",K(n))):r.setAttribute("linethickness","0px"),Tl(t.size,e.style));return n.size!==e.style.size&&(r=new E.MathNode("mstyle",[r]),e=n.size===Aa.DISPLAY.size?"true":"false",r.setAttribute("displaystyle",e),r.setAttribute("scriptlevel","0")),null!=t.leftDelim||null!=t.rightDelim?(n=[],null!=t.leftDelim&&((e=new E.MathNode("mo",[new E.TextNode(t.leftDelim.replace("\\",""))])).setAttribute("fence","true"),n.push(e)),n.push(r),null!=t.rightDelim&&((e=new E.MathNode("mo",[new E.TextNode(t.rightDelim.replace("\\",""))])).setAttribute("fence","true"),n.push(e)),xo(n)):r},"mathmlBuilder$3"),l({type:"genfrac",names:["\\dfrac","\\frac","\\tfrac","\\dbinom","\\binom","\\tbinom","\\\\atopfrac","\\\\bracefrac","\\\\brackfrac"],props:{numArgs:2,allowedInArgument:!0},handler:me((t,e)=>{var r,{parser:t,funcName:n}=t,i=e[0],e=e[1],a=null,s=null,o="auto";switch(n){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(n){case"\\dfrac":case"\\dbinom":o="display";break;case"\\tfrac":case"\\tbinom":o="text"}return{type:"genfrac",mode:t.mode,continued:!1,numer:i,denom:e,hasBarLine:r,leftDelim:a,rightDelim:s,size:o,barSize:null}},"handler"),htmlBuilder:fc,mathmlBuilder:mc}),l({type:"genfrac",names:["\\cfrac"],props:{numArgs:2},handler:me((t,e)=>{var t=t.parser,r=e[0];return{type:"genfrac",mode:t.mode,continued:!0,numer:r,denom:e[1],hasBarLine:!0,leftDelim:null,rightDelim:null,size:"display",barSize:null}},"handler")}),l({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(t){var e,{parser:t,funcName:r,token:n}=t;switch(r){case"\\over":e="\\frac";break;case"\\choose":e="\\binom";break;case"\\atop":e="\\\\atopfrac";break;case"\\brace":e="\\\\bracefrac";break;case"\\brack":e="\\\\brackfrac";break;default:throw new Error("Unrecognized infix genfrac command")}return{type:"infix",mode:t.mode,replaceWith:e,token:n}}}),El=["display","text","script","scriptscript"],Cl=me(function(t){var e=null;return 0{var t=t.parser,r=e[0],n=ya(Ki(e[1],"infix").size),e=e[2],i=0{var r,n,i=e.style,i="supsub"===t.type?(r=t.sup?fo(t.sup,e.havingStyle(i.sup()),e):fo(t.sub,e.havingStyle(i.sub()),e),Ki(t.base,"horizBrace")):Ki(t,"horizBrace"),t=fo(i.base,e.havingBaseStyle(Aa.DISPLAY)),a=Io.svgSpan(i,e);return(i.isOver?(n=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:.1},{type:"elem",elem:a}]},e)).children[0].children[0].children[1]:(n=Z.makeVList({positionType:"bottom",positionData:t.depth+.1+a.height,children:[{type:"elem",elem:a},{type:"kern",size:.1},{type:"elem",elem:t}]},e)).children[0].children[0].children[0]).classes.push("svg-align"),r&&(a=Z.makeSpan(["mord",i.isOver?"mover":"munder"],[n],e),n=i.isOver?Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:a},{type:"kern",size:.2},{type:"elem",elem:r}]},e):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}]},e)),Z.makeSpan(["mord",i.isOver?"mover":"munder"],[n],e)},"htmlBuilder$3"),y=me((t,e)=>{var r=Io.mathMLnode(t.label);return new E.MathNode(t.isOver?"mover":"munder",[To(t.base,e),r])},"mathmlBuilder$2"),l({type:"horizBrace",names:["\\overbrace","\\underbrace"],props:{numArgs:1},handler(t,e){var{parser:t,funcName:r}=t;return{type:"horizBrace",mode:t.mode,label:r,isOver:/^\\over/.test(r),base:e[0]}},htmlBuilder:_l,mathmlBuilder:y}),l({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:me((t,e)=>{var t=t.parser,r=e[1],e=Ki(e[0],"url").url;return t.settings.isTrusted({command:"\\href",url:e})?{type:"href",mode:t.mode,href:e,body:ro(r)}:t.formatUnsupportedCmd("\\href")},"handler"),htmlBuilder:me((t,e)=>{var r=lo(t.body,e,!1);return Z.makeAnchor(t.href,[],r,e)},"htmlBuilder"),mathmlBuilder:me((t,e)=>((e=(e=ko(t.body,e))instanceof mo?e:new mo("mrow",[e])).setAttribute("href",t.href),e),"mathmlBuilder")}),l({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:me((t,e)=>{var t=t.parser,r=Ki(e[0],"url").url;if(!t.settings.isTrusted({command:"\\url",url:r}))return t.formatUnsupportedCmd("\\url");for(var n=[],i=0;i{var{parser:t,funcName:r}=t,n=Ki(e[0],"raw").string,e=e[1];t.settings.strict&&t.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var i,a={};switch(r){case"\\htmlClass":i={command:"\\htmlClass",class:a.class=n};break;case"\\htmlId":i={command:"\\htmlId",id:a.id=n};break;case"\\htmlStyle":i={command:"\\htmlStyle",style:a.style=n};break;case"\\htmlData":for(var s=n.split(","),o=0;o{var r,n=lo(t.body,e,!1),i=["enclosing"],a=(t.attributes.class&&i.push(...t.attributes.class.trim().split(/\s+/)),Z.makeSpan(i,n,e));for(r in t.attributes)"class"!==r&&t.attributes.hasOwnProperty(r)&&a.setAttribute(r,t.attributes[r]);return a},"htmlBuilder"),mathmlBuilder:me((t,e)=>ko(t.body,e),"mathmlBuilder")}),l({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:me((t,e)=>({type:"htmlmathml",mode:(t=t.parser).mode,html:ro(e[0]),mathml:ro(e[1])}),"handler"),htmlBuilder:me((t,e)=>(t=lo(t.html,e,!1),Z.makeFragment(t)),"htmlBuilder"),mathmlBuilder:me((t,e)=>ko(t.mathml,e),"mathmlBuilder")}),Sl=me(function(t){if(/^[-+]? *(\d+(\.\d*)?|\.\d+)$/.test(t))return{number:+t,unit:"bp"};var e=/([-+]?) *(\d+(?:\.\d*)?|\.\d+) *([a-z]{2})/.exec(t);if(!e)throw new X("Invalid size: '"+t+"' in \\includegraphics");if(t={number:+(e[1]+e[2]),unit:e[3]},Ja(t))return t;throw new X("Invalid unit: '"+t.unit+"' in \\includegraphics.")},"sizeData"),l({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:me((t,e,r)=>{var t=t.parser,n={number:0,unit:"em"},i={number:.9,unit:"em"},a={number:0,unit:"em"},s="";if(r[0])for(var o=Ki(r[0],"raw").string.split(","),l=0;l{var r=ts(t.height,e),n=0,i=(0{var r=new E.MathNode("mglyph",[]),n=(r.setAttribute("alt",t.alt),ts(t.height,e)),i=0;return 0{var{parser:t,funcName:r}=t,e=e[0];return{type:"lap",mode:t.mode,alignment:r.slice(5),body:e}},"handler"),htmlBuilder:me((t,e)=>{var r="clap"===t.alignment?(r=Z.makeSpan([],[fo(t.body,e)]),Z.makeSpan(["inner"],[r],e)):Z.makeSpan(["inner"],[fo(t.body,e)]),n=Z.makeSpan(["fix"],[]),t=Z.makeSpan([t.alignment],[r,n],e);return(r=Z.makeSpan(["strut"])).style.height=K(t.height+t.depth),t.depth&&(r.style.verticalAlign=K(-t.depth)),t.children.unshift(r),t=Z.makeSpan(["thinbox"],[t],e),Z.makeSpan(["mord","vbox"],[t],e)},"htmlBuilder"),mathmlBuilder:me((t,e)=>(e=new E.MathNode("mpadded",[To(t.body,e)]),"rlap"!==t.alignment&&(t="llap"===t.alignment?"-1":"-0.5",e.setAttribute("lspace",t+"width")),e.setAttribute("width","0px"),e),"mathmlBuilder")}),l({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){var{funcName:t,parser:r}=t,n=r.mode,t=(r.switchMode("math"),"\\("===t?"\\)":"$"),i=r.parseExpression(!1,t);return r.expect(t),r.switchMode(n),{type:"styling",mode:r.mode,style:"text",body:i}}}),l({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(t,e){throw new X("Mismatched "+t.funcName)}}),Al=me((t,e)=>{switch(e.style.size){case Aa.DISPLAY.size:return t.display;case Aa.TEXT.size:return t.text;case Aa.SCRIPT.size:return t.script;case Aa.SCRIPTSCRIPT.size:return t.scriptscript;default:return t.text}},"chooseMathStyle"),l({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:me((t,e)=>({type:"mathchoice",mode:(t=t.parser).mode,display:ro(e[0]),text:ro(e[1]),script:ro(e[2]),scriptscript:ro(e[3])}),"handler"),htmlBuilder:me((t,e)=>(t=Al(t,e),t=lo(t,e,!1),Z.makeFragment(t)),"htmlBuilder"),mathmlBuilder:me((t,e)=>(t=Al(t,e),ko(t,e)),"mathmlBuilder")}),Ll=me((t,e,r,n,i,a,s)=>{t=Z.makeSpan([],[t]);var o,l,c=r&&va.isCharacterBox(r);if(e&&(o={elem:e=fo(e,n.havingStyle(i.sup()),n),kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-e.depth)}),r&&(l={elem:e=fo(r,n.havingStyle(i.sub()),n),kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-e.height)}),o&&l)var r=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+t.depth+s,h=Z.makeVList({positionType:"bottom",positionData:r,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:K(-a)},{type:"kern",size:l.kern},{type:"elem",elem:t},{type:"kern",size:o.kern},{type:"elem",elem:o.elem,marginLeft:K(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n);else if(l)i=t.height-s,h=Z.makeVList({positionType:"top",positionData:i,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:K(-a)},{type:"kern",size:l.kern},{type:"elem",elem:t}]},n);else{if(!o)return t;e=t.depth+s,h=Z.makeVList({positionType:"bottom",positionData:e,children:[{type:"elem",elem:t},{type:"kern",size:o.kern},{type:"elem",elem:o.elem,marginLeft:K(a)},{type:"kern",size:n.fontMetrics().bigOpSpacing5}]},n)}return r=[h],l&&0!==a&&!c&&((i=Z.makeSpan(["mspace"],[],n)).style.marginRight=K(a),r.unshift(i)),Z.makeSpan(["mop","op-limits"],r,n)},"assembleSupSub"),Nl=["\\smallint"],Il=me((t,e)=>{var r,n,i,a=!1,s=("supsub"===t.type?(r=t.sup,n=t.sub,i=Ki(t.base,"op"),a=!0):i=Ki(t,"op"),!1);if((t=e.style).size===Aa.DISPLAY.size&&i.symbol&&!va.contains(Nl,i.name)&&(s=!0),i.symbol){var o,l=s?"Size2-Regular":"Size1-Regular",c="";"\\oiint"!==i.name&&"\\oiiint"!==i.name||(c=i.name.slice(1),i.name="oiint"===c?"\\iint":"\\iiint"),l=Z.makeSymbol(i.name,l,"math",e,["mop","op-symbol",s?"large-op":"small-op"]),0{var r;return t.symbol?(r=new mo("mo",[vo(t.name,t.mode)]),va.contains(Nl,t.name)&&r.setAttribute("largeop","false")):r=t.body?new mo("mo",wo(t.body,e)):(r=new mo("mi",[new yo(t.name.slice(1))]),e=new mo("mo",[vo("⁡","text")]),t.parentIsSupSub?new mo("mrow",[r,e]):Vi([r,e])),r},"mathmlBuilder$1"),Ml={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"},l({type:"op",names:["\\coprod","\\bigvee","\\bigwedge","\\biguplus","\\bigcap","\\bigcup","\\intop","\\prod","\\sum","\\bigotimes","\\bigoplus","\\bigodot","\\bigsqcup","\\smallint","∏","∐","∑","⋀","⋁","⋂","⋃","⨀","⨁","⨂","⨄","⨆"],props:{numArgs:0},handler:me((t,e)=>{var{parser:t,funcName:r}=t;return 1===r.length&&(r=Ml[r]),{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},"handler"),htmlBuilder:Il,mathmlBuilder:Rl}),l({type:"op",names:["\\mathop"],props:{numArgs:1,primitive:!0},handler:me((t,e)=>(t=t.parser,e=e[0],{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,body:ro(e)}),"handler"),htmlBuilder:Il,mathmlBuilder:Rl}),Dl={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"},l({type:"op",names:["\\arcsin","\\arccos","\\arctan","\\arctg","\\arcctg","\\arg","\\ch","\\cos","\\cosec","\\cosh","\\cot","\\cotg","\\coth","\\csc","\\ctg","\\cth","\\deg","\\dim","\\exp","\\hom","\\ker","\\lg","\\ln","\\log","\\sec","\\sin","\\sinh","\\sh","\\tan","\\tanh","\\tg","\\th"],props:{numArgs:0},handler(t){var{parser:t,funcName:e}=t;return{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!1,name:e}},htmlBuilder:Il,mathmlBuilder:Rl}),l({type:"op",names:["\\det","\\gcd","\\inf","\\lim","\\max","\\min","\\Pr","\\sup"],props:{numArgs:0},handler(t){var{parser:t,funcName:e}=t;return{type:"op",mode:t.mode,limits:!0,parentIsSupSub:!1,symbol:!1,name:e}},htmlBuilder:Il,mathmlBuilder:Rl}),l({type:"op",names:["\\int","\\iint","\\iiint","\\oint","\\oiint","\\oiiint","∫","∬","∭","∮","∯","∰"],props:{numArgs:0},handler(t){var{parser:t,funcName:e}=t;return 1===e.length&&(e=Dl[e]),{type:"op",mode:t.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:e}},htmlBuilder:Il,mathmlBuilder:Rl}),Ol=me((t,e)=>{var r,n,i,a,s=!1;if("supsub"===t.type?(r=t.sup,n=t.sub,i=Ki(t.base,"operatorname"),s=!0):i=Ki(t,"operatorname"),0{var e=t.text;return"string"==typeof e?{type:"textord",mode:t.mode,text:e}:t}),o=lo(t,e.withFont("mathrm"),!0),l=0;l{for(var r=wo(t.body,e.withFont("mathrm")),n=!0,i=0;it.toText()).join(""),r=[new E.TextNode(e)]),(e=new E.MathNode("mi",r)).setAttribute("mathvariant","normal");var o=new E.MathNode("mo",[vo("⁡","text")]);return t.parentIsSupSub?new E.MathNode("mrow",[e,o]):E.newDocumentFragment([e,o])},"mathmlBuilder"),l({type:"operatorname",names:["\\operatorname@","\\operatornamewithlimits"],props:{numArgs:1},handler:me((t,e)=>{var{parser:t,funcName:r}=t,e=e[0];return{type:"operatorname",mode:t.mode,body:ro(e),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},"handler"),htmlBuilder:Ol,mathmlBuilder:Pl}),h("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),Wi({type:"ordgroup",htmlBuilder(t,e){return t.semisimple?Z.makeFragment(lo(t.body,e,!1)):Z.makeSpan(["mord"],lo(t.body,e,!0),e)},mathmlBuilder(t,e){return ko(t.body,e,!0)}}),l({type:"overline",names:["\\overline"],props:{numArgs:1},handler(t,e){return t=t.parser,e=e[0],{type:"overline",mode:t.mode,body:e}},htmlBuilder(t,e){var t=fo(t.body,e.havingCrampedStyle()),r=Z.makeLineSpan("overline-line",e),n=e.fontMetrics().defaultRuleThickness,t=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:t},{type:"kern",size:3*n},{type:"elem",elem:r},{type:"kern",size:n}]},e);return Z.makeSpan(["mord","overline"],[t],e)},mathmlBuilder(t,e){var r=new E.MathNode("mo",[new E.TextNode("‾")]);return r.setAttribute("stretchy","true"),(t=new E.MathNode("mover",[To(t.body,e),r])).setAttribute("accent","true"),t}}),l({type:"phantom",names:["\\phantom"],props:{numArgs:1,allowedInText:!0},handler:me((t,e)=>(t=t.parser,e=e[0],{type:"phantom",mode:t.mode,body:ro(e)}),"handler"),htmlBuilder:me((t,e)=>(t=lo(t.body,e.withPhantom(),!1),Z.makeFragment(t)),"htmlBuilder"),mathmlBuilder:me((t,e)=>(t=wo(t.body,e),new E.MathNode("mphantom",t)),"mathmlBuilder")}),l({type:"hphantom",names:["\\hphantom"],props:{numArgs:1,allowedInText:!0},handler:me((t,e)=>(t=t.parser,e=e[0],{type:"hphantom",mode:t.mode,body:e}),"handler"),htmlBuilder:me((t,e)=>{var r=Z.makeSpan([],[fo(t.body,e.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n(t=wo(ro(t.body),e),e=new E.MathNode("mphantom",t),(t=new E.MathNode("mpadded",[e])).setAttribute("height","0px"),t.setAttribute("depth","0px"),t),"mathmlBuilder")}),l({type:"vphantom",names:["\\vphantom"],props:{numArgs:1,allowedInText:!0},handler:me((t,e)=>(t=t.parser,e=e[0],{type:"vphantom",mode:t.mode,body:e}),"handler"),htmlBuilder:me((t,e)=>{var t=Z.makeSpan(["inner"],[fo(t.body,e.withPhantom())]),r=Z.makeSpan(["fix"],[]);return Z.makeSpan(["mord","rlap"],[t,r],e)},"htmlBuilder"),mathmlBuilder:me((t,e)=>(t=wo(ro(t.body),e),e=new E.MathNode("mphantom",t),(t=new E.MathNode("mpadded",[e])).setAttribute("width","0px"),t),"mathmlBuilder")}),l({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(t,e){var t=t.parser,r=Ki(e[0],"size").value;return{type:"raisebox",mode:t.mode,dy:r,body:e[1]}},htmlBuilder(t,e){var r=fo(t.body,e),t=ts(t.dy,e);return Z.makeVList({positionType:"shift",positionData:-t,children:[{type:"elem",elem:r}]},e)},mathmlBuilder(t,e){return e=new E.MathNode("mpadded",[To(t.body,e)]),t=t.dy.number+t.dy.unit,e.setAttribute("voffset",t),e}}),l({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(t){return{type:"internal",mode:(t=t.parser).mode}}}),l({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(t,e,r){var t=t.parser,r=r[0],n=Ki(e[0],"size"),e=Ki(e[1],"size");return{type:"rule",mode:t.mode,shift:r&&Ki(r,"size").value,width:n.value,height:e.value}},htmlBuilder(t,e){var r=Z.makeSpan(["mord","rule"],[],e),n=ts(t.width,e),i=ts(t.height,e),t=t.shift?ts(t.shift,e):0;return r.style.borderRightWidth=K(n),r.style.borderTopWidth=K(i),r.style.bottom=K(t),r.width=n,r.height=i+t,r.depth=-t,r.maxFontSize=1.125*i*e.sizeMultiplier,r},mathmlBuilder(t,e){var r=ts(t.width,e),n=ts(t.height,e),t=t.shift?ts(t.shift,e):0,e=e.color&&e.getColor()||"black",i=new E.MathNode("mspace"),e=(i.setAttribute("mathbackground",e),i.setAttribute("width",K(r)),i.setAttribute("height",K(n)),new E.MathNode("mpadded",[i]));return 0<=t?e.setAttribute("height",K(t)):(e.setAttribute("height",K(t)),e.setAttribute("depth",K(-t))),e.setAttribute("voffset",K(t)),e}}),me(ha,"sizingGroup"),Bl=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],Fl=me((t,e)=>{var r=e.havingSize(t.size);return ha(t.body,r,e)},"htmlBuilder"),l({type:"sizing",names:Bl,props:{numArgs:0,allowedInText:!0},handler:me((t,e)=>{var{breakOnTokenText:t,funcName:r,parser:n}=t,t=n.parseExpression(!1,t);return{type:"sizing",mode:n.mode,size:Bl.indexOf(r)+1,body:t}},"handler"),htmlBuilder:Fl,mathmlBuilder:me((t,e)=>(e=e.havingSize(t.size),t=wo(t.body,e),(t=new E.MathNode("mstyle",t)).setAttribute("mathsize",K(e.sizeMultiplier)),t),"mathmlBuilder")}),l({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:me((t,e,r)=>{var t=t.parser,n=!1,i=!1,a=r[0]&&Ki(r[0],"ordgroup");if(a)for(var s,o=0;o{var r=Z.makeSpan([],[fo(t.body,e)]);if(!t.smashHeight&&!t.smashDepth)return r;if(t.smashHeight&&(r.height=0,r.children))for(var n=0;n(e=new E.MathNode("mpadded",[To(t.body,e)]),t.smashHeight&&e.setAttribute("height","0px"),t.smashDepth&&e.setAttribute("depth","0px"),e),"mathmlBuilder")}),l({type:"sqrt",names:["\\sqrt"],props:{numArgs:1,numOptionalArgs:1},handler(t,e,r){return t=t.parser,r=r[0],e=e[0],{type:"sqrt",mode:t.mode,body:e,index:r}},htmlBuilder(t,e){0===(r=fo(t.body,e.havingCrampedStyle())).height&&(r.height=e.fontMetrics().xHeight);var r=Z.wrapFragment(r,e),n=i=e.fontMetrics().defaultRuleThickness,n=i+(e.style.idr.height+r.depth+n&&(n=(n+o-r.height-r.depth)/2),i.height-r.height-n-a),n=(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:i},{type:"kern",size:a}]},e));return t.index?(s=e.havingStyle(Aa.SCRIPTSCRIPT),r=fo(t.index,s,e),o=.6*(n.height-n.depth),i=Z.makeVList({positionType:"shift",positionData:-o,children:[{type:"elem",elem:r}]},e),a=Z.makeSpan(["root"],[i]),Z.makeSpan(["mord","sqrt"],[a,n],e)):Z.makeSpan(["mord","sqrt"],[n],e)},mathmlBuilder(t,e){var{body:t,index:r}=t;return r?new E.MathNode("mroot",[To(t,e),To(r,e)]):new E.MathNode("msqrt",[To(t,e)])}}),$l={display:Aa.DISPLAY,text:Aa.TEXT,script:Aa.SCRIPT,scriptscript:Aa.SCRIPTSCRIPT},l({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(t,e){var{breakOnTokenText:t,funcName:r,parser:n}=t,t=n.parseExpression(!0,t),r=r.slice(1,r.length-5);return{type:"styling",mode:n.mode,style:r,body:t}},htmlBuilder(t,e){var r=$l[t.style],r=e.havingStyle(r).withFont("");return ha(t.body,r,e)},mathmlBuilder(t,e){var r=$l[t.style],e=e.havingStyle(r),r=wo(t.body,e),e=new E.MathNode("mstyle",r),r={display:["0","true"],text:["0","false"],script:["1","false"],scriptscript:["2","false"]}[t.style];return e.setAttribute("scriptlevel",r[0]),e.setAttribute("displaystyle",r[1]),e}}),zl=me(function(t,e){var r=t.base;return r?"op"===r.type?r.limits&&(e.style.size===Aa.DISPLAY.size||r.alwaysHandleSupSub)?Il:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(e.style.size===Aa.DISPLAY.size||r.limits)?Ol:null:"accent"===r.type?va.isCharacterBox(r.base)?Ro:null:"horizBrace"===r.type&&!t.sub===r.isOver?_l:null:null},"htmlBuilderDelegate"),Wi({type:"supsub",htmlBuilder(t,e){if(a=zl(t,e))return a(t,e);var r,n,i,{base:a,sup:s,sub:o}=t,l=fo(a,e),c=e.fontMetrics(),h=0,u=0,a=a&&va.isCharacterBox(a),o=(s&&(i=e.havingStyle(e.style.sup()),r=fo(s,i,e),a||(h=l.height-i.fontMetrics().supDrop*i.sizeMultiplier/e.sizeMultiplier)),o&&(s=e.havingStyle(e.style.sub()),n=fo(o,s,e),a||(u=l.depth+s.fontMetrics().subDrop*s.sizeMultiplier/e.sizeMultiplier)),i=e.style===Aa.DISPLAY?c.sup1:e.style.cramped?c.sup3:c.sup2,e.sizeMultiplier),a=K(.5/c.ptPerEm/o),s=null;if(n&&(o=t.base&&"op"===t.base.type&&t.base.name&&("\\oiint"===t.base.name||"\\oiiint"===t.base.name),l instanceof cs||o)&&(s=K(-l.italic)),r&&n){h=Math.max(h,i,r.depth+.25*c.xHeight),u=Math.max(u,c.sub2),t=4*c.defaultRuleThickness,h-r.depth-(n.height-u){var t=new E.MathNode("mtd",[]);return t.setAttribute("width","50%"),t},"pad"),Wi({type:"tag",mathmlBuilder(t,e){return(t=new E.MathNode("mtable",[new E.MathNode("mtr",[jl(),new E.MathNode("mtd",[ko(t.body,e)]),jl(),new E.MathNode("mtd",[ko(t.tag,e)])])])).setAttribute("width","100%"),t}}),Wl={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Yl={"\\textbf":"textbf","\\textmd":"textmd"},Hl={"\\textit":"textit","\\textup":"textup"},Vl=me((t,e)=>(t=t.font)?Wl[t]?e.withTextFontFamily(Wl[t]):Yl[t]?e.withTextFontWeight(Yl[t]):"\\emph"===t?"textit"===e.fontShape?e.withTextFontShape("textup"):e.withTextFontShape("textit"):e.withTextFontShape(Hl[t]):e,"optionsWithFont"),l({type:"text",names:["\\text","\\textrm","\\textsf","\\texttt","\\textnormal","\\textbf","\\textmd","\\textit","\\textup","\\emph"],props:{numArgs:1,argTypes:["text"],allowedInArgument:!0,allowedInText:!0},handler(t,e){var{parser:t,funcName:r}=t,e=e[0];return{type:"text",mode:t.mode,body:ro(e),font:r}},htmlBuilder(t,e){return e=Vl(t,e),t=lo(t.body,e,!0),Z.makeSpan(["mord","text"],t,e)},mathmlBuilder(t,e){return e=Vl(t,e),ko(t.body,e)}}),l({type:"underline",names:["\\underline"],props:{numArgs:1,allowedInText:!0},handler(t,e){return{type:"underline",mode:(t=t.parser).mode,body:e[0]}},htmlBuilder(t,e){var t=fo(t.body,e),r=Z.makeLineSpan("underline-line",e),n=e.fontMetrics().defaultRuleThickness,r=Z.makeVList({positionType:"top",positionData:t.height,children:[{type:"kern",size:n},{type:"elem",elem:r},{type:"kern",size:3*n},{type:"elem",elem:t}]},e);return Z.makeSpan(["mord","underline"],[r],e)},mathmlBuilder(t,e){var r=new E.MathNode("mo",[new E.TextNode("‾")]);return r.setAttribute("stretchy","true"),(t=new E.MathNode("munder",[To(t.body,e),r])).setAttribute("accentunder","true"),t}}),l({type:"vcenter",names:["\\vcenter"],props:{numArgs:1,argTypes:["original"],allowedInText:!1},handler(t,e){return{type:"vcenter",mode:(t=t.parser).mode,body:e[0]}},htmlBuilder(t,e){var t=fo(t.body,e),r=e.fontMetrics().axisHeight,r=.5*(t.height-r-(t.depth+r));return Z.makeVList({positionType:"shift",positionData:r,children:[{type:"elem",elem:t}]},e)},mathmlBuilder(t,e){return new E.MathNode("mpadded",[To(t.body,e)],["vcenter"])}}),l({type:"verb",names:["\\verb"],props:{numArgs:0,allowedInText:!0},handler(t,e,r){throw new X("\\verb ended by end of line instead of matching delimiter")},htmlBuilder(t,e){for(var r=Xl(t),n=[],i=e.havingStyle(e.style.text()),a=0;at.body.replace(/ /g,t.star?"␣":" "),"makeVerb"),Kl=Qs,Zl=new RegExp("[̀-ͯ]+$"),Ql=class{static{me(this,"Lexer")}constructor(t,e){this.input=void 0,this.settings=void 0,this.tokenRegex=void 0,this.catcodes=void 0,this.input=t,this.settings=e,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(t,e){this.catcodes[t]=e}lex(){var t=this.input,e=this.tokenRegex.lastIndex;if(e===t.length)return new da("EOF",new ua(this,e,e));if(null===(n=this.tokenRegex.exec(t))||n.index!==e)throw new X("Unexpected character: '"+t[e]+"'",new da(t[e],new ua(this,e,e+1)));var r,n=n[6]||n[3]||(n[2]?"\\ ":" ");return 14===this.catcodes[n]?(-1===(r=t.indexOf(` -`,this.tokenRegex.lastIndex))?(this.tokenRegex.lastIndex=t.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 da(n,new ua(this,e,this.tokenRegex.lastIndex))}},Jl=class{static{me(this,"Namespace")}constructor(t,e){void 0===t&&(t={}),void 0===e&&(e={}),this.current=void 0,this.builtins=void 0,this.undefStack=void 0,this.current=e,this.builtins=t,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 t,e=this.undefStack.pop();for(t in e)e.hasOwnProperty(t)&&(null==e[t]?delete this.current[t]:this.current[t]=e[t])}endGroups(){for(;0{var n=t.consumeArg().tokens;if(1!==n.length)throw new X("\\newcommand's first argument must be a macro name");var i=n[0].text,a=t.isDefined(i);if(a&&!e)throw new X("\\newcommand{"+i+"} attempting to redefine "+i+"; use \\renewcommand");if(!a&&!r)throw new X("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");if(e=0,1===(n=t.consumeArg().tokens).length&&"["===n[0].text){for(var s="",o=t.expandNextToken();"]"!==o.text&&"EOF"!==o.text;)s+=o.text,o=t.expandNextToken();if(!s.match(/^\s*[0-9]+\s*$/))throw new X("Invalid number of arguments: "+s);e=parseInt(s),n=t.consumeArg().tokens}return t.macros.set(i,{tokens:n,numArgs:e}),""},"newcommand"),h("\\newcommand",t=>rc(t,!1,!0)),h("\\renewcommand",t=>rc(t,!0,!1)),h("\\providecommand",t=>rc(t,!0,!0)),h("\\message",t=>(t=t.consumeArgs(1)[0],console.log(t.reverse().map(t=>t.text).join("")),"")),h("\\errmessage",t=>(t=t.consumeArgs(1)[0],console.error(t.reverse().map(t=>t.text).join("")),"")),h("\\show",t=>{var e=t.popToken(),r=e.text;return console.log(e,t.macros.get(r),Kl[r],fs.math[r],fs.text[r]),""}),h("\\bgroup","{"),h("\\egroup","}"),h("~","\\nobreakspace"),h("\\lq","`"),h("\\rq","'"),h("\\aa","\\r a"),h("\\AA","\\r A"),h("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),h("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),h("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),h("ℬ","\\mathscr{B}"),h("ℰ","\\mathscr{E}"),h("ℱ","\\mathscr{F}"),h("ℋ","\\mathscr{H}"),h("ℐ","\\mathscr{I}"),h("ℒ","\\mathscr{L}"),h("ℳ","\\mathscr{M}"),h("ℛ","\\mathscr{R}"),h("ℭ","\\mathfrak{C}"),h("ℌ","\\mathfrak{H}"),h("ℨ","\\mathfrak{Z}"),h("\\Bbbk","\\Bbb{k}"),h("·","\\cdotp"),h("\\llap","\\mathllap{\\textrm{#1}}"),h("\\rlap","\\mathrlap{\\textrm{#1}}"),h("\\clap","\\mathclap{\\textrm{#1}}"),h("\\mathstrut","\\vphantom{(}"),h("\\underbar","\\underline{\\text{#1}}"),h("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),h("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),h("\\ne","\\neq"),h("≠","\\neq"),h("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),h("∉","\\notin"),h("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),h("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),h("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),h("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),h("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),h("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),h("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),h("⟂","\\perp"),h("‼","\\mathclose{!\\mkern-0.8mu!}"),h("∌","\\notni"),h("⌜","\\ulcorner"),h("⌝","\\urcorner"),h("⌞","\\llcorner"),h("⌟","\\lrcorner"),h("©","\\copyright"),h("®","\\textregistered"),h("️","\\textregistered"),h("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),h("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),h("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),h("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),h("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),h("⋮","\\vdots"),h("\\varGamma","\\mathit{\\Gamma}"),h("\\varDelta","\\mathit{\\Delta}"),h("\\varTheta","\\mathit{\\Theta}"),h("\\varLambda","\\mathit{\\Lambda}"),h("\\varXi","\\mathit{\\Xi}"),h("\\varPi","\\mathit{\\Pi}"),h("\\varSigma","\\mathit{\\Sigma}"),h("\\varUpsilon","\\mathit{\\Upsilon}"),h("\\varPhi","\\mathit{\\Phi}"),h("\\varPsi","\\mathit{\\Psi}"),h("\\varOmega","\\mathit{\\Omega}"),h("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),h("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),h("\\boxed","\\fbox{$\\displaystyle{#1}$}"),h("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),h("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),h("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),nc={",":"\\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"},h("\\dots",function(t){var e="\\dotso";return(t=t.expandAfterFuture().text)in nc?e=nc[t]:("\\not"===t.slice(0,4)||t in fs.math&&va.contains(["bin","rel"],fs.math[t].group))&&(e="\\dotsb"),e}),ic={")":!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},h("\\dotso",function(t){return t.future().text in ic?"\\ldots\\,":"\\ldots"}),h("\\dotsc",function(t){return(t=t.future().text)in ic&&","!==t?"\\ldots\\,":"\\ldots"}),h("\\cdots",function(t){return t.future().text in ic?"\\@cdots\\,":"\\@cdots"}),h("\\dotsb","\\cdots"),h("\\dotsm","\\cdots"),h("\\dotsi","\\!\\cdots"),h("\\dotsx","\\ldots\\,"),h("\\DOTSI","\\relax"),h("\\DOTSB","\\relax"),h("\\DOTSX","\\relax"),h("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),h("\\,","\\tmspace+{3mu}{.1667em}"),h("\\thinspace","\\,"),h("\\>","\\mskip{4mu}"),h("\\:","\\tmspace+{4mu}{.2222em}"),h("\\medspace","\\:"),h("\\;","\\tmspace+{5mu}{.2777em}"),h("\\thickspace","\\;"),h("\\!","\\tmspace-{3mu}{.1667em}"),h("\\negthinspace","\\!"),h("\\negmedspace","\\tmspace-{4mu}{.2222em}"),h("\\negthickspace","\\tmspace-{5mu}{.277em}"),h("\\enspace","\\kern.5em "),h("\\enskip","\\hskip.5em\\relax"),h("\\quad","\\hskip1em\\relax"),h("\\qquad","\\hskip2em\\relax"),h("\\tag","\\@ifstar\\tag@literal\\tag@paren"),h("\\tag@paren","\\tag@literal{({#1})}"),h("\\tag@literal",t=>{if(t.macros.get("\\df@tag"))throw new X("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),h("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),h("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),h("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),h("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),h("\\newline","\\\\\\relax"),h("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}"),h("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+(ac=K(qa["Main-Regular"][84][1]-.7*qa["Main-Regular"][65][1]))+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),h("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+ac+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),h("\\hspace","\\@ifstar\\@hspacer\\@hspace"),h("\\@hspace","\\hskip #1\\relax"),h("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),h("\\ordinarycolon",":"),h("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),h("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),h("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),h("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),h("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),h("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),h("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),h("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),h("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),h("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),h("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),h("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),h("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),h("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),h("∷","\\dblcolon"),h("∹","\\eqcolon"),h("≔","\\coloneqq"),h("≕","\\eqqcolon"),h("⩴","\\Coloneqq"),h("\\ratio","\\vcentcolon"),h("\\coloncolon","\\dblcolon"),h("\\colonequals","\\coloneqq"),h("\\coloncolonequals","\\Coloneqq"),h("\\equalscolon","\\eqqcolon"),h("\\equalscoloncolon","\\Eqqcolon"),h("\\colonminus","\\coloneq"),h("\\coloncolonminus","\\Coloneq"),h("\\minuscolon","\\eqcolon"),h("\\minuscoloncolon","\\Eqcolon"),h("\\coloncolonapprox","\\Colonapprox"),h("\\coloncolonsim","\\Colonsim"),h("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),h("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),h("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),h("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),h("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),h("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),h("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),h("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),h("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),h("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),h("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),h("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),h("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),h("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),h("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),h("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),h("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),h("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),h("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),h("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),h("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),h("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),h("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),h("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),h("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),h("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),h("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),h("\\imath","\\html@mathml{\\@imath}{ı}"),h("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),h("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),h("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),h("⟦","\\llbracket"),h("⟧","\\rrbracket"),h("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),h("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),h("⦃","\\lBrace"),h("⦄","\\rBrace"),h("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),h("⦵","\\minuso"),h("\\darr","\\downarrow"),h("\\dArr","\\Downarrow"),h("\\Darr","\\Downarrow"),h("\\lang","\\langle"),h("\\rang","\\rangle"),h("\\uarr","\\uparrow"),h("\\uArr","\\Uparrow"),h("\\Uarr","\\Uparrow"),h("\\N","\\mathbb{N}"),h("\\R","\\mathbb{R}"),h("\\Z","\\mathbb{Z}"),h("\\alef","\\aleph"),h("\\alefsym","\\aleph"),h("\\Alpha","\\mathrm{A}"),h("\\Beta","\\mathrm{B}"),h("\\bull","\\bullet"),h("\\Chi","\\mathrm{X}"),h("\\clubs","\\clubsuit"),h("\\cnums","\\mathbb{C}"),h("\\Complex","\\mathbb{C}"),h("\\Dagger","\\ddagger"),h("\\diamonds","\\diamondsuit"),h("\\empty","\\emptyset"),h("\\Epsilon","\\mathrm{E}"),h("\\Eta","\\mathrm{H}"),h("\\exist","\\exists"),h("\\harr","\\leftrightarrow"),h("\\hArr","\\Leftrightarrow"),h("\\Harr","\\Leftrightarrow"),h("\\hearts","\\heartsuit"),h("\\image","\\Im"),h("\\infin","\\infty"),h("\\Iota","\\mathrm{I}"),h("\\isin","\\in"),h("\\Kappa","\\mathrm{K}"),h("\\larr","\\leftarrow"),h("\\lArr","\\Leftarrow"),h("\\Larr","\\Leftarrow"),h("\\lrarr","\\leftrightarrow"),h("\\lrArr","\\Leftrightarrow"),h("\\Lrarr","\\Leftrightarrow"),h("\\Mu","\\mathrm{M}"),h("\\natnums","\\mathbb{N}"),h("\\Nu","\\mathrm{N}"),h("\\Omicron","\\mathrm{O}"),h("\\plusmn","\\pm"),h("\\rarr","\\rightarrow"),h("\\rArr","\\Rightarrow"),h("\\Rarr","\\Rightarrow"),h("\\real","\\Re"),h("\\reals","\\mathbb{R}"),h("\\Reals","\\mathbb{R}"),h("\\Rho","\\mathrm{P}"),h("\\sdot","\\cdot"),h("\\sect","\\S"),h("\\spades","\\spadesuit"),h("\\sub","\\subset"),h("\\sube","\\subseteq"),h("\\supe","\\supseteq"),h("\\Tau","\\mathrm{T}"),h("\\thetasym","\\vartheta"),h("\\weierp","\\wp"),h("\\Zeta","\\mathrm{Z}"),h("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),h("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),h("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),h("\\bra","\\mathinner{\\langle{#1}|}"),h("\\ket","\\mathinner{|{#1}\\rangle}"),h("\\braket","\\mathinner{\\langle{#1}\\rangle}"),h("\\Bra","\\left\\langle#1\\right|"),h("\\Ket","\\left|#1\\right\\rangle"),h("\\bra@ket",(sc=me(l=>t=>{var e=t.consumeArg().tokens,n=t.consumeArg().tokens,i=t.consumeArg().tokens,r=t.consumeArg().tokens,a=t.macros.get("|"),s=t.macros.get("\\|"),o=(t.macros.beginGroup(),me(r=>t=>{l&&(t.macros.set("|",a),i.length)&&t.macros.set("\\|",s);var e=r;return!r&&i.length&&"|"===t.future().text&&(t.popToken(),e=!0),{tokens:e?i:n,numArgs:0}},"midMacro")),o=(t.macros.set("|",o(!1)),i.length&&t.macros.set("\\|",o(!0)),t.consumeArg().tokens),r=t.expandTokens([...r,...o,...e]);return t.macros.endGroup(),{tokens:r.reverse(),numArgs:0}},"braketHelper"))(!1)),h("\\bra@set",sc(!0)),h("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),h("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),h("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),h("\\angln","{\\angl n}"),h("\\blue","\\textcolor{##6495ed}{#1}"),h("\\orange","\\textcolor{##ffa500}{#1}"),h("\\pink","\\textcolor{##ff00af}{#1}"),h("\\red","\\textcolor{##df0030}{#1}"),h("\\green","\\textcolor{##28ae7b}{#1}"),h("\\gray","\\textcolor{gray}{#1}"),h("\\purple","\\textcolor{##9d38bd}{#1}"),h("\\blueA","\\textcolor{##ccfaff}{#1}"),h("\\blueB","\\textcolor{##80f6ff}{#1}"),h("\\blueC","\\textcolor{##63d9ea}{#1}"),h("\\blueD","\\textcolor{##11accd}{#1}"),h("\\blueE","\\textcolor{##0c7f99}{#1}"),h("\\tealA","\\textcolor{##94fff5}{#1}"),h("\\tealB","\\textcolor{##26edd5}{#1}"),h("\\tealC","\\textcolor{##01d1c1}{#1}"),h("\\tealD","\\textcolor{##01a995}{#1}"),h("\\tealE","\\textcolor{##208170}{#1}"),h("\\greenA","\\textcolor{##b6ffb0}{#1}"),h("\\greenB","\\textcolor{##8af281}{#1}"),h("\\greenC","\\textcolor{##74cf70}{#1}"),h("\\greenD","\\textcolor{##1fab54}{#1}"),h("\\greenE","\\textcolor{##0d923f}{#1}"),h("\\goldA","\\textcolor{##ffd0a9}{#1}"),h("\\goldB","\\textcolor{##ffbb71}{#1}"),h("\\goldC","\\textcolor{##ff9c39}{#1}"),h("\\goldD","\\textcolor{##e07d10}{#1}"),h("\\goldE","\\textcolor{##a75a05}{#1}"),h("\\redA","\\textcolor{##fca9a9}{#1}"),h("\\redB","\\textcolor{##ff8482}{#1}"),h("\\redC","\\textcolor{##f9685d}{#1}"),h("\\redD","\\textcolor{##e84d39}{#1}"),h("\\redE","\\textcolor{##bc2612}{#1}"),h("\\maroonA","\\textcolor{##ffbde0}{#1}"),h("\\maroonB","\\textcolor{##ff92c6}{#1}"),h("\\maroonC","\\textcolor{##ed5fa6}{#1}"),h("\\maroonD","\\textcolor{##ca337c}{#1}"),h("\\maroonE","\\textcolor{##9e034e}{#1}"),h("\\purpleA","\\textcolor{##ddd7ff}{#1}"),h("\\purpleB","\\textcolor{##c6b9fc}{#1}"),h("\\purpleC","\\textcolor{##aa87ff}{#1}"),h("\\purpleD","\\textcolor{##7854ab}{#1}"),h("\\purpleE","\\textcolor{##543b78}{#1}"),h("\\mintA","\\textcolor{##f5f9e8}{#1}"),h("\\mintB","\\textcolor{##edf2df}{#1}"),h("\\mintC","\\textcolor{##e0e5cc}{#1}"),h("\\grayA","\\textcolor{##f6f7f7}{#1}"),h("\\grayB","\\textcolor{##f0f1f2}{#1}"),h("\\grayC","\\textcolor{##e3e5e6}{#1}"),h("\\grayD","\\textcolor{##d6d8da}{#1}"),h("\\grayE","\\textcolor{##babec2}{#1}"),h("\\grayF","\\textcolor{##888d93}{#1}"),h("\\grayG","\\textcolor{##626569}{#1}"),h("\\grayH","\\textcolor{##3b3e40}{#1}"),h("\\grayI","\\textcolor{##21242c}{#1}"),h("\\kaBlue","\\textcolor{##314453}{#1}"),h("\\kaGreen","\\textcolor{##71B307}{#1}"),oc={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},lc=class{static{me(this,"MacroExpander")}constructor(t,e,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=e,this.expansionCount=0,this.feed(t),this.macros=new Jl(tc,e.macros),this.mode=r,this.stack=[]}feed(t){this.lexer=new Ql(t,this.settings)}switchMode(t){this.mode=t}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(t){this.stack.push(t)}pushTokens(t){this.stack.push(...t)}scanArgument(t){var e,r,n;if(t){if(this.consumeSpaces(),"["!==this.future().text)return null;e=this.popToken(),{tokens:n,end:r}=this.consumeArg(["]"])}else({tokens:n,start:e,end:r}=this.consumeArg());return this.pushToken(new da("EOF",r.loc)),this.pushTokens(n),e.range(r,"")}consumeSpaces(){for(;" "===this.future().text;)this.stack.pop()}consumeArg(t){var e,r=[],n=t&&0this.settings.maxExpand)throw new X("Too many expansions: infinite loop or need to increase maxExpand setting")}expandOnce(t){var e=this.popToken(),r=e.text,n=e.noexpand?null:this._getExpansion(r);if(null==n||t&&n.unexpandable){if(t&&null==n&&"\\"===r[0]&&!this.isDefined(r))throw new X("Undefined control sequence: "+r);return this.pushToken(e),!1}this.countExpansion(1);var i=n.tokens,a=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs)for(var s=(i=i.slice()).length-1;0<=s;--s){var o=i[s];if("#"===o.text){if(0===s)throw new X("Incomplete placeholder at end of macro body",o);if("#"===(o=i[--s]).text)i.splice(s+1,1);else{if(!/^[1-9]$/.test(o.text))throw new X("Not a valid argument number",o);i.splice(s,2,...a[+o.text-1])}}}return this.pushTokens(i),i.length}expandAfterFuture(){return this.expandOnce(),this.future()}expandNextToken(){for(;;){var t;if(!1===this.expandOnce())return(t=this.stack.pop()).treatAsRelax&&(t.text="\\relax"),t}throw new Error}expandMacro(t){return this.macros.has(t)?this.expandTokens([new da(t)]):void 0}expandTokens(t){var e,r=[],n=this.stack.length;for(this.pushTokens(t);this.stack.length>n;)!1===this.expandOnce(!0)&&((e=this.stack.pop()).treatAsRelax&&(e.noexpand=!1,e.treatAsRelax=!1),r.push(e));return this.countExpansion(r.length),r}expandMacroAsText(t){return(t=this.expandMacro(t))&&t.map(t=>t.text).join("")}_getExpansion(t){var e=this.macros.get(t);if(null==e)return e;if(1!==t.length||null==(t=this.lexer.catcodes[t])||13===t){if("string"!=typeof(t="function"==typeof e?e(this):e))return t;var r=0;if(-1!==t.indexOf("#"))for(var n=t.replace(/##/g,"");-1!==n.indexOf("#"+(r+1));)++r;for(var i=new Ql(t,this.settings),a=[],s=i.lex();"EOF"!==s.text;)a.push(s),s=i.lex();return a.reverse(),{tokens:a,numArgs:r}}}isDefined(t){return this.macros.has(t)||Kl.hasOwnProperty(t)||fs.math.hasOwnProperty(t)||fs.text.hasOwnProperty(t)||oc.hasOwnProperty(t)}isExpandable(t){var e=this.macros.get(t);return null!=e?"string"==typeof e||"function"==typeof e||!e.unexpandable:Kl.hasOwnProperty(t)&&!Kl[t].primitive}},cc=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,hc=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),uc={"́":{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"}},dc={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"},(pc=class a{static{me(this,"Parser")}constructor(t,e){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 lc(t,e,this.mode),this.settings=e,this.leftrightDepth=0}expect(t,e){if(void 0===e&&(e=!0),this.fetch().text!==t)throw new X("Expected '"+t+"', got '"+this.fetch().text+"'",this.fetch());e&&this.consume()}consume(){this.nextToken=null}fetch(){return null==this.nextToken&&(this.nextToken=this.gullet.expandNextToken()),this.nextToken}switchMode(t){this.mode=t,this.gullet.switchMode(t)}parse(){this.settings.globalGroup||this.gullet.beginGroup(),this.settings.colorIsTextColor&&this.gullet.macros.set("\\color","\\textcolor");try{var t=this.parseExpression(!1);return this.expect("EOF"),this.settings.globalGroup||this.gullet.endGroup(),t}finally{this.gullet.endGroups()}}subparse(t){var e=this.nextToken,t=(this.consume(),this.gullet.pushToken(new da("}")),this.gullet.pushTokens(t),this.parseExpression(!1));return this.expect("}"),this.nextToken=e,t}parseExpression(t,e){for(var r=[];;){"math"===this.mode&&this.consumeSpaces();var n=this.fetch();if(-1!==a.endOfExpression.indexOf(n.text)||e&&n.text===e||t&&Kl[n.text]&&Kl[n.text].infix)break;if(!(n=this.parseAtom(e)))break;"internal"!==n.type&&r.push(n)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(t){for(var e,r,n,i=-1,a=0;a{t instanceof Element&&"A"===t.tagName&&t.hasAttribute("target")&&t.setAttribute(e,t.getAttribute("target")??"")}),Mi.addHook("afterSanitizeAttributes",t=>{t instanceof Element&&"A"===t.tagName&&t.hasAttribute(e)&&(t.setAttribute("target",t.getAttribute(e)??""),t.removeAttribute(e),"_blank"===t.getAttribute("target"))&&t.setAttribute("rel","noopener")})}var kc,Tc,Ec,Cc,_c,Sc,Ac,Lc,Nc,Ic,Rc,Mc,Dc,Oc,Pc,Bc,Fc,$c,zc,Gc,Uc,qc,jc,Wc,L,Yc,Hc,Vc,Xc,Kc,Zc,Qc,Jc,th=t(()=>{Di(),kc=//gi,Tc=me(t=>t?Rc(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Ec=(()=>{let t=!1;return()=>{t||(wc(),t=!0)}})(),me(wc,"setupDompurifyHooks"),Cc=me(t=>(Ec(),Mi.sanitize(t)),"removeScript"),_c=me((t,e)=>(!1!==e.flowchart?.htmlLabels&&("antiscript"===(e=e.securityLevel)||"strict"===e?t=Cc(t):"loose"!==e&&(t=(t=(t=Rc(t)).replace(//g,">")).replace(/=/g,"="),t=Ic(t))),t),"sanitizeMore"),Sc=me((t,e)=>t&&(e.dompurifyConfig?Mi.sanitize(_c(t,e),e.dompurifyConfig):Mi.sanitize(_c(t,e),{FORBID_TAGS:["style"]})).toString(),"sanitizeText"),Ac=me((t,e)=>"string"==typeof t?Sc(t,e):t.flat().map(t=>Sc(t,e)),"sanitizeTextOrArray"),Lc=me(t=>kc.test(t),"hasBreaks"),Nc=me(t=>t.split(kc),"splitBreaks"),Ic=me(t=>t.replace(/#br#/g,"
"),"placeholderToBreak"),Rc=me(t=>t.replace(kc,"#br#"),"breakToPlaceholder"),Mc=me(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),Dc=me(t=>!(!1===t||["false","null","0"].includes(String(t).trim().toLowerCase())),"evaluate"),Oc=me(function(...t){return t=t.filter(t=>!isNaN(t)),Math.max(...t)},"getMax"),Pc=me(function(...t){return t=t.filter(t=>!isNaN(t)),Math.min(...t)},"getMin"),Bc=me(function(t){var r,n,i=t.split(/(,)/),a=[];for(let e=0;eMath.max(0,t.split(e).length-1),"countOccurrence"),$c=me((t,e)=>(t=Fc(t,"~"),e=Fc(e,"~"),1===t&&1===e),"shouldCombineSets"),zc=me(t=>{let e=Fc(t,"~"),r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);let n=[...t],i=n.indexOf("~"),a=n.lastIndexOf("~");for(;-1!==i&&-1!==a&&i!==a;)n[i]="<",n[a]=">",i=n.indexOf("~"),a=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),Gc=me(()=>void 0!==window.MathMLElement,"isMathMLSupported"),Uc=/\$\$(.*)\$\$/g,qc=me(t=>0<(t.match(Uc)?.length??0),"hasKatex"),jc=me(async(t,e)=>(t=await Wc(t,e),(e=document.createElement("div")).innerHTML=t,e.id="katex-temp",e.style.visibility="hidden",e.style.position="absolute",e.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",e),t={width:e.clientWidth,height:e.clientHeight},e.remove(),t),"calculateMathMLDimensions"),Wc=me(async(t,e)=>{if(!qc(t))return t;if(!(Gc()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Uc,"MathML is unsupported in this environment.");{let r=(await Promise.resolve().then(()=>(bc(),Oi))).default,n=e.forceLegacyMathML||!Gc()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(kc).map(t=>qc(t)?`
${t}
`:`
${t}
`).join("").replace(Uc,(t,e)=>r.renderToString(e,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(//g,""))}},"renderKatex"),L={getRows:Tc,sanitizeText:Sc,sanitizeTextOrArray:Ac,hasBreaks:Lc,splitBreaks:Nc,lineBreakRegex:kc,removeScript:Cc,getUrl:Mc,evaluate:Dc,getMax:Oc,getMin:Pc}}),eh=t(()=>{e(),Yc=me(function(t,e){for(var r of e)t.attr(r[0],r[1])},"d3Attrs"),Hc=me(function(t,e,r){var n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):(n.set("height",t),n.set("width",e)),n},"calculateSvgSizeAttrs"),Vc=me(function(t,e,r,n){e=Hc(e,r,n),Yc(t,e)},"configureSvgSize"),Xc=me(function(t,e,r,n){var i=e.node().getBBox(),a=i.width,s=(M.info(`SVG bounds: ${a}x`+(s=i.height),i),M.info("Graph bounds: 0x0",t),M.info(`Calculated bounds: ${t=a+2*r}x`+(a=s+2*r)),Vc(e,a,t,n),`${i.x-r} ${i.y-r} ${i.width+2*r} `+(i.height+2*r));e.attr("viewBox",s)},"setupGraphViewbox")}),rh=t(()=>{e(),Kc={},Zc=me((t,e,r)=>{let n="";return t in Kc&&Kc[t]?n=Kc[t](r):M.warn("No theme found for "+t),` & { +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"),Ua=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 va.contains(this.classes,e)}toNode(){for(var e=document.createDocumentFragment(),t=0;te.toText(),"toText");return this.children.map(e).join("")}},qa={"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]}},ja={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]},Wa={"Å":"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(zi,"setFontMetrics"),mt(Gi,"getCharacterMetrics"),Ya={},mt(Ui,"getGlobalMetrics"),Ha=[[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]],Va=[.5,.6,.7,.8,.9,1,1.2,1.44,1.728,2.074,2.488],Xa=mt(function(e,t){return t.size<2?e:Ha[e-1][t.size-1]},"sizeAtStyle"),(Ka=class i{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||i.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=Va[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 i(r)}havingStyle(e){return this.style===e?this:this.extend({style:e,size:Xa(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:Va[e-1]})}havingBaseStyle(e){e=e||this.style.text();var t=Xa(i.BASESIZE,e);return this.size===t&&this.textSize===i.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!==i.BASESIZE?["sizing","reset-size"+this.size,"size"+i.BASESIZE]:[]}fontMetrics(){return this._fontMetrics||(this._fontMetrics=Ui(this.size)),this._fontMetrics}getColor(){return this.phantom?"transparent":this.color}}).BASESIZE=6,Za={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},Qa={ex:!0,em:!0,mu:!0},Ja=mt(function(e){return(e="string"!=typeof e?e.unit:e)in Za||e in Qa||"ex"===e},"validUnit"),es=mt(function(e,t){var r;if(e.unit in Za)r=Za[e.unit]/t.fontMetrics().ptPerEm/t.sizeMultiplier;else if("mu"===e.unit)r=t.fontMetrics().cssEmPerMu;else{var n=t.style.isTight()?t.havingStyle(t.style.text()):t;if("ex"===e.unit)r=n.fontMetrics().xHeight;else{if("em"!==e.unit)throw new X("Invalid unit: '"+e.unit+"'");r=n.fontMetrics().quad}n!==t&&(r*=n.sizeMultiplier/t.sizeMultiplier)}return Math.min(e.number*r,t.maxSize)},"calculateSize"),K=mt(function(e){return+e.toFixed(4)+"em"},"makeEm"),ts=mt(function(e){return e.filter(e=>e).join(" ")},"createClass"),rs=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"),ns=mt(function(e){var t,r,n=document.createElement(e);for(t in n.className=ts(this.classes),this.style)this.style.hasOwnProperty(t)&&(n.style[t]=this.style[t]);for(r in this.attributes)this.attributes.hasOwnProperty(r)&&n.setAttribute(r,this.attributes[r]);for(var i=0;i"},"toMarkup"),as=class{static{mt(this,"Span")}constructor(e,t,r,n){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,rs.call(this,e,r,n),this.children=t||[]}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return va.contains(this.classes,e)}toNode(){return ns.call(this,"span")}toMarkup(){return is.call(this,"span")}},ss=class{static{mt(this,"Anchor")}constructor(e,t,r,n){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,rs.call(this,t,n),this.children=r||[],this.setAttribute("href",e)}setAttribute(e,t){this.attributes[e]=t}hasClass(e){return va.contains(this.classes,e)}toNode(){return ns.call(this,"a")}toMarkup(){return is.call(this,"a")}},os=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 va.contains(this.classes,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=''+va.escape(this.alt)+'"}},ls={"î":"ı̂","ï":"ı̈","í":"ı́","ì":"ı̀"},cs=class{static{mt(this,"SymbolNode")}constructor(e,t,r,n,i,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=n||0,this.skew=i||0,this.width=a||0,this.classes=s||[],this.style=o||{},this.maxFontSize=0,(e=$i(this.text.charCodeAt(0)))&&this.classes.push(e+"_fallback"),/[îïíì]/.test(this.text)&&(this.text=ls[this.text])}hasClass(e){return va.contains(this.classes,e)}toNode(){var e,t=document.createTextNode(this.text),r=null;for(e in 0":i}},hs=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"}},us=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",za[this.pathName]),e}toMarkup(){return this.alternate?'':''}},ds=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(qi,"assertSymbolDomNode"),mt(ji,"assertSpan"),ps={bin:1,close:1,inner:1,open:1,punct:1,rel:1},gs={"accent-token":1,mathord:1,"op-token":1,spacing:1,textord:1},fs={math:{},text:{}},mt(o,"defineSymbol"),d="text",y="ams",sc="accent-token",m="bin",Rl="close",$l="inner",ms="mathord",ac="op-token",mc="open",Pl="punct",fc="spacing",g="textord",o(u="math",p="main",f="rel","≡","\\equiv",!0),o(u,p,f,"≺","\\prec",!0),o(u,p,f,"≻","\\succ",!0),o(u,p,f,"∼","\\sim",!0),o(u,p,f,"⊥","\\perp"),o(u,p,f,"⪯","\\preceq",!0),o(u,p,f,"⪰","\\succeq",!0),o(u,p,f,"≃","\\simeq",!0),o(u,p,f,"∣","\\mid",!0),o(u,p,f,"≪","\\ll",!0),o(u,p,f,"≫","\\gg",!0),o(u,p,f,"≍","\\asymp",!0),o(u,p,f,"∥","\\parallel"),o(u,p,f,"⋈","\\bowtie",!0),o(u,p,f,"⌣","\\smile",!0),o(u,p,f,"⊑","\\sqsubseteq",!0),o(u,p,f,"⊒","\\sqsupseteq",!0),o(u,p,f,"≐","\\doteq",!0),o(u,p,f,"⌢","\\frown",!0),o(u,p,f,"∋","\\ni",!0),o(u,p,f,"∝","\\propto",!0),o(u,p,f,"⊢","\\vdash",!0),o(u,p,f,"⊣","\\dashv",!0),o(u,p,f,"∋","\\owns"),o(u,p,Pl,".","\\ldotp"),o(u,p,Pl,"⋅","\\cdotp"),o(u,p,g,"#","\\#"),o(d,p,g,"#","\\#"),o(u,p,g,"&","\\&"),o(d,p,g,"&","\\&"),o(u,p,g,"ℵ","\\aleph",!0),o(u,p,g,"∀","\\forall",!0),o(u,p,g,"ℏ","\\hbar",!0),o(u,p,g,"∃","\\exists",!0),o(u,p,g,"∇","\\nabla",!0),o(u,p,g,"♭","\\flat",!0),o(u,p,g,"ℓ","\\ell",!0),o(u,p,g,"♮","\\natural",!0),o(u,p,g,"♣","\\clubsuit",!0),o(u,p,g,"℘","\\wp",!0),o(u,p,g,"♯","\\sharp",!0),o(u,p,g,"♢","\\diamondsuit",!0),o(u,p,g,"ℜ","\\Re",!0),o(u,p,g,"♡","\\heartsuit",!0),o(u,p,g,"ℑ","\\Im",!0),o(u,p,g,"♠","\\spadesuit",!0),o(u,p,g,"§","\\S",!0),o(d,p,g,"§","\\S"),o(u,p,g,"¶","\\P",!0),o(d,p,g,"¶","\\P"),o(u,p,g,"†","\\dag"),o(d,p,g,"†","\\dag"),o(d,p,g,"†","\\textdagger"),o(u,p,g,"‡","\\ddag"),o(d,p,g,"‡","\\ddag"),o(d,p,g,"‡","\\textdaggerdbl"),o(u,p,Rl,"⎱","\\rmoustache",!0),o(u,p,mc,"⎰","\\lmoustache",!0),o(u,p,Rl,"⟯","\\rgroup",!0),o(u,p,mc,"⟮","\\lgroup",!0),o(u,p,m,"∓","\\mp",!0),o(u,p,m,"⊖","\\ominus",!0),o(u,p,m,"⊎","\\uplus",!0),o(u,p,m,"⊓","\\sqcap",!0),o(u,p,m,"∗","\\ast"),o(u,p,m,"⊔","\\sqcup",!0),o(u,p,m,"◯","\\bigcirc",!0),o(u,p,m,"∙","\\bullet",!0),o(u,p,m,"‡","\\ddagger"),o(u,p,m,"≀","\\wr",!0),o(u,p,m,"⨿","\\amalg"),o(u,p,m,"&","\\And"),o(u,p,f,"⟵","\\longleftarrow",!0),o(u,p,f,"⇐","\\Leftarrow",!0),o(u,p,f,"⟸","\\Longleftarrow",!0),o(u,p,f,"⟶","\\longrightarrow",!0),o(u,p,f,"⇒","\\Rightarrow",!0),o(u,p,f,"⟹","\\Longrightarrow",!0),o(u,p,f,"↔","\\leftrightarrow",!0),o(u,p,f,"⟷","\\longleftrightarrow",!0),o(u,p,f,"⇔","\\Leftrightarrow",!0),o(u,p,f,"⟺","\\Longleftrightarrow",!0),o(u,p,f,"↦","\\mapsto",!0),o(u,p,f,"⟼","\\longmapsto",!0),o(u,p,f,"↗","\\nearrow",!0),o(u,p,f,"↩","\\hookleftarrow",!0),o(u,p,f,"↪","\\hookrightarrow",!0),o(u,p,f,"↘","\\searrow",!0),o(u,p,f,"↼","\\leftharpoonup",!0),o(u,p,f,"⇀","\\rightharpoonup",!0),o(u,p,f,"↙","\\swarrow",!0),o(u,p,f,"↽","\\leftharpoondown",!0),o(u,p,f,"⇁","\\rightharpoondown",!0),o(u,p,f,"↖","\\nwarrow",!0),o(u,p,f,"⇌","\\rightleftharpoons",!0),o(u,y,f,"≮","\\nless",!0),o(u,y,f,"","\\@nleqslant"),o(u,y,f,"","\\@nleqq"),o(u,y,f,"⪇","\\lneq",!0),o(u,y,f,"≨","\\lneqq",!0),o(u,y,f,"","\\@lvertneqq"),o(u,y,f,"⋦","\\lnsim",!0),o(u,y,f,"⪉","\\lnapprox",!0),o(u,y,f,"⊀","\\nprec",!0),o(u,y,f,"⋠","\\npreceq",!0),o(u,y,f,"⋨","\\precnsim",!0),o(u,y,f,"⪹","\\precnapprox",!0),o(u,y,f,"≁","\\nsim",!0),o(u,y,f,"","\\@nshortmid"),o(u,y,f,"∤","\\nmid",!0),o(u,y,f,"⊬","\\nvdash",!0),o(u,y,f,"⊭","\\nvDash",!0),o(u,y,f,"⋪","\\ntriangleleft"),o(u,y,f,"⋬","\\ntrianglelefteq",!0),o(u,y,f,"⊊","\\subsetneq",!0),o(u,y,f,"","\\@varsubsetneq"),o(u,y,f,"⫋","\\subsetneqq",!0),o(u,y,f,"","\\@varsubsetneqq"),o(u,y,f,"≯","\\ngtr",!0),o(u,y,f,"","\\@ngeqslant"),o(u,y,f,"","\\@ngeqq"),o(u,y,f,"⪈","\\gneq",!0),o(u,y,f,"≩","\\gneqq",!0),o(u,y,f,"","\\@gvertneqq"),o(u,y,f,"⋧","\\gnsim",!0),o(u,y,f,"⪊","\\gnapprox",!0),o(u,y,f,"⊁","\\nsucc",!0),o(u,y,f,"⋡","\\nsucceq",!0),o(u,y,f,"⋩","\\succnsim",!0),o(u,y,f,"⪺","\\succnapprox",!0),o(u,y,f,"≆","\\ncong",!0),o(u,y,f,"","\\@nshortparallel"),o(u,y,f,"∦","\\nparallel",!0),o(u,y,f,"⊯","\\nVDash",!0),o(u,y,f,"⋫","\\ntriangleright"),o(u,y,f,"⋭","\\ntrianglerighteq",!0),o(u,y,f,"","\\@nsupseteqq"),o(u,y,f,"⊋","\\supsetneq",!0),o(u,y,f,"","\\@varsupsetneq"),o(u,y,f,"⫌","\\supsetneqq",!0),o(u,y,f,"","\\@varsupsetneqq"),o(u,y,f,"⊮","\\nVdash",!0),o(u,y,f,"⪵","\\precneqq",!0),o(u,y,f,"⪶","\\succneqq",!0),o(u,y,f,"","\\@nsubseteqq"),o(u,y,m,"⊴","\\unlhd"),o(u,y,m,"⊵","\\unrhd"),o(u,y,f,"↚","\\nleftarrow",!0),o(u,y,f,"↛","\\nrightarrow",!0),o(u,y,f,"⇍","\\nLeftarrow",!0),o(u,y,f,"⇏","\\nRightarrow",!0),o(u,y,f,"↮","\\nleftrightarrow",!0),o(u,y,f,"⇎","\\nLeftrightarrow",!0),o(u,y,f,"△","\\vartriangle"),o(u,y,g,"ℏ","\\hslash"),o(u,y,g,"▽","\\triangledown"),o(u,y,g,"◊","\\lozenge"),o(u,y,g,"Ⓢ","\\circledS"),o(u,y,g,"®","\\circledR"),o(d,y,g,"®","\\circledR"),o(u,y,g,"∡","\\measuredangle",!0),o(u,y,g,"∄","\\nexists"),o(u,y,g,"℧","\\mho"),o(u,y,g,"Ⅎ","\\Finv",!0),o(u,y,g,"⅁","\\Game",!0),o(u,y,g,"‵","\\backprime"),o(u,y,g,"▲","\\blacktriangle"),o(u,y,g,"▼","\\blacktriangledown"),o(u,y,g,"■","\\blacksquare"),o(u,y,g,"⧫","\\blacklozenge"),o(u,y,g,"★","\\bigstar"),o(u,y,g,"∢","\\sphericalangle",!0),o(u,y,g,"∁","\\complement",!0),o(u,y,g,"ð","\\eth",!0),o(d,p,g,"ð","ð"),o(u,y,g,"╱","\\diagup"),o(u,y,g,"╲","\\diagdown"),o(u,y,g,"□","\\square"),o(u,y,g,"□","\\Box"),o(u,y,g,"◊","\\Diamond"),o(u,y,g,"¥","\\yen",!0),o(d,y,g,"¥","\\yen",!0),o(u,y,g,"✓","\\checkmark",!0),o(d,y,g,"✓","\\checkmark"),o(u,y,g,"ℶ","\\beth",!0),o(u,y,g,"ℸ","\\daleth",!0),o(u,y,g,"ℷ","\\gimel",!0),o(u,y,g,"ϝ","\\digamma",!0),o(u,y,g,"ϰ","\\varkappa"),o(u,y,mc,"┌","\\@ulcorner",!0),o(u,y,Rl,"┐","\\@urcorner",!0),o(u,y,mc,"└","\\@llcorner",!0),o(u,y,Rl,"┘","\\@lrcorner",!0),o(u,y,f,"≦","\\leqq",!0),o(u,y,f,"⩽","\\leqslant",!0),o(u,y,f,"⪕","\\eqslantless",!0),o(u,y,f,"≲","\\lesssim",!0),o(u,y,f,"⪅","\\lessapprox",!0),o(u,y,f,"≊","\\approxeq",!0),o(u,y,m,"⋖","\\lessdot"),o(u,y,f,"⋘","\\lll",!0),o(u,y,f,"≶","\\lessgtr",!0),o(u,y,f,"⋚","\\lesseqgtr",!0),o(u,y,f,"⪋","\\lesseqqgtr",!0),o(u,y,f,"≑","\\doteqdot"),o(u,y,f,"≓","\\risingdotseq",!0),o(u,y,f,"≒","\\fallingdotseq",!0),o(u,y,f,"∽","\\backsim",!0),o(u,y,f,"⋍","\\backsimeq",!0),o(u,y,f,"⫅","\\subseteqq",!0),o(u,y,f,"⋐","\\Subset",!0),o(u,y,f,"⊏","\\sqsubset",!0),o(u,y,f,"≼","\\preccurlyeq",!0),o(u,y,f,"⋞","\\curlyeqprec",!0),o(u,y,f,"≾","\\precsim",!0),o(u,y,f,"⪷","\\precapprox",!0),o(u,y,f,"⊲","\\vartriangleleft"),o(u,y,f,"⊴","\\trianglelefteq"),o(u,y,f,"⊨","\\vDash",!0),o(u,y,f,"⊪","\\Vvdash",!0),o(u,y,f,"⌣","\\smallsmile"),o(u,y,f,"⌢","\\smallfrown"),o(u,y,f,"≏","\\bumpeq",!0),o(u,y,f,"≎","\\Bumpeq",!0),o(u,y,f,"≧","\\geqq",!0),o(u,y,f,"⩾","\\geqslant",!0),o(u,y,f,"⪖","\\eqslantgtr",!0),o(u,y,f,"≳","\\gtrsim",!0),o(u,y,f,"⪆","\\gtrapprox",!0),o(u,y,m,"⋗","\\gtrdot"),o(u,y,f,"⋙","\\ggg",!0),o(u,y,f,"≷","\\gtrless",!0),o(u,y,f,"⋛","\\gtreqless",!0),o(u,y,f,"⪌","\\gtreqqless",!0),o(u,y,f,"≖","\\eqcirc",!0),o(u,y,f,"≗","\\circeq",!0),o(u,y,f,"≜","\\triangleq",!0),o(u,y,f,"∼","\\thicksim"),o(u,y,f,"≈","\\thickapprox"),o(u,y,f,"⫆","\\supseteqq",!0),o(u,y,f,"⋑","\\Supset",!0),o(u,y,f,"⊐","\\sqsupset",!0),o(u,y,f,"≽","\\succcurlyeq",!0),o(u,y,f,"⋟","\\curlyeqsucc",!0),o(u,y,f,"≿","\\succsim",!0),o(u,y,f,"⪸","\\succapprox",!0),o(u,y,f,"⊳","\\vartriangleright"),o(u,y,f,"⊵","\\trianglerighteq"),o(u,y,f,"⊩","\\Vdash",!0),o(u,y,f,"∣","\\shortmid"),o(u,y,f,"∥","\\shortparallel"),o(u,y,f,"≬","\\between",!0),o(u,y,f,"⋔","\\pitchfork",!0),o(u,y,f,"∝","\\varpropto"),o(u,y,f,"◀","\\blacktriangleleft"),o(u,y,f,"∴","\\therefore",!0),o(u,y,f,"∍","\\backepsilon"),o(u,y,f,"▶","\\blacktriangleright"),o(u,y,f,"∵","\\because",!0),o(u,y,f,"⋘","\\llless"),o(u,y,f,"⋙","\\gggtr"),o(u,y,m,"⊲","\\lhd"),o(u,y,m,"⊳","\\rhd"),o(u,y,f,"≂","\\eqsim",!0),o(u,p,f,"⋈","\\Join"),o(u,y,f,"≑","\\Doteq",!0),o(u,y,m,"∔","\\dotplus",!0),o(u,y,m,"∖","\\smallsetminus"),o(u,y,m,"⋒","\\Cap",!0),o(u,y,m,"⋓","\\Cup",!0),o(u,y,m,"⩞","\\doublebarwedge",!0),o(u,y,m,"⊟","\\boxminus",!0),o(u,y,m,"⊞","\\boxplus",!0),o(u,y,m,"⋇","\\divideontimes",!0),o(u,y,m,"⋉","\\ltimes",!0),o(u,y,m,"⋊","\\rtimes",!0),o(u,y,m,"⋋","\\leftthreetimes",!0),o(u,y,m,"⋌","\\rightthreetimes",!0),o(u,y,m,"⋏","\\curlywedge",!0),o(u,y,m,"⋎","\\curlyvee",!0),o(u,y,m,"⊝","\\circleddash",!0),o(u,y,m,"⊛","\\circledast",!0),o(u,y,m,"⋅","\\centerdot"),o(u,y,m,"⊺","\\intercal",!0),o(u,y,m,"⋒","\\doublecap"),o(u,y,m,"⋓","\\doublecup"),o(u,y,m,"⊠","\\boxtimes",!0),o(u,y,f,"⇢","\\dashrightarrow",!0),o(u,y,f,"⇠","\\dashleftarrow",!0),o(u,y,f,"⇇","\\leftleftarrows",!0),o(u,y,f,"⇆","\\leftrightarrows",!0),o(u,y,f,"⇚","\\Lleftarrow",!0),o(u,y,f,"↞","\\twoheadleftarrow",!0),o(u,y,f,"↢","\\leftarrowtail",!0),o(u,y,f,"↫","\\looparrowleft",!0),o(u,y,f,"⇋","\\leftrightharpoons",!0),o(u,y,f,"↶","\\curvearrowleft",!0),o(u,y,f,"↺","\\circlearrowleft",!0),o(u,y,f,"↰","\\Lsh",!0),o(u,y,f,"⇈","\\upuparrows",!0),o(u,y,f,"↿","\\upharpoonleft",!0),o(u,y,f,"⇃","\\downharpoonleft",!0),o(u,p,f,"⊶","\\origof",!0),o(u,p,f,"⊷","\\imageof",!0),o(u,y,f,"⊸","\\multimap",!0),o(u,y,f,"↭","\\leftrightsquigarrow",!0),o(u,y,f,"⇉","\\rightrightarrows",!0),o(u,y,f,"⇄","\\rightleftarrows",!0),o(u,y,f,"↠","\\twoheadrightarrow",!0),o(u,y,f,"↣","\\rightarrowtail",!0),o(u,y,f,"↬","\\looparrowright",!0),o(u,y,f,"↷","\\curvearrowright",!0),o(u,y,f,"↻","\\circlearrowright",!0),o(u,y,f,"↱","\\Rsh",!0),o(u,y,f,"⇊","\\downdownarrows",!0),o(u,y,f,"↾","\\upharpoonright",!0),o(u,y,f,"⇂","\\downharpoonright",!0),o(u,y,f,"⇝","\\rightsquigarrow",!0),o(u,y,f,"⇝","\\leadsto"),o(u,y,f,"⇛","\\Rrightarrow",!0),o(u,y,f,"↾","\\restriction"),o(u,p,g,"‘","`"),o(u,p,g,"$","\\$"),o(d,p,g,"$","\\$"),o(d,p,g,"$","\\textdollar"),o(u,p,g,"%","\\%"),o(d,p,g,"%","\\%"),o(u,p,g,"_","\\_"),o(d,p,g,"_","\\_"),o(d,p,g,"_","\\textunderscore"),o(u,p,g,"∠","\\angle",!0),o(u,p,g,"∞","\\infty",!0),o(u,p,g,"′","\\prime"),o(u,p,g,"△","\\triangle"),o(u,p,g,"Γ","\\Gamma",!0),o(u,p,g,"Δ","\\Delta",!0),o(u,p,g,"Θ","\\Theta",!0),o(u,p,g,"Λ","\\Lambda",!0),o(u,p,g,"Ξ","\\Xi",!0),o(u,p,g,"Π","\\Pi",!0),o(u,p,g,"Σ","\\Sigma",!0),o(u,p,g,"Υ","\\Upsilon",!0),o(u,p,g,"Φ","\\Phi",!0),o(u,p,g,"Ψ","\\Psi",!0),o(u,p,g,"Ω","\\Omega",!0),o(u,p,g,"A","Α"),o(u,p,g,"B","Β"),o(u,p,g,"E","Ε"),o(u,p,g,"Z","Ζ"),o(u,p,g,"H","Η"),o(u,p,g,"I","Ι"),o(u,p,g,"K","Κ"),o(u,p,g,"M","Μ"),o(u,p,g,"N","Ν"),o(u,p,g,"O","Ο"),o(u,p,g,"P","Ρ"),o(u,p,g,"T","Τ"),o(u,p,g,"X","Χ"),o(u,p,g,"¬","\\neg",!0),o(u,p,g,"¬","\\lnot"),o(u,p,g,"⊤","\\top"),o(u,p,g,"⊥","\\bot"),o(u,p,g,"∅","\\emptyset"),o(u,y,g,"∅","\\varnothing"),o(u,p,ms,"α","\\alpha",!0),o(u,p,ms,"β","\\beta",!0),o(u,p,ms,"γ","\\gamma",!0),o(u,p,ms,"δ","\\delta",!0),o(u,p,ms,"ϵ","\\epsilon",!0),o(u,p,ms,"ζ","\\zeta",!0),o(u,p,ms,"η","\\eta",!0),o(u,p,ms,"θ","\\theta",!0),o(u,p,ms,"ι","\\iota",!0),o(u,p,ms,"κ","\\kappa",!0),o(u,p,ms,"λ","\\lambda",!0),o(u,p,ms,"μ","\\mu",!0),o(u,p,ms,"ν","\\nu",!0),o(u,p,ms,"ξ","\\xi",!0),o(u,p,ms,"ο","\\omicron",!0),o(u,p,ms,"π","\\pi",!0),o(u,p,ms,"ρ","\\rho",!0),o(u,p,ms,"σ","\\sigma",!0),o(u,p,ms,"τ","\\tau",!0),o(u,p,ms,"υ","\\upsilon",!0),o(u,p,ms,"ϕ","\\phi",!0),o(u,p,ms,"χ","\\chi",!0),o(u,p,ms,"ψ","\\psi",!0),o(u,p,ms,"ω","\\omega",!0),o(u,p,ms,"ε","\\varepsilon",!0),o(u,p,ms,"ϑ","\\vartheta",!0),o(u,p,ms,"ϖ","\\varpi",!0),o(u,p,ms,"ϱ","\\varrho",!0),o(u,p,ms,"ς","\\varsigma",!0),o(u,p,ms,"φ","\\varphi",!0),o(u,p,m,"∗","*",!0),o(u,p,m,"+","+"),o(u,p,m,"−","-",!0),o(u,p,m,"⋅","\\cdot",!0),o(u,p,m,"∘","\\circ",!0),o(u,p,m,"÷","\\div",!0),o(u,p,m,"±","\\pm",!0),o(u,p,m,"×","\\times",!0),o(u,p,m,"∩","\\cap",!0),o(u,p,m,"∪","\\cup",!0),o(u,p,m,"∖","\\setminus",!0),o(u,p,m,"∧","\\land"),o(u,p,m,"∨","\\lor"),o(u,p,m,"∧","\\wedge",!0),o(u,p,m,"∨","\\vee",!0),o(u,p,g,"√","\\surd"),o(u,p,mc,"⟨","\\langle",!0),o(u,p,mc,"∣","\\lvert"),o(u,p,mc,"∥","\\lVert"),o(u,p,Rl,"?","?"),o(u,p,Rl,"!","!"),o(u,p,Rl,"⟩","\\rangle",!0),o(u,p,Rl,"∣","\\rvert"),o(u,p,Rl,"∥","\\rVert"),o(u,p,f,"=","="),o(u,p,f,":",":"),o(u,p,f,"≈","\\approx",!0),o(u,p,f,"≅","\\cong",!0),o(u,p,f,"≥","\\ge"),o(u,p,f,"≥","\\geq",!0),o(u,p,f,"←","\\gets"),o(u,p,f,">","\\gt",!0),o(u,p,f,"∈","\\in",!0),o(u,p,f,"","\\@not"),o(u,p,f,"⊂","\\subset",!0),o(u,p,f,"⊃","\\supset",!0),o(u,p,f,"⊆","\\subseteq",!0),o(u,p,f,"⊇","\\supseteq",!0),o(u,y,f,"⊈","\\nsubseteq",!0),o(u,y,f,"⊉","\\nsupseteq",!0),o(u,p,f,"⊨","\\models"),o(u,p,f,"←","\\leftarrow",!0),o(u,p,f,"≤","\\le"),o(u,p,f,"≤","\\leq",!0),o(u,p,f,"<","\\lt",!0),o(u,p,f,"→","\\rightarrow",!0),o(u,p,f,"→","\\to"),o(u,y,f,"≱","\\ngeq",!0),o(u,y,f,"≰","\\nleq",!0),o(u,p,fc," ","\\ "),o(u,p,fc," ","\\space"),o(u,p,fc," ","\\nobreakspace"),o(d,p,fc," ","\\ "),o(d,p,fc," "," "),o(d,p,fc," ","\\space"),o(d,p,fc," ","\\nobreakspace"),o(u,p,fc,null,"\\nobreak"),o(u,p,fc,null,"\\allowbreak"),o(u,p,Pl,",",","),o(u,p,Pl,";",";"),o(u,y,m,"⊼","\\barwedge",!0),o(u,y,m,"⊻","\\veebar",!0),o(u,p,m,"⊙","\\odot",!0),o(u,p,m,"⊕","\\oplus",!0),o(u,p,m,"⊗","\\otimes",!0),o(u,p,g,"∂","\\partial",!0),o(u,p,m,"⊘","\\oslash",!0),o(u,y,m,"⊚","\\circledcirc",!0),o(u,y,m,"⊡","\\boxdot",!0),o(u,p,m,"△","\\bigtriangleup"),o(u,p,m,"▽","\\bigtriangledown"),o(u,p,m,"†","\\dagger"),o(u,p,m,"⋄","\\diamond"),o(u,p,m,"⋆","\\star"),o(u,p,m,"◃","\\triangleleft"),o(u,p,m,"▹","\\triangleright"),o(u,p,mc,"{","\\{"),o(d,p,g,"{","\\{"),o(d,p,g,"{","\\textbraceleft"),o(u,p,Rl,"}","\\}"),o(d,p,g,"}","\\}"),o(d,p,g,"}","\\textbraceright"),o(u,p,mc,"{","\\lbrace"),o(u,p,Rl,"}","\\rbrace"),o(u,p,mc,"[","\\lbrack",!0),o(d,p,g,"[","\\lbrack",!0),o(u,p,Rl,"]","\\rbrack",!0),o(d,p,g,"]","\\rbrack",!0),o(u,p,mc,"(","\\lparen",!0),o(u,p,Rl,")","\\rparen",!0),o(d,p,g,"<","\\textless",!0),o(d,p,g,">","\\textgreater",!0),o(u,p,mc,"⌊","\\lfloor",!0),o(u,p,Rl,"⌋","\\rfloor",!0),o(u,p,mc,"⌈","\\lceil",!0),o(u,p,Rl,"⌉","\\rceil",!0),o(u,p,g,"\\","\\backslash"),o(u,p,g,"∣","|"),o(u,p,g,"∣","\\vert"),o(d,p,g,"|","\\textbar",!0),o(u,p,g,"∥","\\|"),o(u,p,g,"∥","\\Vert"),o(d,p,g,"∥","\\textbardbl"),o(d,p,g,"~","\\textasciitilde"),o(d,p,g,"\\","\\textbackslash"),o(d,p,g,"^","\\textasciicircum"),o(u,p,f,"↑","\\uparrow",!0),o(u,p,f,"⇑","\\Uparrow",!0),o(u,p,f,"↓","\\downarrow",!0),o(u,p,f,"⇓","\\Downarrow",!0),o(u,p,f,"↕","\\updownarrow",!0),o(u,p,f,"⇕","\\Updownarrow",!0),o(u,p,ac,"∐","\\coprod"),o(u,p,ac,"⋁","\\bigvee"),o(u,p,ac,"⋀","\\bigwedge"),o(u,p,ac,"⨄","\\biguplus"),o(u,p,ac,"⋂","\\bigcap"),o(u,p,ac,"⋃","\\bigcup"),o(u,p,ac,"∫","\\int"),o(u,p,ac,"∫","\\intop"),o(u,p,ac,"∬","\\iint"),o(u,p,ac,"∭","\\iiint"),o(u,p,ac,"∏","\\prod"),o(u,p,ac,"∑","\\sum"),o(u,p,ac,"⨂","\\bigotimes"),o(u,p,ac,"⨁","\\bigoplus"),o(u,p,ac,"⨀","\\bigodot"),o(u,p,ac,"∮","\\oint"),o(u,p,ac,"∯","\\oiint"),o(u,p,ac,"∰","\\oiiint"),o(u,p,ac,"⨆","\\bigsqcup"),o(u,p,ac,"∫","\\smallint"),o(d,p,$l,"…","\\textellipsis"),o(u,p,$l,"…","\\mathellipsis"),o(d,p,$l,"…","\\ldots",!0),o(u,p,$l,"…","\\ldots",!0),o(u,p,$l,"⋯","\\@cdots",!0),o(u,p,$l,"⋱","\\ddots",!0),o(u,p,g,"⋮","\\varvdots"),o(u,p,sc,"ˊ","\\acute"),o(u,p,sc,"ˋ","\\grave"),o(u,p,sc,"¨","\\ddot"),o(u,p,sc,"~","\\tilde"),o(u,p,sc,"ˉ","\\bar"),o(u,p,sc,"˘","\\breve"),o(u,p,sc,"ˇ","\\check"),o(u,p,sc,"^","\\hat"),o(u,p,sc,"⃗","\\vec"),o(u,p,sc,"˙","\\dot"),o(u,p,sc,"˚","\\mathring"),o(u,p,ms,"","\\@imath"),o(u,p,ms,"","\\@jmath"),o(u,p,g,"ı","ı"),o(u,p,g,"ȷ","ȷ"),o(d,p,g,"ı","\\i",!0),o(d,p,g,"ȷ","\\j",!0),o(d,p,g,"ß","\\ss",!0),o(d,p,g,"æ","\\ae",!0),o(d,p,g,"œ","\\oe",!0),o(d,p,g,"ø","\\o",!0),o(d,p,g,"Æ","\\AE",!0),o(d,p,g,"Œ","\\OE",!0),o(d,p,g,"Ø","\\O",!0),o(d,p,sc,"ˊ","\\'"),o(d,p,sc,"ˋ","\\`"),o(d,p,sc,"ˆ","\\^"),o(d,p,sc,"˜","\\~"),o(d,p,sc,"ˉ","\\="),o(d,p,sc,"˘","\\u"),o(d,p,sc,"˙","\\."),o(d,p,sc,"¸","\\c"),o(d,p,sc,"˚","\\r"),o(d,p,sc,"ˇ","\\v"),o(d,p,sc,"¨",'\\"'),o(d,p,sc,"˝","\\H"),o(d,p,sc,"◯","\\textcircled"),ys={"--":!0,"---":!0,"``":!0,"''":!0},o(d,p,g,"–","--",!0),o(d,p,g,"–","\\textendash"),o(d,p,g,"—","---",!0),o(d,p,g,"—","\\textemdash"),o(d,p,g,"‘","`",!0),o(d,p,g,"‘","\\textquoteleft"),o(d,p,g,"’","'",!0),o(d,p,g,"’","\\textquoteright"),o(d,p,g,"“","``",!0),o(d,p,g,"“","\\textquotedblleft"),o(d,p,g,"”","''",!0),o(d,p,g,"”","\\textquotedblright"),o(u,p,g,"°","\\degree",!0),o(d,p,g,"°","\\degree"),o(d,p,g,"°","\\textdegree",!0),o(u,p,g,"£","\\pounds"),o(u,p,g,"£","\\mathsterling",!0),o(d,p,g,"£","\\pounds"),o(d,p,g,"£","\\textsterling",!0),o(u,y,g,"✠","\\maltese"),o(d,y,g,"✠","\\maltese"),vs='0123456789/@."',bs=0;bs{if(ts(e.classes)!==ts(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 n in e.style)if(e.style.hasOwnProperty(n)&&e.style[n]!==t.style[n])return!1;for(var i in t.style)if(t.style.hasOwnProperty(i)&&e.style[i]!==t.style[i])return!1;return!0},"canCombine"),m=mt(e=>{for(var t=0;tt&&(t=a.height),rnew as(e,t,r,n),"makeSvgSpan"),mc=mt(function(e,t,r){return(e=qs([e],[],t)).height=Math.max(r||t.fontMetrics().defaultRuleThickness,t.minRuleThickness),e.style.borderBottomWidth=K(e.height),e.maxFontSize=1,e},"makeLineSpan"),Rl=mt(function(e,t,r,n){return e=new ss(e,t,r,n),Us(e),e},"makeAnchor"),Ws=mt(function(e){return e=new Ua(e),Us(e),e},"makeFragment"),f=mt(function(e,t){return e instanceof Ua?qs([],[e],t):e},"wrapFragment"),Ys=mt(function(e){if("individualShift"===e.positionType){for(var t=e.children,r=[t[0]],n=-t[0].shift-t[0].elem.depth,i=n,a=1;a{var r=qs(["mspace"],[],t),e=es(e,t);return r.style.marginRight=K(e),r},"makeGlue"),Hs=mt(function(e,t,r){var n="";switch(e){case"amsrm":n="AMS";break;case"textrm":n="Main";break;case"textsf":n="SansSerif";break;case"texttt":n="Typewriter";break;default:n=e}return n+"-"+("textbf"===t&&"textit"===r?"BoldItalic":"textbf"===t?"Bold":"textit"===t?"Italic":"Regular")},"retrieveTextFontName"),Vs={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"},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"}},Xs={vec:["vec",.471,.714],oiintSize1:["oiintSize1",.957,.499],oiintSize2:["oiintSize2",1.472,.659],oiiintSize1:["oiiintSize1",1.304,.499],oiiintSize2:["oiiintSize2",1.98,.659]},sc=mt(function(e,t){var[e,r,n]=Xs[e],e=new us(e),e=new hs([e],{width:K(r),height:K(n),style:"width:"+K(r),viewBox:"0 0 "+1e3*r+" "+1e3*n,preserveAspectRatio:"xMinYMin"});return(e=js(["overlay"],[e],t)).height=n,e.style.height=K(n),e.style.width=K(r),e},"staticSvg"),Z={fontMap:Vs,makeSymbol:Fs,mathsym:fc,makeSpan:qs,makeSvgSpan:js,makeLineSpan:mc,makeAnchor:Rl,makeFragment:Ws,wrapFragment:f,makeVList:ac,makeOrd:Pl,makeGlue:$l,staticSvg:sc,svgData:Xs,tryCombineChars:m},Ks={mord:{mop:y={number:3,unit:"mu"},mbin:fc={number:4,unit:"mu"},mrel:mc={number:5,unit:"mu"},minner:y},mop:{mord:y,mop:y,mrel:mc,minner:y},mbin:{mord:fc,mop:fc,mopen:fc,minner:fc},mrel:{mord:mc,mop:mc,mopen:mc,minner:mc},mopen:{},mclose:{mop:y,mbin:fc,mrel:mc,minner:y},mpunct:{mord:y,mop:y,mrel:mc,mopen:y,mclose:y,mpunct:y,minner:y},minner:{mord:y,mop:y,mbin:fc,mrel:mc,mopen:y,mpunct:y,minner:y}},Zs={mord:{mop:y},mop:{mord:y,mop:y},mbin:{},mrel:{},mopen:{},mclose:{mop:y},mpunct:{},minner:{mop:y}},Qs={},Js={},eo={},mt(l,"defineFunction"),mt(Wi,"defineFunctionBuilders"),to=mt(function(e){return"ordgroup"===e.type&&1===e.body.length?e.body[0]:e},"normalizeArgument"),ro=mt(function(e){return"ordgroup"===e.type?e.body:[e]},"ordargument"),no=Z.makeSpan,io=["leftmost","mbin","mopen","mrel","mop","mpunct"],ao=["rightmost","mrel","mclose","mpunct"],so={display:Aa.DISPLAY,text:Aa.TEXT,script:Aa.SCRIPT,scriptscript:Aa.SCRIPTSCRIPT},oo={mord:"mord",mop:"mop",mbin:"mbin",mrel:"mrel",mopen:"mopen",mclose:"mclose",mpunct:"mpunct",minner:"minner"},lo=mt(function(e,t,r,n){void 0===n&&(n=[null,null]);for(var i,a,s=[],o=0;o{var r=t.classes[0],n=e.classes[0];"mbin"===r&&va.contains(ao,n)?t.classes[0]="mord":"mbin"===n&&va.contains(io,r)&&(e.classes[0]="mord")},{node:a},n,r="root"===r),co(s,(e,t)=>{var t=po(t),r=po(e);if(e=t&&r?(e.hasClass("mtight")?Zs:Ks)[t][r]:null)return Z.makeGlue(e,i)},{node:a},n,r)),s},"buildExpression"),co=mt(function e(r,t,n,i,a){i&&r.push(i);for(var s=0;se=>{r.splice(t+1,0,e),s++})(s))}i&&r.pop()},"traverseNonSpaceNodes"),ho=mt(function(e){return e instanceof Ua||e instanceof ss||e instanceof as&&e.hasClass("enclosing")?e:null},"checkPartialGroup"),uo=mt(function e(t,r){var n=ho(t);if(n&&(n=n.children).length){if("right"===r)return e(n[n.length-1],"right");if("left"===r)return e(n[0],"left")}return t},"getOutermostNode"),po=mt(function(e,t){return e&&(t&&(e=uo(e,t)),oo[e.classes[0]])||null},"getTypeOfDomTree"),go=mt(function(e,t){return e=["nulldelimiter"].concat(e.baseSizingClasses()),no(t.concat(e))},"makeNullDelimiter"),fo=mt(function(e,t,r){if(!e)return no();var n;if(Js[e.type])return n=Js[e.type](e,t),r&&t.size!==r.size&&(n=no(t.sizingClasses(r),[n],t),t=t.sizeMultiplier/r.sizeMultiplier,n.height*=t,n.depth*=t),n;throw new X("Got group of unknown type: '"+e.type+"'")},"buildGroup"),mt(Yi,"buildHTMLUnbreakable"),mt(Hi,"buildHTML"),mt(Vi,"newDocumentFragment"),mo=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("")}},yo=class{static{mt(this,"TextNode")}constructor(e){this.text=void 0,this.text=e}toNode(){return document.createTextNode(this.text)}toMarkup(){return va.escape(this.toText())}toText(){return this.text}},Rl=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||" "}},E={MathNode:mo,TextNode:yo,SpaceNode:Rl,newDocumentFragment:Vi},vo=mt(function(e,t,r){return!fs[t][e]||!fs[t][e].replace||55349===e.charCodeAt(0)||ys.hasOwnProperty(e)&&r&&(r.fontFamily&&"tt"===r.fontFamily.slice(4,6)||r.font&&"tt"===r.font.slice(4,6))||(e=fs[t][e].replace),new E.TextNode(e)},"makeText"),xo=mt(function(e){return 1===e.length?e[0]:new E.MathNode("mrow",e)},"makeRow"),bo=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":"mathfrak"===t?"fraktur":"mathscr"===t||"mathcal"===t?"script":"mathsf"===t?"sans-serif":"mathtt"===t?"monospace":!va.contains(["\\imath","\\jmath"],e=e.text)&&Gi(e=fs[r][e]&&fs[r][e].replace?fs[r][e].replace:e,Z.fontMap[t].fontName,r)?Z.fontMap[t].variant:null):null},"getVariant"),wo=mt(function(e,t,r){var n;if(1===e.length)return n=To(e[0],t),r&&n instanceof mo&&"mo"===n.type&&(n.setAttribute("lspace","0em"),n.setAttribute("rspace","0em")),[n];for(var i,a=[],s=0;s{e&&"supsub"===e.type?(o=(r=Ki(e.base,"accent")).base,e.base=o,n=ji(fo(e,t)),e.base=r):o=(r=Ki(e,"accent")).base;var r,n,i,a,e=fo(o,t.havingCrampedStyle()),s=0,o=(r.isShifty&&va.isCharacterBox(o)&&(o=va.getBaseElem(o),s=qi(fo(o,t.havingCrampedStyle())).skew),"\\c"===r.label),l=o?e.height+e.depth:Math.min(e.height,t.fontMetrics().xHeight),c=r.isStretchy?(c=Io.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?Io.mathMLnode(e.label):new E.MathNode("mo",[vo(e.label,e.mode)]);return(e=new E.MathNode("mover",[To(e.base,t),r])).setAttribute("accent","true"),e},"mathmlBuilder$9"),Mo=new RegExp(["\\acute","\\grave","\\ddot","\\tilde","\\bar","\\breve","\\check","\\hat","\\vec","\\dot","\\mathring"].map(e=>"\\"+e).join("|")),l({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=to(t[0]),r=!Mo.test(e.funcName),n=!r||"\\widehat"===e.funcName||"\\widetilde"===e.funcName||"\\widecheck"===e.funcName;return{type:"accent",mode:e.parser.mode,label:e.funcName,isStretchy:r,isShifty:n,base:t}},"handler"),htmlBuilder:Ro,mathmlBuilder:$l}),l({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:Ro,mathmlBuilder:$l}),l({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=fo(e.base,t),n=Io.svgSpan(e,t),e="\\utilde"===e.label?.12:0,n=Z.makeVList({positionType:"top",positionData:r.height,children:[{type:"elem",elem:n,wrapperClasses:["svg-align"]},{type:"kern",size:e},{type:"elem",elem:r}]},t);return Z.makeSpan(["mord","accentunder"],[n],t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>{var r=Io.mathMLnode(e.label);return(e=new E.MathNode("munder",[To(e.base,t),r])).setAttribute("accentunder","true"),e},"mathmlBuilder")}),Do=mt(e=>((e=new E.MathNode("mpadded",e?[e]:[])).setAttribute("width","+0.6em"),e.setAttribute("lspace","0.3em"),e),"paddedNode"),l({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:n}=e;return{type:"xArrow",mode:e.mode,label:n,body:t[0],below:r[0]}},htmlBuilder(e,t){var r,n=t.style,i=t.havingStyle(n.sup()),a=Z.wrapFragment(fo(e.body,i,t),t),s="\\x"===e.label.slice(0,2)?"x":"cd",n=(a.classes.push(s+"-arrow-pad"),e.below&&(i=t.havingStyle(n.sub()),(r=Z.wrapFragment(fo(e.below,i,t),t)).classes.push(s+"-arrow-pad")),Io.svgSpan(e,t)),i=-t.fontMetrics().axisHeight+.5*n.height,s=-t.fontMetrics().axisHeight-.5*n.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"),l({type:"mclass",names:["\\@binrel"],props:{numArgs:2},handler(e,t){return{type:"mclass",mode:(e=e.parser).mode,mclass:Po(t[0]),body:ro(t[1]),isCharacterBox:va.isCharacterBox(t[1])}}}),l({type:"mclass",names:["\\stackrel","\\overset","\\underset"],props:{numArgs:2},handler(e,t){var{parser:e,funcName:r}=e,n=t[1],t=t[0],i="\\stackrel"!==r?Po(n):"mrel",n={type:"op",mode:n.mode,limits:!0,alwaysHandleSupSub:!0,parentIsSupSub:!1,symbol:!1,suppressBaseShift:"\\stackrel"!==r,body:ro(n)},n={type:"supsub",mode:t.mode,base:n,sup:"\\underset"===r?null:t,sub:"\\underset"===r?t:null};return{type:"mclass",mode:e.mode,mclass:i,body:[n],isCharacterBox:va.isCharacterBox(n)}},htmlBuilder:Ji,mathmlBuilder:ea}),l({type:"pmb",names:["\\pmb"],props:{numArgs:1,allowedInText:!0},handler(e,t){return{type:"pmb",mode:(e=e.parser).mode,mclass:Po(t[0]),body:ro(t[0])}},htmlBuilder(e,t){var r=lo(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=wo(e.body,t),(t=new E.MathNode("mstyle",e)).setAttribute("style","text-shadow: 0.02em 0.01em 0.04px"),t}}),Bo={">":"\\\\cdrightarrow","<":"\\\\cdleftarrow","=":"\\\\cdlongequal",A:"\\uparrow",V:"\\downarrow","|":"\\Vert",".":"no arrow"},$o=mt(()=>({type:"styling",body:[],mode:"math",style:"display"}),"newCell"),Fo=mt(e=>"textord"===e.type&&"@"===e.text,"isStartOfArrow"),zo=mt((e,t)=>("mathord"===e.type||"atom"===e.type)&&e.text===t,"isLabelEnd"),mt(ta,"cdArrow"),mt(ra,"parseCD"),l({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(fo(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 E.MathNode("mrow",[To(e.label,t)]),(t=new E.MathNode("mpadded",[t])).setAttribute("width","0"),"left"===e.side&&t.setAttribute("lspace","-1width"),t.setAttribute("voffset","0.7em"),(t=new E.MathNode("mstyle",[t])).setAttribute("displaystyle","false"),t.setAttribute("scriptlevel","1"),t}}),l({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(fo(e.fragment,t),t)).classes.push("cd-vert-arrow"),e},mathmlBuilder(e,t){return new E.MathNode("mrow",[To(e.fragment,t)])}}),l({type:"textord",names:["\\@char"],props:{numArgs:1,allowedInText:!0},handler(e,t){for(var e=e.parser,r=Ki(t[0],"ordgroup").body,n="",i=0;i>10),56320+(1023&t))),{type:"textord",mode:e.mode,text:t}}}),sc=mt((e,t)=>(t=lo(e.body,t.withColor(e.color),!1),Z.makeFragment(t)),"htmlBuilder$8"),m=mt((e,t)=>(t=wo(e.body,t.withColor(e.color)),(t=new E.MathNode("mstyle",t)).setAttribute("mathcolor",e.color),t),"mathmlBuilder$7"),l({type:"color",names:["\\textcolor"],props:{numArgs:2,allowedInText:!0,argTypes:["color","original"]},handler(e,t){var e=e.parser,r=Ki(t[0],"color-token").color;return{type:"color",mode:e.mode,color:r,body:ro(t[1])}},htmlBuilder:sc,mathmlBuilder:m}),l({type:"color",names:["\\color"],props:{numArgs:1,allowedInText:!0,argTypes:["color"]},handler(e,t){var{parser:e,breakOnTokenText:r}=e,t=Ki(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:sc,mathmlBuilder:m}),l({type:"cr",names:["\\\\"],props:{numArgs:0,numOptionalArgs:0,allowedInText:!0},handler(e,t,r){var n="["===(e=e.parser).gullet.future().text?e.parseSizeGroup(!0):null,i=!e.settings.displayMode||!e.settings.useStrictBehavior("newLineInDisplayMode","In LaTeX, \\\\ or \\newline does nothing in display mode");return{type:"cr",mode:e.mode,newLine:i,size:n&&Ki(n,"size").value}},htmlBuilder(e,t){var r=Z.makeSpan(["mspace"],[],t);return e.newLine&&(r.classes.push("newline"),e.size)&&(r.style.marginTop=K(es(e.size,t))),r},mathmlBuilder(e,t){var r=new E.MathNode("mspace");return e.newLine&&(r.setAttribute("linebreak","newline"),e.size)&&r.setAttribute("height",K(es(e.size,t))),r}}),Go={"\\global":"\\global","\\long":"\\\\globallong","\\\\globallong":"\\\\globallong","\\def":"\\gdef","\\gdef":"\\gdef","\\edef":"\\xdef","\\xdef":"\\xdef","\\let":"\\\\globallet","\\futurelet":"\\\\globalfuture"},Uo=mt(e=>{var t=e.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(t))throw new X("Expected a control sequence",e);return t},"checkControlSequence"),qo=mt(e=>{var t=e.gullet.popToken();return"="===t.text&&" "===(t=e.gullet.popToken()).text?e.gullet.popToken():t},"getRHS"),jo=mt((e,t,r,n)=>{var i=e.gullet.macros.get(r.text);null==i&&(r.noexpand=!0,i={tokens:[r],numArgs:0,unexpandable:!e.gullet.isExpandable(r.text)}),e.gullet.macros.set(t,i,n)},"letCommand"),l({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(Go[r.text])return"\\global"!==t&&"\\\\globallong"!==t||(r.text=Go[r.text]),Ki(e.parseFunction(),"internal");throw new X("Invalid token after macro prefix",r)}}),l({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(),n=r.text;if(/^(?:[\\{}$&#^_]|EOF)$/.test(n))throw new X("Expected a control sequence",r);for(var i,a=0,s=[[]];"{"!==t.gullet.future().text;)if("#"===(r=t.gullet.popToken()).text){if("{"===t.gullet.future().text){i=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 i&&o.unshift(i),"\\edef"!==e&&"\\xdef"!==e||(o=t.gullet.expandTokens(o)).reverse(),t.gullet.macros.set(n,{tokens:o,numArgs:a,delimiters:s},e===Go[e]),{type:"internal",mode:t.mode}}}),l({type:"internal",names:["\\let","\\\\globallet"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:e,funcName:t}=e,r=Uo(e.gullet.popToken()),n=(e.gullet.consumeSpaces(),qo(e));return jo(e,r,n,"\\\\globallet"===t),{type:"internal",mode:e.mode}}}),l({type:"internal",names:["\\futurelet","\\\\globalfuture"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e){var{parser:e,funcName:t}=e,r=Uo(e.gullet.popToken()),n=e.gullet.popToken(),i=e.gullet.popToken();return jo(e,r,i,"\\\\globalfuture"===t),e.gullet.pushToken(i),e.gullet.pushToken(n),{type:"internal",mode:e.mode}}}),Wo=mt(function(e,t,r){if(r=Gi(fs.math[e]&&fs.math[e].replace||e,t,r))return r;throw new Error("Unsupported symbol "+e+" and font size "+t+".")},"getMetrics"),Yo=mt(function(e,t,r,n){return t=r.havingBaseStyle(t),n=Z.makeSpan(n.concat(t.sizingClasses(r)),[e],r),e=t.sizeMultiplier/r.sizeMultiplier,n.height*=e,n.depth*=e,n.maxFontSize=t.sizeMultiplier,n},"styleWrap"),Ho=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"),Vo=mt(function(e,t,r,n,i,a){return e=Z.makeSymbol(e,"Main-Regular",i,n),i=Yo(e,t,n,a),r&&Ho(i,n,t),i},"makeSmallDelim"),Xo=mt(function(e,t,r,n){return Z.makeSymbol(e,"Size"+t+"-Regular",r,n)},"mathrmSize"),Ko=mt(function(e,t,r,n,i,a){return e=Xo(e,t,i,n),i=Yo(Z.makeSpan(["delimsizing","size"+t],[e],n),Aa.TEXT,n,a),r&&Ho(i,n,Aa.TEXT),i},"makeLargeDelim"),Zo=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"),Qo=mt(function(e,t,r){var n=(qa["Size4-Regular"][e.charCodeAt(0)]?qa["Size4-Regular"]:qa["Size1-Regular"])[e.charCodeAt(0)][4],e=new us("inner",Fa(e,Math.round(1e3*t))),e=new hs([e],{width:K(n),height:K(t),style:"width:"+K(n),viewBox:"0 0 "+1e3*n+" "+Math.round(1e3*t),preserveAspectRatio:"xMinYMin"});return(e=Z.makeSvgSpan([],[e],r)).height=t,e.style.height=K(t),e.style.width=K(n),{type:"elem",elem:e}},"makeInner"),Jo={type:"kern",size:-.008},el=["|","\\lvert","\\rvert","\\vert"],tl=["\\|","\\lVert","\\rVert","\\Vert"],rl=mt(function(e,t,r,n,i,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"):va.contains(el,e)?(s="∣",c="vert",h=333):va.contains(tl,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=Wo(u,p,i)).height+e.depth),g=(g=Wo(s,p,i)).height+g.depth,f=(f=Wo(o,p,i)).height+f.depth,m=0,y=1,t=(null!==d&&(m=(v=Wo(d,p,i)).height+v.depth,y=2),(v=e+f+m)+Math.max(0,Math.ceil((t-v)/(y*g)))*y*g),v=n.fontMetrics().axisHeight,y=(r&&(v*=n.sizeMultiplier),t/2-v),g=[],v=(0","\\langle","\\rangle","/","\\backslash","\\lt","\\gt"],ol=[0,1.2,1.8,2.4,3],mc=mt(function(e,t,r,n,i){if("<"===e||"\\lt"===e||"⟨"===e?e="\\langle":">"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle"),va.contains(il,e)||va.contains(sl,e))return Ko(e,t,!1,r,n,i);if(va.contains(al,e))return rl(e,ol[t],!1,r,n,i);throw new X("Illegal delimiter: '"+e+"'")},"makeSizedDelim"),ll=[{type:"small",style:Aa.SCRIPTSCRIPT},{type:"small",style:Aa.SCRIPT},{type:"small",style:Aa.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4}],cl=[{type:"small",style:Aa.SCRIPTSCRIPT},{type:"small",style:Aa.SCRIPT},{type:"small",style:Aa.TEXT},{type:"stack"}],hl=[{type:"small",style:Aa.SCRIPTSCRIPT},{type:"small",style:Aa.SCRIPT},{type:"small",style:Aa.TEXT},{type:"large",size:1},{type:"large",size:2},{type:"large",size:3},{type:"large",size:4},{type:"stack"}],ul=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"),dl=mt(function(e,t,r,n){for(var i=Math.min(2,3-n.style.size);i"!==e&&"\\gt"!==e&&"⟩"!==e||(e="\\rangle");var s=va.contains(sl,e)?ll:va.contains(il,e)?hl:cl;return"small"===(s=dl(e,t,s,n)).type?Vo(e,s.style,r,n,i,a):"large"===s.type?Ko(e,s.size,r,n,i,a):rl(e,t,r,n,i,a)},"makeCustomSizedDelim"),y=mt(function(e,t,r,n,i,a){var s=n.fontMetrics().axisHeight*n.sizeMultiplier,o=5/n.fontMetrics().ptPerEm,t=Math.max(t-s,r+s),r=Math.max(t/500*901,2*t-o);return pl(e,r,!0,n,i,a)},"makeLeftRightDelim"),gl={sqrtImage:fc,sizedDelim:mc,sizeToMaxHeight:ol,customSizedDelim:pl,leftRightDelim:y},fl={"\\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}},ml=["(","\\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(na,"checkDelimiter"),l({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=na(t[0],e),{type:"delimsizing",mode:e.parser.mode,size:fl[e.funcName].size,mclass:fl[e.funcName].mclass,delim:t.text}),"handler"),htmlBuilder:mt((e,t)=>"."===e.delim?Z.makeSpan([e.mclass]):gl.sizedDelim(e.delim,e.size,t,e.mode,[e.mclass]),"htmlBuilder"),mathmlBuilder:mt(e=>{var t=[],t=("."!==e.delim&&t.push(vo(e.delim,e.mode)),new E.MathNode("mo",t)),e=("mopen"===e.mclass||"mclose"===e.mclass?t.setAttribute("fence","true"):t.setAttribute("fence","false"),t.setAttribute("stretchy","true"),K(gl.sizeToMaxHeight[e.size]));return t.setAttribute("minsize",e),t.setAttribute("maxsize",e),t},"mathmlBuilder")}),mt(ia,"assertParsed"),l({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:na(t[0],e).text,color:r}},"handler")}),l({type:"leftright",names:["\\left"],props:{numArgs:1,primitive:!0},handler:mt((e,t)=>{var t=na(t[0],e),r=(++(e=e.parser).leftrightDepth,e.parseExpression(!1)),n=(--e.leftrightDepth,e.expect("\\right",!1),Ki(e.parseFunction(),"leftright-right"));return{type:"leftright",mode:e.mode,body:r,left:t.text,right:n.delim,rightColor:n.color}},"handler"),htmlBuilder:mt((e,t)=>{ia(e);for(var r,n=lo(e.body,t,!0,["mopen","mclose"]),i=0,a=0,s=!1,o=0;o{ia(e);var r,t=wo(e.body,t);return"."!==e.left&&((r=new E.MathNode("mo",[vo(e.left,e.mode)])).setAttribute("fence","true"),t.unshift(r)),"."!==e.right&&((r=new E.MathNode("mo",[vo(e.right,e.mode)])).setAttribute("fence","true"),e.rightColor&&r.setAttribute("mathcolor",e.rightColor),t.push(r)),xo(t)},"mathmlBuilder")}),l({type:"middle",names:["\\middle"],props:{numArgs:1,primitive:!0},handler:mt((e,t)=>{if(t=na(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=go(t,[]):(r=gl.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?vo("|","text"):vo(e.delim,e.mode),(e=new E.MathNode("mo",[e])).setAttribute("fence","true"),e.setAttribute("lspace","0.05em"),e.setAttribute("rspace","0.05em"),e),"mathmlBuilder")}),Rl=mt((e,t)=>{var r,n,i,a,s,o=Z.wrapFragment(fo(e.body,t),t),l=e.label.slice(1),c=t.sizeMultiplier,h=0,u=va.isCharacterBox(e.body);return"sout"===l?((r=Z.makeSpan(["stretchy","sout"])).height=t.fontMetrics().defaultRuleThickness/c,h=-.5*t.fontMetrics().xHeight):"phase"===l?(a=es({number:.6,unit:"pt"},t),s=es({number:.35,unit:"ex"},t),c/=t.havingBaseSizing().sizeMultiplier,n=o.height+o.depth+a+s,o.style.paddingLeft=K(n/2+a),c=Math.floor(1e3*n*c),i=Pa(c),i=new hs([new us("phase",i)],{width:"400em",height:K(c/1e3),viewBox:"0 0 400000 "+c,preserveAspectRatio:"xMinYMin slice"}),(r=Z.makeSvgSpan(["hide-tail"],[i],t)).style.height=K(n),h=o.depth+a+s):(/cancel/.test(l)?u||o.classes.push("cancel-pad"):"angl"===l?o.classes.push("anglpad"):o.classes.push("boxpad"),n=i=c=0,i=/box/.test(l)?(n=Math.max(t.fontMetrics().fboxrule,t.minRuleThickness),c=t.fontMetrics().fboxsep+("colorbox"===l?0:n)):"angl"===l?(c=4*(n=Math.max(t.fontMetrics().defaultRuleThickness,t.minRuleThickness)),Math.max(0,.25-o.depth)):c=u?.2:0,r=Io.encloseSpan(o,l,c,i,t),/fbox|boxed|fcolorbox/.test(l)?(r.style.borderStyle="solid",r.style.borderWidth=K(n)):"angl"===l&&.049!==n&&(r.style.borderTopWidth=K(n),r.style.borderRightWidth=K(n)),h=o.depth+i,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"),Pl=mt((e,t)=>{var r=new E.MathNode(-1{if(!e.parser.settings.displayMode)throw new X("{"+e.envName+"} can be used only in display mode.")},"validateAmsEnvironmentContext"),mt(oa,"getAutoTag"),mt(la,"parseArray"),mt(ca,"dCellStyle"),f=mt(function(e,t){var r=e.body.length,P=e.hLinesBeforeRow,n=0,i=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(Aa.SCRIPT).sizeMultiplier/t.sizeMultiplier*.2778),"CD"===e.colSeparationType?es({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(M=0;Me.length)),i.cols=new Array(n).fill({type:"align",align:r}),t?{type:"leftright",mode:e.mode,body:[i],left:t[0],right:t[1],rightColor:void 0}:i},htmlBuilder:f,mathmlBuilder:ac}),aa({type:"array",names:["smallmatrix"],props:{numArgs:0},handler(e){return(e=la(e.parser,{arraystretch:.5},"script")).colSeparationType="small",e},htmlBuilder:f,mathmlBuilder:ac}),aa({type:"array",names:["subarray"],props:{numArgs:1},handler(e,t){if(1<(t=(Qi(t[0])?[t[0]]:Ki(t[0],"ordgroup").body).map(function(e){var t=Zi(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=la(e.parser,{cols:t,hskipBeforeAndAfter:!1,arraystretch:.5},"script")).body.length&&1{var r=e.font,t=t.withFont(r);return fo(e.body,t)},"htmlBuilder$5"),m=mt((e,t)=>{var r=e.font,t=t.withFont(r);return To(e.body,t)},"mathmlBuilder$4"),kl={"\\Bbb":"\\mathbb","\\bold":"\\mathbf","\\frak":"\\mathfrak","\\bm":"\\boldsymbol"},l({type:"font",names:["\\mathrm","\\mathit","\\mathbf","\\mathnormal","\\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=to(t[0]);return{type:"font",mode:e.mode,font:(r=r in kl?kl[r]:r).slice(1),body:t}},"handler"),htmlBuilder:sc,mathmlBuilder:m}),l({type:"mclass",names:["\\boldsymbol","\\bm"],props:{numArgs:1},handler:mt((e,t)=>{var e=e.parser,t=t[0],r=va.isCharacterBox(t);return{type:"mclass",mode:e.mode,mclass:Po(t),body:[{type:"font",mode:e.mode,font:"boldsymbol",body:t}],isCharacterBox:r}},"handler")}),l({type:"font",names:["\\rm","\\sf","\\tt","\\bf","\\it","\\cal"],props:{numArgs:0,allowedInText:!0},handler:mt((e,t)=>{var{parser:e,funcName:r,breakOnTokenText:n}=e,i=e.mode,n=e.parseExpression(!0,n);return{type:"font",mode:i,font:"math"+r.slice(1),body:{type:"ordgroup",mode:e.mode,body:n}}},"handler"),htmlBuilder:sc,mathmlBuilder:m}),Tl=mt((e,t)=>("display"===e?t=t.id>=Aa.SCRIPT.id?t.text():Aa.DISPLAY:"text"===e&&t.size===Aa.DISPLAY.size?t=Aa.TEXT:"script"===e?t=Aa.SCRIPT:"scriptscript"===e&&(t=Aa.SCRIPTSCRIPT),t),"adjustStyle"),fc=mt((e,t)=>{var r,n,i,a,s=Tl(e.size,t.style),o=s.fracNum(),l=s.fracDen(),o=t.havingStyle(o),c=fo(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 E.MathNode("mfrac",[To(e.numer,t),To(e.denom,t)]),n=(e.hasBarLine?e.barSize&&(n=es(e.barSize,t),r.setAttribute("linethickness",K(n))):r.setAttribute("linethickness","0px"),Tl(e.size,t.style));return n.size!==t.style.size&&(r=new E.MathNode("mstyle",[r]),t=n.size===Aa.DISPLAY.size?"true":"false",r.setAttribute("displaystyle",t),r.setAttribute("scriptlevel","0")),null!=e.leftDelim||null!=e.rightDelim?(n=[],null!=e.leftDelim&&((t=new E.MathNode("mo",[new E.TextNode(e.leftDelim.replace("\\",""))])).setAttribute("fence","true"),n.push(t)),n.push(r),null!=e.rightDelim&&((t=new E.MathNode("mo",[new E.TextNode(e.rightDelim.replace("\\",""))])).setAttribute("fence","true"),n.push(t)),xo(n)):r},"mathmlBuilder$3"),l({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:n}=e,i=t[0],t=t[1],a=null,s=null,o="auto";switch(n){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(n){case"\\dfrac":case"\\dbinom":o="display";break;case"\\tfrac":case"\\tbinom":o="text"}return{type:"genfrac",mode:e.mode,continued:!1,numer:i,denom:t,hasBarLine:r,leftDelim:a,rightDelim:s,size:o,barSize:null}},"handler"),htmlBuilder:fc,mathmlBuilder:mc}),l({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")}),l({type:"infix",names:["\\over","\\choose","\\atop","\\brace","\\brack"],props:{numArgs:0,infix:!0},handler(e){var t,{parser:e,funcName:r,token:n}=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:n}}}),El=["display","text","script","scriptscript"],Cl=mt(function(e){var t=null;return 0{var e=e.parser,r=t[0],n=ya(Ki(t[1],"infix").size),t=t[2],i=0{var r,n,i=t.style,i="supsub"===e.type?(r=e.sup?fo(e.sup,t.havingStyle(i.sup()),t):fo(e.sub,t.havingStyle(i.sub()),t),Ki(e.base,"horizBrace")):Ki(e,"horizBrace"),e=fo(i.base,t.havingBaseStyle(Aa.DISPLAY)),a=Io.svgSpan(i,t);return(i.isOver?(n=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:.1},{type:"elem",elem:a}]},t)).children[0].children[0].children[1]:(n=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",i.isOver?"mover":"munder"],[n],t),n=i.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",i.isOver?"mover":"munder"],[n],t)},"htmlBuilder$3"),y=mt((e,t)=>{var r=Io.mathMLnode(e.label);return new E.MathNode(e.isOver?"mover":"munder",[To(e.base,t),r])},"mathmlBuilder$2"),l({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:Sl,mathmlBuilder:y}),l({type:"href",names:["\\href"],props:{numArgs:2,argTypes:["url","original"],allowedInText:!0},handler:mt((e,t)=>{var e=e.parser,r=t[1],t=Ki(t[0],"url").url;return e.settings.isTrusted({command:"\\href",url:t})?{type:"href",mode:e.mode,href:t,body:ro(r)}:e.formatUnsupportedCmd("\\href")},"handler"),htmlBuilder:mt((e,t)=>{var r=lo(e.body,t,!1);return Z.makeAnchor(e.href,[],r,t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>((t=(t=ko(e.body,t))instanceof mo?t:new mo("mrow",[t])).setAttribute("href",e.href),t),"mathmlBuilder")}),l({type:"href",names:["\\url"],props:{numArgs:1,argTypes:["url"],allowedInText:!0},handler:mt((e,t)=>{var e=e.parser,r=Ki(t[0],"url").url;if(!e.settings.isTrusted({command:"\\url",url:r}))return e.formatUnsupportedCmd("\\url");for(var n=[],i=0;i{var{parser:e,funcName:r}=e,n=Ki(t[0],"raw").string,t=t[1];e.settings.strict&&e.settings.reportNonstrict("htmlExtension","HTML extension is disabled on strict mode");var i,a={};switch(r){case"\\htmlClass":i={command:"\\htmlClass",class:a.class=n};break;case"\\htmlId":i={command:"\\htmlId",id:a.id=n};break;case"\\htmlStyle":i={command:"\\htmlStyle",style:a.style=n};break;case"\\htmlData":for(var s=n.split(","),o=0;o{var r,n=lo(e.body,t,!1),i=["enclosing"],a=(e.attributes.class&&i.push(...e.attributes.class.trim().split(/\s+/)),Z.makeSpan(i,n,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)=>ko(e.body,t),"mathmlBuilder")}),l({type:"htmlmathml",names:["\\html@mathml"],props:{numArgs:2,allowedInText:!0},handler:mt((e,t)=>({type:"htmlmathml",mode:(e=e.parser).mode,html:ro(t[0]),mathml:ro(t[1])}),"handler"),htmlBuilder:mt((e,t)=>(e=lo(e.html,t,!1),Z.makeFragment(e)),"htmlBuilder"),mathmlBuilder:mt((e,t)=>ko(e.mathml,t),"mathmlBuilder")}),_l=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]},Ja(e))return e;throw new X("Invalid unit: '"+e.unit+"' in \\includegraphics.")},"sizeData"),l({type:"includegraphics",names:["\\includegraphics"],props:{numArgs:1,numOptionalArgs:1,argTypes:["raw","url"],allowedInText:!1},handler:mt((e,t,r)=>{var e=e.parser,n={number:0,unit:"em"},i={number:.9,unit:"em"},a={number:0,unit:"em"},s="";if(r[0])for(var o=Ki(r[0],"raw").string.split(","),l=0;l{var r=es(e.height,t),n=0,i=(0{var r=new E.MathNode("mglyph",[]),n=(r.setAttribute("alt",e.alt),es(e.height,t)),i=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([],[fo(e.body,t)]),Z.makeSpan(["inner"],[r],t)):Z.makeSpan(["inner"],[fo(e.body,t)]),n=Z.makeSpan(["fix"],[]),e=Z.makeSpan([e.alignment],[r,n],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 E.MathNode("mpadded",[To(e.body,t)]),"rlap"!==e.alignment&&(e="llap"===e.alignment?"-1":"-0.5",t.setAttribute("lspace",e+"width")),t.setAttribute("width","0px"),t),"mathmlBuilder")}),l({type:"styling",names:["\\(","$"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){var{funcName:e,parser:r}=e,n=r.mode,e=(r.switchMode("math"),"\\("===e?"\\)":"$"),i=r.parseExpression(!1,e);return r.expect(e),r.switchMode(n),{type:"styling",mode:r.mode,style:"text",body:i}}}),l({type:"text",names:["\\)","\\]"],props:{numArgs:0,allowedInText:!0,allowedInMath:!1},handler(e,t){throw new X("Mismatched "+e.funcName)}}),Al=mt((e,t)=>{switch(t.style.size){case Aa.DISPLAY.size:return e.display;case Aa.TEXT.size:return e.text;case Aa.SCRIPT.size:return e.script;case Aa.SCRIPTSCRIPT.size:return e.scriptscript;default:return e.text}},"chooseMathStyle"),l({type:"mathchoice",names:["\\mathchoice"],props:{numArgs:4,primitive:!0},handler:mt((e,t)=>({type:"mathchoice",mode:(e=e.parser).mode,display:ro(t[0]),text:ro(t[1]),script:ro(t[2]),scriptscript:ro(t[3])}),"handler"),htmlBuilder:mt((e,t)=>(e=Al(e,t),e=lo(e,t,!1),Z.makeFragment(e)),"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e=Al(e,t),ko(e,t)),"mathmlBuilder")}),Ll=mt((e,t,r,n,i,a,s)=>{e=Z.makeSpan([],[e]);var o,l,c=r&&va.isCharacterBox(r);if(t&&(o={elem:t=fo(t,n.havingStyle(i.sup()),n),kern:Math.max(n.fontMetrics().bigOpSpacing1,n.fontMetrics().bigOpSpacing3-t.depth)}),r&&(l={elem:t=fo(r,n.havingStyle(i.sub()),n),kern:Math.max(n.fontMetrics().bigOpSpacing2,n.fontMetrics().bigOpSpacing4-t.height)}),o&&l)var r=n.fontMetrics().bigOpSpacing5+l.elem.height+l.elem.depth+l.kern+e.depth+s,h=Z.makeVList({positionType:"bottom",positionData:r,children:[{type:"kern",size:n.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:n.fontMetrics().bigOpSpacing5}]},n);else if(l)i=e.height-s,h=Z.makeVList({positionType:"top",positionData:i,children:[{type:"kern",size:n.fontMetrics().bigOpSpacing5},{type:"elem",elem:l.elem,marginLeft:K(-a)},{type:"kern",size:l.kern},{type:"elem",elem:e}]},n);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:n.fontMetrics().bigOpSpacing5}]},n)}return r=[h],l&&0!==a&&!c&&((i=Z.makeSpan(["mspace"],[],n)).style.marginRight=K(a),r.unshift(i)),Z.makeSpan(["mop","op-limits"],r,n)},"assembleSupSub"),Nl=["\\smallint"],Il=mt((e,t)=>{var r,n,i,a=!1,s=("supsub"===e.type?(r=e.sup,n=e.sub,i=Ki(e.base,"op"),a=!0):i=Ki(e,"op"),!1);if((e=t.style).size===Aa.DISPLAY.size&&i.symbol&&!va.contains(Nl,i.name)&&(s=!0),i.symbol){var o,l=s?"Size2-Regular":"Size1-Regular",c="";"\\oiint"!==i.name&&"\\oiiint"!==i.name||(c=i.name.slice(1),i.name="oiint"===c?"\\iint":"\\iiint"),l=Z.makeSymbol(i.name,l,"math",t,["mop","op-symbol",s?"large-op":"small-op"]),0{var r;return e.symbol?(r=new mo("mo",[vo(e.name,e.mode)]),va.contains(Nl,e.name)&&r.setAttribute("largeop","false")):r=e.body?new mo("mo",wo(e.body,t)):(r=new mo("mi",[new yo(e.name.slice(1))]),t=new mo("mo",[vo("⁡","text")]),e.parentIsSupSub?new mo("mrow",[r,t]):Vi([r,t])),r},"mathmlBuilder$1"),Ml={"∏":"\\prod","∐":"\\coprod","∑":"\\sum","⋀":"\\bigwedge","⋁":"\\bigvee","⋂":"\\bigcap","⋃":"\\bigcup","⨀":"\\bigodot","⨁":"\\bigoplus","⨂":"\\bigotimes","⨄":"\\biguplus","⨆":"\\bigsqcup"},l({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=Ml[r]),{type:"op",mode:e.mode,limits:!0,parentIsSupSub:!1,symbol:!0,name:r}},"handler"),htmlBuilder:Il,mathmlBuilder:Rl}),l({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:ro(t)}),"handler"),htmlBuilder:Il,mathmlBuilder:Rl}),Dl={"∫":"\\int","∬":"\\iint","∭":"\\iiint","∮":"\\oint","∯":"\\oiint","∰":"\\oiiint"},l({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:Il,mathmlBuilder:Rl}),l({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:Il,mathmlBuilder:Rl}),l({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=Dl[t]),{type:"op",mode:e.mode,limits:!1,parentIsSupSub:!1,symbol:!0,name:t}},htmlBuilder:Il,mathmlBuilder:Rl}),Ol=mt((e,t)=>{var r,n,i,a,s=!1;if("supsub"===e.type?(r=e.sup,n=e.sub,i=Ki(e.base,"operatorname"),s=!0):i=Ki(e,"operatorname"),0{var t=e.text;return"string"==typeof t?{type:"textord",mode:e.mode,text:t}:e}),o=lo(e,t.withFont("mathrm"),!0),l=0;l{for(var r=wo(e.body,t.withFont("mathrm")),n=!0,i=0;ie.toText()).join(""),r=[new E.TextNode(t)]),(t=new E.MathNode("mi",r)).setAttribute("mathvariant","normal");var o=new E.MathNode("mo",[vo("⁡","text")]);return e.parentIsSupSub?new E.MathNode("mrow",[t,o]):E.newDocumentFragment([t,o])},"mathmlBuilder"),l({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:ro(t),alwaysHandleSupSub:"\\operatornamewithlimits"===r,limits:!1,parentIsSupSub:!1}},"handler"),htmlBuilder:Ol,mathmlBuilder:Pl}),h("\\operatorname","\\@ifstar\\operatornamewithlimits\\operatorname@"),Wi({type:"ordgroup",htmlBuilder(e,t){return e.semisimple?Z.makeFragment(lo(e.body,t,!1)):Z.makeSpan(["mord"],lo(e.body,t,!0),t)},mathmlBuilder(e,t){return ko(e.body,t,!0)}}),l({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=fo(e.body,t.havingCrampedStyle()),r=Z.makeLineSpan("overline-line",t),n=t.fontMetrics().defaultRuleThickness,e=Z.makeVList({positionType:"firstBaseline",children:[{type:"elem",elem:e},{type:"kern",size:3*n},{type:"elem",elem:r},{type:"kern",size:n}]},t);return Z.makeSpan(["mord","overline"],[e],t)},mathmlBuilder(e,t){var r=new E.MathNode("mo",[new E.TextNode("‾")]);return r.setAttribute("stretchy","true"),(e=new E.MathNode("mover",[To(e.body,t),r])).setAttribute("accent","true"),e}}),l({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:ro(t)}),"handler"),htmlBuilder:mt((e,t)=>(e=lo(e.body,t.withPhantom(),!1),Z.makeFragment(e)),"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e=wo(e.body,t),new E.MathNode("mphantom",e)),"mathmlBuilder")}),l({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([],[fo(e.body,t.withPhantom())]);if(r.height=0,r.depth=0,r.children)for(var n=0;n(e=wo(ro(e.body),t),t=new E.MathNode("mphantom",e),(e=new E.MathNode("mpadded",[t])).setAttribute("height","0px"),e.setAttribute("depth","0px"),e),"mathmlBuilder")}),l({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"],[fo(e.body,t.withPhantom())]),r=Z.makeSpan(["fix"],[]);return Z.makeSpan(["mord","rlap"],[e,r],t)},"htmlBuilder"),mathmlBuilder:mt((e,t)=>(e=wo(ro(e.body),t),t=new E.MathNode("mphantom",e),(e=new E.MathNode("mpadded",[t])).setAttribute("width","0px"),e),"mathmlBuilder")}),l({type:"raisebox",names:["\\raisebox"],props:{numArgs:2,argTypes:["size","hbox"],allowedInText:!0},handler(e,t){var e=e.parser,r=Ki(t[0],"size").value;return{type:"raisebox",mode:e.mode,dy:r,body:t[1]}},htmlBuilder(e,t){var r=fo(e.body,t),e=es(e.dy,t);return Z.makeVList({positionType:"shift",positionData:-e,children:[{type:"elem",elem:r}]},t)},mathmlBuilder(e,t){return t=new E.MathNode("mpadded",[To(e.body,t)]),e=e.dy.number+e.dy.unit,t.setAttribute("voffset",e),t}}),l({type:"internal",names:["\\relax"],props:{numArgs:0,allowedInText:!0},handler(e){return{type:"internal",mode:(e=e.parser).mode}}}),l({type:"rule",names:["\\rule"],props:{numArgs:2,numOptionalArgs:1,argTypes:["size","size","size"]},handler(e,t,r){var e=e.parser,r=r[0],n=Ki(t[0],"size"),t=Ki(t[1],"size");return{type:"rule",mode:e.mode,shift:r&&Ki(r,"size").value,width:n.value,height:t.value}},htmlBuilder(e,t){var r=Z.makeSpan(["mord","rule"],[],t),n=es(e.width,t),i=es(e.height,t),e=e.shift?es(e.shift,t):0;return r.style.borderRightWidth=K(n),r.style.borderTopWidth=K(i),r.style.bottom=K(e),r.width=n,r.height=i+e,r.depth=-e,r.maxFontSize=1.125*i*t.sizeMultiplier,r},mathmlBuilder(e,t){var r=es(e.width,t),n=es(e.height,t),e=e.shift?es(e.shift,t):0,t=t.color&&t.getColor()||"black",i=new E.MathNode("mspace"),t=(i.setAttribute("mathbackground",t),i.setAttribute("width",K(r)),i.setAttribute("height",K(n)),new E.MathNode("mpadded",[i]));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(ha,"sizingGroup"),Bl=["\\tiny","\\sixptsize","\\scriptsize","\\footnotesize","\\small","\\normalsize","\\large","\\Large","\\LARGE","\\huge","\\Huge"],$l=mt((e,t)=>{var r=t.havingSize(e.size);return ha(e.body,r,t)},"htmlBuilder"),l({type:"sizing",names:Bl,props:{numArgs:0,allowedInText:!0},handler:mt((e,t)=>{var{breakOnTokenText:e,funcName:r,parser:n}=e,e=n.parseExpression(!1,e);return{type:"sizing",mode:n.mode,size:Bl.indexOf(r)+1,body:e}},"handler"),htmlBuilder:$l,mathmlBuilder:mt((e,t)=>(t=t.havingSize(e.size),e=wo(e.body,t),(e=new E.MathNode("mstyle",e)).setAttribute("mathsize",K(t.sizeMultiplier)),e),"mathmlBuilder")}),l({type:"smash",names:["\\smash"],props:{numArgs:1,numOptionalArgs:1,allowedInText:!0},handler:mt((e,t,r)=>{var e=e.parser,n=!1,i=!1,a=r[0]&&Ki(r[0],"ordgroup");if(a)for(var s,o=0;o{var r=Z.makeSpan([],[fo(e.body,t)]);if(!e.smashHeight&&!e.smashDepth)return r;if(e.smashHeight&&(r.height=0,r.children))for(var n=0;n(t=new E.MathNode("mpadded",[To(e.body,t)]),e.smashHeight&&t.setAttribute("height","0px"),e.smashDepth&&t.setAttribute("depth","0px"),t),"mathmlBuilder")}),l({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=fo(e.body,t.havingCrampedStyle())).height&&(r.height=t.fontMetrics().xHeight);var r=Z.wrapFragment(r,t),n=i=t.fontMetrics().defaultRuleThickness,n=i+(t.style.idr.height+r.depth+n&&(n=(n+o-r.height-r.depth)/2),i.height-r.height-n-a),n=(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:i},{type:"kern",size:a}]},t));return e.index?(s=t.havingStyle(Aa.SCRIPTSCRIPT),r=fo(e.index,s,t),o=.6*(n.height-n.depth),i=Z.makeVList({positionType:"shift",positionData:-o,children:[{type:"elem",elem:r}]},t),a=Z.makeSpan(["root"],[i]),Z.makeSpan(["mord","sqrt"],[a,n],t)):Z.makeSpan(["mord","sqrt"],[n],t)},mathmlBuilder(e,t){var{body:e,index:r}=e;return r?new E.MathNode("mroot",[To(e,t),To(r,t)]):new E.MathNode("msqrt",[To(e,t)])}}),Fl={display:Aa.DISPLAY,text:Aa.TEXT,script:Aa.SCRIPT,scriptscript:Aa.SCRIPTSCRIPT},l({type:"styling",names:["\\displaystyle","\\textstyle","\\scriptstyle","\\scriptscriptstyle"],props:{numArgs:0,allowedInText:!0,primitive:!0},handler(e,t){var{breakOnTokenText:e,funcName:r,parser:n}=e,e=n.parseExpression(!0,e),r=r.slice(1,r.length-5);return{type:"styling",mode:n.mode,style:r,body:e}},htmlBuilder(e,t){var r=Fl[e.style],r=t.havingStyle(r).withFont("");return ha(e.body,r,t)},mathmlBuilder(e,t){var r=Fl[e.style],t=t.havingStyle(r),r=wo(e.body,t),t=new E.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}}),zl=mt(function(e,t){var r=e.base;return r?"op"===r.type?r.limits&&(t.style.size===Aa.DISPLAY.size||r.alwaysHandleSupSub)?Il:null:"operatorname"===r.type?r.alwaysHandleSupSub&&(t.style.size===Aa.DISPLAY.size||r.limits)?Ol:null:"accent"===r.type?va.isCharacterBox(r.base)?Ro:null:"horizBrace"===r.type&&!e.sub===r.isOver?Sl:null:null},"htmlBuilderDelegate"),Wi({type:"supsub",htmlBuilder(e,t){if(a=zl(e,t))return a(e,t);var r,n,i,{base:a,sup:s,sub:o}=e,l=fo(a,t),c=t.fontMetrics(),h=0,u=0,a=a&&va.isCharacterBox(a),o=(s&&(i=t.havingStyle(t.style.sup()),r=fo(s,i,t),a||(h=l.height-i.fontMetrics().supDrop*i.sizeMultiplier/t.sizeMultiplier)),o&&(s=t.havingStyle(t.style.sub()),n=fo(o,s,t),a||(u=l.depth+s.fontMetrics().subDrop*s.sizeMultiplier/t.sizeMultiplier)),i=t.style===Aa.DISPLAY?c.sup1:t.style.cramped?c.sup3:c.sup2,t.sizeMultiplier),a=K(.5/c.ptPerEm/o),s=null;if(n&&(o=e.base&&"op"===e.base.type&&e.base.name&&("\\oiint"===e.base.name||"\\oiiint"===e.base.name),l instanceof cs||o)&&(s=K(-l.italic)),r&&n){h=Math.max(h,i,r.depth+.25*c.xHeight),u=Math.max(u,c.sub2),e=4*c.defaultRuleThickness,h-r.depth-(n.height-u){var e=new E.MathNode("mtd",[]);return e.setAttribute("width","50%"),e},"pad"),Wi({type:"tag",mathmlBuilder(e,t){return(e=new E.MathNode("mtable",[new E.MathNode("mtr",[jl(),new E.MathNode("mtd",[ko(e.body,t)]),jl(),new E.MathNode("mtd",[ko(e.tag,t)])])])).setAttribute("width","100%"),e}}),Wl={"\\text":void 0,"\\textrm":"textrm","\\textsf":"textsf","\\texttt":"texttt","\\textnormal":"textrm"},Yl={"\\textbf":"textbf","\\textmd":"textmd"},Hl={"\\textit":"textit","\\textup":"textup"},Vl=mt((e,t)=>(e=e.font)?Wl[e]?t.withTextFontFamily(Wl[e]):Yl[e]?t.withTextFontWeight(Yl[e]):"\\emph"===e?"textit"===t.fontShape?t.withTextFontShape("textup"):t.withTextFontShape("textit"):t.withTextFontShape(Hl[e]):t,"optionsWithFont"),l({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:ro(t),font:r}},htmlBuilder(e,t){return t=Vl(e,t),e=lo(e.body,t,!0),Z.makeSpan(["mord","text"],e,t)},mathmlBuilder(e,t){return t=Vl(e,t),ko(e.body,t)}}),l({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=fo(e.body,t),r=Z.makeLineSpan("underline-line",t),n=t.fontMetrics().defaultRuleThickness,r=Z.makeVList({positionType:"top",positionData:e.height,children:[{type:"kern",size:n},{type:"elem",elem:r},{type:"kern",size:3*n},{type:"elem",elem:e}]},t);return Z.makeSpan(["mord","underline"],[r],t)},mathmlBuilder(e,t){var r=new E.MathNode("mo",[new E.TextNode("‾")]);return r.setAttribute("stretchy","true"),(e=new E.MathNode("munder",[To(e.body,t),r])).setAttribute("accentunder","true"),e}}),l({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=fo(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 E.MathNode("mpadded",[To(e.body,t)],["vcenter"])}}),l({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=Xl(e),n=[],i=t.havingStyle(t.style.text()),a=0;ae.body.replace(/ /g,e.star?"␣":" "),"makeVerb"),Kl=Qs,Zl=new RegExp("[̀-ͯ]+$"),Ql=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 da("EOF",new ua(this,t,t));if(null===(n=this.tokenRegex.exec(e))||n.index!==t)throw new X("Unexpected character: '"+e[t]+"'",new da(e[t],new ua(this,t,t+1)));var r,n=n[6]||n[3]||(n[2]?"\\ ":" ");return 14===this.catcodes[n]?(-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 da(n,new ua(this,t,this.tokenRegex.lastIndex))}},Jl=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 i=n[0].text,a=e.isDefined(i);if(a&&!t)throw new X("\\newcommand{"+i+"} attempting to redefine "+i+"; use \\renewcommand");if(!a&&!r)throw new X("\\renewcommand{"+i+"} when command "+i+" does not yet exist; use \\newcommand");if(t=0,1===(n=e.consumeArg().tokens).length&&"["===n[0].text){for(var s="",o=e.expandNextToken();"]"!==o.text&&"EOF"!==o.text;)s+=o.text,o=e.expandNextToken();if(!s.match(/^\s*[0-9]+\s*$/))throw new X("Invalid number of arguments: "+s);t=parseInt(s),n=e.consumeArg().tokens}return e.macros.set(i,{tokens:n,numArgs:t}),""},"newcommand"),h("\\newcommand",e=>rc(e,!1,!0)),h("\\renewcommand",e=>rc(e,!0,!1)),h("\\providecommand",e=>rc(e,!0,!0)),h("\\message",e=>(e=e.consumeArgs(1)[0],console.log(e.reverse().map(e=>e.text).join("")),"")),h("\\errmessage",e=>(e=e.consumeArgs(1)[0],console.error(e.reverse().map(e=>e.text).join("")),"")),h("\\show",e=>{var t=e.popToken(),r=t.text;return console.log(t,e.macros.get(r),Kl[r],fs.math[r],fs.text[r]),""}),h("\\bgroup","{"),h("\\egroup","}"),h("~","\\nobreakspace"),h("\\lq","`"),h("\\rq","'"),h("\\aa","\\r a"),h("\\AA","\\r A"),h("\\textcopyright","\\html@mathml{\\textcircled{c}}{\\char`©}"),h("\\copyright","\\TextOrMath{\\textcopyright}{\\text{\\textcopyright}}"),h("\\textregistered","\\html@mathml{\\textcircled{\\scriptsize R}}{\\char`®}"),h("ℬ","\\mathscr{B}"),h("ℰ","\\mathscr{E}"),h("ℱ","\\mathscr{F}"),h("ℋ","\\mathscr{H}"),h("ℐ","\\mathscr{I}"),h("ℒ","\\mathscr{L}"),h("ℳ","\\mathscr{M}"),h("ℛ","\\mathscr{R}"),h("ℭ","\\mathfrak{C}"),h("ℌ","\\mathfrak{H}"),h("ℨ","\\mathfrak{Z}"),h("\\Bbbk","\\Bbb{k}"),h("·","\\cdotp"),h("\\llap","\\mathllap{\\textrm{#1}}"),h("\\rlap","\\mathrlap{\\textrm{#1}}"),h("\\clap","\\mathclap{\\textrm{#1}}"),h("\\mathstrut","\\vphantom{(}"),h("\\underbar","\\underline{\\text{#1}}"),h("\\not",'\\html@mathml{\\mathrel{\\mathrlap\\@not}}{\\char"338}'),h("\\neq","\\html@mathml{\\mathrel{\\not=}}{\\mathrel{\\char`≠}}"),h("\\ne","\\neq"),h("≠","\\neq"),h("\\notin","\\html@mathml{\\mathrel{{\\in}\\mathllap{/\\mskip1mu}}}{\\mathrel{\\char`∉}}"),h("∉","\\notin"),h("≘","\\html@mathml{\\mathrel{=\\kern{-1em}\\raisebox{0.4em}{$\\scriptsize\\frown$}}}{\\mathrel{\\char`≘}}"),h("≙","\\html@mathml{\\stackrel{\\tiny\\wedge}{=}}{\\mathrel{\\char`≘}}"),h("≚","\\html@mathml{\\stackrel{\\tiny\\vee}{=}}{\\mathrel{\\char`≚}}"),h("≛","\\html@mathml{\\stackrel{\\scriptsize\\star}{=}}{\\mathrel{\\char`≛}}"),h("≝","\\html@mathml{\\stackrel{\\tiny\\mathrm{def}}{=}}{\\mathrel{\\char`≝}}"),h("≞","\\html@mathml{\\stackrel{\\tiny\\mathrm{m}}{=}}{\\mathrel{\\char`≞}}"),h("≟","\\html@mathml{\\stackrel{\\tiny?}{=}}{\\mathrel{\\char`≟}}"),h("⟂","\\perp"),h("‼","\\mathclose{!\\mkern-0.8mu!}"),h("∌","\\notni"),h("⌜","\\ulcorner"),h("⌝","\\urcorner"),h("⌞","\\llcorner"),h("⌟","\\lrcorner"),h("©","\\copyright"),h("®","\\textregistered"),h("️","\\textregistered"),h("\\ulcorner",'\\html@mathml{\\@ulcorner}{\\mathop{\\char"231c}}'),h("\\urcorner",'\\html@mathml{\\@urcorner}{\\mathop{\\char"231d}}'),h("\\llcorner",'\\html@mathml{\\@llcorner}{\\mathop{\\char"231e}}'),h("\\lrcorner",'\\html@mathml{\\@lrcorner}{\\mathop{\\char"231f}}'),h("\\vdots","\\mathord{\\varvdots\\rule{0pt}{15pt}}"),h("⋮","\\vdots"),h("\\varGamma","\\mathit{\\Gamma}"),h("\\varDelta","\\mathit{\\Delta}"),h("\\varTheta","\\mathit{\\Theta}"),h("\\varLambda","\\mathit{\\Lambda}"),h("\\varXi","\\mathit{\\Xi}"),h("\\varPi","\\mathit{\\Pi}"),h("\\varSigma","\\mathit{\\Sigma}"),h("\\varUpsilon","\\mathit{\\Upsilon}"),h("\\varPhi","\\mathit{\\Phi}"),h("\\varPsi","\\mathit{\\Psi}"),h("\\varOmega","\\mathit{\\Omega}"),h("\\substack","\\begin{subarray}{c}#1\\end{subarray}"),h("\\colon","\\nobreak\\mskip2mu\\mathpunct{}\\mathchoice{\\mkern-3mu}{\\mkern-3mu}{}{}{:}\\mskip6mu\\relax"),h("\\boxed","\\fbox{$\\displaystyle{#1}$}"),h("\\iff","\\DOTSB\\;\\Longleftrightarrow\\;"),h("\\implies","\\DOTSB\\;\\Longrightarrow\\;"),h("\\impliedby","\\DOTSB\\;\\Longleftarrow\\;"),nc={",":"\\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"},h("\\dots",function(e){var t="\\dotso";return(e=e.expandAfterFuture().text)in nc?t=nc[e]:("\\not"===e.slice(0,4)||e in fs.math&&va.contains(["bin","rel"],fs.math[e].group))&&(t="\\dotsb"),t}),ic={")":!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},h("\\dotso",function(e){return e.future().text in ic?"\\ldots\\,":"\\ldots"}),h("\\dotsc",function(e){return(e=e.future().text)in ic&&","!==e?"\\ldots\\,":"\\ldots"}),h("\\cdots",function(e){return e.future().text in ic?"\\@cdots\\,":"\\@cdots"}),h("\\dotsb","\\cdots"),h("\\dotsm","\\cdots"),h("\\dotsi","\\!\\cdots"),h("\\dotsx","\\ldots\\,"),h("\\DOTSI","\\relax"),h("\\DOTSB","\\relax"),h("\\DOTSX","\\relax"),h("\\tmspace","\\TextOrMath{\\kern#1#3}{\\mskip#1#2}\\relax"),h("\\,","\\tmspace+{3mu}{.1667em}"),h("\\thinspace","\\,"),h("\\>","\\mskip{4mu}"),h("\\:","\\tmspace+{4mu}{.2222em}"),h("\\medspace","\\:"),h("\\;","\\tmspace+{5mu}{.2777em}"),h("\\thickspace","\\;"),h("\\!","\\tmspace-{3mu}{.1667em}"),h("\\negthinspace","\\!"),h("\\negmedspace","\\tmspace-{4mu}{.2222em}"),h("\\negthickspace","\\tmspace-{5mu}{.277em}"),h("\\enspace","\\kern.5em "),h("\\enskip","\\hskip.5em\\relax"),h("\\quad","\\hskip1em\\relax"),h("\\qquad","\\hskip2em\\relax"),h("\\tag","\\@ifstar\\tag@literal\\tag@paren"),h("\\tag@paren","\\tag@literal{({#1})}"),h("\\tag@literal",e=>{if(e.macros.get("\\df@tag"))throw new X("Multiple \\tag");return"\\gdef\\df@tag{\\text{#1}}"}),h("\\bmod","\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}\\mathbin{\\rm mod}\\mathchoice{\\mskip1mu}{\\mskip1mu}{\\mskip5mu}{\\mskip5mu}"),h("\\pod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern8mu}{\\mkern8mu}{\\mkern8mu}(#1)"),h("\\pmod","\\pod{{\\rm mod}\\mkern6mu#1}"),h("\\mod","\\allowbreak\\mathchoice{\\mkern18mu}{\\mkern12mu}{\\mkern12mu}{\\mkern12mu}{\\rm mod}\\,\\,#1"),h("\\newline","\\\\\\relax"),h("\\TeX","\\textrm{\\html@mathml{T\\kern-.1667em\\raisebox{-.5ex}{E}\\kern-.125emX}{TeX}}"),h("\\LaTeX","\\textrm{\\html@mathml{L\\kern-.36em\\raisebox{"+(ac=K(qa["Main-Regular"][84][1]-.7*qa["Main-Regular"][65][1]))+"}{\\scriptstyle A}\\kern-.15em\\TeX}{LaTeX}}"),h("\\KaTeX","\\textrm{\\html@mathml{K\\kern-.17em\\raisebox{"+ac+"}{\\scriptstyle A}\\kern-.15em\\TeX}{KaTeX}}"),h("\\hspace","\\@ifstar\\@hspacer\\@hspace"),h("\\@hspace","\\hskip #1\\relax"),h("\\@hspacer","\\rule{0pt}{0pt}\\hskip #1\\relax"),h("\\ordinarycolon",":"),h("\\vcentcolon","\\mathrel{\\mathop\\ordinarycolon}"),h("\\dblcolon",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-.9mu}\\vcentcolon}}{\\mathop{\\char"2237}}'),h("\\coloneqq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2254}}'),h("\\Coloneqq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}=}}{\\mathop{\\char"2237\\char"3d}}'),h("\\coloneq",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"3a\\char"2212}}'),h("\\Coloneq",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\mathrel{-}}}{\\mathop{\\char"2237\\char"2212}}'),h("\\eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2255}}'),h("\\Eqqcolon",'\\html@mathml{\\mathrel{=\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"3d\\char"2237}}'),h("\\eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\vcentcolon}}{\\mathop{\\char"2239}}'),h("\\Eqcolon",'\\html@mathml{\\mathrel{\\mathrel{-}\\mathrel{\\mkern-1.2mu}\\dblcolon}}{\\mathop{\\char"2212\\char"2237}}'),h("\\colonapprox",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"3a\\char"2248}}'),h("\\Colonapprox",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\approx}}{\\mathop{\\char"2237\\char"2248}}'),h("\\colonsim",'\\html@mathml{\\mathrel{\\vcentcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"3a\\char"223c}}'),h("\\Colonsim",'\\html@mathml{\\mathrel{\\dblcolon\\mathrel{\\mkern-1.2mu}\\sim}}{\\mathop{\\char"2237\\char"223c}}'),h("∷","\\dblcolon"),h("∹","\\eqcolon"),h("≔","\\coloneqq"),h("≕","\\eqqcolon"),h("⩴","\\Coloneqq"),h("\\ratio","\\vcentcolon"),h("\\coloncolon","\\dblcolon"),h("\\colonequals","\\coloneqq"),h("\\coloncolonequals","\\Coloneqq"),h("\\equalscolon","\\eqqcolon"),h("\\equalscoloncolon","\\Eqqcolon"),h("\\colonminus","\\coloneq"),h("\\coloncolonminus","\\Coloneq"),h("\\minuscolon","\\eqcolon"),h("\\minuscoloncolon","\\Eqcolon"),h("\\coloncolonapprox","\\Colonapprox"),h("\\coloncolonsim","\\Colonsim"),h("\\simcolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),h("\\simcoloncolon","\\mathrel{\\sim\\mathrel{\\mkern-1.2mu}\\dblcolon}"),h("\\approxcolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\vcentcolon}"),h("\\approxcoloncolon","\\mathrel{\\approx\\mathrel{\\mkern-1.2mu}\\dblcolon}"),h("\\notni","\\html@mathml{\\not\\ni}{\\mathrel{\\char`∌}}"),h("\\limsup","\\DOTSB\\operatorname*{lim\\,sup}"),h("\\liminf","\\DOTSB\\operatorname*{lim\\,inf}"),h("\\injlim","\\DOTSB\\operatorname*{inj\\,lim}"),h("\\projlim","\\DOTSB\\operatorname*{proj\\,lim}"),h("\\varlimsup","\\DOTSB\\operatorname*{\\overline{lim}}"),h("\\varliminf","\\DOTSB\\operatorname*{\\underline{lim}}"),h("\\varinjlim","\\DOTSB\\operatorname*{\\underrightarrow{lim}}"),h("\\varprojlim","\\DOTSB\\operatorname*{\\underleftarrow{lim}}"),h("\\gvertneqq","\\html@mathml{\\@gvertneqq}{≩}"),h("\\lvertneqq","\\html@mathml{\\@lvertneqq}{≨}"),h("\\ngeqq","\\html@mathml{\\@ngeqq}{≱}"),h("\\ngeqslant","\\html@mathml{\\@ngeqslant}{≱}"),h("\\nleqq","\\html@mathml{\\@nleqq}{≰}"),h("\\nleqslant","\\html@mathml{\\@nleqslant}{≰}"),h("\\nshortmid","\\html@mathml{\\@nshortmid}{∤}"),h("\\nshortparallel","\\html@mathml{\\@nshortparallel}{∦}"),h("\\nsubseteqq","\\html@mathml{\\@nsubseteqq}{⊈}"),h("\\nsupseteqq","\\html@mathml{\\@nsupseteqq}{⊉}"),h("\\varsubsetneq","\\html@mathml{\\@varsubsetneq}{⊊}"),h("\\varsubsetneqq","\\html@mathml{\\@varsubsetneqq}{⫋}"),h("\\varsupsetneq","\\html@mathml{\\@varsupsetneq}{⊋}"),h("\\varsupsetneqq","\\html@mathml{\\@varsupsetneqq}{⫌}"),h("\\imath","\\html@mathml{\\@imath}{ı}"),h("\\jmath","\\html@mathml{\\@jmath}{ȷ}"),h("\\llbracket","\\html@mathml{\\mathopen{[\\mkern-3.2mu[}}{\\mathopen{\\char`⟦}}"),h("\\rrbracket","\\html@mathml{\\mathclose{]\\mkern-3.2mu]}}{\\mathclose{\\char`⟧}}"),h("⟦","\\llbracket"),h("⟧","\\rrbracket"),h("\\lBrace","\\html@mathml{\\mathopen{\\{\\mkern-3.2mu[}}{\\mathopen{\\char`⦃}}"),h("\\rBrace","\\html@mathml{\\mathclose{]\\mkern-3.2mu\\}}}{\\mathclose{\\char`⦄}}"),h("⦃","\\lBrace"),h("⦄","\\rBrace"),h("\\minuso","\\mathbin{\\html@mathml{{\\mathrlap{\\mathchoice{\\kern{0.145em}}{\\kern{0.145em}}{\\kern{0.1015em}}{\\kern{0.0725em}}\\circ}{-}}}{\\char`⦵}}"),h("⦵","\\minuso"),h("\\darr","\\downarrow"),h("\\dArr","\\Downarrow"),h("\\Darr","\\Downarrow"),h("\\lang","\\langle"),h("\\rang","\\rangle"),h("\\uarr","\\uparrow"),h("\\uArr","\\Uparrow"),h("\\Uarr","\\Uparrow"),h("\\N","\\mathbb{N}"),h("\\R","\\mathbb{R}"),h("\\Z","\\mathbb{Z}"),h("\\alef","\\aleph"),h("\\alefsym","\\aleph"),h("\\Alpha","\\mathrm{A}"),h("\\Beta","\\mathrm{B}"),h("\\bull","\\bullet"),h("\\Chi","\\mathrm{X}"),h("\\clubs","\\clubsuit"),h("\\cnums","\\mathbb{C}"),h("\\Complex","\\mathbb{C}"),h("\\Dagger","\\ddagger"),h("\\diamonds","\\diamondsuit"),h("\\empty","\\emptyset"),h("\\Epsilon","\\mathrm{E}"),h("\\Eta","\\mathrm{H}"),h("\\exist","\\exists"),h("\\harr","\\leftrightarrow"),h("\\hArr","\\Leftrightarrow"),h("\\Harr","\\Leftrightarrow"),h("\\hearts","\\heartsuit"),h("\\image","\\Im"),h("\\infin","\\infty"),h("\\Iota","\\mathrm{I}"),h("\\isin","\\in"),h("\\Kappa","\\mathrm{K}"),h("\\larr","\\leftarrow"),h("\\lArr","\\Leftarrow"),h("\\Larr","\\Leftarrow"),h("\\lrarr","\\leftrightarrow"),h("\\lrArr","\\Leftrightarrow"),h("\\Lrarr","\\Leftrightarrow"),h("\\Mu","\\mathrm{M}"),h("\\natnums","\\mathbb{N}"),h("\\Nu","\\mathrm{N}"),h("\\Omicron","\\mathrm{O}"),h("\\plusmn","\\pm"),h("\\rarr","\\rightarrow"),h("\\rArr","\\Rightarrow"),h("\\Rarr","\\Rightarrow"),h("\\real","\\Re"),h("\\reals","\\mathbb{R}"),h("\\Reals","\\mathbb{R}"),h("\\Rho","\\mathrm{P}"),h("\\sdot","\\cdot"),h("\\sect","\\S"),h("\\spades","\\spadesuit"),h("\\sub","\\subset"),h("\\sube","\\subseteq"),h("\\supe","\\supseteq"),h("\\Tau","\\mathrm{T}"),h("\\thetasym","\\vartheta"),h("\\weierp","\\wp"),h("\\Zeta","\\mathrm{Z}"),h("\\argmin","\\DOTSB\\operatorname*{arg\\,min}"),h("\\argmax","\\DOTSB\\operatorname*{arg\\,max}"),h("\\plim","\\DOTSB\\mathop{\\operatorname{plim}}\\limits"),h("\\bra","\\mathinner{\\langle{#1}|}"),h("\\ket","\\mathinner{|{#1}\\rangle}"),h("\\braket","\\mathinner{\\langle{#1}\\rangle}"),h("\\Bra","\\left\\langle#1\\right|"),h("\\Ket","\\left|#1\\right\\rangle"),h("\\bra@ket",(sc=mt(l=>e=>{var t=e.consumeArg().tokens,n=e.consumeArg().tokens,i=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),i.length)&&e.macros.set("\\|",s);var t=r;return!r&&i.length&&"|"===e.future().text&&(e.popToken(),t=!0),{tokens:t?i:n,numArgs:0}},"midMacro")),o=(e.macros.set("|",o(!1)),i.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)),h("\\bra@set",sc(!0)),h("\\Braket","\\bra@ket{\\left\\langle}{\\,\\middle\\vert\\,}{\\,\\middle\\vert\\,}{\\right\\rangle}"),h("\\Set","\\bra@set{\\left\\{\\:}{\\;\\middle\\vert\\;}{\\;\\middle\\Vert\\;}{\\:\\right\\}}"),h("\\set","\\bra@set{\\{\\,}{\\mid}{}{\\,\\}}"),h("\\angln","{\\angl n}"),h("\\blue","\\textcolor{##6495ed}{#1}"),h("\\orange","\\textcolor{##ffa500}{#1}"),h("\\pink","\\textcolor{##ff00af}{#1}"),h("\\red","\\textcolor{##df0030}{#1}"),h("\\green","\\textcolor{##28ae7b}{#1}"),h("\\gray","\\textcolor{gray}{#1}"),h("\\purple","\\textcolor{##9d38bd}{#1}"),h("\\blueA","\\textcolor{##ccfaff}{#1}"),h("\\blueB","\\textcolor{##80f6ff}{#1}"),h("\\blueC","\\textcolor{##63d9ea}{#1}"),h("\\blueD","\\textcolor{##11accd}{#1}"),h("\\blueE","\\textcolor{##0c7f99}{#1}"),h("\\tealA","\\textcolor{##94fff5}{#1}"),h("\\tealB","\\textcolor{##26edd5}{#1}"),h("\\tealC","\\textcolor{##01d1c1}{#1}"),h("\\tealD","\\textcolor{##01a995}{#1}"),h("\\tealE","\\textcolor{##208170}{#1}"),h("\\greenA","\\textcolor{##b6ffb0}{#1}"),h("\\greenB","\\textcolor{##8af281}{#1}"),h("\\greenC","\\textcolor{##74cf70}{#1}"),h("\\greenD","\\textcolor{##1fab54}{#1}"),h("\\greenE","\\textcolor{##0d923f}{#1}"),h("\\goldA","\\textcolor{##ffd0a9}{#1}"),h("\\goldB","\\textcolor{##ffbb71}{#1}"),h("\\goldC","\\textcolor{##ff9c39}{#1}"),h("\\goldD","\\textcolor{##e07d10}{#1}"),h("\\goldE","\\textcolor{##a75a05}{#1}"),h("\\redA","\\textcolor{##fca9a9}{#1}"),h("\\redB","\\textcolor{##ff8482}{#1}"),h("\\redC","\\textcolor{##f9685d}{#1}"),h("\\redD","\\textcolor{##e84d39}{#1}"),h("\\redE","\\textcolor{##bc2612}{#1}"),h("\\maroonA","\\textcolor{##ffbde0}{#1}"),h("\\maroonB","\\textcolor{##ff92c6}{#1}"),h("\\maroonC","\\textcolor{##ed5fa6}{#1}"),h("\\maroonD","\\textcolor{##ca337c}{#1}"),h("\\maroonE","\\textcolor{##9e034e}{#1}"),h("\\purpleA","\\textcolor{##ddd7ff}{#1}"),h("\\purpleB","\\textcolor{##c6b9fc}{#1}"),h("\\purpleC","\\textcolor{##aa87ff}{#1}"),h("\\purpleD","\\textcolor{##7854ab}{#1}"),h("\\purpleE","\\textcolor{##543b78}{#1}"),h("\\mintA","\\textcolor{##f5f9e8}{#1}"),h("\\mintB","\\textcolor{##edf2df}{#1}"),h("\\mintC","\\textcolor{##e0e5cc}{#1}"),h("\\grayA","\\textcolor{##f6f7f7}{#1}"),h("\\grayB","\\textcolor{##f0f1f2}{#1}"),h("\\grayC","\\textcolor{##e3e5e6}{#1}"),h("\\grayD","\\textcolor{##d6d8da}{#1}"),h("\\grayE","\\textcolor{##babec2}{#1}"),h("\\grayF","\\textcolor{##888d93}{#1}"),h("\\grayG","\\textcolor{##626569}{#1}"),h("\\grayH","\\textcolor{##3b3e40}{#1}"),h("\\grayI","\\textcolor{##21242c}{#1}"),h("\\kaBlue","\\textcolor{##314453}{#1}"),h("\\kaGreen","\\textcolor{##71B307}{#1}"),oc={"^":!0,_:!0,"\\limits":!0,"\\nolimits":!0},lc=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 Jl(ec,t.macros),this.mode=r,this.stack=[]}feed(e){this.lexer=new Ql(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,n;if(e){if(this.consumeSpaces(),"["!==this.future().text)return null;t=this.popToken(),{tokens:n,end:r}=this.consumeArg(["]"])}else({tokens:n,start:t,end:r}=this.consumeArg());return this.pushToken(new da("EOF",r.loc)),this.pushTokens(n),t.range(r,"")}consumeSpaces(){for(;" "===this.future().text;)this.stack.pop()}consumeArg(e){var t,r=[],n=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,n=t.noexpand?null:this._getExpansion(r);if(null==n||e&&n.unexpandable){if(e&&null==n&&"\\"===r[0]&&!this.isDefined(r))throw new X("Undefined control sequence: "+r);return this.pushToken(t),!1}this.countExpansion(1);var i=n.tokens,a=this.consumeArgs(n.numArgs,n.delimiters);if(n.numArgs)for(var s=(i=i.slice()).length-1;0<=s;--s){var o=i[s];if("#"===o.text){if(0===s)throw new X("Incomplete placeholder at end of macro body",o);if("#"===(o=i[--s]).text)i.splice(s+1,1);else{if(!/^[1-9]$/.test(o.text))throw new X("Not a valid argument number",o);i.splice(s,2,...a[+o.text-1])}}}return this.pushTokens(i),i.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 da(e)]):void 0}expandTokens(e){var t,r=[],n=this.stack.length;for(this.pushTokens(e);this.stack.length>n;)!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 n=e.replace(/##/g,"");-1!==n.indexOf("#"+(r+1));)++r;for(var i=new Ql(e,this.settings),a=[],s=i.lex();"EOF"!==s.text;)a.push(s),s=i.lex();return a.reverse(),{tokens:a,numArgs:r}}}isDefined(e){return this.macros.has(e)||Kl.hasOwnProperty(e)||fs.math.hasOwnProperty(e)||fs.text.hasOwnProperty(e)||oc.hasOwnProperty(e)}isExpandable(e){var t=this.macros.get(e);return null!=t?"string"==typeof t||"function"==typeof t||!t.unexpandable:Kl.hasOwnProperty(e)&&!Kl[e].primitive}},cc=/^[₊₋₌₍₎₀₁₂₃₄₅₆₇₈₉ₐₑₕᵢⱼₖₗₘₙₒₚᵣₛₜᵤᵥₓᵦᵧᵨᵩᵪ]/,hc=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","ᵝ":"β","ᵞ":"γ","ᵟ":"δ","ᵠ":"ϕ","ᵡ":"χ","ᶿ":"θ"}),uc={"́":{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"}},dc={"á":"á","à":"à","ä":"ä","ǟ":"ǟ","ã":"ã","ā":"ā","ă":"ă","ắ":"ắ","ằ":"ằ","ẵ":"ẵ","ǎ":"ǎ","â":"â","ấ":"ấ","ầ":"ầ","ẫ":"ẫ","ȧ":"ȧ","ǡ":"ǡ","å":"å","ǻ":"ǻ","ḃ":"ḃ","ć":"ć","ḉ":"ḉ","č":"č","ĉ":"ĉ","ċ":"ċ","ç":"ç","ď":"ď","ḋ":"ḋ","ḑ":"ḑ","é":"é","è":"è","ë":"ë","ẽ":"ẽ","ē":"ē","ḗ":"ḗ","ḕ":"ḕ","ĕ":"ĕ","ḝ":"ḝ","ě":"ě","ê":"ê","ế":"ế","ề":"ề","ễ":"ễ","ė":"ė","ȩ":"ȩ","ḟ":"ḟ","ǵ":"ǵ","ḡ":"ḡ","ğ":"ğ","ǧ":"ǧ","ĝ":"ĝ","ġ":"ġ","ģ":"ģ","ḧ":"ḧ","ȟ":"ȟ","ĥ":"ĥ","ḣ":"ḣ","ḩ":"ḩ","í":"í","ì":"ì","ï":"ï","ḯ":"ḯ","ĩ":"ĩ","ī":"ī","ĭ":"ĭ","ǐ":"ǐ","î":"î","ǰ":"ǰ","ĵ":"ĵ","ḱ":"ḱ","ǩ":"ǩ","ķ":"ķ","ĺ":"ĺ","ľ":"ľ","ļ":"ļ","ḿ":"ḿ","ṁ":"ṁ","ń":"ń","ǹ":"ǹ","ñ":"ñ","ň":"ň","ṅ":"ṅ","ņ":"ņ","ó":"ó","ò":"ò","ö":"ö","ȫ":"ȫ","õ":"õ","ṍ":"ṍ","ṏ":"ṏ","ȭ":"ȭ","ō":"ō","ṓ":"ṓ","ṑ":"ṑ","ŏ":"ŏ","ǒ":"ǒ","ô":"ô","ố":"ố","ồ":"ồ","ỗ":"ỗ","ȯ":"ȯ","ȱ":"ȱ","ő":"ő","ṕ":"ṕ","ṗ":"ṗ","ŕ":"ŕ","ř":"ř","ṙ":"ṙ","ŗ":"ŗ","ś":"ś","ṥ":"ṥ","š":"š","ṧ":"ṧ","ŝ":"ŝ","ṡ":"ṡ","ş":"ş","ẗ":"ẗ","ť":"ť","ṫ":"ṫ","ţ":"ţ","ú":"ú","ù":"ù","ü":"ü","ǘ":"ǘ","ǜ":"ǜ","ǖ":"ǖ","ǚ":"ǚ","ũ":"ũ","ṹ":"ṹ","ū":"ū","ṻ":"ṻ","ŭ":"ŭ","ǔ":"ǔ","û":"û","ů":"ů","ű":"ű","ṽ":"ṽ","ẃ":"ẃ","ẁ":"ẁ","ẅ":"ẅ","ŵ":"ŵ","ẇ":"ẇ","ẘ":"ẘ","ẍ":"ẍ","ẋ":"ẋ","ý":"ý","ỳ":"ỳ","ÿ":"ÿ","ỹ":"ỹ","ȳ":"ȳ","ŷ":"ŷ","ẏ":"ẏ","ẙ":"ẙ","ź":"ź","ž":"ž","ẑ":"ẑ","ż":"ż","Á":"Á","À":"À","Ä":"Ä","Ǟ":"Ǟ","Ã":"Ã","Ā":"Ā","Ă":"Ă","Ắ":"Ắ","Ằ":"Ằ","Ẵ":"Ẵ","Ǎ":"Ǎ","Â":"Â","Ấ":"Ấ","Ầ":"Ầ","Ẫ":"Ẫ","Ȧ":"Ȧ","Ǡ":"Ǡ","Å":"Å","Ǻ":"Ǻ","Ḃ":"Ḃ","Ć":"Ć","Ḉ":"Ḉ","Č":"Č","Ĉ":"Ĉ","Ċ":"Ċ","Ç":"Ç","Ď":"Ď","Ḋ":"Ḋ","Ḑ":"Ḑ","É":"É","È":"È","Ë":"Ë","Ẽ":"Ẽ","Ē":"Ē","Ḗ":"Ḗ","Ḕ":"Ḕ","Ĕ":"Ĕ","Ḝ":"Ḝ","Ě":"Ě","Ê":"Ê","Ế":"Ế","Ề":"Ề","Ễ":"Ễ","Ė":"Ė","Ȩ":"Ȩ","Ḟ":"Ḟ","Ǵ":"Ǵ","Ḡ":"Ḡ","Ğ":"Ğ","Ǧ":"Ǧ","Ĝ":"Ĝ","Ġ":"Ġ","Ģ":"Ģ","Ḧ":"Ḧ","Ȟ":"Ȟ","Ĥ":"Ĥ","Ḣ":"Ḣ","Ḩ":"Ḩ","Í":"Í","Ì":"Ì","Ï":"Ï","Ḯ":"Ḯ","Ĩ":"Ĩ","Ī":"Ī","Ĭ":"Ĭ","Ǐ":"Ǐ","Î":"Î","İ":"İ","Ĵ":"Ĵ","Ḱ":"Ḱ","Ǩ":"Ǩ","Ķ":"Ķ","Ĺ":"Ĺ","Ľ":"Ľ","Ļ":"Ļ","Ḿ":"Ḿ","Ṁ":"Ṁ","Ń":"Ń","Ǹ":"Ǹ","Ñ":"Ñ","Ň":"Ň","Ṅ":"Ṅ","Ņ":"Ņ","Ó":"Ó","Ò":"Ò","Ö":"Ö","Ȫ":"Ȫ","Õ":"Õ","Ṍ":"Ṍ","Ṏ":"Ṏ","Ȭ":"Ȭ","Ō":"Ō","Ṓ":"Ṓ","Ṑ":"Ṑ","Ŏ":"Ŏ","Ǒ":"Ǒ","Ô":"Ô","Ố":"Ố","Ồ":"Ồ","Ỗ":"Ỗ","Ȯ":"Ȯ","Ȱ":"Ȱ","Ő":"Ő","Ṕ":"Ṕ","Ṗ":"Ṗ","Ŕ":"Ŕ","Ř":"Ř","Ṙ":"Ṙ","Ŗ":"Ŗ","Ś":"Ś","Ṥ":"Ṥ","Š":"Š","Ṧ":"Ṧ","Ŝ":"Ŝ","Ṡ":"Ṡ","Ş":"Ş","Ť":"Ť","Ṫ":"Ṫ","Ţ":"Ţ","Ú":"Ú","Ù":"Ù","Ü":"Ü","Ǘ":"Ǘ","Ǜ":"Ǜ","Ǖ":"Ǖ","Ǚ":"Ǚ","Ũ":"Ũ","Ṹ":"Ṹ","Ū":"Ū","Ṻ":"Ṻ","Ŭ":"Ŭ","Ǔ":"Ǔ","Û":"Û","Ů":"Ů","Ű":"Ű","Ṽ":"Ṽ","Ẃ":"Ẃ","Ẁ":"Ẁ","Ẅ":"Ẅ","Ŵ":"Ŵ","Ẇ":"Ẇ","Ẍ":"Ẍ","Ẋ":"Ẋ","Ý":"Ý","Ỳ":"Ỳ","Ÿ":"Ÿ","Ỹ":"Ỹ","Ȳ":"Ȳ","Ŷ":"Ŷ","Ẏ":"Ẏ","Ź":"Ź","Ž":"Ž","Ẑ":"Ẑ","Ż":"Ż","ά":"ά","ὰ":"ὰ","ᾱ":"ᾱ","ᾰ":"ᾰ","έ":"έ","ὲ":"ὲ","ή":"ή","ὴ":"ὴ","ί":"ί","ὶ":"ὶ","ϊ":"ϊ","ΐ":"ΐ","ῒ":"ῒ","ῑ":"ῑ","ῐ":"ῐ","ό":"ό","ὸ":"ὸ","ύ":"ύ","ὺ":"ὺ","ϋ":"ϋ","ΰ":"ΰ","ῢ":"ῢ","ῡ":"ῡ","ῠ":"ῠ","ώ":"ώ","ὼ":"ὼ","Ύ":"Ύ","Ὺ":"Ὺ","Ϋ":"Ϋ","Ῡ":"Ῡ","Ῠ":"Ῠ","Ώ":"Ώ","Ὼ":"Ὼ"},(pc=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 lc(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 da("}")),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 n=this.fetch();if(-1!==a.endOfExpression.indexOf(n.text)||t&&n.text===t||e&&Kl[n.text]&&Kl[n.text].infix)break;if(!(n=this.parseAtom(t)))break;"internal"!==n.type&&r.push(n)}return"text"===this.mode&&this.formLigatures(r),this.handleInfixNodes(r)}handleInfixNodes(e){for(var t,r,n,i=-1,a=0;a{e instanceof Element&&"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),Mi.addHook("afterSanitizeAttributes",e=>{e instanceof Element&&"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target"))&&e.setAttribute("rel","noopener")})}var kc,Tc,Ec,Cc,Sc,_c,Ac,Lc,Nc,Ic,Rc,Mc,Dc,Oc,Pc,Bc,$c,Fc,zc,Gc,Uc,qc,jc,Wc,L,Yc,Hc,Vc,Xc,Kc,Zc,Qc,Jc,eh=e(()=>{Di(),kc=//gi,Tc=mt(e=>e?Rc(e).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Ec=(()=>{let e=!1;return()=>{e||(wc(),e=!0)}})(),mt(wc,"setupDompurifyHooks"),Cc=mt(e=>(Ec(),Mi.sanitize(e)),"removeScript"),Sc=mt((e,t)=>(!1!==t.flowchart?.htmlLabels&&("antiscript"===(t=t.securityLevel)||"strict"===t?e=Cc(e):"loose"!==t&&(e=(e=(e=Rc(e)).replace(//g,">")).replace(/=/g,"="),e=Ic(e))),e),"sanitizeMore"),_c=mt((e,t)=>e&&(t.dompurifyConfig?Mi.sanitize(Sc(e,t),t.dompurifyConfig):Mi.sanitize(Sc(e,t),{FORBID_TAGS:["style"]})).toString(),"sanitizeText"),Ac=mt((e,t)=>"string"==typeof e?_c(e,t):e.flat().map(e=>_c(e,t)),"sanitizeTextOrArray"),Lc=mt(e=>kc.test(e),"hasBreaks"),Nc=mt(e=>e.split(kc),"splitBreaks"),Ic=mt(e=>e.replace(/#br#/g,"
"),"placeholderToBreak"),Rc=mt(e=>e.replace(kc,"#br#"),"breakToPlaceholder"),Mc=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"),Dc=mt(e=>!(!1===e||["false","null","0"].includes(String(e).trim().toLowerCase())),"evaluate"),Oc=mt(function(...e){return e=e.filter(e=>!isNaN(e)),Math.max(...e)},"getMax"),Pc=mt(function(...e){return e=e.filter(e=>!isNaN(e)),Math.min(...e)},"getMin"),Bc=mt(function(e){var r,n,i=e.split(/(,)/),a=[];for(let t=0;tMath.max(0,e.split(t).length-1),"countOccurrence"),Fc=mt((e,t)=>(e=$c(e,"~"),t=$c(t,"~"),1===e&&1===t),"shouldCombineSets"),zc=mt(e=>{let t=$c(e,"~"),r=!1;if(t<=1)return e;t%2!=0&&e.startsWith("~")&&(e=e.substring(1),r=!0);let n=[...e],i=n.indexOf("~"),a=n.lastIndexOf("~");for(;-1!==i&&-1!==a&&i!==a;)n[i]="<",n[a]=">",i=n.indexOf("~"),a=n.lastIndexOf("~");return r&&n.unshift("~"),n.join("")},"processSet"),Gc=mt(()=>void 0!==window.MathMLElement,"isMathMLSupported"),Uc=/\$\$(.*)\$\$/g,qc=mt(e=>0<(e.match(Uc)?.length??0),"hasKatex"),jc=mt(async(e,t)=>(e=await Wc(e,t),(t=document.createElement("div")).innerHTML=e,t.id="katex-temp",t.style.visibility="hidden",t.style.position="absolute",t.style.top="0",document.querySelector("body")?.insertAdjacentElement("beforeend",t),e={width:t.clientWidth,height:t.clientHeight},t.remove(),e),"calculateMathMLDimensions"),Wc=mt(async(e,t)=>{if(!qc(e))return e;if(!(Gc()||t.legacyMathML||t.forceLegacyMathML))return e.replace(Uc,"MathML is unsupported in this environment.");{let r=(await Promise.resolve().then(()=>(bc(),Oi))).default,n=t.forceLegacyMathML||!Gc()&&t.legacyMathML?"htmlAndMathml":"mathml";return e.split(kc).map(e=>qc(e)?`
${e}
`:`
${e}
`).join("").replace(Uc,(e,t)=>r.renderToString(t,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(//g,""))}},"renderKatex"),L={getRows:Tc,sanitizeText:_c,sanitizeTextOrArray:Ac,hasBreaks:Lc,splitBreaks:Nc,lineBreakRegex:kc,removeScript:Cc,getUrl:Mc,evaluate:Dc,getMax:Oc,getMin:Pc}}),th=e(()=>{t(),Yc=mt(function(e,t){for(var r of t)e.attr(r[0],r[1])},"d3Attrs"),Hc=mt(function(e,t,r){var n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${t}px;`)):(n.set("height",e),n.set("width",t)),n},"calculateSvgSizeAttrs"),Vc=mt(function(e,t,r,n){t=Hc(t,r,n),Yc(e,t)},"configureSvgSize"),Xc=mt(function(e,t,r,n){var i=t.node().getBBox(),a=i.width,s=(M.info(`SVG bounds: ${a}x`+(s=i.height),i),M.info("Graph bounds: 0x0",e),M.info(`Calculated bounds: ${e=a+2*r}x`+(a=s+2*r)),Vc(t,a,e,n),`${i.x-r} ${i.y-r} ${i.width+2*r} `+(i.height+2*r));t.attr("viewBox",s)},"setupGraphViewbox")}),rh=e(()=>{t(),Kc={},Zc=mt((e,t,r)=>{let n="";return e in Kc&&Kc[e]?n=Kc[e](r):M.warn("No theme found for "+e),` & { font-family: ${r.fontFamily}; font-size: ${r.fontSize}; fill: ${r.textColor} @@ -342,52 +342,52 @@ l0,-`+(e+144)+`c-2,-159.3,-10,-310.7,-24,-454c-53.3,-528,-210,-949.7, ${n} - ${e} -`},"getStyles"),Qc=me((t,e)=>{void 0!==e&&(Kc[t]=e)},"addStylesForDiagram"),Jc=Zc}),nh={};oPt(nh,{clear:()=>lh,getAccDescription:()=>dh,getAccTitle:()=>hh,getDiagramTitle:()=>gh,setAccDescription:()=>uh,setAccTitle:()=>ch,setDiagramTitle:()=>ph});var ih,ah,sh,oh,lh,ch,hh,uh,dh,ph,gh,fh,mh,D,yh,vh,xh,bh,wh,kh,Th,Eh,Ch,_h,Sh,Ah,Lh,Nh,Ih,Rh,Mh,Dh,Oh,Ph,Bh,Fh,$h,zh,Gh,Uh,qh,jh,Wh,Yh,Hh,Vh,Xh,Kh,Zh,Qh,Jh,tu,eu,ru,nu,iu,au,su,ou,lu,cu,hu,uu,du,pu,gu,fu=t(()=>{th(),Nn(),sh=ah=ih="",oh=me(t=>Sc(t,Ir()),"sanitizeText"),lh=me(()=>{ah=sh=ih=""},"clear"),ch=me(t=>{ih=oh(t).replace(/^\s+/g,"")},"setAccTitle"),hh=me(()=>ih,"getAccTitle"),uh=me(t=>{sh=oh(t).replace(/\n\s+/g,` -`)},"setAccDescription"),dh=me(()=>sh,"getAccDescription"),ph=me(t=>{ah=oh(t)},"setDiagramTitle"),gh=me(()=>ah,"getDiagramTitle")}),mu=t(()=>{Ur(),e(),Nn(),th(),eh(),rh(),fu(),fh=M,mh=T,D=Ir,yh=Nr,vh=br,xh=me(t=>Sc(t,D()),"sanitizeText"),bh=Xc,wh=me(()=>nh,"getCommonDb"),kh={},Th=me((t,e,r)=>{kh[t]&&fh.warn(`Diagram with id ${t} already registered. Overwriting.`),kh[t]=e,r&&Jt(t,r),Qc(t,e.styles),e.injectUtils?.(fh,mh,D,xh,bh,wh(),()=>{})},"registerDiagram"),Eh=me(t=>{if(t in kh)return kh[t];throw new Ch(t)},"getDiagram"),Ch=class extends Error{static{me(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}}),yu=t(()=>{mu(),th(),fu(),_h=[],Sh=[""],Nh=[{alias:Ah="global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:Lh=""}],Rh="",Mh=!(Ih=[]),Dh=4,Oh=2,Bh=me(function(){return Ph},"getC4Type"),Fh=me(function(t){Ph=Sc(t,D())},"setC4Type"),$h=me(function(r,n,i,a,s,o,l,c,h){if(null!=r&&null!=n&&null!=i&&null!=a){let t={},e=Ih.find(t=>t.from===n&&t.to===i);e?t=e:Ih.push(t),t.type=r,t.from=n,t.to=i,t.label={text:a},null==s?t.techn={text:""}:"object"==typeof s?([r,a]=Object.entries(s)[0],t[r]={text:a}):t.techn={text:s},null==o?t.descr={text:""}:"object"==typeof o?([r,a]=Object.entries(o)[0],t[r]={text:a}):t.descr={text:o},"object"==typeof l?([s,r]=Object.entries(l)[0],t[s]=r):t.sprite=l,"object"==typeof c?([a,o]=Object.entries(c)[0],t[a]=o):t.tags=c,"object"==typeof h?([s,r]=Object.entries(h)[0],t[s]=r):t.link=h,t.wrap=lu()}},"addRel"),zh=me(function(r,n,i,a,s,o,l){if(null!==n&&null!==i){let t={},e=_h.find(t=>t.alias===n);var c;e&&n===e.alias?t=e:(t.alias=n,_h.push(t)),t.label=null==i?{text:""}:{text:i},null==a?t.descr={text:""}:"object"==typeof a?([i,c]=Object.entries(a)[0],t[i]={text:c}):t.descr={text:a},"object"==typeof s?([i,c]=Object.entries(s)[0],t[i]=c):t.sprite=s,"object"==typeof o?([a,i]=Object.entries(o)[0],t[a]=i):t.tags=o,"object"==typeof l?([c,s]=Object.entries(l)[0],t[c]=s):t.link=l,t.typeC4Shape={text:r},t.parentBoundary=Ah,t.wrap=lu()}},"addPersonOrSystem"),Gh=me(function(r,n,i,a,s,o,l,c){if(null!==n&&null!==i){let t={},e=_h.find(t=>t.alias===n);var h;e&&n===e.alias?t=e:(t.alias=n,_h.push(t)),t.label=null==i?{text:""}:{text:i},null==a?t.techn={text:""}:"object"==typeof a?([i,h]=Object.entries(a)[0],t[i]={text:h}):t.techn={text:a},null==s?t.descr={text:""}:"object"==typeof s?([i,h]=Object.entries(s)[0],t[i]={text:h}):t.descr={text:s},"object"==typeof o?([a,i]=Object.entries(o)[0],t[a]=i):t.sprite=o,"object"==typeof l?([h,s]=Object.entries(l)[0],t[h]=s):t.tags=l,"object"==typeof c?([a,i]=Object.entries(c)[0],t[a]=i):t.link=c,t.wrap=lu(),t.typeC4Shape={text:r},t.parentBoundary=Ah}},"addContainer"),Uh=me(function(r,n,i,a,s,o,l,c){if(null!==n&&null!==i){let t={},e=_h.find(t=>t.alias===n);var h;e&&n===e.alias?t=e:(t.alias=n,_h.push(t)),t.label=null==i?{text:""}:{text:i},null==a?t.techn={text:""}:"object"==typeof a?([i,h]=Object.entries(a)[0],t[i]={text:h}):t.techn={text:a},null==s?t.descr={text:""}:"object"==typeof s?([i,h]=Object.entries(s)[0],t[i]={text:h}):t.descr={text:s},"object"==typeof o?([a,i]=Object.entries(o)[0],t[a]=i):t.sprite=o,"object"==typeof l?([h,s]=Object.entries(l)[0],t[h]=s):t.tags=l,"object"==typeof c?([a,i]=Object.entries(c)[0],t[a]=i):t.link=c,t.wrap=lu(),t.typeC4Shape={text:r},t.parentBoundary=Ah}},"addComponent"),qh=me(function(r,n,i,a,s){if(null!==r&&null!==n){let t={},e=Nh.find(t=>t.alias===r);var o;e&&r===e.alias?t=e:(t.alias=r,Nh.push(t)),t.label=null==n?{text:""}:{text:n},null==i?t.type={text:"system"}:"object"==typeof i?([n,o]=Object.entries(i)[0],t[n]={text:o}):t.type={text:i},"object"==typeof a?([n,o]=Object.entries(a)[0],t[n]=o):t.tags=a,"object"==typeof s?([i,n]=Object.entries(s)[0],t[i]=n):t.link=s,t.parentBoundary=Ah,t.wrap=lu(),Lh=Ah,Ah=r,Sh.push(Lh)}},"addPersonOrSystemBoundary"),jh=me(function(r,n,i,a,s){if(null!==r&&null!==n){let t={},e=Nh.find(t=>t.alias===r);var o;e&&r===e.alias?t=e:(t.alias=r,Nh.push(t)),t.label=null==n?{text:""}:{text:n},null==i?t.type={text:"container"}:"object"==typeof i?([n,o]=Object.entries(i)[0],t[n]={text:o}):t.type={text:i},"object"==typeof a?([n,o]=Object.entries(a)[0],t[n]=o):t.tags=a,"object"==typeof s?([i,n]=Object.entries(s)[0],t[i]=n):t.link=s,t.parentBoundary=Ah,t.wrap=lu(),Lh=Ah,Ah=r,Sh.push(Lh)}},"addContainerBoundary"),Wh=me(function(r,n,i,a,s,t,o,l){if(null!==n&&null!==i){let t={},e=Nh.find(t=>t.alias===n);var c;e&&n===e.alias?t=e:(t.alias=n,Nh.push(t)),t.label=null==i?{text:""}:{text:i},null==a?t.type={text:"node"}:"object"==typeof a?([i,c]=Object.entries(a)[0],t[i]={text:c}):t.type={text:a},null==s?t.descr={text:""}:"object"==typeof s?([i,c]=Object.entries(s)[0],t[i]={text:c}):t.descr={text:s},"object"==typeof o?([a,i]=Object.entries(o)[0],t[a]=i):t.tags=o,"object"==typeof l?([c,s]=Object.entries(l)[0],t[c]=s):t.link=l,t.nodeType=r,t.parentBoundary=Ah,t.wrap=lu(),Lh=Ah,Ah=n,Sh.push(Lh)}},"addDeploymentNode"),Yh=me(function(){Ah=Lh,Sh.pop(),Lh=Sh.pop(),Sh.push(Lh)},"popBoundaryParseStack"),Hh=me(function(t,e,r,n,i,a,s,o,l,c,h){let u=_h.find(t=>t.alias===e);var d,p;void 0===u&&void 0===(u=Nh.find(t=>t.alias===e))||(null!=r&&("object"==typeof r?([p,d]=Object.entries(r)[0],u[p]=d):u.bgColor=r),null!=n&&("object"==typeof n?([p,d]=Object.entries(n)[0],u[p]=d):u.fontColor=n),null!=i&&("object"==typeof i?([r,p]=Object.entries(i)[0],u[r]=p):u.borderColor=i),null!=a&&("object"==typeof a?([d,n]=Object.entries(a)[0],u[d]=n):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?([i,d]=Object.entries(o)[0],u[i]=d):u.sprite=o),null!=l&&("object"==typeof l?([n,a]=Object.entries(l)[0],u[n]=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,i]=Object.entries(h)[0],u[s]=i):u.legendSprite=h))},"updateElStyle"),Vh=me(function(t,e,r,n,i,a,s){var o,l,c=Ih.find(t=>t.from===e&&t.to===r);void 0!==c&&(null!=n&&("object"==typeof n?([o,l]=Object.entries(n)[0],c[o]=l):c.textColor=n),null!=i&&("object"==typeof i?([o,l]=Object.entries(i)[0],c[o]=l):c.lineColor=i),null!=a&&("object"==typeof a?([n,o]=Object.entries(a)[0],c[n]=parseInt(o)):c.offsetX=parseInt(a)),null!=s)&&("object"==typeof s?([l,i]=Object.entries(s)[0],c[l]=parseInt(i)):c.offsetY=parseInt(s))},"updateRelStyle"),Xh=me(function(t,e,r){var e="object"==typeof e?(n=Object.values(e)[0],parseInt(n)):parseInt(e),n="object"==typeof r?(n=Object.values(r)[0],parseInt(n)):parseInt(r);1<=e&&(Dh=e),1<=n&&(Oh=n)},"updateLayoutConfig"),Kh=me(function(){return Dh},"getC4ShapeInRow"),Zh=me(function(){return Oh},"getC4BoundaryInRow"),Qh=me(function(){return Ah},"getCurrentBoundaryParse"),Jh=me(function(){return Lh},"getParentBoundaryParse"),tu=me(function(e){return null==e?_h:_h.filter(t=>t.parentBoundary===e)},"getC4ShapeArray"),eu=me(function(e){return _h.find(t=>t.alias===e)},"getC4Shape"),ru=me(function(t){return Object.keys(tu(t))},"getC4ShapeKeys"),nu=me(function(e){return null==e?Nh:Nh.filter(t=>t.parentBoundary===e)},"getBoundaries"),iu=nu,au=me(function(){return Ih},"getRels"),su=me(function(){return Rh},"getTitle"),ou=me(function(t){Mh=t},"setWrap"),lu=me(function(){return Mh},"autoWrap"),cu=me(function(){_h=[],Nh=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Ah="global",Sh=[Lh=""],Sh=[Rh=""],Mh=!(Ih=[]),Dh=4,Oh=2},"clear"),hu={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},uu={FILLED:0,OPEN:1},du={LEFTOF:0,RIGHTOF:1,OVER:2},pu=me(function(t){Rh=Sc(t,D())},"setTitle"),gu={addPersonOrSystem:zh,addPersonOrSystemBoundary:qh,addContainer:Gh,addContainerBoundary:jh,addComponent:Uh,addDeploymentNode:Wh,popBoundaryParseStack:Yh,addRel:$h,updateElStyle:Hh,updateRelStyle:Vh,updateLayoutConfig:Xh,autoWrap:lu,setWrap:ou,getC4ShapeArray:tu,getC4Shape:eu,getC4ShapeKeys:ru,getBoundaries:nu,getBoundarys:iu,getCurrentBoundaryParse:Qh,getParentBoundaryParse:Jh,getRels:au,getTitle:su,getC4Type:Bh,getC4ShapeInRow:Kh,getC4BoundaryInRow:Zh,setAccTitle:ch,getAccTitle:hh,getAccDescription:dh,setAccDescription:uh,getConfig:me(()=>D().c4,"getConfig"),clear:cu,LINETYPE:hu,ARROWTYPE:uu,PLACEMENT:du,setTitle:pu,setC4Type:Fh}});function vu(t,e){return null==t||null==e?NaN:t{me(vu,"ascending")});function bu(t,e){return null==t||null==e?NaN:e{me(bu,"descending")});function ku(r){let a,s,i;function o(t,e,r=0,n=t.length){if(r>>1}while(s(t[i],e)<0?r=1+i:n=i,r>>1}while(s(t[i],e)<=0?r=1+i:n=i,r-i(t[n],e)?n-1:n}return i=2!==r.length?(a=vu,s=me((t,e)=>vu(r(t),e),"compare2"),me((t,e)=>r(t)-e,"delta")):(a=r===vu||r===bu?r:Tu,s=r),me(o,"left"),me(t,"right"),me(e,"center"),{left:o,center:e,right:t}}function Tu(){return 0}var Eu=t(()=>{xu(),wu(),me(ku,"bisector"),me(Tu,"zero")});function Cu(t){return null===t?NaN:+t}var _u,Su,Au=t(()=>{me(Cu,"number")}),Lu=t(()=>{xu(),Eu(),Au(),_u=ku(vu).right,ku(Cu).center,Su=_u});function Nu({_intern:t,_key:e},r){return e=e(r),t.has(e)?t.get(e):r}function Iu({_intern:t,_key:e},r){return e=e(r),t.has(e)?t.get(e):(t.set(e,r),r)}function Ru({_intern:t,_key:e},r){return e=e(r),t.has(e)&&(r=t.get(e),t.delete(e)),r}function Mu(t){return null!==t&&"object"==typeof t?t.valueOf():t}var Du,Ou=t(()=>{Du=class extends Map{static{me(this,"InternMap")}constructor(t,e=Mu){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(var[r,n]of t)this.set(r,n)}get(t){return super.get(Nu(this,t))}has(t){return super.has(Nu(this,t))}set(t,e){return super.set(Iu(this,t),e)}delete(t){return super.delete(Ru(this,t))}},me(Nu,"intern_get"),me(Iu,"intern_set"),me(Ru,"intern_delete"),me(Mu,"keyof")});function Pu(t,e,r){let n=(e-t)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),s=zu<=a?10:Gu<=a?5:Uu<=a?2:1,o,l,c;return i<0?(c=Math.pow(10,-i)/s,o=Math.round(t*c),l=Math.round(e*c),o/ce&&--l,c=-c):(c=Math.pow(10,i)*s,o=Math.round(t/c),l=Math.round(e/c),o*ce&&--l),l{zu=Math.sqrt(50),Gu=Math.sqrt(10),Uu=Math.sqrt(2),me(Pu,"tickSpec"),me(Bu,"ticks"),me(Fu,"tickIncrement"),me($u,"tickStep")});function ju(e,r){let n;if(void 0===r)for(var t of e)null!=t&&(n{me(ju,"max")});function Yu(e,r){let n;if(void 0===r)for(var t of e)null!=t&&(n>t||void 0===n&&t<=t)&&(n=t);else{let t=-1;for(var i of e)null!=(i=r(i,++t,e))&&(n>i||void 0===n&&i<=i)&&(n=i)}return n}var Hu=t(()=>{me(Yu,"min")});function Vu(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=0|Math.max(0,Math.ceil((e-t)/r)),a=new Array(i);++n{me(Vu,"range")}),Ku=t(()=>{Lu(),Eu(),Wu(),Hu(),Xu(),qu(),Ou()});function Zu(t){return t}var Qu=t(()=>{me(Zu,"default")});function Ju(t){return"translate("+t+",0)"}function td(t){return"translate(0,"+t+")"}function ed(e){return t=>+e(t)}function rd(e,r){return r=Math.max(0,e.bandwidth()-2*r)/2,e.round()&&(r=Math.round(r)),t=>+e(t)+r}function nd(){return!this.__axis}function id(p,g){var f=[],m=null,y=null,v=6,x=6,b=3,w=typeof window<"u"&&1{Qu(),od=1,ld=3,me(Ju,"translateX"),me(td,"translateY"),me(ed,"number"),me(rd,"center"),me(nd,"entering"),me(id,"axis"),me(ad,"axisTop"),me(sd,"axisBottom")}),hd=t(()=>{cd()});function ud(){for(var t,e=0,r=arguments.length,n={};e{md={value:me(()=>{},"value")},me(ud,"dispatch"),me(dd,"Dispatch"),me(pd,"parseTypenames"),dd.prototype=ud.prototype={constructor:dd,on:me(function(t,e){var r,n=this._,i=pd(t+"",n),a=-1,s=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a{bd()}),kd=t(()=>{xd={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 Td(t){var e=t+="",r=e.indexOf(":");return 0<=r&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),xd.hasOwnProperty(e)?{space:xd[e],local:t}:t}var Ed=t(()=>{kd(),me(Td,"default")});function Cd(r){return function(){var t=this.ownerDocument,e=this.namespaceURI;return e===vd&&t.documentElement.namespaceURI===vd?t.createElement(r):t.createElementNS(e,r)}}function _d(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Sd(t){return((t=Td(t)).local?_d:Cd)(t)}var Ad=t(()=>{Ed(),kd(),me(Cd,"creatorInherit"),me(_d,"creatorFixed"),me(Sd,"default")});function Ld(){}function Nd(t){return null==t?Ld:function(){return this.querySelector(t)}}var Id=t(()=>{me(Ld,"none"),me(Nd,"default")});function Rd(t){"function"!=typeof t&&(t=Nd(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i{hg(),Id(),me(Rd,"default")});function Dd(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}var Od=t(()=>{me(Dd,"array")});function Pd(){return[]}function Bd(t){return null==t?Pd:function(){return this.querySelectorAll(t)}}var Fd=t(()=>{me(Pd,"empty"),me(Bd,"default")});function $d(t){return function(){return Dd(t.apply(this,arguments))}}function zd(t){t=("function"==typeof t?$d:Bd)(t);for(var e=this._groups,r=e.length,n=[],i=[],a=0;a{hg(),Od(),Fd(),me($d,"arrayAll"),me(zd,"default")});function Ud(t){return function(){return this.matches(t)}}function qd(e){return function(t){return t.matches(e)}}var jd=t(()=>{me(Ud,"default"),me(qd,"childMatcher")});function Wd(t){return function(){return Vd.call(this.children,t)}}function Yd(){return this.firstElementChild}function Hd(t){return this.select(null==t?Yd:Wd("function"==typeof t?t:qd(t)))}var Vd,Xd=t(()=>{jd(),Vd=Array.prototype.find,me(Wd,"childFind"),me(Yd,"childFirst"),me(Hd,"default")});function Kd(){return Array.from(this.children)}function Zd(t){return function(){return Jd.call(this.children,t)}}function Qd(t){return this.selectAll(null==t?Kd:Zd("function"==typeof t?t:qd(t)))}var Jd,t0=t(()=>{jd(),Jd=Array.prototype.filter,me(Kd,"children"),me(Zd,"childrenFilter"),me(Qd,"default")});function e0(t){"function"!=typeof t&&(t=Ud(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i{hg(),jd(),me(e0,"default")});function n0(t){return new Array(t.length)}var i0=t(()=>{me(n0,"default")});function a0(){return new ag(this._enter||this._groups.map(n0),this._parents)}function s0(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}var o0=t(()=>{i0(),hg(),me(a0,"default"),me(s0,"EnterNode"),s0.prototype={constructor:s0,appendChild:me(function(t){return this._parent.insertBefore(t,this._next)},"appendChild"),insertBefore:me(function(t,e){return this._parent.insertBefore(t,e)},"insertBefore"),querySelector:me(function(t){return this._parent.querySelector(t)},"querySelector"),querySelectorAll:me(function(t){return this._parent.querySelectorAll(t)},"querySelectorAll")}});function l0(t){return function(){return t}}var c0=t(()=>{me(l0,"default")});function h0(t,e,r,n,i,a){for(var s,o=0,l=e.length,c=a.length;o{hg(),o0(),c0(),me(h0,"bindIndex"),me(u0,"bindKey"),me(d0,"datum"),me(p0,"default"),me(g0,"arraylike")});function m0(){return new ag(this._exit||this._groups.map(n0),this._parents)}var y0=t(()=>{i0(),hg(),me(m0,"default")});function v0(t,e,r){var n=this.enter(),i=this,a=this.exit(),n="function"==typeof t?(n=t(n))&&n.selection():n.append(t+"");return null!=e&&(i=(i=e(i))&&i.selection()),null==r?a.remove():r(a),n&&i?n.merge(i).order():i}var x0=t(()=>{me(v0,"default")});function b0(t){for(var t=t.selection?t.selection():t,e=this._groups,r=t._groups,n=e.length,t=r.length,i=Math.min(n,t),a=new Array(n),s=0;s{hg(),me(b0,"default")});function k0(){for(var t=this._groups,e=-1,r=t.length;++e{me(k0,"default")});function E0(r){function t(t,e){return t&&e?r(t.__data__,e.__data__):!t-!e}r=r||C0,me(t,"compareNode");for(var e=this._groups,n=e.length,i=new Array(n),a=0;a{hg(),me(E0,"default"),me(C0,"ascending")});function S0(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}var A0=t(()=>{me(S0,"default")});function L0(){return Array.from(this)}var N0=t(()=>{me(L0,"default")});function I0(){for(var t=this._groups,e=0,r=t.length;e{me(I0,"default")});function M0(){let t=0;for(var e of this)++t;return t}var D0=t(()=>{me(M0,"default")});function O0(){return!this.node()}var P0=t(()=>{me(O0,"default")});function B0(t){for(var e=this._groups,r=0,n=e.length;r{me(B0,"default")});function $0(t){return function(){this.removeAttribute(t)}}function z0(t){return function(){this.removeAttributeNS(t.space,t.local)}}function G0(t,e){return function(){this.setAttribute(t,e)}}function U0(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function q0(e,r){return function(){var t=r.apply(this,arguments);null==t?this.removeAttribute(e):this.setAttribute(e,t)}}function j0(e,r){return function(){var t=r.apply(this,arguments);null==t?this.removeAttributeNS(e.space,e.local):this.setAttributeNS(e.space,e.local,t)}}function W0(t,e){var r,t=Td(t);return arguments.length<2?(r=this.node(),t.local?r.getAttributeNS(t.space,t.local):r.getAttribute(t)):this.each((null==e?t.local?z0:$0:"function"==typeof e?t.local?j0:q0:t.local?U0:G0)(t,e))}var Y0=t(()=>{Ed(),me($0,"attrRemove"),me(z0,"attrRemoveNS"),me(G0,"attrConstant"),me(U0,"attrConstantNS"),me(q0,"attrFunction"),me(j0,"attrFunctionNS"),me(W0,"default")});function H0(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}var V0=t(()=>{me(H0,"default")});function X0(t){return function(){this.style.removeProperty(t)}}function K0(t,e,r){return function(){this.style.setProperty(t,e,r)}}function Z0(e,r,n){return function(){var t=r.apply(this,arguments);null==t?this.style.removeProperty(e):this.style.setProperty(e,t,n)}}function Q0(t,e,r){return 1{V0(),me(X0,"styleRemove"),me(K0,"styleConstant"),me(Z0,"styleFunction"),me(Q0,"default"),me(J0,"styleValue")});function ep(t){return function(){delete this[t]}}function rp(t,e){return function(){this[t]=e}}function np(e,r){return function(){var t=r.apply(this,arguments);null==t?delete this[e]:this[e]=t}}function ip(t,e){return 1{me(ep,"propertyRemove"),me(rp,"propertyConstant"),me(np,"propertyFunction"),me(ip,"default")});function sp(t){return t.trim().split(/^|\s+/)}function op(t){return t.classList||new lp(t)}function lp(t){this._node=t,this._names=sp(t.getAttribute("class")||"")}function cp(t,e){for(var r=op(t),n=-1,i=e.length;++n{me(sp,"classArray"),me(op,"classList"),me(lp,"ClassList"),lp.prototype={add:me(function(t){this._names.indexOf(t)<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},"add"),remove:me(function(t){0<=(t=this._names.indexOf(t))&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},"remove"),contains:me(function(t){return 0<=this._names.indexOf(t)},"contains")},me(cp,"classedAdd"),me(hp,"classedRemove"),me(up,"classedTrue"),me(dp,"classedFalse"),me(pp,"classedFunction"),me(gp,"default")});function mp(){this.textContent=""}function yp(t){return function(){this.textContent=t}}function vp(e){return function(){var t=e.apply(this,arguments);this.textContent=t??""}}function xp(t){return arguments.length?this.each(null==t?mp:("function"==typeof t?vp:yp)(t)):this.node().textContent}var bp=t(()=>{me(mp,"textRemove"),me(yp,"textConstant"),me(vp,"textFunction"),me(xp,"default")});function wp(){this.innerHTML=""}function kp(t){return function(){this.innerHTML=t}}function Tp(e){return function(){var t=e.apply(this,arguments);this.innerHTML=t??""}}function Ep(t){return arguments.length?this.each(null==t?wp:("function"==typeof t?Tp:kp)(t)):this.node().innerHTML}var Cp=t(()=>{me(wp,"htmlRemove"),me(kp,"htmlConstant"),me(Tp,"htmlFunction"),me(Ep,"default")});function _p(){this.nextSibling&&this.parentNode.appendChild(this)}function Sp(){return this.each(_p)}var Ap=t(()=>{me(_p,"raise"),me(Sp,"default")});function Lp(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Np(){return this.each(Lp)}var Ip=t(()=>{me(Lp,"lower"),me(Np,"default")});function Rp(t){var e="function"==typeof t?t:Sd(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}var Mp=t(()=>{Ad(),me(Rp,"default")});function Dp(){return null}function Op(t,e){var r="function"==typeof t?t:Sd(t),n=null==e?Dp:"function"==typeof e?e:Nd(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var Pp=t(()=>{Ad(),Id(),me(Dp,"constantNull"),me(Op,"default")});function Bp(){var t=this.parentNode;t&&t.removeChild(this)}function Fp(){return this.each(Bp)}var $p=t(()=>{me(Bp,"remove"),me(Fp,"default")});function zp(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Gp(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Up(t){return this.select(t?Gp:zp)}var qp=t(()=>{me(zp,"selection_cloneShallow"),me(Gp,"selection_cloneDeep"),me(Up,"default")});function jp(t){return arguments.length?this.property("__data__",t):this.node().__data__}var Wp=t(()=>{me(jp,"default")});function Yp(e){return function(t){e.call(this,t,this.__data__)}}function Hp(t){return t.trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");return 0<=r&&(e=t.slice(r+1),t=t.slice(0,r)),{type:t,name:e}})}function Vp(a){return function(){var t=this.__on;if(t){for(var e,r=0,n=-1,i=t.length;r{me(Yp,"contextListener"),me(Hp,"parseTypenames"),me(Vp,"onRemove"),me(Xp,"onAdd"),me(Kp,"default")});function Qp(t,e,r){var n=H0(t),i=n.CustomEvent;"function"==typeof i?i=new i(e,r):(i=n.document.createEvent("Event"),r?(i.initEvent(e,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function Jp(t,e){return function(){return Qp(this,t,e)}}function tg(t,e){return function(){return Qp(this,t,e.apply(this,arguments))}}function eg(t,e){return this.each(("function"==typeof e?tg:Jp)(t,e))}var rg=t(()=>{V0(),me(Qp,"dispatchEvent"),me(Jp,"dispatchConstant"),me(tg,"dispatchFunction"),me(eg,"default")});function*ng(){for(var t=this._groups,e=0,r=t.length;e{me(ng,"default")});function ag(t,e){this._groups=t,this._parents=e}function sg(){return new ag([[document.documentElement]],lg)}function og(){return this}var lg,cg,hg=t(()=>{Md(),Gd(),Xd(),t0(),r0(),f0(),o0(),y0(),x0(),w0(),T0(),_0(),A0(),N0(),R0(),D0(),P0(),F0(),Y0(),tp(),ap(),fp(),bp(),Cp(),Ap(),Ip(),Mp(),Pp(),$p(),qp(),Wp(),Zp(),rg(),ig(),lg=[null],me(ag,"Selection"),me(sg,"selection"),me(og,"selection_selection"),ag.prototype=sg.prototype={constructor:ag,select:Rd,selectAll:zd,selectChild:Hd,selectChildren:Qd,filter:e0,data:p0,enter:a0,exit:m0,join:v0,merge:b0,selection:og,order:k0,sort:E0,call:S0,nodes:L0,node:I0,size:M0,empty:O0,each:B0,attr:W0,style:Q0,property:ip,classed:gp,text:xp,html:Ep,raise:Sp,lower:Np,append:Rp,insert:Op,remove:Fp,clone:Up,datum:jp,on:Kp,dispatch:eg,[Symbol.iterator]:ng},cg=sg});function H(t){return"string"==typeof t?new ag([[document.querySelector(t)]],[document.documentElement]):new ag([[t]],lg)}var ug=t(()=>{hg(),me(H,"default")}),dg=t(()=>{jd(),Ed(),ug(),hg(),Id(),Fd(),tp()}),pg=t(()=>{});function gg(t,e,r){(t.prototype=e.prototype=r).constructor=t}function fg(t,e){var r,n=Object.create(t.prototype);for(r in e)n[r]=e[r];return n}var mg=t(()=>{me(gg,"default"),me(fg,"extend")});function yg(){}function vg(){return this.rgb().formatHex()}function xg(){return this.rgb().formatHex8()}function bg(){return Og(this).formatHsl()}function wg(){return this.rgb().formatRgb()}function kg(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=jg.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?Tg(e):3===r?new Sg(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?Eg(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?Eg(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Wg.exec(t))?new Sg(e[1],e[2],e[3],1):(e=Yg.exec(t))?new Sg(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Hg.exec(t))?Eg(e[1],e[2],e[3],e[4]):(e=Vg.exec(t))?Eg(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=Xg.exec(t))?Dg(e[1],e[2]/100,e[3]/100,1):(e=Kg.exec(t))?Dg(e[1],e[2]/100,e[3]/100,e[4]):Zg.hasOwnProperty(t)?Tg(Zg[t]):"transparent"===t?new Sg(NaN,NaN,NaN,0):null}function Tg(t){return new Sg(t>>16&255,t>>8&255,255&t,1)}function Eg(t,e,r,n){return new Sg(t=n<=0?e=r=NaN:t,e,r,n)}function Cg(t){return(t=t instanceof yg?t:kg(t))?new Sg((t=t.rgb()).r,t.g,t.b,t.opacity):new Sg}function _g(t,e,r,n){return 1===arguments.length?Cg(t):new Sg(t,e,r,n??1)}function Sg(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}function Ag(){return"#"+Mg(this.r)+Mg(this.g)+Mg(this.b)}function Lg(){return"#"+Mg(this.r)+Mg(this.g)+Mg(this.b)+Mg(255*(isNaN(this.opacity)?1:this.opacity))}function Ng(){var t=Ig(this.opacity);return(1===t?"rgb(":"rgba(")+Rg(this.r)+`, ${Rg(this.g)}, `+Rg(this.b)+(1===t?")":`, ${t})`)}function Ig(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function Rg(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function Mg(t){return((t=Rg(t))<16?"0":"")+t.toString(16)}function Dg(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||1<=r?t=e=NaN:e<=0&&(t=NaN),new Bg(t,e,r,n)}function Og(t){var e,r,n,i,a,s,o,l;return t instanceof Bg?new Bg(t.h,t.s,t.l,t.opacity):(t=t instanceof yg?t:kg(t))?t instanceof Bg?t:(e=(t=t.rgb()).r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),s=NaN,l=((a=Math.max(e,r,n))+i)/2,(o=a-i)?(s=e===a?(r-n)/o+6*(r{mg(),me(yg,"Color"),Gg="\\s*([+-]?\\d+)\\s*",Ug="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",qg="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",jg=/^#([0-9a-f]{3,8})$/,Wg=new RegExp(`^rgb\\(${Gg},${Gg},${Gg}\\)$`),Yg=new RegExp(`^rgb\\(${qg},${qg},${qg}\\)$`),Hg=new RegExp(`^rgba\\(${Gg},${Gg},${Gg},${Ug}\\)$`),Vg=new RegExp(`^rgba\\(${qg},${qg},${qg},${Ug}\\)$`),Xg=new RegExp(`^hsl\\(${Ug},${qg},${qg}\\)$`),Kg=new RegExp(`^hsla\\(${Ug},${qg},${qg},${Ug}\\)$`),Zg={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},gg(yg,kg,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:vg,formatHex:vg,formatHex8:xg,formatHsl:bg,formatRgb:wg,toString:wg}),me(vg,"color_formatHex"),me(xg,"color_formatHex8"),me(bg,"color_formatHsl"),me(wg,"color_formatRgb"),me(kg,"color"),me(Tg,"rgbn"),me(Eg,"rgba"),me(Cg,"rgbConvert"),me(_g,"rgb"),me(Sg,"Rgb"),gg(Sg,_g,fg(yg,{brighter(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Sg(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new Sg(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Sg(Rg(this.r),Rg(this.g),Rg(this.b),Ig(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:Ag,formatHex:Ag,formatHex8:Lg,formatRgb:Ng,toString:Ng})),me(Ag,"rgb_formatHex"),me(Lg,"rgb_formatHex8"),me(Ng,"rgb_formatRgb"),me(Ig,"clampa"),me(Rg,"clampi"),me(Mg,"hex"),me(Dg,"hsla"),me(Og,"hslConvert"),me(Pg,"hsl"),me(Bg,"Hsl"),gg(Bg,Pg,fg(yg,{brighter(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Bg(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new Bg(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l;return new Sg(zg(240<=t?t-240:120+t,r=2*r-(e=r+(r<.5?r:1-r)*e),e),zg(t,r,e),zg(t<120?240+t:t-120,r,e),this.opacity)},clamp(){return new Bg(Fg(this.h),$g(this.s),$g(this.l),Ig(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 t=Ig(this.opacity);return(1===t?"hsl(":"hsla(")+Fg(this.h)+`, ${100*$g(this.s)}%, ${100*$g(this.l)}%`+(1===t?")":`, ${t})`)}})),me(Fg,"clamph"),me($g,"clampt"),me(zg,"hsl2rgb")}),e1=t(()=>{Qg=Math.PI/180,Jg=180/Math.PI});function r1(t){var e,r,n,i,a,s;return t instanceof i1?new i1(t.l,t.a,t.b,t.opacity):t instanceof u1?d1(t):(i=a1(.2225045*(e=l1((t=t instanceof Sg?t:Cg(t)).r))+.7168786*(r=l1(t.g))+.0606169*(n=l1(t.b))),e===r&&r===n?a=s=i:(a=a1((.4360747*e+.3850649*r+.1430804*n)/.96422),s=a1((.0139322*e+.0971045*r+.7141733*n)/.82521)),new i1(116*i-16,500*(a-i),200*(i-s),t.opacity))}function n1(t,e,r,n){return 1===arguments.length?r1(t):new i1(t,e,r,n??1)}function i1(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}function a1(t){return m1{mg(),t1(),e1(),p1=4/29,f1=3*(g1=6/29)*g1,m1=g1*g1*g1,me(r1,"labConvert"),me(n1,"lab"),me(i1,"Lab"),gg(i1,n1,fg(yg,{brighter(t){return new i1(this.l+18*(t??1),this.a,this.b,this.opacity)},darker(t){return new i1(this.l-18*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return new Sg(o1(3.1338561*(e=.96422*s1(e))-1.6168667*(t=+s1(t))-.4906146*(r=.82521*s1(r))),o1(-.9787684*e+1.9161415*t+.033454*r),o1(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}})),me(a1,"xyz2lab"),me(s1,"lab2xyz"),me(o1,"lrgb2rgb"),me(l1,"rgb2lrgb"),me(c1,"hclConvert"),me(h1,"hcl"),me(u1,"Hcl"),me(d1,"hcl2lab"),gg(u1,h1,fg(yg,{brighter(t){return new u1(this.h,this.c,this.l+18*(t??1),this.opacity)},darker(t){return new u1(this.h,this.c,this.l-18*(t??1),this.opacity)},rgb(){return d1(this).rgb()}}))}),v1=t(()=>{t1(),y1()});function x1(t,e,r,n,i){var a=t*t,s=a*t;return((1-3*t+3*a-s)*e+(4-6*a+3*s)*r+(1+3*t+3*a-3*s)*n+s*i)/6}function b1(s){var o=s.length-1;return function(t){var e=t<=0?t=0:1<=t?o-(t=1):Math.floor(t*o),r=s[e],n=s[e+1],i=0{me(x1,"basis"),me(b1,"default")});function k1(n){var i=n.length;return function(t){var e=Math.floor(((t%=1)<0?++t:t)*i),r=n[(e+i-1)%i];return x1((t-e/i)*i,r,n[e%i],n[(e+1)%i],n[(e+2)%i])}}var T1,E1=t(()=>{w1(),me(k1,"default")}),C1=t(()=>{T1=me(t=>()=>t,"default")});function _1(e,r){return function(t){return e+t*r}}function S1(e,r,n){return e=Math.pow(e,n),r=Math.pow(r,n)-e,n=1/n,function(t){return Math.pow(e+t*r,n)}}function A1(t,e){var r=e-t;return r?_1(t,180{C1(),me(_1,"linear"),me(S1,"exponential"),me(A1,"hue"),me(L1,"gamma"),me(N1,"nogamma")});function R1(o){return function(t){for(var e,r=t.length,n=new Array(r),i=new Array(r),a=new Array(r),s=0;s{v1(),w1(),E1(),I1(),M1=me(function t(e){var s=L1(e);function r(e,t){var r=s((e=_g(e)).r,(t=_g(t)).r),n=s(e.g,t.g),i=s(e.b,t.b),a=N1(e.opacity,t.opacity);return function(t){return e.r=r(t),e.g=n(t),e.b=i(t),e.opacity=a(t),e+""}}return me(r,"rgb"),r.gamma=t,r},"rgbGamma")(1),me(R1,"rgbSpline"),R1(b1),R1(k1)});function O1(e,r){r=r||[];var n,i=e?Math.min(r.length,e.length):0,a=r.slice();return function(t){for(n=0;n{me(O1,"default"),me(P1,"isNumberArray")});function F1(t,e){for(var r=e?e.length:0,n=t?Math.min(r,t.length):0,i=new Array(n),a=new Array(r),s=0;s{J1(),me(F1,"genericArray")});function z1(e,r){var n=new Date;return e=+e,r=+r,function(t){return n.setTime(e*(1-t)+r*t),n}}var G1=t(()=>{me(z1,"default")});function U1(e,r){return e=+e,r=+r,function(t){return e*(1-t)+r*t}}var q1=t(()=>{me(U1,"default")});function j1(t,e){var r,n={},i={};for(r in null!==t&&"object"==typeof t||(t={}),e=null!==e&&"object"==typeof e?e:{})r in t?n[r]=Q1(t[r],e[r]):i[r]=e[r];return function(t){for(r in n)i[r]=n[r](t);return i}}var W1=t(()=>{J1(),me(j1,"default")});function Y1(t){return function(){return t}}function H1(e){return function(t){return e(t)+""}}function V1(t,n){var e,r,i,a=X1.lastIndex=K1.lastIndex=0,s=-1,o=[],l=[];for(t+="",n+="";(e=X1.exec(t))&&(r=K1.exec(n));)(i=r.index)>a&&(i=n.slice(a,i),o[s]?o[s]+=i:o[++s]=i),(e=e[0])===(r=r[0])?o[s]?o[s]+=r:o[++s]=r:(o[++s]=null,l.push({i:s,x:U1(e,r)})),a=K1.lastIndex;return a{q1(),X1=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,K1=new RegExp(X1.source,"g"),me(Y1,"zero"),me(H1,"one"),me(V1,"default")});function Q1(t,e){var r=typeof e;return null==e||"boolean"==r?T1(e):("number"==r?U1:"string"==r?(r=kg(e))?(e=r,M1):V1:e instanceof kg?M1:e instanceof Date?z1:P1(e)?O1:Array.isArray(e)?F1:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?j1:U1)(t,e)}var J1=t(()=>{v1(),D1(),$1(),G1(),q1(),W1(),Z1(),C1(),B1(),me(Q1,"default")});function tf(e,r){return e=+e,r=+r,function(t){return Math.round(e*(1-t)+r*t)}}var ef=t(()=>{me(tf,"default")});function rf(t,e,r,n,i,a){var s,o,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*r+e*n)&&(r-=t*l,n-=e*l),(o=Math.sqrt(r*r+n*n))&&(r/=o,n/=o,l/=o),t*n{nf=180/Math.PI,af={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},me(rf,"default")});function of(t){return(t=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"")).isIdentity?af:rf(t.a,t.b,t.c,t.d,t.e,t.f)}function lf(t){return null!=t&&((cf=cf||document.createElementNS("http://www.w3.org/2000/svg","g")).setAttribute("transform",t),t=cf.transform.baseVal.consolidate())?rf((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):af}var cf,hf=t(()=>{sf(),me(of,"parseCss"),me(lf,"parseSvg")});function uf(r,o,l,i){function c(t){return t.length?t.pop()+" ":""}function n(t,e,r,n,i,a){var s;t!==r||e!==n?(s=i.push("translate(",null,o,null,l),a.push({i:s-4,x:U1(t,r)},{i:s-2,x:U1(e,n)})):(r||n)&&i.push("translate("+r+o+n+l)}function s(t,e,r,n){t!==e?(180{q1(),hf(),me(uf,"interpolateTransform"),df=uf(of,"px, ","px)","deg)"),pf=uf(lf,", ",")",")")});function ff(s){return function(e,t){var r=s((e=h1(e)).h,(t=h1(t)).h),n=N1(e.c,t.c),i=N1(e.l,t.l),a=N1(e.opacity,t.opacity);return function(t){return e.h=r(t),e.c=n(t),e.l=i(t),e.opacity=a(t),e+""}}}var mf,yf=t(()=>{v1(),I1(),me(ff,"hcl"),mf=ff(A1),ff(N1)}),vf=t(()=>{J1(),q1(),ef(),Z1(),gf(),D1(),yf()});function xf(){return Of||(Ff(bf),Of=Bf.now()+Pf)}function bf(){Of=0}function wf(){this._call=this._time=this._next=null}function kf(t,e,r){var n=new wf;return n.restart(t,e,r),n}function Tf(){xf(),++Af;for(var t,e=Rf;e;)0<=(t=Of-e._time)&&e._call.call(void 0,t),e=e._next;--Af}function Ef(){Of=(Df=Bf.now())+Pf,Af=Lf=0;try{Tf()}finally{Af=0,_f(),Of=0}}function Cf(){var t=Bf.now(),e=t-Df;Ifr._time&&(n=r._time),(t=r)._next):(e=r._next,r._next=null,t?t._next=e:Rf=e);Mf=t,Sf(n)}function Sf(t){Af||(Lf=Lf&&clearTimeout(Lf),24{If=1e3,Pf=Of=Df=Nf=Lf=Af=0,Bf="object"==typeof performance&&performance.now?performance:Date,Ff="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)},me(xf,"now"),me(bf,"clearNow"),me(wf,"Timer"),wf.prototype=kf.prototype={constructor:wf,restart:me(function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?xf():+r)+(null==e?0:+e),this._next||Mf===this||(Mf?Mf._next=this:Rf=this,Mf=this),this._call=t,this._time=r,Sf()},"restart"),stop:me(function(){this._call&&(this._call=null,this._time=1/0,Sf())},"stop")},me(kf,"timer"),me(Tf,"timerFlush"),me(Ef,"wake"),me(Cf,"poke"),me(_f,"nap"),me(Sf,"sleep")});function zf(e,r,t){var n=new wf;return r=null==r?0:+r,n.restart(t=>{n.stop(),e(t+r)},r,t),n}var Gf=t(()=>{$f(),me(zf,"default")}),Uf=t(()=>{$f(),Gf()});function qf(t,e,r,n,i,a){var s=t.__transition;if(s){if(r in s)return}else t.__transition={};Hf(t,r,{name:e,index:n,group:i,on:Vf,tween:Xf,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Kf})}function jf(t,e){if((t=Yf(t,e)).state>Kf)throw new Error("too late; already scheduled");return t}function Wf(t,e){if((t=Yf(t,e)).state>Jf)throw new Error("too late; already running");return t}function Yf(t,e){if(t=(t=t.__transition)&&t[e])return t;throw new Error("transition not found")}function Hf(a,s,o){var l,c=a.__transition;function t(t){o.state=Zf,o.timer.restart(h,o.delay,o.time),o.delay<=t&&h(t-o.delay)}function h(t){var e,r,n,i;if(o.state!==Zf)return d();for(e in c)if(i=c[e],i.name===o.name){if(i.state===Jf)return zf(h);i.state===tm?(i.state=rm,i.timer.stop(),i.on.call("interrupt",a,a.__data__,i.index,i.group),delete c[e]):+e{wd(),Uf(),Vf=yd("start","end","cancel","interrupt"),Xf=[],Kf=0,Zf=1,Qf=2,Jf=3,tm=4,em=5,rm=6,me(qf,"default"),me(jf,"init"),me(Wf,"set"),me(Yf,"get"),me(Hf,"create")});function im(t,e){var r,n,i,a=t.__transition,s=!0;if(a){for(i in e=null==e?null:e+"",a)(r=a[i]).name!==e?s=!1:(n=Qf{nm(),me(im,"default")});function sm(t){return this.each(function(){im(this,t)})}var om=t(()=>{am(),me(sm,"default")});function lm(i,a){var s,o;return function(){var t=Wf(this,i),e=t.tween;if(e!==s)for(var r=0,n=(o=s=e).length;r{nm(),me(lm,"tweenRemove"),me(cm,"tweenFunction"),me(hm,"default"),me(um,"tweenValue")});function pm(t,e){var r;return("number"==typeof e?U1:e instanceof kg?M1:(r=kg(e))?(e=r,M1):V1)(t,e)}var gm=t(()=>{v1(),vf(),me(pm,"default")});function fm(t){return function(){this.removeAttribute(t)}}function mm(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ym(e,r,n){var i,a,s=n+"";return function(){var t=this.getAttribute(e);return t===s?null:t===i?a:a=r(i=t,n)}}function vm(e,r,n){var i,a,s=n+"";return function(){var t=this.getAttributeNS(e.space,e.local);return t===s?null:t===i?a:a=r(i=t,n)}}function xm(n,i,a){var s,o,l;return function(){var t,e,r=a(this);return null==r?void this.removeAttribute(n):(t=this.getAttribute(n))===(e=r+"")?null:t===s&&e===o?l:(o=e,l=i(s=t,r))}}function bm(n,i,a){var s,o,l;return function(){var t,e,r=a(this);return null==r?void this.removeAttributeNS(n.space,n.local):(t=this.getAttributeNS(n.space,n.local))===(e=r+"")?null:t===s&&e===o?l:(o=e,l=i(s=t,r))}}function wm(t,e){var r=Td(t),n="transform"===r?pf:pm;return this.attrTween(t,"function"==typeof e?(r.local?bm:xm)(r,n,um(this,"attr."+t,e)):null==e?(r.local?mm:fm)(r):(r.local?vm:ym)(r,n,e))}var km=t(()=>{vf(),dg(),dm(),gm(),me(fm,"attrRemove"),me(mm,"attrRemoveNS"),me(ym,"attrConstant"),me(vm,"attrConstantNS"),me(xm,"attrFunction"),me(bm,"attrFunctionNS"),me(wm,"default")});function Tm(e,r){return function(t){this.setAttribute(e,r.call(this,t))}}function Em(e,r){return function(t){this.setAttributeNS(e.space,e.local,r.call(this,t))}}function Cm(e,r){var n,i;function t(){var t=r.apply(this,arguments);return n=t!==i?(i=t)&&Em(e,t):n}return me(t,"tween"),t._value=r,t}function _m(e,r){var n,i;function t(){var t=r.apply(this,arguments);return n=t!==i?(i=t)&&Tm(e,t):n}return me(t,"tween"),t._value=r,t}function Sm(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return t=Td(t),this.tween(r,(t.local?Cm:_m)(t,e))}var Am=t(()=>{dg(),me(Tm,"attrInterpolate"),me(Em,"attrInterpolateNS"),me(Cm,"attrTweenNS"),me(_m,"attrTween"),me(Sm,"default")});function Lm(t,e){return function(){jf(this,t).delay=+e.apply(this,arguments)}}function Nm(t,e){return e=+e,function(){jf(this,t).delay=e}}function Im(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Lm:Nm)(e,t)):Yf(this.node(),e).delay}var Rm=t(()=>{nm(),me(Lm,"delayFunction"),me(Nm,"delayConstant"),me(Im,"default")});function Mm(t,e){return function(){Wf(this,t).duration=+e.apply(this,arguments)}}function Dm(t,e){return e=+e,function(){Wf(this,t).duration=e}}function Om(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Mm:Dm)(e,t)):Yf(this.node(),e).duration}var Pm=t(()=>{nm(),me(Mm,"durationFunction"),me(Dm,"durationConstant"),me(Om,"default")});function Bm(t,e){if("function"!=typeof e)throw new Error;return function(){Wf(this,t).ease=e}}function Fm(t){var e=this._id;return arguments.length?this.each(Bm(e,t)):Yf(this.node(),e).ease}var $m=t(()=>{nm(),me(Bm,"easeConstant"),me(Fm,"default")});function zm(e,r){return function(){var t=r.apply(this,arguments);if("function"!=typeof t)throw new Error;Wf(this,e).ease=t}}function Gm(t){if("function"!=typeof t)throw new Error;return this.each(zm(this._id,t))}var Um=t(()=>{nm(),me(zm,"easeVarying"),me(Gm,"default")});function qm(t){"function"!=typeof t&&(t=Ud(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i{dg(),Oy(),me(qm,"default")});function Wm(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,n=e.length,t=r.length,i=Math.min(n,t),a=new Array(n),s=0;s{Oy(),me(Wm,"default")});function Hm(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return!(t=0<=e?t.slice(0,e):t)||"start"===t})}function Vm(r,n,i){var a,s,o=Hm(n)?jf:Wf;return function(){var t=o(this,r),e=t.on;e!==a&&(s=(a=e).copy()).on(n,i),t.on=s}}function Xm(t,e){var r=this._id;return arguments.length<2?Yf(this.node(),r).on.on(t):this.each(Vm(r,t,e))}var Km=t(()=>{nm(),me(Hm,"start"),me(Vm,"onFunction"),me(Xm,"default")});function Zm(r){return function(){var t,e=this.parentNode;for(t in this.__transition)if(+t!==r)return;e&&e.removeChild(this)}}function Qm(){return this.on("end.remove",Zm(this._id))}var Jm=t(()=>{me(Zm,"removeFunction"),me(Qm,"default")});function ty(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=Nd(t));for(var n=this._groups,i=n.length,a=new Array(i),s=0;s{dg(),Oy(),nm(),me(ty,"default")});function ry(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=Bd(t));for(var n=this._groups,i=n.length,a=[],s=[],o=0;o{dg(),Oy(),nm(),me(ry,"default")});function iy(){return new ay(this._groups,this._parents)}var ay,sy=t(()=>{dg(),ay=cg.prototype.constructor,me(iy,"default")});function oy(r,n){var i,a,s;return function(){var t=J0(this,r),e=(this.style.removeProperty(r),J0(this,r));return t===e?null:t===i&&e===a?s:s=n(i=t,a=e)}}function ly(t){return function(){this.style.removeProperty(t)}}function cy(e,r,n){var i,a,s=n+"";return function(){var t=J0(this,e);return t===s?null:t===i?a:a=r(i=t,n)}}function hy(n,i,a){var s,o,l;return function(){var t=J0(this,n),e=a(this),r=e+"";return null==e&&(this.style.removeProperty(n),r=e=J0(this,n)),t===r?null:t===s&&r===o?l:(o=r,l=i(s=t,e))}}function uy(n,i){var a,s,o,l,c="style."+i,h="end."+c;return function(){var t=Wf(this,n),e=t.on,r=null==t.value[c]?l=l||ly(i):void 0;e===a&&o===r||(s=(a=e).copy()).on(h,o=r),t.on=s}}function dy(t,e,r){var n="transform"==(t+="")?df:pm;return null==e?this.styleTween(t,oy(t,n)).on("end.style."+t,ly(t)):"function"==typeof e?this.styleTween(t,hy(t,n,um(this,"style."+t,e))).each(uy(this._id,t)):this.styleTween(t,cy(t,n,e),r).on("end.style."+t,null)}var py=t(()=>{vf(),dg(),nm(),dm(),gm(),me(oy,"styleNull"),me(ly,"styleRemove"),me(cy,"styleConstant"),me(hy,"styleFunction"),me(uy,"styleMaybeRemove"),me(dy,"default")});function gy(e,r,n){return function(t){this.style.setProperty(e,r.call(this,t),n)}}function fy(e,r,n){var i,a;function t(){var t=r.apply(this,arguments);return i=t!==a?(a=t)&&gy(e,t,n):i}return me(t,"tween"),t._value=r,t}function my(t,e,r){var n="style."+(t+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;return this.tween(n,fy(t,e,r??""))}var yy=t(()=>{me(gy,"styleInterpolate"),me(fy,"styleTween"),me(my,"default")});function vy(t){return function(){this.textContent=t}}function xy(e){return function(){var t=e(this);this.textContent=t??""}}function by(t){return this.tween("text","function"==typeof t?xy(um(this,"text",t)):vy(null==t?"":t+""))}var wy=t(()=>{dm(),me(vy,"textConstant"),me(xy,"textFunction"),me(by,"default")});function ky(e){return function(t){this.textContent=e.call(this,t)}}function Ty(e){var r,n;function t(){var t=e.apply(this,arguments);return r=t!==n?(n=t)&&ky(t):r}return me(t,"tween"),t._value=e,t}function Ey(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,Ty(t))}var Cy=t(()=>{me(ky,"textInterpolate"),me(Ty,"textTween"),me(Ey,"default")});function _y(){for(var t=this._name,e=this._id,r=++My,n=this._groups,i=n.length,a=0;a{Oy(),nm(),me(_y,"default")});function Ay(){var i,a,s=this,o=s._id,l=s.size();return new Promise(function(t,e){var r={value:e},n={value:me(function(){0==--l&&t()},"value")};s.each(function(){var t=Wf(this,o),e=t.on;e!==i&&((a=(i=e).copy())._.cancel.push(r),a._.interrupt.push(r),a._.end.push(n)),t.on=a}),0===l&&t()})}var Ly=t(()=>{nm(),me(Ay,"default")});function Ny(t,e,r,n){this._groups=t,this._parents=e,this._name=r,this._id=n}function Iy(t){return cg().transition(t)}function Ry(){return++My}var My,Dy,Oy=t(()=>{dg(),km(),Am(),Rm(),Pm(),$m(),Um(),jm(),Ym(),Km(),Jm(),ey(),ny(),sy(),py(),yy(),wy(),Cy(),Sy(),dm(),Ly(),My=0,me(Ny,"Transition"),me(Iy,"transition"),me(Ry,"newId"),Dy=cg.prototype,Ny.prototype=Iy.prototype={constructor:Ny,select:ty,selectAll:ry,selectChild:Dy.selectChild,selectChildren:Dy.selectChildren,filter:qm,merge:Wm,selection:iy,transition:_y,call:Dy.call,nodes:Dy.nodes,node:Dy.node,size:Dy.size,empty:Dy.empty,each:Dy.each,on:Xm,attr:wm,attrTween:Sm,style:dy,styleTween:my,text:by,textTween:Ey,remove:Qm,tween:hm,delay:Im,duration:Om,ease:Fm,easeVarying:Gm,end:Ay,[Symbol.iterator]:Dy[Symbol.iterator]}});function Py(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var By=t(()=>{me(Py,"cubicInOut")}),Fy=t(()=>{By()});function $y(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function zy(t){var e,r;t=t instanceof Ny?(e=t._id,t._name):(e=++My,(r=Gy).time=xf(),null==t?null:t+"");for(var n=this._groups,i=n.length,a=0;a{Oy(),nm(),Fy(),Uf(),Gy={time:null,delay:0,duration:250,ease:Py},me($y,"inherit"),me(zy,"default")}),qy=t(()=>{dg(),om(),Uy(),cg.prototype.interrupt=sm,cg.prototype.transition=zy}),jy=t(()=>{qy()}),Wy=t(()=>{}),Yy=t(()=>{}),Hy=t(()=>{});function Vy(t){return[+t[0],+t[1]]}function Xy(t){return[Vy(t[0]),Vy(t[1])]}function Ky(t){return{type:t}}var Zy,Qy,Jy,t2=t(()=>{jy(),Wy(),Yy(),Hy(),{abs:Zy,max:Qy,min:Jy}=Math,me(Vy,"number1"),me(Xy,"number2"),["w","e"].map(Ky),me(function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},"input"),me(function(t){return t&&[t[0][0],t[1][0]]},"output"),["n","s"].map(Ky),me(function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},"input"),me(function(t){return t&&[t[0][1],t[1][1]]},"output"),["n","w","e","s","nw","ne","sw","se"].map(Ky),me(function(t){return null==t?null:Xy(t)},"input"),me(function(t){return t},"output"),me(Ky,"type")}),e2=t(()=>{t2()});function r2(r){this._+=r[0];for(let t=1,e=r.length;t{a2=Math.PI,l2=(s2=2*a2)-(o2=1e-6),me(r2,"append"),me(n2,"appendRound"),c2=class{static{me(this,"Path")}constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?r2:n2(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,r,n){this._append`Q${+t},${+e},${this._x1=+r},${this._y1=+n}`}bezierCurveTo(t,e,r,n,i,a){this._append`C${+t},${+e},${+r},${+n},${this._x1=+i},${this._y1=+a}`}arcTo(t,e,r,n,i){if(t=+t,e=+e,r=+r,n=+n,(i=+i)<0)throw new Error("negative radius: "+i);var a,s,o=this._x1,l=this._y1,c=r-t,h=n-e,u=o-t,d=l-e,p=u*u+d*d;null===this._x1?this._append`M${this._x1=t},${this._y1=e}`:o2o2&&i?(s=c*c+h*h,n=(r-=o)*r+(o=n-l)*o,l=Math.sqrt(s),a=Math.sqrt(p),p=(s=i*Math.tan((a2-Math.acos((s+p-n)/(2*l*a)))/2))/a,n=s/l,Math.abs(p-1)>o2&&this._append`L${t+p*u},${e+p*d}`,this._append`A${i},${i},0,0,${+(u*oo2||Math.abs(this._y1-c)>o2)&&this._append`L${l},${c}`,r&&((a=a<0?a%s2+s2:a)>l2?this._append`A${r},${r},0,1,${h},${t-s},${e-o}A${r},${r},0,1,${h},${this._x1=l},${this._y1=c}`:o2{h2()}),d2=t(()=>{}),p2=t(()=>{}),g2=t(()=>{}),f2=t(()=>{}),m2=t(()=>{}),y2=t(()=>{}),v2=t(()=>{});function x2(t){return 1e21<=Math.abs(t=Math.round(t))?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function b2(t,e){var r;return(e=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0?null:[1<(r=t.slice(0,e)).length?r[0]+r.slice(2):r,+t.slice(e+1)]}var w2=t(()=>{me(x2,"default"),me(b2,"formatDecimalParts")});function k2(t){return(t=b2(Math.abs(t)))?t[1]:NaN}var T2=t(()=>{w2(),me(k2,"default")});function E2(o,l){return function(t,e){for(var r=t.length,n=[],i=0,a=o[0],s=0;0e));)a=o[i=(i+1)%o.length];return n.reverse().join(l)}}var C2=t(()=>{me(E2,"default")});function _2(e){return function(t){return t.replace(/[0-9]/g,function(t){return e[+t]})}}var S2=t(()=>{me(_2,"default")});function A2(t){var e;if(e=N2.exec(t))return new L2({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]});throw new Error("invalid format: "+t)}function L2(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}var N2,I2=t(()=>{N2=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i,me(A2,"formatSpecifier"),A2.prototype=L2.prototype,me(L2,"FormatSpecifier"),L2.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 R2(t){t:for(var e,r=t.length,n=1,i=-1;n{me(R2,"default")});function D2(t,e){var r,n,i=b2(t,e);return i?(r=i[0],(i=(i=i[1])-(O2=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1)===(n=r.length)?r:n{w2(),me(D2,"default")});function B2(t,e){var r;return(e=b2(t,e))?(r=e[0],(e=e[1])<0?"0."+new Array(-e).join("0")+r:r.length>e+1?r.slice(0,e+1)+"."+r.slice(e+1):r+new Array(e-r.length+2).join("0")):t+""}var F2,$2=t(()=>{w2(),me(B2,"default")}),z2=t(()=>{w2(),P2(),$2(),F2={"%":me((t,e)=>(100*t).toFixed(e),"%"),b:me(t=>Math.round(t).toString(2),"b"),c:me(t=>t+"","c"),d:x2,e:me((t,e)=>t.toExponential(e),"e"),f:me((t,e)=>t.toFixed(e),"f"),g:me((t,e)=>t.toPrecision(e),"g"),o:me(t=>Math.round(t).toString(8),"o"),p:me((t,e)=>B2(100*t,e),"p"),r:B2,s:D2,X:me(t=>Math.round(t).toString(16).toUpperCase(),"X"),x:me(t=>Math.round(t).toString(16),"x")}});function G2(t){return t}var U2=t(()=>{me(G2,"default")});function q2(t){var k=void 0===t.grouping||void 0===t.thousands?G2:E2(j2.call(t.grouping,Number),t.thousands+""),n=void 0===t.currency?"":t.currency[0]+"",i=void 0===t.currency?"":t.currency[1]+"",T=void 0===t.decimal?".":t.decimal+"",E=void 0===t.numerals?G2:_2(j2.call(t.numerals,String)),a=void 0===t.percent?"%":t.percent+"",C=void 0===t.minus?"−":t.minus+"",_=void 0===t.nan?"NaN":t.nan+"";function s(t){var c=(t=A2(t)).fill,h=t.align,u=t.sign,e=t.symbol,d=t.zero,p=t.width,g=t.comma,f=t.precision,m=t.trim,y=t.type,v=("n"===y?(g=!0,y="g"):F2[y]||(void 0===f&&(f=12),m=!0,y="g"),(d||"0"===c&&"="===h)&&(d=!0,c="0",h="="),"$"===e?n:"#"===e&&/[boxX]/.test(y)?"0"+y.toLowerCase():""),x="$"===e?i:/[%p]/.test(y)?a:"",b=F2[y],w=/[defgprs%]/.test(y);function r(t){var e,r,n,i=v,a=x;if("c"===y)a=b(t)+a,t="";else{var s=(t=+t)<0||1/t<0;if(t=isNaN(t)?_:b(Math.abs(t),f),m&&(t=R2(t)),i=((s=(!s||0!=+t||"+"===u)&&s)?"("===u?u:C:"-"===u||"("===u?"":u)+i,a=("s"===y?W2[8+O2/3]:"")+a+(s&&"("===u?")":""),w)for(e=-1,r=t.length;++e>1)+i+t+a+l.slice(o);break;default:t=l+i+t+a}return E(t)}return f=void 0===f?6:/[gprs]/.test(y)?Math.max(1,Math.min(21,f)):Math.max(0,Math.min(20,f)),me(r,"format"),r.toString=function(){return t+""},r}function e(t,e){var r=s(((t=A2(t)).type="f",t)),t=3*Math.max(-8,Math.min(8,Math.floor(k2(e)/3))),n=Math.pow(10,-t),i=W2[8+t/3];return function(t){return r(n*t)+i}}return me(s,"newFormat"),me(e,"formatPrefix"),{format:s,formatPrefix:e}}var j2,W2,Y2=t(()=>{T2(),C2(),S2(),I2(),M2(),z2(),P2(),U2(),j2=Array.prototype.map,W2=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],me(q2,"default")});function H2(t){return V2=q2(t),X2=V2.format,K2=V2.formatPrefix,V2}var V2,X2,K2,Z2=t(()=>{Y2(),H2({thousands:",",grouping:[3],currency:["$",""]}),me(H2,"defaultLocale")});function Q2(t){return Math.max(0,-k2(Math.abs(t)))}var J2=t(()=>{T2(),me(Q2,"default")});function tv(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(k2(e)/3)))-k2(Math.abs(t)))}var ev=t(()=>{T2(),me(tv,"default")});function rv(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,k2(e)-k2(t))+1}var nv=t(()=>{T2(),me(rv,"default")}),iv=t(()=>{Z2(),I2(),J2(),ev(),nv()}),av=t(()=>{}),sv=t(()=>{}),ov=t(()=>{}),lv=t(()=>{});function cv(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}var hv=t(()=>{me(cv,"initRange")});function uv(){var r=new Du,n=[],i=[],a=dv;function s(t){let e=r.get(t);if(void 0===e){if(a!==dv)return a;r.set(t,e=n.push(t)-1)}return i[e%i.length]}return me(s,"scale"),s.domain=function(t){if(!arguments.length)return n.slice();n=[],r=new Du;for(var e of t)r.has(e)||r.set(e,n.push(e)-1);return s},s.range=function(t){return arguments.length?(i=Array.from(t),s):i.slice()},s.unknown=function(t){return arguments.length?(a=t,s):a},s.copy=function(){return uv(n,i).unknown(a)},cv.apply(s,arguments),s}var dv,pv=t(()=>{Ku(),hv(),dv=Symbol("implicit"),me(uv,"ordinal")});function gv(){var i,a,t=uv().unknown(void 0),s=t.domain,o=t.range,l=0,c=1,h=!1,u=0,d=0,p=.5;function e(){var t=s().length,e=c{Ku(),hv(),pv(),me(gv,"band")});function mv(t){return function(){return t}}var yv=t(()=>{me(mv,"constants")});function vv(t){return+t}var xv=t(()=>{me(vv,"number")});function bv(t){return t}function wv(e,r){return(r-=e=+e)?function(t){return(t-e)/r}:mv(isNaN(r)?NaN:.5)}function kv(e,r){var t;return r{Ku(),vf(),yv(),xv(),Av=[0,1],me(bv,"identity"),me(wv,"normalize"),me(kv,"clamper"),me(Tv,"bimap"),me(Ev,"polymap"),me(Cv,"copy"),me(_v,"transformer"),me(Sv,"continuous")});function Nv(t,e,r,n){var i,a=$u(t,e,r);switch((n=A2(n??",f")).type){case"s":var s=Math.max(Math.abs(t),Math.abs(e));return null!=n.precision||isNaN(i=tv(a,s))||(n.precision=i),K2(n,s);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(i=rv(a,Math.max(Math.abs(t),Math.abs(e))))||(n.precision=i-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(i=Q2(a))||(n.precision=i-2*("%"===n.type))}return X2(n)}var Iv=t(()=>{Ku(),iv(),me(Nv,"tickFormat")});function Rv(c){var h=c.domain;return c.ticks=function(t){var e=h();return Bu(e[0],e[e.length-1],t??10)},c.tickFormat=function(t,e){var r=h();return Nv(r[0],r[r.length-1],t??10,e)},c.nice=function(t){null==t&&(t=10);var e,r,n=h(),i=0,a=n.length-1,s=n[i],o=n[a],l=10;for(o{Ku(),Lv(),hv(),Iv(),me(Rv,"linearish"),me(Mv,"linear")});function Ov(t,e){var r,n=0,i=(t=t.slice()).length-1,a=t[n],s=t[i];return s{me(Ov,"nice")});function Bv(a,s,r,n){function o(t){return a(t=0===arguments.length?new Date:new Date(+t)),t}return me(o,"interval"),o.floor=t=>(a(t=new Date(+t)),t),o.ceil=t=>(a(t=new Date(t-1)),s(t,1),a(t),t),o.round=t=>{var e=o(t),r=o.ceil(t);return t-e(s(t=new Date(+t),null==e?1:Math.floor(e)),t),o.range=(t,e,r)=>{var n,i=[];if(t=o.ceil(t),r=null==r?1:Math.floor(r),tBv(t=>{if(t<=t)for(;a(t),!r(t);)t.setTime(t-1)},(t,e)=>{if(t<=t)if(e<0)for(;++e<=0;)for(;s(t,-1),!r(t););else for(;0<=--e;)for(;s(t,1),!r(t););}),r&&(o.count=(t,e)=>(Fv.setTime(+t),$v.setTime(+e),a(Fv),a($v),Math.floor(r(Fv,$v))),o.every=e=>(e=Math.floor(e),isFinite(e)&&0n(t)%e==0:t=>o.count(0,t)%e==0):o:null)),o}var Fv,$v,zv,Gv,Uv,qv,jv,Wv,Yv,Hv,Vv,Xv=t(()=>{Fv=new Date,$v=new Date,me(Bv,"timeInterval")}),Kv=t(()=>{Xv(),(zv=Bv(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t)).every=r=>(r=Math.floor(r),isFinite(r)&&0{t.setTime(Math.floor(t/r)*r)},(t,e)=>{t.setTime(+t+e*r)},(t,e)=>(e-t)/r):zv:null)}),Zv=t(()=>{Xv(),(Gv=Bv(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+1e3*e)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds())).range}),Qv=t(()=>{Xv(),(Uv=Bv(t=>{t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())},(t,e)=>{t.setTime(+t+6e4*e)},(t,e)=>(e-t)/6e4,t=>t.getMinutes())).range,(qv=Bv(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+6e4*e)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes())).range}),Jv=t(()=>{Xv(),(jv=Bv(t=>{t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())},(t,e)=>{t.setTime(+t+36e5*e)},(t,e)=>(e-t)/36e5,t=>t.getHours())).range,(Wv=Bv(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+36e5*e)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours())).range}),tx=t(()=>{Xv(),(Yv=Bv(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5,t=>t.getDate()-1)).range,(Hv=Bv(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1)).range,(Vv=Bv(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5))).range});function ex(e){return Bv(t=>{t.setDate(t.getDate()-(t.getDay()+7-e)%7),t.setHours(0,0,0,0)},(t,e)=>{t.setDate(t.getDate()+7*e)},(t,e)=>(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5)}function rx(e){return Bv(t=>{t.setUTCDate(t.getUTCDate()-(t.getUTCDay()+7-e)%7),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)},(t,e)=>(e-t)/6048e5)}var nx,ix,ax,sx,ox,lx,cx,hx,ux,dx,px,gx,fx,mx,yx,vx,xx,bx,wx=t(()=>{Xv(),me(ex,"timeWeekday"),nx=ex(0),ix=ex(1),ax=ex(2),sx=ex(3),ox=ex(4),lx=ex(5),cx=ex(6),nx.range,ix.range,ax.range,sx.range,ox.range,lx.range,cx.range,me(rx,"utcWeekday"),hx=rx(0),ux=rx(1),dx=rx(2),px=rx(3),gx=rx(4),fx=rx(5),mx=rx(6),hx.range,ux.range,dx.range,px.range,gx.range,fx.range,mx.range}),kx=t(()=>{Xv(),(yx=Bv(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear()),t=>t.getMonth())).range,(vx=Bv(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear()),t=>t.getUTCMonth())).range}),Tx=t(()=>{Xv(),(xx=Bv(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear())).every=r=>isFinite(r=Math.floor(r))&&0{t.setFullYear(Math.floor(t.getFullYear()/r)*r),t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e*r)}):null,(bx=Bv(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear())).every=r=>isFinite(r=Math.floor(r))&&0{t.setUTCFullYear(Math.floor(t.getUTCFullYear()/r)*r),t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e*r)}):null});function Ex(a,t,e,r,n,i){let s=[[Gv,1,1e3],[Gv,5,5e3],[Gv,15,15e3],[Gv,30,3e4],[i,1,6e4],[i,5,3e5],[i,15,9e5],[i,30,18e5],[n,1,36e5],[n,3,108e5],[n,6,216e5],[n,12,432e5],[r,1,864e5],[r,2,1728e5],[e,1,6048e5],[t,1,2592e6],[t,3,7776e6],[a,1,31536e6]];function o(t,e,r){var n=et).right(s,n);return i===s.length?a.every($u(t/31536e6,e/31536e6,r)):0===i?zv.every(Math.max($u(t,e,r),1)):([t,e]=s[n/s[i-1][2]{Ku(),Kv(),Zv(),Qv(),Jv(),tx(),wx(),kx(),Tx(),me(Ex,"ticker"),[Cx,_x]=Ex(bx,vx,hx,Vv,Wv,qv),[Sx,Ax]=Ex(xx,yx,nx,Yv,jv,Uv)}),Nx=t(()=>{Kv(),Zv(),Qv(),Jv(),tx(),wx(),kx(),Tx(),Lx()});function Ix(t){var e;return 0<=t.y&&t.y<100?((e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L)).setFullYear(t.y),e):new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function Rx(t){var e;return 0<=t.y&&t.y<100?((e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L))).setUTCFullYear(t.y),e):new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Mx(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function Dx(t){var n=t.dateTime,i=t.date,a=t.time,e=t.periods,r=t.days,s=t.shortDays,o=t.months,l=t.shortMonths,c=Bx(e),h=Fx(e),P=Bx(r),B=Fx(r),F=Bx(s),$=Fx(s),z=Bx(o),G=Fx(o),U=Bx(l),q=Fx(l),u={a:E,A:C,b:_,B:S,c:null,d:ab,e:ab,f:hb,g:wb,G:Tb,H:sb,I:ob,j:lb,L:cb,m:ub,M:db,p:A,q:L,Q:Yb,s:Hb,S:pb,u:gb,U:fb,V:yb,w:vb,W:xb,x:null,X:null,y:bb,Y:kb,Z:Eb,"%":Wb},d={a:N,A:I,b:R,B:M,c:null,d:Cb,e:Cb,f:Nb,g:Gb,G:qb,H:_b,I:Sb,j:Ab,L:Lb,m:Ib,M:Rb,p:D,q:O,Q:Yb,s:Hb,S:Mb,u:Db,U:Ob,V:Bb,w:Fb,W:$b,x:null,X:null,y:zb,Y:Ub,Z:jb,"%":Wb},j={a:y,A:v,b:x,B:b,c:w,d:Xx,e:Xx,f:eb,g:Wx,G:jx,H:Zx,I:Zx,j:Kx,L:tb,m:Vx,M:Qx,p:m,q:Hx,Q:nb,s:ib,S:Jx,u:zx,U:Gx,V:Ux,w:$x,W:qx,x:k,X:T,y:Wx,Y:jx,Z:Yx,"%":rb};function p(l,c){return function(t){var e,r,n,i=[],a=-1,s=0,o=l.length;for(t instanceof Date||(t=new Date(+t));++a[t.toLowerCase(),e]))}function $x(t,e,r){return(e=Xb.exec(e.slice(r,r+1)))?(t.w=+e[0],r+e[0].length):-1}function zx(t,e,r){return(e=Xb.exec(e.slice(r,r+1)))?(t.u=+e[0],r+e[0].length):-1}function Gx(t,e,r){return(e=Xb.exec(e.slice(r,r+2)))?(t.U=+e[0],r+e[0].length):-1}function Ux(t,e,r){return(e=Xb.exec(e.slice(r,r+2)))?(t.V=+e[0],r+e[0].length):-1}function qx(t,e,r){return(e=Xb.exec(e.slice(r,r+2)))?(t.W=+e[0],r+e[0].length):-1}function jx(t,e,r){return(e=Xb.exec(e.slice(r,r+4)))?(t.y=+e[0],r+e[0].length):-1}function Wx(t,e,r){return(e=Xb.exec(e.slice(r,r+2)))?(t.y=+e[0]+(68<+e[0]?1900:2e3),r+e[0].length):-1}function Yx(t,e,r){return(e=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6)))?(t.Z=e[1]?0:-(e[2]+(e[3]||"00")),r+e[0].length):-1}function Hx(t,e,r){return(e=Xb.exec(e.slice(r,r+1)))?(t.q=3*e[0]-3,r+e[0].length):-1}function Vx(t,e,r){return(e=Xb.exec(e.slice(r,r+2)))?(t.m=e[0]-1,r+e[0].length):-1}function Xx(t,e,r){return(e=Xb.exec(e.slice(r,r+2)))?(t.d=+e[0],r+e[0].length):-1}function Kx(t,e,r){return(e=Xb.exec(e.slice(r,r+3)))?(t.m=0,t.d=+e[0],r+e[0].length):-1}function Zx(t,e,r){return(e=Xb.exec(e.slice(r,r+2)))?(t.H=+e[0],r+e[0].length):-1}function Qx(t,e,r){return(e=Xb.exec(e.slice(r,r+2)))?(t.M=+e[0],r+e[0].length):-1}function Jx(t,e,r){return(e=Xb.exec(e.slice(r,r+2)))?(t.S=+e[0],r+e[0].length):-1}function tb(t,e,r){return(e=Xb.exec(e.slice(r,r+3)))?(t.L=+e[0],r+e[0].length):-1}function eb(t,e,r){return(e=Xb.exec(e.slice(r,r+6)))?(t.L=Math.floor(e[0]/1e3),r+e[0].length):-1}function rb(t,e,r){return(e=Kb.exec(e.slice(r,r+1)))?r+e[0].length:-1}function nb(t,e,r){return(e=Xb.exec(e.slice(r)))?(t.Q=+e[0],r+e[0].length):-1}function ib(t,e,r){return(e=Xb.exec(e.slice(r)))?(t.s=+e[0],r+e[0].length):-1}function ab(t,e){return Ox(t.getDate(),e,2)}function sb(t,e){return Ox(t.getHours(),e,2)}function ob(t,e){return Ox(t.getHours()%12||12,e,2)}function lb(t,e){return Ox(1+Yv.count(xx(t),t),e,3)}function cb(t,e){return Ox(t.getMilliseconds(),e,3)}function hb(t,e){return cb(t,e)+"000"}function ub(t,e){return Ox(t.getMonth()+1,e,2)}function db(t,e){return Ox(t.getMinutes(),e,2)}function pb(t,e){return Ox(t.getSeconds(),e,2)}function gb(t){return 0===(t=t.getDay())?7:t}function fb(t,e){return Ox(nx.count(xx(t)-1,t),e,2)}function mb(t){var e=t.getDay();return 4<=e||0===e?ox(t):ox.ceil(t)}function yb(t,e){return t=mb(t),Ox(ox.count(xx(t),t)+(4===xx(t).getDay()),e,2)}function vb(t){return t.getDay()}function xb(t,e){return Ox(ix.count(xx(t)-1,t),e,2)}function bb(t,e){return Ox(t.getFullYear()%100,e,2)}function wb(t,e){return Ox((t=mb(t)).getFullYear()%100,e,2)}function kb(t,e){return Ox(t.getFullYear()%1e4,e,4)}function Tb(t,e){var r=t.getDay();return Ox((t=4<=r||0===r?ox(t):ox.ceil(t)).getFullYear()%1e4,e,4)}function Eb(t){return(0<(t=t.getTimezoneOffset())?"-":(t*=-1,"+"))+Ox(t/60|0,"0",2)+Ox(t%60,"0",2)}function Cb(t,e){return Ox(t.getUTCDate(),e,2)}function _b(t,e){return Ox(t.getUTCHours(),e,2)}function Sb(t,e){return Ox(t.getUTCHours()%12||12,e,2)}function Ab(t,e){return Ox(1+Hv.count(bx(t),t),e,3)}function Lb(t,e){return Ox(t.getUTCMilliseconds(),e,3)}function Nb(t,e){return Lb(t,e)+"000"}function Ib(t,e){return Ox(t.getUTCMonth()+1,e,2)}function Rb(t,e){return Ox(t.getUTCMinutes(),e,2)}function Mb(t,e){return Ox(t.getUTCSeconds(),e,2)}function Db(t){return 0===(t=t.getUTCDay())?7:t}function Ob(t,e){return Ox(hx.count(bx(t)-1,t),e,2)}function Pb(t){var e=t.getUTCDay();return 4<=e||0===e?gx(t):gx.ceil(t)}function Bb(t,e){return t=Pb(t),Ox(gx.count(bx(t),t)+(4===bx(t).getUTCDay()),e,2)}function Fb(t){return t.getUTCDay()}function $b(t,e){return Ox(ux.count(bx(t)-1,t),e,2)}function zb(t,e){return Ox(t.getUTCFullYear()%100,e,2)}function Gb(t,e){return Ox((t=Pb(t)).getUTCFullYear()%100,e,2)}function Ub(t,e){return Ox(t.getUTCFullYear()%1e4,e,4)}function qb(t,e){var r=t.getUTCDay();return Ox((t=4<=r||0===r?gx(t):gx.ceil(t)).getUTCFullYear()%1e4,e,4)}function jb(){return"+0000"}function Wb(){return"%"}function Yb(t){return+t}function Hb(t){return Math.floor(+t/1e3)}var Vb,Xb,Kb,Zb,Qb=t(()=>{Nx(),me(Ix,"localDate"),me(Rx,"utcDate"),me(Mx,"newDate"),me(Dx,"formatLocale"),Vb={"-":"",_:" ",0:"0"},Xb=/^\s*\d+/,Kb=/^%/,Zb=/[\\^$*+?|[\]().{}]/g,me(Ox,"pad"),me(Px,"requote"),me(Bx,"formatRe"),me(Fx,"formatLookup"),me($x,"parseWeekdayNumberSunday"),me(zx,"parseWeekdayNumberMonday"),me(Gx,"parseWeekNumberSunday"),me(Ux,"parseWeekNumberISO"),me(qx,"parseWeekNumberMonday"),me(jx,"parseFullYear"),me(Wx,"parseYear"),me(Yx,"parseZone"),me(Hx,"parseQuarter"),me(Vx,"parseMonthNumber"),me(Xx,"parseDayOfMonth"),me(Kx,"parseDayOfYear"),me(Zx,"parseHour24"),me(Qx,"parseMinutes"),me(Jx,"parseSeconds"),me(tb,"parseMilliseconds"),me(eb,"parseMicroseconds"),me(rb,"parseLiteralPercent"),me(nb,"parseUnixTimestamp"),me(ib,"parseUnixTimestampSeconds"),me(ab,"formatDayOfMonth"),me(sb,"formatHour24"),me(ob,"formatHour12"),me(lb,"formatDayOfYear"),me(cb,"formatMilliseconds"),me(hb,"formatMicroseconds"),me(ub,"formatMonthNumber"),me(db,"formatMinutes"),me(pb,"formatSeconds"),me(gb,"formatWeekdayNumberMonday"),me(fb,"formatWeekNumberSunday"),me(mb,"dISO"),me(yb,"formatWeekNumberISO"),me(vb,"formatWeekdayNumberSunday"),me(xb,"formatWeekNumberMonday"),me(bb,"formatYear"),me(wb,"formatYearISO"),me(kb,"formatFullYear"),me(Tb,"formatFullYearISO"),me(Eb,"formatZone"),me(Cb,"formatUTCDayOfMonth"),me(_b,"formatUTCHour24"),me(Sb,"formatUTCHour12"),me(Ab,"formatUTCDayOfYear"),me(Lb,"formatUTCMilliseconds"),me(Nb,"formatUTCMicroseconds"),me(Ib,"formatUTCMonthNumber"),me(Rb,"formatUTCMinutes"),me(Mb,"formatUTCSeconds"),me(Db,"formatUTCWeekdayNumberMonday"),me(Ob,"formatUTCWeekNumberSunday"),me(Pb,"UTCdISO"),me(Bb,"formatUTCWeekNumberISO"),me(Fb,"formatUTCWeekdayNumberSunday"),me($b,"formatUTCWeekNumberMonday"),me(zb,"formatUTCYear"),me(Gb,"formatUTCYearISO"),me(Ub,"formatUTCFullYear"),me(qb,"formatUTCFullYearISO"),me(jb,"formatUTCZone"),me(Wb,"formatLiteralPercent"),me(Yb,"formatUnixTimestamp"),me(Hb,"formatUnixTimestampSeconds")});function Jb(t){return t4=Dx(t),e4=t4.format,t4}var t4,e4,r4=t(()=>{Qb(),Jb({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"]}),me(Jb,"defaultLocale")}),n4=t(()=>{r4()});function i4(t){return new Date(t)}function a4(t){return t instanceof Date?+t:+new Date(+t)}function s4(r,n,e,i,a,s,o,l,c,h){var u=Sv(),d=u.invert,p=u.domain,g=h(".%L"),f=h(":%S"),m=h("%I:%M"),y=h("%I %p"),v=h("%a %d"),x=h("%b %d"),b=h("%B"),w=h("%Y");function k(t){return(c(t){Nx(),n4(),Lv(),hv(),Pv(),me(i4,"date"),me(a4,"number"),me(s4,"calendar"),me(o4,"time")}),c4=t(()=>{fv(),Dv(),pv(),l4()});function h4(t){for(var e=t.length/6|0,r=new Array(e),n=0;n{me(h4,"default")}),p4=t(()=>{d4(),u4=h4("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")}),g4=t(()=>{p4()});function f4(t){return me(function(){return t},"constant")}var m4=t(()=>{me(f4,"default")});function y4(t){return 1{x4=Math.abs,b4=Math.atan2,w4=Math.cos,k4=Math.max,T4=Math.min,E4=Math.sin,C4=Math.sqrt,_4=1e-12,A4=(S4=Math.PI)/2,L4=2*S4,me(y4,"acos"),me(v4,"asin")});function I4(r){let n=3;return r.digits=function(t){if(!arguments.length)return n;if(null==t)n=null;else{var e=Math.floor(t);if(!(0<=e))throw new RangeError("invalid digits: "+t);n=e}return r},()=>new c2(n)}var R4=t(()=>{u2(),me(I4,"withPath")});function M4(t){return t.innerRadius}function D4(t){return t.outerRadius}function O4(t){return t.startAngle}function P4(t){return t.endAngle}function B4(t){return t&&t.padAngle}function F4(t,e,r,n,i,a,s,o){var l=(o-=a)*(r-=t)-(s-=i)*(n-=e);if(!(l*l<_4))return[t+(l=(s*(e-a)-o*(t-i))/l)*r,e+l*n]}function $4(t,e,r,n,i,a,s){var o=(s=(s?a:-a)/C4((l=t-r)*l+(o=e-n)*o))*o,s=-s*l,l=t+o,t=e+s,e=r+o,r=n+s,n=(l+e)/2,c=(t+r)/2,h=e-l,u=r-t,d=h*h+u*u,e=((l=l*r-e*t)*u-h*(r=(u<0?-1:1)*C4(k4(0,(a=i-a)*a*d-l*l))))/d,t=(-l*h-u*r)/d,p=(l*u+h*r)/d,l=(-l*h+u*r)/d;return(r=p-n)*r+(d=l-c)*d<(h=e-n)*h+(u=t-c)*u&&(e=p,t=l),{cx:e,cy:t,x01:-o,y01:-s,x11:e*(i/a-1),y11:t*(i/a-1)}}function z4(){var A=M4,L=D4,N=f4(0),I=null,R=O4,M=P4,D=B4,O=null,P=I4(e);function e(){var t,e,r,n,i,a,s,o,l,c,h,u,d,p,g,f,m,y,v,x,b,w,k=+A.apply(this,arguments),T=+L.apply(this,arguments),E=R.apply(this,arguments)-A4,C=M.apply(this,arguments)-A4,_=x4(C-E),S=E_4?(n+=u*=S?1:-1,i-=u):(a=0,n=i=(E+C)/2),(s-=2*d)>_4?(e+=d*=S?1:-1,r-=d):(s=0,e=r=(E+C)/2)),h=T*w4(e),u=T*E4(e),d=k*w4(i),E=k*E4(i),_4{m4(),N4(),R4(),me(M4,"arcInnerRadius"),me(D4,"arcOuterRadius"),me(O4,"arcStartAngle"),me(P4,"arcEndAngle"),me(B4,"arcPadAngle"),me(F4,"intersect"),me($4,"cornerTangents"),me(z4,"default")});function U4(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}var q4=t(()=>{Array.prototype.slice,me(U4,"default")});function j4(t){this._context=t}function W4(t){return new j4(t)}var Y4=t(()=>{me(j4,"Linear"),j4.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._point=0},"lineStart"),lineEnd:me(function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}},"point")},me(W4,"default")});function H4(t){return t[0]}function V4(t){return t[1]}var X4=t(()=>{me(H4,"x"),me(V4,"y")});function K4(s,o){var l=f4(!0),c=null,h=W4,u=null,d=I4(e);function e(t){var e,r,n,i=(t=U4(t)).length,a=!1;for(null==c&&(u=h(n=d())),e=0;e<=i;++e)!(e{q4(),m4(),Y4(),R4(),X4(),me(K4,"default")});function Q4(t,e){return e{me(Q4,"default")});function t5(t){return t}var e5=t(()=>{me(t5,"default")});function r5(){var p=t5,g=Q4,f=null,m=f4(0),y=f4(L4),v=f4(0);function e(r){for(var t,e,n,i=(r=U4(r)).length,a=0,s=new Array(i),o=new Array(i),l=+m.apply(this,arguments),c=Math.min(L4,Math.max(-L4,y.apply(this,arguments)-l)),h=Math.min(Math.abs(c)/i,v.apply(this,arguments)),u=h*(c<0?-1:1),d=0;d{q4(),m4(),J4(),e5(),N4(),me(r5,"default")});function i5(t){return new s5(t,!0)}function a5(t){return new s5(t,!1)}var s5,o5=t(()=>{s5=class{static{me(this,"Bump")}constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}},me(i5,"bumpX"),me(a5,"bumpY")});function l5(){}var c5=t(()=>{me(l5,"default")});function h5(t,e,r){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+r)/6)}function u5(t){this._context=t}function d5(t){return new u5(t)}var p5=t(()=>{me(h5,"point"),me(u5,"Basis"),u5.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:me(function(){switch(this._point){case 3:h5(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:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:h5(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")},me(d5,"default")});function g5(t){this._context=t}function f5(t){return new g5(t)}var m5=t(()=>{c5(),p5(),me(g5,"BasisClosed"),g5.prototype={areaStart:l5,areaEnd:l5,lineStart:me(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:me(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:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:h5(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")},me(f5,"default")});function y5(t){this._context=t}function v5(t){return new y5(t)}var x5=t(()=>{p5(),me(y5,"BasisOpen"),y5.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},"lineStart"),lineEnd:me(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:h5(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e},"point")},me(v5,"default")});function b5(t,e){this._basis=new u5(t),this._beta=e}var w5,k5=t(()=>{p5(),me(b5,"Bundle"),b5.prototype={lineStart:me(function(){this._x=[],this._y=[],this._basis.lineStart()},"lineStart"),lineEnd:me(function(){var t=this._x,e=this._y,r=t.length-1;if(0{me(T5,"point"),me(E5,"Cardinal"),E5.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:me(function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:T5(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:T5(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},C5=me(function e(r){function t(t){return new E5(t,r)}return me(t,"cardinal"),t.tension=function(t){return e(+t)},t},"custom")(0)});function S5(t,e){this._context=t,this._k=(1-e)/6}var A5,L5=t(()=>{c5(),_5(),me(S5,"CardinalClosed"),S5.prototype={areaStart:l5,areaEnd:l5,lineStart:me(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:me(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:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:T5(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},A5=me(function e(r){function t(t){return new S5(t,r)}return me(t,"cardinal"),t.tension=function(t){return e(+t)},t},"custom")(0)});function N5(t,e){this._context=t,this._k=(1-e)/6}var I5,R5=t(()=>{_5(),me(N5,"CardinalOpen"),N5.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},"lineStart"),lineEnd:me(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:T5(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},I5=me(function e(r){function t(t){return new N5(t,r)}return me(t,"cardinal"),t.tension=function(t){return e(+t)},t},"custom")(0)});function M5(t,e,r){var n,i,a=t._x1,s=t._y1,o=t._x2,l=t._y2;_4{N4(),_5(),me(M5,"point"),me(D5,"CatmullRom"),D5.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(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:me(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:me(function(t,e){var r,n;switch(t=+t,e=+e,this._point&&(r=this._x2-t,n=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))),this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:M5(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},O5=me(function e(r){function t(t){return r?new D5(t,r):new E5(t,0)}return me(t,"catmullRom"),t.alpha=function(t){return e(+t)},t},"custom")(.5)});function B5(t,e){this._context=t,this._alpha=e}var F5,$5=t(()=>{L5(),c5(),P5(),me(B5,"CatmullRomClosed"),B5.prototype={areaStart:l5,areaEnd:l5,lineStart:me(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:me(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:me(function(t,e){var r,n;switch(t=+t,e=+e,this._point&&(r=this._x2-t,n=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))),this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:M5(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},F5=me(function e(r){function t(t){return r?new B5(t,r):new S5(t,0)}return me(t,"catmullRom"),t.alpha=function(t){return e(+t)},t},"custom")(.5)});function z5(t,e){this._context=t,this._alpha=e}var G5,U5=t(()=>{R5(),P5(),me(z5,"CatmullRomOpen"),z5.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(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:me(function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){var r,n;switch(t=+t,e=+e,this._point&&(r=this._x2-t,n=this._y2-e,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:M5(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e},"point")},G5=me(function e(r){function t(t){return r?new z5(t,r):new N5(t,0)}return me(t,"catmullRom"),t.alpha=function(t){return e(+t)},t},"custom")(.5)});function q5(t){this._context=t}function j5(t){return new q5(t)}var W5=t(()=>{c5(),me(q5,"LinearClosed"),q5.prototype={areaStart:l5,areaEnd:l5,lineStart:me(function(){this._point=0},"lineStart"),lineEnd:me(function(){this._point&&this._context.closePath()},"lineEnd"),point:me(function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))},"point")},me(j5,"default")});function Y5(t){return t<0?-1:1}function H5(t,e,r){var n=t._x1-t._x0,e=e-t._x1,i=(t._y1-t._y0)/(n||e<0&&-0),t=(i*e+(r=(r-t._y1)/(e||n<0&&-0))*n)/(n+e);return(Y5(i)+Y5(r))*Math.min(Math.abs(i),Math.abs(r),.5*Math.abs(t))||0}function V5(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function X5(t,e,r){var n=t._x0,i=t._x1,a=t._y1,s=(i-n)/3;t._context.bezierCurveTo(n+s,t._y0+s*e,i-s,a-s*r,i,a)}function K5(t){this._context=t}function Z5(t){this._context=new Q5(t)}function Q5(t){this._context=t}function J5(t){return new K5(t)}function t3(t){return new Z5(t)}var e3=t(()=>{me(Y5,"sign"),me(H5,"slope3"),me(V5,"slope2"),me(X5,"point"),me(K5,"MonotoneX"),K5.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},"lineStart"),lineEnd:me(function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:X5(this,this._t0,V5(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},"lineEnd"),point:me(function(t,e){var r=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,X5(this,V5(this,r=H5(this,t,e)),r);break;default:X5(this,this._t0,r=H5(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}},"point")},me(Z5,"MonotoneY"),(Z5.prototype=Object.create(K5.prototype)).point=function(t,e){K5.prototype.point.call(this,e,t)},me(Q5,"ReflectContext"),Q5.prototype={moveTo:me(function(t,e){this._context.moveTo(e,t)},"moveTo"),closePath:me(function(){this._context.closePath()},"closePath"),lineTo:me(function(t,e){this._context.lineTo(e,t)},"lineTo"),bezierCurveTo:me(function(t,e,r,n,i,a){this._context.bezierCurveTo(e,t,n,r,a,i)},"bezierCurveTo")},me(J5,"monotoneX"),me(t3,"monotoneY")});function r3(t){this._context=t}function n3(t){var e,r,n=t.length-1,i=new Array(n),a=new Array(n),s=new Array(n);for(a[i[0]=0]=2,s[0]=t[0]+2*t[1],e=1;e{me(r3,"Natural"),r3.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x=[],this._y=[]},"lineStart"),lineEnd:me(function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===r)this._context.lineTo(t[1],e[1]);else for(var n=n3(t),i=n3(e),a=0,s=1;s{me(s3,"Step"),s3.prototype={areaStart:me(function(){this._line=0},"areaStart"),areaEnd:me(function(){this._line=NaN},"areaEnd"),lineStart:me(function(){this._x=this._y=NaN,this._point=0},"lineStart"),lineEnd:me(function(){0{G4(),Z4(),n5(),m5(),x5(),p5(),o5(),k5(),L5(),R5(),_5(),$5(),U5(),P5(),W5(),Y4(),e3(),a3(),h3()}),d3=t(()=>{}),p3=t(()=>{});function g3(t,e,r){this.k=t,this.x=e,this.y=r}function f3(t){for(;!t.__zoom;)if(!(t=t.parentNode))return m3;return t.__zoom}var m3,y3,v3,x3,b3,w3,k3,T3,E3,C3,_3,S3,A3,L3,N3,I3,R3,M3,D3,O3,P3,B3,F3,$3,z3,G3,U3,q3,j3,W3,Y3,H3,V3=t(()=>{me(g3,"Transform"),g3.prototype={constructor:g3,scale:me(function(t){return 1===t?this:new g3(this.k*t,this.x,this.y)},"scale"),translate:me(function(t,e){return 0===t&0===e?this:new g3(this.k,this.x+this.k*t,this.y+this.k*e)},"translate"),apply:me(function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},"apply"),applyX:me(function(t){return t*this.k+this.x},"applyX"),applyY:me(function(t){return t*this.k+this.y},"applyY"),invert:me(function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},"invert"),invertX:me(function(t){return(t-this.x)/this.k},"invertX"),invertY:me(function(t){return(t-this.y)/this.k},"invertY"),rescaleX:me(function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},"rescaleX"),rescaleY:me(function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},"rescaleY"),toString:me(function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"},"toString")},m3=new g3(1,0,0),f3.prototype=g3.prototype,me(f3,"transform")}),X3=t(()=>{}),K3=t(()=>{jy(),d3(),p3(),V3(),X3()}),Z3=t(()=>{K3(),V3()}),Q3=t(()=>{Ku(),hd(),e2(),d2(),v1(),p2(),g2(),wd(),pg(),f2(),Fy(),m2(),v2(),iv(),av(),sv(),vf(),u2(),ov(),y2(),lv(),c4(),g4(),dg(),u3(),Nx(),n4(),Uf(),jy(),Z3()}),J3=rPt(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.BLANK_URL=t.relativeFirstCharacters=t.whitespaceEscapeCharsRegex=t.urlSchemeRegex=t.ctrlCharactersRegex=t.htmlCtrlEntityRegex=t.htmlEntitiesRegex=t.invalidProtocolRegex=void 0,t.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,t.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,t.htmlCtrlEntityRegex=/&(newline|tab);/gi,t.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,t.urlSchemeRegex=/^.+(:|:)/gim,t.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,t.relativeFirstCharacters=[".","/"],t.BLANK_URL="about:blank"}),tw=rPt(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.sanitizeUrl=void 0;var a=J3();function s(t){return-1{y3=tt(tw(),1),th(),v3=me((t,e)=>{var r=t.append("rect");if(r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),e.name&&r.attr("name",e.name),e.rx&&r.attr("rx",e.rx),e.ry&&r.attr("ry",e.ry),void 0!==e.attrs)for(var n in e.attrs)r.attr(n,e.attrs[n]);return e.class&&r.attr("class",e.class),r},"drawRect"),x3=me((t,e)=>{e={x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,stroke:e.stroke,class:"rect"},v3(t,e).lower()},"drawBackgroundRect"),b3=me((t,e)=>{var r=e.text.replace(kc," "),n=((t=t.append("text")).attr("x",e.x),t.attr("y",e.y),t.attr("class","legend"),t.style("text-anchor",e.anchor),e.class&&t.attr("class",e.class),t.append("tspan"));return n.attr("x",e.x+2*e.textMargin),n.text(r),t},"drawText"),w3=me((t,e,r,n)=>{(t=t.append("image")).attr("x",e),t.attr("y",r),e=(0,y3.sanitizeUrl)(n),t.attr("xlink:href",e)},"drawImage"),k3=me((t,e,r,n)=>{(t=t.append("use")).attr("x",e),t.attr("y",r),e=(0,y3.sanitizeUrl)(n),t.attr("xlink:href","#"+e)},"drawEmbeddedImage"),T3=me(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),E3=me(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj")}),rw=t(()=>{function e(t,e,r,n,i,a,s){g(e.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("text-anchor","middle").text(t),s)}function l(t,e,r,n,i,a,s,o){var{fontSize:l,fontFamily:c,fontWeight:h}=o,u=t.split(L.lineBreakRegex);for(let t=0;t{let n=t.append("g"),i=0;for(var a of e){var s,o=a.textColor||"#444444",l=a.lineColor||"#444444",c=a.offsetX?parseInt(a.offsetX):0,h=a.offsetY?parseInt(a.offsetY):0,l=(0===i?((s=n.append("line")).attr("x1",a.startPoint.x),s.attr("y1",a.startPoint.y),s.attr("x2",a.endPoint.x),s.attr("y2",a.endPoint.y),s.attr("stroke-width","1"),s.attr("stroke",l),s.style("fill","none"),"rel_b"!==a.type&&s.attr("marker-end","url(#arrowhead)"),"birel"!==a.type&&"rel_b"!==a.type||s.attr("marker-start","url(#arrowend)"),i=-1):((s=n.append("path")).attr("fill","none").attr("stroke-width","1").attr("stroke",l).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",a.startPoint.x).replaceAll("starty",a.startPoint.y).replaceAll("controlx",a.startPoint.x+(a.endPoint.x-a.startPoint.x)/2-(a.endPoint.x-a.startPoint.x)/4).replaceAll("controly",a.startPoint.y+(a.endPoint.y-a.startPoint.y)/2).replaceAll("stopx",a.endPoint.x).replaceAll("stopy",a.endPoint.y)),"rel_b"!==a.type&&s.attr("marker-end","url(#arrowhead)"),"birel"!==a.type&&"rel_b"!==a.type||s.attr("marker-start","url(#arrowend)")),r.messageFont());z3(r)(a.label.text,n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+c,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+h,a.label.width,a.label.height,{fill:o},l),a.techn&&""!==a.techn.text&&(l=r.messageFont(),z3(r)("["+a.techn.text+"]",n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+c,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+r.messageFontSize+5+h,Math.max(a.label.width,a.techn.width),a.techn.height,{fill:o,"font-style":"italic"},l))}},"drawRels"),L3=me(function(t,e,r){let n=t.append("g"),i=e.bgColor||"none",a=e.borderColor||"#444444",s=e.fontColor||"black",o=e.nodeType?{"stroke-width":1}:{"stroke-width":1,"stroke-dasharray":"7.0,7.0"},l=(_3(n,t={x:e.x,y:e.y,fill:i,stroke:a,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:o}),r.boundaryFont());l.fontWeight="bold",l.fontSize=l.fontSize+2,l.fontColor=s,z3(r)(e.label.text,n,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},l),e.type&&""!==e.type.text&&((l=r.boundaryFont()).fontColor=s,z3(r)(e.type.text,n,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},l)),e.descr&&""!==e.descr.text&&((l=r.boundaryFont()).fontSize=l.fontSize-2,l.fontColor=s,z3(r)(e.descr.text,n,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},l))},"drawBoundary"),N3=me(function(t,e,r){let n=e.bgColor||r[e.typeC4Shape.text+"_bg_color"],i=e.borderColor||r[e.typeC4Shape.text+"_border_color"],a=e.fontColor||"#FFFFFF",s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII="}var o=t.append("g"),l=(o.attr("class","person-man"),T3());switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":l.x=e.x,l.y=e.y,l.fill=n,l.width=e.width,l.height=e.height,l.stroke=i,l.rx=2.5,l.ry=2.5,l.attrs={"stroke-width":.5},_3(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",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":o.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2))}switch(t=$3(r,e.typeC4Shape.text),o.append("text").attr("fill",a).attr("font-family",t.fontFamily).attr("font-size",t.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":S3(o,48,48,e.x+e.width/2-24,e.y+e.image.Y,s)}let c=r[e.typeC4Shape.text+"Font"]();return c.fontWeight="bold",c.fontSize=c.fontSize+2,c.fontColor=a,z3(r)(e.label.text,o,e.x,e.y+e.label.Y,e.width,e.height,{fill:a},c),(c=r[e.typeC4Shape.text+"Font"]()).fontColor=a,e.techn&&""!==e.techn?.text?z3(r)(e.techn.text,o,e.x,e.y+e.techn.Y,e.width,e.height,{fill:a,"font-style":"italic"},c):e.type&&""!==e.type.text&&z3(r)(e.type.text,o,e.x,e.y+e.type.Y,e.width,e.height,{fill:a,"font-style":"italic"},c),e.descr&&""!==e.descr.text&&((c=r.personFont()).fontColor=a,z3(r)(e.descr.text,o,e.x,e.y+e.descr.Y,e.width,e.height,{fill:a},c)),e.height},"drawC4Shape"),I3=me(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),R3=me(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),M3=me(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),D3=me(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),O3=me(function(t){t.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),P3=me(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),B3=me(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertDynamicNumber"),F3=me(function(t){(t=t.append("defs").append("marker").attr("id","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"),t.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"),$3=me((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"getC4ShapeFont"),me(e,"byText"),me(l,"byTspan"),me(r,"byFo"),me(g,"_setTextAttrs"),z3=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:l},G3={drawRect:_3,drawBoundary:L3,drawC4Shape:N3,drawRels:A3,drawImage:S3,insertArrowHead:D3,insertArrowEnd:O3,insertArrowFilledHead:P3,insertDynamicNumber:B3,insertArrowCrossHead:F3,insertDatabaseIcon:I3,insertComputerIcon:R3,insertClockIcon:M3}}),nw=t(()=>{U3="object"==typeof global&&global&&global.Object===Object&&global,q3=U3}),iw=t(()=>{nw(),j3="object"==typeof self&&self&&self.Object===Object&&self,j3=q3||j3||Function("return this")(),W3=j3}),aw=t(()=>{iw(),Y3=W3.Symbol,H3=Y3});function sw(t){var e=lw.call(t,hw),r=t[hw];try{var n=!(t[hw]=void 0)}catch{}var i=cw.call(t);return n&&(e?t[hw]=r:delete t[hw]),i}var ow,lw,cw,hw,uw,dw=t(()=>{aw(),ow=Object.prototype,lw=ow.hasOwnProperty,cw=ow.toString,hw=H3?H3.toStringTag:void 0,me(sw,"getRawTag"),uw=sw});function pw(t){return fw.call(t)}var gw,fw,mw,yw=t(()=>{gw=Object.prototype,fw=gw.toString,me(pw,"objectToString"),mw=pw});function vw(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":(xw&&xw in Object(t)?uw:mw)(t)}var xw,bw,ww=t(()=>{aw(),dw(),yw(),xw=H3?H3.toStringTag:void 0,me(vw,"baseGetTag"),bw=vw});function kw(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}var Tw,Ew=t(()=>{me(kw,"isObject"),Tw=kw});function Cw(t){return!!Tw(t)&&("[object Function]"==(t=bw(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)}var _w,Sw,Aw,Lw=t(()=>{ww(),Ew(),me(Cw,"isFunction"),_w=Cw}),Nw=t(()=>{iw(),Sw=W3["__core-js_shared__"],Aw=Sw});function Iw(t){return!!Rw&&Rw in t}var Rw,Mw,Dw=t(()=>{var t;Nw(),t=/[^.]+$/.exec(Aw&&Aw.keys&&Aw.keys.IE_PROTO||""),Rw=t?"Symbol(src)_1."+t:"",me(Iw,"isMasked"),Mw=Iw});function Ow(t){if(null!=t){try{return Bw.call(t)}catch{}try{return t+""}catch{}}return""}var Pw,Bw,Fw,$w=t(()=>{Pw=Function.prototype,Bw=Pw.toString,me(Ow,"toSource"),Fw=Ow});function zw(t){return!(!Tw(t)||Mw(t))&&(_w(t)?Ww:Uw).test(Fw(t))}var Gw,Uw,qw,jw,Ww,Yw,Hw=t(()=>{Lw(),Dw(),Ew(),$w(),Gw=/[\\^$.*+?()[\]{}|]/g,Uw=/^\[object .+?Constructor\]$/,qw=Function.prototype,jw=Object.prototype,qw=qw.toString,jw=jw.hasOwnProperty,Ww=RegExp("^"+qw.call(jw).replace(Gw,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),me(zw,"baseIsNative"),Yw=zw});function Vw(t,e){return t?.[e]}var Xw,Kw=t(()=>{me(Vw,"getValue"),Xw=Vw});function Zw(t,e){return t=Xw(t,e),Yw(t)?t:void 0}var Qw,Jw,t6,e6=t(()=>{Hw(),Kw(),me(Zw,"getNative"),Qw=Zw}),r6=t(()=>{e6(),Jw=Qw(Object,"create"),t6=Jw});function n6(){this.__data__=t6?t6(null):{},this.size=0}var i6,a6=t(()=>{r6(),me(n6,"hashClear"),i6=n6});function s6(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t}var o6,l6=t(()=>{me(s6,"hashDelete"),o6=s6});function c6(t){var e,r=this.__data__;return t6?"__lodash_hash_undefined__"===(e=r[t])?void 0:e:u6.call(r,t)?r[t]:void 0}var h6,u6,d6,p6=t(()=>{r6(),h6=Object.prototype,u6=h6.hasOwnProperty,me(c6,"hashGet"),d6=c6});function g6(t){var e=this.__data__;return t6?void 0!==e[t]:m6.call(e,t)}var f6,m6,y6,v6=t(()=>{r6(),f6=Object.prototype,m6=f6.hasOwnProperty,me(g6,"hashHas"),y6=g6});function x6(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=t6&&void 0===e?"__lodash_hash_undefined__":e,this}var b6,w6=t(()=>{r6(),me(x6,"hashSet"),b6=x6});function k6(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{a6(),l6(),p6(),v6(),w6(),me(k6,"Hash"),k6.prototype.clear=i6,k6.prototype.delete=o6,k6.prototype.get=d6,k6.prototype.has=y6,k6.prototype.set=b6,T6=k6});function C6(){this.__data__=[],this.size=0}var _6,S6=t(()=>{me(C6,"listCacheClear"),_6=C6});function A6(t,e){return t===e||t!=t&&e!=e}var L6,N6=t(()=>{me(A6,"eq"),L6=A6});function I6(t,e){for(var r=t.length;r--;)if(L6(t[r][0],e))return r;return-1}var R6,M6=t(()=>{N6(),me(I6,"assocIndexOf"),R6=I6});function D6(t){var e=this.__data__;return!((t=R6(e,t))<0||(t==e.length-1?e.pop():P6.call(e,t,1),--this.size,0))}var O6,P6,B6,F6=t(()=>{M6(),O6=Array.prototype,P6=O6.splice,me(D6,"listCacheDelete"),B6=D6});function $6(t){var e=this.__data__;return(t=R6(e,t))<0?void 0:e[t][1]}var z6,G6=t(()=>{M6(),me($6,"listCacheGet"),z6=$6});function U6(t){return-1{M6(),me(U6,"listCacheHas"),q6=U6});function W6(t,e){var r=this.__data__,n=R6(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var Y6,H6=t(()=>{M6(),me(W6,"listCacheSet"),Y6=W6});function V6(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{S6(),F6(),G6(),j6(),H6(),me(V6,"ListCache"),V6.prototype.clear=_6,V6.prototype.delete=B6,V6.prototype.get=z6,V6.prototype.has=q6,V6.prototype.set=Y6,X6=V6}),J6=t(()=>{e6(),iw(),K6=Qw(W3,"Map"),Z6=K6});function tk(){this.size=0,this.__data__={hash:new T6,map:new(Z6||X6),string:new T6}}var ek,rk=t(()=>{E6(),Q6(),J6(),me(tk,"mapCacheClear"),ek=tk});function nk(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}var ik,ak=t(()=>{me(nk,"isKeyable"),ik=nk});function sk(t,e){return t=t.__data__,ik(e)?t["string"==typeof e?"string":"hash"]:t.map}var ok,lk=t(()=>{ak(),me(sk,"getMapData"),ok=sk});function ck(t){return t=ok(this,t).delete(t),this.size-=t?1:0,t}var hk,uk=t(()=>{lk(),me(ck,"mapCacheDelete"),hk=ck});function dk(t){return ok(this,t).get(t)}var pk,gk=t(()=>{lk(),me(dk,"mapCacheGet"),pk=dk});function fk(t){return ok(this,t).has(t)}var mk,yk=t(()=>{lk(),me(fk,"mapCacheHas"),mk=fk});function vk(t,e){var r=ok(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var xk,bk=t(()=>{lk(),me(vk,"mapCacheSet"),xk=vk});function wk(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e{rk(),uk(),gk(),yk(),bk(),me(wk,"MapCache"),wk.prototype.clear=ek,wk.prototype.delete=hk,wk.prototype.get=pk,wk.prototype.has=mk,wk.prototype.set=xk,kk=wk});function Ek(n,i){if("function"!=typeof n||null!=i&&"function"!=typeof i)throw new TypeError(Ck);var a=me(function(){var t=arguments,e=i?i.apply(this,t):t[0],r=a.cache;return r.has(e)?r.get(e):(t=n.apply(this,t),a.cache=r.set(e,t)||r,t)},"memoized");return a.cache=new(Ek.Cache||kk),a}var Ck,_k,Sk=t(()=>{Tk(),Ck="Expected a function",me(Ek,"memoize"),Ek.Cache=kk,_k=Ek});function Ak(){this.__data__=new X6,this.size=0}var Lk,Nk=t(()=>{Q6(),me(Ak,"stackClear"),Lk=Ak});function Ik(t){var e=this.__data__,t=e.delete(t);return this.size=e.size,t}var Rk,Mk=t(()=>{me(Ik,"stackDelete"),Rk=Ik});function Dk(t){return this.__data__.get(t)}var Ok,Pk=t(()=>{me(Dk,"stackGet"),Ok=Dk});function Bk(t){return this.__data__.has(t)}var Fk,$k=t(()=>{me(Bk,"stackHas"),Fk=Bk});function zk(t,e){var r=this.__data__;if(r instanceof X6){var n=r.__data__;if(!Z6||n.length<199)return n.push([t,e]),this.size=++r.size,this;r=this.__data__=new kk(n)}return r.set(t,e),this.size=r.size,this}var Gk,Uk=t(()=>{Q6(),J6(),Tk(),me(zk,"stackSet"),Gk=zk});function qk(t){t=this.__data__=new X6(t),this.size=t.size}var jk,Wk,Yk,Hk=t(()=>{Q6(),Nk(),Mk(),Pk(),$k(),Uk(),me(qk,"Stack"),qk.prototype.clear=Lk,qk.prototype.delete=Rk,qk.prototype.get=Ok,qk.prototype.has=Fk,qk.prototype.set=Gk,jk=qk}),Vk=t(()=>{e6(),Wk=(()=>{try{var t=Qw(Object,"defineProperty");return t({},"",{}),t}catch{}})(),Yk=Wk});function Xk(t,e,r){"__proto__"==e&&Yk?Yk(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var Kk,Zk=t(()=>{Vk(),me(Xk,"baseAssignValue"),Kk=Xk});function Qk(t,e,r){(void 0===r||L6(t[e],r))&&(void 0!==r||e in t)||Kk(t,e,r)}var Jk,tT=t(()=>{Zk(),N6(),me(Qk,"assignMergeValue"),Jk=Qk});function eT(l){return function(t,e,r){for(var n=-1,i=Object(t),a=r(t),s=a.length;s--;){var o=a[l?s:++n];if(!1===e(i[o],o,i))break}return t}}var rT,nT,iT,aT=t(()=>{me(eT,"createBaseFor"),rT=eT}),sT=t(()=>{aT(),nT=rT(),iT=nT});function oT(t,e){return e?t.slice():(e=t.length,e=hT?hT(e):new t.constructor(e),t.copy(e),e)}var lT,cT,hT,uT,dT,pT,gT=t(()=>{iw(),lT="object"==typeof exports&&exports&&!exports.nodeType&&exports,cT=(cT=lT&&"object"==typeof module&&module&&!module.nodeType&&module)&&cT.exports===lT?W3.Buffer:void 0,hT=cT?cT.allocUnsafe:void 0,me(oT,"cloneBuffer"),uT=oT}),fT=t(()=>{iw(),dT=W3.Uint8Array,pT=dT});function mT(t){var e=new t.constructor(t.byteLength);return new pT(e).set(new pT(t)),e}var yT,vT=t(()=>{fT(),me(mT,"cloneArrayBuffer"),yT=mT});function xT(t,e){return e=e?yT(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.length)}var bT,wT=t(()=>{vT(),me(xT,"cloneTypedArray"),bT=xT});function kT(t,e){var r=-1,n=t.length;for(e=e||Array(n);++r{me(kT,"copyArray"),TT=kT}),ST=t(()=>{function e(){}Ew(),ET=Object.create,me(e,"object"),CT=function(t){return Tw(t)?ET?ET(t):(e.prototype=t,t=new e,e.prototype=void 0,t):{}}});function AT(e,r){return function(t){return e(r(t))}}var LT,NT,IT,RT=t(()=>{me(AT,"overArg"),LT=AT}),MT=t(()=>{RT(),NT=LT(Object.getPrototypeOf,Object),IT=NT});function DT(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||OT)}var OT,PT,BT=t(()=>{OT=Object.prototype,me(DT,"isPrototype"),PT=DT});function FT(t){return"function"!=typeof t.constructor||PT(t)?{}:CT(IT(t))}var $T,zT=t(()=>{ST(),MT(),BT(),me(FT,"initCloneObject"),$T=FT});function GT(t){return null!=t&&"object"==typeof t}var UT,qT=t(()=>{me(GT,"isObjectLike"),UT=GT});function jT(t){return UT(t)&&"[object Arguments]"==bw(t)}var WT,YT,HT,VT,XT,KT,ZT,QT=t(()=>{ww(),qT(),me(jT,"baseIsArguments"),WT=jT}),JT=t(()=>{QT(),qT(),VT=Object.prototype,YT=VT.hasOwnProperty,HT=VT.propertyIsEnumerable,VT=WT(function(){return arguments}())?WT:function(t){return UT(t)&&YT.call(t,"callee")&&!HT.call(t,"callee")},XT=VT}),t7=t(()=>{KT=Array.isArray,ZT=KT});function e7(t){return"number"==typeof t&&-1{me(e7,"isLength"),r7=e7});function i7(t){return null!=t&&r7(t.length)&&!_w(t)}var a7,s7=t(()=>{Lw(),n7(),me(i7,"isArrayLike"),a7=i7});function o7(t){return UT(t)&&a7(t)}var l7,c7=t(()=>{s7(),qT(),me(o7,"isArrayLikeObject"),l7=o7});function h7(){return!1}var u7,d7,p7,g7,f7=t(()=>{me(h7,"stubFalse"),u7=h7}),m7=t(()=>{iw(),f7(),p7="object"==typeof exports&&exports&&!exports.nodeType&&exports,d7=(d7=p7&&"object"==typeof module&&module&&!module.nodeType&&module)&&d7.exports===p7?W3.Buffer:void 0,p7=d7?d7.isBuffer:void 0,g7=p7||u7});function y7(t){return!(!UT(t)||"[object Object]"!=bw(t))&&(null===(t=IT(t))||"function"==typeof(t=w7.call(t,"constructor")&&t.constructor)&&t instanceof t&&b7.call(t)==k7)}var v7,x7,b7,w7,k7,T7,E7=t(()=>{ww(),MT(),qT(),v7=Function.prototype,x7=Object.prototype,b7=v7.toString,w7=x7.hasOwnProperty,k7=b7.call(Object),me(y7,"isPlainObject"),T7=y7});function C7(t){return UT(t)&&r7(t.length)&&!!_7[bw(t)]}var _7,S7,A7=t(()=>{ww(),n7(),qT(),(_7={})["[object Float32Array]"]=_7["[object Float64Array]"]=_7["[object Int8Array]"]=_7["[object Int16Array]"]=_7["[object Int32Array]"]=_7["[object Uint8Array]"]=_7["[object Uint8ClampedArray]"]=_7["[object Uint16Array]"]=_7["[object Uint32Array]"]=!0,_7["[object Arguments]"]=_7["[object Array]"]=_7["[object ArrayBuffer]"]=_7["[object Boolean]"]=_7["[object DataView]"]=_7["[object Date]"]=_7["[object Error]"]=_7["[object Function]"]=_7["[object Map]"]=_7["[object Number]"]=_7["[object Object]"]=_7["[object RegExp]"]=_7["[object Set]"]=_7["[object String]"]=_7["[object WeakMap]"]=!1,me(C7,"baseIsTypedArray"),S7=C7});function L7(e){return function(t){return e(t)}}var N7,I7,R7,M7,D7,O7,P7,B7=t(()=>{me(L7,"baseUnary"),N7=L7}),F7=t(()=>{nw(),M7="object"==typeof exports&&exports&&!exports.nodeType&&exports,I7=M7&&"object"==typeof module&&module&&!module.nodeType&&module,M7=I7&&I7.exports===M7,R7=M7&&q3.process,M7=(()=>{try{return I7&&I7.require&&I7.require("util").types||R7&&R7.binding&&R7.binding("util")}catch{}})(),D7=M7}),$7=t(()=>{A7(),B7(),F7(),O7=(O7=D7&&D7.isTypedArray)?N7(O7):S7,P7=O7});function z7(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}var G7,U7=t(()=>{me(z7,"safeGet"),G7=z7});function q7(t,e,r){var n=t[e];W7.call(t,e)&&L6(n,r)&&(void 0!==r||e in t)||Kk(t,e,r)}var j7,W7,Y7,H7=t(()=>{Zk(),N6(),j7=Object.prototype,W7=j7.hasOwnProperty,me(q7,"assignValue"),Y7=q7});function V7(t,e,r,n){var i=!r;r=r||{};for(var a=-1,s=e.length;++a{H7(),Zk(),me(V7,"copyObject"),X7=V7});function Z7(t,e){for(var r=-1,n=Array(t);++r{me(Z7,"baseTimes"),Q7=Z7});function t8(t,e){var r=typeof t;return!!(e=e??9007199254740991)&&("number"==r||"symbol"!=r&&e8.test(t))&&-1{e8=/^(?:0|[1-9]\d*)$/,me(t8,"isIndex"),r8=t8});function i8(t,e){var r,n=ZT(t),i=!n&&XT(t),a=!n&&!i&&g7(t),s=!n&&!i&&!a&&P7(t),o=n||i||a||s,l=o?Q7(t.length,String):[],c=l.length;for(r in t)!e&&!s8.call(t,r)||o&&("length"==r||a&&("offset"==r||"parent"==r)||s&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||r8(r,c))||l.push(r);return l}var a8,s8,o8,l8=t(()=>{J7(),JT(),t7(),m7(),n8(),$7(),a8=Object.prototype,s8=a8.hasOwnProperty,me(i8,"arrayLikeKeys"),o8=i8});function c8(t){var e=[];if(null!=t)for(var r in Object(t))e.push(r);return e}var h8,u8=t(()=>{me(c8,"nativeKeysIn"),h8=c8});function d8(t){if(!Tw(t))return h8(t);var e,r=PT(t),n=[];for(e in t)("constructor"!=e||!r&&g8.call(t,e))&&n.push(e);return n}var p8,g8,f8,m8=t(()=>{Ew(),BT(),u8(),p8=Object.prototype,g8=p8.hasOwnProperty,me(d8,"baseKeysIn"),f8=d8});function y8(t){return a7(t)?o8(t,!0):f8(t)}var v8,x8=t(()=>{l8(),m8(),s7(),me(y8,"keysIn"),v8=y8});function b8(t){return X7(t,v8(t))}var w8,k8=t(()=>{K7(),x8(),me(b8,"toPlainObject"),w8=b8});function T8(t,e,r,n,i,a,s){var o,l,c,h=G7(t,r),u=G7(e,r),d=s.get(u);d||((e=void 0===(d=a?a(h,u,r+"",t,e,s):void 0))&&(l=!(o=ZT(u))&&g7(u),c=!o&&!l&&P7(u),d=u,o||l||c?d=ZT(h)?h:l7(h)?TT(h):l?uT(u,!(e=!1)):c?bT(u,!(e=!1)):[]:T7(u)||XT(u)?XT(d=h)?d=w8(h):Tw(h)&&!_w(h)||(d=$T(u)):e=!1),e&&(s.set(u,d),i(d,u,n,a,s),s.delete(u))),Jk(t,r,d)}var E8,C8=t(()=>{tT(),gT(),wT(),_T(),zT(),JT(),t7(),c7(),m7(),Lw(),Ew(),E7(),$7(),U7(),k8(),me(T8,"baseMergeDeep"),E8=T8});function _8(n,i,a,s,o){n!==i&&iT(i,function(t,e){var r;o=o||new jk,Tw(t)?E8(n,i,e,a,_8,s,o):(r=s?s(G7(n,e),t,e+"",n,i,o):void 0,Jk(n,e,void 0===r?t:r))},v8)}var S8,A8=t(()=>{Hk(),tT(),sT(),C8(),Ew(),x8(),U7(),me(_8,"baseMerge"),S8=_8});function L8(t){return t}var N8,I8=t(()=>{me(L8,"identity"),N8=L8});function R8(t,e,r){switch(r.length){case 0:return t.call(e);case 1:return t.call(e,r[0]);case 2:return t.call(e,r[0],r[1]);case 3:return t.call(e,r[0],r[1],r[2])}return t.apply(e,r)}var M8,D8=t(()=>{me(R8,"apply"),M8=R8});function O8(a,s,o){return s=P8(void 0===s?a.length-1:s,0),function(){for(var t=arguments,e=-1,r=P8(t.length-s,0),n=Array(r);++e{D8(),P8=Math.max,me(O8,"overRest"),B8=O8});function $8(t){return function(){return t}}var z8,G8,U8=t(()=>{me($8,"constant"),z8=$8}),q8=t(()=>{U8(),Vk(),I8(),G8=Yk?function(t,e){return Yk(t,"toString",{configurable:!0,enumerable:!1,value:z8(e),writable:!0})}:N8});function j8(r){var n=0,i=0;return function(){var t=W8(),e=16-(t-i);if(i=t,0{W8=Date.now,me(j8,"shortOut"),Y8=j8}),K8=t(()=>{q8(),X8(),H8=Y8(G8),V8=H8});function Z8(t,e){return V8(B8(t,e,N8),t+"")}var Q8,J8=t(()=>{I8(),F8(),K8(),me(Z8,"baseRest"),Q8=Z8});function tE(t,e,r){var n;return!!Tw(r)&&!!("number"==(n=typeof e)?a7(r)&&r8(e,r.length):"string"==n&&e in r)&&L6(r[e],t)}var eE,rE=t(()=>{N6(),s7(),n8(),Ew(),me(tE,"isIterateeCall"),eE=tE});function nE(o){return Q8(function(t,e){var r=-1,n=e.length,i=1{J8(),rE(),me(nE,"createAssigner"),iE=nE}),lE=t(()=>{A8(),oE(),aE=iE(function(t,e,r){S8(t,e,r)}),sE=aE});function cE(t,e){return t?(t="curve"+(t.charAt(0).toUpperCase()+t.slice(1)),EE[t]??e):e}function hE(t,e){if(t=t.trim())return"loose"!==e.securityLevel?(0,kE.sanitizeUrl)(t):t}function uE(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function dE(t){let e,r=0;t.forEach(t=>{r+=uE(t,e),e=t});var n=r/2;return RE(t,n)}function pE(t){return 1===t.length?t[0]:dE(t)}function gE(t,e,r){var r=structuredClone(r),n=(M.info("our points",r),"start_left"!==e&&"start_right"!==e&&r.reverse(),25+t),n=RE(r,n),t=10+.5*t,i=Math.atan2(r[0].y-n.y,r[0].x-n.x),a={x:0,y:0};return"start_left"===e?(a.x=Math.sin(i+Math.PI)*t+(r[0].x+n.x)/2,a.y=-Math.cos(i+Math.PI)*t+(r[0].y+n.y)/2):"end_right"===e?(a.x=Math.sin(i-Math.PI)*t+(r[0].x+n.x)/2-5,a.y=-Math.cos(i-Math.PI)*t+(r[0].y+n.y)/2-5):"end_left"===e?(a.x=Math.sin(i)*t+(r[0].x+n.x)/2-5,a.y=-Math.cos(i)*t+(r[0].y+n.y)/2-5):(a.x=Math.sin(i)*t+(r[0].x+n.x)/2,a.y=-Math.cos(i)*t+(r[0].y+n.y)/2),a}function fE(t){let e="",r="";for(var n of t)void 0!==n&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":e=e+n+";");return{style:e,labelStyle:r}}function mE(e){let r="",n="0123456789abcdef",i=n.length;for(let t=0;t{kE=tt(tw(),1),Q3(),th(),Ln(),e(),Ur(),jr(),Sk(),lE(),zr(),TE="​",EE={curveBasis:d5,curveBasisClosed:f5,curveBasisOpen:v5,curveBumpX:i5,curveBumpY:a5,curveBundle:w5,curveCardinalClosed:A5,curveCardinalOpen:I5,curveCardinal:C5,curveCatmullRomClosed:F5,curveCatmullRomOpen:G5,curveCatmullRom:O5,curveLinear:W4,curveLinearClosed:j5,curveMonotoneX:J5,curveMonotoneY:t3,curveNatural:i3,curveStep:o3,curveStepAfter:c3,curveStepBefore:l3},CE=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,_E=me(function(t,e){var r,n=SE(t,/(?:init\b)|(?:initialize\b)/),i={};if(i=Array.isArray(n)?(r=n.map(t=>t.args),vr(r),ie(i,[...r])):n.args)return r=Zt(t,e),void 0!==i[n="config"]&&(i[r="flowchart-v2"===r?"flowchart":r]=i[n],delete i[n]),i},"detectInit"),SE=me(function(t,e=null){try{var r=new RegExp(`[%]{2}(?![{]${CE.source})(?=[}][%]{2}).* -`,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),M.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:`+t);for(var n,i,a,s=[];null!==(n=Ht.exec(t));)n.index===Ht.lastIndex&&Ht.lastIndex++,(n&&!e||e&&n[1]?.match(e)||e&&n[2]?.match(e))&&(i=n[1]||n[2],a=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null,s.push({type:i,args:a}));return 0===s.length?{type:t,args:null}:1===s.length?s[0]:s}catch(r){return M.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),AE=me(function(t){return t.replace(Ht,"")},"removeDirectives"),LE=me(function(t,e){for(var[r,n]of e.entries())if(n.match(t))return r;return-1},"isSubstringInArray"),me(cE,"interpolateToCurve"),me(hE,"formatUrl"),NE=me((e,...t)=>{let r=e.split("."),n=r.length-1,i=r[n],a=window;for(let t=0;t(e=Math.pow(10,e),Math.round(t*e)/e),"roundNumber"),RE=me((t,e)=>{let r,n=e;for(var i of t){if(r){var a=uE(i,r);if(0===a)return r;if(a{M.info("our points "+JSON.stringify(e)),e[0]!==r&&(e=e.reverse());var r=RE(e,25),t=t?10:5,n=Math.atan2(e[0].y-r.y,e[0].x-r.x),i={x:0,y:0};return i.x=Math.sin(n)*t+(e[0].x+r.x)/2,i.y=-Math.cos(n)*t+(e[0].y+r.y)/2,i},"calcCardinalityPosition"),me(gE,"calcTerminalLabelPosition"),me(fE,"getStylesFromArray"),DE=0,OE=me(()=>(DE++,"id-"+Math.random().toString(36).substr(2,12)+"-"+DE),"generateId"),me(mE,"makeRandomHex"),PE=me(t=>mE(t.length),"random"),BE=me(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"),FE=me(function(t,e){var r=e.text.replace(L.lineBreakRegex," "),[,n]=YE(e.fontSize);return(t=t.append("text")).attr("x",e.x),t.attr("y",e.y),t.style("text-anchor",e.anchor),t.style("font-family",e.fontFamily),t.style("font-size",n),t.style("font-weight",e.fontWeight),t.attr("fill",e.fill),void 0!==e.class&&t.attr("class",e.class),(n=t.append("tspan")).attr("x",e.x+2*e.textMargin),n.attr("fill",e.fill),n.text(r),t},"drawSimpleText"),$E=_k((t,s,o)=>{if(!t||(o=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},o),L.lineBreakRegex.test(t)))return t;let l=t.split(" ").filter(Boolean),c=[],h="";return l.forEach((t,e)=>{var r,n,i=vE(t+" ",o),a=vE(h,o);h=s""!==t).join(o.joinWith)},(t,e,r)=>""+t+e+r.fontSize+r.fontWeight+r.fontFamily+r.joinWith),zE=_k((t,n,i="-",a)=>{a=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},a);let s=[...t],o=[],l="";return s.forEach((t,e)=>{var r,t=""+l+t;l=vE(t,a)>=n?(e+=1,e=s.length===e,r=t+i,o.push(e?t:r),""):t}),{hyphenatedStrings:o,remainingWord:l}},(t,e,r="-",n)=>""+t+e+r+n.fontSize+n.fontWeight+n.fontFamily),me(yE,"calculateTextHeight"),me(vE,"calculateTextWidth"),GE=_k((t,e)=>{var{fontSize:e=12,fontFamily:r="Arial",fontWeight:n=400}=e;if(!t)return{width:0,height:0};var[,i]=YE(e),e=["sans-serif",r],a=t.split(L.lineBreakRegex),s=[];if(!(r=H("body")).remove)return{width:0,height:0,lineHeight:0};var o,l=r.append("svg");for(o of e){var c,h={width:0,height:0,lineHeight:0};for(c of a){var u=BE();if(u.text=c||TE,0===(u=((u=FE(l,u).style("font-size",i).style("font-weight",n).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]},(t,e)=>""+t+e.fontSize+e.fontWeight+e.fontFamily),UE=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{me(this,"InitIDGenerator")}},jE=me(function(t){return qE=qE||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),qE.innerHTML=t,unescape(qE.textContent)},"entityDecode"),me(xE,"isDetailedError"),WE=me((t,e,r,n)=>{var i;n&&(i=t.node()?.getBBox())&&t.append("text").text(n).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-r).attr("class",e)},"insertTitle"),YE=me(t=>{var e;return"number"==typeof t?[t,t+"px"]:(e=parseInt(t??"",10),Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t])},"parseFontSize"),me(bE,"cleanAndMerge"),HE={assignWithDepth:ie,wrapLabel:$E,calculateTextHeight:yE,calculateTextWidth:vE,calculateTextDimensions:GE,cleanAndMerge:bE,detectInit:_E,detectDirective:SE,isSubstringInArray:LE,interpolateToCurve:cE,calcLabelPosition:pE,calcCardinalityPosition:ME,calcTerminalLabelPosition:gE,formatUrl:hE,getStylesFromArray:fE,generateId:OE,random:PE,runFunc:NE,entityDecode:jE,insertTitle:WE,parseFontSize:YE,InitIDGenerator:UE},VE=me(function(t){let e=t;return e=(e=(e=e.replace(/style.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)})).replace(/classDef.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)})).replace(/#\w+;/g,function(t){return t=t.substring(1,t.length-1),/^\+?\d+$/.test(t)?"fl°°"+t+"¶ß":"fl°"+t+"¶ß"})},"encodeEntities"),XE=me(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),KE=me((t,e,{counter:r=0,prefix:n,suffix:i},a)=>a||(n?n+"_":"")+t+`_${e}_`+r+(i?"_"+i:""),"getEdgeId"),me(wE,"handleUndefinedAttr")});function QE(t,e,r,n,i){if(!e[t].width)if(r)e[t].text=$E(e[t].text,i,n),e[t].textLines=e[t].text.split(L.lineBreakRegex).length,e[t].width=i,e[t].height=yE(e[t].text,n);else{var a,s,r=e[t].text.split(L.lineBreakRegex);e[t].textLines=r.length,e[t].height=0,e[t].width=0;for(s of r)e[t].width=Math.max(vE(s,n),e[t].width),a=yE(s,n),e[t].height=e[t].height+a}}function JE(e,r,n,t,i){var a,s,o=new aC(i);o.data.widthLimit=n.data.widthLimit/Math.min(nC,t.length);for([a,s]of t.entries()){let t=0;s.image={width:0,height:0,Y:0},s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=t,t=s.image.Y+s.image.height);var l=s.wrap&&iC.wrap,c=lC(iC),l=(c.fontSize=c.fontSize+2,c.fontWeight="bold",QE("label",s,l,c,o.data.widthLimit),s.label.Y=t+8,t=s.label.Y+s.label.height,s.type&&""!==s.type.text&&(s.type.text="["+s.type.text+"]",QE("type",s,l,c=lC(iC),o.data.widthLimit),s.type.Y=t+5,t=s.type.Y+s.type.height),s.descr&&""!==s.descr.text&&((c=lC(iC)).fontSize=c.fontSize-2,QE("descr",s,l,c,o.data.widthLimit),s.descr.Y=t+20,t=s.descr.Y+s.descr.height),c=0==a||a%nC==0?(l=n.data.startx+iC.diagramMarginX,n.data.stopy+iC.diagramMarginY+t):(l=o.data.stopx!==o.data.startx?o.data.stopx+iC.diagramMarginX:o.data.startx,o.data.starty),o.setData(l,l,c,c),o.name=s.alias,i.db.getC4ShapeArray(s.alias));0<(c=i.db.getC4ShapeKeys(s.alias)).length&&uC(o,e,l,c),r=s.alias,0<(l=i.db.getBoundaries(r)).length&&JE(e,0,o,l,i),"global"!==s.alias&&hC(e,s,o),n.data.stopy=Math.max(o.data.stopy+iC.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(o.data.stopx+iC.c4ShapeMargin,n.data.stopx),tC=Math.max(tC,n.data.stopx),eC=Math.max(eC,n.data.stopy)}}var tC,eC,rC,nC,iC,aC,sC,oC,lC,cC,hC,uC,dC,pC,gC,fC,mC,yC,vC,xC,bC=t(()=>{Q3(),rw(),e(),qr(),th(),yu(),mu(),jr(),ZE(),eh(),eC=tC=0,rC=4,nC=2,ee.yy=gu,iC={},aC=class{static{me(this,"Bounds")}constructor(t){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,sC(t.db.getConfig())}setData(t,e,r,n){this.nextData.startx=this.data.startx=t,this.nextData.stopx=this.data.stopx=e,this.nextData.starty=this.data.starty=r,this.nextData.stopy=this.data.stopy=n}updateVal(t,e,r,n){void 0===t[e]?t[e]=r:t[e]=n(r,t[e])}insert(t){this.nextData.cnt=this.nextData.cnt+1;let e=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+t.margin:this.nextData.stopx+2*t.margin,r=e+t.width,n=this.nextData.starty+2*t.margin,i=n+t.height;(e>=this.data.widthLimit||r>=this.data.widthLimit||this.nextData.cnt>rC)&&(e=this.nextData.startx+t.margin+iC.nextLinePaddingX,n=this.nextData.stopy+2*t.margin,this.nextData.stopx=r=e+t.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=n+t.height,this.nextData.cnt=1),t.x=e,t.y=n,this.updateVal(this.data,"startx",e,Math.min),this.updateVal(this.data,"starty",n,Math.min),this.updateVal(this.data,"stopx",r,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",e,Math.min),this.updateVal(this.nextData,"starty",n,Math.min),this.updateVal(this.nextData,"stopx",r,Math.max),this.updateVal(this.nextData,"stopy",i,Math.max)}init(t){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},sC(t.db.getConfig())}bumpLastMargin(t){this.data.stopx+=t,this.data.stopy+=t}},sC=me(function(t){ie(iC,t),t.fontFamily&&(iC.personFontFamily=iC.systemFontFamily=iC.messageFontFamily=t.fontFamily),t.fontSize&&(iC.personFontSize=iC.systemFontSize=iC.messageFontSize=t.fontSize),t.fontWeight&&(iC.personFontWeight=iC.systemFontWeight=iC.messageFontWeight=t.fontWeight)},"setConf"),oC=me((t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),"c4ShapeFont"),lC=me(t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),"boundaryFont"),cC=me(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),me(QE,"calcC4ShapeTextWH"),hC=me(function(t,e,r){e.x=r.data.startx,e.y=r.data.starty,e.width=r.data.stopx-r.data.startx,e.height=r.data.stopy-r.data.starty,e.label.y=iC.c4ShapeMargin-35;var r=e.wrap&&iC.wrap,n=lC(iC),i=(n.fontSize=n.fontSize+2,n.fontWeight="bold",vE(e.label.text,n));QE("label",e,r,n,i),G3.drawBoundary(t,e,iC)},"drawBoundary"),uC=me(function(r,n,i,t){let a=0;for(var s of t){a=0;var o=i[s];switch((s=oC(iC,o.typeC4Shape.text)).fontSize=s.fontSize-2,o.typeC4Shape.width=vE("«"+o.typeC4Shape.text+"»",s),o.typeC4Shape.height=s.fontSize+2,o.typeC4Shape.Y=iC.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&&iC.wrap,l=iC.width-2*iC.c4ShapePadding,c=oC(iC,o.typeC4Shape.text);c.fontSize=c.fontSize+2,c.fontWeight="bold",QE("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+"]",QE("type",o,s,oC(iC,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+"]",QE("techn",o,s,oC(iC,o.techn.text),l),o.techn.Y=a+5,a=o.techn.Y+o.techn.height);let t=a,e=o.label.width;o.descr&&""!==o.descr.text&&(QE("descr",o,s,oC(iC,o.typeC4Shape.text),l),o.descr.Y=a+20,a=o.descr.Y+o.descr.height,e=Math.max(o.label.width,o.descr.width),t=a-5*o.descr.textLines),e+=iC.c4ShapePadding,o.width=Math.max(o.width||iC.width,e,iC.width),o.height=Math.max(o.height||iC.height,t,iC.height),o.margin=o.margin||iC.c4ShapeMargin,r.insert(o),G3.drawC4Shape(n,o,iC)}r.bumpLastMargin(iC.c4ShapeMargin)},"drawC4ShapeArray"),dC=class{static{me(this,"Point")}constructor(t,e){this.x=t,this.y=e}},pC=me(function(t,e){let r=t.x,n=t.y,i=e.x,a=e.y,s=r+t.width/2,o=n+t.height/2,l=Math.abs(r-i),c=Math.abs(n-a),h=c/l,u=t.height/t.width,d=null;return n==a&&r{vC=me(t=>`.person { - stroke: ${t.personBorder}; - fill: ${t.personBkg}; + ${t} +`},"getStyles"),Qc=mt((e,t)=>{void 0!==t&&(Kc[e]=t)},"addStylesForDiagram"),Jc=Zc}),nh={};JBe(nh,{clear:()=>lh,getAccDescription:()=>dh,getAccTitle:()=>hh,getDiagramTitle:()=>gh,setAccDescription:()=>uh,setAccTitle:()=>ch,setDiagramTitle:()=>ph});var ih,ah,sh,oh,lh,ch,hh,uh,dh,ph,gh,fh,mh,D,yh,vh,xh,bh,wh,kh,Th,Eh,Ch,Sh,_h,Ah,Lh,Nh,Ih,Rh,Mh,Dh,Oh,Ph,Bh,$h,Fh,zh,Gh,Uh,qh,jh,Wh,Yh,Hh,Vh,Xh,Kh,Zh,Qh,Jh,eu,tu,ru,nu,iu,au,su,ou,lu,cu,hu,uu,du,pu,gu,fu=e(()=>{eh(),Nn(),sh=ah=ih="",oh=mt(e=>_c(e,Ir()),"sanitizeText"),lh=mt(()=>{ah=sh=ih=""},"clear"),ch=mt(e=>{ih=oh(e).replace(/^\s+/g,"")},"setAccTitle"),hh=mt(()=>ih,"getAccTitle"),uh=mt(e=>{sh=oh(e).replace(/\n\s+/g,` +`)},"setAccDescription"),dh=mt(()=>sh,"getAccDescription"),ph=mt(e=>{ah=oh(e)},"setDiagramTitle"),gh=mt(()=>ah,"getDiagramTitle")}),mu=e(()=>{Ur(),t(),Nn(),eh(),th(),rh(),fu(),fh=M,mh=T,D=Ir,yh=Nr,vh=br,xh=mt(e=>_c(e,D()),"sanitizeText"),bh=Xc,wh=mt(()=>nh,"getCommonDb"),kh={},Th=mt((e,t,r)=>{kh[e]&&fh.warn(`Diagram with id ${e} already registered. Overwriting.`),kh[e]=t,r&&Je(e,r),Qc(e,t.styles),t.injectUtils?.(fh,mh,D,xh,bh,wh(),()=>{})},"registerDiagram"),Eh=mt(e=>{if(e in kh)return kh[e];throw new Ch(e)},"getDiagram"),Ch=class extends Error{static{mt(this,"DiagramNotFoundError")}constructor(e){super(`Diagram ${e} not found.`)}}}),yu=e(()=>{mu(),eh(),fu(),Sh=[],_h=[""],Nh=[{alias:Ah="global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:Lh=""}],Rh="",Mh=!(Ih=[]),Dh=4,Oh=2,Bh=mt(function(){return Ph},"getC4Type"),$h=mt(function(e){Ph=_c(e,D())},"setC4Type"),Fh=mt(function(r,n,i,a,s,o,l,c,h){if(null!=r&&null!=n&&null!=i&&null!=a){let e={},t=Ih.find(e=>e.from===n&&e.to===i);t?e=t:Ih.push(e),e.type=r,e.from=n,e.to=i,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=lu()}},"addRel"),zh=mt(function(r,n,i,a,s,o,l){if(null!==n&&null!==i){let e={},t=Sh.find(e=>e.alias===n);var c;t&&n===t.alias?e=t:(e.alias=n,Sh.push(e)),e.label=null==i?{text:""}:{text:i},null==a?e.descr={text:""}:"object"==typeof a?([i,c]=Object.entries(a)[0],e[i]={text:c}):e.descr={text:a},"object"==typeof s?([i,c]=Object.entries(s)[0],e[i]=c):e.sprite=s,"object"==typeof o?([a,i]=Object.entries(o)[0],e[a]=i):e.tags=o,"object"==typeof l?([c,s]=Object.entries(l)[0],e[c]=s):e.link=l,e.typeC4Shape={text:r},e.parentBoundary=Ah,e.wrap=lu()}},"addPersonOrSystem"),Gh=mt(function(r,n,i,a,s,o,l,c){if(null!==n&&null!==i){let e={},t=Sh.find(e=>e.alias===n);var h;t&&n===t.alias?e=t:(e.alias=n,Sh.push(e)),e.label=null==i?{text:""}:{text:i},null==a?e.techn={text:""}:"object"==typeof a?([i,h]=Object.entries(a)[0],e[i]={text:h}):e.techn={text:a},null==s?e.descr={text:""}:"object"==typeof s?([i,h]=Object.entries(s)[0],e[i]={text:h}):e.descr={text:s},"object"==typeof o?([a,i]=Object.entries(o)[0],e[a]=i):e.sprite=o,"object"==typeof l?([h,s]=Object.entries(l)[0],e[h]=s):e.tags=l,"object"==typeof c?([a,i]=Object.entries(c)[0],e[a]=i):e.link=c,e.wrap=lu(),e.typeC4Shape={text:r},e.parentBoundary=Ah}},"addContainer"),Uh=mt(function(r,n,i,a,s,o,l,c){if(null!==n&&null!==i){let e={},t=Sh.find(e=>e.alias===n);var h;t&&n===t.alias?e=t:(e.alias=n,Sh.push(e)),e.label=null==i?{text:""}:{text:i},null==a?e.techn={text:""}:"object"==typeof a?([i,h]=Object.entries(a)[0],e[i]={text:h}):e.techn={text:a},null==s?e.descr={text:""}:"object"==typeof s?([i,h]=Object.entries(s)[0],e[i]={text:h}):e.descr={text:s},"object"==typeof o?([a,i]=Object.entries(o)[0],e[a]=i):e.sprite=o,"object"==typeof l?([h,s]=Object.entries(l)[0],e[h]=s):e.tags=l,"object"==typeof c?([a,i]=Object.entries(c)[0],e[a]=i):e.link=c,e.wrap=lu(),e.typeC4Shape={text:r},e.parentBoundary=Ah}},"addComponent"),qh=mt(function(r,n,i,a,s){if(null!==r&&null!==n){let e={},t=Nh.find(e=>e.alias===r);var o;t&&r===t.alias?e=t:(e.alias=r,Nh.push(e)),e.label=null==n?{text:""}:{text:n},null==i?e.type={text:"system"}:"object"==typeof i?([n,o]=Object.entries(i)[0],e[n]={text:o}):e.type={text:i},"object"==typeof a?([n,o]=Object.entries(a)[0],e[n]=o):e.tags=a,"object"==typeof s?([i,n]=Object.entries(s)[0],e[i]=n):e.link=s,e.parentBoundary=Ah,e.wrap=lu(),Lh=Ah,Ah=r,_h.push(Lh)}},"addPersonOrSystemBoundary"),jh=mt(function(r,n,i,a,s){if(null!==r&&null!==n){let e={},t=Nh.find(e=>e.alias===r);var o;t&&r===t.alias?e=t:(e.alias=r,Nh.push(e)),e.label=null==n?{text:""}:{text:n},null==i?e.type={text:"container"}:"object"==typeof i?([n,o]=Object.entries(i)[0],e[n]={text:o}):e.type={text:i},"object"==typeof a?([n,o]=Object.entries(a)[0],e[n]=o):e.tags=a,"object"==typeof s?([i,n]=Object.entries(s)[0],e[i]=n):e.link=s,e.parentBoundary=Ah,e.wrap=lu(),Lh=Ah,Ah=r,_h.push(Lh)}},"addContainerBoundary"),Wh=mt(function(r,n,i,a,s,e,o,l){if(null!==n&&null!==i){let e={},t=Nh.find(e=>e.alias===n);var c;t&&n===t.alias?e=t:(e.alias=n,Nh.push(e)),e.label=null==i?{text:""}:{text:i},null==a?e.type={text:"node"}:"object"==typeof a?([i,c]=Object.entries(a)[0],e[i]={text:c}):e.type={text:a},null==s?e.descr={text:""}:"object"==typeof s?([i,c]=Object.entries(s)[0],e[i]={text:c}):e.descr={text:s},"object"==typeof o?([a,i]=Object.entries(o)[0],e[a]=i):e.tags=o,"object"==typeof l?([c,s]=Object.entries(l)[0],e[c]=s):e.link=l,e.nodeType=r,e.parentBoundary=Ah,e.wrap=lu(),Lh=Ah,Ah=n,_h.push(Lh)}},"addDeploymentNode"),Yh=mt(function(){Ah=Lh,_h.pop(),Lh=_h.pop(),_h.push(Lh)},"popBoundaryParseStack"),Hh=mt(function(e,t,r,n,i,a,s,o,l,c,h){let u=Sh.find(e=>e.alias===t);var d,p;void 0===u&&void 0===(u=Nh.find(e=>e.alias===t))||(null!=r&&("object"==typeof r?([p,d]=Object.entries(r)[0],u[p]=d):u.bgColor=r),null!=n&&("object"==typeof n?([p,d]=Object.entries(n)[0],u[p]=d):u.fontColor=n),null!=i&&("object"==typeof i?([r,p]=Object.entries(i)[0],u[r]=p):u.borderColor=i),null!=a&&("object"==typeof a?([d,n]=Object.entries(a)[0],u[d]=n):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?([i,d]=Object.entries(o)[0],u[i]=d):u.sprite=o),null!=l&&("object"==typeof l?([n,a]=Object.entries(l)[0],u[n]=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,i]=Object.entries(h)[0],u[s]=i):u.legendSprite=h))},"updateElStyle"),Vh=mt(function(e,t,r,n,i,a,s){var o,l,c=Ih.find(e=>e.from===t&&e.to===r);void 0!==c&&(null!=n&&("object"==typeof n?([o,l]=Object.entries(n)[0],c[o]=l):c.textColor=n),null!=i&&("object"==typeof i?([o,l]=Object.entries(i)[0],c[o]=l):c.lineColor=i),null!=a&&("object"==typeof a?([n,o]=Object.entries(a)[0],c[n]=parseInt(o)):c.offsetX=parseInt(a)),null!=s)&&("object"==typeof s?([l,i]=Object.entries(s)[0],c[l]=parseInt(i)):c.offsetY=parseInt(s))},"updateRelStyle"),Xh=mt(function(e,t,r){var t="object"==typeof t?(n=Object.values(t)[0],parseInt(n)):parseInt(t),n="object"==typeof r?(n=Object.values(r)[0],parseInt(n)):parseInt(r);1<=t&&(Dh=t),1<=n&&(Oh=n)},"updateLayoutConfig"),Kh=mt(function(){return Dh},"getC4ShapeInRow"),Zh=mt(function(){return Oh},"getC4BoundaryInRow"),Qh=mt(function(){return Ah},"getCurrentBoundaryParse"),Jh=mt(function(){return Lh},"getParentBoundaryParse"),eu=mt(function(t){return null==t?Sh:Sh.filter(e=>e.parentBoundary===t)},"getC4ShapeArray"),tu=mt(function(t){return Sh.find(e=>e.alias===t)},"getC4Shape"),ru=mt(function(e){return Object.keys(eu(e))},"getC4ShapeKeys"),nu=mt(function(t){return null==t?Nh:Nh.filter(e=>e.parentBoundary===t)},"getBoundaries"),iu=nu,au=mt(function(){return Ih},"getRels"),su=mt(function(){return Rh},"getTitle"),ou=mt(function(e){Mh=e},"setWrap"),lu=mt(function(){return Mh},"autoWrap"),cu=mt(function(){Sh=[],Nh=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Ah="global",_h=[Lh=""],_h=[Rh=""],Mh=!(Ih=[]),Dh=4,Oh=2},"clear"),hu={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},uu={FILLED:0,OPEN:1},du={LEFTOF:0,RIGHTOF:1,OVER:2},pu=mt(function(e){Rh=_c(e,D())},"setTitle"),gu={addPersonOrSystem:zh,addPersonOrSystemBoundary:qh,addContainer:Gh,addContainerBoundary:jh,addComponent:Uh,addDeploymentNode:Wh,popBoundaryParseStack:Yh,addRel:Fh,updateElStyle:Hh,updateRelStyle:Vh,updateLayoutConfig:Xh,autoWrap:lu,setWrap:ou,getC4ShapeArray:eu,getC4Shape:tu,getC4ShapeKeys:ru,getBoundaries:nu,getBoundarys:iu,getCurrentBoundaryParse:Qh,getParentBoundaryParse:Jh,getRels:au,getTitle:su,getC4Type:Bh,getC4ShapeInRow:Kh,getC4BoundaryInRow:Zh,setAccTitle:ch,getAccTitle:hh,getAccDescription:dh,setAccDescription:uh,getConfig:mt(()=>D().c4,"getConfig"),clear:cu,LINETYPE:hu,ARROWTYPE:uu,PLACEMENT:du,setTitle:pu,setC4Type:$h}});function vu(e,t){return null==e||null==t?NaN:e{mt(vu,"ascending")});function bu(e,t){return null==e||null==t?NaN:t{mt(bu,"descending")});function ku(r){let a,s,i;function o(e,t,r=0,n=e.length){if(r>>1}while(s(e[i],t)<0?r=1+i:n=i,r>>1}while(s(e[i],t)<=0?r=1+i:n=i,r-i(e[n],t)?n-1:n}return i=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===bu?r:Tu,s=r),mt(o,"left"),mt(e,"right"),mt(t,"center"),{left:o,center:t,right:e}}function Tu(){return 0}var Eu=e(()=>{xu(),wu(),mt(ku,"bisector"),mt(Tu,"zero")});function Cu(e){return null===e?NaN:+e}var Su,_u,Au=e(()=>{mt(Cu,"number")}),Lu=e(()=>{xu(),Eu(),Au(),Su=ku(vu).right,ku(Cu).center,_u=Su});function Nu({_intern:e,_key:t},r){return t=t(r),e.has(t)?e.get(t):r}function Iu({_intern:e,_key:t},r){return t=t(r),e.has(t)?e.get(t):(e.set(t,r),r)}function Ru({_intern:e,_key:t},r){return t=t(r),e.has(t)&&(r=e.get(t),e.delete(t)),r}function Mu(e){return null!==e&&"object"==typeof e?e.valueOf():e}var Du,Ou=e(()=>{Du=class extends Map{static{mt(this,"InternMap")}constructor(e,t=Mu){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:t}}),null!=e)for(var[r,n]of e)this.set(r,n)}get(e){return super.get(Nu(this,e))}has(e){return super.has(Nu(this,e))}set(e,t){return super.set(Iu(this,e),t)}delete(e){return super.delete(Ru(this,e))}},mt(Nu,"intern_get"),mt(Iu,"intern_set"),mt(Ru,"intern_delete"),mt(Mu,"keyof")});function Pu(e,t,r){let n=(t-e)/Math.max(0,r),i=Math.floor(Math.log10(n)),a=n/Math.pow(10,i),s=zu<=a?10:Gu<=a?5:Uu<=a?2:1,o,l,c;return i<0?(c=Math.pow(10,-i)/s,o=Math.round(e*c),l=Math.round(t*c),o/ct&&--l,c=-c):(c=Math.pow(10,i)*s,o=Math.round(e/c),l=Math.round(t/c),o*ct&&--l),l{zu=Math.sqrt(50),Gu=Math.sqrt(10),Uu=Math.sqrt(2),mt(Pu,"tickSpec"),mt(Bu,"ticks"),mt($u,"tickIncrement"),mt(Fu,"tickStep")});function ju(t,r){let n;if(void 0===r)for(var e of t)null!=e&&(n{mt(ju,"max")});function Yu(t,r){let n;if(void 0===r)for(var e of t)null!=e&&(n>e||void 0===n&&e<=e)&&(n=e);else{let e=-1;for(var i of t)null!=(i=r(i,++e,t))&&(n>i||void 0===n&&i<=i)&&(n=i)}return n}var Hu=e(()=>{mt(Yu,"min")});function Vu(e,t,r){e=+e,t=+t,r=(i=arguments.length)<2?(t=e,e=0,1):i<3?1:+r;for(var n=-1,i=0|Math.max(0,Math.ceil((t-e)/r)),a=new Array(i);++n{mt(Vu,"range")}),Ku=e(()=>{Lu(),Eu(),Wu(),Hu(),Xu(),qu(),Ou()});function Zu(e){return e}var Qu=e(()=>{mt(Zu,"default")});function Ju(e){return"translate("+e+",0)"}function ed(e){return"translate(0,"+e+")"}function td(t){return e=>+t(e)}function rd(t,r){return r=Math.max(0,t.bandwidth()-2*r)/2,t.round()&&(r=Math.round(r)),e=>+t(e)+r}function nd(){return!this.__axis}function id(p,g){var f=[],m=null,y=null,v=6,x=6,b=3,w=typeof window<"u"&&1{Qu(),od=1,ld=3,mt(Ju,"translateX"),mt(ed,"translateY"),mt(td,"number"),mt(rd,"center"),mt(nd,"entering"),mt(id,"axis"),mt(ad,"axisTop"),mt(sd,"axisBottom")}),hd=e(()=>{cd()});function ud(){for(var e,t=0,r=arguments.length,n={};t{md={value:mt(()=>{},"value")},mt(ud,"dispatch"),mt(dd,"Dispatch"),mt(pd,"parseTypenames"),dd.prototype=ud.prototype={constructor:dd,on:mt(function(e,t){var r,n=this._,i=pd(e+"",n),a=-1,s=i.length;if(!(arguments.length<2)){if(null!=t&&"function"!=typeof t)throw new Error("invalid callback: "+t);for(;++a{bd()}),kd=e(()=>{xd={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 Td(e){var t=e+="",r=t.indexOf(":");return 0<=r&&"xmlns"!==(t=e.slice(0,r))&&(e=e.slice(r+1)),xd.hasOwnProperty(t)?{space:xd[t],local:e}:e}var Ed=e(()=>{kd(),mt(Td,"default")});function Cd(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 Sd(e){return function(){return this.ownerDocument.createElementNS(e.space,e.local)}}function _d(e){return((e=Td(e)).local?Sd:Cd)(e)}var Ad=e(()=>{Ed(),kd(),mt(Cd,"creatorInherit"),mt(Sd,"creatorFixed"),mt(_d,"default")});function Ld(){}function Nd(e){return null==e?Ld:function(){return this.querySelector(e)}}var Id=e(()=>{mt(Ld,"none"),mt(Nd,"default")});function Rd(e){"function"!=typeof e&&(e=Nd(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i{hg(),Id(),mt(Rd,"default")});function Dd(e){return null==e?[]:Array.isArray(e)?e:Array.from(e)}var Od=e(()=>{mt(Dd,"array")});function Pd(){return[]}function Bd(e){return null==e?Pd:function(){return this.querySelectorAll(e)}}var $d=e(()=>{mt(Pd,"empty"),mt(Bd,"default")});function Fd(e){return function(){return Dd(e.apply(this,arguments))}}function zd(e){e=("function"==typeof e?Fd:Bd)(e);for(var t=this._groups,r=t.length,n=[],i=[],a=0;a{hg(),Od(),$d(),mt(Fd,"arrayAll"),mt(zd,"default")});function Ud(e){return function(){return this.matches(e)}}function qd(t){return function(e){return e.matches(t)}}var jd=e(()=>{mt(Ud,"default"),mt(qd,"childMatcher")});function Wd(e){return function(){return Vd.call(this.children,e)}}function Yd(){return this.firstElementChild}function Hd(e){return this.select(null==e?Yd:Wd("function"==typeof e?e:qd(e)))}var Vd,Xd=e(()=>{jd(),Vd=Array.prototype.find,mt(Wd,"childFind"),mt(Yd,"childFirst"),mt(Hd,"default")});function Kd(){return Array.from(this.children)}function Zd(e){return function(){return Jd.call(this.children,e)}}function Qd(e){return this.selectAll(null==e?Kd:Zd("function"==typeof e?e:qd(e)))}var Jd,ep=e(()=>{jd(),Jd=Array.prototype.filter,mt(Kd,"children"),mt(Zd,"childrenFilter"),mt(Qd,"default")});function tp(e){"function"!=typeof e&&(e=Ud(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i{hg(),jd(),mt(tp,"default")});function np(e){return new Array(e.length)}var ip=e(()=>{mt(np,"default")});function ap(){return new ag(this._enter||this._groups.map(np),this._parents)}function sp(e,t){this.ownerDocument=e.ownerDocument,this.namespaceURI=e.namespaceURI,this._next=null,this._parent=e,this.__data__=t}var op=e(()=>{ip(),hg(),mt(ap,"default"),mt(sp,"EnterNode"),sp.prototype={constructor:sp,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 lp(e){return function(){return e}}var cp=e(()=>{mt(lp,"default")});function hp(e,t,r,n,i,a){for(var s,o=0,l=t.length,c=a.length;o{hg(),op(),cp(),mt(hp,"bindIndex"),mt(up,"bindKey"),mt(dp,"datum"),mt(pp,"default"),mt(gp,"arraylike")});function mp(){return new ag(this._exit||this._groups.map(np),this._parents)}var yp=e(()=>{ip(),hg(),mt(mp,"default")});function vp(e,t,r){var n=this.enter(),i=this,a=this.exit(),n="function"==typeof e?(n=e(n))&&n.selection():n.append(e+"");return null!=t&&(i=(i=t(i))&&i.selection()),null==r?a.remove():r(a),n&&i?n.merge(i).order():i}var xp=e(()=>{mt(vp,"default")});function bp(e){for(var e=e.selection?e.selection():e,t=this._groups,r=e._groups,n=t.length,e=r.length,i=Math.min(n,e),a=new Array(n),s=0;s{hg(),mt(bp,"default")});function kp(){for(var e=this._groups,t=-1,r=e.length;++t{mt(kp,"default")});function Ep(r){function e(e,t){return e&&t?r(e.__data__,t.__data__):!e-!t}r=r||Cp,mt(e,"compareNode");for(var t=this._groups,n=t.length,i=new Array(n),a=0;a{hg(),mt(Ep,"default"),mt(Cp,"ascending")});function _p(){var e=arguments[0];return arguments[0]=this,e.apply(null,arguments),this}var Ap=e(()=>{mt(_p,"default")});function Lp(){return Array.from(this)}var Np=e(()=>{mt(Lp,"default")});function Ip(){for(var e=this._groups,t=0,r=e.length;t{mt(Ip,"default")});function Mp(){let e=0;for(var t of this)++e;return e}var Dp=e(()=>{mt(Mp,"default")});function Op(){return!this.node()}var Pp=e(()=>{mt(Op,"default")});function Bp(e){for(var t=this._groups,r=0,n=t.length;r{mt(Bp,"default")});function Fp(e){return function(){this.removeAttribute(e)}}function zp(e){return function(){this.removeAttributeNS(e.space,e.local)}}function Gp(e,t){return function(){this.setAttribute(e,t)}}function Up(e,t){return function(){this.setAttributeNS(e.space,e.local,t)}}function qp(t,r){return function(){var e=r.apply(this,arguments);null==e?this.removeAttribute(t):this.setAttribute(t,e)}}function jp(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 Wp(e,t){var r,e=Td(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?zp:Fp:"function"==typeof t?e.local?jp:qp:e.local?Up:Gp)(e,t))}var Yp=e(()=>{Ed(),mt(Fp,"attrRemove"),mt(zp,"attrRemoveNS"),mt(Gp,"attrConstant"),mt(Up,"attrConstantNS"),mt(qp,"attrFunction"),mt(jp,"attrFunctionNS"),mt(Wp,"default")});function Hp(e){return e.ownerDocument&&e.ownerDocument.defaultView||e.document&&e||e.defaultView}var Vp=e(()=>{mt(Hp,"default")});function Xp(e){return function(){this.style.removeProperty(e)}}function Kp(e,t,r){return function(){this.style.setProperty(e,t,r)}}function Zp(t,r,n){return function(){var e=r.apply(this,arguments);null==e?this.style.removeProperty(t):this.style.setProperty(t,e,n)}}function Qp(e,t,r){return 1{Vp(),mt(Xp,"styleRemove"),mt(Kp,"styleConstant"),mt(Zp,"styleFunction"),mt(Qp,"default"),mt(Jp,"styleValue")});function t0(e){return function(){delete this[e]}}function r0(e,t){return function(){this[e]=t}}function n0(t,r){return function(){var e=r.apply(this,arguments);null==e?delete this[t]:this[t]=e}}function i0(e,t){return 1{mt(t0,"propertyRemove"),mt(r0,"propertyConstant"),mt(n0,"propertyFunction"),mt(i0,"default")});function s0(e){return e.trim().split(/^|\s+/)}function o0(e){return e.classList||new l0(e)}function l0(e){this._node=e,this._names=s0(e.getAttribute("class")||"")}function c0(e,t){for(var r=o0(e),n=-1,i=t.length;++n{mt(s0,"classArray"),mt(o0,"classList"),mt(l0,"ClassList"),l0.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(c0,"classedAdd"),mt(h0,"classedRemove"),mt(u0,"classedTrue"),mt(d0,"classedFalse"),mt(p0,"classedFunction"),mt(g0,"default")});function m0(){this.textContent=""}function y0(e){return function(){this.textContent=e}}function v0(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function x0(e){return arguments.length?this.each(null==e?m0:("function"==typeof e?v0:y0)(e)):this.node().textContent}var b0=e(()=>{mt(m0,"textRemove"),mt(y0,"textConstant"),mt(v0,"textFunction"),mt(x0,"default")});function w0(){this.innerHTML=""}function k0(e){return function(){this.innerHTML=e}}function T0(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function E0(e){return arguments.length?this.each(null==e?w0:("function"==typeof e?T0:k0)(e)):this.node().innerHTML}var C0=e(()=>{mt(w0,"htmlRemove"),mt(k0,"htmlConstant"),mt(T0,"htmlFunction"),mt(E0,"default")});function S0(){this.nextSibling&&this.parentNode.appendChild(this)}function _0(){return this.each(S0)}var A0=e(()=>{mt(S0,"raise"),mt(_0,"default")});function L0(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function N0(){return this.each(L0)}var I0=e(()=>{mt(L0,"lower"),mt(N0,"default")});function R0(e){var t="function"==typeof e?e:_d(e);return this.select(function(){return this.appendChild(t.apply(this,arguments))})}var M0=e(()=>{Ad(),mt(R0,"default")});function D0(){return null}function O0(e,t){var r="function"==typeof e?e:_d(e),n=null==t?D0:"function"==typeof t?t:Nd(t);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}var P0=e(()=>{Ad(),Id(),mt(D0,"constantNull"),mt(O0,"default")});function B0(){var e=this.parentNode;e&&e.removeChild(this)}function $0(){return this.each(B0)}var F0=e(()=>{mt(B0,"remove"),mt($0,"default")});function z0(){var e=this.cloneNode(!1),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function G0(){var e=this.cloneNode(!0),t=this.parentNode;return t?t.insertBefore(e,this.nextSibling):e}function U0(e){return this.select(e?G0:z0)}var q0=e(()=>{mt(z0,"selection_cloneShallow"),mt(G0,"selection_cloneDeep"),mt(U0,"default")});function j0(e){return arguments.length?this.property("__data__",e):this.node().__data__}var W0=e(()=>{mt(j0,"default")});function Y0(t){return function(e){t.call(this,e,this.__data__)}}function H0(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 V0(a){return function(){var e=this.__on;if(e){for(var t,r=0,n=-1,i=e.length;r{mt(Y0,"contextListener"),mt(H0,"parseTypenames"),mt(V0,"onRemove"),mt(X0,"onAdd"),mt(K0,"default")});function Q0(e,t,r){var n=Hp(e),i=n.CustomEvent;"function"==typeof i?i=new i(t,r):(i=n.document.createEvent("Event"),r?(i.initEvent(t,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(t,!1,!1)),e.dispatchEvent(i)}function J0(e,t){return function(){return Q0(this,e,t)}}function eg(e,t){return function(){return Q0(this,e,t.apply(this,arguments))}}function tg(e,t){return this.each(("function"==typeof t?eg:J0)(e,t))}var rg=e(()=>{Vp(),mt(Q0,"dispatchEvent"),mt(J0,"dispatchConstant"),mt(eg,"dispatchFunction"),mt(tg,"default")});function*ng(){for(var e=this._groups,t=0,r=e.length;t{mt(ng,"default")});function ag(e,t){this._groups=e,this._parents=t}function sg(){return new ag([[document.documentElement]],lg)}function og(){return this}var lg,cg,hg=e(()=>{Md(),Gd(),Xd(),ep(),rp(),fp(),op(),yp(),xp(),wp(),Tp(),Sp(),Ap(),Np(),Rp(),Dp(),Pp(),$p(),Yp(),e0(),a0(),f0(),b0(),C0(),A0(),I0(),M0(),P0(),F0(),q0(),W0(),Z0(),rg(),ig(),lg=[null],mt(ag,"Selection"),mt(sg,"selection"),mt(og,"selection_selection"),ag.prototype=sg.prototype={constructor:ag,select:Rd,selectAll:zd,selectChild:Hd,selectChildren:Qd,filter:tp,data:pp,enter:ap,exit:mp,join:vp,merge:bp,selection:og,order:kp,sort:Ep,call:_p,nodes:Lp,node:Ip,size:Mp,empty:Op,each:Bp,attr:Wp,style:Qp,property:i0,classed:g0,text:x0,html:E0,raise:_0,lower:N0,append:R0,insert:O0,remove:$0,clone:U0,datum:j0,on:K0,dispatch:tg,[Symbol.iterator]:ng},cg=sg});function H(e){return"string"==typeof e?new ag([[document.querySelector(e)]],[document.documentElement]):new ag([[e]],lg)}var ug=e(()=>{hg(),mt(H,"default")}),dg=e(()=>{jd(),Ed(),ug(),hg(),Id(),$d(),e0()}),pg=e(()=>{});function gg(e,t,r){(e.prototype=t.prototype=r).constructor=e}function fg(e,t){var r,n=Object.create(e.prototype);for(r in t)n[r]=t[r];return n}var mg=e(()=>{mt(gg,"default"),mt(fg,"extend")});function yg(){}function vg(){return this.rgb().formatHex()}function xg(){return this.rgb().formatHex8()}function bg(){return Og(this).formatHsl()}function wg(){return this.rgb().formatRgb()}function kg(e){var t,r;return e=(e+"").trim().toLowerCase(),(t=jg.exec(e))?(r=t[1].length,t=parseInt(t[1],16),6===r?Tg(t):3===r?new _g(t>>8&15|t>>4&240,t>>4&15|240&t,(15&t)<<4|15&t,1):8===r?Eg(t>>24&255,t>>16&255,t>>8&255,(255&t)/255):4===r?Eg(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=Wg.exec(e))?new _g(t[1],t[2],t[3],1):(t=Yg.exec(e))?new _g(255*t[1]/100,255*t[2]/100,255*t[3]/100,1):(t=Hg.exec(e))?Eg(t[1],t[2],t[3],t[4]):(t=Vg.exec(e))?Eg(255*t[1]/100,255*t[2]/100,255*t[3]/100,t[4]):(t=Xg.exec(e))?Dg(t[1],t[2]/100,t[3]/100,1):(t=Kg.exec(e))?Dg(t[1],t[2]/100,t[3]/100,t[4]):Zg.hasOwnProperty(e)?Tg(Zg[e]):"transparent"===e?new _g(NaN,NaN,NaN,0):null}function Tg(e){return new _g(e>>16&255,e>>8&255,255&e,1)}function Eg(e,t,r,n){return new _g(e=n<=0?t=r=NaN:e,t,r,n)}function Cg(e){return(e=e instanceof yg?e:kg(e))?new _g((e=e.rgb()).r,e.g,e.b,e.opacity):new _g}function Sg(e,t,r,n){return 1===arguments.length?Cg(e):new _g(e,t,r,n??1)}function _g(e,t,r,n){this.r=+e,this.g=+t,this.b=+r,this.opacity=+n}function Ag(){return"#"+Mg(this.r)+Mg(this.g)+Mg(this.b)}function Lg(){return"#"+Mg(this.r)+Mg(this.g)+Mg(this.b)+Mg(255*(isNaN(this.opacity)?1:this.opacity))}function Ng(){var e=Ig(this.opacity);return(1===e?"rgb(":"rgba(")+Rg(this.r)+`, ${Rg(this.g)}, `+Rg(this.b)+(1===e?")":`, ${e})`)}function Ig(e){return isNaN(e)?1:Math.max(0,Math.min(1,e))}function Rg(e){return Math.max(0,Math.min(255,Math.round(e)||0))}function Mg(e){return((e=Rg(e))<16?"0":"")+e.toString(16)}function Dg(e,t,r,n){return n<=0?e=t=r=NaN:r<=0||1<=r?e=t=NaN:t<=0&&(e=NaN),new Bg(e,t,r,n)}function Og(e){var t,r,n,i,a,s,o,l;return e instanceof Bg?new Bg(e.h,e.s,e.l,e.opacity):(e=e instanceof yg?e:kg(e))?e instanceof Bg?e:(t=(e=e.rgb()).r/255,r=e.g/255,n=e.b/255,i=Math.min(t,r,n),s=NaN,l=((a=Math.max(t,r,n))+i)/2,(o=a-i)?(s=t===a?(r-n)/o+6*(r{mg(),mt(yg,"Color"),Gg="\\s*([+-]?\\d+)\\s*",Ug="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",qg="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",jg=/^#([0-9a-f]{3,8})$/,Wg=new RegExp(`^rgb\\(${Gg},${Gg},${Gg}\\)$`),Yg=new RegExp(`^rgb\\(${qg},${qg},${qg}\\)$`),Hg=new RegExp(`^rgba\\(${Gg},${Gg},${Gg},${Ug}\\)$`),Vg=new RegExp(`^rgba\\(${qg},${qg},${qg},${Ug}\\)$`),Xg=new RegExp(`^hsl\\(${Ug},${qg},${qg}\\)$`),Kg=new RegExp(`^hsla\\(${Ug},${qg},${qg},${Ug}\\)$`),Zg={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},gg(yg,kg,{copy(e){return Object.assign(new this.constructor,this,e)},displayable(){return this.rgb().displayable()},hex:vg,formatHex:vg,formatHex8:xg,formatHsl:bg,formatRgb:wg,toString:wg}),mt(vg,"color_formatHex"),mt(xg,"color_formatHex8"),mt(bg,"color_formatHsl"),mt(wg,"color_formatRgb"),mt(kg,"color"),mt(Tg,"rgbn"),mt(Eg,"rgba"),mt(Cg,"rgbConvert"),mt(Sg,"rgb"),mt(_g,"Rgb"),gg(_g,Sg,fg(yg,{brighter(e){return e=null==e?1/.7:Math.pow(1/.7,e),new _g(this.r*e,this.g*e,this.b*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new _g(this.r*e,this.g*e,this.b*e,this.opacity)},rgb(){return this},clamp(){return new _g(Rg(this.r),Rg(this.g),Rg(this.b),Ig(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:Ag,formatHex:Ag,formatHex8:Lg,formatRgb:Ng,toString:Ng})),mt(Ag,"rgb_formatHex"),mt(Lg,"rgb_formatHex8"),mt(Ng,"rgb_formatRgb"),mt(Ig,"clampa"),mt(Rg,"clampi"),mt(Mg,"hex"),mt(Dg,"hsla"),mt(Og,"hslConvert"),mt(Pg,"hsl"),mt(Bg,"Hsl"),gg(Bg,Pg,fg(yg,{brighter(e){return e=null==e?1/.7:Math.pow(1/.7,e),new Bg(this.h,this.s,this.l*e,this.opacity)},darker(e){return e=null==e?.7:Math.pow(.7,e),new Bg(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 _g(zg(240<=e?e-240:120+e,r=2*r-(t=r+(r<.5?r:1-r)*t),t),zg(e,r,t),zg(e<120?240+e:e-120,r,t),this.opacity)},clamp(){return new Bg($g(this.h),Fg(this.s),Fg(this.l),Ig(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=Ig(this.opacity);return(1===e?"hsl(":"hsla(")+$g(this.h)+`, ${100*Fg(this.s)}%, ${100*Fg(this.l)}%`+(1===e?")":`, ${e})`)}})),mt($g,"clamph"),mt(Fg,"clampt"),mt(zg,"hsl2rgb")}),t1=e(()=>{Qg=Math.PI/180,Jg=180/Math.PI});function r1(e){var t,r,n,i,a,s;return e instanceof i1?new i1(e.l,e.a,e.b,e.opacity):e instanceof u1?d1(e):(i=a1(.2225045*(t=l1((e=e instanceof _g?e:Cg(e)).r))+.7168786*(r=l1(e.g))+.0606169*(n=l1(e.b))),t===r&&r===n?a=s=i:(a=a1((.4360747*t+.3850649*r+.1430804*n)/.96422),s=a1((.0139322*t+.0971045*r+.7141733*n)/.82521)),new i1(116*i-16,500*(a-i),200*(i-s),e.opacity))}function n1(e,t,r,n){return 1===arguments.length?r1(e):new i1(e,t,r,n??1)}function i1(e,t,r,n){this.l=+e,this.a=+t,this.b=+r,this.opacity=+n}function a1(e){return m1{mg(),e1(),t1(),p1=4/29,f1=3*(g1=6/29)*g1,m1=g1*g1*g1,mt(r1,"labConvert"),mt(n1,"lab"),mt(i1,"Lab"),gg(i1,n1,fg(yg,{brighter(e){return new i1(this.l+18*(e??1),this.a,this.b,this.opacity)},darker(e){return new i1(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 _g(o1(3.1338561*(t=.96422*s1(t))-1.6168667*(e=+s1(e))-.4906146*(r=.82521*s1(r))),o1(-.9787684*t+1.9161415*e+.033454*r),o1(.0719453*t-.2289914*e+1.4052427*r),this.opacity)}})),mt(a1,"xyz2lab"),mt(s1,"lab2xyz"),mt(o1,"lrgb2rgb"),mt(l1,"rgb2lrgb"),mt(c1,"hclConvert"),mt(h1,"hcl"),mt(u1,"Hcl"),mt(d1,"hcl2lab"),gg(u1,h1,fg(yg,{brighter(e){return new u1(this.h,this.c,this.l+18*(e??1),this.opacity)},darker(e){return new u1(this.h,this.c,this.l-18*(e??1),this.opacity)},rgb(){return d1(this).rgb()}}))}),v1=e(()=>{e1(),y1()});function x1(e,t,r,n,i){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)*n+s*i)/6}function b1(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],n=s[t+1],i=0{mt(x1,"basis"),mt(b1,"default")});function k1(n){var i=n.length;return function(e){var t=Math.floor(((e%=1)<0?++e:e)*i),r=n[(t+i-1)%i];return x1((e-t/i)*i,r,n[t%i],n[(t+1)%i],n[(t+2)%i])}}var T1,E1=e(()=>{w1(),mt(k1,"default")}),C1=e(()=>{T1=mt(e=>()=>e,"default")});function S1(t,r){return function(e){return t+e*r}}function _1(t,r,n){return t=Math.pow(t,n),r=Math.pow(r,n)-t,n=1/n,function(e){return Math.pow(t+e*r,n)}}function A1(e,t){var r=t-e;return r?S1(e,180{C1(),mt(S1,"linear"),mt(_1,"exponential"),mt(A1,"hue"),mt(L1,"gamma"),mt(N1,"nogamma")});function R1(o){return function(e){for(var t,r=e.length,n=new Array(r),i=new Array(r),a=new Array(r),s=0;s{v1(),w1(),E1(),I1(),M1=mt(function e(t){var s=L1(t);function r(t,e){var r=s((t=Sg(t)).r,(e=Sg(e)).r),n=s(t.g,e.g),i=s(t.b,e.b),a=N1(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=n(e),t.b=i(e),t.opacity=a(e),t+""}}return mt(r,"rgb"),r.gamma=e,r},"rgbGamma")(1),mt(R1,"rgbSpline"),R1(b1),R1(k1)});function O1(t,r){r=r||[];var n,i=t?Math.min(r.length,t.length):0,a=r.slice();return function(e){for(n=0;n{mt(O1,"default"),mt(P1,"isNumberArray")});function $1(e,t){for(var r=t?t.length:0,n=e?Math.min(r,e.length):0,i=new Array(n),a=new Array(r),s=0;s{J1(),mt($1,"genericArray")});function z1(t,r){var n=new Date;return t=+t,r=+r,function(e){return n.setTime(t*(1-e)+r*e),n}}var G1=e(()=>{mt(z1,"default")});function U1(t,r){return t=+t,r=+r,function(e){return t*(1-e)+r*e}}var q1=e(()=>{mt(U1,"default")});function j1(e,t){var r,n={},i={};for(r in null!==e&&"object"==typeof e||(e={}),t=null!==t&&"object"==typeof t?t:{})r in e?n[r]=Q1(e[r],t[r]):i[r]=t[r];return function(e){for(r in n)i[r]=n[r](e);return i}}var W1=e(()=>{J1(),mt(j1,"default")});function Y1(e){return function(){return e}}function H1(t){return function(e){return t(e)+""}}function V1(e,n){var t,r,i,a=X1.lastIndex=K1.lastIndex=0,s=-1,o=[],l=[];for(e+="",n+="";(t=X1.exec(e))&&(r=K1.exec(n));)(i=r.index)>a&&(i=n.slice(a,i),o[s]?o[s]+=i:o[++s]=i),(t=t[0])===(r=r[0])?o[s]?o[s]+=r:o[++s]=r:(o[++s]=null,l.push({i:s,x:U1(t,r)})),a=K1.lastIndex;return a{q1(),X1=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,K1=new RegExp(X1.source,"g"),mt(Y1,"zero"),mt(H1,"one"),mt(V1,"default")});function Q1(e,t){var r=typeof t;return null==t||"boolean"==r?T1(t):("number"==r?U1:"string"==r?(r=kg(t))?(t=r,M1):V1:t instanceof kg?M1:t instanceof Date?z1:P1(t)?O1:Array.isArray(t)?$1:"function"!=typeof t.valueOf&&"function"!=typeof t.toString||isNaN(t)?j1:U1)(e,t)}var J1=e(()=>{v1(),D1(),F1(),G1(),q1(),W1(),Z1(),C1(),B1(),mt(Q1,"default")});function ef(t,r){return t=+t,r=+r,function(e){return Math.round(t*(1-e)+r*e)}}var tf=e(()=>{mt(ef,"default")});function rf(e,t,r,n,i,a){var s,o,l;return(s=Math.sqrt(e*e+t*t))&&(e/=s,t/=s),(l=e*r+t*n)&&(r-=e*l,n-=t*l),(o=Math.sqrt(r*r+n*n))&&(r/=o,n/=o,l/=o),e*n{nf=180/Math.PI,af={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},mt(rf,"default")});function of(e){return(e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(e+"")).isIdentity?af:rf(e.a,e.b,e.c,e.d,e.e,e.f)}function lf(e){return null!=e&&((cf=cf||document.createElementNS("http://www.w3.org/2000/svg","g")).setAttribute("transform",e),e=cf.transform.baseVal.consolidate())?rf((e=e.matrix).a,e.b,e.c,e.d,e.e,e.f):af}var cf,hf=e(()=>{sf(),mt(of,"parseCss"),mt(lf,"parseSvg")});function uf(r,o,l,i){function c(e){return e.length?e.pop()+" ":""}function n(e,t,r,n,i,a){var s;e!==r||t!==n?(s=i.push("translate(",null,o,null,l),a.push({i:s-4,x:U1(e,r)},{i:s-2,x:U1(t,n)})):(r||n)&&i.push("translate("+r+o+n+l)}function s(e,t,r,n){e!==t?(180{q1(),hf(),mt(uf,"interpolateTransform"),df=uf(of,"px, ","px)","deg)"),pf=uf(lf,", ",")",")")});function ff(s){return function(t,e){var r=s((t=h1(t)).h,(e=h1(e)).h),n=N1(t.c,e.c),i=N1(t.l,e.l),a=N1(t.opacity,e.opacity);return function(e){return t.h=r(e),t.c=n(e),t.l=i(e),t.opacity=a(e),t+""}}}var mf,yf=e(()=>{v1(),I1(),mt(ff,"hcl"),mf=ff(A1),ff(N1)}),vf=e(()=>{J1(),q1(),tf(),Z1(),gf(),D1(),yf()});function xf(){return Of||($f(bf),Of=Bf.now()+Pf)}function bf(){Of=0}function wf(){this._call=this._time=this._next=null}function kf(e,t,r){var n=new wf;return n.restart(e,t,r),n}function Tf(){xf(),++Af;for(var e,t=Rf;t;)0<=(e=Of-t._time)&&t._call.call(void 0,e),t=t._next;--Af}function Ef(){Of=(Df=Bf.now())+Pf,Af=Lf=0;try{Tf()}finally{Af=0,Sf(),Of=0}}function Cf(){var e=Bf.now(),t=e-Df;Ifr._time&&(n=r._time),(e=r)._next):(t=r._next,r._next=null,e?e._next=t:Rf=t);Mf=e,_f(n)}function _f(e){Af||(Lf=Lf&&clearTimeout(Lf),24{If=1e3,Pf=Of=Df=Nf=Lf=Af=0,Bf="object"==typeof performance&&performance.now?performance:Date,$f="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(e){setTimeout(e,17)},mt(xf,"now"),mt(bf,"clearNow"),mt(wf,"Timer"),wf.prototype=kf.prototype={constructor:wf,restart:mt(function(e,t,r){if("function"!=typeof e)throw new TypeError("callback is not a function");r=(null==r?xf():+r)+(null==t?0:+t),this._next||Mf===this||(Mf?Mf._next=this:Rf=this,Mf=this),this._call=e,this._time=r,_f()},"restart"),stop:mt(function(){this._call&&(this._call=null,this._time=1/0,_f())},"stop")},mt(kf,"timer"),mt(Tf,"timerFlush"),mt(Ef,"wake"),mt(Cf,"poke"),mt(Sf,"nap"),mt(_f,"sleep")});function zf(t,r,e){var n=new wf;return r=null==r?0:+r,n.restart(e=>{n.stop(),t(e+r)},r,e),n}var Gf=e(()=>{Ff(),mt(zf,"default")}),Uf=e(()=>{Ff(),Gf()});function qf(e,t,r,n,i,a){var s=e.__transition;if(s){if(r in s)return}else e.__transition={};Hf(e,r,{name:t,index:n,group:i,on:Vf,tween:Xf,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:Kf})}function jf(e,t){if((e=Yf(e,t)).state>Kf)throw new Error("too late; already scheduled");return e}function Wf(e,t){if((e=Yf(e,t)).state>Jf)throw new Error("too late; already running");return e}function Yf(e,t){if(e=(e=e.__transition)&&e[t])return e;throw new Error("transition not found")}function Hf(a,s,o){var l,c=a.__transition;function e(e){o.state=Zf,o.timer.restart(h,o.delay,o.time),o.delay<=e&&h(e-o.delay)}function h(e){var t,r,n,i;if(o.state!==Zf)return d();for(t in c)if(i=c[t],i.name===o.name){if(i.state===Jf)return zf(h);i.state===em?(i.state=rm,i.timer.stop(),i.on.call("interrupt",a,a.__data__,i.index,i.group),delete c[t]):+t{wd(),Uf(),Vf=yd("start","end","cancel","interrupt"),Xf=[],Kf=0,Zf=1,Qf=2,Jf=3,em=4,tm=5,rm=6,mt(qf,"default"),mt(jf,"init"),mt(Wf,"set"),mt(Yf,"get"),mt(Hf,"create")});function im(e,t){var r,n,i,a=e.__transition,s=!0;if(a){for(i in t=null==t?null:t+"",a)(r=a[i]).name!==t?s=!1:(n=Qf{nm(),mt(im,"default")});function sm(e){return this.each(function(){im(this,e)})}var om=e(()=>{am(),mt(sm,"default")});function lm(i,a){var s,o;return function(){var e=Wf(this,i),t=e.tween;if(t!==s)for(var r=0,n=(o=s=t).length;r{nm(),mt(lm,"tweenRemove"),mt(cm,"tweenFunction"),mt(hm,"default"),mt(um,"tweenValue")});function pm(e,t){var r;return("number"==typeof t?U1:t instanceof kg?M1:(r=kg(t))?(t=r,M1):V1)(e,t)}var gm=e(()=>{v1(),vf(),mt(pm,"default")});function fm(e){return function(){this.removeAttribute(e)}}function mm(e){return function(){this.removeAttributeNS(e.space,e.local)}}function ym(t,r,n){var i,a,s=n+"";return function(){var e=this.getAttribute(t);return e===s?null:e===i?a:a=r(i=e,n)}}function vm(t,r,n){var i,a,s=n+"";return function(){var e=this.getAttributeNS(t.space,t.local);return e===s?null:e===i?a:a=r(i=e,n)}}function xm(n,i,a){var s,o,l;return function(){var e,t,r=a(this);return null==r?void this.removeAttribute(n):(e=this.getAttribute(n))===(t=r+"")?null:e===s&&t===o?l:(o=t,l=i(s=e,r))}}function bm(n,i,a){var s,o,l;return function(){var e,t,r=a(this);return null==r?void this.removeAttributeNS(n.space,n.local):(e=this.getAttributeNS(n.space,n.local))===(t=r+"")?null:e===s&&t===o?l:(o=t,l=i(s=e,r))}}function wm(e,t){var r=Td(e),n="transform"===r?pf:pm;return this.attrTween(e,"function"==typeof t?(r.local?bm:xm)(r,n,um(this,"attr."+e,t)):null==t?(r.local?mm:fm)(r):(r.local?vm:ym)(r,n,t))}var km=e(()=>{vf(),dg(),dm(),gm(),mt(fm,"attrRemove"),mt(mm,"attrRemoveNS"),mt(ym,"attrConstant"),mt(vm,"attrConstantNS"),mt(xm,"attrFunction"),mt(bm,"attrFunctionNS"),mt(wm,"default")});function Tm(t,r){return function(e){this.setAttribute(t,r.call(this,e))}}function Em(t,r){return function(e){this.setAttributeNS(t.space,t.local,r.call(this,e))}}function Cm(t,r){var n,i;function e(){var e=r.apply(this,arguments);return n=e!==i?(i=e)&&Em(t,e):n}return mt(e,"tween"),e._value=r,e}function Sm(t,r){var n,i;function e(){var e=r.apply(this,arguments);return n=e!==i?(i=e)&&Tm(t,e):n}return mt(e,"tween"),e._value=r,e}function _m(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=Td(e),this.tween(r,(e.local?Cm:Sm)(e,t))}var Am=e(()=>{dg(),mt(Tm,"attrInterpolate"),mt(Em,"attrInterpolateNS"),mt(Cm,"attrTweenNS"),mt(Sm,"attrTween"),mt(_m,"default")});function Lm(e,t){return function(){jf(this,e).delay=+t.apply(this,arguments)}}function Nm(e,t){return t=+t,function(){jf(this,e).delay=t}}function Im(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Lm:Nm)(t,e)):Yf(this.node(),t).delay}var Rm=e(()=>{nm(),mt(Lm,"delayFunction"),mt(Nm,"delayConstant"),mt(Im,"default")});function Mm(e,t){return function(){Wf(this,e).duration=+t.apply(this,arguments)}}function Dm(e,t){return t=+t,function(){Wf(this,e).duration=t}}function Om(e){var t=this._id;return arguments.length?this.each(("function"==typeof e?Mm:Dm)(t,e)):Yf(this.node(),t).duration}var Pm=e(()=>{nm(),mt(Mm,"durationFunction"),mt(Dm,"durationConstant"),mt(Om,"default")});function Bm(e,t){if("function"!=typeof t)throw new Error;return function(){Wf(this,e).ease=t}}function $m(e){var t=this._id;return arguments.length?this.each(Bm(t,e)):Yf(this.node(),t).ease}var Fm=e(()=>{nm(),mt(Bm,"easeConstant"),mt($m,"default")});function zm(t,r){return function(){var e=r.apply(this,arguments);if("function"!=typeof e)throw new Error;Wf(this,t).ease=e}}function Gm(e){if("function"!=typeof e)throw new Error;return this.each(zm(this._id,e))}var Um=e(()=>{nm(),mt(zm,"easeVarying"),mt(Gm,"default")});function qm(e){"function"!=typeof e&&(e=Ud(e));for(var t=this._groups,r=t.length,n=new Array(r),i=0;i{dg(),Oy(),mt(qm,"default")});function Wm(e){if(e._id!==this._id)throw new Error;for(var t=this._groups,r=e._groups,n=t.length,e=r.length,i=Math.min(n,e),a=new Array(n),s=0;s{Oy(),mt(Wm,"default")});function Hm(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 Vm(r,n,i){var a,s,o=Hm(n)?jf:Wf;return function(){var e=o(this,r),t=e.on;t!==a&&(s=(a=t).copy()).on(n,i),e.on=s}}function Xm(e,t){var r=this._id;return arguments.length<2?Yf(this.node(),r).on.on(e):this.each(Vm(r,e,t))}var Km=e(()=>{nm(),mt(Hm,"start"),mt(Vm,"onFunction"),mt(Xm,"default")});function Zm(r){return function(){var e,t=this.parentNode;for(e in this.__transition)if(+e!==r)return;t&&t.removeChild(this)}}function Qm(){return this.on("end.remove",Zm(this._id))}var Jm=e(()=>{mt(Zm,"removeFunction"),mt(Qm,"default")});function ey(e){var t=this._name,r=this._id;"function"!=typeof e&&(e=Nd(e));for(var n=this._groups,i=n.length,a=new Array(i),s=0;s{dg(),Oy(),nm(),mt(ey,"default")});function ry(e){var t=this._name,r=this._id;"function"!=typeof e&&(e=Bd(e));for(var n=this._groups,i=n.length,a=[],s=[],o=0;o{dg(),Oy(),nm(),mt(ry,"default")});function iy(){return new ay(this._groups,this._parents)}var ay,sy=e(()=>{dg(),ay=cg.prototype.constructor,mt(iy,"default")});function oy(r,n){var i,a,s;return function(){var e=Jp(this,r),t=(this.style.removeProperty(r),Jp(this,r));return e===t?null:e===i&&t===a?s:s=n(i=e,a=t)}}function ly(e){return function(){this.style.removeProperty(e)}}function cy(t,r,n){var i,a,s=n+"";return function(){var e=Jp(this,t);return e===s?null:e===i?a:a=r(i=e,n)}}function hy(n,i,a){var s,o,l;return function(){var e=Jp(this,n),t=a(this),r=t+"";return null==t&&(this.style.removeProperty(n),r=t=Jp(this,n)),e===r?null:e===s&&r===o?l:(o=r,l=i(s=e,t))}}function uy(n,i){var a,s,o,l,c="style."+i,h="end."+c;return function(){var e=Wf(this,n),t=e.on,r=null==e.value[c]?l=l||ly(i):void 0;t===a&&o===r||(s=(a=t).copy()).on(h,o=r),e.on=s}}function dy(e,t,r){var n="transform"==(e+="")?df:pm;return null==t?this.styleTween(e,oy(e,n)).on("end.style."+e,ly(e)):"function"==typeof t?this.styleTween(e,hy(e,n,um(this,"style."+e,t))).each(uy(this._id,e)):this.styleTween(e,cy(e,n,t),r).on("end.style."+e,null)}var py=e(()=>{vf(),dg(),nm(),dm(),gm(),mt(oy,"styleNull"),mt(ly,"styleRemove"),mt(cy,"styleConstant"),mt(hy,"styleFunction"),mt(uy,"styleMaybeRemove"),mt(dy,"default")});function gy(t,r,n){return function(e){this.style.setProperty(t,r.call(this,e),n)}}function fy(t,r,n){var i,a;function e(){var e=r.apply(this,arguments);return i=e!==a?(a=e)&&gy(t,e,n):i}return mt(e,"tween"),e._value=r,e}function my(e,t,r){var n="style."+(e+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==t)return this.tween(n,null);if("function"!=typeof t)throw new Error;return this.tween(n,fy(e,t,r??""))}var yy=e(()=>{mt(gy,"styleInterpolate"),mt(fy,"styleTween"),mt(my,"default")});function vy(e){return function(){this.textContent=e}}function xy(t){return function(){var e=t(this);this.textContent=e??""}}function by(e){return this.tween("text","function"==typeof e?xy(um(this,"text",e)):vy(null==e?"":e+""))}var wy=e(()=>{dm(),mt(vy,"textConstant"),mt(xy,"textFunction"),mt(by,"default")});function ky(t){return function(e){this.textContent=t.call(this,e)}}function Ty(t){var r,n;function e(){var e=t.apply(this,arguments);return r=e!==n?(n=e)&&ky(e):r}return mt(e,"tween"),e._value=t,e}function Ey(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,Ty(e))}var Cy=e(()=>{mt(ky,"textInterpolate"),mt(Ty,"textTween"),mt(Ey,"default")});function Sy(){for(var e=this._name,t=this._id,r=++My,n=this._groups,i=n.length,a=0;a{Oy(),nm(),mt(Sy,"default")});function Ay(){var i,a,s=this,o=s._id,l=s.size();return new Promise(function(e,t){var r={value:t},n={value:mt(function(){0==--l&&e()},"value")};s.each(function(){var e=Wf(this,o),t=e.on;t!==i&&((a=(i=t).copy())._.cancel.push(r),a._.interrupt.push(r),a._.end.push(n)),e.on=a}),0===l&&e()})}var Ly=e(()=>{nm(),mt(Ay,"default")});function Ny(e,t,r,n){this._groups=e,this._parents=t,this._name=r,this._id=n}function Iy(e){return cg().transition(e)}function Ry(){return++My}var My,Dy,Oy=e(()=>{dg(),km(),Am(),Rm(),Pm(),Fm(),Um(),jm(),Ym(),Km(),Jm(),ty(),ny(),sy(),py(),yy(),wy(),Cy(),_y(),dm(),Ly(),My=0,mt(Ny,"Transition"),mt(Iy,"transition"),mt(Ry,"newId"),Dy=cg.prototype,Ny.prototype=Iy.prototype={constructor:Ny,select:ey,selectAll:ry,selectChild:Dy.selectChild,selectChildren:Dy.selectChildren,filter:qm,merge:Wm,selection:iy,transition:Sy,call:Dy.call,nodes:Dy.nodes,node:Dy.node,size:Dy.size,empty:Dy.empty,each:Dy.each,on:Xm,attr:wm,attrTween:_m,style:dy,styleTween:my,text:by,textTween:Ey,remove:Qm,tween:hm,delay:Im,duration:Om,ease:$m,easeVarying:Gm,end:Ay,[Symbol.iterator]:Dy[Symbol.iterator]}});function Py(e){return((e*=2)<=1?e*e*e:(e-=2)*e*e+2)/2}var By=e(()=>{mt(Py,"cubicInOut")}),$y=e(()=>{By()});function Fy(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 zy(e){var t,r;e=e instanceof Ny?(t=e._id,e._name):(t=++My,(r=Gy).time=xf(),null==e?null:e+"");for(var n=this._groups,i=n.length,a=0;a{Oy(),nm(),$y(),Uf(),Gy={time:null,delay:0,duration:250,ease:Py},mt(Fy,"inherit"),mt(zy,"default")}),qy=e(()=>{dg(),om(),Uy(),cg.prototype.interrupt=sm,cg.prototype.transition=zy}),jy=e(()=>{qy()}),Wy=e(()=>{}),Yy=e(()=>{}),Hy=e(()=>{});function Vy(e){return[+e[0],+e[1]]}function Xy(e){return[Vy(e[0]),Vy(e[1])]}function Ky(e){return{type:e}}var Zy,Qy,Jy,e2=e(()=>{jy(),Wy(),Yy(),Hy(),{abs:Zy,max:Qy,min:Jy}=Math,mt(Vy,"number1"),mt(Xy,"number2"),["w","e"].map(Ky),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(Ky),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(Ky),mt(function(e){return null==e?null:Xy(e)},"input"),mt(function(e){return e},"output"),mt(Ky,"type")}),t2=e(()=>{e2()});function r2(r){this._+=r[0];for(let e=1,t=r.length;e{a2=Math.PI,l2=(s2=2*a2)-(o2=1e-6),mt(r2,"append"),mt(n2,"appendRound"),c2=class{static{mt(this,"Path")}constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==e?r2:n2(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,n){this._append`Q${+e},${+t},${this._x1=+r},${this._y1=+n}`}bezierCurveTo(e,t,r,n,i,a){this._append`C${+e},${+t},${+r},${+n},${this._x1=+i},${this._y1=+a}`}arcTo(e,t,r,n,i){if(e=+e,t=+t,r=+r,n=+n,(i=+i)<0)throw new Error("negative radius: "+i);var a,s,o=this._x1,l=this._y1,c=r-e,h=n-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&&i?(s=c*c+h*h,n=(r-=o)*r+(o=n-l)*o,l=Math.sqrt(s),a=Math.sqrt(p),p=(s=i*Math.tan((a2-Math.acos((s+p-n)/(2*l*a)))/2))/a,n=s/l,Math.abs(p-1)>o2&&this._append`L${e+p*u},${t+p*d}`,this._append`A${i},${i},0,0,${+(u*oo2||Math.abs(this._y1-c)>o2)&&this._append`L${l},${c}`,r&&((a=a<0?a%s2+s2:a)>l2?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{h2()}),d2=e(()=>{}),p2=e(()=>{}),g2=e(()=>{}),f2=e(()=>{}),m2=e(()=>{}),y2=e(()=>{}),v2=e(()=>{});function x2(e){return 1e21<=Math.abs(e=Math.round(e))?e.toLocaleString("en").replace(/,/g,""):e.toString(10)}function b2(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 w2=e(()=>{mt(x2,"default"),mt(b2,"formatDecimalParts")});function k2(e){return(e=b2(Math.abs(e)))?e[1]:NaN}var T2=e(()=>{w2(),mt(k2,"default")});function E2(o,l){return function(e,t){for(var r=e.length,n=[],i=0,a=o[0],s=0;0t));)a=o[i=(i+1)%o.length];return n.reverse().join(l)}}var C2=e(()=>{mt(E2,"default")});function S2(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}var _2=e(()=>{mt(S2,"default")});function A2(e){var t;if(t=N2.exec(e))return new L2({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 L2(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 N2,I2=e(()=>{N2=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i,mt(A2,"formatSpecifier"),A2.prototype=L2.prototype,mt(L2,"FormatSpecifier"),L2.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 R2(e){e:for(var t,r=e.length,n=1,i=-1;n{mt(R2,"default")});function D2(e,t){var r,n,i=b2(e,t);return i?(r=i[0],(i=(i=i[1])-(O2=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1)===(n=r.length)?r:n{w2(),mt(D2,"default")});function B2(e,t){var r;return(t=b2(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 $2,F2=e(()=>{w2(),mt(B2,"default")}),z2=e(()=>{w2(),P2(),F2(),$2={"%":mt((e,t)=>(100*e).toFixed(t),"%"),b:mt(e=>Math.round(e).toString(2),"b"),c:mt(e=>e+"","c"),d:x2,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)=>B2(100*e,t),"p"),r:B2,s:D2,X:mt(e=>Math.round(e).toString(16).toUpperCase(),"X"),x:mt(e=>Math.round(e).toString(16),"x")}});function G2(e){return e}var U2=e(()=>{mt(G2,"default")});function q2(e){var k=void 0===e.grouping||void 0===e.thousands?G2:E2(j2.call(e.grouping,Number),e.thousands+""),n=void 0===e.currency?"":e.currency[0]+"",i=void 0===e.currency?"":e.currency[1]+"",T=void 0===e.decimal?".":e.decimal+"",E=void 0===e.numerals?G2:S2(j2.call(e.numerals,String)),a=void 0===e.percent?"%":e.percent+"",C=void 0===e.minus?"−":e.minus+"",S=void 0===e.nan?"NaN":e.nan+"";function s(e){var c=(e=A2(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"):$2[y]||(void 0===f&&(f=12),m=!0,y="g"),(d||"0"===c&&"="===h)&&(d=!0,c="0",h="="),"$"===t?n:"#"===t&&/[boxX]/.test(y)?"0"+y.toLowerCase():""),x="$"===t?i:/[%p]/.test(y)?a:"",b=$2[y],w=/[defgprs%]/.test(y);function r(e){var t,r,n,i=v,a=x;if("c"===y)a=b(e)+a,e="";else{var s=(e=+e)<0||1/e<0;if(e=isNaN(e)?S:b(Math.abs(e),f),m&&(e=R2(e)),i=((s=(!s||0!=+e||"+"===u)&&s)?"("===u?u:C:"-"===u||"("===u?"":u)+i,a=("s"===y?W2[8+O2/3]:"")+a+(s&&"("===u?")":""),w)for(t=-1,r=e.length;++t>1)+i+e+a+l.slice(o);break;default:e=l+i+e+a}return E(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=A2(e)).type="f",e)),e=3*Math.max(-8,Math.min(8,Math.floor(k2(t)/3))),n=Math.pow(10,-e),i=W2[8+e/3];return function(e){return r(n*e)+i}}return mt(s,"newFormat"),mt(t,"formatPrefix"),{format:s,formatPrefix:t}}var j2,W2,Y2=e(()=>{T2(),C2(),_2(),I2(),M2(),z2(),P2(),U2(),j2=Array.prototype.map,W2=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],mt(q2,"default")});function H2(e){return V2=q2(e),X2=V2.format,K2=V2.formatPrefix,V2}var V2,X2,K2,Z2=e(()=>{Y2(),H2({thousands:",",grouping:[3],currency:["$",""]}),mt(H2,"defaultLocale")});function Q2(e){return Math.max(0,-k2(Math.abs(e)))}var J2=e(()=>{T2(),mt(Q2,"default")});function ev(e,t){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(k2(t)/3)))-k2(Math.abs(e)))}var tv=e(()=>{T2(),mt(ev,"default")});function rv(e,t){return e=Math.abs(e),t=Math.abs(t)-e,Math.max(0,k2(t)-k2(e))+1}var nv=e(()=>{T2(),mt(rv,"default")}),iv=e(()=>{Z2(),I2(),J2(),tv(),nv()}),av=e(()=>{});function sv(e){var t=0,r=e.children,n=r&&r.length;if(n)for(;0<=--n;)t+=r[n].value;else t=1;e.value=t}function ov(){return this.eachAfter(sv)}var lv=e(()=>{mt(sv,"count"),mt(ov,"default")});function cv(e,t){let r=-1;for(var n of this)e.call(t,n,++r,this);return this}var hv=e(()=>{mt(cv,"default")});function uv(e,t){for(var r,n,i,a=[this],s=-1;r=a.pop();)if(e.call(t,r,++s,this),n=r.children)for(i=n.length-1;0<=i;--i)a.push(n[i]);return this}var dv=e(()=>{mt(uv,"default")});function pv(e,t){for(var r,n,i,a=this,s=[a],o=[],l=-1;a=s.pop();)if(o.push(a),r=a.children)for(n=0,i=r.length;n{mt(pv,"default")});function fv(e,t){let r=-1;for(var n of this)if(e.call(t,n,++r,this))return n}var mv=e(()=>{mt(fv,"default")});function yv(i){return this.eachAfter(function(e){for(var t=+i(e.data)||0,r=e.children,n=r&&r.length;0<=--n;)t+=r[n].value;e.value=t})}var vv=e(()=>{mt(yv,"default")});function xv(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}var bv=e(()=>{mt(xv,"default")});function wv(e){for(var t=this,r=kv(t,e),n=[t];t!==r;)t=t.parent,n.push(t);for(var i=n.length;e!==r;)n.splice(i,0,e),e=e.parent;return n}function kv(e,t){if(e===t)return e;var r=e.ancestors(),n=t.ancestors(),i=null;for(e=r.pop(),t=n.pop();e===t;)i=e,e=r.pop(),t=n.pop();return i}var Tv=e(()=>{mt(wv,"default"),mt(kv,"leastCommonAncestor")});function Ev(){for(var e=this,t=[e];e=e.parent;)t.push(e);return t}var Cv=e(()=>{mt(Ev,"default")});function Sv(){return Array.from(this)}var _v=e(()=>{mt(Sv,"default")});function Av(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}var Lv=e(()=>{mt(Av,"default")});function Nv(){var t=this,r=[];return t.each(function(e){e!==t&&r.push({source:e.parent,target:e})}),r}var Iv=e(()=>{mt(Nv,"default")});function*Rv(){var e,t,r,n,i,a=[this];do{for(t=a.reverse(),a=[];e=t.pop();)if(yield e,r=e.children)for(n=0,i=r.length;n{mt(Rv,"default")});function Dv(e,t){e instanceof Map?(e=[void 0,e],void 0===t&&(t=Bv)):void 0===t&&(t=Pv);for(var r,n,i,a,s,o=[e=new zv(e)];r=o.pop();)if((i=t(r.data))&&(s=(i=Array.from(i)).length))for(r.children=i,a=s-1;0<=a;--a)o.push(n=i[a]=new zv(i[a])),n.parent=r,n.depth=r.depth+1;return e.eachBefore(Fv)}function Ov(){return Dv(this).eachBefore($v)}function Pv(e){return e.children}function Bv(e){return Array.isArray(e)?e[1]:null}function $v(e){void 0!==e.data.value&&(e.value=e.data.value),e.data=e.data.data}function Fv(e){for(var t=0;e.height=t,(e=e.parent)&&e.height<++t;);}function zv(e){this.data=e,this.depth=this.height=0,this.parent=null}var Gv=e(()=>{lv(),hv(),dv(),gv(),mv(),vv(),bv(),Tv(),Cv(),_v(),Lv(),Iv(),Mv(),mt(Dv,"hierarchy"),mt(Ov,"node_copy"),mt(Pv,"objectChildren"),mt(Bv,"mapChildren"),mt($v,"copyData"),mt(Fv,"computeHeight"),mt(zv,"Node"),zv.prototype=Dv.prototype={constructor:zv,count:ov,each:cv,eachAfter:pv,eachBefore:uv,find:fv,sum:yv,sort:xv,path:wv,ancestors:Ev,descendants:Sv,leaves:Av,links:Nv,copy:Ov,[Symbol.iterator]:Rv}});function Uv(e){if("function"!=typeof e)throw new Error;return e}var qv=e(()=>{mt(Uv,"required")});function jv(){return 0}function Wv(e){return function(){return e}}var Yv=e(()=>{mt(jv,"constantZero"),mt(Wv,"default")});function Hv(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 Vv=e(()=>{mt(Hv,"default")});function Xv(e,t,r,n,i){for(var a,s=e.children,o=-1,l=s.length,c=e.value&&(n-t)/e.value;++o{mt(Xv,"default")});function Zv(e,t,r,n,i){for(var a,s=e.children,o=-1,l=s.length,c=e.value&&(i-r)/e.value;++o{mt(Zv,"default")});function Jv(e,t,r,n,i,a){for(var s,o,l,c,h,u,d,p,g,f,m,y=[],v=t.children,x=0,b=0,w=v.length,k=t.value;x{Kv(),Qv(),ex=(1+Math.sqrt(5))/2,mt(Jv,"squarifyRatio"),tx=mt(function t(a){function e(e,t,r,n,i){Jv(a,e,t,r,n,i)}return mt(e,"squarify"),e.ratio=function(e){return t(1<(e=+e)?e:1)},e},"custom")(ex)});function nx(){var s=tx,t=!1,r=1,n=1,o=[0],l=jv,c=jv,h=jv,u=jv,d=jv;function i(e){return e.x0=e.y0=0,e.x1=r,e.y1=n,e.eachBefore(a),o=[0],t&&e.eachBefore(Hv),e}function a(e){var t=o[e.depth],r=e.x0+t,n=e.y0+t,i=e.x1-t,a=e.y1-t;i{Vv(),rx(),qv(),Yv(),mt(nx,"default")}),ax=e(()=>{Gv(),ix()}),sx=e(()=>{}),ox=e(()=>{});function lx(e,t){switch(arguments.length){case 0:break;case 1:this.range(e);break;default:this.range(t).domain(e)}return this}var cx=e(()=>{mt(lx,"initRange")});function hx(){var r=new Du,n=[],i=[],a=ux;function s(e){let t=r.get(e);if(void 0===t){if(a!==ux)return a;r.set(e,t=n.push(e)-1)}return i[t%i.length]}return mt(s,"scale"),s.domain=function(e){if(!arguments.length)return n.slice();n=[],r=new Du;for(var t of e)r.has(t)||r.set(t,n.push(t)-1);return s},s.range=function(e){return arguments.length?(i=Array.from(e),s):i.slice()},s.unknown=function(e){return arguments.length?(a=e,s):a},s.copy=function(){return hx(n,i).unknown(a)},lx.apply(s,arguments),s}var ux,dx=e(()=>{Ku(),cx(),ux=Symbol("implicit"),mt(hx,"ordinal")});function px(){var i,a,e=hx().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{Ku(),cx(),dx(),mt(px,"band")});function fx(e){return function(){return e}}var mx=e(()=>{mt(fx,"constants")});function yx(e){return+e}var vx=e(()=>{mt(yx,"number")});function xx(e){return e}function bx(t,r){return(r-=t=+t)?function(e){return(e-t)/r}:fx(isNaN(r)?NaN:.5)}function wx(t,r){var e;return r{Ku(),vf(),mx(),vx(),_x=[0,1],mt(xx,"identity"),mt(bx,"normalize"),mt(wx,"clamper"),mt(kx,"bimap"),mt(Tx,"polymap"),mt(Ex,"copy"),mt(Cx,"transformer"),mt(Sx,"continuous")});function Lx(e,t,r,n){var i,a=Fu(e,t,r);switch((n=A2(n??",f")).type){case"s":var s=Math.max(Math.abs(e),Math.abs(t));return null!=n.precision||isNaN(i=ev(a,s))||(n.precision=i),K2(n,s);case"":case"e":case"g":case"p":case"r":null!=n.precision||isNaN(i=rv(a,Math.max(Math.abs(e),Math.abs(t))))||(n.precision=i-("e"===n.type));break;case"f":case"%":null!=n.precision||isNaN(i=Q2(a))||(n.precision=i-2*("%"===n.type))}return X2(n)}var Nx=e(()=>{Ku(),iv(),mt(Lx,"tickFormat")});function Ix(c){var h=c.domain;return c.ticks=function(e){var t=h();return Bu(t[0],t[t.length-1],e??10)},c.tickFormat=function(e,t){var r=h();return Lx(r[0],r[r.length-1],e??10,t)},c.nice=function(e){null==e&&(e=10);var t,r,n=h(),i=0,a=n.length-1,s=n[i],o=n[a],l=10;for(o{Ku(),Ax(),cx(),Nx(),mt(Ix,"linearish"),mt(Rx,"linear")});function Dx(e,t){var r,n=0,i=(e=e.slice()).length-1,a=e[n],s=e[i];return s{mt(Dx,"nice")});function Px(a,s,r,n){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 n,i=[];if(e=o.ceil(e),r=null==r?1:Math.floor(r),ePx(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)=>(Bx.setTime(+e),$x.setTime(+t),a(Bx),a($x),Math.floor(r(Bx,$x))),o.every=t=>(t=Math.floor(t),isFinite(t)&&0n(e)%t==0:e=>o.count(0,e)%t==0):o:null)),o}var Bx,$x,Fx,zx,Gx,Ux,qx,jx,Wx,Yx,Hx,Vx=e(()=>{Bx=new Date,$x=new Date,mt(Px,"timeInterval")}),Xx=e(()=>{Vx(),(Fx=Px(()=>{},(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):Fx:null)}),Kx=e(()=>{Vx(),(zx=Px(e=>{e.setTime(e-e.getMilliseconds())},(e,t)=>{e.setTime(+e+1e3*t)},(e,t)=>(t-e)/1e3,e=>e.getUTCSeconds())).range}),Zx=e(()=>{Vx(),(Gx=Px(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,(Ux=Px(e=>{e.setUTCSeconds(0,0)},(e,t)=>{e.setTime(+e+6e4*t)},(e,t)=>(t-e)/6e4,e=>e.getUTCMinutes())).range}),Qx=e(()=>{Vx(),(qx=Px(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,(jx=Px(e=>{e.setUTCMinutes(0,0,0)},(e,t)=>{e.setTime(+e+36e5*t)},(e,t)=>(t-e)/36e5,e=>e.getUTCHours())).range}),Jx=e(()=>{Vx(),(Wx=Px(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,(Yx=Px(e=>{e.setUTCHours(0,0,0,0)},(e,t)=>{e.setUTCDate(e.getUTCDate()+t)},(e,t)=>(t-e)/864e5,e=>e.getUTCDate()-1)).range,(Hx=Px(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 eb(t){return Px(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 tb(t){return Px(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 rb,nb,ib,ab,sb,ob,lb,cb,hb,ub,db,pb,gb,fb,mb,yb,vb,xb,bb=e(()=>{Vx(),mt(eb,"timeWeekday"),rb=eb(0),nb=eb(1),ib=eb(2),ab=eb(3),sb=eb(4),ob=eb(5),lb=eb(6),rb.range,nb.range,ib.range,ab.range,sb.range,ob.range,lb.range,mt(tb,"utcWeekday"),cb=tb(0),hb=tb(1),ub=tb(2),db=tb(3),pb=tb(4),gb=tb(5),fb=tb(6),cb.range,hb.range,ub.range,db.range,pb.range,gb.range,fb.range}),wb=e(()=>{Vx(),(mb=Px(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,(yb=Px(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}),kb=e(()=>{Vx(),(vb=Px(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,(xb=Px(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 Tb(a,e,t,r,n,i){let s=[[zx,1,1e3],[zx,5,5e3],[zx,15,15e3],[zx,30,3e4],[i,1,6e4],[i,5,3e5],[i,15,9e5],[i,30,18e5],[n,1,36e5],[n,3,108e5],[n,6,216e5],[n,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 n=te).right(s,n);return i===s.length?a.every(Fu(e/31536e6,t/31536e6,r)):0===i?Fx.every(Math.max(Fu(e,t,r),1)):([e,t]=s[n/s[i-1][2]{Ku(),Xx(),Kx(),Zx(),Qx(),Jx(),bb(),wb(),kb(),mt(Tb,"ticker"),[Eb,Cb]=Tb(xb,yb,cb,Hx,jx,Ux),[Sb,_b]=Tb(vb,mb,rb,Wx,qx,Gx)}),Lb=e(()=>{Xx(),Kx(),Zx(),Qx(),Jx(),bb(),wb(),kb(),Ab()});function Nb(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 Ib(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 Rb(e,t,r){return{y:e,m:t,d:r,H:0,M:0,S:0,L:0}}function Mb(e){var n=e.dateTime,i=e.date,a=e.time,t=e.periods,r=e.days,s=e.shortDays,o=e.months,l=e.shortMonths,c=Pb(t),h=Bb(t),P=Pb(r),B=Bb(r),$=Pb(s),F=Bb(s),z=Pb(o),G=Bb(o),U=Pb(l),q=Bb(l),u={a:E,A:C,b:S,B:_,c:null,d:i4,e:i4,f:c4,g:b4,G:k4,H:a4,I:s4,j:o4,L:l4,m:h4,M:u4,p:A,q:L,Q:W4,s:Y4,S:d4,u:p4,U:g4,V:m4,w:y4,W:v4,x:null,X:null,y:x4,Y:w4,Z:T4,"%":j4},d={a:N,A:I,b:R,B:M,c:null,d:E4,e:E4,f:L4,g:z4,G:U4,H:C4,I:S4,j:_4,L:A4,m:N4,M:I4,p:D,q:O,Q:W4,s:Y4,S:R4,u:M4,U:D4,V:P4,w:B4,W:$4,x:null,X:null,y:F4,Y:G4,Z:q4,"%":j4},j={a:y,A:v,b:x,B:b,c:w,d:Vb,e:Vb,f:e4,g:jb,G:qb,H:Kb,I:Kb,j:Xb,L:Jb,m:Hb,M:Zb,p:m,q:Yb,Q:r4,s:n4,S:Qb,u:Fb,U:zb,V:Gb,w:$b,W:Ub,x:k,X:T,y:jb,Y:qb,Z:Wb,"%":t4};function p(l,c){return function(e){var t,r,n,i=[],a=-1,s=0,o=l.length;for(e instanceof Date||(e=new Date(+e));++a[e.toLowerCase(),t]))}function $b(e,t,r){return(t=V4.exec(t.slice(r,r+1)))?(e.w=+t[0],r+t[0].length):-1}function Fb(e,t,r){return(t=V4.exec(t.slice(r,r+1)))?(e.u=+t[0],r+t[0].length):-1}function zb(e,t,r){return(t=V4.exec(t.slice(r,r+2)))?(e.U=+t[0],r+t[0].length):-1}function Gb(e,t,r){return(t=V4.exec(t.slice(r,r+2)))?(e.V=+t[0],r+t[0].length):-1}function Ub(e,t,r){return(t=V4.exec(t.slice(r,r+2)))?(e.W=+t[0],r+t[0].length):-1}function qb(e,t,r){return(t=V4.exec(t.slice(r,r+4)))?(e.y=+t[0],r+t[0].length):-1}function jb(e,t,r){return(t=V4.exec(t.slice(r,r+2)))?(e.y=+t[0]+(68<+t[0]?1900:2e3),r+t[0].length):-1}function Wb(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 Yb(e,t,r){return(t=V4.exec(t.slice(r,r+1)))?(e.q=3*t[0]-3,r+t[0].length):-1}function Hb(e,t,r){return(t=V4.exec(t.slice(r,r+2)))?(e.m=t[0]-1,r+t[0].length):-1}function Vb(e,t,r){return(t=V4.exec(t.slice(r,r+2)))?(e.d=+t[0],r+t[0].length):-1}function Xb(e,t,r){return(t=V4.exec(t.slice(r,r+3)))?(e.m=0,e.d=+t[0],r+t[0].length):-1}function Kb(e,t,r){return(t=V4.exec(t.slice(r,r+2)))?(e.H=+t[0],r+t[0].length):-1}function Zb(e,t,r){return(t=V4.exec(t.slice(r,r+2)))?(e.M=+t[0],r+t[0].length):-1}function Qb(e,t,r){return(t=V4.exec(t.slice(r,r+2)))?(e.S=+t[0],r+t[0].length):-1}function Jb(e,t,r){return(t=V4.exec(t.slice(r,r+3)))?(e.L=+t[0],r+t[0].length):-1}function e4(e,t,r){return(t=V4.exec(t.slice(r,r+6)))?(e.L=Math.floor(t[0]/1e3),r+t[0].length):-1}function t4(e,t,r){return(t=X4.exec(t.slice(r,r+1)))?r+t[0].length:-1}function r4(e,t,r){return(t=V4.exec(t.slice(r)))?(e.Q=+t[0],r+t[0].length):-1}function n4(e,t,r){return(t=V4.exec(t.slice(r)))?(e.s=+t[0],r+t[0].length):-1}function i4(e,t){return Db(e.getDate(),t,2)}function a4(e,t){return Db(e.getHours(),t,2)}function s4(e,t){return Db(e.getHours()%12||12,t,2)}function o4(e,t){return Db(1+Wx.count(vb(e),e),t,3)}function l4(e,t){return Db(e.getMilliseconds(),t,3)}function c4(e,t){return l4(e,t)+"000"}function h4(e,t){return Db(e.getMonth()+1,t,2)}function u4(e,t){return Db(e.getMinutes(),t,2)}function d4(e,t){return Db(e.getSeconds(),t,2)}function p4(e){return 0===(e=e.getDay())?7:e}function g4(e,t){return Db(rb.count(vb(e)-1,e),t,2)}function f4(e){var t=e.getDay();return 4<=t||0===t?sb(e):sb.ceil(e)}function m4(e,t){return e=f4(e),Db(sb.count(vb(e),e)+(4===vb(e).getDay()),t,2)}function y4(e){return e.getDay()}function v4(e,t){return Db(nb.count(vb(e)-1,e),t,2)}function x4(e,t){return Db(e.getFullYear()%100,t,2)}function b4(e,t){return Db((e=f4(e)).getFullYear()%100,t,2)}function w4(e,t){return Db(e.getFullYear()%1e4,t,4)}function k4(e,t){var r=e.getDay();return Db((e=4<=r||0===r?sb(e):sb.ceil(e)).getFullYear()%1e4,t,4)}function T4(e){return(0<(e=e.getTimezoneOffset())?"-":(e*=-1,"+"))+Db(e/60|0,"0",2)+Db(e%60,"0",2)}function E4(e,t){return Db(e.getUTCDate(),t,2)}function C4(e,t){return Db(e.getUTCHours(),t,2)}function S4(e,t){return Db(e.getUTCHours()%12||12,t,2)}function _4(e,t){return Db(1+Yx.count(xb(e),e),t,3)}function A4(e,t){return Db(e.getUTCMilliseconds(),t,3)}function L4(e,t){return A4(e,t)+"000"}function N4(e,t){return Db(e.getUTCMonth()+1,t,2)}function I4(e,t){return Db(e.getUTCMinutes(),t,2)}function R4(e,t){return Db(e.getUTCSeconds(),t,2)}function M4(e){return 0===(e=e.getUTCDay())?7:e}function D4(e,t){return Db(cb.count(xb(e)-1,e),t,2)}function O4(e){var t=e.getUTCDay();return 4<=t||0===t?pb(e):pb.ceil(e)}function P4(e,t){return e=O4(e),Db(pb.count(xb(e),e)+(4===xb(e).getUTCDay()),t,2)}function B4(e){return e.getUTCDay()}function $4(e,t){return Db(hb.count(xb(e)-1,e),t,2)}function F4(e,t){return Db(e.getUTCFullYear()%100,t,2)}function z4(e,t){return Db((e=O4(e)).getUTCFullYear()%100,t,2)}function G4(e,t){return Db(e.getUTCFullYear()%1e4,t,4)}function U4(e,t){var r=e.getUTCDay();return Db((e=4<=r||0===r?pb(e):pb.ceil(e)).getUTCFullYear()%1e4,t,4)}function q4(){return"+0000"}function j4(){return"%"}function W4(e){return+e}function Y4(e){return Math.floor(+e/1e3)}var H4,V4,X4,K4,Z4=e(()=>{Lb(),mt(Nb,"localDate"),mt(Ib,"utcDate"),mt(Rb,"newDate"),mt(Mb,"formatLocale"),H4={"-":"",_:" ",0:"0"},V4=/^\s*\d+/,X4=/^%/,K4=/[\\^$*+?|[\]().{}]/g,mt(Db,"pad"),mt(Ob,"requote"),mt(Pb,"formatRe"),mt(Bb,"formatLookup"),mt($b,"parseWeekdayNumberSunday"),mt(Fb,"parseWeekdayNumberMonday"),mt(zb,"parseWeekNumberSunday"),mt(Gb,"parseWeekNumberISO"),mt(Ub,"parseWeekNumberMonday"),mt(qb,"parseFullYear"),mt(jb,"parseYear"),mt(Wb,"parseZone"),mt(Yb,"parseQuarter"),mt(Hb,"parseMonthNumber"),mt(Vb,"parseDayOfMonth"),mt(Xb,"parseDayOfYear"),mt(Kb,"parseHour24"),mt(Zb,"parseMinutes"),mt(Qb,"parseSeconds"),mt(Jb,"parseMilliseconds"),mt(e4,"parseMicroseconds"),mt(t4,"parseLiteralPercent"),mt(r4,"parseUnixTimestamp"),mt(n4,"parseUnixTimestampSeconds"),mt(i4,"formatDayOfMonth"),mt(a4,"formatHour24"),mt(s4,"formatHour12"),mt(o4,"formatDayOfYear"),mt(l4,"formatMilliseconds"),mt(c4,"formatMicroseconds"),mt(h4,"formatMonthNumber"),mt(u4,"formatMinutes"),mt(d4,"formatSeconds"),mt(p4,"formatWeekdayNumberMonday"),mt(g4,"formatWeekNumberSunday"),mt(f4,"dISO"),mt(m4,"formatWeekNumberISO"),mt(y4,"formatWeekdayNumberSunday"),mt(v4,"formatWeekNumberMonday"),mt(x4,"formatYear"),mt(b4,"formatYearISO"),mt(w4,"formatFullYear"),mt(k4,"formatFullYearISO"),mt(T4,"formatZone"),mt(E4,"formatUTCDayOfMonth"),mt(C4,"formatUTCHour24"),mt(S4,"formatUTCHour12"),mt(_4,"formatUTCDayOfYear"),mt(A4,"formatUTCMilliseconds"),mt(L4,"formatUTCMicroseconds"),mt(N4,"formatUTCMonthNumber"),mt(I4,"formatUTCMinutes"),mt(R4,"formatUTCSeconds"),mt(M4,"formatUTCWeekdayNumberMonday"),mt(D4,"formatUTCWeekNumberSunday"),mt(O4,"UTCdISO"),mt(P4,"formatUTCWeekNumberISO"),mt(B4,"formatUTCWeekdayNumberSunday"),mt($4,"formatUTCWeekNumberMonday"),mt(F4,"formatUTCYear"),mt(z4,"formatUTCYearISO"),mt(G4,"formatUTCFullYear"),mt(U4,"formatUTCFullYearISO"),mt(q4,"formatUTCZone"),mt(j4,"formatLiteralPercent"),mt(W4,"formatUnixTimestamp"),mt(Y4,"formatUnixTimestampSeconds")});function Q4(e){return J4=Mb(e),e5=J4.format,J4}var J4,e5,t5=e(()=>{Z4(),Q4({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(Q4,"defaultLocale")}),r5=e(()=>{t5()});function n5(e){return new Date(e)}function i5(e){return e instanceof Date?+e:+new Date(+e)}function a5(r,n,t,i,a,s,o,l,c,h){var u=Sx(),d=u.invert,p=u.domain,g=h(".%L"),f=h(":%S"),m=h("%I:%M"),y=h("%I %p"),v=h("%a %d"),x=h("%b %d"),b=h("%B"),w=h("%Y");function k(e){return(c(e){Lb(),r5(),Ax(),cx(),Ox(),mt(n5,"date"),mt(i5,"number"),mt(a5,"calendar"),mt(s5,"time")}),l5=e(()=>{gx(),Mx(),dx(),o5()});function c5(e){for(var t=e.length/6|0,r=new Array(t),n=0;n{mt(c5,"default")}),d5=e(()=>{u5(),h5=c5("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab")}),p5=e(()=>{d5()});function g5(e){return mt(function(){return e},"constant")}var f5=e(()=>{mt(g5,"default")});function m5(e){return 1{v5=Math.abs,x5=Math.atan2,b5=Math.cos,w5=Math.max,k5=Math.min,T5=Math.sin,E5=Math.sqrt,C5=1e-12,_5=(S5=Math.PI)/2,A5=2*S5,mt(m5,"acos"),mt(y5,"asin")});function N5(r){let n=3;return r.digits=function(e){if(!arguments.length)return n;if(null==e)n=null;else{var t=Math.floor(e);if(!(0<=t))throw new RangeError("invalid digits: "+e);n=t}return r},()=>new c2(n)}var I5=e(()=>{u2(),mt(N5,"withPath")});function R5(e){return e.innerRadius}function M5(e){return e.outerRadius}function D5(e){return e.startAngle}function O5(e){return e.endAngle}function P5(e){return e&&e.padAngle}function B5(e,t,r,n,i,a,s,o){var l=(o-=a)*(r-=e)-(s-=i)*(n-=t);if(!(l*lC5?(n+=u*=_?1:-1,i-=u):(a=0,n=i=(E+C)/2),(s-=2*d)>C5?(t+=d*=_?1:-1,r-=d):(s=0,t=r=(E+C)/2)),h=T*b5(t),u=T*T5(t),d=k*b5(i),E=k*T5(i),C5{f5(),L5(),I5(),mt(R5,"arcInnerRadius"),mt(M5,"arcOuterRadius"),mt(D5,"arcStartAngle"),mt(O5,"arcEndAngle"),mt(P5,"arcPadAngle"),mt(B5,"intersect"),mt($5,"cornerTangents"),mt(F5,"default")});function G5(e){return"object"==typeof e&&"length"in e?e:Array.from(e)}var U5=e(()=>{Array.prototype.slice,mt(G5,"default")});function q5(e){this._context=e}function j5(e){return new q5(e)}var W5=e(()=>{mt(q5,"Linear"),q5.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(j5,"default")});function Y5(e){return e[0]}function H5(e){return e[1]}var V5=e(()=>{mt(Y5,"x"),mt(H5,"y")});function X5(s,o){var l=g5(!0),c=null,h=j5,u=null,d=N5(t);function t(e){var t,r,n,i=(e=G5(e)).length,a=!1;for(null==c&&(u=h(n=d())),t=0;t<=i;++t)!(t{U5(),f5(),W5(),I5(),V5(),mt(X5,"default")});function Z5(e,t){return t{mt(Z5,"default")});function J5(e){return e}var e3=e(()=>{mt(J5,"default")});function t3(){var p=J5,g=Z5,f=null,m=g5(0),y=g5(A5),v=g5(0);function t(r){for(var e,t,n,i=(r=G5(r)).length,a=0,s=new Array(i),o=new Array(i),l=+m.apply(this,arguments),c=Math.min(A5,Math.max(-A5,y.apply(this,arguments)-l)),h=Math.min(Math.abs(c)/i,v.apply(this,arguments)),u=h*(c<0?-1:1),d=0;d{U5(),f5(),Q5(),e3(),L5(),mt(t3,"default")});function n3(e){return new a3(e,!0)}function i3(e){return new a3(e,!1)}var a3,s3=e(()=>{a3=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(n3,"bumpX"),mt(i3,"bumpY")});function o3(){}var l3=e(()=>{mt(o3,"default")});function c3(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 h3(e){this._context=e}function u3(e){return new h3(e)}var d3=e(()=>{mt(c3,"point"),mt(h3,"Basis"),h3.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:c3(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:c3(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")},mt(u3,"default")});function p3(e){this._context=e}function g3(e){return new p3(e)}var f3=e(()=>{l3(),d3(),mt(p3,"BasisClosed"),p3.prototype={areaStart:o3,areaEnd:o3,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:c3(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")},mt(g3,"default")});function m3(e){this._context=e}function y3(e){return new m3(e)}var v3=e(()=>{d3(),mt(m3,"BasisOpen"),m3.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,n=(this._y0+4*this._y1+t)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:c3(this,e,t)}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t},"point")},mt(y3,"default")});function x3(e,t){this._basis=new h3(e),this._beta=t}var b3,w3=e(()=>{d3(),mt(x3,"Bundle"),x3.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(k3,"point"),mt(T3,"Cardinal"),T3.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:k3(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:k3(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")},E3=mt(function t(r){function e(e){return new T3(e,r)}return mt(e,"cardinal"),e.tension=function(e){return t(+e)},e},"custom")(0)});function S3(e,t){this._context=e,this._k=(1-t)/6}var _3,A3=e(()=>{l3(),C3(),mt(S3,"CardinalClosed"),S3.prototype={areaStart:o3,areaEnd:o3,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:k3(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")},_3=mt(function t(r){function e(e){return new S3(e,r)}return mt(e,"cardinal"),e.tension=function(e){return t(+e)},e},"custom")(0)});function L3(e,t){this._context=e,this._k=(1-t)/6}var N3,I3=e(()=>{C3(),mt(L3,"CardinalOpen"),L3.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:k3(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 L3(e,r)}return mt(e,"cardinal"),e.tension=function(e){return t(+e)},e},"custom")(0)});function R3(e,t,r){var n,i,a=e._x1,s=e._y1,o=e._x2,l=e._y2;C5{L5(),C3(),mt(R3,"point"),mt(M3,"CatmullRom"),M3.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,n;switch(e=+e,t=+t,this._point&&(r=this._x2-e,n=this._y2-t,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:R3(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")},D3=mt(function t(r){function e(e){return r?new M3(e,r):new T3(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 B3,$3=e(()=>{A3(),l3(),O3(),mt(P3,"CatmullRomClosed"),P3.prototype={areaStart:o3,areaEnd:o3,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,n;switch(e=+e,t=+t,this._point&&(r=this._x2-e,n=this._y2-t,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:R3(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")},B3=mt(function t(r){function e(e){return r?new P3(e,r):new S3(e,0)}return mt(e,"catmullRom"),e.alpha=function(e){return t(+e)},e},"custom")(.5)});function F3(e,t){this._context=e,this._alpha=t}var z3,G3=e(()=>{I3(),O3(),mt(F3,"CatmullRomOpen"),F3.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,n;switch(e=+e,t=+t,this._point&&(r=this._x2-e,n=this._y2-t,this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,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:R3(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")},z3=mt(function t(r){function e(e){return r?new F3(e,r):new L3(e,0)}return mt(e,"catmullRom"),e.alpha=function(e){return t(+e)},e},"custom")(.5)});function U3(e){this._context=e}function q3(e){return new U3(e)}var j3=e(()=>{l3(),mt(U3,"LinearClosed"),U3.prototype={areaStart:o3,areaEnd:o3,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(q3,"default")});function W3(e){return e<0?-1:1}function Y3(e,t,r){var n=e._x1-e._x0,t=t-e._x1,i=(e._y1-e._y0)/(n||t<0&&-0),e=(i*t+(r=(r-e._y1)/(t||n<0&&-0))*n)/(n+t);return(W3(i)+W3(r))*Math.min(Math.abs(i),Math.abs(r),.5*Math.abs(e))||0}function H3(e,t){var r=e._x1-e._x0;return r?(3*(e._y1-e._y0)/r-t)/2:t}function V3(e,t,r){var n=e._x0,i=e._x1,a=e._y1,s=(i-n)/3;e._context.bezierCurveTo(n+s,e._y0+s*t,i-s,a-s*r,i,a)}function X3(e){this._context=e}function K3(e){this._context=new Z3(e)}function Z3(e){this._context=e}function Q3(e){return new X3(e)}function J3(e){return new K3(e)}var ew=e(()=>{mt(W3,"sign"),mt(Y3,"slope3"),mt(H3,"slope2"),mt(V3,"point"),mt(X3,"MonotoneX"),X3.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:V3(this,this._t0,H3(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,V3(this,H3(this,r=Y3(this,e,t)),r);break;default:V3(this,this._t0,r=Y3(this,e,t))}this._x0=this._x1,this._x1=e,this._y0=this._y1,this._y1=t,this._t0=r}},"point")},mt(K3,"MonotoneY"),(K3.prototype=Object.create(X3.prototype)).point=function(e,t){X3.prototype.point.call(this,t,e)},mt(Z3,"ReflectContext"),Z3.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,n,i,a){this._context.bezierCurveTo(t,e,n,r,a,i)},"bezierCurveTo")},mt(Q3,"monotoneX"),mt(J3,"monotoneY")});function tw(e){this._context=e}function rw(e){var t,r,n=e.length-1,i=new Array(n),a=new Array(n),s=new Array(n);for(a[i[0]=0]=2,s[0]=e[0]+2*e[1],t=1;t{mt(tw,"Natural"),tw.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 n=rw(e),i=rw(t),a=0,s=1;s{mt(aw,"Step"),aw.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{z5(),K5(),r3(),f3(),v3(),d3(),s3(),w3(),A3(),I3(),C3(),$3(),G3(),O3(),j3(),W5(),ew(),iw(),cw()}),uw=e(()=>{}),dw=e(()=>{});function pw(e,t,r){this.k=e,this.x=t,this.y=r}function gw(e){for(;!e.__zoom;)if(!(e=e.parentNode))return fw;return e.__zoom}var fw,mw,yw,vw,xw,bw,ww,kw,Tw,Ew,Cw,Sw,_w,Aw,Lw,Nw,Iw,Rw,Mw,Dw,Ow,Pw,Bw,$w,Fw,zw,Gw,Uw,qw,jw,Ww,Yw,Hw=e(()=>{mt(pw,"Transform"),pw.prototype={constructor:pw,scale:mt(function(e){return 1===e?this:new pw(this.k*e,this.x,this.y)},"scale"),translate:mt(function(e,t){return 0===e&0===t?this:new pw(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")},fw=new pw(1,0,0),gw.prototype=pw.prototype,mt(gw,"transform")}),Vw=e(()=>{}),Xw=e(()=>{jy(),uw(),dw(),Hw(),Vw()}),Kw=e(()=>{Xw(),Hw()}),Zw=e(()=>{Ku(),hd(),t2(),d2(),v1(),p2(),g2(),wd(),pg(),f2(),$y(),m2(),v2(),iv(),av(),ax(),vf(),u2(),sx(),y2(),ox(),l5(),p5(),dg(),hw(),Lb(),r5(),Uf(),jy(),Kw()}),Qw=VBe(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"}),Jw=VBe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeUrl=void 0;var a=Qw();function s(e){return-1{mw=ee(Jw(),1),eh(),yw=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 n in t.attrs)r.attr(n,t.attrs[n]);return t.class&&r.attr("class",t.class),r},"drawRect"),vw=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"},yw(e,t).lower()},"drawBackgroundRect"),xw=mt((e,t)=>{var r=t.text.replace(kc," "),n=((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 n.attr("x",t.x+2*t.textMargin),n.text(r),e},"drawText"),bw=mt((e,t,r,n)=>{(e=e.append("image")).attr("x",t),e.attr("y",r),t=(0,mw.sanitizeUrl)(n),e.attr("xlink:href",t)},"drawImage"),ww=mt((e,t,r,n)=>{(e=e.append("use")).attr("x",t),e.attr("y",r),t=(0,mw.sanitizeUrl)(n),e.attr("xlink:href","#"+t)},"drawEmbeddedImage"),kw=mt(()=>({x:0,y:0,width:100,height:100,fill:"#EDF2AE",stroke:"#666",anchor:"start",rx:0,ry:0}),"getNoteRect"),Tw=mt(()=>({x:0,y:0,width:100,height:100,"text-anchor":"start",style:"#666",textMargin:0,rx:0,ry:0,tspan:!0}),"getTextObj")}),t6=e(()=>{function t(e,t,r,n,i,a,s){g(t.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("text-anchor","middle").text(e),s)}function l(e,t,r,n,i,a,s,o){var{fontSize:l,fontFamily:c,fontWeight:h}=o,u=e.split(L.lineBreakRegex);for(let e=0;e{let n=e.append("g"),i=0;for(var a of t){var s,o=a.textColor||"#444444",l=a.lineColor||"#444444",c=a.offsetX?parseInt(a.offsetX):0,h=a.offsetY?parseInt(a.offsetY):0,l=(0===i?((s=n.append("line")).attr("x1",a.startPoint.x),s.attr("y1",a.startPoint.y),s.attr("x2",a.endPoint.x),s.attr("y2",a.endPoint.y),s.attr("stroke-width","1"),s.attr("stroke",l),s.style("fill","none"),"rel_b"!==a.type&&s.attr("marker-end","url(#arrowhead)"),"birel"!==a.type&&"rel_b"!==a.type||s.attr("marker-start","url(#arrowend)"),i=-1):((s=n.append("path")).attr("fill","none").attr("stroke-width","1").attr("stroke",l).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",a.startPoint.x).replaceAll("starty",a.startPoint.y).replaceAll("controlx",a.startPoint.x+(a.endPoint.x-a.startPoint.x)/2-(a.endPoint.x-a.startPoint.x)/4).replaceAll("controly",a.startPoint.y+(a.endPoint.y-a.startPoint.y)/2).replaceAll("stopx",a.endPoint.x).replaceAll("stopy",a.endPoint.y)),"rel_b"!==a.type&&s.attr("marker-end","url(#arrowhead)"),"birel"!==a.type&&"rel_b"!==a.type||s.attr("marker-start","url(#arrowend)")),r.messageFont());Fw(r)(a.label.text,n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+c,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+h,a.label.width,a.label.height,{fill:o},l),a.techn&&""!==a.techn.text&&(l=r.messageFont(),Fw(r)("["+a.techn.text+"]",n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+c,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+r.messageFontSize+5+h,Math.max(a.label.width,a.techn.width),a.techn.height,{fill:o,"font-style":"italic"},l))}},"drawRels"),Aw=mt(function(e,t,r){let n=e.append("g"),i=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=(Cw(n,e={x:t.x,y:t.y,fill:i,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,Fw(r)(t.label.text,n,t.x,t.y+t.label.Y,t.width,t.height,{fill:"#444444"},l),t.type&&""!==t.type.text&&((l=r.boundaryFont()).fontColor=s,Fw(r)(t.type.text,n,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,Fw(r)(t.descr.text,n,t.x,t.y+t.descr.Y,t.width,t.height,{fill:"#444444"},l))},"drawBoundary"),Lw=mt(function(e,t,r){let n=t.bgColor||r[t.typeC4Shape.text+"_bg_color"],i=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"),kw());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=n,l.width=t.width,l.height=t.height,l.stroke=i,l.rx=2.5,l.ry=2.5,l.attrs={"stroke-width":.5},Cw(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",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",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",i).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",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",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",i).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=$w(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":Sw(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,Fw(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?Fw(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&&Fw(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,Fw(r)(t.descr.text,o,t.x,t.y+t.descr.Y,t.width,t.height,{fill:a},c)),t.height},"drawC4Shape"),Nw=mt(function(e){e.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),Iw=mt(function(e){e.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),Rw=mt(function(e){e.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),Mw=mt(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},"insertArrowHead"),Dw=mt(function(e){e.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},"insertArrowEnd"),Ow=mt(function(e){e.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),Pw=mt(function(e){e.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertDynamicNumber"),Bw=mt(function(e){(e=e.append("defs").append("marker").attr("id","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"),$w=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"),Fw=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:l},zw={drawRect:Cw,drawBoundary:Aw,drawC4Shape:Lw,drawRels:_w,drawImage:Sw,insertArrowHead:Mw,insertArrowEnd:Dw,insertArrowFilledHead:Ow,insertDynamicNumber:Pw,insertArrowCrossHead:Bw,insertDatabaseIcon:Nw,insertComputerIcon:Iw,insertClockIcon:Rw}}),r6=e(()=>{Gw="object"==typeof global&&global&&global.Object===Object&&global,Uw=Gw}),n6=e(()=>{r6(),qw="object"==typeof self&&self&&self.Object===Object&&self,qw=Uw||qw||Function("return this")(),jw=qw}),i6=e(()=>{n6(),Ww=jw.Symbol,Yw=Ww});function a6(e){var t=o6.call(e,c6),r=e[c6];try{var n=!(e[c6]=void 0)}catch{}var i=l6.call(e);return n&&(t?e[c6]=r:delete e[c6]),i}var s6,o6,l6,c6,h6,u6=e(()=>{i6(),s6=Object.prototype,o6=s6.hasOwnProperty,l6=s6.toString,c6=Yw?Yw.toStringTag:void 0,mt(a6,"getRawTag"),h6=a6});function d6(e){return g6.call(e)}var p6,g6,f6,m6=e(()=>{p6=Object.prototype,g6=p6.toString,mt(d6,"objectToString"),f6=d6});function y6(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":(v6&&v6 in Object(e)?h6:f6)(e)}var v6,x6,b6=e(()=>{i6(),u6(),m6(),v6=Yw?Yw.toStringTag:void 0,mt(y6,"baseGetTag"),x6=y6});function w6(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}var k6,T6=e(()=>{mt(w6,"isObject"),k6=w6});function E6(e){return!!k6(e)&&("[object Function]"==(e=x6(e))||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e)}var C6,S6,_6,A6=e(()=>{b6(),T6(),mt(E6,"isFunction"),C6=E6}),L6=e(()=>{n6(),S6=jw["__core-js_shared__"],_6=S6});function N6(e){return!!I6&&I6 in e}var I6,R6,M6=e(()=>{var e;L6(),e=/[^.]+$/.exec(_6&&_6.keys&&_6.keys.IE_PROTO||""),I6=e?"Symbol(src)_1."+e:"",mt(N6,"isMasked"),R6=N6});function D6(e){if(null!=e){try{return P6.call(e)}catch{}try{return e+""}catch{}}return""}var O6,P6,B6,$6=e(()=>{O6=Function.prototype,P6=O6.toString,mt(D6,"toSource"),B6=D6});function F6(e){return!(!k6(e)||R6(e))&&(C6(e)?j6:G6).test(B6(e))}var z6,G6,U6,q6,j6,W6,Y6=e(()=>{A6(),M6(),T6(),$6(),z6=/[\\^$.*+?()[\]{}|]/g,G6=/^\[object .+?Constructor\]$/,U6=Function.prototype,q6=Object.prototype,U6=U6.toString,q6=q6.hasOwnProperty,j6=RegExp("^"+U6.call(q6).replace(z6,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),mt(F6,"baseIsNative"),W6=F6});function H6(e,t){return e?.[t]}var V6,X6=e(()=>{mt(H6,"getValue"),V6=H6});function K6(e,t){return e=V6(e,t),W6(e)?e:void 0}var Z6,Q6,J6,ek=e(()=>{Y6(),X6(),mt(K6,"getNative"),Z6=K6}),tk=e(()=>{ek(),Q6=Z6(Object,"create"),J6=Q6});function rk(){this.__data__=J6?J6(null):{},this.size=0}var nk,ik=e(()=>{tk(),mt(rk,"hashClear"),nk=rk});function ak(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e}var sk,ok=e(()=>{mt(ak,"hashDelete"),sk=ak});function lk(e){var t,r=this.__data__;return J6?"__lodash_hash_undefined__"===(t=r[e])?void 0:t:hk.call(r,e)?r[e]:void 0}var ck,hk,uk,dk=e(()=>{tk(),ck=Object.prototype,hk=ck.hasOwnProperty,mt(lk,"hashGet"),uk=lk});function pk(e){var t=this.__data__;return J6?void 0!==t[e]:fk.call(t,e)}var gk,fk,mk,yk=e(()=>{tk(),gk=Object.prototype,fk=gk.hasOwnProperty,mt(pk,"hashHas"),mk=pk});function vk(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=J6&&void 0===t?"__lodash_hash_undefined__":t,this}var xk,bk=e(()=>{tk(),mt(vk,"hashSet"),xk=vk});function wk(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{ik(),ok(),dk(),yk(),bk(),mt(wk,"Hash"),wk.prototype.clear=nk,wk.prototype.delete=sk,wk.prototype.get=uk,wk.prototype.has=mk,wk.prototype.set=xk,kk=wk});function Ek(){this.__data__=[],this.size=0}var Ck,Sk=e(()=>{mt(Ek,"listCacheClear"),Ck=Ek});function _k(e,t){return e===t||e!=e&&t!=t}var Ak,Lk=e(()=>{mt(_k,"eq"),Ak=_k});function Nk(e,t){for(var r=e.length;r--;)if(Ak(e[r][0],t))return r;return-1}var Ik,Rk=e(()=>{Lk(),mt(Nk,"assocIndexOf"),Ik=Nk});function Mk(e){var t=this.__data__;return!((e=Ik(t,e))<0||(e==t.length-1?t.pop():Ok.call(t,e,1),--this.size,0))}var Dk,Ok,Pk,Bk=e(()=>{Rk(),Dk=Array.prototype,Ok=Dk.splice,mt(Mk,"listCacheDelete"),Pk=Mk});function $k(e){var t=this.__data__;return(e=Ik(t,e))<0?void 0:t[e][1]}var Fk,zk=e(()=>{Rk(),mt($k,"listCacheGet"),Fk=$k});function Gk(e){return-1{Rk(),mt(Gk,"listCacheHas"),Uk=Gk});function jk(e,t){var r=this.__data__,n=Ik(r,e);return n<0?(++this.size,r.push([e,t])):r[n][1]=t,this}var Wk,Yk=e(()=>{Rk(),mt(jk,"listCacheSet"),Wk=jk});function Hk(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{Sk(),Bk(),zk(),qk(),Yk(),mt(Hk,"ListCache"),Hk.prototype.clear=Ck,Hk.prototype.delete=Pk,Hk.prototype.get=Fk,Hk.prototype.has=Uk,Hk.prototype.set=Wk,Vk=Hk}),Qk=e(()=>{ek(),n6(),Xk=Z6(jw,"Map"),Kk=Xk});function Jk(){this.size=0,this.__data__={hash:new kk,map:new(Kk||Vk),string:new kk}}var eT,tT=e(()=>{Tk(),Zk(),Qk(),mt(Jk,"mapCacheClear"),eT=Jk});function rT(e){var t=typeof e;return"string"==t||"number"==t||"symbol"==t||"boolean"==t?"__proto__"!==e:null===e}var nT,iT=e(()=>{mt(rT,"isKeyable"),nT=rT});function aT(e,t){return e=e.__data__,nT(t)?e["string"==typeof t?"string":"hash"]:e.map}var sT,oT=e(()=>{iT(),mt(aT,"getMapData"),sT=aT});function lT(e){return e=sT(this,e).delete(e),this.size-=e?1:0,e}var cT,hT=e(()=>{oT(),mt(lT,"mapCacheDelete"),cT=lT});function uT(e){return sT(this,e).get(e)}var dT,pT=e(()=>{oT(),mt(uT,"mapCacheGet"),dT=uT});function gT(e){return sT(this,e).has(e)}var fT,mT=e(()=>{oT(),mt(gT,"mapCacheHas"),fT=gT});function yT(e,t){var r=sT(this,e),n=r.size;return r.set(e,t),this.size+=r.size==n?0:1,this}var vT,xT=e(()=>{oT(),mt(yT,"mapCacheSet"),vT=yT});function bT(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t{tT(),hT(),pT(),mT(),xT(),mt(bT,"MapCache"),bT.prototype.clear=eT,bT.prototype.delete=cT,bT.prototype.get=dT,bT.prototype.has=fT,bT.prototype.set=vT,wT=bT});function TT(n,i){if("function"!=typeof n||null!=i&&"function"!=typeof i)throw new TypeError(ET);var a=mt(function(){var e=arguments,t=i?i.apply(this,e):e[0],r=a.cache;return r.has(t)?r.get(t):(e=n.apply(this,e),a.cache=r.set(t,e)||r,e)},"memoized");return a.cache=new(TT.Cache||wT),a}var ET,CT,ST=e(()=>{kT(),ET="Expected a function",mt(TT,"memoize"),TT.Cache=wT,CT=TT});function _T(){this.__data__=new Vk,this.size=0}var AT,LT=e(()=>{Zk(),mt(_T,"stackClear"),AT=_T});function NT(e){var t=this.__data__,e=t.delete(e);return this.size=t.size,e}var IT,RT=e(()=>{mt(NT,"stackDelete"),IT=NT});function MT(e){return this.__data__.get(e)}var DT,OT=e(()=>{mt(MT,"stackGet"),DT=MT});function PT(e){return this.__data__.has(e)}var BT,$T=e(()=>{mt(PT,"stackHas"),BT=PT});function FT(e,t){var r=this.__data__;if(r instanceof Vk){var n=r.__data__;if(!Kk||n.length<199)return n.push([e,t]),this.size=++r.size,this;r=this.__data__=new wT(n)}return r.set(e,t),this.size=r.size,this}var zT,GT=e(()=>{Zk(),Qk(),kT(),mt(FT,"stackSet"),zT=FT});function UT(e){e=this.__data__=new Vk(e),this.size=e.size}var qT,jT,WT,YT=e(()=>{Zk(),LT(),RT(),OT(),$T(),GT(),mt(UT,"Stack"),UT.prototype.clear=AT,UT.prototype.delete=IT,UT.prototype.get=DT,UT.prototype.has=BT,UT.prototype.set=zT,qT=UT}),HT=e(()=>{ek(),jT=(()=>{try{var e=Z6(Object,"defineProperty");return e({},"",{}),e}catch{}})(),WT=jT});function VT(e,t,r){"__proto__"==t&&WT?WT(e,t,{configurable:!0,enumerable:!0,value:r,writable:!0}):e[t]=r}var XT,KT=e(()=>{HT(),mt(VT,"baseAssignValue"),XT=VT});function ZT(e,t,r){(void 0===r||Ak(e[t],r))&&(void 0!==r||t in e)||XT(e,t,r)}var QT,JT=e(()=>{KT(),Lk(),mt(ZT,"assignMergeValue"),QT=ZT});function e7(l){return function(e,t,r){for(var n=-1,i=Object(e),a=r(e),s=a.length;s--;){var o=a[l?s:++n];if(!1===t(i[o],o,i))break}return e}}var t7,r7,n7,i7=e(()=>{mt(e7,"createBaseFor"),t7=e7}),a7=e(()=>{i7(),r7=t7(),n7=r7});function s7(e,t){return t?e.slice():(t=e.length,t=c7?c7(t):new e.constructor(t),e.copy(t),t)}var o7,l7,c7,h7,u7,d7,p7=e(()=>{n6(),o7="object"==typeof exports&&exports&&!exports.nodeType&&exports,l7=(l7=o7&&"object"==typeof module&&module&&!module.nodeType&&module)&&l7.exports===o7?jw.Buffer:void 0,c7=l7?l7.allocUnsafe:void 0,mt(s7,"cloneBuffer"),h7=s7}),g7=e(()=>{n6(),u7=jw.Uint8Array,d7=u7});function f7(e){var t=new e.constructor(e.byteLength);return new d7(t).set(new d7(e)),t}var m7,y7=e(()=>{g7(),mt(f7,"cloneArrayBuffer"),m7=f7});function v7(e,t){return t=t?m7(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.length)}var x7,b7=e(()=>{y7(),mt(v7,"cloneTypedArray"),x7=v7});function w7(e,t){var r=-1,n=e.length;for(t=t||Array(n);++r{mt(w7,"copyArray"),k7=w7}),S7=e(()=>{function t(){}T6(),T7=Object.create,mt(t,"object"),E7=function(e){return k6(e)?T7?T7(e):(t.prototype=e,e=new t,t.prototype=void 0,e):{}}});function _7(t,r){return function(e){return t(r(e))}}var A7,L7,N7,I7=e(()=>{mt(_7,"overArg"),A7=_7}),R7=e(()=>{I7(),L7=A7(Object.getPrototypeOf,Object),N7=L7});function M7(e){var t=e&&e.constructor;return e===("function"==typeof t&&t.prototype||D7)}var D7,O7,P7=e(()=>{D7=Object.prototype,mt(M7,"isPrototype"),O7=M7});function B7(e){return"function"!=typeof e.constructor||O7(e)?{}:E7(N7(e))}var $7,F7=e(()=>{S7(),R7(),P7(),mt(B7,"initCloneObject"),$7=B7});function z7(e){return null!=e&&"object"==typeof e}var G7,U7=e(()=>{mt(z7,"isObjectLike"),G7=z7});function q7(e){return G7(e)&&"[object Arguments]"==x6(e)}var j7,W7,Y7,H7,V7,X7,K7,Z7=e(()=>{b6(),U7(),mt(q7,"baseIsArguments"),j7=q7}),Q7=e(()=>{Z7(),U7(),H7=Object.prototype,W7=H7.hasOwnProperty,Y7=H7.propertyIsEnumerable,H7=j7(function(){return arguments}())?j7:function(e){return G7(e)&&W7.call(e,"callee")&&!Y7.call(e,"callee")},V7=H7}),J7=e(()=>{X7=Array.isArray,K7=X7});function e8(e){return"number"==typeof e&&-1{mt(e8,"isLength"),t8=e8});function n8(e){return null!=e&&t8(e.length)&&!C6(e)}var i8,a8=e(()=>{A6(),r8(),mt(n8,"isArrayLike"),i8=n8});function s8(e){return G7(e)&&i8(e)}var o8,l8=e(()=>{a8(),U7(),mt(s8,"isArrayLikeObject"),o8=s8});function c8(){return!1}var h8,u8,d8,p8,g8=e(()=>{mt(c8,"stubFalse"),h8=c8}),f8=e(()=>{n6(),g8(),d8="object"==typeof exports&&exports&&!exports.nodeType&&exports,u8=(u8=d8&&"object"==typeof module&&module&&!module.nodeType&&module)&&u8.exports===d8?jw.Buffer:void 0,d8=u8?u8.isBuffer:void 0,p8=d8||h8});function m8(e){return!(!G7(e)||"[object Object]"!=x6(e))&&(null===(e=N7(e))||"function"==typeof(e=b8.call(e,"constructor")&&e.constructor)&&e instanceof e&&x8.call(e)==w8)}var y8,v8,x8,b8,w8,k8,T8=e(()=>{b6(),R7(),U7(),y8=Function.prototype,v8=Object.prototype,x8=y8.toString,b8=v8.hasOwnProperty,w8=x8.call(Object),mt(m8,"isPlainObject"),k8=m8});function E8(e){return G7(e)&&t8(e.length)&&!!C8[x6(e)]}var C8,S8,_8=e(()=>{b6(),r8(),U7(),(C8={})["[object Float32Array]"]=C8["[object Float64Array]"]=C8["[object Int8Array]"]=C8["[object Int16Array]"]=C8["[object Int32Array]"]=C8["[object Uint8Array]"]=C8["[object Uint8ClampedArray]"]=C8["[object Uint16Array]"]=C8["[object Uint32Array]"]=!0,C8["[object Arguments]"]=C8["[object Array]"]=C8["[object ArrayBuffer]"]=C8["[object Boolean]"]=C8["[object DataView]"]=C8["[object Date]"]=C8["[object Error]"]=C8["[object Function]"]=C8["[object Map]"]=C8["[object Number]"]=C8["[object Object]"]=C8["[object RegExp]"]=C8["[object Set]"]=C8["[object String]"]=C8["[object WeakMap]"]=!1,mt(E8,"baseIsTypedArray"),S8=E8});function A8(t){return function(e){return t(e)}}var L8,N8,I8,R8,M8,D8,O8,P8=e(()=>{mt(A8,"baseUnary"),L8=A8}),B8=e(()=>{r6(),R8="object"==typeof exports&&exports&&!exports.nodeType&&exports,N8=R8&&"object"==typeof module&&module&&!module.nodeType&&module,R8=N8&&N8.exports===R8,I8=R8&&Uw.process,R8=(()=>{try{return N8&&N8.require&&N8.require("util").types||I8&&I8.binding&&I8.binding("util")}catch{}})(),M8=R8}),$8=e(()=>{_8(),P8(),B8(),D8=(D8=M8&&M8.isTypedArray)?L8(D8):S8,O8=D8});function F8(e,t){if(("constructor"!==t||"function"!=typeof e[t])&&"__proto__"!=t)return e[t]}var z8,G8=e(()=>{mt(F8,"safeGet"),z8=F8});function U8(e,t,r){var n=e[t];j8.call(e,t)&&Ak(n,r)&&(void 0!==r||t in e)||XT(e,t,r)}var q8,j8,W8,Y8=e(()=>{KT(),Lk(),q8=Object.prototype,j8=q8.hasOwnProperty,mt(U8,"assignValue"),W8=U8});function H8(e,t,r,n){var i=!r;r=r||{};for(var a=-1,s=t.length;++a{Y8(),KT(),mt(H8,"copyObject"),V8=H8});function K8(e,t){for(var r=-1,n=Array(e);++r{mt(K8,"baseTimes"),Z8=K8});function J8(e,t){var r=typeof e;return!!(t=t??9007199254740991)&&("number"==r||"symbol"!=r&&eE.test(e))&&-1{eE=/^(?:0|[1-9]\d*)$/,mt(J8,"isIndex"),tE=J8});function nE(e,t){var r,n=K7(e),i=!n&&V7(e),a=!n&&!i&&p8(e),s=!n&&!i&&!a&&O8(e),o=n||i||a||s,l=o?Z8(e.length,String):[],c=l.length;for(r in e)!t&&!aE.call(e,r)||o&&("length"==r||a&&("offset"==r||"parent"==r)||s&&("buffer"==r||"byteLength"==r||"byteOffset"==r)||tE(r,c))||l.push(r);return l}var iE,aE,sE,oE=e(()=>{Q8(),Q7(),J7(),f8(),rE(),$8(),iE=Object.prototype,aE=iE.hasOwnProperty,mt(nE,"arrayLikeKeys"),sE=nE});function lE(e){var t=[];if(null!=e)for(var r in Object(e))t.push(r);return t}var cE,hE=e(()=>{mt(lE,"nativeKeysIn"),cE=lE});function uE(e){if(!k6(e))return cE(e);var t,r=O7(e),n=[];for(t in e)("constructor"!=t||!r&&pE.call(e,t))&&n.push(t);return n}var dE,pE,gE,fE=e(()=>{T6(),P7(),hE(),dE=Object.prototype,pE=dE.hasOwnProperty,mt(uE,"baseKeysIn"),gE=uE});function mE(e){return i8(e)?sE(e,!0):gE(e)}var yE,vE=e(()=>{oE(),fE(),a8(),mt(mE,"keysIn"),yE=mE});function xE(e){return V8(e,yE(e))}var bE,wE=e(()=>{X8(),vE(),mt(xE,"toPlainObject"),bE=xE});function kE(e,t,r,n,i,a,s){var o,l,c,h=z8(e,r),u=z8(t,r),d=s.get(u);d||((t=void 0===(d=a?a(h,u,r+"",e,t,s):void 0))&&(l=!(o=K7(u))&&p8(u),c=!o&&!l&&O8(u),d=u,o||l||c?d=K7(h)?h:o8(h)?k7(h):l?h7(u,!(t=!1)):c?x7(u,!(t=!1)):[]:k8(u)||V7(u)?V7(d=h)?d=bE(h):k6(h)&&!C6(h)||(d=$7(u)):t=!1),t&&(s.set(u,d),i(d,u,n,a,s),s.delete(u))),QT(e,r,d)}var TE,EE=e(()=>{JT(),p7(),b7(),C7(),F7(),Q7(),J7(),l8(),f8(),A6(),T6(),T8(),$8(),G8(),wE(),mt(kE,"baseMergeDeep"),TE=kE});function CE(n,i,a,s,o){n!==i&&n7(i,function(e,t){var r;o=o||new qT,k6(e)?TE(n,i,t,a,CE,s,o):(r=s?s(z8(n,t),e,t+"",n,i,o):void 0,QT(n,t,void 0===r?e:r))},yE)}var SE,_E=e(()=>{YT(),JT(),a7(),EE(),T6(),vE(),G8(),mt(CE,"baseMerge"),SE=CE});function AE(e){return e}var LE,NE=e(()=>{mt(AE,"identity"),LE=AE});function IE(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 RE,ME=e(()=>{mt(IE,"apply"),RE=IE});function DE(a,s,o){return s=OE(void 0===s?a.length-1:s,0),function(){for(var e=arguments,t=-1,r=OE(e.length-s,0),n=Array(r);++t{ME(),OE=Math.max,mt(DE,"overRest"),PE=DE});function $E(e){return function(){return e}}var FE,zE,GE=e(()=>{mt($E,"constant"),FE=$E}),UE=e(()=>{GE(),HT(),NE(),zE=WT?function(e,t){return WT(e,"toString",{configurable:!0,enumerable:!1,value:FE(t),writable:!0})}:LE});function qE(r){var n=0,i=0;return function(){var e=jE(),t=16-(e-i);if(i=e,0{jE=Date.now,mt(qE,"shortOut"),WE=qE}),XE=e(()=>{UE(),VE(),YE=WE(zE),HE=YE});function KE(e,t){return HE(PE(e,t,LE),e+"")}var ZE,QE=e(()=>{NE(),BE(),XE(),mt(KE,"baseRest"),ZE=KE});function JE(e,t,r){var n;return!!k6(r)&&!!("number"==(n=typeof t)?i8(r)&&tE(t,r.length):"string"==n&&t in r)&&Ak(r[t],e)}var eC,tC=e(()=>{Lk(),a8(),rE(),T6(),mt(JE,"isIterateeCall"),eC=JE});function rC(o){return ZE(function(e,t){var r=-1,n=t.length,i=1{QE(),tC(),mt(rC,"createAssigner"),nC=rC}),oC=e(()=>{_E(),sC(),iC=nC(function(e,t,r){SE(e,t,r)}),aC=iC});function lC(e,t){return e?(e="curve"+(e.charAt(0).toUpperCase()+e.slice(1)),TC[e]??t):t}function cC(e,t){if(e=e.trim())return"loose"!==t.securityLevel?(0,wC.sanitizeUrl)(e):e}function hC(e,t){return e&&t?Math.sqrt(Math.pow(t.x-e.x,2)+Math.pow(t.y-e.y,2)):0}function uC(e){let t,r=0;e.forEach(e=>{r+=hC(e,t),t=e});var n=r/2;return IC(e,n)}function dC(e){return 1===e.length?e[0]:uC(e)}function pC(e,t,r){var r=structuredClone(r),n=(M.info("our points",r),"start_left"!==t&&"start_right"!==t&&r.reverse(),25+e),n=IC(r,n),e=10+.5*e,i=Math.atan2(r[0].y-n.y,r[0].x-n.x),a={x:0,y:0};return"start_left"===t?(a.x=Math.sin(i+Math.PI)*e+(r[0].x+n.x)/2,a.y=-Math.cos(i+Math.PI)*e+(r[0].y+n.y)/2):"end_right"===t?(a.x=Math.sin(i-Math.PI)*e+(r[0].x+n.x)/2-5,a.y=-Math.cos(i-Math.PI)*e+(r[0].y+n.y)/2-5):"end_left"===t?(a.x=Math.sin(i)*e+(r[0].x+n.x)/2-5,a.y=-Math.cos(i)*e+(r[0].y+n.y)/2-5):(a.x=Math.sin(i)*e+(r[0].x+n.x)/2,a.y=-Math.cos(i)*e+(r[0].y+n.y)/2),a}function gC(e){let t="",r="";for(var n of e)void 0!==n&&(n.startsWith("color:")||n.startsWith("text-align:")?r=r+n+";":t=t+n+";");return{style:t,labelStyle:r}}function fC(t){let r="",n="0123456789abcdef",i=n.length;for(let e=0;e{wC=ee(Jw(),1),Zw(),eh(),Ln(),t(),Ur(),jr(),ST(),oC(),zr(),kC="​",TC={curveBasis:u3,curveBasisClosed:g3,curveBasisOpen:y3,curveBumpX:n3,curveBumpY:i3,curveBundle:b3,curveCardinalClosed:_3,curveCardinalOpen:N3,curveCardinal:E3,curveCatmullRomClosed:B3,curveCatmullRomOpen:z3,curveCatmullRom:D3,curveLinear:j5,curveLinearClosed:q3,curveMonotoneX:Q3,curveMonotoneY:J3,curveNatural:nw,curveStep:sw,curveStepAfter:lw,curveStepBefore:ow},EC=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,CC=mt(function(e,t){var r,n=SC(e,/(?:init\b)|(?:initialize\b)/),i={};if(i=Array.isArray(n)?(r=n.map(e=>e.args),vr(r),it(i,[...r])):n.args)return r=Ze(e,t),void 0!==i[n="config"]&&(i[r="flowchart-v2"===r?"flowchart":r]=i[n],delete i[n]),i},"detectInit"),SC=mt(function(e,t=null){try{var r=new RegExp(`[%]{2}(?![{]${EC.source})(?=[}][%]{2}).* +`,"ig");e=e.trim().replace(r,"").replace(/'/gm,'"'),M.debug(`Detecting diagram directive${null!==t?" type:"+t:""} based on the text:`+e);for(var n,i,a,s=[];null!==(n=He.exec(e));)n.index===He.lastIndex&&He.lastIndex++,(n&&!t||t&&n[1]?.match(t)||t&&n[2]?.match(t))&&(i=n[1]||n[2],a=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null,s.push({type:i,args:a}));return 0===s.length?{type:e,args:null}:1===s.length?s[0]:s}catch(r){return M.error(`ERROR: ${r.message} - Unable to parse directive type: '${t}' based on the text: '${e}'`),{type:void 0,args:null}}},"detectDirective"),_C=mt(function(e){return e.replace(He,"")},"removeDirectives"),AC=mt(function(e,t){for(var[r,n]of t.entries())if(n.match(e))return r;return-1},"isSubstringInArray"),mt(lC,"interpolateToCurve"),mt(cC,"formatUrl"),LC=mt((t,...e)=>{let r=t.split("."),n=r.length-1,i=r[n],a=window;for(let e=0;e(t=Math.pow(10,t),Math.round(e*t)/t),"roundNumber"),IC=mt((e,t)=>{let r,n=t;for(var i of e){if(r){var a=hC(i,r);if(0===a)return r;if(a{M.info("our points "+JSON.stringify(t)),t[0]!==r&&(t=t.reverse());var r=IC(t,25),e=e?10:5,n=Math.atan2(t[0].y-r.y,t[0].x-r.x),i={x:0,y:0};return i.x=Math.sin(n)*e+(t[0].x+r.x)/2,i.y=-Math.cos(n)*e+(t[0].y+r.y)/2,i},"calcCardinalityPosition"),mt(pC,"calcTerminalLabelPosition"),mt(gC,"getStylesFromArray"),MC=0,DC=mt(()=>(MC++,"id-"+Math.random().toString(36).substr(2,12)+"-"+MC),"generateId"),mt(fC,"makeRandomHex"),OC=mt(e=>fC(e.length),"random"),PC=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"),BC=mt(function(e,t){var r=t.text.replace(L.lineBreakRegex," "),[,n]=WC(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",n),e.style("font-weight",t.fontWeight),e.attr("fill",t.fill),void 0!==t.class&&e.attr("class",t.class),(n=e.append("tspan")).attr("x",t.x+2*t.textMargin),n.attr("fill",t.fill),n.text(r),e},"drawSimpleText"),$C=CT((e,s,o)=>{if(!e||(o=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"
"},o),L.lineBreakRegex.test(e)))return e;let l=e.split(" ").filter(Boolean),c=[],h="";return l.forEach((e,t)=>{var r,n,i=yC(e+" ",o),a=yC(h,o);h=s""!==e).join(o.joinWith)},(e,t,r)=>""+e+t+r.fontSize+r.fontWeight+r.fontFamily+r.joinWith),FC=CT((e,n,i="-",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=yC(e,a)>=n?(t+=1,t=s.length===t,r=e+i,o.push(t?e:r),""):e}),{hyphenatedStrings:o,remainingWord:l}},(e,t,r="-",n)=>""+e+t+r+n.fontSize+n.fontWeight+n.fontFamily),mt(mC,"calculateTextHeight"),mt(yC,"calculateTextWidth"),zC=CT((e,t)=>{var{fontSize:t=12,fontFamily:r="Arial",fontWeight:n=400}=t;if(!e)return{width:0,height:0};var[,i]=WC(t),t=["sans-serif",r],a=e.split(L.lineBreakRegex),s=[];if(!(r=H("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=PC();if(u.text=c||kC,0===(u=((u=BC(l,u).style("font-size",i).style("font-weight",n).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),GC=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")}},qC=mt(function(e){return UC=UC||document.createElement("div"),e=escape(e).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),UC.innerHTML=e,unescape(UC.textContent)},"entityDecode"),mt(vC,"isDetailedError"),jC=mt((e,t,r,n)=>{var i;n&&(i=e.node()?.getBBox())&&e.append("text").text(n).attr("text-anchor","middle").attr("x",i.x+i.width/2).attr("y",-r).attr("class",t)},"insertTitle"),WC=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(xC,"cleanAndMerge"),YC={assignWithDepth:it,wrapLabel:$C,calculateTextHeight:mC,calculateTextWidth:yC,calculateTextDimensions:zC,cleanAndMerge:xC,detectInit:CC,detectDirective:SC,isSubstringInArray:AC,interpolateToCurve:lC,calcLabelPosition:dC,calcCardinalityPosition:RC,calcTerminalLabelPosition:pC,formatUrl:cC,getStylesFromArray:gC,generateId:DC,random:OC,runFunc:LC,entityDecode:qC,insertTitle:jC,parseFontSize:WC,InitIDGenerator:GC},HC=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"),VC=mt(function(e){return e.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),XC=mt((e,t,{counter:r=0,prefix:n,suffix:i},a)=>a||(n?n+"_":"")+e+`_${t}_`+r+(i?"_"+i:""),"getEdgeId"),mt(bC,"handleUndefinedAttr")});function ZC(e,t,r,n,i){if(!t[e].width)if(r)t[e].text=$C(t[e].text,i,n),t[e].textLines=t[e].text.split(L.lineBreakRegex).length,t[e].width=i,t[e].height=mC(t[e].text,n);else{var a,s,r=t[e].text.split(L.lineBreakRegex);t[e].textLines=r.length,t[e].height=0,t[e].width=0;for(s of r)t[e].width=Math.max(yC(s,n),t[e].width),a=mC(s,n),t[e].height=t[e].height+a}}function QC(t,r,n,e,i){var a,s,o=new iS(i);o.data.widthLimit=n.data.widthLimit/Math.min(rS,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&&nS.wrap,c=oS(nS),l=(c.fontSize=c.fontSize+2,c.fontWeight="bold",ZC("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+"]",ZC("type",s,l,c=oS(nS),o.data.widthLimit),s.type.Y=e+5,e=s.type.Y+s.type.height),s.descr&&""!==s.descr.text&&((c=oS(nS)).fontSize=c.fontSize-2,ZC("descr",s,l,c,o.data.widthLimit),s.descr.Y=e+20,e=s.descr.Y+s.descr.height),c=0==a||a%rS==0?(l=n.data.startx+nS.diagramMarginX,n.data.stopy+nS.diagramMarginY+e):(l=o.data.stopx!==o.data.startx?o.data.stopx+nS.diagramMarginX:o.data.startx,o.data.starty),o.setData(l,l,c,c),o.name=s.alias,i.db.getC4ShapeArray(s.alias));0<(c=i.db.getC4ShapeKeys(s.alias)).length&&hS(o,t,l,c),r=s.alias,0<(l=i.db.getBoundaries(r)).length&&QC(t,0,o,l,i),"global"!==s.alias&&cS(t,s,o),n.data.stopy=Math.max(o.data.stopy+nS.c4ShapeMargin,n.data.stopy),n.data.stopx=Math.max(o.data.stopx+nS.c4ShapeMargin,n.data.stopx),JC=Math.max(JC,n.data.stopx),eS=Math.max(eS,n.data.stopy)}}var JC,eS,tS,rS,nS,iS,aS,sS,oS,lS,cS,hS,uS,dS,pS,gS,fS,mS,yS,vS,xS=e(()=>{Zw(),t6(),t(),qr(),eh(),yu(),mu(),jr(),KC(),th(),eS=JC=0,tS=4,rS=2,tt.yy=gu,nS={},iS=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,aS(e.db.getConfig())}setData(e,t,r,n){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=n}updateVal(e,t,r,n){void 0===e[t]?e[t]=r:e[t]=n(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,n=this.nextData.starty+2*e.margin,i=n+e.height;(t>=this.data.widthLimit||r>=this.data.widthLimit||this.nextData.cnt>tS)&&(t=this.nextData.startx+e.margin+nS.nextLinePaddingX,n=this.nextData.stopy+2*e.margin,this.nextData.stopx=r=t+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=i=n+e.height,this.nextData.cnt=1),e.x=t,e.y=n,this.updateVal(this.data,"startx",t,Math.min),this.updateVal(this.data,"starty",n,Math.min),this.updateVal(this.data,"stopx",r,Math.max),this.updateVal(this.data,"stopy",i,Math.max),this.updateVal(this.nextData,"startx",t,Math.min),this.updateVal(this.nextData,"starty",n,Math.min),this.updateVal(this.nextData,"stopx",r,Math.max),this.updateVal(this.nextData,"stopy",i,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},aS(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}},aS=mt(function(e){it(nS,e),e.fontFamily&&(nS.personFontFamily=nS.systemFontFamily=nS.messageFontFamily=e.fontFamily),e.fontSize&&(nS.personFontSize=nS.systemFontSize=nS.messageFontSize=e.fontSize),e.fontWeight&&(nS.personFontWeight=nS.systemFontWeight=nS.messageFontWeight=e.fontWeight)},"setConf"),sS=mt((e,t)=>({fontFamily:e[t+"FontFamily"],fontSize:e[t+"FontSize"],fontWeight:e[t+"FontWeight"]}),"c4ShapeFont"),oS=mt(e=>({fontFamily:e.boundaryFontFamily,fontSize:e.boundaryFontSize,fontWeight:e.boundaryFontWeight}),"boundaryFont"),lS=mt(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),mt(ZC,"calcC4ShapeTextWH"),cS=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=nS.c4ShapeMargin-35;var r=t.wrap&&nS.wrap,n=oS(nS),i=(n.fontSize=n.fontSize+2,n.fontWeight="bold",yC(t.label.text,n));ZC("label",t,r,n,i),zw.drawBoundary(e,t,nS)},"drawBoundary"),hS=mt(function(r,n,i,e){let a=0;for(var s of e){a=0;var o=i[s];switch((s=sS(nS,o.typeC4Shape.text)).fontSize=s.fontSize-2,o.typeC4Shape.width=yC("«"+o.typeC4Shape.text+"»",s),o.typeC4Shape.height=s.fontSize+2,o.typeC4Shape.Y=nS.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&&nS.wrap,l=nS.width-2*nS.c4ShapePadding,c=sS(nS,o.typeC4Shape.text);c.fontSize=c.fontSize+2,c.fontWeight="bold",ZC("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+"]",ZC("type",o,s,sS(nS,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+"]",ZC("techn",o,s,sS(nS,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&&(ZC("descr",o,s,sS(nS,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+=nS.c4ShapePadding,o.width=Math.max(o.width||nS.width,t,nS.width),o.height=Math.max(o.height||nS.height,e,nS.height),o.margin=o.margin||nS.c4ShapeMargin,r.insert(o),zw.drawC4Shape(n,o,nS)}r.bumpLastMargin(nS.c4ShapeMargin)},"drawC4ShapeArray"),uS=class{static{mt(this,"Point")}constructor(e,t){this.x=e,this.y=t}},dS=mt(function(e,t){let r=e.x,n=e.y,i=t.x,a=t.y,s=r+e.width/2,o=n+e.height/2,l=Math.abs(r-i),c=Math.abs(n-a),h=c/l,u=e.height/e.width,d=null;return n==a&&r{yS=mt(e=>`.person { + stroke: ${e.personBorder}; + fill: ${e.personBkg}; } -`,"getStyles"),xC=vC}),kC={};oPt(kC,{diagram:()=>TC});var TC,EC=t(()=>{qr(),yu(),bC(),wC(),TC={parser:re,db:gu,renderer:yC,styles:xC,init:me(({c4:t,wrap:e})=>{yC.setConf(t),gu.setWrap(e)},"init")}});function CC(t){return"u"kS});var kS,TS=e(()=>{qr(),yu(),xS(),bS(),kS={parser:rt,db:gu,renderer:mS,styles:vS,init:mt(({c4:e,wrap:t})=>{mS.setConf(e),gu.setWrap(t)},"init")}});function ES(e){return"u">16&255),a.push(i>>8&255),a.push(255&i)),i=i<<6|n.indexOf(e.charAt(s));return 0==(t=r%4*6)?(a.push(i>>16&255),a.push(i>>8&255),a.push(255&i)):18==t?(a.push(i>>10&255),a.push(i>>2&255)):12==t&&a.push(i>>4&255),new Uint8Array(a)}function c_(t){for(var e,r="",n=0,i=t.length,a=qS,s=0;s>18&63])+a[n>>12&63])+a[n>>6&63])+a[63&n]),n=(n<<8)+t[s];return 0==(e=i%3)?r=(r=(r=(r+=a[n>>18&63])+a[n>>12&63])+a[n>>6&63])+a[63&n]:2==e?r=(r=(r=(r+=a[n>>10&63])+a[n>>4&63])+a[n<<2&63])+a[64]:1==e&&(r=(r=(r=(r+=a[n>>2&63])+a[n<<4&63])+a[64])+a[64]),r}function h_(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}function u_(t){if(null!==t)for(var e,r,n,i=[],a=t,s=0,o=a.length;s>10),56320+(t-65536&1023))}function S_(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||QS,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.implicitTypes=this.schema.compiledImplicit,this.typeMap=this.schema.compiledTypeMap,this.length=t.length,this.position=0,this.line=0,this.lineStart=0,this.lineIndent=0,this.firstTabInLine=-1,this.documents=[]}function A_(t,e){return(t={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart}).snippet=RS(t),new IS(e,t)}function L_(t,e){throw A_(t,e)}function N_(t,e){t.onWarning&&t.onWarning.call(null,A_(t,e))}function I_(t,e,r,n){var i,a,s,o;if(el&&(l=t.lineIndent),v_(u))c++;else{if(t.lineIndente)&&0!==n)L_(t,"bad indentation of a sequence entry");else if(t.lineIndente)&&(y&&(s=t.line,o=t.lineStart,l=t.position),V_(t,e,nA,!0,i)&&(y?f=t.result:m=t.result),y||(M_(t,d,p,g,f,m,s,o,l),g=f=m=null),O_(t,!0,-1),c=t.input.charCodeAt(t.position)),(t.line===a||t.lineIndent>e)&&0!==c)L_(t,"bad indentation of a mapping entry");else if(t.lineIndente?d=1:t.lineIndent===e?d=0:t.lineIndente?d=1:t.lineIndent===e?d=0:t.lineIndent tag; it should be "scalar", not "'+t.kind+'"'),l=0,c=t.implicitTypes.length;l"),null!==t.result&&u.kind!==t.kind&&L_(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+u.kind+'", not "'+t.kind+'"'),u.resolve(t.result,t.tag)?(t.result=u.construct(t.result,t.tag),null!==t.anchor&&(t.anchorMap[t.anchor]=t.result)):L_(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),null!==t.tag||null!==t.anchor||g}function X_(t){var e,r,n,i,a=t.position,s=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(i=t.input.charCodeAt(t.position))&&(O_(t,!0,-1),i=t.input.charCodeAt(t.position),!(0{if(0===a.length)return i.quotingType===EA?'""':"''";if(!i.noCompatMode&&(-1!==kA.indexOf(a)||TA.test(a)))return i.quotingType===EA?'"'+a+'"':"'"+a+"'";var t=i.indent*Math.max(1,s),e=-1===i.lineWidth?-1:Math.max(Math.min(i.lineWidth,40),i.lineWidth-t),r=o||-1=i.flowLevel;function n(t){return iS(i,t)}switch(me(n,"testAmbiguity"),pS(a,r,i.indent,e,n,i.quotingType,i.forceQuotes&&!o,l)){case CA:return a;case _A:return"'"+a.replace(/'/g,"''")+"'";case SA:return"|"+fS(a,i.indent)+mS(rS(a,t));case AA:return">"+fS(a,i.indent)+mS(rS(yS(a,e),t));case LA:return'"'+xS(a)+'"';default:throw new IS("impossible error: invalid scalar style")}})()}function fS(t,e){var e=dS(t)?String(e):"",r=t[t.length-1]===` -`;return e+(!r||t[t.length-2]!==` -`&&t!==` +`+e.mark.snippet),n+" "+r):n}function IS(e,t){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=t,this.message=NS(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}function RS(e,t,r,n,i){var a="",s="";return(i=Math.floor(i/2)-1)>16&255),a.push(i>>8&255),a.push(255&i)),i=i<<6|n.indexOf(t.charAt(s));return 0==(e=r%4*6)?(a.push(i>>16&255),a.push(i>>8&255),a.push(255&i)):18==e?(a.push(i>>10&255),a.push(i>>2&255)):12==e&&a.push(i>>4&255),new Uint8Array(a)}function l_(e){for(var t,r="",n=0,i=e.length,a=UA,s=0;s>18&63])+a[n>>12&63])+a[n>>6&63])+a[63&n]),n=(n<<8)+e[s];return 0==(t=i%3)?r=(r=(r=(r+=a[n>>18&63])+a[n>>12&63])+a[n>>6&63])+a[63&n]:2==t?r=(r=(r=(r+=a[n>>10&63])+a[n>>4&63])+a[n<<2&63])+a[64]:1==t&&(r=(r=(r=(r+=a[n>>2&63])+a[n<<4&63])+a[64])+a[64]),r}function c_(e){return"[object Uint8Array]"===Object.prototype.toString.call(e)}function h_(e){if(null!==e)for(var t,r,n,i=[],a=e,s=0,o=a.length;s>10),56320+(e-65536&1023))}function S_(e,t){this.input=e,this.filename=t.filename||null,this.schema=t.schema||ZA,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 __(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=IA(e),new NA(t,e)}function A_(e,t){throw __(e,t)}function L_(e,t){e.onWarning&&e.onWarning.call(null,__(e,t))}function N_(e,t,r,n){var i,a,s,o;if(tl&&(l=e.lineIndent),y_(u))c++;else{if(e.lineIndentt)&&0!==n)A_(e,"bad indentation of a sequence entry");else if(e.lineIndentt)&&(y&&(s=e.line,o=e.lineStart,l=e.position),H_(e,t,r9,!0,i)&&(y?f=e.result:m=e.result),y||(R_(e,d,p,g,f,m,s,o,l),g=f=m=null),D_(e,!0,-1),c=e.input.charCodeAt(e.position)),(e.line===a||e.lineIndent>t)&&0!==c)A_(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&&A_(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)):A_(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 V_(e){var t,r,n,i,a=e.position,s=!1;for(e.version=null,e.checkLineBreaks=e.legacy,e.tagMap=Object.create(null),e.anchorMap=Object.create(null);0!==(i=e.input.charCodeAt(e.position))&&(D_(e,!0,-1),i=e.input.charCodeAt(e.position),!(0{if(0===a.length)return i.quotingType===T9?'""':"''";if(!i.noCompatMode&&(-1!==w9.indexOf(a)||k9.test(a)))return i.quotingType===T9?'"'+a+'"':"'"+a+"'";var e=i.indent*Math.max(1,s),t=-1===i.lineWidth?-1:Math.max(Math.min(i.lineWidth,40),i.lineWidth-e),r=o||-1=i.flowLevel;function n(e){return nA(i,e)}switch(mt(n,"testAmbiguity"),dA(a,r,i.indent,t,n,i.quotingType,i.forceQuotes&&!o,l)){case E9:return a;case C9:return"'"+a.replace(/'/g,"''")+"'";case S9:return"|"+gA(a,i.indent)+fA(tA(a,e));case _9:return">"+gA(a,i.indent)+fA(tA(mA(a,t),e));case A9:return'"'+vA(a)+'"';default:throw new NA("impossible error: invalid scalar style")}})()}function gA(e,t){var t=uA(e)?String(t):"",r=e[e.length-1]===` +`;return t+(!r||e[e.length-2]!==` +`&&e!==` `?r?"":"-":"+")+` -`}function mS(t){return t[t.length-1]===` -`?t.slice(0,-1):t}function yS(t,e){for(var r,n=/(\n+)([^\n]*)/g,i=(r=-1!==(r=t.indexOf(` -`))?r:t.length,n.lastIndex=r,vS(t.slice(0,r),e)),a=t[0]===` -`||" "===t[0];o=n.exec(t);){var s=o[1],o=o[2],l=" "===o[0];i+=s+(a||l||""===o?"":` -`)+vS(o,e),a=l}return i}function vS(t,e){if(""===t||" "===t[0])return t;for(var r,n,i=/ [^ ]/g,a=0,s=0,o="";n=i.exec(t);)e<(n=n.index)-a&&(o+=` -`+t.slice(a,r=ae&&a tag resolver accepts not "'+a+'" style');n=i.represent[a](e,a)}t.dump=n}return!0}return!1}function CS(t,e,r,n,i,a,s){t.tag=null,t.dump=r,ES(t,r,!1)||ES(t,r,!0);var o,l,c=yA.call(t.dump),h=n,u=(n=n&&(t.flowLevel<0||t.flowLevel>e),"[object Object]"===c||"[object Array]"===c);if(u&&(l=-1!==(o=t.duplicates.indexOf(r))),(null!==t.tag&&"?"!==t.tag||l||2!==t.indent&&0",t.dump=r+" "+t.dump)}return!0}function _S(t,e){var r,n,i=[],a=[];for(SS(t,i,a),r=0,n=a.length;r{for(me(CC,"isNothing"),me(_C,"isObject"),me(SC,"toArray"),me(AC,"extend"),me(LC,"repeat"),me(NC,"isNegativeZero"),NS={isNothing:CC,isObject:_C,toArray:SC,repeat:LC,isNegativeZero:NC,extend:AC},me(IC,"formatError"),me(RC,"YAMLException$1"),((RC.prototype=Object.create(Error.prototype)).constructor=RC).prototype.toString=me(function(t){return this.name+": "+IC(this,t)},"toString"),IS=RC,me(MC,"getLine"),me(DC,"padStart"),me(OC,"makeSnippet"),RS=OC,MS=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],DS=["scalar","sequence","mapping"],me(PC,"compileStyleAliases"),me(BC,"Type$1"),OS=BC,me(FC,"compileList"),me($C,"compileMap"),me(zC,"Schema$1"),zC.prototype.extend=me(function(t){var e=[],r=[];if(t instanceof OS)r.push(t);else if(Array.isArray(t))r=r.concat(t);else{if(!t||!Array.isArray(t.implicit)&&!Array.isArray(t.explicit))throw new IS("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");t.implicit&&(e=e.concat(t.implicit)),t.explicit&&(r=r.concat(t.explicit))}return e.forEach(function(t){if(!(t instanceof OS))throw new IS("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(t.loadKind&&"scalar"!==t.loadKind)throw new IS("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(t.multi)throw new IS("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),r.forEach(function(t){if(!(t instanceof OS))throw new IS("Specified list of YAML types (or a single Type object) contains a non-Type object.")}),(t=Object.create(zC.prototype)).implicit=(this.implicit||[]).concat(e),t.explicit=(this.explicit||[]).concat(r),t.compiledImplicit=FC(t,"implicit"),t.compiledExplicit=FC(t,"explicit"),t.compiledTypeMap=$C(t.compiledImplicit,t.compiledExplicit),t},"extend"),FS=zC,mA=new OS("tag:yaml.org,2002:str",{kind:"scalar",construct:me(function(t){return null!==t?t:""},"construct")}),GS=new OS("tag:yaml.org,2002:seq",{kind:"sequence",construct:me(function(t){return null!==t?t:[]},"construct")}),US=new OS("tag:yaml.org,2002:map",{kind:"mapping",construct:me(function(t){return null!==t?t:{}},"construct")}),FS=new FS({explicit:[mA,GS,US]}),me(GC,"resolveYamlNull"),me(UC,"constructYamlNull"),me(qC,"isNull"),mA=new OS("tag:yaml.org,2002:null",{kind:"scalar",resolve:GC,construct:UC,predicate:qC,represent:{canonical:me(function(){return"~"},"canonical"),lowercase:me(function(){return"null"},"lowercase"),uppercase:me(function(){return"NULL"},"uppercase"),camelcase:me(function(){return"Null"},"camelcase"),empty:me(function(){return""},"empty")},defaultStyle:"lowercase"}),me(jC,"resolveYamlBoolean"),me(WC,"constructYamlBoolean"),me(YC,"isBoolean"),GS=new OS("tag:yaml.org,2002:bool",{kind:"scalar",resolve:jC,construct:WC,predicate:YC,represent:{lowercase:me(function(t){return t?"true":"false"},"lowercase"),uppercase:me(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:me(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"}),me(HC,"isHexCode"),me(VC,"isOctCode"),me(XC,"isDecCode"),me(KC,"resolveYamlInteger"),me(ZC,"constructYamlInteger"),me(QC,"isInteger"),US=new OS("tag:yaml.org,2002:int",{kind:"scalar",resolve:KC,construct:ZC,predicate:QC,represent:{binary:me(function(t){return 0<=t?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:me(function(t){return 0<=t?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:me(function(t){return t.toString(10)},"decimal"),hexadecimal:me(function(t){return 0<=t?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),PS=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),me(JC,"resolveYamlFloat"),me(t_,"constructYamlFloat"),BS=/^[-+]?[0-9]+e/,me(e_,"representYamlFloat"),me(r_,"isFloat"),jS=new OS("tag:yaml.org,2002:float",{kind:"scalar",resolve:JC,construct:t_,predicate:r_,represent:e_,defaultStyle:"lowercase"}),FS=FS.extend({implicit:[mA,GS,US,jS]}),mA=FS,$S=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),zS=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]))?))?$"),me(n_,"resolveYamlTimestamp"),me(i_,"constructYamlTimestamp"),me(a_,"representYamlTimestamp"),GS=new OS("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:n_,construct:i_,instanceOf:Date,represent:a_}),me(s_,"resolveYamlMerge"),US=new OS("tag:yaml.org,2002:merge",{kind:"scalar",resolve:s_}),qS=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= -\r`,me(o_,"resolveYamlBinary"),me(l_,"constructYamlBinary"),me(c_,"representYamlBinary"),me(h_,"isBinary"),jS=new OS("tag:yaml.org,2002:binary",{kind:"scalar",resolve:o_,construct:l_,predicate:h_,represent:c_}),WS=Object.prototype.hasOwnProperty,YS=Object.prototype.toString,me(u_,"resolveYamlOmap"),me(d_,"constructYamlOmap"),HS=new OS("tag:yaml.org,2002:omap",{kind:"sequence",resolve:u_,construct:d_}),VS=Object.prototype.toString,me(p_,"resolveYamlPairs"),me(g_,"constructYamlPairs"),XS=new OS("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:p_,construct:g_}),KS=Object.prototype.hasOwnProperty,me(f_,"resolveYamlSet"),me(m_,"constructYamlSet"),ZS=new OS("tag:yaml.org,2002:set",{kind:"mapping",resolve:f_,construct:m_}),QS=mA.extend({implicit:[GS,US],explicit:[jS,HS,XS,ZS]}),JS=Object.prototype.hasOwnProperty,nA=4,iA=tA=1,aA=eA=2,sA=rA=3,oA=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,lA=/[\x85\u2028\u2029]/,cA=/[,\[\]\{\}]/,hA=/^(?:!|!!|![a-z\-]+!)$/i,uA=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,me(y_,"_class"),me(v_,"is_EOL"),me(x_,"is_WHITE_SPACE"),me(b_,"is_WS_OR_EOL"),me(w_,"is_FLOW_INDICATOR"),me(k_,"fromHexCode"),me(T_,"escapedHexLen"),me(E_,"fromDecimalCode"),me(C_,"simpleEscapeSequence"),me(__,"charFromCodepoint"),dA=new Array(256),pA=new Array(256),gA=0;gA<256;gA++)dA[gA]=C_(gA)?1:0,pA[gA]=C_(gA);me(S_,"State$1"),me(A_,"generateError"),me(L_,"throwError"),me(N_,"throwWarning"),fA={YAML:me(function(t,e,r){var n,i;null!==t.version&&L_(t,"duplication of %YAML directive"),1!==r.length&&L_(t,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&L_(t,"ill-formed argument of the YAML directive"),n=parseInt(i[1],10),i=parseInt(i[2],10),1!==n&&L_(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=i<2,1!==i&&2!==i&&N_(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:me(function(t,e,r){var n;2!==r.length&&L_(t,"TAG directive accepts exactly two arguments"),n=r[1],hA.test(r=r[0])||L_(t,"ill-formed tag handle (first argument) of the TAG directive"),JS.call(t.tagMap,r)&&L_(t,'there is a previously declared suffix for "'+r+'" tag handle'),uA.test(n)||L_(t,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch{L_(t,"tag prefix is malformed: "+n)}t.tagMap[r]=n},"handleTagDirective")},me(I_,"captureSegment"),me(R_,"mergeMappings"),me(M_,"storeMappingPair"),me(D_,"readLineBreak"),me(O_,"skipSeparationSpace"),me(P_,"testDocumentSeparator"),me(B_,"writeFoldedLines"),me(F_,"readPlainScalar"),me($_,"readSingleQuotedScalar"),me(z_,"readDoubleQuotedScalar"),me(G_,"readFlowCollection"),me(U_,"readBlockScalar"),me(q_,"readBlockSequence"),me(j_,"readBlockMapping"),me(W_,"readTagProperty"),me(Y_,"readAnchorProperty"),me(H_,"readAlias"),me(V_,"composeNode"),me(X_,"readDocument"),me(K_,"loadDocuments"),me(Z_,"loadAll$1"),me(Q_,"load$1"),mA={loadAll:Z_,load:Q_},yA=Object.prototype.toString,vA=Object.prototype.hasOwnProperty,xA=65279,bA=10,wA={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"},kA=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],TA=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/,me(J_,"compileStyleMap"),me(tS,"encodeHex"),EA=2,me(eS,"State"),me(rS,"indentString"),me(nS,"generateNextLine"),me(iS,"testImplicitResolving"),me(aS,"isWhitespace"),me(sS,"isPrintable"),me(oS,"isNsCharOrWhitespace"),me(lS,"isPlainSafe"),me(cS,"isPlainSafeFirst"),me(hS,"isPlainSafeLast"),me(uS,"codePointAt"),me(dS,"needIndentIndicator"),CA=1,_A=2,SA=3,AA=4,LA=5,me(pS,"chooseScalarStyle"),me(gS,"writeScalar"),me(fS,"blockHeader"),me(mS,"dropEndingNewline"),me(yS,"foldString"),me(vS,"foldLine"),me(xS,"escapeString"),me(bS,"writeFlowSequence"),me(wS,"writeBlockSequence"),me(kS,"writeFlowMapping"),me(TS,"writeBlockMapping"),me(ES,"detectType"),me(CS,"writeNode"),me(_S,"getDuplicateReferences"),me(SS,"inspectNode"),me(AS,"dump$1"),me(LS,"renamed"),NA=FS,IA=mA.load,LS("safeLoad","load"),LS("safeLoadAll","loadAll"),LS("safeDump","dump")});function MA(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function DA(t){jA=t}function OA(t,e=""){let n="string"==typeof t?t:t.source,i={replace:me((t,e)=>{let r="string"==typeof e?e:e.source;return r=r.replace(YA.caret,"$1"),n=n.replace(t,r),i},"replace"),getRegex:me(()=>new RegExp(n,e),"getRegex")};return i}function PA(t,e){if(e){if(YA.escapeTest.test(t))return t.replace(YA.escapeReplace,y9)}else if(YA.escapeTestNoEncode.test(t))return t.replace(YA.escapeReplaceNoEncode,y9);return t}function BA(t){try{t=encodeURI(t).replace(YA.percentDecode,"%")}catch{return null}return t}function FA(t,e){let r=t.replace(YA.findPipe,(t,e,r)=>{let n=!1,i=e;for(;0<=--i&&"\\"===r[i];)n=!n;return n?"|":" |"}),n=r.split(YA.splitPipe),i=0;if(n[0].trim()||n.shift(),0e)n.splice(e);else for(;n.length{var e=t.match(r.other.beginningSpace);return null!==e&&([e]=e,e.length>=n.length)?t.slice(n.length):t}).join(` -`)}function qA(t,e){return C9.parse(t,e)}var jA,WA,YA,HA,VA,XA,KA,ZA,QA,JA,t9,e9,r9,n9,i9,a9,s9,o9,l9,c9,h9,u9,d9,p9,g9,f9,m9,y9,v9,x9,b9,w9,k9,T9,E9,C9,_9=t(()=>{me(MA,"_getDefaults"),jA=MA(),me(DA,"changeDefaults"),WA={exec:me(()=>null,"exec")},me(OA,"edit"),YA={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:me(t=>new RegExp(`^( {0,3}${t})((?:[ ][^\\n]*)?(?:\\n|$))`),"listItemRegex"),nextBulletRegex:me(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ ][^\\n]*)?(?:\\n|$))`),"nextBulletRegex"),hrRegex:me(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),"hrRegex"),fencesBeginRegex:me(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),"fencesBeginRegex"),headingBeginRegex:me(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),"headingBeginRegex"),htmlBeginRegex:me(t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i"),"htmlBeginRegex")},QA=/^(?:[ \t]*(?:\n|$))+/,JA=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,XA=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,n9=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,KA=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,ZA=/(?:[*+-]|\d{1,9}[.)])/,d9=OA(o9=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,ZA).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(),o9=OA(o9).replace(/bull/g,ZA).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(),h9=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,i9=/^[^\n]+/,l9=/(?!\s*\])(?:\\.|[^\[\]\\])+/,VA=OA(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",l9).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),ZA=OA(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,ZA).getRegex(),u9="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",s9=/|$))/,p9=OA("^ {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",s9).replace("tag",u9).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),a9=OA(h9).replace("hr",n9).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",u9).getRegex(),HA={blockquote:OA(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",a9).getRegex(),code:JA,def:VA,fences:XA,heading:KA,hr:n9,html:p9,lheading:d9,list:ZA,newline:QA,paragraph:a9,table:WA,text:i9},JA=OA("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",n9).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",u9).getRegex(),VA={...HA,lheading:o9,table:JA,paragraph:OA(h9).replace("hr",n9).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",JA).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",u9).getRegex()},XA={...HA,html:OA(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",s9).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:WA,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:OA(h9).replace("hr",n9).replace("heading",` *#{1,6} *[^ -]`).replace("lheading",d9).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},KA=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,p9=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,ZA=/^( {2,}|\\)\n(?!\s*$)/,QA=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,E9=OA(t9=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,"u").replace(/punct/g,a9).getRegex(),t9=OA(t9,"u").replace(/punct/g,u9).getRegex(),e9=OA(r9="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,o9).replace(/punctSpace/g,i9).replace(/punct/g,a9).getRegex(),r9=OA(r9,"gu").replace(/notPunctSpace/g,n9).replace(/punctSpace/g,h9).replace(/punct/g,u9).getRegex(),n9=OA("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,o9).replace(/punctSpace/g,i9).replace(/punct/g,a9).getRegex(),h9=OA(/\\(punct)/,"gu").replace(/punct/g,a9).getRegex(),u9=OA(/^<(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(),o9=OA(s9).replace("(?:--\x3e|$)","--\x3e").getRegex(),i9=OA("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",o9).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),a9=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,s9=OA(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",a9).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),o9=OA(/^!?\[(label)\]\[(ref)\]/).replace("label",a9).replace("ref",l9).getRegex(),l9=OA(/^!?\[(ref)\](?:\[\])?/).replace("ref",l9).getRegex(),c9=OA("reflink|nolink(?!\\()","g").replace("reflink",o9).replace("nolink",l9).getRegex(),u9={...h9={_backpedal:WA,anyPunctuation:h9,autolink:u9,blockSkip:d9,br:ZA,code:p9,del:WA,emStrongLDelim:E9,emStrongRDelimAst:e9,emStrongRDelimUnd:n9,escape:KA,link:s9,nolink:l9,punctuation:JA,reflink:o9,reflinkSearch:c9,tag:i9,text:QA,url:WA},link:OA(/^!?\[(label)\]\((.*?)\)/).replace("label",a9).getRegex(),reflink:OA(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",a9).getRegex()},d9={...h9,emStrongRDelimAst:r9,emStrongLDelim:t9,url:OA(/^((?: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~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},y9=me(t=>m9[t],"getEscapeReplacement"),me(PA,"escape"),me(BA,"cleanUrl"),me(FA,"splitCells"),me($A,"rtrim"),me(zA,"findClosingBracket"),me(GA,"outputLink"),me(UA,"indentCodeCompensation"),v9=class{static{me(this,"_Tokenizer")}options;rules;lexer;constructor(t){this.options=t||jA}space(t){if((t=this.rules.block.newline.exec(t))&&0t&&a tag resolver accepts not "'+a+'" style');n=i.represent[a](t,a)}e.dump=n}return!0}return!1}function EA(e,t,r,n,i,a,s){e.tag=null,e.dump=r,TA(e,r,!1)||TA(e,r,!0);var o,l,c=m9.call(e.dump),h=n,u=(n=n&&(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 CA(e,t){var r,n,i=[],a=[];for(SA(e,i,a),r=0,n=a.length;r{for(mt(ES,"isNothing"),mt(CS,"isObject"),mt(SS,"toArray"),mt(_S,"extend"),mt(AS,"repeat"),mt(LS,"isNegativeZero"),LA={isNothing:ES,isObject:CS,toArray:SS,repeat:AS,isNegativeZero:LS,extend:_S},mt(NS,"formatError"),mt(IS,"YAMLException$1"),((IS.prototype=Object.create(Error.prototype)).constructor=IS).prototype.toString=mt(function(e){return this.name+": "+NS(this,e)},"toString"),NA=IS,mt(RS,"getLine"),mt(MS,"padStart"),mt(DS,"makeSnippet"),IA=DS,RA=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],MA=["scalar","sequence","mapping"],mt(OS,"compileStyleAliases"),mt(PS,"Type$1"),DA=PS,mt(BS,"compileList"),mt($S,"compileMap"),mt(FS,"Schema$1"),FS.prototype.extend=mt(function(e){var t=[],r=[];if(e instanceof DA)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 NA("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 DA))throw new NA("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(e.loadKind&&"scalar"!==e.loadKind)throw new NA("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 NA("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 DA))throw new NA("Specified list of YAML types (or a single Type object) contains a non-Type object.")}),(e=Object.create(FS.prototype)).implicit=(this.implicit||[]).concat(t),e.explicit=(this.explicit||[]).concat(r),e.compiledImplicit=BS(e,"implicit"),e.compiledExplicit=BS(e,"explicit"),e.compiledTypeMap=$S(e.compiledImplicit,e.compiledExplicit),e},"extend"),BA=FS,f9=new DA("tag:yaml.org,2002:str",{kind:"scalar",construct:mt(function(e){return null!==e?e:""},"construct")}),zA=new DA("tag:yaml.org,2002:seq",{kind:"sequence",construct:mt(function(e){return null!==e?e:[]},"construct")}),GA=new DA("tag:yaml.org,2002:map",{kind:"mapping",construct:mt(function(e){return null!==e?e:{}},"construct")}),BA=new BA({explicit:[f9,zA,GA]}),mt(zS,"resolveYamlNull"),mt(GS,"constructYamlNull"),mt(US,"isNull"),f9=new DA("tag:yaml.org,2002:null",{kind:"scalar",resolve:zS,construct:GS,predicate:US,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(qS,"resolveYamlBoolean"),mt(jS,"constructYamlBoolean"),mt(WS,"isBoolean"),zA=new DA("tag:yaml.org,2002:bool",{kind:"scalar",resolve:qS,construct:jS,predicate:WS,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(YS,"isHexCode"),mt(HS,"isOctCode"),mt(VS,"isDecCode"),mt(XS,"resolveYamlInteger"),mt(KS,"constructYamlInteger"),mt(ZS,"isInteger"),GA=new DA("tag:yaml.org,2002:int",{kind:"scalar",resolve:XS,construct:KS,predicate:ZS,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"]}}),OA=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),mt(QS,"resolveYamlFloat"),mt(JS,"constructYamlFloat"),PA=/^[-+]?[0-9]+e/,mt(e_,"representYamlFloat"),mt(t_,"isFloat"),qA=new DA("tag:yaml.org,2002:float",{kind:"scalar",resolve:QS,construct:JS,predicate:t_,represent:e_,defaultStyle:"lowercase"}),BA=BA.extend({implicit:[f9,zA,GA,qA]}),f9=BA,$A=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),FA=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(r_,"resolveYamlTimestamp"),mt(n_,"constructYamlTimestamp"),mt(i_,"representYamlTimestamp"),zA=new DA("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:r_,construct:n_,instanceOf:Date,represent:i_}),mt(a_,"resolveYamlMerge"),GA=new DA("tag:yaml.org,2002:merge",{kind:"scalar",resolve:a_}),UA=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/= +\r`,mt(s_,"resolveYamlBinary"),mt(o_,"constructYamlBinary"),mt(l_,"representYamlBinary"),mt(c_,"isBinary"),qA=new DA("tag:yaml.org,2002:binary",{kind:"scalar",resolve:s_,construct:o_,predicate:c_,represent:l_}),jA=Object.prototype.hasOwnProperty,WA=Object.prototype.toString,mt(h_,"resolveYamlOmap"),mt(u_,"constructYamlOmap"),YA=new DA("tag:yaml.org,2002:omap",{kind:"sequence",resolve:h_,construct:u_}),HA=Object.prototype.toString,mt(d_,"resolveYamlPairs"),mt(p_,"constructYamlPairs"),VA=new DA("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:d_,construct:p_}),XA=Object.prototype.hasOwnProperty,mt(g_,"resolveYamlSet"),mt(f_,"constructYamlSet"),KA=new DA("tag:yaml.org,2002:set",{kind:"mapping",resolve:g_,construct:f_}),ZA=f9.extend({implicit:[zA,GA],explicit:[qA,YA,VA,KA]}),QA=Object.prototype.hasOwnProperty,r9=4,n9=JA=1,i9=e9=2,a9=t9=3,s9=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,o9=/[\x85\u2028\u2029]/,l9=/[,\[\]\{\}]/,c9=/^(?:!|!!|![a-z\-]+!)$/i,h9=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i,mt(m_,"_class"),mt(y_,"is_EOL"),mt(v_,"is_WHITE_SPACE"),mt(x_,"is_WS_OR_EOL"),mt(b_,"is_FLOW_INDICATOR"),mt(w_,"fromHexCode"),mt(k_,"escapedHexLen"),mt(T_,"fromDecimalCode"),mt(E_,"simpleEscapeSequence"),mt(C_,"charFromCodepoint"),u9=new Array(256),d9=new Array(256),p9=0;p9<256;p9++)u9[p9]=E_(p9)?1:0,d9[p9]=E_(p9);mt(S_,"State$1"),mt(__,"generateError"),mt(A_,"throwError"),mt(L_,"throwWarning"),g9={YAML:mt(function(e,t,r){var n,i;null!==e.version&&A_(e,"duplication of %YAML directive"),1!==r.length&&A_(e,"YAML directive accepts exactly one argument"),null===(i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]))&&A_(e,"ill-formed argument of the YAML directive"),n=parseInt(i[1],10),i=parseInt(i[2],10),1!==n&&A_(e,"unacceptable YAML version of the document"),e.version=r[0],e.checkLineBreaks=i<2,1!==i&&2!==i&&L_(e,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:mt(function(e,t,r){var n;2!==r.length&&A_(e,"TAG directive accepts exactly two arguments"),n=r[1],c9.test(r=r[0])||A_(e,"ill-formed tag handle (first argument) of the TAG directive"),QA.call(e.tagMap,r)&&A_(e,'there is a previously declared suffix for "'+r+'" tag handle'),h9.test(n)||A_(e,"ill-formed tag prefix (second argument) of the TAG directive");try{n=decodeURIComponent(n)}catch{A_(e,"tag prefix is malformed: "+n)}e.tagMap[r]=n},"handleTagDirective")},mt(N_,"captureSegment"),mt(I_,"mergeMappings"),mt(R_,"storeMappingPair"),mt(M_,"readLineBreak"),mt(D_,"skipSeparationSpace"),mt(O_,"testDocumentSeparator"),mt(P_,"writeFoldedLines"),mt(B_,"readPlainScalar"),mt($_,"readSingleQuotedScalar"),mt(F_,"readDoubleQuotedScalar"),mt(z_,"readFlowCollection"),mt(G_,"readBlockScalar"),mt(U_,"readBlockSequence"),mt(q_,"readBlockMapping"),mt(j_,"readTagProperty"),mt(W_,"readAnchorProperty"),mt(Y_,"readAlias"),mt(H_,"composeNode"),mt(V_,"readDocument"),mt(X_,"loadDocuments"),mt(K_,"loadAll$1"),mt(Z_,"load$1"),f9={loadAll:K_,load:Z_},m9=Object.prototype.toString,y9=Object.prototype.hasOwnProperty,v9=65279,x9=10,b9={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"},w9=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],k9=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/,mt(Q_,"compileStyleMap"),mt(J_,"encodeHex"),T9=2,mt(eA,"State"),mt(tA,"indentString"),mt(rA,"generateNextLine"),mt(nA,"testImplicitResolving"),mt(iA,"isWhitespace"),mt(aA,"isPrintable"),mt(sA,"isNsCharOrWhitespace"),mt(oA,"isPlainSafe"),mt(lA,"isPlainSafeFirst"),mt(cA,"isPlainSafeLast"),mt(hA,"codePointAt"),mt(uA,"needIndentIndicator"),E9=1,C9=2,S9=3,_9=4,A9=5,mt(dA,"chooseScalarStyle"),mt(pA,"writeScalar"),mt(gA,"blockHeader"),mt(fA,"dropEndingNewline"),mt(mA,"foldString"),mt(yA,"foldLine"),mt(vA,"escapeString"),mt(xA,"writeFlowSequence"),mt(bA,"writeBlockSequence"),mt(wA,"writeFlowMapping"),mt(kA,"writeBlockMapping"),mt(TA,"detectType"),mt(EA,"writeNode"),mt(CA,"getDuplicateReferences"),mt(SA,"inspectNode"),mt(_A,"dump$1"),mt(AA,"renamed"),L9=BA,N9=f9.load,AA("safeLoad","load"),AA("safeLoadAll","loadAll"),AA("safeDump","dump")});function R9(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}}function M9(e){q9=e}function D9(e,t=""){let n="string"==typeof e?e:e.source,i={replace:mt((e,t)=>{let r="string"==typeof t?t:t.source;return r=r.replace(W9.caret,"$1"),n=n.replace(e,r),i},"replace"),getRegex:mt(()=>new RegExp(n,t),"getRegex")};return i}function O9(e,t){if(t){if(W9.escapeTest.test(e))return e.replace(W9.escapeReplace,mL)}else if(W9.escapeTestNoEncode.test(e))return e.replace(W9.escapeReplaceNoEncode,mL);return e}function P9(e){try{e=encodeURI(e).replace(W9.percentDecode,"%")}catch{return null}return e}function B9(e,t){let r=e.replace(W9.findPipe,(e,t,r)=>{let n=!1,i=t;for(;0<=--i&&"\\"===r[i];)n=!n;return n?"|":" |"}),n=r.split(W9.splitPipe),i=0;if(n[0].trim()||n.shift(),0t)n.splice(t);else for(;n.length{var t=e.match(r.other.beginningSpace);return null!==t&&([t]=t,t.length>=n.length)?e.slice(n.length):e}).join(` +`)}function U9(e,t){return EL.parse(e,t)}var q9,j9,W9,Y9,H9,V9,X9,K9,Z9,Q9,J9,eL,tL,rL,nL,iL,aL,sL,oL,lL,cL,hL,uL,dL,pL,gL,fL,mL,yL,vL,xL,bL,wL,kL,TL,EL,CL=e(()=>{mt(R9,"_getDefaults"),q9=R9(),mt(M9,"changeDefaults"),j9={exec:mt(()=>null,"exec")},mt(D9,"edit"),W9={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")},Z9=/^(?:[ \t]*(?:\n|$))+/,Q9=/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,V9=/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,rL=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,X9=/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,K9=/(?:[*+-]|\d{1,9}[.)])/,uL=D9(sL=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/).replace(/bull/g,K9).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(),sL=D9(sL).replace(/bull/g,K9).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(),cL=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,nL=/^[^\n]+/,oL=/(?!\s*\])(?:\\.|[^\[\]\\])+/,H9=D9(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",oL).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),K9=D9(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,K9).getRegex(),hL="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",aL=/|$))/,dL=D9("^ {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",aL).replace("tag",hL).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),iL=D9(cL).replace("hr",rL).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",hL).getRegex(),Y9={blockquote:D9(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",iL).getRegex(),code:Q9,def:H9,fences:V9,heading:X9,hr:rL,html:dL,lheading:uL,list:K9,newline:Z9,paragraph:iL,table:j9,text:nL},Q9=D9("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",rL).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",hL).getRegex(),H9={...Y9,lheading:sL,table:Q9,paragraph:D9(cL).replace("hr",rL).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",Q9).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",hL).getRegex()},V9={...Y9,html:D9(`^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+? *(?:\\n{2,}|\\s*$)|\\s]*)*?/?> *(?:\\n{2,}|\\s*$))`).replace("comment",aL).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:j9,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:D9(cL).replace("hr",rL).replace("heading",` *#{1,6} *[^ +]`).replace("lheading",uL).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},X9=/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,dL=/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,K9=/^( {2,}|\\)\n(?!\s*$)/,Z9=/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\]*?>/g,TL=D9(J9=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,"u").replace(/punct/g,iL).getRegex(),J9=D9(J9,"u").replace(/punct/g,hL).getRegex(),eL=D9(tL="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)","gu").replace(/notPunctSpace/g,sL).replace(/punctSpace/g,nL).replace(/punct/g,iL).getRegex(),tL=D9(tL,"gu").replace(/notPunctSpace/g,rL).replace(/punctSpace/g,cL).replace(/punct/g,hL).getRegex(),rL=D9("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,sL).replace(/punctSpace/g,nL).replace(/punct/g,iL).getRegex(),cL=D9(/\\(punct)/,"gu").replace(/punct/g,iL).getRegex(),hL=D9(/^<(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(),sL=D9(aL).replace("(?:--\x3e|$)","--\x3e").getRegex(),nL=D9("^comment|^|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^|^").replace("comment",sL).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),iL=/(?:\[(?:\\.|[^\[\]\\])*\]|\\.|`[^`]*`|[^\[\]\\`])*?/,aL=D9(/^!?\[(label)\]\(\s*(href)(?:\s+(title))?\s*\)/).replace("label",iL).replace("href",/<(?:\\.|[^\n<>\\])+>|[^\s\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),sL=D9(/^!?\[(label)\]\[(ref)\]/).replace("label",iL).replace("ref",oL).getRegex(),oL=D9(/^!?\[(ref)\](?:\[\])?/).replace("ref",oL).getRegex(),lL=D9("reflink|nolink(?!\\()","g").replace("reflink",sL).replace("nolink",oL).getRegex(),hL={...cL={_backpedal:j9,anyPunctuation:cL,autolink:hL,blockSkip:uL,br:K9,code:dL,del:j9,emStrongLDelim:TL,emStrongRDelimAst:eL,emStrongRDelimUnd:rL,escape:X9,link:aL,nolink:oL,punctuation:Q9,reflink:sL,reflinkSearch:lL,tag:nL,text:Z9,url:j9},link:D9(/^!?\[(label)\]\((.*?)\)/).replace("label",iL).getRegex(),reflink:D9(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",iL).getRegex()},uL={...cL,emStrongRDelimAst:tL,emStrongLDelim:J9,url:D9(/^((?: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~\\]))\1(?=[^~]|$)/,text:/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\":">",'"':""","'":"'"},mL=mt(e=>fL[e],"getEscapeReplacement"),mt(O9,"escape"),mt(P9,"cleanUrl"),mt(B9,"splitCells"),mt($9,"rtrim"),mt(F9,"findClosingBracket"),mt(z9,"outputLink"),mt(G9,"indentCodeCompensation"),yL=class{static{mt(this,"_Tokenizer")}options;rules;lexer;constructor(e){this.options=e||q9}space(e){if((e=this.rules.block.newline.exec(e))&&0" ".repeat(3*t.length)),i=d.split(` -`,1)[0],a=!n.trim(),s=0;if(this.options.pedantic?(s=2,r=n.trimStart()):a?s=p[1].length+1:(s=4<(s=p[2].search(this.rules.other.nonSpaceChar))?1:s,r=n.slice(s),s+=p[1].length),a&&this.rules.other.blankLine.test(i)&&(e+=i+` -`,d=d.substring(i.length+1),t=!0),!t)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 x,b=d.split(` +`))}return{type:"blockquote",raw:i,tokens:s,text:a}}}list(d){let p=this.rules.block.list.exec(d);if(p){let e=p[1].trim(),t=1" ".repeat(3*e.length)),i=d.split(` +`,1)[0],a=!n.trim(),s=0;if(this.options.pedantic?(s=2,r=n.trimStart()):a?s=p[1].length+1:(s=4<(s=p[2].search(this.rules.other.nonSpaceChar))?1:s,r=n.slice(s),s+=p[1].length),a&&this.rules.other.blankLine.test(i)&&(t+=i+` +`,d=d.substring(i.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 x,b=d.split(` `,1)[0];if(i=b,x=this.options.pedantic?i=i.replace(this.rules.other.listReplaceNesting," "):i.replace(this.rules.other.tabCharGlobal," "),m.test(i)||y.test(i)||v.test(i)||g.test(i)||f.test(i))break;if(x.search(this.rules.other.nonSpaceChar)>=s||!i.trim())r+=` `+x.slice(s);else{if(a||4<=n.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)||m.test(n)||y.test(n)||f.test(n))break;r+=` -`+i}a||i.trim()||(a=!0),e+=b+` -`,d=d.substring(b.length+1),n=x.slice(s)}c.loose||(u?c.loose=!0:this.rules.other.doubleBlankLine.test(e)&&(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:e,task:!!o,checked:l,loose:!1,text:r,tokens:[]}),c.raw+=e}var r,n=c.items.at(-1);if(n){n.raw=n.raw.trimEnd(),n.text=n.text.trimEnd(),c.raw=c.raw.trimEnd();for(let t=0;t"space"===t.type)).length&&r.some(t=>this.rules.other.anyLine.test(t.raw)),c.loose=r);if(c.loose)for(let t=0;t({text:t,tokens:this.lexer.inline(t),header:!1,align:n.align[e]})));return n}}}lheading(t){if(t=this.rules.block.lheading.exec(t))return{type:"heading",raw:t[0],depth:"="===t[2].charAt(0)?1:2,text:t[1],tokens:this.lexer.inline(t[1])}}paragraph(t){var e;if(t=this.rules.block.paragraph.exec(t))return e=t[1].charAt(t[1].length-1)===` -`?t[1].slice(0,-1):t[1],{type:"paragraph",raw:t[0],text:e,tokens:this.lexer.inline(e)}}text(t){if(t=this.rules.block.text.exec(t))return{type:"text",raw:t[0],text:t[0],tokens:this.lexer.inline(t[0])}}escape(t){if(t=this.rules.inline.escape.exec(t))return{type:"escape",raw:t[0],text:t[1]}}tag(t){if(t=this.rules.inline.tag.exec(t))return!this.lexer.state.inLink&&this.rules.other.startATag.test(t[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(t[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(t[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(t[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:t[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:t[0]}}link(r){if(r=this.rules.inline.link.exec(r)){var n,i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;var a=$A(i.slice(0,-1),"\\");if((i.length-a.length)%2==0)return}else-1<(a=zA(r[2],"()"))&&(n=(0===r[0].indexOf("!")?5:4)+r[1].length+a,r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,n).trim(),r[3]="");let t=r[2],e="";return this.options.pedantic?(a=this.rules.other.pedanticHrefTitle.exec(t))&&(t=a[1],e=a[3]):e=r[3]?r[3].slice(1,-1):"",t=t.trim(),GA(r,{href:(t=this.rules.other.startAngleBracket.test(t)?this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?t.slice(1):t.slice(1,-1):t)&&t.replace(this.rules.inline.anyPunctuation,"$1"),title:e&&e.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(t,e){var r;if(r=(r=this.rules.inline.reflink.exec(t))||this.rules.inline.nolink.exec(t))return(t=e[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()])?GA(r,t,r[0],this.lexer,this.rules):{type:"text",raw:e=r[0].charAt(0),text:e}}emStrong(s,o,t=""){let l=this.rules.inline.emStrongLDelim.exec(s);if(!(!l||l[3]&&t.match(this.rules.other.unicodeAlphaNumeric))&&(!l[1]&&!l[2]||!t||this.rules.inline.punctuation.exec(t))){let t=[...l[0]].length-1,e,r,n=t,i=0,a="*"===l[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(a.lastIndex=0,o=o.slice(-1*s.length+t);null!=(l=a.exec(o));){var c,h;if(e=l[1]||l[2]||l[3]||l[4]||l[5]||l[6])if(r=[...e].length,l[3]||l[4])n+=r;else if((l[5]||l[6])&&t%3&&!((t+r)%3))i+=r;else if(!(0<(n-=r)))return r=Math.min(r,r+n+i),c=[...l[0]][0].length,c=s.slice(0,t+l.index+c+r),Math.min(t,r)%2?(h=c.slice(1,-1),{type:"em",raw:c,text:h,tokens:this.lexer.inlineTokens(h)}):(h=c.slice(2,-2),{type:"strong",raw:c,text:h,tokens:this.lexer.inlineTokens(h)})}}}codespan(n){if(n=this.rules.inline.code.exec(n)){let t=n[2].replace(this.rules.other.newLineCharGlobal," "),e=this.rules.other.nonSpaceChar.test(t),r=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return e&&r&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:n[0],text:t}}}br(t){if(t=this.rules.inline.br.exec(t))return{type:"br",raw:t[0]}}del(t){if(t=this.rules.inline.del.exec(t))return{type:"del",raw:t[0],text:t[2],tokens:this.lexer.inlineTokens(t[2])}}autolink(r){if(r=this.rules.inline.autolink.exec(r)){let t,e;return e="@"===r[2]?"mailto:"+(t=r[1]):t=r[1],{type:"link",raw:r[0],text:t,href:e,tokens:[{type:"text",raw:t,text:t}]}}}url(t){var r,n;if(r=this.rules.inline.url.exec(t)){let t,e;if("@"===r[2])t=r[0],e="mailto:"+t;else{for(;n=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"",n!==r[0];);t=r[0],e="www."===r[1]?"http://"+r[0]:r[0]}return{type:"link",raw:r[0],text:t,href:e,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){var e;if(t=this.rules.inline.text.exec(t))return e=this.lexer.state.inRawBlock,{type:"text",raw:t[0],text:t[0],escaped:e}}},x9=class r{static{me(this,"_Lexer")}tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||jA,this.options.tokenizer=this.options.tokenizer||new v9,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,(this.tokenizer.lexer=this).inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0},t={other:YA,block:g9.normal,inline:f9.normal},this.options.pedantic?(t.block=g9.pedantic,t.inline=f9.pedantic):this.options.gfm&&(t.block=g9.gfm,this.options.breaks?t.inline=f9.breaks:t.inline=f9.gfm),this.tokenizer.rules=t}static get rules(){return{block:g9,inline:f9}}static lex(t,e){return new r(e).lex(t)}static lexInline(t,e){return new r(e).inlineTokens(t)}lex(t){t=t.replace(YA.carriageReturn,` -`),this.blockTokens(t,this.tokens);for(let t=0;t!!(e=t.call({lexer:this},i,r))&&(i=i.substring(e.raw.length),r.push(e),!0)))if(e=this.tokenizer.space(i)){i=i.substring(e.raw.length);var t=r.at(-1);1===e.raw.length&&void 0!==t?t.raw+=` -`:r.push(e)}else if(e=this.tokenizer.code(i))i=i.substring(e.raw.length),"paragraph"===(t=r.at(-1))?.type||"text"===t?.type?(t.raw+=` -`+e.raw,t.text+=` -`+e.text,this.inlineQueue.at(-1).src=t.text):r.push(e);else if(e=this.tokenizer.fences(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.heading(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.hr(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.blockquote(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.list(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.html(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.def(i)){i=i.substring(e.raw.length);var a=r.at(-1);"paragraph"===a?.type||"text"===a?.type?(a.raw+=` -`+e.raw,a.text+=` -`+e.raw,this.inlineQueue.at(-1).src=a.text):this.tokens.links[e.tag]||(this.tokens.links[e.tag]={href:e.href,title:e.title})}else if(e=this.tokenizer.table(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.lheading(i))i=i.substring(e.raw.length),r.push(e);else{let t=i;if(this.options.extensions?.startBlock){let e=1/0,r=i.slice(1),n;this.options.extensions.startBlock.forEach(t=>{"number"==typeof(n=t.call({lexer:this},r))&&0<=n&&(e=Math.min(e,n))}),e<1/0&&0<=e&&(t=i.substring(0,e+1))}if(this.state.top&&(e=this.tokenizer.paragraph(t)))a=r.at(-1),n&&"paragraph"===a?.type?(a.raw+=` -`+e.raw,a.text+=` -`+e.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(e),n=t.length!==i.length,i=i.substring(e.raw.length);else if(e=this.tokenizer.text(i)){i=i.substring(e.raw.length);var s=r.at(-1);"text"===s?.type?(s.raw+=` -`+e.raw,s.text+=` -`+e.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(e)}else if(i){if(s="Infinite loop on byte: "+i.charCodeAt(0),this.options.silent){console.error(s);break}throw new Error(s)}}}return this.state.top=!0,r}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(i,r=[]){let t=i,e=null;if(this.tokens.links){var n=Object.keys(this.tokens.links);if(0!!(e=t.call({lexer:this},i,r))&&(i=i.substring(e.raw.length),r.push(e),!0)))if(e=this.tokenizer.escape(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.tag(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.link(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.reflink(i,this.tokens.links)){i=i.substring(e.raw.length);var o=r.at(-1);"text"===e.type&&"text"===o?.type?(o.raw+=e.raw,o.text+=e.text):r.push(e)}else if(e=this.tokenizer.emStrong(i,t,s))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.codespan(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.br(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.del(i))i=i.substring(e.raw.length),r.push(e);else if(e=this.tokenizer.autolink(i))i=i.substring(e.raw.length),r.push(e);else if(!this.state.inLink&&(e=this.tokenizer.url(i)))i=i.substring(e.raw.length),r.push(e);else{let t=i;if(this.options.extensions?.startInline){let e=1/0,r=i.slice(1),n;this.options.extensions.startInline.forEach(t=>{"number"==typeof(n=t.call({lexer:this},r))&&0<=n&&(e=Math.min(e,n))}),e<1/0&&0<=e&&(t=i.substring(0,e+1))}if(e=this.tokenizer.inlineText(t))i=i.substring(e.raw.length),"_"!==e.raw.slice(-1)&&(s=e.raw.slice(-1)),a=!0,"text"===(o=r.at(-1))?.type?(o.raw+=e.raw,o.text+=e.text):r.push(e);else if(i){var l="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(l);break}throw new Error(l)}}}return r}},b9=class{static{me(this,"_Renderer")}options;parser;constructor(t){this.options=t||jA}space(t){return""}code({text:t,lang:e,escaped:r}){return e=(e||"").match(YA.notSpaceStart)?.[0],t=t.replace(YA.endingNewline,"")+` -`,e?'
'+(r?t:PA(t,!0))+`
-`:"
"+(r?t:PA(t,!0))+`
-`}blockquote({tokens:t}){return`
-${this.parser.parse(t)}
-`}html({text:t}){return t}heading({tokens:t,depth:e}){return`${this.parser.parseInline(t)} -`}hr(t){return`
-`}list(e){let t=e.ordered,r=e.start,n="";for(let t=0;t +`+i}a||i.trim()||(a=!0),t+=b+` +`,d=d.substring(b.length+1),n=x.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,n=c.items.at(-1);if(n){n.raw=n.raw.trimEnd(),n.text=n.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:n.align[t]})));return n}}}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 n,i=r[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(i)){if(!this.rules.other.endAngleBracket.test(i))return;var a=$9(i.slice(0,-1),"\\");if((i.length-a.length)%2==0)return}else-1<(a=F9(r[2],"()"))&&(n=(0===r[0].indexOf("!")?5:4)+r[1].length+a,r[2]=r[2].substring(0,a),r[0]=r[0].substring(0,n).trim(),r[3]="");let e=r[2],t="";return this.options.pedantic?(a=this.rules.other.pedanticHrefTitle.exec(e))&&(e=a[1],t=a[3]):t=r[3]?r[3].slice(1,-1):"",e=e.trim(),z9(r,{href:(e=this.rules.other.startAngleBracket.test(e)?this.options.pedantic&&!this.rules.other.endAngleBracket.test(i)?e.slice(1):e.slice(1,-1):e)&&e.replace(this.rules.inline.anyPunctuation,"$1"),title:t&&t.replace(this.rules.inline.anyPunctuation,"$1")},r[0],this.lexer,this.rules)}}reflink(e,t){var r;if(r=(r=this.rules.inline.reflink.exec(e))||this.rules.inline.nolink.exec(e))return(e=t[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()])?z9(r,e,r[0],this.lexer,this.rules):{type:"text",raw:t=r[0].charAt(0),text:t}}emStrong(s,o,e=""){let l=this.rules.inline.emStrongLDelim.exec(s);if(!(!l||l[3]&&e.match(this.rules.other.unicodeAlphaNumeric))&&(!l[1]&&!l[2]||!e||this.rules.inline.punctuation.exec(e))){let e=[...l[0]].length-1,t,r,n=e,i=0,a="*"===l[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(a.lastIndex=0,o=o.slice(-1*s.length+e);null!=(l=a.exec(o));){var c,h;if(t=l[1]||l[2]||l[3]||l[4]||l[5]||l[6])if(r=[...t].length,l[3]||l[4])n+=r;else if((l[5]||l[6])&&e%3&&!((e+r)%3))i+=r;else if(!(0<(n-=r)))return r=Math.min(r,r+n+i),c=[...l[0]][0].length,c=s.slice(0,e+l.index+c+r),Math.min(e,r)%2?(h=c.slice(1,-1),{type:"em",raw:c,text:h,tokens:this.lexer.inlineTokens(h)}):(h=c.slice(2,-2),{type:"strong",raw:c,text:h,tokens:this.lexer.inlineTokens(h)})}}}codespan(n){if(n=this.rules.inline.code.exec(n)){let e=n[2].replace(this.rules.other.newLineCharGlobal," "),t=this.rules.other.nonSpaceChar.test(e),r=this.rules.other.startingSpaceChar.test(e)&&this.rules.other.endingSpaceChar.test(e);return t&&r&&(e=e.substring(1,e.length-1)),{type:"codespan",raw:n[0],text:e}}}br(e){if(e=this.rules.inline.br.exec(e))return{type:"br",raw:e[0]}}del(e){if(e=this.rules.inline.del.exec(e))return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(r){if(r=this.rules.inline.autolink.exec(r)){let e,t;return t="@"===r[2]?"mailto:"+(e=r[1]):e=r[1],{type:"link",raw:r[0],text:e,href:t,tokens:[{type:"text",raw:e,text:e}]}}}url(e){var r,n;if(r=this.rules.inline.url.exec(e)){let e,t;if("@"===r[2])e=r[0],t="mailto:"+e;else{for(;n=r[0],r[0]=this.rules.inline._backpedal.exec(r[0])?.[0]??"",n!==r[0];);e=r[0],t="www."===r[1]?"http://"+r[0]:r[0]}return{type:"link",raw:r[0],text:e,href:t,tokens:[{type:"text",raw:e,text:e}]}}}inlineText(e){var t;if(e=this.rules.inline.text.exec(e))return t=this.lexer.state.inRawBlock,{type:"text",raw:e[0],text:e[0],escaped:t}}},vL=class r{static{mt(this,"_Lexer")}tokens;options;state;tokenizer;inlineQueue;constructor(e){this.tokens=[],this.tokens.links=Object.create(null),this.options=e||q9,this.options.tokenizer=this.options.tokenizer||new yL,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,(this.tokenizer.lexer=this).inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0},e={other:W9,block:pL.normal,inline:gL.normal},this.options.pedantic?(e.block=pL.pedantic,e.inline=gL.pedantic):this.options.gfm&&(e.block=pL.gfm,this.options.breaks?e.inline=gL.breaks:e.inline=gL.gfm),this.tokenizer.rules=e}static get rules(){return{block:pL,inline:gL}}static lex(e,t){return new r(t).lex(e)}static lexInline(e,t){return new r(t).inlineTokens(e)}lex(e){e=e.replace(W9.carriageReturn,` +`),this.blockTokens(e,this.tokens);for(let e=0;e!!(t=e.call({lexer:this},i,r))&&(i=i.substring(t.raw.length),r.push(t),!0)))if(t=this.tokenizer.space(i)){i=i.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(i))i=i.substring(t.raw.length),"paragraph"===(e=r.at(-1))?.type||"text"===e?.type?(e.raw+=` +`+t.raw,e.text+=` +`+t.text,this.inlineQueue.at(-1).src=e.text):r.push(t);else if(t=this.tokenizer.fences(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.heading(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.hr(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.blockquote(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.list(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.html(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.def(i)){i=i.substring(t.raw.length);var a=r.at(-1);"paragraph"===a?.type||"text"===a?.type?(a.raw+=` +`+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})}else if(t=this.tokenizer.table(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.lheading(i))i=i.substring(t.raw.length),r.push(t);else{let e=i;if(this.options.extensions?.startBlock){let t=1/0,r=i.slice(1),n;this.options.extensions.startBlock.forEach(e=>{"number"==typeof(n=e.call({lexer:this},r))&&0<=n&&(t=Math.min(t,n))}),t<1/0&&0<=t&&(e=i.substring(0,t+1))}if(this.state.top&&(t=this.tokenizer.paragraph(e)))a=r.at(-1),n&&"paragraph"===a?.type?(a.raw+=` +`+t.raw,a.text+=` +`+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=a.text):r.push(t),n=e.length!==i.length,i=i.substring(t.raw.length);else if(t=this.tokenizer.text(i)){i=i.substring(t.raw.length);var s=r.at(-1);"text"===s?.type?(s.raw+=` +`+t.raw,s.text+=` +`+t.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=s.text):r.push(t)}else if(i){if(s="Infinite loop on byte: "+i.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(i,r=[]){let e=i,t=null;if(this.tokens.links){var n=Object.keys(this.tokens.links);if(0!!(t=e.call({lexer:this},i,r))&&(i=i.substring(t.raw.length),r.push(t),!0)))if(t=this.tokenizer.escape(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.tag(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.link(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.reflink(i,this.tokens.links)){i=i.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(i,e,s))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.codespan(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.br(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.del(i))i=i.substring(t.raw.length),r.push(t);else if(t=this.tokenizer.autolink(i))i=i.substring(t.raw.length),r.push(t);else if(!this.state.inLink&&(t=this.tokenizer.url(i)))i=i.substring(t.raw.length),r.push(t);else{let e=i;if(this.options.extensions?.startInline){let t=1/0,r=i.slice(1),n;this.options.extensions.startInline.forEach(e=>{"number"==typeof(n=e.call({lexer:this},r))&&0<=n&&(t=Math.min(t,n))}),t<1/0&&0<=t&&(e=i.substring(0,t+1))}if(t=this.tokenizer.inlineText(e))i=i.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(i){var l="Infinite loop on byte: "+i.charCodeAt(0);if(this.options.silent){console.error(l);break}throw new Error(l)}}}return r}},xL=class{static{mt(this,"_Renderer")}options;parser;constructor(e){this.options=e||q9}space(e){return""}code({text:e,lang:t,escaped:r}){return t=(t||"").match(W9.notSpaceStart)?.[0],e=e.replace(W9.endingNewline,"")+` +`,t?'
'+(r?e:O9(e,!0))+`
+`:"
"+(r?e:O9(e,!0))+`
+`}blockquote({tokens:e}){return`
+${this.parser.parse(e)}
+`}html({text:e}){return e}heading({tokens:e,depth:t}){return`${this.parser.parseInline(e)} +`}hr(e){return`
+`}list(t){let e=t.ordered,r=t.start,n="";for(let e=0;e `+n+" -`}listitem(t){let e="",r;return t.task&&(r=this.checkbox({checked:!!t.checked}),t.loose?"paragraph"===t.tokens[0]?.type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&0${e+=this.parser.parse(t.tokens,!!t.loose)} -`}checkbox({checked:t}){return"'}paragraph({tokens:t}){return`

${this.parser.parseInline(t)}

-`}table(e){let t="",r="";for(let t=0;t +`}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 -`+t+` +`+e+` `+(n=n&&`${n}`)+` -`}tablerow({text:t}){return` -${t} -`}tablecell(t){var e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+` -`}strong({tokens:t}){return`${this.parser.parseInline(t)}`}em({tokens:t}){return`${this.parser.parseInline(t)}`}codespan({text:t}){return`${PA(t,!0)}`}br(t){return"
"}del({tokens:t}){return`${this.parser.parseInline(t)}`}link({href:t,title:e,tokens:r}){var r=this.parser.parseInline(r),n=BA(t);if(null===n)return r;let i='
"}image({href:t,title:e,text:r}){var n=BA(t);if(null===n)return PA(r);let i=`${r}{t=e[t].flat(1/0),n=n.concat(this.walkTokens(t,r))}):e.tokens&&(n=n.concat(this.walkTokens(e.tokens,r)))}}return n}use(...t){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(e=>{var t={...e};if(t.async=this.defaults.async||t.async||!1,e.extensions&&(e.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let r=i.renderers[n.name];r?i.renderers[n.name]=function(...t){var e=n.renderer.apply(this,t);return!1===e?r.apply(this,t):e}:i.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||"block"!==n.level&&"inline"!==n.level)throw new Error("extension level must be 'block' or 'inline'");var t=i[n.level];t?t.unshift(n.tokenizer):i[n.level]=[n.tokenizer],n.start&&("block"===n.level?i.startBlock?i.startBlock.push(n.start):i.startBlock=[n.start]:"inline"===n.level&&(i.startInline?i.startInline.push(n.start):i.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(i.childTokens[n.name]=n.childTokens)}),t.extensions=i),e.renderer){let i=this.defaults.renderer||new b9(this.defaults);for(var a in e.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(!["options","parser"].includes(a)){let t=a,r=e.renderer[t],n=i[t];i[t]=(...t)=>{var e=r.apply(i,t);return(!1===e?n.apply(i,t):e)||""}}}t.renderer=i}if(e.tokenizer){let i=this.defaults.tokenizer||new v9(this.defaults);for(var s in e.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(!["options","rules","lexer"].includes(s)){let t=s,r=e.tokenizer[t],n=i[t];i[t]=(...t)=>{var e=r.apply(i,t);return!1===e?n.apply(i,t):e}}}t.tokenizer=i}if(e.hooks){let i=this.defaults.hooks||new T9;for(var o in e.hooks){if(!(o in i))throw new Error(`hook '${o}' does not exist`);if(!["options","block"].includes(o)){let t=o,r=e.hooks[t],n=i[t];T9.passThroughHooks.has(o)?i[t]=t=>this.defaults.async?Promise.resolve(r.call(i,t)).then(t=>n.call(i,t)):(t=r.call(i,t),n.call(i,t)):i[t]=(...t)=>{var e=r.apply(i,t);return!1===e?n.apply(i,t):e}}}t.hooks=i}if(e.walkTokens){let r=this.defaults.walkTokens,n=e.walkTokens;t.walkTokens=function(t){let e=[];return e.push(n.call(this,t)),e=r?e.concat(r.call(this,t)):e}}this.defaults={...this.defaults,...t}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return x9.lex(t,e??this.defaults)}parser(t,e){return k9.parse(t,e??this.defaults)}parseMarkdown(o){return me((r,t)=>{let e={...t},n={...this.defaults,...e},i=this.onError(!!n.silent,!!n.async);if(!0===this.defaults.async&&!1===e.async)return i(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(t,n)).then(t=>n.hooks?n.hooks.processAllTokens(t):t).then(t=>n.walkTokens?Promise.all(this.walkTokens(t,n.walkTokens)).then(()=>t):t).then(t=>s(t,n)).then(t=>n.hooks?n.hooks.postprocess(t):t).catch(i);try{n.hooks&&(r=n.hooks.preprocess(r));let t=a(r,n),e=(n.hooks&&(t=n.hooks.processAllTokens(t)),n.walkTokens&&this.walkTokens(t,n.walkTokens),s(t,n));return n.hooks?n.hooks.postprocess(e):e}catch(t){return i(t)}},"parse")}onError(r,n){return t=>{var e;if(t.message+=` -Please report this to https://github.com/markedjs/marked.`,r)return e="

An error occurred:

"+PA(t.message+"",!0)+"
",n?Promise.resolve(e):e;if(n)return Promise.reject(t);throw t}}},C9=new E9,me(qA,"marked"),qA.options=qA.setOptions=function(t){return C9.setOptions(t),DA(qA.defaults=C9.defaults),qA},qA.getDefaults=MA,qA.defaults=jA,qA.use=function(...t){return C9.use(...t),DA(qA.defaults=C9.defaults),qA},qA.walkTokens=function(t,e){return C9.walkTokens(t,e)},qA.parseInline=C9.parseInline,qA.Parser=k9,qA.parser=k9.parse,qA.Renderer=b9,qA.TextRenderer=w9,qA.Lexer=x9,qA.lexer=x9.lex,qA.Tokenizer=v9,qA.Hooks=T9,qA.parse=qA,x9.lex});function S9(t,{markdownAutoWrap:e}){return t=Wt(t.replace(//g,` +`}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`${O9(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),n=P9(e);if(null===n)return r;let i='
"}image({href:e,title:t,text:r}){var n=P9(e);if(null===n)return O9(r);let i=`${r}{e=t[e].flat(1/0),n=n.concat(this.walkTokens(e,r))}):t.tokens&&(n=n.concat(this.walkTokens(t.tokens,r)))}}return n}use(...e){let i=this.defaults.extensions||{renderers:{},childTokens:{}};return e.forEach(t=>{var e={...t};if(e.async=this.defaults.async||e.async||!1,t.extensions&&(t.extensions.forEach(n=>{if(!n.name)throw new Error("extension name required");if("renderer"in n){let r=i.renderers[n.name];r?i.renderers[n.name]=function(...e){var t=n.renderer.apply(this,e);return!1===t?r.apply(this,e):t}:i.renderers[n.name]=n.renderer}if("tokenizer"in n){if(!n.level||"block"!==n.level&&"inline"!==n.level)throw new Error("extension level must be 'block' or 'inline'");var e=i[n.level];e?e.unshift(n.tokenizer):i[n.level]=[n.tokenizer],n.start&&("block"===n.level?i.startBlock?i.startBlock.push(n.start):i.startBlock=[n.start]:"inline"===n.level&&(i.startInline?i.startInline.push(n.start):i.startInline=[n.start]))}"childTokens"in n&&n.childTokens&&(i.childTokens[n.name]=n.childTokens)}),e.extensions=i),t.renderer){let i=this.defaults.renderer||new xL(this.defaults);for(var a in t.renderer){if(!(a in i))throw new Error(`renderer '${a}' does not exist`);if(!["options","parser"].includes(a)){let e=a,r=t.renderer[e],n=i[e];i[e]=(...e)=>{var t=r.apply(i,e);return(!1===t?n.apply(i,e):t)||""}}}e.renderer=i}if(t.tokenizer){let i=this.defaults.tokenizer||new yL(this.defaults);for(var s in t.tokenizer){if(!(s in i))throw new Error(`tokenizer '${s}' does not exist`);if(!["options","rules","lexer"].includes(s)){let e=s,r=t.tokenizer[e],n=i[e];i[e]=(...e)=>{var t=r.apply(i,e);return!1===t?n.apply(i,e):t}}}e.tokenizer=i}if(t.hooks){let i=this.defaults.hooks||new kL;for(var o in t.hooks){if(!(o in i))throw new Error(`hook '${o}' does not exist`);if(!["options","block"].includes(o)){let e=o,r=t.hooks[e],n=i[e];kL.passThroughHooks.has(o)?i[e]=e=>this.defaults.async?Promise.resolve(r.call(i,e)).then(e=>n.call(i,e)):(e=r.call(i,e),n.call(i,e)):i[e]=(...e)=>{var t=r.apply(i,e);return!1===t?n.apply(i,e):t}}}e.hooks=i}if(t.walkTokens){let r=this.defaults.walkTokens,n=t.walkTokens;e.walkTokens=function(e){let t=[];return t.push(n.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 vL.lex(e,t??this.defaults)}parser(e,t){return wL.parse(e,t??this.defaults)}parseMarkdown(o){return mt((r,e)=>{let t={...e},n={...this.defaults,...t},i=this.onError(!!n.silent,!!n.async);if(!0===this.defaults.async&&!1===t.async)return i(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,n)).then(e=>n.hooks?n.hooks.processAllTokens(e):e).then(e=>n.walkTokens?Promise.all(this.walkTokens(e,n.walkTokens)).then(()=>e):e).then(e=>s(e,n)).then(e=>n.hooks?n.hooks.postprocess(e):e).catch(i);try{n.hooks&&(r=n.hooks.preprocess(r));let e=a(r,n),t=(n.hooks&&(e=n.hooks.processAllTokens(e)),n.walkTokens&&this.walkTokens(e,n.walkTokens),s(e,n));return n.hooks?n.hooks.postprocess(t):t}catch(e){return i(e)}},"parse")}onError(r,n){return e=>{var t;if(e.message+=` +Please report this to https://github.com/markedjs/marked.`,r)return t="

An error occurred:

"+O9(e.message+"",!0)+"
",n?Promise.resolve(t):t;if(n)return Promise.reject(e);throw e}}},EL=new TL,mt(U9,"marked"),U9.options=U9.setOptions=function(e){return EL.setOptions(e),M9(U9.defaults=EL.defaults),U9},U9.getDefaults=R9,U9.defaults=q9,U9.use=function(...e){return EL.use(...e),M9(U9.defaults=EL.defaults),U9},U9.walkTokens=function(e,t){return EL.walkTokens(e,t)},U9.parseInline=EL.parseInline,U9.Parser=wL,U9.parser=wL.parse,U9.Renderer=xL,U9.TextRenderer=bL,U9.Lexer=vL,U9.lexer=vL.lex,U9.Tokenizer=yL,U9.Hooks=kL,U9.parse=U9,vL.lex});function SL(e,{markdownAutoWrap:t}){return e=We(e.replace(//g,` `).replace(/\n{2,}/g,` -`)),!1===e?t.replace(/ /g," "):t}function A9(t,e={}){let r=S9(t,e),n=qA.lexer(r),i=[[]],a=0;function s(e,r="normal"){"text"===e.type?e.text.split(` -`).forEach((t,e)=>{0!==e&&(a++,i.push([])),t.split(" ").forEach(t=>{(t=t.replace(/'/g,"'"))&&i[a].push({content:t,type:r})})}):"strong"===e.type||"em"===e.type?e.tokens.forEach(t=>{s(t,e.type)}):"html"===e.type&&i[a].push({content:e.text,type:"normal"})}return me(s,"processNode"),n.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{s(t)}):"html"===t.type&&i[a].push({content:t.text,type:"normal"})}),i}function L9(t,{markdownAutoWrap:e}={}){function r(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"
").replace(/ /g," "):t.text.replace(/\n */g,"
"):"strong"===t.type?`${t.tokens?.map(r).join("")}`:"em"===t.type?`${t.tokens?.map(r).join("")}`:"paragraph"===t.type?`

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

`:"space"===t.type?"":"html"===t.type?""+t.text:"escape"===t.type?t.text:"Unsupported markdown: "+t.type}return t=qA.lexer(t),me(r,"output"),t.map(r).join("")}var N9=t(()=>{_9(),$r(),me(S9,"preprocessMarkdown"),me(A9,"markdownToLines"),me(L9,"markdownToHTML")});function I9(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function R9(t,e){return M9(t,[],I9(e.content),e.type)}function M9(t,e,r,n){var i,a,s;return 0===r.length?[{content:e.join(""),type:n},{content:"",type:n}]:([i,...a]=r,t([{content:(s=[...e,i]).join(""),type:n}])?M9(t,s,a,n):(0===e.length&&i&&(e.push(i),r.shift()),[{content:e.join(""),type:n},{content:r.join(""),type:n}]))}function D9(t,e){if(t.some(({content:t})=>t.includes(` -`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return O9(t,e)}function O9(t,e,r=[],n=[]){if(0===t.length)return 0{me(I9,"splitTextToChars"),me(R9,"splitWordToFitWidth"),me(M9,"splitWordToFitWidthRecursion"),me(D9,"splitLineToFitWidth"),me(O9,"splitLineToFitWidthRecursion")});function B9(t,e){e&&t.attr("style",e)}async function F9(t,e,r,n,i=!1){(t=t.append("foreignObject")).attr("width",10*r+"px"),t.attr("height",10*r+"px");let a=t.append("xhtml:div"),s=e.label;e.label&&qc(e.label)&&(s=await Wc(e.label.replace(L.lineBreakRegex,` -`),D()));var o=e.isNode?"nodeLabel":"edgeLabel",l=a.append("span");return l.html(s),B9(l,e.labelStyle),l.attr("class",o+" "+n),B9(a,e.labelStyle),a.style("display","table-cell"),a.style("white-space","nowrap"),a.style("line-height","1.5"),a.style("max-width",r+"px"),a.style("text-align","center"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&a.attr("class","labelBkg"),(l=a.node().getBoundingClientRect()).width===r&&(a.style("display","table"),a.style("white-space","break-spaces"),a.style("width",r+"px"),l=a.node().getBoundingClientRect()),t.node()}function $9(t,e,r){return t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em")}function z9(t,e,r){return q9(e=$9(t=t.append("text"),1,e),r),r=e.node().getComputedTextLength(),t.remove(),r}function G9(t,e,r){return q9(e=$9(t=t.append("text"),1,e),[{content:r,type:"normal"}]),(r=e.node()?.getBoundingClientRect())&&t.remove(),r}function U9(e,t,r,n=!1){let i=t.append("g"),a=i.insert("rect").attr("class","background").attr("style","stroke: none"),s=i.append("text").attr("y","-10.1"),o=0;for(var l of r){var c,h=me(t=>z9(i,1.1,t)<=e,"checkWidth");for(c of h(l)?[l]:D9(l,h))q9($9(s,o,1.1),c),o++}return(n?(t=s.node().getBBox(),a.attr("x",t.x-2).attr("y",t.y-2).attr("width",t.width+4).attr("height",t.height+4),i):s).node()}function q9(n,t){n.text(""),t.forEach((t,e)=>{var r=n.append("tspan").attr("font-style","em"===t.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===t.type?"bold":"normal");0===e?r.text(t.content):r.text(" "+t.content)})}async function j9(t){let i=[],e=(t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(e,r,n)=>(i.push((async()=>{var t=r+":"+n;return await Bt(t)?await Ft(t,void 0,{class:"label-icon"}):``})()),e)),await Promise.all(i));return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>e.shift()??"")}var W9,Y9=t(()=>{Q3(),mu(),th(),e(),N9(),ZE(),jt(),P9(),me(B9,"applyStyle"),me(F9,"addHtmlSpan"),me($9,"createTspan"),me(z9,"computeWidthOfText"),me(G9,"computeDimensionOfText"),me(U9,"createFormattedText"),me(q9,"updateTextContentAndStyles"),me(j9,"replaceIconSubstring"),W9=me(async(t,e="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:a=!0,isNode:s=!0,width:o=200,addSvgBackground:l=!1}={},c)=>(M.debug("XYZ createText",e,r,n,i,a,s,"addSvgBackground: ",l),a?(n=L9(e,c),a=await j9(XE(n)),n=e.replace(/\\\\/g,"\\"),F9(t,{isNode:s,label:qc(e)?n:a,labelStyle:r.replace("fill:","color:")},o,i,l)):(n=U9(o,t,A9(e.replace(//g,"
").replace("
","
"),c),!!e&&l),s?(a=(r=/stroke:/.exec(r)?r.replace("stroke:","lineColor:"):r).replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:"),H(n).attr("style",a)):(i=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:"),H(n).select("rect").attr("style",i.replace(/background:/g,"fill:")),o=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:"),H(n).select("text").attr("style",o)),n)),"createText")});function H9(t){return(t=t.map((t,e)=>(0===e?"M":"L")+t.x+","+t.y)).push("Z"),t.join(" ")}function V9(e,t,r,n,i,a){var s=[],o=r-e,l=2*Math.PI/(o/a),c=t+(n-t)/2;for(let t=0;t<=50;t++){var h=e+t/50*o,u=c+i*Math.sin(l*(h-e));s.push({x:h,y:u})}return s}function X9(e,r,n,i,t,a){var s=[],o=t*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let t=0;t{Y9(),mu(),Q3(),An(),th(),ZE(),K9=me(async(t,e,r)=>{let n,i=e.useHtmlLabels||Dc(D()?.htmlLabels),a=(n=r||"node default",t.insert("g").attr("class",n).attr("id",e.domId||e.id)),s=a.insert("g").attr("class","label").attr("style",wE(e.labelStyle)),o,l=(o=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0],await W9(s,Sc(XE(o),D()),{useHtmlLabels:i,width:e.width||D().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:e.labelStyle,addSvgBackground:!!e.icon||!!e.img})),c=l.getBBox(),h=(e?.padding??0)/2;if(i){var r=l.children[0],t=H(l),u=r.getElementsByTagName("img");if(u){let n=""===o.replace(/]*>/g,"").trim();await Promise.all([...u].map(r=>new Promise(e=>{function t(){var t;r.style.display="flex",r.style.flexDirection="column",n?(t=(D().fontSize?D():window.getComputedStyle(document.body)).fontSize,[t=yr.fontSize]=YE(t),r.style.minWidth=t=5*t+"px",r.style.maxWidth=t):r.style.width="100%",e(r)}me(t,"setupImage"),setTimeout(()=>{r.complete&&t()}),r.addEventListener("error",t),r.addEventListener("load",t)})))}c=r.getBoundingClientRect(),t.attr("width",c.width),t.attr("height",c.height)}return i?s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):s.attr("transform","translate(0, "+-c.height/2+")"),e.centerLabel&&s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:c,halfPadding:h,label:s}},"labelHelper"),Z9=me(async(t,e,r)=>{let n=r.useHtmlLabels||Dc(D()?.flowchart?.htmlLabels),i=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await W9(i,Sc(XE(e),D()),{useHtmlLabels:n,width:r.width||D()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),s=a.getBBox(),o=r.padding/2,l;return Dc(D()?.flowchart?.htmlLabels)&&(e=a.children[0],l=H(a),s=e.getBoundingClientRect(),l.attr("width",s.width),l.attr("height",s.height)),n?i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):i.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:t,bbox:s,halfPadding:o,label:i}},"insertLabel"),Q9=me((t,e)=>{e=e.node().getBBox(),t.width=e.width,t.height=e.height},"updateNodeBounds"),J9=me((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses"),me(H9,"createPathFromPoints"),me(V9,"generateFullSineWavePoints"),me(X9,"generateCirclePoints")});function tL(t,e){return t.intersect(e)}var eL,rL=t(()=>{me(tL,"intersectNode"),eL=tL});function nL(t,e,r,n){var i=t.x,t=t.y,a=i-n.x,s=t-n.y,o=Math.sqrt(e*e*s*s+r*r*a*a),a=Math.abs(e*r*a/o),e=(n.x{me(nL,"intersectEllipse"),iL=nL});function sL(t,e,r){return iL(t,e,e,r)}var oL,lL=t(()=>{aL(),me(sL,"intersectCircle"),oL=sL});function cL(t,e,r,n){var i,a,s,o,l=e.y-t.y,c=t.x-e.x,h=e.x*t.y-t.x*e.y,u=l*r.x+c*r.y+h,d=l*n.x+c*n.y+h;if(!(0!=u&&0!=d&&0{me(cL,"intersectLine"),me(hL,"sameSign"),uL=cL});function pL(e,r,n){let t=e.x,i=e.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof r.forEach?r.forEach(function(t){s=Math.min(s,t.x),o=Math.min(o,t.y)}):(s=Math.min(s,r.x),o=Math.min(o,r.y));var l=t-e.width/2-s,c=i-e.height/2-o;for(let t=0;t{dL(),me(pL,"intersectPolygon"),gL=pL}),CL=t(()=>{fL=me((t,e)=>{var r,n=t.x,i=t.y,a=e.x-n,e=e.y-i,s=t.width/2,t=t.height/2,t=Math.abs(e)*s>Math.abs(a)*t?(e<0&&(t=-t),r=0==e?0:t*a/e,t):(r=s=a<0?-s:s,0==a?0:s*e/a);return{x:n+r,y:i+t}},"intersectRect"),mL=fL}),_L=t(()=>{rL(),lL(),aL(),EL(),CL(),yL={node:eL,circle:oL,ellipse:iL,polygon:gL,rect:mL}}),SL=t(()=>{mu(),vL=me(t=>({fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:D().handDrawnSeed}),"solidStateFill"),xL=me(t=>({stylesMap:t=bL([...t.cssCompiledStyles||[],...t.cssStyles||[]]),stylesArray:[...t]}),"compileStyles"),bL=me(t=>{let r=new Map;return t.forEach(t=>{var[t,e]=t.split(":");r.set(t.trim(),e?.trim())}),r},"styles2Map"),wL=me(t=>"color"===t||"font-size"===t||"font-family"===t||"font-weight"===t||"font-style"===t||"text-decoration"===t||"text-align"===t||"text-transform"===t||"line-height"===t||"letter-spacing"===t||"word-spacing"===t||"text-shadow"===t||"text-overflow"===t||"white-space"===t||"word-wrap"===t||"word-break"===t||"overflow-wrap"===t||"hyphens"===t,"isLabelStyle"),kL=me(t=>{let e=xL(t).stylesArray,r=[],n=[],i=[],a=[];return e.forEach(t=>{var e=t[0];wL(e)?r.push(t.join(":")+" !important"):(n.push(t.join(":")+" !important"),e.includes("stroke")&&i.push(t.join(":")+" !important"),"fill"===e&&a.push(t.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:e,borderStyles:i,backgroundStyles:a}},"styles2String"),TL=me((t,e)=>{var{themeVariables:r,handDrawnSeed:n}=D(),{nodeBorder:r,mainBkg:i}=r,t=xL(t).stylesMap;return Object.assign({roughness:.7,fill:t.get("fill")||i,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:t.get("stroke")||r,seed:n,strokeWidth:t.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0]},e)},"userNodeOverrides")});function AL(t,e,r){if(t&&t.length){var n,[i,a]=e,e=Math.PI/180*r,s=Math.cos(e),o=Math.sin(e);for(n of t){var[l,c]=n;n[0]=(l-i)*s-(c-a)*o+i,n[1]=(l-i)*o+(c-a)*s+a}}}function LL(t,e){return t[0]===e[0]&&t[1]===e[1]}function NL(t,r,n,e=1){var i=n,n=Math.max(r,.1),p=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,a=[0,0];if(i)for(var s of p)AL(s,a,i);if(r=((e,i)=>{var t,r=[];for(t of p){var n=[...t];LL(n[0],n[n.length-1])||n.push([n[0][0],n[0][1]]),2t.ymine.ymin?1:t.xe.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),o.length){let r=[],n=o[0].ymin,t=0;for(;r.length||o.length;){if(o.length){let e=-1;for(let t=0;tn);t++)e=t;o.splice(0,e+1).forEach(t=>{r.push({s:n,edge:t})})}if((r=r.filter(t=>!(t.edge.ymax<=n))).sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==i||t%e==0)&&1=r.length);t+=2){var u=r[t].edge,d=r[d].edge;s.push([[Math.round(u.x),n],[Math.round(d.x),n]])}n+=i,r.forEach(t=>{t.edge.x=t.edge.x+i*t.edge.islope}),t++}}return s})(n,e),i){for(var o of p)AL(o,a,-i);{t=a,n=-i;let e=[];r.forEach(t=>e.push(...t)),AL(e,t,n)}}return r}function IL(t,e){let r,n=e.hachureAngle+90,i=e.hachureGap,a=(i<0&&(i=4*e.strokeWidth),i=Math.round(Math.max(i,.1)),1);return 1<=e.roughness&&.7<((null==(r=e.randomizer)?void 0:r.next())||Math.random())&&(a=i),NL(t,i,n,a||1)}function RL(t){var e=t[0],t=t[1];return Math.sqrt(Math.pow(e[0]-t[0],2)+Math.pow(e[1]-t[1],2))}function ML(t,e){return t.type===e}function DL(t){let n=[],i=(t=>{for(var e=new Array;""!==t;){if(!t.match(/^([ \t\r\n,]+)/))if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:TN,text:RegExp.$1};else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:EN,text:""+parseFloat(RegExp.$1)}}t=t.substr(RegExp.$1.length)}return e[e.length]={type:CN,text:""},e})(t),a="BOD",s=0,o=i[s];for(;!ML(o,CN);){let e=0,r=[];if("BOD"===a){if("M"!==o.text&&"m"!==o.text)return DL("M0,0"+t);s++,e=_N[o.text],a=o.text}else ML(o,EN)?e=_N[a]:(s++,e=_N[o.text],a=o.text);if(!(s+ee%2?t+n:t+r);a.push({key:"C",data:l}),r=l[4],n=l[5];break;case"Q":a.push({key:"Q",data:[...o]}),r=o[2],n=o[3];break;case"q":l=o.map((t,e)=>e%2?t+n:t+r),a.push({key:"Q",data:l}),r=l[2],n=l[3];break;case"A":a.push({key:"A",data:[...o]}),r=o[5],n=o[6];break;case"a":r+=o[5],n+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],r,n]});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]}),n=o[0];break;case"v":n+=o[0],a.push({key:"V",data:[n]});break;case"S":a.push({key:"S",data:[...o]}),r=o[2],n=o[3];break;case"s":var c=o.map((t,e)=>e%2?t+n:t+r);a.push({key:"S",data:c}),r=c[2],n=c[3];break;case"T":a.push({key:"T",data:[...o]}),r=o[0],n=o[1];break;case"t":r+=o[0],n+=o[1],a.push({key:"T",data:[r,n]});break;case"Z":case"z":a.push({key:"Z",data:[]}),r=e,n=i}return a}function PL(t){let i=[],a="",s=0,o=0,e=0,r=0,l=0,c=0;for(var{key:n,data:h}of t){switch(n){case"M":i.push({key:"M",data:[...h]}),[s,o]=h,[e,r]=h;break;case"C":i.push({key:"C",data:[...h]}),s=h[4],o=h[5],l=h[2],c=h[3];break;case"L":i.push({key:"L",data:[...h]}),[s,o]=h;break;case"H":s=h[0],i.push({key:"L",data:[s,o]});break;case"V":o=h[0],i.push({key:"L",data:[s,o]});break;case"S":{let t=0,e;e="C"===a||"S"===a?(t=s+(s-l),o+(o-c)):(t=s,o),i.push({key:"C",data:[t,e,...h]}),l=h[0],c=h[1],s=h[2],o=h[3];break}case"T":{let[t,e]=h,r=0,n;n="Q"===a||"T"===a?(r=s+(s-l),o+(o-c)):(r=s,o);var u=s+2*(r-s)/3,d=o+2*(n-o)/3,p=t+2*(r-t)/3,g=e+2*(n-e)/3;i.push({key:"C",data:[u,d,p,g,t,e]}),l=r,c=n,s=t,o=e;break}case"Q":var[u,d,p,g]=h,f=s+2*(u-s)/3,m=o+2*(d-o)/3;i.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],x=h[4],b=h[5],w=h[6];0===f||0===m?(i.push({key:"C",data:[s,o,b,w,b,w]}),s=b,o=w):s===b&&o===w||(FL(s,o,b,w,f,m,y,v,x).forEach(function(t){i.push({key:"C",data:t})}),s=b,o=w);break;case"Z":i.push({key:"Z",data:[]}),s=e,o=r}a=n}return i}function BL(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function FL(t,e,r,n,i,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:([t,e]=BL(t,e,-h),[r,n]=BL(r,n,-h),1<(m=(y=(t-r)/2)*y/(i*i)+(v=(e-n)/2)*v/(a*a))&&(i*=m=Math.sqrt(m),a*=m),m=i*i,x=a*a,o=(o===l?-1:1)*Math.sqrt(Math.abs((m*x-m*v*v-x*y*y)/(m*v*v+x*y*y))),g=o*i*v/a+(t+r)/2,f=o*-a*y/i+(e+n)/2,d=Math.asin(parseFloat(((e-f)/a).toFixed(9))),p=Math.asin(parseFloat(((n-f)/a).toFixed(9))),tp&&(d-=2*Math.PI),!l&&p>d&&(p-=2*Math.PI));var m=p-d,y=(Math.abs(m)>120*Math.PI/180&&(x=p,v=r,o=n,p=l&&p>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,u=FL(r=g+i*Math.cos(p),n=f+a*Math.sin(p),v,o,i,a,s,0,l,[p,x,g,f])),m=p-d,Math.cos(d)),v=Math.sin(d),o=Math.cos(p),s=Math.sin(p),x=4/3*i*(l=Math.tan(m/4)),i=[t,e],a=[t+x*v,e-(m=4/3*a*l)*y],l=[r+x*s,n-m*o],t=[r,n];if(a[0]=2*i[0]-a[0],a[1]=2*i[1]-a[1],c)return[a,l,t].concat(u);u=[a,l,t].concat(u);var b=[];for(let t=0;t2*Math.PI&&(c=0,h=2*Math.PI),i=2*Math.PI/l.curveStepCount,i=iN(a=Math.min(i/2,(h-c)/2),t,e,r,n,c,h,1,l),l.disableMultiStroke||(a=iN(a,t,e,r,n,c,h,1.5,l),i.push(...a)),s&&(o?i.push(...JL(t,e,t+r*Math.cos(c),e+n*Math.sin(c),l),...JL(t,e,t+r*Math.cos(h),e+n*Math.sin(h),l)):i.push({op:"lineTo",data:[t,e]},{op:"lineTo",data:[t+r*Math.cos(c),e+n*Math.sin(c)]})),{type:"path",ops:i}}function YL(t,e){let r=PL(OL(DL(t))),n=[],i=[0,0],a=[0,0];for(var{key:s,data:o}of r)switch(s){case"M":a=[o[0],o[1]],i=[o[0],o[1]];break;case"L":n.push(...JL(a[0],a[1],o[0],o[1],e)),a=[o[0],o[1]];break;case"C":var[l,c,h,u,d,p]=o;n.push(...aN(l,c,h,u,d,p,a,e)),a=[d,p];break;case"Z":n.push(...JL(a[0],a[1],i[0],i[1],e)),a=[i[0],i[1]]}return{type:"path",ops:n}}function HL(t,e){var r,n=[];for(r of t)if(r.length){var i=e.maxRandomnessOffset||0,a=r.length;if(2{let e=r.fillStyle||"hachure";if(!wN[e])switch(e){case"zigzag":wN[e]||(wN[e]=new mN(t));break;case"cross-hatch":wN[e]||(wN[e]=new yN(t));break;case"dots":wN[e]||(wN[e]=new vN(t));break;case"dashed":wN[e]||(wN[e]=new xN(t));break;case"zigzag-line":wN[e]||(wN[e]=new bN(t));break;default:e="hachure",wN[e]||(wN[e]=new fN(t))}return wN[e]})(SN).fillPolygons(t,r)}function XL(t){var e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function KL(t){return t.randomizer||(t.randomizer=new kN(t.seed||0)),t.randomizer.next()}function ZL(t,e,r,n=1){return r.roughness*n*(KL(r)*(e-t)+t)}function QL(t,e,r=1){return ZL(-t,t,e,r)}function JL(t,e,r,n,i,a=!1){var a=a?i.disableMultiStrokeFill:i.disableMultiStroke,s=tN(t,e,r,n,i,!0,!1);return a?s:(a=tN(t,e,r,n,i,!0,!0),s.concat(a))}function tN(t,e,r,n,i,a,s){let o=Math.pow(t-r,2)+Math.pow(e-n,2),l=Math.sqrt(o),c,h=(c=l<200?1:500o?l/10:h)/2,d=.2+.2*KL(i),p=i.bowing*i.maxRandomnessOffset*(n-e)/200,g=i.bowing*i.maxRandomnessOffset*(t-r)/200;p=QL(p,i,c),g=QL(g,i,c);var f=[],m=me(()=>QL(u,i,c),"M"),y=me(()=>QL(h,i,c),"k"),v=i.preserveVertices;return a&&f.push(s?{op:"move",data:[t+(v?0:m()),e+(v?0:m())]}:{op:"move",data:[t+(v?0:QL(h,i,c)),e+(v?0:QL(h,i,c))]}),f.push(s?{op:"bcurveTo",data:[p+t+(r-t)*d+m(),g+e+(n-e)*d+m(),p+t+2*(r-t)*d+m(),g+e+2*(n-e)*d+m(),r+(v?0:m()),n+(v?0:m())]}:{op:"bcurveTo",data:[p+t+(r-t)*d+y(),g+e+(n-e)*d+y(),p+t+2*(r-t)*d+y(),g+e+2*(n-e)*d+y(),r+(v?0:y()),n+(v?0:y())]}),f}function eN(e,r,n){if(!e.length)return[];var i=[];i.push([e[0][0]+QL(r,n),e[0][1]+QL(r,n)]),i.push([e[0][0]+QL(r,n),e[0][1]+QL(r,n)]);for(let t=1;t{let t=l[c+0],e=l[c+1],r=l[c+2],n=l[c+3],i=3*e[0]-2*t[0]-n[0],a=(i*=i,3*e[1]-2*t[1]-n[1]);a*=a;var s=3*r[0]-2*n[0]-t[0],o=(s*=s,3*r[1]-2*n[1]-t[1]);return o*=o,il&&(l=h,c=t)}return Math.sqrt(l)>t?(pN(e,r,c+1,t,a),pN(e,c,n,t,a)):(a.length||a.push(s),a.push(o)),a}function gN(e,r=.15,t){var n=[],i=(e.length-1)/3;for(let t=0;t{me(AL,"t"),me(LL,"e"),me(NL,"s"),me(IL,"n"),fN=class{static{me(this,"o")}constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){return t=IL(t,e),{type:"fillSketch",ops:this.renderLines(t,e)}}renderLines(t,e){var r,n=[];for(r of t)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],e));return n}},me(RL,"a"),mN=class extends fN{static{me(this,"h")}fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);var n,i,t=IL(t,Object.assign({},e,{hachureGap:r})),a=Math.PI/180*e.hachureAngle,s=[],o=.5*r*Math.cos(a),l=.5*r*Math.sin(a);for([n,i]of t)RL([n,i])&&s.push([[n[0]-o,n[1]+l],[...i]],[[n[0]+o,n[1]-l],[...i]]);return{type:"fillSketch",ops:this.renderLines(s,e)}}},yN=class extends fN{static{me(this,"r")}fillPolygons(t,e){var r=this._fillPolygons(t,e),e=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),t=this._fillPolygons(t,e);return r.ops=r.ops.concat(t.ops),r}},vN=class{static{me(this,"i")}constructor(t){this.helper=t}fillPolygons(t,e){return t=IL(t,e=Object.assign({},e,{hachureAngle:0})),this.dotsOnLines(t,e)}dotsOnLines(t,e){let r=[],n=e.hachureGap,i=(n<0&&(n=4*e.strokeWidth),n=Math.max(n,.1),e.fillWeight);i<0&&(i=e.strokeWidth/2);var a,s=n/4;for(a of t){var o=RL(a),l=o/n,c=Math.ceil(l)-1,h=o-c*n,u=(a[0][0]+a[1][0])/2-n/4,d=Math.min(a[0][1],a[1][1]);for(let t=0;t{let e=RL(t),r=Math.floor(e/(h+u)),n=(e+u-r*(h+u))/2,i=t[0],a=t[1];i[0]>a[0]&&(i=t[1],a=t[0]);var s=Math.atan((a[1]-i[1])/(a[0]-i[0]));for(let t=0;t{let e=RL(t),r=Math.round(e/(2*c)),n=t[0],i=t[1];n[0]>i[0]&&(n=t[1],i=t[0]);var a=Math.atan((i[1]-n[1])/(i[0]-n[0]));for(let t=0;t{var i=d,a=p,s=Math.abs(g/2),o=Math.abs(t/2);s+=QL(.01*s,n),o+=QL(.01*o,n);let l=e,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)/n.curveStepCount,u=[];for(let t=l;t<=c;t+=h)u.push([i+s*Math.cos(t),a+o*Math.sin(t)]);return u.push([i+s*Math.cos(c),a+o*Math.sin(c)]),u.push([i,a]),VL([u],n)})(t,e,r,i))),i.stroke!==AN&&a.push(s),this._d("arc",a,i)}curve(t,e){var r=this._o(e),e=[],n=UL(t,r);if(r.fill&&r.fill!==AN)if("solid"===r.fillStyle){var i=UL(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));e.push({type:"fillPath",ops:this._mergedShape(i.ops)})}else{var a,s=[];if((i=t).length)for(a of"number"==typeof i[0][0]?[i]:i)a.length<3?s.push(...a):3===a.length?s.push(...gN(oN([a[0],a[0],a[1],a[2]]),10,(1+r.roughness)/2)):s.push(...gN(oN(a),10,(1+r.roughness)/2));s.length&&e.push(VL([s],r))}return r.stroke!==AN&&e.push(n),this._d("curve",e,r)}polygon(t,e){var r=[],n=zL(t,!0,e=this._o(e));return e.fill&&("solid"===e.fillStyle?r.push(HL([t],e)):r.push(VL([t],e))),e.stroke!==AN&&r.push(n),this._d("polygon",r,e)}path(t,e){let r=this._o(e),n=[];var i,a,s,o;return t&&(t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," "),e=r.fill&&"transparent"!==r.fill&&r.fill!==AN,i=r.stroke!==AN,s=((t,e)=>{let r=PL(OL(DL(t))),n=[],i=[],a=[0,0],s=[],o=me(()=>{4<=s.length&&i.push(...gN(s,1)),s=[]},"i"),l=me(()=>{o(),i.length&&(n.push(i),i=[])},"c");for(var{key:c,data:h}of r)switch(c){case"M":l(),a=[h[0],h[1]],i.push(a);break;case"L":o(),i.push([h[0],h[1]]);break;case"C":var u;s.length||(u=i.length?i[i.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(),i.push([a[0],a[1]])}if(l(),!e)return n;var d,p=[];for(d of n){var g=dN(d,e);g.length&&p.push(g)}return p})(t,(a=!!(r.simplification&&r.simplification<1))?4-4*(r.simplification||1):(1+r.roughness)/2),o=YL(t,r),e&&("solid"===r.fillStyle?1===s.length?(e=YL(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0})),n.push({type:"fillPath",ops:this._mergedShape(e.ops)})):n.push(HL(s,r)):n.push(VL(s,r))),i)&&(a?s.forEach(t=>{n.push(zL(t,!1,r))}):n.push(o)),this._d("path",n,r)}opsToPath(t,e){let r="";for(var n of t.ops){var i="number"==typeof e&&0<=e?n.data.map(t=>+t.toFixed(e)):n.data;switch(n.op){case"move":r+=`M${i[0]} ${i[1]} `;break;case"bcurveTo":r+=`C${i[0]} ${i[1]}, ${i[2]} ${i[3]}, ${i[4]} ${i[5]} `;break;case"lineTo":r+=`L${i[0]} ${i[1]} `}}return r.trim()}toPaths(t){var e,r=t.sets||[],n=t.options||this.defaultOptions,i=[];for(e of r){let t=null;switch(e.type){case"path":t={d:this.opsToPath(e),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:AN};break;case"fillPath":t={d:this.opsToPath(e),stroke:AN,strokeWidth:0,fill:n.fill||AN};break;case"fillSketch":t=this.fillSketch(e,n)}t&&i.push(t)}return i}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||AN,strokeWidth:r,fill:AN}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}},NN=class{static{me(this,"st")}constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new LN(e)}draw(t){var e,r=t.sets||[],n=t.options||this.getDefaultOptions(),i=this.ctx,a=t.options.fixedDecimalPlaceDigits;for(e of r)switch(e.type){case"path":i.save(),i.strokeStyle="none"===n.stroke?"transparent":n.stroke,i.lineWidth=n.strokeWidth,n.strokeLineDash&&i.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(i.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(i,e,a),i.restore();break;case"fillPath":i.save(),i.fillStyle=n.fill||"";var s="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(i,e,a,s),i.restore();break;case"fillSketch":this.fillSketch(i,e,n)}}fillSketch(t,e,r){let n=r.fillWeight;n<0&&(n=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=n,this._drawToContext(t,e,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,r,n="nonzero"){t.beginPath();for(var i of e.ops){var a="number"==typeof r&&0<=r?i.data.map(t=>+t.toFixed(r)):i.data;switch(i.op){case"move":t.moveTo(a[0],a[1]);break;case"bcurveTo":t.bezierCurveTo(a[0],a[1],a[2],a[3],a[4],a[5]);break;case"lineTo":t.lineTo(a[0],a[1])}}"fillPath"===e.type?t.fill(n):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,r,n,i){return t=this.gen.line(t,e,r,n,i),this.draw(t),t}rectangle(t,e,r,n,i){return t=this.gen.rectangle(t,e,r,n,i),this.draw(t),t}ellipse(t,e,r,n,i){return t=this.gen.ellipse(t,e,r,n,i),this.draw(t),t}circle(t,e,r,n){return t=this.gen.circle(t,e,r,n),this.draw(t),t}linearPath(t,e){return t=this.gen.linearPath(t,e),this.draw(t),t}polygon(t,e){return t=this.gen.polygon(t,e),this.draw(t),t}arc(t,e,r,n,i,a,s=!1,o){return t=this.gen.arc(t,e,r,n,i,a,s,o),this.draw(t),t}curve(t,e){return t=this.gen.curve(t,e),this.draw(t),t}path(t,e){return t=this.gen.path(t,e),this.draw(t),t}},IN="http://www.w3.org/2000/svg",RN=class{static{me(this,"ot")}constructor(t,e){this.svg=t,this.gen=new LN(e)}draw(e){var r,t=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,a=i.createElementNS(IN,"g"),s=e.options.fixedDecimalPlaceDigits;for(r of t){let t=null;switch(r.type){case"path":(t=i.createElementNS(IN,"path")).setAttribute("d",this.opsToPath(r,s)),t.setAttribute("stroke",n.stroke),t.setAttribute("stroke-width",n.strokeWidth+""),t.setAttribute("fill","none"),n.strokeLineDash&&t.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&t.setAttribute("stroke-dashoffset",""+n.strokeLineDashOffset);break;case"fillPath":(t=i.createElementNS(IN,"path")).setAttribute("d",this.opsToPath(r,s)),t.setAttribute("stroke","none"),t.setAttribute("stroke-width","0"),t.setAttribute("fill",n.fill||""),"curve"!==e.shape&&"polygon"!==e.shape||t.setAttribute("fill-rule","evenodd");break;case"fillSketch":t=this.fillSketch(i,r,n)}t&&a.appendChild(t)}return a}fillSketch(t,e,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),(t=t.createElementNS(IN,"path")).setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),t.setAttribute("stroke",r.fill||""),t.setAttribute("stroke-width",n+""),t.setAttribute("fill","none"),r.fillLineDash&&t.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&t.setAttribute("stroke-dashoffset",""+r.fillLineDashOffset),t}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,n,i){return t=this.gen.line(t,e,r,n,i),this.draw(t)}rectangle(t,e,r,n,i){return t=this.gen.rectangle(t,e,r,n,i),this.draw(t)}ellipse(t,e,r,n,i){return t=this.gen.ellipse(t,e,r,n,i),this.draw(t)}circle(t,e,r,n){return t=this.gen.circle(t,e,r,n),this.draw(t)}linearPath(t,e){return t=this.gen.linearPath(t,e),this.draw(t)}polygon(t,e){return t=this.gen.polygon(t,e),this.draw(t)}arc(t,e,r,n,i,a,s=!1,o){return t=this.gen.arc(t,e,r,n,i,a,s,o),this.draw(t)}curve(t,e){return t=this.gen.curve(t,e),this.draw(t)}path(t,e){return t=this.gen.path(t,e),this.draw(t)}},MN={canvas:me((t,e)=>new NN(t,e),"canvas"),svg:me((t,e)=>new RN(t,e),"svg"),generator:me(t=>new LN(t),"generator"),newSeed:me(()=>LN.newSeed(),"newSeed")}});function ON(t,e){var r=kL(e).labelStyles;e.labelStyle=r;let n=J9(e),i=n,a=(n||(i="anchor"),t.insert("g").attr("class",i).attr("id",e.domId||e.id)),s=e.cssStyles,o=MN.svg(a),l=TL(e,{fill:"black",stroke:"none",fillStyle:"solid"}),c=("handDrawn"!==e.look&&(l.roughness=0),o.circle(0,0,2,l)),h=a.insert(()=>c,":first-child");return h.attr("class","anchor").attr("style",wE(s)),Q9(e,h),e.intersect=function(t){return M.info("Circle intersect",e,1,t),yL.circle(e,1,t)},a}var PN=t(()=>{e(),i(),_L(),SL(),DN(),ZE(),me(ON,"anchor")});function BN(t,e,r,n,i,a,s){var o=(t+r)/2,l=(e+n)/2,c=Math.atan2(n-e,r-t),h=Math.sqrt(((r-t)/2/i)**2+((n-e)/2/a)**2);if(1f,":first-child");return m.attr("class","basic label-container"),h&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",n),m.attr("transform",`translate(${c/2}, 0)`),Q9(e,m),e.intersect=function(t){return yL.polygon(e,u,t)},i}var $N=t(()=>{i(),_L(),SL(),DN(),me(BN,"generateArcPoints"),me(FN,"bowTieRect")});function zN(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}var GN=t(()=>{me(zN,"insertPolygonShape")});async function UN(t,i){var{labelStyles:e,nodeStyles:r}=kL(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await K9(t,i,J9(i)),s=n.height+i.padding,o=n.width+i.padding+12,l=o,c=-s,h=[{x:12,y:c},{x:l,y:c},{x:l,y:0},{x:0,y:0},{x:0,y:12+c},{x:12,y:c}],u,d=i.cssStyles;if("handDrawn"===i.look){let t=MN.svg(a),e=TL(i,{}),r=H9(h),n=t.path(r,e);u=a.insert(()=>n,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),d&&u.attr("style",d)}else u=zN(a,o,s,h);return r&&u.attr("style",r),Q9(i,u),i.intersect=function(t){return yL.polygon(i,h,t)},a}var qN=t(()=>{i(),_L(),SL(),DN(),GN(),i(),me(UN,"card")});function jN(t,e){var r=kL(e).nodeStyles;e.label="";let n=t.insert("g").attr("class",J9(e)).attr("id",e.domId??e.id),i=e.cssStyles,a=Math.max(28,e.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],o=MN.svg(n),l=TL(e,{}),c=("handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid"),H9(s)),h=o.path(c,l),u=n.insert(()=>h,":first-child");return i&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",i),r&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return yL.polygon(e,s,t)},n}var WN=t(()=>{_L(),DN(),SL(),i(),me(jN,"choice")});async function YN(t,n){var{labelStyles:e,nodeStyles:r}=kL(n);n.labelStyle=e;let{shapeSvg:i,bbox:a,halfPadding:s}=await K9(t,n,J9(n)),o=a.width/2+s,l,c=n.cssStyles;if("handDrawn"===n.look){let t=MN.svg(i),e=TL(n,{}),r=t.circle(0,0,2*o,e);(l=i.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",wE(c))}else l=i.insert("circle",":first-child").attr("class","basic label-container").attr("style",r).attr("r",o).attr("cx",0).attr("cy",0);return Q9(n,l),n.intersect=function(t){return M.info("Circle intersect",n,o,t),yL.circle(n,o,t)},i}var HN=t(()=>{e(),i(),_L(),SL(),DN(),ZE(),me(YN,"circle")});function VN(t){var e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4);return`M ${-(t*=2)/2*e},${t/2*r} L ${t/2*e},${-t/2*r} - M ${t/2*e},${t/2*r} L ${-t/2*e},`+-t/2*r}function XN(t,e){var{labelStyles:r,nodeStyles:n}=kL(e);e.labelStyle=r,e.label="";let i=t.insert("g").attr("class",J9(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),s=e.cssStyles,o=MN.svg(i),l=TL(e,{}),c=("handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid"),o.circle(0,0,2*a,l)),h=VN(a),u=o.path(h,l),d=i.insert(()=>c,":first-child");return d.insert(()=>u),s&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",s),n&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",n),Q9(e,d),e.intersect=function(t){return M.info("crossedCircle intersect",e,{radius:a,point:t}),yL.circle(e,a,t)},i}var KN=t(()=>{e(),i(),SL(),DN(),_L(),me(VN,"createLine"),me(XN,"crossedCircle")});function ZN(e,r,n,i=100,t=0,a=180){var s=[],o=t*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let t=0;tv,":first-child").attr("stroke-opacity",0),x.insert(()=>m,":first-child"),x.attr("class","text"),h&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",n),x.attr("transform",`translate(${c}, 0)`),s.attr("transform",`translate(${-o/2+c-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Q9(e,x),e.intersect=function(t){return yL.polygon(e,d,t)},i}var JN=t(()=>{i(),_L(),SL(),DN(),me(ZN,"generateCirclePoints"),me(QN,"curlyBraceLeft")});function tI(e,r,n,i=100,t=0,a=180){var s=[],o=t*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let t=0;tv,":first-child").attr("stroke-opacity",0),x.insert(()=>m,":first-child"),x.attr("class","text"),h&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",n),x.attr("transform",`translate(${-c}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Q9(e,x),e.intersect=function(t){return yL.polygon(e,d,t)},i}var rI=t(()=>{i(),_L(),SL(),DN(),me(tI,"generateCirclePoints"),me(eI,"curlyBraceRight")});function nI(e,r,n,i=100,t=0,a=180){var s=[],o=t*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let t=0;tw,":first-child").attr("stroke-opacity",0),k.insert(()=>y,":first-child"),k.insert(()=>x,":first-child"),k.attr("class","text"),h&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",h),n&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",n),k.attr("transform",`translate(${c-c/4}, 0)`),s.attr("transform",`translate(${-o/2+(e.padding??0)/2-(a.x-(a.left??0))},${-l/2+(e.padding??0)/2-(a.y-(a.top??0))})`),Q9(e,k),e.intersect=function(t){return yL.polygon(e,p,t)},i}var aI=t(()=>{i(),_L(),SL(),DN(),me(nI,"generateCirclePoints"),me(iI,"curlyBraces")});async function sI(t,e){var{labelStyles:r,nodeStyles:n}=kL(e),{shapeSvg:r,bbox:t}=(e.labelStyle=r,await K9(t,e,J9(e))),i=Math.max(80,1.25*(t.width+2*(e.padding??0)),e?.width??0),a=(t=Math.max(20,t.height+2*(e.padding??0),e?.height??0))/2,s=e.cssStyles,o=MN.svg(r),l=TL(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");let c=i,h=t,u=c-a,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},...X9(-u,-h/2,a,50,270,90)],g=H9(p),f=o.path(g,l),m=r.insert(()=>f,":first-child");return m.attr("class","basic label-container"),s&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",s),n&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",n),m.attr("transform",`translate(${-i/2}, ${-t/2})`),Q9(e,m),e.intersect=function(t){return yL.polygon(e,p,t)},r}var oI=t(()=>{i(),_L(),SL(),DN(),me(sI,"curvedTrapezoid")});async function lI(t,a){var{labelStyles:e,nodeStyles:r}=kL(a);a.labelStyle=e;let{shapeSvg:s,bbox:n,label:i}=await K9(t,a,J9(a)),o=Math.max(n.width+a.padding,a.width??0),l=o/2,c=l/(2.5+o/50),h=Math.max(n.height+c+a.padding,a.height??0),u,d=a.cssStyles;if("handDrawn"===a.look){let t=MN.svg(s),e=hI(0,0,o,h,l,c),r=uI(0,c,o,h,l,c),n=t.path(e,TL(a,{})),i=t.path(r,TL(a,{fill:"none"}));u=s.insert(()=>i,":first-child"),(u=s.insert(()=>n,":first-child")).attr("class","basic label-container"),d&&u.attr("style",d)}else e=cI(0,0,o,h,l,c),u=s.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",wE(d)).attr("style",r);return u.attr("label-offset-y",c),u.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),Q9(a,u),i.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2+(a.padding??0)/1.5-(n.y-(n.top??0))})`),a.intersect=function(e){var r=yL.rect(a,e),n=r.x-(a.x??0);if(0!=l&&(Math.abs(n)<(a.width??0)/2||Math.abs(n)==(a.width??0)/2&&Math.abs(r.y-(a.y??0))>(a.height??0)/2-c)){let t=c*c*(1-n*n/(l*l));0{i(),_L(),SL(),DN(),ZE(),cI=me((t,e,r,n,i,a)=>[`M${t},`+(e+a),`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,"l0,"+n,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n].join(" "),"createCylinderPathD"),hI=me((t,e,r,n,i,a)=>[`M${t},`+(e+a),`M${t+r},`+(e+a),`a${i},${a} 0,0,0 ${-r},0`,"l0,"+n,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n].join(" "),"createOuterCylinderPathD"),uI=me((t,e,r,n,i,a)=>[`M${t-r/2},`+-n/2,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),me(lI,"cylinder")});async function pI(t,e){var{labelStyles:r,nodeStyles:n}=kL(e),{shapeSvg:r,bbox:t,label:i}=(e.labelStyle=r,await K9(t,e,J9(e))),a=t.width+e.padding,s=.2*(o=t.height+e.padding),a=-a/2,o=-o/2-s/2,l=e.cssStyles,c=MN.svg(r),h=TL(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");let u=[{x:a,y:o+s},{x:-a,y:o+s},{x:-a,y:-o},{x:a,y:-o},{x:a,y:o},{x:-a,y:o},{x:-a,y:o+s}],d=c.polygon(u.map(t=>[t.x,t.y]),h),p=r.insert(()=>d,":first-child");return p.attr("class","basic label-container"),l&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",l),n&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",n),i.attr("transform",`translate(${a+(e.padding??0)/2-(t.x-(t.left??0))}, ${o+s+(e.padding??0)/2-(t.y-(t.top??0))})`),Q9(e,p),e.intersect=function(t){return yL.rect(e,t)},r}var gI=t(()=>{i(),_L(),SL(),DN(),me(pI,"dividedRectangle")});async function fI(t,e){var r,{labelStyles:n,nodeStyles:i}=kL(e);e.labelStyle=n;let{shapeSvg:a,bbox:s,halfPadding:o}=await K9(t,e,J9(e)),l=s.width/2+o+5,c=s.width/2+o,h,u=e.cssStyles;return"handDrawn"===e.look?(n=MN.svg(a),t=TL(e,{roughness:.2,strokeWidth:2.5}),r=TL(e,{roughness:.2,strokeWidth:1.5}),t=n.circle(0,0,2*l,t),n=n.circle(0,0,2*c,r),(h=a.insert("g",":first-child")).attr("class",wE(e.cssClasses)).attr("style",wE(u)),h.node()?.appendChild(t),h.node()?.appendChild(n)):(r=(h=a.insert("g",":first-child")).insert("circle",":first-child"),t=h.insert("circle"),h.attr("class","basic label-container").attr("style",i),r.attr("class","outer-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0),t.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)),Q9(e,h),e.intersect=function(t){return M.info("DoubleCircle intersect",e,l,t),yL.circle(e,l,t)},a}var mI=t(()=>{e(),i(),_L(),SL(),DN(),ZE(),me(fI,"doublecircle")});function yI(t,e,{config:{themeVariables:r}}){var{labelStyles:n,nodeStyles:i}=kL(e);e.label="",e.labelStyle=n;let a=t.insert("g").attr("class",J9(e)).attr("id",e.domId??e.id),s=e.cssStyles,o=MN.svg(a),l=r.nodeBorder,c=TL(e,{fillStyle:"solid"}),h=("handDrawn"!==e.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{DN(),e(),_L(),SL(),i(),me(yI,"filledCircle")});async function xI(t,e){var{labelStyles:r,nodeStyles:n}=kL(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await K9(t,e,J9(e)),o=a.width+(e.padding??0),l=o+a.height,c=o+a.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],u=e.cssStyles,d=MN.svg(i),p=TL(e,{}),g=("handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid"),H9(h)),f=d.path(g,p),m=i.insert(()=>f,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",u),n&&"handDrawn"!==e.look&&m.selectChildren("path").attr("style",n),e.width=o,e.height=l,Q9(e,m),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${-l/2+(e.padding??0)/2+(a.y-(a.top??0))})`),e.intersect=function(t){return M.info("Triangle intersect",e,h,t),yL.polygon(e,h,t)},i}var bI=t(()=>{e(),i(),_L(),SL(),DN(),i(),me(xI,"flippedTriangle")});function wI(t,e,{dir:r,config:{state:n,themeVariables:i}}){var a=kL(e).nodeStyles;e.label="";let s=t.insert("g").attr("class",J9(e)).attr("id",e.domId??e.id),o=e.cssStyles,l=Math.max(70,e?.width??0),c=Math.max(10,e?.height??0);"LR"===r&&(l=Math.max(10,e?.width??0),c=Math.max(70,e?.height??0));var t=-1*l/2,r=-1*c/2,h=MN.svg(s),i=TL(e,{stroke:i.lineColor,fill:i.lineColor});"handDrawn"!==e.look&&(i.roughness=0,i.fillStyle="solid");let u=h.rectangle(t,r,l,c,i),d=s.insert(()=>u,":first-child");return o&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",o),a&&"handDrawn"!==e.look&&d.selectAll("path").attr("style",a),Q9(e,d),h=n?.padding??0,e.width&&e.height&&(e.width+=h/2||0,e.height+=h/2||0),e.intersect=function(t){return yL.rect(e,t)},s}var kI=t(()=>{DN(),_L(),SL(),i(),me(wI,"forkJoin")});async function TI(t,e){var{labelStyles:r,nodeStyles:n}=kL(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await K9(t,e,J9(e)),s=Math.max(80,a.width+2*(e.padding??0),e?.width??0),o=Math.max(50,a.height+2*(e.padding??0),e?.height??0),l=o/2,c=e.cssStyles,h=MN.svg(i),u=TL(e,{}),d=("handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid"),[{x:-s/2,y:-o/2},{x:s/2-l,y:-o/2},...X9(-s/2+l,0,l,50,90,270),{x:s/2-l,y:o/2},{x:-s/2,y:o/2}]),p=H9(d),g=h.path(p,u),f=i.insert(()=>g,":first-child");return f.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",c),n&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",n),Q9(e,f),e.intersect=function(t){return M.info("Pill intersect",e,{radius:l,point:t}),yL.polygon(e,d,t)},i}var EI=t(()=>{e(),i(),_L(),SL(),DN(),me(TI,"halfRoundedRectangle")});async function CI(t,i){var{labelStyles:e,nodeStyles:r}=kL(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await K9(t,i,J9(i)),s=n.height+i.padding,o=s/4,l=n.width+2*o+i.padding,c=[{x:o,y:0},{x:l-o,y:0},{x:l,y:-s/2},{x:l-o,y:-s},{x:o,y:-s},{x:0,y:-s/2}],h,u=i.cssStyles;if("handDrawn"===i.look){let t=MN.svg(a),e=TL(i,{}),r=_I(0,0,l,s,o),n=t.path(r,e);h=a.insert(()=>n,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),u&&h.attr("style",u)}else h=zN(a,l,s,c);return r&&h.attr("style",r),i.width=l,i.height=s,Q9(i,h),i.intersect=function(t){return yL.polygon(i,c,t)},a}var _I,SI=t(()=>{i(),_L(),SL(),DN(),GN(),_I=me((t,e,r,n,i)=>[`M${t+i},`+e,`L${t+r-i},`+e,`L${t+r},`+(e-n/2),`L${t+r-i},`+(e-n),`L${t+i},`+(e-n),`L${t},`+(e-n/2),"Z"].join(" "),"createHexagonPathD"),me(CI,"hexagon")});async function AI(t,e){var{labelStyles:r,nodeStyles:n}=kL(e),r=(e.label="",e.labelStyle=r,(await K9(t,e,J9(e))).shapeSvg),t=Math.max(30,e?.width??0),i=Math.max(30,e?.height??0),a=e.cssStyles,s=MN.svg(r),o=TL(e,{});"handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid");let l=[{x:0,y:0},{x:t,y:0},{x:0,y:i},{x:t,y:i}],c=H9(l),h=s.path(c,o),u=r.insert(()=>h,":first-child");return u.attr("class","basic label-container"),a&&"handDrawn"!==e.look&&u.selectChildren("path").attr("style",a),n&&"handDrawn"!==e.look&&u.selectChildren("path").attr("style",n),u.attr("transform",`translate(${-t/2}, ${-i/2})`),Q9(e,u),e.intersect=function(t){return M.info("Pill intersect",e,{points:l}),yL.polygon(e,l,t)},r}var LI=t(()=>{e(),i(),_L(),SL(),DN(),me(AI,"hourglass")});async function NI(t,i,{config:{themeVariables:e,flowchart:r}}){var n,a=kL(i).labelStyles,a=(i.labelStyle=a,i.assetHeight??48),a=Math.max(a,i.assetWidth??48),r=r?.wrappingWidth;i.width=Math.max(a,r??0);let{shapeSvg:s,bbox:o,label:l}=await K9(t,i,"icon-shape default"),c="t"===i.pos,h=a,u=a,d=e.nodeBorder,p=xL(i).stylesMap,g=-u/2,f=-h/2,m=i.label?8:0,y=MN.svg(s),v=TL(i,{stroke:"none",fill:"none"}),x=("handDrawn"!==i.look&&(v.roughness=0,v.fillStyle="solid"),y.rectangle(g,f,u,h,v)),b=Math.max(u,o.width),w=h+o.height+m,k=y.rectangle(-b/2,-w/2,b,w,{...v,fill:"transparent",stroke:"none"}),T=s.insert(()=>x,":first-child"),E=s.insert(()=>k);return i.icon&&((r=s.append("g")).html(`${await Ft(i.icon,{height:a,width:a,fallbackPrefix:""})}`),e=(t=r.node().getBBox()).width,a=t.height,n=t.y,r.attr("transform",`translate(${-e/2-t.x},${c?o.height/2+m/2-a/2-n:-o.height/2-m/2-a/2-n})`),r.attr("style",`color: ${p.get("stroke")??d};`)),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))},${c?-w/2:w/2-o.height})`),T.attr("transform",`translate(0,${c?o.height/2+m/2:-o.height/2-m/2})`),Q9(i,E),i.intersect=function(t){var e,r,n;return M.info("iconSquare intersect",i,t),i.label?(n=i.x??0,e=i.y??0,r=i.height??0,n=c?[{x:n-o.width/2,y:e-r/2},{x:n+o.width/2,y:e-r/2},{x:n+o.width/2,y:e-r/2+o.height+m},{x:n+u/2,y:e-r/2+o.height+m},{x:n+u/2,y:e+r/2},{x:n-u/2,y:e+r/2},{x:n-u/2,y:e-r/2+o.height+m},{x:n-o.width/2,y:e-r/2+o.height+m}]:[{x:n-u/2,y:e-r/2},{x:n+u/2,y:e-r/2},{x:n+u/2,y:e-r/2+h},{x:n+o.width/2,y:e-r/2+h},{x:n+o.width/2/2,y:e+r/2},{x:n-o.width/2,y:e+r/2},{x:n-o.width/2,y:e-r/2+h},{x:n-u/2,y:e-r/2+h}],yL.polygon(i,n,t)):yL.rect(i,t)},s}var II=t(()=>{DN(),e(),jt(),_L(),SL(),i(),me(NI,"icon")});async function RI(t,e,{config:{themeVariables:r,flowchart:n}}){var i=kL(e).labelStyles,i=(e.labelStyle=i,e.assetHeight??48),i=Math.max(i,e.assetWidth??48),n=n?.wrappingWidth,{shapeSvg:n,bbox:t,label:a}=(e.width=Math.max(i,n??0),await K9(t,e,"icon-shape default")),s=e.label?8:0,o="t"===e.pos,{nodeBorder:r,mainBkg:l}=r,c=xL(e).stylesMap,h=MN.svg(n),u=TL(e,{}),d=("handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid"),c.get("fill")),d=(u.stroke=d??l,n.append("g"));e.icon&&d.html(`${await Ft(e.icon,{height:i,width:i,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,x=h.circle(0,0,v,u),b=Math.max(v,t.width),w=v+t.height+s,k=h.rectangle(-b/2,-w/2,b,w,{...u,fill:"transparent",stroke:"none"}),T=n.insert(()=>x,":first-child"),E=n.insert(()=>k);return d.attr("transform",`translate(${-g/2-m},${o?t.height/2+s/2-f/2-y:-t.height/2-s/2-f/2-y})`),d.attr("style",`color: ${c.get("stroke")??r};`),a.attr("transform",`translate(${-t.width/2-(t.x-(t.left??0))},${o?-w/2:w/2-t.height})`),T.attr("transform",`translate(0,${o?t.height/2+s/2:-t.height/2-s/2})`),Q9(e,E),e.intersect=function(t){return M.info("iconSquare intersect",e,t),yL.rect(e,t)},n}var MI,DI=t(()=>{DN(),e(),jt(),_L(),SL(),i(),me(RI,"iconCircle")}),OI=t(()=>{MI=me((t,e,r,n,i)=>["M",t+i,e,"H",t+r-i,"A",i,i,0,0,1,t+r,e+i,"V",e+n-i,"A",i,i,0,0,1,t+r-i,e+n,"H",t+i,"A",i,i,0,0,1,t,e+n-i,"V",e+i,"A",i,i,0,0,1,t+i,e,"Z"].join(" "),"createRoundedRectPathD")});async function PI(t,i,{config:{themeVariables:e,flowchart:r}}){var n=kL(i).labelStyles,n=(i.labelStyle=n,i.assetHeight??48),n=Math.max(n,i.assetWidth??48),r=r?.wrappingWidth;i.width=Math.max(n,r??0);let{shapeSvg:a,bbox:s,halfPadding:o,label:l}=await K9(t,i,"icon-shape default"),c="t"===i.pos,h=n+2*o,u=n+2*o,{nodeBorder:d,mainBkg:p}=e,g=xL(i).stylesMap,f=-u/2,m=-h/2,y=i.label?8:0,v=MN.svg(a),x=TL(i,{});"handDrawn"!==i.look&&(x.roughness=0,x.fillStyle="solid");var b,r=g.get("fill");x.stroke=r??p;let w=v.path(MI(f,m,u,h,5),x),k=Math.max(u,s.width),T=h+s.height+y,E=v.rectangle(-k/2,-T/2,k,T,{...x,fill:"transparent",stroke:"none"}),C=a.insert(()=>w,":first-child").attr("class","icon-shape2"),_=a.insert(()=>E);return i.icon&&((t=a.append("g")).html(`${await Ft(i.icon,{height:n,width:n,fallbackPrefix:""})}`),r=(e=t.node().getBBox()).width,n=e.height,b=e.y,t.attr("transform",`translate(${-r/2-e.x},${c?s.height/2+y/2-n/2-b:-s.height/2-y/2-n/2-b})`),t.attr("style",`color: ${g.get("stroke")??d};`)),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-T/2:T/2-s.height})`),C.attr("transform",`translate(0,${c?s.height/2+y/2:-s.height/2-y/2})`),Q9(i,_),i.intersect=function(t){var e,r,n;return M.info("iconSquare intersect",i,t),i.label?(n=i.x??0,e=i.y??0,r=i.height??0,n=c?[{x:n-s.width/2,y:e-r/2},{x:n+s.width/2,y:e-r/2},{x:n+s.width/2,y:e-r/2+s.height+y},{x:n+u/2,y:e-r/2+s.height+y},{x:n+u/2,y:e+r/2},{x:n-u/2,y:e+r/2},{x:n-u/2,y:e-r/2+s.height+y},{x:n-s.width/2,y:e-r/2+s.height+y}]:[{x:n-u/2,y:e-r/2},{x:n+u/2,y:e-r/2},{x:n+u/2,y:e-r/2+h},{x:n+s.width/2,y:e-r/2+h},{x:n+s.width/2/2,y:e+r/2},{x:n-s.width/2,y:e+r/2},{x:n-s.width/2,y:e-r/2+h},{x:n-u/2,y:e-r/2+h}],yL.polygon(i,n,t)):yL.rect(i,t)},a}var BI=t(()=>{DN(),e(),jt(),_L(),SL(),OI(),i(),me(PI,"iconRounded")});async function FI(t,i,{config:{themeVariables:e,flowchart:r}}){var n=kL(i).labelStyles,n=(i.labelStyle=n,i.assetHeight??48),n=Math.max(n,i.assetWidth??48),r=r?.wrappingWidth;i.width=Math.max(n,r??0);let{shapeSvg:a,bbox:s,halfPadding:o,label:l}=await K9(t,i,"icon-shape default"),c="t"===i.pos,h=n+2*o,u=n+2*o,{nodeBorder:d,mainBkg:p}=e,g=xL(i).stylesMap,f=-u/2,m=-h/2,y=i.label?8:0,v=MN.svg(a),x=TL(i,{});"handDrawn"!==i.look&&(x.roughness=0,x.fillStyle="solid");var b,r=g.get("fill");x.stroke=r??p;let w=v.path(MI(f,m,u,h,.1),x),k=Math.max(u,s.width),T=h+s.height+y,E=v.rectangle(-k/2,-T/2,k,T,{...x,fill:"transparent",stroke:"none"}),C=a.insert(()=>w,":first-child"),_=a.insert(()=>E);return i.icon&&((t=a.append("g")).html(`${await Ft(i.icon,{height:n,width:n,fallbackPrefix:""})}`),r=(e=t.node().getBBox()).width,n=e.height,b=e.y,t.attr("transform",`translate(${-r/2-e.x},${c?s.height/2+y/2-n/2-b:-s.height/2-y/2-n/2-b})`),t.attr("style",`color: ${g.get("stroke")??d};`)),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-T/2:T/2-s.height})`),C.attr("transform",`translate(0,${c?s.height/2+y/2:-s.height/2-y/2})`),Q9(i,_),i.intersect=function(t){var e,r,n;return M.info("iconSquare intersect",i,t),i.label?(n=i.x??0,e=i.y??0,r=i.height??0,n=c?[{x:n-s.width/2,y:e-r/2},{x:n+s.width/2,y:e-r/2},{x:n+s.width/2,y:e-r/2+s.height+y},{x:n+u/2,y:e-r/2+s.height+y},{x:n+u/2,y:e+r/2},{x:n-u/2,y:e+r/2},{x:n-u/2,y:e-r/2+s.height+y},{x:n-s.width/2,y:e-r/2+s.height+y}]:[{x:n-u/2,y:e-r/2},{x:n+u/2,y:e-r/2},{x:n+u/2,y:e-r/2+h},{x:n+s.width/2,y:e-r/2+h},{x:n+s.width/2/2,y:e+r/2},{x:n-s.width/2,y:e+r/2},{x:n-s.width/2,y:e-r/2+h},{x:n-u/2,y:e-r/2+h}],yL.polygon(i,n,t)):yL.rect(i,t)},a}var $I=t(()=>{DN(),e(),jt(),_L(),OI(),SL(),i(),me(FI,"iconSquare")});async function zI(t,i,{config:{flowchart:e}}){(n=new Image).src=i?.img??"",await n.decode();var r=Number(n.naturalWidth.toString().replace("px","")),n=Number(n.naturalHeight.toString().replace("px","")),a=(i.imageAspectRatio=r/n,kL(i).labelStyles),a=(i.labelStyle=a,e?.wrappingWidth);i.defaultWidth=e?.wrappingWidth;let s=Math.max(i.label?a??0:0,i?.assetWidth??r),o="on"===i.constraint&&i?.assetHeight?i.assetHeight*i.imageAspectRatio:s,l="on"===i.constraint?o/i.imageAspectRatio:i?.assetHeight??n,{shapeSvg:c,bbox:h,label:u}=(i.width=Math.max(o,a??0),await K9(t,i,"image-shape default")),d="t"===i.pos,p=-o/2,g=-l/2,f=i.label?8:0,m=MN.svg(c),y=TL(i,{}),v=("handDrawn"!==i.look&&(y.roughness=0,y.fillStyle="solid"),m.rectangle(p,g,o,l,y)),x=Math.max(o,h.width),b=l+h.height+f,w=m.rectangle(-x/2,-b/2,x,b,{...y,fill:"none",stroke:"none"}),k=c.insert(()=>v,":first-child"),T=c.insert(()=>w);return i.img&&((e=c.append("image")).attr("href",i.img),e.attr("width",o),e.attr("height",l),e.attr("preserveAspectRatio","none"),e.attr("transform",`translate(${-o/2},${d?b/2-l:-b/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})`),Q9(i,T),i.intersect=function(t){var e,r,n;return M.info("iconSquare intersect",i,t),i.label?(n=i.x??0,e=i.y??0,r=i.height??0,n=d?[{x:n-h.width/2,y:e-r/2},{x:n+h.width/2,y:e-r/2},{x:n+h.width/2,y:e-r/2+h.height+f},{x:n+o/2,y:e-r/2+h.height+f},{x:n+o/2,y:e+r/2},{x:n-o/2,y:e+r/2},{x:n-o/2,y:e-r/2+h.height+f},{x:n-h.width/2,y:e-r/2+h.height+f}]:[{x:n-o/2,y:e-r/2},{x:n+o/2,y:e-r/2},{x:n+o/2,y:e-r/2+l},{x:n+h.width/2,y:e-r/2+l},{x:n+h.width/2/2,y:e+r/2},{x:n-h.width/2,y:e+r/2},{x:n-h.width/2,y:e-r/2+l},{x:n-o/2,y:e-r/2+l}],yL.polygon(i,n,t)):yL.rect(i,t)},c}var GI=t(()=>{DN(),e(),_L(),SL(),i(),me(zI,"imageSquare")});async function UI(t,i){var{labelStyles:e,nodeStyles:r}=kL(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await K9(t,i,J9(i)),s=Math.max(n.width+2*(i.padding??0),i?.width??0),o=Math.max(n.height+2*(i.padding??0),i?.height??0),l=[{x:0,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:-3*o/6,y:-o}],c,h=i.cssStyles;if("handDrawn"===i.look){let t=MN.svg(a),e=TL(i,{}),r=H9(l),n=t.path(r,e);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=zN(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,Q9(i,c),i.intersect=function(t){return yL.polygon(i,l,t)},a}var qI=t(()=>{i(),_L(),SL(),DN(),GN(),me(UI,"inv_trapezoid")});async function jI(t,n,e){var{labelStyles:r,nodeStyles:i}=kL(n);n.labelStyle=r;let{shapeSvg:a,bbox:s}=await K9(t,n,J9(n)),o=Math.max(s.width+2*e.labelPaddingX,n?.width||0),l=Math.max(s.height+2*e.labelPaddingY,n?.height||0),c=-o/2,h=-l/2,u,{rx:d,ry:p}=n,g=n.cssStyles;if(e?.rx&&e.ry&&(d=e.rx,p=e.ry),"handDrawn"===n.look){let t=MN.svg(a),e=TL(n,{}),r=d||p?t.path(MI(c,h,o,l,d||0),e):t.rectangle(c,h,o,l,e);(u=a.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",wE(g))}else(u=a.insert("rect",":first-child")).attr("class","basic label-container").attr("style",i).attr("rx",wE(d)).attr("ry",wE(p)).attr("x",c).attr("y",h).attr("width",o).attr("height",l);return Q9(n,u),n.intersect=function(t){return yL.rect(n,t)},a}var WI=t(()=>{i(),_L(),OI(),SL(),DN(),ZE(),me(jI,"drawRect")});async function YI(t,e){var{shapeSvg:t,bbox:r,label:n}=await K9(t,e,"label"),i=t.insert("rect",":first-child");return i.attr("width",.1).attr("height",.1),t.attr("class","label edgeLabel"),n.attr("transform",`translate(${-r.width/2-(r.x-(r.left??0))}, ${-r.height/2-(r.y-(r.top??0))})`),Q9(e,i),e.intersect=function(t){return yL.rect(e,t)},t}var HI=t(()=>{WI(),i(),_L(),me(YI,"labelRect")});async function VI(t,i){var{labelStyles:e,nodeStyles:r}=kL(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await K9(t,i,J9(i)),s=Math.max(n.width+(i.padding??0),i?.width??0),o=Math.max(n.height+(i.padding??0),i?.height??0),l=[{x:0,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:-3*o/6,y:-o}],c,h=i.cssStyles;if("handDrawn"===i.look){let t=MN.svg(a),e=TL(i,{}),r=H9(l),n=t.path(r,e);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=zN(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,Q9(i,c),i.intersect=function(t){return yL.polygon(i,l,t)},a}var XI=t(()=>{i(),_L(),SL(),DN(),GN(),me(VI,"lean_left")});async function KI(t,i){var{labelStyles:e,nodeStyles:r}=kL(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await K9(t,i,J9(i)),s=Math.max(n.width+(i.padding??0),i?.width??0),o=Math.max(n.height+(i.padding??0),i?.height??0),l=[{x:-3*o/6,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:0,y:-o}],c,h=i.cssStyles;if("handDrawn"===i.look){let t=MN.svg(a),e=TL(i,{}),r=H9(l),n=t.path(r,e);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=zN(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,Q9(i,c),i.intersect=function(t){return yL.polygon(i,l,t)},a}var ZI=t(()=>{i(),_L(),SL(),DN(),GN(),me(KI,"lean_right")});function QI(t,e){var{labelStyles:r,nodeStyles:n}=kL(e);e.label="",e.labelStyle=r;let i=t.insert("g").attr("class",J9(e)).attr("id",e.domId??e.id),a=e.cssStyles,s=Math.max(35,e?.width??0),o=Math.max(35,e?.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=MN.svg(i),h=TL(e,{}),u=("handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid"),H9(l)),d=c.path(u,h),p=i.insert(()=>d,":first-child");return a&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",a),n&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",n),p.attr("transform",`translate(-${s/2},${-o})`),Q9(e,p),e.intersect=function(t){return M.info("lightningBolt intersect",e,t),yL.polygon(e,l,t)},i}var JI=t(()=>{e(),i(),SL(),DN(),_L(),i(),me(QI,"lightningBolt")});async function tR(t,s){var{labelStyles:e,nodeStyles:r}=kL(s);s.labelStyle=e;let{shapeSvg:o,bbox:n,label:i}=await K9(t,s,J9(s)),l=Math.max(n.width+(s.padding??0),s.width??0),c=l/2,h=c/(2.5+l/50),u=Math.max(n.height+h+(s.padding??0),s.height??0),d=.1*u,p,g=s.cssStyles;if("handDrawn"===s.look){let t=MN.svg(o),e=rR(0,0,l,u,c,h,d),r=nR(0,h,l,u,c,h),n=TL(s,{}),i=t.path(e,n),a=t.path(r,n);o.insert(()=>a,":first-child").attr("class","line"),(p=o.insert(()=>i,":first-child")).attr("class","basic label-container"),g&&p.attr("style",g)}else e=eR(0,0,l,u,c,h,d),p=o.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",wE(g)).attr("style",r);return p.attr("label-offset-y",h),p.attr("transform",`translate(${-l/2}, ${-(u/2+h)})`),Q9(s,p),i.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2+h-(n.y-(n.top??0))})`),s.intersect=function(e){var r=yL.rect(s,e),n=r.x-(s.x??0);if(0!=c&&(Math.abs(n)<(s.width??0)/2||Math.abs(n)==(s.width??0)/2&&Math.abs(r.y-(s.y??0))>(s.height??0)/2-h)){let t=h*h*(1-n*n/(c*c));0{i(),_L(),SL(),DN(),ZE(),eR=me((t,e,r,n,i,a,s)=>[`M${t},`+(e+a),`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,"l0,"+n,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n,`M${t},`+(e+a+s),`a${i},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),rR=me((t,e,r,n,i,a,s)=>[`M${t},`+(e+a),`M${t+r},`+(e+a),`a${i},${a} 0,0,0 ${-r},0`,"l0,"+n,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n,`M${t},`+(e+a+s),`a${i},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),nR=me((t,e,r,n,i,a)=>[`M${t-r/2},`+-n/2,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),me(tR,"linedCylinder")});async function aR(t,e){var{labelStyles:r,nodeStyles:n}=kL(e),{shapeSvg:r,bbox:t,label:i}=(e.labelStyle=r,await K9(t,e,J9(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),s=Math.max(t.height+2*(e.padding??0),e?.height??0),o=s/4,l=s+o,c=e.cssStyles,h=MN.svg(r),u=TL(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let d=[{x:-a/2-a/2*.1,y:-l/2},{x:-a/2-a/2*.1,y:l/2},...V9(-a/2-a/2*.1,l/2,a/2+a/2*.1,l/2,o,.8),{x:a/2+a/2*.1,y:-l/2},{x:-a/2-a/2*.1,y:-l/2},{x:-a/2,y:-l/2},{x:-a/2,y:l/2*1.1},{x:-a/2,y:-l/2}],p=h.polygon(d.map(t=>[t.x,t.y]),u),g=r.insert(()=>p,":first-child");return g.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",c),n&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",n),g.attr("transform",`translate(0,${-o/2})`),i.attr("transform",`translate(${-a/2+(e.padding??0)+a/2*.1/2-(t.x-(t.left??0))},${-s/2+(e.padding??0)-o/2-(t.y-(t.top??0))})`),Q9(e,g),e.intersect=function(t){return yL.polygon(e,d,t)},r}var sR=t(()=>{i(),_L(),DN(),SL(),me(aR,"linedWaveEdgedRect")});async function oR(t,e){var{labelStyles:r,nodeStyles:n}=kL(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await K9(t,e,J9(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=-o/2,h=-l/2,u=e.cssStyles,d=MN.svg(i),p=TL(e,{}),g=[{x:c-5,y:5+h},{x:c-5,y:h+l+5},{x:c+o-5,y:h+l+5},{x:c+o-5,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h+l-5},{x:c+o+5,y:h+l-5},{x:c+o+5,y:h-5},{x:5+c,y:h-5},{x:5+c,y:h},{x:c,y:h},{x:c,y:5+h}],f=[{x:c,y:5+h},{x:c+o-5,y:5+h},{x:c+o-5,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h},{x:c,y:h}],m=("handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid"),H9(g)),y=d.path(m,p),v=H9(f),x=d.path(v,{...p,fill:"none"}),b=i.insert(()=>x,":first-child");return b.insert(()=>y,":first-child"),b.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",u),n&&"handDrawn"!==e.look&&b.selectAll("path").attr("style",n),s.attr("transform",`translate(${-a.width/2-5-(a.x-(a.left??0))}, ${-a.height/2+5-(a.y-(a.top??0))})`),Q9(e,b),e.intersect=function(t){return yL.polygon(e,g,t)},i}var lR=t(()=>{i(),SL(),DN(),_L(),me(oR,"multiRect")});async function cR(t,e){var{labelStyles:r,nodeStyles:n}=kL(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await K9(t,e,J9(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=l/4,h=l+c,u=-o/2,d=-h/2,p=e.cssStyles,g=V9(u-5,d+h+5,u+o-5,d+h+5,c,.8),f=g?.[g.length-1],m=[{x:u-5,y:5+d},{x:u-5,y:d+h+5},...g,{x:u+o-5,y:f.y-5},{x:u+o,y:f.y-5},{x:u+o,y:f.y-10},{x:u+o+5,y:f.y-10},{x:u+o+5,y:d-5},{x:5+u,y:d-5},{x:5+u,y:d},{x:u,y:d},{x:u,y:5+d}],y=[{x:u,y:5+d},{x:u+o-5,y:5+d},{x:u+o-5,y:f.y-5},{x:u+o,y:f.y-5},{x:u+o,y:d},{x:u,y:d}],v=MN.svg(i),x=TL(e,{}),b=("handDrawn"!==e.look&&(x.roughness=0,x.fillStyle="solid"),H9(m)),w=v.path(b,x),k=H9(y),T=v.path(k,x),E=i.insert(()=>w,":first-child");return E.insert(()=>T),E.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",p),n&&"handDrawn"!==e.look&&E.selectAll("path").attr("style",n),E.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-a.width/2-5-(a.x-(a.left??0))}, ${-a.height/2+5-c/2-(a.y-(a.top??0))})`),Q9(e,E),e.intersect=function(t){return yL.polygon(e,m,t)},i}var hR=t(()=>{i(),_L(),DN(),SL(),me(cR,"multiWaveEdgedRectangle")});async function uR(t,e,{config:{themeVariables:r}}){var{labelStyles:n,nodeStyles:i}=kL(e),{shapeSvg:n,bbox:t}=(e.labelStyle=n,e.useHtmlLabels||!1!==Ir().flowchart?.htmlLabels||(e.centerLabel=!0),await K9(t,e,J9(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),s=-a/2,o=-(t=Math.max(t.height+2*(e.padding??0),e?.height??0))/2,l=e.cssStyles,c=MN.svg(n),r=TL(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(r.roughness=0,r.fillStyle="solid");let h=c.rectangle(s,o,a,t,r),u=n.insert(()=>h,":first-child");return u.attr("class","basic label-container"),l&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",l),i&&"handDrawn"!==e.look&&u.selectAll("path").attr("style",i),Q9(e,u),e.intersect=function(t){return yL.rect(e,t)},n}var dR=t(()=>{DN(),_L(),SL(),i(),Nn(),me(uR,"note")});async function pR(t,i){var{labelStyles:e,nodeStyles:r}=kL(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await K9(t,i,J9(i)),s=n.width+i.padding,o=n.height+i.padding,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=i.cssStyles;if("handDrawn"===i.look){let t=MN.svg(a),e=TL(i,{}),r=gR(0,0,l),n=t.path(r,e);h=a.insert(()=>n,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`),u&&h.attr("style",u)}else h=zN(a,l,l,c);return r&&h.attr("style",r),Q9(i,h),i.intersect=function(t){return M.debug(`APA12 Intersect called SPLIT -point:`,t,` +`)),!1===t?e.replace(/ /g," "):e}function _L(e,t={}){let r=SL(e,t),n=U9.lexer(r),i=[[]],a=0;function s(t,r="normal"){"text"===t.type?t.text.split(` +`).forEach((e,t)=>{0!==t&&(a++,i.push([])),e.split(" ").forEach(e=>{(e=e.replace(/'/g,"'"))&&i[a].push({content:e,type:r})})}):"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{s(e,t.type)}):"html"===t.type&&i[a].push({content:t.text,type:"normal"})}return mt(s,"processNode"),n.forEach(e=>{"paragraph"===e.type?e.tokens?.forEach(e=>{s(e)}):"html"===e.type&&i[a].push({content:e.text,type:"normal"})}),i}function AL(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:"Unsupported markdown: "+e.type}return e=U9.lexer(e),mt(r,"output"),e.map(r).join("")}var LL=e(()=>{CL(),Fr(),mt(SL,"preprocessMarkdown"),mt(_L,"markdownToLines"),mt(AL,"markdownToHTML")});function NL(e){return Intl.Segmenter?[...(new Intl.Segmenter).segment(e)].map(e=>e.segment):[...e]}function IL(e,t){return RL(e,[],NL(t.content),t.type)}function RL(e,t,r,n){var i,a,s;return 0===r.length?[{content:t.join(""),type:n},{content:"",type:n}]:([i,...a]=r,e([{content:(s=[...t,i]).join(""),type:n}])?RL(e,s,a,n):(0===t.length&&i&&(t.push(i),r.shift()),[{content:t.join(""),type:n},{content:r.join(""),type:n}]))}function ML(e,t){if(e.some(({content:e})=>e.includes(` +`)))throw new Error("splitLineToFitWidth does not support newlines in the line");return DL(e,t)}function DL(e,t,r=[],n=[]){if(0===e.length)return 0{mt(NL,"splitTextToChars"),mt(IL,"splitWordToFitWidth"),mt(RL,"splitWordToFitWidthRecursion"),mt(ML,"splitLineToFitWidth"),mt(DL,"splitLineToFitWidthRecursion")});function PL(e,t){t&&e.attr("style",t)}async function BL(e,t,r,n,i=!1){(e=e.append("foreignObject")).attr("width",10*r+"px"),e.attr("height",10*r+"px");let a=e.append("xhtml:div"),s=t.label;t.label&&qc(t.label)&&(s=await Wc(t.label.replace(L.lineBreakRegex,` +`),D()));var o=t.isNode?"nodeLabel":"edgeLabel",l=a.append("span");return l.html(s),PL(l,t.labelStyle),l.attr("class",o+" "+n),PL(a,t.labelStyle),a.style("display","table-cell"),a.style("white-space","nowrap"),a.style("line-height","1.5"),a.style("max-width",r+"px"),a.style("text-align","center"),a.attr("xmlns","http://www.w3.org/1999/xhtml"),i&&a.attr("class","labelBkg"),(l=a.node().getBoundingClientRect()).width===r&&(a.style("display","table"),a.style("white-space","break-spaces"),a.style("width",r+"px"),l=a.node().getBoundingClientRect()),e.node()}function $L(e,t,r){return e.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",t*r-.1+"em").attr("dy",r+"em")}function FL(e,t,r){return UL(t=$L(e=e.append("text"),1,t),r),r=t.node().getComputedTextLength(),e.remove(),r}function zL(e,t,r){return UL(t=$L(e=e.append("text"),1,t),[{content:r,type:"normal"}]),(r=t.node()?.getBoundingClientRect())&&e.remove(),r}function GL(t,e,r,n=!1){let i=e.append("g"),a=i.insert("rect").attr("class","background").attr("style","stroke: none"),s=i.append("text").attr("y","-10.1"),o=0;for(var l of r){var c,h=mt(e=>FL(i,1.1,e)<=t,"checkWidth");for(c of h(l)?[l]:ML(l,h))UL($L(s,o,1.1),c),o++}return(n?(e=s.node().getBBox(),a.attr("x",e.x-2).attr("y",e.y-2).attr("width",e.width+4).attr("height",e.height+4),i):s).node()}function UL(n,e){n.text(""),e.forEach((e,t)=>{var r=n.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(e.content):r.text(" "+e.content)})}async function qL(e){let i=[],t=(e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,r,n)=>(i.push((async()=>{var e=r+":"+n;return await Be(e)?await $e(e,void 0,{class:"label-icon"}):``})()),t)),await Promise.all(i));return e.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>t.shift()??"")}var jL,WL=e(()=>{Zw(),mu(),eh(),t(),LL(),KC(),je(),OL(),mt(PL,"applyStyle"),mt(BL,"addHtmlSpan"),mt($L,"createTspan"),mt(FL,"computeWidthOfText"),mt(zL,"computeDimensionOfText"),mt(GL,"createFormattedText"),mt(UL,"updateTextContentAndStyles"),mt(qL,"replaceIconSubstring"),jL=mt(async(e,t="",{style:r="",isTitle:n=!1,classes:i="",useHtmlLabels:a=!0,isNode:s=!0,width:o=200,addSvgBackground:l=!1}={},c)=>(M.debug("XYZ createText",t,r,n,i,a,s,"addSvgBackground: ",l),a?(n=AL(t,c),a=await qL(VC(n)),n=t.replace(/\\\\/g,"\\"),BL(e,{isNode:s,label:qc(t)?n:a,labelStyle:r.replace("fill:","color:")},o,i,l)):(n=GL(o,e,_L(t.replace(//g,"
").replace("
","
"),c),!!t&&l),s?(a=(r=/stroke:/.exec(r)?r.replace("stroke:","lineColor:"):r).replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:"),H(n).attr("style",a)):(i=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:"),H(n).select("rect").attr("style",i.replace(/background:/g,"fill:")),o=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:"),H(n).select("text").attr("style",o)),n)),"createText")});function YL(e){return(e=e.map((e,t)=>(0===t?"M":"L")+e.x+","+e.y)).push("Z"),e.join(" ")}function HL(t,e,r,n,i,a){var s=[],o=r-t,l=2*Math.PI/(o/a),c=e+(n-e)/2;for(let e=0;e<=50;e++){var h=t+e/50*o,u=c+i*Math.sin(l*(h-t));s.push({x:h,y:u})}return s}function VL(t,r,n,i,e,a){var s=[],o=e*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let e=0;e{WL(),mu(),Zw(),An(),eh(),KC(),XL=mt(async(e,t,r)=>{let n,i=t.useHtmlLabels||Dc(D()?.htmlLabels),a=(n=r||"node default",e.insert("g").attr("class",n).attr("id",t.domId||t.id)),s=a.insert("g").attr("class","label").attr("style",bC(t.labelStyle)),o,l=(o=void 0===t.label?"":"string"==typeof t.label?t.label:t.label[0],await jL(s,_c(VC(o),D()),{useHtmlLabels:i,width:t.width||D().flowchart?.wrappingWidth,cssClasses:"markdown-node-label",style:t.labelStyle,addSvgBackground:!!t.icon||!!t.img})),c=l.getBBox(),h=(t?.padding??0)/2;if(i){var r=l.children[0],e=H(l),u=r.getElementsByTagName("img");if(u){let n=""===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",n?(e=(D().fontSize?D():window.getComputedStyle(document.body)).fontSize,[e=yr.fontSize]=WC(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)})))}c=r.getBoundingClientRect(),e.attr("width",c.width),e.attr("height",c.height)}return i?s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"):s.attr("transform","translate(0, "+-c.height/2+")"),t.centerLabel&&s.attr("transform","translate("+-c.width/2+", "+-c.height/2+")"),s.insert("rect",":first-child"),{shapeSvg:a,bbox:c,halfPadding:h,label:s}},"labelHelper"),KL=mt(async(e,t,r)=>{let n=r.useHtmlLabels||Dc(D()?.flowchart?.htmlLabels),i=e.insert("g").attr("class","label").attr("style",r.labelStyle||""),a=await jL(i,_c(VC(t),D()),{useHtmlLabels:n,width:r.width||D()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),s=a.getBBox(),o=r.padding/2,l;return Dc(D()?.flowchart?.htmlLabels)&&(t=a.children[0],l=H(a),s=t.getBoundingClientRect(),l.attr("width",s.width),l.attr("height",s.height)),n?i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"):i.attr("transform","translate(0, "+-s.height/2+")"),r.centerLabel&&i.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),i.insert("rect",":first-child"),{shapeSvg:e,bbox:s,halfPadding:o,label:i}},"insertLabel"),ZL=mt((e,t)=>{t=t.node().getBBox(),e.width=t.width,e.height=t.height},"updateNodeBounds"),QL=mt((e,t)=>("handDrawn"===e.look?"rough-node":"node")+" "+e.cssClasses+" "+(t||""),"getNodeClasses"),mt(YL,"createPathFromPoints"),mt(HL,"generateFullSineWavePoints"),mt(VL,"generateCirclePoints")});function JL(e,t){return e.intersect(t)}var eN,tN=e(()=>{mt(JL,"intersectNode"),eN=JL});function rN(e,t,r,n){var i=e.x,e=e.y,a=i-n.x,s=e-n.y,o=Math.sqrt(t*t*s*s+r*r*a*a),a=Math.abs(t*r*a/o),t=(n.x{mt(rN,"intersectEllipse"),nN=rN});function aN(e,t,r){return nN(e,t,t,r)}var sN,oN=e(()=>{iN(),mt(aN,"intersectCircle"),sN=aN});function lN(e,t,r,n){var i,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*n.x+c*n.y+h;if(!(0!=u&&0!=d&&0{mt(lN,"intersectLine"),mt(cN,"sameSign"),hN=lN});function dN(t,r,n){let e=t.x,i=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=i-t.height/2-o;for(let e=0;e{uN(),mt(dN,"intersectPolygon"),pN=dN}),TN=e(()=>{gN=mt((e,t)=>{var r,n=e.x,i=e.y,a=t.x-n,t=t.y-i,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:n+r,y:i+e}},"intersectRect"),fN=gN}),EN=e(()=>{tN(),oN(),iN(),kN(),TN(),mN={node:eN,circle:sN,ellipse:nN,polygon:pN,rect:fN}}),CN=e(()=>{mu(),yN=mt(e=>({fill:e,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:e,seed:D().handDrawnSeed}),"solidStateFill"),vN=mt(e=>({stylesMap:e=xN([...e.cssCompiledStyles||[],...e.cssStyles||[]]),stylesArray:[...e]}),"compileStyles"),xN=mt(e=>{let r=new Map;return e.forEach(e=>{var[e,t]=e.split(":");r.set(e.trim(),t?.trim())}),r},"styles2Map"),bN=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"),V=mt(e=>{let t=vN(e).stylesArray,r=[],n=[],i=[],a=[];return t.forEach(e=>{var t=e[0];bN(t)?r.push(e.join(":")+" !important"):(n.push(e.join(":")+" !important"),t.includes("stroke")&&i.push(e.join(":")+" !important"),"fill"===t&&a.push(e.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:n.join(";"),stylesArray:t,borderStyles:i,backgroundStyles:a}},"styles2String"),wN=mt((e,t)=>{var{themeVariables:r,handDrawnSeed:n}=D(),{nodeBorder:r,mainBkg:i}=r,e=vN(e).stylesMap;return Object.assign({roughness:.7,fill:e.get("fill")||i,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:e.get("stroke")||r,seed:n,strokeWidth:e.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0]},t)},"userNodeOverrides")});function SN(e,t,r){if(e&&e.length){var n,[i,a]=t,t=Math.PI/180*r,s=Math.cos(t),o=Math.sin(t);for(n of e){var[l,c]=n;n[0]=(l-i)*s-(c-a)*o+i,n[1]=(l-i)*o+(c-a)*s+a}}}function _N(e,t){return e[0]===t[0]&&e[1]===t[1]}function AN(e,r,n,t=1){var i=n,n=Math.max(r,.1),p=e[0]&&e[0][0]&&"number"==typeof e[0][0]?[e]:e,a=[0,0];if(i)for(var s of p)SN(s,a,i);if(r=((t,i)=>{var e,r=[];for(e of p){var n=[...e];_N(n[0],n[n.length-1])||n.push([n[0][0],n[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=[],n=o[0].ymin,e=0;for(;r.length||o.length;){if(o.length){let t=-1;for(let e=0;en);e++)t=e;o.splice(0,t+1).forEach(e=>{r.push({s:n,edge:e})})}if((r=r.filter(e=>!(e.edge.ymax<=n))).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!==i||e%t==0)&&1=r.length);e+=2){var u=r[e].edge,d=r[d].edge;s.push([[Math.round(u.x),n],[Math.round(d.x),n]])}n+=i,r.forEach(e=>{e.edge.x=e.edge.x+i*e.edge.islope}),e++}}return s})(n,t),i){for(var o of p)SN(o,a,-i);{e=a,n=-i;let t=[];r.forEach(e=>t.push(...e)),SN(t,e,n)}}return r}function LN(e,t){let r,n=t.hachureAngle+90,i=t.hachureGap,a=(i<0&&(i=4*t.strokeWidth),i=Math.round(Math.max(i,.1)),1);return 1<=t.roughness&&.7<((null==(r=t.randomizer)?void 0:r.next())||Math.random())&&(a=i),AN(e,i,n,a||1)}function NN(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 IN(e,t){return e.type===t}function RN(e){let n=[],i=(e=>{for(var t=new Array;""!==e;){if(!e.match(/^([ \t\r\n,]+)/))if(e.match(/^([aAcChHlLmMqQsStTvVzZ])/))t[t.length]={type:wI,text:RegExp.$1};else{if(!e.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];t[t.length]={type:kI,text:""+parseFloat(RegExp.$1)}}e=e.substr(RegExp.$1.length)}return t[t.length]={type:TI,text:""},t})(e),a="BOD",s=0,o=i[s];for(;!IN(o,TI);){let t=0,r=[];if("BOD"===a){if("M"!==o.text&&"m"!==o.text)return RN("M0,0"+e);s++,t=EI[o.text],a=o.text}else IN(o,kI)?t=EI[a]:(s++,t=EI[o.text],a=o.text);if(!(s+tt%2?e+n:e+r);a.push({key:"C",data:l}),r=l[4],n=l[5];break;case"Q":a.push({key:"Q",data:[...o]}),r=o[2],n=o[3];break;case"q":l=o.map((e,t)=>t%2?e+n:e+r),a.push({key:"Q",data:l}),r=l[2],n=l[3];break;case"A":a.push({key:"A",data:[...o]}),r=o[5],n=o[6];break;case"a":r+=o[5],n+=o[6],a.push({key:"A",data:[o[0],o[1],o[2],o[3],o[4],r,n]});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]}),n=o[0];break;case"v":n+=o[0],a.push({key:"V",data:[n]});break;case"S":a.push({key:"S",data:[...o]}),r=o[2],n=o[3];break;case"s":var c=o.map((e,t)=>t%2?e+n:e+r);a.push({key:"S",data:c}),r=c[2],n=c[3];break;case"T":a.push({key:"T",data:[...o]}),r=o[0],n=o[1];break;case"t":r+=o[0],n+=o[1],a.push({key:"T",data:[r,n]});break;case"Z":case"z":a.push({key:"Z",data:[]}),r=t,n=i}return a}function DN(e){let i=[],a="",s=0,o=0,t=0,r=0,l=0,c=0;for(var{key:n,data:h}of e){switch(n){case"M":i.push({key:"M",data:[...h]}),[s,o]=h,[t,r]=h;break;case"C":i.push({key:"C",data:[...h]}),s=h[4],o=h[5],l=h[2],c=h[3];break;case"L":i.push({key:"L",data:[...h]}),[s,o]=h;break;case"H":s=h[0],i.push({key:"L",data:[s,o]});break;case"V":o=h[0],i.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),i.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,n;n="Q"===a||"T"===a?(r=s+(s-l),o+(o-c)):(r=s,o);var u=s+2*(r-s)/3,d=o+2*(n-o)/3,p=e+2*(r-e)/3,g=t+2*(n-t)/3;i.push({key:"C",data:[u,d,p,g,e,t]}),l=r,c=n,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;i.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],x=h[4],b=h[5],w=h[6];0===f||0===m?(i.push({key:"C",data:[s,o,b,w,b,w]}),s=b,o=w):s===b&&o===w||(PN(s,o,b,w,f,m,y,v,x).forEach(function(e){i.push({key:"C",data:e})}),s=b,o=w);break;case"Z":i.push({key:"Z",data:[]}),s=t,o=r}a=n}return i}function ON(e,t,r){return[e*Math.cos(r)-t*Math.sin(r),e*Math.sin(r)+t*Math.cos(r)]}function PN(e,t,r,n,i,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]=ON(e,t,-h),[r,n]=ON(r,n,-h),1<(m=(y=(e-r)/2)*y/(i*i)+(v=(t-n)/2)*v/(a*a))&&(i*=m=Math.sqrt(m),a*=m),m=i*i,x=a*a,o=(o===l?-1:1)*Math.sqrt(Math.abs((m*x-m*v*v-x*y*y)/(m*v*v+x*y*y))),g=o*i*v/a+(e+r)/2,f=o*-a*y/i+(t+n)/2,d=Math.asin(parseFloat(((t-f)/a).toFixed(9))),p=Math.asin(parseFloat(((n-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&&(x=p,v=r,o=n,p=l&&p>d?d+120*Math.PI/180*1:d+120*Math.PI/180*-1,u=PN(r=g+i*Math.cos(p),n=f+a*Math.sin(p),v,o,i,a,s,0,l,[p,x,g,f])),m=p-d,Math.cos(d)),v=Math.sin(d),o=Math.cos(p),s=Math.sin(p),x=4/3*i*(l=Math.tan(m/4)),i=[e,t],a=[e+x*v,t-(m=4/3*a*l)*y],l=[r+x*s,n-m*o],e=[r,n];if(a[0]=2*i[0]-a[0],a[1]=2*i[1]-a[1],c)return[a,l,e].concat(u);u=[a,l,e].concat(u);var b=[];for(let e=0;e2*Math.PI&&(c=0,h=2*Math.PI),i=2*Math.PI/l.curveStepCount,i=rI(a=Math.min(i/2,(h-c)/2),e,t,r,n,c,h,1,l),l.disableMultiStroke||(a=rI(a,e,t,r,n,c,h,1.5,l),i.push(...a)),s&&(o?i.push(...ZN(e,t,e+r*Math.cos(c),t+n*Math.sin(c),l),...ZN(e,t,e+r*Math.cos(h),t+n*Math.sin(h),l)):i.push({op:"lineTo",data:[e,t]},{op:"lineTo",data:[e+r*Math.cos(c),t+n*Math.sin(c)]})),{type:"path",ops:i}}function jN(e,t){let r=DN(MN(RN(e))),n=[],i=[0,0],a=[0,0];for(var{key:s,data:o}of r)switch(s){case"M":a=[o[0],o[1]],i=[o[0],o[1]];break;case"L":n.push(...ZN(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;n.push(...nI(l,c,h,u,d,p,a,t)),a=[d,p];break;case"Z":n.push(...ZN(a[0],a[1],i[0],i[1],t)),a=[i[0],i[1]]}return{type:"path",ops:n}}function WN(e,t){var r,n=[];for(r of e)if(r.length){var i=t.maxRandomnessOffset||0,a=r.length;if(2{let t=r.fillStyle||"hachure";if(!xI[t])switch(t){case"zigzag":xI[t]||(xI[t]=new gI(e));break;case"cross-hatch":xI[t]||(xI[t]=new fI(e));break;case"dots":xI[t]||(xI[t]=new mI(e));break;case"dashed":xI[t]||(xI[t]=new yI(e));break;case"zigzag-line":xI[t]||(xI[t]=new vI(e));break;default:t="hachure",xI[t]||(xI[t]=new pI(e))}return xI[t]})(CI).fillPolygons(e,r)}function HN(e){var t=Object.assign({},e);return t.randomizer=void 0,e.seed&&(t.seed=e.seed+1),t}function VN(e){return e.randomizer||(e.randomizer=new bI(e.seed||0)),e.randomizer.next()}function XN(e,t,r,n=1){return r.roughness*n*(VN(r)*(t-e)+e)}function KN(e,t,r=1){return XN(-e,e,t,r)}function ZN(e,t,r,n,i,a=!1){var a=a?i.disableMultiStrokeFill:i.disableMultiStroke,s=QN(e,t,r,n,i,!0,!1);return a?s:(a=QN(e,t,r,n,i,!0,!0),s.concat(a))}function QN(e,t,r,n,i,a,s){let o=Math.pow(e-r,2)+Math.pow(t-n,2),l=Math.sqrt(o),c,h=(c=l<200?1:500o?l/10:h)/2,d=.2+.2*VN(i),p=i.bowing*i.maxRandomnessOffset*(n-t)/200,g=i.bowing*i.maxRandomnessOffset*(e-r)/200;p=KN(p,i,c),g=KN(g,i,c);var f=[],m=mt(()=>KN(u,i,c),"M"),y=mt(()=>KN(h,i,c),"k"),v=i.preserveVertices;return a&&f.push(s?{op:"move",data:[e+(v?0:m()),t+(v?0:m())]}:{op:"move",data:[e+(v?0:KN(h,i,c)),t+(v?0:KN(h,i,c))]}),f.push(s?{op:"bcurveTo",data:[p+e+(r-e)*d+m(),g+t+(n-t)*d+m(),p+e+2*(r-e)*d+m(),g+t+2*(n-t)*d+m(),r+(v?0:m()),n+(v?0:m())]}:{op:"bcurveTo",data:[p+e+(r-e)*d+y(),g+t+(n-t)*d+y(),p+e+2*(r-e)*d+y(),g+t+2*(n-t)*d+y(),r+(v?0:y()),n+(v?0:y())]}),f}function JN(t,r,n){if(!t.length)return[];var i=[];i.push([t[0][0]+KN(r,n),t[0][1]+KN(r,n)]),i.push([t[0][0]+KN(r,n),t[0][1]+KN(r,n)]);for(let e=1;e{let e=l[c+0],t=l[c+1],r=l[c+2],n=l[c+3],i=3*t[0]-2*e[0]-n[0],a=(i*=i,3*t[1]-2*e[1]-n[1]);a*=a;var s=3*r[0]-2*n[0]-e[0],o=(s*=s,3*r[1]-2*n[1]-e[1]);return o*=o,il&&(l=h,c=e)}return Math.sqrt(l)>e?(uI(t,r,c+1,e,a),uI(t,c,n,e,a)):(a.length||a.push(s),a.push(o)),a}function dI(t,r=.15,e){var n=[],i=(t.length-1)/3;for(let e=0;e{mt(SN,"t"),mt(_N,"e"),mt(AN,"s"),mt(LN,"n"),pI=class{static{mt(this,"o")}constructor(e){this.helper=e}fillPolygons(e,t){return this._fillPolygons(e,t)}_fillPolygons(e,t){return e=LN(e,t),{type:"fillSketch",ops:this.renderLines(e,t)}}renderLines(e,t){var r,n=[];for(r of e)n.push(...this.helper.doubleLineOps(r[0][0],r[0][1],r[1][0],r[1][1],t));return n}},mt(NN,"a"),gI=class extends pI{static{mt(this,"h")}fillPolygons(e,t){let r=t.hachureGap;r<0&&(r=4*t.strokeWidth),r=Math.max(r,.1);var n,i,e=LN(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([n,i]of e)NN([n,i])&&s.push([[n[0]-o,n[1]+l],[...i]],[[n[0]+o,n[1]-l],[...i]]);return{type:"fillSketch",ops:this.renderLines(s,t)}}},fI=class extends pI{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}},mI=class{static{mt(this,"i")}constructor(e){this.helper=e}fillPolygons(e,t){return e=LN(e,t=Object.assign({},t,{hachureAngle:0})),this.dotsOnLines(e,t)}dotsOnLines(e,t){let r=[],n=t.hachureGap,i=(n<0&&(n=4*t.strokeWidth),n=Math.max(n,.1),t.fillWeight);i<0&&(i=t.strokeWidth/2);var a,s=n/4;for(a of e){var o=NN(a),l=o/n,c=Math.ceil(l)-1,h=o-c*n,u=(a[0][0]+a[1][0])/2-n/4,d=Math.min(a[0][1],a[1][1]);for(let e=0;e{let t=NN(e),r=Math.floor(t/(h+u)),n=(t+u-r*(h+u))/2,i=e[0],a=e[1];i[0]>a[0]&&(i=e[1],a=e[0]);var s=Math.atan((a[1]-i[1])/(a[0]-i[0]));for(let e=0;e{let t=NN(e),r=Math.round(t/(2*c)),n=e[0],i=e[1];n[0]>i[0]&&(n=e[1],i=e[0]);var a=Math.atan((i[1]-n[1])/(i[0]-n[0]));for(let e=0;e{var i=d,a=p,s=Math.abs(g/2),o=Math.abs(e/2);s+=KN(.01*s,n),o+=KN(.01*o,n);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)/n.curveStepCount,u=[];for(let e=l;e<=c;e+=h)u.push([i+s*Math.cos(e),a+o*Math.sin(e)]);return u.push([i+s*Math.cos(c),a+o*Math.sin(c)]),u.push([i,a]),YN([u],n)})(e,t,r,i))),i.stroke!==SI&&a.push(s),this._d("arc",a,i)}curve(e,t){var r=this._o(t),t=[],n=zN(e,r);if(r.fill&&r.fill!==SI)if("solid"===r.fillStyle){var i=zN(e,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));t.push({type:"fillPath",ops:this._mergedShape(i.ops)})}else{var a,s=[];if((i=e).length)for(a of"number"==typeof i[0][0]?[i]:i)a.length<3?s.push(...a):3===a.length?s.push(...dI(aI([a[0],a[0],a[1],a[2]]),10,(1+r.roughness)/2)):s.push(...dI(aI(a),10,(1+r.roughness)/2));s.length&&t.push(YN([s],r))}return r.stroke!==SI&&t.push(n),this._d("curve",t,r)}polygon(e,t){var r=[],n=$N(e,!0,t=this._o(t));return t.fill&&("solid"===t.fillStyle?r.push(WN([e],t)):r.push(YN([e],t))),t.stroke!==SI&&r.push(n),this._d("polygon",r,t)}path(e,t){let r=this._o(t),n=[];var i,a,s,o;return e&&(e=(e||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," "),t=r.fill&&"transparent"!==r.fill&&r.fill!==SI,i=r.stroke!==SI,s=((e,t)=>{let r=DN(MN(RN(e))),n=[],i=[],a=[0,0],s=[],o=mt(()=>{4<=s.length&&i.push(...dI(s,1)),s=[]},"i"),l=mt(()=>{o(),i.length&&(n.push(i),i=[])},"c");for(var{key:c,data:h}of r)switch(c){case"M":l(),a=[h[0],h[1]],i.push(a);break;case"L":o(),i.push([h[0],h[1]]);break;case"C":var u;s.length||(u=i.length?i[i.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(),i.push([a[0],a[1]])}if(l(),!t)return n;var d,p=[];for(d of n){var g=hI(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=jN(e,r),t&&("solid"===r.fillStyle?1===s.length?(t=jN(e,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0})),n.push({type:"fillPath",ops:this._mergedShape(t.ops)})):n.push(WN(s,r)):n.push(YN(s,r))),i)&&(a?s.forEach(e=>{n.push($N(e,!1,r))}):n.push(o)),this._d("path",n,r)}opsToPath(e,t){let r="";for(var n of e.ops){var i="number"==typeof t&&0<=t?n.data.map(e=>+e.toFixed(t)):n.data;switch(n.op){case"move":r+=`M${i[0]} ${i[1]} `;break;case"bcurveTo":r+=`C${i[0]} ${i[1]}, ${i[2]} ${i[3]}, ${i[4]} ${i[5]} `;break;case"lineTo":r+=`L${i[0]} ${i[1]} `}}return r.trim()}toPaths(e){var t,r=e.sets||[],n=e.options||this.defaultOptions,i=[];for(t of r){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:n.stroke,strokeWidth:n.strokeWidth,fill:SI};break;case"fillPath":e={d:this.opsToPath(t),stroke:SI,strokeWidth:0,fill:n.fill||SI};break;case"fillSketch":e=this.fillSketch(t,n)}e&&i.push(e)}return i}fillSketch(e,t){let r=t.fillWeight;return r<0&&(r=t.strokeWidth/2),{d:this.opsToPath(e),stroke:t.fill||SI,strokeWidth:r,fill:SI}}_mergedShape(e){return e.filter((e,t)=>0===t||"move"!==e.op)}},AI=class{static{mt(this,"st")}constructor(e,t){this.canvas=e,this.ctx=this.canvas.getContext("2d"),this.gen=new _I(t)}draw(e){var t,r=e.sets||[],n=e.options||this.getDefaultOptions(),i=this.ctx,a=e.options.fixedDecimalPlaceDigits;for(t of r)switch(t.type){case"path":i.save(),i.strokeStyle="none"===n.stroke?"transparent":n.stroke,i.lineWidth=n.strokeWidth,n.strokeLineDash&&i.setLineDash(n.strokeLineDash),n.strokeLineDashOffset&&(i.lineDashOffset=n.strokeLineDashOffset),this._drawToContext(i,t,a),i.restore();break;case"fillPath":i.save(),i.fillStyle=n.fill||"";var s="curve"===e.shape||"polygon"===e.shape||"path"===e.shape?"evenodd":"nonzero";this._drawToContext(i,t,a,s),i.restore();break;case"fillSketch":this.fillSketch(i,t,n)}}fillSketch(e,t,r){let n=r.fillWeight;n<0&&(n=r.strokeWidth/2),e.save(),r.fillLineDash&&e.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(e.lineDashOffset=r.fillLineDashOffset),e.strokeStyle=r.fill||"",e.lineWidth=n,this._drawToContext(e,t,r.fixedDecimalPlaceDigits),e.restore()}_drawToContext(e,t,r,n="nonzero"){e.beginPath();for(var i of t.ops){var a="number"==typeof r&&0<=r?i.data.map(e=>+e.toFixed(r)):i.data;switch(i.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(n):e.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(e,t,r,n,i){return e=this.gen.line(e,t,r,n,i),this.draw(e),e}rectangle(e,t,r,n,i){return e=this.gen.rectangle(e,t,r,n,i),this.draw(e),e}ellipse(e,t,r,n,i){return e=this.gen.ellipse(e,t,r,n,i),this.draw(e),e}circle(e,t,r,n){return e=this.gen.circle(e,t,r,n),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,n,i,a,s=!1,o){return e=this.gen.arc(e,t,r,n,i,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}},LI="http://www.w3.org/2000/svg",NI=class{static{mt(this,"ot")}constructor(e,t){this.svg=e,this.gen=new _I(t)}draw(t){var r,e=t.sets||[],n=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,a=i.createElementNS(LI,"g"),s=t.options.fixedDecimalPlaceDigits;for(r of e){let e=null;switch(r.type){case"path":(e=i.createElementNS(LI,"path")).setAttribute("d",this.opsToPath(r,s)),e.setAttribute("stroke",n.stroke),e.setAttribute("stroke-width",n.strokeWidth+""),e.setAttribute("fill","none"),n.strokeLineDash&&e.setAttribute("stroke-dasharray",n.strokeLineDash.join(" ").trim()),n.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",""+n.strokeLineDashOffset);break;case"fillPath":(e=i.createElementNS(LI,"path")).setAttribute("d",this.opsToPath(r,s)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",n.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(i,r,n)}e&&a.appendChild(e)}return a}fillSketch(e,t,r){let n=r.fillWeight;return n<0&&(n=r.strokeWidth/2),(e=e.createElementNS(LI,"path")).setAttribute("d",this.opsToPath(t,r.fixedDecimalPlaceDigits)),e.setAttribute("stroke",r.fill||""),e.setAttribute("stroke-width",n+""),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,n,i){return e=this.gen.line(e,t,r,n,i),this.draw(e)}rectangle(e,t,r,n,i){return e=this.gen.rectangle(e,t,r,n,i),this.draw(e)}ellipse(e,t,r,n,i){return e=this.gen.ellipse(e,t,r,n,i),this.draw(e)}circle(e,t,r,n){return e=this.gen.circle(e,t,r,n),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,n,i,a,s=!1,o){return e=this.gen.arc(e,t,r,n,i,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)}},II={canvas:mt((e,t)=>new AI(e,t),"canvas"),svg:mt((e,t)=>new NI(e,t),"svg"),generator:mt(e=>new _I(e),"generator"),newSeed:mt(()=>_I.newSeed(),"newSeed")}});function MI(e,t){var r=V(t).labelStyles;t.labelStyle=r;let n=QL(t),i=n,a=(n||(i="anchor"),e.insert("g").attr("class",i).attr("id",t.domId||t.id)),s=t.cssStyles,o=II.svg(a),l=wN(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",bC(s)),ZL(t,h),t.intersect=function(e){return M.info("Circle intersect",t,1,e),mN.circle(t,1,e)},a}var DI=e(()=>{t(),i(),EN(),CN(),RI(),KC(),mt(MI,"anchor")});function OI(e,t,r,n,i,a,s){var o=(e+r)/2,l=(t+n)/2,c=Math.atan2(n-t,r-e),h=Math.sqrt(((r-e)/2/i)**2+((n-t)/2/a)**2);if(1f,":first-child");return m.attr("class","basic label-container"),h&&"handDrawn"!==t.look&&m.selectAll("path").attr("style",h),n&&"handDrawn"!==t.look&&m.selectAll("path").attr("style",n),m.attr("transform",`translate(${c/2}, 0)`),ZL(t,m),t.intersect=function(e){return mN.polygon(t,u,e)},i}var BI=e(()=>{i(),EN(),CN(),RI(),mt(OI,"generateArcPoints"),mt(PI,"bowTieRect")});function $I(e,t,r,n){return e.insert("polygon",":first-child").attr("points",n.map(function(e){return e.x+","+e.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}var FI=e(()=>{mt($I,"insertPolygonShape")});async function zI(e,i){var{labelStyles:t,nodeStyles:r}=V(i);i.labelStyle=t;let{shapeSvg:a,bbox:n}=await XL(e,i,QL(i)),s=n.height+i.padding,o=n.width+i.padding+12,l=o,c=-s,h=[{x:12,y:c},{x:l,y:c},{x:l,y:0},{x:0,y:0},{x:0,y:12+c},{x:12,y:c}],u,d=i.cssStyles;if("handDrawn"===i.look){let e=II.svg(a),t=wN(i,{}),r=YL(h),n=e.path(r,t);u=a.insert(()=>n,":first-child").attr("transform",`translate(${-o/2}, ${s/2})`),d&&u.attr("style",d)}else u=$I(a,o,s,h);return r&&u.attr("style",r),ZL(i,u),i.intersect=function(e){return mN.polygon(i,h,e)},a}var GI=e(()=>{i(),EN(),CN(),RI(),FI(),i(),mt(zI,"card")});function UI(e,t){var r=V(t).nodeStyles;t.label="";let n=e.insert("g").attr("class",QL(t)).attr("id",t.domId??t.id),i=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=II.svg(n),l=wN(t,{}),c=("handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid"),YL(s)),h=o.path(c,l),u=n.insert(()=>h,":first-child");return i&&"handDrawn"!==t.look&&u.selectAll("path").attr("style",i),r&&"handDrawn"!==t.look&&u.selectAll("path").attr("style",r),t.width=28,t.height=28,t.intersect=function(e){return mN.polygon(t,s,e)},n}var qI=e(()=>{EN(),RI(),CN(),i(),mt(UI,"choice")});async function jI(e,n){var{labelStyles:t,nodeStyles:r}=V(n);n.labelStyle=t;let{shapeSvg:i,bbox:a,halfPadding:s}=await XL(e,n,QL(n)),o=a.width/2+s,l,c=n.cssStyles;if("handDrawn"===n.look){let e=II.svg(i),t=wN(n,{}),r=e.circle(0,0,2*o,t);(l=i.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",bC(c))}else l=i.insert("circle",":first-child").attr("class","basic label-container").attr("style",r).attr("r",o).attr("cx",0).attr("cy",0);return ZL(n,l),n.intersect=function(e){return M.info("Circle intersect",n,o,e),mN.circle(n,o,e)},i}var WI=e(()=>{t(),i(),EN(),CN(),RI(),KC(),mt(jI,"circle")});function YI(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 HI(e,t){var{labelStyles:r,nodeStyles:n}=V(t);t.labelStyle=r,t.label="";let i=e.insert("g").attr("class",QL(t)).attr("id",t.domId??t.id),a=Math.max(30,t?.width??0),s=t.cssStyles,o=II.svg(i),l=wN(t,{}),c=("handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid"),o.circle(0,0,2*a,l)),h=YI(a),u=o.path(h,l),d=i.insert(()=>c,":first-child");return d.insert(()=>u),s&&"handDrawn"!==t.look&&d.selectAll("path").attr("style",s),n&&"handDrawn"!==t.look&&d.selectAll("path").attr("style",n),ZL(t,d),t.intersect=function(e){return M.info("crossedCircle intersect",t,{radius:a,point:e}),mN.circle(t,a,e)},i}var VI=e(()=>{t(),i(),CN(),RI(),EN(),mt(YI,"createLine"),mt(HI,"crossedCircle")});function XI(t,r,n,i=100,e=0,a=180){var s=[],o=e*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let e=0;ev,":first-child").attr("stroke-opacity",0),x.insert(()=>m,":first-child"),x.attr("class","text"),h&&"handDrawn"!==t.look&&x.selectAll("path").attr("style",h),n&&"handDrawn"!==t.look&&x.selectAll("path").attr("style",n),x.attr("transform",`translate(${c}, 0)`),s.attr("transform",`translate(${-o/2+c-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),ZL(t,x),t.intersect=function(e){return mN.polygon(t,d,e)},i}var ZI=e(()=>{i(),EN(),CN(),RI(),mt(XI,"generateCirclePoints"),mt(KI,"curlyBraceLeft")});function QI(t,r,n,i=100,e=0,a=180){var s=[],o=e*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let e=0;ev,":first-child").attr("stroke-opacity",0),x.insert(()=>m,":first-child"),x.attr("class","text"),h&&"handDrawn"!==t.look&&x.selectAll("path").attr("style",h),n&&"handDrawn"!==t.look&&x.selectAll("path").attr("style",n),x.attr("transform",`translate(${-c}, 0)`),s.attr("transform",`translate(${-o/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),ZL(t,x),t.intersect=function(e){return mN.polygon(t,d,e)},i}var eR=e(()=>{i(),EN(),CN(),RI(),mt(QI,"generateCirclePoints"),mt(JI,"curlyBraceRight")});function tR(t,r,n,i=100,e=0,a=180){var s=[],o=e*Math.PI/180,l=(a*Math.PI/180-o)/(i-1);for(let e=0;ew,":first-child").attr("stroke-opacity",0),k.insert(()=>y,":first-child"),k.insert(()=>x,":first-child"),k.attr("class","text"),h&&"handDrawn"!==t.look&&k.selectAll("path").attr("style",h),n&&"handDrawn"!==t.look&&k.selectAll("path").attr("style",n),k.attr("transform",`translate(${c-c/4}, 0)`),s.attr("transform",`translate(${-o/2+(t.padding??0)/2-(a.x-(a.left??0))},${-l/2+(t.padding??0)/2-(a.y-(a.top??0))})`),ZL(t,k),t.intersect=function(e){return mN.polygon(t,p,e)},i}var nR=e(()=>{i(),EN(),CN(),RI(),mt(tR,"generateCirclePoints"),mt(rR,"curlyBraces")});async function iR(e,t){var{labelStyles:r,nodeStyles:n}=V(t),{shapeSvg:r,bbox:e}=(t.labelStyle=r,await XL(e,t,QL(t))),i=Math.max(80,1.25*(e.width+2*(t.padding??0)),t?.width??0),a=(e=Math.max(20,e.height+2*(t.padding??0),t?.height??0))/2,s=t.cssStyles,o=II.svg(r),l=wN(t,{});"handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid");let c=i,h=e,u=c-a,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},...VL(-u,-h/2,a,50,270,90)],g=YL(p),f=o.path(g,l),m=r.insert(()=>f,":first-child");return m.attr("class","basic label-container"),s&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",s),n&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",n),m.attr("transform",`translate(${-i/2}, ${-e/2})`),ZL(t,m),t.intersect=function(e){return mN.polygon(t,p,e)},r}var aR=e(()=>{i(),EN(),CN(),RI(),mt(iR,"curvedTrapezoid")});async function sR(e,a){var{labelStyles:t,nodeStyles:r}=V(a);a.labelStyle=t;let{shapeSvg:s,bbox:n,label:i}=await XL(e,a,QL(a)),o=Math.max(n.width+a.padding,a.width??0),l=o/2,c=l/(2.5+o/50),h=Math.max(n.height+c+a.padding,a.height??0),u,d=a.cssStyles;if("handDrawn"===a.look){let e=II.svg(s),t=lR(0,0,o,h,l,c),r=cR(0,c,o,h,l,c),n=e.path(t,wN(a,{})),i=e.path(r,wN(a,{fill:"none"}));u=s.insert(()=>i,":first-child"),(u=s.insert(()=>n,":first-child")).attr("class","basic label-container"),d&&u.attr("style",d)}else t=oR(0,0,o,h,l,c),u=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",bC(d)).attr("style",r);return u.attr("label-offset-y",c),u.attr("transform",`translate(${-o/2}, ${-(h/2+c)})`),ZL(a,u),i.attr("transform",`translate(${-n.width/2-(n.x-(n.left??0))}, ${-n.height/2+(a.padding??0)/1.5-(n.y-(n.top??0))})`),a.intersect=function(t){var r=mN.rect(a,t),n=r.x-(a.x??0);if(0!=l&&(Math.abs(n)<(a.width??0)/2||Math.abs(n)==(a.width??0)/2&&Math.abs(r.y-(a.y??0))>(a.height??0)/2-c)){let e=c*c*(1-n*n/(l*l));0{i(),EN(),CN(),RI(),KC(),oR=mt((e,t,r,n,i,a)=>[`M${e},`+(t+a),`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,"l0,"+n,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n].join(" "),"createCylinderPathD"),lR=mt((e,t,r,n,i,a)=>[`M${e},`+(t+a),`M${e+r},`+(t+a),`a${i},${a} 0,0,0 ${-r},0`,"l0,"+n,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n].join(" "),"createOuterCylinderPathD"),cR=mt((e,t,r,n,i,a)=>[`M${e-r/2},`+-n/2,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),mt(sR,"cylinder")});async function uR(e,t){var{labelStyles:r,nodeStyles:n}=V(t),{shapeSvg:r,bbox:e,label:i}=(t.labelStyle=r,await XL(e,t,QL(t))),a=e.width+t.padding,s=.2*(o=e.height+t.padding),a=-a/2,o=-o/2-s/2,l=t.cssStyles,c=II.svg(r),h=wN(t,{});"handDrawn"!==t.look&&(h.roughness=0,h.fillStyle="solid");let u=[{x:a,y:o+s},{x:-a,y:o+s},{x:-a,y:-o},{x:a,y:-o},{x:a,y:o},{x:-a,y:o},{x:-a,y:o+s}],d=c.polygon(u.map(e=>[e.x,e.y]),h),p=r.insert(()=>d,":first-child");return p.attr("class","basic label-container"),l&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",l),n&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",n),i.attr("transform",`translate(${a+(t.padding??0)/2-(e.x-(e.left??0))}, ${o+s+(t.padding??0)/2-(e.y-(e.top??0))})`),ZL(t,p),t.intersect=function(e){return mN.rect(t,e)},r}var dR=e(()=>{i(),EN(),CN(),RI(),mt(uR,"dividedRectangle")});async function pR(e,t){var r,{labelStyles:n,nodeStyles:i}=V(t);t.labelStyle=n;let{shapeSvg:a,bbox:s,halfPadding:o}=await XL(e,t,QL(t)),l=s.width/2+o+5,c=s.width/2+o,h,u=t.cssStyles;return"handDrawn"===t.look?(n=II.svg(a),e=wN(t,{roughness:.2,strokeWidth:2.5}),r=wN(t,{roughness:.2,strokeWidth:1.5}),e=n.circle(0,0,2*l,e),n=n.circle(0,0,2*c,r),(h=a.insert("g",":first-child")).attr("class",bC(t.cssClasses)).attr("style",bC(u)),h.node()?.appendChild(e),h.node()?.appendChild(n)):(r=(h=a.insert("g",":first-child")).insert("circle",":first-child"),e=h.insert("circle"),h.attr("class","basic label-container").attr("style",i),r.attr("class","outer-circle").attr("style",i).attr("r",l).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",i).attr("r",c).attr("cx",0).attr("cy",0)),ZL(t,h),t.intersect=function(e){return M.info("DoubleCircle intersect",t,l,e),mN.circle(t,l,e)},a}var gR=e(()=>{t(),i(),EN(),CN(),RI(),KC(),mt(pR,"doublecircle")});function fR(e,t,{config:{themeVariables:r}}){var{labelStyles:n,nodeStyles:i}=V(t);t.label="",t.labelStyle=n;let a=e.insert("g").attr("class",QL(t)).attr("id",t.domId??t.id),s=t.cssStyles,o=II.svg(a),l=r.nodeBorder,c=wN(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{RI(),t(),EN(),CN(),i(),mt(fR,"filledCircle")});async function yR(e,t){var{labelStyles:r,nodeStyles:n}=V(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await XL(e,t,QL(t)),o=a.width+(t.padding??0),l=o+a.height,c=o+a.height,h=[{x:0,y:-l},{x:c,y:-l},{x:c/2,y:0}],u=t.cssStyles,d=II.svg(i),p=wN(t,{}),g=("handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid"),YL(h)),f=d.path(g,p),m=i.insert(()=>f,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`);return u&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",u),n&&"handDrawn"!==t.look&&m.selectChildren("path").attr("style",n),t.width=o,t.height=l,ZL(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 M.info("Triangle intersect",t,h,e),mN.polygon(t,h,e)},i}var vR=e(()=>{t(),i(),EN(),CN(),RI(),i(),mt(yR,"flippedTriangle")});function xR(e,t,{dir:r,config:{state:n,themeVariables:i}}){var a=V(t).nodeStyles;t.label="";let s=e.insert("g").attr("class",QL(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=II.svg(s),i=wN(t,{stroke:i.lineColor,fill:i.lineColor});"handDrawn"!==t.look&&(i.roughness=0,i.fillStyle="solid");let u=h.rectangle(e,r,l,c,i),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),ZL(t,d),h=n?.padding??0,t.width&&t.height&&(t.width+=h/2||0,t.height+=h/2||0),t.intersect=function(e){return mN.rect(t,e)},s}var bR=e(()=>{RI(),EN(),CN(),i(),mt(xR,"forkJoin")});async function wR(e,t){var{labelStyles:r,nodeStyles:n}=V(t);t.labelStyle=r;let{shapeSvg:i,bbox:a}=await XL(e,t,QL(t)),s=Math.max(80,a.width+2*(t.padding??0),t?.width??0),o=Math.max(50,a.height+2*(t.padding??0),t?.height??0),l=o/2,c=t.cssStyles,h=II.svg(i),u=wN(t,{}),d=("handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid"),[{x:-s/2,y:-o/2},{x:s/2-l,y:-o/2},...VL(-s/2+l,0,l,50,90,270),{x:s/2-l,y:o/2},{x:-s/2,y:o/2}]),p=YL(d),g=h.path(p,u),f=i.insert(()=>g,":first-child");return f.attr("class","basic label-container"),c&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",c),n&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",n),ZL(t,f),t.intersect=function(e){return M.info("Pill intersect",t,{radius:l,point:e}),mN.polygon(t,d,e)},i}var kR=e(()=>{t(),i(),EN(),CN(),RI(),mt(wR,"halfRoundedRectangle")});async function TR(e,i){var{labelStyles:t,nodeStyles:r}=V(i);i.labelStyle=t;let{shapeSvg:a,bbox:n}=await XL(e,i,QL(i)),s=n.height+i.padding,o=s/4,l=n.width+2*o+i.padding,c=[{x:o,y:0},{x:l-o,y:0},{x:l,y:-s/2},{x:l-o,y:-s},{x:o,y:-s},{x:0,y:-s/2}],h,u=i.cssStyles;if("handDrawn"===i.look){let e=II.svg(a),t=wN(i,{}),r=ER(0,0,l,s,o),n=e.path(r,t);h=a.insert(()=>n,":first-child").attr("transform",`translate(${-l/2}, ${s/2})`),u&&h.attr("style",u)}else h=$I(a,l,s,c);return r&&h.attr("style",r),i.width=l,i.height=s,ZL(i,h),i.intersect=function(e){return mN.polygon(i,c,e)},a}var ER,CR=e(()=>{i(),EN(),CN(),RI(),FI(),ER=mt((e,t,r,n,i)=>[`M${e+i},`+t,`L${e+r-i},`+t,`L${e+r},`+(t-n/2),`L${e+r-i},`+(t-n),`L${e+i},`+(t-n),`L${e},`+(t-n/2),"Z"].join(" "),"createHexagonPathD"),mt(TR,"hexagon")});async function SR(e,t){var{labelStyles:r,nodeStyles:n}=V(t),r=(t.label="",t.labelStyle=r,(await XL(e,t,QL(t))).shapeSvg),e=Math.max(30,t?.width??0),i=Math.max(30,t?.height??0),a=t.cssStyles,s=II.svg(r),o=wN(t,{});"handDrawn"!==t.look&&(o.roughness=0,o.fillStyle="solid");let l=[{x:0,y:0},{x:e,y:0},{x:0,y:i},{x:e,y:i}],c=YL(l),h=s.path(c,o),u=r.insert(()=>h,":first-child");return u.attr("class","basic label-container"),a&&"handDrawn"!==t.look&&u.selectChildren("path").attr("style",a),n&&"handDrawn"!==t.look&&u.selectChildren("path").attr("style",n),u.attr("transform",`translate(${-e/2}, ${-i/2})`),ZL(t,u),t.intersect=function(e){return M.info("Pill intersect",t,{points:l}),mN.polygon(t,l,e)},r}var _R=e(()=>{t(),i(),EN(),CN(),RI(),mt(SR,"hourglass")});async function AR(e,i,{config:{themeVariables:t,flowchart:r}}){var n,a=V(i).labelStyles,a=(i.labelStyle=a,i.assetHeight??48),a=Math.max(a,i.assetWidth??48),r=r?.wrappingWidth;i.width=Math.max(a,r??0);let{shapeSvg:s,bbox:o,label:l}=await XL(e,i,"icon-shape default"),c="t"===i.pos,h=a,u=a,d=t.nodeBorder,p=vN(i).stylesMap,g=-u/2,f=-h/2,m=i.label?8:0,y=II.svg(s),v=wN(i,{stroke:"none",fill:"none"}),x=("handDrawn"!==i.look&&(v.roughness=0,v.fillStyle="solid"),y.rectangle(g,f,u,h,v)),b=Math.max(u,o.width),w=h+o.height+m,k=y.rectangle(-b/2,-w/2,b,w,{...v,fill:"transparent",stroke:"none"}),T=s.insert(()=>x,":first-child"),E=s.insert(()=>k);return i.icon&&((r=s.append("g")).html(`${await $e(i.icon,{height:a,width:a,fallbackPrefix:""})}`),t=(e=r.node().getBBox()).width,a=e.height,n=e.y,r.attr("transform",`translate(${-t/2-e.x},${c?o.height/2+m/2-a/2-n:-o.height/2-m/2-a/2-n})`),r.attr("style",`color: ${p.get("stroke")??d};`)),l.attr("transform",`translate(${-o.width/2-(o.x-(o.left??0))},${c?-w/2:w/2-o.height})`),T.attr("transform",`translate(0,${c?o.height/2+m/2:-o.height/2-m/2})`),ZL(i,E),i.intersect=function(e){var t,r,n;return M.info("iconSquare intersect",i,e),i.label?(n=i.x??0,t=i.y??0,r=i.height??0,n=c?[{x:n-o.width/2,y:t-r/2},{x:n+o.width/2,y:t-r/2},{x:n+o.width/2,y:t-r/2+o.height+m},{x:n+u/2,y:t-r/2+o.height+m},{x:n+u/2,y:t+r/2},{x:n-u/2,y:t+r/2},{x:n-u/2,y:t-r/2+o.height+m},{x:n-o.width/2,y:t-r/2+o.height+m}]:[{x:n-u/2,y:t-r/2},{x:n+u/2,y:t-r/2},{x:n+u/2,y:t-r/2+h},{x:n+o.width/2,y:t-r/2+h},{x:n+o.width/2/2,y:t+r/2},{x:n-o.width/2,y:t+r/2},{x:n-o.width/2,y:t-r/2+h},{x:n-u/2,y:t-r/2+h}],mN.polygon(i,n,e)):mN.rect(i,e)},s}var LR=e(()=>{RI(),t(),je(),EN(),CN(),i(),mt(AR,"icon")});async function NR(e,t,{config:{themeVariables:r,flowchart:n}}){var i=V(t).labelStyles,i=(t.labelStyle=i,t.assetHeight??48),i=Math.max(i,t.assetWidth??48),n=n?.wrappingWidth,{shapeSvg:n,bbox:e,label:a}=(t.width=Math.max(i,n??0),await XL(e,t,"icon-shape default")),s=t.label?8:0,o="t"===t.pos,{nodeBorder:r,mainBkg:l}=r,c=vN(t).stylesMap,h=II.svg(n),u=wN(t,{}),d=("handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid"),c.get("fill")),d=(u.stroke=d??l,n.append("g"));t.icon&&d.html(`${await $e(t.icon,{height:i,width:i,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,x=h.circle(0,0,v,u),b=Math.max(v,e.width),w=v+e.height+s,k=h.rectangle(-b/2,-w/2,b,w,{...u,fill:"transparent",stroke:"none"}),T=n.insert(()=>x,":first-child"),E=n.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?-w/2:w/2-e.height})`),T.attr("transform",`translate(0,${o?e.height/2+s/2:-e.height/2-s/2})`),ZL(t,E),t.intersect=function(e){return M.info("iconSquare intersect",t,e),mN.rect(t,e)},n}var IR,RR=e(()=>{RI(),t(),je(),EN(),CN(),i(),mt(NR,"iconCircle")}),MR=e(()=>{IR=mt((e,t,r,n,i)=>["M",e+i,t,"H",e+r-i,"A",i,i,0,0,1,e+r,t+i,"V",t+n-i,"A",i,i,0,0,1,e+r-i,t+n,"H",e+i,"A",i,i,0,0,1,e,t+n-i,"V",t+i,"A",i,i,0,0,1,e+i,t,"Z"].join(" "),"createRoundedRectPathD")});async function DR(e,i,{config:{themeVariables:t,flowchart:r}}){var n=V(i).labelStyles,n=(i.labelStyle=n,i.assetHeight??48),n=Math.max(n,i.assetWidth??48),r=r?.wrappingWidth;i.width=Math.max(n,r??0);let{shapeSvg:a,bbox:s,halfPadding:o,label:l}=await XL(e,i,"icon-shape default"),c="t"===i.pos,h=n+2*o,u=n+2*o,{nodeBorder:d,mainBkg:p}=t,g=vN(i).stylesMap,f=-u/2,m=-h/2,y=i.label?8:0,v=II.svg(a),x=wN(i,{});"handDrawn"!==i.look&&(x.roughness=0,x.fillStyle="solid");var b,r=g.get("fill");x.stroke=r??p;let w=v.path(IR(f,m,u,h,5),x),k=Math.max(u,s.width),T=h+s.height+y,E=v.rectangle(-k/2,-T/2,k,T,{...x,fill:"transparent",stroke:"none"}),C=a.insert(()=>w,":first-child").attr("class","icon-shape2"),S=a.insert(()=>E);return i.icon&&((e=a.append("g")).html(`${await $e(i.icon,{height:n,width:n,fallbackPrefix:""})}`),r=(t=e.node().getBBox()).width,n=t.height,b=t.y,e.attr("transform",`translate(${-r/2-t.x},${c?s.height/2+y/2-n/2-b:-s.height/2-y/2-n/2-b})`),e.attr("style",`color: ${g.get("stroke")??d};`)),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-T/2:T/2-s.height})`),C.attr("transform",`translate(0,${c?s.height/2+y/2:-s.height/2-y/2})`),ZL(i,S),i.intersect=function(e){var t,r,n;return M.info("iconSquare intersect",i,e),i.label?(n=i.x??0,t=i.y??0,r=i.height??0,n=c?[{x:n-s.width/2,y:t-r/2},{x:n+s.width/2,y:t-r/2},{x:n+s.width/2,y:t-r/2+s.height+y},{x:n+u/2,y:t-r/2+s.height+y},{x:n+u/2,y:t+r/2},{x:n-u/2,y:t+r/2},{x:n-u/2,y:t-r/2+s.height+y},{x:n-s.width/2,y:t-r/2+s.height+y}]:[{x:n-u/2,y:t-r/2},{x:n+u/2,y:t-r/2},{x:n+u/2,y:t-r/2+h},{x:n+s.width/2,y:t-r/2+h},{x:n+s.width/2/2,y:t+r/2},{x:n-s.width/2,y:t+r/2},{x:n-s.width/2,y:t-r/2+h},{x:n-u/2,y:t-r/2+h}],mN.polygon(i,n,e)):mN.rect(i,e)},a}var OR=e(()=>{RI(),t(),je(),EN(),CN(),MR(),i(),mt(DR,"iconRounded")});async function PR(e,i,{config:{themeVariables:t,flowchart:r}}){var n=V(i).labelStyles,n=(i.labelStyle=n,i.assetHeight??48),n=Math.max(n,i.assetWidth??48),r=r?.wrappingWidth;i.width=Math.max(n,r??0);let{shapeSvg:a,bbox:s,halfPadding:o,label:l}=await XL(e,i,"icon-shape default"),c="t"===i.pos,h=n+2*o,u=n+2*o,{nodeBorder:d,mainBkg:p}=t,g=vN(i).stylesMap,f=-u/2,m=-h/2,y=i.label?8:0,v=II.svg(a),x=wN(i,{});"handDrawn"!==i.look&&(x.roughness=0,x.fillStyle="solid");var b,r=g.get("fill");x.stroke=r??p;let w=v.path(IR(f,m,u,h,.1),x),k=Math.max(u,s.width),T=h+s.height+y,E=v.rectangle(-k/2,-T/2,k,T,{...x,fill:"transparent",stroke:"none"}),C=a.insert(()=>w,":first-child"),S=a.insert(()=>E);return i.icon&&((e=a.append("g")).html(`${await $e(i.icon,{height:n,width:n,fallbackPrefix:""})}`),r=(t=e.node().getBBox()).width,n=t.height,b=t.y,e.attr("transform",`translate(${-r/2-t.x},${c?s.height/2+y/2-n/2-b:-s.height/2-y/2-n/2-b})`),e.attr("style",`color: ${g.get("stroke")??d};`)),l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))},${c?-T/2:T/2-s.height})`),C.attr("transform",`translate(0,${c?s.height/2+y/2:-s.height/2-y/2})`),ZL(i,S),i.intersect=function(e){var t,r,n;return M.info("iconSquare intersect",i,e),i.label?(n=i.x??0,t=i.y??0,r=i.height??0,n=c?[{x:n-s.width/2,y:t-r/2},{x:n+s.width/2,y:t-r/2},{x:n+s.width/2,y:t-r/2+s.height+y},{x:n+u/2,y:t-r/2+s.height+y},{x:n+u/2,y:t+r/2},{x:n-u/2,y:t+r/2},{x:n-u/2,y:t-r/2+s.height+y},{x:n-s.width/2,y:t-r/2+s.height+y}]:[{x:n-u/2,y:t-r/2},{x:n+u/2,y:t-r/2},{x:n+u/2,y:t-r/2+h},{x:n+s.width/2,y:t-r/2+h},{x:n+s.width/2/2,y:t+r/2},{x:n-s.width/2,y:t+r/2},{x:n-s.width/2,y:t-r/2+h},{x:n-u/2,y:t-r/2+h}],mN.polygon(i,n,e)):mN.rect(i,e)},a}var BR=e(()=>{RI(),t(),je(),EN(),MR(),CN(),i(),mt(PR,"iconSquare")});async function $R(e,i,{config:{flowchart:t}}){(n=new Image).src=i?.img??"",await n.decode();var r=Number(n.naturalWidth.toString().replace("px","")),n=Number(n.naturalHeight.toString().replace("px","")),a=(i.imageAspectRatio=r/n,V(i).labelStyles),a=(i.labelStyle=a,t?.wrappingWidth);i.defaultWidth=t?.wrappingWidth;let s=Math.max(i.label?a??0:0,i?.assetWidth??r),o="on"===i.constraint&&i?.assetHeight?i.assetHeight*i.imageAspectRatio:s,l="on"===i.constraint?o/i.imageAspectRatio:i?.assetHeight??n,{shapeSvg:c,bbox:h,label:u}=(i.width=Math.max(o,a??0),await XL(e,i,"image-shape default")),d="t"===i.pos,p=-o/2,g=-l/2,f=i.label?8:0,m=II.svg(c),y=wN(i,{}),v=("handDrawn"!==i.look&&(y.roughness=0,y.fillStyle="solid"),m.rectangle(p,g,o,l,y)),x=Math.max(o,h.width),b=l+h.height+f,w=m.rectangle(-x/2,-b/2,x,b,{...y,fill:"none",stroke:"none"}),k=c.insert(()=>v,":first-child"),T=c.insert(()=>w);return i.img&&((t=c.append("image")).attr("href",i.img),t.attr("width",o),t.attr("height",l),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-o/2},${d?b/2-l:-b/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})`),ZL(i,T),i.intersect=function(e){var t,r,n;return M.info("iconSquare intersect",i,e),i.label?(n=i.x??0,t=i.y??0,r=i.height??0,n=d?[{x:n-h.width/2,y:t-r/2},{x:n+h.width/2,y:t-r/2},{x:n+h.width/2,y:t-r/2+h.height+f},{x:n+o/2,y:t-r/2+h.height+f},{x:n+o/2,y:t+r/2},{x:n-o/2,y:t+r/2},{x:n-o/2,y:t-r/2+h.height+f},{x:n-h.width/2,y:t-r/2+h.height+f}]:[{x:n-o/2,y:t-r/2},{x:n+o/2,y:t-r/2},{x:n+o/2,y:t-r/2+l},{x:n+h.width/2,y:t-r/2+l},{x:n+h.width/2/2,y:t+r/2},{x:n-h.width/2,y:t+r/2},{x:n-h.width/2,y:t-r/2+l},{x:n-o/2,y:t-r/2+l}],mN.polygon(i,n,e)):mN.rect(i,e)},c}var FR=e(()=>{RI(),t(),EN(),CN(),i(),mt($R,"imageSquare")});async function zR(e,i){var{labelStyles:t,nodeStyles:r}=V(i);i.labelStyle=t;let{shapeSvg:a,bbox:n}=await XL(e,i,QL(i)),s=Math.max(n.width+2*(i.padding??0),i?.width??0),o=Math.max(n.height+2*(i.padding??0),i?.height??0),l=[{x:0,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:-3*o/6,y:-o}],c,h=i.cssStyles;if("handDrawn"===i.look){let e=II.svg(a),t=wN(i,{}),r=YL(l),n=e.path(r,t);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=$I(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,ZL(i,c),i.intersect=function(e){return mN.polygon(i,l,e)},a}var GR=e(()=>{i(),EN(),CN(),RI(),FI(),mt(zR,"inv_trapezoid")});async function UR(e,n,t){var{labelStyles:r,nodeStyles:i}=V(n);n.labelStyle=r;let{shapeSvg:a,bbox:s}=await XL(e,n,QL(n)),o=Math.max(s.width+2*t.labelPaddingX,n?.width||0),l=Math.max(s.height+2*t.labelPaddingY,n?.height||0),c=-o/2,h=-l/2,u,{rx:d,ry:p}=n,g=n.cssStyles;if(t?.rx&&t.ry&&(d=t.rx,p=t.ry),"handDrawn"===n.look){let e=II.svg(a),t=wN(n,{}),r=d||p?e.path(IR(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",bC(g))}else(u=a.insert("rect",":first-child")).attr("class","basic label-container").attr("style",i).attr("rx",bC(d)).attr("ry",bC(p)).attr("x",c).attr("y",h).attr("width",o).attr("height",l);return ZL(n,u),n.intersect=function(e){return mN.rect(n,e)},a}var qR=e(()=>{i(),EN(),MR(),CN(),RI(),KC(),mt(UR,"drawRect")});async function jR(e,t){var{shapeSvg:e,bbox:r,label:n}=await XL(e,t,"label"),i=e.insert("rect",":first-child");return i.attr("width",.1).attr("height",.1),e.attr("class","label edgeLabel"),n.attr("transform",`translate(${-r.width/2-(r.x-(r.left??0))}, ${-r.height/2-(r.y-(r.top??0))})`),ZL(t,i),t.intersect=function(e){return mN.rect(t,e)},e}var WR=e(()=>{qR(),i(),EN(),mt(jR,"labelRect")});async function YR(e,i){var{labelStyles:t,nodeStyles:r}=V(i);i.labelStyle=t;let{shapeSvg:a,bbox:n}=await XL(e,i,QL(i)),s=Math.max(n.width+(i.padding??0),i?.width??0),o=Math.max(n.height+(i.padding??0),i?.height??0),l=[{x:0,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:-3*o/6,y:-o}],c,h=i.cssStyles;if("handDrawn"===i.look){let e=II.svg(a),t=wN(i,{}),r=YL(l),n=e.path(r,t);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=$I(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,ZL(i,c),i.intersect=function(e){return mN.polygon(i,l,e)},a}var HR=e(()=>{i(),EN(),CN(),RI(),FI(),mt(YR,"lean_left")});async function VR(e,i){var{labelStyles:t,nodeStyles:r}=V(i);i.labelStyle=t;let{shapeSvg:a,bbox:n}=await XL(e,i,QL(i)),s=Math.max(n.width+(i.padding??0),i?.width??0),o=Math.max(n.height+(i.padding??0),i?.height??0),l=[{x:-3*o/6,y:0},{x:s,y:0},{x:s+3*o/6,y:-o},{x:0,y:-o}],c,h=i.cssStyles;if("handDrawn"===i.look){let e=II.svg(a),t=wN(i,{}),r=YL(l),n=e.path(r,t);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=$I(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,ZL(i,c),i.intersect=function(e){return mN.polygon(i,l,e)},a}var XR=e(()=>{i(),EN(),CN(),RI(),FI(),mt(VR,"lean_right")});function KR(e,t){var{labelStyles:r,nodeStyles:n}=V(t);t.label="",t.labelStyle=r;let i=e.insert("g").attr("class",QL(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=II.svg(i),h=wN(t,{}),u=("handDrawn"!==t.look&&(h.roughness=0,h.fillStyle="solid"),YL(l)),d=c.path(u,h),p=i.insert(()=>d,":first-child");return a&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",a),n&&"handDrawn"!==t.look&&p.selectAll("path").attr("style",n),p.attr("transform",`translate(-${s/2},${-o})`),ZL(t,p),t.intersect=function(e){return M.info("lightningBolt intersect",t,e),mN.polygon(t,l,e)},i}var ZR=e(()=>{t(),i(),CN(),RI(),EN(),i(),mt(KR,"lightningBolt")});async function QR(e,s){var{labelStyles:t,nodeStyles:r}=V(s);s.labelStyle=t;let{shapeSvg:o,bbox:n,label:i}=await XL(e,s,QL(s)),l=Math.max(n.width+(s.padding??0),s.width??0),c=l/2,h=c/(2.5+l/50),u=Math.max(n.height+h+(s.padding??0),s.height??0),d=.1*u,p,g=s.cssStyles;if("handDrawn"===s.look){let e=II.svg(o),t=eM(0,0,l,u,c,h,d),r=tM(0,h,l,u,c,h),n=wN(s,{}),i=e.path(t,n),a=e.path(r,n);o.insert(()=>a,":first-child").attr("class","line"),(p=o.insert(()=>i,":first-child")).attr("class","basic label-container"),g&&p.attr("style",g)}else t=JR(0,0,l,u,c,h,d),p=o.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",bC(g)).attr("style",r);return p.attr("label-offset-y",h),p.attr("transform",`translate(${-l/2}, ${-(u/2+h)})`),ZL(s,p),i.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=mN.rect(s,t),n=r.x-(s.x??0);if(0!=c&&(Math.abs(n)<(s.width??0)/2||Math.abs(n)==(s.width??0)/2&&Math.abs(r.y-(s.y??0))>(s.height??0)/2-h)){let e=h*h*(1-n*n/(c*c));0{i(),EN(),CN(),RI(),KC(),JR=mt((e,t,r,n,i,a,s)=>[`M${e},`+(t+a),`a${i},${a} 0,0,0 ${r},0`,`a${i},${a} 0,0,0 ${-r},0`,"l0,"+n,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n,`M${e},`+(t+a+s),`a${i},${a} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),eM=mt((e,t,r,n,i,a,s)=>[`M${e},`+(t+a),`M${e+r},`+(t+a),`a${i},${a} 0,0,0 ${-r},0`,"l0,"+n,`a${i},${a} 0,0,0 ${r},0`,"l0,"+-n,`M${e},`+(t+a+s),`a${i},${a} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),tM=mt((e,t,r,n,i,a)=>[`M${e-r/2},`+-n/2,`a${i},${a} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD"),mt(QR,"linedCylinder")});async function nM(e,t){var{labelStyles:r,nodeStyles:n}=V(t),{shapeSvg:r,bbox:e,label:i}=(t.labelStyle=r,await XL(e,t,QL(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/4,l=s+o,c=t.cssStyles,h=II.svg(r),u=wN(t,{});"handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid");let d=[{x:-a/2-a/2*.1,y:-l/2},{x:-a/2-a/2*.1,y:l/2},...HL(-a/2-a/2*.1,l/2,a/2+a/2*.1,l/2,o,.8),{x:a/2+a/2*.1,y:-l/2},{x:-a/2-a/2*.1,y:-l/2},{x:-a/2,y:-l/2},{x:-a/2,y:l/2*1.1},{x:-a/2,y:-l/2}],p=h.polygon(d.map(e=>[e.x,e.y]),u),g=r.insert(()=>p,":first-child");return g.attr("class","basic label-container"),c&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",c),n&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",n),g.attr("transform",`translate(0,${-o/2})`),i.attr("transform",`translate(${-a/2+(t.padding??0)+a/2*.1/2-(e.x-(e.left??0))},${-s/2+(t.padding??0)-o/2-(e.y-(e.top??0))})`),ZL(t,g),t.intersect=function(e){return mN.polygon(t,d,e)},r}var iM=e(()=>{i(),EN(),RI(),CN(),mt(nM,"linedWaveEdgedRect")});async function aM(e,t){var{labelStyles:r,nodeStyles:n}=V(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await XL(e,t,QL(t)),o=Math.max(a.width+2*(t.padding??0),t?.width??0),l=Math.max(a.height+2*(t.padding??0),t?.height??0),c=-o/2,h=-l/2,u=t.cssStyles,d=II.svg(i),p=wN(t,{}),g=[{x:c-5,y:5+h},{x:c-5,y:h+l+5},{x:c+o-5,y:h+l+5},{x:c+o-5,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h+l-5},{x:c+o+5,y:h+l-5},{x:c+o+5,y:h-5},{x:5+c,y:h-5},{x:5+c,y:h},{x:c,y:h},{x:c,y:5+h}],f=[{x:c,y:5+h},{x:c+o-5,y:5+h},{x:c+o-5,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h},{x:c,y:h}],m=("handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid"),YL(g)),y=d.path(m,p),v=YL(f),x=d.path(v,{...p,fill:"none"}),b=i.insert(()=>x,":first-child");return b.insert(()=>y,":first-child"),b.attr("class","basic label-container"),u&&"handDrawn"!==t.look&&b.selectAll("path").attr("style",u),n&&"handDrawn"!==t.look&&b.selectAll("path").attr("style",n),s.attr("transform",`translate(${-a.width/2-5-(a.x-(a.left??0))}, ${-a.height/2+5-(a.y-(a.top??0))})`),ZL(t,b),t.intersect=function(e){return mN.polygon(t,g,e)},i}var sM=e(()=>{i(),CN(),RI(),EN(),mt(aM,"multiRect")});async function oM(e,t){var{labelStyles:r,nodeStyles:n}=V(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await XL(e,t,QL(t)),o=Math.max(a.width+2*(t.padding??0),t?.width??0),l=Math.max(a.height+2*(t.padding??0),t?.height??0),c=l/4,h=l+c,u=-o/2,d=-h/2,p=t.cssStyles,g=HL(u-5,d+h+5,u+o-5,d+h+5,c,.8),f=g?.[g.length-1],m=[{x:u-5,y:5+d},{x:u-5,y:d+h+5},...g,{x:u+o-5,y:f.y-5},{x:u+o,y:f.y-5},{x:u+o,y:f.y-10},{x:u+o+5,y:f.y-10},{x:u+o+5,y:d-5},{x:5+u,y:d-5},{x:5+u,y:d},{x:u,y:d},{x:u,y:5+d}],y=[{x:u,y:5+d},{x:u+o-5,y:5+d},{x:u+o-5,y:f.y-5},{x:u+o,y:f.y-5},{x:u+o,y:d},{x:u,y:d}],v=II.svg(i),x=wN(t,{}),b=("handDrawn"!==t.look&&(x.roughness=0,x.fillStyle="solid"),YL(m)),w=v.path(b,x),k=YL(y),T=v.path(k,x),E=i.insert(()=>w,":first-child");return E.insert(()=>T),E.attr("class","basic label-container"),p&&"handDrawn"!==t.look&&E.selectAll("path").attr("style",p),n&&"handDrawn"!==t.look&&E.selectAll("path").attr("style",n),E.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-a.width/2-5-(a.x-(a.left??0))}, ${-a.height/2+5-c/2-(a.y-(a.top??0))})`),ZL(t,E),t.intersect=function(e){return mN.polygon(t,m,e)},i}var lM=e(()=>{i(),EN(),RI(),CN(),mt(oM,"multiWaveEdgedRectangle")});async function cM(e,t,{config:{themeVariables:r}}){var{labelStyles:n,nodeStyles:i}=V(t),{shapeSvg:n,bbox:e}=(t.labelStyle=n,t.useHtmlLabels||!1!==Ir().flowchart?.htmlLabels||(t.centerLabel=!0),await XL(e,t,QL(t))),a=Math.max(e.width+2*(t.padding??0),t?.width??0),s=-a/2,o=-(e=Math.max(e.height+2*(t.padding??0),t?.height??0))/2,l=t.cssStyles,c=II.svg(n),r=wN(t,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==t.look&&(r.roughness=0,r.fillStyle="solid");let h=c.rectangle(s,o,a,e,r),u=n.insert(()=>h,":first-child");return u.attr("class","basic label-container"),l&&"handDrawn"!==t.look&&u.selectAll("path").attr("style",l),i&&"handDrawn"!==t.look&&u.selectAll("path").attr("style",i),ZL(t,u),t.intersect=function(e){return mN.rect(t,e)},n}var hM=e(()=>{RI(),EN(),CN(),i(),Nn(),mt(cM,"note")});async function uM(e,i){var{labelStyles:t,nodeStyles:r}=V(i);i.labelStyle=t;let{shapeSvg:a,bbox:n}=await XL(e,i,QL(i)),s=n.width+i.padding,o=n.height+i.padding,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=i.cssStyles;if("handDrawn"===i.look){let e=II.svg(a),t=wN(i,{}),r=dM(0,0,l),n=e.path(r,t);h=a.insert(()=>n,":first-child").attr("transform",`translate(${-l/2}, ${l/2})`),u&&h.attr("style",u)}else h=$I(a,l,l,c);return r&&h.attr("style",r),ZL(i,h),i.intersect=function(e){return M.debug(`APA12 Intersect called SPLIT +point:`,e,` node: `,i,` -res:`,yL.polygon(i,c,t)),yL.polygon(i,c,t)},a}var gR,fR=t(()=>{e(),i(),_L(),SL(),DN(),GN(),gR=me((t,e,r)=>[`M${t+r/2},`+e,`L${t+r},`+(e-r/2),`L${t+r/2},`+(e-r),`L${t},`+(e-r/2),"Z"].join(" "),"createDecisionBoxPathD"),me(pR,"question")});async function mR(t,e){var{labelStyles:r,nodeStyles:n}=kL(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await K9(t,e,J9(e)),o=Math.max(a.width+(e.padding??0),e?.width??0),l=Math.max(a.height+(e.padding??0),e?.height??0),c=-o/2,h=-l/2,u=h/2,d=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],p=e.cssStyles,g=MN.svg(i),f=TL(e,{}),m=("handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid"),H9(d)),y=g.path(m,f),v=i.insert(()=>y,":first-child");return v.attr("class","basic label-container"),p&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",p),n&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(${-u/2},0)`),s.attr("transform",`translate(${-u/2-a.width/2-(a.x-(a.left??0))}, ${-a.height/2-(a.y-(a.top??0))})`),Q9(e,v),e.intersect=function(t){return yL.polygon(e,d,t)},i}var yR=t(()=>{i(),_L(),SL(),DN(),me(mR,"rect_left_inv_arrow")});function vR(t,e){e&&t.attr("style",e)}async function xR(t){let e=H(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=t.label;return t.label&&qc(t.label)&&(n=await Wc(t.label.replace(L.lineBreakRegex,` -`),D())),r.html('"+n+""),vR(r,t.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}var bR,wR,kR=t(()=>{Q3(),e(),mu(),th(),ZE(),me(vR,"applyStyle"),me(xR,"addHtmlLabel"),bR=me(async(t,e,r,n)=>{let i=t||"";if("object"==typeof i&&(i=i[0]),Dc(D().flowchart.htmlLabels))return i=i.replace(/\\n|\n/g,"
"),M.info("vertexText"+i),xR({isNode:n,label:XE(i).replace(/fa[blrs]?:fa-[\w-]+/g,t=>``),labelStyle:e&&e.replace("fill:","color:")});var a,s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",e.replace("color:","fill:"));for(a of"string"==typeof i?i.split(/\\n|\n|/gi):Array.isArray(i)?i:[]){var o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),r?o.setAttribute("class","title-row"):o.setAttribute("class","row"),o.textContent=a.trim(),s.appendChild(o)}return s},"createLabel"),wR=bR});async function TR(i,a){var{labelStyles:t,nodeStyles:e}=kL(a);a.labelStyle=t;let r,s=(r=a.cssClasses?"node "+a.cssClasses:"node default",i.insert("g").attr("class",r).attr("id",a.domId||a.id)),n=s.insert("g"),o=s.insert("g").attr("class","label").attr("style",e),l=a.description,c=a.label,h=o.node().appendChild(await wR(c,a.labelStyle,!0,!0)),u={width:0,height:0};Dc(D()?.flowchart?.htmlLabels)&&(t=h.children[0],i=H(h),u=t.getBoundingClientRect(),i.attr("width",u.width),i.attr("height",u.height)),M.info("Text 2",l);var t=l||[],i=h.getBBox(),d=(t=o.node().appendChild(await wR(t.join?t.join("
"):t,a.labelStyle,!0,!0))).children[0],p=H(t),d=(u=d.getBoundingClientRect(),p.attr("width",u.width),p.attr("height",u.height),(a.padding||0)/2);H(t).attr("transform","translate( "+(u.width>i.width?0:(i.width-u.width)/2)+", "+(i.height+d+5)+")"),H(h).attr("transform","translate( "+(u.width(M.debug("Rough node insert CXC",r),n),":first-child"),v=s.insert(()=>(M.debug("Rough node insert CXC",r),r),":first-child")}else v=n.insert("rect",":first-child"),x=n.insert("line"),v.attr("class","outer title-state").attr("style",e).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)),x.attr("class","divider").attr("x1",-u.width/2-d).attr("x2",u.width/2+d).attr("y1",-u.height/2-d+i.height+d).attr("y2",-u.height/2-d+i.height+d);return Q9(a,v),a.intersect=function(t){return yL.rect(a,t)},s}var ER=t(()=>{Q3(),th(),i(),kR(),_L(),SL(),DN(),mu(),OI(),e(),me(TR,"rectWithTitle")});async function CR(t,e){return jI(t,e,{rx:5,ry:5,classes:"",labelPaddingX:+(e?.padding||0),labelPaddingY:+(e?.padding||0)})}var _R=t(()=>{WI(),me(CR,"roundedRect")});async function SR(t,e){var{labelStyles:r,nodeStyles:n}=kL(e),{shapeSvg:r,bbox:t,label:i}=(e.labelStyle=r,await K9(t,e,J9(e))),a=e?.padding??0,s=Math.max(t.width+2*(e.padding??0),e?.width??0),o=Math.max(t.height+2*(e.padding??0),e?.height??0),l=-t.width/2-a,a=-t.height/2-a,c=e.cssStyles,h=MN.svg(r),u=TL(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let d=[{x:l,y:a},{x:l+s+8,y:a},{x:l+s+8,y:a+o},{x:l-8,y:a+o},{x:l-8,y:a},{x:l,y:a},{x:l,y:a+o}],p=h.polygon(d.map(t=>[t.x,t.y]),u),g=r.insert(()=>p,":first-child");return g.attr("class","basic label-container").attr("style",wE(c)),n&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",n),c&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",n),i.attr("transform",`translate(${-s/2+4+(e.padding??0)-(t.x-(t.left??0))},${-o/2+(e.padding??0)-(t.y-(t.top??0))})`),Q9(e,g),e.intersect=function(t){return yL.rect(e,t)},r}var AR=t(()=>{i(),_L(),SL(),DN(),ZE(),me(SR,"shadedProcess")});async function LR(t,e){var{labelStyles:r,nodeStyles:n}=kL(e),{shapeSvg:r,bbox:t,label:i}=(e.labelStyle=r,await K9(t,e,J9(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),s=Math.max(t.height+2*(e.padding??0),e?.height??0),o=-a/2,l=-s/2,c=e.cssStyles,h=MN.svg(r),u=TL(e,{});"handDrawn"!==e.look&&(u.roughness=0,u.fillStyle="solid");let d=[{x:o,y:l},{x:o,y:l+s},{x:o+a,y:l+s},{x:o+a,y:l-s/2}],p=H9(d),g=h.path(p,u),f=r.insert(()=>g,":first-child");return f.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",c),n&&"handDrawn"!==e.look&&f.selectChildren("path").attr("style",n),f.attr("transform",`translate(0, ${s/4})`),i.attr("transform",`translate(${-a/2+(e.padding??0)-(t.x-(t.left??0))}, ${-s/4+(e.padding??0)-(t.y-(t.top??0))})`),Q9(e,f),e.intersect=function(t){return yL.polygon(e,d,t)},r}var NR=t(()=>{i(),_L(),SL(),DN(),me(LR,"slopedRect")});async function IR(t,e){return jI(t,e,{rx:0,ry:0,classes:"",labelPaddingX:2*(e?.padding||0),labelPaddingY:+(e?.padding||0)})}var RR=t(()=>{WI(),me(IR,"squareRect")});async function MR(t,i){var{labelStyles:e,nodeStyles:r}=kL(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await K9(t,i,J9(i)),s=n.height+i.padding,o=n.width+s/4+i.padding,l,c=i.cssStyles;if("handDrawn"===i.look){let t=MN.svg(a),e=TL(i,{}),r=MI(-o/2,-s/2,o,s,s/2),n=t.path(r,e);(l=a.insert(()=>n,":first-child")).attr("class","basic label-container").attr("style",wE(c))}else(l=a.insert("rect",":first-child")).attr("class","basic label-container").attr("style",r).attr("rx",s/2).attr("ry",s/2).attr("x",-o/2).attr("y",-s/2).attr("width",o).attr("height",s);return Q9(i,l),i.intersect=function(t){return yL.rect(i,t)},a}var DR=t(()=>{i(),_L(),SL(),DN(),OI(),ZE(),me(MR,"stadium")});async function OR(t,e){return jI(t,e,{rx:5,ry:5,classes:"flowchart-node"})}var PR=t(()=>{WI(),me(OR,"state")});function BR(t,e,{config:{themeVariables:r}}){var{labelStyles:n,nodeStyles:i}=kL(e),n=(e.labelStyle=n,e.cssStyles),{lineColor:r,stateBorder:a,nodeBorder:s}=r,t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),o=MN.svg(t),l=TL(e,{});"handDrawn"!==e.look&&(l.roughness=0,l.fillStyle="solid");let c=o.circle(0,0,14,{...l,stroke:r,strokeWidth:2}),h=a??s,u=o.circle(0,0,5,{...l,fill:h,stroke:h,strokeWidth:2,fillStyle:"solid"}),d=t.insert(()=>c,":first-child");return d.insert(()=>u),n&&d.selectAll("path").attr("style",n),i&&d.selectAll("path").attr("style",i),Q9(e,d),e.intersect=function(t){return yL.circle(e,7,t)},t}var FR=t(()=>{DN(),_L(),SL(),i(),me(BR,"stateEnd")});function $R(t,e,{config:{themeVariables:r}}){let n=r.lineColor,i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),a;if("handDrawn"===e.look){let t=MN.svg(i).circle(0,0,14,vL(n));(a=i.insert(()=>t)).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else(a=i.insert("circle",":first-child")).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return Q9(e,a),e.intersect=function(t){return yL.circle(e,7,t)},i}var zR=t(()=>{DN(),_L(),SL(),i(),me($R,"stateStart")});async function GR(a,s){var{labelStyles:o,nodeStyles:t}=kL(s);s.labelStyle=o;let{shapeSvg:l,bbox:e}=await K9(a,s,J9(s)),r=(s?.padding||0)/2,c=e.width+s.padding,h=e.height+s.padding,u=-e.width/2-r,d=-e.height/2-r,n=[{x:0,y:0},{x:c,y:0},{x:c,y:-h},{x:0,y:-h},{x:0,y:0},{x:-8,y:0},{x:c+8,y:0},{x:c+8,y:-h},{x:-8,y:-h},{x:-8,y:0}];if("handDrawn"===s.look){let t=MN.svg(l),e=TL(s,{}),r=t.rectangle(u-8,d,c+16,h,e),n=t.line(u,d,u,d+h,e),i=t.line(u+c,d,u+c,d+h,e);l.insert(()=>n,":first-child"),l.insert(()=>i,":first-child"),o=l.insert(()=>r,":first-child"),a=s.cssStyles,o.attr("class","basic label-container").attr("style",wE(a)),Q9(s,o)}else a=zN(l,c,h,n),t&&a.attr("style",t),Q9(s,a);return s.intersect=function(t){return yL.polygon(s,n,t)},l}var UR=t(()=>{i(),_L(),SL(),DN(),GN(),ZE(),me(GR,"subroutine")});async function qR(t,e){var{labelStyles:r,nodeStyles:n}=kL(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await K9(t,e,J9(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),o=Math.max(a.height+2*(e.padding??0),e?.height??0),l=-s/2,c=-o/2,h=.2*o,u=.2*o,d=e.cssStyles,p=MN.svg(i),g=TL(e,{}),f=[{x:l-h/2,y:c},{x:l+s+h/2,y:c},{x:l+s+h/2,y:c+o},{x:l-h/2,y:c+o}],m=[{x:l+s-h/2,y:c+o},{x:l+s+h/2,y:c+o},{x:l+s+h/2,y:c+o-u}],y=("handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid"),H9(f)),v=p.path(y,g),x=H9(m),b=p.path(x,{...g,fillStyle:"solid"}),w=i.insert(()=>b,":first-child");return w.insert(()=>v,":first-child"),w.attr("class","basic label-container"),d&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",d),n&&"handDrawn"!==e.look&&w.selectAll("path").attr("style",n),Q9(e,w),e.intersect=function(t){return yL.polygon(e,f,t)},i}var jR=t(()=>{i(),SL(),DN(),_L(),me(qR,"taggedRect")});async function WR(t,e){var{labelStyles:r,nodeStyles:n}=kL(e),{shapeSvg:r,bbox:t,label:i}=(e.labelStyle=r,await K9(t,e,J9(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),s=Math.max(t.height+2*(e.padding??0),e?.height??0),o=s/4,l=.2*a,c=.2*s,h=s+o,u=e.cssStyles,d=MN.svg(r),p=TL(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-a/2-a/2*.1,y:h/2},...V9(-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.4*(m+s)},{x:f+a,y:m+s-c},{x:f+a,y:.9*(m+s)},...V9(f+a,1.3*(m+s),f+a-l,1.5*(m+s),.03*-s,.5)],v=H9(g),x=d.path(v,p),b=H9(y),w=d.path(b,{...p,fillStyle:"solid"}),k=r.insert(()=>w,":first-child");return k.insert(()=>x,":first-child"),k.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",u),n&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",n),k.attr("transform",`translate(0,${-o/2})`),i.attr("transform",`translate(${-a/2+(e.padding??0)-(t.x-(t.left??0))},${-s/2+(e.padding??0)-o/2-(t.y-(t.top??0))})`),Q9(e,k),e.intersect=function(t){return yL.polygon(e,g,t)},r}var YR=t(()=>{i(),_L(),DN(),SL(),me(WR,"taggedWaveEdgedRectangle")});async function HR(t,e){var{labelStyles:r,nodeStyles:n}=kL(e),{shapeSvg:r,bbox:t}=(e.labelStyle=r,await K9(t,e,J9(e))),i=Math.max(t.width+e.padding,e?.width||0),a=-i/2,s=-(t=Math.max(t.height+e.padding,e?.height||0))/2,o=r.insert("rect",":first-child");return o.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",a).attr("y",s).attr("width",i).attr("height",t),Q9(e,o),e.intersect=function(t){return yL.rect(e,t)},r}var VR=t(()=>{i(),_L(),SL(),me(HR,"text")});async function XR(t,a){var{labelStyles:e,nodeStyles:r}=kL(a);a.labelStyle=e;let{shapeSvg:s,bbox:n,label:i,halfPadding:o}=await K9(t,a,J9(a)),l="neo"===a.look?2*o:o,c=n.height+l,h=c/2,u=h/(2.5+c/50),d=n.width+u+l,p=a.cssStyles,g;if("handDrawn"===a.look){let t=MN.svg(s),e=ZR(0,0,d,c,u,h),r=QR(0,0,d,c,u,h),n=t.path(e,TL(a,{})),i=t.path(r,TL(a,{fill:"none"}));g=s.insert(()=>i,":first-child"),(g=s.insert(()=>n,":first-child")).attr("class","basic label-container"),p&&g.attr("style",p)}else e=KR(0,0,d,c,u,h),(g=s.insert("path",":first-child").attr("d",e).attr("class","basic label-container").attr("style",wE(p)).attr("style",r)).attr("class","basic label-container"),p&&g.selectAll("path").attr("style",p),r&&g.selectAll("path").attr("style",r);return g.attr("label-offset-x",u),g.attr("transform",`translate(${-d/2}, ${c/2} )`),i.attr("transform",`translate(${-n.width/2-u-(n.x-(n.left??0))}, ${-n.height/2-(n.y-(n.top??0))})`),Q9(a,g),a.intersect=function(e){var r=yL.rect(a,e),n=r.y-(a.y??0);if(0!=h&&(Math.abs(n)<(a.height??0)/2||Math.abs(n)==(a.height??0)/2&&Math.abs(r.x-(a.x??0))>(a.width??0)/2-u)){let t=u*u*(1-n*n/(h*h));0!=t&&(t=Math.sqrt(Math.abs(t))),t=u-t,0{i(),SL(),DN(),_L(),ZE(),KR=me((t,e,r,n,i,a)=>`M${t},${e} +res:`,mN.polygon(i,c,e)),mN.polygon(i,c,e)},a}var dM,pM=e(()=>{t(),i(),EN(),CN(),RI(),FI(),dM=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(uM,"question")});async function gM(e,t){var{labelStyles:r,nodeStyles:n}=V(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await XL(e,t,QL(t)),o=Math.max(a.width+(t.padding??0),t?.width??0),l=Math.max(a.height+(t.padding??0),t?.height??0),c=-o/2,h=-l/2,u=h/2,d=[{x:c+u,y:h},{x:c,y:0},{x:c+u,y:-h},{x:-c,y:-h},{x:-c,y:h}],p=t.cssStyles,g=II.svg(i),f=wN(t,{}),m=("handDrawn"!==t.look&&(f.roughness=0,f.fillStyle="solid"),YL(d)),y=g.path(m,f),v=i.insert(()=>y,":first-child");return v.attr("class","basic label-container"),p&&"handDrawn"!==t.look&&v.selectAll("path").attr("style",p),n&&"handDrawn"!==t.look&&v.selectAll("path").attr("style",n),v.attr("transform",`translate(${-u/2},0)`),s.attr("transform",`translate(${-u/2-a.width/2-(a.x-(a.left??0))}, ${-a.height/2-(a.y-(a.top??0))})`),ZL(t,v),t.intersect=function(e){return mN.polygon(t,d,e)},i}var fM=e(()=>{i(),EN(),CN(),RI(),mt(gM,"rect_left_inv_arrow")});function mM(e,t){t&&e.attr("style",t)}async function yM(e){let t=H(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),n=e.label;return e.label&&qc(e.label)&&(n=await Wc(e.label.replace(L.lineBreakRegex,` +`),D())),r.html('"+n+""),mM(r,e.labelStyle),r.style("display","inline-block"),r.style("padding-right","1px"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}var vM,xM,bM=e(()=>{Zw(),t(),mu(),eh(),KC(),mt(mM,"applyStyle"),mt(yM,"addHtmlLabel"),vM=mt(async(e,t,r,n)=>{let i=e||"";if("object"==typeof i&&(i=i[0]),Dc(D().flowchart.htmlLabels))return i=i.replace(/\\n|\n/g,"
"),M.info("vertexText"+i),yM({isNode:n,label:VC(i).replace(/fa[blrs]?:fa-[\w-]+/g,e=>``),labelStyle:t&&t.replace("fill:","color:")});var a,s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",t.replace("color:","fill:"));for(a of"string"==typeof i?i.split(/\\n|\n|/gi):Array.isArray(i)?i:[]){var o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),r?o.setAttribute("class","title-row"):o.setAttribute("class","row"),o.textContent=a.trim(),s.appendChild(o)}return s},"createLabel"),xM=vM});async function wM(i,a){var{labelStyles:e,nodeStyles:t}=V(a);a.labelStyle=e;let r,s=(r=a.cssClasses?"node "+a.cssClasses:"node default",i.insert("g").attr("class",r).attr("id",a.domId||a.id)),n=s.insert("g"),o=s.insert("g").attr("class","label").attr("style",t),l=a.description,c=a.label,h=o.node().appendChild(await xM(c,a.labelStyle,!0,!0)),u={width:0,height:0};Dc(D()?.flowchart?.htmlLabels)&&(e=h.children[0],i=H(h),u=e.getBoundingClientRect(),i.attr("width",u.width),i.attr("height",u.height)),M.info("Text 2",l);var e=l||[],i=h.getBBox(),d=(e=o.node().appendChild(await xM(e.join?e.join("
"):e,a.labelStyle,!0,!0))).children[0],p=H(e),d=(u=d.getBoundingClientRect(),p.attr("width",u.width),p.attr("height",u.height),(a.padding||0)/2);H(e).attr("transform","translate( "+(u.width>i.width?0:(i.width-u.width)/2)+", "+(i.height+d+5)+")"),H(h).attr("transform","translate( "+(u.width(M.debug("Rough node insert CXC",r),n),":first-child"),v=s.insert(()=>(M.debug("Rough node insert CXC",r),r),":first-child")}else v=n.insert("rect",":first-child"),x=n.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)),x.attr("class","divider").attr("x1",-u.width/2-d).attr("x2",u.width/2+d).attr("y1",-u.height/2-d+i.height+d).attr("y2",-u.height/2-d+i.height+d);return ZL(a,v),a.intersect=function(e){return mN.rect(a,e)},s}var kM=e(()=>{Zw(),eh(),i(),bM(),EN(),CN(),RI(),mu(),MR(),t(),mt(wM,"rectWithTitle")});async function TM(e,t){return UR(e,t,{rx:5,ry:5,classes:"",labelPaddingX:+(t?.padding||0),labelPaddingY:+(t?.padding||0)})}var EM=e(()=>{qR(),mt(TM,"roundedRect")});async function CM(e,t){var{labelStyles:r,nodeStyles:n}=V(t),{shapeSvg:r,bbox:e,label:i}=(t.labelStyle=r,await XL(e,t,QL(t))),a=t?.padding??0,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=-e.width/2-a,a=-e.height/2-a,c=t.cssStyles,h=II.svg(r),u=wN(t,{});"handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid");let d=[{x:l,y:a},{x:l+s+8,y:a},{x:l+s+8,y:a+o},{x:l-8,y:a+o},{x:l-8,y:a},{x:l,y:a},{x:l,y:a+o}],p=h.polygon(d.map(e=>[e.x,e.y]),u),g=r.insert(()=>p,":first-child");return g.attr("class","basic label-container").attr("style",bC(c)),n&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",n),c&&"handDrawn"!==t.look&&g.selectAll("path").attr("style",n),i.attr("transform",`translate(${-s/2+4+(t.padding??0)-(e.x-(e.left??0))},${-o/2+(t.padding??0)-(e.y-(e.top??0))})`),ZL(t,g),t.intersect=function(e){return mN.rect(t,e)},r}var SM=e(()=>{i(),EN(),CN(),RI(),KC(),mt(CM,"shadedProcess")});async function _M(e,t){var{labelStyles:r,nodeStyles:n}=V(t),{shapeSvg:r,bbox:e,label:i}=(t.labelStyle=r,await XL(e,t,QL(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=-a/2,l=-s/2,c=t.cssStyles,h=II.svg(r),u=wN(t,{});"handDrawn"!==t.look&&(u.roughness=0,u.fillStyle="solid");let d=[{x:o,y:l},{x:o,y:l+s},{x:o+a,y:l+s},{x:o+a,y:l-s/2}],p=YL(d),g=h.path(p,u),f=r.insert(()=>g,":first-child");return f.attr("class","basic label-container"),c&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",c),n&&"handDrawn"!==t.look&&f.selectChildren("path").attr("style",n),f.attr("transform",`translate(0, ${s/4})`),i.attr("transform",`translate(${-a/2+(t.padding??0)-(e.x-(e.left??0))}, ${-s/4+(t.padding??0)-(e.y-(e.top??0))})`),ZL(t,f),t.intersect=function(e){return mN.polygon(t,d,e)},r}var AM=e(()=>{i(),EN(),CN(),RI(),mt(_M,"slopedRect")});async function LM(e,t){return UR(e,t,{rx:0,ry:0,classes:"",labelPaddingX:2*(t?.padding||0),labelPaddingY:+(t?.padding||0)})}var NM=e(()=>{qR(),mt(LM,"squareRect")});async function IM(e,i){var{labelStyles:t,nodeStyles:r}=V(i);i.labelStyle=t;let{shapeSvg:a,bbox:n}=await XL(e,i,QL(i)),s=n.height+i.padding,o=n.width+s/4+i.padding,l,c=i.cssStyles;if("handDrawn"===i.look){let e=II.svg(a),t=wN(i,{}),r=IR(-o/2,-s/2,o,s,s/2),n=e.path(r,t);(l=a.insert(()=>n,":first-child")).attr("class","basic label-container").attr("style",bC(c))}else(l=a.insert("rect",":first-child")).attr("class","basic label-container").attr("style",r).attr("rx",s/2).attr("ry",s/2).attr("x",-o/2).attr("y",-s/2).attr("width",o).attr("height",s);return ZL(i,l),i.intersect=function(e){return mN.rect(i,e)},a}var RM=e(()=>{i(),EN(),CN(),RI(),MR(),KC(),mt(IM,"stadium")});async function MM(e,t){return UR(e,t,{rx:5,ry:5,classes:"flowchart-node"})}var DM=e(()=>{qR(),mt(MM,"state")});function OM(e,t,{config:{themeVariables:r}}){var{labelStyles:n,nodeStyles:i}=V(t),n=(t.labelStyle=n,t.cssStyles),{lineColor:r,stateBorder:a,nodeBorder:s}=r,e=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),o=II.svg(e),l=wN(t,{});"handDrawn"!==t.look&&(l.roughness=0,l.fillStyle="solid");let c=o.circle(0,0,14,{...l,stroke:r,strokeWidth:2}),h=a??s,u=o.circle(0,0,5,{...l,fill:h,stroke:h,strokeWidth:2,fillStyle:"solid"}),d=e.insert(()=>c,":first-child");return d.insert(()=>u),n&&d.selectAll("path").attr("style",n),i&&d.selectAll("path").attr("style",i),ZL(t,d),t.intersect=function(e){return mN.circle(t,7,e)},e}var PM=e(()=>{RI(),EN(),CN(),i(),mt(OM,"stateEnd")});function BM(e,t,{config:{themeVariables:r}}){let n=r.lineColor,i=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),a;if("handDrawn"===t.look){let e=II.svg(i).circle(0,0,14,yN(n));(a=i.insert(()=>e)).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14)}else(a=i.insert("circle",":first-child")).attr("class","state-start").attr("r",7).attr("width",14).attr("height",14);return ZL(t,a),t.intersect=function(e){return mN.circle(t,7,e)},i}var $M=e(()=>{RI(),EN(),CN(),i(),mt(BM,"stateStart")});async function FM(a,s){var{labelStyles:o,nodeStyles:e}=V(s);s.labelStyle=o;let{shapeSvg:l,bbox:t}=await XL(a,s,QL(s)),r=(s?.padding||0)/2,c=t.width+s.padding,h=t.height+s.padding,u=-t.width/2-r,d=-t.height/2-r,n=[{x:0,y:0},{x:c,y:0},{x:c,y:-h},{x:0,y:-h},{x:0,y:0},{x:-8,y:0},{x:c+8,y:0},{x:c+8,y:-h},{x:-8,y:-h},{x:-8,y:0}];if("handDrawn"===s.look){let e=II.svg(l),t=wN(s,{}),r=e.rectangle(u-8,d,c+16,h,t),n=e.line(u,d,u,d+h,t),i=e.line(u+c,d,u+c,d+h,t);l.insert(()=>n,":first-child"),l.insert(()=>i,":first-child"),o=l.insert(()=>r,":first-child"),a=s.cssStyles,o.attr("class","basic label-container").attr("style",bC(a)),ZL(s,o)}else a=$I(l,c,h,n),e&&a.attr("style",e),ZL(s,a);return s.intersect=function(e){return mN.polygon(s,n,e)},l}var zM=e(()=>{i(),EN(),CN(),RI(),FI(),KC(),mt(FM,"subroutine")});async function GM(e,t){var{labelStyles:r,nodeStyles:n}=V(t);t.labelStyle=r;let{shapeSvg:i,bbox:a}=await XL(e,t,QL(t)),s=Math.max(a.width+2*(t.padding??0),t?.width??0),o=Math.max(a.height+2*(t.padding??0),t?.height??0),l=-s/2,c=-o/2,h=.2*o,u=.2*o,d=t.cssStyles,p=II.svg(i),g=wN(t,{}),f=[{x:l-h/2,y:c},{x:l+s+h/2,y:c},{x:l+s+h/2,y:c+o},{x:l-h/2,y:c+o}],m=[{x:l+s-h/2,y:c+o},{x:l+s+h/2,y:c+o},{x:l+s+h/2,y:c+o-u}],y=("handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid"),YL(f)),v=p.path(y,g),x=YL(m),b=p.path(x,{...g,fillStyle:"solid"}),w=i.insert(()=>b,":first-child");return w.insert(()=>v,":first-child"),w.attr("class","basic label-container"),d&&"handDrawn"!==t.look&&w.selectAll("path").attr("style",d),n&&"handDrawn"!==t.look&&w.selectAll("path").attr("style",n),ZL(t,w),t.intersect=function(e){return mN.polygon(t,f,e)},i}var UM=e(()=>{i(),CN(),RI(),EN(),mt(GM,"taggedRect")});async function qM(e,t){var{labelStyles:r,nodeStyles:n}=V(t),{shapeSvg:r,bbox:e,label:i}=(t.labelStyle=r,await XL(e,t,QL(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/4,l=.2*a,c=.2*s,h=s+o,u=t.cssStyles,d=II.svg(r),p=wN(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-a/2-a/2*.1,y:h/2},...HL(-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.4*(m+s)},{x:f+a,y:m+s-c},{x:f+a,y:.9*(m+s)},...HL(f+a,1.3*(m+s),f+a-l,1.5*(m+s),.03*-s,.5)],v=YL(g),x=d.path(v,p),b=YL(y),w=d.path(b,{...p,fillStyle:"solid"}),k=r.insert(()=>w,":first-child");return k.insert(()=>x,":first-child"),k.attr("class","basic label-container"),u&&"handDrawn"!==t.look&&k.selectAll("path").attr("style",u),n&&"handDrawn"!==t.look&&k.selectAll("path").attr("style",n),k.attr("transform",`translate(0,${-o/2})`),i.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))})`),ZL(t,k),t.intersect=function(e){return mN.polygon(t,g,e)},r}var jM=e(()=>{i(),EN(),RI(),CN(),mt(qM,"taggedWaveEdgedRectangle")});async function WM(e,t){var{labelStyles:r,nodeStyles:n}=V(t),{shapeSvg:r,bbox:e}=(t.labelStyle=r,await XL(e,t,QL(t))),i=Math.max(e.width+t.padding,t?.width||0),a=-i/2,s=-(e=Math.max(e.height+t.padding,t?.height||0))/2,o=r.insert("rect",":first-child");return o.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",a).attr("y",s).attr("width",i).attr("height",e),ZL(t,o),t.intersect=function(e){return mN.rect(t,e)},r}var YM=e(()=>{i(),EN(),CN(),mt(WM,"text")});async function HM(e,a){var{labelStyles:t,nodeStyles:r}=V(a);a.labelStyle=t;let{shapeSvg:s,bbox:n,label:i,halfPadding:o}=await XL(e,a,QL(a)),l="neo"===a.look?2*o:o,c=n.height+l,h=c/2,u=h/(2.5+c/50),d=n.width+u+l,p=a.cssStyles,g;if("handDrawn"===a.look){let e=II.svg(s),t=XM(0,0,d,c,u,h),r=KM(0,0,d,c,u,h),n=e.path(t,wN(a,{})),i=e.path(r,wN(a,{fill:"none"}));g=s.insert(()=>i,":first-child"),(g=s.insert(()=>n,":first-child")).attr("class","basic label-container"),p&&g.attr("style",p)}else t=VM(0,0,d,c,u,h),(g=s.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",bC(p)).attr("style",r)).attr("class","basic label-container"),p&&g.selectAll("path").attr("style",p),r&&g.selectAll("path").attr("style",r);return g.attr("label-offset-x",u),g.attr("transform",`translate(${-d/2}, ${c/2} )`),i.attr("transform",`translate(${-n.width/2-u-(n.x-(n.left??0))}, ${-n.height/2-(n.y-(n.top??0))})`),ZL(a,g),a.intersect=function(t){var r=mN.rect(a,t),n=r.y-(a.y??0);if(0!=h&&(Math.abs(n)<(a.height??0)/2||Math.abs(n)==(a.height??0)/2&&Math.abs(r.x-(a.x??0))>(a.width??0)/2-u)){let e=u*u*(1-n*n/(h*h));0!=e&&(e=Math.sqrt(Math.abs(e))),e=u-e,0{i(),CN(),RI(),EN(),KC(),VM=mt((e,t,r,n,i,a)=>`M${e},${t} a${i},${a} 0,0,1 0,${-n} l${r},0 a${i},${a} 0,0,1 0,${n} M${r},${-n} a${i},${a} 0,0,0 0,${n} - l${-r},0`,"createCylinderPathD"),ZR=me((t,e,r,n,i,a)=>[`M${t},`+e,`M${t+r},`+e,`a${i},${a} 0,0,0 0,`+-n,`l${-r},0`,`a${i},${a} 0,0,0 0,`+n,`l${r},0`].join(" "),"createOuterCylinderPathD"),QR=me((t,e,r,n,i,a)=>[`M${t+r/2},`+-n/2,`a${i},${a} 0,0,0 0,`+n].join(" "),"createInnerCylinderPathD"),me(XR,"tiltedCylinder")});async function tM(t,i){var{labelStyles:e,nodeStyles:r}=kL(i);i.labelStyle=e;let{shapeSvg:a,bbox:n}=await K9(t,i,J9(i)),s=n.width+i.padding,o=n.height+i.padding,l=[{x:-3*o/6,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:0,y:-o}],c,h=i.cssStyles;if("handDrawn"===i.look){let t=MN.svg(a),e=TL(i,{}),r=H9(l),n=t.path(r,e);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=zN(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,Q9(i,c),i.intersect=function(t){return yL.polygon(i,l,t)},a}var eM=t(()=>{i(),_L(),SL(),DN(),GN(),me(tM,"trapezoid")});async function rM(t,e){var{labelStyles:r,nodeStyles:n}=kL(e),{shapeSvg:r,bbox:t}=(e.labelStyle=r,await K9(t,e,J9(e))),i=Math.max(60,t.width+2*(e.padding??0),e?.width??0),t=Math.max(20,t.height+2*(e.padding??0),e?.height??0),a=e.cssStyles,s=MN.svg(r),o=TL(e,{});"handDrawn"!==e.look&&(o.roughness=0,o.fillStyle="solid");let l=[{x:-i/2*.8,y:-t/2},{x:i/2*.8,y:-t/2},{x:i/2,y:-t/2*.6},{x:i/2,y:t/2},{x:-i/2,y:t/2},{x:-i/2,y:-t/2*.6}],c=H9(l),h=s.path(c,o),u=r.insert(()=>h,":first-child");return u.attr("class","basic label-container"),a&&"handDrawn"!==e.look&&u.selectChildren("path").attr("style",a),n&&"handDrawn"!==e.look&&u.selectChildren("path").attr("style",n),Q9(e,u),e.intersect=function(t){return yL.polygon(e,l,t)},r}var nM=t(()=>{i(),_L(),SL(),DN(),me(rM,"trapezoidalPentagon")});async function iM(t,e){var{labelStyles:r,nodeStyles:n}=kL(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await K9(t,e,J9(e)),o=Dc(D().flowchart?.htmlLabels),l=a.width+(e.padding??0),c=l+a.height,h=l+a.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],d=e.cssStyles,p=MN.svg(i),g=TL(e,{}),f=("handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid"),H9(u)),m=p.path(f,g),y=i.insert(()=>m,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return d&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",d),n&&"handDrawn"!==e.look&&y.selectChildren("path").attr("style",n),e.width=l,e.height=c,Q9(e,y),s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${c/2-(a.height+(e.padding??0)/(o?2:1)-(a.y-(a.top??0)))})`),e.intersect=function(t){return M.info("Triangle intersect",e,u,t),yL.polygon(e,u,t)},i}var aM=t(()=>{e(),i(),_L(),SL(),DN(),i(),th(),mu(),me(iM,"triangle")});async function sM(t,e){var{labelStyles:r,nodeStyles:n}=kL(e),{shapeSvg:r,bbox:t,label:i}=(e.labelStyle=r,await K9(t,e,J9(e))),a=Math.max(t.width+2*(e.padding??0),e?.width??0),s=Math.max(t.height+2*(e.padding??0),e?.height??0),o=s/8,l=s+o,c=e.cssStyles,h=0<(h=70-a)?h/2:0,u=MN.svg(r),d=TL(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");let p=[{x:-a/2-h,y:l/2},...V9(-a/2-h,l/2,a/2+h,l/2,o,.8),{x:a/2+h,y:-l/2},{x:-a/2-h,y:-l/2}],g=H9(p),f=u.path(g,d),m=r.insert(()=>f,":first-child");return m.attr("class","basic label-container"),c&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",c),n&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",n),m.attr("transform",`translate(0,${-o/2})`),i.attr("transform",`translate(${-a/2+(e.padding??0)-(t.x-(t.left??0))},${-s/2+(e.padding??0)-o-(t.y-(t.top??0))})`),Q9(e,m),e.intersect=function(t){return yL.polygon(e,p,t)},r}var oM=t(()=>{i(),_L(),DN(),SL(),me(sM,"waveEdgedRectangle")});async function lM(t,e){var{labelStyles:r,nodeStyles:n}=kL(e);e.labelStyle=r;let{shapeSvg:i,bbox:a}=await K9(t,e,J9(e)),s=Math.max(a.width+2*(e.padding??0),e?.width??0),o=Math.max(a.height+2*(e.padding??0),e?.height??0),l=s/o,c=s,h=o;c>h*l?h=c/l:c=h*l,c=Math.max(c,100),h=Math.max(h,50);var r=Math.min(.2*h,h/4),t=h+2*r,u=e.cssStyles,d=MN.svg(i),p=TL(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-c/2,y:t/2},...V9(-c/2,t/2,c/2,t/2,r,1),{x:c/2,y:-t/2},...V9(c/2,-t/2,-c/2,-t/2,r,-1)],f=H9(g),m=d.path(f,p),y=i.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",u),n&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",n),Q9(e,y),e.intersect=function(t){return yL.polygon(e,g,t)},i}var cM=t(()=>{i(),_L(),SL(),DN(),me(lM,"waveRectangle")});async function hM(t,e){var{labelStyles:r,nodeStyles:n}=kL(e);e.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await K9(t,e,J9(e)),o=Math.max(a.width+2*(e.padding??0),e?.width??0),l=Math.max(a.height+2*(e.padding??0),e?.height??0),c=-o/2,h=-l/2,u=e.cssStyles,d=MN.svg(i),p=TL(e,{}),g=[{x:c-5,y:h-5},{x:c-5,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h-5}],f=`M${c-5},${h-5} L${c+o},${h-5} L${c+o},${h+l} L${c-5},${h+l} L${c-5},${h-5} + l${-r},0`,"createCylinderPathD"),XM=mt((e,t,r,n,i,a)=>[`M${e},`+t,`M${e+r},`+t,`a${i},${a} 0,0,0 0,`+-n,`l${-r},0`,`a${i},${a} 0,0,0 0,`+n,`l${r},0`].join(" "),"createOuterCylinderPathD"),KM=mt((e,t,r,n,i,a)=>[`M${e+r/2},`+-n/2,`a${i},${a} 0,0,0 0,`+n].join(" "),"createInnerCylinderPathD"),mt(HM,"tiltedCylinder")});async function QM(e,i){var{labelStyles:t,nodeStyles:r}=V(i);i.labelStyle=t;let{shapeSvg:a,bbox:n}=await XL(e,i,QL(i)),s=n.width+i.padding,o=n.height+i.padding,l=[{x:-3*o/6,y:0},{x:s+3*o/6,y:0},{x:s,y:-o},{x:0,y:-o}],c,h=i.cssStyles;if("handDrawn"===i.look){let e=II.svg(a),t=wN(i,{}),r=YL(l),n=e.path(r,t);c=a.insert(()=>n,":first-child").attr("transform",`translate(${-s/2}, ${o/2})`),h&&c.attr("style",h)}else c=$I(a,s,o,l);return r&&c.attr("style",r),i.width=s,i.height=o,ZL(i,c),i.intersect=function(e){return mN.polygon(i,l,e)},a}var JM=e(()=>{i(),EN(),CN(),RI(),FI(),mt(QM,"trapezoid")});async function eD(e,t){var{labelStyles:r,nodeStyles:n}=V(t),{shapeSvg:r,bbox:e}=(t.labelStyle=r,await XL(e,t,QL(t))),i=Math.max(60,e.width+2*(t.padding??0),t?.width??0),e=Math.max(20,e.height+2*(t.padding??0),t?.height??0),a=t.cssStyles,s=II.svg(r),o=wN(t,{});"handDrawn"!==t.look&&(o.roughness=0,o.fillStyle="solid");let l=[{x:-i/2*.8,y:-e/2},{x:i/2*.8,y:-e/2},{x:i/2,y:-e/2*.6},{x:i/2,y:e/2},{x:-i/2,y:e/2},{x:-i/2,y:-e/2*.6}],c=YL(l),h=s.path(c,o),u=r.insert(()=>h,":first-child");return u.attr("class","basic label-container"),a&&"handDrawn"!==t.look&&u.selectChildren("path").attr("style",a),n&&"handDrawn"!==t.look&&u.selectChildren("path").attr("style",n),ZL(t,u),t.intersect=function(e){return mN.polygon(t,l,e)},r}var tD=e(()=>{i(),EN(),CN(),RI(),mt(eD,"trapezoidalPentagon")});async function rD(e,t){var{labelStyles:r,nodeStyles:n}=V(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await XL(e,t,QL(t)),o=Dc(D().flowchart?.htmlLabels),l=a.width+(t.padding??0),c=l+a.height,h=l+a.height,u=[{x:0,y:0},{x:h,y:0},{x:h/2,y:-c}],d=t.cssStyles,p=II.svg(i),g=wN(t,{}),f=("handDrawn"!==t.look&&(g.roughness=0,g.fillStyle="solid"),YL(u)),m=p.path(f,g),y=i.insert(()=>m,":first-child").attr("transform",`translate(${-c/2}, ${c/2})`);return d&&"handDrawn"!==t.look&&y.selectChildren("path").attr("style",d),n&&"handDrawn"!==t.look&&y.selectChildren("path").attr("style",n),t.width=l,t.height=c,ZL(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 M.info("Triangle intersect",t,u,e),mN.polygon(t,u,e)},i}var nD=e(()=>{t(),i(),EN(),CN(),RI(),i(),eh(),mu(),mt(rD,"triangle")});async function iD(e,t){var{labelStyles:r,nodeStyles:n}=V(t),{shapeSvg:r,bbox:e,label:i}=(t.labelStyle=r,await XL(e,t,QL(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=s+o,c=t.cssStyles,h=0<(h=70-a)?h/2:0,u=II.svg(r),d=wN(t,{});"handDrawn"!==t.look&&(d.roughness=0,d.fillStyle="solid");let p=[{x:-a/2-h,y:l/2},...HL(-a/2-h,l/2,a/2+h,l/2,o,.8),{x:a/2+h,y:-l/2},{x:-a/2-h,y:-l/2}],g=YL(p),f=u.path(g,d),m=r.insert(()=>f,":first-child");return m.attr("class","basic label-container"),c&&"handDrawn"!==t.look&&m.selectAll("path").attr("style",c),n&&"handDrawn"!==t.look&&m.selectAll("path").attr("style",n),m.attr("transform",`translate(0,${-o/2})`),i.attr("transform",`translate(${-a/2+(t.padding??0)-(e.x-(e.left??0))},${-s/2+(t.padding??0)-o-(e.y-(e.top??0))})`),ZL(t,m),t.intersect=function(e){return mN.polygon(t,p,e)},r}var aD=e(()=>{i(),EN(),RI(),CN(),mt(iD,"waveEdgedRectangle")});async function sD(e,t){var{labelStyles:r,nodeStyles:n}=V(t);t.labelStyle=r;let{shapeSvg:i,bbox:a}=await XL(e,t,QL(t)),s=Math.max(a.width+2*(t.padding??0),t?.width??0),o=Math.max(a.height+2*(t.padding??0),t?.height??0),l=s/o,c=s,h=o;c>h*l?h=c/l:c=h*l,c=Math.max(c,100),h=Math.max(h,50);var r=Math.min(.2*h,h/4),e=h+2*r,u=t.cssStyles,d=II.svg(i),p=wN(t,{});"handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid");let g=[{x:-c/2,y:e/2},...HL(-c/2,e/2,c/2,e/2,r,1),{x:c/2,y:-e/2},...HL(c/2,-e/2,-c/2,-e/2,r,-1)],f=YL(g),m=d.path(f,p),y=i.insert(()=>m,":first-child");return y.attr("class","basic label-container"),u&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",u),n&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",n),ZL(t,y),t.intersect=function(e){return mN.polygon(t,g,e)},i}var oD=e(()=>{i(),EN(),CN(),RI(),mt(sD,"waveRectangle")});async function lD(e,t){var{labelStyles:r,nodeStyles:n}=V(t);t.labelStyle=r;let{shapeSvg:i,bbox:a,label:s}=await XL(e,t,QL(t)),o=Math.max(a.width+2*(t.padding??0),t?.width??0),l=Math.max(a.height+2*(t.padding??0),t?.height??0),c=-o/2,h=-l/2,u=t.cssStyles,d=II.svg(i),p=wN(t,{}),g=[{x:c-5,y:h-5},{x:c-5,y:h+l},{x:c+o,y:h+l},{x:c+o,y:h-5}],f=`M${c-5},${h-5} L${c+o},${h-5} L${c+o},${h+l} L${c-5},${h+l} L${c-5},${h-5} M${c-5},${h} L${c+o},${h} - M${c},${h-5} L${c},`+(h+l),m=("handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid"),d.path(f,p)),y=i.insert(()=>m,":first-child");return y.attr("transform","translate(2.5, 2.5)"),y.attr("class","basic label-container"),u&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",u),n&&"handDrawn"!==e.look&&y.selectAll("path").attr("style",n),s.attr("transform",`translate(${-a.width/2+2.5-(a.x-(a.left??0))}, ${-a.height/2+2.5-(a.y-(a.top??0))})`),Q9(e,y),e.intersect=function(t){return yL.polygon(e,g,t)},i}var uM=t(()=>{i(),SL(),DN(),_L(),me(hM,"windowPane")});async function dM(t,e){var r,n=e,i=(n.alias&&(e.label=n.alias),"handDrawn"===e.look&&(A=(A=Ir().themeVariables).background,await dM(t,{...e,id:e.id+"-background",look:"default",cssStyles:["stroke: none","fill: "+A]})),Ir());e.useHtmlLabels=i.htmlLabels;let o=i.er?.diagramPadding??10,l=i.er?.entityPadding??6,a=e.cssStyles,{labelStyles:s,nodeStyles:c}=kL(e);if(0===n.attributes.length&&e.label)return A={rx:0,ry:0,labelPaddingX:o,labelPaddingY:1.5*o,classes:""},vE(e.label,i)+2*A.labelPaddingXt+(e?.rowHeight??0),0)),Math.max(S.width+2*o,e?.width||0,A)),R=Math.max((z??0)+d.height,e?.height||0),M=-I/2,D=-R/2,G=(u.selectAll("g:not(:first-child)").each((t,e,r)=>{let n=H(r[e]),i=n.attr("transform"),a=0,s=0;i&&(r=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i))&&(a=parseFloat(r[1]),s=parseFloat(r[2]),n.attr("class").includes("attribute-name")?a+=m:n.attr("class").includes("attribute-keys")?a+=m+y:n.attr("class").includes("attribute-comment")&&(a+=m+y+v)),n.attr("transform",`translate(${M+o/2+a}, ${s+D+d.height+l/2})`)}),u.select(".name").attr("transform","translate("+-d.width/2+", "+(D+l/2)+")"),L.rectangle(M,D,I,R,N)),U=u.insert(()=>G,":first-child").attr("style",a.join("")),q=Ir().themeVariables,{rowEven:j,rowOdd:W,nodeBorder:Y}=q;g.push(0);for([$,C]of f.entries()){let t=($+1)%2==0&&0!==C.yOffset,e=L.rectangle(M,d.height+D+C?.yOffset,I,C?.rowHeight,{...N,fill:t?j:W,stroke:Y});u.insert(()=>e,"g.label").attr("style",a.join("")).attr("class","row-rect-"+(t?"even":"odd"))}let O=L.line(M,d.height+D,I+M,d.height+D,N);u.insert(()=>O).attr("class","divider"),O=L.line(m+M,d.height+D,m+M,R+D,N),u.insert(()=>O).attr("class","divider"),b&&(O=L.line(m+y+M,d.height+D,m+y+M,R+D,N),u.insert(()=>O).attr("class","divider")),w&&(O=L.line(m+y+v+M,d.height+D,m+y+v+M,R+D,N),u.insert(()=>O).attr("class","divider"));for(_ of g)O=L.line(M,d.height+D+_,I+M,d.height+D+_,N),u.insert(()=>O).attr("class","divider");return Q9(e,U),c&&"handDrawn"!==e.look&&(t=c.split(";")?.filter(t=>t.includes("stroke"))?.map(t=>""+t).join("; "),u.selectAll("path").attr("style",t??""),u.selectAll(".row-rect-even path").attr("style",c)),e.intersect=function(t){return yL.rect(e,t)},u}async function pM(t,e,r,n=0,i=0,a=[],s=""){if(t=t.insert("g").attr("class","label "+a.join(" ")).attr("transform",`translate(${n}, ${i})`).attr("style",s),e!==Bc(e)&&(e=(e=Bc(e)).replaceAll("<","<").replaceAll(">",">")),a=t.node().appendChild(await W9(t,e,{width:vE(e,r)+100,style:s,useHtmlLabels:r.htmlLabels},r)),e.includes("<")||e.includes(">")){let t=a.children[0];for(t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">");t.childNodes[0];)(t=t.childNodes[0]).textContent=t.textContent.replaceAll("<","<").replaceAll(">",">")}let o=a.getBBox();return Dc(r.htmlLabels)&&((n=a.children[0]).style.textAlign="start",i=H(a),o=n.getBoundingClientRect(),i.attr("width",o.width),i.attr("height",o.height)),o}var gM=t(()=>{i(),_L(),SL(),DN(),WI(),Nn(),Y9(),th(),Q3(),ZE(),me(dM,"erBox"),me(pM,"addText")});async function fM(t,e,r,n,i=r.class.padding??12){let a=n?0:3,s=t.insert("g").attr("class",J9(e)).attr("id",e.domId||e.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,t.innerHTML.includes("")&&(h+=t.innerHTML.split("").length-1),t.getElementsByTagName("img"));if(u){let n=""===o.replace(/]*>/g,"").trim();await Promise.all([...u].map(r=>new Promise(e=>{function t(){var t;r.style.display="flex",r.style.flexDirection="column",n?(t=a.fontSize?.toString()??window.getComputedStyle(document.body).fontSize,t=5*parseInt(t,10)+"px",r.style.minWidth=t,r.style.maxWidth=t):r.style.width="100%",e(r)}me(t,"setupImage"),setTimeout(()=>{r.complete&&t()}),r.addEventListener("error",t),r.addEventListener("load",t)})))}c=t.getBoundingClientRect(),e.attr("width",c.width),e.attr("height",c.height)}else n.includes("font-weight: bolder")&&H(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 i.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}var yM=t(()=>{Q3(),Nn(),i(),ZE(),mu(),Y9(),th(),me(fM,"textHelper"),me(mM,"addText")});async function vM(e,r){let t=D(),s=t.class.padding??12,n=s,o=r.useHtmlLabels??Dc(t.htmlLabels)??!0,l=r,{shapeSvg:c,bbox:i}=(l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[],await fM(e,r,t,o,n)),{labelStyles:a,nodeStyles:h}=kL(r),u=(r.labelStyle=a,r.cssStyles=l.styles||"",e=l.styles?.join(";")||h||"",r.cssStyles||(r.cssStyles=e.replaceAll("!important","").split(";")),0===l.members.length&&0===l.methods.length&&!t.class?.hideEmptyMembersBox),d=MN.svg(c),p=TL(r,{}),g=("handDrawn"!==r.look&&(p.roughness=0,p.fillStyle="solid"),i.width),f=i.height,m=(0===l.members.length&&0===l.methods.length?f+=n:0v,":first-child");x.attr("class","basic label-container");var b=x.node().getBBox(),w=(c.selectAll(".text").each((t,e,r)=>{let n=(e=H(r[e])).attr("transform"),i=(n&&(r=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n))?parseFloat(r[2]):0)+y+s-(u?s:0===l.members.length&&0===l.methods.length?-s/2:0),a=(o||(i-=4),m);(e.attr("class").includes("label-group")||e.attr("class").includes("annotation-group"))&&(a=-e.node()?.getBBox().width/2||0,c.selectAll("text").each(function(t,e,r){"middle"===window.getComputedStyle(r[e]).textAnchor&&(a=0)})),e.attr("transform",`translate(${a}, ${i})`)}),c.select(".annotation-group").node().getBBox().height-(u?s/2:0)||0),k=c.select(".label-group").node().getBBox().height-(u?s/2:0)||0,T=c.select(".members-group").node().getBBox().height-(u?s/2:0)||0;if(0t).attr("class","divider").attr("style",e)}if(u||0t).attr("class","divider").attr("style",e)}return"handDrawn"!==l.look&&c.selectAll("path").attr("style",e),x.select(":nth-child(2)").attr("style",e),c.selectAll(".divider").select("path").attr("style",e),r.labelStyle?c.selectAll("span").attr("style",r.labelStyle):c.selectAll("span").attr("style",e),o||((w=(b=RegExp(/color\s*:\s*([^;]*)/)).exec(e))?(k=w[0].replace("color","fill"),c.selectAll("tspan").attr("style",k)):a&&(T=b.exec(a))&&(e=T[0].replace("color","fill"),c.selectAll("tspan").attr("style",e))),Q9(r,x),r.intersect=function(t){return yL.rect(r,t)},c}var xM=t(()=>{i(),mu(),Q3(),DN(),SL(),_L(),yM(),th(),me(vM,"classBox")});async function bM(t,e){var{labelStyles:r,nodeStyles:n}=kL(e);e.labelStyle=r;let i=e,a=e,s="verifyMethod"in e,o=J9(e),l=t.insert("g").attr("class",o).attr("id",e.domId??e.id),c,h=c=s?await wM(l,`<<${i.type}>>`,0,e.labelStyle):await wM(l,"<<Element>>",0,e.labelStyle),u=await wM(l,i.name,h,e.labelStyle+"; font-weight: bold;"),d=(h+=u+20,s?(r=await wM(l,i.requirementId?"id: "+i.requirementId:"",h,e.labelStyle),h+=r,t=await wM(l,i.text?"Text: "+i.text:"",h,e.labelStyle),h+=t,r=await wM(l,i.risk?"Risk: "+i.risk:"",h,e.labelStyle),h+=r,await wM(l,i.verifyMethod?"Verification: "+i.verifyMethod:"",h,e.labelStyle)):(t=await wM(l,a.type?"Type: "+a.type:"",h,e.labelStyle),h+=t,await wM(l,a.docRef?"Doc Ref: "+a.docRef:"",h,e.labelStyle)),(l.node()?.getBBox().width??200)+20),p=(l.node()?.getBBox().height??200)+20,g=-d/2,f=-p/2,m=MN.svg(l),y=TL(e,{}),v=("handDrawn"!==e.look&&(y.roughness=0,y.fillStyle="solid"),m.rectangle(g,f,d,p,y)),x=l.insert(()=>v,":first-child");if(x.attr("class","basic label-container").attr("style",n),l.selectAll(".label").each((t,e,r)=>{let n=H(r[e]),i=n.attr("transform"),a=0,s=0,o=(i&&(r=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i))&&(a=parseFloat(r[1]),s=parseFloat(r[2])),s-p/2),l=10+g;0!==e&&1!==e||(l=a),n.attr("transform",`translate(${l}, ${20+o})`)}),h>c+u+20){let t=m.line(g,f+c+u+20,g+d,f+c+u+20,y);l.insert(()=>t).attr("style",n)}return Q9(e,x),e.intersect=function(t){return yL.rect(e,t)},l}async function wM(t,e,r,n=""){if(""===e)return 0;let i=t.insert("g").attr("class","label").attr("style",n),a=D(),s=a.htmlLabels??!0,o=await W9(i,xh(XE(e)),{width:vE(e,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:n},a),l;if(s)t=o.children[0],e=H(o),l=t.getBoundingClientRect(),e.attr("width",l.width),e.attr("height",l.height);else{var c;for(c of o.children[0].children)c.textContent=c.textContent.replaceAll(">",">").replaceAll("<","<"),n&&c.setAttribute("style",n);(l=o.getBBox()).height+=6}return i.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}var kM=t(()=>{i(),_L(),SL(),DN(),ZE(),mu(),Y9(),Q3(),me(bM,"requirementBox"),me(wM,"addText")});async function TM(t,n,{config:e}){var{labelStyles:i,nodeStyles:r}=kL(n),i=(n.labelStyle=i||"",n.width);n.width=(n.width??200)-10;let{shapeSvg:a,bbox:s,label:o}=await K9(t,n,J9(n)),l=n.padding||10,c,h,u=("ticket"in n&&n.ticket&&e?.kanban?.ticketBaseUrl&&(c=e?.kanban?.ticketBaseUrl.replace("#TICKET#",n.ticket),h=a.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",c).attr("target","_blank")),{useHtmlLabels:n.useHtmlLabels,labelStyle:n.labelStyle||"",width:n.width,img:n.img,padding:n.padding||8,centerLabel:!1}),d,p;h?{label:d,bbox:p}=await Z9(h,"ticket"in n&&n.ticket||"",u):{label:d,bbox:p}=await Z9(a,"ticket"in n&&n.ticket||"",u);var{label:t,bbox:e}=await Z9(a,"assigned"in n&&n.assigned||"",u),i=(n.width=i,n?.width||0),g=Math.max(p.height,e.height)/2,f=Math.max(s.height+20,n?.height||0)+g,m=-i/2,y=-f/2;o.attr("transform","translate("+(l-i/2)+", "+(-g-s.height/2)+")"),d.attr("transform","translate("+(l-i/2)+", "+(-g+s.height/2)+")"),t.attr("transform","translate("+(l+i/2-e.width-20)+", "+(-g+s.height/2)+")");let v,{rx:x,ry:b}=n,w=n.cssStyles;if("handDrawn"===n.look){let t=MN.svg(a),e=TL(n,{}),r=x||b?t.path(MI(m,y,i,f,x||0),e):t.rectangle(m,y,i,f,e);(v=a.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",w||null)}else(v=a.insert("rect",":first-child")).attr("class","basic label-container __APA__").attr("style",r).attr("rx",x??5).attr("ry",b??5).attr("x",m).attr("y",y).attr("width",i).attr("height",f),(t="priority"in n&&n.priority)&&(e=a.append("line"),g=2+m,r=y+Math.floor((x??0)/2),i=y+f-Math.floor((x??0)/2),e.attr("x1",g).attr("y1",r).attr("x2",g).attr("y2",i).attr("stroke-width","4").attr("stroke",EM(t)));return Q9(n,v),n.height=f,n.intersect=function(t){return yL.rect(n,t)},a}var EM,CM=t(()=>{i(),_L(),OI(),SL(),DN(),EM=me(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority"),me(TM,"kanbanItem")});function _M(t){return t in LM}var SM,AM,LM,NM,IM,RM,MM,DM,OM,PM,BM,FM,$M,zM,GM,UM=t(()=>{PN(),$N(),qN(),WN(),HN(),KN(),JN(),rI(),aI(),oI(),dI(),gI(),mI(),vI(),bI(),kI(),EI(),SI(),LI(),II(),DI(),BI(),$I(),GI(),qI(),HI(),XI(),ZI(),JI(),iR(),sR(),lR(),hR(),dR(),fR(),yR(),ER(),_R(),AR(),NR(),RR(),DR(),PR(),FR(),zR(),UR(),jR(),YR(),VR(),JR(),eM(),nM(),aM(),oM(),cM(),uM(),gM(),xM(),kM(),CM(),SM=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:IR},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:CR},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:MR},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:GR},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:lI},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:YN},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:pR},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:CI},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:KI},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:VI},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:tM},{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:UI},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:fI},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:HR},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:UN},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:SR},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:$R},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:BR},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:wI},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:AI},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:QN},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:eI},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:iI},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:QI},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:sM},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:TI},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:XR},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:tR},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:sI},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:pI},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:iM},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:hM},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:yI},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:rM},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:xI},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:LR},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:cR},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:oR},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:FN},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:XN},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:WR},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:qR},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:lM},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:mR},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:aR}],AM=me(()=>{var t=[...Object.entries({state:OR,choice:jN,note:uR,rectWithTitle:TR,labelRect:YI,iconSquare:FI,iconCircle:RI,icon:NI,iconRounded:PI,imageSquare:zI,anchor:ON,kanbanItem:TM,classBox:vM,erBox:dM,requirementBox:bM}),...SM.flatMap(e=>[e.shortName,..."aliases"in e?e.aliases:[],..."internalAliases"in e?e.internalAliases:[]].map(t=>[t,e.handler]))];return Object.fromEntries(t)},"generateShapeMap"),LM=AM(),me(_M,"isValidShape")}),qM=t(()=>{Q3(),RA(),mu(),e(),UM(),ZE(),th(),fu(),NM=class{constructor(){this.vertexCounter=0,this.config=D(),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=ch,this.setAccDescription=uh,this.setDiagramTitle=ph,this.getAccTitle=hh,this.getAccDescription=dh,this.getDiagramTitle=gh,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{me(this,"FlowDB")}sanitizeText(t){return L.sanitizeText(t,this.config)}lookUpDomId(t){for(var e of this.vertices.values())if(e.id===t)return e.domId;return t}addVertex(n,i,a,s,o,l,c={},t){if(n&&0!==n.trim().length){let r;var e;if(void 0!==t&&(e=t.includes(` -`)?t+` + M${c},${h-5} L${c},`+(h+l),m=("handDrawn"!==t.look&&(p.roughness=0,p.fillStyle="solid"),d.path(f,p)),y=i.insert(()=>m,":first-child");return y.attr("transform","translate(2.5, 2.5)"),y.attr("class","basic label-container"),u&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",u),n&&"handDrawn"!==t.look&&y.selectAll("path").attr("style",n),s.attr("transform",`translate(${-a.width/2+2.5-(a.x-(a.left??0))}, ${-a.height/2+2.5-(a.y-(a.top??0))})`),ZL(t,y),t.intersect=function(e){return mN.polygon(t,g,e)},i}var cD=e(()=>{i(),CN(),RI(),EN(),mt(lD,"windowPane")});async function hD(e,t){var r,n=t,i=(n.alias&&(t.label=n.alias),"handDrawn"===t.look&&(A=(A=Ir().themeVariables).background,await hD(e,{...t,id:t.id+"-background",look:"default",cssStyles:["stroke: none","fill: "+A]})),Ir());t.useHtmlLabels=i.htmlLabels;let o=i.er?.diagramPadding??10,l=i.er?.entityPadding??6,a=t.cssStyles,{labelStyles:s,nodeStyles:c}=V(t);if(0===n.attributes.length&&t.label)return A={rx:0,ry:0,labelPaddingX:o,labelPaddingY:1.5*o,classes:""},yC(t.label,i)+2*A.labelPaddingXe+(t?.rowHeight??0),0)),Math.max(_.width+2*o,t?.width||0,A)),R=Math.max((z??0)+d.height,t?.height||0),M=-I/2,D=-R/2,G=(u.selectAll("g:not(:first-child)").each((e,t,r)=>{let n=H(r[t]),i=n.attr("transform"),a=0,s=0;i&&(r=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i))&&(a=parseFloat(r[1]),s=parseFloat(r[2]),n.attr("class").includes("attribute-name")?a+=m:n.attr("class").includes("attribute-keys")?a+=m+y:n.attr("class").includes("attribute-comment")&&(a+=m+y+v)),n.attr("transform",`translate(${M+o/2+a}, ${s+D+d.height+l/2})`)}),u.select(".name").attr("transform","translate("+-d.width/2+", "+(D+l/2)+")"),L.rectangle(M,D,I,R,N)),U=u.insert(()=>G,":first-child").attr("style",a.join("")),q=Ir().themeVariables,{rowEven:j,rowOdd:W,nodeBorder:Y}=q;g.push(0);for([F,C]of f.entries()){let e=(F+1)%2==0&&0!==C.yOffset,t=L.rectangle(M,d.height+D+C?.yOffset,I,C?.rowHeight,{...N,fill:e?j:W,stroke:Y});u.insert(()=>t,"g.label").attr("style",a.join("")).attr("class","row-rect-"+(e?"even":"odd"))}let O=L.line(M,d.height+D,I+M,d.height+D,N);u.insert(()=>O).attr("class","divider"),O=L.line(m+M,d.height+D,m+M,R+D,N),u.insert(()=>O).attr("class","divider"),b&&(O=L.line(m+y+M,d.height+D,m+y+M,R+D,N),u.insert(()=>O).attr("class","divider")),w&&(O=L.line(m+y+v+M,d.height+D,m+y+v+M,R+D,N),u.insert(()=>O).attr("class","divider"));for(S of g)O=L.line(M,d.height+D+S,I+M,d.height+D+S,N),u.insert(()=>O).attr("class","divider");return ZL(t,U),c&&"handDrawn"!==t.look&&(e=c.split(";")?.filter(e=>e.includes("stroke"))?.map(e=>""+e).join("; "),u.selectAll("path").attr("style",e??""),u.selectAll(".row-rect-even path").attr("style",c)),t.intersect=function(e){return mN.rect(t,e)},u}async function uD(e,t,r,n=0,i=0,a=[],s=""){if(e=e.insert("g").attr("class","label "+a.join(" ")).attr("transform",`translate(${n}, ${i})`).attr("style",s),t!==Bc(t)&&(t=(t=Bc(t)).replaceAll("<","<").replaceAll(">",">")),a=e.node().appendChild(await jL(e,t,{width:yC(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 Dc(r.htmlLabels)&&((n=a.children[0]).style.textAlign="start",i=H(a),o=n.getBoundingClientRect(),i.attr("width",o.width),i.attr("height",o.height)),o}var dD=e(()=>{i(),EN(),CN(),RI(),qR(),Nn(),WL(),eh(),Zw(),KC(),mt(hD,"erBox"),mt(uD,"addText")});async function pD(e,t,r,n,i=r.class.padding??12){let a=n?0:3,s=e.insert("g").attr("class",QL(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 n=""===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",n?(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 n.includes("font-weight: bolder")&&H(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 i.attr("transform","translate(0,"+(-c.height/(2*h)+r)+")"),c.height}var fD=e(()=>{Zw(),Nn(),i(),KC(),mu(),WL(),eh(),mt(pD,"textHelper"),mt(gD,"addText")});async function mD(t,r){let e=D(),s=e.class.padding??12,n=s,o=r.useHtmlLabels??Dc(e.htmlLabels)??!0,l=r,{shapeSvg:c,bbox:i}=(l.annotations=l.annotations??[],l.members=l.members??[],l.methods=l.methods??[],await pD(t,r,e,o,n)),{labelStyles:a,nodeStyles:h}=V(r),u=(r.labelStyle=a,r.cssStyles=l.styles||"",t=l.styles?.join(";")||h||"",r.cssStyles||(r.cssStyles=t.replaceAll("!important","").split(";")),0===l.members.length&&0===l.methods.length&&!e.class?.hideEmptyMembersBox),d=II.svg(c),p=wN(r,{}),g=("handDrawn"!==r.look&&(p.roughness=0,p.fillStyle="solid"),i.width),f=i.height,m=(0===l.members.length&&0===l.methods.length?f+=n:0v,":first-child");x.attr("class","basic label-container");var b=x.node().getBBox(),w=(c.selectAll(".text").each((e,t,r)=>{let n=(t=H(r[t])).attr("transform"),i=(n&&(r=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n))?parseFloat(r[2]):0)+y+s-(u?s:0===l.members.length&&0===l.methods.length?-s/2:0),a=(o||(i-=4),m);(t.attr("class").includes("label-group")||t.attr("class").includes("annotation-group"))&&(a=-t.node()?.getBBox().width/2||0,c.selectAll("text").each(function(e,t,r){"middle"===window.getComputedStyle(r[t]).textAnchor&&(a=0)})),t.attr("transform",`translate(${a}, ${i})`)}),c.select(".annotation-group").node().getBBox().height-(u?s/2:0)||0),k=c.select(".label-group").node().getBBox().height-(u?s/2:0)||0,T=c.select(".members-group").node().getBBox().height-(u?s/2:0)||0;if(0e).attr("class","divider").attr("style",t)}if(u||0e).attr("class","divider").attr("style",t)}return"handDrawn"!==l.look&&c.selectAll("path").attr("style",t),x.select(":nth-child(2)").attr("style",t),c.selectAll(".divider").select("path").attr("style",t),r.labelStyle?c.selectAll("span").attr("style",r.labelStyle):c.selectAll("span").attr("style",t),o||((w=(b=RegExp(/color\s*:\s*([^;]*)/)).exec(t))?(k=w[0].replace("color","fill"),c.selectAll("tspan").attr("style",k)):a&&(T=b.exec(a))&&(t=T[0].replace("color","fill"),c.selectAll("tspan").attr("style",t))),ZL(r,x),r.intersect=function(e){return mN.rect(r,e)},c}var yD=e(()=>{i(),mu(),Zw(),RI(),CN(),EN(),fD(),eh(),mt(mD,"classBox")});async function vD(e,t){var{labelStyles:r,nodeStyles:n}=V(t);t.labelStyle=r;let i=t,a=t,s="verifyMethod"in t,o=QL(t),l=e.insert("g").attr("class",o).attr("id",t.domId??t.id),c,h=c=s?await xD(l,`<<${i.type}>>`,0,t.labelStyle):await xD(l,"<<Element>>",0,t.labelStyle),u=await xD(l,i.name,h,t.labelStyle+"; font-weight: bold;"),d=(h+=u+20,s?(r=await xD(l,i.requirementId?"id: "+i.requirementId:"",h,t.labelStyle),h+=r,e=await xD(l,i.text?"Text: "+i.text:"",h,t.labelStyle),h+=e,r=await xD(l,i.risk?"Risk: "+i.risk:"",h,t.labelStyle),h+=r,await xD(l,i.verifyMethod?"Verification: "+i.verifyMethod:"",h,t.labelStyle)):(e=await xD(l,a.type?"Type: "+a.type:"",h,t.labelStyle),h+=e,await xD(l,a.docRef?"Doc Ref: "+a.docRef:"",h,t.labelStyle)),(l.node()?.getBBox().width??200)+20),p=(l.node()?.getBBox().height??200)+20,g=-d/2,f=-p/2,m=II.svg(l),y=wN(t,{}),v=("handDrawn"!==t.look&&(y.roughness=0,y.fillStyle="solid"),m.rectangle(g,f,d,p,y)),x=l.insert(()=>v,":first-child");if(x.attr("class","basic label-container").attr("style",n),l.selectAll(".label").each((e,t,r)=>{let n=H(r[t]),i=n.attr("transform"),a=0,s=0,o=(i&&(r=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(i))&&(a=parseFloat(r[1]),s=parseFloat(r[2])),s-p/2),l=10+g;0!==t&&1!==t||(l=a),n.attr("transform",`translate(${l}, ${20+o})`)}),h>c+u+20){let e=m.line(g,f+c+u+20,g+d,f+c+u+20,y);l.insert(()=>e).attr("style",n)}return ZL(t,x),t.intersect=function(e){return mN.rect(t,e)},l}async function xD(e,t,r,n=""){if(""===t)return 0;let i=e.insert("g").attr("class","label").attr("style",n),a=D(),s=a.htmlLabels??!0,o=await jL(i,xh(VC(t)),{width:yC(t,a)+50,classes:"markdown-node-label",useHtmlLabels:s,style:n},a),l;if(s)e=o.children[0],t=H(o),l=e.getBoundingClientRect(),t.attr("width",l.width),t.attr("height",l.height);else{var c;for(c of o.children[0].children)c.textContent=c.textContent.replaceAll(">",">").replaceAll("<","<"),n&&c.setAttribute("style",n);(l=o.getBBox()).height+=6}return i.attr("transform",`translate(${-l.width/2},${-l.height/2+r})`),l.height}var bD=e(()=>{i(),EN(),CN(),RI(),KC(),mu(),WL(),Zw(),mt(vD,"requirementBox"),mt(xD,"addText")});async function wD(e,n,{config:t}){var{labelStyles:i,nodeStyles:r}=V(n),i=(n.labelStyle=i||"",n.width);n.width=(n.width??200)-10;let{shapeSvg:a,bbox:s,label:o}=await XL(e,n,QL(n)),l=n.padding||10,c,h,u=("ticket"in n&&n.ticket&&t?.kanban?.ticketBaseUrl&&(c=t?.kanban?.ticketBaseUrl.replace("#TICKET#",n.ticket),h=a.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",c).attr("target","_blank")),{useHtmlLabels:n.useHtmlLabels,labelStyle:n.labelStyle||"",width:n.width,img:n.img,padding:n.padding||8,centerLabel:!1}),d,p;h?{label:d,bbox:p}=await KL(h,"ticket"in n&&n.ticket||"",u):{label:d,bbox:p}=await KL(a,"ticket"in n&&n.ticket||"",u);var{label:e,bbox:t}=await KL(a,"assigned"in n&&n.assigned||"",u),i=(n.width=i,n?.width||0),g=Math.max(p.height,t.height)/2,f=Math.max(s.height+20,n?.height||0)+g,m=-i/2,y=-f/2;o.attr("transform","translate("+(l-i/2)+", "+(-g-s.height/2)+")"),d.attr("transform","translate("+(l-i/2)+", "+(-g+s.height/2)+")"),e.attr("transform","translate("+(l+i/2-t.width-20)+", "+(-g+s.height/2)+")");let v,{rx:x,ry:b}=n,w=n.cssStyles;if("handDrawn"===n.look){let e=II.svg(a),t=wN(n,{}),r=x||b?e.path(IR(m,y,i,f,x||0),t):e.rectangle(m,y,i,f,t);(v=a.insert(()=>r,":first-child")).attr("class","basic label-container").attr("style",w||null)}else(v=a.insert("rect",":first-child")).attr("class","basic label-container __APA__").attr("style",r).attr("rx",x??5).attr("ry",b??5).attr("x",m).attr("y",y).attr("width",i).attr("height",f),(e="priority"in n&&n.priority)&&(t=a.append("line"),g=2+m,r=y+Math.floor((x??0)/2),i=y+f-Math.floor((x??0)/2),t.attr("x1",g).attr("y1",r).attr("x2",g).attr("y2",i).attr("stroke-width","4").attr("stroke",kD(e)));return ZL(n,v),n.height=f,n.intersect=function(e){return mN.rect(n,e)},a}var kD,TD=e(()=>{i(),EN(),MR(),CN(),RI(),kD=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(wD,"kanbanItem")});function ED(e){return e in _D}var CD,SD,_D,AD,LD,ND,ID,RD,MD,DD,OD,PD,BD,$D,FD,zD=e(()=>{DI(),BI(),GI(),qI(),WI(),VI(),ZI(),eR(),nR(),aR(),hR(),dR(),gR(),mR(),vR(),bR(),kR(),CR(),_R(),LR(),RR(),OR(),BR(),FR(),GR(),WR(),HR(),XR(),ZR(),rM(),iM(),sM(),lM(),hM(),pM(),fM(),kM(),EM(),SM(),AM(),NM(),RM(),DM(),PM(),$M(),zM(),UM(),jM(),YM(),ZM(),JM(),tD(),nD(),aD(),oD(),cD(),dD(),yD(),bD(),TD(),CD=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:LM},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:TM},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:IM},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:FM},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:sR},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:jI},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:uM},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:TR},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:VR},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:YR},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:QM},{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:zR},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:pR},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:WM},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:zI},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:CM},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:BM},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:OM},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:xR},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:SR},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:KI},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:JI},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:rR},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:KR},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:iD},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:wR},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:HM},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:QR},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:iR},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:uR},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:rD},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:lD},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:fR},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:eD},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:yR},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:_M},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:oM},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:aM},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:PI},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:HI},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:qM},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:GM},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:sD},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:gM},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:nM}],SD=mt(()=>{var e=[...Object.entries({state:MM,choice:UI,note:cM,rectWithTitle:wM,labelRect:jR,iconSquare:PR,iconCircle:NR,icon:AR,iconRounded:DR,imageSquare:$R,anchor:MI,kanbanItem:wD,classBox:mD,erBox:hD,requirementBox:vD}),...CD.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))];return Object.fromEntries(e)},"generateShapeMap"),_D=SD(),mt(ED,"isValidShape")}),GD=e(()=>{Zw(),I9(),mu(),t(),zD(),KC(),eh(),fu(),AD=class{constructor(){this.vertexCounter=0,this.config=D(),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=ch,this.setAccDescription=uh,this.setDiagramTitle=ph,this.getAccTitle=hh,this.getAccDescription=dh,this.getDiagramTitle=gh,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 L.sanitizeText(e,this.config)}lookUpDomId(e){for(var t of this.vertices.values())if(t.id===e)return t.domId;return e}addVertex(n,i,a,s,o,l,c={},e){if(n&&0!==n.trim().length){let r;var t;if(void 0!==e&&(t=e.includes(` +`)?e+` `:`{ -`+t+` -}`,r=IA(e,{schema:NA})),t=this.edges.find(t=>t.id===n))void 0!==(e=r)?.animate&&(t.animate=e.animate),void 0!==e?.animation&&(t.animation=e.animation);else{let t,e=this.vertices.get(n);if(void 0===e&&(e={id:n,labelType:"text",domId:"flowchart-"+n+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(n,e)),this.vertexCounter++,void 0!==i?(this.config=D(),t=this.sanitizeText(i.text.trim()),e.labelType=i.type,t.startsWith('"')&&t.endsWith('"')&&(t=t.substring(1,t.length-1)),e.text=t):void 0===e.text&&(e.text=n),void 0!==a&&(e.type=a),s?.forEach(t=>{e.styles.push(t)}),o?.forEach(t=>{e.classes.push(t)}),void 0!==l&&(e.dir=l),void 0===e.props?e.props=c:void 0!==c&&Object.assign(e.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(!_M(r.shape))throw new Error(`No such shape: ${r.shape}.`);e.type=r?.shape}r?.label&&(e.text=r?.label),r?.icon&&(e.icon=r?.icon,!r.label?.trim())&&e.text===n&&(e.text=""),r?.form&&(e.form=r?.form),r?.pos&&(e.pos=r?.pos),r?.img&&(e.img=r?.img,!r.label?.trim())&&e.text===n&&(e.text=""),r?.constraint&&(e.constraint=r.constraint),r.w&&(e.assetWidth=Number(r.w)),r.h&&(e.assetHeight=Number(r.h))}}}}addSingleLink(t,e,r,n){let i={start:t,end:e,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};if(M.info("abc78 Got edge...",i),void 0!==(t=r.text)&&(i.text=this.sanitizeText(t.text.trim()),i.text.startsWith('"')&&i.text.endsWith('"')&&(i.text=i.text.substring(1,i.text.length-1)),i.labelType=t.type),void 0!==r&&(i.type=r.type,i.stroke=r.stroke,i.length=10t.id===n)?(i.id=n,i.isUserDefinedId=!0):0===(e=this.edges.filter(t=>t.start===i.start&&t.end===i.end)).length?i.id=KE(i.start,i.end,{counter:0,prefix:"L"}):i.id=KE(i.start,i.end,{counter:e.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}. +`+e+` +}`,r=N9(t,{schema:L9})),e=this.edges.find(e=>e.id===n))void 0!==(t=r)?.animate&&(e.animate=t.animate),void 0!==t?.animation&&(e.animation=t.animation);else{let e,t=this.vertices.get(n);if(void 0===t&&(t={id:n,labelType:"text",domId:"flowchart-"+n+"-"+this.vertexCounter,styles:[],classes:[]},this.vertices.set(n,t)),this.vertexCounter++,void 0!==i?(this.config=D(),e=this.sanitizeText(i.text.trim()),t.labelType=i.type,e.startsWith('"')&&e.endsWith('"')&&(e=e.substring(1,e.length-1)),t.text=e):void 0===t.text&&(t.text=n),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(!ED(r.shape))throw new Error(`No such shape: ${r.shape}.`);t.type=r?.shape}r?.label&&(t.text=r?.label),r?.icon&&(t.icon=r?.icon,!r.label?.trim())&&t.text===n&&(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===n&&(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,n){let i={start:e,end:t,type:void 0,text:"",labelType:"text",classes:[],isUserDefinedId:!1,interpolate:this.edges.defaultInterpolate};if(M.info("abc78 Got edge...",i),void 0!==(e=r.text)&&(i.text=this.sanitizeText(e.text.trim()),i.text.startsWith('"')&&i.text.endsWith('"')&&(i.text=i.text.substring(1,i.text.length-1)),i.labelType=e.type),void 0!==r&&(i.type=r.type,i.stroke=r.stroke,i.length=10e.id===n)?(i.id=n,i.isUserDefinedId=!0):0===(t=this.edges.filter(e=>e.start===i.start&&e.end===i.end)).length?i.id=XC(i.start,i.end,{counter:0,prefix:"L"}):i.id=XC(i.start,i.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.`);M.info("Pushing edge..."),this.edges.push(i)}isLinkData(t){return null!==t&&"object"==typeof t&&"id"in t&&"string"==typeof t.id}addLink(t,e,r){var n,i=this.isLinkData(r)?r.id.replace("@",""):void 0;M.info("addLink",t,e,i);for(n of t)for(var a of e){var s=n===t[t.length-1],o=a===e[0];s&&o?this.addSingleLink(n,a,r,i):this.addSingleLink(n,a,r,void 0)}}updateLinkInterpolate(t,e){t.forEach(t=>{"default"===t?this.edges.defaultInterpolate=e:this.edges[t].interpolate=e})}updateLink(t,e){t.forEach(t=>{if("number"==typeof t&&t>=this.edges.length)throw new Error(`The index ${t} 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"===t?this.edges.defaultStyle=e:(this.edges[t].style=e,0<(this.edges[t]?.style?.length??0)&&!this.edges[t]?.style?.some(t=>t?.startsWith("fill"))&&this.edges[t]?.style?.push("fill:none"))})}addClass(t,e){let n=e.join().replace(/\\,/g,"§§§").replace(/,/g,";").replace(/§§§/g,",").split(";");t.split(",").forEach(t=>{let r=this.classes.get(t);void 0===r&&(r={id:t,styles:[],textStyles:[]},this.classes.set(t,r)),n?.forEach(t=>{var e;/color/.exec(t)&&(e=t.replace("fill","bgFill"),r.textStyles.push(e)),r.styles.push(t)})})}setDirection(t){this.direction=t,/.*/.exec(this.direction)&&(this.direction="LR"),/.*v/.exec(this.direction)&&(this.direction="TB"),"TD"===this.direction&&(this.direction="TB")}setClass(t,r){for(let e of t.split(",")){var n=this.vertices.get(e);n&&n.classes.push(r),(n=this.edges.find(t=>t.id===e))&&n.classes.push(r),(n=this.subGraphLookup.get(e))&&n.classes.push(r)}}setTooltip(t,e){if(void 0!==e){e=this.sanitizeText(e);for(var r of t.split(","))this.tooltips.set("gen-1"===this.version?this.lookUpDomId(r):r,e)}}setClickFun(t,e,n){let i=this.lookUpDomId(t);if("loose"===D().securityLevel&&void 0!==e){let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e{var t=document.querySelector(`[id="${i}"]`);null!==t&&t.addEventListener("click",()=>{HE.runFunc(e,...r)},!1)}))}}setLink(t,e,r){t.split(",").forEach(t=>{void 0!==(t=this.vertices.get(t))&&(t.link=HE.formatUrl(e,this.config),t.linkTarget=r)}),this.setClass(t,"clickable")}getTooltip(t){return this.tooltips.get(t)}setClickEvent(t,e,r){t.split(",").forEach(t=>{this.setClickFun(t,e,r)}),this.setClass(t,"clickable")}bindFunctions(e){this.funs.forEach(t=>{t(e)})}getDirection(){return this.direction?.trim()}getVertices(){return this.vertices}getEdges(){return this.edges}getClasses(){return this.classes}setupToolTips(t){let r=H(".mermaidTooltip");null===(r._groups||r)[0][0]&&(r=H("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),H(t).select("svg").selectAll("g.node").on("mouseover",t=>{var e=H(t.currentTarget);null!==e.attr("title")&&(t=t.currentTarget?.getBoundingClientRect(),r.transition().duration(200).style("opacity",".9"),r.text(e.attr("title")).style("left",window.scrollX+t.left+(t.right-t.left)/2+"px").style("top",window.scrollY+t.bottom+"px"),r.html(r.html().replace(/<br\/>/g,"
")),e.classed("hover",!0))}).on("mouseout",t=>{r.transition().duration(500).style("opacity",0),H(t.currentTarget).classed("hover",!1)})}clear(t="gen-2"){this.vertices=new Map,this.classes=new Map,this.edges=[],this.funs=[this.setupToolTips.bind(this)],this.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=t,this.config=D(),lh()}setGen(t){this.version=t||"gen-2"}defaultStyle(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"}addSubGraph(t,e,r){let n=t.text.trim(),i=r.text;t===r&&/\s/.exec(r.text)&&(n=void 0);var a=(t=me(t=>{let r={boolean:{},number:{},string:{}},n=[],i;return{nodeList:t.filter(function(t){var e=typeof t;return t.stmt&&"dir"===t.stmt?(i=t.value,!1):""!==t.trim()&&(e in r?!r[e].hasOwnProperty(t)&&(r[e][t]=!0):!n.includes(t)&&n.push(t))}),dir:i}},"uniq")(e.flat())).nodeList,e=t.dir,t=D().flowchart??{},e=e??(t.inheritDir?this.getDirection()??D().direction??void 0:void 0);if("gen-1"===this.version)for(let t=0;t":n="arrow_point",e.startsWith("<")&&(n="double_"+n,r=r.slice(1));break;case"o":n="arrow_circle",e.startsWith("o")&&(n="double_"+n,r=r.slice(1))}let i="normal",a=r.length-1;return r.startsWith("=")&&(i="thick"),r.startsWith("~")&&(i="invisible"),(t=this.countChar(".",r))&&(i="dotted",a=t),{type:n,stroke:i,length:a}}destructLink(t,e){if(t=this.destructEndLink(t),e){if((e=this.destructStartLink(e)).stroke!==t.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===e.type)e.type=t.type;else{if(e.type!==t.type)return{type:"INVALID",stroke:"INVALID"};e.type="double_"+e.type}return"double_arrow"===e.type&&(e.type="double_arrow_point"),e.length=t.length,e}return t}exists(t,e){for(var r of t)if(r.nodes.includes(e))return!0;return!1}makeUniq(r,n){let i=[];return r.nodes.forEach((t,e)=>{this.exists(n,t)||i.push(r.nodes[e])}),{nodes:i}}getTypeFromVertex(t){if(t.img)return"imageSquare";if(t.icon)return"circle"===t.form?"iconCircle":"square"===t.form?"iconSquare":"rounded"===t.form?"iconRounded":"icon";switch(t.type){case"square":case void 0:return"squareRect";case"round":return"roundedRect";case"ellipse":return"ellipse";default:return t.type}}findNode(t,e){return t.find(t=>t.id===e)}destructEdgeType(t){let e="none",r="arrow_point";switch(t){case"arrow_point":case"arrow_circle":case"arrow_cross":r=t;break;case"double_arrow_point":case"double_arrow_circle":case"double_arrow_cross":e=t.replace("double_",""),r=e}return{arrowTypeStart:e,arrowTypeEnd:r}}addNodeFromVertex(t,e,r,n,i,a){var r=r.get(t.id),n=n.get(t.id)??!1,s=this.findNode(e,t.id);s?(s.cssStyles=t.styles,s.cssCompiledStyles=this.getCompiledStyles(t.classes),s.cssClasses=t.classes.join(" ")):(s={id:t.id,label:t.text,labelStyle:"",parentId:r,padding:i.flowchart?.padding||8,cssStyles:t.styles,cssCompiledStyles:this.getCompiledStyles(["default","node",...t.classes]),cssClasses:"default "+t.classes.join(" "),dir:t.dir,domId:t.domId,look:a,link:t.link,linkTarget:t.linkTarget,tooltip:this.getTooltip(t.id),icon:t.icon,pos:t.pos,img:t.img,assetWidth:t.assetWidth,assetHeight:t.assetHeight,constraint:t.constraint},n?e.push({...s,isGroup:!0,shape:"rect"}):e.push({...s,isGroup:!1,shape:this.getTypeFromVertex(t)}))}getCompiledStyles(t){let e=[];for(var r of t)(r=this.classes.get(r))?.styles&&(e=[...e,...r.styles??[]].map(t=>t.trim())),r?.textStyles&&(e=[...e,...r.textStyles??[]].map(t=>t.trim()));return e}getData(){let a=D(),e=[],s=[],r=this.getSubGraphs(),n=new Map,i=new Map;for(let t=r.length-1;0<=t;t--){var o,l=r[t];0{this.addNodeFromVertex(t,e,n,i,a,a.look||"classic")});let h=this.getEdges();return h.forEach((t,e)=>{var{arrowTypeStart:r,arrowTypeEnd:n}=this.destructEdgeType(t.type),i=[...h.defaultStyle??[]],e=(t.style&&i.push(...t.style),{id:KE(t.start,t.end,{counter:e,prefix:"L"},t.id),isUserDefinedId:t.isUserDefinedId,start:t.start,end:t.end,type:t.type??"normal",label:t.text,labelpos:"c",thickness:t.stroke,minlen:t.length,classes:"invisible"===t?.stroke?"":"edge-thickness-normal edge-pattern-solid flowchart-link",arrowTypeStart:"invisible"===t?.stroke||"arrow_open"===t?.type?"none":r,arrowTypeEnd:"invisible"===t?.stroke||"arrow_open"===t?.type?"none":n,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(t.classes),labelStyle:i,style:i,pattern:t.stroke,look:a.look,animate:t.animate,animation:t.animation,curve:t.interpolate||this.edges.defaultInterpolate||a.flowchart?.curve});s.push(e)}),{nodes:e,edges:s,other:{},config:a}}defaultConfig(){return vh.flowchart}}}),jM=t(()=>{Q3(),IM=me((t,e)=>{let r;return"sandbox"===e&&(r=H("#i"+t)),H("sandbox"===e?r.nodes()[0].contentDocument.body:"body").select(`[id="${t}"]`)},"getDiagramElement")}),WM=t(()=>{RM=me(({flowchart:t})=>{var e=t?.subGraphTitleMargin?.top??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:t=t?.subGraphTitleMargin?.bottom??0,subGraphTitleTotalMargin:e+t}},"getSubGraphTitleMargins")}),YM=t(()=>{mu(),th(),e(),WM(),Q3(),DN(),Y9(),CL(),kR(),OI(),SL(),MM=me(async(n,i)=>{M.info("Creating subgraph rect for ",i.id,i);let t=D(),{themeVariables:e,handDrawnSeed:a}=t,{clusterBkg:s,clusterBorder:o}=e,{labelStyles:r,nodeStyles:l,borderStyles:c,backgroundStyles:h}=kL(i),u=n.insert("g").attr("class","cluster "+i.cssClasses).attr("id",i.id).attr("data-look",i.look),d=Dc(t.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await W9(p,i.label,{style:i.labelStyle,useHtmlLabels:d,isNode:!0}),f=g.getBBox();Dc(t.flowchart.htmlLabels)&&(n=g.children[0],m=H(g),f=n.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height));var n=i.width<=f.width+i.padding?f.width+i.padding:i.width,m=(i.width<=f.width+i.padding?i.diff=(n-i.width)/2-i.padding:i.diff=-i.padding,i.height),y=i.x-n/2,v=i.y-m/2;M.trace("Data ",i,JSON.stringify(i));let x;if("handDrawn"===i.look){let t=MN.svg(u),e=TL(i,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:a}),r=t.path(MI(y,v,n,m,0),e);(x=u.insert(()=>(M.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",c.join(";")),x.select("path").attr("style",h.join(";").replace("fill","stroke"))}else(x=u.insert("rect",":first-child")).attr("style",l).attr("rx",i.rx).attr("ry",i.ry).attr("x",y).attr("y",v).attr("width",n).attr("height",m);return y=RM(t).subGraphTitleTopMargin,p.attr("transform",`translate(${i.x-f.width/2}, ${i.y-i.height/2+y})`),r&&(v=p.select("span"))&&v.attr("style",r),n=x.node().getBBox(),i.offsetX=0,i.width=n.width,i.height=n.height,i.offsetY=f.height-i.padding/2,i.intersect=function(t){return mL(i,t)},{cluster:u,labelBBox:f}},"rect"),DM=me((t,e)=>{var r=(t=t.insert("g").attr("class","note-cluster").attr("id",e.id)).insert("rect",":first-child"),n=0*e.padding,i=n/2,i=(r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-i).attr("y",e.y-e.height/2-i).attr("width",e.width+n).attr("height",e.height+n).attr("fill","none"),r.node().getBBox());return e.width=i.width,e.height=i.height,e.intersect=function(t){return mL(e,t)},{cluster:t,labelBBox:{width:0,height:0}}},"noteGroup"),OM=me(async(i,a)=>{let t=D(),{themeVariables:e,handDrawnSeed:s}=t,{altBackground:o,compositeBackground:l,compositeTitleBackground:c,nodeBorder:h}=e,u=i.insert("g").attr("class",a.cssClasses).attr("id",a.id).attr("data-id",a.id).attr("data-look",a.look),r=u.insert("g",":first-child"),n=u.insert("g").attr("class","cluster-label"),d=u.append("rect"),p=n.node().appendChild(await wR(a.label,a.labelStyle,void 0,!0)),g=p.getBBox();Dc(t.flowchart.htmlLabels)&&(i=p.children[0],f=H(p),g=i.getBoundingClientRect(),f.attr("width",g.width),f.attr("height",g.height));var f=(i=0*a.padding)/2,m=(a.width<=g.width+a.padding?g.width+a.padding:a.width)+i,y=(a.width<=g.width+a.padding?a.diff=(m-a.width)/2-a.padding:a.diff=-a.padding,a.height+i),i=a.height+i-g.height-6,v=a.x-m/2,x=a.y-y/2;a.width=m;let b=a.y-a.height/2-f+g.height+2,w;if("handDrawn"===a.look){let t=a.cssClasses.includes("statediagram-cluster-alt"),e=MN.svg(u),r=a.rx||a.ry?e.path(MI(v,x,m,y,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:h,seed:s}):e.rectangle(v,x,m,y,{seed:s}),n=(w=u.insert(()=>r,":first-child"),e.rectangle(v,b,m,i,{fill:t?o:l,fillStyle:t?"hachure":"solid",stroke:h,seed:s}));w=u.insert(()=>r,":first-child"),d=u.insert(()=>n)}else(w=r.insert("rect",":first-child")).attr("class","outer").attr("x",v).attr("y",x).attr("width",m).attr("height",y).attr("data-look",a.look),d.attr("class","inner").attr("x",v).attr("y",b).attr("width",m).attr("height",i);return n.attr("transform",`translate(${a.x-g.width/2}, ${1+x-(Dc(t.flowchart.htmlLabels)?0:3)})`),f=w.node().getBBox(),a.height=f.height,a.offsetX=0,a.offsetY=g.height-a.padding/2,a.labelBBox=g,a.intersect=function(t){return mL(a,t)},{cluster:u,labelBBox:g}},"roundedWithTitle"),PM=me(async(n,i)=>{M.info("Creating subgraph rect for ",i.id,i);let t=D(),{themeVariables:e,handDrawnSeed:a}=t,{clusterBkg:s,clusterBorder:o}=e,{labelStyles:r,nodeStyles:l,borderStyles:c,backgroundStyles:h}=kL(i),u=n.insert("g").attr("class","cluster "+i.cssClasses).attr("id",i.id).attr("data-look",i.look),d=Dc(t.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await W9(p,i.label,{style:i.labelStyle,useHtmlLabels:d,isNode:!0,width:i.width}),f=g.getBBox();Dc(t.flowchart.htmlLabels)&&(n=g.children[0],m=H(g),f=n.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height));var n=i.width<=f.width+i.padding?f.width+i.padding:i.width,m=(i.width<=f.width+i.padding?i.diff=(n-i.width)/2-i.padding:i.diff=-i.padding,i.height),y=i.x-n/2,v=i.y-m/2;M.trace("Data ",i,JSON.stringify(i));let x;if("handDrawn"===i.look){let t=MN.svg(u),e=TL(i,{roughness:.7,fill:s,stroke:o,fillWeight:4,seed:a}),r=t.path(MI(y,v,n,m,i.rx),e);(x=u.insert(()=>(M.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",c.join(";")),x.select("path").attr("style",h.join(";").replace("fill","stroke"))}else(x=u.insert("rect",":first-child")).attr("style",l).attr("rx",i.rx).attr("ry",i.ry).attr("x",y).attr("y",v).attr("width",n).attr("height",m);return y=RM(t).subGraphTitleTopMargin,p.attr("transform",`translate(${i.x-f.width/2}, ${i.y-i.height/2+y})`),r&&(v=p.select("span"))&&v.attr("style",r),n=x.node().getBBox(),i.offsetX=0,i.width=n.width,i.height=n.height,i.offsetY=f.height-i.padding/2,i.intersect=function(t){return mL(i,t)},{cluster:u,labelBBox:f}},"kanbanSection"),BM=me((e,r)=>{var{themeVariables:n,handDrawnSeed:i}=D(),n=n.nodeBorder,t=(e=e.insert("g").attr("class",r.cssClasses).attr("id",r.id).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 t=MN.svg(e).rectangle(o,l,s,a,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:n,seed:i});c=e.insert(()=>t,":first-child")}else(c=t.insert("rect",":first-child")).attr("class","divider").attr("x",o).attr("y",l).attr("width",s).attr("height",a).attr("data-look",r.look);return n=c.node().getBBox(),r.height=n.height,r.offsetX=0,r.offsetY=0,r.intersect=function(t){return mL(r,t)},{cluster:e,labelBBox:{}}},"divider"),FM={rect:MM,squareRect:MM,roundedWithTitle:OM,noteGroup:DM,divider:BM,kanbanSection:PM},$M=new Map,zM=me(async(t,e)=>{var r=e.shape||"rect",r=await FM[r](t,e);return $M.set(e.id,r),r},"insertCluster"),GM=me(()=>{$M=new Map},"clear")});function HM(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=XM(t),e=XM(e);var[t,r]=[t.x,t.y],[e,n]=[e.x,e.y],e=e-t,t=n-r;return{angle:Math.atan(t/e),deltaX:e,deltaY:t}}var VM,XM,KM,ZM,QM,JM,tD=t(()=>{VM={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4},me(HM,"calculateDeltaAndAngle"),XM=me(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),KM=me(c=>({x:me(function(t,e,r){let n=0,i=XM(r[0]).x{e(),ZM=me((t,e,r,n,i,a)=>{e.arrowTypeStart&&JM(t,"start",e.arrowTypeStart,r,n,i,a),e.arrowTypeEnd&&JM(t,"end",e.arrowTypeEnd,r,n,i,a)},"addEdgeMarkers"),QM={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},JM=me((t,e,r,n,i,a,s)=>{let o=QM[r],l,c;o?(i=i+`_${a}-`+o.type+("start"===e?"Start":"End"),s&&""!==s.trim()?(a=i+"_"+s.replace(/[^\dA-Za-z]/g,"_"),document.getElementById(a)||(l=document.getElementById(i))&&((c=l.cloneNode(!0)).id=a,c.querySelectorAll("path, circle, line").forEach(t=>{t.setAttribute("stroke",s),o.fill&&t.setAttribute("fill",s)}),l.parentNode?.appendChild(c)),t.attr("marker-"+e,`url(${n}#${a})`)):t.attr("marker-"+e,`url(${n}#${i})`)):M.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function rD(t,e){D().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}function nD(e){var r=[],n=[];for(let t=1;t{mu(),th(),e(),Y9(),ZE(),tD(),WM(),Q3(),DN(),kR(),eD(),SL(),iD=new Map,aD=new Map,sD=me(()=>{iD.clear(),aD.clear()},"clear"),oD=me(t=>t?t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),lD=me(async(t,e)=>{var r,n=Dc(D().flowchart.htmlLabels),i=await W9(t,e.label,{style:oD(e.labelStyle),useHtmlLabels:n,addSvgBackground:!0,isNode:!1}),a=(M.info("abc82",e,e.labelType),t.insert("g").attr("class","edgeLabel")),s=a.insert("g").attr("class","label");s.node().appendChild(i);let o=i.getBBox();n&&(n=i.children[0],r=H(i),o=n.getBoundingClientRect(),r.attr("width",o.width),r.attr("height",o.height)),s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),iD.set(e.id,a),e.width=o.width,e.height=o.height;let l;return e.startLabelLeft&&(n=await wR(e.startLabelLeft,oD(e.labelStyle)),s=(r=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(n),a=n.getBBox(),s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),aD.get(e.id)||aD.set(e.id,{}),aD.get(e.id).startLeft=r,rD(l,e.startLabelLeft)),e.startLabelRight&&(n=await wR(e.startLabelRight,oD(e.labelStyle)),a=(s=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(n),a.node().appendChild(n),r=n.getBBox(),a.attr("transform","translate("+-r.width/2+", "+-r.height/2+")"),aD.get(e.id)||aD.set(e.id,{}),aD.get(e.id).startRight=s,rD(l,e.startLabelRight)),e.endLabelLeft&&(n=await wR(e.endLabelLeft,oD(e.labelStyle)),r=(a=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=r.node().appendChild(n),s=n.getBBox(),r.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),a.node().appendChild(n),aD.get(e.id)||aD.set(e.id,{}),aD.get(e.id).endLeft=a,rD(l,e.endLabelLeft)),e.endLabelRight&&(r=await wR(e.endLabelRight,oD(e.labelStyle)),n=(s=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=n.node().appendChild(r),a=r.getBBox(),n.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),s.node().appendChild(r),aD.get(e.id)||aD.set(e.id,{}),aD.get(e.id).endRight=s,rD(l,e.endLabelRight)),i},"insertEdgeLabel"),me(rD,"setTerminalWidth"),cD=me((n,i)=>{M.debug("Moving label abc88 ",n.id,n.label,iD.get(n.id),i);var a,s=i.updatedPath||i.originalPath,o=D(),o=RM(o).subGraphTitleTotalMargin;if(n.label){let t=iD.get(n.id),e=n.x,r=n.y;s&&(a=HE.calcLabelPosition(s),M.debug("Moving label "+n.label+" from (",e,",",r,") to (",a.x,",",a.y,") abc88"),i.updatedPath)&&(e=a.x,r=a.y),t.attr("transform",`translate(${e}, ${r+o/2})`)}if(n.startLabelLeft){let t=aD.get(n.id).startLeft,e=n.x,r=n.y;s&&(i=HE.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_left",s),e=i.x,r=i.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.startLabelRight){let t=aD.get(n.id).startRight,e=n.x,r=n.y;s&&(a=HE.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_right",s),e=a.x,r=a.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.endLabelLeft){let t=aD.get(n.id).endLeft,e=n.x,r=n.y;s&&(o=HE.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_left",s),e=o.x,r=o.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.endLabelRight){let t=aD.get(n.id).endRight,e=n.x,r=n.y;s&&(i=HE.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_right",s),e=i.x,r=i.y),t.attr("transform",`translate(${e}, ${r})`)}},"positionEdgeLabel"),hD=me((t,e)=>{var r=t.x,n=t.y,r=Math.abs(e.x-r),e=Math.abs(e.y-n);return t.width/2<=r||t.height/2<=e},"outsideNode"),uD=me((t,n,i)=>{M.debug(`intersection calc abc89: +You have to call mermaid.initialize.`);M.info("Pushing edge..."),this.edges.push(i)}isLinkData(e){return null!==e&&"object"==typeof e&&"id"in e&&"string"==typeof e.id}addLink(e,t,r){var n,i=this.isLinkData(r)?r.id.replace("@",""):void 0;M.info("addLink",e,t,i);for(n of e)for(var a of t){var s=n===e[e.length-1],o=a===t[0];s&&o?this.addSingleLink(n,a,r,i):this.addSingleLink(n,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 n=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)),n?.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,/.*/.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 n=this.vertices.get(t);n&&n.classes.push(r),(n=this.edges.find(e=>e.id===t))&&n.classes.push(r),(n=this.subGraphLookup.get(t))&&n.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(e,t,n){let i=this.lookUpDomId(e);if("loose"===D().securityLevel&&void 0!==t){let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t{var e=document.querySelector(`[id="${i}"]`);null!==e&&e.addEventListener("click",()=>{YC.runFunc(t,...r)},!1)}))}}setLink(e,t,r){e.split(",").forEach(e=>{void 0!==(e=this.vertices.get(e))&&(e.link=YC.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 r=H(".mermaidTooltip");null===(r._groups||r)[0][0]&&(r=H("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),H(e).select("svg").selectAll("g.node").on("mouseover",e=>{var t=H(e.currentTarget);null!==t.attr("title")&&(e=e.currentTarget?.getBoundingClientRect(),r.transition().duration(200).style("opacity",".9"),r.text(t.attr("title")).style("left",window.scrollX+e.left+(e.right-e.left)/2+"px").style("top",window.scrollY+e.bottom+"px"),r.html(r.html().replace(/<br\/>/g,"
")),t.classed("hover",!0))}).on("mouseout",e=>{r.transition().duration(500).style("opacity",0),H(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.subGraphs=[],this.subGraphLookup=new Map,this.subCount=0,this.tooltips=new Map,this.firstGraphFlag=!0,this.version=e,this.config=D(),lh()}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 n=e.text.trim(),i=r.text;e===r&&/\s/.exec(r.text)&&(n=void 0);var a=(e=mt(e=>{let r={boolean:{},number:{},string:{}},n=[],i;return{nodeList:e.filter(function(e){var t=typeof e;return e.stmt&&"dir"===e.stmt?(i=e.value,!1):""!==e.trim()&&(t in r?!r[t].hasOwnProperty(e)&&(r[t][e]=!0):!n.includes(e)&&n.push(e))}),dir:i}},"uniq")(t.flat())).nodeList,t=e.dir,e=D().flowchart??{},t=t??(e.inheritDir?this.getDirection()??D().direction??void 0:void 0);if("gen-1"===this.version)for(let e=0;e":n="arrow_point",t.startsWith("<")&&(n="double_"+n,r=r.slice(1));break;case"o":n="arrow_circle",t.startsWith("o")&&(n="double_"+n,r=r.slice(1))}let i="normal",a=r.length-1;return r.startsWith("=")&&(i="thick"),r.startsWith("~")&&(i="invisible"),(e=this.countChar(".",r))&&(i="dotted",a=e),{type:n,stroke:i,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,n){let i=[];return r.nodes.forEach((e,t)=>{this.exists(n,e)||i.push(r.nodes[t])}),{nodes:i}}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,n,i,a){var r=r.get(e.id),n=n.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,labelStyle:"",parentId:r,padding:i.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},n?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=D(),t=[],s=[],r=this.getSubGraphs(),n=new Map,i=new Map;for(let e=r.length-1;0<=e;e--){var o,l=r[e];0{this.addNodeFromVertex(e,t,n,i,a,a.look||"classic")});let h=this.getEdges();return h.forEach((e,t)=>{var{arrowTypeStart:r,arrowTypeEnd:n}=this.destructEdgeType(e.type),i=[...h.defaultStyle??[]],t=(e.style&&i.push(...e.style),{id:XC(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,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":n,arrowheadStyle:"fill: #333",cssCompiledStyles:this.getCompiledStyles(e.classes),labelStyle:i,style:i,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}}}),UD=e(()=>{Zw(),LD=mt((e,t)=>{let r;return"sandbox"===t&&(r=H("#i"+e)),H("sandbox"===t?r.nodes()[0].contentDocument.body:"body").select(`[id="${e}"]`)},"getDiagramElement")}),qD=e(()=>{ND=mt(({flowchart:e})=>{var t=e?.subGraphTitleMargin?.top??0;return{subGraphTitleTopMargin:t,subGraphTitleBottomMargin:e=e?.subGraphTitleMargin?.bottom??0,subGraphTitleTotalMargin:t+e}},"getSubGraphTitleMargins")}),jD=e(()=>{mu(),eh(),t(),qD(),Zw(),RI(),WL(),TN(),bM(),MR(),CN(),ID=mt(async(n,i)=>{M.info("Creating subgraph rect for ",i.id,i);let e=D(),{themeVariables:t,handDrawnSeed:a}=e,{clusterBkg:s,clusterBorder:o}=t,{labelStyles:r,nodeStyles:l,borderStyles:c,backgroundStyles:h}=V(i),u=n.insert("g").attr("class","cluster "+i.cssClasses).attr("id",i.id).attr("data-look",i.look),d=Dc(e.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await jL(p,i.label,{style:i.labelStyle,useHtmlLabels:d,isNode:!0}),f=g.getBBox();Dc(e.flowchart.htmlLabels)&&(n=g.children[0],m=H(g),f=n.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height));var n=i.width<=f.width+i.padding?f.width+i.padding:i.width,m=(i.width<=f.width+i.padding?i.diff=(n-i.width)/2-i.padding:i.diff=-i.padding,i.height),y=i.x-n/2,v=i.y-m/2;M.trace("Data ",i,JSON.stringify(i));let x;if("handDrawn"===i.look){let e=II.svg(u),t=wN(i,{roughness:.7,fill:s,stroke:o,fillWeight:3,seed:a}),r=e.path(IR(y,v,n,m,0),t);(x=u.insert(()=>(M.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",c.join(";")),x.select("path").attr("style",h.join(";").replace("fill","stroke"))}else(x=u.insert("rect",":first-child")).attr("style",l).attr("rx",i.rx).attr("ry",i.ry).attr("x",y).attr("y",v).attr("width",n).attr("height",m);return y=ND(e).subGraphTitleTopMargin,p.attr("transform",`translate(${i.x-f.width/2}, ${i.y-i.height/2+y})`),r&&(v=p.select("span"))&&v.attr("style",r),n=x.node().getBBox(),i.offsetX=0,i.width=n.width,i.height=n.height,i.offsetY=f.height-i.padding/2,i.intersect=function(e){return fN(i,e)},{cluster:u,labelBBox:f}},"rect"),RD=mt((e,t)=>{var r=(e=e.insert("g").attr("class","note-cluster").attr("id",t.id)).insert("rect",":first-child"),n=0*t.padding,i=n/2,i=(r.attr("rx",t.rx).attr("ry",t.ry).attr("x",t.x-t.width/2-i).attr("y",t.y-t.height/2-i).attr("width",t.width+n).attr("height",t.height+n).attr("fill","none"),r.node().getBBox());return t.width=i.width,t.height=i.height,t.intersect=function(e){return fN(t,e)},{cluster:e,labelBBox:{width:0,height:0}}},"noteGroup"),MD=mt(async(i,a)=>{let e=D(),{themeVariables:t,handDrawnSeed:s}=e,{altBackground:o,compositeBackground:l,compositeTitleBackground:c,nodeBorder:h}=t,u=i.insert("g").attr("class",a.cssClasses).attr("id",a.id).attr("data-id",a.id).attr("data-look",a.look),r=u.insert("g",":first-child"),n=u.insert("g").attr("class","cluster-label"),d=u.append("rect"),p=n.node().appendChild(await xM(a.label,a.labelStyle,void 0,!0)),g=p.getBBox();Dc(e.flowchart.htmlLabels)&&(i=p.children[0],f=H(p),g=i.getBoundingClientRect(),f.attr("width",g.width),f.attr("height",g.height));var f=(i=0*a.padding)/2,m=(a.width<=g.width+a.padding?g.width+a.padding:a.width)+i,y=(a.width<=g.width+a.padding?a.diff=(m-a.width)/2-a.padding:a.diff=-a.padding,a.height+i),i=a.height+i-g.height-6,v=a.x-m/2,x=a.y-y/2;a.width=m;let b=a.y-a.height/2-f+g.height+2,w;if("handDrawn"===a.look){let e=a.cssClasses.includes("statediagram-cluster-alt"),t=II.svg(u),r=a.rx||a.ry?t.path(IR(v,x,m,y,10),{roughness:.7,fill:c,fillStyle:"solid",stroke:h,seed:s}):t.rectangle(v,x,m,y,{seed:s}),n=(w=u.insert(()=>r,":first-child"),t.rectangle(v,b,m,i,{fill:e?o:l,fillStyle:e?"hachure":"solid",stroke:h,seed:s}));w=u.insert(()=>r,":first-child"),d=u.insert(()=>n)}else(w=r.insert("rect",":first-child")).attr("class","outer").attr("x",v).attr("y",x).attr("width",m).attr("height",y).attr("data-look",a.look),d.attr("class","inner").attr("x",v).attr("y",b).attr("width",m).attr("height",i);return n.attr("transform",`translate(${a.x-g.width/2}, ${1+x-(Dc(e.flowchart.htmlLabels)?0:3)})`),f=w.node().getBBox(),a.height=f.height,a.offsetX=0,a.offsetY=g.height-a.padding/2,a.labelBBox=g,a.intersect=function(e){return fN(a,e)},{cluster:u,labelBBox:g}},"roundedWithTitle"),DD=mt(async(n,i)=>{M.info("Creating subgraph rect for ",i.id,i);let e=D(),{themeVariables:t,handDrawnSeed:a}=e,{clusterBkg:s,clusterBorder:o}=t,{labelStyles:r,nodeStyles:l,borderStyles:c,backgroundStyles:h}=V(i),u=n.insert("g").attr("class","cluster "+i.cssClasses).attr("id",i.id).attr("data-look",i.look),d=Dc(e.flowchart.htmlLabels),p=u.insert("g").attr("class","cluster-label "),g=await jL(p,i.label,{style:i.labelStyle,useHtmlLabels:d,isNode:!0,width:i.width}),f=g.getBBox();Dc(e.flowchart.htmlLabels)&&(n=g.children[0],m=H(g),f=n.getBoundingClientRect(),m.attr("width",f.width),m.attr("height",f.height));var n=i.width<=f.width+i.padding?f.width+i.padding:i.width,m=(i.width<=f.width+i.padding?i.diff=(n-i.width)/2-i.padding:i.diff=-i.padding,i.height),y=i.x-n/2,v=i.y-m/2;M.trace("Data ",i,JSON.stringify(i));let x;if("handDrawn"===i.look){let e=II.svg(u),t=wN(i,{roughness:.7,fill:s,stroke:o,fillWeight:4,seed:a}),r=e.path(IR(y,v,n,m,i.rx),t);(x=u.insert(()=>(M.debug("Rough node insert CXC",r),r),":first-child")).select("path:nth-child(2)").attr("style",c.join(";")),x.select("path").attr("style",h.join(";").replace("fill","stroke"))}else(x=u.insert("rect",":first-child")).attr("style",l).attr("rx",i.rx).attr("ry",i.ry).attr("x",y).attr("y",v).attr("width",n).attr("height",m);return y=ND(e).subGraphTitleTopMargin,p.attr("transform",`translate(${i.x-f.width/2}, ${i.y-i.height/2+y})`),r&&(v=p.select("span"))&&v.attr("style",r),n=x.node().getBBox(),i.offsetX=0,i.width=n.width,i.height=n.height,i.offsetY=f.height-i.padding/2,i.intersect=function(e){return fN(i,e)},{cluster:u,labelBBox:f}},"kanbanSection"),OD=mt((t,r)=>{var{themeVariables:n,handDrawnSeed:i}=D(),n=n.nodeBorder,e=(t=t.insert("g").attr("class",r.cssClasses).attr("id",r.id).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=II.svg(t).rectangle(o,l,s,a,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:n,seed:i});c=t.insert(()=>e,":first-child")}else(c=e.insert("rect",":first-child")).attr("class","divider").attr("x",o).attr("y",l).attr("width",s).attr("height",a).attr("data-look",r.look);return n=c.node().getBBox(),r.height=n.height,r.offsetX=0,r.offsetY=0,r.intersect=function(e){return fN(r,e)},{cluster:t,labelBBox:{}}},"divider"),PD={rect:ID,squareRect:ID,roundedWithTitle:MD,noteGroup:RD,divider:OD,kanbanSection:DD},BD=new Map,$D=mt(async(e,t)=>{var r=t.shape||"rect",r=await PD[r](e,t);return BD.set(t.id,r),r},"insertCluster"),FD=mt(()=>{BD=new Map},"clear")});function WD(e,t){if(void 0===e||void 0===t)return{angle:0,deltaX:0,deltaY:0};e=HD(e),t=HD(t);var[e,r]=[e.x,e.y],[t,n]=[t.x,t.y],t=t-e,e=n-r;return{angle:Math.atan(e/t),deltaX:t,deltaY:e}}var YD,HD,VD,XD,KD,ZD,QD=e(()=>{YD={aggregation:18,extension:18,composition:18,dependency:6,lollipop:13.5,arrow_point:4},mt(WD,"calculateDeltaAndAngle"),HD=mt(e=>Array.isArray(e)?{x:e[0],y:e[1]}:e,"pointTransformer"),VD=mt(c=>({x:mt(function(e,t,r){let n=0,i=HD(r[0]).x{t(),XD=mt((e,t,r,n,i,a)=>{t.arrowTypeStart&&ZD(e,"start",t.arrowTypeStart,r,n,i,a),t.arrowTypeEnd&&ZD(e,"end",t.arrowTypeEnd,r,n,i,a)},"addEdgeMarkers"),KD={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},ZD=mt((e,t,r,n,i,a,s)=>{let o=KD[r],l,c;o?(i=i+`_${a}-`+o.type+("start"===t?"Start":"End"),s&&""!==s.trim()?(a=i+"_"+s.replace(/[^\dA-Za-z]/g,"_"),document.getElementById(a)||(l=document.getElementById(i))&&((c=l.cloneNode(!0)).id=a,c.querySelectorAll("path, circle, line").forEach(e=>{e.setAttribute("stroke",s),o.fill&&e.setAttribute("fill",s)}),l.parentNode?.appendChild(c)),e.attr("marker-"+t,`url(${n}#${a})`)):e.attr("marker-"+t,`url(${n}#${i})`)):M.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function eO(e,t){D().flowchart.htmlLabels&&e&&(e.style.width=9*t.length+"px",e.style.height="12px")}function tO(t){var r=[],n=[];for(let e=1;e{mu(),eh(),t(),WL(),KC(),QD(),qD(),Zw(),RI(),bM(),JD(),CN(),rO=new Map,nO=new Map,iO=mt(()=>{rO.clear(),nO.clear()},"clear"),aO=mt(e=>e?e.reduce((e,t)=>e+";"+t,""):"","getLabelStyles"),sO=mt(async(e,t)=>{var r,n=Dc(D().flowchart.htmlLabels),i=await jL(e,t.label,{style:aO(t.labelStyle),useHtmlLabels:n,addSvgBackground:!0,isNode:!1}),a=(M.info("abc82",t,t.labelType),e.insert("g").attr("class","edgeLabel")),s=a.insert("g").attr("class","label");s.node().appendChild(i);let o=i.getBBox();n&&(n=i.children[0],r=H(i),o=n.getBoundingClientRect(),r.attr("width",o.width),r.attr("height",o.height)),s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),rO.set(t.id,a),t.width=o.width,t.height=o.height;let l;return t.startLabelLeft&&(n=await xM(t.startLabelLeft,aO(t.labelStyle)),s=(r=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(n),a=n.getBBox(),s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),nO.get(t.id)||nO.set(t.id,{}),nO.get(t.id).startLeft=r,eO(l,t.startLabelLeft)),t.startLabelRight&&(n=await xM(t.startLabelRight,aO(t.labelStyle)),a=(s=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(n),a.node().appendChild(n),r=n.getBBox(),a.attr("transform","translate("+-r.width/2+", "+-r.height/2+")"),nO.get(t.id)||nO.set(t.id,{}),nO.get(t.id).startRight=s,eO(l,t.startLabelRight)),t.endLabelLeft&&(n=await xM(t.endLabelLeft,aO(t.labelStyle)),r=(a=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=r.node().appendChild(n),s=n.getBBox(),r.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),a.node().appendChild(n),nO.get(t.id)||nO.set(t.id,{}),nO.get(t.id).endLeft=a,eO(l,t.endLabelLeft)),t.endLabelRight&&(r=await xM(t.endLabelRight,aO(t.labelStyle)),n=(s=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=n.node().appendChild(r),a=r.getBBox(),n.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),s.node().appendChild(r),nO.get(t.id)||nO.set(t.id,{}),nO.get(t.id).endRight=s,eO(l,t.endLabelRight)),i},"insertEdgeLabel"),mt(eO,"setTerminalWidth"),oO=mt((n,i)=>{M.debug("Moving label abc88 ",n.id,n.label,rO.get(n.id),i);var a,s=i.updatedPath||i.originalPath,o=D(),o=ND(o).subGraphTitleTotalMargin;if(n.label){let e=rO.get(n.id),t=n.x,r=n.y;s&&(a=YC.calcLabelPosition(s),M.debug("Moving label "+n.label+" from (",t,",",r,") to (",a.x,",",a.y,") abc88"),i.updatedPath)&&(t=a.x,r=a.y),e.attr("transform",`translate(${t}, ${r+o/2})`)}if(n.startLabelLeft){let e=nO.get(n.id).startLeft,t=n.x,r=n.y;s&&(i=YC.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_left",s),t=i.x,r=i.y),e.attr("transform",`translate(${t}, ${r})`)}if(n.startLabelRight){let e=nO.get(n.id).startRight,t=n.x,r=n.y;s&&(a=YC.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_right",s),t=a.x,r=a.y),e.attr("transform",`translate(${t}, ${r})`)}if(n.endLabelLeft){let e=nO.get(n.id).endLeft,t=n.x,r=n.y;s&&(o=YC.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_left",s),t=o.x,r=o.y),e.attr("transform",`translate(${t}, ${r})`)}if(n.endLabelRight){let e=nO.get(n.id).endRight,t=n.x,r=n.y;s&&(i=YC.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_right",s),t=i.x,r=i.y),e.attr("transform",`translate(${t}, ${r})`)}},"positionEdgeLabel"),lO=mt((e,t)=>{var r=e.x,n=e.y,r=Math.abs(t.x-r),t=Math.abs(t.y-n);return e.width/2<=r||e.height/2<=t},"outsideNode"),cO=mt((e,n,i)=>{M.debug(`intersection calc abc89: outsidePoint: ${JSON.stringify(n)} insidePoint : ${JSON.stringify(i)} - node : x:${t.x} y:${t.y} w:${t.width} h:`+t.height);let a=t.x,e=t.y,r=Math.abs(a-i.x),s=t.width/2,o=i.xMath.abs(a-n.x)*l)return t=i.y{M.warn("abc88 cutPathAtIntersect",t,n);let i=[],a=t[0],s=!1;return t.forEach(t=>{if(M.info("abc88 checking point",t,n),hD(n,t)||s)M.warn("abc88 outside",t,a),a=t,s||i.push(t);else{let e=uD(n,a,t),r=(M.debug("abc88 inside",t,a,e),M.debug("abc88 intersection",e,n),!1);i.forEach(t=>{r=r||t.x===e.x&&t.y===e.y}),i.some(t=>t.x===e.x&&t.y===e.y)?M.warn("abc88 no intersect",e,i):i.push(e),s=!0}}),M.debug("returning points",i),i},"cutPathAtIntersect"),me(nD,"extractCornerPoints"),pD=me(function(t,e,r){var n=e.x-t.x,t=e.y-t.y,r=r/Math.sqrt(n*n+t*t);return{x:e.x-r*n,y:e.y-r*t}},"findAdjacentPoint"),gD=me(function(n){var t=nD(n).cornerPointPositions,i=[];for(let r=0;r!Number.isNaN(t.y)),r=gD(r);let g=d5;switch(g=W4,i.curve){case"linear":g=W4;break;case"basis":g=d5;break;case"cardinal":g=C5;break;case"bumpX":g=i5;break;case"bumpY":g=a5;break;case"catmullRom":g=O5;break;case"monotoneX":g=J5;break;case"monotoneY":g=t3;break;case"natural":g=i3;break;case"step":g=o3;break;case"stepAfter":g=c3;break;case"stepBefore":g=l3;break;default:g=d5}let{x:f,y:m}=KM(i),y=K4().x(f).y(m).curve(g),v;switch(i.thickness){case"normal":v="edge-thickness-normal";break;case"thick":v="edge-thickness-thick";break;case"invisible":v="edge-thickness-invisible";break;default:v="edge-thickness-normal"}switch(i.pattern){case"solid":v+=" edge-pattern-solid";break;case"dotted":v+=" edge-pattern-dotted";break;case"dashed":v+=" edge-pattern-dashed";break;default:v+=" edge-pattern-solid"}let x,b=y(r),w=Array.isArray(i.style)?i.style:i.style?[i.style]:[],k=w.find(t=>t?.startsWith("stroke:"));if("handDrawn"===i.look)a=MN.svg(n),Object.assign([],r),t=a.path(b,{roughness:.3,seed:o}),v+=" transition",r=(x=H(t).select("path").attr("id",i.id).attr("class"," "+v+(i.classes?" "+i.classes:"")).attr("style",w?w.reduce((t,e)=>t+";"+e,""):"")).attr("d"),x.attr("d",r),n.node().appendChild(x.node());else{let t=p.join(";"),e=w?w.reduce((t,e)=>t+e+";",""):"",r="";i.animate&&(r=" edge-animation-fast"),i.animation&&(r=" edge-animation-"+i.animation),a=t?t+";"+e+";":e,x=n.append("path").attr("d",b).attr("id",i.id).attr("class"," "+v+(i.classes?" "+i.classes:"")+(r??"")).attr("style",a),k=a.match(/stroke:([^;]+)/)?.[1]}let T="";return(D().flowchart.arrowMarkerAbsolute||D().state.arrowMarkerAbsolute)&&(T=Mc(!0)),M.info("arrowTypeStart",i.arrowTypeStart),M.info("arrowTypeEnd",i.arrowTypeEnd),ZM(x,i,T,s,e,k),t={},c&&(t.updatedPath=l),t.originalPath=i.points,t},"insertEdge")}),OD=t(()=>{e(),mD=me((e,t,r,n)=>{t.forEach(t=>{RD[t](e,r,n)})},"insertMarkers"),yD=me((t,e,r)=>{M.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),vD=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),xD=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),bD=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),wD=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),kD=me((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),TD=me((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),ED=me((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),CD=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),_D=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),SD=me((t,e,r)=>{var n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18"),(n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),AD=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),LD=me((t,e,r)=>{var n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),(n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),ND=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d",`M0,0 + node : x:${e.x} y:${e.y} w:${e.width} h:`+e.height);let a=e.x,t=e.y,r=Math.abs(a-i.x),s=e.width/2,o=i.xMath.abs(a-n.x)*l)return e=i.y{M.warn("abc88 cutPathAtIntersect",e,n);let i=[],a=e[0],s=!1;return e.forEach(e=>{if(M.info("abc88 checking point",e,n),lO(n,e)||s)M.warn("abc88 outside",e,a),a=e,s||i.push(e);else{let t=cO(n,a,e),r=(M.debug("abc88 inside",e,a,t),M.debug("abc88 intersection",t,n),!1);i.forEach(e=>{r=r||e.x===t.x&&e.y===t.y}),i.some(e=>e.x===t.x&&e.y===t.y)?M.warn("abc88 no intersect",t,i):i.push(t),s=!0}}),M.debug("returning points",i),i},"cutPathAtIntersect"),mt(tO,"extractCornerPoints"),uO=mt(function(e,t,r){var n=t.x-e.x,e=t.y-e.y,r=r/Math.sqrt(n*n+e*e);return{x:t.x-r*n,y:t.y-r*e}},"findAdjacentPoint"),dO=mt(function(n){var e=tO(n).cornerPointPositions,i=[];for(let r=0;r!Number.isNaN(e.y)),r=dO(r);let g=u3;switch(g=j5,i.curve){case"linear":g=j5;break;case"basis":g=u3;break;case"cardinal":g=E3;break;case"bumpX":g=n3;break;case"bumpY":g=i3;break;case"catmullRom":g=D3;break;case"monotoneX":g=Q3;break;case"monotoneY":g=J3;break;case"natural":g=nw;break;case"step":g=sw;break;case"stepAfter":g=lw;break;case"stepBefore":g=ow;break;default:g=u3}let{x:f,y:m}=VD(i),y=X5().x(f).y(m).curve(g),v;switch(i.thickness){case"normal":v="edge-thickness-normal";break;case"thick":v="edge-thickness-thick";break;case"invisible":v="edge-thickness-invisible";break;default:v="edge-thickness-normal"}switch(i.pattern){case"solid":v+=" edge-pattern-solid";break;case"dotted":v+=" edge-pattern-dotted";break;case"dashed":v+=" edge-pattern-dashed";break;default:v+=" edge-pattern-solid"}let x,b=y(r),w=Array.isArray(i.style)?i.style:i.style?[i.style]:[],k=w.find(e=>e?.startsWith("stroke:"));if("handDrawn"===i.look)a=II.svg(n),Object.assign([],r),e=a.path(b,{roughness:.3,seed:o}),v+=" transition",r=(x=H(e).select("path").attr("id",i.id).attr("class"," "+v+(i.classes?" "+i.classes:"")).attr("style",w?w.reduce((e,t)=>e+";"+t,""):"")).attr("d"),x.attr("d",r),n.node().appendChild(x.node());else{let e=p.join(";"),t=w?w.reduce((e,t)=>e+t+";",""):"",r="";i.animate&&(r=" edge-animation-fast"),i.animation&&(r=" edge-animation-"+i.animation),a=e?e+";"+t+";":t,x=n.append("path").attr("d",b).attr("id",i.id).attr("class"," "+v+(i.classes?" "+i.classes:"")+(r??"")).attr("style",a),k=a.match(/stroke:([^;]+)/)?.[1]}let T="";return(D().flowchart.arrowMarkerAbsolute||D().state.arrowMarkerAbsolute)&&(T=Mc(!0)),M.info("arrowTypeStart",i.arrowTypeStart),M.info("arrowTypeEnd",i.arrowTypeEnd),XD(x,i,T,s,t,k),e={},c&&(e.updatedPath=l),e.originalPath=i.points,e},"insertEdge")}),MO=e(()=>{t(),gO=mt((t,e,r,n)=>{e.forEach(e=>{NO[e](t,r,n)})},"insertMarkers"),fO=mt((e,t,r)=>{M.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"),mO=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"),yO=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"),vO=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"),xO=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"),bO=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")},"point"),wO=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"),kO=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"),TO=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"),EO=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"),CO=mt((e,t,r)=>{var n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrOneStart").attr("class","marker zeroOrOne "+t).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("d","M9,0 L9,18"),(n=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),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),SO=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"),_O=mt((e,t,r)=>{var n=e.append("defs").append("marker").attr("id",r+"_"+t+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+t).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),(n=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),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),AO=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"),ID=me((t,e,r)=>{(t=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g")).append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),t.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),t.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),RD={extension:yD,composition:vD,aggregation:xD,dependency:bD,lollipop:wD,point:kD,circle:TD,cross:ED,barb:CD,only_one:_D,zero_or_one:SD,one_or_more:AD,zero_or_more:LD,requirement_arrow:ND,requirement_contains:ID},MD=mD});async function PD(e,r,n){let i,a;"rect"===r.shape&&(r.rx&&r.ry?r.shape="roundedRect":r.shape="squareRect");var s=r.shape?LM[r.shape]:void 0;if(!s)throw new Error(`No such shape: ${r.shape}. Please check your syntax.`);if(r.link){let t;"sandbox"===n.config.securityLevel?t="_top":r.linkTarget&&(t=r.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",r.link).attr("target",t??null),a=await s(i,r,n)}else a=await s(e,r,n),i=a;return r.tooltip&&a.attr("title",r.tooltip),BD.set(r.id,i),r.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}var BD,FD,$D,zD,GD,UD=t(()=>{e(),UM(),BD=new Map,me(PD,"insertNode"),FD=me((t,e)=>{BD.set(e.id,t)},"setNodeElem"),$D=me(()=>{BD.clear()},"clear"),zD=me(t=>{var e=BD.get(t.id),r=(M.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")"),t.diff||0);return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode")}),qD=t(()=>{Nn(),th(),e(),YM(),DD(),OD(),UD(),i(),ZE(),GD={common:L,getConfig:Ir,insertCluster:zM,insertEdge:fD,insertEdgeLabel:lD,insertMarkers:MD,insertNode:PD,interpolateToCurve:cE,labelHelper:K9,log:M,positionEdgeLabel:cD}});function jD(t){return"symbol"==typeof t||UT(t)&&"[object Symbol]"==bw(t)}var WD,YD=t(()=>{ww(),qT(),me(jD,"isSymbol"),WD=jD});function HD(t,e){for(var r=-1,n=null==t?0:t.length,i=Array(n);++r{me(HD,"arrayMap"),VD=HD});function KD(t){var e;return"string"==typeof t?t:ZT(t)?VD(t,KD)+"":WD(t)?JD?JD.call(t):"":"0"==(e=t+"")&&1/t==-ZD?"-0":e}var ZD,QD,JD,tO,eO=t(()=>{aw(),XD(),t7(),YD(),ZD=1/0,QD=H3?H3.prototype:void 0,JD=QD?QD.toString:void 0,me(KD,"baseToString"),tO=KD});function rO(t){for(var e=t.length;e--&&nO.test(t.charAt(e)););return e}var nO,iO,aO=t(()=>{nO=/\s/,me(rO,"trimmedEndIndex"),iO=rO});function sO(t){return t&&t.slice(0,iO(t)+1).replace(oO,"")}var oO,lO,cO=t(()=>{aO(),oO=/^\s+/,me(sO,"baseTrim"),lO=sO});function hO(t){if("number"==typeof t)return t;if(WD(t))return uO;if(Tw(t)&&(e="function"==typeof t.valueOf?t.valueOf():t,t=Tw(e)?e+"":e),"string"!=typeof t)return 0===t?t:+t;t=lO(t);var e=pO.test(t);return e||gO.test(t)?fO(t.slice(2),e?2:8):dO.test(t)?uO:+t}var uO,dO,pO,gO,fO,mO,yO=t(()=>{cO(),Ew(),YD(),uO=NaN,dO=/^[-+]0x[0-9a-f]+$/i,pO=/^0b[01]+$/i,gO=/^0o[0-7]+$/i,fO=parseInt,me(hO,"toNumber"),mO=hO});function vO(t){return t?(t=mO(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}var xO,bO=t(()=>{yO(),me(vO,"toFinite"),xO=vO});function wO(t){var e=(t=xO(t))%1;return t==t?e?t-e:t:0}var kO,TO,EO,CO=t(()=>{bO(),me(wO,"toInteger"),kO=wO}),_O=t(()=>{e6(),iw(),TO=Qw(W3,"WeakMap"),EO=TO});function SO(){}var AO,LO=t(()=>{me(SO,"noop"),AO=SO});function NO(t,e){for(var r=-1,n=null==t?0:t.length;++r{me(NO,"arrayEach"),IO=NO});function MO(t,e,r,n){for(var i=t.length,a=r+(n?1:-1);n?a--:++a{me(MO,"baseFindIndex"),DO=MO});function PO(t){return t!=t}var BO,FO=t(()=>{me(PO,"baseIsNaN"),BO=PO});function $O(t,e,r){for(var n=r-1,i=t.length;++n{me($O,"strictIndexOf"),zO=$O});function UO(t,e,r){return e==e?zO(t,e,r):DO(t,BO,r)}var qO,jO=t(()=>{OO(),FO(),GO(),me(UO,"baseIndexOf"),qO=UO});function WO(t,e){return!(null==t||!t.length)&&-1{jO(),me(WO,"arrayIncludes"),YO=WO}),KO=t(()=>{RT(),HO=LT(Object.keys,Object),VO=HO});function ZO(t){if(!PT(t))return VO(t);var e,r=[];for(e in Object(t))JO.call(t,e)&&"constructor"!=e&&r.push(e);return r}var QO,JO,tP,eP=t(()=>{BT(),KO(),QO=Object.prototype,JO=QO.hasOwnProperty,me(ZO,"baseKeys"),tP=ZO});function rP(t){return(a7(t)?o8:tP)(t)}var nP,iP,aP,sP,oP=t(()=>{l8(),eP(),s7(),me(rP,"keys"),nP=rP}),lP=t(()=>{H7(),K7(),oE(),s7(),BT(),oP(),aP=Object.prototype,iP=aP.hasOwnProperty,aP=iE(function(t,e){if(PT(e)||a7(e))X7(e,nP(e),t);else for(var r in e)iP.call(e,r)&&Y7(t,r,e[r])}),sP=aP});function cP(t,e){var r;return!ZT(t)&&(!("number"!=(r=typeof t)&&"symbol"!=r&&"boolean"!=r&&null!=t&&!WD(t))||uP.test(t)||!hP.test(t)||null!=e&&t in Object(e))}var hP,uP,dP,pP=t(()=>{t7(),YD(),hP=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,uP=/^\w*$/,me(cP,"isKey"),dP=cP});function gP(t){var e=(t=_k(t,function(t){return 500===e.size&&e.clear(),t})).cache;return t}var fP,mP,yP,vP,xP,bP=t(()=>{Sk(),me(gP,"memoizeCapped"),fP=gP}),wP=t(()=>{bP(),mP=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,yP=/\\(\\)?/g,vP=fP(function(t){var i=[];return 46===t.charCodeAt(0)&&i.push(""),t.replace(mP,function(t,e,r,n){i.push(r?n.replace(yP,"$1"):e||t)}),i}),xP=vP});function kP(t){return null==t?"":tO(t)}var TP,EP=t(()=>{eO(),me(kP,"toString"),TP=kP});function CP(t,e){return ZT(t)?t:dP(t,e)?[t]:xP(TP(t))}var _P,SP=t(()=>{t7(),pP(),wP(),EP(),me(CP,"castPath"),_P=CP});function AP(t){var e;return"string"==typeof t||WD(t)?t:"0"==(e=t+"")&&1/t==-1/0?"-0":e}var LP,NP=t(()=>{YD(),me(AP,"toKey"),LP=AP});function IP(t,e){for(var r=0,n=(e=_P(e,t)).length;null!=t&&r{SP(),NP(),me(IP,"baseGet"),RP=IP});function DP(t,e,r){return void 0===(t=null==t?void 0:RP(t,e))?r:t}var OP,PP=t(()=>{MP(),me(DP,"get"),OP=DP});function BP(t,e){for(var r=-1,n=e.length,i=t.length;++r{me(BP,"arrayPush"),FP=BP});function zP(t){return ZT(t)||XT(t)||!!(GP&&t&&t[GP])}var GP,UP,qP=t(()=>{aw(),JT(),t7(),GP=H3?H3.isConcatSpreadable:void 0,me(zP,"isFlattenable"),UP=zP});function jP(t,e,r,n,i){var a=-1,s=t.length;for(r=r||UP,i=i||[];++a{$P(),qP(),me(jP,"baseFlatten"),WP=jP});function HP(t){return null!=t&&t.length?WP(t,1):[]}var VP,XP=t(()=>{YP(),me(HP,"flatten"),VP=HP});function KP(t){return V8(B8(t,void 0,VP),t+"")}var ZP,QP=t(()=>{XP(),F8(),K8(),me(KP,"flatRest"),ZP=KP});function JP(t,e,r){var n=-1,i=t.length;(r=i>>0,e>>>=0;for(var a=Array(i);++n{me(JP,"baseSlice"),tB=JP});function rB(t){return nB.test(t)}var nB,iB,aB=t(()=>{nB=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),me(rB,"hasUnicode"),iB=rB});function sB(t,e,r,n){var i=-1,a=null==t?0:t.length;for(n&&a&&(r=t[++i]);++i{me(sB,"arrayReduce"),oB=sB});function cB(t,e){return t&&X7(e,nP(e),t)}var hB,uB=t(()=>{K7(),oP(),me(cB,"baseAssign"),hB=cB});function dB(t,e){return t&&X7(e,v8(e),t)}var pB,gB=t(()=>{K7(),x8(),me(dB,"baseAssignIn"),pB=dB});function fB(t,e){for(var r=-1,n=null==t?0:t.length,i=0,a=[];++r{me(fB,"arrayFilter"),mB=fB});function vB(){return[]}var xB,bB,wB,kB,TB,EB=t(()=>{me(vB,"stubArray"),xB=vB}),CB=t(()=>{yB(),EB(),bB=Object.prototype,wB=bB.propertyIsEnumerable,TB=(kB=Object.getOwnPropertySymbols)?function(e){return null==e?[]:(e=Object(e),mB(kB(e),function(t){return wB.call(e,t)}))}:xB});function _B(t,e){return X7(t,TB(t),e)}var SB,AB,LB,NB=t(()=>{K7(),CB(),me(_B,"copySymbols"),SB=_B}),IB=t(()=>{$P(),MT(),CB(),EB(),AB=Object.getOwnPropertySymbols,LB=AB?function(t){for(var e=[];t;)FP(e,TB(t)),t=IT(t);return e}:xB});function RB(t,e){return X7(t,LB(t),e)}var MB,DB=t(()=>{K7(),IB(),me(RB,"copySymbolsIn"),MB=RB});function OB(t,e,r){return e=e(t),ZT(t)?e:FP(e,r(t))}var PB,BB=t(()=>{$P(),t7(),me(OB,"baseGetAllKeys"),PB=OB});function FB(t){return PB(t,nP,TB)}var $B,zB=t(()=>{BB(),CB(),oP(),me(FB,"getAllKeys"),$B=FB});function GB(t){return PB(t,v8,LB)}var UB,qB,jB,WB,YB,HB,VB,XB,KB,ZB,QB,JB,tF,eF,rF,nF,iF,aF,sF,oF=t(()=>{BB(),IB(),x8(),me(GB,"getAllKeysIn"),UB=GB}),lF=t(()=>{e6(),iw(),qB=Qw(W3,"DataView"),jB=qB}),cF=t(()=>{e6(),iw(),WB=Qw(W3,"Promise"),YB=WB}),hF=t(()=>{e6(),iw(),HB=Qw(W3,"Set"),VB=HB}),uF=t(()=>{lF(),J6(),cF(),hF(),_O(),ww(),$w(),XB="[object Map]",KB="[object Promise]",ZB="[object Set]",QB="[object WeakMap]",JB="[object DataView]",tF=Fw(jB),eF=Fw(Z6),rF=Fw(YB),nF=Fw(VB),iF=Fw(EO),aF=bw,(jB&&aF(new jB(new ArrayBuffer(1)))!=JB||Z6&&aF(new Z6)!=XB||YB&&aF(YB.resolve())!=KB||VB&&aF(new VB)!=ZB||EO&&aF(new EO)!=QB)&&(aF=me(function(t){var e=bw(t);if(t=(t="[object Object]"==e?t.constructor:void 0)?Fw(t):"")switch(t){case tF:return JB;case eF:return XB;case rF:return KB;case nF:return ZB;case iF:return QB}return e},"getTag")),sF=aF});function dF(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&gF.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var pF,gF,fF,mF=t(()=>{pF=Object.prototype,gF=pF.hasOwnProperty,me(dF,"initCloneArray"),fF=dF});function yF(t,e){return e=e?yT(t.buffer):t.buffer,new t.constructor(e,t.byteOffset,t.byteLength)}var vF,xF=t(()=>{vT(),me(yF,"cloneDataView"),vF=yF});function bF(t){var e=new t.constructor(t.source,wF.exec(t));return e.lastIndex=t.lastIndex,e}var wF,kF,TF=t(()=>{wF=/\w*$/,me(bF,"cloneRegExp"),kF=bF});function EF(t){return _F?Object(_F.call(t)):{}}var CF,_F,SF,AF=t(()=>{aw(),CF=H3?H3.prototype:void 0,_F=CF?CF.valueOf:void 0,me(EF,"cloneSymbol"),SF=EF});function LF(t,e,r){var n=t.constructor;switch(e){case"[object ArrayBuffer]":return yT(t);case"[object Boolean]":case"[object Date]":return new n(+t);case"[object DataView]":return vF(t,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 bT(t,r);case"[object Map]":return new n;case"[object Number]":case"[object String]":return new n(t);case"[object RegExp]":return kF(t);case"[object Set]":return new n;case"[object Symbol]":return SF(t)}}var NF,IF=t(()=>{vT(),xF(),TF(),AF(),wT(),me(LF,"initCloneByTag"),NF=LF});function RF(t){return UT(t)&&"[object Map]"==sF(t)}var MF,DF,OF,PF=t(()=>{uF(),qT(),me(RF,"baseIsMap"),MF=RF}),BF=t(()=>{PF(),B7(),F7(),DF=(DF=D7&&D7.isMap)?N7(DF):MF,OF=DF});function FF(t){return UT(t)&&"[object Set]"==sF(t)}var $F,zF,GF,UF=t(()=>{uF(),qT(),me(FF,"baseIsSet"),$F=FF}),qF=t(()=>{UF(),B7(),F7(),zF=(zF=D7&&D7.isSet)?N7(zF):$F,GF=zF});function jF(r,n,i,t,e,a){var s,o=n&WF,l=n&YF,c=n&HF;if(void 0===(s=i?e?i(r,t,e,a):i(r):s)){if(!Tw(r))return r;if(t=ZT(r)){if(s=fF(r),!o)return TT(r,s)}else{var h=sF(r),u=h==XF||h==KF;if(g7(r))return uT(r,o);if(h==ZF||h==VF||u&&!e){if(s=l||u?{}:$T(r),!o)return l?MB(r,pB(s,r)):SB(r,hB(s,r))}else{if(!QF[h])return e?r:{};s=NF(r,h,o)}}if(u=(a=a||new jk).get(r))return u;a.set(r,s),GF(r)?r.forEach(function(t){s.add(jF(t,n,i,t,r,a))}):OF(r)&&r.forEach(function(t,e){s.set(e,jF(t,n,i,e,r,a))});var d=t?void 0:(c?l?UB:$B:l?v8:nP)(r);IO(d||r,function(t,e){d&&(t=r[e=t]),Y7(s,e,jF(t,n,i,e,r,a))})}return s}var WF,YF,HF,VF,XF,KF,ZF,QF,JF,t$=t(()=>{Hk(),RO(),H7(),uB(),gB(),gT(),_T(),NB(),DB(),zB(),oF(),uF(),mF(),IF(),zT(),t7(),m7(),BF(),Ew(),qF(),oP(),x8(),WF=1,YF=2,HF=4,XF="[object Function]",KF="[object GeneratorFunction]",ZF="[object Object]",(QF={})[VF="[object Arguments]"]=QF["[object Array]"]=QF["[object ArrayBuffer]"]=QF["[object DataView]"]=QF["[object Boolean]"]=QF["[object Date]"]=QF["[object Float32Array]"]=QF["[object Float64Array]"]=QF["[object Int8Array]"]=QF["[object Int16Array]"]=QF["[object Int32Array]"]=QF["[object Map]"]=QF["[object Number]"]=QF[ZF]=QF["[object RegExp]"]=QF["[object Set]"]=QF["[object String]"]=QF["[object Symbol]"]=QF["[object Uint8Array]"]=QF["[object Uint8ClampedArray]"]=QF["[object Uint16Array]"]=QF["[object Uint32Array]"]=!0,QF["[object Error]"]=QF[XF]=QF["[object WeakMap]"]=!1,me(jF,"baseClone"),JF=jF});function e$(t){return JF(t,4)}var r$,n$=t(()=>{t$(),me(e$,"clone"),r$=e$});function i$(t){return JF(t,5)}var a$,s$=t(()=>{t$(),me(i$,"cloneDeep"),a$=i$});function o$(t){for(var e=-1,r=null==t?0:t.length,n=0,i=[];++e{me(o$,"compact"),l$=o$});function h$(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}var u$,d$=t(()=>{me(h$,"setCacheAdd"),u$=h$});function p$(t){return this.__data__.has(t)}var g$,f$=t(()=>{me(p$,"setCacheHas"),g$=p$});function m$(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new kk;++e{Tk(),d$(),f$(),me(m$,"SetCache"),m$.prototype.add=m$.prototype.push=u$,m$.prototype.has=g$,y$=m$});function x$(t,e){for(var r=-1,n=null==t?0:t.length;++r{me(x$,"arraySome"),b$=x$});function k$(t,e){return t.has(e)}var T$,E$=t(()=>{me(k$,"cacheHas"),T$=k$});function C$(t,e,r,n,i,a){var s=1&r,o=t.length;if(o!=(l=e.length)&&!(s&&o{v$(),w$(),E$(),me(C$,"equalArrays"),_$=C$});function A$(t){var r=-1,n=Array(t.size);return t.forEach(function(t,e){n[++r]=[e,t]}),n}var L$,N$=t(()=>{me(A$,"mapToArray"),L$=A$});function I$(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}var R$,M$=t(()=>{me(I$,"setToArray"),R$=I$});function D$(t,e,r,n,i,a,s){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!a(new pT(t),new pT(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return L6(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var o=L$;case"[object Set]":var l,o=o||R$;return!!(t.size==e.size||1&n)&&((l=s.get(t))?l==e:(n|=2,s.set(t,e),l=_$(o(t),o(e),n,i,a,s),s.delete(t),l));case"[object Symbol]":if(P$)return P$.call(t)==P$.call(e)}return!1}var O$,P$,B$,F$=t(()=>{aw(),fT(),N6(),S$(),N$(),M$(),O$=H3?H3.prototype:void 0,P$=O$?O$.valueOf:void 0,me(D$,"equalByTag"),B$=D$});function $$(t,e,r,n,i,a){var s=1&r,o=$B(t),l=o.length;if(l!=$B(e).length&&!s)return!1;for(var c=l;c--;){var h=o[c];if(!(s?h in e:G$.call(e,h)))return!1}var u=a.get(t),d=a.get(e);if(u&&d)return u==e&&d==t;var p=!0;a.set(t,e),a.set(e,t);for(var g=s;++c{zB(),z$=Object.prototype,G$=z$.hasOwnProperty,me($$,"equalObjects"),U$=$$});function j$(t,e,r,n,i,a){var s=ZT(t),o=ZT(e),l=s?Y$:sF(t),o=o?Y$:sF(e),c=(l=l==W$?H$:l)==H$,h=(o=o==W$?H$:o)==H$;if((o=l==o)&&g7(t)){if(!g7(e))return!1;c=!(s=!0)}return o&&!c?(a=a||new jk,s||P7(t)?_$(t,e,r,n,i,a):B$(t,e,l,r,n,i,a)):1&r||(s=c&&X$.call(t,"__wrapped__"),l=h&&X$.call(e,"__wrapped__"),!s&&!l)?o&&(a=a||new jk,U$(t,e,r,n,i,a)):i(s?t.value():t,l?e.value():e,r,n,a=a||new jk)}var W$,Y$,H$,V$,X$,K$,Z$=t(()=>{Hk(),S$(),F$(),q$(),uF(),t7(),m7(),$7(),W$="[object Arguments]",Y$="[object Array]",H$="[object Object]",V$=Object.prototype,X$=V$.hasOwnProperty,me(j$,"baseIsEqualDeep"),K$=j$});function Q$(t,e,r,n,i){return t===e||(null==t||null==e||!UT(t)&&!UT(e)?t!=t&&e!=e:K$(t,e,r,n,Q$,i))}var J$,tz=t(()=>{Z$(),qT(),me(Q$,"baseIsEqual"),J$=Q$});function ez(t,e,r,n){var i=r.length,a=i,s=!n;if(null==t)return!a;for(t=Object(t);i--;){var o=r[i];if(s&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++i{Hk(),tz(),me(ez,"baseIsMatch"),rz=ez});function iz(t){return t==t&&!Tw(t)}var az,sz=t(()=>{Ew(),me(iz,"isStrictComparable"),az=iz});function oz(t){for(var e=nP(t),r=e.length;r--;){var n=e[r],i=t[n];e[r]=[n,i,az(i)]}return e}var lz,cz=t(()=>{sz(),oP(),me(oz,"getMatchData"),lz=oz});function hz(e,r){return function(t){return null!=t&&t[e]===r&&(void 0!==r||e in Object(t))}}var uz,dz=t(()=>{me(hz,"matchesStrictComparable"),uz=hz});function pz(e){var r=lz(e);return 1==r.length&&r[0][2]?uz(r[0][0],r[0][1]):function(t){return t===e||rz(t,e,r)}}var gz,fz=t(()=>{nz(),cz(),dz(),me(pz,"baseMatches"),gz=pz});function mz(t,e){return null!=t&&e in Object(t)}var yz,vz=t(()=>{me(mz,"baseHasIn"),yz=mz});function xz(t,e,r){for(var n=-1,i=(e=_P(e,t)).length,a=!1;++n{SP(),JT(),t7(),n8(),n7(),NP(),me(xz,"hasPath"),bz=xz});function kz(t,e){return null!=t&&bz(t,e,yz)}var Tz,Ez=t(()=>{vz(),wz(),me(kz,"hasIn"),Tz=kz});function Cz(r,n){return dP(r)&&az(n)?uz(LP(r),n):function(t){var e=OP(t,r);return void 0===e&&e===n?Tz(t,r):J$(n,e,3)}}var _z,Sz=t(()=>{tz(),PP(),Ez(),pP(),sz(),dz(),NP(),me(Cz,"baseMatchesProperty"),_z=Cz});function Az(e){return function(t){return t?.[e]}}var Lz,Nz=t(()=>{me(Az,"baseProperty"),Lz=Az});function Iz(e){return function(t){return RP(t,e)}}var Rz,Mz=t(()=>{MP(),me(Iz,"basePropertyDeep"),Rz=Iz});function Dz(t){return dP(t)?Lz(LP(t)):Rz(t)}var Oz,Pz=t(()=>{Nz(),Mz(),pP(),NP(),me(Dz,"property"),Oz=Dz});function Bz(t){return"function"==typeof t?t:null==t?N8:"object"==typeof t?ZT(t)?_z(t[0],t[1]):gz(t):Oz(t)}var Fz,$z=t(()=>{fz(),Sz(),I8(),t7(),Pz(),me(Bz,"baseIteratee"),Fz=Bz});function zz(t,e,r,n){for(var i=-1,a=null==t?0:t.length;++i{me(zz,"arrayAggregator"),Gz=zz});function qz(t,e){return t&&iT(t,e,nP)}var jz,Wz=t(()=>{sT(),oP(),me(qz,"baseForOwn"),jz=qz});function Yz(a,s){return function(t,e){if(null!=t){if(!a7(t))return a(t,e);for(var r=t.length,n=s?r:-1,i=Object(t);(s?n--:++n{s7(),me(Yz,"createBaseEach"),Hz=Yz}),Zz=t(()=>{Wz(),Kz(),Vz=Hz(jz),Xz=Vz});function Qz(t,n,i,a){return Xz(t,function(t,e,r){n(a,t,i(t),r)}),a}var Jz,tG=t(()=>{Zz(),me(Qz,"baseAggregator"),Jz=Qz});function eG(i,a){return function(t,e){var r=ZT(t)?Gz:Jz,n=a?a():{};return r(t,i,Fz(e,2),n)}}var rG,nG,iG,aG,sG,oG,lG,cG=t(()=>{Uz(),tG(),$z(),t7(),me(eG,"createAggregator"),rG=eG}),hG=t(()=>{iw(),nG=me(function(){return W3.Date.now()},"now"),iG=nG}),uG=t(()=>{J8(),N6(),rE(),x8(),aG=Object.prototype,sG=aG.hasOwnProperty,oG=Q8(function(t,e){t=Object(t);var r=-1,n=e.length,i=2{me(dG,"arrayIncludesWith"),pG=dG});function fG(t,e,r,n){var i=-1,a=YO,s=!0,o=t.length,l=[],c=e.length;if(o){r&&(e=VD(e,N7(r))),n?(a=pG,s=!1):200<=e.length&&(a=T$,s=!1,e=new y$(e));t:for(;++i{v$(),XO(),gG(),XD(),B7(),E$(),me(fG,"baseDifference"),mG=fG}),bG=t(()=>{xG(),YP(),J8(),c7(),yG=Q8(function(t,e){return l7(t)?mG(t,WP(e,1,l7,!0)):[]}),vG=yG});function wG(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}var kG,TG=t(()=>{me(wG,"last"),kG=wG});function EG(t,e,r){var n=null==t?0:t.length;return n?(e=r||void 0===e?1:kO(e),tB(t,e<0?0:e,n)):[]}var CG,_G=t(()=>{eB(),CO(),me(EG,"drop"),CG=EG});function SG(t,e,r){var n=null==t?0:t.length;return n?(e=r||void 0===e?1:kO(e),tB(t,0,(e=n-e)<0?0:e)):[]}var AG,LG=t(()=>{eB(),CO(),me(SG,"dropRight"),AG=SG});function NG(t){return"function"==typeof t?t:N8}var IG,RG=t(()=>{I8(),me(NG,"castFunction"),IG=NG});function MG(t,e){return(ZT(t)?IO:Xz)(t,IG(e))}var v,DG=t(()=>{RO(),Zz(),RG(),t7(),me(MG,"forEach"),v=MG}),OG=t(()=>{DG()});function PG(t,e){for(var r=-1,n=null==t?0:t.length;++r{me(PG,"arrayEvery"),BG=PG});function $G(t,n){var i=!0;return Xz(t,function(t,e,r){return i=!!n(t,e,r)}),i}var zG,GG=t(()=>{Zz(),me($G,"baseEvery"),zG=$G});function UG(t,e,r){var n=ZT(t)?BG:zG;return r&&eE(t,e,r)&&(e=void 0),n(t,Fz(e,3))}var qG,jG=t(()=>{FG(),GG(),$z(),t7(),rE(),me(UG,"every"),qG=UG});function WG(t,n){var i=[];return Xz(t,function(t,e,r){n(t,e,r)&&i.push(t)}),i}var YG,HG=t(()=>{Zz(),me(WG,"baseFilter"),YG=WG});function VG(t,e){return(ZT(t)?mB:YG)(t,Fz(e,3))}var XG,KG=t(()=>{yB(),HG(),$z(),t7(),me(VG,"filter"),XG=VG});function ZG(a){return function(t,e,r){var n,i=Object(t);return a7(t)||(n=Fz(e,3),t=nP(t),e=me(function(t){return n(i[t],t,i)},"predicate")),-1<(e=a(t,e,r))?i[n?t[e]:e]:void 0}}var QG,JG=t(()=>{$z(),s7(),oP(),me(ZG,"createFind"),QG=ZG});function tU(t,e,r){var n=null==t?0:t.length;return n?((r=null==r?0:kO(r))<0&&(r=eU(n+r,0)),DO(t,Fz(e,3),r)):-1}var eU,rU,nU,iU,aU=t(()=>{OO(),$z(),CO(),eU=Math.max,me(tU,"findIndex"),rU=tU}),sU=t(()=>{JG(),aU(),nU=QG(rU),iU=nU});function oU(t){return t&&t.length?t[0]:void 0}var lU,cU=t(()=>{me(oU,"head"),lU=oU}),hU=t(()=>{cU()});function uU(t,n){var i=-1,a=a7(t)?Array(t.length):[];return Xz(t,function(t,e,r){a[++i]=n(t,e,r)}),a}var dU,pU=t(()=>{Zz(),s7(),me(uU,"baseMap"),dU=uU});function gU(t,e){return(ZT(t)?VD:dU)(t,Fz(e,3))}var x,fU=t(()=>{XD(),$z(),pU(),t7(),me(gU,"map"),x=gU});function mU(t,e){return WP(x(t,e),1)}var yU,vU=t(()=>{YP(),fU(),me(mU,"flatMap"),yU=mU});function xU(t,e){return null==t?t:iT(t,IG(e),v8)}var bU,wU=t(()=>{sT(),RG(),x8(),me(xU,"forIn"),bU=xU});function kU(t,e){return t&&jz(t,IG(e))}var TU,EU,CU,_U,SU=t(()=>{Wz(),RG(),me(kU,"forOwn"),TU=kU}),AU=t(()=>{Zk(),cG(),CU=Object.prototype,EU=CU.hasOwnProperty,CU=rG(function(t,e,r){EU.call(t,r)?t[r].push(e):Kk(t,r,[e])}),_U=CU});function LU(t,e){return e{me(LU,"baseGt"),NU=LU});function RU(t,e){return null!=t&&DU.call(t,e)}var MU,DU,OU,PU=t(()=>{MU=Object.prototype,DU=MU.hasOwnProperty,me(RU,"baseHas"),OU=RU});function BU(t,e){return null!=t&&bz(t,e,OU)}var FU,$U=t(()=>{PU(),wz(),me(BU,"has"),FU=BU});function zU(t){return"string"==typeof t||!ZT(t)&&UT(t)&&"[object String]"==bw(t)}var GU,UU=t(()=>{ww(),t7(),qT(),me(zU,"isString"),GU=zU});function qU(e,t){return VD(t,function(t){return e[t]})}var jU,WU=t(()=>{XD(),me(qU,"baseValues"),jU=qU});function YU(t){return null==t?[]:jU(t,nP(t))}var HU,VU=t(()=>{WU(),oP(),me(YU,"values"),HU=YU});function XU(t,e,r,n){return t=a7(t)?t:HU(t),r=r&&!n?kO(r):0,n=t.length,r<0&&(r=KU(n+r,0)),GU(t)?r<=n&&-1{jO(),s7(),UU(),CO(),VU(),KU=Math.max,me(XU,"includes"),ZU=XU});function JU(t,e,r){var n=null==t?0:t.length;return n?((r=null==r?0:kO(r))<0&&(r=tq(n+r,0)),qO(t,e,r)):-1}var tq,eq,rq=t(()=>{jO(),CO(),tq=Math.max,me(JU,"indexOf"),eq=JU});function nq(t){if(null!=t){if(a7(t)&&(ZT(t)||"string"==typeof t||"function"==typeof t.splice||g7(t)||P7(t)||XT(t)))return!t.length;var e,r=sF(t);if("[object Map]"==r||"[object Set]"==r)return!t.size;if(PT(t))return!tP(t).length;for(e in t)if(aq.call(t,e))return!1}return!0}var iq,aq,sq,oq=t(()=>{eP(),uF(),JT(),t7(),s7(),m7(),BT(),$7(),iq=Object.prototype,aq=iq.hasOwnProperty,me(nq,"isEmpty"),sq=nq});function lq(t){return UT(t)&&"[object RegExp]"==bw(t)}var cq,hq,uq,dq=t(()=>{ww(),qT(),me(lq,"baseIsRegExp"),cq=lq}),pq=t(()=>{dq(),B7(),F7(),hq=(hq=D7&&D7.isRegExp)?N7(hq):cq,uq=hq});function gq(t){return void 0===t}var fq,mq=t(()=>{me(gq,"isUndefined"),fq=gq});function yq(t,e){return t{me(yq,"baseLt"),vq=yq});function bq(t,n){var i={};return n=Fz(n,3),jz(t,function(t,e,r){Kk(i,e,n(t,e,r))}),i}var wq,kq=t(()=>{Zk(),Wz(),$z(),me(bq,"mapValues"),wq=bq});function Tq(t,e,r){for(var n=-1,i=t.length;++n{YD(),me(Tq,"baseExtremum"),Eq=Tq});function _q(t){return t&&t.length?Eq(t,N8,NU):void 0}var Sq,Aq=t(()=>{Cq(),IU(),I8(),me(_q,"max"),Sq=_q});function Lq(t){return t&&t.length?Eq(t,N8,vq):void 0}var Nq,Iq=t(()=>{Cq(),xq(),I8(),me(Lq,"min"),Nq=Lq});function Rq(t,e){return t&&t.length?Eq(t,Fz(e,2),vq):void 0}var Mq,Dq=t(()=>{Cq(),$z(),xq(),me(Rq,"minBy"),Mq=Rq});function Oq(e){if("function"!=typeof e)throw new TypeError("Expected a function");return function(){var t=arguments;switch(t.length){case 0:return!e.call(this);case 1:return!e.call(this,t[0]);case 2:return!e.call(this,t[0],t[1]);case 3:return!e.call(this,t[0],t[1],t[2])}return!e.apply(this,t)}}var Pq,Bq=t(()=>{me(Oq,"negate"),Pq=Oq});function Fq(t,e,r,n){if(Tw(t))for(var i=-1,a=(e=_P(e,t)).length,s=a-1,o=t;null!=o&&++i{H7(),SP(),n8(),Ew(),NP(),me(Fq,"baseSet"),$q=Fq});function Gq(t,e,r){for(var n=-1,i=e.length,a={};++n{MP(),zq(),SP(),me(Gq,"basePickBy"),Uq=Gq});function jq(t,r){var e;return null==t?{}:(e=VD(UB(t),function(t){return[t]}),r=Fz(r),Uq(t,e,function(t,e){return r(t,e[0])}))}var Wq,Yq=t(()=>{XD(),$z(),qq(),oF(),me(jq,"pickBy"),Wq=jq});function Hq(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}var Vq,Xq=t(()=>{me(Hq,"baseSortBy"),Vq=Hq});function Kq(t,e){if(t!==e){var r=void 0!==t,n=null===t,i=t==t,a=WD(t),s=void 0!==e,o=null===e,l=e==e,c=WD(e);if(!o&&!c&&!a&&e{YD(),me(Kq,"compareAscending"),Zq=Kq});function Jq(t,e,r){for(var n=-1,i=t.criteria,a=e.criteria,s=i.length,o=r.length;++n{Qq(),me(Jq,"compareMultiple"),tj=Jq});function rj(t,n,r){n=n.length?VD(n,function(e){return ZT(e)?function(t){return RP(t,1===e.length?e[0]:e)}:e}):[N8];var i=-1,t=(n=VD(n,N7(Fz)),dU(t,function(e,t,r){return{criteria:VD(n,function(t){return t(e)}),index:++i,value:e}}));return Vq(t,function(t,e){return tj(t,e,r)})}var nj,ij,aj,sj=t(()=>{XD(),MP(),$z(),pU(),Xq(),B7(),ej(),I8(),t7(),me(rj,"baseOrderBy"),nj=rj}),oj=t(()=>{Nz(),ij=Lz("length"),aj=ij});function lj(t){for(var e=mj.lastIndex=0;mj.test(t);)++e;return e}var cj,hj,uj,dj,pj,gj,fj,mj,yj,vj=t(()=>{cj="["+(dj="\\ud800-\\udfff")+"]",hj="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",uj="\\ud83c[\\udffb-\\udfff]",fj="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",gj="[\\ufe0e\\ufe0f]?",pj="(?:\\u200d(?:"+[dj="[^"+dj+"]","(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]"].join("|")+")"+gj+fj+")*",gj=gj+fj+pj,fj="(?:"+[dj+hj+"?",hj,"(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]",cj].join("|")+")",mj=RegExp(uj+"(?="+uj+")|"+fj+gj,"g"),me(lj,"unicodeSize"),yj=lj});function xj(t){return(iB(t)?yj:aj)(t)}var bj,wj=t(()=>{oj(),aB(),vj(),me(xj,"stringSize"),bj=xj});function kj(r,t){return Uq(r,t,function(t,e){return Tz(r,e)})}var Tj,Ej,Cj,_j=t(()=>{qq(),Ez(),me(kj,"basePick"),Tj=kj}),Sj=t(()=>{_j(),QP(),Ej=ZP(function(t,e){return null==t?{}:Tj(t,e)}),Cj=Ej});function Aj(t,e,r,n){for(var i=-1,a=Nj(Lj((e-t)/(r||1)),0),s=Array(a);a--;)s[n?a:++i]=t,t+=r;return s}var Lj,Nj,Ij,Rj=t(()=>{Lj=Math.ceil,Nj=Math.max,me(Aj,"baseRange"),Ij=Aj});function Mj(n){return function(t,e,r){return r&&"number"!=typeof r&&eE(t,e,r)&&(e=r=void 0),t=xO(t),void 0===e?(e=t,t=0):e=xO(e),r=void 0===r?t{Rj(),rE(),bO(),me(Mj,"createRange"),Dj=Mj}),Fj=t(()=>{Bj(),Oj=Dj(),Pj=Oj});function $j(t,n,i,a,e){return e(t,function(t,e,r){i=a?(a=!1,t):n(i,t,e,r)}),i}var zj,Gj=t(()=>{me($j,"baseReduce"),zj=$j});function Uj(t,e,r){var n=ZT(t)?oB:zj,i=arguments.length<3;return n(t,Fz(e,4),r,i,Xz)}var qj,jj=t(()=>{lB(),Zz(),$z(),Gj(),t7(),me(Uj,"reduce"),qj=Uj});function Wj(t,e){return(ZT(t)?mB:YG)(t,Pq(Fz(e,3)))}var Yj,Hj=t(()=>{yB(),HG(),$z(),t7(),Bq(),me(Wj,"reject"),Yj=Wj});function Vj(t){var e;return null==t?0:a7(t)?GU(t)?bj(t):t.length:"[object Map]"==(e=sF(t))||"[object Set]"==e?t.size:tP(t).length}var Xj,Kj=t(()=>{eP(),uF(),s7(),UU(),wj(),me(Vj,"size"),Xj=Vj});function Zj(t,n){var i;return Xz(t,function(t,e,r){return!(i=n(t,e,r))}),!!i}var Qj,Jj=t(()=>{Zz(),me(Zj,"baseSome"),Qj=Zj});function tW(t,e,r){var n=ZT(t)?b$:Qj;return r&&eE(t,e,r)&&(e=void 0),n(t,Fz(e,3))}var eW,rW,nW,iW,aW,sW=t(()=>{w$(),$z(),Jj(),t7(),rE(),me(tW,"some"),eW=tW}),oW=t(()=>{YP(),sj(),J8(),rE(),rW=Q8(function(t,e){var r;return null==t?[]:(1<(r=e.length)&&eE(t,e[0],e[1])?e=[]:2{hF(),LO(),M$(),iW=VB&&1/R$(new VB([,-0]))[1]==1/0?function(t){return new VB(t)}:AO,aW=iW});function cW(t,e,r){var n=-1,i=YO,a=t.length,s=!0,o=[],l=o;if(r)s=!1,i=pG;else if(200<=a){var c=e?null:aW(t);if(c)return R$(c);s=!1,i=T$,l=new y$}else l=e?[]:o;t:for(;++n{v$(),XO(),gG(),E$(),lW(),M$(),me(cW,"baseUniq"),hW=cW}),gW=t(()=>{YP(),J8(),pW(),c7(),uW=Q8(function(t){return hW(WP(t,1,l7,!0))}),dW=uW});function fW(t){return t&&t.length?hW(t):[]}var mW,yW=t(()=>{pW(),me(fW,"uniq"),mW=fW});function vW(t,e){return t&&t.length?hW(t,Fz(e,2)):[]}var xW,bW=t(()=>{$z(),pW(),me(vW,"uniqBy"),xW=vW});function wW(t){var e=++kW;return TP(t)+e}var kW,TW,EW=t(()=>{EP(),kW=0,me(wW,"uniqueId"),TW=wW});function CW(t,e,r){for(var n=-1,i=t.length,a=e.length,s={};++n{me(CW,"baseZipObject"),_W=CW});function AW(t,e){return _W(t||[],e||[],Y7)}var LW,NW=t(()=>{H7(),SW(),me(AW,"zipObject"),LW=AW}),IW=t(()=>{lP(),n$(),s$(),c$(),U8(),uG(),bG(),_G(),LG(),OG(),jG(),KG(),sU(),hU(),vU(),XP(),DG(),wU(),SU(),AU(),$U(),I8(),QU(),rq(),t7(),oq(),Lw(),Ew(),pq(),UU(),mq(),oP(),TG(),fU(),kq(),Aq(),lE(),Iq(),Dq(),LO(),hG(),Sj(),Yq(),Fj(),jj(),Hj(),Kj(),sW(),oW(),gW(),yW(),EW(),VU(),NW()});function RW(t,e){t[e]?t[e]++:t[e]=1}function MW(t,e){--t[e]||delete t[e]}function DW(t,e,r,n){return e=""+e,r=""+r,!t&&r{IW(),BW="\0",(FW=class{static{me(this,"Graph")}constructor(t={}){this._isDirected=!Object.prototype.hasOwnProperty.call(t,"directed")||t.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(t,"multigraph")&&t.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=z8(void 0),this._defaultEdgeLabelFn=z8(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[BW]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return _w(t)||(t=z8(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return nP(this._nodes)}sources(){var e=this;return XG(this.nodes(),function(t){return sq(e._in[t])})}sinks(){var e=this;return XG(this.nodes(),function(t){return sq(e._out[t])})}setNodes(t,e){var r=arguments,n=this;return v(t,function(t){1this.removeEdge(this._edgeObjs[t]),"removeEdge"),delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],v(this.children(t),t=>{this.setParent(t)}),delete this._children[t]),v(nP(this._in[t]),e),delete this._in[t],delete this._preds[t],v(nP(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount),this}setParent(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(fq(e))e=BW;else{for(var r=e+="";!fq(r);r=this.parent(r))if(r===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound&&(t=this._parent[t])!==BW)return t}children(t){var e;return fq(t)&&(t=BW),this._isCompound?(e=this._children[t])?nP(e):void 0:t===BW?this.nodes():this.hasNode(t)?[]:void 0}predecessors(t){if(t=this._preds[t])return nP(t)}successors(t){if(t=this._sucs[t])return nP(t)}neighbors(t){var e=this.predecessors(t);if(e)return dW(e,this.successors(t))}isLeaf(t){return 0===(t=this.isDirected()?this.successors(t):this.neighbors(t)).length}filterNodes(r){var n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound}),i=(n.setGraph(this.graph()),this),a=(v(this._nodes,function(t,e){r(e)&&n.setNode(e,t)}),v(this._edgeObjs,function(t){n.hasNode(t.v)&&n.hasNode(t.w)&&n.setEdge(t,i.edge(t))}),{});function s(t){var e=i.parent(t);return void 0===e||n.hasNode(e)?a[t]=e:e in a?a[e]:s(e)}return me(s,"findParent"),this._isCompound&&v(n.nodes(),function(t){n.setParent(t,s(t))}),n}setDefaultEdgeLabel(t){return _w(t)||(t=z8(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return HU(this._edgeObjs)}setPath(t,r){var n=this,i=arguments;return qj(t,function(t,e){return 1{$W()});function GW(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function UW(t,e){if("_next"!==t&&"_prev"!==t)return e}var qW,jW=t(()=>{qW=class{static{me(this,"List")}constructor(){var t={};t._next=t._prev=t,this._sentinel=t}dequeue(){var t=this._sentinel,e=t._prev;if(e!==t)return GW(e),e}enqueue(t){var e=this._sentinel;t._prev&&t._next&&GW(t),t._next=e._next,e._next._prev=t,(e._next=t)._prev=e}toString(){for(var t=[],e=this._sentinel,r=e._prev;r!==e;)t.push(JSON.stringify(r,UW)),r=r._prev;return"["+t.join(", ")+"]"}},me(GW,"unlink"),me(UW,"filterOutLinks")});function WW(e,t){return e.nodeCount()<=1?[]:(t=YW((t=VW(e,t||KW)).graph,t.buckets,t.zeroIdx),VP(x(t,function(t){return e.outEdges(t.v,t.w)})))}function YW(t,e,r){for(var n,i=[],a=e[e.length-1],s=e[0];t.nodeCount();){for(;n=s.dequeue();)HW(t,e,r,n);for(;n=a.dequeue();)HW(t,e,r,n);if(t.nodeCount())for(var o=e.length-2;0{IW(),zW(),jW(),KW=z8(1),me(WW,"greedyFAS"),me(YW,"doGreedyFAS"),me(HW,"removeNode"),me(VW,"buildState"),me(XW,"assignBucket")});function QW(r){var t="greedy"===r.graph().acyclicer?WW(r,e(r)):JW(r);function e(e){return function(t){return e.edge(t).weight}}v(t,function(t){var e=r.edge(t);r.removeEdge(t),e.forwardName=t.name,e.reversed=!0,r.setEdge(t.w,t.v,e,TW("rev"))}),me(e,"weightFn")}function JW(e){var r=[],n={},i={};function a(t){Object.prototype.hasOwnProperty.call(i,t)||(i[t]=!0,n[t]=!0,v(e.outEdges(t),function(t){Object.prototype.hasOwnProperty.call(n,t.w)?r.push(t):a(t.w)}),delete n[t])}return me(a,"dfs"),v(e.nodes(),a),r}function tY(n){v(n.edges(),function(t){var e,r=n.edge(t);r.reversed&&(n.removeEdge(t),e=r.forwardName,delete r.reversed,delete r.forwardName,n.setEdge(t.w,t.v,r,e))})}var eY=t(()=>{IW(),ZW(),me(QW,"run"),me(JW,"dfsFAS"),me(tY,"undo")});function rY(t,e,r,n){for(var i;i=TW(n),t.hasNode(i););return r.dummy=e,t.setNode(i,r),i}function nY(n){var i=(new FW).setGraph(n.graph());return v(n.nodes(),function(t){i.setNode(t,n.node(t))}),v(n.edges(),function(t){var e=i.edge(t.v,t.w)||{weight:0,minlen:1},r=n.edge(t);i.setEdge(t.v,t.w,{weight:e.weight+r.weight,minlen:Math.max(e.minlen,r.minlen)})}),i}function iY(e){var r=new FW({multigraph:e.isMultigraph()}).setGraph(e.graph());return v(e.nodes(),function(t){e.children(t).length||r.setNode(t,e.node(t))}),v(e.edges(),function(t){r.setEdge(t,e.edge(t))}),r}function aY(t,e){var r,n=t.x,i=t.y,a=e.x-n,e=e.y-i,s=t.width/2,t=t.height/2;if(a||e)return t=Math.abs(e)*s>Math.abs(a)*t?(r=(t=e<0?-t:t)*a/e,t):(r=a<0?-s:s)*e/a,{x:n+r,y:i+t};throw new Error("Not possible to find intersection inside of the rectangle")}function sY(n){var i=x(Pj(hY(n)+1),function(){return[]});return v(n.nodes(),function(t){var e=n.node(t),r=e.rank;fq(r)||(i[r][e.order]=t)}),i}function oY(e){var r=Nq(x(e.nodes(),function(t){return e.node(t).rank}));v(e.nodes(),function(t){t=e.node(t),FU(t,"rank")&&(t.rank-=r)})}function lY(r){var n=Nq(x(r.nodes(),function(t){return r.node(t).rank})),i=[],a=(v(r.nodes(),function(t){var e=r.node(t).rank-n;i[e]||(i[e]=[]),i[e].push(t)}),0),s=r.graph().nodeRankFactor;v(i,function(t,e){fq(t)&&e%s!=0?--a:a&&v(t,function(t){r.node(t).rank+=a})})}function cY(t,e,r,n){var i={width:0,height:0};return 4<=arguments.length&&(i.rank=r,i.order=n),rY(t,"border",i,e)}function hY(e){return Sq(x(e.nodes(),function(t){if(t=e.node(t).rank,!fq(t))return t}))}function uY(t,e){var r={lhs:[],rhs:[]};return v(t,function(t){(e(t)?r.lhs:r.rhs).push(t)}),r}function dY(t,e){var r=iG();try{return e()}finally{console.log(t+" time: "+(iG()-r)+"ms")}}function pY(t,e){return e()}var gY=t(()=>{IW(),zW(),me(rY,"addDummyNode"),me(nY,"simplify"),me(iY,"asNonCompoundGraph"),me(aY,"intersectRect"),me(sY,"buildLayerMatrix"),me(oY,"normalizeRanks"),me(lY,"removeEmptyRanks"),me(cY,"addBorderNode"),me(hY,"maxRank"),me(uY,"partition"),me(dY,"time"),me(pY,"notime")});function fY(a){function s(t){var e=a.children(t),r=a.node(t);if(e.length&&v(e,s),Object.prototype.hasOwnProperty.call(r,"minRank")){r.borderLeft=[],r.borderRight=[];for(var n=r.minRank,i=r.maxRank+1;n{IW(),gY(),me(fY,"addBorderSegments"),me(mY,"addBorderNode")});function vY(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||bY(t)}function xY(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||kY(t),"lr"!==e&&"rl"!==e||(EY(t),bY(t))}function bY(e){v(e.nodes(),function(t){wY(e.node(t))}),v(e.edges(),function(t){wY(e.edge(t))})}function wY(t){var e=t.width;t.width=t.height,t.height=e}function kY(e){v(e.nodes(),function(t){TY(e.node(t))}),v(e.edges(),function(t){t=e.edge(t),v(t.points,TY),Object.prototype.hasOwnProperty.call(t,"y")&&TY(t)})}function TY(t){t.y=-t.y}function EY(e){v(e.nodes(),function(t){CY(e.node(t))}),v(e.edges(),function(t){t=e.edge(t),v(t.points,CY),Object.prototype.hasOwnProperty.call(t,"x")&&CY(t)})}function CY(t){var e=t.x;t.x=t.y,t.y=e}var _Y=t(()=>{IW(),me(vY,"adjust"),me(xY,"undo"),me(bY,"swapWidthHeight"),me(wY,"swapWidthHeightOne"),me(kY,"reverseY"),me(TY,"reverseYOne"),me(EY,"swapXY"),me(CY,"swapXYOne")});function SY(e){e.graph().dummyChains=[],v(e.edges(),function(t){AY(e,t)})}function AY(t,e){var r=e.v,n=t.node(r).rank,i=e.w,a=t.node(i).rank,s=e.name,o=t.edge(e),l=o.labelRank;if(a!==n+1){t.removeEdge(e);var c,h=void 0,u=0;for(++n;n{IW(),gY(),me(SY,"run"),me(AY,"normalizeEdge"),me(LY,"undo")});function IY(r){var n={};function i(t){var e=r.node(t);return Object.prototype.hasOwnProperty.call(n,t)?e.rank:(n[t]=!0,(t=Nq(x(r.outEdges(t),function(t){return i(t.w)-r.edge(t).minlen})))!==Number.POSITIVE_INFINITY&&null!=t||(t=0),e.rank=t)}me(i,"dfs"),v(r.sources(),i)}function RY(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}var MY=t(()=>{IW(),me(IY,"longestPath"),me(RY,"slack")});function DY(t){var e,r=new FW({directed:!1}),n=t.nodes()[0],i=t.nodeCount();for(r.setNode(n,{});OY(r,t){IW(),zW(),MY(),me(DY,"feasibleTree"),me(OY,"tightTree"),me(PY,"findMinSlackEdge"),me(BY,"shiftRanks")}),$Y=t(()=>{}),zY=t(()=>{}),GY=t(()=>{IW(),zY(),z8(1)}),UY=t(()=>{GY()}),qY=t(()=>{}),jY=t(()=>{qY()}),WY=t(()=>{IW(),z8(1)});function YY(e){var r={},n={},i=[];function a(t){if(Object.prototype.hasOwnProperty.call(n,t))throw new HY;Object.prototype.hasOwnProperty.call(r,t)||(n[t]=!0,r[t]=!0,v(e.predecessors(t),a),delete n[t],i.push(t))}if(me(a,"visit"),v(e.sinks(),a),Xj(r)!==e.nodeCount())throw new HY;return i}function HY(){}var VY=t(()=>{IW(),YY.CycleException=HY,me(YY,"topsort"),me(HY,"CycleException"),HY.prototype=new Error}),XY=t(()=>{VY()});function KY(e,t,r){ZT(t)||(t=[t]);var n=(e.isDirected()?e.successors:e.neighbors).bind(e),i=[],a={};return v(t,function(t){if(!e.hasNode(t))throw new Error("Graph does not have node: "+t);ZY(e,t,"post"===r,a,n,i)}),i}function ZY(e,t,r,n,i,a){Object.prototype.hasOwnProperty.call(n,t)||(n[t]=!0,r||a.push(t),v(i(t),function(t){ZY(e,t,r,n,i,a)}),r&&a.push(t))}var QY=t(()=>{IW(),me(KY,"dfs"),me(ZY,"doDfs")});function JY(t,e){return KY(t,e,"post")}var tH=t(()=>{QY(),me(JY,"postorder")});function eH(t,e){return KY(t,e,"pre")}var rH=t(()=>{QY(),me(eH,"preorder")}),nH=t(()=>{zY(),$W()}),iH=t(()=>{$Y(),GY(),UY(),jY(),WY(),XY(),tH(),rH(),nH(),qY(),VY()});function aH(t){IY(t=nY(t));var e,r=DY(t);for(cH(r),sH(r,t);e=uH(r);)pH(r,t,e,dH(r,t,e))}function sH(e,r){var t=(t=JY(e,e.nodes())).slice(0,t.length-1);v(t,function(t){oH(e,r,t)})}function oH(t,e,r){var n=t.node(r).parent;t.edge(r,n).cutvalue=lH(t,e,r)}function lH(n,i,a){var s=n.node(a).parent,o=!0,t=i.edge(a,s),l=0;return t||(o=!1,t=i.edge(s,a)),l=t.weight,v(i.nodeEdges(a),function(t){var e=t.v===a,r=e?t.w:t.v;r!==s&&(e=e===o,t=i.edge(t).weight,l+=e?t:-t,fH(n,a,r))&&(t=n.edge(a,r).cutvalue,l+=e?-t:t)}),l}function cH(t,e){arguments.length<2&&(e=t.nodes()[0]),hH(t,{},1,e)}function hH(e,r,n,i,t){var a=n,s=e.node(i);return r[i]=!0,v(e.neighbors(i),function(t){Object.prototype.hasOwnProperty.call(r,t)||(n=hH(e,r,n,t,i))}),s.low=a,s.lim=n++,t?s.parent=t:delete s.parent,n}function uH(e){return iU(e.edges(),function(t){return e.edge(t).cutvalue<0})}function dH(e,r,t){var n=t.v,i=t.w,t=(r.hasEdge(n,i)||(n=t.w,i=t.v),e.node(n)),n=e.node(i),a=t,s=!1,i=(t.lim>n.lim&&(a=n,s=!0),XG(r.edges(),function(t){return s===mH(0,e.node(t.v),a)&&s!==mH(0,e.node(t.w),a)}));return Mq(i,function(t){return RY(r,t)})}function pH(t,e,r,n){var i=r.v;t.removeEdge(i,r.w),t.setEdge(n.v,n.w,{}),cH(t),sH(t,e),gH(t,e)}function gH(i,a){var t=iU(i.nodes(),function(t){return!a.node(t).parent}),t=(t=eH(i,t)).slice(1);v(t,function(t){var e=i.node(t).parent,r=a.edge(t,e),n=!1;r||(r=a.edge(e,t),n=!0),a.node(t).rank=a.node(e).rank+(n?r.minlen:-r.minlen)})}function fH(t,e,r){return t.hasEdge(e,r)}function mH(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}var yH=t(()=>{IW(),iH(),gY(),FY(),MY(),aH.initLowLimValues=cH,aH.initCutValues=sH,aH.calcCutValue=lH,aH.leaveEdge=uH,aH.enterEdge=dH,aH.exchangeEdges=pH,me(aH,"networkSimplex"),me(sH,"initCutValues"),me(oH,"assignCutValue"),me(lH,"calcCutValue"),me(cH,"initLowLimValues"),me(hH,"dfsAssignLowLim"),me(uH,"leaveEdge"),me(dH,"enterEdge"),me(pH,"exchangeEdges"),me(gH,"updateRanks"),me(fH,"isTreeEdge"),me(mH,"isDescendant")});function vH(t){switch(t.graph().ranker){case"network-simplex":bH(t);break;case"tight-tree":xH(t);break;case"longest-path":wH(t);break;default:bH(t)}}function xH(t){IY(t),DY(t)}function bH(t){aH(t)}var wH,kH=t(()=>{FY(),yH(),MY(),me(vH,"rank"),wH=IY,me(xH,"tightTreeRanker"),me(bH,"networkSimplexRanker")});function TH(e){var r=rY(e,"root",{},"_root"),n=CH(e),i=Sq(HU(n))-1,a=2*i+1,s=(e.graph().nestingRoot=r,v(e.edges(),function(t){e.edge(t).minlen*=a}),_H(e)+1);v(e.children(),function(t){EH(e,r,a,s,i,n,t)}),e.graph().nodeRankFactor=a}function EH(i,a,s,o,l,c,h){var u,d,t,e=i.children(h);e.length?(u=cY(i,"_bt"),d=cY(i,"_bb"),t=i.node(h),i.setParent(u,h),t.borderTop=u,i.setParent(d,h),t.borderBottom=d,v(e,function(t){EH(i,a,s,o,l,c,t);var e=i.node(t),r=e.borderTop||t,n=r!==(t=e.borderBottom||t)?1:l-c[h]+1;i.setEdge(u,r,{weight:e=e.borderTop?o:2*o,minlen:n,nestingEdge:!0}),i.setEdge(t,d,{weight:e,minlen:n,nestingEdge:!0})}),i.parent(h)||i.setEdge(a,u,{weight:0,minlen:l+c[h]})):h!==a&&i.setEdge(a,h,{weight:0,minlen:s})}function CH(n){var i={};function a(t,e){var r=n.children(t);r&&r.length&&v(r,function(t){a(t,e+1)}),i[t]=e}return me(a,"dfs"),v(n.children(),function(t){a(t,1)}),i}function _H(r){return qj(r.edges(),function(t,e){return t+r.edge(e).weight},0)}function SH(e){var t=e.graph();e.removeNode(t.nestingRoot),delete t.nestingRoot,v(e.edges(),function(t){e.edge(t).nestingEdge&&e.removeEdge(t)})}var AH=t(()=>{IW(),gY(),me(TH,"run"),me(EH,"dfs"),me(CH,"treeDepths"),me(_H,"sumWeights"),me(SH,"cleanup")});function LH(i,a,t){var s,o={};v(t,function(t){for(var e,r,n=i.parent(t);n;){if((e=i.parent(n))?(r=o[e],o[e]=n):(r=s,s=n),r&&r!==n)return void a.setEdge(r,n);n=e}})}var NH=t(()=>{IW(),me(LH,"addSubgraphConstraints")});function IH(i,r,a){var s=RH(i),o=new FW({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(t){return i.node(t)});return v(i.nodes(),function(n){var t=i.node(n),e=i.parent(n);(t.rank===r||t.minRank<=r&&r<=t.maxRank)&&(o.setNode(n),o.setParent(n,e||s),v(i[a](n),function(t){var e=t.v===n?t.w:t.v,r=o.edge(e,n),r=fq(r)?0:r.weight;o.setEdge(e,n,{weight:i.edge(t).weight+r})}),Object.prototype.hasOwnProperty.call(t,"minRank"))&&o.setNode(n,{borderLeft:t.borderLeft[r],borderRight:t.borderRight[r]})}),o}function RH(t){for(var e;t.hasNode(e=TW("_root")););return e}var MH=t(()=>{IW(),zW(),me(IH,"buildLayerGraph"),me(RH,"createRootNode")});function DH(t,e){for(var r=0,n=1;n>1]+=t.weight;o+=t.weight*r})),o}var PH=t(()=>{IW(),me(DH,"crossCount"),me(OH,"twoLayerCrossCount")});function BH(r){var n={},t=XG(r.nodes(),function(t){return!r.children(t).length}),e=Sq(x(t,function(t){return r.node(t).rank})),i=x(Pj(e+1),function(){return[]});function a(t){var e;FU(n,t)||(n[t]=!0,e=r.node(t),i[e.rank].push(t),v(r.successors(t),a))}return me(a,"dfs"),e=nW(t,function(t){return r.node(t).rank}),v(e,a),i}var FH=t(()=>{IW(),me(BH,"initOrder")});function $H(n,t){return x(t,function(t){var e=n.inEdges(t);return e.length?{v:t,barycenter:(e=qj(e,function(t,e){var r=n.edge(e),e=n.node(e.v);return{sum:t.sum+r.weight*e.order,weight:t.weight+r.weight}},{sum:0,weight:0})).sum/e.weight,weight:e.weight}:{v:t}})}var zH=t(()=>{IW(),me($H,"barycenter")});function GH(t,e){var n={};return v(t,function(t,e){e=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e},fq(t.barycenter)||(e.barycenter=t.barycenter,e.weight=t.weight)}),v(e.edges(),function(t){var e=n[t.v],r=n[t.w];fq(e)||fq(r)||(r.indegree++,e.out.push(n[t.w]))}),UH(XG(n,function(t){return!t.indegree}))}function UH(r){var t=[];function e(e){return function(t){t.merged||(fq(t.barycenter)||fq(e.barycenter)||t.barycenter>=e.barycenter)&&qH(e,t)}}function n(e){return function(t){t.in.push(e),0==--t.indegree&&r.push(t)}}for(me(e,"handleIn"),me(n,"handleOut");r.length;){var i=r.pop();t.push(i),v(i.in.reverse(),e(i)),v(i.out,n(i))}return x(XG(t,function(t){return!t.merged}),function(t){return Cj(t,["vs","i","barycenter","weight"])})}function qH(t,e){var r=0,n=0;t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=r/n,t.weight=n,t.i=Math.min(e.i,t.i),e.merged=!0}var jH=t(()=>{IW(),me(GH,"resolveConflicts"),me(UH,"doResolveConflicts"),me(qH,"mergeEntries")});function WH(t,e){var r=(t=uY(t,function(t){return Object.prototype.hasOwnProperty.call(t,"barycenter")})).lhs,n=nW(t.rhs,function(t){return-t.i}),i=[],a=0,s=0,o=0,t=(r.sort(HH(!!e)),o=YH(i,n,o),v(r,function(t){o+=t.vs.length,i.push(t.vs),a+=t.barycenter*t.weight,s+=t.weight,o=YH(i,n,o)}),{vs:VP(i)});return s&&(t.barycenter=a/s,t.weight=s),t}function YH(t,e,r){for(var n;e.length&&(n=kG(e)).i<=r;)e.pop(),t.push(n.vs),r++;return r}function HH(r){return function(t,e){return t.barycentere.barycenter?1:r?e.i-t.i:t.i-e.i}}var VH=t(()=>{IW(),gY(),me(WH,"sort"),me(YH,"consumeUnsortable"),me(HH,"compareWithBias")});function XH(r,t,n,i){var e,a=r.children(t),s=(t=r.node(t))?t.borderLeft:void 0,o=t?t.borderRight:void 0,l={},t=(s&&(a=XG(a,function(t){return t!==s&&t!==o})),$H(r,a));return v(t,function(t){var e;r.children(t.v).length&&(e=XH(r,t.v,n,i),l[t.v]=e,Object.prototype.hasOwnProperty.call(e,"barycenter"))&&ZH(t,e)}),KH(a=GH(t,n),l),t=WH(a,i),s&&(t.vs=VP([s,t.vs,o]),r.predecessors(s).length)&&(a=r.node(r.predecessors(s)[0]),e=r.node(r.predecessors(o)[0]),Object.prototype.hasOwnProperty.call(t,"barycenter")||(t.barycenter=0,t.weight=0),t.barycenter=(t.barycenter*t.weight+a.order+e.order)/(t.weight+2),t.weight+=2),t}function KH(t,e){v(t,function(t){t.vs=VP(t.vs.map(function(t){return e[t]?e[t].vs:t}))})}function ZH(t,e){fq(t.barycenter)?(t.barycenter=e.barycenter,t.weight=e.weight):(t.barycenter=(t.barycenter*t.weight+e.barycenter*e.weight)/(t.weight+e.weight),t.weight+=e.weight)}var QH=t(()=>{IW(),zH(),jH(),VH(),me(XH,"sortSubgraph"),me(KH,"expandSubgraphs"),me(ZH,"mergeBarycenters")});function JH(t){var e=hY(t),r=tV(t,Pj(1,e+1),"inEdges"),n=tV(t,Pj(e-1,-1,-1),"outEdges");rV(t,BH(t));for(var i,a=Number.POSITIVE_INFINITY,s=0,o=0;o<4;++s,++o){eV(s%2?r:n,2<=s%4);var l,c=DH(t,l=sY(t));c{IW(),zW(),gY(),NH(),MH(),PH(),FH(),QH(),me(JH,"order"),me(tV,"buildLayerGraphs"),me(eV,"sweepLayerGraphs"),me(rV,"assignOrder")});function iV(c){var h=sV(c);v(c.graph().dummyChains,function(t){for(var e,r=c.node(t).edgeObj,n=aV(c,h,r.v,r.w),i=n.path,a=n.lca,s=0,o=i[s],l=!0;t!==r.w;){if(e=c.node(t),l){for(;(o=i[s])!==a&&c.node(o).maxRanko||l>e[c].lim););for(i=c,c=n;(c=t.parent(c))!==i;)s.push(c);return{path:a.concat(s.reverse()),lca:i}}function sV(r){var n={},i=0;function a(t){var e=i;v(r.children(t),a),n[t]={low:e,lim:i++}}return me(a,"dfs"),v(r.children(),a),n}var oV=t(()=>{IW(),me(iV,"parentDummyChains"),me(aV,"findPath"),me(sV,"postorder")});function lV(c,t){var h={};function e(t,n){var a=0,s=0,o=t.length,l=kG(n);return v(n,function(t,e){var r=hV(c,t),i=r?c.node(r).order:o;!r&&t!==l||(v(n.slice(s,e+1),function(n){v(c.predecessors(n),function(t){var e=c.node(t),r=e.order;!(ri)&&uV(s,t,a)})})}function e(r,n){var i,a=-1,s=0;return v(n,function(t,e){"border"===o.node(t).dummy&&(t=o.predecessors(t)).length&&(i=o.node(t[0]).order,l(n,s,e,a,i),s=e,a=i),l(n,s,n.length,i,r.length)}),n}return me(l,"scan"),me(e,"visitLayer"),qj(t,e),s}function hV(e,t){if(e.node(t).dummy)return iU(e.predecessors(t),function(t){return e.node(t).dummy})}function uV(t,e,r){r{IW(),zW(),gY(),me(lV,"findType1Conflicts"),me(cV,"findType2Conflicts"),me(hV,"findOtherInnerSegmentNode"),me(uV,"addConflict"),me(dV,"hasConflict"),me(pV,"verticalAlignment"),me(gV,"horizontalCompaction"),me(fV,"buildBlockGraph"),me(mV,"findSmallestWidthAlignment"),me(yV,"alignCoordinates"),me(vV,"balance"),me(xV,"positionX"),me(bV,"sep"),me(wV,"width")});function TV(r){EV(r=iY(r)),TU(xV(r),function(t,e){r.node(e).x=t})}function EV(r){var t=sY(r),n=r.graph().ranksep,i=0;v(t,function(t){var e=Sq(x(t,function(t){return r.node(t).height}));v(t,function(t){r.node(t).y=i+e/2}),i+=e+n})}var CV=t(()=>{IW(),gY(),kV(),me(TV,"position"),me(EV,"positionY")});function _V(e,t){var r=t&&t.debugTiming?dY:pY;r("layout",()=>{var t=r(" buildLayoutGraph",()=>LV(e));r(" runLayout",()=>SV(t,r)),r(" updateInputGraph",()=>AV(e,t))})}function SV(t,e){e(" makeSpaceForEdgeLabels",()=>NV(t)),e(" removeSelfEdges",()=>$V(t)),e(" acyclic",()=>QW(t)),e(" nestingGraph.run",()=>TH(t)),e(" rank",()=>vH(iY(t))),e(" injectEdgeLabelProxies",()=>IV(t)),e(" removeEmptyRanks",()=>lY(t)),e(" nestingGraph.cleanup",()=>SH(t)),e(" normalizeRanks",()=>oY(t)),e(" assignRankMinMax",()=>RV(t)),e(" removeEdgeLabelProxies",()=>MV(t)),e(" normalize.run",()=>SY(t)),e(" parentDummyChains",()=>iV(t)),e(" addBorderSegments",()=>fY(t)),e(" order",()=>JH(t)),e(" insertSelfEdges",()=>zV(t)),e(" adjustCoordinateSystem",()=>vY(t)),e(" position",()=>TV(t)),e(" positionSelfEdges",()=>GV(t)),e(" removeBorderNodes",()=>FV(t)),e(" normalize.undo",()=>LY(t)),e(" fixupEdgeLabelCoords",()=>PV(t)),e(" undoCoordinateSystem",()=>xY(t)),e(" translateGraph",()=>DV(t)),e(" assignNodeIntersects",()=>OV(t)),e(" reversePoints",()=>BV(t)),e(" acyclic.undo",()=>tY(t))}function AV(n,i){v(n.nodes(),function(t){var e=n.node(t),r=i.node(t);e&&(e.x=r.x,e.y=r.y,i.children(t).length)&&(e.width=r.width,e.height=r.height)}),v(n.edges(),function(t){var e=n.edge(t),t=i.edge(t);e.points=t.points,Object.prototype.hasOwnProperty.call(t,"x")&&(e.x=t.x,e.y=t.y)}),n.graph().width=i.graph().width,n.graph().height=i.graph().height}function LV(r){var n=new FW({multigraph:!0,compound:!0}),t=qV(r.graph());return n.setGraph(sE({},WV,UV(t,jV),Cj(t,YV))),v(r.nodes(),function(t){var e=qV(r.node(t));n.setNode(t,lG(UV(e,HV),VV)),n.setParent(t,r.parent(t))}),v(r.edges(),function(t){var e=qV(r.edge(t));n.setEdge(t,sE({},KV,UV(e,XV),Cj(e,ZV)))}),n}function NV(e){var r=e.graph();r.ranksep/=2,v(e.edges(),function(t){(t=e.edge(t)).minlen*=2,"c"!==t.labelpos.toLowerCase()&&("TB"===r.rankdir||"BT"===r.rankdir?t.width+=t.labeloffset:t.height+=t.labeloffset)})}function IV(r){v(r.edges(),function(t){var e=r.edge(t);e.width&&e.height&&(e=r.node(t.v),e={rank:(r.node(t.w).rank-e.rank)/2+e.rank,e:t},rY(r,"edge-proxy",e,"_ep"))})}function RV(e){var r=0;v(e.nodes(),function(t){(t=e.node(t)).borderTop&&(t.minRank=e.node(t.borderTop).rank,t.maxRank=e.node(t.borderBottom).rank,r=Sq(r,t.maxRank))}),e.graph().maxRank=r}function MV(r){v(r.nodes(),function(t){var e=r.node(t);"edge-proxy"===e.dummy&&(r.edge(e.e).labelRank=e.rank,r.removeNode(t))})}function DV(e){var i=Number.POSITIVE_INFINITY,a=0,s=Number.POSITIVE_INFINITY,o=0,t=e.graph(),r=t.marginx||0,n=t.marginy||0;function l(t){var e=t.x,r=t.y,n=t.width,t=t.height;i=Math.min(i,e-n/2),a=Math.max(a,e+n/2),s=Math.min(s,r-t/2),o=Math.max(o,r+t/2)}me(l,"getExtremes"),v(e.nodes(),function(t){l(e.node(t))}),v(e.edges(),function(t){t=e.edge(t),Object.prototype.hasOwnProperty.call(t,"x")&&l(t)}),i-=r,s-=n,v(e.nodes(),function(t){(t=e.node(t)).x-=i,t.y-=s}),v(e.edges(),function(t){t=e.edge(t),v(t.points,function(t){t.x-=i,t.y-=s}),Object.prototype.hasOwnProperty.call(t,"x")&&(t.x-=i),Object.prototype.hasOwnProperty.call(t,"y")&&(t.y-=s)}),t.width=a-i+r,t.height=o-s+n}function OV(a){v(a.edges(),function(t){var e,r=a.edge(t),n=a.node(t.v),t=a.node(t.w),i=r.points?(e=r.points[0],r.points[r.points.length-1]):(r.points=[],e=t,n);r.points.unshift(aY(n,e)),r.points.push(aY(t,i))})}function PV(r){v(r.edges(),function(t){var e=r.edge(t);if(Object.prototype.hasOwnProperty.call(e,"x"))switch("l"!==e.labelpos&&"r"!==e.labelpos||(e.width-=e.labeloffset),e.labelpos){case"l":e.x-=e.width/2+e.labeloffset;break;case"r":e.x+=e.width/2+e.labeloffset}})}function BV(e){v(e.edges(),function(t){(t=e.edge(t)).reversed&&t.points.reverse()})}function FV(a){v(a.nodes(),function(t){var e,r,n,i;a.children(t).length&&(t=a.node(t),e=a.node(t.borderTop),r=a.node(t.borderBottom),n=a.node(kG(t.borderLeft)),i=a.node(kG(t.borderRight)),t.width=Math.abs(i.x-n.x),t.height=Math.abs(r.y-e.y),t.x=n.x+t.width/2,t.y=e.y+t.height/2)}),v(a.nodes(),function(t){"border"===a.node(t).dummy&&a.removeNode(t)})}function $V(r){v(r.edges(),function(t){var e;t.v===t.w&&((e=r.node(t.v)).selfEdges||(e.selfEdges=[]),e.selfEdges.push({e:t,label:r.edge(t)}),r.removeEdge(t))})}function zV(i){var t=sY(i);v(t,function(t){var n=0;v(t,function(t,e){var r=i.node(t);r.order=e+n,v(r.selfEdges,function(t){rY(i,"selfedge",{width:t.label.width,height:t.label.height,rank:r.rank,order:e+ ++n,e:t.e,label:t.label},"_se")}),delete r.selfEdges})})}function GV(s){v(s.nodes(),function(t){var e,r,n,i,a=s.node(t);"selfedge"===a.dummy&&(e=(i=s.node(a.e.v)).x+i.width/2,r=i.y,n=a.x-e,i=i.height/2,s.setEdge(a.e,a.label),s.removeNode(t),a.label.points=[{x:e+2*n/3,y:r-i},{x:e+5*n/6,y:r-i},{x:e+n,y:r},{x:e+5*n/6,y:r+i},{x:e+2*n/3,y:r+i}],a.label.x=a.x,a.label.y=a.y)})}function UV(t,e){return wq(Cj(t,e),Number)}function qV(t){var r={};return v(t,function(t,e){r[e.toLowerCase()]=t}),r}var jV,WV,YV,HV,VV,XV,KV,ZV,QV=t(()=>{IW(),zW(),yY(),_Y(),eY(),NY(),kH(),AH(),nV(),oV(),CV(),gY(),me(_V,"layout"),me(SV,"runLayout"),me(AV,"updateInputGraph"),jV=["nodesep","edgesep","ranksep","marginx","marginy"],WV={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},YV=["acyclicer","ranker","rankdir","align"],HV=["width","height"],VV={width:0,height:0},XV=["minlen","weight","width","height","labeloffset"],KV={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},ZV=["labelpos"],me(LV,"buildLayoutGraph"),me(NV,"makeSpaceForEdgeLabels"),me(IV,"injectEdgeLabelProxies"),me(RV,"assignRankMinMax"),me(MV,"removeEdgeLabelProxies"),me(DV,"translateGraph"),me(OV,"assignNodeIntersects"),me(PV,"fixupEdgeLabelCoords"),me(BV,"reversePointsForReversedEdges"),me(FV,"removeBorderNodes"),me($V,"removeSelfEdges"),me(zV,"insertSelfEdges"),me(GV,"positionSelfEdges"),me(UV,"selectNumberAttrs"),me(qV,"canonicalize")}),JV=t(()=>{eY(),QV(),NY(),kH()});function tX(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:eX(t),edges:rX(t)};return fq(t.graph())||(e.value=r$(t.graph())),e}function eX(n){return x(n.nodes(),function(t){var e=n.node(t),r=n.parent(t),t={v:t};return fq(e)||(t.value=e),fq(r)||(t.parent=r),t})}function rX(n){return x(n.edges(),function(t){var e=n.edge(t),r={v:t.v,w:t.w};return fq(t.name)||(r.name=t.name),fq(e)||(r.value=e),r})}var nX,iX,aX,sX,oX,lX,cX,hX,uX,dX,pX,gX,fX,mX,yX,vX=t(()=>{IW(),$W(),me(tX,"write"),me(eX,"writeNodes"),me(rX,"writeEdges")}),xX=t(()=>{e(),zW(),vX(),nX=new Map,iX=new Map,aX=new Map,sX=me(()=>{iX.clear(),aX.clear(),nX.clear()},"clear"),oX=me((t,e)=>{var r=iX.get(e)||[];return M.trace("In isDescendant",e," ",t," = ",r.includes(t)),r.includes(t)},"isDescendant"),lX=me((t,e)=>{var r=iX.get(e)||[];return M.info("Descendants of ",e," is ",r),M.info("Edge is ",t),t.v!==e&&t.w!==e&&(r?r.includes(t.v)||oX(t.v,e)||oX(t.w,e)||r.includes(t.w):(M.debug("Tilt, ",e,",not in descendants"),!1))},"edgeInCluster"),cX=me((r,n,i,a)=>{M.warn("Copying children of ",r,"root",a,"data",n.node(r),a);var t=n.children(r)||[];r!==a&&t.push(r),M.warn("Copying (nodes) clusterId",r,"nodes",t),t.forEach(t=>{var e;0{M.info("Edge",t);var e=n.edge(t.v,t.w,t.name);M.info("Edge data",e,a);try{lX(t,a)?(M.info("Copying as ",t.v,t.w,e,t.name),i.setEdge(t.v,t.w,e,t.name),M.info("newGraph edges ",i.edges(),i.edge(i.edges()[0]))):M.info("Skipping copy of edge ",t.v,"--\x3e",t.w," rootId: ",a," clusterId:",r)}catch(t){M.error(t)}})),M.debug("Removing node",t),n.removeNode(t)})},"copy"),hX=me((t,e)=>{let r=e.children(t),n=[...r];for(var i of r)aX.set(i,t),n=[...n,...hX(i,e)];return n},"extractDescendants"),uX=me((t,e,r)=>{let n=t.edges().filter(t=>t.v===e||t.w===e),i=t.edges().filter(t=>t.v===r||t.w===r),a=n.map(t=>({v:t.v===e?r:t.v,w:t.w===e?e:t.w})),s=i.map(t=>({v:t.v,w:t.w}));return a.filter(e=>s.some(t=>e.v===t.v&&e.w===t.w))},"findCommonEdges"),dX=me((t,e,r)=>{var n,i=e.children(t);if(M.trace("Searching children of id ",t,i),i.length<1)return t;let a;for(n of i){var s=dX(n,e,r),o=uX(e,r,s);if(s){if(!(0nX.has(t)&&nX.get(t).externalConnections&&nX.has(t)?nX.get(t).id:t,"getAnchorId"),gX=me((a,t)=>{if(!a||10{oX(t.v,e)^oX(t.w,e)&&(M.warn("Edge: ",t," leaves cluster ",e),M.warn("Descendants of XXX ",e,": ",iX.get(e)),nX.get(e).externalConnections=!0)})):M.debug("Not a cluster ",e,iX)});for(var e of nX.keys()){var r=nX.get(e).id;(r=a.parent(r))!==e&&nX.has(r)&&!nX.get(r).externalConnections&&(nX.get(e).id=r)}a.edges().forEach(function(t){var e,r,n,i=a.edge(t);M.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),M.warn("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(a.edge(t))),t.v,M.warn("Fix XXX",nX,"ids:",t.v,t.w,"Translating: ",nX.get(t.v)," --- ",nX.get(t.w)),(nX.get(t.v)||nX.get(t.w))&&(M.warn("Fixing and trying - removing XXX",t.v,t.w,t.name),e=pX(t.v),r=pX(t.w),a.removeEdge(t.v,t.w,t.name),e!==t.v&&(n=a.parent(e),nX.get(n).externalConnections=!0,i.fromCluster=t.v),r!==t.w&&(n=a.parent(r),nX.get(n).externalConnections=!0,i.toCluster=t.w),M.warn("Fix Replacing with XXX",e,r,t.name),a.setEdge(e,r,i,t.name))}),M.warn("Adjusted Graph",tX(a)),fX(a,0),M.trace(nX)}},"adjustClustersAndEdges"),fX=me((r,n)=>{if(M.warn("extractor - ",n,tX(r),r.children("D")),10{if(0===t.length)return[];let r=Object.assign([],t);return t.forEach(t=>{t=e.children(t),t=mX(e,t),r=[...r,...t]}),r},"sorter"),yX=me(t=>mX(t,t.children()),"sortNodesByHierarchy")}),bX={};oPt(bX,{render:()=>kX});var wX,kX,TX,EX,CX,_X,SX,AX,LX,NX,IX,RX,MX,DX,OX,PX,BX,FX,$X,zX,GX=t(()=>{JV(),vX(),zW(),OD(),i(),xX(),UD(),YM(),DD(),e(),WM(),mu(),wX=me(async(t,i,a,s,o,l)=>{M.warn("Graph in recursive render:XAX",tX(i),o);let c=i.graph().rankdir,n=(M.trace("Dir in recursive render - dir:",c),t=t.insert("g").attr("class","root"),i.nodes()?M.info("Recursive render XXX",i.nodes()):M.info("No nodes found for",i),0{var t=i.edges().map(async function(t){var e=i.edge(t.v,t.w,t.name);M.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),M.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(i.edge(t))),M.info("Fix",nX,"ids:",t.v,t.w,"Translating: ",nX.get(t.v),nX.get(t.w)),await lD(r,e)});await Promise.all(t)},"processEdges")(),M.info("Graph before layout:",JSON.stringify(tX(i))),M.info("############################################# XXX"),M.info("### Layout ### XXX"),M.info("############################################# XXX"),_V(i),M.info("Graph after layout:",JSON.stringify(tX(i))),0),p=RM(l).subGraphTitleTotalMargin;return await Promise.all(yX(i).map(async function(t){var e,r=i.node(t);M.info("Position XBX => "+t+": ("+r.x,","+r.y,") width: ",r.width," height: ",r.height),r?.clusterNode?(r.y+=p,M.info("A tainted cluster node XBX1",t,r.id,r.width,r.height,r.x,r.y,i.parent(t)),nX.get(r.id).node=r,zD(r)):0 "+t.w+": "+JSON.stringify(e),e),e.points.forEach(t=>t.y+=p/2),i.node(t.v)),t=i.node(t.w),r=fD(h,e,nX,a,r,t,s);cD(e,r)}),i.nodes().forEach(function(t){var e=i.node(t);M.info(t,e.type,e.diff),e.isGroup&&(d=e.diff)}),M.warn("Returning from recursive render XAX",t,d),{elem:t,diff:d}},"recursiveRender"),kX=me(async(t,e)=>{let l=new FW({multigraph:!0,compound:!0}).setGraph({rankdir:t.direction,nodesep:t.config?.nodeSpacing||t.config?.flowchart?.nodeSpacing||t.nodeSpacing,ranksep:t.config?.rankSpacing||t.config?.flowchart?.rankSpacing||t.rankSpacing,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),r=e.select("g");MD(r,t.markers,t.type,t.diagramId),$D(),sD(),GM(),sX(),t.nodes.forEach(t=>{l.setNode(t.id,{...t}),t.parentId&&l.setParent(t.id,t.parentId)}),M.debug("Edges:",t.edges),t.edges.forEach(t=>{var e,r,n,i,a,s,o;t.start===t.end?(r=(e=t.start)+"---"+e+"---1",n=e+"---"+e+"---2",i=l.node(e),l.setNode(r,{domId:r,id:r,parentId:i.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),l.setParent(r,i.parentId),l.setNode(n,{domId:n,id:n,parentId:i.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),l.setParent(n,i.parentId),a=structuredClone(t),s=structuredClone(t),o=structuredClone(t),a.label="",a.arrowTypeEnd="none",a.id=e+"-cyclic-special-1",s.arrowTypeStart="none",s.arrowTypeEnd="none",s.id=e+"-cyclic-special-mid",o.label="",i.isGroup&&(a.fromCluster=e,o.toCluster=e),o.id=e+"-cyclic-special-2",o.arrowTypeStart="none",l.setEdge(e,r,a,e+"-cyclic-special-0"),l.setEdge(r,n,s,e+"-cyclic-special-1"),l.setEdge(n,e,o,e+"-cyc{qD(),e(),TX={},EX=me(t=>{for(var e of t)TX[e.name]=e},"registerLayoutLoaders"),me(()=>{EX([{name:"dagre",loader:me(async()=>Promise.resolve().then(()=>(GX(),bX)),"loader")}])},"registerDefaultLayoutLoaders")(),CX=me(async(t,e)=>{var r;if(t.layoutAlgorithm in TX)return(await(r=TX[t.layoutAlgorithm]).loader()).render(t,e,GD,{algorithm:r.algorithm});throw new Error("Unknown layout algorithm: "+t.layoutAlgorithm)},"render"),_X=me((t="",{fallback:e="dagre"}={})=>{if(t in TX)return t;if(e in TX)return M.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm")}),qX=t(()=>{eh(),e(),SX=me((t,e,r,n)=>{t.attr("class",r);var{width:r,height:i,x:a,y:s}=AX(t,e),n=(Vc(t,i,r,n),LX(a,s,r,i,e));t.attr("viewBox",n),M.debug(`viewBox configured: ${n} with padding: `+e)},"setupViewPortForSVG"),AX=me((t,e)=>({width:(t=t.node()?.getBBox()||{width:0,height:0,x:0,y:0}).width+2*e,height:t.height+2*e,x:t.x,y:t.y}),"calculateDimensionsWithPadding"),LX=me((t,e,r,n,i)=>t-i+` ${e-i} ${r} `+n,"createViewBox")}),jX=t(()=>{Q3(),mu(),e(),jM(),UX(),qX(),ZE(),NX=me(function(t,e){return e.db.getClasses()},"getClasses"),IX=me(async function(t,e,r,n){M.info("REF0:"),M.info("Drawing state diagram (v2)",e);let{securityLevel:i,flowchart:a,layout:s}=D(),o;"sandbox"===i&&(o=H("#i"+e));var l,c="sandbox"===i?o.nodes()[0].contentDocument:document,h=(M.debug("Before getData: "),n.db.getData()),u=(M.debug("Data: ",h),IM(e,i)),d=n.db.getDirection(),d=(h.type=n.type,h.layoutAlgorithm=_X(s),"dagre"===h.layoutAlgorithm&&"elk"===s&&M.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),h.direction=d,h.nodeSpacing=a?.nodeSpacing||50,h.rankSpacing=a?.rankSpacing||50,h.markers=["point","circle","cross"],h.diagramId=e,M.debug("REF1:",h),await CX(h,u),h.config.flowchart?.diagramPadding??8);HE.insertTitle(u,"flowchartTitleText",a?.titleTopMargin||0,n.db.getDiagramTitle()),SX(u,d,"flowchart",a?.useMaxWidth||!1);for(l of h.nodes){var p=H(`#${e} [id="${l.id}"]`);if(p&&l.link){let t=c.createElementNS("http://www.w3.org/2000/svg","a"),e=(t.setAttributeNS("http://www.w3.org/2000/svg","class",l.cssClasses),t.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===i?t.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):l.linkTarget&&t.setAttributeNS("http://www.w3.org/2000/svg","target",l.linkTarget),p.insert(function(){return t},":first-child")),r=p.select(".label-container"),n=(r&&e.append(function(){return r.node()}),p.select(".label"));n&&e.append(function(){return n.node()})}}},"draw"),RX={getClasses:NX,draw:IX}}),WX=t(()=>{function P(){this.yy={}}var t=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),B=[1,4],F=[1,3],$=[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],G=[2,2],U=[1,13],q=[1,14],j=[1,15],W=[1,16],Y=[1,23],H=[1,25],V=[1,26],X=[1,27],e=[1,49],r=[1,48],K=[1,29],Z=[1,30],Q=[1,31],J=[1,32],tt=[1,33],n=[1,44],i=[1,46],a=[1,42],s=[1,47],o=[1,43],l=[1,50],c=[1,45],h=[1,51],u=[1,52],et=[1,34],rt=[1,35],nt=[1,36],it=[1,37],at=[1,57],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],p=[1,61],g=[1,60],f=[1,62],st=[8,9,11,75,77,78],ot=[1,78],lt=[1,91],ct=[1,96],ht=[1,95],ut=[1,92],dt=[1,88],pt=[1,94],gt=[1,90],ft=[1,97],mt=[1,93],yt=[1,98],vt=[1,89],xt=[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],bt=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],wt=[44,60,89,102,105,106,109,111,114,115,116],kt=[1,121],Tt=[1,122],Et=[1,124],Ct=[1,123],_t=[44,60,62,74,89,102,105,106,109,111,114,115,116],St=[1,133],At=[1,147],Lt=[1,148],Nt=[1,149],It=[1,150],Rt=[1,135],Mt=[1,137],Dt=[1,141],Ot=[1,142],Pt=[1,143],Bt=[1,144],Ft=[1,145],$t=[1,146],zt=[1,151],Gt=[1,152],Ut=[1,131],qt=[1,132],jt=[1,139],Wt=[1,134],Yt=[1,138],Ht=[1,136],Vt=[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],Xt=[1,154],Kt=[1,156],v=[8,9,11],x=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],b=[1,176],w=[1,172],k=[1,173],T=[1,177],E=[1,174],C=[1,175],Zt=[77,116,119],_=[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],Qt=[10,106],Jt=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],S=[1,247],A=[1,245],L=[1,249],N=[1,243],I=[1,244],R=[1,246],M=[1,248],D=[1,250],te=[1,268],ee=[8,9,11,106],O=[8,9,10,11,60,84,105,106,109,110,111,112],B={trace:me(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,$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"},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]],performAction:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 2:this.$=[];break;case 3:(!Array.isArray(a[o])||0{(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"),NO={extension:fO,composition:mO,aggregation:yO,dependency:vO,lollipop:xO,point:bO,circle:wO,cross:kO,barb:TO,only_one:EO,zero_or_one:CO,one_or_more:SO,zero_or_more:_O,requirement_arrow:AO,requirement_contains:LO},IO=gO});async function DO(t,r,n){let i,a;"rect"===r.shape&&(r.rx&&r.ry?r.shape="roundedRect":r.shape="squareRect");var s=r.shape?_D[r.shape]:void 0;if(!s)throw new Error(`No such shape: ${r.shape}. Please check your syntax.`);if(r.link){let e;"sandbox"===n.config.securityLevel?e="_top":r.linkTarget&&(e=r.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",r.link).attr("target",e??null),a=await s(i,r,n)}else a=await s(t,r,n),i=a;return r.tooltip&&a.attr("title",r.tooltip),OO.set(r.id,i),r.haveCallback&&i.attr("class",i.attr("class")+" clickable"),i}var OO,PO,BO,$O,FO,zO=e(()=>{t(),zD(),OO=new Map,mt(DO,"insertNode"),PO=mt((e,t)=>{OO.set(t.id,e)},"setNodeElem"),BO=mt(()=>{OO.clear()},"clear"),$O=mt(e=>{var t=OO.get(e.id),r=(M.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")}),GO=e(()=>{Nn(),eh(),t(),jD(),RO(),MO(),zO(),i(),KC(),FO={common:L,getConfig:Ir,insertCluster:$D,insertEdge:pO,insertEdgeLabel:sO,insertMarkers:IO,insertNode:DO,interpolateToCurve:lC,labelHelper:XL,log:M,positionEdgeLabel:oO}});function UO(e){return"symbol"==typeof e||G7(e)&&"[object Symbol]"==x6(e)}var qO,jO=e(()=>{b6(),U7(),mt(UO,"isSymbol"),qO=UO});function WO(e,t){for(var r=-1,n=null==e?0:e.length,i=Array(n);++r{mt(WO,"arrayMap"),YO=WO});function VO(e){var t;return"string"==typeof e?e:K7(e)?YO(e,VO)+"":qO(e)?ZO?ZO.call(e):"":"0"==(t=e+"")&&1/e==-XO?"-0":t}var XO,KO,ZO,QO,JO=e(()=>{i6(),HO(),J7(),jO(),XO=1/0,KO=Yw?Yw.prototype:void 0,ZO=KO?KO.toString:void 0,mt(VO,"baseToString"),QO=VO});function eP(e){for(var t=e.length;t--&&tP.test(e.charAt(t)););return t}var tP,rP,nP=e(()=>{tP=/\s/,mt(eP,"trimmedEndIndex"),rP=eP});function iP(e){return e&&e.slice(0,rP(e)+1).replace(aP,"")}var aP,sP,oP=e(()=>{nP(),aP=/^\s+/,mt(iP,"baseTrim"),sP=iP});function lP(e){if("number"==typeof e)return e;if(qO(e))return cP;if(k6(e)&&(t="function"==typeof e.valueOf?e.valueOf():e,e=k6(t)?t+"":t),"string"!=typeof e)return 0===e?e:+e;e=sP(e);var t=uP.test(e);return t||dP.test(e)?pP(e.slice(2),t?2:8):hP.test(e)?cP:+e}var cP,hP,uP,dP,pP,gP,fP=e(()=>{oP(),T6(),jO(),cP=NaN,hP=/^[-+]0x[0-9a-f]+$/i,uP=/^0b[01]+$/i,dP=/^0o[0-7]+$/i,pP=parseInt,mt(lP,"toNumber"),gP=lP});function mP(e){return e?(e=gP(e))===1/0||e===-1/0?17976931348623157e292*(e<0?-1:1):e==e?e:0:0===e?e:0}var yP,vP=e(()=>{fP(),mt(mP,"toFinite"),yP=mP});function xP(e){var t=(e=yP(e))%1;return e==e?t?e-t:e:0}var bP,wP,kP,TP=e(()=>{vP(),mt(xP,"toInteger"),bP=xP}),EP=e(()=>{ek(),n6(),wP=Z6(jw,"WeakMap"),kP=wP});function CP(){}var SP,_P=e(()=>{mt(CP,"noop"),SP=CP});function AP(e,t){for(var r=-1,n=null==e?0:e.length;++r{mt(AP,"arrayEach"),LP=AP});function IP(e,t,r,n){for(var i=e.length,a=r+(n?1:-1);n?a--:++a{mt(IP,"baseFindIndex"),RP=IP});function DP(e){return e!=e}var OP,PP=e(()=>{mt(DP,"baseIsNaN"),OP=DP});function BP(e,t,r){for(var n=r-1,i=e.length;++n{mt(BP,"strictIndexOf"),$P=BP});function zP(e,t,r){return t==t?$P(e,t,r):RP(e,OP,r)}var GP,UP=e(()=>{MP(),PP(),FP(),mt(zP,"baseIndexOf"),GP=zP});function qP(e,t){return!(null==e||!e.length)&&-1{UP(),mt(qP,"arrayIncludes"),jP=qP}),VP=e(()=>{I7(),WP=A7(Object.keys,Object),YP=WP});function XP(e){if(!O7(e))return YP(e);var t,r=[];for(t in Object(e))ZP.call(e,t)&&"constructor"!=t&&r.push(t);return r}var KP,ZP,QP,JP=e(()=>{P7(),VP(),KP=Object.prototype,ZP=KP.hasOwnProperty,mt(XP,"baseKeys"),QP=XP});function eB(e){return(i8(e)?sE:QP)(e)}var tB,rB,nB,iB,aB=e(()=>{oE(),JP(),a8(),mt(eB,"keys"),tB=eB}),sB=e(()=>{Y8(),X8(),sC(),a8(),P7(),aB(),nB=Object.prototype,rB=nB.hasOwnProperty,nB=nC(function(e,t){if(O7(t)||i8(t))V8(t,tB(t),e);else for(var r in t)rB.call(t,r)&&W8(e,r,t[r])}),iB=nB});function oB(e,t){var r;return!K7(e)&&(!("number"!=(r=typeof e)&&"symbol"!=r&&"boolean"!=r&&null!=e&&!qO(e))||cB.test(e)||!lB.test(e)||null!=t&&e in Object(t))}var lB,cB,hB,uB=e(()=>{J7(),jO(),lB=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,cB=/^\w*$/,mt(oB,"isKey"),hB=oB});function dB(e){var t=(e=CT(e,function(e){return 500===t.size&&t.clear(),e})).cache;return e}var pB,gB,fB,mB,yB,vB=e(()=>{ST(),mt(dB,"memoizeCapped"),pB=dB}),xB=e(()=>{vB(),gB=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,fB=/\\(\\)?/g,mB=pB(function(e){var i=[];return 46===e.charCodeAt(0)&&i.push(""),e.replace(gB,function(e,t,r,n){i.push(r?n.replace(fB,"$1"):t||e)}),i}),yB=mB});function bB(e){return null==e?"":QO(e)}var wB,kB=e(()=>{JO(),mt(bB,"toString"),wB=bB});function TB(e,t){return K7(e)?e:hB(e,t)?[e]:yB(wB(e))}var EB,CB=e(()=>{J7(),uB(),xB(),kB(),mt(TB,"castPath"),EB=TB});function SB(e){var t;return"string"==typeof e||qO(e)?e:"0"==(t=e+"")&&1/e==-1/0?"-0":t}var _B,AB=e(()=>{jO(),mt(SB,"toKey"),_B=SB});function LB(e,t){for(var r=0,n=(t=EB(t,e)).length;null!=e&&r{CB(),AB(),mt(LB,"baseGet"),NB=LB});function RB(e,t,r){return void 0===(e=null==e?void 0:NB(e,t))?r:e}var MB,DB=e(()=>{IB(),mt(RB,"get"),MB=RB});function OB(e,t){for(var r=-1,n=t.length,i=e.length;++r{mt(OB,"arrayPush"),PB=OB});function $B(e){return K7(e)||V7(e)||!!(FB&&e&&e[FB])}var FB,zB,GB=e(()=>{i6(),Q7(),J7(),FB=Yw?Yw.isConcatSpreadable:void 0,mt($B,"isFlattenable"),zB=$B});function UB(e,t,r,n,i){var a=-1,s=e.length;for(r=r||zB,i=i||[];++a{BB(),GB(),mt(UB,"baseFlatten"),qB=UB});function WB(e){return null!=e&&e.length?qB(e,1):[]}var YB,HB=e(()=>{jB(),mt(WB,"flatten"),YB=WB});function VB(e){return HE(PE(e,void 0,YB),e+"")}var XB,KB=e(()=>{HB(),BE(),XE(),mt(VB,"flatRest"),XB=VB});function ZB(e,t,r){var n=-1,i=e.length;(r=i>>0,t>>>=0;for(var a=Array(i);++n{mt(ZB,"baseSlice"),QB=ZB});function e$(e){return t$.test(e)}var t$,r$,n$=e(()=>{t$=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),mt(e$,"hasUnicode"),r$=e$});function i$(e,t,r,n){var i=-1,a=null==e?0:e.length;for(n&&a&&(r=e[++i]);++i{mt(i$,"arrayReduce"),a$=i$});function o$(e,t){return e&&V8(t,tB(t),e)}var l$,c$=e(()=>{X8(),aB(),mt(o$,"baseAssign"),l$=o$});function h$(e,t){return e&&V8(t,yE(t),e)}var u$,d$=e(()=>{X8(),vE(),mt(h$,"baseAssignIn"),u$=h$});function p$(e,t){for(var r=-1,n=null==e?0:e.length,i=0,a=[];++r{mt(p$,"arrayFilter"),g$=p$});function m$(){return[]}var y$,v$,x$,b$,w$,k$=e(()=>{mt(m$,"stubArray"),y$=m$}),T$=e(()=>{f$(),k$(),v$=Object.prototype,x$=v$.propertyIsEnumerable,w$=(b$=Object.getOwnPropertySymbols)?function(t){return null==t?[]:(t=Object(t),g$(b$(t),function(e){return x$.call(t,e)}))}:y$});function E$(e,t){return V8(e,w$(e),t)}var C$,S$,_$,A$=e(()=>{X8(),T$(),mt(E$,"copySymbols"),C$=E$}),L$=e(()=>{BB(),R7(),T$(),k$(),S$=Object.getOwnPropertySymbols,_$=S$?function(e){for(var t=[];e;)PB(t,w$(e)),e=N7(e);return t}:y$});function N$(e,t){return V8(e,_$(e),t)}var I$,R$=e(()=>{X8(),L$(),mt(N$,"copySymbolsIn"),I$=N$});function M$(e,t,r){return t=t(e),K7(e)?t:PB(t,r(e))}var D$,O$=e(()=>{BB(),J7(),mt(M$,"baseGetAllKeys"),D$=M$});function P$(e){return D$(e,tB,w$)}var B$,$$=e(()=>{O$(),T$(),aB(),mt(P$,"getAllKeys"),B$=P$});function F$(e){return D$(e,yE,_$)}var z$,G$,U$,q$,j$,W$,Y$,H$,V$,X$,K$,Z$,Q$,J$,eF,tF,rF,nF,iF,aF=e(()=>{O$(),L$(),vE(),mt(F$,"getAllKeysIn"),z$=F$}),sF=e(()=>{ek(),n6(),G$=Z6(jw,"DataView"),U$=G$}),oF=e(()=>{ek(),n6(),q$=Z6(jw,"Promise"),j$=q$}),lF=e(()=>{ek(),n6(),W$=Z6(jw,"Set"),Y$=W$}),cF=e(()=>{sF(),Qk(),oF(),lF(),EP(),b6(),$6(),H$="[object Map]",V$="[object Promise]",X$="[object Set]",K$="[object WeakMap]",Z$="[object DataView]",Q$=B6(U$),J$=B6(Kk),eF=B6(j$),tF=B6(Y$),rF=B6(kP),nF=x6,(U$&&nF(new U$(new ArrayBuffer(1)))!=Z$||Kk&&nF(new Kk)!=H$||j$&&nF(j$.resolve())!=V$||Y$&&nF(new Y$)!=X$||kP&&nF(new kP)!=K$)&&(nF=mt(function(e){var t=x6(e);if(e=(e="[object Object]"==t?e.constructor:void 0)?B6(e):"")switch(e){case Q$:return Z$;case J$:return H$;case eF:return V$;case tF:return X$;case rF:return K$}return t},"getTag")),iF=nF});function hF(e){var t=e.length,r=new e.constructor(t);return t&&"string"==typeof e[0]&&dF.call(e,"index")&&(r.index=e.index,r.input=e.input),r}var uF,dF,pF,gF=e(()=>{uF=Object.prototype,dF=uF.hasOwnProperty,mt(hF,"initCloneArray"),pF=hF});function fF(e,t){return t=t?m7(e.buffer):e.buffer,new e.constructor(t,e.byteOffset,e.byteLength)}var mF,yF=e(()=>{y7(),mt(fF,"cloneDataView"),mF=fF});function vF(e){var t=new e.constructor(e.source,xF.exec(e));return t.lastIndex=e.lastIndex,t}var xF,bF,wF=e(()=>{xF=/\w*$/,mt(vF,"cloneRegExp"),bF=vF});function kF(e){return EF?Object(EF.call(e)):{}}var TF,EF,CF,SF=e(()=>{i6(),TF=Yw?Yw.prototype:void 0,EF=TF?TF.valueOf:void 0,mt(kF,"cloneSymbol"),CF=kF});function _F(e,t,r){var n=e.constructor;switch(t){case"[object ArrayBuffer]":return m7(e);case"[object Boolean]":case"[object Date]":return new n(+e);case"[object DataView]":return mF(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 x7(e,r);case"[object Map]":return new n;case"[object Number]":case"[object String]":return new n(e);case"[object RegExp]":return bF(e);case"[object Set]":return new n;case"[object Symbol]":return CF(e)}}var AF,LF=e(()=>{y7(),yF(),wF(),SF(),b7(),mt(_F,"initCloneByTag"),AF=_F});function NF(e){return G7(e)&&"[object Map]"==iF(e)}var IF,RF,MF,DF=e(()=>{cF(),U7(),mt(NF,"baseIsMap"),IF=NF}),OF=e(()=>{DF(),P8(),B8(),RF=(RF=M8&&M8.isMap)?L8(RF):IF,MF=RF});function PF(e){return G7(e)&&"[object Set]"==iF(e)}var BF,$F,FF,zF=e(()=>{cF(),U7(),mt(PF,"baseIsSet"),BF=PF}),GF=e(()=>{zF(),P8(),B8(),$F=($F=M8&&M8.isSet)?L8($F):BF,FF=$F});function UF(r,n,i,e,t,a){var s,o=n&qF,l=n&jF,c=n&WF;if(void 0===(s=i?t?i(r,e,t,a):i(r):s)){if(!k6(r))return r;if(e=K7(r)){if(s=pF(r),!o)return k7(r,s)}else{var h=iF(r),u=h==HF||h==VF;if(p8(r))return h7(r,o);if(h==XF||h==YF||u&&!t){if(s=l||u?{}:$7(r),!o)return l?I$(r,u$(s,r)):C$(r,l$(s,r))}else{if(!KF[h])return t?r:{};s=AF(r,h,o)}}if(u=(a=a||new qT).get(r))return u;a.set(r,s),FF(r)?r.forEach(function(e){s.add(UF(e,n,i,e,r,a))}):MF(r)&&r.forEach(function(e,t){s.set(t,UF(e,n,i,t,r,a))});var d=e?void 0:(c?l?z$:B$:l?yE:tB)(r);LP(d||r,function(e,t){d&&(e=r[t=e]),W8(s,t,UF(e,n,i,t,r,a))})}return s}var qF,jF,WF,YF,HF,VF,XF,KF,ZF,QF=e(()=>{YT(),NP(),Y8(),c$(),d$(),p7(),C7(),A$(),R$(),$$(),aF(),cF(),gF(),LF(),F7(),J7(),f8(),OF(),T6(),GF(),aB(),vE(),qF=1,jF=2,WF=4,HF="[object Function]",VF="[object GeneratorFunction]",XF="[object Object]",(KF={})[YF="[object Arguments]"]=KF["[object Array]"]=KF["[object ArrayBuffer]"]=KF["[object DataView]"]=KF["[object Boolean]"]=KF["[object Date]"]=KF["[object Float32Array]"]=KF["[object Float64Array]"]=KF["[object Int8Array]"]=KF["[object Int16Array]"]=KF["[object Int32Array]"]=KF["[object Map]"]=KF["[object Number]"]=KF[XF]=KF["[object RegExp]"]=KF["[object Set]"]=KF["[object String]"]=KF["[object Symbol]"]=KF["[object Uint8Array]"]=KF["[object Uint8ClampedArray]"]=KF["[object Uint16Array]"]=KF["[object Uint32Array]"]=!0,KF["[object Error]"]=KF[HF]=KF["[object WeakMap]"]=!1,mt(UF,"baseClone"),ZF=UF});function JF(e){return ZF(e,4)}var ez,tz=e(()=>{QF(),mt(JF,"clone"),ez=JF});function rz(e){return ZF(e,5)}var nz,iz=e(()=>{QF(),mt(rz,"cloneDeep"),nz=rz});function az(e){for(var t=-1,r=null==e?0:e.length,n=0,i=[];++t{mt(az,"compact"),sz=az});function lz(e){return this.__data__.set(e,"__lodash_hash_undefined__"),this}var cz,hz=e(()=>{mt(lz,"setCacheAdd"),cz=lz});function uz(e){return this.__data__.has(e)}var dz,pz=e(()=>{mt(uz,"setCacheHas"),dz=uz});function gz(e){var t=-1,r=null==e?0:e.length;for(this.__data__=new wT;++t{kT(),hz(),pz(),mt(gz,"SetCache"),gz.prototype.add=gz.prototype.push=cz,gz.prototype.has=dz,fz=gz});function yz(e,t){for(var r=-1,n=null==e?0:e.length;++r{mt(yz,"arraySome"),vz=yz});function bz(e,t){return e.has(t)}var wz,kz=e(()=>{mt(bz,"cacheHas"),wz=bz});function Tz(e,t,r,n,i,a){var s=1&r,o=e.length;if(o!=(l=t.length)&&!(s&&o{mz(),xz(),kz(),mt(Tz,"equalArrays"),Ez=Tz});function Sz(e){var r=-1,n=Array(e.size);return e.forEach(function(e,t){n[++r]=[t,e]}),n}var _z,Az=e(()=>{mt(Sz,"mapToArray"),_z=Sz});function Lz(e){var t=-1,r=Array(e.size);return e.forEach(function(e){r[++t]=e}),r}var Nz,Iz=e(()=>{mt(Lz,"setToArray"),Nz=Lz});function Rz(e,t,r,n,i,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 d7(e),new d7(t)));case"[object Boolean]":case"[object Date]":case"[object Number]":return Ak(+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=_z;case"[object Set]":var l,o=o||Nz;return!!(e.size==t.size||1&n)&&((l=s.get(e))?l==t:(n|=2,s.set(e,t),l=Ez(o(e),o(t),n,i,a,s),s.delete(e),l));case"[object Symbol]":if(Dz)return Dz.call(e)==Dz.call(t)}return!1}var Mz,Dz,Oz,Pz=e(()=>{i6(),g7(),Lk(),Cz(),Az(),Iz(),Mz=Yw?Yw.prototype:void 0,Dz=Mz?Mz.valueOf:void 0,mt(Rz,"equalByTag"),Oz=Rz});function Bz(e,t,r,n,i,a){var s=1&r,o=B$(e),l=o.length;if(l!=B$(t).length&&!s)return!1;for(var c=l;c--;){var h=o[c];if(!(s?h in t:Fz.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{$$(),$z=Object.prototype,Fz=$z.hasOwnProperty,mt(Bz,"equalObjects"),zz=Bz});function Uz(e,t,r,n,i,a){var s=K7(e),o=K7(t),l=s?jz:iF(e),o=o?jz:iF(t),c=(l=l==qz?Wz:l)==Wz,h=(o=o==qz?Wz:o)==Wz;if((o=l==o)&&p8(e)){if(!p8(t))return!1;c=!(s=!0)}return o&&!c?(a=a||new qT,s||O8(e)?Ez(e,t,r,n,i,a):Oz(e,t,l,r,n,i,a)):1&r||(s=c&&Hz.call(e,"__wrapped__"),l=h&&Hz.call(t,"__wrapped__"),!s&&!l)?o&&(a=a||new qT,zz(e,t,r,n,i,a)):i(s?e.value():e,l?t.value():t,r,n,a=a||new qT)}var qz,jz,Wz,Yz,Hz,Vz,Xz=e(()=>{YT(),Cz(),Pz(),Gz(),cF(),J7(),f8(),$8(),qz="[object Arguments]",jz="[object Array]",Wz="[object Object]",Yz=Object.prototype,Hz=Yz.hasOwnProperty,mt(Uz,"baseIsEqualDeep"),Vz=Uz});function Kz(e,t,r,n,i){return e===t||(null==e||null==t||!G7(e)&&!G7(t)?e!=e&&t!=t:Vz(e,t,r,n,Kz,i))}var Zz,Qz=e(()=>{Xz(),U7(),mt(Kz,"baseIsEqual"),Zz=Kz});function Jz(e,t,r,n){var i=r.length,a=i,s=!n;if(null==e)return!a;for(e=Object(e);i--;){var o=r[i];if(s&&o[2]?o[1]!==e[o[0]]:!(o[0]in e))return!1}for(;++i{YT(),Qz(),mt(Jz,"baseIsMatch"),eG=Jz});function rG(e){return e==e&&!k6(e)}var nG,iG=e(()=>{T6(),mt(rG,"isStrictComparable"),nG=rG});function aG(e){for(var t=tB(e),r=t.length;r--;){var n=t[r],i=e[n];t[r]=[n,i,nG(i)]}return t}var sG,oG=e(()=>{iG(),aB(),mt(aG,"getMatchData"),sG=aG});function lG(t,r){return function(e){return null!=e&&e[t]===r&&(void 0!==r||t in Object(e))}}var cG,hG=e(()=>{mt(lG,"matchesStrictComparable"),cG=lG});function uG(t){var r=sG(t);return 1==r.length&&r[0][2]?cG(r[0][0],r[0][1]):function(e){return e===t||eG(e,t,r)}}var dG,pG=e(()=>{tG(),oG(),hG(),mt(uG,"baseMatches"),dG=uG});function gG(e,t){return null!=e&&t in Object(e)}var fG,mG=e(()=>{mt(gG,"baseHasIn"),fG=gG});function yG(e,t,r){for(var n=-1,i=(t=EB(t,e)).length,a=!1;++n{CB(),Q7(),J7(),rE(),r8(),AB(),mt(yG,"hasPath"),vG=yG});function bG(e,t){return null!=e&&vG(e,t,fG)}var wG,kG=e(()=>{mG(),xG(),mt(bG,"hasIn"),wG=bG});function TG(r,n){return hB(r)&&nG(n)?cG(_B(r),n):function(e){var t=MB(e,r);return void 0===t&&t===n?wG(e,r):Zz(n,t,3)}}var EG,CG=e(()=>{Qz(),DB(),kG(),uB(),iG(),hG(),AB(),mt(TG,"baseMatchesProperty"),EG=TG});function SG(t){return function(e){return e?.[t]}}var _G,AG=e(()=>{mt(SG,"baseProperty"),_G=SG});function LG(t){return function(e){return NB(e,t)}}var NG,IG=e(()=>{IB(),mt(LG,"basePropertyDeep"),NG=LG});function RG(e){return hB(e)?_G(_B(e)):NG(e)}var MG,DG=e(()=>{AG(),IG(),uB(),AB(),mt(RG,"property"),MG=RG});function OG(e){return"function"==typeof e?e:null==e?LE:"object"==typeof e?K7(e)?EG(e[0],e[1]):dG(e):MG(e)}var PG,BG=e(()=>{pG(),CG(),NE(),J7(),DG(),mt(OG,"baseIteratee"),PG=OG});function $G(e,t,r,n){for(var i=-1,a=null==e?0:e.length;++i{mt($G,"arrayAggregator"),FG=$G});function GG(e,t){return e&&n7(e,t,tB)}var UG,qG=e(()=>{a7(),aB(),mt(GG,"baseForOwn"),UG=GG});function jG(a,s){return function(e,t){if(null!=e){if(!i8(e))return a(e,t);for(var r=e.length,n=s?r:-1,i=Object(e);(s?n--:++n{a8(),mt(jG,"createBaseEach"),WG=jG}),XG=e(()=>{qG(),VG(),YG=WG(UG),HG=YG});function KG(e,n,i,a){return HG(e,function(e,t,r){n(a,e,i(e),r)}),a}var ZG,QG=e(()=>{XG(),mt(KG,"baseAggregator"),ZG=KG});function JG(i,a){return function(e,t){var r=K7(e)?FG:ZG,n=a?a():{};return r(e,i,PG(t,2),n)}}var eU,tU,rU,nU,iU,aU,sU,oU=e(()=>{zG(),QG(),BG(),J7(),mt(JG,"createAggregator"),eU=JG}),lU=e(()=>{n6(),tU=mt(function(){return jw.Date.now()},"now"),rU=tU}),cU=e(()=>{QE(),Lk(),tC(),vE(),nU=Object.prototype,iU=nU.hasOwnProperty,aU=ZE(function(e,t){e=Object(e);var r=-1,n=t.length,i=2{mt(hU,"arrayIncludesWith"),uU=hU});function pU(e,t,r,n){var i=-1,a=jP,s=!0,o=e.length,l=[],c=t.length;if(o){r&&(t=YO(t,L8(r))),n?(a=uU,s=!1):200<=t.length&&(a=wz,s=!1,t=new fz(t));e:for(;++i{mz(),HP(),dU(),HO(),P8(),kz(),mt(pU,"baseDifference"),gU=pU}),vU=e(()=>{yU(),jB(),QE(),l8(),fU=ZE(function(e,t){return o8(e)?gU(e,qB(t,1,o8,!0)):[]}),mU=fU});function xU(e){var t=null==e?0:e.length;return t?e[t-1]:void 0}var bU,wU=e(()=>{mt(xU,"last"),bU=xU});function kU(e,t,r){var n=null==e?0:e.length;return n?(t=r||void 0===t?1:bP(t),QB(e,t<0?0:t,n)):[]}var TU,EU=e(()=>{JB(),TP(),mt(kU,"drop"),TU=kU});function CU(e,t,r){var n=null==e?0:e.length;return n?(t=r||void 0===t?1:bP(t),QB(e,0,(t=n-t)<0?0:t)):[]}var SU,_U=e(()=>{JB(),TP(),mt(CU,"dropRight"),SU=CU});function AU(e){return"function"==typeof e?e:LE}var LU,NU=e(()=>{NE(),mt(AU,"castFunction"),LU=AU});function IU(e,t){return(K7(e)?LP:HG)(e,LU(t))}var v,RU=e(()=>{NP(),XG(),NU(),J7(),mt(IU,"forEach"),v=IU}),MU=e(()=>{RU()});function DU(e,t){for(var r=-1,n=null==e?0:e.length;++r{mt(DU,"arrayEvery"),OU=DU});function BU(e,n){var i=!0;return HG(e,function(e,t,r){return i=!!n(e,t,r)}),i}var $U,FU=e(()=>{XG(),mt(BU,"baseEvery"),$U=BU});function zU(e,t,r){var n=K7(e)?OU:$U;return r&&eC(e,t,r)&&(t=void 0),n(e,PG(t,3))}var GU,UU=e(()=>{PU(),FU(),BG(),J7(),tC(),mt(zU,"every"),GU=zU});function qU(e,n){var i=[];return HG(e,function(e,t,r){n(e,t,r)&&i.push(e)}),i}var jU,WU=e(()=>{XG(),mt(qU,"baseFilter"),jU=qU});function YU(e,t){return(K7(e)?g$:jU)(e,PG(t,3))}var HU,VU=e(()=>{f$(),WU(),BG(),J7(),mt(YU,"filter"),HU=YU});function XU(a){return function(e,t,r){var n,i=Object(e);return i8(e)||(n=PG(t,3),e=tB(e),t=mt(function(e){return n(i[e],e,i)},"predicate")),-1<(t=a(e,t,r))?i[n?e[t]:t]:void 0}}var KU,ZU=e(()=>{BG(),a8(),aB(),mt(XU,"createFind"),KU=XU});function QU(e,t,r){var n=null==e?0:e.length;return n?((r=null==r?0:bP(r))<0&&(r=JU(n+r,0)),RP(e,PG(t,3),r)):-1}var JU,eq,tq,rq,nq=e(()=>{MP(),BG(),TP(),JU=Math.max,mt(QU,"findIndex"),eq=QU}),iq=e(()=>{ZU(),nq(),tq=KU(eq),rq=tq});function aq(e){return e&&e.length?e[0]:void 0}var sq,oq=e(()=>{mt(aq,"head"),sq=aq}),lq=e(()=>{oq()});function cq(e,n){var i=-1,a=i8(e)?Array(e.length):[];return HG(e,function(e,t,r){a[++i]=n(e,t,r)}),a}var hq,uq=e(()=>{XG(),a8(),mt(cq,"baseMap"),hq=cq});function dq(e,t){return(K7(e)?YO:hq)(e,PG(t,3))}var x,pq=e(()=>{HO(),BG(),uq(),J7(),mt(dq,"map"),x=dq});function gq(e,t){return qB(x(e,t),1)}var fq,mq=e(()=>{jB(),pq(),mt(gq,"flatMap"),fq=gq});function yq(e,t){return null==e?e:n7(e,LU(t),yE)}var vq,xq=e(()=>{a7(),NU(),vE(),mt(yq,"forIn"),vq=yq});function bq(e,t){return e&&UG(e,LU(t))}var wq,kq,Tq,Eq,Cq=e(()=>{qG(),NU(),mt(bq,"forOwn"),wq=bq}),Sq=e(()=>{KT(),oU(),Tq=Object.prototype,kq=Tq.hasOwnProperty,Tq=eU(function(e,t,r){kq.call(e,r)?e[r].push(t):XT(e,r,[t])}),Eq=Tq});function _q(e,t){return t{mt(_q,"baseGt"),Aq=_q});function Nq(e,t){return null!=e&&Rq.call(e,t)}var Iq,Rq,Mq,Dq=e(()=>{Iq=Object.prototype,Rq=Iq.hasOwnProperty,mt(Nq,"baseHas"),Mq=Nq});function Oq(e,t){return null!=e&&vG(e,t,Mq)}var Pq,Bq=e(()=>{Dq(),xG(),mt(Oq,"has"),Pq=Oq});function $q(e){return"string"==typeof e||!K7(e)&&G7(e)&&"[object String]"==x6(e)}var Fq,zq=e(()=>{b6(),J7(),U7(),mt($q,"isString"),Fq=$q});function Gq(t,e){return YO(e,function(e){return t[e]})}var Uq,qq=e(()=>{HO(),mt(Gq,"baseValues"),Uq=Gq});function jq(e){return null==e?[]:Uq(e,tB(e))}var Wq,Yq=e(()=>{qq(),aB(),mt(jq,"values"),Wq=jq});function Hq(e,t,r,n){return e=i8(e)?e:Wq(e),r=r&&!n?bP(r):0,n=e.length,r<0&&(r=Vq(n+r,0)),Fq(e)?r<=n&&-1{UP(),a8(),zq(),TP(),Yq(),Vq=Math.max,mt(Hq,"includes"),Xq=Hq});function Zq(e,t,r){var n=null==e?0:e.length;return n?((r=null==r?0:bP(r))<0&&(r=Qq(n+r,0)),GP(e,t,r)):-1}var Qq,Jq,ej=e(()=>{UP(),TP(),Qq=Math.max,mt(Zq,"indexOf"),Jq=Zq});function tj(e){if(null!=e){if(i8(e)&&(K7(e)||"string"==typeof e||"function"==typeof e.splice||p8(e)||O8(e)||V7(e)))return!e.length;var t,r=iF(e);if("[object Map]"==r||"[object Set]"==r)return!e.size;if(O7(e))return!QP(e).length;for(t in e)if(nj.call(e,t))return!1}return!0}var rj,nj,ij,aj=e(()=>{JP(),cF(),Q7(),J7(),a8(),f8(),P7(),$8(),rj=Object.prototype,nj=rj.hasOwnProperty,mt(tj,"isEmpty"),ij=tj});function sj(e){return G7(e)&&"[object RegExp]"==x6(e)}var oj,lj,cj,hj=e(()=>{b6(),U7(),mt(sj,"baseIsRegExp"),oj=sj}),uj=e(()=>{hj(),P8(),B8(),lj=(lj=M8&&M8.isRegExp)?L8(lj):oj,cj=lj});function dj(e){return void 0===e}var pj,gj=e(()=>{mt(dj,"isUndefined"),pj=dj});function fj(e,t){return e{mt(fj,"baseLt"),mj=fj});function vj(e,n){var i={};return n=PG(n,3),UG(e,function(e,t,r){XT(i,t,n(e,t,r))}),i}var xj,bj=e(()=>{KT(),qG(),BG(),mt(vj,"mapValues"),xj=vj});function wj(e,t,r){for(var n=-1,i=e.length;++n{jO(),mt(wj,"baseExtremum"),kj=wj});function Ej(e){return e&&e.length?kj(e,LE,Aq):void 0}var Cj,Sj=e(()=>{Tj(),Lq(),NE(),mt(Ej,"max"),Cj=Ej});function _j(e){return e&&e.length?kj(e,LE,mj):void 0}var Aj,Lj=e(()=>{Tj(),yj(),NE(),mt(_j,"min"),Aj=_j});function Nj(e,t){return e&&e.length?kj(e,PG(t,2),mj):void 0}var Ij,Rj=e(()=>{Tj(),BG(),yj(),mt(Nj,"minBy"),Ij=Nj});function Mj(t){if("function"!=typeof t)throw new TypeError("Expected a function");return function(){var e=arguments;switch(e.length){case 0:return!t.call(this);case 1:return!t.call(this,e[0]);case 2:return!t.call(this,e[0],e[1]);case 3:return!t.call(this,e[0],e[1],e[2])}return!t.apply(this,e)}}var Dj,Oj=e(()=>{mt(Mj,"negate"),Dj=Mj});function Pj(e,t,r,n){if(k6(e))for(var i=-1,a=(t=EB(t,e)).length,s=a-1,o=e;null!=o&&++i{Y8(),CB(),rE(),T6(),AB(),mt(Pj,"baseSet"),Bj=Pj});function Fj(e,t,r){for(var n=-1,i=t.length,a={};++n{IB(),$j(),CB(),mt(Fj,"basePickBy"),zj=Fj});function Uj(e,r){var t;return null==e?{}:(t=YO(z$(e),function(e){return[e]}),r=PG(r),zj(e,t,function(e,t){return r(e,t[0])}))}var qj,jj=e(()=>{HO(),BG(),Gj(),aF(),mt(Uj,"pickBy"),qj=Uj});function Wj(e,t){var r=e.length;for(e.sort(t);r--;)e[r]=e[r].value;return e}var Yj,Hj=e(()=>{mt(Wj,"baseSortBy"),Yj=Wj});function Vj(e,t){if(e!==t){var r=void 0!==e,n=null===e,i=e==e,a=qO(e),s=void 0!==t,o=null===t,l=t==t,c=qO(t);if(!o&&!c&&!a&&t{jO(),mt(Vj,"compareAscending"),Xj=Vj});function Zj(e,t,r){for(var n=-1,i=e.criteria,a=t.criteria,s=i.length,o=r.length;++n{Kj(),mt(Zj,"compareMultiple"),Qj=Zj});function eW(e,n,r){n=n.length?YO(n,function(t){return K7(t)?function(e){return NB(e,1===t.length?t[0]:t)}:t}):[LE];var i=-1,e=(n=YO(n,L8(PG)),hq(e,function(t,e,r){return{criteria:YO(n,function(e){return e(t)}),index:++i,value:t}}));return Yj(e,function(e,t){return Qj(e,t,r)})}var tW,rW,nW,iW=e(()=>{HO(),IB(),BG(),uq(),Hj(),P8(),Jj(),NE(),J7(),mt(eW,"baseOrderBy"),tW=eW}),aW=e(()=>{AG(),rW=_G("length"),nW=rW});function sW(e){for(var t=gW.lastIndex=0;gW.test(e);)++t;return t}var oW,lW,cW,hW,uW,dW,pW,gW,fW,mW=e(()=>{oW="["+(hW="\\ud800-\\udfff")+"]",lW="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",cW="\\ud83c[\\udffb-\\udfff]",pW="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\\ud83c[\\udffb-\\udfff])?",dW="[\\ufe0e\\ufe0f]?",uW="(?:\\u200d(?:"+[hW="[^"+hW+"]","(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]"].join("|")+")"+dW+pW+")*",dW=dW+pW+uW,pW="(?:"+[hW+lW+"?",lW,"(?:\\ud83c[\\udde6-\\uddff]){2}","[\\ud800-\\udbff][\\udc00-\\udfff]",oW].join("|")+")",gW=RegExp(cW+"(?="+cW+")|"+pW+dW,"g"),mt(sW,"unicodeSize"),fW=sW});function yW(e){return(r$(e)?fW:nW)(e)}var vW,xW=e(()=>{aW(),n$(),mW(),mt(yW,"stringSize"),vW=yW});function bW(r,e){return zj(r,e,function(e,t){return wG(r,t)})}var wW,kW,TW,EW=e(()=>{Gj(),kG(),mt(bW,"basePick"),wW=bW}),CW=e(()=>{EW(),KB(),kW=XB(function(e,t){return null==e?{}:wW(e,t)}),TW=kW});function SW(e,t,r,n){for(var i=-1,a=AW(_W((t-e)/(r||1)),0),s=Array(a);a--;)s[n?a:++i]=e,e+=r;return s}var _W,AW,LW,NW=e(()=>{_W=Math.ceil,AW=Math.max,mt(SW,"baseRange"),LW=SW});function IW(n){return function(e,t,r){return r&&"number"!=typeof r&&eC(e,t,r)&&(t=r=void 0),e=yP(e),void 0===t?(t=e,e=0):t=yP(t),r=void 0===r?e{NW(),tC(),vP(),mt(IW,"createRange"),RW=IW}),PW=e(()=>{OW(),MW=RW(),DW=MW});function BW(e,n,i,a,t){return t(e,function(e,t,r){i=a?(a=!1,e):n(i,e,t,r)}),i}var $W,FW=e(()=>{mt(BW,"baseReduce"),$W=BW});function zW(e,t,r){var n=K7(e)?a$:$W,i=arguments.length<3;return n(e,PG(t,4),r,i,HG)}var GW,UW=e(()=>{s$(),XG(),BG(),FW(),J7(),mt(zW,"reduce"),GW=zW});function qW(e,t){return(K7(e)?g$:jU)(e,Dj(PG(t,3)))}var jW,WW=e(()=>{f$(),WU(),BG(),J7(),Oj(),mt(qW,"reject"),jW=qW});function YW(e){var t;return null==e?0:i8(e)?Fq(e)?vW(e):e.length:"[object Map]"==(t=iF(e))||"[object Set]"==t?e.size:QP(e).length}var HW,VW=e(()=>{JP(),cF(),a8(),zq(),xW(),mt(YW,"size"),HW=YW});function XW(e,n){var i;return HG(e,function(e,t,r){return!(i=n(e,t,r))}),!!i}var KW,ZW=e(()=>{XG(),mt(XW,"baseSome"),KW=XW});function QW(e,t,r){var n=K7(e)?vz:KW;return r&&eC(e,t,r)&&(t=void 0),n(e,PG(t,3))}var JW,eY,tY,rY,nY,iY=e(()=>{xz(),BG(),ZW(),J7(),tC(),mt(QW,"some"),JW=QW}),aY=e(()=>{jB(),iW(),QE(),tC(),eY=ZE(function(e,t){var r;return null==e?[]:(1<(r=t.length)&&eC(e,t[0],t[1])?t=[]:2{lF(),_P(),Iz(),rY=Y$&&1/Nz(new Y$([,-0]))[1]==1/0?function(e){return new Y$(e)}:SP,nY=rY});function oY(e,t,r){var n=-1,i=jP,a=e.length,s=!0,o=[],l=o;if(r)s=!1,i=uU;else if(200<=a){var c=t?null:nY(e);if(c)return Nz(c);s=!1,i=wz,l=new fz}else l=t?[]:o;e:for(;++n{mz(),HP(),dU(),kz(),sY(),Iz(),mt(oY,"baseUniq"),lY=oY}),dY=e(()=>{jB(),QE(),uY(),l8(),cY=ZE(function(e){return lY(qB(e,1,o8,!0))}),hY=cY});function pY(e){return e&&e.length?lY(e):[]}var gY,fY=e(()=>{uY(),mt(pY,"uniq"),gY=pY});function mY(e,t){return e&&e.length?lY(e,PG(t,2)):[]}var yY,vY=e(()=>{BG(),uY(),mt(mY,"uniqBy"),yY=mY});function xY(e){var t=++bY;return wB(e)+t}var bY,wY,kY=e(()=>{kB(),bY=0,mt(xY,"uniqueId"),wY=xY});function TY(e,t,r){for(var n=-1,i=e.length,a=t.length,s={};++n{mt(TY,"baseZipObject"),EY=TY});function SY(e,t){return EY(e||[],t||[],W8)}var _Y,AY=e(()=>{Y8(),CY(),mt(SY,"zipObject"),_Y=SY}),LY=e(()=>{sB(),tz(),iz(),oz(),GE(),cU(),vU(),EU(),_U(),MU(),UU(),VU(),iq(),lq(),mq(),HB(),RU(),xq(),Cq(),Sq(),Bq(),NE(),Kq(),ej(),J7(),aj(),A6(),T6(),uj(),zq(),gj(),aB(),wU(),pq(),bj(),Sj(),oC(),Lj(),Rj(),_P(),lU(),CW(),jj(),PW(),UW(),WW(),VW(),iY(),aY(),dY(),fY(),kY(),Yq(),AY()});function NY(e,t){e[t]?e[t]++:e[t]=1}function IY(e,t){--e[t]||delete e[t]}function RY(e,t,r,n){return t=""+t,r=""+r,!e&&r{LY(),OY="\0",(PY=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=FE(void 0),this._defaultEdgeLabelFn=FE(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[OY]={}),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 C6(e)||(e=FE(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return tB(this._nodes)}sources(){var t=this;return HU(this.nodes(),function(e){return ij(t._in[e])})}sinks(){var t=this;return HU(this.nodes(),function(e){return ij(t._out[e])})}setNodes(e,t){var r=arguments,n=this;return v(e,function(e){1this.removeEdge(this._edgeObjs[e]),"removeEdge"),delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],v(this.children(e),e=>{this.setParent(e)}),delete this._children[e]),v(tB(this._in[e]),t),delete this._in[e],delete this._preds[e],v(tB(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(pj(t))t=OY;else{for(var r=t+="";!pj(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&&(e=this._parent[e])!==OY)return e}children(e){var t;return pj(e)&&(e=OY),this._isCompound?(t=this._children[e])?tB(t):void 0:e===OY?this.nodes():this.hasNode(e)?[]:void 0}predecessors(e){if(e=this._preds[e])return tB(e)}successors(e){if(e=this._sucs[e])return tB(e)}neighbors(e){var t=this.predecessors(e);if(t)return hY(t,this.successors(e))}isLeaf(e){return 0===(e=this.isDirected()?this.successors(e):this.neighbors(e)).length}filterNodes(r){var n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound}),i=(n.setGraph(this.graph()),this),a=(v(this._nodes,function(e,t){r(t)&&n.setNode(t,e)}),v(this._edgeObjs,function(e){n.hasNode(e.v)&&n.hasNode(e.w)&&n.setEdge(e,i.edge(e))}),{});function s(e){var t=i.parent(e);return void 0===t||n.hasNode(t)?a[e]=t:t in a?a[t]:s(t)}return mt(s,"findParent"),this._isCompound&&v(n.nodes(),function(e){n.setParent(e,s(e))}),n}setDefaultEdgeLabel(e){return C6(e)||(e=FE(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return Wq(this._edgeObjs)}setPath(e,r){var n=this,i=arguments;return GW(e,function(e,t){return 1{BY()});function FY(e){e._prev._next=e._next,e._next._prev=e._prev,delete e._next,delete e._prev}function zY(e,t){if("_next"!==e&&"_prev"!==e)return t}var GY,UY=e(()=>{GY=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 FY(t),t}enqueue(e){var t=this._sentinel;e._prev&&e._next&&FY(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,zY)),r=r._prev;return"["+e.join(", ")+"]"}},mt(FY,"unlink"),mt(zY,"filterOutLinks")});function qY(t,e){return t.nodeCount()<=1?[]:(e=jY((e=YY(t,e||VY)).graph,e.buckets,e.zeroIdx),YB(x(e,function(e){return t.outEdges(e.v,e.w)})))}function jY(e,t,r){for(var n,i=[],a=t[t.length-1],s=t[0];e.nodeCount();){for(;n=s.dequeue();)WY(e,t,r,n);for(;n=a.dequeue();)WY(e,t,r,n);if(e.nodeCount())for(var o=t.length-2;0{LY(),$Y(),UY(),VY=FE(1),mt(qY,"greedyFAS"),mt(jY,"doGreedyFAS"),mt(WY,"removeNode"),mt(YY,"buildState"),mt(HY,"assignBucket")});function KY(r){var e="greedy"===r.graph().acyclicer?qY(r,t(r)):ZY(r);function t(t){return function(e){return t.edge(e).weight}}v(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,wY("rev"))}),mt(t,"weightFn")}function ZY(t){var r=[],n={},i={};function a(e){Object.prototype.hasOwnProperty.call(i,e)||(i[e]=!0,n[e]=!0,v(t.outEdges(e),function(e){Object.prototype.hasOwnProperty.call(n,e.w)?r.push(e):a(e.w)}),delete n[e])}return mt(a,"dfs"),v(t.nodes(),a),r}function QY(n){v(n.edges(),function(e){var t,r=n.edge(e);r.reversed&&(n.removeEdge(e),t=r.forwardName,delete r.reversed,delete r.forwardName,n.setEdge(e.w,e.v,r,t))})}var JY=e(()=>{LY(),XY(),mt(KY,"run"),mt(ZY,"dfsFAS"),mt(QY,"undo")});function eH(e,t,r,n){for(var i;i=wY(n),e.hasNode(i););return r.dummy=t,e.setNode(i,r),i}function tH(n){var i=(new PY).setGraph(n.graph());return v(n.nodes(),function(e){i.setNode(e,n.node(e))}),v(n.edges(),function(e){var t=i.edge(e.v,e.w)||{weight:0,minlen:1},r=n.edge(e);i.setEdge(e.v,e.w,{weight:t.weight+r.weight,minlen:Math.max(t.minlen,r.minlen)})}),i}function rH(t){var r=new PY({multigraph:t.isMultigraph()}).setGraph(t.graph());return v(t.nodes(),function(e){t.children(e).length||r.setNode(e,t.node(e))}),v(t.edges(),function(e){r.setEdge(e,t.edge(e))}),r}function nH(e,t){var r,n=e.x,i=e.y,a=t.x-n,t=t.y-i,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:n+r,y:i+e};throw new Error("Not possible to find intersection inside of the rectangle")}function iH(n){var i=x(DW(lH(n)+1),function(){return[]});return v(n.nodes(),function(e){var t=n.node(e),r=t.rank;pj(r)||(i[r][t.order]=e)}),i}function aH(t){var r=Aj(x(t.nodes(),function(e){return t.node(e).rank}));v(t.nodes(),function(e){e=t.node(e),Pq(e,"rank")&&(e.rank-=r)})}function sH(r){var n=Aj(x(r.nodes(),function(e){return r.node(e).rank})),i=[],a=(v(r.nodes(),function(e){var t=r.node(e).rank-n;i[t]||(i[t]=[]),i[t].push(e)}),0),s=r.graph().nodeRankFactor;v(i,function(e,t){pj(e)&&t%s!=0?--a:a&&v(e,function(e){r.node(e).rank+=a})})}function oH(e,t,r,n){var i={width:0,height:0};return 4<=arguments.length&&(i.rank=r,i.order=n),eH(e,"border",i,t)}function lH(t){return Cj(x(t.nodes(),function(e){if(e=t.node(e).rank,!pj(e))return e}))}function cH(e,t){var r={lhs:[],rhs:[]};return v(e,function(e){(t(e)?r.lhs:r.rhs).push(e)}),r}function hH(e,t){var r=rU();try{return t()}finally{console.log(e+" time: "+(rU()-r)+"ms")}}function uH(e,t){return t()}var dH=e(()=>{LY(),$Y(),mt(eH,"addDummyNode"),mt(tH,"simplify"),mt(rH,"asNonCompoundGraph"),mt(nH,"intersectRect"),mt(iH,"buildLayerMatrix"),mt(aH,"normalizeRanks"),mt(sH,"removeEmptyRanks"),mt(oH,"addBorderNode"),mt(lH,"maxRank"),mt(cH,"partition"),mt(hH,"time"),mt(uH,"notime")});function pH(a){function s(e){var t=a.children(e),r=a.node(e);if(t.length&&v(t,s),Object.prototype.hasOwnProperty.call(r,"minRank")){r.borderLeft=[],r.borderRight=[];for(var n=r.minRank,i=r.maxRank+1;n{LY(),dH(),mt(pH,"addBorderSegments"),mt(gH,"addBorderNode")});function mH(e){var t=e.graph().rankdir.toLowerCase();"lr"!==t&&"rl"!==t||vH(e)}function yH(e){var t=e.graph().rankdir.toLowerCase();"bt"!==t&&"rl"!==t||bH(e),"lr"!==t&&"rl"!==t||(kH(e),vH(e))}function vH(t){v(t.nodes(),function(e){xH(t.node(e))}),v(t.edges(),function(e){xH(t.edge(e))})}function xH(e){var t=e.width;e.width=e.height,e.height=t}function bH(t){v(t.nodes(),function(e){wH(t.node(e))}),v(t.edges(),function(e){e=t.edge(e),v(e.points,wH),Object.prototype.hasOwnProperty.call(e,"y")&&wH(e)})}function wH(e){e.y=-e.y}function kH(t){v(t.nodes(),function(e){TH(t.node(e))}),v(t.edges(),function(e){e=t.edge(e),v(e.points,TH),Object.prototype.hasOwnProperty.call(e,"x")&&TH(e)})}function TH(e){var t=e.x;e.x=e.y,e.y=t}var EH=e(()=>{LY(),mt(mH,"adjust"),mt(yH,"undo"),mt(vH,"swapWidthHeight"),mt(xH,"swapWidthHeightOne"),mt(bH,"reverseY"),mt(wH,"reverseYOne"),mt(kH,"swapXY"),mt(TH,"swapXYOne")});function CH(t){t.graph().dummyChains=[],v(t.edges(),function(e){SH(t,e)})}function SH(e,t){var r=t.v,n=e.node(r).rank,i=t.w,a=e.node(i).rank,s=t.name,o=e.edge(t),l=o.labelRank;if(a!==n+1){e.removeEdge(t);var c,h=void 0,u=0;for(++n;n{LY(),dH(),mt(CH,"run"),mt(SH,"normalizeEdge"),mt(_H,"undo")});function LH(r){var n={};function i(e){var t=r.node(e);return Object.prototype.hasOwnProperty.call(n,e)?t.rank:(n[e]=!0,(e=Aj(x(r.outEdges(e),function(e){return i(e.w)-r.edge(e).minlen})))!==Number.POSITIVE_INFINITY&&null!=e||(e=0),t.rank=e)}mt(i,"dfs"),v(r.sources(),i)}function NH(e,t){return e.node(t.w).rank-e.node(t.v).rank-e.edge(t).minlen}var IH=e(()=>{LY(),mt(LH,"longestPath"),mt(NH,"slack")});function RH(e){var t,r=new PY({directed:!1}),n=e.nodes()[0],i=e.nodeCount();for(r.setNode(n,{});MH(r,e){LY(),$Y(),IH(),mt(RH,"feasibleTree"),mt(MH,"tightTree"),mt(DH,"findMinSlackEdge"),mt(OH,"shiftRanks")}),BH=e(()=>{}),$H=e(()=>{}),FH=e(()=>{LY(),$H(),FE(1)}),zH=e(()=>{FH()}),GH=e(()=>{}),UH=e(()=>{GH()}),qH=e(()=>{LY(),FE(1)});function jH(t){var r={},n={},i=[];function a(e){if(Object.prototype.hasOwnProperty.call(n,e))throw new WH;Object.prototype.hasOwnProperty.call(r,e)||(n[e]=!0,r[e]=!0,v(t.predecessors(e),a),delete n[e],i.push(e))}if(mt(a,"visit"),v(t.sinks(),a),HW(r)!==t.nodeCount())throw new WH;return i}function WH(){}var YH=e(()=>{LY(),jH.CycleException=WH,mt(jH,"topsort"),mt(WH,"CycleException"),WH.prototype=new Error}),HH=e(()=>{YH()});function VH(t,e,r){K7(e)||(e=[e]);var n=(t.isDirected()?t.successors:t.neighbors).bind(t),i=[],a={};return v(e,function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);XH(t,e,"post"===r,a,n,i)}),i}function XH(t,e,r,n,i,a){Object.prototype.hasOwnProperty.call(n,e)||(n[e]=!0,r||a.push(e),v(i(e),function(e){XH(t,e,r,n,i,a)}),r&&a.push(e))}var KH=e(()=>{LY(),mt(VH,"dfs"),mt(XH,"doDfs")});function ZH(e,t){return VH(e,t,"post")}var QH=e(()=>{KH(),mt(ZH,"postorder")});function JH(e,t){return VH(e,t,"pre")}var eV=e(()=>{KH(),mt(JH,"preorder")}),tV=e(()=>{$H(),BY()}),rV=e(()=>{BH(),FH(),zH(),UH(),qH(),HH(),QH(),eV(),tV(),GH(),YH()});function nV(e){LH(e=tH(e));var t,r=RH(e);for(oV(r),iV(r,e);t=cV(r);)uV(r,e,t,hV(r,e,t))}function iV(t,r){var e=(e=ZH(t,t.nodes())).slice(0,e.length-1);v(e,function(e){aV(t,r,e)})}function aV(e,t,r){var n=e.node(r).parent;e.edge(r,n).cutvalue=sV(e,t,r)}function sV(n,i,a){var s=n.node(a).parent,o=!0,e=i.edge(a,s),l=0;return e||(o=!1,e=i.edge(s,a)),l=e.weight,v(i.nodeEdges(a),function(e){var t=e.v===a,r=t?e.w:e.v;r!==s&&(t=t===o,e=i.edge(e).weight,l+=t?e:-e,pV(n,a,r))&&(e=n.edge(a,r).cutvalue,l+=t?-e:e)}),l}function oV(e,t){arguments.length<2&&(t=e.nodes()[0]),lV(e,{},1,t)}function lV(t,r,n,i,e){var a=n,s=t.node(i);return r[i]=!0,v(t.neighbors(i),function(e){Object.prototype.hasOwnProperty.call(r,e)||(n=lV(t,r,n,e,i))}),s.low=a,s.lim=n++,e?s.parent=e:delete s.parent,n}function cV(t){return rq(t.edges(),function(e){return t.edge(e).cutvalue<0})}function hV(t,r,e){var n=e.v,i=e.w,e=(r.hasEdge(n,i)||(n=e.w,i=e.v),t.node(n)),n=t.node(i),a=e,s=!1,i=(e.lim>n.lim&&(a=n,s=!0),HU(r.edges(),function(e){return s===gV(0,t.node(e.v),a)&&s!==gV(0,t.node(e.w),a)}));return Ij(i,function(e){return NH(r,e)})}function uV(e,t,r,n){var i=r.v;e.removeEdge(i,r.w),e.setEdge(n.v,n.w,{}),oV(e),iV(e,t),dV(e,t)}function dV(i,a){var e=rq(i.nodes(),function(e){return!a.node(e).parent}),e=(e=JH(i,e)).slice(1);v(e,function(e){var t=i.node(e).parent,r=a.edge(e,t),n=!1;r||(r=a.edge(t,e),n=!0),a.node(e).rank=a.node(t).rank+(n?r.minlen:-r.minlen)})}function pV(e,t,r){return e.hasEdge(t,r)}function gV(e,t,r){return r.low<=t.lim&&t.lim<=r.lim}var fV=e(()=>{LY(),rV(),dH(),PH(),IH(),nV.initLowLimValues=oV,nV.initCutValues=iV,nV.calcCutValue=sV,nV.leaveEdge=cV,nV.enterEdge=hV,nV.exchangeEdges=uV,mt(nV,"networkSimplex"),mt(iV,"initCutValues"),mt(aV,"assignCutValue"),mt(sV,"calcCutValue"),mt(oV,"initLowLimValues"),mt(lV,"dfsAssignLowLim"),mt(cV,"leaveEdge"),mt(hV,"enterEdge"),mt(uV,"exchangeEdges"),mt(dV,"updateRanks"),mt(pV,"isTreeEdge"),mt(gV,"isDescendant")});function mV(e){switch(e.graph().ranker){case"network-simplex":vV(e);break;case"tight-tree":yV(e);break;case"longest-path":xV(e);break;default:vV(e)}}function yV(e){LH(e),RH(e)}function vV(e){nV(e)}var xV,bV=e(()=>{PH(),fV(),IH(),mt(mV,"rank"),xV=LH,mt(yV,"tightTreeRanker"),mt(vV,"networkSimplexRanker")});function wV(t){var r=eH(t,"root",{},"_root"),n=TV(t),i=Cj(Wq(n))-1,a=2*i+1,s=(t.graph().nestingRoot=r,v(t.edges(),function(e){t.edge(e).minlen*=a}),EV(t)+1);v(t.children(),function(e){kV(t,r,a,s,i,n,e)}),t.graph().nodeRankFactor=a}function kV(i,a,s,o,l,c,h){var u,d,e,t=i.children(h);t.length?(u=oH(i,"_bt"),d=oH(i,"_bb"),e=i.node(h),i.setParent(u,h),e.borderTop=u,i.setParent(d,h),e.borderBottom=d,v(t,function(e){kV(i,a,s,o,l,c,e);var t=i.node(e),r=t.borderTop||e,n=r!==(e=t.borderBottom||e)?1:l-c[h]+1;i.setEdge(u,r,{weight:t=t.borderTop?o:2*o,minlen:n,nestingEdge:!0}),i.setEdge(e,d,{weight:t,minlen:n,nestingEdge:!0})}),i.parent(h)||i.setEdge(a,u,{weight:0,minlen:l+c[h]})):h!==a&&i.setEdge(a,h,{weight:0,minlen:s})}function TV(n){var i={};function a(e,t){var r=n.children(e);r&&r.length&&v(r,function(e){a(e,t+1)}),i[e]=t}return mt(a,"dfs"),v(n.children(),function(e){a(e,1)}),i}function EV(r){return GW(r.edges(),function(e,t){return e+r.edge(t).weight},0)}function CV(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,v(t.edges(),function(e){t.edge(e).nestingEdge&&t.removeEdge(e)})}var SV=e(()=>{LY(),dH(),mt(wV,"run"),mt(kV,"dfs"),mt(TV,"treeDepths"),mt(EV,"sumWeights"),mt(CV,"cleanup")});function _V(i,a,e){var s,o={};v(e,function(e){for(var t,r,n=i.parent(e);n;){if((t=i.parent(n))?(r=o[t],o[t]=n):(r=s,s=n),r&&r!==n)return void a.setEdge(r,n);n=t}})}var AV=e(()=>{LY(),mt(_V,"addSubgraphConstraints")});function LV(i,r,a){var s=NV(i),o=new PY({compound:!0}).setGraph({root:s}).setDefaultNodeLabel(function(e){return i.node(e)});return v(i.nodes(),function(n){var e=i.node(n),t=i.parent(n);(e.rank===r||e.minRank<=r&&r<=e.maxRank)&&(o.setNode(n),o.setParent(n,t||s),v(i[a](n),function(e){var t=e.v===n?e.w:e.v,r=o.edge(t,n),r=pj(r)?0:r.weight;o.setEdge(t,n,{weight:i.edge(e).weight+r})}),Object.prototype.hasOwnProperty.call(e,"minRank"))&&o.setNode(n,{borderLeft:e.borderLeft[r],borderRight:e.borderRight[r]})}),o}function NV(e){for(var t;e.hasNode(t=wY("_root")););return t}var IV=e(()=>{LY(),$Y(),mt(LV,"buildLayerGraph"),mt(NV,"createRootNode")});function RV(e,t){for(var r=0,n=1;n>1]+=e.weight;o+=e.weight*r})),o}var DV=e(()=>{LY(),mt(RV,"crossCount"),mt(MV,"twoLayerCrossCount")});function OV(r){var n={},e=HU(r.nodes(),function(e){return!r.children(e).length}),t=Cj(x(e,function(e){return r.node(e).rank})),i=x(DW(t+1),function(){return[]});function a(e){var t;Pq(n,e)||(n[e]=!0,t=r.node(e),i[t.rank].push(e),v(r.successors(e),a))}return mt(a,"dfs"),t=tY(e,function(e){return r.node(e).rank}),v(t,a),i}var PV=e(()=>{LY(),mt(OV,"initOrder")});function BV(n,e){return x(e,function(e){var t=n.inEdges(e);return t.length?{v:e,barycenter:(t=GW(t,function(e,t){var r=n.edge(t),t=n.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 $V=e(()=>{LY(),mt(BV,"barycenter")});function FV(e,t){var n={};return v(e,function(e,t){t=n[e.v]={indegree:0,in:[],out:[],vs:[e.v],i:t},pj(e.barycenter)||(t.barycenter=e.barycenter,t.weight=e.weight)}),v(t.edges(),function(e){var t=n[e.v],r=n[e.w];pj(t)||pj(r)||(r.indegree++,t.out.push(n[e.w]))}),zV(HU(n,function(e){return!e.indegree}))}function zV(r){var e=[];function t(t){return function(e){e.merged||(pj(e.barycenter)||pj(t.barycenter)||e.barycenter>=t.barycenter)&&GV(t,e)}}function n(t){return function(e){e.in.push(t),0==--e.indegree&&r.push(e)}}for(mt(t,"handleIn"),mt(n,"handleOut");r.length;){var i=r.pop();e.push(i),v(i.in.reverse(),t(i)),v(i.out,n(i))}return x(HU(e,function(e){return!e.merged}),function(e){return TW(e,["vs","i","barycenter","weight"])})}function GV(e,t){var r=0,n=0;e.weight&&(r+=e.barycenter*e.weight,n+=e.weight),t.weight&&(r+=t.barycenter*t.weight,n+=t.weight),e.vs=t.vs.concat(e.vs),e.barycenter=r/n,e.weight=n,e.i=Math.min(t.i,e.i),t.merged=!0}var UV=e(()=>{LY(),mt(FV,"resolveConflicts"),mt(zV,"doResolveConflicts"),mt(GV,"mergeEntries")});function qV(e,t){var r=(e=cH(e,function(e){return Object.prototype.hasOwnProperty.call(e,"barycenter")})).lhs,n=tY(e.rhs,function(e){return-e.i}),i=[],a=0,s=0,o=0,e=(r.sort(WV(!!t)),o=jV(i,n,o),v(r,function(e){o+=e.vs.length,i.push(e.vs),a+=e.barycenter*e.weight,s+=e.weight,o=jV(i,n,o)}),{vs:YB(i)});return s&&(e.barycenter=a/s,e.weight=s),e}function jV(e,t,r){for(var n;t.length&&(n=bU(t)).i<=r;)t.pop(),e.push(n.vs),r++;return r}function WV(r){return function(e,t){return e.barycentert.barycenter?1:r?t.i-e.i:e.i-t.i}}var YV=e(()=>{LY(),dH(),mt(qV,"sort"),mt(jV,"consumeUnsortable"),mt(WV,"compareWithBias")});function HV(r,e,n,i){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=HU(a,function(e){return e!==s&&e!==o})),BV(r,a));return v(e,function(e){var t;r.children(e.v).length&&(t=HV(r,e.v,n,i),l[e.v]=t,Object.prototype.hasOwnProperty.call(t,"barycenter"))&&XV(e,t)}),VV(a=FV(e,n),l),e=qV(a,i),s&&(e.vs=YB([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 VV(e,t){v(e,function(e){e.vs=YB(e.vs.map(function(e){return t[e]?t[e].vs:e}))})}function XV(e,t){pj(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 KV=e(()=>{LY(),$V(),UV(),YV(),mt(HV,"sortSubgraph"),mt(VV,"expandSubgraphs"),mt(XV,"mergeBarycenters")});function ZV(e){var t=lH(e),r=QV(e,DW(1,t+1),"inEdges"),n=QV(e,DW(t-1,-1,-1),"outEdges");eX(e,OV(e));for(var i,a=Number.POSITIVE_INFINITY,s=0,o=0;o<4;++s,++o){JV(s%2?r:n,2<=s%4);var l,c=RV(e,l=iH(e));c{LY(),$Y(),dH(),AV(),IV(),DV(),PV(),KV(),mt(ZV,"order"),mt(QV,"buildLayerGraphs"),mt(JV,"sweepLayerGraphs"),mt(eX,"assignOrder")});function rX(c){var h=iX(c);v(c.graph().dummyChains,function(e){for(var t,r=c.node(e).edgeObj,n=nX(c,h,r.v,r.w),i=n.path,a=n.lca,s=0,o=i[s],l=!0;e!==r.w;){if(t=c.node(e),l){for(;(o=i[s])!==a&&c.node(o).maxRanko||l>t[c].lim););for(i=c,c=n;(c=e.parent(c))!==i;)s.push(c);return{path:a.concat(s.reverse()),lca:i}}function iX(r){var n={},i=0;function a(e){var t=i;v(r.children(e),a),n[e]={low:t,lim:i++}}return mt(a,"dfs"),v(r.children(),a),n}var aX=e(()=>{LY(),mt(rX,"parentDummyChains"),mt(nX,"findPath"),mt(iX,"postorder")});function sX(c,e){var h={};function t(e,n){var a=0,s=0,o=e.length,l=bU(n);return v(n,function(e,t){var r=lX(c,e),i=r?c.node(r).order:o;!r&&e!==l||(v(n.slice(s,t+1),function(n){v(c.predecessors(n),function(e){var t=c.node(e),r=t.order;!(ri)&&cX(s,e,a)})})}function t(r,n){var i,a=-1,s=0;return v(n,function(e,t){"border"===o.node(e).dummy&&(e=o.predecessors(e)).length&&(i=o.node(e[0]).order,l(n,s,t,a,i),s=t,a=i),l(n,s,n.length,i,r.length)}),n}return mt(l,"scan"),mt(t,"visitLayer"),GW(e,t),s}function lX(t,e){if(t.node(e).dummy)return rq(t.predecessors(e),function(e){return t.node(e).dummy})}function cX(e,t,r){r{LY(),$Y(),dH(),mt(sX,"findType1Conflicts"),mt(oX,"findType2Conflicts"),mt(lX,"findOtherInnerSegmentNode"),mt(cX,"addConflict"),mt(hX,"hasConflict"),mt(uX,"verticalAlignment"),mt(dX,"horizontalCompaction"),mt(pX,"buildBlockGraph"),mt(gX,"findSmallestWidthAlignment"),mt(fX,"alignCoordinates"),mt(mX,"balance"),mt(yX,"positionX"),mt(vX,"sep"),mt(xX,"width")});function wX(r){kX(r=rH(r)),wq(yX(r),function(e,t){r.node(t).x=e})}function kX(r){var e=iH(r),n=r.graph().ranksep,i=0;v(e,function(e){var t=Cj(x(e,function(e){return r.node(e).height}));v(e,function(e){r.node(e).y=i+t/2}),i+=t+n})}var TX=e(()=>{LY(),dH(),bX(),mt(wX,"position"),mt(kX,"positionY")});function EX(t,e){var r=e&&e.debugTiming?hH:uH;r("layout",()=>{var e=r(" buildLayoutGraph",()=>_X(t));r(" runLayout",()=>CX(e,r)),r(" updateInputGraph",()=>SX(t,e))})}function CX(e,t){t(" makeSpaceForEdgeLabels",()=>AX(e)),t(" removeSelfEdges",()=>BX(e)),t(" acyclic",()=>KY(e)),t(" nestingGraph.run",()=>wV(e)),t(" rank",()=>mV(rH(e))),t(" injectEdgeLabelProxies",()=>LX(e)),t(" removeEmptyRanks",()=>sH(e)),t(" nestingGraph.cleanup",()=>CV(e)),t(" normalizeRanks",()=>aH(e)),t(" assignRankMinMax",()=>NX(e)),t(" removeEdgeLabelProxies",()=>IX(e)),t(" normalize.run",()=>CH(e)),t(" parentDummyChains",()=>rX(e)),t(" addBorderSegments",()=>pH(e)),t(" order",()=>ZV(e)),t(" insertSelfEdges",()=>$X(e)),t(" adjustCoordinateSystem",()=>mH(e)),t(" position",()=>wX(e)),t(" positionSelfEdges",()=>FX(e)),t(" removeBorderNodes",()=>PX(e)),t(" normalize.undo",()=>_H(e)),t(" fixupEdgeLabelCoords",()=>DX(e)),t(" undoCoordinateSystem",()=>yH(e)),t(" translateGraph",()=>RX(e)),t(" assignNodeIntersects",()=>MX(e)),t(" reversePoints",()=>OX(e)),t(" acyclic.undo",()=>QY(e))}function SX(n,i){v(n.nodes(),function(e){var t=n.node(e),r=i.node(e);t&&(t.x=r.x,t.y=r.y,i.children(e).length)&&(t.width=r.width,t.height=r.height)}),v(n.edges(),function(e){var t=n.edge(e),e=i.edge(e);t.points=e.points,Object.prototype.hasOwnProperty.call(e,"x")&&(t.x=e.x,t.y=e.y)}),n.graph().width=i.graph().width,n.graph().height=i.graph().height}function _X(r){var n=new PY({multigraph:!0,compound:!0}),e=GX(r.graph());return n.setGraph(aC({},qX,zX(e,UX),TW(e,jX))),v(r.nodes(),function(e){var t=GX(r.node(e));n.setNode(e,sU(zX(t,WX),YX)),n.setParent(e,r.parent(e))}),v(r.edges(),function(e){var t=GX(r.edge(e));n.setEdge(e,aC({},VX,zX(t,HX),TW(t,XX)))}),n}function AX(t){var r=t.graph();r.ranksep/=2,v(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 LX(r){v(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},eH(r,"edge-proxy",t,"_ep"))})}function NX(t){var r=0;v(t.nodes(),function(e){(e=t.node(e)).borderTop&&(e.minRank=t.node(e.borderTop).rank,e.maxRank=t.node(e.borderBottom).rank,r=Cj(r,e.maxRank))}),t.graph().maxRank=r}function IX(r){v(r.nodes(),function(e){var t=r.node(e);"edge-proxy"===t.dummy&&(r.edge(t.e).labelRank=t.rank,r.removeNode(e))})}function RX(t){var i=Number.POSITIVE_INFINITY,a=0,s=Number.POSITIVE_INFINITY,o=0,e=t.graph(),r=e.marginx||0,n=e.marginy||0;function l(e){var t=e.x,r=e.y,n=e.width,e=e.height;i=Math.min(i,t-n/2),a=Math.max(a,t+n/2),s=Math.min(s,r-e/2),o=Math.max(o,r+e/2)}mt(l,"getExtremes"),v(t.nodes(),function(e){l(t.node(e))}),v(t.edges(),function(e){e=t.edge(e),Object.prototype.hasOwnProperty.call(e,"x")&&l(e)}),i-=r,s-=n,v(t.nodes(),function(e){(e=t.node(e)).x-=i,e.y-=s}),v(t.edges(),function(e){e=t.edge(e),v(e.points,function(e){e.x-=i,e.y-=s}),Object.prototype.hasOwnProperty.call(e,"x")&&(e.x-=i),Object.prototype.hasOwnProperty.call(e,"y")&&(e.y-=s)}),e.width=a-i+r,e.height=o-s+n}function MX(a){v(a.edges(),function(e){var t,r=a.edge(e),n=a.node(e.v),e=a.node(e.w),i=r.points?(t=r.points[0],r.points[r.points.length-1]):(r.points=[],t=e,n);r.points.unshift(nH(n,t)),r.points.push(nH(e,i))})}function DX(r){v(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 OX(t){v(t.edges(),function(e){(e=t.edge(e)).reversed&&e.points.reverse()})}function PX(a){v(a.nodes(),function(e){var t,r,n,i;a.children(e).length&&(e=a.node(e),t=a.node(e.borderTop),r=a.node(e.borderBottom),n=a.node(bU(e.borderLeft)),i=a.node(bU(e.borderRight)),e.width=Math.abs(i.x-n.x),e.height=Math.abs(r.y-t.y),e.x=n.x+e.width/2,e.y=t.y+e.height/2)}),v(a.nodes(),function(e){"border"===a.node(e).dummy&&a.removeNode(e)})}function BX(r){v(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 $X(i){var e=iH(i);v(e,function(e){var n=0;v(e,function(e,t){var r=i.node(e);r.order=t+n,v(r.selfEdges,function(e){eH(i,"selfedge",{width:e.label.width,height:e.label.height,rank:r.rank,order:t+ ++n,e:e.e,label:e.label},"_se")}),delete r.selfEdges})})}function FX(s){v(s.nodes(),function(e){var t,r,n,i,a=s.node(e);"selfedge"===a.dummy&&(t=(i=s.node(a.e.v)).x+i.width/2,r=i.y,n=a.x-t,i=i.height/2,s.setEdge(a.e,a.label),s.removeNode(e),a.label.points=[{x:t+2*n/3,y:r-i},{x:t+5*n/6,y:r-i},{x:t+n,y:r},{x:t+5*n/6,y:r+i},{x:t+2*n/3,y:r+i}],a.label.x=a.x,a.label.y=a.y)})}function zX(e,t){return xj(TW(e,t),Number)}function GX(e){var r={};return v(e,function(e,t){r[t.toLowerCase()]=e}),r}var UX,qX,jX,WX,YX,HX,VX,XX,KX=e(()=>{LY(),$Y(),fH(),EH(),JY(),AH(),bV(),SV(),tX(),aX(),TX(),dH(),mt(EX,"layout"),mt(CX,"runLayout"),mt(SX,"updateInputGraph"),UX=["nodesep","edgesep","ranksep","marginx","marginy"],qX={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},jX=["acyclicer","ranker","rankdir","align"],WX=["width","height"],YX={width:0,height:0},HX=["minlen","weight","width","height","labeloffset"],VX={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},XX=["labelpos"],mt(_X,"buildLayoutGraph"),mt(AX,"makeSpaceForEdgeLabels"),mt(LX,"injectEdgeLabelProxies"),mt(NX,"assignRankMinMax"),mt(IX,"removeEdgeLabelProxies"),mt(RX,"translateGraph"),mt(MX,"assignNodeIntersects"),mt(DX,"fixupEdgeLabelCoords"),mt(OX,"reversePointsForReversedEdges"),mt(PX,"removeBorderNodes"),mt(BX,"removeSelfEdges"),mt($X,"insertSelfEdges"),mt(FX,"positionSelfEdges"),mt(zX,"selectNumberAttrs"),mt(GX,"canonicalize")}),ZX=e(()=>{JY(),KX(),AH(),bV()});function QX(e){var t={options:{directed:e.isDirected(),multigraph:e.isMultigraph(),compound:e.isCompound()},nodes:JX(e),edges:eK(e)};return pj(e.graph())||(t.value=ez(e.graph())),t}function JX(n){return x(n.nodes(),function(e){var t=n.node(e),r=n.parent(e),e={v:e};return pj(t)||(e.value=t),pj(r)||(e.parent=r),e})}function eK(n){return x(n.edges(),function(e){var t=n.edge(e),r={v:e.v,w:e.w};return pj(e.name)||(r.name=e.name),pj(t)||(r.value=t),r})}var tK,rK,nK,iK,aK,sK,oK,lK,cK,hK,uK,dK,pK,gK,fK,mK=e(()=>{LY(),BY(),mt(QX,"write"),mt(JX,"writeNodes"),mt(eK,"writeEdges")}),yK=e(()=>{t(),$Y(),mK(),tK=new Map,rK=new Map,nK=new Map,iK=mt(()=>{rK.clear(),nK.clear(),tK.clear()},"clear"),aK=mt((e,t)=>{var r=rK.get(t)||[];return M.trace("In isDescendant",t," ",e," = ",r.includes(e)),r.includes(e)},"isDescendant"),sK=mt((e,t)=>{var r=rK.get(t)||[];return M.info("Descendants of ",t," is ",r),M.info("Edge is ",e),e.v!==t&&e.w!==t&&(r?r.includes(e.v)||aK(e.v,t)||aK(e.w,t)||r.includes(e.w):(M.debug("Tilt, ",t,",not in descendants"),!1))},"edgeInCluster"),oK=mt((r,n,i,a)=>{M.warn("Copying children of ",r,"root",a,"data",n.node(r),a);var e=n.children(r)||[];r!==a&&e.push(r),M.warn("Copying (nodes) clusterId",r,"nodes",e),e.forEach(e=>{var t;0{M.info("Edge",e);var t=n.edge(e.v,e.w,e.name);M.info("Edge data",t,a);try{sK(e,a)?(M.info("Copying as ",e.v,e.w,t,e.name),i.setEdge(e.v,e.w,t,e.name),M.info("newGraph edges ",i.edges(),i.edge(i.edges()[0]))):M.info("Skipping copy of edge ",e.v,"--\x3e",e.w," rootId: ",a," clusterId:",r)}catch(e){M.error(e)}})),M.debug("Removing node",e),n.removeNode(e)})},"copy"),lK=mt((e,t)=>{let r=t.children(e),n=[...r];for(var i of r)nK.set(i,e),n=[...n,...lK(i,t)];return n},"extractDescendants"),cK=mt((e,t,r)=>{let n=e.edges().filter(e=>e.v===t||e.w===t),i=e.edges().filter(e=>e.v===r||e.w===r),a=n.map(e=>({v:e.v===t?r:e.v,w:e.w===t?t:e.w})),s=i.map(e=>({v:e.v,w:e.w}));return a.filter(t=>s.some(e=>t.v===e.v&&t.w===e.w))},"findCommonEdges"),hK=mt((e,t,r)=>{var n,i=t.children(e);if(M.trace("Searching children of id ",e,i),i.length<1)return e;let a;for(n of i){var s=hK(n,t,r),o=cK(t,r,s);if(s){if(!(0tK.has(e)&&tK.get(e).externalConnections&&tK.has(e)?tK.get(e).id:e,"getAnchorId"),dK=mt((a,e)=>{if(!a||10{aK(e.v,t)^aK(e.w,t)&&(M.warn("Edge: ",e," leaves cluster ",t),M.warn("Descendants of XXX ",t,": ",rK.get(t)),tK.get(t).externalConnections=!0)})):M.debug("Not a cluster ",t,rK)});for(var t of tK.keys()){var r=tK.get(t).id;(r=a.parent(r))!==t&&tK.has(r)&&!tK.get(r).externalConnections&&(tK.get(t).id=r)}a.edges().forEach(function(e){var t,r,n,i=a.edge(e);M.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),M.warn("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(a.edge(e))),e.v,M.warn("Fix XXX",tK,"ids:",e.v,e.w,"Translating: ",tK.get(e.v)," --- ",tK.get(e.w)),(tK.get(e.v)||tK.get(e.w))&&(M.warn("Fixing and trying - removing XXX",e.v,e.w,e.name),t=uK(e.v),r=uK(e.w),a.removeEdge(e.v,e.w,e.name),t!==e.v&&(n=a.parent(t),tK.get(n).externalConnections=!0,i.fromCluster=e.v),r!==e.w&&(n=a.parent(r),tK.get(n).externalConnections=!0,i.toCluster=e.w),M.warn("Fix Replacing with XXX",t,r,e.name),a.setEdge(t,r,i,e.name))}),M.warn("Adjusted Graph",QX(a)),pK(a,0),M.trace(tK)}},"adjustClustersAndEdges"),pK=mt((r,n)=>{if(M.warn("extractor - ",n,QX(r),r.children("D")),10{if(0===e.length)return[];let r=Object.assign([],e);return e.forEach(e=>{e=t.children(e),e=gK(t,e),r=[...r,...e]}),r},"sorter"),fK=mt(e=>gK(e,e.children()),"sortNodesByHierarchy")}),vK={};JBe(vK,{render:()=>bK});var xK,bK,wK,kK,TK,EK,CK,SK,_K,AK,LK,NK,IK,RK,MK,DK,OK,PK,BK,$K,FK=e(()=>{ZX(),mK(),$Y(),MO(),i(),yK(),zO(),jD(),RO(),t(),qD(),mu(),xK=mt(async(e,i,a,s,o,l)=>{M.warn("Graph in recursive render:XAX",QX(i),o);let c=i.graph().rankdir,n=(M.trace("Dir in recursive render - dir:",c),e=e.insert("g").attr("class","root"),i.nodes()?M.info("Recursive render XXX",i.nodes()):M.info("No nodes found for",i),0{var e=i.edges().map(async function(e){var t=i.edge(e.v,e.w,e.name);M.info("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),M.info("Edge "+e.v+" -> "+e.w+": ",e," ",JSON.stringify(i.edge(e))),M.info("Fix",tK,"ids:",e.v,e.w,"Translating: ",tK.get(e.v),tK.get(e.w)),await sO(r,t)});await Promise.all(e)},"processEdges")(),M.info("Graph before layout:",JSON.stringify(QX(i))),M.info("############################################# XXX"),M.info("### Layout ### XXX"),M.info("############################################# XXX"),EX(i),M.info("Graph after layout:",JSON.stringify(QX(i))),0),p=ND(l).subGraphTitleTotalMargin;return await Promise.all(fK(i).map(async function(e){var t,r=i.node(e);M.info("Position XBX => "+e+": ("+r.x,","+r.y,") width: ",r.width," height: ",r.height),r?.clusterNode?(r.y+=p,M.info("A tainted cluster node XBX1",e,r.id,r.width,r.height,r.x,r.y,i.parent(e)),tK.get(r.id).node=r,$O(r)):0 "+e.w+": "+JSON.stringify(t),t),t.points.forEach(e=>e.y+=p/2),i.node(e.v)),e=i.node(e.w),r=pO(h,t,tK,a,r,e,s);oO(t,r)}),i.nodes().forEach(function(e){var t=i.node(e);M.info(e,t.type,t.diff),t.isGroup&&(d=t.diff)}),M.warn("Returning from recursive render XAX",e,d),{elem:e,diff:d}},"recursiveRender"),bK=mt(async(e,t)=>{let l=new PY({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");IO(r,e.markers,e.type,e.diagramId),BO(),iO(),FD(),iK(),e.nodes.forEach(e=>{l.setNode(e.id,{...e}),e.parentId&&l.setParent(e.id,e.parentId)}),M.debug("Edges:",e.edges),e.edges.forEach(e=>{var t,r,n,i,a,s,o;e.start===e.end?(r=(t=e.start)+"---"+t+"---1",n=t+"---"+t+"---2",i=l.node(t),l.setNode(r,{domId:r,id:r,parentId:i.parentId,labelStyle:"",label:"",padding:0,shape:"labelRect",style:"",width:10,height:10}),l.setParent(r,i.parentId),l.setNode(n,{domId:n,id:n,parentId:i.parentId,labelStyle:"",padding:0,shape:"labelRect",label:"",style:"",width:10,height:10}),l.setParent(n,i.parentId),a=structuredClone(e),s=structuredClone(e),o=structuredClone(e),a.label="",a.arrowTypeEnd="none",a.id=t+"-cyclic-special-1",s.arrowTypeStart="none",s.arrowTypeEnd="none",s.id=t+"-cyclic-special-mid",o.label="",i.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,n,s,t+"-cyclic-special-1"),l.setEdge(n,t,o,t+"-cyc{GO(),t(),wK={},kK=mt(e=>{for(var t of e)wK[t.name]=t},"registerLayoutLoaders"),mt(()=>{kK([{name:"dagre",loader:mt(async()=>Promise.resolve().then(()=>(FK(),vK)),"loader")}])},"registerDefaultLayoutLoaders")(),TK=mt(async(e,t)=>{var r;if(e.layoutAlgorithm in wK)return(await(r=wK[e.layoutAlgorithm]).loader()).render(e,t,FO,{algorithm:r.algorithm});throw new Error("Unknown layout algorithm: "+e.layoutAlgorithm)},"render"),EK=mt((e="",{fallback:t="dagre"}={})=>{if(e in wK)return e;if(t in wK)return M.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")}),GK=e(()=>{th(),t(),CK=mt((e,t,r,n)=>{e.attr("class",r);var{width:r,height:i,x:a,y:s}=SK(e,t),n=(Vc(e,i,r,n),_K(a,s,r,i,t));e.attr("viewBox",n),M.debug(`viewBox configured: ${n} with padding: `+t)},"setupViewPortForSVG"),SK=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"),_K=mt((e,t,r,n,i)=>e-i+` ${t-i} ${r} `+n,"createViewBox")}),UK=e(()=>{Zw(),mu(),t(),UD(),zK(),GK(),KC(),AK=mt(function(e,t){return t.db.getClasses()},"getClasses"),LK=mt(async function(e,t,r,n){M.info("REF0:"),M.info("Drawing state diagram (v2)",t);let{securityLevel:i,flowchart:a,layout:s}=D(),o;"sandbox"===i&&(o=H("#i"+t));var l,c="sandbox"===i?o.nodes()[0].contentDocument:document,h=(M.debug("Before getData: "),n.db.getData()),u=(M.debug("Data: ",h),LD(t,i)),d=n.db.getDirection(),d=(h.type=n.type,h.layoutAlgorithm=EK(s),"dagre"===h.layoutAlgorithm&&"elk"===s&&M.warn("flowchart-elk was moved to an external package in Mermaid v11. Please refer [release notes](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) for more details. This diagram will be rendered using `dagre` layout as a fallback."),h.direction=d,h.nodeSpacing=a?.nodeSpacing||50,h.rankSpacing=a?.rankSpacing||50,h.markers=["point","circle","cross"],h.diagramId=t,M.debug("REF1:",h),await TK(h,u),h.config.flowchart?.diagramPadding??8);YC.insertTitle(u,"flowchartTitleText",a?.titleTopMargin||0,n.db.getDiagramTitle()),CK(u,d,"flowchart",a?.useMaxWidth||!1);for(l of h.nodes){var p=H(`#${t} [id="${l.id}"]`);if(p&&l.link){let e=c.createElementNS("http://www.w3.org/2000/svg","a"),t=(e.setAttributeNS("http://www.w3.org/2000/svg","class",l.cssClasses),e.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),"sandbox"===i?e.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):l.linkTarget&&e.setAttributeNS("http://www.w3.org/2000/svg","target",l.linkTarget),p.insert(function(){return e},":first-child")),r=p.select(".label-container"),n=(r&&t.append(function(){return r.node()}),p.select(".label"));n&&t.append(function(){return n.node()})}}},"draw"),NK={getClasses:AK,draw:LK}}),qK=e(()=>{function P(){this.yy={}}var e=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=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],G=[2,2],U=[1,13],q=[1,14],j=[1,15],W=[1,16],Y=[1,23],H=[1,25],V=[1,26],X=[1,27],t=[1,49],r=[1,48],K=[1,29],Z=[1,30],Q=[1,31],J=[1,32],ee=[1,33],n=[1,44],i=[1,46],a=[1,42],s=[1,47],o=[1,43],l=[1,50],c=[1,45],h=[1,51],u=[1,52],te=[1,34],re=[1,35],ne=[1,36],ie=[1,37],ae=[1,57],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],p=[1,61],g=[1,60],f=[1,62],se=[8,9,11,75,77,78],oe=[1,78],le=[1,91],ce=[1,96],he=[1,95],ue=[1,92],de=[1,88],pe=[1,94],ge=[1,90],fe=[1,97],me=[1,93],ye=[1,98],ve=[1,89],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],be=[8,9,11,44,60,75,77,78,89,102,105,106,109,111,114,115,116],we=[44,60,89,102,105,106,109,111,114,115,116],ke=[1,121],Te=[1,122],Ee=[1,124],Ce=[1,123],Se=[44,60,62,74,89,102,105,106,109,111,114,115,116],_e=[1,133],Ae=[1,147],Le=[1,148],Ne=[1,149],Ie=[1,150],Re=[1,135],Me=[1,137],De=[1,141],Oe=[1,142],Pe=[1,143],Be=[1,144],$e=[1,145],Fe=[1,146],ze=[1,151],Ge=[1,152],Ue=[1,131],qe=[1,132],je=[1,139],We=[1,134],Ye=[1,138],He=[1,136],Ve=[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],Xe=[1,154],Ke=[1,156],v=[8,9,11],x=[8,9,10,11,14,44,60,89,105,106,109,111,114,115,116],b=[1,176],w=[1,172],k=[1,173],T=[1,177],E=[1,174],C=[1,175],Ze=[77,116,119],S=[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],Qe=[10,106],Je=[31,49,51,53,55,57,62,64,66,67,69,71,116,117,118],_=[1,247],A=[1,245],L=[1,249],N=[1,243],I=[1,244],R=[1,246],M=[1,248],D=[1,250],et=[1,268],tt=[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,$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"},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]],performAction:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){case 2:this.$=[];break;case 3:(!Array.isArray(a[o])||0e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(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 t.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 78;case 60:return 105;case 61:return 111;case 62:return 46;case 63:return 60;case 64:return 44;case 65:return 8;case 66:return 106;case 67:return 115;case 68:return this.popState(),77;case 69:return this.pushState("edgeText"),75;case 70:return 119;case 71:return this.popState(),77;case 72:return this.pushState("thickEdgeText"),75;case 73:return 119;case 74:return this.popState(),77;case 75:return this.pushState("dottedEdgeText"),75;case 76:return 119;case 77:return 77;case 78:return this.popState(),53;case 79:return"TEXT";case 80:return this.pushState("ellipseText"),52;case 81:return this.popState(),55;case 82:return this.pushState("text"),54;case 83:return this.popState(),57;case 84:return this.pushState("text"),56;case 85:return 58;case 86:return this.pushState("text"),67;case 87:return this.popState(),64;case 88:return this.pushState("text"),63;case 89:return this.popState(),49;case 90:return this.pushState("text"),48;case 91:return this.popState(),69;case 92:return this.popState(),71;case 93:return 117;case 94:return this.pushState("trapText"),68;case 95:return this.pushState("trapText"),70;case 96:return 118;case 97:return 67;case 98:return 90;case 99:return"SEP";case 100:return 89;case 101:return 115;case 102:return 111;case 103:return 44;case 104:return 109;case 105:return 114;case 106:return 116;case 107:return this.popState(),62;case 108:return this.pushState("text"),62;case 109:return this.popState(),51;case 110:return this.pushState("text"),50;case 111:return this.popState(),31;case 112:return this.pushState("text"),29;case 113:return this.popState(),66;case 114:return this.pushState("text"),65;case 115:return"TEXT";case 116:return"QUOTE";case 117:return 9;case 118:return 10;case 119: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]*)/,/^(?:[^\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,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeData:{rules:[8,11,12,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackargs:{rules:[17,18,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackname:{rules:[14,15,16,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},href:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},click:{rules:[21,24,33,34,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dottedEdgeText:{rules:[21,24,74,76,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},thickEdgeText:{rules:[21,24,71,73,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},edgeText:{rules:[21,24,68,70,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},trapText:{rules:[21,24,77,80,82,84,88,90,91,92,93,94,95,108,110,112,114],inclusive:!1},ellipseText:{rules:[21,24,77,78,79,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},text:{rules:[21,24,77,80,81,82,83,84,87,88,89,90,94,95,107,108,109,110,111,112,113,114,115],inclusive:!1},vertex:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr:{rules:[3,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_title:{rules:[1,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},md_string:{rules:[19,20,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},string:{rules:[21,22,23,24,77,80,82,84,88,90,94,95,108,110,112,114],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,71,72,74,75,77,80,82,84,85,86,88,90,94,95,96,97,98,99,100,101,102,103,104,105,106,108,110,112,114,116,117,118,119],inclusive:!0}}};B.lexer=F,me(P,"Parser"),(MX=new((P.prototype=B).Parser=P)).parser=MX,DX=MX}),YX=t(()=>{WX(),(OX=Object.assign({},DX)).parse=t=>(t=t.replace(/}\s*\n/g,`} -`),DX.parse(t)),PX=OX}),HX=t(()=>{BX=me(()=>` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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 78;case 60:return 105;case 61:return 111;case 62:return 46;case 63:return 60;case 64:return 44;case 65:return 8;case 66:return 106;case 67:return 115;case 68:return this.popState(),77;case 69:return this.pushState("edgeText"),75;case 70:return 119;case 71:return this.popState(),77;case 72:return this.pushState("thickEdgeText"),75;case 73:return 119;case 74:return this.popState(),77;case 75:return this.pushState("dottedEdgeText"),75;case 76:return 119;case 77:return 77;case 78:return this.popState(),53;case 79:return"TEXT";case 80:return this.pushState("ellipseText"),52;case 81:return this.popState(),55;case 82:return this.pushState("text"),54;case 83:return this.popState(),57;case 84:return this.pushState("text"),56;case 85:return 58;case 86:return this.pushState("text"),67;case 87:return this.popState(),64;case 88:return this.pushState("text"),63;case 89:return this.popState(),49;case 90:return this.pushState("text"),48;case 91:return this.popState(),69;case 92:return this.popState(),71;case 93:return 117;case 94:return this.pushState("trapText"),68;case 95:return this.pushState("trapText"),70;case 96:return 118;case 97:return 67;case 98:return 90;case 99:return"SEP";case 100:return 89;case 101:return 115;case 102:return 111;case 103:return 44;case 104:return 109;case 105:return 114;case 106:return 116;case 107:return this.popState(),62;case 108:return this.pushState("text"),62;case 109:return this.popState(),51;case 110:return this.pushState("text"),50;case 111:return this.popState(),31;case 112:return this.pushState("text"),29;case 113:return this.popState(),66;case 114:return this.pushState("text"),65;case 115:return"TEXT";case 116:return"QUOTE";case 117:return 9;case 118:return 10;case 119: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]*)/,/^(?:[^\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,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeDataStr:{rules:[9,10,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},shapeData:{rules:[8,11,12,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackargs:{rules:[17,18,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},callbackname:{rules:[14,15,16,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},href:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},click:{rules:[21,24,33,34,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dottedEdgeText:{rules:[21,24,74,76,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},thickEdgeText:{rules:[21,24,71,73,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},edgeText:{rules:[21,24,68,70,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},trapText:{rules:[21,24,77,80,82,84,88,90,91,92,93,94,95,108,110,112,114],inclusive:!1},ellipseText:{rules:[21,24,77,78,79,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},text:{rules:[21,24,77,80,81,82,83,84,87,88,89,90,94,95,107,108,109,110,111,112,113,114,115],inclusive:!1},vertex:{rules:[21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},dir:{rules:[21,24,44,45,46,47,48,49,50,51,52,53,54,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr_multiline:{rules:[5,6,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_descr:{rules:[3,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},acc_title:{rules:[1,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},md_string:{rules:[19,20,21,24,77,80,82,84,88,90,94,95,108,110,112,114],inclusive:!1},string:{rules:[21,22,23,24,77,80,82,84,88,90,94,95,108,110,112,114],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,71,72,74,75,77,80,82,84,85,86,88,90,94,95,96,97,98,99,100,101,102,103,104,105,106,108,110,112,114,116,117,118,119],inclusive:!0}}};B.lexer=$,mt(P,"Parser"),(IK=new((P.prototype=B).Parser=P)).parser=IK,RK=IK}),jK=e(()=>{qK(),(MK=Object.assign({},RK)).parse=e=>(e=e.replace(/}\s*\n/g,`} +`),RK.parse(e)),DK=MK}),WK=e(()=>{OK=mt(()=>` /* Font Awesome icon styling - consolidated */ .label-icon { display: inline-block; @@ -491,23 +491,23 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l stroke: revert; stroke-width: revert; } -`,"getIconStyles")}),VX=t(()=>{vn(),HX(),FX=me((t,e)=>{var r=(i=Be)(t,"r"),n=i(t,"g"),i=i(t,"b");return Oe(r,n,i,e)},"fade"),$X=me(t=>`.label { - font-family: ${t.fontFamily}; - color: ${t.nodeTextColor||t.textColor}; +`,"getIconStyles")}),YK=e(()=>{vn(),WK(),PK=mt((e,t)=>{var r=(i=Bt)(e,"r"),n=i(e,"g"),i=i(e,"b");return Ot(r,n,i,t)},"fade"),BK=mt(e=>`.label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; } .cluster-label text { - fill: ${t.titleColor}; + fill: ${e.titleColor}; } .cluster-label span { - color: ${t.titleColor}; + color: ${e.titleColor}; } .cluster-label span p { background-color: transparent; } .label text,span { - fill: ${t.nodeTextColor||t.textColor}; - color: ${t.nodeTextColor||t.textColor}; + fill: ${e.nodeTextColor||e.textColor}; + color: ${e.nodeTextColor||e.textColor}; } .node rect, @@ -515,8 +515,8 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l .node ellipse, .node polygon, .node path { - fill: ${t.mainBkg}; - stroke: ${t.nodeBorder}; + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; stroke-width: 1px; } .rough-node .label text , .node .label text, .image-shape .label, .icon-shape .label { @@ -544,59 +544,59 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l .root .anchor path { - fill: ${t.lineColor} !important; + fill: ${e.lineColor} !important; stroke-width: 0; - stroke: ${t.lineColor}; + stroke: ${e.lineColor}; } .arrowheadPath { - fill: ${t.arrowheadColor}; + fill: ${e.arrowheadColor}; } .edgePath .path { - stroke: ${t.lineColor}; + stroke: ${e.lineColor}; stroke-width: 2.0px; } .flowchart-link { - stroke: ${t.lineColor}; + stroke: ${e.lineColor}; fill: none; } .edgeLabel { - background-color: ${t.edgeLabelBackground}; + background-color: ${e.edgeLabelBackground}; p { - background-color: ${t.edgeLabelBackground}; + background-color: ${e.edgeLabelBackground}; } rect { opacity: 0.5; - background-color: ${t.edgeLabelBackground}; - fill: ${t.edgeLabelBackground}; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; } text-align: center; } /* For html labels only */ .labelBkg { - background-color: ${FX(t.edgeLabelBackground,.5)}; + background-color: ${PK(e.edgeLabelBackground,.5)}; // background-color: } .cluster rect { - fill: ${t.clusterBkg}; - stroke: ${t.clusterBorder}; + fill: ${e.clusterBkg}; + stroke: ${e.clusterBorder}; stroke-width: 1px; } .cluster text { - fill: ${t.titleColor}; + fill: ${e.titleColor}; } .cluster span { - color: ${t.titleColor}; + color: ${e.titleColor}; } /* .cluster div { - color: ${t.titleColor}; + color: ${e.titleColor}; } */ div.mermaidTooltip { @@ -604,10 +604,10 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l text-align: center; max-width: 200px; padding: 2px; - font-family: ${t.fontFamily}; + font-family: ${e.fontFamily}; font-size: 12px; - background: ${t.tertiaryColor}; - border: 1px solid ${t.border2}; + background: ${e.tertiaryColor}; + border: 1px solid ${e.border2}; border-radius: 2px; pointer-events: none; z-index: 100; @@ -616,7 +616,7 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l .flowchartTitleText { text-anchor: middle; font-size: 18px; - fill: ${t.textColor}; + fill: ${e.textColor}; } rect.text { @@ -625,51 +625,51 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l } .icon-shape, .image-shape { - background-color: ${t.edgeLabelBackground}; + background-color: ${e.edgeLabelBackground}; p { - background-color: ${t.edgeLabelBackground}; + background-color: ${e.edgeLabelBackground}; padding: 2px; } rect { opacity: 0.5; - background-color: ${t.edgeLabelBackground}; - fill: ${t.edgeLabelBackground}; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; } text-align: center; } - ${BX()} -`,"getStyles"),zX=$X}),XX={};oPt(XX,{diagram:()=>KX});var KX,ZX,QX,JX,tK=t(()=>{mu(),qM(),jX(),YX(),VX(),KX={parser:PX,get db(){return new NM},renderer:RX,styles:zX,init:me(t=>{t.flowchart||(t.flowchart={}),t.layout&&yh({layout:t.layout}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,yh({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}})},"init")}}),eK=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],n=[1,10],i=[1,11],a=[1,12],s=[1,13],o=[1,20],l=[1,21],c=[1,22],h=[1,23],u=[1,24],d=[1,19],p=[1,25],P=[1,26],g=[1,18],f=[1,33],m=[1,34],y=[1,35],v=[1,36],x=[1,37],B=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,50,63,64,65,66,67],b=[1,42],w=[1,43],k=[1,52],T=[40,50,68,69],E=[1,63],C=[1,61],_=[1,58],S=[1,62],A=[1,64],L=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,63,64,65,66,67],F=[63,64,65,66,67],$=[1,81],z=[1,80],G=[1,78],U=[1,79],q=[6,10,42,47],N=[6,10,13,41,42,47,48,49],I=[1,89],R=[1,88],M=[1,87],D=[19,56],j=[1,98],W=[1,97],O=[19,56,58,60],n={trace:me(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,attribute:51,attributeType:52,attributeName:53,attributeKeyTypeList:54,attributeComment:55,ATTRIBUTE_WORD:56,attributeKeyType:57,",":58,ATTRIBUTE_KEY:59,COMMENT:60,cardinality:61,relType:62,ZERO_OR_ONE:63,ZERO_OR_MORE:64,ONE_OR_MORE:65,ONLY_ONE:66,MD_PARENT:67,NON_IDENTIFYING:68,IDENTIFYING:69,WORD:70,$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",56:"ATTRIBUTE_WORD",58:",",59:"ATTRIBUTE_KEY",60:"COMMENT",63:"ZERO_OR_ONE",64:"ZERO_OR_MORE",65:"ONE_OR_MORE",66:"ONLY_ONE",67:"MD_PARENT",68:"NON_IDENTIFYING",69:"IDENTIFYING",70:"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],[18,1],[18,2],[51,2],[51,3],[51,3],[51,4],[52,1],[53,1],[54,1],[54,3],[57,1],[55,1],[12,3],[61,1],[61,1],[61,1],[61,1],[61,1],[62,1],[62,1],[14,1],[14,1],[14,1]],performAction:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){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:n.addEntity(a[o-4]),n.addEntity(a[o-2]),n.addRelationship(a[o-4],a[o],a[o-2],a[o-3]);break;case 9:n.addEntity(a[o-8]),n.addEntity(a[o-4]),n.addRelationship(a[o-8],a[o],a[o-4],a[o-5]),n.setClass([a[o-8]],a[o-6]),n.setClass([a[o-4]],a[o-2]);break;case 10:n.addEntity(a[o-6]),n.addEntity(a[o-2]),n.addRelationship(a[o-6],a[o],a[o-2],a[o-3]),n.setClass([a[o-6]],a[o-4]);break;case 11:n.addEntity(a[o-6]),n.addEntity(a[o-4]),n.addRelationship(a[o-6],a[o],a[o-4],a[o-5]),n.setClass([a[o-4]],a[o-2]);break;case 12:n.addEntity(a[o-3]),n.addAttributes(a[o-3],a[o-1]);break;case 13:n.addEntity(a[o-5]),n.addAttributes(a[o-5],a[o-1]),n.setClass([a[o-5]],a[o-3]);break;case 14:n.addEntity(a[o-2]);break;case 15:n.addEntity(a[o-4]),n.setClass([a[o-4]],a[o-2]);break;case 16:n.addEntity(a[o]);break;case 17:n.addEntity(a[o-2]),n.setClass([a[o-2]],a[o]);break;case 18:n.addEntity(a[o-6],a[o-4]),n.addAttributes(a[o-6],a[o-1]);break;case 19:n.addEntity(a[o-8],a[o-6]),n.addAttributes(a[o-8],a[o-1]),n.setClass([a[o-8]],a[o-3]);break;case 20:n.addEntity(a[o-5],a[o-3]);break;case 21:n.addEntity(a[o-7],a[o-5]),n.setClass([a[o-7]],a[o-2]);break;case 22:n.addEntity(a[o-3],a[o-1]);break;case 23:n.addEntity(a[o-5],a[o-3]),n.setClass([a[o-5]],a[o]);break;case 24:case 25:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 26:case 27:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 32:n.setDirection("TB");break;case 33:n.setDirection("BT");break;case 34:n.setDirection("RL");break;case 35:n.setDirection("LR");break;case 36:this.$=a[o-3],n.addClass(a[o-2],a[o-1]);break;case 37:case 38:case 56:case 64:this.$=[a[o]];break;case 39:case 40:this.$=a[o-2].concat([a[o]]);break;case 41:this.$=a[o-2],n.setClass(a[o-1],a[o]);break;case 42:this.$=a[o-3],n.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 76:case 77:this.$=a[o].replace(/"/g,"");break;case 55:case 78:this.$=a[o];break;case 57:a[o].push(a[o-1]),this.$=a[o];break;case 58:this.$={type:a[o-1],name:a[o]};break;case 59:this.$={type:a[o-2],name:a[o-1],keys:a[o]};break;case 60:this.$={type:a[o-2],name:a[o-1],comment:a[o]};break;case 61:this.$={type:a[o-3],name:a[o-2],keys:a[o-1],comment:a[o]};break;case 62:case 63:case 66:this.$=a[o];break;case 65:a[o-2].push(a[o]),this.$=a[o-2];break;case 67:this.$=a[o].replace(/"/g,"");break;case 68:this.$={cardA:a[o],relType:a[o-1],cardB:a[o-2]};break;case 69:this.$=n.Cardinality.ZERO_OR_ONE;break;case 70:this.$=n.Cardinality.ZERO_OR_MORE;break;case 71:this.$=n.Cardinality.ONE_OR_MORE;break;case 72:this.$=n.Cardinality.ONLY_ONE;break;case 73:this.$=n.Cardinality.MD_PARENT;break;case 74:this.$=n.Identification.NON_IDENTIFYING;break;case 75:this.$=n.Identification.IDENTIFYING}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:9,22:n,24:i,26:a,28:s,29:14,30:15,31:16,32:17,33:o,34:l,35:c,36:h,37:u,40:d,43:p,44:P,50:g},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:27,11:9,22:n,24:i,26:a,28:s,29:14,30:15,31:16,32:17,33:o,34:l,35:c,36:h,37:u,40:d,43:p,44:P,50:g},e(r,[2,5]),e(r,[2,6]),e(r,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:f,64:m,65:y,66:v,67:x}),{23:[1,38]},{25:[1,39]},{27:[1,40]},e(r,[2,27]),e(r,[2,28]),e(r,[2,29]),e(r,[2,30]),e(r,[2,31]),e(B,[2,54]),e(B,[2,55]),e(r,[2,32]),e(r,[2,33]),e(r,[2,34]),e(r,[2,35]),{16:41,40:b,41:w},{16:44,40:b,41:w},{16:45,40:b,41:w},e(r,[2,4]),{11:46,40:d,50:g},{16:47,40:b,41:w},{18:48,19:[1,49],51:50,52:51,56:k},{11:53,40:d,50:g},{62:54,68:[1,55],69:[1,56]},e(T,[2,69]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(r,[2,24]),e(r,[2,25]),e(r,[2,26]),{13:E,38:57,41:C,42:_,45:59,46:60,48:S,49:A},e(L,[2,37]),e(L,[2,38]),{16:65,40:b,41:w,42:_},{13:E,38:66,41:C,42:_,45:59,46:60,48:S,49:A},{13:[1,67],15:[1,68]},e(r,[2,17],{61:32,12:69,17:[1,70],42:_,63:f,64:m,65:y,66:v,67:x}),{19:[1,71]},e(r,[2,14]),{18:72,19:[2,56],51:50,52:51,56:k},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:f,64:m,65:y,66:v,67:x},e(F,[2,74]),e(F,[2,75]),{6:$,10:z,39:77,42:G,47:U},{40:[1,82],41:[1,83]},e(q,[2,43],{46:84,13:E,41:C,48:S,49:A}),e(N,[2,45]),e(N,[2,50]),e(N,[2,51]),e(N,[2,52]),e(N,[2,53]),e(r,[2,41],{42:_}),{6:$,10:z,39:85,42:G,47:U},{14:86,40:I,50:R,70:M},{16:90,40:b,41:w},{11:91,40:d,50:g},{18:92,19:[1,93],51:50,52:51,56:k},e(r,[2,12]),{19:[2,57]},e(D,[2,58],{54:94,55:95,57:96,59:j,60:W}),e([19,56,59,60],[2,63]),e(r,[2,22],{15:[1,100],17:[1,99]}),e([40,50],[2,68]),e(r,[2,36]),{13:E,41:C,45:101,46:60,48:S,49:A},e(r,[2,47]),e(r,[2,48]),e(r,[2,49]),e(L,[2,39]),e(L,[2,40]),e(N,[2,46]),e(r,[2,42]),e(r,[2,8]),e(r,[2,76]),e(r,[2,77]),e(r,[2,78]),{13:[1,102],42:_},{13:[1,104],15:[1,103]},{19:[1,105]},e(r,[2,15]),e(D,[2,59],{55:106,58:[1,107],60:W}),e(D,[2,60]),e(O,[2,64]),e(D,[2,67]),e(O,[2,66]),{18:108,19:[1,109],51:50,52:51,56:k},{16:110,40:b,41:w},e(q,[2,44],{46:84,13:E,41:C,48:S,49:A}),{14:111,40:I,50:R,70:M},{16:112,40:b,41:w},{14:113,40:I,50:R,70:M},e(r,[2,13]),e(D,[2,61]),{57:114,59:j},{19:[1,115]},e(r,[2,20]),e(r,[2,23],{17:[1,116],42:_}),e(r,[2,11]),{13:[1,117],42:_},e(r,[2,10]),e(O,[2,65]),e(r,[2,18]),{18:118,19:[1,119],51:50,52:51,56:k},{14:120,40:I,50:R,70:M},{19:[1,121]},e(r,[2,21]),e(r,[2,9]),e(r,[2,19])],defaultActions:{52:[2,62],72:[2,57]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"VK});var VK,XK,KK,ZK,QK=e(()=>{mu(),GD(),UK(),jK(),YK(),VK={parser:DK,get db(){return new AD},renderer:NK,styles:$K,init:mt(e=>{e.flowchart||(e.flowchart={}),e.layout&&yh({layout:e.layout}),e.flowchart.arrowMarkerAbsolute=e.arrowMarkerAbsolute,yh({flowchart:{arrowMarkerAbsolute:e.arrowMarkerAbsolute}})},"init")}}),JK=e(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[6,8,10,22,24,26,28,33,34,35,36,37,40,43,44,50],n=[1,10],i=[1,11],a=[1,12],s=[1,13],o=[1,20],l=[1,21],c=[1,22],h=[1,23],u=[1,24],d=[1,19],p=[1,25],P=[1,26],g=[1,18],f=[1,33],m=[1,34],y=[1,35],v=[1,36],x=[1,37],B=[6,8,10,13,15,17,20,21,22,24,26,28,33,34,35,36,37,40,43,44,50,63,64,65,66,67],b=[1,42],w=[1,43],k=[1,52],T=[40,50,68,69],E=[1,63],C=[1,61],S=[1,58],_=[1,62],A=[1,64],L=[6,8,10,13,17,22,24,26,28,33,34,35,36,37,40,41,42,43,44,48,49,50,63,64,65,66,67],$=[63,64,65,66,67],F=[1,81],z=[1,80],G=[1,78],U=[1,79],q=[6,10,42,47],N=[6,10,13,41,42,47,48,49],I=[1,89],R=[1,88],M=[1,87],D=[19,56],j=[1,98],W=[1,97],O=[19,56,58,60],n={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,attribute:51,attributeType:52,attributeName:53,attributeKeyTypeList:54,attributeComment:55,ATTRIBUTE_WORD:56,attributeKeyType:57,",":58,ATTRIBUTE_KEY:59,COMMENT:60,cardinality:61,relType:62,ZERO_OR_ONE:63,ZERO_OR_MORE:64,ONE_OR_MORE:65,ONLY_ONE:66,MD_PARENT:67,NON_IDENTIFYING:68,IDENTIFYING:69,WORD:70,$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",56:"ATTRIBUTE_WORD",58:",",59:"ATTRIBUTE_KEY",60:"COMMENT",63:"ZERO_OR_ONE",64:"ZERO_OR_MORE",65:"ONE_OR_MORE",66:"ONLY_ONE",67:"MD_PARENT",68:"NON_IDENTIFYING",69:"IDENTIFYING",70:"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],[18,1],[18,2],[51,2],[51,3],[51,3],[51,4],[52,1],[53,1],[54,1],[54,3],[57,1],[55,1],[12,3],[61,1],[61,1],[61,1],[61,1],[61,1],[62,1],[62,1],[14,1],[14,1],[14,1]],performAction:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){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:n.addEntity(a[o-4]),n.addEntity(a[o-2]),n.addRelationship(a[o-4],a[o],a[o-2],a[o-3]);break;case 9:n.addEntity(a[o-8]),n.addEntity(a[o-4]),n.addRelationship(a[o-8],a[o],a[o-4],a[o-5]),n.setClass([a[o-8]],a[o-6]),n.setClass([a[o-4]],a[o-2]);break;case 10:n.addEntity(a[o-6]),n.addEntity(a[o-2]),n.addRelationship(a[o-6],a[o],a[o-2],a[o-3]),n.setClass([a[o-6]],a[o-4]);break;case 11:n.addEntity(a[o-6]),n.addEntity(a[o-4]),n.addRelationship(a[o-6],a[o],a[o-4],a[o-5]),n.setClass([a[o-4]],a[o-2]);break;case 12:n.addEntity(a[o-3]),n.addAttributes(a[o-3],a[o-1]);break;case 13:n.addEntity(a[o-5]),n.addAttributes(a[o-5],a[o-1]),n.setClass([a[o-5]],a[o-3]);break;case 14:n.addEntity(a[o-2]);break;case 15:n.addEntity(a[o-4]),n.setClass([a[o-4]],a[o-2]);break;case 16:n.addEntity(a[o]);break;case 17:n.addEntity(a[o-2]),n.setClass([a[o-2]],a[o]);break;case 18:n.addEntity(a[o-6],a[o-4]),n.addAttributes(a[o-6],a[o-1]);break;case 19:n.addEntity(a[o-8],a[o-6]),n.addAttributes(a[o-8],a[o-1]),n.setClass([a[o-8]],a[o-3]);break;case 20:n.addEntity(a[o-5],a[o-3]);break;case 21:n.addEntity(a[o-7],a[o-5]),n.setClass([a[o-7]],a[o-2]);break;case 22:n.addEntity(a[o-3],a[o-1]);break;case 23:n.addEntity(a[o-5],a[o-3]),n.setClass([a[o-5]],a[o]);break;case 24:case 25:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 26:case 27:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 32:n.setDirection("TB");break;case 33:n.setDirection("BT");break;case 34:n.setDirection("RL");break;case 35:n.setDirection("LR");break;case 36:this.$=a[o-3],n.addClass(a[o-2],a[o-1]);break;case 37:case 38:case 56:case 64:this.$=[a[o]];break;case 39:case 40:this.$=a[o-2].concat([a[o]]);break;case 41:this.$=a[o-2],n.setClass(a[o-1],a[o]);break;case 42:this.$=a[o-3],n.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 76:case 77:this.$=a[o].replace(/"/g,"");break;case 55:case 78:this.$=a[o];break;case 57:a[o].push(a[o-1]),this.$=a[o];break;case 58:this.$={type:a[o-1],name:a[o]};break;case 59:this.$={type:a[o-2],name:a[o-1],keys:a[o]};break;case 60:this.$={type:a[o-2],name:a[o-1],comment:a[o]};break;case 61:this.$={type:a[o-3],name:a[o-2],keys:a[o-1],comment:a[o]};break;case 62:case 63:case 66:this.$=a[o];break;case 65:a[o-2].push(a[o]),this.$=a[o-2];break;case 67:this.$=a[o].replace(/"/g,"");break;case 68:this.$={cardA:a[o],relType:a[o-1],cardB:a[o-2]};break;case 69:this.$=n.Cardinality.ZERO_OR_ONE;break;case 70:this.$=n.Cardinality.ZERO_OR_MORE;break;case 71:this.$=n.Cardinality.ONE_OR_MORE;break;case 72:this.$=n.Cardinality.ONLY_ONE;break;case 73:this.$=n.Cardinality.MD_PARENT;break;case 74:this.$=n.Identification.NON_IDENTIFYING;break;case 75:this.$=n.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:n,24:i,26:a,28:s,29:14,30:15,31:16,32:17,33:o,34:l,35:c,36:h,37:u,40:d,43:p,44:P,50:g},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:27,11:9,22:n,24:i,26:a,28:s,29:14,30:15,31:16,32:17,33:o,34:l,35:c,36:h,37:u,40:d,43:p,44:P,50:g},t(r,[2,5]),t(r,[2,6]),t(r,[2,16],{12:28,61:32,15:[1,29],17:[1,30],20:[1,31],63:f,64:m,65:y,66:v,67:x}),{23:[1,38]},{25:[1,39]},{27:[1,40]},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(r,[2,32]),t(r,[2,33]),t(r,[2,34]),t(r,[2,35]),{16:41,40:b,41:w},{16:44,40:b,41:w},{16:45,40:b,41:w},t(r,[2,4]),{11:46,40:d,50:g},{16:47,40:b,41:w},{18:48,19:[1,49],51:50,52:51,56:k},{11:53,40:d,50:g},{62:54,68:[1,55],69:[1,56]},t(T,[2,69]),t(T,[2,70]),t(T,[2,71]),t(T,[2,72]),t(T,[2,73]),t(r,[2,24]),t(r,[2,25]),t(r,[2,26]),{13:E,38:57,41:C,42:S,45:59,46:60,48:_,49:A},t(L,[2,37]),t(L,[2,38]),{16:65,40:b,41:w,42:S},{13:E,38:66,41:C,42:S,45:59,46:60,48:_,49:A},{13:[1,67],15:[1,68]},t(r,[2,17],{61:32,12:69,17:[1,70],42:S,63:f,64:m,65:y,66:v,67:x}),{19:[1,71]},t(r,[2,14]),{18:72,19:[2,56],51:50,52:51,56:k},{53:73,56:[1,74]},{56:[2,62]},{21:[1,75]},{61:76,63:f,64:m,65:y,66:v,67:x},t($,[2,74]),t($,[2,75]),{6:F,10:z,39:77,42:G,47:U},{40:[1,82],41:[1,83]},t(q,[2,43],{46:84,13:E,41:C,48:_,49:A}),t(N,[2,45]),t(N,[2,50]),t(N,[2,51]),t(N,[2,52]),t(N,[2,53]),t(r,[2,41],{42:S}),{6:F,10:z,39:85,42:G,47:U},{14:86,40:I,50:R,70:M},{16:90,40:b,41:w},{11:91,40:d,50:g},{18:92,19:[1,93],51:50,52:51,56:k},t(r,[2,12]),{19:[2,57]},t(D,[2,58],{54:94,55:95,57:96,59:j,60:W}),t([19,56,59,60],[2,63]),t(r,[2,22],{15:[1,100],17:[1,99]}),t([40,50],[2,68]),t(r,[2,36]),{13:E,41:C,45:101,46:60,48:_,49:A},t(r,[2,47]),t(r,[2,48]),t(r,[2,49]),t(L,[2,39]),t(L,[2,40]),t(N,[2,46]),t(r,[2,42]),t(r,[2,8]),t(r,[2,76]),t(r,[2,77]),t(r,[2,78]),{13:[1,102],42:S},{13:[1,104],15:[1,103]},{19:[1,105]},t(r,[2,15]),t(D,[2,59],{55:106,58:[1,107],60:W}),t(D,[2,60]),t(O,[2,64]),t(D,[2,67]),t(O,[2,66]),{18:108,19:[1,109],51:50,52:51,56:k},{16:110,40:b,41:w},t(q,[2,44],{46:84,13:E,41:C,48:_,49:A}),{14:111,40:I,50:R,70:M},{16:112,40:b,41:w},{14:113,40:I,50:R,70:M},t(r,[2,13]),t(D,[2,61]),{57:114,59:j},{19:[1,115]},t(r,[2,20]),t(r,[2,23],{17:[1,116],42:S}),t(r,[2,11]),{13:[1,117],42:S},t(r,[2,10]),t(O,[2,65]),t(r,[2,18]),{18:118,19:[1,119],51:50,52:51,56:k},{14:120,40:I,50:R,70:M},{19:[1,121]},t(r,[2,21]),t(r,[2,9]),t(r,[2,19])],defaultActions:{52:[2,62],72:[2,57]},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,n=[0],i=[],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"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0{e(),mu(),fu(),ZE(),JX=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=ch,this.getAccTitle=hh,this.setAccDescription=uh,this.getAccDescription=dh,this.setDiagramTitle=ph,this.getDiagramTitle=gh,this.getConfig=me(()=>D().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{me(this,"ErDB")}addEntity(t,e=""){return this.entities.has(t)?!this.entities.get(t)?.alias&&e&&(this.entities.get(t).alias=e,M.info(`Add alias '${e}' to entity '${t}'`)):(this.entities.set(t,{id:`entity-${t}-`+this.entities.size,label:t,attributes:[],alias:e,shape:"erBox",look:D().look??"default",cssClasses:"default",cssStyles:[]}),M.info("Added new entity :",t)),this.entities.get(t)}getEntity(t){return this.entities.get(t)}getEntities(){return this.entities}getClasses(){return this.classes}addAttributes(t,e){let r=this.addEntity(t),n;for(n=e.length-1;0<=n;n--)e[n].keys||(e[n].keys=[]),e[n].comment||(e[n].comment=""),r.attributes.push(e[n]),M.debug("Added attribute ",e[n].name)}addRelationship(t,e,r,n){t=this.entities.get(t),r=this.entities.get(r),t&&r&&(t={entityA:t.id,roleA:e,entityB:r.id,relSpec:n},this.relationships.push(t),M.debug("Added new relationship :",t))}getRelationships(){return this.relationships}getDirection(){return this.direction}setDirection(t){this.direction=t}getCompiledStyles(t){let e=[];for(var r of t)(r=this.classes.get(r))?.styles&&(e=[...e,...r.styles??[]].map(t=>t.trim())),r?.textStyles&&(e=[...e,...r.textStyles??[]].map(t=>t.trim()));return e}addCssStyles(t,e){for(var r of t){var n,i=this.entities.get(r);if(!e||!i)return;for(n of e)i.cssStyles.push(n)}}addClass(t,e){t.forEach(t=>{let r=this.classes.get(t);void 0===r&&(r={id:t,styles:[],textStyles:[]},this.classes.set(t,r)),e&&e.forEach(function(t){var e;/color/.exec(t)&&(e=t.replace("fill","bgFill"),r.textStyles.push(e)),r.styles.push(t)})})}setClass(t,e){for(var r of t){var n=this.entities.get(r);if(n)for(var i of e)n.cssClasses+=" "+i}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],lh()}getData(){var t,e,r=[],n=[],i=D();for(t of this.entities.keys()){var a=this.entities.get(t);a&&(a.cssCompiledStyles=this.getCompiledStyles(a.cssClasses.split(" ")),r.push(a))}let s=0;for(e of this.relationships){var o={id:KE(e.entityA,e.entityB,{prefix:"id",counter:s++}),type:"normal",curve:"basis",start:e.entityA,end:e.entityB,label:e.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:e.relSpec.cardB.toLowerCase(),arrowTypeEnd:e.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==e.relSpec.relType?"solid":"dashed",look:i.look};n.push(o)}return{nodes:r,edges:n,other:{},config:i,direction:"TB"}}}}),nK={};oPt(nK,{draw:()=>iK});var iK,aK,sK,oK,lK=t(()=>{mu(),e(),jM(),UX(),qX(),ZE(),Q3(),iK=me(async function(t,e,r,n){M.info("REF0:"),M.info("Drawing er diagram (unified)",e);let{securityLevel:i,er:a,layout:s}=D(),o=n.db.getData(),l=IM(e,i);o.type=n.type,o.layoutAlgorithm=_X(s),o.config.flowchart.nodeSpacing=a?.nodeSpacing||140,o.config.flowchart.rankSpacing=a?.rankSpacing||80,o.direction=n.db.getDirection(),o.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],o.diagramId=e,await CX(o,l),"elk"===o.layoutAlgorithm&&l.select(".edges").lower(),e=l.selectAll('[id*="-background"]'),0{vn(),aK=me((t,e)=>{var r=(i=Be)(t,"r"),n=i(t,"g"),i=i(t,"b");return Oe(r,n,i,e)},"fade"),sK=me(t=>` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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{t(),mu(),fu(),KC(),ZK=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=ch,this.getAccTitle=hh,this.setAccDescription=uh,this.getAccDescription=dh,this.setDiagramTitle=ph,this.getDiagramTitle=gh,this.getConfig=mt(()=>D().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,M.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:D().look??"default",cssClasses:"default",cssStyles:[]}),M.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),n;for(n=t.length-1;0<=n;n--)t[n].keys||(t[n].keys=[]),t[n].comment||(t[n].comment=""),r.attributes.push(t[n]),M.debug("Added attribute ",t[n].name)}addRelationship(e,t,r,n){e=this.entities.get(e),r=this.entities.get(r),e&&r&&(e={entityA:e.id,roleA:t,entityB:r.id,relSpec:n},this.relationships.push(e),M.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 n,i=this.entities.get(r);if(!t||!i)return;for(n of t)i.cssStyles.push(n)}}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 n=this.entities.get(r);if(n)for(var i of t)n.cssClasses+=" "+i}}clear(){this.entities=new Map,this.classes=new Map,this.relationships=[],lh()}getData(){var e,t,r=[],n=[],i=D();for(e of this.entities.keys()){var a=this.entities.get(e);a&&(a.cssCompiledStyles=this.getCompiledStyles(a.cssClasses.split(" ")),r.push(a))}let s=0;for(t of this.relationships){var o={id:XC(t.entityA,t.entityB,{prefix:"id",counter:s++}),type:"normal",curve:"basis",start:t.entityA,end:t.entityB,label:t.roleA,labelpos:"c",thickness:"normal",classes:"relationshipLine",arrowTypeStart:t.relSpec.cardB.toLowerCase(),arrowTypeEnd:t.relSpec.cardA.toLowerCase(),pattern:"IDENTIFYING"==t.relSpec.relType?"solid":"dashed",look:i.look};n.push(o)}return{nodes:r,edges:n,other:{},config:i,direction:"TB"}}}}),tZ={};JBe(tZ,{draw:()=>rZ});var rZ,nZ,iZ,aZ,sZ=e(()=>{mu(),t(),UD(),zK(),GK(),KC(),Zw(),rZ=mt(async function(e,t,r,n){M.info("REF0:"),M.info("Drawing er diagram (unified)",t);let{securityLevel:i,er:a,layout:s}=D(),o=n.db.getData(),l=LD(t,i);o.type=n.type,o.layoutAlgorithm=EK(s),o.config.flowchart.nodeSpacing=a?.nodeSpacing||140,o.config.flowchart.rankSpacing=a?.rankSpacing||80,o.direction=n.db.getDirection(),o.markers=["only_one","zero_or_one","one_or_more","zero_or_more"],o.diagramId=t,await TK(o,l),"elk"===o.layoutAlgorithm&&l.select(".edges").lower(),t=l.selectAll('[id*="-background"]'),0{vn(),nZ=mt((e,t)=>{var r=(i=Bt)(e,"r"),n=i(e,"g"),i=i(e,"b");return Ot(r,n,i,t)},"fade"),iZ=mt(e=>` .entityBox { - fill: ${t.mainBkg}; - stroke: ${t.nodeBorder}; + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; } .relationshipLabelBox { - fill: ${t.tertiaryColor}; + fill: ${e.tertiaryColor}; opacity: 0.7; - background-color: ${t.tertiaryColor}; + background-color: ${e.tertiaryColor}; rect { opacity: 0.5; } } .labelBkg { - background-color: ${aK(t.tertiaryColor,.5)}; + background-color: ${nZ(e.tertiaryColor,.5)}; } .edgeLabel .label { - fill: ${t.nodeBorder}; + fill: ${e.nodeBorder}; font-size: 14px; } .label { - font-family: ${t.fontFamily}; - color: ${t.nodeTextColor||t.textColor}; + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; } .edge-pattern-dashed { @@ -681,164 +681,164 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l .node ellipse, .node polygon { - fill: ${t.mainBkg}; - stroke: ${t.nodeBorder}; + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; stroke-width: 1px; } .relationshipLine { - stroke: ${t.lineColor}; + stroke: ${e.lineColor}; stroke-width: 1; fill: none; } .marker { fill: none !important; - stroke: ${t.lineColor} !important; + stroke: ${e.lineColor} !important; stroke-width: 1; } -`,"getStyles"),oK=sK}),hK={};oPt(hK,{diagram:()=>uK});var uK,dK=t(()=>{eK(),rK(),lK(),cK(),uK={parser:QX,get db(){return new JX},renderer:nK,styles:oK}});function pK(t){return"object"==typeof t&&null!==t&&"string"==typeof t.$type}function gK(t){return"object"==typeof t&&null!==t&&"string"==typeof t.$refText}function fK(t){return"object"==typeof t&&null!==t&&"string"==typeof t.name&&"string"==typeof t.type&&"string"==typeof t.path}function mK(t){return"object"==typeof t&&null!==t&&pK(t.container)&&gK(t.reference)&&"string"==typeof t.message}function yK(t){return"object"==typeof t&&null!==t&&Array.isArray(t.content)}function vK(t){return"object"==typeof t&&null!==t&&"object"==typeof t.tokenType}function xK(t){return yK(t)&&"string"==typeof t.fullText}var bK,wK=t(()=>{me(pK,"isAstNode"),me(gK,"isReference"),me(fK,"isAstNodeDescription"),me(mK,"isLinkingError"),bK=class{static{me(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}isInstance(t,e){return pK(t)&&this.isSubtype(t.$type,e)}isSubtype(t,e){var r,n;return t===e||(void 0!==(n=(r=(r=this.subtypes[t])||(this.subtypes[t]={}))[e])?n:(n=this.computeIsSubtype(t,e),r[e]=n))}getAllSubTypes(t){var e=this.allSubtypes[t];if(e)return e;var r,n=[];for(r of this.getAllTypes())this.isSubtype(r,t)&&n.push(r);return this.allSubtypes[t]=n}},me(yK,"isCompositeCstNode"),me(vK,"isLeafCstNode"),me(xK,"isRootCstNode")});function kK(t){return"string"==typeof t?t:"u"e[Symbol.iterator](),t=>t.next());if("number"==typeof e.length)return new CK(()=>({index:0}),t=>t.index({collIndex:0,arrIndex:0}),t=>{do{if(t.iterator){var e=t.iterator.next();if(!e.done)return e;t.iterator=void 0}if(t.array){if(t.arrIndex{function t(t){return t.reduce((t,e)=>t+e,0)}function e(t){return t.reduce((t,e)=>t*e,0)}function r(t){return t.reduce((t,e)=>Math.min(t,e))}function n(t){return t.reduce((t,e)=>Math.max(t,e))}var i;CK=class a{static{me(this,"StreamImpl")}constructor(t,e){this.startFn=t,this.nextFn=e}iterator(){let t={state:this.startFn(),next:me(()=>this.nextFn(t.state),"next"),[Symbol.iterator]:()=>t};return t}[Symbol.iterator](){return this.iterator()}isEmpty(){return!!this.iterator().next().done}count(){let t=this.iterator(),e=0,r=t.next();for(;!r.done;)e++,r=t.next();return e}toArray(){for(var t,e=[],r=this.iterator();void 0!==(t=r.next()).value&&e.push(t.value),!t.done;);return e}toSet(){return new Set(this)}toMap(e,r){var t=this.map(t=>[e?e(t):t,r?r(t):t]);return new Map(t)}toString(){return this.join()}concat(t){return new a(()=>({first:this.startFn(),firstDone:!1,iterator:t[Symbol.iterator]()}),t=>{let e;if(!t.firstDone){do{if(!(e=this.nextFn(t.first)).done)return e}while(!e.done);t.firstDone=!0}do{if(!(e=t.iterator.next()).done)return e}while(!e.done);return SK})}join(t=","){let e=this.iterator(),r="",n,i=!1;for(;(n=e.next()).done||(i&&(r+=t),r+=kK(n.value)),i=!0,!n.done;);return r}indexOf(t,e=0){let r=this.iterator(),n=0,i=r.next();for(;!i.done;){if(n>=e&&i.value===t)return n;i=r.next(),n++}return-1}every(t){let e=this.iterator(),r=e.next();for(;!r.done;){if(!t(r.value))return!1;r=e.next()}return!0}some(t){let e=this.iterator(),r=e.next();for(;!r.done;){if(t(r.value))return!0;r=e.next()}return!1}forEach(t){let e=this.iterator(),r=0,n=e.next();for(;!n.done;)t(n.value,r),n=e.next(),r++}map(r){return new a(this.startFn,t=>{var{done:t,value:e}=this.nextFn(t);return t?SK:{done:!1,value:r(e)}})}filter(r){return new a(this.startFn,t=>{var e;do{if(!(e=this.nextFn(t)).done&&r(e.value))return e}while(!e.done);return SK})}nonNullable(){return this.filter(t=>null!=t)}reduce(t,e){let r=this.iterator(),n=e,i=r.next();for(;!i.done;)n=void 0===n?i.value:t(n,i.value),i=r.next();return n}reduceRight(t,e){return this.recursiveReduce(this.iterator(),t,e)}recursiveReduce(t,e,r){var n=t.next();return n.done?r:void 0===(t=this.recursiveReduce(t,e,r))?n.value:e(t,n.value)}find(t){let e=this.iterator(),r=e.next();for(;!r.done;){if(t(r.value))return r.value;r=e.next()}}findIndex(t){let e=this.iterator(),r=0,n=e.next();for(;!n.done;){if(t(n.value))return r;n=e.next(),r++}return-1}includes(t){let e=this.iterator(),r=e.next();for(;!r.done;){if(r.value===t)return!0;r=e.next()}return!1}flatMap(n){return new a(()=>({this:this.startFn()}),t=>{do{if(t.iterator){if(!(e=t.iterator.next()).done)return e;t.iterator=void 0}var{done:e,value:r}=this.nextFn(t.this);if(!e){if(!TK(r=n(r)))return{done:!1,value:r};t.iterator=r[Symbol.iterator]()}}while(t.iterator);return SK})}flat(t){if((t=void 0===t?1:t)<=0)return this;let n=1({this:n.startFn()}),t=>{do{if(t.iterator){if(!(e=t.iterator.next()).done)return e;t.iterator=void 0}var{done:e,value:r}=n.nextFn(t.this);if(!e){if(!TK(r))return{done:!1,value:r};t.iterator=r[Symbol.iterator]()}}while(t.iterator);return SK})}head(){var t=this.iterator().next();if(!t.done)return t.value}tail(r=1){return new a(()=>{var e=this.startFn();for(let t=0;t({size:0,state:this.startFn()}),t=>(t.size++,e({set:new Set,internalState:this.startFn()}),t=>{var e;do{if(!(e=this.nextFn(t.internalState)).done){var r=n?n(e.value):e.value;if(!t.set.has(r))return t.set.add(r),e}}while(!e.done);return SK})}exclude(t,e){let r=new Set;for(var n of t)n=e?e(n):n,r.add(n);return this.filter(t=>(t=e?e(t):t,!r.has(t)))}},me(kK,"toString"),me(TK,"isIterable"),_K=new CK(()=>{},()=>SK),SK=Object.freeze({done:!0,value:void 0}),me(EK,"stream"),AK=class extends CK{static{me(this,"TreeStreamImpl")}constructor(t,r,e){super(()=>({iterators:e?.includeRoot?[[t][Symbol.iterator]()]:[r(t)[Symbol.iterator]()],pruned:!1}),t=>{for(t.pruned&&(t.iterators.pop(),t.pruned=!1);0this.nextFn(t.state),"next"),prune:me(()=>{t.state.pruned=!0},"prune"),[Symbol.iterator]:()=>t};return t}},i=LK=LK||{},me(t,"sum"),i.sum=t,me(e,"product"),i.product=e,me(r,"min"),i.min=r,me(n,"max"),i.max=n}),IK={};function RK(t){return new AK(t,t=>yK(t)?t.content:[],{includeRoot:!0})}function MK(t){return RK(t).filter(vK)}function DK(t,e){for(;t.container;)if((t=t.container)===e)return!0;return!1}function OK(t){return{start:{character:t.startColumn-1,line:t.startLine-1},end:{character:t.endColumn,line:t.endLine-1}}}function PK(t){var e,r;if(t)return{offset:t,end:e,range:r}=t,{range:r,offset:t,end:e,length:e-t}}function BK(t,e){var r;return t.end.linee.end.line||t.start.line===e.end.line&&t.start.character>=e.end.character?ZK.After:(r=t.start.line>e.start.line||t.start.line===e.start.line&&t.start.character>=e.start.character,t=t.end.lineZK.After}function $K(t,e,r=QK){var n;if(t)return 0!t.hidden)-1;0<=t;t--){var n=e.content[t];if(GK(n,r))return n}}}function GK(t,e){return vK(t)&&e.includes(t.tokenType.name)}function UK(t,e){return vK(t)?t:yK(t)&&(t=jK(t,e,!1))?UK(t,e):void 0}function qK(t,e){return vK(t)?t:yK(t)&&(t=jK(t,e,!0))?qK(t,e):void 0}function jK(t,e,r){let n=0,i=t.content.length-1,a;for(;n<=i;){var s=Math.floor((n+i)/2),o=t.content[s];if(o.offset<=e&&o.end>e)return o;o.end<=e?(a=r?o:void 0,n=s+1):i=s-1}return a}function WK(r,n=!0){for(;r.container;){let t=r.container,e=t.content.indexOf(r);for(;0QK,RangeComparison:()=>ZK,compareRange:()=>BK,findCommentNode:()=>zK,findDeclarationNodeAtOffset:()=>$K,findLeafNodeAtOffset:()=>UK,findLeafNodeBeforeOffset:()=>qK,flattenCst:()=>MK,getInteriorNodes:()=>VK,getNextNode:()=>YK,getPreviousNode:()=>WK,getStartlineNode:()=>HK,inRange:()=>FK,isChildNode:()=>DK,isCommentNode:()=>GK,streamCst:()=>RK,toDocumentSegment:()=>PK,tokenToRange:()=>OK});var ZK,QK,JK=t(()=>{var t;wK(),NK(),me(RK,"streamCst"),me(MK,"flattenCst"),me(DK,"isChildNode"),me(OK,"tokenToRange"),me(PK,"toDocumentSegment"),(t=ZK=ZK||{})[t.Before=0]="Before",t[t.After=1]="After",t[t.OverlapFront=2]="OverlapFront",t[t.OverlapBack=3]="OverlapBack",t[t.Inside=4]="Inside",t[t.Outside=5]="Outside",me(BK,"compareRange"),me(FK,"inRange"),QK=/^[\w\p{L}]$/u,me($K,"findDeclarationNodeAtOffset"),me(zK,"findCommentNode"),me(GK,"isCommentNode"),me(UK,"findLeafNodeAtOffset"),me(qK,"findLeafNodeBeforeOffset"),me(jK,"binarySearch"),me(WK,"getPreviousNode"),me(YK,"getNextNode"),me(HK,"getStartlineNode"),me(VK,"getInteriorNodes"),me(XK,"getCommonParent"),me(KK,"getParentChain")});function tZ(t){throw new Error("Error! The input value was not handled.")}var eZ,rZ=t(()=>{eZ=class extends Error{static{me(this,"ErrorWithLocation")}constructor(t,e){super(t?`${e} at ${t.range.start.line}:`+t.range.start.character:e)}},me(tZ,"assertUnreachable")}),nZ={};function iZ(t){return YQ.isInstance(t,JZ)}function aZ(t){return YQ.isInstance(t,tQ)}function sZ(t){return YQ.isInstance(t,eQ)}function oZ(t){return lZ(t)||"current"===t||"entry"===t||"extends"===t||"false"===t||"fragment"===t||"grammar"===t||"hidden"===t||"import"===t||"interface"===t||"returns"===t||"terminal"===t||"true"===t||"type"===t||"infer"===t||"infers"===t||"with"===t||"string"==typeof t&&/\^?[_a-zA-Z][\w_]*/.test(t)}function lZ(t){return"string"===t||"number"===t||"boolean"===t||"Date"===t||"bigint"===t}function cZ(t){return YQ.isInstance(t,rQ)}function hZ(t){return YQ.isInstance(t,nQ)}function uZ(t){return YQ.isInstance(t,iQ)}function dZ(t){return YQ.isInstance(t,aQ)}function pZ(t){return YQ.isInstance(t,sQ)}function gZ(t){return YQ.isInstance(t,oQ)}function fZ(t){return YQ.isInstance(t,lQ)}function mZ(t){return YQ.isInstance(t,cQ)}function yZ(t){return YQ.isInstance(t,hQ)}function vZ(t){return YQ.isInstance(t,uQ)}function xZ(t){return YQ.isInstance(t,dQ)}function bZ(t){return YQ.isInstance(t,pQ)}function wZ(t){return YQ.isInstance(t,gQ)}function kZ(t){return YQ.isInstance(t,fQ)}function TZ(t){return YQ.isInstance(t,mQ)}function EZ(t){return YQ.isInstance(t,yQ)}function CZ(t){return YQ.isInstance(t,vQ)}function _Z(t){return YQ.isInstance(t,xQ)}function SZ(t){return YQ.isInstance(t,bQ)}function AZ(t){return YQ.isInstance(t,wQ)}function LZ(t){return YQ.isInstance(t,kQ)}function NZ(t){return YQ.isInstance(t,TQ)}function IZ(t){return YQ.isInstance(t,EQ)}function RZ(t){return YQ.isInstance(t,CQ)}function MZ(t){return YQ.isInstance(t,_Q)}function DZ(t){return YQ.isInstance(t,SQ)}function OZ(t){return YQ.isInstance(t,AQ)}function PZ(t){return YQ.isInstance(t,LQ)}function BZ(t){return YQ.isInstance(t,NQ)}function FZ(t){return YQ.isInstance(t,IQ)}function $Z(t){return YQ.isInstance(t,RQ)}function zZ(t){return YQ.isInstance(t,MQ)}function GZ(t){return YQ.isInstance(t,DQ)}function UZ(t){return YQ.isInstance(t,OQ)}function qZ(t){return YQ.isInstance(t,PQ)}function jZ(t){return YQ.isInstance(t,BQ)}function WZ(t){return YQ.isInstance(t,FQ)}function YZ(t){return YQ.isInstance(t,$Q)}function HZ(t){return YQ.isInstance(t,zQ)}function VZ(t){return YQ.isInstance(t,GQ)}function XZ(t){return YQ.isInstance(t,UQ)}function KZ(t){return YQ.isInstance(t,qQ)}function ZZ(t){return YQ.isInstance(t,jQ)}oPt(nZ,{AbstractElement:()=>iQ,AbstractRule:()=>JZ,AbstractType:()=>tQ,Action:()=>AQ,Alternatives:()=>LQ,ArrayLiteral:()=>aQ,ArrayType:()=>sQ,Assignment:()=>NQ,BooleanLiteral:()=>oQ,CharacterRange:()=>IQ,Condition:()=>eQ,Conjunction:()=>lQ,CrossReference:()=>RQ,Disjunction:()=>cQ,EndOfFile:()=>MQ,Grammar:()=>hQ,GrammarImport:()=>uQ,Group:()=>DQ,InferredType:()=>dQ,Interface:()=>pQ,Keyword:()=>OQ,LangiumGrammarAstReflection:()=>WQ,LangiumGrammarTerminals:()=>QZ,NamedArgument:()=>gQ,NegatedToken:()=>PQ,Negation:()=>fQ,NumberLiteral:()=>mQ,Parameter:()=>yQ,ParameterReference:()=>vQ,ParserRule:()=>xQ,ReferenceType:()=>bQ,RegexToken:()=>BQ,ReturnType:()=>wQ,RuleCall:()=>FQ,SimpleType:()=>kQ,StringLiteral:()=>TQ,TerminalAlternatives:()=>$Q,TerminalGroup:()=>zQ,TerminalRule:()=>EQ,TerminalRuleCall:()=>GQ,Type:()=>CQ,TypeAttribute:()=>_Q,TypeDefinition:()=>rQ,UnionType:()=>SQ,UnorderedGroup:()=>UQ,UntilToken:()=>qQ,ValueLiteral:()=>nQ,Wildcard:()=>jQ,isAbstractElement:()=>uZ,isAbstractRule:()=>iZ,isAbstractType:()=>aZ,isAction:()=>OZ,isAlternatives:()=>PZ,isArrayLiteral:()=>dZ,isArrayType:()=>pZ,isAssignment:()=>BZ,isBooleanLiteral:()=>gZ,isCharacterRange:()=>FZ,isCondition:()=>sZ,isConjunction:()=>fZ,isCrossReference:()=>$Z,isDisjunction:()=>mZ,isEndOfFile:()=>zZ,isFeatureName:()=>oZ,isGrammar:()=>yZ,isGrammarImport:()=>vZ,isGroup:()=>GZ,isInferredType:()=>xZ,isInterface:()=>bZ,isKeyword:()=>UZ,isNamedArgument:()=>wZ,isNegatedToken:()=>qZ,isNegation:()=>kZ,isNumberLiteral:()=>TZ,isParameter:()=>EZ,isParameterReference:()=>CZ,isParserRule:()=>_Z,isPrimitiveType:()=>lZ,isReferenceType:()=>SZ,isRegexToken:()=>jZ,isReturnType:()=>AZ,isRuleCall:()=>WZ,isSimpleType:()=>LZ,isStringLiteral:()=>NZ,isTerminalAlternatives:()=>YZ,isTerminalGroup:()=>HZ,isTerminalRule:()=>IZ,isTerminalRuleCall:()=>VZ,isType:()=>RZ,isTypeAttribute:()=>MZ,isTypeDefinition:()=>cZ,isUnionType:()=>DZ,isUnorderedGroup:()=>XZ,isUntilToken:()=>KZ,isValueLiteral:()=>hZ,isWildcard:()=>ZZ,reflection:()=>YQ});var QZ,JZ,tQ,eQ,rQ,nQ,iQ,aQ,sQ,oQ,lQ,cQ,hQ,uQ,dQ,pQ,gQ,fQ,mQ,yQ,vQ,xQ,bQ,wQ,kQ,TQ,EQ,CQ,_Q,SQ,AQ,LQ,NQ,IQ,RQ,MQ,DQ,OQ,PQ,BQ,FQ,$Q,zQ,GQ,UQ,qQ,jQ,WQ,YQ,HQ=t(()=>{wK(),QZ={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]*/},JZ="AbstractRule",me(iZ,"isAbstractRule"),tQ="AbstractType",me(aZ,"isAbstractType"),eQ="Condition",me(sZ,"isCondition"),me(oZ,"isFeatureName"),me(lZ,"isPrimitiveType"),rQ="TypeDefinition",me(cZ,"isTypeDefinition"),nQ="ValueLiteral",me(hZ,"isValueLiteral"),iQ="AbstractElement",me(uZ,"isAbstractElement"),aQ="ArrayLiteral",me(dZ,"isArrayLiteral"),sQ="ArrayType",me(pZ,"isArrayType"),oQ="BooleanLiteral",me(gZ,"isBooleanLiteral"),lQ="Conjunction",me(fZ,"isConjunction"),cQ="Disjunction",me(mZ,"isDisjunction"),hQ="Grammar",me(yZ,"isGrammar"),uQ="GrammarImport",me(vZ,"isGrammarImport"),dQ="InferredType",me(xZ,"isInferredType"),pQ="Interface",me(bZ,"isInterface"),gQ="NamedArgument",me(wZ,"isNamedArgument"),fQ="Negation",me(kZ,"isNegation"),mQ="NumberLiteral",me(TZ,"isNumberLiteral"),yQ="Parameter",me(EZ,"isParameter"),vQ="ParameterReference",me(CZ,"isParameterReference"),xQ="ParserRule",me(_Z,"isParserRule"),bQ="ReferenceType",me(SZ,"isReferenceType"),wQ="ReturnType",me(AZ,"isReturnType"),kQ="SimpleType",me(LZ,"isSimpleType"),TQ="StringLiteral",me(NZ,"isStringLiteral"),EQ="TerminalRule",me(IZ,"isTerminalRule"),CQ="Type",me(RZ,"isType"),_Q="TypeAttribute",me(MZ,"isTypeAttribute"),SQ="UnionType",me(DZ,"isUnionType"),AQ="Action",me(OZ,"isAction"),LQ="Alternatives",me(PZ,"isAlternatives"),NQ="Assignment",me(BZ,"isAssignment"),IQ="CharacterRange",me(FZ,"isCharacterRange"),RQ="CrossReference",me($Z,"isCrossReference"),MQ="EndOfFile",me(zZ,"isEndOfFile"),DQ="Group",me(GZ,"isGroup"),OQ="Keyword",me(UZ,"isKeyword"),PQ="NegatedToken",me(qZ,"isNegatedToken"),BQ="RegexToken",me(jZ,"isRegexToken"),FQ="RuleCall",me(WZ,"isRuleCall"),$Q="TerminalAlternatives",me(YZ,"isTerminalAlternatives"),zQ="TerminalGroup",me(HZ,"isTerminalGroup"),GQ="TerminalRuleCall",me(VZ,"isTerminalRuleCall"),UQ="UnorderedGroup",me(XZ,"isUnorderedGroup"),qQ="UntilToken",me(KZ,"isUntilToken"),jQ="Wildcard",me(ZZ,"isWildcard"),WQ=class extends bK{static{me(this,"LangiumGrammarAstReflection")}getAllTypes(){return[iQ,JZ,tQ,AQ,LQ,aQ,sQ,NQ,oQ,IQ,eQ,lQ,RQ,cQ,MQ,hQ,uQ,DQ,dQ,pQ,OQ,gQ,PQ,fQ,mQ,yQ,vQ,xQ,bQ,BQ,wQ,FQ,kQ,TQ,$Q,zQ,EQ,GQ,CQ,_Q,rQ,SQ,UQ,qQ,nQ,jQ]}computeIsSubtype(t,e){switch(t){case AQ:case LQ:case NQ:case IQ:case RQ:case MQ:case DQ:case OQ:case PQ:case BQ:case FQ:case $Q:case zQ:case GQ:case UQ:case qQ:case jQ:return this.isSubtype(iQ,e);case aQ:case mQ:case TQ:return this.isSubtype(nQ,e);case sQ:case bQ:case kQ:case SQ:return this.isSubtype(rQ,e);case oQ:return this.isSubtype(eQ,e)||this.isSubtype(nQ,e);case lQ:case cQ:case fQ:case vQ:return this.isSubtype(eQ,e);case dQ:case pQ:case CQ:return this.isSubtype(tQ,e);case xQ:return this.isSubtype(JZ,e)||this.isSubtype(tQ,e);case EQ:return this.isSubtype(JZ,e);default:return!1}}getReferenceType(t){var e=t.container.$type+":"+t.property;switch(e){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":return tQ;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return JZ;case"Grammar:usedGrammars":return hQ;case"NamedArgument:parameter":case"ParameterReference:parameter":return yQ;case"TerminalRuleCall:rule":return EQ;default:throw new Error(e+" is not a valid reference id.")}}getTypeMetaData(t){switch(t){case iQ:return{name:iQ,properties:[{name:"cardinality"},{name:"lookahead"}]};case aQ:return{name:aQ,properties:[{name:"elements",defaultValue:[]}]};case sQ:return{name:sQ,properties:[{name:"elementType"}]};case oQ:return{name:oQ,properties:[{name:"true",defaultValue:!1}]};case lQ:return{name:lQ,properties:[{name:"left"},{name:"right"}]};case cQ:return{name:cQ,properties:[{name:"left"},{name:"right"}]};case hQ:return{name:hQ,properties:[{name:"definesHiddenTokens",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"imports",defaultValue:[]},{name:"interfaces",defaultValue:[]},{name:"isDeclared",defaultValue:!1},{name:"name"},{name:"rules",defaultValue:[]},{name:"types",defaultValue:[]},{name:"usedGrammars",defaultValue:[]}]};case uQ:return{name:uQ,properties:[{name:"path"}]};case dQ:return{name:dQ,properties:[{name:"name"}]};case pQ:return{name:pQ,properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case gQ:return{name:gQ,properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case fQ:return{name:fQ,properties:[{name:"value"}]};case mQ:return{name:mQ,properties:[{name:"value"}]};case yQ:return{name:yQ,properties:[{name:"name"}]};case vQ:return{name:vQ,properties:[{name:"parameter"}]};case xQ:return{name:xQ,properties:[{name:"dataType"},{name:"definesHiddenTokens",defaultValue:!1},{name:"definition"},{name:"entry",defaultValue:!1},{name:"fragment",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"inferredType"},{name:"name"},{name:"parameters",defaultValue:[]},{name:"returnType"},{name:"wildcard",defaultValue:!1}]};case bQ:return{name:bQ,properties:[{name:"referenceType"}]};case wQ:return{name:wQ,properties:[{name:"name"}]};case kQ:return{name:kQ,properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]};case TQ:return{name:TQ,properties:[{name:"value"}]};case EQ:return{name:EQ,properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case CQ:return{name:CQ,properties:[{name:"name"},{name:"type"}]};case _Q:return{name:_Q,properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case SQ:return{name:SQ,properties:[{name:"types",defaultValue:[]}]};case AQ:return{name:AQ,properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case LQ:return{name:LQ,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case NQ:return{name:NQ,properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case IQ:return{name:IQ,properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case RQ:return{name:RQ,properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case MQ:return{name:MQ,properties:[{name:"cardinality"},{name:"lookahead"}]};case DQ:return{name:DQ,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case OQ:return{name:OQ,properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case PQ:return{name:PQ,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case BQ:return{name:BQ,properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case FQ:return{name:FQ,properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case $Q:return{name:$Q,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case zQ:return{name:zQ,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case GQ:return{name:GQ,properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case UQ:return{name:UQ,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case qQ:return{name:qQ,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case jQ:return{name:jQ,properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:t,properties:[]}}}},YQ=new WQ}),VQ={};function XQ(n){for(let[r,t]of Object.entries(n))r.startsWith("$")||(Array.isArray(t)?t.forEach((t,e)=>{pK(t)&&(t.$container=n,t.$containerProperty=r,t.$containerIndex=e)}):pK(t)&&(t.$container=n,t.$containerProperty=r))}function KQ(t,e){let r=t;for(;r;){if(e(r))return r;r=r.$container}}function ZQ(t,e){let r=t;for(;r;){if(e(r))return!0;r=r.$container}return!1}function QQ(t){if(t=JQ(t).$document)return t;throw new Error("AST node has no document.")}function JQ(t){for(;t.$container;)t=t.$container;return t}function tJ(i,t){if(!i)throw new Error("Node must be an AstNode.");let a=t?.range;return new CK(()=>({keys:Object.keys(i),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndextJ(t,e));throw new Error("Root node must be an AstNode.")}function rJ(t,e){if(t)return e?.range&&!nJ(t,e.range)?new AK(t,()=>[]):new AK(t,t=>tJ(t,e),{includeRoot:!0});throw new Error("Root node must be an AstNode.")}function nJ(t,e){return!e||!!(t=null==(t=t.$cstNode)?void 0:t.range)&&FK(t,e)}function iJ(a){return new CK(()=>({keys:Object.keys(a),keyIndex:0,arrayIndex:0}),t=>{for(;t.keyIndex{iJ(t).forEach(t=>{t.reference.ref===e&&r.push(t.reference)})}),EK(r)}function sJ(t,e){var r,n=e;for(r of t.getTypeMetaData(e.$type).properties)void 0!==r.defaultValue&&void 0===n[r.name]&&(n[r.name]=oJ(r.defaultValue))}function oJ(t){return Array.isArray(t)?[...t.map(oJ)]:t}function lJ(t,e){var r,n,i={$type:t.$type};for([r,n]of Object.entries(t))if(!r.startsWith("$"))if(pK(n))i[r]=lJ(n,e);else if(gK(n))i[r]=e(i,r,n.$refNode,n.$refText);else if(Array.isArray(n)){var a,s=[];for(a of n)pK(a)?s.push(lJ(a,e)):gK(a)?s.push(e(i,r,a.$refNode,a.$refText)):s.push(a);i[r]=s}else i[r]=n;return XQ(i),i}oPt(VQ,{assignMandatoryProperties:()=>sJ,copyAstNode:()=>lJ,findLocalReferences:()=>aJ,findRootNode:()=>JQ,getContainerOfType:()=>KQ,getDocument:()=>QQ,hasContainerOfType:()=>ZQ,linkContentToContainer:()=>XQ,streamAllContents:()=>eJ,streamAst:()=>rJ,streamContents:()=>tJ,streamReferences:()=>iJ});var cJ=t(()=>{wK(),NK(),JK(),me(XQ,"linkContentToContainer"),me(KQ,"getContainerOfType"),me(ZQ,"hasContainerOfType"),me(QQ,"getDocument"),me(JQ,"findRootNode"),me(tJ,"streamContents"),me(eJ,"streamAllContents"),me(rJ,"streamAst"),me(nJ,"isAstNodeInRange"),me(iJ,"streamReferences"),me(aJ,"findLocalReferences"),me(sJ,"assignMandatoryProperties"),me(oJ,"copyDefaultValue"),me(lJ,"copyAstNode")});function hJ(t){return t.charCodeAt(0)}function uJ(t,e){Array.isArray(t)?t.forEach(function(t){e.push(t)}):e.push(t)}function dJ(t,e){if(!0===t[e])throw"duplicate flag "+e;t[e]=!0}function pJ(t){if(void 0===t)throw Error("Internal Error - Should never get here!");return!0}function gJ(){throw Error("Internal Error - Should never get here!")}function fJ(t){return"Character"===t.type}var mJ,yJ,vJ,xJ,bJ,wJ,kJ,TJ,EJ=t(()=>{me(hJ,"cc"),me(uJ,"insertToSet"),me(dJ,"addFlag"),me(pJ,"ASSERT_EXISTS"),me(gJ,"ASSERT_NEVER_REACH_HERE"),me(fJ,"isCharacter")}),CJ=t(()=>{EJ(),mJ=[];for(let t=hJ("0");t<=hJ("9");t++)mJ.push(t);yJ=[hJ("_")].concat(mJ);for(let t=hJ("a");t<=hJ("z");t++)yJ.push(t);for(let t=hJ("A");t<=hJ("Z");t++)yJ.push(t);vJ=[hJ(" "),hJ("\f"),hJ(` -`),hJ("\r"),hJ("\t"),hJ("\v"),hJ("\t"),hJ(" "),hJ(" "),hJ(" "),hJ(" "),hJ(" "),hJ(" "),hJ(" "),hJ(" "),hJ(" "),hJ(" "),hJ(" "),hJ(" "),hJ(" "),hJ("\u2028"),hJ("\u2029"),hJ(" "),hJ(" "),hJ(" "),hJ("\ufeff")]}),_J=t(()=>{EJ(),CJ(),xJ=/[0-9a-fA-F]/,bJ=/[0-9]/,wJ=/[1-9]/,kJ=class{static{me(this,"RegExpParser")}constructor(){this.idx=0,this.input="",this.groupIdx=0}saveState(){return{idx:this.idx,input:this.input,groupIdx:this.groupIdx}}restoreState(t){this.idx=t.idx,this.input=t.input,this.groupIdx=t.groupIdx}pattern(t){this.idx=0,this.input=t,this.groupIdx=0,this.consumeChar("/");for(var e=this.disjunction(),r=(this.consumeChar("/"),{type:"Flags",loc:{begin:this.idx,end:t.length},global:!1,ignoreCase:!1,multiLine:!1,unicode:!1,sticky:!1});this.isRegExpFlag();)switch(this.popChar()){case"g":dJ(r,"global");break;case"i":dJ(r,"ignoreCase");break;case"m":dJ(r,"multiLine");break;case"u":dJ(r,"unicode");break;case"y":dJ(r,"sticky")}if(this.idx!==this.input.length)throw Error("Redundant input: "+this.input.substring(this.idx));return{type:"Pattern",flags:r,value:e,loc:this.loc(0)}}disjunction(){var t=[],e=this.idx;for(t.push(this.alternative());"|"===this.peekChar();)this.consumeChar("|"),t.push(this.alternative());return{type:"Disjunction",value:t,loc:this.loc(e)}}alternative(){for(var t=[],e=this.idx;this.isTerm();)t.push(this.term());return{type:"Alternative",value:t,loc:this.loc(e)}}term(){return this.isAssertion()?this.assertion():this.atom()}assertion(){var e=this.idx;switch(this.popChar()){case"^":return{type:"StartAnchor",loc:this.loc(e)};case"$":return{type:"EndAnchor",loc:this.loc(e)};case"\\":switch(this.popChar()){case"b":return{type:"WordBoundary",loc:this.loc(e)};case"B":return{type:"NonWordBoundary",loc:this.loc(e)}}throw Error("Invalid Assertion Escape");case"(":this.consumeChar("?");let t;switch(this.popChar()){case"=":t="Lookahead";break;case"!":t="NegativeLookahead"}pJ(t);var r=this.disjunction();return this.consumeChar(")"),{type:t,value:r,loc:this.loc(e)}}return gJ()}quantifier(t=!1){let e,r=this.idx;switch(this.popChar()){case"*":e={atLeast:0,atMost:1/0};break;case"+":e={atLeast:1,atMost:1/0};break;case"?":e={atLeast:0,atMost:1};break;case"{":var n=this.integerIncludingZero();switch(this.popChar()){case"}":e={atLeast:n,atMost:n};break;case",":e=this.isDigit()?{atLeast:n,atMost:this.integerIncludingZero()}:{atLeast:n,atMost:1/0},this.consumeChar("}")}if(!0===t&&void 0===e)return;pJ(e)}if((!0!==t||void 0!==e)&&pJ(e))return"?"===this.peekChar(0)?(this.consumeChar("?"),e.greedy=!1):e.greedy=!0,e.type="Quantifier",e.loc=this.loc(r),e}atom(){let t,e=this.idx;switch(this.peekChar()){case".":t=this.dotAll();break;case"\\":t=this.atomEscape();break;case"[":t=this.characterClass();break;case"(":t=this.group()}return pJ(t=void 0===t&&this.isPatternCharacter()?this.patternCharacter():t)?(t.loc=this.loc(e),this.isQuantifier()&&(t.quantifier=this.quantifier()),t):gJ()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[hJ(` -`),hJ("\r"),hJ("\u2028"),hJ("\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 t,e=!1;switch(this.popChar()){case"d":t=mJ;break;case"D":t=mJ,e=!0;break;case"s":t=vJ;break;case"S":t=vJ,e=!0;break;case"w":t=yJ;break;case"W":t=yJ,e=!0}return pJ(t)?{type:"Set",value:t,complement:e}:gJ()}controlEscapeAtom(){let t;switch(this.popChar()){case"f":t=hJ("\f");break;case"n":t=hJ(` -`);break;case"r":t=hJ("\r");break;case"t":t=hJ("\t");break;case"v":t=hJ("\v")}return pJ(t)?{type:"Character",value:t}:gJ()}controlLetterEscapeAtom(){this.consumeChar("c");var t=this.popChar();if(!1===/[a-zA-Z]/.test(t))throw Error("Invalid ");return{type:"Character",value:t.toUpperCase().charCodeAt(0)-64}}nulCharacterAtom(){return this.consumeChar("0"),{type:"Character",value:hJ("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:hJ(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case` -`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:hJ(this.popChar())}}}characterClass(){let t=[],e=!1;for(this.consumeChar("["),"^"===this.peekChar(0)&&(this.consumeChar("^"),e=!0);this.isClassAtom();){var r=this.classAtom();if(r.type,fJ(r)&&this.isRangeDash()){this.consumeChar("-");var n=this.classAtom();if(n.type,fJ(n)){if(n.value=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(t){return{begin:t,end:this.idx}}}}),SJ=t(()=>{TJ=class{static{me(this,"BaseRegExpVisitor")}visitChildren(t){for(var e in t){var r=t[e];t.hasOwnProperty(e)&&(void 0!==r.type?this.visit(r):Array.isArray(r)&&r.forEach(t=>{this.visit(t)},this))}}visit(t){switch(t.type){case"Pattern":this.visitPattern(t);break;case"Flags":this.visitFlags(t);break;case"Disjunction":this.visitDisjunction(t);break;case"Alternative":this.visitAlternative(t);break;case"StartAnchor":this.visitStartAnchor(t);break;case"EndAnchor":this.visitEndAnchor(t);break;case"WordBoundary":this.visitWordBoundary(t);break;case"NonWordBoundary":this.visitNonWordBoundary(t);break;case"Lookahead":this.visitLookahead(t);break;case"NegativeLookahead":this.visitNegativeLookahead(t);break;case"Character":this.visitCharacter(t);break;case"Set":this.visitSet(t);break;case"Group":this.visitGroup(t);break;case"GroupBackReference":this.visitGroupBackReference(t);break;case"Quantifier":this.visitQuantifier(t)}this.visitChildren(t)}visitPattern(t){}visitFlags(t){}visitDisjunction(t){}visitAlternative(t){}visitStartAnchor(t){}visitEndAnchor(t){}visitWordBoundary(t){}visitNonWordBoundary(t){}visitLookahead(t){}visitNegativeLookahead(t){}visitCharacter(t){}visitSet(t){}visitGroup(t){}visitGroupBackReference(t){}visitQuantifier(t){}}}),AJ=t(()=>{_J(),SJ()}),LJ={};function NJ(t){try{t=`/${t="string"!=typeof t?t.source:t}/`;var e,r=FJ.pattern(t),n=[];for(e of r.value.value)zJ.reset(t),zJ.visit(e),n.push({start:zJ.startRegexp,end:zJ.endRegex});return n}catch{return[]}}function IJ(t){try{return t=(t="string"==typeof t?new RegExp(t):t).toString(),zJ.reset(t),zJ.visit(FJ.pattern(t)),zJ.multiline}catch{return!1}}function RJ(t){let e="string"==typeof t?new RegExp(t):t;return GJ.some(t=>e.test(t))}function MJ(t){return t.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function DJ(t){return Array.prototype.map.call(t,t=>/\w/.test(t)?`[${t.toLowerCase()}${t.toUpperCase()}]`:MJ(t)).join("")}function OJ(t,e){return t=PJ(t),!!(e=e.match(t))&&0",s)-s+1);break;default:n(2)}break;case"[":(t=/\[(?:\\.|.)*?\]/g).lastIndex=s,n((t=t.exec(a)||[])[0].length);break;case"|":case"^":case"$":case"*":case"+":case"?":r(1);break;case"{":(t=/\{\d+,?\d*\}/g).lastIndex=s,(t=t.exec(a))?r(t[0].length):n(1);break;case"(":if("?"===a[s+1])switch(a[s+2]){case":":e+="(?:",s+=3,e+=o()+"|$)";break;case"=":e+="(?=",s+=3,e+=o()+")";break;case"!":t=s,s+=3,o(),e+=a.substr(t,s-t);break;case"<":switch(a[s+3]){case"=":case"!":t=s,s+=4,o(),e+=a.substr(t,s-t);break;default:r(a.indexOf(">",s)-s+1),e+=o()+"|$)"}}else r(1),e+=o()+"|$)";break;case")":return++s,e;default:n(1)}return e}return me(o,"process"),new RegExp(o(),t.flags)}oPt(LJ,{NEWLINE_REGEXP:()=>BJ,escapeRegExp:()=>MJ,getCaseInsensitivePattern:()=>DJ,getTerminalParts:()=>NJ,isMultilineComment:()=>IJ,isWhitespace:()=>RJ,partialMatches:()=>OJ,partialRegExp:()=>PJ,whitespaceCharacters:()=>GJ});var BJ,FJ,$J,zJ,GJ,UJ=t(()=>{AJ(),BJ=/\r?\n/gm,FJ=new kJ,$J=class extends TJ{static{me(this,"TerminalRegExpVisitor")}constructor(){super(...arguments),this.isStarting=!0,this.endRegexpStack=[],this.multiline=!1}get endRegex(){return this.endRegexpStack.join("")}reset(t){this.multiline=!1,this.regex=t,this.startRegexp="",this.isStarting=!0,this.endRegexpStack=[]}visitGroup(t){t.quantifier&&(this.isStarting=!1,this.endRegexpStack=[])}visitCharacter(t){var e=String.fromCharCode(t.value);this.multiline||e!==` -`||(this.multiline=!0),t.quantifier?(this.isStarting=!1,this.endRegexpStack=[]):(t=MJ(e),this.endRegexpStack.push(t),this.isStarting&&(this.startRegexp+=t))}visitSet(t){var e;this.multiline||(e=this.regex.substring(t.loc.begin,t.loc.end),e=new RegExp(e),this.multiline=!!` -`.match(e)),t.quantifier?(this.isStarting=!1,this.endRegexpStack=[]):(e=this.regex.substring(t.loc.begin,t.loc.end),this.endRegexpStack.push(e),this.isStarting&&(this.startRegexp+=e))}visitChildren(t){"Group"===t.type&&t.quantifier||super.visitChildren(t)}},zJ=new $J,me(NJ,"getTerminalParts"),me(IJ,"isMultilineComment"),GJ=` -\r              

   `.split(""),me(RJ,"isWhitespace"),me(MJ,"escapeRegExp"),me(DJ,"getCaseInsensitivePattern"),me(OJ,"partialMatches"),me(PJ,"partialRegExp")}),qJ={};function jJ(t){return t.rules.find(t=>_Z(t)&&t.entry)}function WJ(t){return t.rules.filter(t=>IZ(t)&&t.hidden)}function YJ(t,e){var r,n=new Set,i=jJ(t);if(!i)return new Set(t.rules);for(r of[i].concat(WJ(t)))HJ(r,n,e);var a,s=new Set;for(a of t.rules)(n.has(a.name)||IZ(a)&&a.hidden)&&s.add(a);return s}function HJ(t,e,r){e.add(t.name),eJ(t).forEach(t=>{(WZ(t)||r&&VZ(t))&&(t=t.rule.ref)&&!e.has(t.name)&&HJ(t,e,r)})}function VJ(t){return t.terminal||(t.type.ref?ntt(t.type.ref)?.terminal:void 0)}function XJ(t){return t.hidden&&!RJ(vtt(t))}function KJ(t,e){return t&&e?QJ(t,e,t.astNode,!0):[]}function ZJ(t,e,r){return t&&e&&0!==(e=QJ(t,e,t.astNode,!0)).length?e[r=void 0!==r?Math.max(0,Math.min(r,e.length-1)):0]:void 0}function QJ(t,e,r,n){return!n&&(n=KQ(t.grammarSource,BZ))&&n.feature===e?[t]:yK(t)&&t.astNode===r?t.content.flatMap(t=>QJ(t,e,r,!1)):[]}function JJ(t,e){return t?ett(t,e,t?.astNode):[]}function ttt(t,e,r){return t&&0!==(e=ett(t,e,t?.astNode)).length?e[r=void 0!==r?Math.max(0,Math.min(r,e.length-1)):0]:void 0}function ett(t,e,r){if(t.astNode!==r)return[];if(UZ(t.grammarSource)&&t.grammarSource.value===e)return[t];for(var n,i,a=RK(t).iterator(),s=[];(i=a.next()).done||((n=i.value).astNode===r?UZ(n.grammarSource)&&n.grammarSource.value===e&&s.push(n):a.prune()),!i.done;);return s}function rtt(t){for(var e=t.astNode;e===(null==(r=t.container)?void 0:r.astNode);){var r=KQ(t.grammarSource,BZ);if(r)return r;t=t.container}}function ntt(t){let e=t;return xZ(e)&&(OZ(e.$container)?e=e.$container.$container:_Z(e.$container)?e=e.$container:tZ(e.$container)),itt(t,e,new Map)}function itt(n,t,i){var e,r;function a(t,e){let r;return KQ(t,BZ)||(r=itt(e,e,i)),i.set(n,r),r}if(me(a,"go"),i.has(n))return i.get(n);i.set(n,void 0);for(r of eJ(t)){if(BZ(r)&&"name"===r.feature.toLowerCase())return i.set(n,r),r;if(WZ(r)&&_Z(r.rule.ref))return a(r,r.rule.ref);if(LZ(r)&&null!=(e=r.typeRef)&&e.ref)return a(r,r.typeRef.ref)}}function att(e){var t=e.$container;if(GZ(t)){var r=t.elements;for(let t=r.indexOf(e)-1;0<=t;t--){var n=r[t];if(OZ(n))return n;if(n=eJ(r[t]).find(OZ))return n}}if(uZ(t))return att(t)}function stt(t,e){return"?"===t||"*"===t||GZ(e)&&!!e.guardCondition}function ott(t){return"*"===t||"+"===t}function ltt(t){return"+="===t}function ctt(t){return htt(t,new Set)}function htt(t,e){if(e.has(t))return!0;e.add(t);for(var r of eJ(t))if(WZ(r)){if(!r.rule.ref||_Z(r.rule.ref)&&!htt(r.rule.ref,e))return!1}else{if(BZ(r))return!1;if(OZ(r))return!1}return!!t.definition}function utt(t){return dtt(t.type,new Set)}function dtt(t,e){return!!e.has(t)||(e.add(t),!pZ(t)&&!SZ(t)&&(DZ(t)?t.types.every(t=>dtt(t,e)):!!LZ(t)&&(void 0!==t.primitiveType||void 0!==t.stringType||void 0!==t.typeRef&&!!RZ(t=t.typeRef.ref)&&dtt(t.type,e))))}function ptt(t){return t.inferredType?t.inferredType.name:t.dataType||(t.returnType&&(t=t.returnType.ref)&&(_Z(t)||bZ(t)||RZ(t))?t.name:void 0)}function gtt(t){if(_Z(t))return ctt(t)||null==(e=ptt(t))?t.name:e;if(bZ(t)||RZ(t)||AZ(t))return t.name;if(OZ(t)){var e=ftt(t);if(e)return e}else if(xZ(t))return t.name;throw new Error("Cannot get name of Unknown Type")}function ftt(t){var e;return t.inferredType?t.inferredType.name:null!=(e=t.type)&&e.ref?gtt(t.type.ref):void 0}function mtt(t){var e;return IZ(t)?null!=(e=null==(e=t.type)?void 0:e.name)?e:"string":ctt(t)||null==(e=ptt(t))?t.name:e}function ytt(t){var e;return IZ(t)?null!=(e=null==(e=t.type)?void 0:e.name)?e:"string":null!=(e=ptt(t))?e:t.name}function vtt(t){var t=xtt(t.definition,e={s:!1,i:!1,u:!1}),e=Object.entries(e).filter(([,t])=>t).map(([t])=>t).join("");return new RegExp(t,e)}function xtt(t,e){if(YZ(t))return btt(t);if(HZ(t))return wtt(t);if(FZ(t))return Ett(t);if(VZ(t)){var r=t.rule.ref;if(r)return _tt(xtt(r.definition),{cardinality:t.cardinality,lookahead:t.lookahead});throw new Error("Missing rule reference.")}if(qZ(t))return Ttt(t);if(KZ(t))return ktt(t);var n;if(jZ(t))return r=t.regex.lastIndexOf("/"),n=t.regex.substring(1,r),r=t.regex.substring(r+1),e&&(e.i=r.includes("i"),e.s=r.includes("s"),e.u=r.includes("u")),_tt(n,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1});if(ZZ(t))return _tt(Stt,{cardinality:t.cardinality,lookahead:t.lookahead});throw new Error("Invalid terminal element: "+t?.$type)}function btt(t){return _tt(t.elements.map(t=>xtt(t)).join("|"),{cardinality:t.cardinality,lookahead:t.lookahead})}function wtt(t){return _tt(t.elements.map(t=>xtt(t)).join(""),{cardinality:t.cardinality,lookahead:t.lookahead})}function ktt(t){return _tt(Stt+"*?"+xtt(t.terminal),{cardinality:t.cardinality,lookahead:t.lookahead})}function Ttt(t){return _tt(`(?!${xtt(t.terminal)})${Stt}*?`,{cardinality:t.cardinality,lookahead:t.lookahead})}function Ett(t){return t.right?_tt(`[${Ctt(t.left)}-${Ctt(t.right)}]`,{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1}):_tt(Ctt(t.left),{cardinality:t.cardinality,lookahead:t.lookahead,wrap:!1})}function Ctt(t){return MJ(t.value)}function _tt(t,e){var r;return!1===e.wrap&&!e.lookahead||(t=`(${null!=(r=e.lookahead)?r:""}${t})`),e.cardinality?""+t+e.cardinality:t}oPt(qJ,{findAssignment:()=>rtt,findNameAssignment:()=>ntt,findNodeForKeyword:()=>ttt,findNodeForProperty:()=>ZJ,findNodesForKeyword:()=>JJ,findNodesForKeywordInternal:()=>ett,findNodesForProperty:()=>KJ,getActionAtElement:()=>att,getActionType:()=>ftt,getAllReachableRules:()=>YJ,getCrossReferenceTerminal:()=>VJ,getEntryRule:()=>jJ,getExplicitRuleType:()=>ptt,getHiddenRules:()=>WJ,getRuleType:()=>ytt,getRuleTypeName:()=>mtt,getTypeName:()=>gtt,isArrayCardinality:()=>ott,isArrayOperator:()=>ltt,isCommentTerminal:()=>XJ,isDataType:()=>utt,isDataTypeRule:()=>ctt,isOptionalCardinality:()=>stt,terminalRegex:()=>vtt});var Stt,Att=t(()=>{rZ(),HQ(),wK(),cJ(),JK(),UJ(),me(jJ,"getEntryRule"),me(WJ,"getHiddenRules"),me(YJ,"getAllReachableRules"),me(HJ,"ruleDfs"),me(VJ,"getCrossReferenceTerminal"),me(XJ,"isCommentTerminal"),me(KJ,"findNodesForProperty"),me(ZJ,"findNodeForProperty"),me(QJ,"findNodesForPropertyInternal"),me(JJ,"findNodesForKeyword"),me(ttt,"findNodeForKeyword"),me(ett,"findNodesForKeywordInternal"),me(rtt,"findAssignment"),me(ntt,"findNameAssignment"),me(itt,"findNameAssignmentInternal"),me(att,"getActionAtElement"),me(stt,"isOptionalCardinality"),me(ott,"isArrayCardinality"),me(ltt,"isArrayOperator"),me(ctt,"isDataTypeRule"),me(htt,"isDataTypeRuleInternal"),me(utt,"isDataType"),me(dtt,"isDataTypeInternal"),me(ptt,"getExplicitRuleType"),me(gtt,"getTypeName"),me(ftt,"getActionType"),me(mtt,"getRuleTypeName"),me(ytt,"getRuleType"),me(vtt,"terminalRegex"),Stt=/[\s\S]/.source,me(xtt,"abstractElementToRegex"),me(btt,"terminalAlternativesToRegex"),me(wtt,"terminalGroupToRegex"),me(ktt,"untilTokenToRegex"),me(Ttt,"negateTokenToRegex"),me(Ett,"characterRangeToRegex"),me(Ctt,"keywordToRegex"),me(_tt,"withCardinality")});function Ltt(t){var e,r=[];for(e of t.Grammar.rules)IZ(e)&&XJ(e)&&IJ(vtt(e))&&r.push(e.name);return{multilineCommentRules:r,nameRegexp:QK}}var Ntt=t(()=>{JK(),Att(),UJ(),HQ(),me(Ltt,"createGrammarConfig")}),Itt=t(()=>{});function Rtt(t){console&&console.error&&console.error("Error: "+t)}function Mtt(t){console&&console.warn&&console.warn("Warning: "+t)}var Dtt=t(()=>{me(Rtt,"PRINT_ERROR"),me(Mtt,"PRINT_WARNING")});function Ott(t){var e=(new Date).getTime(),t=t();return{time:(new Date).getTime()-e,value:t}}var Ptt=t(()=>{me(Ott,"timer")});function Btt(t){function e(){}me(e,"FakeConstructor"),e.prototype=t;let r=new e;function n(){return typeof r.bar}return me(n,"fakeAccess"),n(),n(),t}var Ftt=t(()=>{me(Btt,"toFastProperties")}),$tt=t(()=>{Dtt(),Ptt(),Ftt()});function ztt(t){return Gtt(t)?t.LABEL:t.name}function Gtt(t){return GU(t.LABEL)&&""!==t.LABEL}function Utt(t){return x(t,qtt)}function qtt(t){function e(t){return x(t,qtt)}var r,n;if(me(e,"convertDefinition"),t instanceof Wtt)return r={type:"NonTerminal",name:t.nonTerminalName,idx:t.idx},GU(t.label)&&(r.label=t.label),r;if(t instanceof Htt)return{type:"Alternative",definition:e(t.definition)};if(t instanceof Vtt)return{type:"Option",idx:t.idx,definition:e(t.definition)};if(t instanceof Xtt)return{type:"RepetitionMandatory",idx:t.idx,definition:e(t.definition)};if(t instanceof Ktt)return{type:"RepetitionMandatoryWithSeparator",idx:t.idx,separator:qtt(new tet({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof Qtt)return{type:"RepetitionWithSeparator",idx:t.idx,separator:qtt(new tet({terminalType:t.separator})),definition:e(t.definition)};if(t instanceof Ztt)return{type:"Repetition",idx:t.idx,definition:e(t.definition)};if(t instanceof Jtt)return{type:"Alternation",idx:t.idx,definition:e(t.definition)};if(t instanceof tet)return r={type:"Terminal",name:t.terminalType.name,label:ztt(t.terminalType),idx:t.idx},GU(t.label)&&(r.terminalLabel=t.label),n=t.terminalType.PATTERN,t.terminalType.PATTERN&&(r.pattern=uq(n)?n.source:n),r;if(t instanceof Ytt)return{type:"Rule",name:t.name,orgText:t.orgText,definition:e(t.definition)};throw Error("non exhaustive match")}var jtt,Wtt,Ytt,Htt,Vtt,Xtt,Ktt,Ztt,Qtt,Jtt,tet,eet,ret=t(()=>{IW(),me(ztt,"tokenLabel"),me(Gtt,"hasTokenLabel"),jtt=class{static{me(this,"AbstractProduction")}get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){this._definition=t}accept(e){e.visit(this),v(this.definition,t=>{t.accept(e)})}},Wtt=class extends jtt{static{me(this,"NonTerminal")}constructor(t){super([]),this.idx=1,sP(this,Wq(t,t=>void 0!==t))}set definition(t){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(t){t.visit(this)}},Ytt=class extends jtt{static{me(this,"Rule")}constructor(t){super(t.definition),this.orgText="",sP(this,Wq(t,t=>void 0!==t))}},Htt=class extends jtt{static{me(this,"Alternative")}constructor(t){super(t.definition),this.ignoreAmbiguities=!1,sP(this,Wq(t,t=>void 0!==t))}},Vtt=class extends jtt{static{me(this,"Option")}constructor(t){super(t.definition),this.idx=1,sP(this,Wq(t,t=>void 0!==t))}},Xtt=class extends jtt{static{me(this,"RepetitionMandatory")}constructor(t){super(t.definition),this.idx=1,sP(this,Wq(t,t=>void 0!==t))}},Ktt=class extends jtt{static{me(this,"RepetitionMandatoryWithSeparator")}constructor(t){super(t.definition),this.idx=1,sP(this,Wq(t,t=>void 0!==t))}},Ztt=class extends jtt{static{me(this,"Repetition")}constructor(t){super(t.definition),this.idx=1,sP(this,Wq(t,t=>void 0!==t))}},Qtt=class extends jtt{static{me(this,"RepetitionWithSeparator")}constructor(t){super(t.definition),this.idx=1,sP(this,Wq(t,t=>void 0!==t))}},Jtt=class extends jtt{static{me(this,"Alternation")}get definition(){return this._definition}set definition(t){this._definition=t}constructor(t){super(t.definition),this.idx=1,this.ignoreAmbiguities=!1,this.hasPredicates=!1,sP(this,Wq(t,t=>void 0!==t))}},tet=class{static{me(this,"Terminal")}constructor(t){this.idx=1,sP(this,Wq(t,t=>void 0!==t))}accept(t){t.visit(this)}},me(Utt,"serializeGrammar"),me(qtt,"serializeProduction")}),net=t(()=>{ret(),eet=class{static{me(this,"GAstVisitor")}visit(t){var e=t;switch(e.constructor){case Wtt:return this.visitNonTerminal(e);case Htt:return this.visitAlternative(e);case Vtt:return this.visitOption(e);case Xtt:return this.visitRepetitionMandatory(e);case Ktt:return this.visitRepetitionMandatoryWithSeparator(e);case Qtt:return this.visitRepetitionWithSeparator(e);case Ztt:return this.visitRepetition(e);case Jtt:return this.visitAlternation(e);case tet:return this.visitTerminal(e);case Ytt:return this.visitRule(e);default:throw Error("non exhaustive match")}}visitNonTerminal(t){}visitAlternative(t){}visitOption(t){}visitRepetition(t){}visitRepetitionMandatory(t){}visitRepetitionMandatoryWithSeparator(t){}visitRepetitionWithSeparator(t){}visitAlternation(t){}visitTerminal(t){}visitRule(t){}}});function iet(t){return t instanceof Htt||t instanceof Vtt||t instanceof Ztt||t instanceof Xtt||t instanceof Ktt||t instanceof Qtt||t instanceof tet||t instanceof Ytt}function aet(t,e=[]){return t instanceof Vtt||t instanceof Ztt||t instanceof Qtt||(t instanceof Jtt?eW(t.definition,t=>aet(t,e)):!(t instanceof Wtt&&ZU(e,t))&&t instanceof jtt&&(t instanceof Wtt&&e.push(t),qG(t.definition,t=>aet(t,e))))}function set(t){return t instanceof Jtt}function oet(t){if(t instanceof Wtt)return"SUBRULE";if(t instanceof Vtt)return"OPTION";if(t instanceof Jtt)return"OR";if(t instanceof Xtt)return"AT_LEAST_ONE";if(t instanceof Ktt)return"AT_LEAST_ONE_SEP";if(t instanceof Qtt)return"MANY_SEP";if(t instanceof Ztt)return"MANY";if(t instanceof tet)return"CONSUME";throw Error("non exhaustive match")}var cet=t(()=>{IW(),ret(),me(iet,"isSequenceProd"),me(aet,"isOptionalProd"),me(set,"isBranchingProd"),me(oet,"getProductionDslName")}),het=t(()=>{ret(),net(),cet()});function uet(t,e,r){return[new Vtt({definition:[new tet({terminalType:t.separator})].concat(t.definition)})].concat(e,r)}var det,pet=t(()=>{IW(),het(),det=class{static{me(this,"RestWalker")}walk(r,n=[]){v(r.definition,(t,e)=>{if(e=CG(r.definition,e+1),t instanceof Wtt)this.walkProdRef(t,e,n);else if(t instanceof tet)this.walkTerminal(t,e,n);else if(t instanceof Htt)this.walkFlat(t,e,n);else if(t instanceof Vtt)this.walkOption(t,e,n);else if(t instanceof Xtt)this.walkAtLeastOne(t,e,n);else if(t instanceof Ktt)this.walkAtLeastOneSep(t,e,n);else if(t instanceof Qtt)this.walkManySep(t,e,n);else if(t instanceof Ztt)this.walkMany(t,e,n);else{if(!(t instanceof Jtt))throw Error("non exhaustive match");this.walkOr(t,e,n)}})}walkTerminal(t,e,r){}walkProdRef(t,e,r){}walkFlat(t,e,r){e=e.concat(r),this.walk(t,e)}walkOption(t,e,r){e=e.concat(r),this.walk(t,e)}walkAtLeastOne(t,e,r){e=[new Vtt({definition:t.definition})].concat(e,r),this.walk(t,e)}walkAtLeastOneSep(t,e,r){e=uet(t,e,r),this.walk(t,e)}walkMany(t,e,r){e=[new Vtt({definition:t.definition})].concat(e,r),this.walk(t,e)}walkManySep(t,e,r){e=uet(t,e,r),this.walk(t,e)}walkOr(t,e,r){let n=e.concat(r);v(t.definition,t=>{t=new Htt({definition:[t]}),this.walk(t,n)})}},me(uet,"restForRepetitionWithSeparator")});function get(t){if(t instanceof Wtt)return get(t.referencedRule);if(t instanceof tet)return yet(t);if(iet(t))return fet(t);if(set(t))return met(t);throw Error("non exhaustive match")}function fet(t){let e=[],r=t.definition,n=0,i=r.length>n,a,s=!0;for(;i&&s;)a=r[n],s=aet(a),e=e.concat(get(a)),n+=1,i=r.length>n;return mW(e)}function met(t){return t=x(t.definition,t=>get(t)),mW(VP(t))}function yet(t){return[t.terminalType]}var vet,xet=t(()=>{IW(),het(),me(get,"first"),me(fet,"firstForSequence"),me(met,"firstForBranching"),me(yet,"firstForTerminal")}),bet=t(()=>{vet="_~IN~_"});function wet(t){let e={};return v(t,t=>{t=new Tet(t).startWalking(),sP(e,t)}),e}function ket(t,e){return t.name+e+vet}var Tet,Eet=t(()=>{pet(),xet(),IW(),bet(),het(),Tet=class extends det{static{me(this,"ResyncFollowsWalker")}constructor(t){super(),this.topProd=t,this.follows={}}startWalking(){return this.walk(this.topProd),this.follows}walkTerminal(t,e,r){}walkProdRef(t,e,r){t=ket(t.referencedRule,t.idx)+this.topProd.name,e=e.concat(r),r=get(new Htt({definition:e})),this.follows[t]=r}},me(wet,"computeAllProdsFollows"),me(ket,"buildBetweenProdsFollowPrefix")});function Cet(t){var e,t=t.toString();return Aet.hasOwnProperty(t)?Aet[t]:(e=Let.pattern(t),Aet[t]=e)}function _et(){Aet={}}var Aet,Let,Net=t(()=>{AJ(),Aet={},Let=new kJ,me(Cet,"getRegExpAst"),me(_et,"clearRegExpParserCache")});function Iet(t,e=!1){try{var r=Cet(t);return Ret(r.value,{},r.flags.ignoreCase)}catch(r){r.message===Fet?e&&Mtt(`${$et} Unable to optimize: < ${t.toString()} > +`,"getStyles"),aZ=iZ}),lZ={};JBe(lZ,{diagram:()=>cZ});var cZ,hZ=e(()=>{JK(),eZ(),sZ(),oZ(),cZ={parser:KK,get db(){return new ZK},renderer:tZ,styles:aZ}});function uZ(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$type}function dZ(e){return"object"==typeof e&&null!==e&&"string"==typeof e.$refText}function pZ(e){return"object"==typeof e&&null!==e&&"string"==typeof e.name&&"string"==typeof e.type&&"string"==typeof e.path}function gZ(e){return"object"==typeof e&&null!==e&&uZ(e.container)&&dZ(e.reference)&&"string"==typeof e.message}function fZ(e){return"object"==typeof e&&null!==e&&Array.isArray(e.content)}function mZ(e){return"object"==typeof e&&null!==e&&"object"==typeof e.tokenType}function yZ(e){return fZ(e)&&"string"==typeof e.fullText}var vZ,xZ=e(()=>{mt(uZ,"isAstNode"),mt(dZ,"isReference"),mt(pZ,"isAstNodeDescription"),mt(gZ,"isLinkingError"),vZ=class{static{mt(this,"AbstractAstReflection")}constructor(){this.subtypes={},this.allSubtypes={}}isInstance(e,t){return uZ(e)&&this.isSubtype(e.$type,t)}isSubtype(e,t){var r,n;return e===t||(void 0!==(n=(r=(r=this.subtypes[e])||(this.subtypes[e]={}))[t])?n:(n=this.computeIsSubtype(e,t),r[t]=n))}getAllSubTypes(e){var t=this.allSubtypes[e];if(t)return t;var r,n=[];for(r of this.getAllTypes())this.isSubtype(r,e)&&n.push(r);return this.allSubtypes[e]=n}},mt(fZ,"isCompositeCstNode"),mt(mZ,"isLeafCstNode"),mt(yZ,"isRootCstNode")});function bZ(e){return"string"==typeof e?e:"u"t[Symbol.iterator](),e=>e.next());if("number"==typeof t.length)return new TZ(()=>({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{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 n(e){return e.reduce((e,t)=>Math.max(e,t))}var i;TZ=class a{static{mt(this,"StreamImpl")}constructor(e,t){this.startFn=e,this.nextFn=t}iterator(){let e={state:this.startFn(),next:mt(()=>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 a(()=>({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 CZ})}join(e=","){let t=this.iterator(),r="",n,i=!1;for(;(n=t.next()).done||(i&&(r+=e),r+=bZ(n.value)),i=!0,!n.done;);return r}indexOf(e,t=0){let r=this.iterator(),n=0,i=r.next();for(;!i.done;){if(n>=t&&i.value===e)return n;i=r.next(),n++}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,n=t.next();for(;!n.done;)e(n.value,r),n=t.next(),r++}map(r){return new a(this.startFn,e=>{var{done:e,value:t}=this.nextFn(e);return e?CZ:{done:!1,value:r(t)}})}filter(r){return new a(this.startFn,e=>{var t;do{if(!(t=this.nextFn(e)).done&&r(t.value))return t}while(!t.done);return CZ})}nonNullable(){return this.filter(e=>null!=e)}reduce(e,t){let r=this.iterator(),n=t,i=r.next();for(;!i.done;)n=void 0===n?i.value:e(n,i.value),i=r.next();return n}reduceRight(e,t){return this.recursiveReduce(this.iterator(),e,t)}recursiveReduce(e,t,r){var n=e.next();return n.done?r:void 0===(e=this.recursiveReduce(e,t,r))?n.value:t(e,n.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,n=t.next();for(;!n.done;){if(e(n.value))return r;n=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(n){return new a(()=>({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(!wZ(r=n(r)))return{done:!1,value:r};e.iterator=r[Symbol.iterator]()}}while(e.iterator);return CZ})}flat(e){if((e=void 0===e?1:e)<=0)return this;let n=1({this:n.startFn()}),e=>{do{if(e.iterator){if(!(t=e.iterator.next()).done)return t;e.iterator=void 0}var{done:t,value:r}=n.nextFn(e.this);if(!t){if(!wZ(r))return{done:!1,value:r};e.iterator=r[Symbol.iterator]()}}while(e.iterator);return CZ})}head(){var e=this.iterator().next();if(!e.done)return e.value}tail(r=1){return new a(()=>{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=n?n(t.value):t.value;if(!e.set.has(r))return e.set.add(r),t}}while(!t.done);return CZ})}exclude(e,t){let r=new Set;for(var n of e)n=t?t(n):n,r.add(n);return this.filter(e=>(e=t?t(e):e,!r.has(e)))}},mt(bZ,"toString"),mt(wZ,"isIterable"),EZ=new TZ(()=>{},()=>CZ),CZ=Object.freeze({done:!0,value:void 0}),mt(kZ,"stream"),SZ=class extends TZ{static{mt(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:mt(()=>{e.state.pruned=!0},"prune"),[Symbol.iterator]:()=>e};return e}},i=_Z=_Z||{},mt(e,"sum"),i.sum=e,mt(t,"product"),i.product=t,mt(r,"min"),i.min=r,mt(n,"max"),i.max=n}),LZ={};function NZ(e){return new SZ(e,e=>fZ(e)?e.content:[],{includeRoot:!0})}function IZ(e){return NZ(e).filter(mZ)}function RZ(e,t){for(;e.container;)if((e=e.container)===t)return!0;return!1}function MZ(e){return{start:{character:e.startColumn-1,line:e.startLine-1},end:{character:e.endColumn,line:e.endLine-1}}}function DZ(e){var t,r;if(e)return{offset:e,end:t,range:r}=e,{range:r,offset:e,end:t,length:t-e}}function OZ(e,t){var r;return e.end.linet.end.line||e.start.line===t.end.line&&e.start.character>=t.end.character?XZ.After:(r=e.start.line>t.start.line||e.start.line===t.start.line&&e.start.character>=t.start.character,e=e.end.lineXZ.After}function BZ(e,t,r=KZ){var n;if(e)return 0!e.hidden)-1;0<=e;e--){var n=t.content[e];if(FZ(n,r))return n}}}function FZ(e,t){return mZ(e)&&t.includes(e.tokenType.name)}function zZ(e,t){return mZ(e)?e:fZ(e)&&(e=UZ(e,t,!1))?zZ(e,t):void 0}function GZ(e,t){return mZ(e)?e:fZ(e)&&(e=UZ(e,t,!0))?GZ(e,t):void 0}function UZ(e,t,r){let n=0,i=e.content.length-1,a;for(;n<=i;){var s=Math.floor((n+i)/2),o=e.content[s];if(o.offset<=t&&o.end>t)return o;o.end<=t?(a=r?o:void 0,n=s+1):i=s-1}return a}function qZ(r,n=!0){for(;r.container;){let e=r.container,t=e.content.indexOf(r);for(;0KZ,RangeComparison:()=>XZ,compareRange:()=>OZ,findCommentNode:()=>$Z,findDeclarationNodeAtOffset:()=>BZ,findLeafNodeAtOffset:()=>zZ,findLeafNodeBeforeOffset:()=>GZ,flattenCst:()=>IZ,getInteriorNodes:()=>YZ,getNextNode:()=>jZ,getPreviousNode:()=>qZ,getStartlineNode:()=>WZ,inRange:()=>PZ,isChildNode:()=>RZ,isCommentNode:()=>FZ,streamCst:()=>NZ,toDocumentSegment:()=>DZ,tokenToRange:()=>MZ});var XZ,KZ,ZZ=e(()=>{var e;xZ(),AZ(),mt(NZ,"streamCst"),mt(IZ,"flattenCst"),mt(RZ,"isChildNode"),mt(MZ,"tokenToRange"),mt(DZ,"toDocumentSegment"),(e=XZ=XZ||{})[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(OZ,"compareRange"),mt(PZ,"inRange"),KZ=/^[\w\p{L}]$/u,mt(BZ,"findDeclarationNodeAtOffset"),mt($Z,"findCommentNode"),mt(FZ,"isCommentNode"),mt(zZ,"findLeafNodeAtOffset"),mt(GZ,"findLeafNodeBeforeOffset"),mt(UZ,"binarySearch"),mt(qZ,"getPreviousNode"),mt(jZ,"getNextNode"),mt(WZ,"getStartlineNode"),mt(YZ,"getInteriorNodes"),mt(HZ,"getCommonParent"),mt(VZ,"getParentChain")});function QZ(e){throw new Error("Error! The input value was not handled.")}var JZ,eQ=e(()=>{JZ=class extends Error{static{mt(this,"ErrorWithLocation")}constructor(e,t){super(e?`${t} at ${e.range.start.line}:`+e.range.start.character:t)}},mt(QZ,"assertUnreachable")}),tQ={};function rQ(e){return jJ.isInstance(e,ZQ)}function nQ(e){return jJ.isInstance(e,QQ)}function iQ(e){return jJ.isInstance(e,JQ)}function aQ(e){return sQ(e)||"current"===e||"entry"===e||"extends"===e||"false"===e||"fragment"===e||"grammar"===e||"hidden"===e||"import"===e||"interface"===e||"returns"===e||"terminal"===e||"true"===e||"type"===e||"infer"===e||"infers"===e||"with"===e||"string"==typeof e&&/\^?[_a-zA-Z][\w_]*/.test(e)}function sQ(e){return"string"===e||"number"===e||"boolean"===e||"Date"===e||"bigint"===e}function oQ(e){return jJ.isInstance(e,eJ)}function lQ(e){return jJ.isInstance(e,tJ)}function cQ(e){return jJ.isInstance(e,rJ)}function hQ(e){return jJ.isInstance(e,nJ)}function uQ(e){return jJ.isInstance(e,iJ)}function dQ(e){return jJ.isInstance(e,aJ)}function pQ(e){return jJ.isInstance(e,sJ)}function gQ(e){return jJ.isInstance(e,oJ)}function fQ(e){return jJ.isInstance(e,lJ)}function mQ(e){return jJ.isInstance(e,cJ)}function yQ(e){return jJ.isInstance(e,hJ)}function vQ(e){return jJ.isInstance(e,uJ)}function xQ(e){return jJ.isInstance(e,dJ)}function bQ(e){return jJ.isInstance(e,pJ)}function wQ(e){return jJ.isInstance(e,gJ)}function kQ(e){return jJ.isInstance(e,fJ)}function TQ(e){return jJ.isInstance(e,mJ)}function EQ(e){return jJ.isInstance(e,yJ)}function CQ(e){return jJ.isInstance(e,vJ)}function SQ(e){return jJ.isInstance(e,xJ)}function _Q(e){return jJ.isInstance(e,bJ)}function AQ(e){return jJ.isInstance(e,wJ)}function LQ(e){return jJ.isInstance(e,kJ)}function NQ(e){return jJ.isInstance(e,TJ)}function IQ(e){return jJ.isInstance(e,EJ)}function RQ(e){return jJ.isInstance(e,CJ)}function MQ(e){return jJ.isInstance(e,SJ)}function DQ(e){return jJ.isInstance(e,_J)}function OQ(e){return jJ.isInstance(e,AJ)}function PQ(e){return jJ.isInstance(e,LJ)}function BQ(e){return jJ.isInstance(e,NJ)}function $Q(e){return jJ.isInstance(e,IJ)}function FQ(e){return jJ.isInstance(e,RJ)}function zQ(e){return jJ.isInstance(e,MJ)}function GQ(e){return jJ.isInstance(e,DJ)}function UQ(e){return jJ.isInstance(e,OJ)}function qQ(e){return jJ.isInstance(e,PJ)}function jQ(e){return jJ.isInstance(e,BJ)}function WQ(e){return jJ.isInstance(e,$J)}function YQ(e){return jJ.isInstance(e,FJ)}function HQ(e){return jJ.isInstance(e,zJ)}function VQ(e){return jJ.isInstance(e,GJ)}function XQ(e){return jJ.isInstance(e,UJ)}JBe(tQ,{AbstractElement:()=>rJ,AbstractRule:()=>ZQ,AbstractType:()=>QQ,Action:()=>SJ,Alternatives:()=>_J,ArrayLiteral:()=>nJ,ArrayType:()=>iJ,Assignment:()=>AJ,BooleanLiteral:()=>aJ,CharacterRange:()=>LJ,Condition:()=>JQ,Conjunction:()=>sJ,CrossReference:()=>NJ,Disjunction:()=>oJ,EndOfFile:()=>IJ,Grammar:()=>lJ,GrammarImport:()=>cJ,Group:()=>RJ,InferredType:()=>hJ,Interface:()=>uJ,Keyword:()=>MJ,LangiumGrammarAstReflection:()=>qJ,LangiumGrammarTerminals:()=>KQ,NamedArgument:()=>dJ,NegatedToken:()=>DJ,Negation:()=>pJ,NumberLiteral:()=>gJ,Parameter:()=>fJ,ParameterReference:()=>mJ,ParserRule:()=>yJ,ReferenceType:()=>vJ,RegexToken:()=>OJ,ReturnType:()=>xJ,RuleCall:()=>PJ,SimpleType:()=>bJ,StringLiteral:()=>wJ,TerminalAlternatives:()=>BJ,TerminalGroup:()=>$J,TerminalRule:()=>kJ,TerminalRuleCall:()=>FJ,Type:()=>TJ,TypeAttribute:()=>EJ,TypeDefinition:()=>eJ,UnionType:()=>CJ,UnorderedGroup:()=>zJ,UntilToken:()=>GJ,ValueLiteral:()=>tJ,Wildcard:()=>UJ,isAbstractElement:()=>cQ,isAbstractRule:()=>rQ,isAbstractType:()=>nQ,isAction:()=>MQ,isAlternatives:()=>DQ,isArrayLiteral:()=>hQ,isArrayType:()=>uQ,isAssignment:()=>OQ,isBooleanLiteral:()=>dQ,isCharacterRange:()=>PQ,isCondition:()=>iQ,isConjunction:()=>pQ,isCrossReference:()=>BQ,isDisjunction:()=>gQ,isEndOfFile:()=>$Q,isFeatureName:()=>aQ,isGrammar:()=>fQ,isGrammarImport:()=>mQ,isGroup:()=>FQ,isInferredType:()=>yQ,isInterface:()=>vQ,isKeyword:()=>zQ,isNamedArgument:()=>xQ,isNegatedToken:()=>GQ,isNegation:()=>bQ,isNumberLiteral:()=>wQ,isParameter:()=>kQ,isParameterReference:()=>TQ,isParserRule:()=>EQ,isPrimitiveType:()=>sQ,isReferenceType:()=>CQ,isRegexToken:()=>UQ,isReturnType:()=>SQ,isRuleCall:()=>qQ,isSimpleType:()=>_Q,isStringLiteral:()=>AQ,isTerminalAlternatives:()=>jQ,isTerminalGroup:()=>WQ,isTerminalRule:()=>LQ,isTerminalRuleCall:()=>YQ,isType:()=>NQ,isTypeAttribute:()=>IQ,isTypeDefinition:()=>oQ,isUnionType:()=>RQ,isUnorderedGroup:()=>HQ,isUntilToken:()=>VQ,isValueLiteral:()=>lQ,isWildcard:()=>XQ,reflection:()=>jJ});var KQ,ZQ,QQ,JQ,eJ,tJ,rJ,nJ,iJ,aJ,sJ,oJ,lJ,cJ,hJ,uJ,dJ,pJ,gJ,fJ,mJ,yJ,vJ,xJ,bJ,wJ,kJ,TJ,EJ,CJ,SJ,_J,AJ,LJ,NJ,IJ,RJ,MJ,DJ,OJ,PJ,BJ,$J,FJ,zJ,GJ,UJ,qJ,jJ,WJ=e(()=>{xZ(),KQ={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]*/},ZQ="AbstractRule",mt(rQ,"isAbstractRule"),QQ="AbstractType",mt(nQ,"isAbstractType"),JQ="Condition",mt(iQ,"isCondition"),mt(aQ,"isFeatureName"),mt(sQ,"isPrimitiveType"),eJ="TypeDefinition",mt(oQ,"isTypeDefinition"),tJ="ValueLiteral",mt(lQ,"isValueLiteral"),rJ="AbstractElement",mt(cQ,"isAbstractElement"),nJ="ArrayLiteral",mt(hQ,"isArrayLiteral"),iJ="ArrayType",mt(uQ,"isArrayType"),aJ="BooleanLiteral",mt(dQ,"isBooleanLiteral"),sJ="Conjunction",mt(pQ,"isConjunction"),oJ="Disjunction",mt(gQ,"isDisjunction"),lJ="Grammar",mt(fQ,"isGrammar"),cJ="GrammarImport",mt(mQ,"isGrammarImport"),hJ="InferredType",mt(yQ,"isInferredType"),uJ="Interface",mt(vQ,"isInterface"),dJ="NamedArgument",mt(xQ,"isNamedArgument"),pJ="Negation",mt(bQ,"isNegation"),gJ="NumberLiteral",mt(wQ,"isNumberLiteral"),fJ="Parameter",mt(kQ,"isParameter"),mJ="ParameterReference",mt(TQ,"isParameterReference"),yJ="ParserRule",mt(EQ,"isParserRule"),vJ="ReferenceType",mt(CQ,"isReferenceType"),xJ="ReturnType",mt(SQ,"isReturnType"),bJ="SimpleType",mt(_Q,"isSimpleType"),wJ="StringLiteral",mt(AQ,"isStringLiteral"),kJ="TerminalRule",mt(LQ,"isTerminalRule"),TJ="Type",mt(NQ,"isType"),EJ="TypeAttribute",mt(IQ,"isTypeAttribute"),CJ="UnionType",mt(RQ,"isUnionType"),SJ="Action",mt(MQ,"isAction"),_J="Alternatives",mt(DQ,"isAlternatives"),AJ="Assignment",mt(OQ,"isAssignment"),LJ="CharacterRange",mt(PQ,"isCharacterRange"),NJ="CrossReference",mt(BQ,"isCrossReference"),IJ="EndOfFile",mt($Q,"isEndOfFile"),RJ="Group",mt(FQ,"isGroup"),MJ="Keyword",mt(zQ,"isKeyword"),DJ="NegatedToken",mt(GQ,"isNegatedToken"),OJ="RegexToken",mt(UQ,"isRegexToken"),PJ="RuleCall",mt(qQ,"isRuleCall"),BJ="TerminalAlternatives",mt(jQ,"isTerminalAlternatives"),$J="TerminalGroup",mt(WQ,"isTerminalGroup"),FJ="TerminalRuleCall",mt(YQ,"isTerminalRuleCall"),zJ="UnorderedGroup",mt(HQ,"isUnorderedGroup"),GJ="UntilToken",mt(VQ,"isUntilToken"),UJ="Wildcard",mt(XQ,"isWildcard"),qJ=class extends vZ{static{mt(this,"LangiumGrammarAstReflection")}getAllTypes(){return[rJ,ZQ,QQ,SJ,_J,nJ,iJ,AJ,aJ,LJ,JQ,sJ,NJ,oJ,IJ,lJ,cJ,RJ,hJ,uJ,MJ,dJ,DJ,pJ,gJ,fJ,mJ,yJ,vJ,OJ,xJ,PJ,bJ,wJ,BJ,$J,kJ,FJ,TJ,EJ,eJ,CJ,zJ,GJ,tJ,UJ]}computeIsSubtype(e,t){switch(e){case SJ:case _J:case AJ:case LJ:case NJ:case IJ:case RJ:case MJ:case DJ:case OJ:case PJ:case BJ:case $J:case FJ:case zJ:case GJ:case UJ:return this.isSubtype(rJ,t);case nJ:case gJ:case wJ:return this.isSubtype(tJ,t);case iJ:case vJ:case bJ:case CJ:return this.isSubtype(eJ,t);case aJ:return this.isSubtype(JQ,t)||this.isSubtype(tJ,t);case sJ:case oJ:case pJ:case mJ:return this.isSubtype(JQ,t);case hJ:case uJ:case TJ:return this.isSubtype(QQ,t);case yJ:return this.isSubtype(ZQ,t)||this.isSubtype(QQ,t);case kJ:return this.isSubtype(ZQ,t);default:return!1}}getReferenceType(e){var t=e.container.$type+":"+e.property;switch(t){case"Action:type":case"CrossReference:type":case"Interface:superTypes":case"ParserRule:returnType":case"SimpleType:typeRef":return QQ;case"Grammar:hiddenTokens":case"ParserRule:hiddenTokens":case"RuleCall:rule":return ZQ;case"Grammar:usedGrammars":return lJ;case"NamedArgument:parameter":case"ParameterReference:parameter":return fJ;case"TerminalRuleCall:rule":return kJ;default:throw new Error(t+" is not a valid reference id.")}}getTypeMetaData(e){switch(e){case rJ:return{name:rJ,properties:[{name:"cardinality"},{name:"lookahead"}]};case nJ:return{name:nJ,properties:[{name:"elements",defaultValue:[]}]};case iJ:return{name:iJ,properties:[{name:"elementType"}]};case aJ:return{name:aJ,properties:[{name:"true",defaultValue:!1}]};case sJ:return{name:sJ,properties:[{name:"left"},{name:"right"}]};case oJ:return{name:oJ,properties:[{name:"left"},{name:"right"}]};case lJ:return{name:lJ,properties:[{name:"definesHiddenTokens",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"imports",defaultValue:[]},{name:"interfaces",defaultValue:[]},{name:"isDeclared",defaultValue:!1},{name:"name"},{name:"rules",defaultValue:[]},{name:"types",defaultValue:[]},{name:"usedGrammars",defaultValue:[]}]};case cJ:return{name:cJ,properties:[{name:"path"}]};case hJ:return{name:hJ,properties:[{name:"name"}]};case uJ:return{name:uJ,properties:[{name:"attributes",defaultValue:[]},{name:"name"},{name:"superTypes",defaultValue:[]}]};case dJ:return{name:dJ,properties:[{name:"calledByName",defaultValue:!1},{name:"parameter"},{name:"value"}]};case pJ:return{name:pJ,properties:[{name:"value"}]};case gJ:return{name:gJ,properties:[{name:"value"}]};case fJ:return{name:fJ,properties:[{name:"name"}]};case mJ:return{name:mJ,properties:[{name:"parameter"}]};case yJ:return{name:yJ,properties:[{name:"dataType"},{name:"definesHiddenTokens",defaultValue:!1},{name:"definition"},{name:"entry",defaultValue:!1},{name:"fragment",defaultValue:!1},{name:"hiddenTokens",defaultValue:[]},{name:"inferredType"},{name:"name"},{name:"parameters",defaultValue:[]},{name:"returnType"},{name:"wildcard",defaultValue:!1}]};case vJ:return{name:vJ,properties:[{name:"referenceType"}]};case xJ:return{name:xJ,properties:[{name:"name"}]};case bJ:return{name:bJ,properties:[{name:"primitiveType"},{name:"stringType"},{name:"typeRef"}]};case wJ:return{name:wJ,properties:[{name:"value"}]};case kJ:return{name:kJ,properties:[{name:"definition"},{name:"fragment",defaultValue:!1},{name:"hidden",defaultValue:!1},{name:"name"},{name:"type"}]};case TJ:return{name:TJ,properties:[{name:"name"},{name:"type"}]};case EJ:return{name:EJ,properties:[{name:"defaultValue"},{name:"isOptional",defaultValue:!1},{name:"name"},{name:"type"}]};case CJ:return{name:CJ,properties:[{name:"types",defaultValue:[]}]};case SJ:return{name:SJ,properties:[{name:"cardinality"},{name:"feature"},{name:"inferredType"},{name:"lookahead"},{name:"operator"},{name:"type"}]};case _J:return{name:_J,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case AJ:return{name:AJ,properties:[{name:"cardinality"},{name:"feature"},{name:"lookahead"},{name:"operator"},{name:"terminal"}]};case LJ:return{name:LJ,properties:[{name:"cardinality"},{name:"left"},{name:"lookahead"},{name:"right"}]};case NJ:return{name:NJ,properties:[{name:"cardinality"},{name:"deprecatedSyntax",defaultValue:!1},{name:"lookahead"},{name:"terminal"},{name:"type"}]};case IJ:return{name:IJ,properties:[{name:"cardinality"},{name:"lookahead"}]};case RJ:return{name:RJ,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"guardCondition"},{name:"lookahead"}]};case MJ:return{name:MJ,properties:[{name:"cardinality"},{name:"lookahead"},{name:"value"}]};case DJ:return{name:DJ,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case OJ:return{name:OJ,properties:[{name:"cardinality"},{name:"lookahead"},{name:"regex"}]};case PJ:return{name:PJ,properties:[{name:"arguments",defaultValue:[]},{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case BJ:return{name:BJ,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case $J:return{name:$J,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case FJ:return{name:FJ,properties:[{name:"cardinality"},{name:"lookahead"},{name:"rule"}]};case zJ:return{name:zJ,properties:[{name:"cardinality"},{name:"elements",defaultValue:[]},{name:"lookahead"}]};case GJ:return{name:GJ,properties:[{name:"cardinality"},{name:"lookahead"},{name:"terminal"}]};case UJ:return{name:UJ,properties:[{name:"cardinality"},{name:"lookahead"}]};default:return{name:e,properties:[]}}}},jJ=new qJ}),YJ={};function HJ(n){for(let[r,e]of Object.entries(n))r.startsWith("$")||(Array.isArray(e)?e.forEach((e,t)=>{uZ(e)&&(e.$container=n,e.$containerProperty=r,e.$containerIndex=t)}):uZ(e)&&(e.$container=n,e.$containerProperty=r))}function VJ(e,t){let r=e;for(;r;){if(t(r))return r;r=r.$container}}function XJ(e,t){let r=e;for(;r;){if(t(r))return!0;r=r.$container}return!1}function KJ(e){if(e=ZJ(e).$document)return e;throw new Error("AST node has no document.")}function ZJ(e){for(;e.$container;)e=e.$container;return e}function QJ(i,e){if(!i)throw new Error("Node must be an AstNode.");let a=e?.range;return new TZ(()=>({keys:Object.keys(i),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndexQJ(e,t));throw new Error("Root node must be an AstNode.")}function eee(e,t){if(e)return t?.range&&!tee(e,t.range)?new SZ(e,()=>[]):new SZ(e,e=>QJ(e,t),{includeRoot:!0});throw new Error("Root node must be an AstNode.")}function tee(e,t){return!t||!!(e=null==(e=e.$cstNode)?void 0:e.range)&&PZ(e,t)}function ree(a){return new TZ(()=>({keys:Object.keys(a),keyIndex:0,arrayIndex:0}),e=>{for(;e.keyIndex{ree(e).forEach(e=>{e.reference.ref===t&&r.push(e.reference)})}),kZ(r)}function iee(e,t){var r,n=t;for(r of e.getTypeMetaData(t.$type).properties)void 0!==r.defaultValue&&void 0===n[r.name]&&(n[r.name]=aee(r.defaultValue))}function aee(e){return Array.isArray(e)?[...e.map(aee)]:e}function see(e,t){var r,n,i={$type:e.$type};for([r,n]of Object.entries(e))if(!r.startsWith("$"))if(uZ(n))i[r]=see(n,t);else if(dZ(n))i[r]=t(i,r,n.$refNode,n.$refText);else if(Array.isArray(n)){var a,s=[];for(a of n)uZ(a)?s.push(see(a,t)):dZ(a)?s.push(t(i,r,a.$refNode,a.$refText)):s.push(a);i[r]=s}else i[r]=n;return HJ(i),i}JBe(YJ,{assignMandatoryProperties:()=>iee,copyAstNode:()=>see,findLocalReferences:()=>nee,findRootNode:()=>ZJ,getContainerOfType:()=>VJ,getDocument:()=>KJ,hasContainerOfType:()=>XJ,linkContentToContainer:()=>HJ,streamAllContents:()=>JJ,streamAst:()=>eee,streamContents:()=>QJ,streamReferences:()=>ree});var oee=e(()=>{xZ(),AZ(),ZZ(),mt(HJ,"linkContentToContainer"),mt(VJ,"getContainerOfType"),mt(XJ,"hasContainerOfType"),mt(KJ,"getDocument"),mt(ZJ,"findRootNode"),mt(QJ,"streamContents"),mt(JJ,"streamAllContents"),mt(eee,"streamAst"),mt(tee,"isAstNodeInRange"),mt(ree,"streamReferences"),mt(nee,"findLocalReferences"),mt(iee,"assignMandatoryProperties"),mt(aee,"copyDefaultValue"),mt(see,"copyAstNode")});function lee(e){return e.charCodeAt(0)}function cee(e,t){Array.isArray(e)?e.forEach(function(e){t.push(e)}):t.push(e)}function hee(e,t){if(!0===e[t])throw"duplicate flag "+t;e[t]=!0}function uee(e){if(void 0===e)throw Error("Internal Error - Should never get here!");return!0}function dee(){throw Error("Internal Error - Should never get here!")}function pee(e){return"Character"===e.type}var gee,fee,mee,yee,vee,xee,bee,wee,kee=e(()=>{mt(lee,"cc"),mt(cee,"insertToSet"),mt(hee,"addFlag"),mt(uee,"ASSERT_EXISTS"),mt(dee,"ASSERT_NEVER_REACH_HERE"),mt(pee,"isCharacter")}),Tee=e(()=>{kee(),gee=[];for(let e=lee("0");e<=lee("9");e++)gee.push(e);fee=[lee("_")].concat(gee);for(let e=lee("a");e<=lee("z");e++)fee.push(e);for(let e=lee("A");e<=lee("Z");e++)fee.push(e);mee=[lee(" "),lee("\f"),lee(` +`),lee("\r"),lee("\t"),lee("\v"),lee("\t"),lee(" "),lee(" "),lee(" "),lee(" "),lee(" "),lee(" "),lee(" "),lee(" "),lee(" "),lee(" "),lee(" "),lee(" "),lee(" "),lee("\u2028"),lee("\u2029"),lee(" "),lee(" "),lee(" "),lee("\ufeff")]}),Eee=e(()=>{kee(),Tee(),yee=/[0-9a-fA-F]/,vee=/[0-9]/,xee=/[1-9]/,bee=class{static{mt(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":hee(r,"global");break;case"i":hee(r,"ignoreCase");break;case"m":hee(r,"multiLine");break;case"u":hee(r,"unicode");break;case"y":hee(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"}uee(e);var r=this.disjunction();return this.consumeChar(")"),{type:e,value:r,loc:this.loc(t)}}return dee()}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 n=this.integerIncludingZero();switch(this.popChar()){case"}":t={atLeast:n,atMost:n};break;case",":t=this.isDigit()?{atLeast:n,atMost:this.integerIncludingZero()}:{atLeast:n,atMost:1/0},this.consumeChar("}")}if(!0===e&&void 0===t)return;uee(t)}if((!0!==e||void 0!==t)&&uee(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 uee(e=void 0===e&&this.isPatternCharacter()?this.patternCharacter():e)?(e.loc=this.loc(t),this.isQuantifier()&&(e.quantifier=this.quantifier()),e):dee()}dotAll(){return this.consumeChar("."),{type:"Set",complement:!0,value:[lee(` +`),lee("\r"),lee("\u2028"),lee("\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=gee;break;case"D":e=gee,t=!0;break;case"s":e=mee;break;case"S":e=mee,t=!0;break;case"w":e=fee;break;case"W":e=fee,t=!0}return uee(e)?{type:"Set",value:e,complement:t}:dee()}controlEscapeAtom(){let e;switch(this.popChar()){case"f":e=lee("\f");break;case"n":e=lee(` +`);break;case"r":e=lee("\r");break;case"t":e=lee("\t");break;case"v":e=lee("\v")}return uee(e)?{type:"Character",value:e}:dee()}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:lee("\0")}}hexEscapeSequenceAtom(){return this.consumeChar("x"),this.parseHexDigits(2)}regExpUnicodeEscapeSequenceAtom(){return this.consumeChar("u"),this.parseHexDigits(4)}identityEscapeAtom(){return{type:"Character",value:lee(this.popChar())}}classPatternCharacterAtom(){switch(this.peekChar()){case` +`:case"\r":case"\u2028":case"\u2029":case"\\":case"]":throw Error("TBD");default:return{type:"Character",value:lee(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,pee(r)&&this.isRangeDash()){this.consumeChar("-");var n=this.classAtom();if(n.type,pee(n)){if(n.value=this.input.length)throw Error("Unexpected end of input");this.idx++}loc(e){return{begin:e,end:this.idx}}}}),Cee=e(()=>{wee=class{static{mt(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"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){}visitCharacter(e){}visitSet(e){}visitGroup(e){}visitGroupBackReference(e){}visitQuantifier(e){}}}),See=e(()=>{Eee(),Cee()}),_ee={};function Aee(e){try{e=`/${e="string"!=typeof e?e.source:e}/`;var t,r=Pee.pattern(e),n=[];for(t of r.value.value)$ee.reset(e),$ee.visit(t),n.push({start:$ee.startRegexp,end:$ee.endRegex});return n}catch{return[]}}function Lee(e){try{return e=(e="string"==typeof e?new RegExp(e):e).toString(),$ee.reset(e),$ee.visit(Pee.pattern(e)),$ee.multiline}catch{return!1}}function Nee(e){let t="string"==typeof e?new RegExp(e):e;return Fee.some(e=>t.test(e))}function Iee(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function Ree(e){return Array.prototype.map.call(e,e=>/\w/.test(e)?`[${e.toLowerCase()}${e.toUpperCase()}]`:Iee(e)).join("")}function Mee(e,t){return e=Dee(e),!!(t=t.match(e))&&0",s)-s+1);break;default:n(2)}break;case"[":(e=/\[(?:\\.|.)*?\]/g).lastIndex=s,n((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):n(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:n(1)}return t}return mt(o,"process"),new RegExp(o(),e.flags)}JBe(_ee,{NEWLINE_REGEXP:()=>Oee,escapeRegExp:()=>Iee,getCaseInsensitivePattern:()=>Ree,getTerminalParts:()=>Aee,isMultilineComment:()=>Lee,isWhitespace:()=>Nee,partialMatches:()=>Mee,partialRegExp:()=>Dee,whitespaceCharacters:()=>Fee});var Oee,Pee,Bee,$ee,Fee,zee=e(()=>{See(),Oee=/\r?\n/gm,Pee=new bee,Bee=class extends wee{static{mt(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=Iee(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)}},$ee=new Bee,mt(Aee,"getTerminalParts"),mt(Lee,"isMultilineComment"),Fee=` +\r              

   `.split(""),mt(Nee,"isWhitespace"),mt(Iee,"escapeRegExp"),mt(Ree,"getCaseInsensitivePattern"),mt(Mee,"partialMatches"),mt(Dee,"partialRegExp")}),Gee={};function Uee(e){return e.rules.find(e=>EQ(e)&&e.entry)}function qee(e){return e.rules.filter(e=>LQ(e)&&e.hidden)}function jee(e,t){var r,n=new Set,i=Uee(e);if(!i)return new Set(e.rules);for(r of[i].concat(qee(e)))Wee(r,n,t);var a,s=new Set;for(a of e.rules)(n.has(a.name)||LQ(a)&&a.hidden)&&s.add(a);return s}function Wee(e,t,r){t.add(e.name),JJ(e).forEach(e=>{(qQ(e)||r&&YQ(e))&&(e=e.rule.ref)&&!t.has(e.name)&&Wee(e,t,r)})}function Yee(e){return e.terminal||(e.type.ref?tte(e.type.ref)?.terminal:void 0)}function Hee(e){return e.hidden&&!Nee(mte(e))}function Vee(e,t){return e&&t?Kee(e,t,e.astNode,!0):[]}function Xee(e,t,r){return e&&t&&0!==(t=Kee(e,t,e.astNode,!0)).length?t[r=void 0!==r?Math.max(0,Math.min(r,t.length-1)):0]:void 0}function Kee(e,t,r,n){return!n&&(n=VJ(e.grammarSource,OQ))&&n.feature===t?[e]:fZ(e)&&e.astNode===r?e.content.flatMap(e=>Kee(e,t,r,!1)):[]}function Zee(e,t){return e?Jee(e,t,e?.astNode):[]}function Qee(e,t,r){return e&&0!==(t=Jee(e,t,e?.astNode)).length?t[r=void 0!==r?Math.max(0,Math.min(r,t.length-1)):0]:void 0}function Jee(e,t,r){if(e.astNode!==r)return[];if(zQ(e.grammarSource)&&e.grammarSource.value===t)return[e];for(var n,i,a=NZ(e).iterator(),s=[];(i=a.next()).done||((n=i.value).astNode===r?zQ(n.grammarSource)&&n.grammarSource.value===t&&s.push(n):a.prune()),!i.done;);return s}function ete(e){for(var t=e.astNode;t===(null==(r=e.container)?void 0:r.astNode);){var r=VJ(e.grammarSource,OQ);if(r)return r;e=e.container}}function tte(e){let t=e;return yQ(t)&&(MQ(t.$container)?t=t.$container.$container:EQ(t.$container)?t=t.$container:QZ(t.$container)),rte(e,t,new Map)}function rte(n,e,i){var t,r;function a(e,t){let r;return VJ(e,OQ)||(r=rte(t,t,i)),i.set(n,r),r}if(mt(a,"go"),i.has(n))return i.get(n);i.set(n,void 0);for(r of JJ(e)){if(OQ(r)&&"name"===r.feature.toLowerCase())return i.set(n,r),r;if(qQ(r)&&EQ(r.rule.ref))return a(r,r.rule.ref);if(_Q(r)&&null!=(t=r.typeRef)&&t.ref)return a(r,r.typeRef.ref)}}function nte(t){var e=t.$container;if(FQ(e)){var r=e.elements;for(let e=r.indexOf(t)-1;0<=e;e--){var n=r[e];if(MQ(n))return n;if(n=JJ(r[e]).find(MQ))return n}}if(cQ(e))return nte(e)}function ite(e,t){return"?"===e||"*"===e||FQ(t)&&!!t.guardCondition}function ate(e){return"*"===e||"+"===e}function ste(e){return"+="===e}function ote(e){return lte(e,new Set)}function lte(e,t){if(t.has(e))return!0;t.add(e);for(var r of JJ(e))if(qQ(r)){if(!r.rule.ref||EQ(r.rule.ref)&&!lte(r.rule.ref,t))return!1}else{if(OQ(r))return!1;if(MQ(r))return!1}return!!e.definition}function cte(e){return hte(e.type,new Set)}function hte(e,t){return!!t.has(e)||(t.add(e),!uQ(e)&&!CQ(e)&&(RQ(e)?e.types.every(e=>hte(e,t)):!!_Q(e)&&(void 0!==e.primitiveType||void 0!==e.stringType||void 0!==e.typeRef&&!!NQ(e=e.typeRef.ref)&&hte(e.type,t))))}function ute(e){return e.inferredType?e.inferredType.name:e.dataType||(e.returnType&&(e=e.returnType.ref)&&(EQ(e)||vQ(e)||NQ(e))?e.name:void 0)}function dte(e){if(EQ(e))return ote(e)||null==(t=ute(e))?e.name:t;if(vQ(e)||NQ(e)||SQ(e))return e.name;if(MQ(e)){var t=pte(e);if(t)return t}else if(yQ(e))return e.name;throw new Error("Cannot get name of Unknown Type")}function pte(e){var t;return e.inferredType?e.inferredType.name:null!=(t=e.type)&&t.ref?dte(e.type.ref):void 0}function gte(e){var t;return LQ(e)?null!=(t=null==(t=e.type)?void 0:t.name)?t:"string":ote(e)||null==(t=ute(e))?e.name:t}function fte(e){var t;return LQ(e)?null!=(t=null==(t=e.type)?void 0:t.name)?t:"string":null!=(t=ute(e))?t:e.name}function mte(e){var e=yte(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 yte(e,t){if(jQ(e))return vte(e);if(WQ(e))return xte(e);if(PQ(e))return kte(e);if(YQ(e)){var r=e.rule.ref;if(r)return Ete(yte(r.definition),{cardinality:e.cardinality,lookahead:e.lookahead});throw new Error("Missing rule reference.")}if(GQ(e))return wte(e);if(VQ(e))return bte(e);var n;if(UQ(e))return r=e.regex.lastIndexOf("/"),n=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")),Ete(n,{cardinality:e.cardinality,lookahead:e.lookahead,wrap:!1});if(XQ(e))return Ete(Cte,{cardinality:e.cardinality,lookahead:e.lookahead});throw new Error("Invalid terminal element: "+e?.$type)}function vte(e){return Ete(e.elements.map(e=>yte(e)).join("|"),{cardinality:e.cardinality,lookahead:e.lookahead})}function xte(e){return Ete(e.elements.map(e=>yte(e)).join(""),{cardinality:e.cardinality,lookahead:e.lookahead})}function bte(e){return Ete(Cte+"*?"+yte(e.terminal),{cardinality:e.cardinality,lookahead:e.lookahead})}function wte(e){return Ete(`(?!${yte(e.terminal)})${Cte}*?`,{cardinality:e.cardinality,lookahead:e.lookahead})}function kte(e){return e.right?Ete(`[${Tte(e.left)}-${Tte(e.right)}]`,{cardinality:e.cardinality,lookahead:e.lookahead,wrap:!1}):Ete(Tte(e.left),{cardinality:e.cardinality,lookahead:e.lookahead,wrap:!1})}function Tte(e){return Iee(e.value)}function Ete(e,t){var r;return!1===t.wrap&&!t.lookahead||(e=`(${null!=(r=t.lookahead)?r:""}${e})`),t.cardinality?""+e+t.cardinality:e}JBe(Gee,{findAssignment:()=>ete,findNameAssignment:()=>tte,findNodeForKeyword:()=>Qee,findNodeForProperty:()=>Xee,findNodesForKeyword:()=>Zee,findNodesForKeywordInternal:()=>Jee,findNodesForProperty:()=>Vee,getActionAtElement:()=>nte,getActionType:()=>pte,getAllReachableRules:()=>jee,getCrossReferenceTerminal:()=>Yee,getEntryRule:()=>Uee,getExplicitRuleType:()=>ute,getHiddenRules:()=>qee,getRuleType:()=>fte,getRuleTypeName:()=>gte,getTypeName:()=>dte,isArrayCardinality:()=>ate,isArrayOperator:()=>ste,isCommentTerminal:()=>Hee,isDataType:()=>cte,isDataTypeRule:()=>ote,isOptionalCardinality:()=>ite,terminalRegex:()=>mte});var Cte,Ste=e(()=>{eQ(),WJ(),xZ(),oee(),ZZ(),zee(),mt(Uee,"getEntryRule"),mt(qee,"getHiddenRules"),mt(jee,"getAllReachableRules"),mt(Wee,"ruleDfs"),mt(Yee,"getCrossReferenceTerminal"),mt(Hee,"isCommentTerminal"),mt(Vee,"findNodesForProperty"),mt(Xee,"findNodeForProperty"),mt(Kee,"findNodesForPropertyInternal"),mt(Zee,"findNodesForKeyword"),mt(Qee,"findNodeForKeyword"),mt(Jee,"findNodesForKeywordInternal"),mt(ete,"findAssignment"),mt(tte,"findNameAssignment"),mt(rte,"findNameAssignmentInternal"),mt(nte,"getActionAtElement"),mt(ite,"isOptionalCardinality"),mt(ate,"isArrayCardinality"),mt(ste,"isArrayOperator"),mt(ote,"isDataTypeRule"),mt(lte,"isDataTypeRuleInternal"),mt(cte,"isDataType"),mt(hte,"isDataTypeInternal"),mt(ute,"getExplicitRuleType"),mt(dte,"getTypeName"),mt(pte,"getActionType"),mt(gte,"getRuleTypeName"),mt(fte,"getRuleType"),mt(mte,"terminalRegex"),Cte=/[\s\S]/.source,mt(yte,"abstractElementToRegex"),mt(vte,"terminalAlternativesToRegex"),mt(xte,"terminalGroupToRegex"),mt(bte,"untilTokenToRegex"),mt(wte,"negateTokenToRegex"),mt(kte,"characterRangeToRegex"),mt(Tte,"keywordToRegex"),mt(Ete,"withCardinality")});function _te(e){var t,r=[];for(t of e.Grammar.rules)LQ(t)&&Hee(t)&&Lee(mte(t))&&r.push(t.name);return{multilineCommentRules:r,nameRegexp:KZ}}var Ate=e(()=>{ZZ(),Ste(),zee(),WJ(),mt(_te,"createGrammarConfig")}),Lte=e(()=>{});function Nte(e){console&&console.error&&console.error("Error: "+e)}function Ite(e){console&&console.warn&&console.warn("Warning: "+e)}var Rte=e(()=>{mt(Nte,"PRINT_ERROR"),mt(Ite,"PRINT_WARNING")});function Mte(e){var t=(new Date).getTime(),e=e();return{time:(new Date).getTime()-t,value:e}}var Dte=e(()=>{mt(Mte,"timer")});function Ote(e){function t(){}mt(t,"FakeConstructor"),t.prototype=e;let r=new t;function n(){return typeof r.bar}return mt(n,"fakeAccess"),n(),n(),e}var Pte=e(()=>{mt(Ote,"toFastProperties")}),Bte=e(()=>{Rte(),Dte(),Pte()});function $te(e){return Fte(e)?e.LABEL:e.name}function Fte(e){return Fq(e.LABEL)&&""!==e.LABEL}function zte(e){return x(e,Gte)}function Gte(e){function t(e){return x(e,Gte)}var r,n;if(mt(t,"convertDefinition"),e instanceof qte)return r={type:"NonTerminal",name:e.nonTerminalName,idx:e.idx},Fq(e.label)&&(r.label=e.label),r;if(e instanceof Wte)return{type:"Alternative",definition:t(e.definition)};if(e instanceof Yte)return{type:"Option",idx:e.idx,definition:t(e.definition)};if(e instanceof Hte)return{type:"RepetitionMandatory",idx:e.idx,definition:t(e.definition)};if(e instanceof Vte)return{type:"RepetitionMandatoryWithSeparator",idx:e.idx,separator:Gte(new Qte({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof Kte)return{type:"RepetitionWithSeparator",idx:e.idx,separator:Gte(new Qte({terminalType:e.separator})),definition:t(e.definition)};if(e instanceof Xte)return{type:"Repetition",idx:e.idx,definition:t(e.definition)};if(e instanceof Zte)return{type:"Alternation",idx:e.idx,definition:t(e.definition)};if(e instanceof Qte)return r={type:"Terminal",name:e.terminalType.name,label:$te(e.terminalType),idx:e.idx},Fq(e.label)&&(r.terminalLabel=e.label),n=e.terminalType.PATTERN,e.terminalType.PATTERN&&(r.pattern=cj(n)?n.source:n),r;if(e instanceof jte)return{type:"Rule",name:e.name,orgText:e.orgText,definition:t(e.definition)};throw Error("non exhaustive match")}var Ute,qte,jte,Wte,Yte,Hte,Vte,Xte,Kte,Zte,Qte,Jte,ere=e(()=>{LY(),mt($te,"tokenLabel"),mt(Fte,"hasTokenLabel"),Ute=class{static{mt(this,"AbstractProduction")}get definition(){return this._definition}set definition(e){this._definition=e}constructor(e){this._definition=e}accept(t){t.visit(this),v(this.definition,e=>{e.accept(t)})}},qte=class extends Ute{static{mt(this,"NonTerminal")}constructor(e){super([]),this.idx=1,iB(this,qj(e,e=>void 0!==e))}set definition(e){}get definition(){return void 0!==this.referencedRule?this.referencedRule.definition:[]}accept(e){e.visit(this)}},jte=class extends Ute{static{mt(this,"Rule")}constructor(e){super(e.definition),this.orgText="",iB(this,qj(e,e=>void 0!==e))}},Wte=class extends Ute{static{mt(this,"Alternative")}constructor(e){super(e.definition),this.ignoreAmbiguities=!1,iB(this,qj(e,e=>void 0!==e))}},Yte=class extends Ute{static{mt(this,"Option")}constructor(e){super(e.definition),this.idx=1,iB(this,qj(e,e=>void 0!==e))}},Hte=class extends Ute{static{mt(this,"RepetitionMandatory")}constructor(e){super(e.definition),this.idx=1,iB(this,qj(e,e=>void 0!==e))}},Vte=class extends Ute{static{mt(this,"RepetitionMandatoryWithSeparator")}constructor(e){super(e.definition),this.idx=1,iB(this,qj(e,e=>void 0!==e))}},Xte=class extends Ute{static{mt(this,"Repetition")}constructor(e){super(e.definition),this.idx=1,iB(this,qj(e,e=>void 0!==e))}},Kte=class extends Ute{static{mt(this,"RepetitionWithSeparator")}constructor(e){super(e.definition),this.idx=1,iB(this,qj(e,e=>void 0!==e))}},Zte=class extends Ute{static{mt(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,iB(this,qj(e,e=>void 0!==e))}},Qte=class{static{mt(this,"Terminal")}constructor(e){this.idx=1,iB(this,qj(e,e=>void 0!==e))}accept(e){e.visit(this)}},mt(zte,"serializeGrammar"),mt(Gte,"serializeProduction")}),tre=e(()=>{ere(),Jte=class{static{mt(this,"GAstVisitor")}visit(e){var t=e;switch(t.constructor){case qte:return this.visitNonTerminal(t);case Wte:return this.visitAlternative(t);case Yte:return this.visitOption(t);case Hte:return this.visitRepetitionMandatory(t);case Vte:return this.visitRepetitionMandatoryWithSeparator(t);case Kte:return this.visitRepetitionWithSeparator(t);case Xte:return this.visitRepetition(t);case Zte:return this.visitAlternation(t);case Qte:return this.visitTerminal(t);case jte: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){}}});function rre(e){return e instanceof Wte||e instanceof Yte||e instanceof Xte||e instanceof Hte||e instanceof Vte||e instanceof Kte||e instanceof Qte||e instanceof jte}function nre(e,t=[]){return e instanceof Yte||e instanceof Xte||e instanceof Kte||(e instanceof Zte?JW(e.definition,e=>nre(e,t)):!(e instanceof qte&&Xq(t,e))&&e instanceof Ute&&(e instanceof qte&&t.push(e),GU(e.definition,e=>nre(e,t))))}function ire(e){return e instanceof Zte}function are(e){if(e instanceof qte)return"SUBRULE";if(e instanceof Yte)return"OPTION";if(e instanceof Zte)return"OR";if(e instanceof Hte)return"AT_LEAST_ONE";if(e instanceof Vte)return"AT_LEAST_ONE_SEP";if(e instanceof Kte)return"MANY_SEP";if(e instanceof Xte)return"MANY";if(e instanceof Qte)return"CONSUME";throw Error("non exhaustive match")}var sre=e(()=>{LY(),ere(),mt(rre,"isSequenceProd"),mt(nre,"isOptionalProd"),mt(ire,"isBranchingProd"),mt(are,"getProductionDslName")}),ore=e(()=>{ere(),tre(),sre()});function lre(e,t,r){return[new Yte({definition:[new Qte({terminalType:e.separator})].concat(e.definition)})].concat(t,r)}var cre,hre=e(()=>{LY(),ore(),cre=class{static{mt(this,"RestWalker")}walk(r,n=[]){v(r.definition,(e,t)=>{if(t=TU(r.definition,t+1),e instanceof qte)this.walkProdRef(e,t,n);else if(e instanceof Qte)this.walkTerminal(e,t,n);else if(e instanceof Wte)this.walkFlat(e,t,n);else if(e instanceof Yte)this.walkOption(e,t,n);else if(e instanceof Hte)this.walkAtLeastOne(e,t,n);else if(e instanceof Vte)this.walkAtLeastOneSep(e,t,n);else if(e instanceof Kte)this.walkManySep(e,t,n);else if(e instanceof Xte)this.walkMany(e,t,n);else{if(!(e instanceof Zte))throw Error("non exhaustive match");this.walkOr(e,t,n)}})}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 Yte({definition:e.definition})].concat(t,r),this.walk(e,t)}walkAtLeastOneSep(e,t,r){t=lre(e,t,r),this.walk(e,t)}walkMany(e,t,r){t=[new Yte({definition:e.definition})].concat(t,r),this.walk(e,t)}walkManySep(e,t,r){t=lre(e,t,r),this.walk(e,t)}walkOr(e,t,r){let n=t.concat(r);v(e.definition,e=>{e=new Wte({definition:[e]}),this.walk(e,n)})}},mt(lre,"restForRepetitionWithSeparator")});function ure(e){if(e instanceof qte)return ure(e.referencedRule);if(e instanceof Qte)return gre(e);if(rre(e))return dre(e);if(ire(e))return pre(e);throw Error("non exhaustive match")}function dre(e){let t=[],r=e.definition,n=0,i=r.length>n,a,s=!0;for(;i&&s;)a=r[n],s=nre(a),t=t.concat(ure(a)),n+=1,i=r.length>n;return gY(t)}function pre(e){return e=x(e.definition,e=>ure(e)),gY(YB(e))}function gre(e){return[e.terminalType]}var fre,mre=e(()=>{LY(),ore(),mt(ure,"first"),mt(dre,"firstForSequence"),mt(pre,"firstForBranching"),mt(gre,"firstForTerminal")}),yre=e(()=>{fre="_~IN~_"});function vre(e){let t={};return v(e,e=>{e=new bre(e).startWalking(),iB(t,e)}),t}function xre(e,t){return e.name+t+fre}var bre,wre=e(()=>{hre(),mre(),LY(),yre(),ore(),bre=class extends cre{static{mt(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=xre(e.referencedRule,e.idx)+this.topProd.name,t=t.concat(r),r=ure(new Wte({definition:t})),this.follows[e]=r}},mt(vre,"computeAllProdsFollows"),mt(xre,"buildBetweenProdsFollowPrefix")});function kre(e){var t,e=e.toString();return Ere.hasOwnProperty(e)?Ere[e]:(t=Cre.pattern(e),Ere[e]=t)}function Tre(){Ere={}}var Ere,Cre,Sre=e(()=>{See(),Ere={},Cre=new bee,mt(kre,"getRegExpAst"),mt(Tre,"clearRegExpParserCache")});function _re(e,t=!1){try{var r=kre(e);return Are(r.value,{},r.flags.ignoreCase)}catch(r){r.message===Dre?t&&Ite(`${Ore} 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.`):(e=e?` + 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.`:"",Rtt(`${$et} - Failed parsing: < ${t.toString()} > + See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#REGEXP_PARSING for details.`:"",Nte(`${Ore} + Failed parsing: < ${e.toString()} > Using the @chevrotain/regexp-to-ast library - Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+e))}return[]}function Ret(e,i,a){switch(e.type){case"Disjunction":for(let t=0;t{if("number"==typeof e)Met(e,i,a);else{var r=e;if(!0===a)for(let t=r.from;t<=r.to;t++)Met(t,i,a);else{for(let t=r.from;t<=r.to&&t=Trt){var e=r.from>=Trt?r.from:Trt,t=r.to,e=grt(e),n=grt(t);for(let t=e;t<=n;t++)i[t]=t}}}});break;case"Group":Ret(s.value,i,a);break;default:throw Error("Non Exhaustive Match")}if(n=void 0!==s.quantifier&&0===s.quantifier.atLeast,"Group"===s.type&&!1===Pet(s)||"Group"!==s.type&&0==n)break}break;default:throw Error("non exhaustive match!")}return HU(i)}function Met(t,e,r){var n=grt(t);e[n]=n,!0===r&&Det(t,e)}function Det(t,e){var r=(t=String.fromCharCode(t)).toUpperCase();r!==t?e[r=grt(r.charCodeAt(0))]=r:(r=t.toLowerCase())!==t&&(e[t=grt(r.charCodeAt(0))]=t)}function Oet(t,r){return iU(t.value,t=>{if("number"==typeof t)return ZU(r,t);{let e=t;return void 0!==iU(r,t=>e.from<=t&&t<=e.to)}})}function Pet(t){var e=t.quantifier;return!(!e||0!==e.atLeast)||!!t.value&&(ZT(t.value)?qG(t.value,Pet):Pet(t.value))}function Bet(e,t){var r,n;return t instanceof RegExp?(r=Cet(t),(n=new zet(e)).visit(r),n.found):void 0!==iU(t,t=>ZU(e,t.charCodeAt(0)))}var Fet,$et,zet,Get=t(()=>{AJ(),IW(),$tt(),Net(),Crt(),Fet="Complement Sets are not supported for first char optimization",$et=`Unable to use "first char" lexer optimizations: -`,me(Iet,"getOptimizedStartCodesIndices"),me(Ret,"firstCharOptimizedIndices"),me(Met,"addOptimizedIdxToResult"),me(Det,"handleIgnoreCase"),me(Oet,"findCode"),me(Pet,"isWholeOptional"),zet=class extends TJ{static{me(this,"CharCodeFinder")}constructor(t){super(),this.targetCharCodes=t,this.found=!1}visitChildren(t){if(!0!==this.found){switch(t.type){case"Lookahead":return void this.visitLookahead(t);case"NegativeLookahead":return void this.visitNegativeLookahead(t)}super.visitChildren(t)}}visitCharacter(t){ZU(this.targetCharCodes,t.value)&&(this.found=!0)}visitSet(t){t.complement?void 0===Oet(t,this.targetCharCodes)&&(this.found=!0):void 0!==Oet(t,this.targetCharCodes)&&(this.found=!0)}},me(Bet,"canMatchCharCode")});function Uet(t,i){var e=(i=lG(i,{useSticky:xrt,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` -`],tracer:me((t,e)=>e(),"tracer")})).tracer;e("initCharCodeToOptimizedIndexMap",()=>{frt()});let r,n=(e("Reject Lexer.NA",()=>{r=Yj(t,t=>t[mrt]===jrt.NA)}),!1),a;e("Transform Patterns",()=>{n=!1,a=x(r,t=>{var e,t=t[mrt];if(uq(t))return 1!==(e=t.source).length||"^"===e||"$"===e||"."===e||t.ignoreCase?2!==e.length||"\\"!==e[0]||ZU(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],e[1])?(i.useSticky?irt:nrt)(t):e[1]:e;if(_w(t))return n=!0,{exec:t};if("object"==typeof t)return n=!0,t;if("string"==typeof t)return 1===t.length?t:(e=t.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),t=new RegExp(e),(i.useSticky?irt:nrt)(t));throw Error("non exhaustive match")})});let s,o,l,c,h;e("misc mapping",()=>{s=x(r,t=>t.tokenTypeIdx),o=x(r,t=>{if((t=t.GROUP)!==jrt.SKIPPED){if(GU(t))return t;if(fq(t))return!1;throw Error("non exhaustive match")}}),l=x(r,t=>{if(t=t.LONGER_ALT)return ZT(t)?x(t,t=>eq(r,t)):[eq(r,t)]}),c=x(r,t=>t.PUSH_MODE),h=x(r,t=>FU(t,"POP_MODE"))});let u;e("Line Terminator Handling",()=>{let e=drt(i.lineTerminatorCharacters);u=x(r,t=>!1),"onlyOffset"!==i.positionTracking&&(u=x(r,t=>FU(t,"LINE_BREAKS")?!!t.LINE_BREAKS:!1===hrt(t,e)&&Bet(e,t.PATTERN)))});let d,p,g,f,m=(e("Misc Mapping #2",()=>{d=x(r,lrt),p=x(a,crt),g=qj(r,(t,e)=>(e=e.GROUP,GU(e)&&e!==jrt.SKIPPED&&(t[e]=[]),t),{}),f=x(a,(t,e)=>({pattern:a[e],longerAlt:l[e],canLineTerminator:u[e],isCustom:d[e],short:p[e],group:o[e],push:c[e],pop:h[e],tokenTypeIdx:s[e],tokenType:r[e]}))}),!0),y=[];return i.safeMode||e("First Char Optimization",()=>{y=qj(r,(r,t,n)=>{if("string"==typeof t.PATTERN){var e=grt(t.PATTERN.charCodeAt(0));prt(r,e,f[n])}else if(ZT(t.START_CHARS_HINT)){let e;v(t.START_CHARS_HINT,t=>{t=grt("string"==typeof t?t.charCodeAt(0):t),e!==t&&(e=t,prt(r,t,f[n]))})}else uq(t.PATTERN)?t.PATTERN.unicode?(m=!1,i.ensureOptimizations&&Rtt(`${$et} Unable to analyze < ${t.PATTERN.toString()} > pattern. + Please open an issue at: https://github.com/chevrotain/chevrotain/issues`+t))}return[]}function Are(t,i,a){switch(t.type){case"Disjunction":for(let e=0;e{if("number"==typeof t)Lre(t,i,a);else{var r=t;if(!0===a)for(let e=r.from;e<=r.to;e++)Lre(e,i,a);else{for(let e=r.from;e<=r.to&&e=xne){var t=r.from>=xne?r.from:xne,e=r.to,t=hne(t),n=hne(e);for(let e=t;e<=n;e++)i[e]=e}}}});break;case"Group":Are(s.value,i,a);break;default:throw Error("Non Exhaustive Match")}if(n=void 0!==s.quantifier&&0===s.quantifier.atLeast,"Group"===s.type&&!1===Rre(s)||"Group"!==s.type&&0==n)break}break;default:throw Error("non exhaustive match!")}return Wq(i)}function Lre(e,t,r){var n=hne(e);t[n]=n,!0===r&&Nre(e,t)}function Nre(e,t){var r=(e=String.fromCharCode(e)).toUpperCase();r!==e?t[r=hne(r.charCodeAt(0))]=r:(r=e.toLowerCase())!==e&&(t[e=hne(r.charCodeAt(0))]=e)}function Ire(e,r){return rq(e.value,e=>{if("number"==typeof e)return Xq(r,e);{let t=e;return void 0!==rq(r,e=>t.from<=e&&e<=t.to)}})}function Rre(e){var t=e.quantifier;return!(!t||0!==t.atLeast)||!!e.value&&(K7(e.value)?GU(e.value,Rre):Rre(e.value))}function Mre(t,e){var r,n;return e instanceof RegExp?(r=kre(e),(n=new Pre(t)).visit(r),n.found):void 0!==rq(e,e=>Xq(t,e.charCodeAt(0)))}var Dre,Ore,Pre,Bre=e(()=>{See(),LY(),Bte(),Sre(),wne(),Dre="Complement Sets are not supported for first char optimization",Ore=`Unable to use "first char" lexer optimizations: +`,mt(_re,"getOptimizedStartCodesIndices"),mt(Are,"firstCharOptimizedIndices"),mt(Lre,"addOptimizedIdxToResult"),mt(Nre,"handleIgnoreCase"),mt(Ire,"findCode"),mt(Rre,"isWholeOptional"),Pre=class extends wee{static{mt(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)}super.visitChildren(e)}}visitCharacter(e){Xq(this.targetCharCodes,e.value)&&(this.found=!0)}visitSet(e){e.complement?void 0===Ire(e,this.targetCharCodes)&&(this.found=!0):void 0!==Ire(e,this.targetCharCodes)&&(this.found=!0)}},mt(Mre,"canMatchCharCode")});function $re(e,i){var t=(i=sU(i,{useSticky:fne,debug:!1,safeMode:!1,positionTracking:"full",lineTerminatorCharacters:["\r",` +`],tracer:mt((e,t)=>t(),"tracer")})).tracer;t("initCharCodeToOptimizedIndexMap",()=>{une()});let r,n=(t("Reject Lexer.NA",()=>{r=jW(e,e=>e[dne]===zne.NA)}),!1),a;t("Transform Patterns",()=>{n=!1,a=x(r,e=>{var t,e=e[dne];if(cj(e))return 1!==(t=e.source).length||"^"===t||"$"===t||"."===t||e.ignoreCase?2!==t.length||"\\"!==t[0]||Xq(["d","D","s","S","t","r","n","t","0","c","b","B","f","v","w","W"],t[1])?(i.useSticky?ene:Jre)(e):t[1]:t;if(C6(e))return n=!0,{exec:e};if("object"==typeof e)return n=!0,e;if("string"==typeof e)return 1===e.length?e:(t=e.replace(/[\\^$.*+?()[\]{}|]/g,"\\$&"),e=new RegExp(t),(i.useSticky?ene:Jre)(e));throw Error("non exhaustive match")})});let s,o,l,c,h;t("misc mapping",()=>{s=x(r,e=>e.tokenTypeIdx),o=x(r,e=>{if((e=e.GROUP)!==zne.SKIPPED){if(Fq(e))return e;if(pj(e))return!1;throw Error("non exhaustive match")}}),l=x(r,e=>{if(e=e.LONGER_ALT)return K7(e)?x(e,e=>Jq(r,e)):[Jq(r,e)]}),c=x(r,e=>e.PUSH_MODE),h=x(r,e=>Pq(e,"POP_MODE"))});let u;t("Line Terminator Handling",()=>{let t=lne(i.lineTerminatorCharacters);u=x(r,e=>!1),"onlyOffset"!==i.positionTracking&&(u=x(r,e=>Pq(e,"LINE_BREAKS")?!!e.LINE_BREAKS:!1===sne(e,t)&&Mre(t,e.PATTERN)))});let d,p,g,f,m=(t("Misc Mapping #2",()=>{d=x(r,ine),p=x(a,ane),g=GW(r,(e,t)=>(t=t.GROUP,Fq(t)&&t!==zne.SKIPPED&&(e[t]=[]),e),{}),f=x(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 i.safeMode||t("First Char Optimization",()=>{y=GW(r,(r,e,n)=>{if("string"==typeof e.PATTERN){var t=hne(e.PATTERN.charCodeAt(0));cne(r,t,f[n])}else if(K7(e.START_CHARS_HINT)){let t;v(e.START_CHARS_HINT,e=>{e=hne("string"==typeof e?e.charCodeAt(0):e),t!==e&&(t=e,cne(r,e,f[n]))})}else cj(e.PATTERN)?e.PATTERN.unicode?(m=!1,i.ensureOptimizations&&Nte(`${Ore} 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`)):(e=Iet(t.PATTERN,i.ensureOptimizations),sq(e)&&(m=!1),v(e,t=>{prt(r,t,f[n])})):(i.ensureOptimizations&&Rtt(`${$et} TokenType: <${t.name}> is using a custom token pattern without providing parameter. + For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNICODE_OPTIMIZE`)):(t=_re(e.PATTERN,i.ensureOptimizations),ij(t)&&(m=!1),v(t,e=>{cne(r,e,f[n])})):(i.ensureOptimizations&&Nte(`${Ore} 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:n,canBeOptimized:m}}function qet(t,e){let r=[],n=Wet(t);r=r.concat(n.errors);var i=(t=Yet(n.valid)).valid;return r=(r=(r=(r=(r=r.concat(t.errors)).concat(jet(i))).concat(Qet(i))).concat(Jet(i,e))).concat(trt(i))}function jet(t){let e=[],r=XG(t,t=>uq(t[mrt]));return e=(e=(e=(e=(e=e.concat(Het(r))).concat(Xet(r))).concat(Ket(r))).concat(Zet(r))).concat(Vet(r))}function Wet(t){var e=XG(t,t=>!FU(t,mrt));return{errors:x(e,t=>({message:"Token Type: ->"+t.name+"<- missing static 'PATTERN' property",type:Urt.MISSING_PATTERN,tokenTypes:[t]})),valid:vG(t,e)}}function Yet(t){var e=XG(t,t=>(t=t[mrt],!(uq(t)||_w(t)||FU(t,"exec")||GU(t))));return{errors:x(e,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' can only be a RegExp, a Function matching the {CustomPatternMatcherFunc} type or an Object matching the {ICustomPattern} interface.",type:Urt.INVALID_PATTERN,tokenTypes:[t]})),valid:vG(t,e)}}function Het(t){class n extends TJ{static{me(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(t){this.found=!0}}return t=XG(t,t=>{t=t.PATTERN;try{var e=Cet(t),r=new n;return r.visit(e),r.found}catch{return brt.test(t.source)}}),x(t,t=>({message:`Unexpected RegExp Anchor Error: - Token Type: ->`+t.name+`<- static 'PATTERN' cannot contain end of input anchor '$' - See chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Urt.EOI_ANCHOR_FOUND,tokenTypes:[t]}))}function Vet(t){return t=XG(t,t=>t.PATTERN.test("")),x(t,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' must not match an empty string",type:Urt.EMPTY_MATCH_PATTERN,tokenTypes:[t]}))}function Xet(t){class n extends TJ{static{me(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(t){this.found=!0}}return t=XG(t,t=>{t=t.PATTERN;try{var e=Cet(t),r=new n;return r.visit(e),r.found}catch{return wrt.test(t.source)}}),x(t,t=>({message:`Unexpected RegExp Anchor Error: - Token Type: ->`+t.name+`<- static 'PATTERN' cannot contain start of input anchor '^' - See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#ANCHORS for details.`,type:Urt.SOI_ANCHOR_FOUND,tokenTypes:[t]}))}function Ket(t){return t=XG(t,t=>(t=t[mrt])instanceof RegExp&&(t.multiline||t.global)),x(t,t=>({message:"Token Type: ->"+t.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:Urt.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[t]}))}function Zet(t){let n=[],e=x(t,r=>qj(t,(t,e)=>(r.PATTERN.source!==e.PATTERN.source||ZU(n,e)||e.PATTERN===jrt.NA||(n.push(e),t.push(e)),t),[]));e=l$(e);var r=XG(e,t=>1{var e=x(t,t=>t.name);return{message:`The same RegExp pattern ->${lU(t).PATTERN}<-has been used in all of the following Token Types: ${e.join(", ")} <-`,type:Urt.DUPLICATE_PATTERNS_FOUND,tokenTypes:t}})}function Qet(t){return t=XG(t,t=>!!FU(t,"GROUP")&&(t=t.GROUP)!==jrt.SKIPPED&&t!==jrt.NA&&!GU(t)),x(t,t=>({message:"Token Type: ->"+t.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:Urt.INVALID_GROUP_TYPE_FOUND,tokenTypes:[t]}))}function Jet(t,e){return t=XG(t,t=>void 0!==t.PUSH_MODE&&!ZU(e,t.PUSH_MODE)),x(t,t=>({message:`Token Type: ->${t.name}<- static 'PUSH_MODE' value cannot refer to a Lexer Mode ->${t.PUSH_MODE}<-which does not exist`,type:Urt.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[t]}))}function trt(t){let a=[],e=qj(t,(t,e,r)=>{var n=e.PATTERN;return n!==jrt.NA&&(GU(n)?t.push({str:n,idx:r,tokenType:e}):uq(n)&&rrt(n)&&t.push({str:n.source,idx:r,tokenType:e})),t},[]);return v(t,(n,i)=>{v(e,({str:t,idx:e,tokenType:r})=>{i${r.name}<- can never be matched. + 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:n,canBeOptimized:m}}function Fre(e,t){let r=[],n=Gre(e);r=r.concat(n.errors);var i=(e=Ure(n.valid)).valid;return r=(r=(r=(r=(r=r.concat(e.errors)).concat(zre(i))).concat(Vre(i))).concat(Xre(i,t))).concat(Kre(i))}function zre(e){let t=[],r=HU(e,e=>cj(e[dne]));return t=(t=(t=(t=(t=t.concat(qre(r))).concat(Wre(r))).concat(Yre(r))).concat(Hre(r))).concat(jre(r))}function Gre(e){var t=HU(e,e=>!Pq(e,dne));return{errors:x(t,e=>({message:"Token Type: ->"+e.name+"<- missing static 'PATTERN' property",type:$ne.MISSING_PATTERN,tokenTypes:[e]})),valid:mU(e,t)}}function Ure(e){var t=HU(e,e=>(e=e[dne],!(cj(e)||C6(e)||Pq(e,"exec")||Fq(e))));return{errors:x(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:$ne.INVALID_PATTERN,tokenTypes:[e]})),valid:mU(e,t)}}function qre(e){class n extends wee{static{mt(this,"EndAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitEndAnchor(e){this.found=!0}}return e=HU(e,e=>{e=e.PATTERN;try{var t=kre(e),r=new n;return r.visit(t),r.found}catch{return mne.test(e.source)}}),x(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:$ne.EOI_ANCHOR_FOUND,tokenTypes:[e]}))}function jre(e){return e=HU(e,e=>e.PATTERN.test("")),x(e,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' must not match an empty string",type:$ne.EMPTY_MATCH_PATTERN,tokenTypes:[e]}))}function Wre(e){class n extends wee{static{mt(this,"StartAnchorFinder")}constructor(){super(...arguments),this.found=!1}visitStartAnchor(e){this.found=!0}}return e=HU(e,e=>{e=e.PATTERN;try{var t=kre(e),r=new n;return r.visit(t),r.found}catch{return yne.test(e.source)}}),x(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:$ne.SOI_ANCHOR_FOUND,tokenTypes:[e]}))}function Yre(e){return e=HU(e,e=>(e=e[dne])instanceof RegExp&&(e.multiline||e.global)),x(e,e=>({message:"Token Type: ->"+e.name+"<- static 'PATTERN' may NOT contain global('g') or multiline('m')",type:$ne.UNSUPPORTED_FLAGS_FOUND,tokenTypes:[e]}))}function Hre(e){let n=[],t=x(e,r=>GW(e,(e,t)=>(r.PATTERN.source!==t.PATTERN.source||Xq(n,t)||t.PATTERN===zne.NA||(n.push(t),e.push(t)),e),[]));t=sz(t);var r=HU(t,e=>1{var t=x(e,e=>e.name);return{message:`The same RegExp pattern ->${sq(e).PATTERN}<-has been used in all of the following Token Types: ${t.join(", ")} <-`,type:$ne.DUPLICATE_PATTERNS_FOUND,tokenTypes:e}})}function Vre(e){return e=HU(e,e=>!!Pq(e,"GROUP")&&(e=e.GROUP)!==zne.SKIPPED&&e!==zne.NA&&!Fq(e)),x(e,e=>({message:"Token Type: ->"+e.name+"<- static 'GROUP' can only be Lexer.SKIPPED/Lexer.NA/A String",type:$ne.INVALID_GROUP_TYPE_FOUND,tokenTypes:[e]}))}function Xre(e,t){return e=HU(e,e=>void 0!==e.PUSH_MODE&&!Xq(t,e.PUSH_MODE)),x(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:$ne.PUSH_MODE_DOES_NOT_EXIST,tokenTypes:[e]}))}function Kre(e){let a=[],t=GW(e,(e,t,r)=>{var n=t.PATTERN;return n!==zne.NA&&(Fq(n)?e.push({str:n,idx:r,tokenType:t}):cj(n)&&Qre(n)&&e.push({str:n.source,idx:r,tokenType:t})),e},[]);return v(e,(n,i)=>{v(t,({str:e,idx:t,tokenType:r})=>{i${r.name}<- can never be matched. Because it appears AFTER the Token Type ->${n.name}<-in the lexer's definition. -See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`,a.push({message:e,type:Urt.UNREACHABLE_PATTERN,tokenTypes:[n,r]}))})}),a}function ert(t,e){var r;if(uq(e))return null!==(r=e.exec(t))&&0===r.index;if(_w(e))return e(t,0,[],{});if(FU(e,"exec"))return e.exec(t,0,[],{});if("string"==typeof e)return e===t;throw Error("non exhaustive match")}function rrt(e){return void 0===iU([".","\\","[","]","|","^","$","(",")","?","*","+","{"],t=>-1!==e.source.indexOf(t))}function nrt(t){var e=t.ignoreCase?"i":"";return new RegExp(`^(?:${t.source})`,e)}function irt(t){var e=t.ignoreCase?"iy":"y";return new RegExp(""+t.source,e)}function art(t,e,r){let i=[];return FU(t,yrt)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+yrt+`> property in its definition -`,type:Urt.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),FU(t,vrt)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+vrt+`> property in its definition -`,type:Urt.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),FU(t,vrt)&&FU(t,yrt)&&!FU(t.modes,t.defaultMode)&&i.push({message:`A MultiMode Lexer cannot be initialized with a ${yrt}: <${t.defaultMode}>which does not exist -`,type:Urt.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),FU(t,vrt)&&v(t.modes,(r,n)=>{v(r,(e,t)=>{fq(e)?i.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${n}> at index: <${t}> -`,type:Urt.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):FU(e,"LONGER_ALT")&&(t=ZT(e.LONGER_ALT)?e.LONGER_ALT:[e.LONGER_ALT],v(t,t=>{fq(t)||ZU(r,t)||i.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${t.name}> on token <${e.name}> outside of mode <${n}> -`,type:Urt.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})}))})}),i}function srt(t,e,r){let n=[],i=!1,a=l$(VP(HU(t.modes))),s=Yj(a,t=>t[mrt]===jrt.NA),o=drt(r);return e&&v(s,t=>{var e=hrt(t,o);!1!==e?(e={message:urt(t,e),type:e.issue,tokenType:t},n.push(e)):FU(t,"LINE_BREAKS")?!0===t.LINE_BREAKS&&(i=!0):Bet(o,t.PATTERN)&&(i=!0)}),e&&!i&&n.push({message:`Warning: No LINE_BREAKS Found. +See https://chevrotain.io/docs/guide/resolving_lexer_errors.html#UNREACHABLE`,a.push({message:t,type:$ne.UNREACHABLE_PATTERN,tokenTypes:[n,r]}))})}),a}function Zre(e,t){var r;if(cj(t))return null!==(r=t.exec(e))&&0===r.index;if(C6(t))return t(e,0,[],{});if(Pq(t,"exec"))return t.exec(e,0,[],{});if("string"==typeof t)return t===e;throw Error("non exhaustive match")}function Qre(t){return void 0===rq([".","\\","[","]","|","^","$","(",")","?","*","+","{"],e=>-1!==t.source.indexOf(e))}function Jre(e){var t=e.ignoreCase?"i":"";return new RegExp(`^(?:${e.source})`,t)}function ene(e){var t=e.ignoreCase?"iy":"y";return new RegExp(""+e.source,t)}function tne(e,t,r){let i=[];return Pq(e,pne)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+pne+`> property in its definition +`,type:$ne.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE}),Pq(e,gne)||i.push({message:"A MultiMode Lexer cannot be initialized without a <"+gne+`> property in its definition +`,type:$ne.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY}),Pq(e,gne)&&Pq(e,pne)&&!Pq(e.modes,e.defaultMode)&&i.push({message:`A MultiMode Lexer cannot be initialized with a ${pne}: <${e.defaultMode}>which does not exist +`,type:$ne.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST}),Pq(e,gne)&&v(e.modes,(r,n)=>{v(r,(t,e)=>{pj(t)?i.push({message:`A Lexer cannot be initialized using an undefined Token Type. Mode:<${n}> at index: <${e}> +`,type:$ne.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED}):Pq(t,"LONGER_ALT")&&(e=K7(t.LONGER_ALT)?t.LONGER_ALT:[t.LONGER_ALT],v(e,e=>{pj(e)||Xq(r,e)||i.push({message:`A MultiMode Lexer cannot be initialized with a longer_alt <${e.name}> on token <${t.name}> outside of mode <${n}> +`,type:$ne.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE})}))})}),i}function rne(e,t,r){let n=[],i=!1,a=sz(YB(Wq(e.modes))),s=jW(a,e=>e[dne]===zne.NA),o=lne(r);return t&&v(s,e=>{var t=sne(e,o);!1!==t?(t={message:one(e,t),type:t.issue,tokenType:e},n.push(t)):Pq(e,"LINE_BREAKS")?!0===e.LINE_BREAKS&&(i=!0):Mre(o,e.PATTERN)&&(i=!0)}),t&&!i&&n.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:Urt.NO_LINE_BREAKS_FLAGS}),n}function ort(r){let n={},t=nP(r);return v(t,t=>{var e=r[t];if(!ZT(e))throw Error("non exhaustive match");n[t]=[]}),n}function lrt(t){if(t=t.PATTERN,uq(t))return!1;if(_w(t))return!0;if(FU(t,"exec"))return!0;if(GU(t))return!1;throw Error("non exhaustive match")}function crt(t){return!(!GU(t)||1!==t.length)&&t.charCodeAt(0)}function hrt(t,e){if(FU(t,"LINE_BREAKS"))return!1;if(uq(t.PATTERN)){try{Bet(e,t.PATTERN)}catch(t){return{issue:Urt.IDENTIFY_TERMINATOR,errMsg:t.message}}return!1}if(GU(t.PATTERN))return!1;if(lrt(t))return{issue:Urt.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function urt(t,e){if(e.issue===Urt.IDENTIFY_TERMINATOR)return`Warning: unable to identify line terminator usage in pattern. - The problem is in the <${t.name}> Token Type - Root cause: ${e.errMsg}. - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#IDENTIFY_TERMINATOR`;if(e.issue===Urt.CUSTOM_LINE_BREAK)return`Warning: A Custom Token Pattern should specify the option. - The problem is in the <${t.name}> Token Type - For details See: https://chevrotain.io/docs/guide/resolving_lexer_errors.html#CUSTOM_LINE_BREAK`;throw Error("non exhaustive match")}function drt(t){return x(t,t=>GU(t)?t.charCodeAt(0):t)}function prt(t,e,r){void 0===t[e]?t[e]=[r]:t[e].push(r)}function grt(t){return t{AJ(),Hrt(),IW(),$tt(),Get(),Net(),mrt="PATTERN",yrt="defaultMode",vrt="modes",xrt="boolean"==typeof new RegExp("(?:)").sticky,me(Uet,"analyzeTokenTypes"),me(qet,"validatePatterns"),me(jet,"validateRegExpPattern"),me(Wet,"findMissingPatterns"),me(Yet,"findInvalidPatterns"),brt=/[^\\][$]/,me(Het,"findEndOfInputAnchor"),me(Vet,"findEmptyMatchRegExps"),wrt=/[^\\[][\^]|^\^/,me(Xet,"findStartOfInputAnchor"),me(Ket,"findUnsupportedFlags"),me(Zet,"findDuplicatePatterns"),me(Qet,"findInvalidGroupType"),me(Jet,"findModesThatDoNotExist"),me(trt,"findUnreachablePatterns"),me(ert,"testTokenType"),me(rrt,"noMetaChar"),me(nrt,"addStartOfInput"),me(irt,"addStickyFlag"),me(art,"performRuntimeChecks"),me(srt,"performWarningRuntimeChecks"),me(ort,"cloneEmptyGroups"),me(lrt,"isCustomPattern"),me(crt,"isShortPattern"),krt={test:me(function(e){var r=e.length;for(let t=this.lastIndex;t{t.isParent=0t.CATEGORIES)));var i=vG(r,e);e=e.concat(i),sq(i)?n=!1:r=i}return e}function Nrt(t){v(t,t=>{Drt(t)||((zrt[$rt]=t).tokenTypeIdx=$rt++),Ort(t)&&!ZT(t.CATEGORIES)&&(t.CATEGORIES=[t.CATEGORIES]),Ort(t)||(t.CATEGORIES=[]),Prt(t)||(t.categoryMatches=[]),Brt(t)||(t.categoryMatchesMap={})})}function Irt(t){v(t,r=>{r.categoryMatches=[],v(r.categoryMatchesMap,(t,e)=>{r.categoryMatches.push(zrt[e].tokenTypeIdx)})})}function Rrt(t){v(t,t=>{Mrt([],t)})}function Mrt(r,n){v(r,t=>{n.categoryMatchesMap[t.tokenTypeIdx]=!0}),v(n.CATEGORIES,t=>{var e=r.concat(n);ZU(e,t)||Mrt(e,t)})}function Drt(t){return FU(t,"tokenTypeIdx")}function Ort(t){return FU(t,"CATEGORIES")}function Prt(t){return FU(t,"categoryMatches")}function Brt(t){return FU(t,"categoryMatchesMap")}function Frt(t){return FU(t,"tokenTypeIdx")}var $rt,zrt,Grt,Urt,qrt,jrt,Wrt=t(()=>{IW(),me(_rt,"tokenStructuredMatcher"),me(Srt,"tokenStructuredMatcherNoCategories"),$rt=1,zrt={},me(Art,"augmentTokenTypes"),me(Lrt,"expandCategories"),me(Nrt,"assignTokenDefaultProps"),me(Irt,"assignCategoriesTokensProp"),me(Rrt,"assignCategoriesMapProp"),me(Mrt,"singleAssignCategoriesToksMap"),me(Drt,"hasShortKeyProperty"),me(Ort,"hasCategoriesProperty"),me(Prt,"hasExtendingTokensTypesProperty"),me(Brt,"hasExtendingTokensTypesMapProperty"),me(Frt,"isTokenType")}),Yrt=t(()=>{Grt={buildUnableToPopLexerModeMessage(t){return`Unable to pop Lexer Mode after encountering Token ->${t.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(t,e,r,n,i){return`unexpected character: ->${t.charAt(e)}<- at offset: ${e}, skipped ${r} characters.`}}}),Hrt=t(()=>{var t;Crt(),IW(),$tt(),Wrt(),Yrt(),Net(),(t=Urt=Urt||{})[t.MISSING_PATTERN=0]="MISSING_PATTERN",t[t.INVALID_PATTERN=1]="INVALID_PATTERN",t[t.EOI_ANCHOR_FOUND=2]="EOI_ANCHOR_FOUND",t[t.UNSUPPORTED_FLAGS_FOUND=3]="UNSUPPORTED_FLAGS_FOUND",t[t.DUPLICATE_PATTERNS_FOUND=4]="DUPLICATE_PATTERNS_FOUND",t[t.INVALID_GROUP_TYPE_FOUND=5]="INVALID_GROUP_TYPE_FOUND",t[t.PUSH_MODE_DOES_NOT_EXIST=6]="PUSH_MODE_DOES_NOT_EXIST",t[t.MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE=7]="MULTI_MODE_LEXER_WITHOUT_DEFAULT_MODE",t[t.MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY=8]="MULTI_MODE_LEXER_WITHOUT_MODES_PROPERTY",t[t.MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST=9]="MULTI_MODE_LEXER_DEFAULT_MODE_VALUE_DOES_NOT_EXIST",t[t.LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED=10]="LEXER_DEFINITION_CANNOT_CONTAIN_UNDEFINED",t[t.SOI_ANCHOR_FOUND=11]="SOI_ANCHOR_FOUND",t[t.EMPTY_MATCH_PATTERN=12]="EMPTY_MATCH_PATTERN",t[t.NO_LINE_BREAKS_FLAGS=13]="NO_LINE_BREAKS_FLAGS",t[t.UNREACHABLE_PATTERN=14]="UNREACHABLE_PATTERN",t[t.IDENTIFY_TERMINATOR=15]="IDENTIFY_TERMINATOR",t[t.CUSTOM_LINE_BREAK=16]="CUSTOM_LINE_BREAK",t[t.MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE=17]="MULTI_MODE_LEXER_LONGER_ALT_NOT_IN_CURRENT_MODE",qrt={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` -`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Grt,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0},Object.freeze(qrt),(jrt=class{static{me(this,"Lexer")}constructor(i,a=qrt){if(this.lexerDefinition=i,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=(t,e)=>{var r,n,i,a;return!0===this.traceInitPerf?(this.traceInitIndent++,r=new Array(this.traceInitIndent+1).join("\t"),{time:n,value:i}=(this.traceInitIndent <${t}>`),Ott(e)),a=10 time: ${n}ms`),this.traceInitIndent--,i):e()},"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=sP({},qrt,a);var t=this.config.traceInitPerf;!0===t?(this.traceInitMaxIdent=1/0,this.traceInitPerf=!0):"number"==typeof t&&(this.traceInitMaxIdent=t,this.traceInitPerf=!0),this.traceInitIndent=-1,this.TRACE_INIT("Lexer Constructor",()=>{let r,t=!0,n=(this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===qrt.lineTerminatorsPattern)this.config.lineTerminatorsPattern=krt;else if(this.config.lineTerminatorCharacters===qrt.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=ZT(i)?{modes:{defaultMode:r$(i)},defaultMode:yrt}:(t=!1,r$(i))}),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(art(r,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(srt(r,this.trackStartLines,this.config.lineTerminatorCharacters))})),r.modes=r.modes||{},v(r.modes,(t,e)=>{r.modes[e]=Yj(t,t=>fq(t))}),nP(r.modes)),e;if(v(r.modes,(e,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(qet(e,n))}),sq(this.lexerDefinitionErrors)){Art(e);let t;this.TRACE_INIT("analyzeTokenTypes",()=>{t=Uet(e,{lineTerminatorCharacters:this.config.lineTerminatorCharacters,positionTracking:a.positionTracking,ensureOptimizations:a.ensureOptimizations,safeMode:a.safeMode,tracer:this.TRACE_INIT})}),this.patternIdxToConfig[r]=t.patternIdxToConfig,this.charCodeToPatternIdxToConfig[r]=t.charCodeToPatternIdxToConfig,this.emptyGroups=sP({},this.emptyGroups,t.emptyGroups),this.hasCustom=t.hasCustom||this.hasCustom,this.canModeBeOptimized[r]=t.canBeOptimized}})}),this.defaultMode=r.defaultMode,!sq(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling)throw e=x(this.lexerDefinitionErrors,t=>t.message).join(`----------------------- + for details.`,type:$ne.NO_LINE_BREAKS_FLAGS}),n}function nne(r){let n={},e=tB(r);return v(e,e=>{var t=r[e];if(!K7(t))throw Error("non exhaustive match");n[e]=[]}),n}function ine(e){if(e=e.PATTERN,cj(e))return!1;if(C6(e))return!0;if(Pq(e,"exec"))return!0;if(Fq(e))return!1;throw Error("non exhaustive match")}function ane(e){return!(!Fq(e)||1!==e.length)&&e.charCodeAt(0)}function sne(e,t){if(Pq(e,"LINE_BREAKS"))return!1;if(cj(e.PATTERN)){try{Mre(t,e.PATTERN)}catch(e){return{issue:$ne.IDENTIFY_TERMINATOR,errMsg:e.message}}return!1}if(Fq(e.PATTERN))return!1;if(ine(e))return{issue:$ne.CUSTOM_LINE_BREAK};throw Error("non exhaustive match")}function one(e,t){if(t.issue===$ne.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===$ne.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 lne(e){return x(e,e=>Fq(e)?e.charCodeAt(0):e)}function cne(e,t,r){void 0===e[t]?e[t]=[r]:e[t].push(r)}function hne(e){return e{See(),qne(),LY(),Bte(),Bre(),Sre(),dne="PATTERN",pne="defaultMode",gne="modes",fne="boolean"==typeof new RegExp("(?:)").sticky,mt($re,"analyzeTokenTypes"),mt(Fre,"validatePatterns"),mt(zre,"validateRegExpPattern"),mt(Gre,"findMissingPatterns"),mt(Ure,"findInvalidPatterns"),mne=/[^\\][$]/,mt(qre,"findEndOfInputAnchor"),mt(jre,"findEmptyMatchRegExps"),yne=/[^\\[][\^]|^\^/,mt(Wre,"findStartOfInputAnchor"),mt(Yre,"findUnsupportedFlags"),mt(Hre,"findDuplicatePatterns"),mt(Vre,"findInvalidGroupType"),mt(Xre,"findModesThatDoNotExist"),mt(Kre,"findUnreachablePatterns"),mt(Zre,"testTokenType"),mt(Qre,"noMetaChar"),mt(Jre,"addStartOfInput"),mt(ene,"addStickyFlag"),mt(tne,"performRuntimeChecks"),mt(rne,"performWarningRuntimeChecks"),mt(nne,"cloneEmptyGroups"),mt(ine,"isCustomPattern"),mt(ane,"isShortPattern"),vne={test:mt(function(t){var r=t.length;for(let e=this.lastIndex;e{e.isParent=0e.CATEGORIES)));var i=mU(r,t);t=t.concat(i),ij(i)?n=!1:r=i}return t}function Sne(e){v(e,e=>{Nne(e)||((Pne[One]=e).tokenTypeIdx=One++),Ine(e)&&!K7(e.CATEGORIES)&&(e.CATEGORIES=[e.CATEGORIES]),Ine(e)||(e.CATEGORIES=[]),Rne(e)||(e.categoryMatches=[]),Mne(e)||(e.categoryMatchesMap={})})}function _ne(e){v(e,r=>{r.categoryMatches=[],v(r.categoryMatchesMap,(e,t)=>{r.categoryMatches.push(Pne[t].tokenTypeIdx)})})}function Ane(e){v(e,e=>{Lne([],e)})}function Lne(r,n){v(r,e=>{n.categoryMatchesMap[e.tokenTypeIdx]=!0}),v(n.CATEGORIES,e=>{var t=r.concat(n);Xq(t,e)||Lne(t,e)})}function Nne(e){return Pq(e,"tokenTypeIdx")}function Ine(e){return Pq(e,"CATEGORIES")}function Rne(e){return Pq(e,"categoryMatches")}function Mne(e){return Pq(e,"categoryMatchesMap")}function Dne(e){return Pq(e,"tokenTypeIdx")}var One,Pne,Bne,$ne,Fne,zne,Gne=e(()=>{LY(),mt(kne,"tokenStructuredMatcher"),mt(Tne,"tokenStructuredMatcherNoCategories"),One=1,Pne={},mt(Ene,"augmentTokenTypes"),mt(Cne,"expandCategories"),mt(Sne,"assignTokenDefaultProps"),mt(_ne,"assignCategoriesTokensProp"),mt(Ane,"assignCategoriesMapProp"),mt(Lne,"singleAssignCategoriesToksMap"),mt(Nne,"hasShortKeyProperty"),mt(Ine,"hasCategoriesProperty"),mt(Rne,"hasExtendingTokensTypesProperty"),mt(Mne,"hasExtendingTokensTypesMapProperty"),mt(Dne,"isTokenType")}),Une=e(()=>{Bne={buildUnableToPopLexerModeMessage(e){return`Unable to pop Lexer Mode after encountering Token ->${e.image}<- The Mode Stack is empty`},buildUnexpectedCharactersMessage(e,t,r,n,i){return`unexpected character: ->${e.charAt(t)}<- at offset: ${t}, skipped ${r} characters.`}}}),qne=e(()=>{var e;wne(),LY(),Bte(),Gne(),Une(),Sre(),(e=$ne=$ne||{})[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",Fne={deferDefinitionErrorsHandling:!1,positionTracking:"full",lineTerminatorsPattern:/\n|\r\n?/g,lineTerminatorCharacters:[` +`,"\r"],ensureOptimizations:!1,safeMode:!1,errorMessageProvider:Bne,traceInitPerf:!1,skipValidations:!1,recoveryEnabled:!0},Object.freeze(Fne),(zne=class{static{mt(this,"Lexer")}constructor(i,a=Fne){if(this.lexerDefinition=i,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,n,i,a;return!0===this.traceInitPerf?(this.traceInitIndent++,r=new Array(this.traceInitIndent+1).join("\t"),{time:n,value:i}=(this.traceInitIndent <${e}>`),Mte(t)),a=10 time: ${n}ms`),this.traceInitIndent--,i):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=iB({},Fne,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,n=(this.TRACE_INIT("Lexer Config handling",()=>{if(this.config.lineTerminatorsPattern===Fne.lineTerminatorsPattern)this.config.lineTerminatorsPattern=vne;else if(this.config.lineTerminatorCharacters===Fne.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=K7(i)?{modes:{defaultMode:ez(i)},defaultMode:pne}:(e=!1,ez(i))}),!1===this.config.skipValidations&&(this.TRACE_INIT("performRuntimeChecks",()=>{this.lexerDefinitionErrors=this.lexerDefinitionErrors.concat(tne(r,this.trackStartLines,this.config.lineTerminatorCharacters))}),this.TRACE_INIT("performWarningRuntimeChecks",()=>{this.lexerDefinitionWarning=this.lexerDefinitionWarning.concat(rne(r,this.trackStartLines,this.config.lineTerminatorCharacters))})),r.modes=r.modes||{},v(r.modes,(e,t)=>{r.modes[t]=jW(e,e=>pj(e))}),tB(r.modes)),t;if(v(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(Fre(t,n))}),ij(this.lexerDefinitionErrors)){Ene(t);let e;this.TRACE_INIT("analyzeTokenTypes",()=>{e=$re(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=iB({},this.emptyGroups,e.emptyGroups),this.hasCustom=e.hasCustom||this.hasCustom,this.canModeBeOptimized[r]=e.canBeOptimized}})}),this.defaultMode=r.defaultMode,!ij(this.lexerDefinitionErrors)&&!this.config.deferDefinitionErrorsHandling)throw t=x(this.lexerDefinitionErrors,e=>e.message).join(`----------------------- `),new Error(`Errors detected in definition of Lexer: -`+e);v(this.lexerDefinitionWarning,t=>{Mtt(t.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(xrt?(this.chopInput=N8,this.match=this.matchWithTest):(this.updateLastIndex=AO,this.match=this.matchWithExec),t&&(this.handleModes=AO),!1===this.trackStartLines&&(this.computeNewColumn=N8),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=AO),/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 t=qj(this.canModeBeOptimized,(t,e,r)=>(!1===e&&t.push(r),t),[]);if(a.ensureOptimizations&&!sq(t))throw Error(`Lexer Modes: < ${t.join(", ")} > cannot be optimized. +`+t);v(this.lexerDefinitionWarning,e=>{Ite(e.message)}),this.TRACE_INIT("Choosing sub-methods implementations",()=>{if(fne?(this.chopInput=LE,this.match=this.matchWithTest):(this.updateLastIndex=SP,this.match=this.matchWithExec),e&&(this.handleModes=SP),!1===this.trackStartLines&&(this.computeNewColumn=LE),!1===this.trackEndLines&&(this.updateTokenEndLineColumnLocation=SP),/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=GW(this.canModeBeOptimized,(e,t,r)=>(!1===t&&e.push(r),e),[]);if(a.ensureOptimizations&&!ij(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",()=>{_et()}),this.TRACE_INIT("toFastProperties",()=>{Btt(this)})})}tokenize(t,e=this.defaultMode){if(sq(this.lexerDefinitionErrors))return this.tokenizeInternal(t,e);throw t=x(this.lexerDefinitionErrors,t=>t.message).join(`----------------------- + Or inspect the console log for details on how to resolve these issues.`)}),this.TRACE_INIT("clearRegExpParserCache",()=>{Tre()}),this.TRACE_INIT("toFastProperties",()=>{Ote(this)})})}tokenize(e,t=this.defaultMode){if(ij(this.lexerDefinitionErrors))return this.tokenizeInternal(e,t);throw e=x(this.lexerDefinitionErrors,e=>e.message).join(`----------------------- `),new Error(`Unable to Tokenize because Errors detected in definition of Lexer: -`+t)}tokenizeInternal(i,P){let t,a,e,r,n,s,o,l,c,h,B,u,d,F,p,g=i,$=g.length,f=0,m=0,z=this.hasCustom?0:Math.floor(i.length/10),y=new Array(z),v=[],x=this.trackStartLines?1:void 0,b=this.trackStartLines?1:void 0,w=ort(this.emptyGroups),G=this.trackStartLines,k=this.config.lineTerminatorsPattern,T=0,E=[],C=[],_=[],U=[];Object.freeze(U);let S;function A(){return E}function L(t){return t=grt(t),void 0===(t=C[t])?U:t}me(A,"getPossiblePatternsSlow"),me(L,"getPossiblePatternsOptimized");var q=me(t=>{var e;1===_.length&&void 0===t.tokenType.PUSH_MODE?(e=this.config.errorMessageProvider.buildUnableToPopLexerModeMessage(t),v.push({offset:t.startOffset,line:t.startLine,column:t.startColumn,length:t.image.length,message:e})):(_.pop(),t=kG(_),E=this.patternIdxToConfig[t],C=this.charCodeToPatternIdxToConfig[t],T=E.length,e=this.canModeBeOptimized[t]&&!1===this.config.safeMode,S=C&&e?L:A)},"pop_mode");function N(t){_.push(t),C=this.charCodeToPatternIdxToConfig[t],E=this.patternIdxToConfig[t],T=E.length,T=E.length,t=this.canModeBeOptimized[t]&&!1===this.config.safeMode,S=C&&t?L:A}me(N,"push_mode"),N.call(this,P);let I,j=this.config.recoveryEnabled;for(;f<$;){s=null;var W=g.charCodeAt(f),Y=S(W),H=Y.length;for(t=0;ts.length){s=r,o=l,I=M;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,x,b,c),this.handlePayload(u,o),!1===h?m=this.addToken(y,m,u):w[h].push(u)),i=this.chopInput(i,c),f+=c,b=this.computeNewColumn(b,c),!0===G&&!0===I.canLineTerminator){let t=0,e,r;for(k.lastIndex=0;!0===(e=k.test(s))&&(r=k.lastIndex-1,t++),!0===e;);0!==t&&(x+=t,b=c-r,this.updateTokenEndLineColumnLocation(u,h,r,t,x,b,c))}this.handleModes(I,q,N,u)}else{let t=f,e=x,r=b,n=!1===j;for(;!1===n&&f<$;)for(i=this.chopInput(i,1),f++,a=0;a{IW(),Hrt(),Wrt(),me(Vrt,"tokenLabel"),me(Xrt,"hasTokenLabel"),tnt="parent",ent="categories",rnt="label",nnt="group",ant="push_mode",snt="pop_mode",ont="longer_alt",lnt="line_breaks",cnt="start_chars_hint",me(Krt,"createToken"),me(Zrt,"createTokenInternal"),Art([hnt=Krt({name:"EOF",pattern:jrt.NA})]),me(Qrt,"createTokenInstance"),me(Jrt,"tokenMatcher")}),fnt=t(()=>{gnt(),IW(),het(),unt={buildMismatchTokenMessage({expected:t,actual:e}){return`Expecting ${Xrt(t)?`--> ${Vrt(t)} <--`:`token of type --> ${t.name} <--`} but found --> '${e.image}' <--`},buildNotAllInputParsedMessage({firstRedundant:t}){return"Redundant input, expecting EOF but found: "+t.image},buildNoViableAltMessage({expectedPathsPerAlt:t,actual:e,customUserDescription:r}){var n="Expecting: ",e=` -but found: '`+lU(e).image+"'";return r?n+r+e:(r=qj(t,(t,e)=>t.concat(e),[]),t=x(r,t=>`[${x(t,t=>Vrt(t)).join(", ")}]`),n+`one of these possible Token sequences: -`+x(t,(t,e)=>` ${e+1}. `+t).join(` -`)+e)},buildEarlyExitMessage({expectedIterationPaths:t,actual:e,customUserDescription:r}){var n="Expecting: ",e=` -but found: '`+lU(e).image+"'";return r?n+r+e:n+`expecting at least one iteration which starts with one of these possible Token sequences:: - <${x(t,t=>`[${x(t,t=>Vrt(t)).join(",")}]`).join(" ,")}>`+e}},Object.freeze(unt),dnt={buildRuleNotFoundError(t,e){return"Invalid grammar, reference to a rule which is not defined: ->"+e.nonTerminalName+`<- -inside top level rule: ->`+t.name+"<-"}},pnt={buildDuplicateFoundError(t,e){function r(t){return t instanceof tet?t.terminalType.name:t instanceof Wtt?t.nonTerminalName:""}me(r,"getExtraProductionArgument");let n=t.name,i=lU(e),a=i.idx,s=oet(i),o=r(i),l=0${s}${l?a:""}<- ${o?`with argument: ->${o}<-`:""} - appears more than once (${e.length} times) in the top level rule: ->${n}<-. +`+e)}tokenizeInternal(i,P){let e,a,t,r,n,s,o,l,c,h,B,u,d,$,p,g=i,F=g.length,f=0,m=0,z=this.hasCustom?0:Math.floor(i.length/10),y=new Array(z),v=[],x=this.trackStartLines?1:void 0,b=this.trackStartLines?1:void 0,w=nne(this.emptyGroups),G=this.trackStartLines,k=this.config.lineTerminatorsPattern,T=0,E=[],C=[],S=[],U=[];Object.freeze(U);let _;function A(){return E}function L(e){return e=hne(e),void 0===(e=C[e])?U:e}mt(A,"getPossiblePatternsSlow"),mt(L,"getPossiblePatternsOptimized");var q=mt(e=>{var t;1===S.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})):(S.pop(),e=bU(S),E=this.patternIdxToConfig[e],C=this.charCodeToPatternIdxToConfig[e],T=E.length,t=this.canModeBeOptimized[e]&&!1===this.config.safeMode,_=C&&t?L:A)},"pop_mode");function N(e){S.push(e),C=this.charCodeToPatternIdxToConfig[e],E=this.patternIdxToConfig[e],T=E.length,T=E.length,e=this.canModeBeOptimized[e]&&!1===this.config.safeMode,_=C&&e?L:A}mt(N,"push_mode"),N.call(this,P);let I,j=this.config.recoveryEnabled;for(;fs.length){s=r,o=l,I=M;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,x,b,c),this.handlePayload(u,o),!1===h?m=this.addToken(y,m,u):w[h].push(u)),i=this.chopInput(i,c),f+=c,b=this.computeNewColumn(b,c),!0===G&&!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&&(x+=e,b=c-r,this.updateTokenEndLineColumnLocation(u,h,r,e,x,b,c))}this.handleModes(I,q,N,u)}else{let e=f,t=x,r=b,n=!1===j;for(;!1===n&&f{LY(),qne(),Gne(),mt(jne,"tokenLabel"),mt(Wne,"hasTokenLabel"),Kne="parent",Zne="categories",Qne="label",Jne="group",eie="push_mode",tie="pop_mode",rie="longer_alt",nie="line_breaks",iie="start_chars_hint",mt(Yne,"createToken"),mt(Hne,"createTokenInternal"),Ene([aie=Yne({name:"EOF",pattern:zne.NA})]),mt(Vne,"createTokenInstance"),mt(Xne,"tokenMatcher")}),hie=e(()=>{cie(),LY(),ore(),sie={buildMismatchTokenMessage({expected:e,actual:t}){return`Expecting ${Wne(e)?`--> ${jne(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 n="Expecting: ",t=` +but found: '`+sq(t).image+"'";return r?n+r+t:(r=GW(e,(e,t)=>e.concat(t),[]),e=x(r,e=>`[${x(e,e=>jne(e)).join(", ")}]`),n+`one of these possible Token sequences: +`+x(e,(e,t)=>` ${t+1}. `+e).join(` +`)+t)},buildEarlyExitMessage({expectedIterationPaths:e,actual:t,customUserDescription:r}){var n="Expecting: ",t=` +but found: '`+sq(t).image+"'";return r?n+r+t:n+`expecting at least one iteration which starts with one of these possible Token sequences:: + <${x(e,e=>`[${x(e,e=>jne(e)).join(",")}]`).join(" ,")}>`+t}},Object.freeze(sie),oie={buildRuleNotFoundError(e,t){return"Invalid grammar, reference to a rule which is not defined: ->"+t.nonTerminalName+`<- +inside top level rule: ->`+e.name+"<-"}},lie={buildDuplicateFoundError(e,t){function r(e){return e instanceof Qte?e.terminalType.name:e instanceof qte?e.nonTerminalName:""}mt(r,"getExtraProductionArgument");let n=e.name,i=sq(t),a=i.idx,s=are(i),o=r(i),l=0${s}${l?a:""}<- ${o?`with argument: ->${o}<-`:""} + appears more than once (${t.length} times) in the top level rule: ->${n}<-. For further details see: https://chevrotain.io/docs/FAQ.html#NUMERICAL_SUFFIXES `;return c=(c=c.replace(/[ \t]+/g," ")).replace(/\s\s+/g,` -`)},buildNamespaceConflictError(t){return`Namespace conflict found in grammar. -The grammar has both a Terminal(Token) and a Non-Terminal(Rule) named: <${t.name}>. +`)},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(t){var e=x(t.prefixPath,t=>Vrt(t)).join(", "),r=0===t.alternation.idx?"":t.alternation.idx;return`Ambiguous alternatives: <${t.ambiguityIndices.join(" ,")}> due to common lookahead prefix -in inside <${t.topLevelRule.name}> Rule, -<${e}> may appears as a prefix path in all these alternatives. +and Non-Terminal names start with a lower case letter.`},buildAlternationPrefixAmbiguityError(e){var t=x(e.prefixPath,e=>jne(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(t){var e=x(t.prefixPath,t=>Vrt(t)).join(", "),r=0===t.alternation.idx?"":t.alternation.idx;return`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(" ,")}> in inside <${t.topLevelRule.name}> Rule, -<${e}> may appears as a prefix path in all these alternatives. +For Further details.`},buildAlternationAmbiguityError(e){var t=x(e.prefixPath,e=>jne(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(t){let e=oet(t.repetition);return 0!==t.repetition.idx&&(e+=t.repetition.idx),`The repetition <${e}> within Rule <${t.topLevelRule.name}> can never consume any tokens. -This could lead to an infinite loop.`},buildTokenNameError(t){return"deprecated"},buildEmptyAlternationError(t){return`Ambiguous empty alternative: <${t.emptyChoiceIdx+1}> in inside <${t.topLevelRule.name}> Rule. -Only the last alternative may be an empty alternative.`},buildTooManyAlternativesError(t){return`An Alternation cannot have more than 256 alternatives: - inside <${t.topLevelRule.name}> Rule. - has ${t.alternation.definition.length+1} alternatives.`},buildLeftRecursionError(t){var e=t.topLevelRule.name;return`Left Recursion found in grammar. -rule: <${e}> can be invoked from itself (directly or indirectly) +For Further details.`},buildEmptyRepetitionError(e){let t=are(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: - ${e+" --\x3e "+x(t.leftRecursionPath,t=>t.name).concat([e]).join(" --\x3e ")} + ${t+" --\x3e "+x(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(t){return"deprecated"},buildDuplicateRuleNameError(t){return`Duplicate definition, rule: ->${t.topLevelRule instanceof Ytt?t.topLevelRule.name:t.topLevelRule}<- is already defined in the grammar: ->${t.grammarName}<-`}}});function mnt(t,e){return(t=new ynt(t,e)).resolveRefs(),t.errors}var ynt,vnt=t(()=>{Oat(),IW(),het(),me(mnt,"resolveGrammar"),ynt=class extends eet{static{me(this,"GastRefResolverVisitor")}constructor(t,e){super(),this.nameToTopRule=t,this.errMsgProvider=e,this.errors=[]}resolveRefs(){v(HU(this.nameToTopRule),t=>{(this.currTopLevel=t).accept(this)})}visitNonTerminal(t){var e=this.nameToTopRule[t.nonTerminalName];e?t.referencedRule=e:(e=this.errMsgProvider.buildRuleNotFoundError(this.currTopLevel,t),this.errors.push({message:e,type:Rat.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:t.nonTerminalName}))}}});function xnt(e,r,n=[]){n=r$(n);let i=[],a=0;function s(t){return t.concat(CG(e,a+1))}function o(t){return t=xnt(s(t),r,n),i.concat(t)}for(me(s,"remainingPathWith"),me(o,"getAlternativesForProd");n.length{!1===sq(t.definition)&&(i=o(t.definition))}),i;if(!(t instanceof tet))throw Error("non exhaustive match");n.push(t.terminalType)}}a++}return i.push({partialPath:n,suffixDef:CG(e,a)}),i}function bnt(t,e,r,n){let i="EXIT_NONE_TERMINAL",a=[i],s="EXIT_ALTERNATIVE",o=!1,l=e.length,c=l-n-1,h=[],u=[];for(u.push({idx:-1,def:t,ruleStack:[],occurrenceStack:[]});!sq(u);)if((v=u.pop())===s)o&&kG(u).idx<=c&&u.pop();else{var d=v.def,p=v.idx,g=v.ruleStack,f=v.occurrenceStack;if(!sq(d)){var m=d[0];if(m===i)v={idx:p,def:CG(d),ruleStack:AG(g),occurrenceStack:AG(f)},u.push(v);else if(m instanceof tet)if(p{IW(),xet(),pet(),het(),Tnt=class extends det{static{me(this,"AbstractNextPossibleTokensWalker")}constructor(t,e){super(),this.topProd=t,this.path=e,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=r$(this.path.ruleStack).reverse(),this.occurrenceStack=r$(this.path.occurrenceStack).reverse(),this.ruleStack.pop(),this.occurrenceStack.pop(),this.updateExpectedNext(),this.walk(this.topProd),this.possibleTokTypes}walk(t,e=[]){this.found||super.walk(t,e)}walkProdRef(t,e,r){t.referencedRule.name===this.nextProductionName&&t.idx===this.nextProductionOccurrence&&(e=e.concat(r),this.updateExpectedNext(),this.walk(t.referencedRule,e))}updateExpectedNext(){sq(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},knt=class extends Tnt{static{me(this,"NextAfterTokenWalker")}constructor(t,e){super(t,e),this.path=e,this.nextTerminalName="",this.nextTerminalOccurrence=0,this.nextTerminalName=this.path.lastTok.name,this.nextTerminalOccurrence=this.path.lastTokOccurrence}walkTerminal(t,e,r){this.isAtEndOfPath&&t.terminalType.name===this.nextTerminalName&&t.idx===this.nextTerminalOccurrence&&!this.found&&(t=e.concat(r),e=new Htt({definition:t}),this.possibleTokTypes=get(e),this.found=!0)}},Tnt=class extends det{static{me(this,"AbstractNextTerminalAfterProductionWalker")}constructor(t,e){super(),this.topRule=t,this.occurrence=e,this.result={token:void 0,occurrence:void 0,isEndOfRule:void 0}}startWalking(){return this.walk(this.topRule),this.result}},Ent=class extends Tnt{static{me(this,"NextTerminalAfterManyWalker")}walkMany(t,e,r){var n;t.idx===this.occurrence?(n=lU(e.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof tet&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkMany(t,e,r)}},Cnt=class extends Tnt{static{me(this,"NextTerminalAfterManySepWalker")}walkManySep(t,e,r){var n;t.idx===this.occurrence?(n=lU(e.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof tet&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkManySep(t,e,r)}},_nt=class extends Tnt{static{me(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(t,e,r){var n;t.idx===this.occurrence?(n=lU(e.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof tet&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkAtLeastOne(t,e,r)}},Snt=class extends Tnt{static{me(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(t,e,r){var n;t.idx===this.occurrence?(n=lU(e.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof tet&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkAtLeastOneSep(t,e,r)}},me(xnt,"possiblePathsFrom"),me(bnt,"nextPossibleTokensAfter"),me(wnt,"expandTopLevelRule")});function Lnt(t){if(t instanceof Vtt||"Option"===t)return jnt.OPTION;if(t instanceof Ztt||"Repetition"===t)return jnt.REPETITION;if(t instanceof Xtt||"RepetitionMandatory"===t)return jnt.REPETITION_MANDATORY;if(t instanceof Ktt||"RepetitionMandatoryWithSeparator"===t)return jnt.REPETITION_MANDATORY_WITH_SEPARATOR;if(t instanceof Qtt||"RepetitionWithSeparator"===t)return jnt.REPETITION_WITH_SEPARATOR;if(t instanceof Jtt||"Alternation"===t)return jnt.ALTERNATION;throw Error("non exhaustive match")}function Nnt(t){var{occurrence:t,rule:e,prodType:r,maxLookahead:n}=t;return(r=Lnt(r))===jnt.ALTERNATION?$nt(t,e,n):znt(t,e,r,n)}function Int(t,e,r,n,i,a){return a(t=$nt(t,e,r),n,qnt(t)?Srt:_rt,i)}function Rnt(t,e,r,n,i,a){return e=qnt(t=znt(t,e,i,r))?Srt:_rt,a(t[0],e,n)}function Mnt(c,t,h,e){let u=c.length,r=qG(c,t=>qG(t,t=>1===t.length));if(t)return function(t){var r=x(t,t=>t.GATE);for(let e=0;eVP(t)),e=qj(t,(e,t,r)=>(v(t,t=>{FU(e,t.tokenTypeIdx)||(e[t.tokenTypeIdx]=r),v(t.categoryMatches,t=>{FU(e,t)||(e[t]=r)})}),e),{});return function(){var t=this.LA(1);return e[t.tokenTypeIdx]}}}function Dnt(i,a,r){let t=qG(i,t=>1===t.length),s=i.length;if(!t||r)return function(){t:for(let t=0;t(e[t.tokenTypeIdx]=!0,v(t.categoryMatches,t=>{e[t]=!0}),e),[]);return function(){var t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}function Ont(e){var r=new Array(e);for(let t=0;txnt([t],1)),i=Ont(e.length),a=x(e,t=>{let e={};return v(t,t=>{t=Pnt(t.partialPath),v(t,t=>{e[t]=!0})}),e}),s=e;for(let r=1;r<=n;r++){var o=s;s=Ont(o.length);for(let e=0;e{t=Pnt(t.partialPath),v(t,t=>{a[e][t]=!0})})}}}return i}function $nt(t,e,r,n){return t=new Ynt(t,jnt.ALTERNATION,n),e.accept(t),Fnt(t.result,r)}function znt(t,e,r,n){var i=new Ynt(t,r),i=(e.accept(i),i.result),e=new Wnt(e,t,r).startWalking();return Fnt([new Htt({definition:i}),new Htt({definition:e})],n)}function Gnt(e,r){t:for(let t=0;tt===(e=r[e])||e.categoryMatchesMap[t.tokenTypeIdx])}function qnt(t){return qG(t,t=>qG(t,t=>qG(t,t=>sq(t.categoryMatches))))}var jnt,Wnt,Ynt,Hnt=t(()=>{var t;IW(),Ant(),pet(),Wrt(),het(),(t=jnt=jnt||{})[t.OPTION=0]="OPTION",t[t.REPETITION=1]="REPETITION",t[t.REPETITION_MANDATORY=2]="REPETITION_MANDATORY",t[t.REPETITION_MANDATORY_WITH_SEPARATOR=3]="REPETITION_MANDATORY_WITH_SEPARATOR",t[t.REPETITION_WITH_SEPARATOR=4]="REPETITION_WITH_SEPARATOR",t[t.ALTERNATION=5]="ALTERNATION",me(Lnt,"getProdType"),me(Nnt,"getLookaheadPaths"),me(Int,"buildLookaheadFuncForOr"),me(Rnt,"buildLookaheadFuncForOptionalProd"),me(Mnt,"buildAlternativesLookAheadFunc"),me(Dnt,"buildSingleAlternativeLookaheadFunction"),Wnt=class extends det{static{me(this,"RestDefinitionFinderWalker")}constructor(t,e,r){super(),this.topProd=t,this.targetOccurrence=e,this.targetProdType=r}startWalking(){return this.walk(this.topProd),this.restDef}checkIsTarget(t,e,r,n){return t.idx===this.targetOccurrence&&this.targetProdType===e&&(this.restDef=r.concat(n),!0)}walkOption(t,e,r){this.checkIsTarget(t,jnt.OPTION,e,r)||super.walkOption(t,e,r)}walkAtLeastOne(t,e,r){this.checkIsTarget(t,jnt.REPETITION_MANDATORY,e,r)||super.walkOption(t,e,r)}walkAtLeastOneSep(t,e,r){this.checkIsTarget(t,jnt.REPETITION_MANDATORY_WITH_SEPARATOR,e,r)||super.walkOption(t,e,r)}walkMany(t,e,r){this.checkIsTarget(t,jnt.REPETITION,e,r)||super.walkOption(t,e,r)}walkManySep(t,e,r){this.checkIsTarget(t,jnt.REPETITION_WITH_SEPARATOR,e,r)||super.walkOption(t,e,r)}},Ynt=class extends eet{static{me(this,"InsideDefinitionFinderVisitor")}constructor(t,e,r){super(),this.targetOccurrence=t,this.targetProdType=e,this.targetRef=r,this.result=[]}checkIsTarget(t,e){t.idx!==this.targetOccurrence||this.targetProdType!==e||void 0!==this.targetRef&&t!==this.targetRef||(this.result=t.definition)}visitOption(t){this.checkIsTarget(t,jnt.OPTION)}visitRepetition(t){this.checkIsTarget(t,jnt.REPETITION)}visitRepetitionMandatory(t){this.checkIsTarget(t,jnt.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(t){this.checkIsTarget(t,jnt.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(t){this.checkIsTarget(t,jnt.REPETITION_WITH_SEPARATOR)}visitAlternation(t){this.checkIsTarget(t,jnt.ALTERNATION)}},me(Ont,"initializeArrayOfArrays"),me(Pnt,"pathToHashKeys"),me(Bnt,"isUniquePrefixHash"),me(Fnt,"lookAheadSequenceFromAlternatives"),me($nt,"getLookaheadPathsForOr"),me(znt,"getLookaheadPathsForOptionalProd"),me(Gnt,"containsPath"),me(Unt,"isStrictPrefixOfPath"),me(qnt,"areTokenCategoriesNotUsed")});function Vnt(t){return t=t.lookaheadStrategy.validate({rules:t.rules,tokenTypes:t.tokenTypes,grammarName:t.grammarName}),x(t,t=>Object.assign({type:Rat.CUSTOM_LOOKAHEAD_VALIDATION},t))}function Xnt(e,t,r,n){var i=yU(e,t=>Knt(t,r)),t=cit(e,t,r),a=yU(e,t=>ait(t,r)),s=yU(e,t=>Jnt(t,e,n,r));return i.concat(t,a,s)}function Knt(n,i){var t=new hit,t=(n.accept(t),t.allProductions),t=_U(t,Znt),t=Wq(t,t=>1{var e=lU(t),t=i.buildDuplicateFoundError(n,t),r=oet(e),t={message:t,type:Rat.DUPLICATE_PRODUCTIONS,ruleName:n.name,dslName:r,occurrence:e.idx};return(r=Qnt(e))&&(t.parameter=r),t})}function Znt(t){return`${oet(t)}_#_${t.idx}_#_`+Qnt(t)}function Qnt(t){return t instanceof tet?t.terminalType.name:t instanceof Wtt?t.nonTerminalName:""}function Jnt(r,t,e,n){var i=[];return 1e.name===r.name?t+1:t,0)&&(t=n.buildDuplicateRuleNameError({topLevelRule:r,grammarName:e}),i.push({message:t,type:Rat.DUPLICATE_RULE_NAME,ruleName:r.name})),i}function tit(t,e,r){var n=[];return ZU(e,t)||n.push({message:`Invalid rule override, rule: ->${t}<- cannot be overridden in the grammar: ->${r}<-as it is not defined in any of the super grammars `,type:Rat.INVALID_RULE_OVERRIDE,ruleName:t}),n}function eit(r,t,n,i=[]){var e,a=[],t=rit(t.definition);return sq(t)?[]:(e=r.name,ZU(t,r)&&a.push({message:n.buildLeftRecursionError({topLevelRule:r,leftRecursionPath:i}),type:Rat.LEFT_RECURSION,ruleName:e}),e=vG(t,i.concat([r])),t=yU(e,t=>{var e=r$(i);return e.push(t),eit(r,t,n,e)}),a.concat(t))}function rit(t){let e=[];if(sq(t))return e;if((r=lU(t))instanceof Wtt)e.push(r.referencedRule);else if(r instanceof Htt||r instanceof Vtt||r instanceof Xtt||r instanceof Ktt||r instanceof Qtt||r instanceof Ztt)e=e.concat(rit(r.definition));else if(r instanceof Jtt)e=VP(x(r.definition,t=>rit(t.definition)));else if(!(r instanceof tet))throw Error("non exhaustive match");var r=aet(r),n=1{var t=AG(r.definition);return yU(t,(t,e)=>(t=bnt([t],[],_rt,1),sq(t)?[{message:i.buildEmptyAlternationError({topLevelRule:n,alternation:r,emptyChoiceIdx:e}),type:Rat.NONE_LAST_EMPTY_ALT,ruleName:n.name,occurrence:r.idx,alternative:e+1}]:[]))})}function iit(n,i,a){var t=new uit,t=(n.accept(t),t.alternations),t=Yj(t,t=>!0===t.ignoreAmbiguities);return yU(t,t=>{var e=oit(r=$nt(t.idx,n,t.maxLookahead||i,t),t,n,a),r=lit(r,t,n,a);return e.concat(r)})}function ait(e,r){var t=new uit,t=(e.accept(t),t.alternations);return yU(t,t=>255{var t=new dit,t=(n.accept(t),t.allProductions);v(t,t=>{var e=Lnt(t),r=t.maxLookahead||i,e=znt(t.idx,n,e,r)[0];sq(VP(e))&&(r=a.buildEmptyRepetitionError({topLevelRule:n,repetition:t}),s.push({message:r,type:Rat.NO_NON_EMPTY_LOOKAHEAD,ruleName:n.name}))})}),s}function oit(a,s,r,n){let o=[],t=qj(a,(t,e,i)=>(!0!==s.definition[i].ignoreAmbiguities&&v(e,r=>{let n=[i];v(a,(t,e)=>{i!==e&&Gnt(t,r)&&!0!==s.definition[e].ignoreAmbiguities&&n.push(e)}),1{var e=x(t.alts,t=>t+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:s,ambiguityIndices:e,prefixPath:t.path}),type:Rat.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:s.idx,alternatives:t.alts}})}function lit(t,i,a,s){let o=qj(t,(t,e,r)=>(e=x(e,t=>({idx:r,path:t})),t.concat(e)),[]);return l$(yU(o,t=>{if(!0===i.definition[t.idx].ignoreAmbiguities)return[];let n=t.idx,e=t.path,r=XG(o,t=>!0!==i.definition[t.idx].ignoreAmbiguities&&t.idx{var e=[t.idx+1,n+1],r=0===i.idx?"":i.idx;return{message:s.buildAlternationPrefixAmbiguityError({topLevelRule:a,alternation:i,ambiguityIndices:e,prefixPath:t.path}),type:Rat.AMBIGUOUS_PREFIX_ALTS,ruleName:a.name,occurrence:r,alternatives:e}})}))}function cit(t,e,r){let n=[],i=x(e,t=>t.name);return v(t,t=>{var e=t.name;ZU(i,e)&&(t=r.buildNamespaceConflictError(t),n.push({message:t,type:Rat.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:e}))}),n}var hit,uit,dit,pit=t(()=>{IW(),Oat(),het(),Hnt(),Ant(),Wrt(),me(Vnt,"validateLookahead"),me(Xnt,"validateGrammar"),me(Knt,"validateDuplicateProductions"),me(Znt,"identifyProductionForDuplicates"),me(Qnt,"getExtraProductionArgument"),hit=class extends eet{static{me(this,"OccurrenceValidationCollector")}constructor(){super(...arguments),this.allProductions=[]}visitNonTerminal(t){this.allProductions.push(t)}visitOption(t){this.allProductions.push(t)}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}visitAlternation(t){this.allProductions.push(t)}visitTerminal(t){this.allProductions.push(t)}},me(Jnt,"validateRuleDoesNotAlreadyExist"),me(tit,"validateRuleIsOverridden"),me(eit,"validateNoLeftRecursion"),me(rit,"getFirstNoneTerminal"),uit=class extends eet{static{me(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(t){this.alternations.push(t)}},me(nit,"validateEmptyOrAlternative"),me(iit,"validateAmbiguousAlternationAlternatives"),dit=class extends eet{static{me(this,"RepetitionCollector")}constructor(){super(...arguments),this.allProductions=[]}visitRepetitionWithSeparator(t){this.allProductions.push(t)}visitRepetitionMandatory(t){this.allProductions.push(t)}visitRepetitionMandatoryWithSeparator(t){this.allProductions.push(t)}visitRepetition(t){this.allProductions.push(t)}},me(ait,"validateTooManyAlts"),me(sit,"validateSomeNonEmptyLookaheadPath"),me(oit,"checkAlternativesAmbiguities"),me(lit,"checkPrefixAlternativesAmbiguities"),me(cit,"checkTerminalAndNoneTerminalsNameSpace")});function git(t){let e=lG(t,{errMsgProvider:dnt}),r={};return v(t.rules,t=>{r[t.name]=t}),mnt(r,e.errMsgProvider)}function fit(t){return Xnt((t=lG(t,{errMsgProvider:pnt})).rules,t.tokenTypes,t.errMsgProvider,t.grammarName)}var mit=t(()=>{IW(),vnt(),pit(),fnt(),me(git,"resolveGrammar"),me(fit,"validateGrammar")});function yit(t){return ZU(vit,t.name)}var vit,xit,bit,wit,kit,Tit,Eit=t(()=>{IW(),vit=["MismatchedTokenException","NoViableAltException","EarlyExitException","NotAllInputParsedException"],Object.freeze(vit),me(yit,"isRecognitionException"),xit=class extends Error{static{me(this,"RecognitionException")}constructor(t,e){super(t),this.token=e,this.resyncedTokens=[],Object.setPrototypeOf(this,new.target.prototype),Error.captureStackTrace&&Error.captureStackTrace(this,this.constructor)}},bit=class extends xit{static{me(this,"MismatchedTokenException")}constructor(t,e,r){super(t,e),this.previousToken=r,this.name="MismatchedTokenException"}},wit=class extends xit{static{me(this,"NoViableAltException")}constructor(t,e,r){super(t,e),this.previousToken=r,this.name="NoViableAltException"}},kit=class extends xit{static{me(this,"NotAllInputParsedException")}constructor(t,e){super(t,e),this.name="NotAllInputParsedException"}},Tit=class extends xit{static{me(this,"EarlyExitException")}constructor(t,e,r){super(t,e),this.previousToken=r,this.name="EarlyExitException"}}});function Cit(t,e,r,n,i,a,s){let o=this.getKeyForAutomaticLookahead(n,i),l=this.firstAfterRepMap[o],c=(void 0===l&&(n=this.getCurrRuleFullName(),n=this.getGAstProductions()[n],l=new a(n,i).startWalking(),this.firstAfterRepMap[o]=l),l.token),h=l.occurrence,u=l.isEndOfRule;1===this.RULE_STACK.length&&u&&void 0===c&&(c=hnt,h=1),void 0!==c&&void 0!==h&&this.shouldInRepetitionRecoveryBeTried(c,h,s)&&this.tryInRepetitionRecovery(t,e,r,c)}var _it,Sit,Ait,Lit,Nit=t(()=>{gnt(),IW(),Eit(),bet(),Oat(),_it={},Sit="InRuleRecoveryException",Ait=class extends Error{static{me(this,"InRuleRecoveryException")}constructor(t){super(t),this.name=Sit}},Lit=class{static{me(this,"Recoverable")}initRecoverable(t){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(FU(t,"recoveryEnabled")?t:Nat).recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=Cit)}getTokenToInsert(t){return(t=Qrt(t,"",NaN,NaN,NaN,NaN,NaN,NaN)).isInsertedInRecovery=!0,t}canTokenTypeBeInsertedInRecovery(t){return!0}canTokenTypeBeDeletedInRecovery(t){return!0}tryInRepetitionRecovery(t,e,r,n){let i=this.findReSyncTokenType(),a=this.exportLexerState(),s=[],o=!1,l=this.LA(1),c=this.LA(1),h=me(()=>{var t=this.LA(0),t=this.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:l,previous:t,ruleName:this.getCurrRuleFullName()});(t=new bit(t,l,this.LA(0))).resyncedTokens=AG(s),this.SAVE_ERROR(t)},"generateErrorMessage");for(;!o;){if(this.tokenMatcher(c,n))return void h();if(r.call(this))return h(),void t.apply(this,e);this.tokenMatcher(c,i)?o=!0:(c=this.SKIP_TOKEN(),this.addToResyncTokens(c,s))}this.importLexerState(a)}shouldInRepetitionRecoveryBeTried(t,e,r){return!(!1===r||this.tokenMatcher(this.LA(1),t)||this.isBackTracking()||this.canPerformInRuleRecovery(t,this.getFollowsForInRuleRecovery(t,e)))}getFollowsForInRuleRecovery(t,e){return t=this.getCurrentGrammarPath(t,e),this.getNextPossibleTokenTypes(t)}tryInRuleRecovery(t,e){if(this.canRecoverWithSingleTokenInsertion(t,e))return this.getTokenToInsert(t);if(this.canRecoverWithSingleTokenDeletion(t))return e=this.SKIP_TOKEN(),this.consumeToken(),e;throw new Ait("sad sad panda")}canPerformInRuleRecovery(t,e){return this.canRecoverWithSingleTokenInsertion(t,e)||this.canRecoverWithSingleTokenDeletion(t)}canRecoverWithSingleTokenInsertion(t,e){if(!this.canTokenTypeBeInsertedInRecovery(t)||sq(e))return!1;let r=this.LA(1);return void 0!==iU(e,t=>this.tokenMatcher(r,t))}canRecoverWithSingleTokenDeletion(t){return!!this.canTokenTypeBeDeletedInRecovery(t)&&this.tokenMatcher(this.LA(2),t)}isInCurrentRuleReSyncSet(t){var e=this.getCurrFollowKey(),e=this.getFollowSetFromFollowKey(e);return ZU(e,t)}findReSyncTokenType(){let t=this.flattenFollowSet(),e=this.LA(1),r=2;for(;;){var n=iU(t,t=>Jrt(e,t));if(void 0!==n)return n;e=this.LA(r),r++}}getCurrFollowKey(){var t,e,r;return 1===this.RULE_STACK.length?_it:(t=this.getLastExplicitRuleShortName(),e=this.getLastExplicitRuleOccurrenceIndex(),r=this.getPreviousExplicitRuleShortName(),{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:e,inRule:this.shortRuleNameToFullName(r)})}buildFullFollowKeyStack(){let r=this.RULE_STACK,n=this.RULE_OCCURRENCE_STACK;return x(r,(t,e)=>0===e?_it:{ruleName:this.shortRuleNameToFullName(t),idxInCallingRule:n[e],inRule:this.shortRuleNameToFullName(r[e-1])})}flattenFollowSet(){var t=x(this.buildFullFollowKeyStack(),t=>this.getFollowSetFromFollowKey(t));return VP(t)}getFollowSetFromFollowKey(t){return t===_it?[hnt]:(t=t.ruleName+t.idxInCallingRule+vet+t.inRule,this.resyncFollows[t])}addToResyncTokens(t,e){return this.tokenMatcher(t,hnt)||e.push(t),e}reSyncTo(t){let e=[],r=this.LA(1);for(;!1===this.tokenMatcher(r,t);)r=this.SKIP_TOKEN(),this.addToResyncTokens(r,e);return AG(e)}attemptInRepetitionRecovery(t,e,r,n,i,a,s){}getCurrentGrammarPath(t,e){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:r$(this.RULE_OCCURRENCE_STACK),lastTok:t,lastTokOccurrence:e}}getHumanReadableRuleStack(){return x(this.RULE_STACK,t=>this.shortRuleNameToFullName(t))}},me(Cit,"attemptInRepetitionRecovery")});function Iit(t,e,r){return r|e|t}var Rit,Mit=t(()=>{me(Iit,"getKeyForAutomaticLookahead")}),Dit=t(()=>{IW(),fnt(),Oat(),pit(),Hnt(),Rit=class{static{me(this,"LLkLookaheadStrategy")}constructor(t){this.maxLookahead=null!=(t=t?.maxLookahead)?t:Nat.maxLookahead}validate(t){var e,r,n=this.validateNoLeftRecursion(t.rules);return sq(n)?(e=this.validateEmptyOrAlternatives(t.rules),r=this.validateAmbiguousAlternationAlternatives(t.rules,this.maxLookahead),t=this.validateSomeNonEmptyLookaheadPath(t.rules,this.maxLookahead),[...n,...e,...r,...t]):n}validateNoLeftRecursion(t){return yU(t,t=>eit(t,t,pnt))}validateEmptyOrAlternatives(t){return yU(t,t=>nit(t,pnt))}validateAmbiguousAlternationAlternatives(t,e){return yU(t,t=>iit(t,e,pnt))}validateSomeNonEmptyLookaheadPath(t,e){return sit(t,e,pnt)}buildLookaheadForAlternation(t){return Int(t.prodOccurrence,t.rule,t.maxLookahead,t.hasPredicates,t.dynamicTokensEnabled,Mnt)}buildLookaheadForOptional(t){return Rnt(t.prodOccurrence,t.rule,t.maxLookahead,t.dynamicTokensEnabled,Lnt(t.prodType),Dnt)}}});function Oit(t){return Fit.reset(),t.accept(Fit),t=Fit.dslMethods,Fit.reset(),t}var Pit,Bit,Fit,$it=t(()=>{IW(),Oat(),Mit(),het(),Dit(),Pit=class{static{me(this,"LooksAhead")}initLooksAhead(t){this.dynamicTokensEnabled=(FU(t,"dynamicTokensEnabled")?t:Nat).dynamicTokensEnabled,this.maxLookahead=(FU(t,"maxLookahead")?t:Nat).maxLookahead,this.lookaheadStrategy=FU(t,"lookaheadStrategy")?t.lookaheadStrategy:new Rit({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(t){v(t,s=>{this.TRACE_INIT(s.name+" Rule Lookahead",()=>{var{alternation:t,repetition:e,option:r,repetitionMandatory:n,repetitionMandatoryWithSeparator:i,repetitionWithSeparator:a}=Oit(s);v(t,r=>{var t=0===r.idx?"":r.idx;this.TRACE_INIT(""+oet(r)+t,()=>{var t=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:r.idx,rule:s,maxLookahead:r.maxLookahead||this.maxLookahead,hasPredicates:r.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),e=Iit(this.fullRuleNameToShort[s.name],256,r.idx);this.setLaFuncCache(e,t)})}),v(e,t=>{this.computeLookaheadFunc(s,t.idx,768,"Repetition",t.maxLookahead,oet(t))}),v(r,t=>{this.computeLookaheadFunc(s,t.idx,512,"Option",t.maxLookahead,oet(t))}),v(n,t=>{this.computeLookaheadFunc(s,t.idx,1024,"RepetitionMandatory",t.maxLookahead,oet(t))}),v(i,t=>{this.computeLookaheadFunc(s,t.idx,1536,"RepetitionMandatoryWithSeparator",t.maxLookahead,oet(t))}),v(a,t=>{this.computeLookaheadFunc(s,t.idx,1280,"RepetitionWithSeparator",t.maxLookahead,oet(t))})})})}computeLookaheadFunc(r,n,i,a,s,t){this.TRACE_INIT(""+t+(0===n?"":n),()=>{var t=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:n,rule:r,maxLookahead:s||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:a}),e=Iit(this.fullRuleNameToShort[r.name],i,n);this.setLaFuncCache(e,t)})}getKeyForAutomaticLookahead(t,e){return e|t|this.getLastExplicitRuleShortName()}getLaFuncFromCache(t){return this.lookAheadFuncsCache.get(t)}setLaFuncCache(t,e){this.lookAheadFuncsCache.set(t,e)}},Bit=class extends eet{static{me(this,"DslMethodsCollectorVisitor")}constructor(){super(...arguments),this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}reset(){this.dslMethods={option:[],alternation:[],repetition:[],repetitionWithSeparator:[],repetitionMandatory:[],repetitionMandatoryWithSeparator:[]}}visitOption(t){this.dslMethods.option.push(t)}visitRepetitionWithSeparator(t){this.dslMethods.repetitionWithSeparator.push(t)}visitRepetitionMandatory(t){this.dslMethods.repetitionMandatory.push(t)}visitRepetitionMandatoryWithSeparator(t){this.dslMethods.repetitionMandatoryWithSeparator.push(t)}visitRepetition(t){this.dslMethods.repetition.push(t)}visitAlternation(t){this.dslMethods.alternation.push(t)}},Fit=new Bit,me(Oit,"collectMethods")});function zit(t,e){!0===isNaN(t.startOffset)?(t.startOffset=e.startOffset,t.endOffset=e.endOffset):t.endOffset{me(zit,"setNodeLocationOnlyOffset"),me(Git,"setNodeLocationFull"),me(Uit,"addTerminalToCst"),me(qit,"addNoneTerminalToCst")});function Wit(t,e){Object.defineProperty(t,Yit,{enumerable:!1,configurable:!0,writable:!1,value:e})}var Yit,Hit=t(()=>{Yit="name",me(Wit,"defineNameProp")});function Vit(e,r){var n=nP(e),i=n.length;for(let t=0;tt.msg),Error(`Errors Detected in CST Visitor <${this.constructor.name}>: - `+t.join(` +see: https://en.wikipedia.org/wiki/LL_parser#Left_factoring.`},buildInvalidRuleNameError(e){return"deprecated"},buildDuplicateRuleNameError(e){return`Duplicate definition, rule: ->${e.topLevelRule instanceof jte?e.topLevelRule.name:e.topLevelRule}<- is already defined in the grammar: ->${e.grammarName}<-`}}});function uie(e,t){return(e=new die(e,t)).resolveRefs(),e.errors}var die,pie=e(()=>{Nse(),LY(),ore(),mt(uie,"resolveGrammar"),die=class extends Jte{static{mt(this,"GastRefResolverVisitor")}constructor(e,t){super(),this.nameToTopRule=e,this.errMsgProvider=t,this.errors=[]}resolveRefs(){v(Wq(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:_se.UNRESOLVED_SUBRULE_REF,ruleName:this.currTopLevel.name,unresolvedRefName:e.nonTerminalName}))}}});function gie(t,r,n=[]){n=ez(n);let i=[],a=0;function s(e){return e.concat(TU(t,a+1))}function o(e){return e=gie(s(e),r,n),i.concat(e)}for(mt(s,"remainingPathWith"),mt(o,"getAlternativesForProd");n.length{!1===ij(e.definition)&&(i=o(e.definition))}),i;if(!(e instanceof Qte))throw Error("non exhaustive match");n.push(e.terminalType)}}a++}return i.push({partialPath:n,suffixDef:TU(t,a)}),i}function fie(e,t,r,n){let i="EXIT_NONE_TERMINAL",a=[i],s="EXIT_ALTERNATIVE",o=!1,l=t.length,c=l-n-1,h=[],u=[];for(u.push({idx:-1,def:e,ruleStack:[],occurrenceStack:[]});!ij(u);)if((v=u.pop())===s)o&&bU(u).idx<=c&&u.pop();else{var d=v.def,p=v.idx,g=v.ruleStack,f=v.occurrenceStack;if(!ij(d)){var m=d[0];if(m===i)v={idx:p,def:TU(d),ruleStack:SU(g),occurrenceStack:SU(f)},u.push(v);else if(m instanceof Qte)if(p{LY(),mre(),hre(),ore(),vie=class extends cre{static{mt(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=ez(this.path.ruleStack).reverse(),this.occurrenceStack=ez(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(){ij(this.ruleStack)?(this.nextProductionName="",this.nextProductionOccurrence=0,this.isAtEndOfPath=!0):(this.nextProductionName=this.ruleStack.pop(),this.nextProductionOccurrence=this.occurrenceStack.pop())}},yie=class extends vie{static{mt(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 Wte({definition:e}),this.possibleTokTypes=ure(t),this.found=!0)}},vie=class extends cre{static{mt(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}},xie=class extends vie{static{mt(this,"NextTerminalAfterManyWalker")}walkMany(e,t,r){var n;e.idx===this.occurrence?(n=sq(t.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof Qte&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkMany(e,t,r)}},bie=class extends vie{static{mt(this,"NextTerminalAfterManySepWalker")}walkManySep(e,t,r){var n;e.idx===this.occurrence?(n=sq(t.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof Qte&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkManySep(e,t,r)}},wie=class extends vie{static{mt(this,"NextTerminalAfterAtLeastOneWalker")}walkAtLeastOne(e,t,r){var n;e.idx===this.occurrence?(n=sq(t.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof Qte&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkAtLeastOne(e,t,r)}},kie=class extends vie{static{mt(this,"NextTerminalAfterAtLeastOneSepWalker")}walkAtLeastOneSep(e,t,r){var n;e.idx===this.occurrence?(n=sq(t.concat(r)),this.result.isEndOfRule=void 0===n,n instanceof Qte&&(this.result.token=n.terminalType,this.result.occurrence=n.idx)):super.walkAtLeastOneSep(e,t,r)}},mt(gie,"possiblePathsFrom"),mt(fie,"nextPossibleTokensAfter"),mt(mie,"expandTopLevelRule")});function Eie(e){if(e instanceof Yte||"Option"===e)return Fie.OPTION;if(e instanceof Xte||"Repetition"===e)return Fie.REPETITION;if(e instanceof Hte||"RepetitionMandatory"===e)return Fie.REPETITION_MANDATORY;if(e instanceof Vte||"RepetitionMandatoryWithSeparator"===e)return Fie.REPETITION_MANDATORY_WITH_SEPARATOR;if(e instanceof Kte||"RepetitionWithSeparator"===e)return Fie.REPETITION_WITH_SEPARATOR;if(e instanceof Zte||"Alternation"===e)return Fie.ALTERNATION;throw Error("non exhaustive match")}function Cie(e){var{occurrence:e,rule:t,prodType:r,maxLookahead:n}=e;return(r=Eie(r))===Fie.ALTERNATION?Die(e,t,n):Oie(e,t,r,n)}function Sie(e,t,r,n,i,a){return a(e=Die(e,t,r),n,$ie(e)?Tne:kne,i)}function _ie(e,t,r,n,i,a){return t=$ie(e=Oie(e,t,i,r))?Tne:kne,a(e[0],t,n)}function Aie(c,e,h,t){let u=c.length,r=GU(c,e=>GU(e,e=>1===e.length));if(e)return function(e){var r=x(e,e=>e.GATE);for(let t=0;tYB(e)),t=GW(e,(t,e,r)=>(v(e,e=>{Pq(t,e.tokenTypeIdx)||(t[e.tokenTypeIdx]=r),v(e.categoryMatches,e=>{Pq(t,e)||(t[e]=r)})}),t),{});return function(){var e=this.LA(1);return t[e.tokenTypeIdx]}}}function Lie(i,a,r){let e=GU(i,e=>1===e.length),s=i.length;if(!e||r)return function(){e:for(let e=0;e(t[e.tokenTypeIdx]=!0,v(e.categoryMatches,e=>{t[e]=!0}),t),[]);return function(){var e=this.LA(1);return!0===t[e.tokenTypeIdx]}}}function Nie(t){var r=new Array(t);for(let e=0;egie([e],1)),i=Nie(t.length),a=x(t,e=>{let t={};return v(e,e=>{e=Iie(e.partialPath),v(e,e=>{t[e]=!0})}),t}),s=t;for(let r=1;r<=n;r++){var o=s;s=Nie(o.length);for(let t=0;t{e=Iie(e.partialPath),v(e,e=>{a[t][e]=!0})})}}}return i}function Die(e,t,r,n){return e=new Gie(e,Fie.ALTERNATION,n),t.accept(e),Mie(e.result,r)}function Oie(e,t,r,n){var i=new Gie(e,r),i=(t.accept(i),i.result),t=new zie(t,e,r).startWalking();return Mie([new Wte({definition:i}),new Wte({definition:t})],n)}function Pie(t,r){e:for(let e=0;ee===(t=r[t])||t.categoryMatchesMap[e.tokenTypeIdx])}function $ie(e){return GU(e,e=>GU(e,e=>GU(e,e=>ij(e.categoryMatches))))}var Fie,zie,Gie,Uie=e(()=>{var e;LY(),Tie(),hre(),Gne(),ore(),(e=Fie=Fie||{})[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(Eie,"getProdType"),mt(Cie,"getLookaheadPaths"),mt(Sie,"buildLookaheadFuncForOr"),mt(_ie,"buildLookaheadFuncForOptionalProd"),mt(Aie,"buildAlternativesLookAheadFunc"),mt(Lie,"buildSingleAlternativeLookaheadFunction"),zie=class extends cre{static{mt(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,n){return e.idx===this.targetOccurrence&&this.targetProdType===t&&(this.restDef=r.concat(n),!0)}walkOption(e,t,r){this.checkIsTarget(e,Fie.OPTION,t,r)||super.walkOption(e,t,r)}walkAtLeastOne(e,t,r){this.checkIsTarget(e,Fie.REPETITION_MANDATORY,t,r)||super.walkOption(e,t,r)}walkAtLeastOneSep(e,t,r){this.checkIsTarget(e,Fie.REPETITION_MANDATORY_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}walkMany(e,t,r){this.checkIsTarget(e,Fie.REPETITION,t,r)||super.walkOption(e,t,r)}walkManySep(e,t,r){this.checkIsTarget(e,Fie.REPETITION_WITH_SEPARATOR,t,r)||super.walkOption(e,t,r)}},Gie=class extends Jte{static{mt(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,Fie.OPTION)}visitRepetition(e){this.checkIsTarget(e,Fie.REPETITION)}visitRepetitionMandatory(e){this.checkIsTarget(e,Fie.REPETITION_MANDATORY)}visitRepetitionMandatoryWithSeparator(e){this.checkIsTarget(e,Fie.REPETITION_MANDATORY_WITH_SEPARATOR)}visitRepetitionWithSeparator(e){this.checkIsTarget(e,Fie.REPETITION_WITH_SEPARATOR)}visitAlternation(e){this.checkIsTarget(e,Fie.ALTERNATION)}},mt(Nie,"initializeArrayOfArrays"),mt(Iie,"pathToHashKeys"),mt(Rie,"isUniquePrefixHash"),mt(Mie,"lookAheadSequenceFromAlternatives"),mt(Die,"getLookaheadPathsForOr"),mt(Oie,"getLookaheadPathsForOptionalProd"),mt(Pie,"containsPath"),mt(Bie,"isStrictPrefixOfPath"),mt($ie,"areTokenCategoriesNotUsed")});function qie(e){return e=e.lookaheadStrategy.validate({rules:e.rules,tokenTypes:e.tokenTypes,grammarName:e.grammarName}),x(e,e=>Object.assign({type:_se.CUSTOM_LOOKAHEAD_VALIDATION},e))}function jie(t,e,r,n){var i=fq(t,e=>Wie(e,r)),e=iae(t,e,r),a=fq(t,e=>eae(e,r)),s=fq(t,e=>Vie(e,t,n,r));return i.concat(e,a,s)}function Wie(n,i){var e=new aae,e=(n.accept(e),e.allProductions),e=Eq(e,Yie),e=qj(e,e=>1{var t=sq(e),e=i.buildDuplicateFoundError(n,e),r=are(t),e={message:e,type:_se.DUPLICATE_PRODUCTIONS,ruleName:n.name,dslName:r,occurrence:t.idx};return(r=Hie(t))&&(e.parameter=r),e})}function Yie(e){return`${are(e)}_#_${e.idx}_#_`+Hie(e)}function Hie(e){return e instanceof Qte?e.terminalType.name:e instanceof qte?e.nonTerminalName:""}function Vie(r,e,t,n){var i=[];return 1t.name===r.name?e+1:e,0)&&(e=n.buildDuplicateRuleNameError({topLevelRule:r,grammarName:t}),i.push({message:e,type:_se.DUPLICATE_RULE_NAME,ruleName:r.name})),i}function Xie(e,t,r){var n=[];return Xq(t,e)||n.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:_se.INVALID_RULE_OVERRIDE,ruleName:e}),n}function Kie(r,e,n,i=[]){var t,a=[],e=Zie(e.definition);return ij(e)?[]:(t=r.name,Xq(e,r)&&a.push({message:n.buildLeftRecursionError({topLevelRule:r,leftRecursionPath:i}),type:_se.LEFT_RECURSION,ruleName:t}),t=mU(e,i.concat([r])),e=fq(t,e=>{var t=ez(i);return t.push(e),Kie(r,e,n,t)}),a.concat(e))}function Zie(e){let t=[];if(ij(e))return t;if((r=sq(e))instanceof qte)t.push(r.referencedRule);else if(r instanceof Wte||r instanceof Yte||r instanceof Hte||r instanceof Vte||r instanceof Kte||r instanceof Xte)t=t.concat(Zie(r.definition));else if(r instanceof Zte)t=YB(x(r.definition,e=>Zie(e.definition)));else if(!(r instanceof Qte))throw Error("non exhaustive match");var r=nre(r),n=1{var e=SU(r.definition);return fq(e,(e,t)=>(e=fie([e],[],kne,1),ij(e)?[{message:i.buildEmptyAlternationError({topLevelRule:n,alternation:r,emptyChoiceIdx:t}),type:_se.NONE_LAST_EMPTY_ALT,ruleName:n.name,occurrence:r.idx,alternative:t+1}]:[]))})}function Jie(n,i,a){var e=new sae,e=(n.accept(e),e.alternations),e=jW(e,e=>!0===e.ignoreAmbiguities);return fq(e,e=>{var t=rae(r=Die(e.idx,n,e.maxLookahead||i,e),e,n,a),r=nae(r,e,n,a);return t.concat(r)})}function eae(t,r){var e=new sae,e=(t.accept(e),e.alternations);return fq(e,e=>255{var e=new oae,e=(n.accept(e),e.allProductions);v(e,e=>{var t=Eie(e),r=e.maxLookahead||i,t=Oie(e.idx,n,t,r)[0];ij(YB(t))&&(r=a.buildEmptyRepetitionError({topLevelRule:n,repetition:e}),s.push({message:r,type:_se.NO_NON_EMPTY_LOOKAHEAD,ruleName:n.name}))})}),s}function rae(a,s,r,n){let o=[],e=GW(a,(e,t,i)=>(!0!==s.definition[i].ignoreAmbiguities&&v(t,r=>{let n=[i];v(a,(e,t)=>{i!==t&&Pie(e,r)&&!0!==s.definition[t].ignoreAmbiguities&&n.push(t)}),1{var t=x(e.alts,e=>e+1);return{message:n.buildAlternationAmbiguityError({topLevelRule:r,alternation:s,ambiguityIndices:t,prefixPath:e.path}),type:_se.AMBIGUOUS_ALTS,ruleName:r.name,occurrence:s.idx,alternatives:e.alts}})}function nae(e,i,a,s){let o=GW(e,(e,t,r)=>(t=x(t,e=>({idx:r,path:e})),e.concat(t)),[]);return sz(fq(o,e=>{if(!0===i.definition[e.idx].ignoreAmbiguities)return[];let n=e.idx,t=e.path,r=HU(o,e=>!0!==i.definition[e.idx].ignoreAmbiguities&&e.idx{var t=[e.idx+1,n+1],r=0===i.idx?"":i.idx;return{message:s.buildAlternationPrefixAmbiguityError({topLevelRule:a,alternation:i,ambiguityIndices:t,prefixPath:e.path}),type:_se.AMBIGUOUS_PREFIX_ALTS,ruleName:a.name,occurrence:r,alternatives:t}})}))}function iae(e,t,r){let n=[],i=x(t,e=>e.name);return v(e,e=>{var t=e.name;Xq(i,t)&&(e=r.buildNamespaceConflictError(e),n.push({message:e,type:_se.CONFLICT_TOKENS_RULES_NAMESPACE,ruleName:t}))}),n}var aae,sae,oae,lae=e(()=>{LY(),Nse(),ore(),Uie(),Tie(),Gne(),mt(qie,"validateLookahead"),mt(jie,"validateGrammar"),mt(Wie,"validateDuplicateProductions"),mt(Yie,"identifyProductionForDuplicates"),mt(Hie,"getExtraProductionArgument"),aae=class extends Jte{static{mt(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(Vie,"validateRuleDoesNotAlreadyExist"),mt(Xie,"validateRuleIsOverridden"),mt(Kie,"validateNoLeftRecursion"),mt(Zie,"getFirstNoneTerminal"),sae=class extends Jte{static{mt(this,"OrCollector")}constructor(){super(...arguments),this.alternations=[]}visitAlternation(e){this.alternations.push(e)}},mt(Qie,"validateEmptyOrAlternative"),mt(Jie,"validateAmbiguousAlternationAlternatives"),oae=class extends Jte{static{mt(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(eae,"validateTooManyAlts"),mt(tae,"validateSomeNonEmptyLookaheadPath"),mt(rae,"checkAlternativesAmbiguities"),mt(nae,"checkPrefixAlternativesAmbiguities"),mt(iae,"checkTerminalAndNoneTerminalsNameSpace")});function cae(e){let t=sU(e,{errMsgProvider:oie}),r={};return v(e.rules,e=>{r[e.name]=e}),uie(r,t.errMsgProvider)}function hae(e){return jie((e=sU(e,{errMsgProvider:lie})).rules,e.tokenTypes,e.errMsgProvider,e.grammarName)}var uae=e(()=>{LY(),pie(),lae(),hie(),mt(cae,"resolveGrammar"),mt(hae,"validateGrammar")});function dae(e){return Xq(pae,e.name)}var pae,gae,fae,mae,yae,vae,xae=e(()=>{LY(),pae=["MismatchedTokenException","NoViableAltException","EarlyExitException","NotAllInputParsedException"],Object.freeze(pae),mt(dae,"isRecognitionException"),gae=class extends Error{static{mt(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)}},fae=class extends gae{static{mt(this,"MismatchedTokenException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name="MismatchedTokenException"}},mae=class extends gae{static{mt(this,"NoViableAltException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name="NoViableAltException"}},yae=class extends gae{static{mt(this,"NotAllInputParsedException")}constructor(e,t){super(e,t),this.name="NotAllInputParsedException"}},vae=class extends gae{static{mt(this,"EarlyExitException")}constructor(e,t,r){super(e,t),this.previousToken=r,this.name="EarlyExitException"}}});function bae(e,t,r,n,i,a,s){let o=this.getKeyForAutomaticLookahead(n,i),l=this.firstAfterRepMap[o],c=(void 0===l&&(n=this.getCurrRuleFullName(),n=this.getGAstProductions()[n],l=new a(n,i).startWalking(),this.firstAfterRepMap[o]=l),l.token),h=l.occurrence,u=l.isEndOfRule;1===this.RULE_STACK.length&&u&&void 0===c&&(c=aie,h=1),void 0!==c&&void 0!==h&&this.shouldInRepetitionRecoveryBeTried(c,h,s)&&this.tryInRepetitionRecovery(e,t,r,c)}var wae,kae,Tae,Eae,Cae=e(()=>{cie(),LY(),xae(),yre(),Nse(),wae={},kae="InRuleRecoveryException",Tae=class extends Error{static{mt(this,"InRuleRecoveryException")}constructor(e){super(e),this.name=kae}},Eae=class{static{mt(this,"Recoverable")}initRecoverable(e){this.firstAfterRepMap={},this.resyncFollows={},this.recoveryEnabled=(Pq(e,"recoveryEnabled")?e:Cse).recoveryEnabled,this.recoveryEnabled&&(this.attemptInRepetitionRecovery=bae)}getTokenToInsert(e){return(e=Vne(e,"",NaN,NaN,NaN,NaN,NaN,NaN)).isInsertedInRecovery=!0,e}canTokenTypeBeInsertedInRecovery(e){return!0}canTokenTypeBeDeletedInRecovery(e){return!0}tryInRepetitionRecovery(e,t,r,n){let i=this.findReSyncTokenType(),a=this.exportLexerState(),s=[],o=!1,l=this.LA(1),c=this.LA(1),h=mt(()=>{var e=this.LA(0),e=this.errorMessageProvider.buildMismatchTokenMessage({expected:n,actual:l,previous:e,ruleName:this.getCurrRuleFullName()});(e=new fae(e,l,this.LA(0))).resyncedTokens=SU(s),this.SAVE_ERROR(e)},"generateErrorMessage");for(;!o;){if(this.tokenMatcher(c,n))return void h();if(r.call(this))return h(),void e.apply(this,t);this.tokenMatcher(c,i)?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 Tae("sad sad panda")}canPerformInRuleRecovery(e,t){return this.canRecoverWithSingleTokenInsertion(e,t)||this.canRecoverWithSingleTokenDeletion(e)}canRecoverWithSingleTokenInsertion(e,t){if(!this.canTokenTypeBeInsertedInRecovery(e)||ij(t))return!1;let r=this.LA(1);return void 0!==rq(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 Xq(t,e)}findReSyncTokenType(){let e=this.flattenFollowSet(),t=this.LA(1),r=2;for(;;){var n=rq(e,e=>Xne(t,e));if(void 0!==n)return n;t=this.LA(r),r++}}getCurrFollowKey(){var e,t,r;return 1===this.RULE_STACK.length?wae:(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,n=this.RULE_OCCURRENCE_STACK;return x(r,(e,t)=>0===t?wae:{ruleName:this.shortRuleNameToFullName(e),idxInCallingRule:n[t],inRule:this.shortRuleNameToFullName(r[t-1])})}flattenFollowSet(){var e=x(this.buildFullFollowKeyStack(),e=>this.getFollowSetFromFollowKey(e));return YB(e)}getFollowSetFromFollowKey(e){return e===wae?[aie]:(e=e.ruleName+e.idxInCallingRule+fre+e.inRule,this.resyncFollows[e])}addToResyncTokens(e,t){return this.tokenMatcher(e,aie)||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 SU(t)}attemptInRepetitionRecovery(e,t,r,n,i,a,s){}getCurrentGrammarPath(e,t){return{ruleStack:this.getHumanReadableRuleStack(),occurrenceStack:ez(this.RULE_OCCURRENCE_STACK),lastTok:e,lastTokOccurrence:t}}getHumanReadableRuleStack(){return x(this.RULE_STACK,e=>this.shortRuleNameToFullName(e))}},mt(bae,"attemptInRepetitionRecovery")});function Sae(e,t,r){return r|t|e}var _ae,Aae=e(()=>{mt(Sae,"getKeyForAutomaticLookahead")}),Lae=e(()=>{LY(),hie(),Nse(),lae(),Uie(),_ae=class{static{mt(this,"LLkLookaheadStrategy")}constructor(e){this.maxLookahead=null!=(e=e?.maxLookahead)?e:Cse.maxLookahead}validate(e){var t,r,n=this.validateNoLeftRecursion(e.rules);return ij(n)?(t=this.validateEmptyOrAlternatives(e.rules),r=this.validateAmbiguousAlternationAlternatives(e.rules,this.maxLookahead),e=this.validateSomeNonEmptyLookaheadPath(e.rules,this.maxLookahead),[...n,...t,...r,...e]):n}validateNoLeftRecursion(e){return fq(e,e=>Kie(e,e,lie))}validateEmptyOrAlternatives(e){return fq(e,e=>Qie(e,lie))}validateAmbiguousAlternationAlternatives(e,t){return fq(e,e=>Jie(e,t,lie))}validateSomeNonEmptyLookaheadPath(e,t){return tae(e,t,lie)}buildLookaheadForAlternation(e){return Sie(e.prodOccurrence,e.rule,e.maxLookahead,e.hasPredicates,e.dynamicTokensEnabled,Aie)}buildLookaheadForOptional(e){return _ie(e.prodOccurrence,e.rule,e.maxLookahead,e.dynamicTokensEnabled,Eie(e.prodType),Lie)}}});function Nae(e){return Mae.reset(),e.accept(Mae),e=Mae.dslMethods,Mae.reset(),e}var Iae,Rae,Mae,Dae=e(()=>{LY(),Nse(),Aae(),ore(),Lae(),Iae=class{static{mt(this,"LooksAhead")}initLooksAhead(e){this.dynamicTokensEnabled=(Pq(e,"dynamicTokensEnabled")?e:Cse).dynamicTokensEnabled,this.maxLookahead=(Pq(e,"maxLookahead")?e:Cse).maxLookahead,this.lookaheadStrategy=Pq(e,"lookaheadStrategy")?e.lookaheadStrategy:new _ae({maxLookahead:this.maxLookahead}),this.lookAheadFuncsCache=new Map}preComputeLookaheadFunctions(e){v(e,s=>{this.TRACE_INIT(s.name+" Rule Lookahead",()=>{var{alternation:e,repetition:t,option:r,repetitionMandatory:n,repetitionMandatoryWithSeparator:i,repetitionWithSeparator:a}=Nae(s);v(e,r=>{var e=0===r.idx?"":r.idx;this.TRACE_INIT(""+are(r)+e,()=>{var e=this.lookaheadStrategy.buildLookaheadForAlternation({prodOccurrence:r.idx,rule:s,maxLookahead:r.maxLookahead||this.maxLookahead,hasPredicates:r.hasPredicates,dynamicTokensEnabled:this.dynamicTokensEnabled}),t=Sae(this.fullRuleNameToShort[s.name],256,r.idx);this.setLaFuncCache(t,e)})}),v(t,e=>{this.computeLookaheadFunc(s,e.idx,768,"Repetition",e.maxLookahead,are(e))}),v(r,e=>{this.computeLookaheadFunc(s,e.idx,512,"Option",e.maxLookahead,are(e))}),v(n,e=>{this.computeLookaheadFunc(s,e.idx,1024,"RepetitionMandatory",e.maxLookahead,are(e))}),v(i,e=>{this.computeLookaheadFunc(s,e.idx,1536,"RepetitionMandatoryWithSeparator",e.maxLookahead,are(e))}),v(a,e=>{this.computeLookaheadFunc(s,e.idx,1280,"RepetitionWithSeparator",e.maxLookahead,are(e))})})})}computeLookaheadFunc(r,n,i,a,s,e){this.TRACE_INIT(""+e+(0===n?"":n),()=>{var e=this.lookaheadStrategy.buildLookaheadForOptional({prodOccurrence:n,rule:r,maxLookahead:s||this.maxLookahead,dynamicTokensEnabled:this.dynamicTokensEnabled,prodType:a}),t=Sae(this.fullRuleNameToShort[r.name],i,n);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)}},Rae=class extends Jte{static{mt(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)}},Mae=new Rae,mt(Nae,"collectMethods")});function Oae(e,t){!0===isNaN(e.startOffset)?(e.startOffset=t.startOffset,e.endOffset=t.endOffset):e.endOffset{mt(Oae,"setNodeLocationOnlyOffset"),mt(Pae,"setNodeLocationFull"),mt(Bae,"addTerminalToCst"),mt($ae,"addNoneTerminalToCst")});function zae(e,t){Object.defineProperty(e,Gae,{enumerable:!1,configurable:!0,writable:!1,value:t})}var Gae,Uae=e(()=>{Gae="name",mt(zae,"defineNameProp")});function qae(t,r){var n=tB(t),i=n.length;for(let e=0;ee.msg),Error(`Errors Detected in CST Visitor <${this.constructor.name}>: + `+e.join(` `).replace(/\n/g,` - `))},"validateVisitor")});return r.prototype=t,(r.prototype.constructor=r)._RULE_NAMES=e,r}function Kit(t,e,r){var n=me(function(){},"derivedConstructor");Wit(n,t+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return v(e,t=>{i[t]=Vit}),n.prototype=i,n.prototype.constructor=n}function Zit(t,e){return Qit(t,e)}function Qit(e,t){return t=XG(t,t=>!1===_w(e[t])),t=x(t,t=>({msg:`Missing visitor method: <${t}> on ${e.constructor.name} CST Visitor.`,type:Jit.MISSING_METHOD,methodName:t})),l$(t)}var Jit,tat,eat,rat,nat,iat,aat,sat=t(()=>{var t;IW(),Hit(),me(Vit,"defaultVisit"),me(Xit,"createBaseSemanticVisitorConstructor"),me(Kit,"createBaseVisitorConstructorWithDefaults"),(t=Jit=Jit||{})[t.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",t[t.MISSING_METHOD=1]="MISSING_METHOD",me(Zit,"validateVisitor"),me(Qit,"validateMissingCstMethods")}),oat=t(()=>{jit(),IW(),sat(),Oat(),tat=class{static{me(this,"TreeBuilder")}initTreeBuilder(t){if(this.CST_STACK=[],this.outputCst=t.outputCst,this.nodeLocationTracking=(FU(t,"nodeLocationTracking")?t:Nat).nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Git,this.setNodeLocationFromNode=Git,this.cstPostRule=AO,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=AO,this.setNodeLocationFromNode=AO,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=zit,this.setNodeLocationFromNode=zit,this.cstPostRule=AO,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=AO,this.setNodeLocationFromNode=AO,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid config option: "${t.nodeLocationTracking}"`);this.setNodeLocationFromToken=AO,this.setNodeLocationFromNode=AO,this.cstPostRule=AO,this.setInitialNodeLocation=AO}else this.cstInvocationStateUpdate=AO,this.cstFinallyStateUpdate=AO,this.cstPostTerminal=AO,this.cstPostNonTerminal=AO,this.cstPostRule=AO}setInitialNodeLocationOnlyOffsetRecovery(t){t.location={startOffset:NaN,endOffset:NaN}}setInitialNodeLocationOnlyOffsetRegular(t){t.location={startOffset:this.LA(1).startOffset,endOffset:NaN}}setInitialNodeLocationFullRecovery(t){t.location={startOffset:NaN,startLine:NaN,startColumn:NaN,endOffset:NaN,endLine:NaN,endColumn:NaN}}setInitialNodeLocationFullRegular(t){var e=this.LA(1);t.location={startOffset:e.startOffset,startLine:e.startLine,startColumn:e.startColumn,endOffset:NaN,endLine:NaN,endColumn:NaN}}cstInvocationStateUpdate(t){t={name:t,children:Object.create(null)},this.setInitialNodeLocation(t),this.CST_STACK.push(t)}cstFinallyStateUpdate(){this.CST_STACK.pop()}cstPostRuleFull(t){var e=this.LA(0);(t=t.location).startOffset<=e.startOffset?(t.endOffset=e.endOffset,t.endLine=e.endLine,t.endColumn=e.endColumn):(t.startOffset=NaN,t.startLine=NaN,t.startColumn=NaN)}cstPostRuleOnlyOffset(t){var e=this.LA(0);(t=t.location).startOffset<=e.startOffset?t.endOffset=e.endOffset:t.startOffset=NaN}cstPostTerminal(t,e){var r=this.CST_STACK[this.CST_STACK.length-1];Uit(r,e,t),this.setNodeLocationFromToken(r.location,e)}cstPostNonTerminal(t,e){var r=this.CST_STACK[this.CST_STACK.length-1];qit(r,e,t),this.setNodeLocationFromNode(r.location,t.location)}getBaseCstVisitorConstructor(){var t;return fq(this.baseCstVisitorConstructor)?(t=Xit(this.className,nP(this.gastProductionsCache)),this.baseCstVisitorConstructor=t):this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){var t;return fq(this.baseCstVisitorWithDefaultsConstructor)?(t=Kit(this.className,nP(this.gastProductionsCache),this.getBaseCstVisitorConstructor()),this.baseCstVisitorWithDefaultsConstructor=t):this.baseCstVisitorWithDefaultsConstructor}getLastExplicitRuleShortName(){var t=this.RULE_STACK;return t[t.length-1]}getPreviousExplicitRuleShortName(){var t=this.RULE_STACK;return t[t.length-2]}getLastExplicitRuleOccurrenceIndex(){var t=this.RULE_OCCURRENCE_STACK;return t[t.length-1]}}}),lat=t(()=>{Oat(),eat=class{static{me(this,"LexerAdapter")}initLexerAdapter(){this.tokVector=[],this.tokVectorLength=0,this.currIdx=-1}set input(t){if(!0!==this.selfAnalysisDone)throw Error("Missing invocation at the end of the Parser's constructor.");this.reset(),this.tokVector=t,this.tokVectorLength=t.length}get input(){return this.tokVector}SKIP_TOKEN(){return this.currIdx<=this.tokVector.length-2?(this.consumeToken(),this.LA(1)):Lat}LA(t){return(t=this.currIdx+t)<0||this.tokVectorLength<=t?Lat:this.tokVector[t]}consumeToken(){this.currIdx++}exportLexerState(){return this.currIdx}importLexerState(t){this.currIdx=t}resetLexerState(){this.currIdx=-1}moveToTerminatedState(){this.currIdx=this.tokVector.length-1}getLexerPosition(){return this.exportLexerState()}}}),cat=t(()=>{IW(),Eit(),Oat(),fnt(),pit(),het(),rat=class{static{me(this,"RecognizerApi")}ACTION(t){return t.call(this)}consume(t,e,r){return this.consumeInternal(e,t,r)}subrule(t,e,r){return this.subruleInternal(e,t,r)}option(t,e){return this.optionInternal(e,t)}or(t,e){return this.orInternal(e,t)}many(t,e){return this.manyInternal(t,e)}atLeastOne(t,e){return this.atLeastOneInternal(t,e)}CONSUME(t,e){return this.consumeInternal(t,0,e)}CONSUME1(t,e){return this.consumeInternal(t,1,e)}CONSUME2(t,e){return this.consumeInternal(t,2,e)}CONSUME3(t,e){return this.consumeInternal(t,3,e)}CONSUME4(t,e){return this.consumeInternal(t,4,e)}CONSUME5(t,e){return this.consumeInternal(t,5,e)}CONSUME6(t,e){return this.consumeInternal(t,6,e)}CONSUME7(t,e){return this.consumeInternal(t,7,e)}CONSUME8(t,e){return this.consumeInternal(t,8,e)}CONSUME9(t,e){return this.consumeInternal(t,9,e)}SUBRULE(t,e){return this.subruleInternal(t,0,e)}SUBRULE1(t,e){return this.subruleInternal(t,1,e)}SUBRULE2(t,e){return this.subruleInternal(t,2,e)}SUBRULE3(t,e){return this.subruleInternal(t,3,e)}SUBRULE4(t,e){return this.subruleInternal(t,4,e)}SUBRULE5(t,e){return this.subruleInternal(t,5,e)}SUBRULE6(t,e){return this.subruleInternal(t,6,e)}SUBRULE7(t,e){return this.subruleInternal(t,7,e)}SUBRULE8(t,e){return this.subruleInternal(t,8,e)}SUBRULE9(t,e){return this.subruleInternal(t,9,e)}OPTION(t){return this.optionInternal(t,0)}OPTION1(t){return this.optionInternal(t,1)}OPTION2(t){return this.optionInternal(t,2)}OPTION3(t){return this.optionInternal(t,3)}OPTION4(t){return this.optionInternal(t,4)}OPTION5(t){return this.optionInternal(t,5)}OPTION6(t){return this.optionInternal(t,6)}OPTION7(t){return this.optionInternal(t,7)}OPTION8(t){return this.optionInternal(t,8)}OPTION9(t){return this.optionInternal(t,9)}OR(t){return this.orInternal(t,0)}OR1(t){return this.orInternal(t,1)}OR2(t){return this.orInternal(t,2)}OR3(t){return this.orInternal(t,3)}OR4(t){return this.orInternal(t,4)}OR5(t){return this.orInternal(t,5)}OR6(t){return this.orInternal(t,6)}OR7(t){return this.orInternal(t,7)}OR8(t){return this.orInternal(t,8)}OR9(t){return this.orInternal(t,9)}MANY(t){this.manyInternal(0,t)}MANY1(t){this.manyInternal(1,t)}MANY2(t){this.manyInternal(2,t)}MANY3(t){this.manyInternal(3,t)}MANY4(t){this.manyInternal(4,t)}MANY5(t){this.manyInternal(5,t)}MANY6(t){this.manyInternal(6,t)}MANY7(t){this.manyInternal(7,t)}MANY8(t){this.manyInternal(8,t)}MANY9(t){this.manyInternal(9,t)}MANY_SEP(t){this.manySepFirstInternal(0,t)}MANY_SEP1(t){this.manySepFirstInternal(1,t)}MANY_SEP2(t){this.manySepFirstInternal(2,t)}MANY_SEP3(t){this.manySepFirstInternal(3,t)}MANY_SEP4(t){this.manySepFirstInternal(4,t)}MANY_SEP5(t){this.manySepFirstInternal(5,t)}MANY_SEP6(t){this.manySepFirstInternal(6,t)}MANY_SEP7(t){this.manySepFirstInternal(7,t)}MANY_SEP8(t){this.manySepFirstInternal(8,t)}MANY_SEP9(t){this.manySepFirstInternal(9,t)}AT_LEAST_ONE(t){this.atLeastOneInternal(0,t)}AT_LEAST_ONE1(t){return this.atLeastOneInternal(1,t)}AT_LEAST_ONE2(t){this.atLeastOneInternal(2,t)}AT_LEAST_ONE3(t){this.atLeastOneInternal(3,t)}AT_LEAST_ONE4(t){this.atLeastOneInternal(4,t)}AT_LEAST_ONE5(t){this.atLeastOneInternal(5,t)}AT_LEAST_ONE6(t){this.atLeastOneInternal(6,t)}AT_LEAST_ONE7(t){this.atLeastOneInternal(7,t)}AT_LEAST_ONE8(t){this.atLeastOneInternal(8,t)}AT_LEAST_ONE9(t){this.atLeastOneInternal(9,t)}AT_LEAST_ONE_SEP(t){this.atLeastOneSepFirstInternal(0,t)}AT_LEAST_ONE_SEP1(t){this.atLeastOneSepFirstInternal(1,t)}AT_LEAST_ONE_SEP2(t){this.atLeastOneSepFirstInternal(2,t)}AT_LEAST_ONE_SEP3(t){this.atLeastOneSepFirstInternal(3,t)}AT_LEAST_ONE_SEP4(t){this.atLeastOneSepFirstInternal(4,t)}AT_LEAST_ONE_SEP5(t){this.atLeastOneSepFirstInternal(5,t)}AT_LEAST_ONE_SEP6(t){this.atLeastOneSepFirstInternal(6,t)}AT_LEAST_ONE_SEP7(t){this.atLeastOneSepFirstInternal(7,t)}AT_LEAST_ONE_SEP8(t){this.atLeastOneSepFirstInternal(8,t)}AT_LEAST_ONE_SEP9(t){this.atLeastOneSepFirstInternal(9,t)}RULE(t,e,r=Iat){ZU(this.definedRulesNames,t)&&(n={message:pnt.buildDuplicateRuleNameError({topLevelRule:t,grammarName:this.className}),type:Rat.DUPLICATE_RULE_NAME,ruleName:t},this.definitionErrors.push(n)),this.definedRulesNames.push(t);var n=this.defineRule(t,e,r);return this[t]=n}OVERRIDE_RULE(t,e,r=Iat){var n=tit(t,this.definedRulesNames,this.className),n=(this.definitionErrors=this.definitionErrors.concat(n),this.defineRule(t,e,r));return this[t]=n}BACKTRACK(e,r){return function(){this.isBackTrackingStack.push(1);var t=this.saveRecogState();try{return e.apply(this,r),!0}catch(t){if(yit(t))return!1;throw t}finally{this.reloadRecogState(t),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return Utt(HU(this.gastProductionsCache))}}}),hat=t(()=>{IW(),Mit(),Eit(),Hnt(),Ant(),Oat(),Nit(),gnt(),Wrt(),nat=class{static{me(this,"RecognizerEngine")}initRecognizerEngine(t,e){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Srt,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},FU(e,"serializedGrammar"))throw Error(`The Parser's configuration can no longer contain a property. + `))},"validateVisitor")});return r.prototype=e,(r.prototype.constructor=r)._RULE_NAMES=t,r}function Wae(e,t,r){var n=mt(function(){},"derivedConstructor");zae(n,e+"BaseSemanticsWithDefaults");let i=Object.create(r.prototype);return v(t,e=>{i[e]=qae}),n.prototype=i,n.prototype.constructor=n}function Yae(e,t){return Hae(e,t)}function Hae(t,e){return e=HU(e,e=>!1===C6(t[e])),e=x(e,e=>({msg:`Missing visitor method: <${e}> on ${t.constructor.name} CST Visitor.`,type:Vae.MISSING_METHOD,methodName:e})),sz(e)}var Vae,Xae,Kae,Zae,Qae,Jae,ese,tse=e(()=>{var e;LY(),Uae(),mt(qae,"defaultVisit"),mt(jae,"createBaseSemanticVisitorConstructor"),mt(Wae,"createBaseVisitorConstructorWithDefaults"),(e=Vae=Vae||{})[e.REDUNDANT_METHOD=0]="REDUNDANT_METHOD",e[e.MISSING_METHOD=1]="MISSING_METHOD",mt(Yae,"validateVisitor"),mt(Hae,"validateMissingCstMethods")}),rse=e(()=>{Fae(),LY(),tse(),Nse(),Xae=class{static{mt(this,"TreeBuilder")}initTreeBuilder(e){if(this.CST_STACK=[],this.outputCst=e.outputCst,this.nodeLocationTracking=(Pq(e,"nodeLocationTracking")?e:Cse).nodeLocationTracking,this.outputCst)if(/full/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Pae,this.setNodeLocationFromNode=Pae,this.cstPostRule=SP,this.setInitialNodeLocation=this.setInitialNodeLocationFullRecovery):(this.setNodeLocationFromToken=SP,this.setNodeLocationFromNode=SP,this.cstPostRule=this.cstPostRuleFull,this.setInitialNodeLocation=this.setInitialNodeLocationFullRegular);else if(/onlyOffset/i.test(this.nodeLocationTracking))this.recoveryEnabled?(this.setNodeLocationFromToken=Oae,this.setNodeLocationFromNode=Oae,this.cstPostRule=SP,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRecovery):(this.setNodeLocationFromToken=SP,this.setNodeLocationFromNode=SP,this.cstPostRule=this.cstPostRuleOnlyOffset,this.setInitialNodeLocation=this.setInitialNodeLocationOnlyOffsetRegular);else{if(!/none/i.test(this.nodeLocationTracking))throw Error(`Invalid config option: "${e.nodeLocationTracking}"`);this.setNodeLocationFromToken=SP,this.setNodeLocationFromNode=SP,this.cstPostRule=SP,this.setInitialNodeLocation=SP}else this.cstInvocationStateUpdate=SP,this.cstFinallyStateUpdate=SP,this.cstPostTerminal=SP,this.cstPostNonTerminal=SP,this.cstPostRule=SP}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];Bae(r,t,e),this.setNodeLocationFromToken(r.location,t)}cstPostNonTerminal(e,t){var r=this.CST_STACK[this.CST_STACK.length-1];$ae(r,t,e),this.setNodeLocationFromNode(r.location,e.location)}getBaseCstVisitorConstructor(){var e;return pj(this.baseCstVisitorConstructor)?(e=jae(this.className,tB(this.gastProductionsCache)),this.baseCstVisitorConstructor=e):this.baseCstVisitorConstructor}getBaseCstVisitorConstructorWithDefaults(){var e;return pj(this.baseCstVisitorWithDefaultsConstructor)?(e=Wae(this.className,tB(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]}}}),nse=e(()=>{Nse(),Kae=class{static{mt(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)):Ese}LA(e){return(e=this.currIdx+e)<0||this.tokVectorLength<=e?Ese: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()}}}),ise=e(()=>{LY(),xae(),Nse(),hie(),lae(),ore(),Zae=class{static{mt(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=Sse){Xq(this.definedRulesNames,e)&&(n={message:lie.buildDuplicateRuleNameError({topLevelRule:e,grammarName:this.className}),type:_se.DUPLICATE_RULE_NAME,ruleName:e},this.definitionErrors.push(n)),this.definedRulesNames.push(e);var n=this.defineRule(e,t,r);return this[e]=n}OVERRIDE_RULE(e,t,r=Sse){var n=Xie(e,this.definedRulesNames,this.className),n=(this.definitionErrors=this.definitionErrors.concat(n),this.defineRule(e,t,r));return this[e]=n}BACKTRACK(t,r){return function(){this.isBackTrackingStack.push(1);var e=this.saveRecogState();try{return t.apply(this,r),!0}catch(e){if(dae(e))return!1;throw e}finally{this.reloadRecogState(e),this.isBackTrackingStack.pop()}}}getGAstProductions(){return this.gastProductionsCache}getSerializedGastProductions(){return zte(Wq(this.gastProductionsCache))}}}),ase=e(()=>{LY(),Aae(),xae(),Uie(),Tie(),Nse(),Cae(),cie(),Gne(),Qae=class{static{mt(this,"RecognizerEngine")}initRecognizerEngine(e,t){if(this.className=this.constructor.name,this.shortRuleNameToFull={},this.fullRuleNameToShort={},this.ruleShortNameIdx=256,this.tokenMatcher=Tne,this.subruleIdx=0,this.definedRulesNames=[],this.tokensMap={},this.isBackTrackingStack=[],this.RULE_STACK=[],this.RULE_OCCURRENCE_STACK=[],this.gastProductionsCache={},Pq(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(ZT(t)){if(sq(t))throw Error(`A Token Vocabulary cannot be empty. + For Further details.`);if(K7(e)){if(ij(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 t[0].startOffset)throw Error(`The Parser constructor no longer accepts a token vector as the first argument. + 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(ZT(t))this.tokensMap=qj(t,(t,e)=>(t[e.name]=e,t),{});else if(FU(t,"modes")&&qG(VP(HU(t.modes)),Frt))e=VP(HU(t.modes)),e=mW(e),this.tokensMap=qj(e,(t,e)=>(t[e.name]=e,t),{});else{if(!Tw(t))throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=r$(t)}this.tokensMap.EOF=hnt,e=FU(t,"modes")?VP(HU(t.modes)):HU(t),t=qG(e,t=>sq(t.categoryMatches)),this.tokenMatcher=t?Srt:_rt,Art(HU(this.tokensMap))}defineRule(r,n,t){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 i=(FU(t,"resyncEnabled")?t:Iat).resyncEnabled,a=(FU(t,"recoveryValueFunc")?t:Iat).recoveryValueFunc,s=this.ruleShortNameIdx<<12;return this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=r,this.fullRuleNameToShort[r]=s,t=!0===this.outputCst?me(function(...t){try{this.ruleInvocationStateUpdate(s,r,this.subruleIdx),n.apply(this,t);var e=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(e),e}catch(t){return this.invokeRuleCatch(t,i,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry"):me(function(...t){try{return this.ruleInvocationStateUpdate(s,r,this.subruleIdx),n.apply(this,t)}catch(t){return this.invokeRuleCatch(t,i,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst"),Object.assign(t,{ruleName:r,originalGrammarAction:n})}invokeRuleCatch(t,e,r){var n=1===this.RULE_STACK.length,e=e&&!this.isBackTracking()&&this.recoveryEnabled;if(yit(t)){var i=t;if(e){if(e=this.findReSyncTokenType(),this.isInCurrentRuleReSyncSet(e))return i.resyncedTokens=this.reSyncTo(e),this.outputCst?((e=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,e):r(t);this.outputCst&&((e=this.CST_STACK[this.CST_STACK.length-1]).recoveredNode=!0,i.partialCstResult=e)}else if(n)return this.moveToTerminatedState(),r(t);throw i}throw t}optionInternal(t,e){var r=this.getKeyForAutomaticLookahead(512,e);return this.optionInternalLogic(t,e,r)}optionInternalLogic(t,e,r){let n=this.getLaFuncFromCache(r),i;if("function"!=typeof t){i=t.DEF;let e=t.GATE;if(void 0!==e){let t=n;n=me(()=>e.call(this)&&t.call(this),"lookAheadFunc")}}else i=t;if(!0===n.call(this))return i.call(this)}atLeastOneInternal(t,e){var r=this.getKeyForAutomaticLookahead(1024,t);return this.atLeastOneInternalLogic(t,e,r)}atLeastOneInternalLogic(t,r,e){let n=this.getLaFuncFromCache(e),i;if("function"!=typeof r){i=r.DEF;let e=r.GATE;if(void 0!==e){let t=n;n=me(()=>e.call(this)&&t.call(this),"lookAheadFunc")}}else i=r;if(!0!==n.call(this))throw this.raiseEarlyExitException(t,jnt.REPETITION_MANDATORY,r.ERR_MSG);{let t=this.doSingleRepetition(i);for(;!0===n.call(this)&&!0===t;)t=this.doSingleRepetition(i)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[t,r],n,1024,t,_nt)}atLeastOneSepFirstInternal(t,e){var r=this.getKeyForAutomaticLookahead(1536,t);this.atLeastOneSepFirstInternalLogic(t,e,r)}atLeastOneSepFirstInternalLogic(t,e,r){let n=e.DEF,i=e.SEP;if(!0!==this.getLaFuncFromCache(r).call(this))throw this.raiseEarlyExitException(t,jnt.REPETITION_MANDATORY_WITH_SEPARATOR,e.ERR_MSG);for(n.call(this),r=me(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,i,r,n,Snt],r,1536,t,Snt)}manyInternal(t,e){var r=this.getKeyForAutomaticLookahead(768,t);return this.manyInternalLogic(t,e,r)}manyInternalLogic(t,r,e){let n=this.getLaFuncFromCache(e),i;if("function"!=typeof r){i=r.DEF;let e=r.GATE;if(void 0!==e){let t=n;n=me(()=>e.call(this)&&t.call(this),"lookaheadFunction")}}else i=r;let a=!0;for(;!0===n.call(this)&&!0===a;)a=this.doSingleRepetition(i);this.attemptInRepetitionRecovery(this.manyInternal,[t,r],n,768,t,Ent,a)}manySepFirstInternal(t,e){var r=this.getKeyForAutomaticLookahead(1280,t);this.manySepFirstInternalLogic(t,e,r)}manySepFirstInternalLogic(t,e,r){let n=e.DEF,i=e.SEP;if(!0===this.getLaFuncFromCache(r).call(this)){for(n.call(this),e=me(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,i,e,n,Cnt],e,1280,t,Cnt)}}repetitionSepSecondInternal(t,e,r,n,i){for(;r();)this.CONSUME(e),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[t,e,r,n,i],r,1536,t,i)}doSingleRepetition(t){var e=this.getLexerPosition();return t.call(this),this.getLexerPosition()>e}orInternal(t,e){var r=this.getKeyForAutomaticLookahead(256,e),n=ZT(t)?t:t.DEF;if(void 0!==(r=this.getLaFuncFromCache(r).call(this,n)))return n[r].ALT.call(this);this.raiseNoAltException(e,t.ERR_MSG)}ruleFinallyStateUpdate(){var t,e;this.RULE_STACK.pop(),this.RULE_OCCURRENCE_STACK.pop(),this.cstFinallyStateUpdate(),0===this.RULE_STACK.length&&!1===this.isAtEndOfInput()&&(t=this.LA(1),e=this.errorMessageProvider.buildNotAllInputParsedMessage({firstRedundant:t,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new kit(e,t)))}subruleInternal(t,e,r){var n;try{var i=void 0!==r?r.ARGS:void 0;return this.subruleIdx=e,n=t.apply(this,i),this.cstPostNonTerminal(n,void 0!==r&&void 0!==r.LABEL?r.LABEL:t.ruleName),n}catch(e){throw this.subruleInternalError(e,r,t.ruleName)}}subruleInternalError(t,e,r){throw yit(t)&&void 0!==t.partialCstResult&&(this.cstPostNonTerminal(t.partialCstResult,void 0!==e&&void 0!==e.LABEL?e.LABEL:r),delete t.partialCstResult),t}consumeInternal(t,e,r){let n;try{var i=this.LA(1);!0===this.tokenMatcher(i,t)?(this.consumeToken(),n=i):this.consumeInternalError(t,i,r)}catch(r){n=this.consumeInternalRecovery(t,e,r)}return this.cstPostTerminal(void 0!==r&&void 0!==r.LABEL?r.LABEL:t.name,n),n}consumeInternalError(t,e,r){var n=this.LA(0),r=void 0!==r&&r.ERR_MSG?r.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:t,actual:e,previous:n,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new bit(r,e,n))}consumeInternalRecovery(t,e,r){if(!this.recoveryEnabled||"MismatchedTokenException"!==r.name||this.isBackTracking())throw r;e=this.getFollowsForInRuleRecovery(t,e);try{return this.tryInRuleRecovery(t,e)}catch(t){throw t.name===Sit?r:t}}saveRecogState(){var t=this.errors,e=r$(this.RULE_STACK);return{errors:t,lexerState:this.exportLexerState(),RULE_STACK:e,CST_STACK:this.CST_STACK}}reloadRecogState(t){this.errors=t.errors,this.importLexerState(t.lexerState),this.RULE_STACK=t.RULE_STACK}ruleInvocationStateUpdate(t,e,r){this.RULE_OCCURRENCE_STACK.push(r),this.RULE_STACK.push(t),this.cstInvocationStateUpdate(e)}isBackTracking(){return 0!==this.isBackTrackingStack.length}getCurrRuleFullName(){var t=this.getLastExplicitRuleShortName();return this.shortRuleNameToFull[t]}shortRuleNameToFullName(t){return this.shortRuleNameToFull[t]}isAtEndOfInput(){return this.tokenMatcher(this.LA(1),hnt)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}}),uat=t(()=>{Eit(),IW(),Hnt(),Oat(),iat=class{static{me(this,"ErrorHandler")}initErrorHandler(t){this._errors=[],this.errorMessageProvider=(FU(t,"errorMessageProvider")?t:Nat).errorMessageProvider}SAVE_ERROR(t){if(yit(t))return t.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:r$(this.RULE_OCCURRENCE_STACK)},this._errors.push(t),t;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return r$(this._errors)}set errors(t){this._errors=t}raiseEarlyExitException(t,e,r){var n=this.getCurrRuleFullName(),t=znt(t,this.getGAstProductions()[n],e,this.maxLookahead)[0],i=[];for(let t=1;t<=this.maxLookahead;t++)i.push(this.LA(t));throw e=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:t,actual:i,previous:this.LA(0),customUserDescription:r,ruleName:n}),this.SAVE_ERROR(new Tit(e,this.LA(1),this.LA(0)))}raiseNoAltException(t,e){var r=this.getCurrRuleFullName(),t=$nt(t,this.getGAstProductions()[r],this.maxLookahead),n=[];for(let t=1;t<=this.maxLookahead;t++)n.push(this.LA(t));throw r=this.LA(0),t=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:t,actual:n,previous:r,customUserDescription:e,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new wit(t,this.LA(1),r))}}}),dat=t(()=>{Ant(),IW(),aat=class{static{me(this,"ContentAssist")}initContentAssist(){}computeContentAssist(t,e){var r=this.gastProductionsCache[t];if(fq(r))throw Error(`Rule ->${t}<- does not exist in this grammar.`);return bnt([r],e,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(t){var e=lU(t.ruleStack),e=this.getGAstProductions()[e];return new knt(e,t).startWalking()}}});function pat(t,e,r,n=!1){mat(r);var i=kG(this.recordingProdStack),a=_w(e)?e:e.DEF,t=new t({definition:[],idx:r});return n&&(t.separator=e.SEP),FU(e,"MAX_LOOKAHEAD")&&(t.maxLookahead=e.MAX_LOOKAHEAD),this.recordingProdStack.push(t),a.call(this),i.definition.push(t),this.recordingProdStack.pop(),yat}function gat(t,e){mat(e);let r=kG(this.recordingProdStack),n=!1===ZT(t),i=0==n?t:t.DEF,a=new Jtt({definition:[],idx:e,ignoreAmbiguities:n&&!0===t.IGNORE_AMBIGUITIES});return FU(t,"MAX_LOOKAHEAD")&&(a.maxLookahead=t.MAX_LOOKAHEAD),e=eW(i,t=>_w(t.GATE)),a.hasPredicates=e,r.definition.push(a),v(i,t=>{var e=new Htt({definition:[]});a.definition.push(e),FU(t,"IGNORE_AMBIGUITIES")?e.ignoreAmbiguities=t.IGNORE_AMBIGUITIES:FU(t,"GATE")&&(e.ignoreAmbiguities=!0),this.recordingProdStack.push(e),t.ALT.call(this),this.recordingProdStack.pop()}),yat}function fat(t){return 0===t?"":""+t}function mat(t){if(t<0||vat - Idx value must be a none negative value smaller than `+(vat+1))).KNOWN_RECORDER_ERROR=!0,t}var yat,vat,xat,bat,wat,kat,Tat,Eat=t(()=>{IW(),het(),Hrt(),Wrt(),gnt(),Oat(),Mit(),yat={description:"This Object indicates the Parser is during Recording Phase"},Object.freeze(yat),vat=Math.pow(2,8)-1,Art([xat=Krt({name:"RECORDING_PHASE_TOKEN",pattern:jrt.NA})]),bat=Qrt(xat,`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(bat),wat={name:`This CSTNode indicates the Parser is in Recording Phase - See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},kat=class{static{me(this,"GastRecorder")}initGastRecorder(t){this.recordingProdStack=[],this.RECORDING_PHASE=!1}enableRecording(){this.RECORDING_PHASE=!0,this.TRACE_INIT("Enable Recording",()=>{for(let r=0;r<10;r++){var t=0{var e=this;for(let t=0;t<10;t++){var r=0!0}LA_RECORD(t){return Lat}topLevelRuleRecord(t,e){try{var r=new Ytt({definition:[],name:t});return r.name=t,this.recordingProdStack.push(r),e.call(this),this.recordingProdStack.pop(),r}catch(t){if(!0!==t.KNOWN_RECORDER_ERROR)try{t.message=t.message+` + For Further details.`)}if(K7(e))this.tokensMap=GW(e,(e,t)=>(e[t.name]=t,e),{});else if(Pq(e,"modes")&&GU(YB(Wq(e.modes)),Dne))t=YB(Wq(e.modes)),t=gY(t),this.tokensMap=GW(t,(e,t)=>(e[t.name]=t,e),{});else{if(!k6(e))throw new Error(" argument must be An Array of Token constructors, A dictionary of Token constructors or an IMultiModeLexerDefinition");this.tokensMap=ez(e)}this.tokensMap.EOF=aie,t=Pq(e,"modes")?YB(Wq(e.modes)):Wq(e),e=GU(t,e=>ij(e.categoryMatches)),this.tokenMatcher=e?Tne:kne,Ene(Wq(this.tokensMap))}defineRule(r,n,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 i=(Pq(e,"resyncEnabled")?e:Sse).resyncEnabled,a=(Pq(e,"recoveryValueFunc")?e:Sse).recoveryValueFunc,s=this.ruleShortNameIdx<<12;return this.ruleShortNameIdx++,this.shortRuleNameToFull[s]=r,this.fullRuleNameToShort[r]=s,e=!0===this.outputCst?mt(function(...e){try{this.ruleInvocationStateUpdate(s,r,this.subruleIdx),n.apply(this,e);var t=this.CST_STACK[this.CST_STACK.length-1];return this.cstPostRule(t),t}catch(e){return this.invokeRuleCatch(e,i,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTry"):mt(function(...e){try{return this.ruleInvocationStateUpdate(s,r,this.subruleIdx),n.apply(this,e)}catch(e){return this.invokeRuleCatch(e,i,a)}finally{this.ruleFinallyStateUpdate()}},"invokeRuleWithTryCst"),Object.assign(e,{ruleName:r,originalGrammarAction:n})}invokeRuleCatch(e,t,r){var n=1===this.RULE_STACK.length,t=t&&!this.isBackTracking()&&this.recoveryEnabled;if(dae(e)){var i=e;if(t){if(t=this.findReSyncTokenType(),this.isInCurrentRuleReSyncSet(t))return i.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,i.partialCstResult=t)}else if(n)return this.moveToTerminatedState(),r(e);throw i}throw e}optionInternal(e,t){var r=this.getKeyForAutomaticLookahead(512,t);return this.optionInternalLogic(e,t,r)}optionInternalLogic(e,t,r){let n=this.getLaFuncFromCache(r),i;if("function"!=typeof e){i=e.DEF;let t=e.GATE;if(void 0!==t){let e=n;n=mt(()=>t.call(this)&&e.call(this),"lookAheadFunc")}}else i=e;if(!0===n.call(this))return i.call(this)}atLeastOneInternal(e,t){var r=this.getKeyForAutomaticLookahead(1024,e);return this.atLeastOneInternalLogic(e,t,r)}atLeastOneInternalLogic(e,r,t){let n=this.getLaFuncFromCache(t),i;if("function"!=typeof r){i=r.DEF;let t=r.GATE;if(void 0!==t){let e=n;n=mt(()=>t.call(this)&&e.call(this),"lookAheadFunc")}}else i=r;if(!0!==n.call(this))throw this.raiseEarlyExitException(e,Fie.REPETITION_MANDATORY,r.ERR_MSG);{let e=this.doSingleRepetition(i);for(;!0===n.call(this)&&!0===e;)e=this.doSingleRepetition(i)}this.attemptInRepetitionRecovery(this.atLeastOneInternal,[e,r],n,1024,e,wie)}atLeastOneSepFirstInternal(e,t){var r=this.getKeyForAutomaticLookahead(1536,e);this.atLeastOneSepFirstInternalLogic(e,t,r)}atLeastOneSepFirstInternalLogic(e,t,r){let n=t.DEF,i=t.SEP;if(!0!==this.getLaFuncFromCache(r).call(this))throw this.raiseEarlyExitException(e,Fie.REPETITION_MANDATORY_WITH_SEPARATOR,t.ERR_MSG);for(n.call(this),r=mt(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,r,n,kie],r,1536,e,kie)}manyInternal(e,t){var r=this.getKeyForAutomaticLookahead(768,e);return this.manyInternalLogic(e,t,r)}manyInternalLogic(e,r,t){let n=this.getLaFuncFromCache(t),i;if("function"!=typeof r){i=r.DEF;let t=r.GATE;if(void 0!==t){let e=n;n=mt(()=>t.call(this)&&e.call(this),"lookaheadFunction")}}else i=r;let a=!0;for(;!0===n.call(this)&&!0===a;)a=this.doSingleRepetition(i);this.attemptInRepetitionRecovery(this.manyInternal,[e,r],n,768,e,xie,a)}manySepFirstInternal(e,t){var r=this.getKeyForAutomaticLookahead(1280,e);this.manySepFirstInternalLogic(e,t,r)}manySepFirstInternalLogic(e,t,r){let n=t.DEF,i=t.SEP;if(!0===this.getLaFuncFromCache(r).call(this)){for(n.call(this),t=mt(()=>this.tokenMatcher(this.LA(1),i),"separatorLookAheadFunc");!0===this.tokenMatcher(this.LA(1),i);)this.CONSUME(i),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,i,t,n,bie],t,1280,e,bie)}}repetitionSepSecondInternal(e,t,r,n,i){for(;r();)this.CONSUME(t),n.call(this);this.attemptInRepetitionRecovery(this.repetitionSepSecondInternal,[e,t,r,n,i],r,1536,e,i)}doSingleRepetition(e){var t=this.getLexerPosition();return e.call(this),this.getLexerPosition()>t}orInternal(e,t){var r=this.getKeyForAutomaticLookahead(256,t),n=K7(e)?e:e.DEF;if(void 0!==(r=this.getLaFuncFromCache(r).call(this,n)))return n[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 yae(t,e)))}subruleInternal(e,t,r){var n;try{var i=void 0!==r?r.ARGS:void 0;return this.subruleIdx=t,n=e.apply(this,i),this.cstPostNonTerminal(n,void 0!==r&&void 0!==r.LABEL?r.LABEL:e.ruleName),n}catch(t){throw this.subruleInternalError(t,r,e.ruleName)}}subruleInternalError(e,t,r){throw dae(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 n;try{var i=this.LA(1);!0===this.tokenMatcher(i,e)?(this.consumeToken(),n=i):this.consumeInternalError(e,i,r)}catch(r){n=this.consumeInternalRecovery(e,t,r)}return this.cstPostTerminal(void 0!==r&&void 0!==r.LABEL?r.LABEL:e.name,n),n}consumeInternalError(e,t,r){var n=this.LA(0),r=void 0!==r&&r.ERR_MSG?r.ERR_MSG:this.errorMessageProvider.buildMismatchTokenMessage({expected:e,actual:t,previous:n,ruleName:this.getCurrRuleFullName()});throw this.SAVE_ERROR(new fae(r,t,n))}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===kae?r:e}}saveRecogState(){var e=this.errors,t=ez(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),aie)}reset(){this.resetLexerState(),this.subruleIdx=0,this.isBackTrackingStack=[],this.errors=[],this.RULE_STACK=[],this.CST_STACK=[],this.RULE_OCCURRENCE_STACK=[]}}}),sse=e(()=>{xae(),LY(),Uie(),Nse(),Jae=class{static{mt(this,"ErrorHandler")}initErrorHandler(e){this._errors=[],this.errorMessageProvider=(Pq(e,"errorMessageProvider")?e:Cse).errorMessageProvider}SAVE_ERROR(e){if(dae(e))return e.context={ruleStack:this.getHumanReadableRuleStack(),ruleOccurrenceStack:ez(this.RULE_OCCURRENCE_STACK)},this._errors.push(e),e;throw Error("Trying to save an Error which is not a RecognitionException")}get errors(){return ez(this._errors)}set errors(e){this._errors=e}raiseEarlyExitException(e,t,r){var n=this.getCurrRuleFullName(),e=Oie(e,this.getGAstProductions()[n],t,this.maxLookahead)[0],i=[];for(let e=1;e<=this.maxLookahead;e++)i.push(this.LA(e));throw t=this.errorMessageProvider.buildEarlyExitMessage({expectedIterationPaths:e,actual:i,previous:this.LA(0),customUserDescription:r,ruleName:n}),this.SAVE_ERROR(new vae(t,this.LA(1),this.LA(0)))}raiseNoAltException(e,t){var r=this.getCurrRuleFullName(),e=Die(e,this.getGAstProductions()[r],this.maxLookahead),n=[];for(let e=1;e<=this.maxLookahead;e++)n.push(this.LA(e));throw r=this.LA(0),e=this.errorMessageProvider.buildNoViableAltMessage({expectedPathsPerAlt:e,actual:n,previous:r,customUserDescription:t,ruleName:this.getCurrRuleFullName()}),this.SAVE_ERROR(new mae(e,this.LA(1),r))}}}),ose=e(()=>{Tie(),LY(),ese=class{static{mt(this,"ContentAssist")}initContentAssist(){}computeContentAssist(e,t){var r=this.gastProductionsCache[e];if(pj(r))throw Error(`Rule ->${e}<- does not exist in this grammar.`);return fie([r],t,this.tokenMatcher,this.maxLookahead)}getNextPossibleTokenTypes(e){var t=sq(e.ruleStack),t=this.getGAstProductions()[t];return new yie(t,e).startWalking()}}});function lse(e,t,r,n=!1){use(r);var i=bU(this.recordingProdStack),a=C6(t)?t:t.DEF,e=new e({definition:[],idx:r});return n&&(e.separator=t.SEP),Pq(t,"MAX_LOOKAHEAD")&&(e.maxLookahead=t.MAX_LOOKAHEAD),this.recordingProdStack.push(e),a.call(this),i.definition.push(e),this.recordingProdStack.pop(),dse}function cse(e,t){use(t);let r=bU(this.recordingProdStack),n=!1===K7(e),i=0==n?e:e.DEF,a=new Zte({definition:[],idx:t,ignoreAmbiguities:n&&!0===e.IGNORE_AMBIGUITIES});return Pq(e,"MAX_LOOKAHEAD")&&(a.maxLookahead=e.MAX_LOOKAHEAD),t=JW(i,e=>C6(e.GATE)),a.hasPredicates=t,r.definition.push(a),v(i,e=>{var t=new Wte({definition:[]});a.definition.push(t),Pq(e,"IGNORE_AMBIGUITIES")?t.ignoreAmbiguities=e.IGNORE_AMBIGUITIES:Pq(e,"GATE")&&(t.ignoreAmbiguities=!0),this.recordingProdStack.push(t),e.ALT.call(this),this.recordingProdStack.pop()}),dse}function hse(e){return 0===e?"":""+e}function use(e){if(e<0||pse + Idx value must be a none negative value smaller than `+(pse+1))).KNOWN_RECORDER_ERROR=!0,e}var dse,pse,gse,fse,mse,yse,vse,xse=e(()=>{LY(),ore(),qne(),Gne(),cie(),Nse(),Aae(),dse={description:"This Object indicates the Parser is during Recording Phase"},Object.freeze(dse),pse=Math.pow(2,8)-1,Ene([gse=Yne({name:"RECORDING_PHASE_TOKEN",pattern:zne.NA})]),fse=Vne(gse,`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(fse),mse={name:`This CSTNode indicates the Parser is in Recording Phase + See: https://chevrotain.io/docs/guide/internals.html#grammar-recording for details`,children:{}},yse=class{static{mt(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 Ese}topLevelRuleRecord(e,t){try{var r=new jte({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 t}}optionInternalRecord(t,e){return pat.call(this,Vtt,t,e)}atLeastOneInternalRecord(t,e){pat.call(this,Xtt,e,t)}atLeastOneSepFirstInternalRecord(t,e){pat.call(this,Ktt,e,t,!0)}manyInternalRecord(t,e){pat.call(this,Ztt,e,t)}manySepFirstInternalRecord(t,e){pat.call(this,Qtt,e,t,!0)}orInternalRecord(t,e){return gat.call(this,t,e)}subruleInternalRecord(t,e,r){var n,i;if(mat(e),t&&!1!==FU(t,"ruleName"))return n=kG(this.recordingProdStack),i=t.ruleName,i=new Wtt({idx:e,nonTerminalName:i,label:r?.LABEL,referencedRule:void 0}),n.definition.push(i),this.outputCst?wat:yat;throw(r=new Error(` argument is invalid expecting a Parser method reference but got: <${JSON.stringify(t)}> - inside top level rule: <${this.recordingProdStack[0].name}>`)).KNOWN_RECORDER_ERROR=!0,r}consumeInternalRecord(t,e,r){var n;if(mat(e),Drt(t))return n=kG(this.recordingProdStack),r=new tet({idx:e,terminalType:t,label:r?.LABEL}),n.definition.push(r),bat;throw(n=new Error(` argument is invalid expecting a TokenType reference but got: <${JSON.stringify(t)}> - inside top level rule: <${this.recordingProdStack[0].name}>`)).KNOWN_RECORDER_ERROR=!0,n}},me(pat,"recordProd"),me(gat,"recordOrProd"),me(fat,"getIdxSuffix"),me(mat,"assertMethodIdxIsValid")}),Cat=t(()=>{IW(),$tt(),Oat(),Tat=class{static{me(this,"PerformanceTracer")}initPerformanceTracer(t){var e;FU(t,"traceInitPerf")?(t=t.traceInitPerf,this.traceInitMaxIdent=(e="number"==typeof t)?t:1/0,this.traceInitPerf=e?0 <${t}>`),Ott(e)),a=10 time: ${n}ms`),this.traceInitIndent--,i):e()}}});function _at(i,t){t.forEach(r=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach(t=>{var e;"constructor"!==t&&((e=Object.getOwnPropertyDescriptor(n,t))&&(e.get||e.set)?Object.defineProperty(i.prototype,t,e):i.prototype[t]=r.prototype[t])})})}var Sat=t(()=>{me(_at,"applyMixins")});function Aat(t=void 0){return function(){return t}}var Lat,Nat,Iat,Rat,Mat,Dat,Oat=t(()=>{var t;IW(),$tt(),Eet(),gnt(),fnt(),mit(),Nit(),$it(),oat(),lat(),cat(),hat(),uat(),dat(),Eat(),Cat(),Sat(),pit(),Lat=Qrt(hnt,"",NaN,NaN,NaN,NaN,NaN,NaN),Object.freeze(Lat),Nat=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:unt,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Iat=Object.freeze({recoveryValueFunc:me(()=>{},"recoveryValueFunc"),resyncEnabled:!0}),(t=Rat=Rat||{})[t.INVALID_RULE_NAME=0]="INVALID_RULE_NAME",t[t.DUPLICATE_RULE_NAME=1]="DUPLICATE_RULE_NAME",t[t.INVALID_RULE_OVERRIDE=2]="INVALID_RULE_OVERRIDE",t[t.DUPLICATE_PRODUCTIONS=3]="DUPLICATE_PRODUCTIONS",t[t.UNRESOLVED_SUBRULE_REF=4]="UNRESOLVED_SUBRULE_REF",t[t.LEFT_RECURSION=5]="LEFT_RECURSION",t[t.NONE_LAST_EMPTY_ALT=6]="NONE_LAST_EMPTY_ALT",t[t.AMBIGUOUS_ALTS=7]="AMBIGUOUS_ALTS",t[t.CONFLICT_TOKENS_RULES_NAMESPACE=8]="CONFLICT_TOKENS_RULES_NAMESPACE",t[t.INVALID_TOKEN_NAME=9]="INVALID_TOKEN_NAME",t[t.NO_NON_EMPTY_LOOKAHEAD=10]="NO_NON_EMPTY_LOOKAHEAD",t[t.AMBIGUOUS_PREFIX_ALTS=11]="AMBIGUOUS_PREFIX_ALTS",t[t.TOO_MANY_ALTS=12]="TOO_MANY_ALTS",t[t.CUSTOM_LOOKAHEAD_VALIDATION=13]="CUSTOM_LOOKAHEAD_VALIDATION",me(Aat,"EMPTY_ALT"),(Mat=class e{static{me(this,"Parser")}static performSelfAnalysis(t){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 t;this.selfAnalysisDone=!0;let r=this.className,n=(this.TRACE_INIT("toFastProps",()=>{Btt(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),v(this.definedRulesNames,t=>{let e=this[t].originalGrammarAction,r;this.TRACE_INIT(t+" Rule",()=>{r=this.topLevelRuleRecord(t,e)}),this.gastProductionsCache[t]=r})}finally{this.disableRecording()}}),[]);if(this.TRACE_INIT("Grammar Resolving",()=>{n=git({rules:HU(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{var t,e;sq(n)&&!1===this.skipValidations&&(t=fit({rules:HU(this.gastProductionsCache),tokenTypes:HU(this.tokensMap),errMsgProvider:pnt,grammarName:r}),e=Vnt({lookaheadStrategy:this.lookaheadStrategy,rules:HU(this.gastProductionsCache),tokenTypes:HU(this.tokensMap),grammarName:r}),this.definitionErrors=this.definitionErrors.concat(t,e))}),sq(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{var t=wet(HU(this.gastProductionsCache));this.resyncFollows=t}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var t,e;null!=(e=(t=this.lookaheadStrategy).initialize)&&e.call(t,{rules:HU(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(HU(this.gastProductionsCache))})),!e.DEFER_DEFINITION_ERRORS_HANDLING&&!sq(this.definitionErrors))throw t=x(this.definitionErrors,t=>t.message),new Error(`Parser Definition Errors detected: - `+t.join(` + https://chevrotain.io/docs/guide/internals.html#grammar-recording`}catch{}throw e}}optionInternalRecord(e,t){return lse.call(this,Yte,e,t)}atLeastOneInternalRecord(e,t){lse.call(this,Hte,t,e)}atLeastOneSepFirstInternalRecord(e,t){lse.call(this,Vte,t,e,!0)}manyInternalRecord(e,t){lse.call(this,Xte,t,e)}manySepFirstInternalRecord(e,t){lse.call(this,Kte,t,e,!0)}orInternalRecord(e,t){return cse.call(this,e,t)}subruleInternalRecord(e,t,r){var n,i;if(use(t),e&&!1!==Pq(e,"ruleName"))return n=bU(this.recordingProdStack),i=e.ruleName,i=new qte({idx:t,nonTerminalName:i,label:r?.LABEL,referencedRule:void 0}),n.definition.push(i),this.outputCst?mse:dse;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 n;if(use(t),Nne(e))return n=bU(this.recordingProdStack),r=new Qte({idx:t,terminalType:e,label:r?.LABEL}),n.definition.push(r),fse;throw(n=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,n}},mt(lse,"recordProd"),mt(cse,"recordOrProd"),mt(hse,"getIdxSuffix"),mt(use,"assertMethodIdxIsValid")}),bse=e(()=>{LY(),Bte(),Nse(),vse=class{static{mt(this,"PerformanceTracer")}initPerformanceTracer(e){var t;Pq(e,"traceInitPerf")?(e=e.traceInitPerf,this.traceInitMaxIdent=(t="number"==typeof e)?e:1/0,this.traceInitPerf=t?0 <${e}>`),Mte(t)),a=10 time: ${n}ms`),this.traceInitIndent--,i):t()}}});function wse(i,e){e.forEach(r=>{let n=r.prototype;Object.getOwnPropertyNames(n).forEach(e=>{var t;"constructor"!==e&&((t=Object.getOwnPropertyDescriptor(n,e))&&(t.get||t.set)?Object.defineProperty(i.prototype,e,t):i.prototype[e]=r.prototype[e])})})}var kse=e(()=>{mt(wse,"applyMixins")});function Tse(e=void 0){return function(){return e}}var Ese,Cse,Sse,_se,Ase,Lse,Nse=e(()=>{var e;LY(),Bte(),wre(),cie(),hie(),uae(),Cae(),Dae(),rse(),nse(),ise(),ase(),sse(),ose(),xse(),bse(),kse(),lae(),Ese=Vne(aie,"",NaN,NaN,NaN,NaN,NaN,NaN),Object.freeze(Ese),Cse=Object.freeze({recoveryEnabled:!1,maxLookahead:3,dynamicTokensEnabled:!1,outputCst:!0,errorMessageProvider:sie,nodeLocationTracking:"none",traceInitPerf:!1,skipValidations:!1}),Sse=Object.freeze({recoveryValueFunc:mt(()=>{},"recoveryValueFunc"),resyncEnabled:!0}),(e=_se=_se||{})[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(Tse,"EMPTY_ALT"),(Ase=class t{static{mt(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,n=(this.TRACE_INIT("toFastProps",()=>{Ote(this)}),this.TRACE_INIT("Grammar Recording",()=>{try{this.enableRecording(),v(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",()=>{n=cae({rules:Wq(this.gastProductionsCache)}),this.definitionErrors=this.definitionErrors.concat(n)}),this.TRACE_INIT("Grammar Validations",()=>{var e,t;ij(n)&&!1===this.skipValidations&&(e=hae({rules:Wq(this.gastProductionsCache),tokenTypes:Wq(this.tokensMap),errMsgProvider:lie,grammarName:r}),t=qie({lookaheadStrategy:this.lookaheadStrategy,rules:Wq(this.gastProductionsCache),tokenTypes:Wq(this.tokensMap),grammarName:r}),this.definitionErrors=this.definitionErrors.concat(e,t))}),ij(this.definitionErrors)&&(this.recoveryEnabled&&this.TRACE_INIT("computeAllProdsFollows",()=>{var e=vre(Wq(this.gastProductionsCache));this.resyncFollows=e}),this.TRACE_INIT("ComputeLookaheadFunctions",()=>{var e,t;null!=(t=(e=this.lookaheadStrategy).initialize)&&t.call(e,{rules:Wq(this.gastProductionsCache)}),this.preComputeLookaheadFunctions(Wq(this.gastProductionsCache))})),!t.DEFER_DEFINITION_ERRORS_HANDLING&&!ij(this.definitionErrors))throw e=x(this.definitionErrors,e=>e.message),new Error(`Parser Definition Errors detected: + `+e.join(` ------------------------------- -`))})}constructor(t,e){if(this.definitionErrors=[],this.selfAnalysisDone=!1,this.initErrorHandler(e),this.initLexerAdapter(),this.initLooksAhead(e),this.initRecognizerEngine(t,e),this.initRecoverable(e),this.initTreeBuilder(e),this.initContentAssist(),this.initGastRecorder(e),this.initPerformanceTracer(e),FU(e,"ignoredIssues"))throw new Error(`The IParserConfig property has been deprecated. +`))})}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),Pq(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=(FU(e,"skipValidations")?e:Nat).skipValidations}}).DEFER_DEFINITION_ERRORS_HANDLING=!1,_at(Mat,[Lit,Pit,tat,eat,nat,rat,iat,aat,kat,Tat]),Dat=class extends Mat{static{me(this,"EmbeddedActionsParser")}constructor(t,e=Nat){(e=r$(e)).outputCst=!1,super(t,e)}}}),Pat=t(()=>{het()}),Bat=t(()=>{}),Fat=t(()=>{Pat(),Bat()}),$at=t(()=>{Itt()}),zat=t(()=>{Itt(),Oat(),Hrt(),gnt(),Hnt(),Dit(),fnt(),Eit(),Yrt(),het(),het(),Fat(),$at()});function Gat(t,e,r){return t.name+`_${e}_`+r}function Uat(e){var r={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]},n=(qat(r,e),e.length);for(let t=0;tjat(e,r,t)));return rst(e,r,n,t,...i)}function Kat(t,e,r){var n=cst(t,e,r,{type:dst});return est(t,n),tst(t,e,r,rst(t,e,n,r,Zat(t,e,r)))}function Zat(e,r,t){return 1===(t=XG(x(t.definition,t=>jat(e,r,t)),t=>void 0!==t)).length?t[0]:0===t.length?void 0:ist(e,t)}function Qat(t,e,r,n,i){var a=n.left,n=n.right,s=cst(t,e,r,{type:bst}),o=(est(t,s),cst(t,e,r,{type:wst}));return a.loopback=s,o.loopback=s,lst(n,t.decisionMap[Gat(e,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=s),void 0===i?(lst(s,a),lst(s,o)):(lst(s,o),lst(s,i.left),lst(i.right,a)),{left:a,right:o}}function Jat(t,e,r,n,i){var a=n.left,n=n.right,s=cst(t,e,r,{type:xst}),o=(est(t,s),cst(t,e,r,{type:wst})),l=cst(t,e,r,{type:vst});return s.loopback=l,o.loopback=l,lst(s,a),lst(s,o),lst(n,l),void 0!==i?(lst(l,o),lst(l,i.left),lst(i.right,a)):lst(l,s),{left:t.decisionMap[Gat(e,i?"RepetitionWithSeparator":"Repetition",r.idx)]=s,right:o}}function tst(t,e,r,n){var i=n.left;return lst(i,n.right),t.decisionMap[Gat(e,"Option",r.idx)]=i,n}function est(t,e){return t.decisionStates.push(e),e.decision=t.decisionStates.length-1,e.decision}function rst(t,e,r,n,...i){var a,s=cst(t,e,n,{type:yst,start:r});r.end=s;for(a of i)void 0!==a?(lst(r,a.left),lst(a.right,s)):lst(r,s);return i={left:r,right:s},t.decisionMap[Gat(e,nst(n),n.idx)]=r,i}function nst(t){if(t instanceof Jtt)return"Alternation";if(t instanceof Vtt)return"Option";if(t instanceof Ztt)return"Repetition";if(t instanceof Qtt)return"RepetitionWithSeparator";if(t instanceof Xtt)return"RepetitionMandatory";if(t instanceof Ktt)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function ist(e,r){var n=r.length;for(let t=0;t{fU(),KG(),zat(),me(Gat,"buildATNKey"),dst=1,pst=2,gst=4,fst=5,mst=7,yst=8,vst=9,xst=10,bst=11,wst=12,kst=class{static{me(this,"AbstractTransition")}constructor(t){this.target=t}isEpsilon(){return!1}},Tst=class extends kst{static{me(this,"AtomTransition")}constructor(t,e){super(t),this.tokenType=e}},Est=class extends kst{static{me(this,"EpsilonTransition")}constructor(t){super(t)}isEpsilon(){return!0}},Cst=class extends kst{static{me(this,"RuleTransition")}constructor(t,e,r){super(t),this.rule=e,this.followState=r}isEpsilon(){return!0}},me(Uat,"createATN"),me(qat,"createRuleStartAndStopATNStates"),me(jat,"atom"),me(Wat,"repetition"),me(Yat,"repetitionSep"),me(Hat,"repetitionMandatory"),me(Vat,"repetitionMandatorySep"),me(Xat,"alternation"),me(Kat,"option"),me(Zat,"block"),me(Qat,"plus"),me(Jat,"star"),me(tst,"optional"),me(est,"defineDecisionState"),me(rst,"makeAlts"),me(nst,"getProdType"),me(ist,"makeBlock"),me(ast,"tokenRef"),me(sst,"ruleRef"),me(ost,"buildRuleHandle"),me(lst,"epsilon"),me(cst,"newState"),me(hst,"addTransition"),me(ust,"removeState")});function Sst(t,e=!0){return`${e?"a"+t.alt:""}s${t.state.stateNumber}:`+t.stack.map(t=>t.stateNumber.toString()).join("_")}var Ast,Lst,Nst=t(()=>{fU(),Ast={},Lst=class{static{me(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(t){var e=Sst(t);e in this.map||(this.map[e]=this.configs.length,this.configs.push(t))}get elements(){return this.configs}get alts(){return x(this.configs,t=>t.alt)}get key(){let t="";for(var e in this.map)t+=e+":";return t}},me(Sst,"getATNConfigKey")});function Ist(n,i){let a={};return t=>{let e=t.toString(),r=a[e];return void 0===r&&(r={atnStartState:n,decision:i,states:{}},a[e]=r),r}}function Rst(t,e=!0){var r,n=new Set;for(r of t){var i,a,s=new Set;for(i of r){if(void 0===i){if(e)break;return!1}for(a of[i.tokenTypeIdx].concat(i.categoryMatches))if(n.has(a)){if(!s.has(a))return!1}else n.add(a),s.add(a)}}return!0}function Mst(e){var r=e.decisionStates.length,n=Array(r);for(let t=0;tVrt(t)).join(", "),r=0===t.production.idx?"":t.production.idx;return`Ambiguous Alternatives Detected: <${t.ambiguityIndices.join(", ")}> in <${$st(t.production)}${r}> inside <${t.topLevelRule.name}> Rule, -<${e}> may appears as a prefix path in all these alternatives. + For further details.`);this.skipValidations=(Pq(t,"skipValidations")?t:Cse).skipValidations}}).DEFER_DEFINITION_ERRORS_HANDLING=!1,wse(Ase,[Eae,Iae,Xae,Kae,Qae,Zae,Jae,ese,yse,vse]),Lse=class extends Ase{static{mt(this,"EmbeddedActionsParser")}constructor(e,t=Cse){(t=ez(t)).outputCst=!1,super(e,t)}}}),Ise=e(()=>{ore()}),Rse=e(()=>{}),Mse=e(()=>{Ise(),Rse()}),Dse=e(()=>{Lte()}),Ose=e(()=>{Lte(),Nse(),qne(),cie(),Uie(),Lae(),hie(),xae(),Une(),ore(),ore(),Mse(),Dse()});function Pse(e,t,r){return e.name+`_${t}_`+r}function Bse(t){var r={decisionMap:{},decisionStates:[],ruleToStartState:new Map,ruleToStopState:new Map,states:[]},n=($se(r,t),t.length);for(let e=0;eFse(t,r,e)));return Zse(t,r,n,e,...i)}function Wse(e,t,r){var n=ioe(e,t,r,{type:ooe});return Kse(e,n),Xse(e,t,r,Zse(e,t,n,r,Yse(e,t,r)))}function Yse(t,r,e){return 1===(e=HU(x(e.definition,e=>Fse(t,r,e)),e=>void 0!==e)).length?e[0]:0===e.length?void 0:Jse(t,e)}function Hse(e,t,r,n,i){var a=n.left,n=n.right,s=ioe(e,t,r,{type:foe}),o=(Kse(e,s),ioe(e,t,r,{type:moe}));return a.loopback=s,o.loopback=s,noe(n,e.decisionMap[Pse(t,i?"RepetitionMandatoryWithSeparator":"RepetitionMandatory",r.idx)]=s),void 0===i?(noe(s,a),noe(s,o)):(noe(s,o),noe(s,i.left),noe(i.right,a)),{left:a,right:o}}function Vse(e,t,r,n,i){var a=n.left,n=n.right,s=ioe(e,t,r,{type:goe}),o=(Kse(e,s),ioe(e,t,r,{type:moe})),l=ioe(e,t,r,{type:poe});return s.loopback=l,o.loopback=l,noe(s,a),noe(s,o),noe(n,l),void 0!==i?(noe(l,o),noe(l,i.left),noe(i.right,a)):noe(l,s),{left:e.decisionMap[Pse(t,i?"RepetitionWithSeparator":"Repetition",r.idx)]=s,right:o}}function Xse(e,t,r,n){var i=n.left;return noe(i,n.right),e.decisionMap[Pse(t,"Option",r.idx)]=i,n}function Kse(e,t){return e.decisionStates.push(t),t.decision=e.decisionStates.length-1,t.decision}function Zse(e,t,r,n,...i){var a,s=ioe(e,t,n,{type:doe,start:r});r.end=s;for(a of i)void 0!==a?(noe(r,a.left),noe(a.right,s)):noe(r,s);return i={left:r,right:s},e.decisionMap[Pse(t,Qse(n),n.idx)]=r,i}function Qse(e){if(e instanceof Zte)return"Alternation";if(e instanceof Yte)return"Option";if(e instanceof Xte)return"Repetition";if(e instanceof Kte)return"RepetitionWithSeparator";if(e instanceof Hte)return"RepetitionMandatory";if(e instanceof Vte)return"RepetitionMandatoryWithSeparator";throw new Error("Invalid production type encountered")}function Jse(t,r){var n=r.length;for(let e=0;e{pq(),VU(),Ose(),mt(Pse,"buildATNKey"),ooe=1,loe=2,coe=4,hoe=5,uoe=7,doe=8,poe=9,goe=10,foe=11,moe=12,yoe=class{static{mt(this,"AbstractTransition")}constructor(e){this.target=e}isEpsilon(){return!1}},voe=class extends yoe{static{mt(this,"AtomTransition")}constructor(e,t){super(e),this.tokenType=t}},xoe=class extends yoe{static{mt(this,"EpsilonTransition")}constructor(e){super(e)}isEpsilon(){return!0}},boe=class extends yoe{static{mt(this,"RuleTransition")}constructor(e,t,r){super(e),this.rule=t,this.followState=r}isEpsilon(){return!0}},mt(Bse,"createATN"),mt($se,"createRuleStartAndStopATNStates"),mt(Fse,"atom"),mt(zse,"repetition"),mt(Gse,"repetitionSep"),mt(Use,"repetitionMandatory"),mt(qse,"repetitionMandatorySep"),mt(jse,"alternation"),mt(Wse,"option"),mt(Yse,"block"),mt(Hse,"plus"),mt(Vse,"star"),mt(Xse,"optional"),mt(Kse,"defineDecisionState"),mt(Zse,"makeAlts"),mt(Qse,"getProdType"),mt(Jse,"makeBlock"),mt(eoe,"tokenRef"),mt(toe,"ruleRef"),mt(roe,"buildRuleHandle"),mt(noe,"epsilon"),mt(ioe,"newState"),mt(aoe,"addTransition"),mt(soe,"removeState")});function koe(e,t=!0){return`${t?"a"+e.alt:""}s${e.state.stateNumber}:`+e.stack.map(e=>e.stateNumber.toString()).join("_")}var Toe,Eoe,Coe=e(()=>{pq(),Toe={},Eoe=class{static{mt(this,"ATNConfigSet")}constructor(){this.map={},this.configs=[]}get size(){return this.configs.length}finalize(){this.map={}}add(e){var t=koe(e);t in this.map||(this.map[t]=this.configs.length,this.configs.push(e))}get elements(){return this.configs}get alts(){return x(this.configs,e=>e.alt)}get key(){let e="";for(var t in this.map)e+=t+":";return e}},mt(koe,"getATNConfigKey")});function Soe(n,i){let a={};return e=>{let t=e.toString(),r=a[t];return void 0===r&&(r={atnStartState:n,decision:i,states:{}},a[t]=r),r}}function _oe(e,t=!0){var r,n=new Set;for(r of e){var i,a,s=new Set;for(i of r){if(void 0===i){if(t)break;return!1}for(a of[i.tokenTypeIdx].concat(i.categoryMatches))if(n.has(a)){if(!s.has(a))return!1}else n.add(a),s.add(a)}}return!0}function Aoe(t){var r=t.decisionStates.length,n=Array(r);for(let e=0;ejne(e)).join(", "),r=0===e.production.idx?"":e.production.idx;return`Ambiguous Alternatives Detected: <${e.ambiguityIndices.join(", ")}> in <${Doe(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 $st(t){if(t instanceof Wtt)return"SUBRULE";if(t instanceof Vtt)return"OPTION";if(t instanceof Jtt)return"OR";if(t instanceof Xtt)return"AT_LEAST_ONE";if(t instanceof Ktt)return"AT_LEAST_ONE_SEP";if(t instanceof Qtt)return"MANY_SEP";if(t instanceof Ztt)return"MANY";if(t instanceof tet)return"CONSUME";throw Error("non exhaustive match")}function zst(t,e,r){return e=yU(e.configs.elements,t=>t.state.transitions),{actualToken:r,possibleTokenTypes:xW(e.filter(t=>t instanceof Tst).map(t=>t.tokenType),t=>t.tokenTypeIdx),tokenPath:t}}function Gst(t,e){return t.edges[e.tokenTypeIdx]}function Ust(t,e,r){var n,i=new Lst,a=[];for(n of t.elements)if(!1!==r.is(n.alt))if(n.state.type===mst)a.push(n);else{var s=n.state.transitions.length;for(let t=0;t{zat(),_st(),Nst(),Iq(),vU(),bW(),fU(),XP(),DG(),oq(),jj(),me(Ist,"createDFACache"),not=class{static{me(this,"PredicateSet")}constructor(){this.predicates=[]}is(t){return t>=this.predicates.length||this.predicates[t]}set(t,e){this.predicates[t]=e}toString(){let e="",r=this.predicates.length;for(let t=0;tconsole.log(t)}initialize(t){this.atn=Uat(t.rules),this.dfas=Mst(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(t){let{prodOccurrence:e,rule:r,hasPredicates:n,dynamicTokensEnabled:i}=t,a=this.dfas,s=this.logging,o=Gat(r,"Alternation",e),l=this.atn.decisionMap[o].decision,c=x(Nnt({maxLookahead:1,occurrence:e,prodType:"Alternation",rule:r}),t=>x(t,t=>t[0]));if(!Rst(c,!1)||i)return n?function(e){var r=new not,n=void 0===e?0:e.length;for(let t=0;t(v(t,t=>{t&&(e[t.tokenTypeIdx]=r,v(t.categoryMatches,t=>{e[t]=r}))}),e),{});return n?function(t){var e=this.LA(1),e=r[e.tokenTypeIdx];if(void 0===t||void 0===e||void 0===(t=null==(t=t[e])?void 0:t.GATE)||!1!==t.call(this))return e}:function(){var t=this.LA(1);return r[t.tokenTypeIdx]}}}buildLookaheadForOptional(r){let{prodOccurrence:t,rule:e,prodType:n,dynamicTokensEnabled:i}=r,a=this.dfas,s=this.logging,o=Gat(e,n,t),l=this.atn.decisionMap[o].decision,c=x(Nnt({maxLookahead:1,occurrence:t,prodType:n,rule:e}),t=>x(t,t=>t[0]));if(Rst(c)&&c[0][0]&&!i){if(r=c[0],1===(r=VP(r)).length&&sq(r[0].categoryMatches)){let t=r[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===t}}{let e=qj(r,(e,t)=>(void 0!==t&&(e[t.tokenTypeIdx]=!0,v(t.categoryMatches,t=>{e[t]=!0})),e),{});return function(){var t=this.LA(1);return!0===e[t.tokenTypeIdx]}}}return function(){var t=Dst.call(this,a,l,iot,s);return"object"!=typeof t&&0===t}}},me(Rst,"isLL1Sequence"),me(Mst,"initATNSimulator"),me(Dst,"adaptivePredict"),me(Ost,"performLookahead"),me(Pst,"computeLookaheadTarget"),me(Bst,"reportLookaheadAmbiguity"),me(Fst,"buildAmbiguityError"),me($st,"getProductionDslName"),me(zst,"buildAdaptivePredictError"),me(Gst,"getExistingTargetState"),me(Ust,"computeReachSet"),me(qst,"getReachableTarget"),me(jst,"getUniqueAlt"),me(Wst,"newDFAState"),me(Yst,"addDFAEdge"),me(Hst,"addDFAState"),me(Vst,"computeStartState"),me(Xst,"closure"),me(Kst,"getEpsilonTarget"),me(Zst,"hasConfigInRuleStopState"),me(Qst,"allConfigsInRuleStopStates"),me(Jst,"hasConflictTerminatingPrediction"),me(tot,"getConflictingAltSets"),me(eot,"hasConflictingAltSet"),me(rot,"hasStateAssociatedWithOneAlt")}),Blt=t(()=>{Plt()}),Flt=t(()=>{function t(t){return"string"==typeof t}var e,r,n,i;function a(t){return"string"==typeof t}function s(t){return"number"==typeof t&&e.MIN_VALUE<=t&&t<=e.MAX_VALUE}function o(t){return"number"==typeof t&&r.MIN_VALUE<=t&&t<=r.MAX_VALUE}function l(t,e){return{line:t=t===Number.MAX_VALUE?cot.MAX_VALUE:t,character:e=e===Number.MAX_VALUE?cot.MAX_VALUE:e}}function c(t){return ye.objectLiteral(t)&&ye.uinteger(t.line)&&ye.uinteger(t.character)}function h(t,e,r,n){if(ye.uinteger(t)&&ye.uinteger(e)&&ye.uinteger(r)&&ye.uinteger(n))return{start:hot.create(t,e),end:hot.create(r,n)};if(hot.is(t)&&hot.is(e))return{start:t,end:e};throw new Error(`Range#create called with invalid arguments[${t}, ${e}, ${r}, ${n}]`)}function u(t){return ye.objectLiteral(t)&&hot.is(t.start)&&hot.is(t.end)}function d(t,e){return{uri:t,range:e}}function p(t){return ye.objectLiteral(t)&&uot.is(t.range)&&(ye.string(t.uri)||ye.undefined(t.uri))}function g(t,e,r,n){return{targetUri:t,targetRange:e,targetSelectionRange:r,originSelectionRange:n}}function f(t){return ye.objectLiteral(t)&&uot.is(t.targetRange)&&ye.string(t.targetUri)&&uot.is(t.targetSelectionRange)&&(uot.is(t.originSelectionRange)||ye.undefined(t.originSelectionRange))}function m(t,e,r,n){return{red:t,green:e,blue:r,alpha:n}}function y(t){return ye.objectLiteral(t)&&ye.numberRange(t.red,0,1)&&ye.numberRange(t.green,0,1)&&ye.numberRange(t.blue,0,1)&&ye.numberRange(t.alpha,0,1)}function v(t,e){return{range:t,color:e}}function x(t){return ye.objectLiteral(t)&&uot.is(t.range)&&got.is(t.color)}function b(t,e,r){return{label:t,textEdit:e,additionalTextEdits:r}}function w(t){return ye.objectLiteral(t)&&ye.string(t.label)&&(ye.undefined(t.textEdit)||Cot.is(t))&&(ye.undefined(t.additionalTextEdits)||ye.typedArray(t.additionalTextEdits,Cot.is))}function k(t,e,r,n,i,a){return t={startLine:t,endLine:e},ye.defined(r)&&(t.startCharacter=r),ye.defined(n)&&(t.endCharacter=n),ye.defined(i)&&(t.kind=i),ye.defined(a)&&(t.collapsedText=a),t}function T(t){return ye.objectLiteral(t)&&ye.uinteger(t.startLine)&&ye.uinteger(t.startLine)&&(ye.undefined(t.startCharacter)||ye.uinteger(t.startCharacter))&&(ye.undefined(t.endCharacter)||ye.uinteger(t.endCharacter))&&(ye.undefined(t.kind)||ye.string(t.kind))}function E(t,e){return{location:t,message:e}}function C(t){return ye.defined(t)&&dot.is(t.location)&&ye.string(t.message)}function _(t){return ye.objectLiteral(t)&&ye.string(t.href)}function S(t,e,r,n,i,a){return t={range:t,message:e},ye.defined(r)&&(t.severity=r),ye.defined(n)&&(t.code=n),ye.defined(i)&&(t.source=i),ye.defined(a)&&(t.relatedInformation=a),t}function A(t){var e;return ye.defined(t)&&uot.is(t.range)&&ye.string(t.message)&&(ye.number(t.severity)||ye.undefined(t.severity))&&(ye.integer(t.code)||ye.string(t.code)||ye.undefined(t.code))&&(ye.undefined(t.codeDescription)||ye.string(null==(e=t.codeDescription)?void 0:e.href))&&(ye.string(t.source)||ye.undefined(t.source))&&(ye.undefined(t.relatedInformation)||ye.typedArray(t.relatedInformation,xot.is))}function L(t,e,...r){return t={title:t,command:e},ye.defined(r)&&0ye.string(t.kind)?Not.is(t)||Iot.is(t)||Rot.is(t):Lot.is(t)))}function J(t){return{uri:t}}function tt(t){return ye.defined(t)&&ye.string(t.uri)}function et(t,e){return{uri:t,version:e}}function rt(t){return ye.defined(t)&&ye.string(t.uri)&&ye.integer(t.version)}function nt(t,e){return{uri:t,version:e}}function it(t){return ye.defined(t)&&ye.string(t.uri)&&(null===t.version||ye.integer(t.version))}function at(t,e,r,n){return{uri:t,languageId:e,version:r,text:n}}function st(t){return ye.defined(t)&&ye.string(t.uri)&&ye.string(t.languageId)&&ye.integer(t.version)&&ye.string(t.text)}function ot(t){return t===n.PlainText||t===n.Markdown}function lt(t){var e=t;return ye.objectLiteral(t)&&Fot.is(e.kind)&&ye.string(e.value)}function ct(t,e,r){return{newText:t,insert:e,replace:r}}function ht(t){return t&&ye.string(t.newText)&&uot.is(t.insert)&&uot.is(t.replace)}function ut(t){return t&&(ye.string(t.detail)||void 0===t.detail)&&(ye.string(t.description)||void 0===t.description)}function dt(t){return{label:t}}function pt(t,e){return{items:t||[],isIncomplete:!!e}}function gt(t){return t.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function ft(t){return ye.string(t)||ye.objectLiteral(t)&&ye.string(t.language)&&ye.string(t.value)}function mt(t){var e=t;return!!e&&ye.objectLiteral(e)&&($ot.is(e.contents)||Hot.is(e.contents)||ye.typedArray(e.contents,Hot.is))&&(void 0===t.range||uot.is(t.range))}function yt(t,e){return e?{label:t,documentation:e}:{label:t}}function vt(t,e,...r){return t={label:t},ye.defined(e)&&(t.documentation=e),ye.defined(r)?t.parameters=r:t.parameters=[],t}function xt(t,e){return t={range:t},ye.number(e)&&(t.kind=e),t}function bt(t,e,r,n,i){return t={name:t,kind:e,location:{uri:n,range:r}},i&&(t.containerName=i),t}function wt(t,e,r,n){return void 0!==n?{name:t,kind:e,location:{uri:r,range:n}}:{name:t,kind:e,location:{uri:r}}}function kt(t,e,r,n,i,a){return t={name:t,detail:e,kind:r,range:n,selectionRange:i},void 0!==a&&(t.children=a),t}function Tt(t){return t&&ye.string(t.name)&&ye.number(t.kind)&&uot.is(t.range)&&uot.is(t.selectionRange)&&(void 0===t.detail||ye.string(t.detail))&&(void 0===t.deprecated||ye.boolean(t.deprecated))&&(void 0===t.children||Array.isArray(t.children))&&(void 0===t.tags||Array.isArray(t.tags))}function Et(t,e,r){return t={diagnostics:t},null!=e&&(t.only=e),null!=r&&(t.triggerKind=r),t}function Ct(t){return ye.defined(t)&&ye.typedArray(t.diagnostics,Tot.is)&&(void 0===t.only||ye.typedArray(t.only,ye.string))&&(void 0===t.triggerKind||t.triggerKind===ilt.Invoked||t.triggerKind===ilt.Automatic)}function _t(t,e,r){let n={title:t},i=!0;return"string"==typeof e?(i=!1,n.kind=e):Eot.is(e)?n.command=e:n.edit=e,i&&void 0!==r&&(n.kind=r),n}function St(t){return t&&ye.string(t.title)&&(void 0===t.diagnostics||ye.typedArray(t.diagnostics,Tot.is))&&(void 0===t.kind||ye.string(t.kind))&&(void 0!==t.edit||void 0!==t.command)&&(void 0===t.command||Eot.is(t.command))&&(void 0===t.isPreferred||ye.boolean(t.isPreferred))&&(void 0===t.edit||Mot.is(t.edit))}function At(t,e){return t={range:t},ye.defined(e)&&(t.data=e),t}function Lt(t){return ye.defined(t)&&uot.is(t.range)&&(ye.undefined(t.command)||Eot.is(t.command))}function Nt(t,e){return{tabSize:t,insertSpaces:e}}function It(t){return ye.defined(t)&&ye.uinteger(t.tabSize)&&ye.boolean(t.insertSpaces)}function Rt(t,e,r){return{range:t,target:e,data:r}}function Mt(t){return ye.defined(t)&&uot.is(t.range)&&(ye.undefined(t.target)||ye.string(t.target))}function Dt(t,e){return{range:t,parent:e}}function Ot(t){return ye.objectLiteral(t)&&uot.is(t.range)&&(void 0===t.parent||i.is(t.parent))}function Pt(t){return ye.objectLiteral(t)&&(void 0===t.resultId||"string"==typeof t.resultId)&&Array.isArray(t.data)&&(0===t.data.length||"number"==typeof t.data[0])}function Bt(t,e){return{range:t,text:e}}function Ft(t){return null!=t&&uot.is(t.range)&&ye.string(t.text)}function $t(t,e,r){return{range:t,variableName:e,caseSensitiveLookup:r}}function zt(t){return null!=t&&uot.is(t.range)&&ye.boolean(t.caseSensitiveLookup)&&(ye.string(t.variableName)||void 0===t.variableName)}function Gt(t,e){return{range:t,expression:e}}function Ut(t){return null!=t&&uot.is(t.range)&&(ye.string(t.expression)||void 0===t.expression)}function qt(t,e){return{frameId:t,stoppedLocation:e}}function jt(t){return ye.defined(t)&&uot.is(t.stoppedLocation)}function Wt(t){return 1===t||2===t}function Yt(t){return{value:t}}function Ht(t){return ye.objectLiteral(t)&&(void 0===t.tooltip||ye.string(t.tooltip)||$ot.is(t.tooltip))&&(void 0===t.location||dot.is(t.location))&&(void 0===t.command||Eot.is(t.command))}function Vt(t,e,r){return t={position:t,label:e},void 0!==r&&(t.kind=r),t}function Xt(t){return ye.objectLiteral(t)&&hot.is(t.position)&&(ye.string(t.label)||ye.typedArray(t.label,xlt.is))&&(void 0===t.kind||vlt.is(t.kind))&&void 0===t.textEdits||ye.typedArray(t.textEdits,Cot.is)&&(void 0===t.tooltip||ye.string(t.tooltip)||$ot.is(t.tooltip))&&(void 0===t.paddingLeft||ye.boolean(t.paddingLeft))&&(void 0===t.paddingRight||ye.boolean(t.paddingRight))}function Kt(t){return{kind:"snippet",value:t}}function Zt(t,e,r,n){return{insertText:t,filterText:e,range:r,command:n}}function Qt(t){return{items:t}}function Jt(t,e){return{range:t,text:e}}function te(t,e){return{triggerKind:t,selectedCompletionInfo:e}}function ee(t){return ye.objectLiteral(t)&&oot.is(t.uri)&&ye.string(t.name)}function re(t,e,r,n){return new Llt(t,e,r,n)}function ne(t){return!!(ye.defined(t)&&ye.string(t.uri)&&(ye.undefined(t.languageId)||ye.string(t.languageId))&&ye.uinteger(t.lineCount)&&ye.func(t.getText)&&ye.func(t.positionAt)&&ye.func(t.offsetAt))}function ie(e,t){let r=e.getText(),n=D(t,(t,e)=>{var r=t.range.start.line-e.range.start.line;return 0==r?t.range.start.character-e.range.start.character:r}),i=r.length;for(let t=n.length-1;0<=t;t--){var a=n[t],s=e.offsetAt(a.range.start),o=e.offsetAt(a.range.end);if(!(o<=i))throw new Error("Overlapping edit");r=r.substring(0,s)+a.newText+r.substring(o,r.length),i=s}return r}function D(n,i){if(!(n.length<=1)){var a=n.length/2|0,s=n.slice(0,a),o=n.slice(a);D(s,i),D(o,i);let t=0,e=0,r=0;for(;tt?n=i:r=i+1}var a=r-1;return hot.create(a,t-e[a])}offsetAt(t){var e,r=this.getLineOffsets();return t.line>=r.length?this._content.length:t.line<0?0:(e=r[t.line],r=t.line+1{Flt(),JK(),Nlt=class{static{me(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){var t;return null!=(t=this.nodeStack[this.nodeStack.length-1])?t:this.rootNode}buildRootNode(t){return this.rootNode=new Olt(t),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(t){var e=new Mlt;return e.grammarSource=t,e.root=this.rootNode,this.current.content.push(e),this.nodeStack.push(e),e}buildLeafNode(t,e){return(t=new Rlt(t.startOffset,t.image.length,OK(t),t.tokenType,!e)).grammarSource=e,t.root=this.rootNode,this.current.content.push(t),t}removeNode(t){var e=t.container;e&&0<=(t=e.content.indexOf(t))&&e.content.splice(t,1)}addHiddenNodes(t){var e,r=[];for(e of t){var n=new Rlt(e.startOffset,e.image.length,OK(e),e.tokenType,!0);n.root=this.rootNode,r.push(n)}let i=this.current,a=!1;if(0{zat(),Blt(),HQ(),Att(),cJ(),$lt(),Glt=Symbol("Datatype"),me(zlt,"isDataTypeNode"),Ult=me(t=>t.endsWith("​")?t:t+"​","withRuleSuffix"),qlt=class{static{me(this,"AbstractLangiumParser")}constructor(t){this._unorderedGroups=new Map,this.allRules=new Map,this.lexer=t.parser.Lexer;var e=this.lexer.definition,r="production"===t.LanguageMetaData.mode;this.wrapper=new Xlt(e,Object.assign(Object.assign({},t.parser.ParserConfig),{skipValidations:r,errorMessageProvider:t.parser.ParserErrorMessageProvider}))}alternatives(t,e){this.wrapper.wrapOr(t,e)}optional(t,e){this.wrapper.wrapOption(t,e)}many(t,e){this.wrapper.wrapMany(t,e)}atLeastOne(t,e){this.wrapper.wrapAtLeastOne(t,e)}getRule(t){return this.allRules.get(t)}isRecording(){return this.wrapper.IS_RECORDING}get unorderedGroups(){return this._unorderedGroups}getRuleStack(){return this.wrapper.RULE_STACK}finalize(){this.wrapper.wrapSelfAnalysis()}},jlt=class extends qlt{static{me(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(t){super(t),this.nodeBuilder=new Nlt,this.stack=[],this.assignmentMap=new Map,this.linker=t.references.Linker,this.converter=t.parser.ValueConverter,this.astReflection=t.shared.AstReflection}rule(t,e){var r=this.computeRuleType(t),r=this.wrapper.DEFINE_RULE(Ult(t.name),this.startImplementation(r,e).bind(this));return this.allRules.set(t.name,r),t.entry&&(this.mainRule=r),r}computeRuleType(t){if(!t.fragment)return ctt(t)?Glt:ptt(t)??t.name}parse(t,e={}){this.nodeBuilder.buildRootNode(t);var t=this.lexerResult=this.lexer.tokenize(t),r=(this.wrapper.input=t.tokens,e.rule?this.allRules.get(e.rule):this.mainRule);if(r)return r=r.call(this.wrapper,{}),this.nodeBuilder.addHiddenNodes(t.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,{value:r,lexerErrors:t.errors,lexerReport:t.report,parserErrors:this.wrapper.errors};throw new Error(e.rule?`No rule found with name '${e.rule}'`:"No main rule available.")}startImplementation(i,a){return t=>{var e,r=!this.isRecording()&&void 0!==i;r&&(this.stack.push(e={$type:i}),i===Glt)&&(e.value="");let n;try{n=a(t)}catch{n=void 0}return n=void 0===n&&r?this.construct():n}}extractHiddenTokens(t){var e=this.lexerResult.hidden;if(!e.length)return[];var r=t.startOffset;for(let t=0;tr)return e.splice(0,t);return e.splice(0,e.length)}consume(e,r,n){if(e=this.wrapper.wrapConsume(e,r),!this.isRecording()&&this.isValidToken(e)){var r=this.extractHiddenTokens(e),r=(this.nodeBuilder.addHiddenNodes(r),this.nodeBuilder.buildLeafNode(e,n)),{assignment:t,isCrossRef:i}=this.getAssignment(n),a=this.current;if(t){var s=UZ(n)?e.image:this.converter.convert(e.image,r);this.assign(t.operator,t.feature,s,r,i)}else if(zlt(a)){let t=e.image;UZ(n)||(t=this.converter.convert(t,r).toString()),a.value+=t}}}isValidToken(t){return!t.isInsertedInRecovery&&!isNaN(t.startOffset)&&"number"==typeof t.endOffset&&!isNaN(t.endOffset)}subrule(t,e,r,n,i){let a;this.isRecording()||r||(a=this.nodeBuilder.buildCompositeNode(n)),r=this.wrapper.wrapSubrule(t,e,i),!this.isRecording()&&a&&0{var e=this.keepStackSize();try{r(t)}finally{this.resetStackSize(e)}}}removeUnexpectedElements(){this.elementStack.splice(this.stackSize)}keepStackSize(){var t=this.elementStack.length;return this.stackSize=t}resetStackSize(t){this.removeUnexpectedElements(),this.stackSize=t}consume(t,e,r){this.wrapper.wrapConsume(t,e),this.isRecording()||(this.lastElementStack=[...this.elementStack,r],this.nextTokenIndex=this.currIdx+1)}subrule(t,e,r,n,i){this.before(n),this.wrapper.wrapSubrule(t,e,i),this.after(n)}before(t){this.isRecording()||this.elementStack.push(t)}after(t){this.isRecording()||0<=(t=this.elementStack.lastIndexOf(t))&&this.elementStack.splice(t)}get currIdx(){return this.wrapper.currIdx}},Vlt={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new Ylt},Xlt=class extends Dat{static{me(this,"ChevrotainWrapper")}constructor(t,e){var r=e&&"maxLookahead"in e;super(t,Object.assign(Object.assign(Object.assign({},Vlt),{lookaheadStrategy:r?new Rit({maxLookahead:e.maxLookahead}):new aot({logging:e.skipValidations?()=>{}:void 0})}),e))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(t,e){return this.RULE(t,e)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(t,e){return this.consume(t,e)}wrapSubrule(t,e,r){return this.subrule(t,e,{ARGS:[r]})}wrapOr(t,e){this.or(t,e)}wrapOption(t,e){this.option(t,e)}wrapMany(t,e){this.many(t,e)}wrapAtLeastOne(t,e){this.atLeastOne(t,e)}}});function Zlt(t,e,r){return Qlt({parser:e,tokens:r,ruleNames:new Map},t),e}function Qlt(t,e){let r=YJ(e,!1),n=EK(e.rules).filter(_Z).filter(t=>r.has(t));for(var i of n){var a=Object.assign(Object.assign({},t),{consume:1,optional:1,subrule:1,many:1,or:1});t.parser.rule(i,Jlt(a,i.definition))}}function Jlt(e,r,t=!1){let n;if(UZ(r))n=cct(e,r);else if(OZ(r))n=tct(e,r);else if(BZ(r))n=Jlt(e,r.terminal);else if($Z(r))n=lct(e,r);else if(WZ(r))n=ect(e,r);else if(PZ(r))n=ict(e,r);else if(XZ(r))n=act(e,r);else if(GZ(r))n=sct(e,r);else{if(!zZ(r))throw new eZ(r.$cstNode,"Unexpected element type: "+r.$type);{let t=e.consume++;n=me(()=>e.parser.consume(t,hnt,r),"method")}}return hct(e,t?void 0:oct(r),n,r.cardinality)}function tct(t,e){let r=gtt(e);return()=>t.parser.action(r,e)}function ect(i,a){let s=a.rule.ref;if(_Z(s)){let e=i.subrule++,r=s.fragment,n=0({});return t=>i.parser.subrule(e,uct(i,s),r,a,n(t))}if(IZ(s)){let t=i.consume++,e=pct(i,s.name);return()=>i.parser.consume(t,e,a)}if(!s)throw new eZ(a.$cstNode,"Undefined rule: "+a.rule.$refText);tZ(s)}function rct(a,t){let s=t.map(t=>nct(t.value));return e=>{var r={};for(let t=0;te(t)||r(t)}if(fZ(n)){let e=nct(n.left),r=nct(n.right);return t=>e(t)&&r(t)}if(kZ(n)){let e=nct(n.value);return t=>!e(t)}if(CZ(n)){let e=n.parameter.ref.name;return t=>void 0!==t&&!0===t[e]}if(gZ(n)){let t=!!n.true;return()=>t}tZ()}function ict(r,n){if(1===n.elements.length)return Jlt(r,n.elements[0]);{let t=[];for(var i of n.elements){var a={ALT:Jlt(r,i,!0)};(i=oct(i))&&(a.GATE=nct(i)),t.push(a)}let e=r.or++;return n=>r.parser.alternatives(e,t.map(t=>{let e={ALT:me(()=>t.ALT(n),"ALT")},r=t.GATE;return r&&(e.GATE=()=>r(n)),e}))}}function act(s,t){if(1===t.elements.length)return Jlt(s,t.elements[0]);let e=[];for(var r of t.elements){var n={ALT:Jlt(s,r,!0)};(r=oct(r))&&(n.GATE=nct(r)),e.push(n)}let o=s.or++,l=me((t,e)=>`uGroup_${t}_`+e.getRuleStack().join("-"),"idFunc"),i=me(a=>s.parser.alternatives(o,e.map((e,r)=>{let t={ALT:me(()=>!0,"ALT")},n=s.parser,i=(t.ALT=()=>{var t;e.ALT(a),n.isRecording()||(t=l(o,n),n.unorderedGroups.get(t)||n.unorderedGroups.set(t,[]),"u"i(a):t.GATE=()=>!n.unorderedGroups.get(l(o,n))?.[r],t})),"alternatives"),a=hct(s,oct(t),i,"*");return t=>{a(t),s.parser.isRecording()||s.parser.unorderedGroups.delete(l(o,s.parser))}}function sct(e,t){let r=t.elements.map(t=>Jlt(e,t));return e=>r.forEach(t=>t(e))}function oct(t){if(GZ(t))return t.guardCondition}function lct(n,i,a=i.terminal){if(a){if(WZ(a)&&_Z(a.rule.ref)){let e=a.rule.ref,r=n.subrule++;return t=>n.parser.subrule(r,uct(n,e),!1,i,t)}if(WZ(a)&&IZ(a.rule.ref)){let t=n.consume++,e=pct(n,a.rule.ref.name);return()=>n.parser.consume(t,e,i)}if(UZ(a)){let t=n.consume++,e=pct(n,a.value);return()=>n.parser.consume(t,e,i)}throw new Error("Could not build cross reference parser")}if(!i.type.ref)throw new Error("Could not resolve reference to type: "+i.type.$refText);if(a=ntt(i.type.ref)?.terminal)return lct(n,i,a);throw new Error("Could not find name assignment for type: "+gtt(i.type.ref))}function cct(t,e){let r=t.consume++,n=t.tokens[e.value];if(n)return()=>t.parser.consume(r,n,e);throw new Error("Could not find token for keyword: "+e.value)}function hct(n,t,i,e){let a=t&&nct(t);if(!e){if(a){let e=n.or++;return t=>n.parser.alternatives(e,[{ALT:me(()=>i(t),"ALT"),GATE:me(()=>a(t),"GATE")},{ALT:Aat(),GATE:me(()=>!a(t),"GATE")}])}return i}if("*"===e){let e=n.many++;return t=>n.parser.many(e,{DEF:me(()=>i(t),"DEF"),GATE:a?()=>a(t):void 0})}if("+"===e){let r=n.many++;if(a){let e=n.or++;return t=>n.parser.alternatives(e,[{ALT:me(()=>n.parser.atLeastOne(r,{DEF:me(()=>i(t),"DEF")}),"ALT"),GATE:me(()=>a(t),"GATE")},{ALT:Aat(),GATE:me(()=>!a(t),"GATE")}])}return t=>n.parser.atLeastOne(r,{DEF:me(()=>i(t),"DEF")})}if("?"===e){let e=n.optional++;return t=>n.parser.optional(e,{DEF:me(()=>i(t),"DEF"),GATE:a?()=>a(t):void 0})}tZ()}function uct(t,e){if(e=dct(t,e),t=t.parser.getRule(e))return t;throw new Error(`Rule "${e}" not found."`)}function dct(n,i){if(_Z(i))return i.name;if(n.ruleNames.has(i))return n.ruleNames.get(i);{let t=i,e=t.$container,r=i.$type;for(;!_Z(e);)(GZ(e)||PZ(e)||XZ(e))&&(r=e.elements.indexOf(t).toString()+":"+r),e=(t=e).$container;return r=e.name+":"+r,n.ruleNames.set(i,r),r}}function pct(t,e){if(t=t.tokens[e])return t;throw new Error(`Token "${e}" not found."`)}var gct=t(()=>{zat(),HQ(),rZ(),NK(),Att(),me(Zlt,"createParser"),me(Qlt,"buildRules"),me(Jlt,"buildElement"),me(tct,"buildAction"),me(ect,"buildRuleCall"),me(rct,"buildRuleCallPredicate"),me(nct,"buildPredicate"),me(ict,"buildAlternatives"),me(act,"buildUnorderedGroup"),me(sct,"buildGroup"),me(oct,"getGuardCondition"),me(lct,"buildCrossReference"),me(cct,"buildKeyword"),me(hct,"wrap"),me(uct,"getRule"),me(dct,"getRuleName"),me(pct,"getToken")});function fct(t){var e=t.Grammar,r=t.parser.Lexer;return Zlt(e,t=new Hlt(t),r.definition),t.finalize(),t}var mct=t(()=>{Klt(),gct(),me(fct,"createCompletionParser")});function yct(t){return(t=vct(t)).finalize(),t}function vct(t){var e=t.Grammar,r=t.parser.Lexer;return Zlt(e,new jlt(t),r.definition)}var xct,bct,wct,kct=t(()=>{Klt(),gct(),me(yct,"createLangiumParser"),me(vct,"prepareLangiumParser")}),Tct=t(()=>{zat(),HQ(),cJ(),Att(),UJ(),NK(),xct=class{static{me(this,"DefaultTokenBuilder")}constructor(){this.diagnostics=[]}buildTokens(t,e){let r=EK(YJ(t,!1)),n=this.buildTerminalTokens(r),i=this.buildKeywordTokens(r,n,e);return n.forEach(t=>{var e=t.PATTERN;"object"==typeof e&&e&&"test"in e&&RJ(e)?i.unshift(t):i.push(t)}),i}flushLexingReport(t){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){var t=[...this.diagnostics];return this.diagnostics=[],t}buildTerminalTokens(t){return t.filter(IZ).filter(t=>!t.fragment).map(t=>this.buildTerminalToken(t)).toArray()}buildTerminalToken(t){var e=vtt(t),r=this.requiresCustomPattern(e)?this.regexPatternFunction(e):e,n={name:t.name,PATTERN:r};return"function"==typeof r&&(n.LINE_BREAKS=!0),t.hidden&&(n.GROUP=RJ(e)?jrt.SKIPPED:"hidden"),n}requiresCustomPattern(t){return!!(t.flags.includes("u")||t.flags.includes("s")||t.source.includes("?<=")||t.source.includes("?(r.lastIndex=e,r.exec(t))}buildKeywordTokens(t,e,r){return t.filter(_Z).flatMap(t=>eJ(t).filter(UZ)).distinct(t=>t.value).toArray().sort((t,e)=>e.value.length-t.value.length).map(t=>this.buildKeywordToken(t,e,!!r?.caseInsensitive))}buildKeywordToken(t,e,r){return r=this.buildKeywordPattern(t,r),t={name:t.value,PATTERN:r,LONGER_ALT:this.findLongerAlt(t,e)},"function"==typeof r&&(t.LINE_BREAKS=!0),t}buildKeywordPattern(t,e){return e?new RegExp(DJ(t.value)):t.value}findLongerAlt(n,t){return t.reduce((t,e)=>{var r=e?.PATTERN;return r?.source&&OJ("^"+r.source+"$",n.value)&&t.push(e),t},[])}}}),Ect=t(()=>{function t(e){let r="";for(let t=1;t{var e,r;function n(){if(void 0===e)throw new Error("No runtime abstraction layer installed");return e}function i(t){if(void 0===t)throw new Error("No runtime abstraction layer provided");e=t}Object.defineProperty(t,"__esModule",{value:!0}),me(n,"RAL"),r=n,me(i,"install"),r.install=i,t.default=n}),_ct=rPt(t=>{function e(t){return!0===t||!1===t}function r(t){return"string"==typeof t||t instanceof String}function n(t){return"number"==typeof t||t instanceof Number}function i(t){return t instanceof Error}function a(t){return"function"==typeof t}function s(t){return Array.isArray(t)}function o(t){return s(t)&&t.every(t=>r(t))}Object.defineProperty(t,"__esModule",{value:!0}),t.stringArray=t.array=t.func=t.error=t.number=t.string=t.boolean=void 0,me(e,"boolean"),t.boolean=e,me(r,"string"),t.string=r,me(n,"number"),t.number=n,me(i,"error"),t.error=i,me(a,"func"),t.func=a,me(s,"array"),t.array=s,me(o,"stringArray"),t.stringArray=o}),Sct=rPt(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.Emitter=e.Event=void 0;var s=Cct();{var r=e.Event={};let t={dispose(){}};r.None=function(){return t}}var i=class{static{me(this,"CallbackList")}add(t,e=null,r){this._callbacks||(this._callbacks=[],this._contexts=[]),this._callbacks.push(t),this._contexts.push(e),Array.isArray(r)&&r.push({dispose:me(()=>this.remove(t,e),"dispose")})}remove(n,i=null){if(this._callbacks){let r=!1;for(let t=0,e=this._callbacks.length;t{this._callbacks||(this._callbacks=new i),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(t,e);let n={dispose:me(()=>{this._callbacks&&(this._callbacks.remove(t,e),n.dispose=a._noop,this._options)&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this)},"dispose")};return Array.isArray(r)&&r.push(n),n}),this._event}fire(t){this._callbacks&&this._callbacks.invoke.call(this._callbacks,t)}dispose(){this._callbacks&&(this._callbacks.dispose(),this._callbacks=void 0)}};(e.Emitter=r)._noop=function(){}}),Act=rPt(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.CancellationTokenSource=t.CancellationToken=void 0;var e,r,n=Cct(),i=_ct(),a=Sct();function s(t){return t&&(t===r.None||t===r.Cancelled||i.boolean(t.isCancellationRequested)&&!!t.onCancellationRequested)}(r=e||(t.CancellationToken=e={})).None=Object.freeze({isCancellationRequested:!1,onCancellationRequested:a.Event.None}),r.Cancelled=Object.freeze({isCancellationRequested:!0,onCancellationRequested:a.Event.None}),me(s,"is"),r.is=s;var o=Object.freeze(function(t,e){let r=(0,n.default)().timer.setTimeout(t.bind(e),0);return{dispose(){r.dispose()}}}),l=class{static{me(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{me(this,"CancellationTokenSource")}get token(){return this._token||(this._token=new l),this._token}cancel(){this._token?this._token.cancel():this._token=e.Cancelled}dispose(){this._token?this._token instanceof l&&this._token.dispose():this._token=e.None}};t.CancellationTokenSource=c}),Lct={},Nct=t(()=>{Y(Lct,tt(Act(),1))});function Ict(){return new Promise(t=>{"u"{Nct(),me(Ict,"delayNextTick"),Pct=0,Bct=10,me(Rct,"startCancelableOperation"),me(Mct,"setInterruptionPeriod"),Fct=Symbol("OperationCancelled"),me(Dct,"isOperationCancelled"),me(Oct,"interruptAndCheck"),$ct=class{static{me(this,"Deferred")}constructor(){this.promise=new Promise((e,r)=>{this.resolve=t=>(e(t),this),this.reject=t=>(r(t),this)})}}});function Gct(n,i){if(!(n.length<=1)){var a=n.length/2|0,s=n.slice(0,a),o=n.slice(a);Gct(s,i),Gct(o,i);let t=0,e=0,r=0;for(;tr.line||e.line===r.line&&e.character>r.character?{start:r,end:e}:t}function Wct(t){var e=jct(t.range);return e!==t.range?{newText:t.newText,range:e}:t}var Yct,Hct,Vct,Xct,Kct,Zct,Qct,Jct,tht,eht,rht=t(()=>{function t(t,e,r,n){return new Yct(t,e,r,n)}function e(t,e,r){if(t instanceof Yct)return t.update(e,r),t;throw new Error("TextDocument.update: document must be created by TextDocument.create")}function r(t,e){let r=t.getText(),n=Gct(e.map(Wct),(t,e)=>{var r=t.range.start.line-e.range.start.line;return 0==r?t.range.start.character-e.range.start.character:r}),i=0,a=[];for(var s of n){var o=t.offsetAt(s.range.start);if(oi&&a.push(r.substring(i,o)),s.newText.length&&a.push(s.newText),i=t.offsetAt(s.range.end)}return a.push(r.substr(i)),a.join("")}var n;Yct=class i{static{me(this,"FullTextDocument")}constructor(t,e,r,n){this._uri=t,this._languageId=e,this._version=r,this._content=n,this._lineOffsets=void 0}get uri(){return this._uri}get languageId(){return this._languageId}get version(){return this._version}getText(t){var e;return t?(e=this.offsetAt(t.start),t=this.offsetAt(t.end),this._content.substring(e,t)):this._content}update(t,e){for(var a of t)if(i.isIncremental(a)){var s=jct(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),t=Math.max(s.end.line,0),n=this._lineOffsets,i=Uct(a.text,!1,o);if(t-r===i.length)for(let t=0,e=i.length;tt?n=i:r=i+1}var a=r-1;return{line:a,character:(t=this.ensureBeforeEOL(t,e[a]))-e[a]}}offsetAt(t){var e,r=this.getLineOffsets();return t.line>=r.length?this._content.length:t.line<0?0:(e=r[t.line],t.character<=0?e:(r=t.line+1{var r={470:t=>{function d(t){if("string"!=typeof t)throw new TypeError("Path must be a string. Received "+JSON.stringify(t))}function a(t,e){for(var r,n="",i=0,a=-1,s=0,o=0;o<=t.length;++o){if(o{for(var r in e)h.o(e,r)&&!h.o(t,r)&&Object.defineProperty(t,r,{enumerable:!0,get:e[r]})},h.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e);var u,d,p={};{let n,r=((h.r=t=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})})(p),h.d(p,{URI:me(()=>w,"URI"),Utils:me(()=>u,"Utils")}),"object"==typeof process?n="win32"===process.platform:"object"==typeof navigator&&(n=0<=navigator.userAgent.indexOf("Windows")),/^\w[\w\d+.-]*$/),i=/^\//,a=/^\/\//;function g(t,e){if(!t.scheme&&e)throw new Error(`[UriError]: Scheme is missing: {scheme: "", authority: "${t.authority}", path: "${t.path}", query: "${t.query}", fragment: "${t.fragment}"}`);if(t.scheme&&!r.test(t.scheme))throw new Error("[UriError]: Scheme contains illegal characters.");if(t.path)if(t.authority){if(!i.test(t.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(t.path))throw new Error('[UriError]: If a URI does not contain an authority component, then the path cannot begin with two slash characters ("//")')}me(g,"s");let s=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class w{static{me(this,"f")}static isUri(t){return t instanceof w||!!t&&"string"==typeof t.authority&&"string"==typeof t.fragment&&"string"==typeof t.path&&"string"==typeof t.query&&"string"==typeof t.scheme&&"string"==typeof t.fsPath&&"function"==typeof t.with&&"function"==typeof t.toString}scheme;authority;path;query;fragment;constructor(t,e,r,n,i,a=!1){"object"==typeof t?(this.scheme=t.scheme||"",this.authority=t.authority||"",this.path=t.path||"",this.query=t.query||"",this.fragment=t.fragment||""):(this.scheme=t||a?t:"file",this.authority=e||"",this.path=((t,e)=>{switch(t){case"https":case"http":case"file":e?"/"!==e[0]&&(e="/"+e):e="/"}return e})(this.scheme,r||""),this.query=n||"",this.fragment=i||"",g(this,a))}get fsPath(){return y(this,!1)}with(t){if(!t)return this;let{scheme:e,authority:r,path:n,query:i,fragment:a}=t;return void 0===e?e=this.scheme:null===e&&(e=""),void 0===r?r=this.authority:null===r&&(r=""),void 0===n?n=this.path:null===n&&(n=""),void 0===i?i=this.query:null===i&&(i=""),void 0===a?a=this.fragment:null===a&&(a=""),e===this.scheme&&r===this.authority&&n===this.path&&i===this.query&&a===this.fragment?this:new k(e,r,n,i,a)}static parse(t,e=!1){return(t=s.exec(t))?new k(t[2]||"",b(t[4]||""),b(t[5]||""),b(t[7]||""),b(t[9]||""),e):new k("","","","","")}static file(t){let e="",r;return"/"===(t=n?t.replace(/\\/g,"/"):t)[0]&&"/"===t[1]&&(t=-1===(r=t.indexOf("/",2))?(e=t.substring(2),"/"):(e=t.substring(2,r),t.substring(r)||"/")),new k("file",e,t,"","")}static from(t){return g(t=new k(t.scheme,t.authority,t.path,t.query,t.fragment),!0),t}toString(t=!1){return v(this,t)}toJSON(){return this}static revive(t){var e;return t&&(t instanceof w?t:((e=new k(t))._formatted=t.external,e._fsPath=t._sep===o?t.fsPath:null,e))}}let o=n?1:void 0;class k extends w{static{me(this,"l")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=y(this,!1)),this._fsPath}toString(t=!1){return t?v(this,!0):(this._formatted||(this._formatted=v(this,!1)),this._formatted)}toJSON(){var t={$mid:1};return this._fsPath&&(t.fsPath=this._fsPath,t._sep=o),this._formatted&&(t.external=this._formatted),this.path&&(t.path=this.path),this.scheme&&(t.scheme=this.scheme),this.authority&&(t.authority=this.authority),this.query&&(t.query=this.query),this.fragment&&(t.fragment=this.fragment),t}}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 f(e,r,n){let i,a=-1;for(let t=0;tx(t)):t}me(b,"C");let t=h(470),c=t.posix||t;(d=u=u||{}).joinPath=function(t,...e){return t.with({path:c.join(t.path,...e)})},d.resolvePath=function(t,...e){let r=t.path,n=!1,i=("/"!==r[0]&&(r="/"+r,n=!0),c.resolve(r,...e));return n&&"/"===i[0]&&!t.authority&&(i=i.substring(1)),t.with({path:i})},d.dirname=function(t){if(0===t.path.length||"/"===t.path)return t;let e=c.dirname(t.path);return 1===e.length&&46===e.charCodeAt(0)&&(e=""),t.with({path:e})},d.basename=function(t){return c.basename(t.path)},d.extname=function(t){return c.extname(t.path)}}({URI:Vct,Utils:Xct}=p)}),iht=t(()=>{function t(t,e){return t?.toString()===e?.toString()}function e(t,e){let r="string"==typeof t?t:t.path,n="string"==typeof e?e:e.path,i=r.split("/").filter(t=>00{var t;rht(),aht(),Nct(),NK(),iht(),(t=Zct=Zct||{})[t.Changed=0]="Changed",t[t.Parsed=1]="Parsed",t[t.IndexedContent=2]="IndexedContent",t[t.ComputedScopes=3]="ComputedScopes",t[t.Linked=4]="Linked",t[t.IndexedReferences=5]="IndexedReferences",t[t.Validated=6]="Validated",Qct=class{static{me(this,"DefaultLangiumDocumentFactory")}constructor(t){this.serviceRegistry=t.ServiceRegistry,this.textDocuments=t.workspace.TextDocuments,this.fileSystemProvider=t.workspace.FileSystemProvider}async fromUri(t,e=Lct.CancellationToken.None){var r=await this.fileSystemProvider.readFile(t);return this.createAsync(t,r,e)}fromTextDocument(t,e,r){return e=e??Vct.parse(t.uri),Lct.CancellationToken.is(r)?this.createAsync(e,t,r):this.create(e,t,r)}fromString(t,e,r){return Lct.CancellationToken.is(r)?this.createAsync(e,t,r):this.create(e,t,r)}fromModel(t,e){return this.create(e,{$model:t})}create(t,e,r){var n;return"string"==typeof e?(n=this.parse(t,e,r),this.createLangiumDocument(n,t,void 0,e)):"$model"in e?(n={value:e.$model,parserErrors:[],lexerErrors:[]},this.createLangiumDocument(n,t)):(n=this.parse(t,e.getText(),r),this.createLangiumDocument(n,t,e))}async createAsync(t,e,r){var n;return"string"==typeof e?(n=await this.parseAsync(t,e,r),this.createLangiumDocument(n,t,void 0,e)):(n=await this.parseAsync(t,e.getText(),r),this.createLangiumDocument(n,t,e))}createLangiumDocument(e,r,t,n){let i;if(t)i={parseResult:e,uri:r,state:Zct.Parsed,references:[],textDocument:t};else{let t=this.createTextDocumentGetter(r,n);i={parseResult:e,uri:r,state:Zct.Parsed,references:[],get textDocument(){return t()}}}return e.value.$document=i}async update(t,e){var r=null==(r=t.parseResult.value.$cstNode)?void 0:r.root.fullText,n=null==(n=this.textDocuments)?void 0:n.get(t.uri.toString()),i=n?n.getText():await this.fileSystemProvider.readFile(t.uri);return n?Object.defineProperty(t,"textDocument",{value:n}):(n=this.createTextDocumentGetter(t.uri,i),Object.defineProperty(t,"textDocument",{get:n})),r!==i&&(t.parseResult=await this.parseAsync(t.uri,i,e),t.parseResult.value.$document=t),t.state=Zct.Parsed,t}parse(t,e,r){return this.serviceRegistry.getServices(t).parser.LangiumParser.parse(e,r)}parseAsync(t,e,r){return this.serviceRegistry.getServices(t).parser.AsyncParser.parse(e,r)}createTextDocumentGetter(t,e){let r=this.serviceRegistry,n;return()=>n=n??Hct.create(t.toString(),r.getServices(t).LanguageMetaData.languageId,0,e??"")}},Jct=class{static{me(this,"DefaultLangiumDocuments")}constructor(t){this.documentMap=new Map,this.langiumDocumentFactory=t.workspace.LangiumDocumentFactory,this.serviceRegistry=t.ServiceRegistry}get all(){return EK(this.documentMap.values())}addDocument(t){var e=t.uri.toString();if(this.documentMap.has(e))throw new Error(`A document with the URI '${e}' is already present.`);this.documentMap.set(e,t)}getDocument(t){return t=t.toString(),this.documentMap.get(t)}async getOrCreateDocument(t,e){return this.getDocument(t)||(t=await this.langiumDocumentFactory.fromUri(t,e),this.addDocument(t),t)}createDocument(t,e,r){return r?this.langiumDocumentFactory.fromString(e,t,r).then(t=>(this.addDocument(t),t)):(r=this.langiumDocumentFactory.fromString(e,t),this.addDocument(r),r)}hasDocument(t){return this.documentMap.has(t.toString())}invalidateDocument(t){var e=t.toString();return(e=this.documentMap.get(e))&&(this.serviceRegistry.getServices(t).references.Linker.unlink(e),e.state=Zct.Changed,e.precomputedScopes=void 0,e.diagnostics=void 0),e}deleteDocument(t){var t=t.toString(),e=this.documentMap.get(t);return e&&(e.state=Zct.Changed,this.documentMap.delete(t)),e}}}),sht=t(()=>{Nct(),wK(),cJ(),zct(),aht(),tht=Symbol("ref_resolving"),eht=class{static{me(this,"DefaultLinker")}constructor(t){this.reflection=t.shared.AstReflection,this.langiumDocuments=()=>t.shared.workspace.LangiumDocuments,this.scopeProvider=t.references.ScopeProvider,this.astNodeLocator=t.workspace.AstNodeLocator}async link(e,t=Lct.CancellationToken.None){for(var r of rJ(e.parseResult.value))await Oct(t),iJ(r).forEach(t=>this.doLink(t,e))}doLink(t,e){var r=t.reference;if(void 0===r._ref){r._ref=tht;try{var n,i=this.getCandidate(t);mK(i)?r._ref=i:(r._nodeDescription=i,this.langiumDocuments().hasDocument(i.documentUri)?(n=this.loadAstNode(i),r._ref=n??this.createLinkingError(t,i)):r._ref=void 0)}catch(e){console.error(`An error occurred while resolving reference to '${r.$refText}':`,e),i=null!=(n=e.message)?n:String(e),r._ref=Object.assign(Object.assign({},t),{message:`An error occurred while resolving reference to '${r.$refText}': `+i})}e.references.push(r)}}unlink(t){for(var e of t.references)delete e._ref,delete e._nodeDescription;t.references=[]}getCandidate(t){return this.scopeProvider.getScope(t).getElement(t.reference.$refText)??this.createLinkingError(t)}buildReference(n,i,t,a){let s=this,o={$refNode:t,$refText:a,get ref(){var t;if(pK(this._ref))return this._ref;if(fK(this._nodeDescription)){var e=s.loadAstNode(this._nodeDescription);this._ref=e??s.createLinkingError({reference:o,container:n,property:i},this._nodeDescription)}else if(void 0===this._ref){this._ref=tht;var e=JQ(n).$document,r=s.getLinkedNode({reference:o,container:n,property:i});if(r.error&&e&&e.state{Att(),me(oht,"isNamed"),lht=class{static{me(this,"DefaultNameProvider")}getName(t){if(oht(t))return t.name}getNameNode(t){return ZJ(t.$cstNode,"name")}}}),Tht=t(()=>{Att(),wK(),cJ(),JK(),NK(),iht(),cht=class{static{me(this,"DefaultReferences")}constructor(t){this.nameProvider=t.references.NameProvider,this.index=t.shared.workspace.IndexManager,this.nodeLocator=t.workspace.AstNodeLocator}findDeclaration(t){if(t){var e=rtt(t),r=t.astNode;if(e&&r){if(gK(e=r[e.feature]))return e.ref;if(Array.isArray(e))for(var n of e)if(gK(n)&&n.$refNode&&n.$refNode.offset<=t.offset&&n.$refNode.end>=t.end)return n.ref}if(r&&(e=this.nameProvider.getNameNode(r))&&(e===t||DK(t,e)))return r}}findDeclarationNode(t){if((t=this.findDeclaration(t))?.$cstNode)return this.nameProvider.getNameNode(t)??t.$cstNode}findReferences(t,e){var r,n=[];e.includeDeclaration&&(r=this.getReferenceToSelf(t))&&n.push(r);let i=this.index.findAllReferences(t,this.nodeLocator.getAstNodePath(t));return e.documentUri&&(i=i.filter(t=>Kct.equals(t.sourceUri,e.documentUri))),n.push(...i),EK(n)}getReferenceToSelf(t){var e,r=this.nameProvider.getNameNode(t);if(r)return e=QQ(t),t=this.nodeLocator.getAstNodePath(t),{sourceUri:e.uri,sourcePath:t,targetUri:e.uri,targetPath:t,segment:PK(r),local:!0}}}}),Eht=t(()=>{NK(),hht=class{static{me(this,"MultiMap")}constructor(t){if(this.map=new Map,t)for(var[e,r]of t)this.add(e,r)}get size(){return LK.sum(EK(this.map.values()).map(t=>t.length))}clear(){this.map.clear()}delete(t,e){var r;return void 0===e?this.map.delete(t):!!((r=this.map.get(t))&&0<=(e=r.indexOf(e)))&&(1===r.length?this.map.delete(t):r.splice(e,1),!0)}get(t){return null!=(t=this.map.get(t))?t:[]}has(t,e){return void 0===e?this.map.has(t):!!(t=this.map.get(t))&&0<=t.indexOf(e)}add(t,e){return this.map.has(t)?this.map.get(t).push(e):this.map.set(t,[e]),this}addAll(t,e){return this.map.has(t)?this.map.get(t).push(...e):this.map.set(t,Array.from(e)),this}forEach(r){this.map.forEach((t,e)=>t.forEach(t=>r(t,e,this)))}[Symbol.iterator](){return this.entries().iterator()}entries(){return EK(this.map.entries()).flatMap(([e,t])=>t.map(t=>[e,t]))}keys(){return EK(this.map.keys())}values(){return EK(this.map.values()).flat()}entriesGroupedByKey(){return EK(this.map.entries())}},uht=class{static{me(this,"BiMap")}get size(){return this.map.size}constructor(t){if(this.map=new Map,this.inverse=new Map,t)for(var[e,r]of t)this.set(e,r)}clear(){this.map.clear(),this.inverse.clear()}set(t,e){return this.map.set(t,e),this.inverse.set(e,t),this}get(t){return this.map.get(t)}getKey(t){return this.inverse.get(t)}delete(t){var e=this.map.get(t);return void 0!==e&&(this.map.delete(t),this.inverse.delete(e),!0)}}}),Cht=t(()=>{Nct(),cJ(),Eht(),zct(),dht=class{static{me(this,"DefaultScopeComputation")}constructor(t){this.nameProvider=t.references.NameProvider,this.descriptions=t.workspace.AstNodeDescriptionProvider}async computeExports(t,e=Lct.CancellationToken.None){return this.computeExportsForNode(t.parseResult.value,t,void 0,e)}async computeExportsForNode(t,e,r=tJ,n=Lct.CancellationToken.None){var i,a=[];this.exportNode(t,a,e);for(i of r(t))await Oct(n),this.exportNode(i,a,e);return a}exportNode(t,e,r){var n=this.nameProvider.getName(t);n&&e.push(this.descriptions.createDescription(t,n,r))}async computeLocalScopes(t,e=Lct.CancellationToken.None){var r,n=t.parseResult.value,i=new hht;for(r of eJ(n))await Oct(e),this.processNode(r,t,i);return i}processNode(t,e,r){var n,i=t.$container;i&&(n=this.nameProvider.getName(t))&&r.add(i,this.descriptions.createDescription(t,n,e))}}}),_ht=t(()=>{NK(),pht=class{static{me(this,"StreamScope")}constructor(t,e,r){this.elements=t,this.outerScope=e,this.caseInsensitive=null!=(t=r?.caseInsensitive)&&t}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(e){return(this.caseInsensitive?this.elements.find(t=>t.name.toLowerCase()===e.toLowerCase()):this.elements.find(t=>t.name===e))||(this.outerScope?this.outerScope.getElement(e):void 0)}},ght=class{static{me(this,"MapScope")}constructor(t,e,r){var n;this.elements=new Map,this.caseInsensitive=null!=(r=r?.caseInsensitive)&&r;for(n of t){var i=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.set(i,n)}this.outerScope=e}getElement(t){var e=this.caseInsensitive?t.toLowerCase():t;return this.elements.get(e)||(this.outerScope?this.outerScope.getElement(t):void 0)}getAllElements(){let t=EK(this.elements.values());return t=this.outerScope?t.concat(this.outerScope.getAllElements()):t}},fht={getElement(){},getAllElements(){return _K}}}),Sht=t(()=>{mht=class{static{me(this,"DisposableCache")}constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(t){this.toDispose.push(t)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(t=>t.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}},yht=class extends mht{static{me(this,"SimpleCache")}constructor(){super(...arguments),this.cache=new Map}has(t){return this.throwIfDisposed(),this.cache.has(t)}set(t,e){this.throwIfDisposed(),this.cache.set(t,e)}get(t,e){return this.throwIfDisposed(),this.cache.has(t)?this.cache.get(t):e?(e=e(),this.cache.set(t,e),e):void 0}delete(t){return this.throwIfDisposed(),this.cache.delete(t)}clear(){this.throwIfDisposed(),this.cache.clear()}},vht=class extends mht{static{me(this,"ContextCache")}constructor(t){super(),this.cache=new Map,this.converter=t??(t=>t)}has(t,e){return this.throwIfDisposed(),this.cacheForContext(t).has(e)}set(t,e,r){this.throwIfDisposed(),this.cacheForContext(t).set(e,r)}get(t,e,r){return this.throwIfDisposed(),(t=this.cacheForContext(t)).has(e)?t.get(e):r?(r=r(),t.set(e,r),r):void 0}delete(t,e){return this.throwIfDisposed(),this.cacheForContext(t).delete(e)}clear(t){this.throwIfDisposed(),t?(t=this.converter(t),this.cache.delete(t)):this.cache.clear()}cacheForContext(t){let e=this.converter(t),r=this.cache.get(e);return r||(r=new Map,this.cache.set(e,r)),r}},xht=class extends vht{static{me(this,"DocumentCache")}constructor(t,e){super(t=>t.toString()),e?(this.toDispose.push(t.workspace.DocumentBuilder.onDocumentPhase(e,t=>{this.clear(t.uri.toString())})),this.toDispose.push(t.workspace.DocumentBuilder.onUpdate((t,e)=>{for(var r of e)this.clear(r)}))):this.toDispose.push(t.workspace.DocumentBuilder.onUpdate((t,e)=>{var r;for(r of t.concat(e))this.clear(r)}))}},bht=class extends yht{static{me(this,"WorkspaceCache")}constructor(t,e){super(),e?(this.toDispose.push(t.workspace.DocumentBuilder.onBuildPhase(e,()=>{this.clear()})),this.toDispose.push(t.workspace.DocumentBuilder.onUpdate((t,e)=>{0{this.clear()}))}}}),Aht=t(()=>{_ht(),cJ(),NK(),Sht(),wht=class{static{me(this,"DefaultScopeProvider")}constructor(t){this.reflection=t.shared.AstReflection,this.nameProvider=t.references.NameProvider,this.descriptions=t.workspace.AstNodeDescriptionProvider,this.indexManager=t.shared.workspace.IndexManager,this.globalScopeCache=new bht(t.shared)}getScope(e){let r=[],n=this.reflection.getReferenceType(e),i=QQ(e.container).precomputedScopes;if(i){let t=e.container;do{var a=i.get(t);0this.reflection.isSubtype(t.type,n))),t=t.$container}while(t)}let s=this.getGlobalScope(n,e);for(let t=r.length-1;0<=t;t--)s=this.createScope(r[t],s);return s}createScope(t,e,r){return new pht(EK(t),e,r)}createScopeForNodes(t,e,r){return t=EK(t).map(t=>{var e=this.nameProvider.getName(t);if(e)return this.descriptions.createDescription(t,e)}).nonNullable(),new pht(t,e,r)}getGlobalScope(t,e){return this.globalScopeCache.get(t,()=>new ght(this.indexManager.allElements(t)))}}});function Lht(t){return"string"==typeof t.$comment}function Nht(t){return"object"==typeof t&&!!t&&("$ref"in t||"$error"in t)}var Iht,Rht,Mht=t(()=>{nht(),wK(),cJ(),Att(),me(Lht,"isAstNodeWithComment"),me(Nht,"isIntermediateReference"),Iht=class{static{me(this,"DefaultJsonSerializer")}constructor(t){this.ignoreProperties=new Set(["$container","$containerProperty","$containerIndex","$document","$cstNode"]),this.langiumDocuments=t.shared.workspace.LangiumDocuments,this.astNodeLocator=t.workspace.AstNodeLocator,this.nameProvider=t.references.NameProvider,this.commentProvider=t.documentation.CommentProvider}serialize(t,e){let r=e??{},n=e?.replacer,i=me((t,e)=>this.replacer(t,e,r),"defaultReplacer"),a=n?(t,e)=>n(t,e,i):i;try{return this.currentDocument=QQ(t),JSON.stringify(t,a,e?.space)}finally{this.currentDocument=void 0}}deserialize(t,e){return e=e??{},t=JSON.parse(t),this.linkNode(t,t,e),t}replacer(e,r,{refText:n,sourceText:i,textRegions:a,comments:s,uriConverter:o}){if(!this.ignoreProperties.has(e)){if(gK(r)){var l=r.ref,n=n?r.$refText:void 0;if(l){let t=QQ(l),e="";return this.currentDocument&&this.currentDocument!==t&&(e=o?o(t.uri,r):t.uri.toString()),o=this.astNodeLocator.getAstNodePath(l),{$ref:e+"#"+o,$refText:n}}return{$error:null!=(o=null==(l=r.error)?void 0:l.message)?o:"Could not resolve reference",$refText:n}}if(pK(r)){let t;return a&&(t=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},r)),!e||r.$document)&&t?.$textRegion&&(t.$textRegion.documentURI=null==(l=this.currentDocument)?void 0:l.uri.toString()),i&&!e&&((t=t??Object.assign({},r)).$sourceText=null==(o=r.$cstNode)?void 0:o.text),s&&(t=t??Object.assign({},r),n=this.commentProvider.getComment(r))&&(t.$comment=n.replace(/\r/g,"")),t??r}return r}}addAstNodeRegionWithAssignmentsTo(n){let i=me(t=>({offset:t.offset,end:t.end,length:t.length,range:t.range}),"createDocumentSegment");if(n.$cstNode){let t=n.$textRegion=i(n.$cstNode),r=t.assignments={};return Object.keys(n).filter(t=>!t.startsWith("$")).forEach(t=>{var e=KJ(n.$cstNode,t).map(i);0!==e.length&&(r[t]=e)}),n}}linkNode(e,r,n,t,i,a){for(var[s,o]of Object.entries(e))if(Array.isArray(o))for(let t=0;t{iht(),Rht=class{static{me(this,"DefaultServiceRegistry")}get map(){return this.fileExtensionMap}constructor(t){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.textDocuments=t?.workspace.TextDocuments}register(t){var e,r=t.LanguageMetaData;for(e of r.fileExtensions)this.fileExtensionMap.has(e)&&console.warn(`The file extension ${e} is used by multiple languages. It is now assigned to '${r.languageId}'.`),this.fileExtensionMap.set(e,t);this.languageIdMap.set(r.languageId,t),1===this.languageIdMap.size?this.singleton=t:this.singleton=void 0}getServices(t){if(void 0!==this.singleton)return this.singleton;if(0===this.languageIdMap.size)throw new Error("The service registry is empty. Use `register` to register the services of a language.");var e=null==(e=null==(e=this.textDocuments)?void 0:e.get(t))?void 0:e.languageId;if(void 0!==e){var r=this.languageIdMap.get(e);if(r)return r}if(r=Kct.extname(t),t=this.fileExtensionMap.get(r))return t;throw e?new Error(`The service registry contains no services for the extension '${r}' for language '${e}'.`):new Error(`The service registry contains no services for the extension '${r}'.`)}hasServices(t){try{return this.getServices(t),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}}});function Oht(t){return{code:t}}var Pht,Bht,Fht=t(()=>{$dt(),Eht(),zct(),NK(),me(Oht,"diagnosticData"),(Pht=Pht||{}).all=["fast","slow","built-in"],Bht=class{static{me(this,"ValidationRegistry")}constructor(t){this.entries=new hht,this.entriesBefore=[],this.entriesAfter=[],this.reflection=t.shared.AstReflection}register(t,e=this,r="fast"){if("built-in"===r)throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");for(var[n,i]of Object.entries(t))if(Array.isArray(i))for(var a of i)a={check:this.wrapValidationException(a,e),category:r},this.addEntry(n,a);else"function"==typeof i?(i={check:this.wrapValidationException(i,e),category:r},this.addEntry(n,i)):tZ()}wrapValidationException(n,i){return async(t,e,r)=>{await this.handleException(()=>n.call(i,t,e,r),"An error occurred during validation",e,t)}}async handleException(t,e,r,n){try{await t()}catch(t){if(Dct(t))throw t;console.error(e+":",t),t instanceof Error&&t.stack&&console.error(t.stack),r("error",e+": "+(t instanceof Error?t.message:String(t)),{node:n})}}addEntry(t,e){if("AstNode"===t)this.entries.add("AstNode",e);else for(var r of this.reflection.getAllSubTypes(t))this.entries.add(r,e)}getChecks(t,e){let r=EK(this.entries.get(t)).concat(this.entries.get("AstNode"));return(r=e?r.filter(t=>e.includes(t.category)):r).map(t=>t.check)}registerBeforeDocument(t,e=this){this.entriesBefore.push(this.wrapPreparationException(t,"An error occurred during set-up of the validation",e))}registerAfterDocument(t,e=this){this.entriesAfter.push(this.wrapPreparationException(t,"An error occurred during tear-down of the validation",e))}wrapPreparationException(i,a,s){return async(t,e,r,n)=>{await this.handleException(()=>i.call(s,t,e,r,n),a,e,t)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}}});function $ht(t){if(t.range)return t.range;let e;return"string"==typeof t.property?e=ZJ(t.node.$cstNode,t.property,t.index):"string"==typeof t.keyword&&(e=ttt(t.node.$cstNode,t.keyword,t.index)),(e=e??t.node.$cstNode)?e.range:{start:{line:0,character:0},end:{line:0,character:0}}}function zht(t){switch(t){case"error":return 1;case"warning":return 2;case"info":return 3;case"hint":return 4;default:throw new Error("Invalid diagnostic severity: "+t)}}function Ght(t){switch(t){case"error":return Oht(qht.LexingError);case"warning":return Oht(qht.LexingWarning);case"info":return Oht(qht.LexingInfo);case"hint":return Oht(qht.LexingHint);default:throw new Error("Invalid diagnostic severity: "+t)}}var Uht,qht,jht,Wht,Yht,Hht,Vht,Xht,Kht,Zht,Qht=t(()=>{var t;Nct(),Att(),cJ(),JK(),zct(),Fht(),Uht=class{static{me(this,"DefaultDocumentValidator")}constructor(t){this.validationRegistry=t.validation.ValidationRegistry,this.metadata=t.LanguageMetaData}async validateDocument(t,e={},r=Lct.CancellationToken.None){var n=t.parseResult,i=[];if(await Oct(r),e.categories&&!e.categories.includes("built-in")||(this.processLexingErrors(n,i,e),!(e.stopAfterLexingErrors&&i.some(t=>(null==(t=t.data)?void 0:t.code)===qht.LexingError)||(this.processParsingErrors(n,i,e),e.stopAfterParsingErrors&&i.some(t=>(null==(t=t.data)?void 0:t.code)===qht.ParsingError))||(this.processLinkingErrors(t,i,e),e.stopAfterLinkingErrors&&i.some(t=>(null==(t=t.data)?void 0:t.code)===qht.LinkingError))))){try{i.push(...await this.validateAst(n.value,e,r))}catch(t){if(Dct(t))throw t;console.error("An error occurred during validation:",t)}await Oct(r)}return i}processLexingErrors(t,e,r){var n;for(n of[...t.lexerErrors,...null!=(t=null==(t=t.lexerReport)?void 0:t.diagnostics)?t:[]]){var i={severity:zht(i=null!=(i=n.severity)?i:"error"),range:{start:{line:n.line-1,character:n.column-1},end:{line:n.line-1,character:n.column+n.length-1}},message:n.message,data:Ght(i),source:this.getSource()};e.push(i)}}processParsingErrors(t,e,r){for(var n of t.parserErrors){let t;var i,a;isNaN(n.token.startOffset)?"previousToken"in n&&(a=n.previousToken,t=isNaN(a.startOffset)?{start:i={line:0,character:0},end:i}:{start:i={line:a.endLine-1,character:a.endColumn},end:i}):t=OK(n.token),t&&(a={severity:zht("error"),range:t,message:n.message,data:Oht(qht.ParsingError),source:this.getSource()},e.push(a))}}processLinkingErrors(t,e,r){for(var n of t.references){var i;(n=n.error)&&(i={node:n.container,property:n.property,index:n.index,data:{code:qht.LinkingError,containerType:n.container.$type,property:n.property,refText:n.reference.$refText}},e.push(this.toDiagnostic("error",n.message,i)))}}async validateAst(t,e,r=Lct.CancellationToken.None){let n=[],i=me((t,e,r)=>{n.push(this.toDiagnostic(t,e,r))},"acceptor");return await this.validateAstBefore(t,e,i,r),await this.validateAstNodes(t,e,i,r),await this.validateAstAfter(t,e,i,r),n}async validateAstBefore(t,e,r,n=Lct.CancellationToken.None){var i,a;for(a of this.validationRegistry.checksBefore)await Oct(n),await a(t,r,null!=(i=e.categories)?i:[],n)}async validateAstNodes(t,r,n,i=Lct.CancellationToken.None){await Promise.all(rJ(t).map(async t=>{var e;await Oct(i);for(e of this.validationRegistry.getChecks(t.$type,r.categories))await e(t,n,i)}))}async validateAstAfter(t,e,r,n=Lct.CancellationToken.None){var i,a;for(a of this.validationRegistry.checksAfter)await Oct(n),await a(t,r,null!=(i=e.categories)?i:[],n)}toDiagnostic(t,e,r){return{message:e,range:$ht(r),severity:zht(t),code:r.code,codeDescription:r.codeDescription,tags:r.tags,relatedInformation:r.relatedInformation,data:r.data,source:this.getSource()}}getSource(){return this.metadata.languageId}},me($ht,"getDiagnosticRange"),me(zht,"toDiagnosticSeverity"),me(Ght,"toDiagnosticData"),(t=qht=qht||{}).LexingError="lexing-error",t.LexingWarning="lexing-warning",t.LexingInfo="lexing-info",t.LexingHint="lexing-hint",t.ParsingError="parsing-error",t.LinkingError="linking-error"}),Jht=t(()=>{Nct(),wK(),cJ(),JK(),zct(),iht(),jht=class{static{me(this,"DefaultAstNodeDescriptionProvider")}constructor(t){this.astNodeLocator=t.workspace.AstNodeLocator,this.nameProvider=t.references.NameProvider}createDescription(e,t,r){var r=r??QQ(e),n=(t=t??this.nameProvider.getName(e),this.astNodeLocator.getAstNodePath(e));if(!t)throw new Error(`Node at path ${n} has no name.`);let i,a=me(()=>{var t;return i=i??PK(null!=(t=this.nameProvider.getNameNode(e))?t:e.$cstNode)},"nameSegmentGetter");return{node:e,name:t,get nameSegment(){return a()},selectionSegment:PK(e.$cstNode),type:e.$type,documentUri:r.uri,path:n}}},Wht=class{static{me(this,"DefaultReferenceDescriptionProvider")}constructor(t){this.nodeLocator=t.workspace.AstNodeLocator}async createDescriptions(t,e=Lct.CancellationToken.None){let r=[],n=t.parseResult.value;for(var i of rJ(n))await Oct(e),iJ(i).filter(t=>!mK(t)).forEach(t=>{(t=this.createDescription(t))&&r.push(t)});return r}createDescription(t){var e,r=t.reference.$nodeDescription,n=t.reference.$refNode;if(r&&n)return{sourceUri:e=QQ(t.container).uri,sourcePath:this.nodeLocator.getAstNodePath(t.container),targetUri:r.documentUri,targetPath:r.path,segment:PK(n),local:Kct.equals(r.documentUri,e)}}}}),tut=t(()=>{Yht=class{static{me(this,"DefaultAstNodeLocator")}constructor(){this.segmentSeparator="/",this.indexSeparator="@"}getAstNodePath(t){var e;return t.$container?(e=this.getAstNodePath(t.$container),t=this.getPathSegment(t),e+this.segmentSeparator+t):""}getPathSegment({$containerProperty:t,$containerIndex:e}){if(t)return void 0!==e?t+this.indexSeparator+e:t;throw new Error("Missing '$containerProperty' in AST node.")}getAstNode(t,e){return e.split(this.segmentSeparator).reduce((t,e)=>{var r,n;return t&&0!==e.length?0<(n=e.indexOf(this.indexSeparator))?(r=e.substring(0,n),n=parseInt(e.substring(n+1)),t[r]?.[n]):t[e]:t},t)}}}),eut={},rut=t(()=>{Y(eut,tt(Sct(),1))}),nut=t(()=>{rut(),zct(),Hht=class{static{me(this,"DefaultConfigurationProvider")}constructor(t){this._ready=new $ct,this.settings={},this.workspaceConfig=!1,this.onConfigurationSectionUpdateEmitter=new eut.Emitter,this.serviceRegistry=t.ServiceRegistry}get ready(){return this._ready.promise}initialize(t){this.workspaceConfig=null!=(t=null==(t=t.capabilities.workspace)?void 0:t.configuration)&&t}async initialized(e){var t;if(this.workspaceConfig&&(e.register&&(t=this.serviceRegistry.all,e.register({section:t.map(t=>this.toSectionName(t.LanguageMetaData.languageId))})),e.fetchConfiguration)){let t=this.serviceRegistry.all.map(t=>({section:this.toSectionName(t.LanguageMetaData.languageId)})),r=await e.fetchConfiguration(t);t.forEach((t,e)=>{this.updateSectionConfiguration(t.section,r[e])})}this._ready.resolve()}updateConfiguration(r){r.settings&&Object.keys(r.settings).forEach(t=>{var e=r.settings[t];this.updateSectionConfiguration(t,e),this.onConfigurationSectionUpdateEmitter.fire({section:t,configuration:e})})}updateSectionConfiguration(t,e){this.settings[t]=e}async getConfiguration(t,e){if(await this.ready,t=this.toSectionName(t),this.settings[t])return this.settings[t][e]}toSectionName(t){return""+t}get onConfigurationSectionUpdate(){return this.onConfigurationSectionUpdateEmitter.event}}}),iut=t(()=>{function t(t){return{dispose:me(async()=>t(),"dispose")}}var e=Vht=Vht||{};me(t,"create"),e.create=t}),aut=t(()=>{Nct(),iut(),Eht(),zct(),NK(),Fht(),aht(),Xht=class{static{me(this,"DefaultDocumentBuilder")}constructor(t){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new hht,this.documentPhaseListeners=new hht,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=Zct.Changed,this.langiumDocuments=t.workspace.LangiumDocuments,this.langiumDocumentFactory=t.workspace.LangiumDocumentFactory,this.textDocuments=t.workspace.TextDocuments,this.indexManager=t.workspace.IndexManager,this.serviceRegistry=t.ServiceRegistry}async build(t,r={},e=Lct.CancellationToken.None){var n;for(n of t){var i,a=n.uri.toString();if(n.state===Zct.Validated){if("boolean"==typeof r.validation&&r.validation)n.state=Zct.IndexedReferences,n.diagnostics=void 0,this.buildState.delete(a);else if("object"==typeof r.validation){let t=this.buildState.get(a),e=null==(i=t?.result)?void 0:i.validationChecks;e&&0<(i=(null!=(i=r.validation.categories)?i:Pht.all).filter(t=>!e.includes(t))).length&&(this.buildState.set(a,{completed:!1,options:{validation:Object.assign(Object.assign({},r.validation),{categories:i})},result:t.result}),n.state=Zct.IndexedReferences)}}else this.buildState.delete(a)}this.currentState=Zct.Changed,await this.emitUpdate(t.map(t=>t.uri),[]),await this.buildDocuments(t,r,e)}async update(t,e,r=Lct.CancellationToken.None){this.currentState=Zct.Changed;for(var n of e)this.langiumDocuments.deleteDocument(n),this.buildState.delete(n.toString()),this.indexManager.remove(n);for(var i of t){var a;this.langiumDocuments.invalidateDocument(i)||((a=this.langiumDocumentFactory.fromModel({$type:"INVALID"},i)).state=Zct.Changed,this.langiumDocuments.addDocument(a)),this.buildState.delete(i.toString())}let s=EK(t).concat(e).map(t=>t.toString()).toSet();this.langiumDocuments.all.filter(t=>!s.has(t.uri.toString())&&this.shouldRelink(t,s)).forEach(t=>{this.serviceRegistry.getServices(t.uri).references.Linker.unlink(t),t.state=Math.min(t.state,Zct.ComputedScopes),t.diagnostics=void 0}),await this.emitUpdate(t,e),await Oct(r),t=this.sortDocuments(this.langiumDocuments.all.filter(t=>t.statet(e,r)))}sortDocuments(t){let e=0,r=t.length-1;for(;evoid 0!==t.error)||this.indexManager.isAffected(t,e)}onUpdate(e){return this.updateListeners.push(e),Vht.create(()=>{var t=this.updateListeners.indexOf(e);0<=t&&this.updateListeners.splice(t,1)})}async buildDocuments(t,e,r){this.prepareBuild(t,e),await this.runCancelable(t,Zct.Parsed,r,t=>this.langiumDocumentFactory.update(t,r)),await this.runCancelable(t,Zct.IndexedContent,r,t=>this.indexManager.updateContent(t,r)),await this.runCancelable(t,Zct.ComputedScopes,r,async t=>{var e=this.serviceRegistry.getServices(t.uri).references.ScopeComputation;t.precomputedScopes=await e.computeLocalScopes(t,r)}),await this.runCancelable(t,Zct.Linked,r,t=>this.serviceRegistry.getServices(t.uri).references.Linker.link(t,r)),await this.runCancelable(t,Zct.IndexedReferences,r,t=>this.indexManager.updateReferences(t,r));var n,e=t.filter(t=>this.shouldValidate(t));await this.runCancelable(e,Zct.Validated,r,t=>this.validate(t,r));for(n of t){var i=this.buildState.get(n.uri.toString());i&&(i.completed=!0)}}prepareBuild(t,e){for(var r of t){var r=r.uri.toString(),n=this.buildState.get(r);n&&!n.completed||this.buildState.set(r,{completed:!1,options:e,result:n?.result})}}async runCancelable(t,e,r,n){var i;for(i of t.filter(t=>t.statet.state===e),await this.notifyBuildPhase(t,e,r),this.currentState=e}onBuildPhase(t,e){return this.buildPhaseListeners.add(t,e),Vht.create(()=>{this.buildPhaseListeners.delete(t,e)})}onDocumentPhase(t,e){return this.documentPhaseListeners.add(t,e),Vht.create(()=>{this.documentPhaseListeners.delete(t,e)})}waitUntil(i,t,a){let s;return t&&"path"in t?s=t:a=t,a=a??Lct.CancellationToken.None,s&&(t=this.langiumDocuments.getDocument(s))&&t.state>i?Promise.resolve(s):this.currentState>=i?Promise.resolve(void 0):a.isCancellationRequested?Promise.reject(Fct):new Promise((e,t)=>{let r=this.onBuildPhase(i,()=>{var t;r.dispose(),n.dispose(),s?(t=this.langiumDocuments.getDocument(s),e(t?.uri)):e(void 0)}),n=a.onCancellationRequested(()=>{r.dispose(),n.dispose(),t(Fct)})})}async notifyDocumentPhase(t,e,r){var n;for(n of this.documentPhaseListeners.get(e).slice())try{await n(t,r)}catch(t){if(!Dct(t))throw t}}async notifyBuildPhase(t,e,r){var n;if(0!==t.length)for(n of this.buildPhaseListeners.get(e).slice())await Oct(r),await n(t,r)}shouldValidate(t){return!!this.getBuildOptions(t).validation}async validate(t,e){var r=this.serviceRegistry.getServices(t.uri).validation.DocumentValidator,n=this.getBuildOptions(t).validation,r=await r.validateDocument(t,n="object"==typeof n?n:void 0,e);t.diagnostics?t.diagnostics.push(...r):t.diagnostics=r,(e=this.buildState.get(t.uri.toString()))&&(null==e.result&&(e.result={}),t=null!=(r=n?.categories)?r:Pht.all,e.result.validationChecks?e.result.validationChecks.push(...t):e.result.validationChecks=[...t])}getBuildOptions(t){return null!=(t=null==(t=this.buildState.get(t.uri.toString()))?void 0:t.options)?t:{}}}}),sut=t(()=>{cJ(),Sht(),Nct(),NK(),iht(),Kht=class{static{me(this,"DefaultIndexManager")}constructor(t){this.symbolIndex=new Map,this.symbolByTypeIndex=new vht,this.referenceIndex=new Map,this.documents=t.workspace.LangiumDocuments,this.serviceRegistry=t.ServiceRegistry,this.astReflection=t.AstReflection}findAllReferences(t,e){let r=QQ(t).uri,n=[];return this.referenceIndex.forEach(t=>{t.forEach(t=>{Kct.equals(t.targetUri,r)&&t.targetPath===e&&n.push(t)})}),EK(n)}allElements(e,r){let t=EK(this.symbolIndex.keys());return(t=r?t.filter(t=>!r||r.has(t)):t).map(t=>this.getFileDescriptions(t,e)).flat()}getFileDescriptions(e,r){var t;return r?this.symbolByTypeIndex.get(e,r,()=>{var t;return(null!=(t=this.symbolIndex.get(e))?t:[]).filter(t=>this.astReflection.isSubtype(t.type,r))}):null!=(t=this.symbolIndex.get(e))?t:[]}remove(t){t=t.toString(),this.symbolIndex.delete(t),this.symbolByTypeIndex.clear(t),this.referenceIndex.delete(t)}async updateContent(t,e=Lct.CancellationToken.None){e=await this.serviceRegistry.getServices(t.uri).references.ScopeComputation.computeExports(t,e),t=t.uri.toString(),this.symbolIndex.set(t,e),this.symbolByTypeIndex.clear(t)}async updateReferences(t,e=Lct.CancellationToken.None){e=await this.serviceRegistry.getServices(t.uri).workspace.ReferenceDescriptionProvider.createDescriptions(t,e),this.referenceIndex.set(t.uri.toString(),e)}isAffected(t,e){return!!(t=this.referenceIndex.get(t.uri.toString()))&&t.some(t=>!t.local&&e.has(t.targetUri.toString()))}}}),out=t(()=>{Nct(),zct(),iht(),Zht=class{static{me(this,"DefaultWorkspaceManager")}constructor(t){this.initialBuildOptions={},this._ready=new $ct,this.serviceRegistry=t.ServiceRegistry,this.langiumDocuments=t.workspace.LangiumDocuments,this.documentBuilder=t.workspace.DocumentBuilder,this.fileSystemProvider=t.workspace.FileSystemProvider,this.mutex=t.workspace.WorkspaceLock}get ready(){return this._ready.promise}get workspaceFolders(){return this.folders}initialize(t){this.folders=null!=(t=t.workspaceFolders)?t:void 0}initialized(t){return this.mutex.write(t=>{var e;return this.initializeWorkspace(null!=(e=this.folders)?e:[],t)})}async initializeWorkspace(t,e=Lct.CancellationToken.None){t=await this.performStartup(t),await Oct(e),await this.documentBuilder.build(t,this.initialBuildOptions,e)}async performStartup(t){let e=this.serviceRegistry.all.flatMap(t=>t.LanguageMetaData.fileExtensions),r=[],n=me(t=>{r.push(t),this.langiumDocuments.hasDocument(t.uri)||this.langiumDocuments.addDocument(t)},"collector");return await this.loadAdditionalDocuments(t,n),await Promise.all(t.map(t=>[t,this.getRootFolder(t)]).map(async t=>this.traverseFolder(...t,e,n))),this._ready.resolve(),r}loadAdditionalDocuments(t,e){return Promise.resolve()}getRootFolder(t){return Vct.parse(t.uri)}async traverseFolder(e,t,r,n){t=await this.fileSystemProvider.readDirectory(t),await Promise.all(t.map(async t=>{this.includeEntry(e,t,r)&&(t.isDirectory?await this.traverseFolder(e,t.uri,r,n):t.isFile&&(t=await this.langiumDocuments.getOrCreateDocument(t.uri),n(t)))}))}includeEntry(t,e,r){var n=Kct.basename(e.uri);return!n.startsWith(".")&&(e.isDirectory?"node_modules"!==n&&"out"!==n:!!e.isFile&&(n=Kct.extname(e.uri),r.includes(n)))}}});function lut(t){return Array.isArray(t)&&(0===t.length||"name"in t[0])}function cut(t){return t&&"modes"in t&&"defaultMode"in t}function hut(t){return!lut(t)&&!cut(t)}var uut,dut,put,gut=t(()=>{zat(),uut=class{static{me(this,"DefaultLexerErrorMessageProvider")}buildUnexpectedCharactersMessage(t,e,r,n,i){return Grt.buildUnexpectedCharactersMessage(t,e,r,n,i)}buildUnableToPopLexerModeMessage(t){return Grt.buildUnableToPopLexerModeMessage(t)}},dut={mode:"full"},put=class{static{me(this,"DefaultLexer")}constructor(t){this.errorMessageProvider=t.parser.LexerErrorMessageProvider,this.tokenBuilder=t.parser.TokenBuilder;var e=this.tokenBuilder.buildTokens(t.Grammar,{caseInsensitive:t.LanguageMetaData.caseInsensitive}),e=(this.tokenTypes=this.toTokenTypeDictionary(e),hut(e)?Object.values(e):e),t="production"===t.LanguageMetaData.mode;this.chevrotainLexer=new jrt(e,{positionTracking:"full",skipValidations:t,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(t,e=0){var r,n=this.chevrotainLexer.tokenize(t);return{tokens:n.tokens,errors:n.errors,hidden:null!=(n=n.groups.hidden)?n:[],report:null==(r=(n=this.tokenBuilder).flushLexingReport)?void 0:r.call(n,t)}}toTokenTypeDictionary(t){if(hut(t))return t;let e=cut(t)?Object.values(t.modes).flat():t,r={};return e.forEach(t=>r[t.name]=t),r}},me(lut,"isTokenTypeArray"),me(cut,"isIMultiModeLexerDefinition"),me(hut,"isTokenTypeDictionary")});function fut(t,e,r){let n,i;return n="string"==typeof t?(i=e,r):(i=t.range.start,e),i=i||hot.create(0,0),r=yut(t),e=Lut(n),kut({index:0,tokens:vut({lines:r,position:i,options:e}),position:i})}function mut(t,e){var r,n,e=Lut(e);return 0!==(t=yut(t)).length&&(r=t[t.length-1],n=e.start,e=e.end,!!n?.exec(t[0]))&&!!e?.exec(r)}function yut(t){return("string"==typeof t?t:t.text).split(BJ)}function vut(a){let s,o,l,c=[],h=a.position.line,u=a.position.character;for(let i=0;i=r.length?0e.state.transitions),{actualToken:r,possibleTokenTypes:yY(t.filter(e=>e instanceof voe).map(e=>e.tokenType),e=>e.tokenTypeIdx),tokenPath:e}}function Poe(e,t){return e.edges[t.tokenTypeIdx]}function Boe(e,t,r){var n,i=new Eoe,a=[];for(n of e.elements)if(!1!==r.is(n.alt))if(n.state.type===uoe)a.push(n);else{var s=n.state.transitions.length;for(let e=0;e{Ose(),woe(),Coe(),Lj(),mq(),vY(),pq(),HB(),RU(),aj(),UW(),mt(Soe,"createDFACache"),Qoe=class{static{mt(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=Bse(e.rules),this.dfas=Aoe(this.atn)}validateAmbiguousAlternationAlternatives(){return[]}validateEmptyOrAlternatives(){return[]}buildLookaheadForAlternation(e){let{prodOccurrence:t,rule:r,hasPredicates:n,dynamicTokensEnabled:i}=e,a=this.dfas,s=this.logging,o=Pse(r,"Alternation",t),l=this.atn.decisionMap[o].decision,c=x(Cie({maxLookahead:1,occurrence:t,prodType:"Alternation",rule:r}),e=>x(e,e=>e[0]));if(!_oe(c,!1)||i)return n?function(t){var r=new Qoe,n=void 0===t?0:t.length;for(let e=0;e(v(e,e=>{e&&(t[e.tokenTypeIdx]=r,v(e.categoryMatches,e=>{t[e]=r}))}),t),{});return n?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:n,dynamicTokensEnabled:i}=r,a=this.dfas,s=this.logging,o=Pse(t,n,e),l=this.atn.decisionMap[o].decision,c=x(Cie({maxLookahead:1,occurrence:e,prodType:n,rule:t}),e=>x(e,e=>e[0]));if(_oe(c)&&c[0][0]&&!i){if(r=c[0],1===(r=YB(r)).length&&ij(r[0].categoryMatches)){let e=r[0].tokenTypeIdx;return function(){return this.LA(1).tokenTypeIdx===e}}{let t=GW(r,(t,e)=>(void 0!==e&&(t[e.tokenTypeIdx]=!0,v(e.categoryMatches,e=>{t[e]=!0})),t),{});return function(){var e=this.LA(1);return!0===t[e.tokenTypeIdx]}}}return function(){var e=Loe.call(this,a,l,Joe,s);return"object"!=typeof e&&0===e}}},mt(_oe,"isLL1Sequence"),mt(Aoe,"initATNSimulator"),mt(Loe,"adaptivePredict"),mt(Noe,"performLookahead"),mt(Ioe,"computeLookaheadTarget"),mt(Roe,"reportLookaheadAmbiguity"),mt(Moe,"buildAmbiguityError"),mt(Doe,"getProductionDslName"),mt(Ooe,"buildAdaptivePredictError"),mt(Poe,"getExistingTargetState"),mt(Boe,"computeReachSet"),mt($oe,"getReachableTarget"),mt(Foe,"getUniqueAlt"),mt(zoe,"newDFAState"),mt(Goe,"addDFAEdge"),mt(Uoe,"addDFAState"),mt(qoe,"computeStartState"),mt(joe,"closure"),mt(Woe,"getEpsilonTarget"),mt(Yoe,"hasConfigInRuleStopState"),mt(Hoe,"allConfigsInRuleStopStates"),mt(Voe,"hasConflictTerminatingPrediction"),mt(Xoe,"getConflictingAltSets"),mt(Koe,"hasConflictingAltSet"),mt(Zoe,"hasStateAssociatedWithOneAlt")}),Rce=e(()=>{Ice()}),Mce=e(()=>{function e(e){return"string"==typeof e}var t,r,n,i;function a(e){return"string"==typeof e}function s(e){return"number"==typeof e&&t.MIN_VALUE<=e&&e<=t.MAX_VALUE}function o(e){return"number"==typeof e&&r.MIN_VALUE<=e&&e<=r.MAX_VALUE}function l(e,t){return{line:e=e===Number.MAX_VALUE?ile.MAX_VALUE:e,character:t=t===Number.MAX_VALUE?ile.MAX_VALUE:t}}function c(e){return yt.objectLiteral(e)&&yt.uinteger(e.line)&&yt.uinteger(e.character)}function h(e,t,r,n){if(yt.uinteger(e)&&yt.uinteger(t)&&yt.uinteger(r)&&yt.uinteger(n))return{start:ale.create(e,t),end:ale.create(r,n)};if(ale.is(e)&&ale.is(t))return{start:e,end:t};throw new Error(`Range#create called with invalid arguments[${e}, ${t}, ${r}, ${n}]`)}function u(e){return yt.objectLiteral(e)&&ale.is(e.start)&&ale.is(e.end)}function d(e,t){return{uri:e,range:t}}function p(e){return yt.objectLiteral(e)&&sle.is(e.range)&&(yt.string(e.uri)||yt.undefined(e.uri))}function g(e,t,r,n){return{targetUri:e,targetRange:t,targetSelectionRange:r,originSelectionRange:n}}function f(e){return yt.objectLiteral(e)&&sle.is(e.targetRange)&&yt.string(e.targetUri)&&sle.is(e.targetSelectionRange)&&(sle.is(e.originSelectionRange)||yt.undefined(e.originSelectionRange))}function m(e,t,r,n){return{red:e,green:t,blue:r,alpha:n}}function y(e){return yt.objectLiteral(e)&&yt.numberRange(e.red,0,1)&&yt.numberRange(e.green,0,1)&&yt.numberRange(e.blue,0,1)&&yt.numberRange(e.alpha,0,1)}function v(e,t){return{range:e,color:t}}function x(e){return yt.objectLiteral(e)&&sle.is(e.range)&&cle.is(e.color)}function b(e,t,r){return{label:e,textEdit:t,additionalTextEdits:r}}function w(e){return yt.objectLiteral(e)&&yt.string(e.label)&&(yt.undefined(e.textEdit)||ble.is(e))&&(yt.undefined(e.additionalTextEdits)||yt.typedArray(e.additionalTextEdits,ble.is))}function k(e,t,r,n,i,a){return e={startLine:e,endLine:t},yt.defined(r)&&(e.startCharacter=r),yt.defined(n)&&(e.endCharacter=n),yt.defined(i)&&(e.kind=i),yt.defined(a)&&(e.collapsedText=a),e}function T(e){return yt.objectLiteral(e)&&yt.uinteger(e.startLine)&&yt.uinteger(e.startLine)&&(yt.undefined(e.startCharacter)||yt.uinteger(e.startCharacter))&&(yt.undefined(e.endCharacter)||yt.uinteger(e.endCharacter))&&(yt.undefined(e.kind)||yt.string(e.kind))}function E(e,t){return{location:e,message:t}}function C(e){return yt.defined(e)&&ole.is(e.location)&&yt.string(e.message)}function S(e){return yt.objectLiteral(e)&&yt.string(e.href)}function _(e,t,r,n,i,a){return e={range:e,message:t},yt.defined(r)&&(e.severity=r),yt.defined(n)&&(e.code=n),yt.defined(i)&&(e.source=i),yt.defined(a)&&(e.relatedInformation=a),e}function A(e){var t;return yt.defined(e)&&sle.is(e.range)&&yt.string(e.message)&&(yt.number(e.severity)||yt.undefined(e.severity))&&(yt.integer(e.code)||yt.string(e.code)||yt.undefined(e.code))&&(yt.undefined(e.codeDescription)||yt.string(null==(t=e.codeDescription)?void 0:t.href))&&(yt.string(e.source)||yt.undefined(e.source))&&(yt.undefined(e.relatedInformation)||yt.typedArray(e.relatedInformation,gle.is))}function L(e,t,...r){return e={title:e,command:t},yt.defined(r)&&0yt.string(e.kind)?Cle.is(e)||Sle.is(e)||_le.is(e):Ele.is(e)))}function J(e){return{uri:e}}function ee(e){return yt.defined(e)&&yt.string(e.uri)}function te(e,t){return{uri:e,version:t}}function re(e){return yt.defined(e)&&yt.string(e.uri)&&yt.integer(e.version)}function ne(e,t){return{uri:e,version:t}}function ie(e){return yt.defined(e)&&yt.string(e.uri)&&(null===e.version||yt.integer(e.version))}function ae(e,t,r,n){return{uri:e,languageId:t,version:r,text:n}}function se(e){return yt.defined(e)&&yt.string(e.uri)&&yt.string(e.languageId)&&yt.integer(e.version)&&yt.string(e.text)}function oe(e){return e===n.PlainText||e===n.Markdown}function le(e){var t=e;return yt.objectLiteral(e)&&Mle.is(t.kind)&&yt.string(t.value)}function ce(e,t,r){return{newText:e,insert:t,replace:r}}function he(e){return e&&yt.string(e.newText)&&sle.is(e.insert)&&sle.is(e.replace)}function ue(e){return e&&(yt.string(e.detail)||void 0===e.detail)&&(yt.string(e.description)||void 0===e.description)}function de(e){return{label:e}}function pe(e,t){return{items:e||[],isIncomplete:!!t}}function ge(e){return e.replace(/[\\`*_{}[\]()#+\-.!]/g,"\\$&")}function fe(e){return yt.string(e)||yt.objectLiteral(e)&&yt.string(e.language)&&yt.string(e.value)}function me(e){var t=e;return!!t&&yt.objectLiteral(t)&&(Dle.is(t.contents)||Ule.is(t.contents)||yt.typedArray(t.contents,Ule.is))&&(void 0===e.range||sle.is(e.range))}function ye(e,t){return t?{label:e,documentation:t}:{label:e}}function ve(e,t,...r){return e={label:e},yt.defined(t)&&(e.documentation=t),yt.defined(r)?e.parameters=r:e.parameters=[],e}function xe(e,t){return e={range:e},yt.number(t)&&(e.kind=t),e}function be(e,t,r,n,i){return e={name:e,kind:t,location:{uri:n,range:r}},i&&(e.containerName=i),e}function we(e,t,r,n){return void 0!==n?{name:e,kind:t,location:{uri:r,range:n}}:{name:e,kind:t,location:{uri:r}}}function ke(e,t,r,n,i,a){return e={name:e,detail:t,kind:r,range:n,selectionRange:i},void 0!==a&&(e.children=a),e}function Te(e){return e&&yt.string(e.name)&&yt.number(e.kind)&&sle.is(e.range)&&sle.is(e.selectionRange)&&(void 0===e.detail||yt.string(e.detail))&&(void 0===e.deprecated||yt.boolean(e.deprecated))&&(void 0===e.children||Array.isArray(e.children))&&(void 0===e.tags||Array.isArray(e.tags))}function Ee(e,t,r){return e={diagnostics:e},null!=t&&(e.only=t),null!=r&&(e.triggerKind=r),e}function Ce(e){return yt.defined(e)&&yt.typedArray(e.diagnostics,vle.is)&&(void 0===e.only||yt.typedArray(e.only,yt.string))&&(void 0===e.triggerKind||e.triggerKind===Jle.Invoked||e.triggerKind===Jle.Automatic)}function Se(e,t,r){let n={title:e},i=!0;return"string"==typeof t?(i=!1,n.kind=t):xle.is(t)?n.command=t:n.edit=t,i&&void 0!==r&&(n.kind=r),n}function _e(e){return e&&yt.string(e.title)&&(void 0===e.diagnostics||yt.typedArray(e.diagnostics,vle.is))&&(void 0===e.kind||yt.string(e.kind))&&(void 0!==e.edit||void 0!==e.command)&&(void 0===e.command||xle.is(e.command))&&(void 0===e.isPreferred||yt.boolean(e.isPreferred))&&(void 0===e.edit||Ale.is(e.edit))}function Ae(e,t){return e={range:e},yt.defined(t)&&(e.data=t),e}function Le(e){return yt.defined(e)&&sle.is(e.range)&&(yt.undefined(e.command)||xle.is(e.command))}function Ne(e,t){return{tabSize:e,insertSpaces:t}}function Ie(e){return yt.defined(e)&&yt.uinteger(e.tabSize)&&yt.boolean(e.insertSpaces)}function Re(e,t,r){return{range:e,target:t,data:r}}function Me(e){return yt.defined(e)&&sle.is(e.range)&&(yt.undefined(e.target)||yt.string(e.target))}function De(e,t){return{range:e,parent:t}}function Oe(e){return yt.objectLiteral(e)&&sle.is(e.range)&&(void 0===e.parent||i.is(e.parent))}function Pe(e){return yt.objectLiteral(e)&&(void 0===e.resultId||"string"==typeof e.resultId)&&Array.isArray(e.data)&&(0===e.data.length||"number"==typeof e.data[0])}function Be(e,t){return{range:e,text:t}}function $e(e){return null!=e&&sle.is(e.range)&&yt.string(e.text)}function Fe(e,t,r){return{range:e,variableName:t,caseSensitiveLookup:r}}function ze(e){return null!=e&&sle.is(e.range)&&yt.boolean(e.caseSensitiveLookup)&&(yt.string(e.variableName)||void 0===e.variableName)}function Ge(e,t){return{range:e,expression:t}}function Ue(e){return null!=e&&sle.is(e.range)&&(yt.string(e.expression)||void 0===e.expression)}function qe(e,t){return{frameId:e,stoppedLocation:t}}function je(e){return yt.defined(e)&&sle.is(e.stoppedLocation)}function We(e){return 1===e||2===e}function Ye(e){return{value:e}}function He(e){return yt.objectLiteral(e)&&(void 0===e.tooltip||yt.string(e.tooltip)||Dle.is(e.tooltip))&&(void 0===e.location||ole.is(e.location))&&(void 0===e.command||xle.is(e.command))}function Ve(e,t,r){return e={position:e,label:t},void 0!==r&&(e.kind=r),e}function Xe(e){return yt.objectLiteral(e)&&ale.is(e.position)&&(yt.string(e.label)||yt.typedArray(e.label,gce.is))&&(void 0===e.kind||pce.is(e.kind))&&void 0===e.textEdits||yt.typedArray(e.textEdits,ble.is)&&(void 0===e.tooltip||yt.string(e.tooltip)||Dle.is(e.tooltip))&&(void 0===e.paddingLeft||yt.boolean(e.paddingLeft))&&(void 0===e.paddingRight||yt.boolean(e.paddingRight))}function Ke(e){return{kind:"snippet",value:e}}function Ze(e,t,r,n){return{insertText:e,filterText:t,range:r,command:n}}function Qe(e){return{items:e}}function Je(e,t){return{range:e,text:t}}function et(e,t){return{triggerKind:e,selectedCompletionInfo:t}}function tt(e){return yt.objectLiteral(e)&&rle.is(e.uri)&&yt.string(e.name)}function rt(e,t,r,n){return new Ece(e,t,r,n)}function nt(e){return!!(yt.defined(e)&&yt.string(e.uri)&&(yt.undefined(e.languageId)||yt.string(e.languageId))&&yt.uinteger(e.lineCount)&&yt.func(e.getText)&&yt.func(e.positionAt)&&yt.func(e.offsetAt))}function it(t,e){let r=t.getText(),n=D(e,(e,t)=>{var r=e.range.start.line-t.range.start.line;return 0==r?e.range.start.character-t.range.start.character:r}),i=r.length;for(let e=n.length-1;0<=e;e--){var a=n[e],s=t.offsetAt(a.range.start),o=t.offsetAt(a.range.end);if(!(o<=i))throw new Error("Overlapping edit");r=r.substring(0,s)+a.newText+r.substring(o,r.length),i=s}return r}function D(n,i){if(!(n.length<=1)){var a=n.length/2|0,s=n.slice(0,a),o=n.slice(a);D(s,i),D(o,i);let e=0,t=0,r=0;for(;ee?n=i:r=i+1}var a=r-1;return ale.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{Mce(),ZZ(),Cce=class{static{mt(this,"CstNodeBuilder")}constructor(){this.nodeStack=[]}get current(){var e;return null!=(e=this.nodeStack[this.nodeStack.length-1])?e:this.rootNode}buildRootNode(e){return this.rootNode=new Nce(e),this.rootNode.root=this.rootNode,this.nodeStack=[this.rootNode],this.rootNode}buildCompositeNode(e){var t=new Ace;return t.grammarSource=e,t.root=this.rootNode,this.current.content.push(t),this.nodeStack.push(t),t}buildLeafNode(e,t){return(e=new _ce(e.startOffset,e.image.length,MZ(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 n=new _ce(t.startOffset,t.image.length,MZ(t),t.tokenType,!0);n.root=this.rootNode,r.push(n)}let i=this.current,a=!1;if(0{Ose(),Rce(),WJ(),Ste(),oee(),Dce(),Pce=Symbol("Datatype"),mt(Oce,"isDataTypeNode"),Bce=mt(e=>e.endsWith("​")?e:e+"​","withRuleSuffix"),$ce=class{static{mt(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;this.wrapper=new jce(t,Object.assign(Object.assign({},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()}},Fce=class extends $ce{static{mt(this,"LangiumParser")}get current(){return this.stack[this.stack.length-1]}constructor(e){super(e),this.nodeBuilder=new Cce,this.stack=[],this.assignmentMap=new Map,this.linker=e.references.Linker,this.converter=e.parser.ValueConverter,this.astReflection=e.shared.AstReflection}rule(e,t){var r=this.computeRuleType(e),r=this.wrapper.DEFINE_RULE(Bce(e.name),this.startImplementation(r,t).bind(this));return this.allRules.set(e.name,r),e.entry&&(this.mainRule=r),r}computeRuleType(e){if(!e.fragment)return ote(e)?Pce:ute(e)??e.name}parse(e,t={}){this.nodeBuilder.buildRootNode(e);var e=this.lexerResult=this.lexer.tokenize(e),r=(this.wrapper.input=e.tokens,t.rule?this.allRules.get(t.rule):this.mainRule);if(r)return r=r.call(this.wrapper,{}),this.nodeBuilder.addHiddenNodes(e.hidden),this.unorderedGroups.clear(),this.lexerResult=void 0,{value:r,lexerErrors:e.errors,lexerReport:e.report,parserErrors:this.wrapper.errors};throw new Error(t.rule?`No rule found with name '${t.rule}'`:"No main rule available.")}startImplementation(i,a){return e=>{var t,r=!this.isRecording()&&void 0!==i;r&&(this.stack.push(t={$type:i}),i===Pce)&&(t.value="");let n;try{n=a(e)}catch{n=void 0}return n=void 0===n&&r?this.construct():n}}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,n){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,n)),{assignment:e,isCrossRef:i}=this.getAssignment(n),a=this.current;if(e){var s=zQ(n)?t.image:this.converter.convert(t.image,r);this.assign(e.operator,e.feature,s,r,i)}else if(Oce(a)){let e=t.image;zQ(n)||(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,n,i){let a;this.isRecording()||r||(a=this.nodeBuilder.buildCompositeNode(n)),r=this.wrapper.wrapSubrule(e,t,i),!this.isRecording()&&a&&0{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,n,i){this.before(n),this.wrapper.wrapSubrule(e,t,i),this.after(n)}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}},qce={recoveryEnabled:!0,nodeLocationTracking:"full",skipValidations:!0,errorMessageProvider:new Gce},jce=class extends Lse{static{mt(this,"ChevrotainWrapper")}constructor(e,t){var r=t&&"maxLookahead"in t;super(e,Object.assign(Object.assign(Object.assign({},qce),{lookaheadStrategy:r?new _ae({maxLookahead:t.maxLookahead}):new ele({logging:t.skipValidations?()=>{}:void 0})}),t))}get IS_RECORDING(){return this.RECORDING_PHASE}DEFINE_RULE(e,t){return this.RULE(e,t)}wrapSelfAnalysis(){this.performSelfAnalysis()}wrapConsume(e,t){return this.consume(e,t)}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)}}});function Yce(e,t,r){return Hce({parser:t,tokens:r,ruleNames:new Map},e),t}function Hce(e,t){let r=jee(t,!1),n=kZ(t.rules).filter(EQ).filter(e=>r.has(e));for(var i of n){var a=Object.assign(Object.assign({},e),{consume:1,optional:1,subrule:1,many:1,or:1});e.parser.rule(i,Vce(a,i.definition))}}function Vce(t,r,e=!1){let n;if(zQ(r))n=ihe(t,r);else if(MQ(r))n=Xce(t,r);else if(OQ(r))n=Vce(t,r.terminal);else if(BQ(r))n=nhe(t,r);else if(qQ(r))n=Kce(t,r);else if(DQ(r))n=Jce(t,r);else if(HQ(r))n=ehe(t,r);else if(FQ(r))n=the(t,r);else{if(!$Q(r))throw new JZ(r.$cstNode,"Unexpected element type: "+r.$type);{let e=t.consume++;n=mt(()=>t.parser.consume(e,aie,r),"method")}}return ahe(t,e?void 0:rhe(r),n,r.cardinality)}function Xce(e,t){let r=dte(t);return()=>e.parser.action(r,t)}function Kce(i,a){let s=a.rule.ref;if(EQ(s)){let t=i.subrule++,r=s.fragment,n=0({});return e=>i.parser.subrule(t,she(i,s),r,a,n(e))}if(LQ(s)){let e=i.consume++,t=lhe(i,s.name);return()=>i.parser.consume(e,t,a)}if(!s)throw new JZ(a.$cstNode,"Undefined rule: "+a.rule.$refText);QZ(s)}function Zce(a,e){let s=e.map(e=>Qce(e.value));return t=>{var r={};for(let e=0;et(e)||r(e)}if(pQ(n)){let t=Qce(n.left),r=Qce(n.right);return e=>t(e)&&r(e)}if(bQ(n)){let t=Qce(n.value);return e=>!t(e)}if(TQ(n)){let t=n.parameter.ref.name;return e=>void 0!==e&&!0===e[t]}if(dQ(n)){let e=!!n.true;return()=>e}QZ()}function Jce(r,n){if(1===n.elements.length)return Vce(r,n.elements[0]);{let e=[];for(var i of n.elements){var a={ALT:Vce(r,i,!0)};(i=rhe(i))&&(a.GATE=Qce(i)),e.push(a)}let t=r.or++;return n=>r.parser.alternatives(t,e.map(e=>{let t={ALT:mt(()=>e.ALT(n),"ALT")},r=e.GATE;return r&&(t.GATE=()=>r(n)),t}))}}function ehe(s,e){if(1===e.elements.length)return Vce(s,e.elements[0]);let t=[];for(var r of e.elements){var n={ALT:Vce(s,r,!0)};(r=rhe(r))&&(n.GATE=Qce(r)),t.push(n)}let o=s.or++,l=mt((e,t)=>`uGroup_${e}_`+t.getRuleStack().join("-"),"idFunc"),i=mt(a=>s.parser.alternatives(o,t.map((t,r)=>{let e={ALT:mt(()=>!0,"ALT")},n=s.parser,i=(e.ALT=()=>{var e;t.ALT(a),n.isRecording()||(e=l(o,n),n.unorderedGroups.get(e)||n.unorderedGroups.set(e,[]),"u"i(a):e.GATE=()=>!n.unorderedGroups.get(l(o,n))?.[r],e})),"alternatives"),a=ahe(s,rhe(e),i,"*");return e=>{a(e),s.parser.isRecording()||s.parser.unorderedGroups.delete(l(o,s.parser))}}function the(t,e){let r=e.elements.map(e=>Vce(t,e));return t=>r.forEach(e=>e(t))}function rhe(e){if(FQ(e))return e.guardCondition}function nhe(n,i,a=i.terminal){if(a){if(qQ(a)&&EQ(a.rule.ref)){let t=a.rule.ref,r=n.subrule++;return e=>n.parser.subrule(r,she(n,t),!1,i,e)}if(qQ(a)&&LQ(a.rule.ref)){let e=n.consume++,t=lhe(n,a.rule.ref.name);return()=>n.parser.consume(e,t,i)}if(zQ(a)){let e=n.consume++,t=lhe(n,a.value);return()=>n.parser.consume(e,t,i)}throw new Error("Could not build cross reference parser")}if(!i.type.ref)throw new Error("Could not resolve reference to type: "+i.type.$refText);if(a=tte(i.type.ref)?.terminal)return nhe(n,i,a);throw new Error("Could not find name assignment for type: "+dte(i.type.ref))}function ihe(e,t){let r=e.consume++,n=e.tokens[t.value];if(n)return()=>e.parser.consume(r,n,t);throw new Error("Could not find token for keyword: "+t.value)}function ahe(n,e,i,t){let a=e&&Qce(e);if(!t){if(a){let t=n.or++;return e=>n.parser.alternatives(t,[{ALT:mt(()=>i(e),"ALT"),GATE:mt(()=>a(e),"GATE")},{ALT:Tse(),GATE:mt(()=>!a(e),"GATE")}])}return i}if("*"===t){let t=n.many++;return e=>n.parser.many(t,{DEF:mt(()=>i(e),"DEF"),GATE:a?()=>a(e):void 0})}if("+"===t){let r=n.many++;if(a){let t=n.or++;return e=>n.parser.alternatives(t,[{ALT:mt(()=>n.parser.atLeastOne(r,{DEF:mt(()=>i(e),"DEF")}),"ALT"),GATE:mt(()=>a(e),"GATE")},{ALT:Tse(),GATE:mt(()=>!a(e),"GATE")}])}return e=>n.parser.atLeastOne(r,{DEF:mt(()=>i(e),"DEF")})}if("?"===t){let t=n.optional++;return e=>n.parser.optional(t,{DEF:mt(()=>i(e),"DEF"),GATE:a?()=>a(e):void 0})}QZ()}function she(e,t){if(t=ohe(e,t),e=e.parser.getRule(t))return e;throw new Error(`Rule "${t}" not found."`)}function ohe(n,i){if(EQ(i))return i.name;if(n.ruleNames.has(i))return n.ruleNames.get(i);{let e=i,t=e.$container,r=i.$type;for(;!EQ(t);)(FQ(t)||DQ(t)||HQ(t))&&(r=t.elements.indexOf(e).toString()+":"+r),t=(e=t).$container;return r=t.name+":"+r,n.ruleNames.set(i,r),r}}function lhe(e,t){if(e=e.tokens[t])return e;throw new Error(`Token "${t}" not found."`)}var che=e(()=>{Ose(),WJ(),eQ(),AZ(),Ste(),mt(Yce,"createParser"),mt(Hce,"buildRules"),mt(Vce,"buildElement"),mt(Xce,"buildAction"),mt(Kce,"buildRuleCall"),mt(Zce,"buildRuleCallPredicate"),mt(Qce,"buildPredicate"),mt(Jce,"buildAlternatives"),mt(ehe,"buildUnorderedGroup"),mt(the,"buildGroup"),mt(rhe,"getGuardCondition"),mt(nhe,"buildCrossReference"),mt(ihe,"buildKeyword"),mt(ahe,"wrap"),mt(she,"getRule"),mt(ohe,"getRuleName"),mt(lhe,"getToken")});function hhe(e){var t=e.Grammar,r=e.parser.Lexer;return Yce(t,e=new Uce(e),r.definition),e.finalize(),e}var uhe=e(()=>{Wce(),che(),mt(hhe,"createCompletionParser")});function dhe(e){return(e=phe(e)).finalize(),e}function phe(e){var t=e.Grammar,r=e.parser.Lexer;return Yce(t,new Fce(e),r.definition)}var ghe,fhe,mhe,yhe=e(()=>{Wce(),che(),mt(dhe,"createLangiumParser"),mt(phe,"prepareLangiumParser")}),vhe=e(()=>{Ose(),WJ(),oee(),Ste(),zee(),AZ(),ghe=class{static{mt(this,"DefaultTokenBuilder")}constructor(){this.diagnostics=[]}buildTokens(e,t){let r=kZ(jee(e,!1)),n=this.buildTerminalTokens(r),i=this.buildKeywordTokens(r,n,t);return n.forEach(e=>{var t=e.PATTERN;"object"==typeof t&&t&&"test"in t&&Nee(t)?i.unshift(e):i.push(e)}),i}flushLexingReport(e){return{diagnostics:this.popDiagnostics()}}popDiagnostics(){var e=[...this.diagnostics];return this.diagnostics=[],e}buildTerminalTokens(e){return e.filter(LQ).filter(e=>!e.fragment).map(e=>this.buildTerminalToken(e)).toArray()}buildTerminalToken(e){var t=mte(e),r=this.requiresCustomPattern(t)?this.regexPatternFunction(t):t,n={name:e.name,PATTERN:r};return"function"==typeof r&&(n.LINE_BREAKS=!0),e.hidden&&(n.GROUP=Nee(t)?zne.SKIPPED:"hidden"),n}requiresCustomPattern(e){return!!(e.flags.includes("u")||e.flags.includes("s")||e.source.includes("?<=")||e.source.includes("?(r.lastIndex=t,r.exec(e))}buildKeywordTokens(e,t,r){return e.filter(EQ).flatMap(e=>JJ(e).filter(zQ)).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(Ree(e.value)):e.value}findLongerAlt(n,e){return e.reduce((e,t)=>{var r=t?.PATTERN;return r?.source&&Mee("^"+r.source+"$",n.value)&&e.push(t),e},[])}}}),xhe=e(()=>{function e(t){let r="";for(let e=1;e{var t,r;function n(){if(void 0===t)throw new Error("No runtime abstraction layer installed");return t}function i(e){if(void 0===e)throw new Error("No runtime abstraction layer provided");t=e}Object.defineProperty(e,"__esModule",{value:!0}),mt(n,"RAL"),r=n,mt(i,"install"),r.install=i,e.default=n}),whe=VBe(e=>{function t(e){return!0===e||!1===e}function r(e){return"string"==typeof e||e instanceof String}function n(e){return"number"==typeof e||e instanceof Number}function i(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))}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"),e.boolean=t,mt(r,"string"),e.string=r,mt(n,"number"),e.number=n,mt(i,"error"),e.error=i,mt(a,"func"),e.func=a,mt(s,"array"),e.array=s,mt(o,"stringArray"),e.stringArray=o}),khe=VBe(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.Emitter=t.Event=void 0;var s=bhe();{var r=t.Event={};let e={dispose(){}};r.None=function(){return e}}var i=class{static{mt(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:mt(()=>this.remove(e,t),"dispose")})}remove(n,i=null){if(this._callbacks){let r=!1;for(let e=0,t=this._callbacks.length;e{this._callbacks||(this._callbacks=new i),this._options&&this._options.onFirstListenerAdd&&this._callbacks.isEmpty()&&this._options.onFirstListenerAdd(this),this._callbacks.add(e,t);let n={dispose:mt(()=>{this._callbacks&&(this._callbacks.remove(e,t),n.dispose=a._noop,this._options)&&this._options.onLastListenerRemove&&this._callbacks.isEmpty()&&this._options.onLastListenerRemove(this)},"dispose")};return Array.isArray(r)&&r.push(n),n}),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(){}}),The=VBe(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.CancellationTokenSource=e.CancellationToken=void 0;var t,r,n=bhe(),i=whe(),a=khe();function s(e){return e&&(e===r.None||e===r.Cancelled||i.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"),r.is=s;var o=Object.freeze(function(e,t){let r=(0,n.default)().timer.setTimeout(e.bind(t),0);return{dispose(){r.dispose()}}}),l=class{static{mt(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,"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}),Ehe={},Che=e(()=>{Y(Ehe,ee(The(),1))});function She(){return new Promise(e=>{"u"{Che(),mt(She,"delayNextTick"),Ihe=0,Rhe=10,mt(_he,"startCancelableOperation"),mt(Ahe,"setInterruptionPeriod"),Mhe=Symbol("OperationCancelled"),mt(Lhe,"isOperationCancelled"),mt(Nhe,"interruptAndCheck"),Dhe=class{static{mt(this,"Deferred")}constructor(){this.promise=new Promise((t,r)=>{this.resolve=e=>(t(e),this),this.reject=e=>(r(e),this)})}}});function Phe(n,i){if(!(n.length<=1)){var a=n.length/2|0,s=n.slice(0,a),o=n.slice(a);Phe(s,i),Phe(o,i);let e=0,t=0,r=0;for(;er.line||t.line===r.line&&t.character>r.character?{start:r,end:t}:e}function zhe(e){var t=Fhe(e.range);return t!==e.range?{newText:e.newText,range:t}:e}var Ghe,Uhe,qhe,jhe,Whe,Yhe,Hhe,Vhe,Xhe,Khe,Zhe=e(()=>{function e(e,t,r,n){return new Ghe(e,t,r,n)}function t(e,t,r){if(e instanceof Ghe)return e.update(t,r),e;throw new Error("TextDocument.update: document must be created by TextDocument.create")}function r(e,t){let r=e.getText(),n=Phe(t.map(zhe),(e,t)=>{var r=e.range.start.line-t.range.start.line;return 0==r?e.range.start.character-t.range.start.character:r}),i=0,a=[];for(var s of n){var o=e.offsetAt(s.range.start);if(oi&&a.push(r.substring(i,o)),s.newText.length&&a.push(s.newText),i=e.offsetAt(s.range.end)}return a.push(r.substr(i)),a.join("")}var n;Ghe=class i{static{mt(this,"FullTextDocument")}constructor(e,t,r,n){this._uri=e,this._languageId=t,this._version=r,this._content=n,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(i.isIncremental(a)){var s=Fhe(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),n=this._lineOffsets,i=Bhe(a.text,!1,o);if(e-r===i.length)for(let e=0,t=i.length;ee?n=i:r=i+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{var r={470:e=>{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,n="",i=0,a=-1,s=0,o=0;o<=e.length;++o){if(o{for(var r in t)h.o(t,r)&&!h.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},h.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t);var u,d,p={};{let n,r=((h.r=e=>{typeof Symbol<"u"&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})})(p),h.d(p,{URI:mt(()=>w,"URI"),Utils:mt(()=>u,"Utils")}),"object"==typeof process?n="win32"===process.platform:"object"==typeof navigator&&(n=0<=navigator.userAgent.indexOf("Windows")),/^\w[\w\d+.-]*$/),i=/^\//,a=/^\/\//;function g(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(!i.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(g,"s");let s=/^(([^:/?#]+?):)?(\/\/([^/?#]*))?([^?#]*)(\?([^#]*))?(#(.*))?/;class w{static{mt(this,"f")}static isUri(e){return e instanceof w||!!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,n,i,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=n||"",this.fragment=i||"",g(this,a))}get fsPath(){return y(this,!1)}with(e){if(!e)return this;let{scheme:t,authority:r,path:n,query:i,fragment:a}=e;return void 0===t?t=this.scheme:null===t&&(t=""),void 0===r?r=this.authority:null===r&&(r=""),void 0===n?n=this.path:null===n&&(n=""),void 0===i?i=this.query:null===i&&(i=""),void 0===a?a=this.fragment:null===a&&(a=""),t===this.scheme&&r===this.authority&&n===this.path&&i===this.query&&a===this.fragment?this:new k(t,r,n,i,a)}static parse(e,t=!1){return(e=s.exec(e))?new k(e[2]||"",b(e[4]||""),b(e[5]||""),b(e[7]||""),b(e[9]||""),t):new k("","","","","")}static file(e){let t="",r;return"/"===(e=n?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 k("file",t,e,"","")}static from(e){return g(e=new k(e.scheme,e.authority,e.path,e.query,e.fragment),!0),e}toString(e=!1){return v(this,e)}toJSON(){return this}static revive(e){var t;return e&&(e instanceof w?e:((t=new k(e))._formatted=e.external,t._fsPath=e._sep===o?e.fsPath:null,t))}}let o=n?1:void 0;class k extends w{static{mt(this,"l")}_formatted=null;_fsPath=null;get fsPath(){return this._fsPath||(this._fsPath=y(this,!1)),this._fsPath}toString(e=!1){return e?v(this,!0):(this._formatted||(this._formatted=v(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 f(t,r,n){let i,a=-1;for(let e=0;ex(e)):e}mt(b,"C");let e=h(470),c=e.posix||e;(d=u=u||{}).joinPath=function(e,...t){return e.with({path:c.join(e.path,...t)})},d.resolvePath=function(e,...t){let r=e.path,n=!1,i=("/"!==r[0]&&(r="/"+r,n=!0),c.resolve(r,...t));return n&&"/"===i[0]&&!e.authority&&(i=i.substring(1)),e.with({path:i})},d.dirname=function(e){if(0===e.path.length||"/"===e.path)return e;let t=c.dirname(e.path);return 1===t.length&&46===t.charCodeAt(0)&&(t=""),e.with({path:t})},d.basename=function(e){return c.basename(e.path)},d.extname=function(e){return c.extname(e.path)}}({URI:qhe,Utils:jhe}=p)}),Jhe=e(()=>{function e(e,t){return e?.toString()===t?.toString()}function t(e,t){let r="string"==typeof e?e:e.path,n="string"==typeof t?t:t.path,i=r.split("/").filter(e=>00{var e;Zhe(),eue(),Che(),AZ(),Jhe(),(e=Yhe=Yhe||{})[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",Hhe=class{static{mt(this,"DefaultLangiumDocumentFactory")}constructor(e){this.serviceRegistry=e.ServiceRegistry,this.textDocuments=e.workspace.TextDocuments,this.fileSystemProvider=e.workspace.FileSystemProvider}async fromUri(e,t=Ehe.CancellationToken.None){var r=await this.fileSystemProvider.readFile(e);return this.createAsync(e,r,t)}fromTextDocument(e,t,r){return t=t??qhe.parse(e.uri),Ehe.CancellationToken.is(r)?this.createAsync(t,e,r):this.create(t,e,r)}fromString(e,t,r){return Ehe.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 n;return"string"==typeof t?(n=this.parse(e,t,r),this.createLangiumDocument(n,e,void 0,t)):"$model"in t?(n={value:t.$model,parserErrors:[],lexerErrors:[]},this.createLangiumDocument(n,e)):(n=this.parse(e,t.getText(),r),this.createLangiumDocument(n,e,t))}async createAsync(e,t,r){var n;return"string"==typeof t?(n=await this.parseAsync(e,t,r),this.createLangiumDocument(n,e,void 0,t)):(n=await this.parseAsync(e,t.getText(),r),this.createLangiumDocument(n,e,t))}createLangiumDocument(t,r,e,n){let i;if(e)i={parseResult:t,uri:r,state:Yhe.Parsed,references:[],textDocument:e};else{let e=this.createTextDocumentGetter(r,n);i={parseResult:t,uri:r,state:Yhe.Parsed,references:[],get textDocument(){return e()}}}return t.value.$document=i}async update(e,t){var r=null==(r=e.parseResult.value.$cstNode)?void 0:r.root.fullText,n=null==(n=this.textDocuments)?void 0:n.get(e.uri.toString()),i=n?n.getText():await this.fileSystemProvider.readFile(e.uri);return n?Object.defineProperty(e,"textDocument",{value:n}):(n=this.createTextDocumentGetter(e.uri,i),Object.defineProperty(e,"textDocument",{get:n})),r!==i&&(e.parseResult=await this.parseAsync(e.uri,i,t),e.parseResult.value.$document=e),e.state=Yhe.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,n;return()=>n=n??Uhe.create(e.toString(),r.getServices(e).LanguageMetaData.languageId,0,t??"")}},Vhe=class{static{mt(this,"DefaultLangiumDocuments")}constructor(e){this.documentMap=new Map,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.serviceRegistry=e.ServiceRegistry}get all(){return kZ(this.documentMap.values())}addDocument(e){var t=e.uri.toString();if(this.documentMap.has(t))throw new Error(`A document with the URI '${t}' is already present.`);this.documentMap.set(t,e)}getDocument(e){return e=e.toString(),this.documentMap.get(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.documentMap.has(e.toString())}invalidateDocument(e){var t=e.toString();return(t=this.documentMap.get(t))&&(this.serviceRegistry.getServices(e).references.Linker.unlink(t),t.state=Yhe.Changed,t.precomputedScopes=void 0,t.diagnostics=void 0),t}deleteDocument(e){var e=e.toString(),t=this.documentMap.get(e);return t&&(t.state=Yhe.Changed,this.documentMap.delete(e)),t}}}),tue=e(()=>{Che(),xZ(),oee(),Ohe(),eue(),Xhe=Symbol("ref_resolving"),Khe=class{static{mt(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}async link(t,e=Ehe.CancellationToken.None){for(var r of eee(t.parseResult.value))await Nhe(e),ree(r).forEach(e=>this.doLink(e,t))}doLink(e,t){var r=e.reference;if(void 0===r._ref){r._ref=Xhe;try{var n,i=this.getCandidate(e);gZ(i)?r._ref=i:(r._nodeDescription=i,this.langiumDocuments().hasDocument(i.documentUri)?(n=this.loadAstNode(i),r._ref=n??this.createLinkingError(e,i)):r._ref=void 0)}catch(t){console.error(`An error occurred while resolving reference to '${r.$refText}':`,t),i=null!=(n=t.message)?n:String(t),r._ref=Object.assign(Object.assign({},e),{message:`An error occurred while resolving reference to '${r.$refText}': `+i})}t.references.push(r)}}unlink(e){for(var t of e.references)delete t._ref,delete t._nodeDescription;e.references=[]}getCandidate(e){return this.scopeProvider.getScope(e).getElement(e.reference.$refText)??this.createLinkingError(e)}buildReference(n,i,e,a){let s=this,o={$refNode:e,$refText:a,get ref(){var e;if(uZ(this._ref))return this._ref;if(pZ(this._nodeDescription)){var t=s.loadAstNode(this._nodeDescription);this._ref=t??s.createLinkingError({reference:o,container:n,property:i},this._nodeDescription)}else if(void 0===this._ref){this._ref=Xhe;var t=ZJ(n).$document,r=s.getLinkedNode({reference:o,container:n,property:i});if(r.error&&t&&t.state{Ste(),mt(rue,"isNamed"),nue=class{static{mt(this,"DefaultNameProvider")}getName(e){if(rue(e))return e.name}getNameNode(e){return Xee(e.$cstNode,"name")}}}),vue=e(()=>{Ste(),xZ(),oee(),ZZ(),AZ(),Jhe(),iue=class{static{mt(this,"DefaultReferences")}constructor(e){this.nameProvider=e.references.NameProvider,this.index=e.shared.workspace.IndexManager,this.nodeLocator=e.workspace.AstNodeLocator}findDeclaration(e){if(e){var t=ete(e),r=e.astNode;if(t&&r){if(dZ(t=r[t.feature]))return t.ref;if(Array.isArray(t))for(var n of t)if(dZ(n)&&n.$refNode&&n.$refNode.offset<=e.offset&&n.$refNode.end>=e.end)return n.ref}if(r&&(t=this.nameProvider.getNameNode(r))&&(t===e||RZ(e,t)))return r}}findDeclarationNode(e){if((e=this.findDeclaration(e))?.$cstNode)return this.nameProvider.getNameNode(e)??e.$cstNode}findReferences(e,t){var r,n=[];t.includeDeclaration&&(r=this.getReferenceToSelf(e))&&n.push(r);let i=this.index.findAllReferences(e,this.nodeLocator.getAstNodePath(e));return t.documentUri&&(i=i.filter(e=>Whe.equals(e.sourceUri,t.documentUri))),n.push(...i),kZ(n)}getReferenceToSelf(e){var t,r=this.nameProvider.getNameNode(e);if(r)return t=KJ(e),e=this.nodeLocator.getAstNodePath(e),{sourceUri:t.uri,sourcePath:e,targetUri:t.uri,targetPath:e,segment:DZ(r),local:!0}}}}),xue=e(()=>{AZ(),aue=class{static{mt(this,"MultiMap")}constructor(e){if(this.map=new Map,e)for(var[t,r]of e)this.add(t,r)}get size(){return _Z.sum(kZ(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 null!=(e=this.map.get(e))?e:[]}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 kZ(this.map.entries()).flatMap(([t,e])=>e.map(e=>[t,e]))}keys(){return kZ(this.map.keys())}values(){return kZ(this.map.values()).flat()}entriesGroupedByKey(){return kZ(this.map.entries())}},sue=class{static{mt(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)}}}),bue=e(()=>{Che(),oee(),xue(),Ohe(),oue=class{static{mt(this,"DefaultScopeComputation")}constructor(e){this.nameProvider=e.references.NameProvider,this.descriptions=e.workspace.AstNodeDescriptionProvider}async computeExports(e,t=Ehe.CancellationToken.None){return this.computeExportsForNode(e.parseResult.value,e,void 0,t)}async computeExportsForNode(e,t,r=QJ,n=Ehe.CancellationToken.None){var i,a=[];this.exportNode(e,a,t);for(i of r(e))await Nhe(n),this.exportNode(i,a,t);return a}exportNode(e,t,r){var n=this.nameProvider.getName(e);n&&t.push(this.descriptions.createDescription(e,n,r))}async computeLocalScopes(e,t=Ehe.CancellationToken.None){var r,n=e.parseResult.value,i=new aue;for(r of JJ(n))await Nhe(t),this.processNode(r,e,i);return i}processNode(e,t,r){var n,i=e.$container;i&&(n=this.nameProvider.getName(e))&&r.add(i,this.descriptions.createDescription(e,n,t))}}}),wue=e(()=>{AZ(),lue=class{static{mt(this,"StreamScope")}constructor(e,t,r){this.elements=e,this.outerScope=t,this.caseInsensitive=null!=(e=r?.caseInsensitive)&&e}getAllElements(){return this.outerScope?this.elements.concat(this.outerScope.getAllElements()):this.elements}getElement(t){return(this.caseInsensitive?this.elements.find(e=>e.name.toLowerCase()===t.toLowerCase()):this.elements.find(e=>e.name===t))||(this.outerScope?this.outerScope.getElement(t):void 0)}},cue=class{static{mt(this,"MapScope")}constructor(e,t,r){var n;this.elements=new Map,this.caseInsensitive=null!=(r=r?.caseInsensitive)&&r;for(n of e){var i=this.caseInsensitive?n.name.toLowerCase():n.name;this.elements.set(i,n)}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)}getAllElements(){let e=kZ(this.elements.values());return e=this.outerScope?e.concat(this.outerScope.getAllElements()):e}},hue={getElement(){},getAllElements(){return EZ}}}),kue=e(()=>{uue=class{static{mt(this,"DisposableCache")}constructor(){this.toDispose=[],this.isDisposed=!1}onDispose(e){this.toDispose.push(e)}dispose(){this.throwIfDisposed(),this.clear(),this.isDisposed=!0,this.toDispose.forEach(e=>e.dispose())}throwIfDisposed(){if(this.isDisposed)throw new Error("This cache has already been disposed")}},due=class extends uue{static{mt(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()}},pue=class extends uue{static{mt(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}},gue=class extends pue{static{mt(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)}))}},fue=class extends due{static{mt(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()}))}}}),Tue=e(()=>{wue(),oee(),AZ(),kue(),mue=class{static{mt(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 fue(e.shared)}getScope(t){let r=[],n=this.reflection.getReferenceType(t),i=KJ(t.container).precomputedScopes;if(i){let e=t.container;do{var a=i.get(e);0this.reflection.isSubtype(e.type,n))),e=e.$container}while(e)}let s=this.getGlobalScope(n,t);for(let e=r.length-1;0<=e;e--)s=this.createScope(r[e],s);return s}createScope(e,t,r){return new lue(kZ(e),t,r)}createScopeForNodes(e,t,r){return e=kZ(e).map(e=>{var t=this.nameProvider.getName(e);if(t)return this.descriptions.createDescription(e,t)}).nonNullable(),new lue(e,t,r)}getGlobalScope(e,t){return this.globalScopeCache.get(e,()=>new cue(this.indexManager.allElements(e)))}}});function Eue(e){return"string"==typeof e.$comment}function Cue(e){return"object"==typeof e&&!!e&&("$ref"in e||"$error"in e)}var Sue,_ue,Aue=e(()=>{Qhe(),xZ(),oee(),Ste(),mt(Eue,"isAstNodeWithComment"),mt(Cue,"isIntermediateReference"),Sue=class{static{mt(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??{},n=t?.replacer,i=mt((e,t)=>this.replacer(e,t,r),"defaultReplacer"),a=n?(e,t)=>n(e,t,i):i;try{return this.currentDocument=KJ(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:n,sourceText:i,textRegions:a,comments:s,uriConverter:o}){if(!this.ignoreProperties.has(t)){if(dZ(r)){var l=r.ref,n=n?r.$refText:void 0;if(l){let e=KJ(l),t="";return this.currentDocument&&this.currentDocument!==e&&(t=o?o(e.uri,r):e.uri.toString()),o=this.astNodeLocator.getAstNodePath(l),{$ref:t+"#"+o,$refText:n}}return{$error:null!=(o=null==(l=r.error)?void 0:l.message)?o:"Could not resolve reference",$refText:n}}if(uZ(r)){let e;return a&&(e=this.addAstNodeRegionWithAssignmentsTo(Object.assign({},r)),!t||r.$document)&&e?.$textRegion&&(e.$textRegion.documentURI=null==(l=this.currentDocument)?void 0:l.uri.toString()),i&&!t&&((e=e??Object.assign({},r)).$sourceText=null==(o=r.$cstNode)?void 0:o.text),s&&(e=e??Object.assign({},r),n=this.commentProvider.getComment(r))&&(e.$comment=n.replace(/\r/g,"")),e??r}return r}}addAstNodeRegionWithAssignmentsTo(n){let i=mt(e=>({offset:e.offset,end:e.end,length:e.length,range:e.range}),"createDocumentSegment");if(n.$cstNode){let e=n.$textRegion=i(n.$cstNode),r=e.assignments={};return Object.keys(n).filter(e=>!e.startsWith("$")).forEach(e=>{var t=Vee(n.$cstNode,e).map(i);0!==t.length&&(r[e]=t)}),n}}linkNode(t,r,n,e,i,a){for(var[s,o]of Object.entries(t))if(Array.isArray(o))for(let e=0;e{Jhe(),_ue=class{static{mt(this,"DefaultServiceRegistry")}get map(){return this.fileExtensionMap}constructor(e){this.languageIdMap=new Map,this.fileExtensionMap=new Map,this.textDocuments=e?.workspace.TextDocuments}register(e){var t,r=e.LanguageMetaData;for(t of r.fileExtensions)this.fileExtensionMap.has(t)&&console.warn(`The file extension ${t} is used by multiple languages. It is now assigned to '${r.languageId}'.`),this.fileExtensionMap.set(t,e);this.languageIdMap.set(r.languageId,e),1===this.languageIdMap.size?this.singleton=e:this.singleton=void 0}getServices(e){if(void 0!==this.singleton)return this.singleton;if(0===this.languageIdMap.size)throw new Error("The service registry is empty. Use `register` to register the services of a language.");var t=null==(t=null==(t=this.textDocuments)?void 0:t.get(e))?void 0:t.languageId;if(void 0!==t){var r=this.languageIdMap.get(t);if(r)return r}if(r=Whe.extname(e),e=this.fileExtensionMap.get(r))return e;throw t?new Error(`The service registry contains no services for the extension '${r}' for language '${t}'.`):new Error(`The service registry contains no services for the extension '${r}'.`)}hasServices(e){try{return this.getServices(e),!0}catch{return!1}}get all(){return Array.from(this.languageIdMap.values())}}});function Nue(e){return{code:e}}var Iue,Rue,Mue=e(()=>{Dpe(),xue(),Ohe(),AZ(),mt(Nue,"diagnosticData"),(Iue=Iue||{}).all=["fast","slow","built-in"],Rue=class{static{mt(this,"ValidationRegistry")}constructor(e){this.entries=new aue,this.entriesBefore=[],this.entriesAfter=[],this.reflection=e.shared.AstReflection}register(e,t=this,r="fast"){if("built-in"===r)throw new Error("The 'built-in' category is reserved for lexer, parser, and linker errors.");for(var[n,i]of Object.entries(e))if(Array.isArray(i))for(var a of i)a={check:this.wrapValidationException(a,t),category:r},this.addEntry(n,a);else"function"==typeof i?(i={check:this.wrapValidationException(i,t),category:r},this.addEntry(n,i)):QZ()}wrapValidationException(n,i){return async(e,t,r)=>{await this.handleException(()=>n.call(i,e,t,r),"An error occurred during validation",t,e)}}async handleException(e,t,r,n){try{await e()}catch(e){if(Lhe(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:n})}}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=kZ(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(i,a,s){return async(e,t,r,n)=>{await this.handleException(()=>i.call(s,e,t,r,n),a,t,e)}}get checksBefore(){return this.entriesBefore}get checksAfter(){return this.entriesAfter}}});function Due(e){if(e.range)return e.range;let t;return"string"==typeof e.property?t=Xee(e.node.$cstNode,e.property,e.index):"string"==typeof e.keyword&&(t=Qee(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 Oue(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 Pue(e){switch(e){case"error":return Nue($ue.LexingError);case"warning":return Nue($ue.LexingWarning);case"info":return Nue($ue.LexingInfo);case"hint":return Nue($ue.LexingHint);default:throw new Error("Invalid diagnostic severity: "+e)}}var Bue,$ue,Fue,zue,Gue,Uue,que,jue,Wue,Yue,Hue=e(()=>{var e;Che(),Ste(),oee(),ZZ(),Ohe(),Mue(),Bue=class{static{mt(this,"DefaultDocumentValidator")}constructor(e){this.validationRegistry=e.validation.ValidationRegistry,this.metadata=e.LanguageMetaData}async validateDocument(e,t={},r=Ehe.CancellationToken.None){var n=e.parseResult,i=[];if(await Nhe(r),t.categories&&!t.categories.includes("built-in")||(this.processLexingErrors(n,i,t),!(t.stopAfterLexingErrors&&i.some(e=>(null==(e=e.data)?void 0:e.code)===$ue.LexingError)||(this.processParsingErrors(n,i,t),t.stopAfterParsingErrors&&i.some(e=>(null==(e=e.data)?void 0:e.code)===$ue.ParsingError))||(this.processLinkingErrors(e,i,t),t.stopAfterLinkingErrors&&i.some(e=>(null==(e=e.data)?void 0:e.code)===$ue.LinkingError))))){try{i.push(...await this.validateAst(n.value,t,r))}catch(e){if(Lhe(e))throw e;console.error("An error occurred during validation:",e)}await Nhe(r)}return i}processLexingErrors(e,t,r){var n;for(n of[...e.lexerErrors,...null!=(e=null==(e=e.lexerReport)?void 0:e.diagnostics)?e:[]]){var i={severity:Oue(i=null!=(i=n.severity)?i:"error"),range:{start:{line:n.line-1,character:n.column-1},end:{line:n.line-1,character:n.column+n.length-1}},message:n.message,data:Pue(i),source:this.getSource()};t.push(i)}}processParsingErrors(e,t,r){for(var n of e.parserErrors){let e;var i,a;isNaN(n.token.startOffset)?"previousToken"in n&&(a=n.previousToken,e=isNaN(a.startOffset)?{start:i={line:0,character:0},end:i}:{start:i={line:a.endLine-1,character:a.endColumn},end:i}):e=MZ(n.token),e&&(a={severity:Oue("error"),range:e,message:n.message,data:Nue($ue.ParsingError),source:this.getSource()},t.push(a))}}processLinkingErrors(e,t,r){for(var n of e.references){var i;(n=n.error)&&(i={node:n.container,property:n.property,index:n.index,data:{code:$ue.LinkingError,containerType:n.container.$type,property:n.property,refText:n.reference.$refText}},t.push(this.toDiagnostic("error",n.message,i)))}}async validateAst(e,t,r=Ehe.CancellationToken.None){let n=[],i=mt((e,t,r)=>{n.push(this.toDiagnostic(e,t,r))},"acceptor");return await this.validateAstBefore(e,t,i,r),await this.validateAstNodes(e,t,i,r),await this.validateAstAfter(e,t,i,r),n}async validateAstBefore(e,t,r,n=Ehe.CancellationToken.None){var i,a;for(a of this.validationRegistry.checksBefore)await Nhe(n),await a(e,r,null!=(i=t.categories)?i:[],n)}async validateAstNodes(e,r,n,i=Ehe.CancellationToken.None){await Promise.all(eee(e).map(async e=>{var t;await Nhe(i);for(t of this.validationRegistry.getChecks(e.$type,r.categories))await t(e,n,i)}))}async validateAstAfter(e,t,r,n=Ehe.CancellationToken.None){var i,a;for(a of this.validationRegistry.checksAfter)await Nhe(n),await a(e,r,null!=(i=t.categories)?i:[],n)}toDiagnostic(e,t,r){return{message:t,range:Due(r),severity:Oue(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(Due,"getDiagnosticRange"),mt(Oue,"toDiagnosticSeverity"),mt(Pue,"toDiagnosticData"),(e=$ue=$ue||{}).LexingError="lexing-error",e.LexingWarning="lexing-warning",e.LexingInfo="lexing-info",e.LexingHint="lexing-hint",e.ParsingError="parsing-error",e.LinkingError="linking-error"}),Vue=e(()=>{Che(),xZ(),oee(),ZZ(),Ohe(),Jhe(),Fue=class{static{mt(this,"DefaultAstNodeDescriptionProvider")}constructor(e){this.astNodeLocator=e.workspace.AstNodeLocator,this.nameProvider=e.references.NameProvider}createDescription(t,e,r){var r=r??KJ(t),n=(e=e??this.nameProvider.getName(t),this.astNodeLocator.getAstNodePath(t));if(!e)throw new Error(`Node at path ${n} has no name.`);let i,a=mt(()=>{var e;return i=i??DZ(null!=(e=this.nameProvider.getNameNode(t))?e:t.$cstNode)},"nameSegmentGetter");return{node:t,name:e,get nameSegment(){return a()},selectionSegment:DZ(t.$cstNode),type:t.$type,documentUri:r.uri,path:n}}},zue=class{static{mt(this,"DefaultReferenceDescriptionProvider")}constructor(e){this.nodeLocator=e.workspace.AstNodeLocator}async createDescriptions(e,t=Ehe.CancellationToken.None){let r=[],n=e.parseResult.value;for(var i of eee(n))await Nhe(t),ree(i).filter(e=>!gZ(e)).forEach(e=>{(e=this.createDescription(e))&&r.push(e)});return r}createDescription(e){var t,r=e.reference.$nodeDescription,n=e.reference.$refNode;if(r&&n)return{sourceUri:t=KJ(e.container).uri,sourcePath:this.nodeLocator.getAstNodePath(e.container),targetUri:r.documentUri,targetPath:r.path,segment:DZ(n),local:Whe.equals(r.documentUri,t)}}}}),Xue=e(()=>{Gue=class{static{mt(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,n;return e&&0!==t.length?0<(n=t.indexOf(this.indexSeparator))?(r=t.substring(0,n),n=parseInt(t.substring(n+1)),e[r]?.[n]):e[t]:e},e)}}}),Kue={},Zue=e(()=>{Y(Kue,ee(khe(),1))}),Que=e(()=>{Zue(),Ohe(),Uue=class{static{mt(this,"DefaultConfigurationProvider")}constructor(e){this._ready=new Dhe,this.settings={},this.workspaceConfig=!1,this.onConfigurationSectionUpdateEmitter=new Kue.Emitter,this.serviceRegistry=e.ServiceRegistry}get ready(){return this._ready.promise}initialize(e){this.workspaceConfig=null!=(e=null==(e=e.capabilities.workspace)?void 0:e.configuration)&&e}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(r){r.settings&&Object.keys(r.settings).forEach(e=>{var t=r.settings[e];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}}}),Jue=e(()=>{function e(e){return{dispose:mt(async()=>e(),"dispose")}}var t=que=que||{};mt(e,"create"),t.create=e}),ede=e(()=>{Che(),Jue(),xue(),Ohe(),AZ(),Mue(),eue(),jue=class{static{mt(this,"DefaultDocumentBuilder")}constructor(e){this.updateBuildOptions={validation:{categories:["built-in","fast"]}},this.updateListeners=[],this.buildPhaseListeners=new aue,this.documentPhaseListeners=new aue,this.buildState=new Map,this.documentBuildWaiters=new Map,this.currentState=Yhe.Changed,this.langiumDocuments=e.workspace.LangiumDocuments,this.langiumDocumentFactory=e.workspace.LangiumDocumentFactory,this.textDocuments=e.workspace.TextDocuments,this.indexManager=e.workspace.IndexManager,this.serviceRegistry=e.ServiceRegistry}async build(e,r={},t=Ehe.CancellationToken.None){var n;for(n of e){var i,a=n.uri.toString();if(n.state===Yhe.Validated){if("boolean"==typeof r.validation&&r.validation)n.state=Yhe.IndexedReferences,n.diagnostics=void 0,this.buildState.delete(a);else if("object"==typeof r.validation){let e=this.buildState.get(a),t=null==(i=e?.result)?void 0:i.validationChecks;t&&0<(i=(null!=(i=r.validation.categories)?i:Iue.all).filter(e=>!t.includes(e))).length&&(this.buildState.set(a,{completed:!1,options:{validation:Object.assign(Object.assign({},r.validation),{categories:i})},result:e.result}),n.state=Yhe.IndexedReferences)}}else this.buildState.delete(a)}this.currentState=Yhe.Changed,await this.emitUpdate(e.map(e=>e.uri),[]),await this.buildDocuments(e,r,t)}async update(e,t,r=Ehe.CancellationToken.None){this.currentState=Yhe.Changed;for(var n of t)this.langiumDocuments.deleteDocument(n),this.buildState.delete(n.toString()),this.indexManager.remove(n);for(var i of e){var a;this.langiumDocuments.invalidateDocument(i)||((a=this.langiumDocumentFactory.fromModel({$type:"INVALID"},i)).state=Yhe.Changed,this.langiumDocuments.addDocument(a)),this.buildState.delete(i.toString())}let s=kZ(e).concat(t).map(e=>e.toString()).toSet();this.langiumDocuments.all.filter(e=>!s.has(e.uri.toString())&&this.shouldRelink(e,s)).forEach(e=>{this.serviceRegistry.getServices(e.uri).references.Linker.unlink(e),e.state=Math.min(e.state,Yhe.ComputedScopes),e.diagnostics=void 0}),await this.emitUpdate(e,t),await Nhe(r),e=this.sortDocuments(this.langiumDocuments.all.filter(e=>e.statee(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),que.create(()=>{var e=this.updateListeners.indexOf(t);0<=e&&this.updateListeners.splice(e,1)})}async buildDocuments(e,t,r){this.prepareBuild(e,t),await this.runCancelable(e,Yhe.Parsed,r,e=>this.langiumDocumentFactory.update(e,r)),await this.runCancelable(e,Yhe.IndexedContent,r,e=>this.indexManager.updateContent(e,r)),await this.runCancelable(e,Yhe.ComputedScopes,r,async e=>{var t=this.serviceRegistry.getServices(e.uri).references.ScopeComputation;e.precomputedScopes=await t.computeLocalScopes(e,r)}),await this.runCancelable(e,Yhe.Linked,r,e=>this.serviceRegistry.getServices(e.uri).references.Linker.link(e,r)),await this.runCancelable(e,Yhe.IndexedReferences,r,e=>this.indexManager.updateReferences(e,r));var n,t=e.filter(e=>this.shouldValidate(e));await this.runCancelable(t,Yhe.Validated,r,e=>this.validate(e,r));for(n of e){var i=this.buildState.get(n.uri.toString());i&&(i.completed=!0)}}prepareBuild(e,t){for(var r of e){var r=r.uri.toString(),n=this.buildState.get(r);n&&!n.completed||this.buildState.set(r,{completed:!1,options:t,result:n?.result})}}async runCancelable(e,t,r,n){var i;for(i of e.filter(e=>e.statee.state===t),await this.notifyBuildPhase(e,t,r),this.currentState=t}onBuildPhase(e,t){return this.buildPhaseListeners.add(e,t),que.create(()=>{this.buildPhaseListeners.delete(e,t)})}onDocumentPhase(e,t){return this.documentPhaseListeners.add(e,t),que.create(()=>{this.documentPhaseListeners.delete(e,t)})}waitUntil(i,e,a){let s;return e&&"path"in e?s=e:a=e,a=a??Ehe.CancellationToken.None,s&&(e=this.langiumDocuments.getDocument(s))&&e.state>i?Promise.resolve(s):this.currentState>=i?Promise.resolve(void 0):a.isCancellationRequested?Promise.reject(Mhe):new Promise((t,e)=>{let r=this.onBuildPhase(i,()=>{var e;r.dispose(),n.dispose(),s?(e=this.langiumDocuments.getDocument(s),t(e?.uri)):t(void 0)}),n=a.onCancellationRequested(()=>{r.dispose(),n.dispose(),e(Mhe)})})}async notifyDocumentPhase(e,t,r){var n;for(n of this.documentPhaseListeners.get(t).slice())try{await n(e,r)}catch(e){if(!Lhe(e))throw e}}async notifyBuildPhase(e,t,r){var n;if(0!==e.length)for(n of this.buildPhaseListeners.get(t).slice())await Nhe(r),await n(e,r)}shouldValidate(e){return!!this.getBuildOptions(e).validation}async validate(e,t){var r=this.serviceRegistry.getServices(e.uri).validation.DocumentValidator,n=this.getBuildOptions(e).validation,r=await r.validateDocument(e,n="object"==typeof n?n:void 0,t);e.diagnostics?e.diagnostics.push(...r):e.diagnostics=r,(t=this.buildState.get(e.uri.toString()))&&(null==t.result&&(t.result={}),e=null!=(r=n?.categories)?r:Iue.all,t.result.validationChecks?t.result.validationChecks.push(...e):t.result.validationChecks=[...e])}getBuildOptions(e){return null!=(e=null==(e=this.buildState.get(e.uri.toString()))?void 0:e.options)?e:{}}}}),tde=e(()=>{oee(),kue(),Che(),AZ(),Jhe(),Wue=class{static{mt(this,"DefaultIndexManager")}constructor(e){this.symbolIndex=new Map,this.symbolByTypeIndex=new pue,this.referenceIndex=new Map,this.documents=e.workspace.LangiumDocuments,this.serviceRegistry=e.ServiceRegistry,this.astReflection=e.AstReflection}findAllReferences(e,t){let r=KJ(e).uri,n=[];return this.referenceIndex.forEach(e=>{e.forEach(e=>{Whe.equals(e.targetUri,r)&&e.targetPath===t&&n.push(e)})}),kZ(n)}allElements(t,r){let e=kZ(this.symbolIndex.keys());return(e=r?e.filter(e=>!r||r.has(e)):e).map(e=>this.getFileDescriptions(e,t)).flat()}getFileDescriptions(t,r){var e;return r?this.symbolByTypeIndex.get(t,r,()=>{var e;return(null!=(e=this.symbolIndex.get(t))?e:[]).filter(e=>this.astReflection.isSubtype(e.type,r))}):null!=(e=this.symbolIndex.get(t))?e:[]}remove(e){e=e.toString(),this.symbolIndex.delete(e),this.symbolByTypeIndex.clear(e),this.referenceIndex.delete(e)}async updateContent(e,t=Ehe.CancellationToken.None){t=await this.serviceRegistry.getServices(e.uri).references.ScopeComputation.computeExports(e,t),e=e.uri.toString(),this.symbolIndex.set(e,t),this.symbolByTypeIndex.clear(e)}async updateReferences(e,t=Ehe.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()))}}}),rde=e(()=>{Che(),Ohe(),Jhe(),Yue=class{static{mt(this,"DefaultWorkspaceManager")}constructor(e){this.initialBuildOptions={},this._ready=new Dhe,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=null!=(e=e.workspaceFolders)?e:void 0}initialized(e){return this.mutex.write(e=>{var t;return this.initializeWorkspace(null!=(t=this.folders)?t:[],e)})}async initializeWorkspace(e,t=Ehe.CancellationToken.None){e=await this.performStartup(e),await Nhe(t),await this.documentBuilder.build(e,this.initialBuildOptions,t)}async performStartup(e){let t=this.serviceRegistry.all.flatMap(e=>e.LanguageMetaData.fileExtensions),r=[],n=mt(e=>{r.push(e),this.langiumDocuments.hasDocument(e.uri)||this.langiumDocuments.addDocument(e)},"collector");return await this.loadAdditionalDocuments(e,n),await Promise.all(e.map(e=>[e,this.getRootFolder(e)]).map(async e=>this.traverseFolder(...e,t,n))),this._ready.resolve(),r}loadAdditionalDocuments(e,t){return Promise.resolve()}getRootFolder(e){return qhe.parse(e.uri)}async traverseFolder(t,e,r,n){e=await this.fileSystemProvider.readDirectory(e),await Promise.all(e.map(async e=>{this.includeEntry(t,e,r)&&(e.isDirectory?await this.traverseFolder(t,e.uri,r,n):e.isFile&&(e=await this.langiumDocuments.getOrCreateDocument(e.uri),n(e)))}))}includeEntry(e,t,r){var n=Whe.basename(t.uri);return!n.startsWith(".")&&(t.isDirectory?"node_modules"!==n&&"out"!==n:!!t.isFile&&(n=Whe.extname(t.uri),r.includes(n)))}}});function nde(e){return Array.isArray(e)&&(0===e.length||"name"in e[0])}function ide(e){return e&&"modes"in e&&"defaultMode"in e}function ade(e){return!nde(e)&&!ide(e)}var sde,ode,lde,cde=e(()=>{Ose(),sde=class{static{mt(this,"DefaultLexerErrorMessageProvider")}buildUnexpectedCharactersMessage(e,t,r,n,i){return Bne.buildUnexpectedCharactersMessage(e,t,r,n,i)}buildUnableToPopLexerModeMessage(e){return Bne.buildUnableToPopLexerModeMessage(e)}},ode={mode:"full"},lde=class{static{mt(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),ade(t)?Object.values(t):t),e="production"===e.LanguageMetaData.mode;this.chevrotainLexer=new zne(t,{positionTracking:"full",skipValidations:e,errorMessageProvider:this.errorMessageProvider})}get definition(){return this.tokenTypes}tokenize(e,t=0){var r,n=this.chevrotainLexer.tokenize(e);return{tokens:n.tokens,errors:n.errors,hidden:null!=(n=n.groups.hidden)?n:[],report:null==(r=(n=this.tokenBuilder).flushLexingReport)?void 0:r.call(n,e)}}toTokenTypeDictionary(e){if(ade(e))return e;let t=ide(e)?Object.values(e.modes).flat():e,r={};return t.forEach(e=>r[e.name]=e),r}},mt(nde,"isTokenTypeArray"),mt(ide,"isIMultiModeLexerDefinition"),mt(ade,"isTokenTypeDictionary")});function hde(e,t,r){let n,i;return n="string"==typeof e?(i=t,r):(i=e.range.start,t),i=i||ale.create(0,0),r=dde(e),t=Ede(n),yde({index:0,tokens:pde({lines:r,position:i,options:t}),position:i})}function ude(e,t){var r,n,t=Ede(t);return 0!==(e=dde(e)).length&&(r=e[e.length-1],n=t.start,t=t.end,!!n?.exec(e[0]))&&!!t?.exec(r)}function dde(e){return("string"==typeof e?e:e.text).split(Oee)}function pde(a){let s,o,l,c=[],h=a.position.line,u=a.position.character;for(let i=0;i=r.length?0{Flt(),UJ(),iht(),me(fut,"parseJSDoc"),me(mut,"isJSDoc"),me(yut,"getLines"),Dut=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,Out=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu,me(vut,"tokenize"),me(xut,"buildInlineTokens"),Put=/\S/,But=/\s*$/,me(but,"skipWhitespace"),me(wut,"lastCharacter"),me(kut,"parseJSDocComment"),me(Tut,"parseJSDocElement"),me(Eut,"appendEmptyLine"),me(Cut,"parseJSDocText"),me(_ut,"parseJSDocInline"),me(Sut,"parseJSDocTag"),me(Aut,"parseJSDocLine"),me(Lut,"normalizeOptions"),me(Nut,"normalizeOption"),Fut=class{static{me(this,"JSDocCommentImpl")}constructor(t,e){this.elements=t,this.range=e}getTag(e){return this.getAllTags().find(t=>t.name===e)}getTags(e){return this.getAllTags().filter(t=>t.name===e)}getAllTags(){return this.elements.filter(t=>"name"in t)}toString(){let t="";for(var e of this.elements)0===t.length?t=e.toString():(e=e.toString(),t+=Mut(t)+e);return t.trim()}toMarkdown(t){let e="";for(var r of this.elements)0===e.length?e=r.toMarkdown(t):(r=r.toMarkdown(t),e+=Mut(e)+r);return e.trim()}},$ut=class{static{me(this,"JSDocTagImpl")}constructor(t,e,r,n){this.name=t,this.content=e,this.inline=r,this.range=n}toString(){let t="@"+this.name,e=this.content.toString();return 1===this.content.inlines.length?t=t+" "+e:1r.range.start.line&&(e+=` -`)}return e}toMarkdown(e){let r="";for(let t=0;tn.range.start.line&&(r+=` -`)}return r}},Gut=class{static{me(this,"JSDocLineImpl")}constructor(t,e){this.text=t,this.range=e}toString(){return this.text}toMarkdown(){return this.text}},me(Mut,"fillNewlines")}),Kut=t(()=>{cJ(),Xut(),Uut=class{static{me(this,"JSDocDocumentationProvider")}constructor(t){this.indexManager=t.shared.workspace.IndexManager,this.commentProvider=t.documentation.CommentProvider}getDocumentation(r){var t=this.commentProvider.getComment(r);if(t&&mut(t))return fut(t).toMarkdown({renderLink:me((t,e)=>this.documentationLinkRenderer(r,t,e),"renderLink"),renderTag:me(t=>this.documentationTagRenderer(r,t),"renderTag")})}documentationLinkRenderer(t,e,r){var n=null!=(n=this.findNameInPrecomputedScopes(t,e))?n:this.findNameInGlobalScope(t,e);return n&&n.nameSegment?(t=n.nameSegment.range.start.line+1,e=n.nameSegment.range.start.character+1,`[${r}](${n.documentUri.with({fragment:`L${t},`+e}).toString()})`):void 0}documentationTagRenderer(t,e){}findNameInPrecomputedScopes(e,r){var n=QQ(e).precomputedScopes;if(n){let t=e;do{var i=n.get(t).find(t=>t.name===r);if(i)return i}while(t=t.$container)}}findNameInGlobalScope(t,e){return this.indexManager.allElements().find(t=>t.name===e)}}}),Zut=t(()=>{Mht(),JK(),qut=class{static{me(this,"DefaultCommentProvider")}constructor(t){this.grammarConfig=()=>t.parser.GrammarConfig}getComment(t){return Lht(t)?t.$comment:null==(t=zK(t.$cstNode,this.grammarConfig().multilineCommentRules))?void 0:t.text}}}),Qut=t(()=>{zct(),rut(),jut=class{static{me(this,"DefaultAsyncParser")}constructor(t){this.syncParser=t.parser.LangiumParser}parse(t,e){return Promise.resolve(this.syncParser.parse(t))}},Wut=class{static{me(this,"AbstractThreadedAsyncParser")}constructor(t){this.threadCount=8,this.terminationDelay=200,this.workerPool=[],this.queue=[],this.hydrator=t.serializer.Hydrator}initializeWorkers(){for(;this.workerPool.length{var t;0{i=setTimeout(()=>{this.terminateWorker(r)},this.terminationDelay)});return r.parse(t).then(t=>{t=this.hydrator.hydrate(t),n.resolve(t)}).catch(t=>{n.reject(t)}).finally(()=>{a.dispose(),clearTimeout(i)}),n.promise}terminateWorker(t){t.terminate(),0<=(t=this.workerPool.indexOf(t))&&this.workerPool.splice(t,1)}async acquireParserWorker(t){this.initializeWorkers();for(var e of this.workerPool)if(e.ready)return e.lock(),e;let r=new $ct;return t.onCancellationRequested(()=>{var t=this.queue.indexOf(r);0<=t&&this.queue.splice(t,1),r.reject(Fct)}),this.queue.push(r),r.promise}},Yut=class{static{me(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(t,e,r,n){this.onReadyEmitter=new eut.Emitter,this.deferred=new $ct,this._ready=!0,this._parsing=!1,this.sendMessage=t,this._terminate=n,e(t=>{this.deferred.resolve(t),this.unlock()}),r(t=>{this.deferred.reject(t),this.unlock()})}terminate(){this.deferred.reject(Fct),this._terminate()}lock(){this._ready=!1}unlock(){this._parsing=!1,this._ready=!0,this.onReadyEmitter.fire()}parse(t){if(this._parsing)throw new Error("Parser worker is busy");return this._parsing=!0,this.deferred=new $ct,this.sendMessage(t),this.deferred.promise}}}),Jut=t(()=>{Nct(),zct(),Hut=class{static{me(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new Lct.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(t){this.cancelWrite();var e=Rct();return this.previousTokenSource=e,this.enqueue(this.writeQueue,t,e.token)}read(t){return this.enqueue(this.readQueue,t)}enqueue(t,e,r=Lct.CancellationToken.None){var n=new $ct;return t.push({action:e,deferred:n,cancellationToken:r}),this.performNextOperation(),n.promise}async performNextOperation(){if(this.done){var t=[];if(0{try{var n=await Promise.resolve().then(()=>t(r));e.resolve(n)}catch(t){Dct(t)?e.resolve(void 0):e.reject(t)}})),this.done=!0,this.performNextOperation()}}cancelWrite(){this.previousTokenSource.cancel()}}}),tdt=t(()=>{$lt(),HQ(),wK(),cJ(),Eht(),JK(),Vut=class{static{me(this,"DefaultHydrator")}constructor(t){this.grammarElementIdMap=new uht,this.tokenTypeIdMap=new uht,this.grammar=t.Grammar,this.lexer=t.parser.Lexer,this.linker=t.references.Linker}dehydrate(t){return{lexerErrors:t.lexerErrors,lexerReport:t.lexerReport?this.dehydrateLexerReport(t.lexerReport):void 0,parserErrors:t.parserErrors.map(t=>Object.assign(Object.assign({},t),{message:t.message})),value:this.dehydrateAstNode(t.value,this.createDehyrationContext(t.value))}}dehydrateLexerReport(t){return t}createDehyrationContext(t){var e,r=new Map,n=new Map;for(e of rJ(t))r.set(e,{});if(t.$cstNode)for(var i of RK(t.$cstNode))n.set(i,{});return{astNodes:r,cstNodes:n}}dehydrateAstNode(t,e){var r,n,i=e.astNodes.get(t);i.$type=t.$type,i.$containerIndex=t.$containerIndex,i.$containerProperty=t.$containerProperty,void 0!==t.$cstNode&&(i.$cstNode=this.dehydrateCstNode(t.$cstNode,e));for([r,n]of Object.entries(t))if(!r.startsWith("$"))if(Array.isArray(n)){var a,s=[];i[r]=s;for(a of n)pK(a)?s.push(this.dehydrateAstNode(a,e)):gK(a)?s.push(this.dehydrateReference(a,e)):s.push(a)}else pK(n)?i[r]=this.dehydrateAstNode(n,e):gK(n)?i[r]=this.dehydrateReference(n,e):void 0!==n&&(i[r]=n);return i}dehydrateReference(t,e){var r={};return r.$refText=t.$refText,t.$refNode&&(r.$refNode=e.cstNodes.get(t.$refNode)),r}dehydrateCstNode(t,e){var r=e.cstNodes.get(t);return xK(t)?r.fullText=t.fullText:r.grammarSource=this.getGrammarElementId(t.grammarSource),r.hidden=t.hidden,r.astNode=e.astNodes.get(t.astNode),yK(t)?r.content=t.content.map(t=>this.dehydrateCstNode(t,e)):vK(t)&&(r.tokenType=t.tokenType.name,r.offset=t.offset,r.length=t.length,r.startLine=t.range.start.line,r.startColumn=t.range.start.character,r.endLine=t.range.end.line,r.endColumn=t.range.end.character),r}hydrate(t){var e=t.value,r=this.createHydrationContext(e);return"$cstNode"in e&&this.hydrateCstNode(e.$cstNode,r),{lexerErrors:t.lexerErrors,lexerReport:t.lexerReport,parserErrors:t.parserErrors,value:this.hydrateAstNode(e,r)}}createHydrationContext(t){var e,r=new Map,n=new Map;for(e of rJ(t))r.set(e,{});let i;if(t.$cstNode)for(var a of RK(t.$cstNode)){let t;"fullText"in a?(t=new Olt(a.fullText),i=t):"content"in a?t=new Mlt:"tokenType"in a&&(t=this.hydrateCstLeafNode(a)),t&&(n.set(a,t),t.root=i)}return{astNodes:r,cstNodes:n}}hydrateAstNode(t,e){var r,n,i=e.astNodes.get(t);i.$type=t.$type,i.$containerIndex=t.$containerIndex,i.$containerProperty=t.$containerProperty,t.$cstNode&&(i.$cstNode=e.cstNodes.get(t.$cstNode));for([r,n]of Object.entries(t))if(!r.startsWith("$"))if(Array.isArray(n)){var a,s=[];i[r]=s;for(a of n)pK(a)?s.push(this.setParent(this.hydrateAstNode(a,e),i)):gK(a)?s.push(this.hydrateReference(a,i,r,e)):s.push(a)}else pK(n)?i[r]=this.setParent(this.hydrateAstNode(n,e),i):gK(n)?i[r]=this.hydrateReference(n,i,r,e):void 0!==n&&(i[r]=n);return i}setParent(t,e){return t.$container=e,t}hydrateReference(t,e,r,n){return this.linker.buildReference(e,r,n.cstNodes.get(t.$refNode),t.$refText)}hydrateCstNode(t,e,r=0){var n=e.cstNodes.get(t);if("number"==typeof t.grammarSource&&(n.grammarSource=this.getGrammarElement(t.grammarSource)),n.astNode=e.astNodes.get(t.astNode),yK(n))for(var i of t.content)i=this.hydrateCstNode(i,e,r++),n.content.push(i);return n}hydrateCstLeafNode(t){var e=this.getTokenType(t.tokenType),r=t.offset;return new Rlt(r,t.length,{start:{line:t.startLine,character:t.startColumn},end:{line:t.endLine,character:t.endColumn}},e,t.hidden)}getTokenType(t){return this.lexer.definition[t]}getGrammarElementId(t){if(t)return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.get(t)}getGrammarElement(t){return 0===this.grammarElementIdMap.size&&this.createGrammarElementIdMap(),this.grammarElementIdMap.getKey(t)}createGrammarElementIdMap(){let t=0;for(var e of rJ(this.grammar))uZ(e)&&this.grammarElementIdMap.set(e,t++)}}});function edt(t){return{documentation:{CommentProvider:me(t=>new qut(t),"CommentProvider"),DocumentationProvider:me(t=>new Uut(t),"DocumentationProvider")},parser:{AsyncParser:me(t=>new jut(t),"AsyncParser"),GrammarConfig:me(t=>Ltt(t),"GrammarConfig"),LangiumParser:me(t=>yct(t),"LangiumParser"),CompletionParser:me(t=>fct(t),"CompletionParser"),ValueConverter:me(()=>new bct,"ValueConverter"),TokenBuilder:me(()=>new xct,"TokenBuilder"),Lexer:me(t=>new put(t),"Lexer"),ParserErrorMessageProvider:me(()=>new Ylt,"ParserErrorMessageProvider"),LexerErrorMessageProvider:me(()=>new uut,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:me(()=>new Yht,"AstNodeLocator"),AstNodeDescriptionProvider:me(t=>new jht(t),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:me(t=>new Wht(t),"ReferenceDescriptionProvider")},references:{Linker:me(t=>new eht(t),"Linker"),NameProvider:me(()=>new lht,"NameProvider"),ScopeProvider:me(t=>new wht(t),"ScopeProvider"),ScopeComputation:me(t=>new dht(t),"ScopeComputation"),References:me(t=>new cht(t),"References")},serializer:{Hydrator:me(t=>new Vut(t),"Hydrator"),JsonSerializer:me(t=>new Iht(t),"JsonSerializer")},validation:{DocumentValidator:me(t=>new Uht(t),"DocumentValidator"),ValidationRegistry:me(t=>new Bht(t),"ValidationRegistry")},shared:me(()=>t.shared,"shared")}}function rdt(e){return{ServiceRegistry:me(t=>new Rht(t),"ServiceRegistry"),workspace:{LangiumDocuments:me(t=>new Jct(t),"LangiumDocuments"),LangiumDocumentFactory:me(t=>new Qct(t),"LangiumDocumentFactory"),DocumentBuilder:me(t=>new Xht(t),"DocumentBuilder"),IndexManager:me(t=>new Kht(t),"IndexManager"),WorkspaceManager:me(t=>new Zht(t),"WorkspaceManager"),FileSystemProvider:me(t=>e.fileSystemProvider(t),"FileSystemProvider"),WorkspaceLock:me(()=>new Hut,"WorkspaceLock"),ConfigurationProvider:me(t=>new Hht(t),"ConfigurationProvider")}}}var ndt=t(()=>{Ntt(),mct(),kct(),Tct(),Ect(),sht(),kht(),Tht(),Cht(),Aht(),Mht(),Dht(),Qht(),Fht(),Jht(),tut(),nut(),aut(),aht(),sut(),out(),gut(),Kut(),Zut(),Klt(),Qut(),Jut(),tdt(),me(edt,"createDefaultCoreModule"),me(rdt,"createDefaultSharedCoreModule")});function idt(t,e,r,n,i,a,s,o,l){return sdt([t,e,r,n,i,a,s,o,l].reduce(ldt,{}))}function adt(t){if(t&&t[hdt])for(var e of Object.values(t))adt(e);return t}function sdt(r,n){let i=new Proxy({},{deleteProperty:me(()=>!1,"deleteProperty"),set:me(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:me((t,e)=>e===hdt||odt(t,e,r,n||i),"get"),getOwnPropertyDescriptor:me((t,e)=>(odt(t,e,r,n||i),Object.getOwnPropertyDescriptor(t,e)),"getOwnPropertyDescriptor"),has:me((t,e)=>e in r,"has"),ownKeys:me(()=>[...Object.getOwnPropertyNames(r)],"ownKeys")});return i}function odt(t,e,r,n){if(e in t){if(t[e]instanceof Error)throw new Error("Construction failure. Please make sure that your dependencies are constructable.",{cause:t[e]});if(t[e]===udt)throw new Error('Cycle detected. Please make "'+String(e)+'" lazy. Visit https://langium.org/docs/reference/configuration-services/#resolving-cyclic-dependencies');return t[e]}if(e in r){r=r[e],t[e]=udt;try{t[e]="function"==typeof r?r(n):sdt(r,n)}catch(r){throw t[e]=r instanceof Error?r:void 0,r}return t[e]}}function ldt(t,e){if(e)for(var[r,n]of Object.entries(e)){var i;void 0!==n&&(null!==(i=t[r])&&null!==n&&"object"==typeof i&&"object"==typeof n?t[r]=ldt(i,n):t[r]=n)}return t}var cdt,hdt,udt,ddt,pdt,gdt,fdt,mdt,ydt,vdt=t(()=>{(cdt=cdt||{}).merge=(t,e)=>ldt(ldt({},t),e),me(idt,"inject"),hdt=Symbol("isProxy"),me(adt,"eagerLoad"),me(sdt,"_inject"),udt=Symbol(),me(odt,"_resolve"),me(ldt,"_merge")}),xdt=t(()=>{}),bdt=t(()=>{Zut(),Kut(),Xut()}),wdt=t(()=>{}),kdt=t(()=>{Ntt(),wdt()}),Tdt=t(()=>{zat(),Tct(),gut(),ddt={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]},(pdt=pdt||{}).REGULAR="indentation-sensitive",pdt.IGNORE_INDENTATION="ignore-indentation",gdt=class extends xct{static{me(this,"IndentationAwareTokenBuilder")}constructor(t=ddt){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options=Object.assign(Object.assign({},ddt),t),this.indentTokenType=Krt({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=Krt({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(t,e){var r;if(!lut(t=super.buildTokens(t,e)))throw new Error("Invalid tokens built by default builder");let{indentTokenName:n,dedentTokenName:i,whitespaceTokenName:a,ignoreIndentationDelimiters:s}=this.options,o,l,c,h=[];for(r of t){for(var[u,d]of s)r.name===u?r.PUSH_MODE=pdt.IGNORE_INDENTATION:r.name===d&&(r.POP_MODE=!0);r.name===i?o=r:r.name===n?l=r:r.name===a?c=r:h.push(r)}if(o&&l&&c)return 0{}),Cdt=t(()=>{Qut(),mct(),$lt(),Tdt(),kct(),Klt(),gut(),gct(),Edt(),Tct(),Ect()}),_dt=t(()=>{sht(),kht(),Tht(),_ht(),Cht(),Aht()}),Sdt=t(()=>{tdt(),Mht()}),Adt=t(()=>{mdt=class{static{me(this,"EmptyFileSystemProvider")}readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}},ydt={fileSystemProvider:me(()=>new mdt,"fileSystemProvider")}});function Ldt(){var t=idt(rdt(ydt),Rdt),e=idt(edt({shared:t}),Idt);return t.ServiceRegistry.register(e),e}function Ndt(t){var e=Ldt(),t=e.serializer.JsonSerializer.deserialize(t);return e.shared.workspace.LangiumDocumentFactory.fromModel(t,Vct.parse(`memory://${null!=(e=t.name)?e:"grammar"}.langium`)),t}var Idt,Rdt,Mdt=t(()=>{ndt(),vdt(),HQ(),Adt(),iht(),Idt={Grammar:me(()=>{},"Grammar"),LanguageMetaData:me(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},Rdt={AstReflection:me(()=>new WQ,"AstReflection")},me(Ldt,"createMinimalGrammarServices"),me(Ndt,"loadGrammarFromJson")}),Ddt={},Odt=(oPt(Ddt,{AstUtils:()=>VQ,BiMap:()=>uht,Cancellation:()=>Lct,ContextCache:()=>vht,CstUtils:()=>IK,DONE_RESULT:()=>SK,Deferred:()=>$ct,Disposable:()=>Vht,DisposableCache:()=>mht,DocumentCache:()=>xht,EMPTY_STREAM:()=>_K,ErrorWithLocation:()=>eZ,GrammarUtils:()=>qJ,MultiMap:()=>hht,OperationCancelled:()=>Fct,Reduction:()=>LK,RegExpUtils:()=>LJ,SimpleCache:()=>yht,StreamImpl:()=>CK,TreeStreamImpl:()=>AK,URI:()=>Vct,UriUtils:()=>Kct,WorkspaceCache:()=>bht,assertUnreachable:()=>tZ,delayNextTick:()=>Ict,interruptAndCheck:()=>Oct,isOperationCancelled:()=>Dct,loadGrammarFromJson:()=>Ndt,setInterruptionPeriod:()=>Mct,startCancelableOperation:()=>Rct,stream:()=>EK}),t(()=>{Sht(),rut(),Y(Ddt,eut),Eht(),iut(),rZ(),Mdt(),zct(),NK(),iht(),cJ(),Nct(),JK(),Att(),UJ()})),Pdt=t(()=>{Qht(),Fht()}),Bdt=t(()=>{Jht(),tut(),nut(),aut(),aht(),Adt(),sut(),Jut(),out()}),Fdt={},$dt=(oPt(Fdt,{AbstractAstReflection:()=>bK,AbstractCstNode:()=>Ilt,AbstractLangiumParser:()=>qlt,AbstractParserErrorMessageProvider:()=>Wlt,AbstractThreadedAsyncParser:()=>Wut,AstUtils:()=>VQ,BiMap:()=>uht,Cancellation:()=>Lct,CompositeCstNodeImpl:()=>Mlt,ContextCache:()=>vht,CstNodeBuilder:()=>Nlt,CstUtils:()=>IK,DEFAULT_TOKENIZE_OPTIONS:()=>dut,DONE_RESULT:()=>SK,DatatypeSymbol:()=>Glt,DefaultAstNodeDescriptionProvider:()=>jht,DefaultAstNodeLocator:()=>Yht,DefaultAsyncParser:()=>jut,DefaultCommentProvider:()=>qut,DefaultConfigurationProvider:()=>Hht,DefaultDocumentBuilder:()=>Xht,DefaultDocumentValidator:()=>Uht,DefaultHydrator:()=>Vut,DefaultIndexManager:()=>Kht,DefaultJsonSerializer:()=>Iht,DefaultLangiumDocumentFactory:()=>Qct,DefaultLangiumDocuments:()=>Jct,DefaultLexer:()=>put,DefaultLexerErrorMessageProvider:()=>uut,DefaultLinker:()=>eht,DefaultNameProvider:()=>lht,DefaultReferenceDescriptionProvider:()=>Wht,DefaultReferences:()=>cht,DefaultScopeComputation:()=>dht,DefaultScopeProvider:()=>wht,DefaultServiceRegistry:()=>Rht,DefaultTokenBuilder:()=>xct,DefaultValueConverter:()=>bct,DefaultWorkspaceLock:()=>Hut,DefaultWorkspaceManager:()=>Zht,Deferred:()=>$ct,Disposable:()=>Vht,DisposableCache:()=>mht,DocumentCache:()=>xht,DocumentState:()=>Zct,DocumentValidator:()=>qht,EMPTY_SCOPE:()=>fht,EMPTY_STREAM:()=>_K,EmptyFileSystem:()=>ydt,EmptyFileSystemProvider:()=>mdt,ErrorWithLocation:()=>eZ,GrammarAST:()=>nZ,GrammarUtils:()=>qJ,IndentationAwareLexer:()=>fdt,IndentationAwareTokenBuilder:()=>gdt,JSDocDocumentationProvider:()=>Uut,LangiumCompletionParser:()=>Hlt,LangiumParser:()=>jlt,LangiumParserErrorMessageProvider:()=>Ylt,LeafCstNodeImpl:()=>Rlt,LexingMode:()=>pdt,MapScope:()=>ght,Module:()=>cdt,MultiMap:()=>hht,OperationCancelled:()=>Fct,ParserWorker:()=>Yut,Reduction:()=>LK,RegExpUtils:()=>LJ,RootCstNodeImpl:()=>Olt,SimpleCache:()=>yht,StreamImpl:()=>CK,StreamScope:()=>pht,TextDocument:()=>Hct,TreeStreamImpl:()=>AK,URI:()=>Vct,UriUtils:()=>Kct,ValidationCategory:()=>Pht,ValidationRegistry:()=>Bht,ValueConverter:()=>wct,WorkspaceCache:()=>bht,assertUnreachable:()=>tZ,createCompletionParser:()=>fct,createDefaultCoreModule:()=>edt,createDefaultSharedCoreModule:()=>rdt,createGrammarConfig:()=>Ltt,createLangiumParser:()=>yct,createParser:()=>Zlt,delayNextTick:()=>Ict,diagnosticData:()=>Oht,eagerLoad:()=>adt,getDiagnosticRange:()=>$ht,indentationBuilderDefaultOptions:()=>ddt,inject:()=>idt,interruptAndCheck:()=>Oct,isAstNode:()=>pK,isAstNodeDescription:()=>fK,isAstNodeWithComment:()=>Lht,isCompositeCstNode:()=>yK,isIMultiModeLexerDefinition:()=>cut,isJSDoc:()=>mut,isLeafCstNode:()=>vK,isLinkingError:()=>mK,isNamed:()=>oht,isOperationCancelled:()=>Dct,isReference:()=>gK,isRootCstNode:()=>xK,isTokenTypeArray:()=>lut,isTokenTypeDictionary:()=>hut,loadGrammarFromJson:()=>Ndt,parseJSDoc:()=>fut,prepareLangiumParser:()=>vct,setInterruptionPeriod:()=>Mct,startCancelableOperation:()=>Rct,stream:()=>EK,toDiagnosticData:()=>Ght,toDiagnosticSeverity:()=>zht}),t(()=>{ndt(),vdt(),Dht(),xdt(),wK(),bdt(),kdt(),Cdt(),_dt(),Sdt(),Odt(),Y(Fdt,Ddt),Pdt(),Bdt(),HQ()}));function zdt(t){return g0t.isInstance(t,Zdt)}function Gdt(t){return g0t.isInstance(t,Jdt)}function Udt(t){return g0t.isInstance(t,r0t)}function qdt(t){return g0t.isInstance(t,n0t)}function jdt(t){return g0t.isInstance(t,i0t)}function Wdt(t){return g0t.isInstance(t,s0t)}function Ydt(t){return g0t.isInstance(t,l0t)}function Hdt(t){return g0t.isInstance(t,c0t)}function Vdt(t){return g0t.isInstance(t,"Pie")}function Xdt(t){return g0t.isInstance(t,h0t)}var Kdt,s,Zdt,Qdt,Jdt,t0t,e0t,r0t,n0t,i0t,a0t,s0t,o0t,l0t,c0t,h0t,u0t,d0t,p0t,g0t,f0t,m0t,y0t,v0t,x0t,b0t,w0t,k0t,T0t,E0t,C0t,_0t,S0t,A0t,L0t,N0t,I0t,R0t,M0t,D0t,O0t,P0t,B0t,F0t,$0t,z0t,G0t,U0t,q0t,j0t=t(()=>{$dt(),$dt(),$dt(),$dt(),Kdt=Object.defineProperty,s=me((t,e)=>Kdt(t,"name",{value:e,configurable:!0}),"__name"),Zdt="Architecture",me(zdt,"isArchitecture"),s(zdt,"isArchitecture"),Qdt="Axis",Jdt="Branch",me(Gdt,"isBranch"),s(Gdt,"isBranch"),t0t="Checkout",e0t="CherryPicking",r0t="Commit",me(Udt,"isCommit"),s(Udt,"isCommit"),n0t="GitGraph",me(qdt,"isGitGraph"),s(qdt,"isGitGraph"),i0t="Info",me(jdt,"isInfo"),s(jdt,"isInfo"),a0t="Junction",s0t="Merge",me(Wdt,"isMerge"),s(Wdt,"isMerge"),o0t="Option",l0t="Packet",me(Ydt,"isPacket"),s(Ydt,"isPacket"),c0t="PacketBlock",me(Hdt,"isPacketBlock"),s(Hdt,"isPacketBlock"),me(Vdt,"isPie"),s(Vdt,"isPie"),h0t="PieSection",me(Xdt,"isPieSection"),s(Xdt,"isPieSection"),u0t="Service",d0t="Direction",p0t=class extends bK{static{me(this,"MermaidAstReflection")}static{s(this,"MermaidAstReflection")}getAllTypes(){return[Zdt,Qdt,Jdt,t0t,e0t,r0t,"Curve",d0t,"Edge","Entry",n0t,"Group",i0t,a0t,s0t,o0t,l0t,c0t,"Pie",h0t,"Radar",u0t,"Statement"]}computeIsSubtype(t,e){switch(t){case Jdt:case t0t:case e0t:case r0t:case s0t:return this.isSubtype("Statement",e);case d0t:return this.isSubtype(n0t,e);default:return!1}}getReferenceType(t){if("Entry:axis"!=(t=t.container.$type+":"+t.property))throw new Error(t+" is not a valid reference id.");return Qdt}getTypeMetaData(t){switch(t){case Zdt:return{name:Zdt,properties:[{name:"accDescr"},{name:"accTitle"},{name:"edges",defaultValue:[]},{name:"groups",defaultValue:[]},{name:"junctions",defaultValue:[]},{name:"services",defaultValue:[]},{name:"title"}]};case Qdt:return{name:Qdt,properties:[{name:"label"},{name:"name"}]};case Jdt:return{name:Jdt,properties:[{name:"name"},{name:"order"}]};case t0t:return{name:t0t,properties:[{name:"branch"}]};case e0t:return{name:e0t,properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case r0t:return{name:r0t,properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Curve":return{name:"Curve",properties:[{name:"entries",defaultValue:[]},{name:"label"},{name:"name"}]};case"Edge":return{name:"Edge",properties:[{name:"lhsDir"},{name:"lhsGroup",defaultValue:!1},{name:"lhsId"},{name:"lhsInto",defaultValue:!1},{name:"rhsDir"},{name:"rhsGroup",defaultValue:!1},{name:"rhsId"},{name:"rhsInto",defaultValue:!1},{name:"title"}]};case"Entry":return{name:"Entry",properties:[{name:"axis"},{name:"value"}]};case n0t:return{name:n0t,properties:[{name:"accDescr"},{name:"accTitle"},{name:"statements",defaultValue:[]},{name:"title"}]};case"Group":return{name:"Group",properties:[{name:"icon"},{name:"id"},{name:"in"},{name:"title"}]};case i0t:return{name:i0t,properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case a0t:return{name:a0t,properties:[{name:"id"},{name:"in"}]};case s0t:return{name:s0t,properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case o0t:return{name:o0t,properties:[{name:"name"},{name:"value",defaultValue:!1}]};case l0t:return{name:l0t,properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case c0t:return{name:c0t,properties:[{name:"bits"},{name:"end"},{name:"label"},{name:"start"}]};case"Pie":return{name:"Pie",properties:[{name:"accDescr"},{name:"accTitle"},{name:"sections",defaultValue:[]},{name:"showData",defaultValue:!1},{name:"title"}]};case h0t:return{name:h0t,properties:[{name:"label"},{name:"value"}]};case"Radar":return{name:"Radar",properties:[{name:"accDescr"},{name:"accTitle"},{name:"axes",defaultValue:[]},{name:"curves",defaultValue:[]},{name:"options",defaultValue:[]},{name:"title"}]};case u0t:return{name:u0t,properties:[{name:"icon"},{name:"iconText"},{name:"id"},{name:"in"},{name:"title"}]};case d0t:return{name:d0t,properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};default:return{name:t,properties:[]}}}},g0t=new p0t,m0t=s(()=>f0t=f0t??Ndt(`{"$type":"Grammar","isDeclared":true,"name":"Info","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":"?"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`),"InfoGrammar"),v0t=s(()=>y0t=y0t??Ndt(`{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$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":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`),"PacketGrammar"),b0t=s(()=>x0t=x0t??Ndt(`{"$type":"Grammar","isDeclared":true,"name":"Pie","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"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@3"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`),"PieGrammar"),k0t=s(()=>w0t=w0t??Ndt(`{"$type":"Grammar","isDeclared":true,"name":"Architecture","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":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":":"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/"},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@18"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[[\\\\w ]+\\\\]/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`),"ArchitectureGrammar"),E0t=s(()=>T0t=T0t??Ndt(`{"$type":"Grammar","isDeclared":true,"name":"GitGraph","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":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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"}]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`),"GitGraphGrammar"),_0t=s(()=>C0t=C0t??Ndt(`{"$type":"Grammar","isDeclared":true,"name":"Radar","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":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":"]"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":"*"}]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"}}]},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}}}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"definesHiddenTokens":false,"hiddenTokens":[],"types":[],"usedGrammars":[]}`),"RadarGrammar"),R0t={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(I0t={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(N0t={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(L0t={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(A0t={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(S0t={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"},M0t={AstReflection:s(()=>new p0t,"AstReflection")},D0t={Grammar:s(()=>m0t(),"Grammar"),LanguageMetaData:s(()=>S0t,"LanguageMetaData"),parser:{}},O0t={Grammar:s(()=>v0t(),"Grammar"),LanguageMetaData:s(()=>A0t,"LanguageMetaData"),parser:{}},P0t={Grammar:s(()=>b0t(),"Grammar"),LanguageMetaData:s(()=>L0t,"LanguageMetaData"),parser:{}},B0t={Grammar:s(()=>k0t(),"Grammar"),LanguageMetaData:s(()=>N0t,"LanguageMetaData"),parser:{}},F0t={Grammar:s(()=>E0t(),"Grammar"),LanguageMetaData:s(()=>I0t,"LanguageMetaData"),parser:{}},$0t={Grammar:s(()=>_0t(),"Grammar"),LanguageMetaData:s(()=>R0t,"LanguageMetaData"),parser:{}},z0t={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},G0t=class extends bct{static{me(this,"AbstractMermaidValueConverter")}static{s(this,"AbstractMermaidValueConverter")}runConverter(t,e,r){var n=this.runCommonConverter(t,e,r);return void 0===(n=void 0===n?this.runCustomConverter(t,e,r):n)?super.runConverter(t,e,r):n}runCommonConverter(t,e,r){return void 0!==(t=z0t[t.name])&&null!==(t=t.exec(e))?void 0!==t[1]?t[1].trim().replace(/[\t ]{2,}/gm," "):void 0!==t[2]?t[2].replace(/^\s*/gm,"").replace(/\s+$/gm,"").replace(/[\t ]{2,}/gm," ").replace(/[\n\r]{2,}/gm,` -`):void 0:void 0}},U0t=class extends G0t{static{me(this,"CommonValueConverter")}static{s(this,"CommonValueConverter")}runCustomConverter(t,e,r){}},q0t=class extends xct{static{me(this,"AbstractMermaidTokenBuilder")}static{s(this,"AbstractMermaidTokenBuilder")}constructor(t){super(),this.keywords=new Set(t)}buildKeywordTokens(t,e,r){return(t=super.buildKeywordTokens(t,e,r)).forEach(t=>{this.keywords.has(t.name)&&void 0!==t.PATTERN&&(t.PATTERN=new RegExp(t.PATTERN.toString()+"(?:(?=%%)|(?!\\S))"))}),t}},class extends q0t{static{me(this,"CommonTokenBuilder")}static{s(this,"CommonTokenBuilder")}}});function W0t(t=ydt){var t=idt(rdt(t),M0t),e=idt(edt({shared:t}),F0t,H0t);return t.ServiceRegistry.register(e),{shared:t,GitGraph:e}}var Y0t,H0t,V0t=t(()=>{j0t(),$dt(),Y0t=class extends q0t{static{me(this,"GitGraphTokenBuilder")}static{s(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},H0t={parser:{TokenBuilder:s(()=>new Y0t,"TokenBuilder"),ValueConverter:s(()=>new U0t,"ValueConverter")}},me(W0t,"createGitGraphServices"),s(W0t,"createGitGraphServices")});function X0t(t=ydt){var t=idt(rdt(t),M0t),e=idt(edt({shared:t}),D0t,Z0t);return t.ServiceRegistry.register(e),{shared:t,Info:e}}var K0t,Z0t,Q0t=t(()=>{j0t(),$dt(),K0t=class extends q0t{static{me(this,"InfoTokenBuilder")}static{s(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},Z0t={parser:{TokenBuilder:s(()=>new K0t,"TokenBuilder"),ValueConverter:s(()=>new U0t,"ValueConverter")}},me(X0t,"createInfoServices"),s(X0t,"createInfoServices")});function J0t(t=ydt){var t=idt(rdt(t),M0t),e=idt(edt({shared:t}),O0t,ept);return t.ServiceRegistry.register(e),{shared:t,Packet:e}}var tpt,ept,rpt=t(()=>{j0t(),$dt(),tpt=class extends q0t{static{me(this,"PacketTokenBuilder")}static{s(this,"PacketTokenBuilder")}constructor(){super(["packet-beta"])}},ept={parser:{TokenBuilder:s(()=>new tpt,"TokenBuilder"),ValueConverter:s(()=>new U0t,"ValueConverter")}},me(J0t,"createPacketServices"),s(J0t,"createPacketServices")});function npt(t=ydt){var t=idt(rdt(t),M0t),e=idt(edt({shared:t}),P0t,spt);return t.ServiceRegistry.register(e),{shared:t,Pie:e}}var ipt,apt,spt,opt=t(()=>{j0t(),$dt(),ipt=class extends q0t{static{me(this,"PieTokenBuilder")}static{s(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},apt=class extends G0t{static{me(this,"PieValueConverter")}static{s(this,"PieValueConverter")}runCustomConverter(t,e,r){if("PIE_SECTION_LABEL"===t.name)return e.replace(/"/g,"").trim()}},spt={parser:{TokenBuilder:s(()=>new ipt,"TokenBuilder"),ValueConverter:s(()=>new apt,"ValueConverter")}},me(npt,"createPieServices"),s(npt,"createPieServices")});function lpt(t=ydt){var t=idt(rdt(t),M0t),e=idt(edt({shared:t}),B0t,upt);return t.ServiceRegistry.register(e),{shared:t,Architecture:e}}var cpt,hpt,upt,dpt=t(()=>{j0t(),$dt(),cpt=class extends q0t{static{me(this,"ArchitectureTokenBuilder")}static{s(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},hpt=class extends G0t{static{me(this,"ArchitectureValueConverter")}static{s(this,"ArchitectureValueConverter")}runCustomConverter(t,e,r){return"ARCH_ICON"===t.name?e.replace(/[()]/g,"").trim():"ARCH_TEXT_ICON"===t.name?e.replace(/["()]/g,""):"ARCH_TITLE"===t.name?e.replace(/[[\]]/g,"").trim():void 0}},upt={parser:{TokenBuilder:s(()=>new cpt,"TokenBuilder"),ValueConverter:s(()=>new hpt,"ValueConverter")}},me(lpt,"createArchitectureServices"),s(lpt,"createArchitectureServices")});function ppt(t=ydt){var t=idt(rdt(t),M0t),e=idt(edt({shared:t}),$0t,fpt);return t.ServiceRegistry.register(e),{shared:t,Radar:e}}var gpt,fpt,mpt=t(()=>{j0t(),$dt(),gpt=class extends q0t{static{me(this,"RadarTokenBuilder")}static{s(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},fpt={parser:{TokenBuilder:s(()=>new gpt,"TokenBuilder"),ValueConverter:s(()=>new U0t,"ValueConverter")}},me(ppt,"createRadarServices"),s(ppt,"createRadarServices")}),ypt={},vpt=(oPt(ypt,{InfoModule:()=>Z0t,createInfoServices:()=>X0t}),t(()=>{Q0t(),j0t()})),xpt={},bpt=(oPt(xpt,{PacketModule:()=>ept,createPacketServices:()=>J0t}),t(()=>{rpt(),j0t()})),wpt={},kpt=(oPt(wpt,{PieModule:()=>spt,createPieServices:()=>npt}),t(()=>{opt(),j0t()})),Tpt={},Ept=(oPt(Tpt,{ArchitectureModule:()=>upt,createArchitectureServices:()=>lpt}),t(()=>{dpt(),j0t()})),Cpt={},_pt=(oPt(Cpt,{GitGraphModule:()=>H0t,createGitGraphServices:()=>W0t}),t(()=>{V0t(),j0t()})),Spt={},Apt=(oPt(Spt,{RadarModule:()=>fpt,createRadarServices:()=>ppt}),t(()=>{mpt(),j0t()}));async function Lpt(t,e){var r=Ipt[t];if(!r)throw new Error("Unknown diagram type: "+t);if(Npt[t]||await r(),0<(r=Npt[t].parse(e)).lexerErrors.length||0{V0t(),Q0t(),rpt(),opt(),dpt(),mpt(),j0t(),Npt={},Ipt={info:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(vpt(),ypt))).createInfoServices)().Info.parser.LangiumParser;Npt.info=t},"info"),packet:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(bpt(),xpt))).createPacketServices)().Packet.parser.LangiumParser;Npt.packet=t},"packet"),pie:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(kpt(),wpt))).createPieServices)().Pie.parser.LangiumParser;Npt.pie=t},"pie"),architecture:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(Ept(),Tpt))).createArchitectureServices)().Architecture.parser.LangiumParser;Npt.architecture=t},"architecture"),gitGraph:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(_pt(),Cpt))).createGitGraphServices)().GitGraph.parser.LangiumParser;Npt.gitGraph=t},"gitGraph"),radar:s(async()=>{var t=(t=(await Promise.resolve().then(()=>(Apt(),Spt))).createRadarServices)().Radar.parser.LangiumParser;Npt.radar=t},"radar")},me(Lpt,"parse"),s(Lpt,"parse"),Rpt=class extends Error{static{me(this,"MermaidParseError")}constructor(t){super(`Parsing failed: ${t.lexerErrors.map(t=>t.message).join(` -`)} `+t.parserErrors.map(t=>t.message).join(` -`)),this.result=t}static{s(this,"MermaidParseError")}}});function Dpt(t,e){t.accDescr&&e.setAccDescription?.(t.accDescr),t.accTitle&&e.setAccTitle?.(t.accTitle),t.title&&e.setDiagramTitle?.(t.title)}var Opt,Ppt,Bpt=t(()=>{me(Dpt,"populateCommonDb")}),Fpt=t(()=>{Opt={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4}}),$pt=t(()=>{Ppt=class{constructor(t){this.init=t,this.records=this.init()}static{me(this,"ImperativeState")}reset(){this.records=this.init()}}});function zpt(){return PE({length:7})}function Gpt(t,n){let i=Object.create(null);return t.reduce((t,e)=>{var r=n(e);return i[r]||(i[r]=!0,t.push(e)),t},[])}function Upt(t,e,r){-1===(e=t.indexOf(e))?t.push(r):t.splice(e,1,r)}function qpt(t){let e=t.reduce((t,e)=>t.seq>e.seq?t:e,t[0]),r="";t.forEach(function(t){t===e?r+="\t*":r+="\t|"});var n,i=[r,e.id,e.seq];for(n in b.records.branches)b.records.branches.get(n)===e.id&&i.push(n);if(M.debug(i.join(" ")),e.parents&&2==e.parents.length&&e.parents[0]&&e.parents[1]){var a=b.records.commits.get(e.parents[0]);Upt(t,e,a),e.parents[1]&&t.push(b.records.commits.get(e.parents[1]))}else{if(0==e.parents.length)return;e.parents[0]&&(a=b.records.commits.get(e.parents[0]),Upt(t,e,a))}qpt(t=Gpt(t,t=>t.id))}var jpt,Wpt,b,Ypt,Hpt,Vpt,Xpt,Kpt,Zpt,Qpt,Jpt,tgt,egt,rgt,ngt,igt,agt,sgt,ogt,lgt,cgt,hgt,ugt,dgt,pgt,ggt,fgt,mgt,ygt,vgt,xgt,bgt,wgt,kgt,Tgt,Egt,Cgt,_gt,Sgt,Agt,Lgt,Ngt,Igt,Rgt,Mgt,Dgt,Ogt,Pgt,Bgt,Fgt,$gt,zgt,Ggt,Ugt,qgt,jgt,Wgt,Ygt,Hgt,Vgt,Xgt,Kgt,Zgt=t(()=>{e(),ZE(),Nn(),th(),fu(),Fpt(),$pt(),An(),jpt=yr.gitGraph,Wpt=me(()=>bE({...jpt,...Ir().gitGraph}),"getConfig"),b=new Ppt(()=>{var t=(e=Wpt()).mainBranchName,e=e.mainBranchOrder;return{mainBranchName:t,commits:new Map,head:null,branchConfig:new Map([[t,{name:t,order:e}]]),branches:new Map([[t,null]]),currBranch:t,direction:"LR",seq:0,options:{}}}),me(zpt,"getID"),me(Gpt,"uniqBy"),Ypt=me(function(t){b.records.direction=t},"setDirection"),Hpt=me(function(t){M.debug("options str",t),t=t?.trim()||"{}";try{b.records.options=JSON.parse(t)}catch(t){M.error("error while parsing gitGraph options",t.message)}},"setOptions"),Vpt=me(function(){return b.records.options},"getOptions"),Xpt=me(function(t){let e=t.msg,r=t.id,n=t.type,i=t.tags,a=(M.info("commit",e,r,n,i),M.debug("Entering commit:",e,r,n,i),Wpt());r=L.sanitizeText(r,a),e=L.sanitizeText(e,a),i=i?.map(t=>L.sanitizeText(t,a)),t={id:r||b.records.seq+"-"+zpt(),message:e,seq:b.records.seq++,type:n??Opt.NORMAL,tags:i??[],parents:null==b.records.head?[]:[b.records.head.id],branch:b.records.currBranch},b.records.head=t,M.info("main branch",a.mainBranchName),b.records.commits.set(t.id,t),b.records.branches.set(b.records.currBranch,t.id),M.debug("in pushCommit "+t.id)},"commit"),Kpt=me(function(t){var e=t.name,t=t.order,e=L.sanitizeText(e,Wpt());if(b.records.branches.has(e))throw new Error(`Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout ${e}")`);b.records.branches.set(e,null!=b.records.head?b.records.head.id:null),b.records.branchConfig.set(e,{name:e,order:t}),Jpt(e),M.debug("in createBranch")},"branch"),Zpt=me(t=>{var e=t.branch,r=t.id,n=t.type,i=t.tags,a=Wpt(),e=L.sanitizeText(e,a),r=r&&L.sanitizeText(r,a),t=b.records.branches.get(b.records.currBranch),a=b.records.branches.get(e),t=t?b.records.commits.get(t):void 0,s=a?b.records.commits.get(a):void 0;if(t&&s&&t.branch===e)throw new Error(`Cannot merge branch '${e}' into itself.`);if(b.records.currBranch===e)throw(o=new Error('Incorrect usage of "merge". Cannot merge a branch to itself')).hash={text:"merge "+e,token:"merge "+e,expected:["branch abc"]},o;if(void 0===t||!t)throw(o=new Error(`Incorrect usage of "merge". Current branch (${b.records.currBranch})has no commits`)).hash={text:"merge "+e,token:"merge "+e,expected:["commit"]},o;if(!b.records.branches.has(e))throw(o=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") does not exist")).hash={text:"merge "+e,token:"merge "+e,expected:["branch "+e]},o;if(void 0===s||!s)throw(o=new Error('Incorrect usage of "merge". Branch to be merged ('+e+") has no commits")).hash={text:"merge "+e,token:"merge "+e,expected:['"commit"']},o;if(t===s)throw(o=new Error('Incorrect usage of "merge". Both branches have same head')).hash={text:"merge "+e,token:"merge "+e,expected:["branch abc"]},o;if(r&&b.records.commits.has(r))throw(t=new Error('Incorrect usage of "merge". Commit with id:'+r+" already exists, use different custom id")).hash={text:`merge ${e} ${r} ${n} `+i?.join(" "),token:`merge ${e} ${r} ${n} `+i?.join(" "),expected:[`merge ${e} ${r}_UNIQUE ${n} `+i?.join(" ")]},t;var s=a||"",o={id:r||b.records.seq+"-"+zpt(),message:`merged branch ${e} into `+b.records.currBranch,seq:b.records.seq++,parents:null==b.records.head?[]:[b.records.head.id,s],branch:b.records.currBranch,type:Opt.MERGE,customType:n,customId:!!r,tags:i??[]};b.records.head=o,b.records.commits.set(o.id,o),b.records.branches.set(b.records.currBranch,o.id),M.debug(b.records.branches),M.debug("in mergeBranch")},"merge"),Qpt=me(function(t){let e=t.id,r=t.targetId,n=t.tags,i=t.parent,a=(M.debug("Entering cherryPick:",e,r,n),Wpt());if(e=L.sanitizeText(e,a),r=L.sanitizeText(r,a),n=n?.map(t=>L.sanitizeText(t,a)),i=L.sanitizeText(i,a),!e||!b.records.commits.has(e))throw(t=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided')).hash={text:`cherryPick ${e} `+r,token:`cherryPick ${e} `+r,expected:["cherry-pick abc"]},t;if(void 0===(t=b.records.commits.get(e))||!t)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(i&&(!Array.isArray(t.parents)||!t.parents.includes(i)))throw new Error("Invalid operation: The specified parent commit is not an immediate parent of the cherry-picked commit.");var s=t.branch;if(t.type===Opt.MERGE&&!i)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!r||!b.records.commits.has(r)){if(s===b.records.currBranch)throw(s=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch')).hash={text:`cherryPick ${e} `+r,token:`cherryPick ${e} `+r,expected:["cherry-pick abc"]},s;if(void 0===(s=b.records.branches.get(b.records.currBranch))||!s)throw(o=new Error(`Incorrect usage of "cherry-pick". Current branch (${b.records.currBranch})has no commits`)).hash={text:`cherryPick ${e} `+r,token:`cherryPick ${e} `+r,expected:["cherry-pick abc"]},o;var o=b.records.commits.get(s);if(void 0===o||!o)throw(s=new Error(`Incorrect usage of "cherry-pick". Current branch (${b.records.currBranch})has no commits`)).hash={text:`cherryPick ${e} `+r,token:`cherryPick ${e} `+r,expected:["cherry-pick abc"]},s;o={id:b.records.seq+"-"+zpt(),message:`cherry-picked ${t?.message} into `+b.records.currBranch,seq:b.records.seq++,parents:null==b.records.head?[]:[b.records.head.id,t.id],branch:b.records.currBranch,type:Opt.CHERRY_PICK,tags:n?n.filter(Boolean):["cherry-pick:"+t.id+(t.type===Opt.MERGE?"|parent:"+i:"")]},b.records.head=o,b.records.commits.set(o.id,o),b.records.branches.set(b.records.currBranch,o.id),M.debug(b.records.branches),M.debug("in cherryPick")}},"cherryPick"),Jpt=me(function(t){var e;if(t=L.sanitizeText(t,Wpt()),!b.records.branches.has(t))throw(e=new Error(`Trying to checkout branch which is not yet created. (Help try using "branch ${t}")`)).hash={text:"checkout "+t,token:"checkout "+t,expected:["branch "+t]},e;b.records.currBranch=t,e=b.records.branches.get(b.records.currBranch),b.records.head=void 0!==e&&e?b.records.commits.get(e)??null:null},"checkout"),me(Upt,"upsert"),me(qpt,"prettyPrintCommitHistory"),tgt=me(function(){M.debug(b.records.commits),qpt([agt()[0]])},"prettyPrint"),egt=me(function(){b.reset(),lh()},"clear"),rgt=me(function(){return[...b.records.branchConfig.values()].map((t,e)=>null!=t.order?t:{...t,order:parseFloat("0."+e)}).sort((t,e)=>(t.order??0)-(e.order??0)).map(({name:t})=>({name:t}))},"getBranchesAsObjArray"),ngt=me(function(){return b.records.branches},"getBranches"),igt=me(function(){return b.records.commits},"getCommits"),agt=me(function(){var t=[...b.records.commits.values()];return t.forEach(function(t){M.debug(t.id)}),t.sort((t,e)=>t.seq-e.seq),t},"getCommitsArray"),sgt=me(function(){return b.records.currBranch},"getCurrentBranch"),ogt=me(function(){return b.records.direction},"getDirection"),lgt=me(function(){return b.records.head},"getHead"),cgt={commitType:Opt,getConfig:Wpt,setDirection:Ypt,setOptions:Hpt,getOptions:Vpt,commit:Xpt,branch:Kpt,merge:Zpt,cherryPick:Qpt,checkout:Jpt,prettyPrint:tgt,clear:egt,getBranchesAsObjArray:rgt,getBranches:ngt,getCommits:igt,getCommitsArray:agt,getCurrentBranch:sgt,getDirection:ogt,getHead:lgt,setAccTitle:ch,getAccTitle:hh,getAccDescription:dh,setAccDescription:uh,setDiagramTitle:ph,getDiagramTitle:gh}}),Qgt=t(()=>{Mpt(),e(),Bpt(),Zgt(),Fpt(),hgt=me((t,e)=>{Dpt(t,e),t.dir&&e.setDirection(t.dir);for(var r of t.statements)ugt(r,e)},"populate"),ugt=me((t,e)=>{var r={Commit:me(t=>e.commit(dgt(t)),"Commit"),Branch:me(t=>e.branch(pgt(t)),"Branch"),Merge:me(t=>e.merge(ggt(t)),"Merge"),Checkout:me(t=>e.checkout(fgt(t)),"Checkout"),CherryPicking:me(t=>e.cherryPick(mgt(t)),"CherryPicking")}[t.$type];r?r(t):M.error("Unknown statement type: "+t.$type)},"parseStatement"),dgt=me(t=>({id:t.id,msg:t.message??"",type:void 0!==t.type?Opt[t.type]:Opt.NORMAL,tags:t.tags??void 0}),"parseCommit"),pgt=me(t=>({name:t.name,order:t.order??0}),"parseBranch"),ggt=me(t=>({branch:t.branch,id:t.id??"",type:void 0!==t.type?Opt[t.type]:void 0,tags:t.tags??void 0}),"parseMerge"),fgt=me(t=>t.branch,"parseCheckout"),mgt=me(t=>({id:t.id,targetId:"",tags:0===t.tags?.length?void 0:t.tags,parent:t.parent}),"parseCherryPicking"),ygt={parse:me(async t=>{t=await Lpt("gitGraph",t),M.debug(t),hgt(t,cgt)},"parse")}}),Jgt=t(()=>{Q3(),mu(),e(),ZE(),Fpt(),Hgt=D(),vgt=Hgt?.gitGraph,xgt=new Map,bgt=new Map,wgt=new Map,kgt=[],Tgt=0,Egt="LR",Cgt=me(()=>{xgt.clear(),bgt.clear(),wgt.clear(),Tgt=0,kgt=[],Egt="LR"},"clear"),_gt=me(t=>{let r=document.createElementNS("http://www.w3.org/2000/svg","text");return("string"==typeof t?t.split(/\\n|\n|/gi):t).forEach(t=>{var e=document.createElementNS("http://www.w3.org/2000/svg","tspan");e.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),e.setAttribute("dy","1em"),e.setAttribute("x","0"),e.setAttribute("class","row"),e.textContent=t.trim(),r.appendChild(e)}),r},"drawText"),Sgt=me(t=>{let r,n,i;return i="BT"===Egt?(n=me((t,e)=>t<=e,"comparisonFunc"),1/0):(n=me((t,e)=>e<=t,"comparisonFunc"),0),t.forEach(t=>{var e="TB"===Egt||"BT"==Egt?bgt.get(t)?.y:bgt.get(t)?.x;void 0!==e&&n(e,i)&&(r=t,i=e)}),r},"findClosestParent"),Agt=me(t=>{let r="",n=1/0;return t.forEach(t=>{var e=bgt.get(t).y;e<=n&&(r=t,n=e)}),r||void 0},"findClosestParentBT"),Lgt=me((t,n,e)=>{let i=e,a=e,r=[];t.forEach(t=>{var e=n.get(t);if(!e)throw new Error("Commit not found for key "+t);e.parents.length?(i=Igt(e),a=Math.max(i,a)):r.push(e),Rgt(e,i)}),i=a,r.forEach(t=>{Mgt(t,i,e)}),t.forEach(t=>{var e,r;(t=n.get(t))?.parents.length&&(e=Agt(t.parents),(i=bgt.get(e).y-40)<=a&&(a=i),e=xgt.get(t.branch).pos,r=i-10,bgt.set(t.id,{x:e,y:r}))})},"setParallelBTPos"),Ngt=me(t=>{var e=Sgt(t.parents.filter(t=>null!==t));if(!e)throw new Error("Closest parent not found for commit "+t.id);if(void 0===(e=bgt.get(e)?.y))throw new Error("Closest parent position not found for commit "+t.id);return e},"findClosestParentPos"),Igt=me(t=>Ngt(t)+40,"calculateCommitPosition"),Rgt=me((t,e)=>{var r=xgt.get(t.branch);if(r)return r=r.pos,bgt.set(t.id,{x:r,y:e+=10}),{x:r,y:e};throw new Error("Branch not found for commit "+t.id)},"setCommitPosition"),Mgt=me((t,e,r)=>{var n=xgt.get(t.branch);if(!n)throw new Error("Branch not found for commit "+t.id);n=n.pos,bgt.set(t.id,{x:n,y:e+r})},"setRootPosition"),Dgt=me((t,e,r,n,i,a)=>{var s;a===Opt.HIGHLIGHT?(t.append("rect").attr("x",r.x-10).attr("y",r.y-10).attr("width",20).attr("height",20).attr("class",`commit ${e.id} commit-highlight${i%8} ${n}-outer`),t.append("rect").attr("x",r.x-6).attr("y",r.y-6).attr("width",12).attr("height",12).attr("class",`commit ${e.id} commit${i%8} ${n}-inner`)):a===Opt.CHERRY_PICK?(t.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",10).attr("class",`commit ${e.id} `+n),t.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} `+n),t.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${e.id} `+n),t.append("line").attr("x1",r.x+3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} `+n),t.append("line").attr("x1",r.x-3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${e.id} `+n)):((s=t.append("circle")).attr("cx",r.x),s.attr("cy",r.y),s.attr("r",e.type===Opt.MERGE?9:10),s.attr("class",`commit ${e.id} commit`+i%8),a===Opt.MERGE&&((s=t.append("circle")).attr("cx",r.x),s.attr("cy",r.y),s.attr("r",6),s.attr("class",`commit ${n} ${e.id} commit`+i%8)),a===Opt.REVERSE&&t.append("path").attr("d",`M ${r.x-5},${r.y-5}L${r.x+5},${r.y+5}M${r.x-5},${r.y+5}L${r.x+5},`+(r.y-5)).attr("class",`commit ${n} ${e.id} commit`+i%8))},"drawCommitBullet"),Ogt=me((t,e,r,n)=>{var i,a;e.type!==Opt.CHERRY_PICK&&(e.customId&&e.type===Opt.MERGE||e.type!==Opt.MERGE)&&vgt?.showCommitLabel&&(a=(t=t.append("g")).insert("rect").attr("class","commit-label-bkg"),i=(e=t.append("text").attr("x",n).attr("y",r.y+25).attr("class","commit-label").text(e.id)).node()?.getBBox())&&(a.attr("x",r.posWithOffset-i.width/2-2).attr("y",r.y+13.5).attr("width",i.width+4).attr("height",i.height+4),"TB"===Egt||"BT"===Egt?(a.attr("x",r.x-(i.width+16+5)).attr("y",r.y-12),e.attr("x",r.x-(i.width+16)).attr("y",r.y+i.height-12)):e.attr("x",r.posWithOffset-i.width/2),vgt.rotateCommitLabel)&&("TB"===Egt||"BT"===Egt?(e.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),a.attr("transform","rotate(-45, "+r.x+", "+r.y+")")):(e=-7.5-(i.width+10)/25*9.5,a=10+i.width/25*8.5,t.attr("transform","translate("+e+", "+a+") rotate(-45, "+n+", "+r.y+")")))},"drawCommitLabel"),Pgt=me((i,a,s,o)=>{if(0{Mce(),zee(),Jhe(),mt(hde,"parseJSDoc"),mt(ude,"isJSDoc"),mt(dde,"getLines"),Lde=/\s*(@([\p{L}][\p{L}\p{N}]*)?)/uy,Nde=/\{(@[\p{L}][\p{L}\p{N}]*)(\s*)([^\r\n}]+)?\}/gu,mt(pde,"tokenize"),mt(gde,"buildInlineTokens"),Ide=/\S/,Rde=/\s*$/,mt(fde,"skipWhitespace"),mt(mde,"lastCharacter"),mt(yde,"parseJSDocComment"),mt(vde,"parseJSDocElement"),mt(xde,"appendEmptyLine"),mt(bde,"parseJSDocText"),mt(wde,"parseJSDocInline"),mt(kde,"parseJSDocTag"),mt(Tde,"parseJSDocLine"),mt(Ede,"normalizeOptions"),mt(Cde,"normalizeOption"),Mde=class{static{mt(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+=Ade(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+=Ade(t)+r);return t.trim()}},Dde=class{static{mt(this,"JSDocTagImpl")}constructor(e,t,r,n){this.name=e,this.content=t,this.inline=r,this.range=n}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;en.range.start.line&&(r+=` +`)}return r}},Pde=class{static{mt(this,"JSDocLineImpl")}constructor(e,t){this.text=e,this.range=t}toString(){return this.text}toMarkdown(){return this.text}},mt(Ade,"fillNewlines")}),Wde=e(()=>{oee(),jde(),Bde=class{static{mt(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&&ude(e))return hde(e).toMarkdown({renderLink:mt((e,t)=>this.documentationLinkRenderer(r,e,t),"renderLink"),renderTag:mt(e=>this.documentationTagRenderer(r,e),"renderTag")})}documentationLinkRenderer(e,t,r){var n=null!=(n=this.findNameInPrecomputedScopes(e,t))?n:this.findNameInGlobalScope(e,t);return n&&n.nameSegment?(e=n.nameSegment.range.start.line+1,t=n.nameSegment.range.start.character+1,`[${r}](${n.documentUri.with({fragment:`L${e},`+t}).toString()})`):void 0}documentationTagRenderer(e,t){}findNameInPrecomputedScopes(t,r){var n=KJ(t).precomputedScopes;if(n){let e=t;do{var i=n.get(e).find(e=>e.name===r);if(i)return i}while(e=e.$container)}}findNameInGlobalScope(e,t){return this.indexManager.allElements().find(e=>e.name===t)}}}),Yde=e(()=>{Aue(),ZZ(),$de=class{static{mt(this,"DefaultCommentProvider")}constructor(e){this.grammarConfig=()=>e.parser.GrammarConfig}getComment(e){return Eue(e)?e.$comment:null==(e=$Z(e.$cstNode,this.grammarConfig().multilineCommentRules))?void 0:e.text}}}),Hde=e(()=>{Ohe(),Zue(),Fde=class{static{mt(this,"DefaultAsyncParser")}constructor(e){this.syncParser=e.parser.LangiumParser}parse(e,t){return Promise.resolve(this.syncParser.parse(e))}},zde=class{static{mt(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{i=setTimeout(()=>{this.terminateWorker(r)},this.terminationDelay)});return r.parse(e).then(e=>{e=this.hydrator.hydrate(e),n.resolve(e)}).catch(e=>{n.reject(e)}).finally(()=>{a.dispose(),clearTimeout(i)}),n.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 Dhe;return e.onCancellationRequested(()=>{var e=this.queue.indexOf(r);0<=e&&this.queue.splice(e,1),r.reject(Mhe)}),this.queue.push(r),r.promise}},Gde=class{static{mt(this,"ParserWorker")}get ready(){return this._ready}get onReady(){return this.onReadyEmitter.event}constructor(e,t,r,n){this.onReadyEmitter=new Kue.Emitter,this.deferred=new Dhe,this._ready=!0,this._parsing=!1,this.sendMessage=e,this._terminate=n,t(e=>{this.deferred.resolve(e),this.unlock()}),r(e=>{this.deferred.reject(e),this.unlock()})}terminate(){this.deferred.reject(Mhe),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 Dhe,this.sendMessage(e),this.deferred.promise}}}),Vde=e(()=>{Che(),Ohe(),Ude=class{static{mt(this,"DefaultWorkspaceLock")}constructor(){this.previousTokenSource=new Ehe.CancellationTokenSource,this.writeQueue=[],this.readQueue=[],this.done=!0}write(e){this.cancelWrite();var t=_he();return this.previousTokenSource=t,this.enqueue(this.writeQueue,e,t.token)}read(e){return this.enqueue(this.readQueue,e)}enqueue(e,t,r=Ehe.CancellationToken.None){var n=new Dhe;return e.push({action:t,deferred:n,cancellationToken:r}),this.performNextOperation(),n.promise}async performNextOperation(){if(this.done){var e=[];if(0{try{var n=await Promise.resolve().then(()=>e(r));t.resolve(n)}catch(e){Lhe(e)?t.resolve(void 0):t.reject(e)}})),this.done=!0,this.performNextOperation()}}cancelWrite(){this.previousTokenSource.cancel()}}}),Xde=e(()=>{Dce(),WJ(),xZ(),oee(),xue(),ZZ(),qde=class{static{mt(this,"DefaultHydrator")}constructor(e){this.grammarElementIdMap=new sue,this.tokenTypeIdMap=new sue,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=>Object.assign(Object.assign({},e),{message:e.message})),value:this.dehydrateAstNode(e.value,this.createDehyrationContext(e.value))}}dehydrateLexerReport(e){return e}createDehyrationContext(e){var t,r=new Map,n=new Map;for(t of eee(e))r.set(t,{});if(e.$cstNode)for(var i of NZ(e.$cstNode))n.set(i,{});return{astNodes:r,cstNodes:n}}dehydrateAstNode(e,t){var r,n,i=t.astNodes.get(e);i.$type=e.$type,i.$containerIndex=e.$containerIndex,i.$containerProperty=e.$containerProperty,void 0!==e.$cstNode&&(i.$cstNode=this.dehydrateCstNode(e.$cstNode,t));for([r,n]of Object.entries(e))if(!r.startsWith("$"))if(Array.isArray(n)){var a,s=[];i[r]=s;for(a of n)uZ(a)?s.push(this.dehydrateAstNode(a,t)):dZ(a)?s.push(this.dehydrateReference(a,t)):s.push(a)}else uZ(n)?i[r]=this.dehydrateAstNode(n,t):dZ(n)?i[r]=this.dehydrateReference(n,t):void 0!==n&&(i[r]=n);return i}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 yZ(e)?r.fullText=e.fullText:r.grammarSource=this.getGrammarElementId(e.grammarSource),r.hidden=e.hidden,r.astNode=t.astNodes.get(e.astNode),fZ(e)?r.content=e.content.map(e=>this.dehydrateCstNode(e,t)):mZ(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,n=new Map;for(t of eee(e))r.set(t,{});let i;if(e.$cstNode)for(var a of NZ(e.$cstNode)){let e;"fullText"in a?(e=new Nce(a.fullText),i=e):"content"in a?e=new Ace:"tokenType"in a&&(e=this.hydrateCstLeafNode(a)),e&&(n.set(a,e),e.root=i)}return{astNodes:r,cstNodes:n}}hydrateAstNode(e,t){var r,n,i=t.astNodes.get(e);i.$type=e.$type,i.$containerIndex=e.$containerIndex,i.$containerProperty=e.$containerProperty,e.$cstNode&&(i.$cstNode=t.cstNodes.get(e.$cstNode));for([r,n]of Object.entries(e))if(!r.startsWith("$"))if(Array.isArray(n)){var a,s=[];i[r]=s;for(a of n)uZ(a)?s.push(this.setParent(this.hydrateAstNode(a,t),i)):dZ(a)?s.push(this.hydrateReference(a,i,r,t)):s.push(a)}else uZ(n)?i[r]=this.setParent(this.hydrateAstNode(n,t),i):dZ(n)?i[r]=this.hydrateReference(n,i,r,t):void 0!==n&&(i[r]=n);return i}setParent(e,t){return e.$container=t,e}hydrateReference(e,t,r,n){return this.linker.buildReference(t,r,n.cstNodes.get(e.$refNode),e.$refText)}hydrateCstNode(e,t,r=0){var n=t.cstNodes.get(e);if("number"==typeof e.grammarSource&&(n.grammarSource=this.getGrammarElement(e.grammarSource)),n.astNode=t.astNodes.get(e.astNode),fZ(n))for(var i of e.content)i=this.hydrateCstNode(i,t,r++),n.content.push(i);return n}hydrateCstLeafNode(e){var t=this.getTokenType(e.tokenType),r=e.offset;return new _ce(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 eee(this.grammar))cQ(t)&&this.grammarElementIdMap.set(t,e++)}}});function Kde(e){return{documentation:{CommentProvider:mt(e=>new $de(e),"CommentProvider"),DocumentationProvider:mt(e=>new Bde(e),"DocumentationProvider")},parser:{AsyncParser:mt(e=>new Fde(e),"AsyncParser"),GrammarConfig:mt(e=>_te(e),"GrammarConfig"),LangiumParser:mt(e=>dhe(e),"LangiumParser"),CompletionParser:mt(e=>hhe(e),"CompletionParser"),ValueConverter:mt(()=>new fhe,"ValueConverter"),TokenBuilder:mt(()=>new ghe,"TokenBuilder"),Lexer:mt(e=>new lde(e),"Lexer"),ParserErrorMessageProvider:mt(()=>new Gce,"ParserErrorMessageProvider"),LexerErrorMessageProvider:mt(()=>new sde,"LexerErrorMessageProvider")},workspace:{AstNodeLocator:mt(()=>new Gue,"AstNodeLocator"),AstNodeDescriptionProvider:mt(e=>new Fue(e),"AstNodeDescriptionProvider"),ReferenceDescriptionProvider:mt(e=>new zue(e),"ReferenceDescriptionProvider")},references:{Linker:mt(e=>new Khe(e),"Linker"),NameProvider:mt(()=>new nue,"NameProvider"),ScopeProvider:mt(e=>new mue(e),"ScopeProvider"),ScopeComputation:mt(e=>new oue(e),"ScopeComputation"),References:mt(e=>new iue(e),"References")},serializer:{Hydrator:mt(e=>new qde(e),"Hydrator"),JsonSerializer:mt(e=>new Sue(e),"JsonSerializer")},validation:{DocumentValidator:mt(e=>new Bue(e),"DocumentValidator"),ValidationRegistry:mt(e=>new Rue(e),"ValidationRegistry")},shared:mt(()=>e.shared,"shared")}}function Zde(t){return{ServiceRegistry:mt(e=>new _ue(e),"ServiceRegistry"),workspace:{LangiumDocuments:mt(e=>new Vhe(e),"LangiumDocuments"),LangiumDocumentFactory:mt(e=>new Hhe(e),"LangiumDocumentFactory"),DocumentBuilder:mt(e=>new jue(e),"DocumentBuilder"),IndexManager:mt(e=>new Wue(e),"IndexManager"),WorkspaceManager:mt(e=>new Yue(e),"WorkspaceManager"),FileSystemProvider:mt(e=>t.fileSystemProvider(e),"FileSystemProvider"),WorkspaceLock:mt(()=>new Ude,"WorkspaceLock"),ConfigurationProvider:mt(e=>new Uue(e),"ConfigurationProvider")}}}var Qde=e(()=>{Ate(),uhe(),yhe(),vhe(),xhe(),tue(),yue(),vue(),bue(),Tue(),Aue(),Lue(),Hue(),Mue(),Vue(),Xue(),Que(),ede(),eue(),tde(),rde(),cde(),Wde(),Yde(),Wce(),Hde(),Vde(),Xde(),mt(Kde,"createDefaultCoreModule"),mt(Zde,"createDefaultSharedCoreModule")});function Jde(e,t,r,n,i,a,s,o,l){return tpe([e,t,r,n,i,a,s,o,l].reduce(npe,{}))}function epe(e){if(e&&e[ape])for(var t of Object.values(e))epe(t);return e}function tpe(r,n){let i=new Proxy({},{deleteProperty:mt(()=>!1,"deleteProperty"),set:mt(()=>{throw new Error("Cannot set property on injected service container")},"set"),get:mt((e,t)=>t===ape||rpe(e,t,r,n||i),"get"),getOwnPropertyDescriptor:mt((e,t)=>(rpe(e,t,r,n||i),Object.getOwnPropertyDescriptor(e,t)),"getOwnPropertyDescriptor"),has:mt((e,t)=>t in r,"has"),ownKeys:mt(()=>[...Object.getOwnPropertyNames(r)],"ownKeys")});return i}function rpe(e,t,r,n){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]===spe)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]=spe;try{e[t]="function"==typeof r?r(n):tpe(r,n)}catch(r){throw e[t]=r instanceof Error?r:void 0,r}return e[t]}}function npe(e,t){if(t)for(var[r,n]of Object.entries(t)){var i;void 0!==n&&(null!==(i=e[r])&&null!==n&&"object"==typeof i&&"object"==typeof n?e[r]=npe(i,n):e[r]=n)}return e}var ipe,ape,spe,ope,lpe,cpe,hpe,upe,dpe,ppe=e(()=>{(ipe=ipe||{}).merge=(e,t)=>npe(npe({},e),t),mt(Jde,"inject"),ape=Symbol("isProxy"),mt(epe,"eagerLoad"),mt(tpe,"_inject"),spe=Symbol(),mt(rpe,"_resolve"),mt(npe,"_merge")}),gpe=e(()=>{}),fpe=e(()=>{Yde(),Wde(),jde()}),mpe=e(()=>{}),ype=e(()=>{Ate(),mpe()}),vpe=e(()=>{Ose(),vhe(),cde(),ope={indentTokenName:"INDENT",dedentTokenName:"DEDENT",whitespaceTokenName:"WS",ignoreIndentationDelimiters:[]},(lpe=lpe||{}).REGULAR="indentation-sensitive",lpe.IGNORE_INDENTATION="ignore-indentation",cpe=class extends ghe{static{mt(this,"IndentationAwareTokenBuilder")}constructor(e=ope){super(),this.indentationStack=[0],this.whitespaceRegExp=/[ \t]+/y,this.options=Object.assign(Object.assign({},ope),e),this.indentTokenType=Yne({name:this.options.indentTokenName,pattern:this.indentMatcher.bind(this),line_breaks:!1}),this.dedentTokenType=Yne({name:this.options.dedentTokenName,pattern:this.dedentMatcher.bind(this),line_breaks:!1})}buildTokens(e,t){var r;if(!nde(e=super.buildTokens(e,t)))throw new Error("Invalid tokens built by default builder");let{indentTokenName:n,dedentTokenName:i,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=lpe.IGNORE_INDENTATION:r.name===d&&(r.POP_MODE=!0);r.name===i?o=r:r.name===n?l=r:r.name===a?c=r:h.push(r)}if(o&&l&&c)return 0{}),bpe=e(()=>{Hde(),uhe(),Dce(),vpe(),yhe(),Wce(),cde(),che(),xpe(),vhe(),xhe()}),wpe=e(()=>{tue(),yue(),vue(),wue(),bue(),Tue()}),kpe=e(()=>{Xde(),Aue()}),Tpe=e(()=>{upe=class{static{mt(this,"EmptyFileSystemProvider")}readFile(){throw new Error("No file system is available.")}async readDirectory(){return[]}},dpe={fileSystemProvider:mt(()=>new upe,"fileSystemProvider")}});function Epe(){var e=Jde(Zde(dpe),_pe),t=Jde(Kde({shared:e}),Spe);return e.ServiceRegistry.register(t),t}function Cpe(e){var t=Epe(),e=t.serializer.JsonSerializer.deserialize(e);return t.shared.workspace.LangiumDocumentFactory.fromModel(e,qhe.parse(`memory://${null!=(t=e.name)?t:"grammar"}.langium`)),e}var Spe,_pe,Ape=e(()=>{Qde(),ppe(),WJ(),Tpe(),Jhe(),Spe={Grammar:mt(()=>{},"Grammar"),LanguageMetaData:mt(()=>({caseInsensitive:!1,fileExtensions:[".langium"],languageId:"langium"}),"LanguageMetaData")},_pe={AstReflection:mt(()=>new qJ,"AstReflection")},mt(Epe,"createMinimalGrammarServices"),mt(Cpe,"loadGrammarFromJson")}),Lpe={},Npe=(JBe(Lpe,{AstUtils:()=>YJ,BiMap:()=>sue,Cancellation:()=>Ehe,ContextCache:()=>pue,CstUtils:()=>LZ,DONE_RESULT:()=>CZ,Deferred:()=>Dhe,Disposable:()=>que,DisposableCache:()=>uue,DocumentCache:()=>gue,EMPTY_STREAM:()=>EZ,ErrorWithLocation:()=>JZ,GrammarUtils:()=>Gee,MultiMap:()=>aue,OperationCancelled:()=>Mhe,Reduction:()=>_Z,RegExpUtils:()=>_ee,SimpleCache:()=>due,StreamImpl:()=>TZ,TreeStreamImpl:()=>SZ,URI:()=>qhe,UriUtils:()=>Whe,WorkspaceCache:()=>fue,assertUnreachable:()=>QZ,delayNextTick:()=>She,interruptAndCheck:()=>Nhe,isOperationCancelled:()=>Lhe,loadGrammarFromJson:()=>Cpe,setInterruptionPeriod:()=>Ahe,startCancelableOperation:()=>_he,stream:()=>kZ}),e(()=>{kue(),Zue(),Y(Lpe,Kue),xue(),Jue(),eQ(),Ape(),Ohe(),AZ(),Jhe(),oee(),Che(),ZZ(),Ste(),zee()})),Ipe=e(()=>{Hue(),Mue()}),Rpe=e(()=>{Vue(),Xue(),Que(),ede(),eue(),Tpe(),tde(),Vde(),rde()}),Mpe={},Dpe=(JBe(Mpe,{AbstractAstReflection:()=>vZ,AbstractCstNode:()=>Sce,AbstractLangiumParser:()=>$ce,AbstractParserErrorMessageProvider:()=>zce,AbstractThreadedAsyncParser:()=>zde,AstUtils:()=>YJ,BiMap:()=>sue,Cancellation:()=>Ehe,CompositeCstNodeImpl:()=>Ace,ContextCache:()=>pue,CstNodeBuilder:()=>Cce,CstUtils:()=>LZ,DEFAULT_TOKENIZE_OPTIONS:()=>ode,DONE_RESULT:()=>CZ,DatatypeSymbol:()=>Pce,DefaultAstNodeDescriptionProvider:()=>Fue,DefaultAstNodeLocator:()=>Gue,DefaultAsyncParser:()=>Fde,DefaultCommentProvider:()=>$de,DefaultConfigurationProvider:()=>Uue,DefaultDocumentBuilder:()=>jue,DefaultDocumentValidator:()=>Bue,DefaultHydrator:()=>qde,DefaultIndexManager:()=>Wue,DefaultJsonSerializer:()=>Sue,DefaultLangiumDocumentFactory:()=>Hhe,DefaultLangiumDocuments:()=>Vhe,DefaultLexer:()=>lde,DefaultLexerErrorMessageProvider:()=>sde,DefaultLinker:()=>Khe,DefaultNameProvider:()=>nue,DefaultReferenceDescriptionProvider:()=>zue,DefaultReferences:()=>iue,DefaultScopeComputation:()=>oue,DefaultScopeProvider:()=>mue,DefaultServiceRegistry:()=>_ue,DefaultTokenBuilder:()=>ghe,DefaultValueConverter:()=>fhe,DefaultWorkspaceLock:()=>Ude,DefaultWorkspaceManager:()=>Yue,Deferred:()=>Dhe,Disposable:()=>que,DisposableCache:()=>uue,DocumentCache:()=>gue,DocumentState:()=>Yhe,DocumentValidator:()=>$ue,EMPTY_SCOPE:()=>hue,EMPTY_STREAM:()=>EZ,EmptyFileSystem:()=>dpe,EmptyFileSystemProvider:()=>upe,ErrorWithLocation:()=>JZ,GrammarAST:()=>tQ,GrammarUtils:()=>Gee,IndentationAwareLexer:()=>hpe,IndentationAwareTokenBuilder:()=>cpe,JSDocDocumentationProvider:()=>Bde,LangiumCompletionParser:()=>Uce,LangiumParser:()=>Fce,LangiumParserErrorMessageProvider:()=>Gce,LeafCstNodeImpl:()=>_ce,LexingMode:()=>lpe,MapScope:()=>cue,Module:()=>ipe,MultiMap:()=>aue,OperationCancelled:()=>Mhe,ParserWorker:()=>Gde,Reduction:()=>_Z,RegExpUtils:()=>_ee,RootCstNodeImpl:()=>Nce,SimpleCache:()=>due,StreamImpl:()=>TZ,StreamScope:()=>lue,TextDocument:()=>Uhe,TreeStreamImpl:()=>SZ,URI:()=>qhe,UriUtils:()=>Whe,ValidationCategory:()=>Iue,ValidationRegistry:()=>Rue,ValueConverter:()=>mhe,WorkspaceCache:()=>fue,assertUnreachable:()=>QZ,createCompletionParser:()=>hhe,createDefaultCoreModule:()=>Kde,createDefaultSharedCoreModule:()=>Zde,createGrammarConfig:()=>_te,createLangiumParser:()=>dhe,createParser:()=>Yce,delayNextTick:()=>She,diagnosticData:()=>Nue,eagerLoad:()=>epe,getDiagnosticRange:()=>Due,indentationBuilderDefaultOptions:()=>ope,inject:()=>Jde,interruptAndCheck:()=>Nhe,isAstNode:()=>uZ,isAstNodeDescription:()=>pZ,isAstNodeWithComment:()=>Eue,isCompositeCstNode:()=>fZ,isIMultiModeLexerDefinition:()=>ide,isJSDoc:()=>ude,isLeafCstNode:()=>mZ,isLinkingError:()=>gZ,isNamed:()=>rue,isOperationCancelled:()=>Lhe,isReference:()=>dZ,isRootCstNode:()=>yZ,isTokenTypeArray:()=>nde,isTokenTypeDictionary:()=>ade,loadGrammarFromJson:()=>Cpe,parseJSDoc:()=>hde,prepareLangiumParser:()=>phe,setInterruptionPeriod:()=>Ahe,startCancelableOperation:()=>_he,stream:()=>kZ,toDiagnosticData:()=>Pue,toDiagnosticSeverity:()=>Oue}),e(()=>{Qde(),ppe(),Lue(),gpe(),xZ(),fpe(),ype(),bpe(),wpe(),kpe(),Npe(),Y(Mpe,Lpe),Ipe(),Rpe(),WJ()}));function Ope(e){return m0e.isInstance(e,Hpe)}function Ppe(e){return m0e.isInstance(e,Xpe)}function Bpe(e){return m0e.isInstance(e,Jpe)}function $pe(e){return m0e.isInstance(e,e0e)}function Fpe(e){return m0e.isInstance(e,t0e)}function zpe(e){return m0e.isInstance(e,i0e)}function Gpe(e){return m0e.isInstance(e,s0e)}function Upe(e){return m0e.isInstance(e,o0e)}function qpe(e){return m0e.isInstance(e,"Pie")}function jpe(e){return m0e.isInstance(e,l0e)}function Wpe(e){return m0e.isInstance(e,h0e)}var Ype,s,Hpe,Vpe,Xpe,Kpe,Zpe,Qpe,Jpe,e0e,t0e,r0e,n0e,i0e,a0e,s0e,o0e,l0e,c0e,h0e,u0e,d0e,p0e,g0e,f0e,m0e,y0e,v0e,x0e,b0e,w0e,k0e,T0e,E0e,C0e,S0e,_0e,A0e,L0e,N0e,I0e,R0e,M0e,D0e,O0e,P0e,B0e,$0e,F0e,z0e,G0e,U0e,q0e,j0e,W0e,Y0e,H0e,V0e,X0e,K0e=e(()=>{Dpe(),Dpe(),Dpe(),Dpe(),Ype=Object.defineProperty,s=mt((e,t)=>Ype(e,"name",{value:t,configurable:!0}),"__name"),Hpe="Architecture",mt(Ope,"isArchitecture"),s(Ope,"isArchitecture"),Vpe="Axis",Xpe="Branch",mt(Ppe,"isBranch"),s(Ppe,"isBranch"),Kpe="Checkout",Zpe="CherryPicking",Qpe="ClassDefStatement",Jpe="Commit",mt(Bpe,"isCommit"),s(Bpe,"isCommit"),e0e="GitGraph",mt($pe,"isGitGraph"),s($pe,"isGitGraph"),t0e="Info",mt(Fpe,"isInfo"),s(Fpe,"isInfo"),r0e="Item",n0e="Junction",i0e="Merge",mt(zpe,"isMerge"),s(zpe,"isMerge"),a0e="Option",s0e="Packet",mt(Gpe,"isPacket"),s(Gpe,"isPacket"),o0e="PacketBlock",mt(Upe,"isPacketBlock"),s(Upe,"isPacketBlock"),mt(qpe,"isPie"),s(qpe,"isPie"),l0e="PieSection",mt(jpe,"isPieSection"),s(jpe,"isPieSection"),c0e="Service",h0e="TreemapDoc",mt(Wpe,"isTreemapDoc"),s(Wpe,"isTreemapDoc"),u0e="TreemapRow",d0e="Direction",p0e="Leaf",g0e="Section",f0e=class extends vZ{static{mt(this,"MermaidAstReflection")}static{s(this,"MermaidAstReflection")}getAllTypes(){return[Hpe,Vpe,Xpe,Kpe,Zpe,Qpe,Jpe,"Curve",d0e,"Edge","Entry",e0e,"Group",t0e,r0e,n0e,p0e,i0e,a0e,s0e,o0e,"Pie",l0e,"Radar",g0e,c0e,"Statement",h0e,u0e]}computeIsSubtype(e,t){switch(e){case Xpe:case Kpe:case Zpe:case Jpe:case i0e:return this.isSubtype("Statement",t);case d0e:return this.isSubtype(e0e,t);case p0e:case g0e:return this.isSubtype(r0e,t);default:return!1}}getReferenceType(e){if("Entry:axis"!=(e=e.container.$type+":"+e.property))throw new Error(e+" is not a valid reference id.");return Vpe}getTypeMetaData(e){switch(e){case Hpe:return{name:Hpe,properties:[{name:"accDescr"},{name:"accTitle"},{name:"edges",defaultValue:[]},{name:"groups",defaultValue:[]},{name:"junctions",defaultValue:[]},{name:"services",defaultValue:[]},{name:"title"}]};case Vpe:return{name:Vpe,properties:[{name:"label"},{name:"name"}]};case Xpe:return{name:Xpe,properties:[{name:"name"},{name:"order"}]};case Kpe:return{name:Kpe,properties:[{name:"branch"}]};case Zpe:return{name:Zpe,properties:[{name:"id"},{name:"parent"},{name:"tags",defaultValue:[]}]};case Qpe:return{name:Qpe,properties:[{name:"className"},{name:"styleText"}]};case Jpe:return{name:Jpe,properties:[{name:"id"},{name:"message"},{name:"tags",defaultValue:[]},{name:"type"}]};case"Curve":return{name:"Curve",properties:[{name:"entries",defaultValue:[]},{name:"label"},{name:"name"}]};case"Edge":return{name:"Edge",properties:[{name:"lhsDir"},{name:"lhsGroup",defaultValue:!1},{name:"lhsId"},{name:"lhsInto",defaultValue:!1},{name:"rhsDir"},{name:"rhsGroup",defaultValue:!1},{name:"rhsId"},{name:"rhsInto",defaultValue:!1},{name:"title"}]};case"Entry":return{name:"Entry",properties:[{name:"axis"},{name:"value"}]};case e0e:return{name:e0e,properties:[{name:"accDescr"},{name:"accTitle"},{name:"statements",defaultValue:[]},{name:"title"}]};case"Group":return{name:"Group",properties:[{name:"icon"},{name:"id"},{name:"in"},{name:"title"}]};case t0e:return{name:t0e,properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"}]};case r0e:return{name:r0e,properties:[{name:"classSelector"},{name:"name"}]};case n0e:return{name:n0e,properties:[{name:"id"},{name:"in"}]};case i0e:return{name:i0e,properties:[{name:"branch"},{name:"id"},{name:"tags",defaultValue:[]},{name:"type"}]};case a0e:return{name:a0e,properties:[{name:"name"},{name:"value",defaultValue:!1}]};case s0e:return{name:s0e,properties:[{name:"accDescr"},{name:"accTitle"},{name:"blocks",defaultValue:[]},{name:"title"}]};case o0e:return{name:o0e,properties:[{name:"bits"},{name:"end"},{name:"label"},{name:"start"}]};case"Pie":return{name:"Pie",properties:[{name:"accDescr"},{name:"accTitle"},{name:"sections",defaultValue:[]},{name:"showData",defaultValue:!1},{name:"title"}]};case l0e:return{name:l0e,properties:[{name:"label"},{name:"value"}]};case"Radar":return{name:"Radar",properties:[{name:"accDescr"},{name:"accTitle"},{name:"axes",defaultValue:[]},{name:"curves",defaultValue:[]},{name:"options",defaultValue:[]},{name:"title"}]};case c0e:return{name:c0e,properties:[{name:"icon"},{name:"iconText"},{name:"id"},{name:"in"},{name:"title"}]};case h0e:return{name:h0e,properties:[{name:"accDescr"},{name:"accTitle"},{name:"title"},{name:"TreemapRows",defaultValue:[]}]};case u0e:return{name:u0e,properties:[{name:"indent"},{name:"item"}]};case d0e:return{name:d0e,properties:[{name:"accDescr"},{name:"accTitle"},{name:"dir"},{name:"statements",defaultValue:[]},{name:"title"}]};case p0e:return{name:p0e,properties:[{name:"classSelector"},{name:"name"},{name:"value"}]};case g0e:return{name:g0e,properties:[{name:"classSelector"},{name:"name"}]};default:return{name:e,properties:[]}}}},m0e=new f0e,v0e=s(()=>y0e=y0e??Cpe(`{"$type":"Grammar","isDeclared":true,"name":"Info","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":"?"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@12"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@7"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`),"InfoGrammar"),b0e=s(()=>x0e=x0e??Cpe(`{"$type":"Grammar","isDeclared":true,"name":"Packet","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Packet","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"*"},{"$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":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`),"PacketGrammar"),k0e=s(()=>w0e=w0e??Cpe(`{"$type":"Grammar","isDeclared":true,"name":"Pie","imports":[],"rules":[{"$type":"ParserRule","entry":true,"name":"Pie","definition":{"$type":"Group","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"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@3"},"arguments":[]},{"$type":"Assignment","feature":"sections","operator":"+=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@1"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[]}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"PieSection","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"label","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@11"},"arguments":[]}},{"$type":"Keyword","value":":"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@2"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@13"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@8"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@9"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`),"PieGrammar"),E0e=s(()=>T0e=T0e??Cpe(`{"$type":"Grammar","isDeclared":true,"name":"Architecture","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":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":":"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"ARROW_DIRECTION","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"L"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"R"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"T"}}]},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"B"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_GROUP","definition":{"$type":"RegexToken","regex":"/\\\\{group\\\\}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARROW_INTO","definition":{"$type":"RegexToken","regex":"/<|>/"},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@23"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@18"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@19"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"TerminalRule","name":"ARCH_ICON","definition":{"$type":"RegexToken","regex":"/\\\\([\\\\w-:]+\\\\)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ARCH_TITLE","definition":{"$type":"RegexToken","regex":"/\\\\[[\\\\w ]+\\\\]/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`),"ArchitectureGrammar"),S0e=s(()=>C0e=C0e??Cpe(`{"$type":"Grammar","isDeclared":true,"name":"GitGraph","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":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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"}]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@14"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false},{"$type":"TerminalRule","name":"REFERENCE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\\\w([-\\\\./\\\\w]*[-\\\\w])?/"},"fragment":false,"hidden":false}],"definesHiddenTokens":false,"hiddenTokens":[],"interfaces":[],"types":[],"usedGrammars":[]}`),"GitGraphGrammar"),A0e=s(()=>_0e=_0e??Cpe(`{"$type":"Grammar","isDeclared":true,"name":"Radar","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":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":"]"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":"}"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":"*"}]}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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}},{"$type":"Keyword","value":":","cardinality":"?"},{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"NumberEntry","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Assignment","feature":"value","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":[]}}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"GRATICULE","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"circle"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"polygon"}}]},"fragment":false,"hidden":false},{"$type":"ParserRule","fragment":true,"name":"EOL","dataType":"string","definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@20"},"arguments":[],"cardinality":"+"},{"$type":"EndOfFile"}]},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"FLOAT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/[0-9]+\\\\.[0-9]+(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"INT","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"RegexToken","regex":"/0|[1-9][0-9]*(?!\\\\.)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER","type":{"$type":"ReturnType","name":"number"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@15"}},{"$type":"TerminalRuleCall","rule":{"$ref":"#/rules@16"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STRING","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/\\"([^\\"\\\\\\\\]|\\\\\\\\.)*\\"|'([^'\\\\\\\\]|\\\\\\\\.)*'/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID","type":{"$type":"ReturnType","name":"string"},"definition":{"$type":"RegexToken","regex":"/[\\\\w]([-\\\\w]*\\\\w)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NEWLINE","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WHITESPACE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"YAML","definition":{"$type":"RegexToken","regex":"/---[\\\\t ]*\\\\r?\\\\n(?:[\\\\S\\\\s]*?\\\\r?\\\\n)?---(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"DIRECTIVE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%{[\\\\S\\\\s]*?}%%(?:\\\\r?\\\\n|(?!\\\\S))/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"SINGLE_LINE_COMMENT","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*%%[^\\\\n\\\\r]*/"},"fragment":false}],"interfaces":[{"$type":"Interface","name":"Entry","attributes":[{"$type":"TypeAttribute","name":"axis","isOptional":true,"type":{"$type":"ReferenceType","referenceType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@2"}}}},{"$type":"TypeAttribute","name":"value","type":{"$type":"SimpleType","primitiveType":"number"},"isOptional":false}],"superTypes":[]}],"definesHiddenTokens":false,"hiddenTokens":[],"types":[],"usedGrammars":[]}`),"RadarGrammar"),N0e=s(()=>L0e=L0e??Cpe(`{"$type":"Grammar","isDeclared":true,"name":"Treemap","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":"+"},"definesHiddenTokens":false,"entry":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"BOOLEAN","type":{"$type":"ReturnType","name":"boolean"},"definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"true"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"false"}}]},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_DESCR","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accDescr(?:[\\\\t ]*:([^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)|\\\\s*{([^}]*)})/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ACC_TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*accTitle[\\\\t ]*:(?:[^\\\\n\\\\r]*?(?=%%)|[^\\\\n\\\\r]*)/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"TITLE","definition":{"$type":"RegexToken","regex":"/[\\\\t ]*title(?:[\\\\t ][^\\\\n\\\\r]*?(?=%%)|[\\\\t ][^\\\\n\\\\r]*|)/"},"fragment":false,"hidden":false},{"$type":"ParserRule","entry":true,"name":"TreemapDoc","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@14"},"arguments":[]}}],"cardinality":"*"}]},"definesHiddenTokens":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"TREEMAP_KEYWORD","definition":{"$type":"TerminalAlternatives","elements":[{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap-beta"}},{"$type":"CharacterRange","left":{"$type":"Keyword","value":"treemap"}}]},"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]*))?(?:;)?/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"STYLE_SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":::"}},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"SEPARATOR","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":":"}},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"COMMA","definition":{"$type":"CharacterRange","left":{"$type":"Keyword","value":","}},"fragment":false,"hidden":false},{"$type":"TerminalRule","hidden":true,"name":"WS","definition":{"$type":"RegexToken","regex":"/[ \\\\t]+/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"ML_COMMENT","definition":{"$type":"RegexToken","regex":"/\\\\%\\\\%[^\\\\n]*/"},"fragment":false},{"$type":"TerminalRule","hidden":true,"name":"NL","definition":{"$type":"RegexToken","regex":"/\\\\r?\\\\n/"},"fragment":false},{"$type":"ParserRule","name":"TreemapRow","definition":{"$type":"Group","elements":[{"$type":"Assignment","feature":"indent","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"arguments":[]},"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"Assignment","feature":"item","operator":"=","terminal":{"$type":"RuleCall","rule":{"$ref":"#/rules@16"},"arguments":[]}},{"$type":"RuleCall","rule":{"$ref":"#/rules@15"},"arguments":[]}]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"ClassDef","dataType":"string","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@7"},"arguments":[]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"ParserRule","name":"Item","returnType":{"$ref":"#/interfaces@0"},"definition":{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@18"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@17"},"arguments":[]}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$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@19"},"arguments":[],"cardinality":"?"},{"$type":"Alternatives","elements":[{"$type":"RuleCall","rule":{"$ref":"#/rules@9"},"arguments":[]},{"$type":"RuleCall","rule":{"$ref":"#/rules@10"},"arguments":[]}]},{"$type":"RuleCall","rule":{"$ref":"#/rules@19"},"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":"?"}]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"INDENTATION","definition":{"$type":"RegexToken","regex":"/[ \\\\t]{1,}/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"ID2","definition":{"$type":"RegexToken","regex":"/[a-zA-Z_][a-zA-Z0-9_]*/"},"fragment":false,"hidden":false},{"$type":"TerminalRule","name":"NUMBER2","definition":{"$type":"RegexToken","regex":"/[0-9_\\\\.\\\\,]+/"},"fragment":false,"hidden":false},{"$type":"ParserRule","name":"MyNumber","dataType":"number","definition":{"$type":"RuleCall","rule":{"$ref":"#/rules@21"},"arguments":[]},"definesHiddenTokens":false,"entry":false,"fragment":false,"hiddenTokens":[],"parameters":[],"wildcard":false},{"$type":"TerminalRule","name":"STRING2","definition":{"$type":"RegexToken","regex":"/\\"[^\\"]*\\"|'[^']*'/"},"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":"TreemapDoc","attributes":[{"$type":"TypeAttribute","name":"TreemapRows","type":{"$type":"ArrayType","elementType":{"$type":"SimpleType","typeRef":{"$ref":"#/rules@14"}}},"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":[]}],"definesHiddenTokens":false,"hiddenTokens":[],"imports":[],"types":[],"usedGrammars":[],"$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 */"}`),"TreemapGrammar"),B0e={languageId:"treemap",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(P0e={languageId:"radar",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(O0e={languageId:"gitGraph",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(D0e={languageId:"architecture",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(M0e={languageId:"pie",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(R0e={languageId:"packet",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!(I0e={languageId:"info",fileExtensions:[".mmd",".mermaid"],caseInsensitive:!1,mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"}),mode:"production"},$0e={AstReflection:s(()=>new f0e,"AstReflection")},F0e={Grammar:s(()=>v0e(),"Grammar"),LanguageMetaData:s(()=>I0e,"LanguageMetaData"),parser:{}},z0e={Grammar:s(()=>b0e(),"Grammar"),LanguageMetaData:s(()=>R0e,"LanguageMetaData"),parser:{}},G0e={Grammar:s(()=>k0e(),"Grammar"),LanguageMetaData:s(()=>M0e,"LanguageMetaData"),parser:{}},U0e={Grammar:s(()=>E0e(),"Grammar"),LanguageMetaData:s(()=>D0e,"LanguageMetaData"),parser:{}},q0e={Grammar:s(()=>S0e(),"Grammar"),LanguageMetaData:s(()=>O0e,"LanguageMetaData"),parser:{}},j0e={Grammar:s(()=>A0e(),"Grammar"),LanguageMetaData:s(()=>P0e,"LanguageMetaData"),parser:{}},W0e={Grammar:s(()=>N0e(),"Grammar"),LanguageMetaData:s(()=>B0e,"LanguageMetaData"),parser:{}},Y0e={ACC_DESCR:/accDescr(?:[\t ]*:([^\n\r]*)|\s*{([^}]*)})/,ACC_TITLE:/accTitle[\t ]*:([^\n\r]*)/,TITLE:/title([\t ][^\n\r]*|)/},H0e=class extends fhe{static{mt(this,"AbstractMermaidValueConverter")}static{s(this,"AbstractMermaidValueConverter")}runConverter(e,t,r){var n=this.runCommonConverter(e,t,r);return void 0===(n=void 0===n?this.runCustomConverter(e,t,r):n)?super.runConverter(e,t,r):n}runCommonConverter(e,t,r){return void 0!==(e=Y0e[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}},V0e=class extends H0e{static{mt(this,"CommonValueConverter")}static{s(this,"CommonValueConverter")}runCustomConverter(e,t,r){}},X0e=class extends ghe{static{mt(this,"AbstractMermaidTokenBuilder")}static{s(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 X0e{static{mt(this,"CommonTokenBuilder")}static{s(this,"CommonTokenBuilder")}}});function Z0e(e=dpe){var e=Jde(Zde(e),$0e),t=Jde(Kde({shared:e}),q0e,J0e);return e.ServiceRegistry.register(t),{shared:e,GitGraph:t}}var Q0e,J0e,ege=e(()=>{K0e(),Dpe(),Q0e=class extends X0e{static{mt(this,"GitGraphTokenBuilder")}static{s(this,"GitGraphTokenBuilder")}constructor(){super(["gitGraph"])}},J0e={parser:{TokenBuilder:s(()=>new Q0e,"TokenBuilder"),ValueConverter:s(()=>new V0e,"ValueConverter")}},mt(Z0e,"createGitGraphServices"),s(Z0e,"createGitGraphServices")});function tge(e=dpe){var e=Jde(Zde(e),$0e),t=Jde(Kde({shared:e}),F0e,nge);return e.ServiceRegistry.register(t),{shared:e,Info:t}}var rge,nge,ige=e(()=>{K0e(),Dpe(),rge=class extends X0e{static{mt(this,"InfoTokenBuilder")}static{s(this,"InfoTokenBuilder")}constructor(){super(["info","showInfo"])}},nge={parser:{TokenBuilder:s(()=>new rge,"TokenBuilder"),ValueConverter:s(()=>new V0e,"ValueConverter")}},mt(tge,"createInfoServices"),s(tge,"createInfoServices")});function age(e=dpe){var e=Jde(Zde(e),$0e),t=Jde(Kde({shared:e}),z0e,oge);return e.ServiceRegistry.register(t),{shared:e,Packet:t}}var sge,oge,lge=e(()=>{K0e(),Dpe(),sge=class extends X0e{static{mt(this,"PacketTokenBuilder")}static{s(this,"PacketTokenBuilder")}constructor(){super(["packet-beta"])}},oge={parser:{TokenBuilder:s(()=>new sge,"TokenBuilder"),ValueConverter:s(()=>new V0e,"ValueConverter")}},mt(age,"createPacketServices"),s(age,"createPacketServices")});function cge(e=dpe){var e=Jde(Zde(e),$0e),t=Jde(Kde({shared:e}),G0e,dge);return e.ServiceRegistry.register(t),{shared:e,Pie:t}}var hge,uge,dge,pge=e(()=>{K0e(),Dpe(),hge=class extends X0e{static{mt(this,"PieTokenBuilder")}static{s(this,"PieTokenBuilder")}constructor(){super(["pie","showData"])}},uge=class extends H0e{static{mt(this,"PieValueConverter")}static{s(this,"PieValueConverter")}runCustomConverter(e,t,r){if("PIE_SECTION_LABEL"===e.name)return t.replace(/"/g,"").trim()}},dge={parser:{TokenBuilder:s(()=>new hge,"TokenBuilder"),ValueConverter:s(()=>new uge,"ValueConverter")}},mt(cge,"createPieServices"),s(cge,"createPieServices")});function gge(e=dpe){var e=Jde(Zde(e),$0e),t=Jde(Kde({shared:e}),U0e,yge);return e.ServiceRegistry.register(t),{shared:e,Architecture:t}}var fge,mge,yge,vge=e(()=>{K0e(),Dpe(),fge=class extends X0e{static{mt(this,"ArchitectureTokenBuilder")}static{s(this,"ArchitectureTokenBuilder")}constructor(){super(["architecture"])}},mge=class extends H0e{static{mt(this,"ArchitectureValueConverter")}static{s(this,"ArchitectureValueConverter")}runCustomConverter(e,t,r){return"ARCH_ICON"===e.name?t.replace(/[()]/g,"").trim():"ARCH_TEXT_ICON"===e.name?t.replace(/["()]/g,""):"ARCH_TITLE"===e.name?t.replace(/[[\]]/g,"").trim():void 0}},yge={parser:{TokenBuilder:s(()=>new fge,"TokenBuilder"),ValueConverter:s(()=>new mge,"ValueConverter")}},mt(gge,"createArchitectureServices"),s(gge,"createArchitectureServices")});function xge(e=dpe){var e=Jde(Zde(e),$0e),t=Jde(Kde({shared:e}),j0e,wge);return e.ServiceRegistry.register(t),{shared:e,Radar:t}}var bge,wge,kge=e(()=>{K0e(),Dpe(),bge=class extends X0e{static{mt(this,"RadarTokenBuilder")}static{s(this,"RadarTokenBuilder")}constructor(){super(["radar-beta"])}},wge={parser:{TokenBuilder:s(()=>new bge,"TokenBuilder"),ValueConverter:s(()=>new V0e,"ValueConverter")}},mt(xge,"createRadarServices"),s(xge,"createRadarServices")});function Tge(e){var t,r=e.validation.TreemapValidator;(e=e.validation.ValidationRegistry)&&(t={TreemapDoc:r.checkSingleRoot.bind(r)},e.register(t,r))}function Ege(e=dpe){var e=Jde(Zde(e),$0e),t=Jde(Kde({shared:e}),W0e,Lge);return e.ServiceRegistry.register(t),Tge(t),{shared:e,Treemap:t}}var Cge,Sge,_ge,Age,Lge,Nge=e(()=>{K0e(),Dpe(),Cge=class extends X0e{static{mt(this,"TreemapTokenBuilder")}static{s(this,"TreemapTokenBuilder")}constructor(){super(["treemap"])}},Sge=/classDef\s+([A-Z_a-z]\w+)(?:\s+([^\n\r;]*))?;?/,_ge=class extends H0e{static{mt(this,"TreemapValueConverter")}static{s(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=Sge.exec(t))?{$type:"ClassDefStatement",className:e[1],styleText:e[2]||void 0}:void 0:void 0}},mt(Tge,"registerValidationChecks"),s(Tge,"registerValidationChecks"),Age=class{static{mt(this,"TreemapValidator")}static{s(this,"TreemapValidator")}checkSingleRoot(e,t){let r;for(var n of e.TreemapRows)n.item&&(void 0===r&&void 0===n.indent?r=0:(void 0===n.indent||void 0!==r&&r>=parseInt(n.indent,10))&&t("error","Multiple root nodes are not allowed in a treemap.",{node:n,property:"item"}))}},Lge={parser:{TokenBuilder:s(()=>new Cge,"TokenBuilder"),ValueConverter:s(()=>new _ge,"ValueConverter")},validation:{TreemapValidator:s(()=>new Age,"TreemapValidator")}},mt(Ege,"createTreemapServices"),s(Ege,"createTreemapServices")}),Ige={},Rge=(JBe(Ige,{InfoModule:()=>nge,createInfoServices:()=>tge}),e(()=>{ige(),K0e()})),Mge={},Dge=(JBe(Mge,{PacketModule:()=>oge,createPacketServices:()=>age}),e(()=>{lge(),K0e()})),Oge={},Pge=(JBe(Oge,{PieModule:()=>dge,createPieServices:()=>cge}),e(()=>{pge(),K0e()})),Bge={},$ge=(JBe(Bge,{ArchitectureModule:()=>yge,createArchitectureServices:()=>gge}),e(()=>{vge(),K0e()})),Fge={},zge=(JBe(Fge,{GitGraphModule:()=>J0e,createGitGraphServices:()=>Z0e}),e(()=>{ege(),K0e()})),Gge={},Uge=(JBe(Gge,{RadarModule:()=>wge,createRadarServices:()=>xge}),e(()=>{kge(),K0e()})),qge={},jge=(JBe(qge,{TreemapModule:()=>Lge,createTreemapServices:()=>Ege}),e(()=>{Nge(),K0e()}));async function Wge(e,t){var r=Hge[e];if(!r)throw new Error("Unknown diagram type: "+e);if(Yge[e]||await r(),0<(r=Yge[e].parse(t)).lexerErrors.length||0{ege(),ige(),lge(),pge(),vge(),kge(),Nge(),K0e(),Yge={},Hge={info:s(async()=>{var e=(e=(await Promise.resolve().then(()=>(Rge(),Ige))).createInfoServices)().Info.parser.LangiumParser;Yge.info=e},"info"),packet:s(async()=>{var e=(e=(await Promise.resolve().then(()=>(Dge(),Mge))).createPacketServices)().Packet.parser.LangiumParser;Yge.packet=e},"packet"),pie:s(async()=>{var e=(e=(await Promise.resolve().then(()=>(Pge(),Oge))).createPieServices)().Pie.parser.LangiumParser;Yge.pie=e},"pie"),architecture:s(async()=>{var e=(e=(await Promise.resolve().then(()=>($ge(),Bge))).createArchitectureServices)().Architecture.parser.LangiumParser;Yge.architecture=e},"architecture"),gitGraph:s(async()=>{var e=(e=(await Promise.resolve().then(()=>(zge(),Fge))).createGitGraphServices)().GitGraph.parser.LangiumParser;Yge.gitGraph=e},"gitGraph"),radar:s(async()=>{var e=(e=(await Promise.resolve().then(()=>(Uge(),Gge))).createRadarServices)().Radar.parser.LangiumParser;Yge.radar=e},"radar"),treemap:s(async()=>{var e=(e=(await Promise.resolve().then(()=>(jge(),qge))).createTreemapServices)().Treemap.parser.LangiumParser;Yge.treemap=e},"treemap")},mt(Wge,"parse"),s(Wge,"parse"),Vge=class extends Error{static{mt(this,"MermaidParseError")}constructor(e){super(`Parsing failed: ${e.lexerErrors.map(e=>e.message).join(` +`)} `+e.parserErrors.map(e=>e.message).join(` +`)),this.result=e}static{s(this,"MermaidParseError")}}});function Kge(e,t){e.accDescr&&t.setAccDescription?.(e.accDescr),e.accTitle&&t.setAccTitle?.(e.accTitle),e.title&&t.setDiagramTitle?.(e.title)}var Zge,Qge,Jge=e(()=>{mt(Kge,"populateCommonDb")}),e1e=e(()=>{Zge={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4}}),t1e=e(()=>{Qge=class{constructor(e){this.init=e,this.records=this.init()}static{mt(this,"ImperativeState")}reset(){this.records=this.init()}}});function r1e(){return OC({length:7})}function n1e(e,n){let i=Object.create(null);return e.reduce((e,t)=>{var r=n(t);return i[r]||(i[r]=!0,e.push(t)),e},[])}function i1e(e,t,r){-1===(t=e.indexOf(t))?e.push(r):e.splice(t,1,r)}function a1e(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 n,i=[r,t.id,t.seq];for(n in b.records.branches)b.records.branches.get(n)===t.id&&i.push(n);if(M.debug(i.join(" ")),t.parents&&2==t.parents.length&&t.parents[0]&&t.parents[1]){var a=b.records.commits.get(t.parents[0]);i1e(e,t,a),t.parents[1]&&e.push(b.records.commits.get(t.parents[1]))}else{if(0==t.parents.length)return;t.parents[0]&&(a=b.records.commits.get(t.parents[0]),i1e(e,t,a))}a1e(e=n1e(e,e=>e.id))}var s1e,o1e,b,l1e,c1e,h1e,u1e,d1e,p1e,g1e,f1e,m1e,y1e,v1e,x1e,b1e,w1e,k1e,T1e,E1e,C1e,S1e,_1e,A1e,L1e,N1e,I1e,R1e,M1e,D1e,O1e,P1e,B1e,$1e,F1e,z1e,G1e,U1e,q1e,j1e,W1e,Y1e,H1e,V1e,X1e,K1e,Z1e,Q1e,J1e,efe,tfe,rfe,nfe,ife,afe,sfe,ofe,lfe,cfe,hfe,ufe,dfe,pfe=e(()=>{t(),KC(),Nn(),eh(),fu(),e1e(),t1e(),An(),s1e=yr.gitGraph,o1e=mt(()=>xC({...s1e,...Ir().gitGraph}),"getConfig"),b=new Qge(()=>{var e=(t=o1e()).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(r1e,"getID"),mt(n1e,"uniqBy"),l1e=mt(function(e){b.records.direction=e},"setDirection"),c1e=mt(function(e){M.debug("options str",e),e=e?.trim()||"{}";try{b.records.options=JSON.parse(e)}catch(e){M.error("error while parsing gitGraph options",e.message)}},"setOptions"),h1e=mt(function(){return b.records.options},"getOptions"),u1e=mt(function(e){let t=e.msg,r=e.id,n=e.type,i=e.tags,a=(M.info("commit",t,r,n,i),M.debug("Entering commit:",t,r,n,i),o1e());r=L.sanitizeText(r,a),t=L.sanitizeText(t,a),i=i?.map(e=>L.sanitizeText(e,a)),e={id:r||b.records.seq+"-"+r1e(),message:t,seq:b.records.seq++,type:n??Zge.NORMAL,tags:i??[],parents:null==b.records.head?[]:[b.records.head.id],branch:b.records.currBranch},b.records.head=e,M.info("main branch",a.mainBranchName),b.records.commits.has(e.id)&&M.warn(`Commit ID ${e.id} already exists`),b.records.commits.set(e.id,e),b.records.branches.set(b.records.currBranch,e.id),M.debug("in pushCommit "+e.id)},"commit"),d1e=mt(function(e){var t=e.name,e=e.order,t=L.sanitizeText(t,o1e());if(b.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}")`);b.records.branches.set(t,null!=b.records.head?b.records.head.id:null),b.records.branchConfig.set(t,{name:t,order:e}),f1e(t),M.debug("in createBranch")},"branch"),p1e=mt(e=>{var t=e.branch,r=e.id,n=e.type,i=e.tags,a=o1e(),t=L.sanitizeText(t,a),r=r&&L.sanitizeText(r,a),e=b.records.branches.get(b.records.currBranch),a=b.records.branches.get(t),e=e?b.records.commits.get(e):void 0,s=a?b.records.commits.get(a):void 0;if(e&&s&&e.branch===t)throw new Error(`Cannot merge branch '${t}' into itself.`);if(b.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 (${b.records.currBranch})has no commits`)).hash={text:"merge "+t,token:"merge "+t,expected:["commit"]},o;if(!b.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&&b.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} ${n} `+i?.join(" "),token:`merge ${t} ${r} ${n} `+i?.join(" "),expected:[`merge ${t} ${r}_UNIQUE ${n} `+i?.join(" ")]},e;var s=a||"",o={id:r||b.records.seq+"-"+r1e(),message:`merged branch ${t} into `+b.records.currBranch,seq:b.records.seq++,parents:null==b.records.head?[]:[b.records.head.id,s],branch:b.records.currBranch,type:Zge.MERGE,customType:n,customId:!!r,tags:i??[]};b.records.head=o,b.records.commits.set(o.id,o),b.records.branches.set(b.records.currBranch,o.id),M.debug(b.records.branches),M.debug("in mergeBranch")},"merge"),g1e=mt(function(e){let t=e.id,r=e.targetId,n=e.tags,i=e.parent,a=(M.debug("Entering cherryPick:",t,r,n),o1e());if(t=L.sanitizeText(t,a),r=L.sanitizeText(r,a),n=n?.map(e=>L.sanitizeText(e,a)),i=L.sanitizeText(i,a),!t||!b.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=b.records.commits.get(t))||!e)throw new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');if(i&&(!Array.isArray(e.parents)||!e.parents.includes(i)))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===Zge.MERGE&&!i)throw new Error("Incorrect usage of cherry-pick: If the source commit is a merge commit, an immediate parent commit must be specified.");if(!r||!b.records.commits.has(r)){if(s===b.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=b.records.branches.get(b.records.currBranch))||!s)throw(o=new Error(`Incorrect usage of "cherry-pick". Current branch (${b.records.currBranch})has no commits`)).hash={text:`cherryPick ${t} `+r,token:`cherryPick ${t} `+r,expected:["cherry-pick abc"]},o;var o=b.records.commits.get(s);if(void 0===o||!o)throw(s=new Error(`Incorrect usage of "cherry-pick". Current branch (${b.records.currBranch})has no commits`)).hash={text:`cherryPick ${t} `+r,token:`cherryPick ${t} `+r,expected:["cherry-pick abc"]},s;o={id:b.records.seq+"-"+r1e(),message:`cherry-picked ${e?.message} into `+b.records.currBranch,seq:b.records.seq++,parents:null==b.records.head?[]:[b.records.head.id,e.id],branch:b.records.currBranch,type:Zge.CHERRY_PICK,tags:n?n.filter(Boolean):["cherry-pick:"+e.id+(e.type===Zge.MERGE?"|parent:"+i:"")]},b.records.head=o,b.records.commits.set(o.id,o),b.records.branches.set(b.records.currBranch,o.id),M.debug(b.records.branches),M.debug("in cherryPick")}},"cherryPick"),f1e=mt(function(e){var t;if(e=L.sanitizeText(e,o1e()),!b.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;b.records.currBranch=e,t=b.records.branches.get(b.records.currBranch),b.records.head=void 0!==t&&t?b.records.commits.get(t)??null:null},"checkout"),mt(i1e,"upsert"),mt(a1e,"prettyPrintCommitHistory"),m1e=mt(function(){M.debug(b.records.commits),a1e([w1e()[0]])},"prettyPrint"),y1e=mt(function(){b.reset(),lh()},"clear"),v1e=mt(function(){return[...b.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"),x1e=mt(function(){return b.records.branches},"getBranches"),b1e=mt(function(){return b.records.commits},"getCommits"),w1e=mt(function(){var e=[...b.records.commits.values()];return e.forEach(function(e){M.debug(e.id)}),e.sort((e,t)=>e.seq-t.seq),e},"getCommitsArray"),k1e=mt(function(){return b.records.currBranch},"getCurrentBranch"),T1e=mt(function(){return b.records.direction},"getDirection"),E1e=mt(function(){return b.records.head},"getHead"),C1e={commitType:Zge,getConfig:o1e,setDirection:l1e,setOptions:c1e,getOptions:h1e,commit:u1e,branch:d1e,merge:p1e,cherryPick:g1e,checkout:f1e,prettyPrint:m1e,clear:y1e,getBranchesAsObjArray:v1e,getBranches:x1e,getCommits:b1e,getCommitsArray:w1e,getCurrentBranch:k1e,getDirection:T1e,getHead:E1e,setAccTitle:ch,getAccTitle:hh,getAccDescription:dh,setAccDescription:uh,setDiagramTitle:ph,getDiagramTitle:gh}}),gfe=e(()=>{Xge(),t(),Jge(),pfe(),e1e(),S1e=mt((e,t)=>{Kge(e,t),e.dir&&t.setDirection(e.dir);for(var r of e.statements)_1e(r,t)},"populate"),_1e=mt((e,t)=>{var r={Commit:mt(e=>t.commit(A1e(e)),"Commit"),Branch:mt(e=>t.branch(L1e(e)),"Branch"),Merge:mt(e=>t.merge(N1e(e)),"Merge"),Checkout:mt(e=>t.checkout(I1e(e)),"Checkout"),CherryPicking:mt(e=>t.cherryPick(R1e(e)),"CherryPicking")}[e.$type];r?r(e):M.error("Unknown statement type: "+e.$type)},"parseStatement"),A1e=mt(e=>({id:e.id,msg:e.message??"",type:void 0!==e.type?Zge[e.type]:Zge.NORMAL,tags:e.tags??void 0}),"parseCommit"),L1e=mt(e=>({name:e.name,order:e.order??0}),"parseBranch"),N1e=mt(e=>({branch:e.branch,id:e.id??"",type:void 0!==e.type?Zge[e.type]:void 0,tags:e.tags??void 0}),"parseMerge"),I1e=mt(e=>e.branch,"parseCheckout"),R1e=mt(e=>({id:e.id,targetId:"",tags:0===e.tags?.length?void 0:e.tags,parent:e.parent}),"parseCherryPicking"),M1e={parse:mt(async e=>{e=await Wge("gitGraph",e),M.debug(e),S1e(e,C1e)},"parse")}}),ffe=e(()=>{Zw(),mu(),t(),KC(),e1e(),cfe=D(),D1e=cfe?.gitGraph,O1e=new Map,P1e=new Map,B1e=new Map,$1e=[],F1e=0,z1e="LR",G1e=mt(()=>{O1e.clear(),P1e.clear(),B1e.clear(),F1e=0,$1e=[],z1e="LR"},"clear"),U1e=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"),q1e=mt(e=>{let r,n,i;return i="BT"===z1e?(n=mt((e,t)=>e<=t,"comparisonFunc"),1/0):(n=mt((e,t)=>t<=e,"comparisonFunc"),0),e.forEach(e=>{var t="TB"===z1e||"BT"==z1e?P1e.get(e)?.y:P1e.get(e)?.x;void 0!==t&&n(t,i)&&(r=e,i=t)}),r},"findClosestParent"),j1e=mt(e=>{let r="",n=1/0;return e.forEach(e=>{var t=P1e.get(e).y;t<=n&&(r=e,n=t)}),r||void 0},"findClosestParentBT"),W1e=mt((e,n,t)=>{let i=t,a=t,r=[];e.forEach(e=>{var t=n.get(e);if(!t)throw new Error("Commit not found for key "+e);t.parents.length?(i=H1e(t),a=Math.max(i,a)):r.push(t),V1e(t,i)}),i=a,r.forEach(e=>{X1e(e,i,t)}),e.forEach(e=>{var t,r;(e=n.get(e))?.parents.length&&(t=j1e(e.parents),(i=P1e.get(t).y-40)<=a&&(a=i),t=O1e.get(e.branch).pos,r=i-10,P1e.set(e.id,{x:t,y:r}))})},"setParallelBTPos"),Y1e=mt(e=>{var t=q1e(e.parents.filter(e=>null!==e));if(!t)throw new Error("Closest parent not found for commit "+e.id);if(void 0===(t=P1e.get(t)?.y))throw new Error("Closest parent position not found for commit "+e.id);return t},"findClosestParentPos"),H1e=mt(e=>Y1e(e)+40,"calculateCommitPosition"),V1e=mt((e,t)=>{var r=O1e.get(e.branch);if(r)return r=r.pos,P1e.set(e.id,{x:r,y:t+=10}),{x:r,y:t};throw new Error("Branch not found for commit "+e.id)},"setCommitPosition"),X1e=mt((e,t,r)=>{var n=O1e.get(e.branch);if(!n)throw new Error("Branch not found for commit "+e.id);n=n.pos,P1e.set(e.id,{x:n,y:t+r})},"setRootPosition"),K1e=mt((e,t,r,n,i,a)=>{var s;a===Zge.HIGHLIGHT?(e.append("rect").attr("x",r.x-10).attr("y",r.y-10).attr("width",20).attr("height",20).attr("class",`commit ${t.id} commit-highlight${i%8} ${n}-outer`),e.append("rect").attr("x",r.x-6).attr("y",r.y-6).attr("width",12).attr("height",12).attr("class",`commit ${t.id} commit${i%8} ${n}-inner`)):a===Zge.CHERRY_PICK?(e.append("circle").attr("cx",r.x).attr("cy",r.y).attr("r",10).attr("class",`commit ${t.id} `+n),e.append("circle").attr("cx",r.x-3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${t.id} `+n),e.append("circle").attr("cx",r.x+3).attr("cy",r.y+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${t.id} `+n),e.append("line").attr("x1",r.x+3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${t.id} `+n),e.append("line").attr("x1",r.x-3).attr("y1",r.y+1).attr("x2",r.x).attr("y2",r.y-5).attr("stroke","#fff").attr("class",`commit ${t.id} `+n)):((s=e.append("circle")).attr("cx",r.x),s.attr("cy",r.y),s.attr("r",t.type===Zge.MERGE?9:10),s.attr("class",`commit ${t.id} commit`+i%8),a===Zge.MERGE&&((s=e.append("circle")).attr("cx",r.x),s.attr("cy",r.y),s.attr("r",6),s.attr("class",`commit ${n} ${t.id} commit`+i%8)),a===Zge.REVERSE&&e.append("path").attr("d",`M ${r.x-5},${r.y-5}L${r.x+5},${r.y+5}M${r.x-5},${r.y+5}L${r.x+5},`+(r.y-5)).attr("class",`commit ${n} ${t.id} commit`+i%8))},"drawCommitBullet"),Z1e=mt((e,t,r,n)=>{var i,a;t.type!==Zge.CHERRY_PICK&&(t.customId&&t.type===Zge.MERGE||t.type!==Zge.MERGE)&&D1e?.showCommitLabel&&(a=(e=e.append("g")).insert("rect").attr("class","commit-label-bkg"),i=(t=e.append("text").attr("x",n).attr("y",r.y+25).attr("class","commit-label").text(t.id)).node()?.getBBox())&&(a.attr("x",r.posWithOffset-i.width/2-2).attr("y",r.y+13.5).attr("width",i.width+4).attr("height",i.height+4),"TB"===z1e||"BT"===z1e?(a.attr("x",r.x-(i.width+16+5)).attr("y",r.y-12),t.attr("x",r.x-(i.width+16)).attr("y",r.y+i.height-12)):t.attr("x",r.posWithOffset-i.width/2),D1e.rotateCommitLabel)&&("TB"===z1e||"BT"===z1e?(t.attr("transform","rotate(-45, "+r.x+", "+r.y+")"),a.attr("transform","rotate(-45, "+r.x+", "+r.y+")")):(t=-7.5-(i.width+10)/25*9.5,a=10+i.width/25*8.5,e.attr("transform","translate("+t+", "+a+") rotate(-45, "+n+", "+r.y+")")))},"drawCommitLabel"),Q1e=mt((i,a,s,o)=>{if(0{switch(t.customType??t.type){case Opt.NORMAL:return"commit-normal";case Opt.REVERSE:return"commit-reverse";case Opt.HIGHLIGHT:return"commit-highlight";case Opt.MERGE:return"commit-merge";case Opt.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),Fgt=me((t,e,r,n)=>{var i,a={x:0,y:0};return 0{var r="BT"===Egt&&r?e:e+10,e="TB"===Egt||"BT"===Egt?r:xgt.get(t.branch)?.pos,n="TB"===Egt||"BT"===Egt?xgt.get(t.branch)?.pos:r;if(void 0===n||void 0===e)throw new Error("Position were undefined for commit "+t.id);return{x:n,y:e,posWithOffset:r}},"getCommitPosition"),zgt=me((t,a,s)=>{if(!vgt)throw new Error("GitGraph config not found");let o=t.append("g").attr("class","commit-bullets"),l=t.append("g").attr("class","commit-labels"),c="TB"===Egt||"BT"===Egt?30:0,e=[...a.keys()],h=vgt?.parallelCommits??!1,r=me((t,e)=>(t=a.get(t)?.seq,e=a.get(e)?.seq,void 0!==t&&void 0!==e?t-e:0),"sortKeys"),n=e.sort(r);"BT"===Egt&&(h&&Lgt(n,a,c),n=n.reverse()),n.forEach(t=>{var e=a.get(t);if(!e)throw new Error("Commit not found for key "+t);h&&(c=Fgt(e,Egt,c,bgt));var r,n,i,t=$gt(e,c,h);s&&(r=Bgt(e),n=e.customType??e.type,i=xgt.get(e.branch)?.index??0,Dgt(o,e,t,r,i,n),Ogt(l,e,t,c),Pgt(l,e,t,c)),"TB"===Egt||"BT"===Egt?bgt.set(e.id,{x:t.x,y:t.posWithOffset}):bgt.set(e.id,{x:t.posWithOffset,y:t.y}),(c="BT"===Egt&&h?c+40:c+40+10)>Tgt&&(Tgt=c)})},"drawCommits"),Ggt=me((e,r,t,n,i)=>{let a=(("TB"===Egt||"BT"===Egt?t.xt.branch===a,"isOnBranchToGetCurve"),o=me(t=>t.seq>e.seq&&t.seqo(t)&&s(t))},"shouldRerouteArrow"),Ugt=me((t,e,r=0)=>{let n=t+Math.abs(t-e)/2,i;return 510<=Math.abs(t-n))?(kgt.push(n),n):(i=Math.abs(t-e),Ugt(t,e-i/5,r+1))},"findLane"),qgt=me((t,e,r,n)=>{var i,a=bgt.get(e.id),s=bgt.get(r.id);if(void 0===a||void 0===s)throw new Error(`Commit positions not found for commits ${e.id} and `+r.id);let o=Ggt(e,r,a,s,n),l="",c="",h=0,u=0,d=xgt.get(r.branch)?.index;r.type===Opt.MERGE&&e.id!==r.parents[0]&&(d=xgt.get(e.branch)?.index);let p;if(o?(l="A 10 10, 0, 0, 0,",c="A 10 10, 0, 0, 1,",h=10,u=10,n=a.ys.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,p=r.type===Opt.MERGE&&e.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${s.y-h} ${c} ${a.x-u} ${s.y} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${s.x+h} ${a.y} ${l} ${s.x} ${a.y+u} L ${s.x} `+s.y),a.x===s.x&&(p=`M ${a.x} ${a.y} L ${s.x} `+s.y)):"BT"===Egt?(a.xs.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,p=r.type===Opt.MERGE&&e.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${s.y+h} ${l} ${a.x-u} ${s.y} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${s.x-h} ${a.y} ${l} ${s.x} ${a.y-u} L ${s.x} `+s.y),a.x===s.x&&(p=`M ${a.x} ${a.y} L ${s.x} `+s.y)):(a.ys.y&&(p=r.type===Opt.MERGE&&e.id!==r.parents[0]?`M ${a.x} ${a.y} L ${s.x-h} ${a.y} ${l} ${s.x} ${a.y-u} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${a.x} ${s.y+h} ${c} ${a.x+u} ${s.y} L ${s.x} `+s.y),a.y===s.y&&(p=`M ${a.x} ${a.y} L ${s.x} `+s.y))),void 0===p)throw new Error("Line definition not found");t.append("path").attr("d",p).attr("class","arrow arrow"+d%8)},"drawArrow"),jgt=me((t,r)=>{let n=t.append("g").attr("class","commit-arrows");[...r.keys()].forEach(t=>{let e=r.get(t);e.parents&&0{qgt(n,r.get(t),e,r)})})},"drawArrows"),Wgt=me((t,e)=>{let a=t.append("g");e.forEach((t,e)=>{var e=e%8,r=xgt.get(t.name)?.pos;if(void 0===r)throw new Error("Position not found for branch "+t.name);(n=a.append("line")).attr("x1",0),n.attr("y1",r),n.attr("x2",Tgt),n.attr("y2",r),n.attr("class","branch branch"+e),"TB"===Egt?(n.attr("y1",30),n.attr("x1",r),n.attr("y2",Tgt),n.attr("x2",r)):"BT"===Egt&&(n.attr("y1",Tgt),n.attr("x1",r),n.attr("y2",30),n.attr("x2",r)),kgt.push(r);var n=t.name,t=_gt(n),n=a.insert("rect"),i=a.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+e),t=(i.node().appendChild(t),t.getBBox());n.attr("class","branchLabelBkg label"+e).attr("rx",4).attr("ry",4).attr("x",-t.width-4-(!0===vgt?.rotateCommitLabel?30:0)).attr("y",-t.height/2+8).attr("width",t.width+18).attr("height",t.height+4),i.attr("transform","translate("+(-t.width-14-(!0===vgt?.rotateCommitLabel?30:0))+", "+(r-t.height/2-1)+")"),"TB"===Egt?(n.attr("x",r-t.width/2-10).attr("y",0),i.attr("transform","translate("+(r-t.width/2-5)+", 0)")):"BT"===Egt?(n.attr("x",r-t.width/2-10).attr("y",Tgt),i.attr("transform","translate("+(r-t.width/2-5)+", "+Tgt+")")):n.attr("transform","translate(-19, "+(r-t.height/2)+")")})},"drawBranches"),Ygt=me(function(t,e,r,n,i){return xgt.set(t,{pos:e,index:r}),e+(50+(i?40:0)+("TB"===Egt||"BT"===Egt?n.width/2:0))},"setBranchPosition"),Hgt=me(function(t,e,r,n){if(Cgt(),M.debug("in gitgraph renderer",t+` -`,"id:",e,r),!vgt)throw new Error("GitGraph config not found");let s=vgt.rotateCommitLabel??!1,i=n.db,o=(wgt=i.getCommits(),t=i.getBranchesAsObjArray(),Egt=i.getDirection(),H(`[id="${e}"]`)),l=0;t.forEach((t,e)=>{var r=_gt(t.name),n=o.append("g"),i=n.insert("g").attr("class","branchLabel"),a=i.insert("g").attr("class","label branch-label"),r=(a.node()?.appendChild(r),r.getBBox());l=Ygt(t.name,l,e,r,s),a.remove(),i.remove(),n.remove()}),zgt(o,wgt,!1),vgt.showBranches&&Wgt(o,t),jgt(o,wgt),zgt(o,wgt,!0),HE.insertTitle(o,"gitTitleText",vgt.titleTopMargin??0,i.getDiagramTitle()),bh(void 0,o,vgt.diagramPadding,vgt.useMaxWidth)},"draw"),Vgt={draw:Hgt}}),t1t=t(()=>{Xgt=me(e=>` + ${s.x+10+t+4},${y-m-2} + ${s.x+10+t+4},${y+m+2} + ${s.x+10},`+(y+m+2)).attr("transform","translate(12,12) rotate(45, "+s.x+","+o+")"),p.attr("cx",s.x+2).attr("cy",y).attr("transform","translate(12,12) rotate(45, "+s.x+","+o+")"),d.attr("x",s.x+5).attr("y",y+3).attr("transform","translate(14,14) rotate(45, "+s.x+","+o+")"))}}},"drawCommitTags"),J1e=mt(e=>{switch(e.customType??e.type){case Zge.NORMAL:return"commit-normal";case Zge.REVERSE:return"commit-reverse";case Zge.HIGHLIGHT:return"commit-highlight";case Zge.MERGE:return"commit-merge";case Zge.CHERRY_PICK:return"commit-cherry-pick";default:return"commit-normal"}},"getCommitClassType"),efe=mt((e,t,r,n)=>{var i,a={x:0,y:0};return 0{var r="BT"===z1e&&r?t:t+10,t="TB"===z1e||"BT"===z1e?r:O1e.get(e.branch)?.pos,n="TB"===z1e||"BT"===z1e?O1e.get(e.branch)?.pos:r;if(void 0===n||void 0===t)throw new Error("Position were undefined for commit "+e.id);return{x:n,y:t,posWithOffset:r}},"getCommitPosition"),rfe=mt((e,a,s)=>{if(!D1e)throw new Error("GitGraph config not found");let o=e.append("g").attr("class","commit-bullets"),l=e.append("g").attr("class","commit-labels"),c="TB"===z1e||"BT"===z1e?30:0,t=[...a.keys()],h=D1e?.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"),n=t.sort(r);"BT"===z1e&&(h&&W1e(n,a,c),n=n.reverse()),n.forEach(e=>{var t=a.get(e);if(!t)throw new Error("Commit not found for key "+e);h&&(c=efe(t,z1e,c,P1e));var r,n,i,e=tfe(t,c,h);s&&(r=J1e(t),n=t.customType??t.type,i=O1e.get(t.branch)?.index??0,K1e(o,t,e,r,i,n),Z1e(l,t,e,c),Q1e(l,t,e,c)),"TB"===z1e||"BT"===z1e?P1e.set(t.id,{x:e.x,y:e.posWithOffset}):P1e.set(t.id,{x:e.posWithOffset,y:e.y}),(c="BT"===z1e&&h?c+40:c+40+10)>F1e&&(F1e=c)})},"drawCommits"),nfe=mt((t,r,e,n,i)=>{let a=(("TB"===z1e||"BT"===z1e?e.xe.branch===a,"isOnBranchToGetCurve"),o=mt(e=>e.seq>t.seq&&e.seqo(e)&&s(e))},"shouldRerouteArrow"),ife=mt((e,t,r=0)=>{let n=e+Math.abs(e-t)/2,i;return 510<=Math.abs(e-n))?($1e.push(n),n):(i=Math.abs(e-t),ife(e,t-i/5,r+1))},"findLane"),afe=mt((e,t,r,n)=>{var i,a=P1e.get(t.id),s=P1e.get(r.id);if(void 0===a||void 0===s)throw new Error(`Commit positions not found for commits ${t.id} and `+r.id);let o=nfe(t,r,a,s,n),l="",c="",h=0,u=0,d=O1e.get(r.branch)?.index;r.type===Zge.MERGE&&t.id!==r.parents[0]&&(d=O1e.get(t.branch)?.index);let p;if(o?(l="A 10 10, 0, 0, 0,",c="A 10 10, 0, 0, 1,",h=10,u=10,n=a.ys.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,p=r.type===Zge.MERGE&&t.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${s.y-h} ${c} ${a.x-u} ${s.y} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${s.x+h} ${a.y} ${l} ${s.x} ${a.y+u} L ${s.x} `+s.y),a.x===s.x&&(p=`M ${a.x} ${a.y} L ${s.x} `+s.y)):"BT"===z1e?(a.xs.x&&(l="A 20 20, 0, 0, 0,",c="A 20 20, 0, 0, 1,",h=20,u=20,p=r.type===Zge.MERGE&&t.id!==r.parents[0]?`M ${a.x} ${a.y} L ${a.x} ${s.y+h} ${l} ${a.x-u} ${s.y} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${s.x-h} ${a.y} ${l} ${s.x} ${a.y-u} L ${s.x} `+s.y),a.x===s.x&&(p=`M ${a.x} ${a.y} L ${s.x} `+s.y)):(a.ys.y&&(p=r.type===Zge.MERGE&&t.id!==r.parents[0]?`M ${a.x} ${a.y} L ${s.x-h} ${a.y} ${l} ${s.x} ${a.y-u} L ${s.x} `+s.y:`M ${a.x} ${a.y} L ${a.x} ${s.y+h} ${c} ${a.x+u} ${s.y} L ${s.x} `+s.y),a.y===s.y&&(p=`M ${a.x} ${a.y} L ${s.x} `+s.y))),void 0===p)throw new Error("Line definition not found");e.append("path").attr("d",p).attr("class","arrow arrow"+d%8)},"drawArrow"),sfe=mt((e,r)=>{let n=e.append("g").attr("class","commit-arrows");[...r.keys()].forEach(e=>{let t=r.get(e);t.parents&&0{afe(n,r.get(e),t,r)})})},"drawArrows"),ofe=mt((e,t)=>{let a=e.append("g");t.forEach((e,t)=>{var t=t%8,r=O1e.get(e.name)?.pos;if(void 0===r)throw new Error("Position not found for branch "+e.name);(n=a.append("line")).attr("x1",0),n.attr("y1",r),n.attr("x2",F1e),n.attr("y2",r),n.attr("class","branch branch"+t),"TB"===z1e?(n.attr("y1",30),n.attr("x1",r),n.attr("y2",F1e),n.attr("x2",r)):"BT"===z1e&&(n.attr("y1",F1e),n.attr("x1",r),n.attr("y2",30),n.attr("x2",r)),$1e.push(r);var n=e.name,e=U1e(n),n=a.insert("rect"),i=a.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+t),e=(i.node().appendChild(e),e.getBBox());n.attr("class","branchLabelBkg label"+t).attr("rx",4).attr("ry",4).attr("x",-e.width-4-(!0===D1e?.rotateCommitLabel?30:0)).attr("y",-e.height/2+8).attr("width",e.width+18).attr("height",e.height+4),i.attr("transform","translate("+(-e.width-14-(!0===D1e?.rotateCommitLabel?30:0))+", "+(r-e.height/2-1)+")"),"TB"===z1e?(n.attr("x",r-e.width/2-10).attr("y",0),i.attr("transform","translate("+(r-e.width/2-5)+", 0)")):"BT"===z1e?(n.attr("x",r-e.width/2-10).attr("y",F1e),i.attr("transform","translate("+(r-e.width/2-5)+", "+F1e+")")):n.attr("transform","translate(-19, "+(r-e.height/2)+")")})},"drawBranches"),lfe=mt(function(e,t,r,n,i){return O1e.set(e,{pos:t,index:r}),t+(50+(i?40:0)+("TB"===z1e||"BT"===z1e?n.width/2:0))},"setBranchPosition"),cfe=mt(function(e,t,r,n){if(G1e(),M.debug("in gitgraph renderer",e+` +`,"id:",t,r),!D1e)throw new Error("GitGraph config not found");let s=D1e.rotateCommitLabel??!1,i=n.db,o=(B1e=i.getCommits(),e=i.getBranchesAsObjArray(),z1e=i.getDirection(),H(`[id="${t}"]`)),l=0;e.forEach((e,t)=>{var r=U1e(e.name),n=o.append("g"),i=n.insert("g").attr("class","branchLabel"),a=i.insert("g").attr("class","label branch-label"),r=(a.node()?.appendChild(r),r.getBBox());l=lfe(e.name,l,t,r,s),a.remove(),i.remove(),n.remove()}),rfe(o,B1e,!1),D1e.showBranches&&ofe(o,e),sfe(o,B1e),rfe(o,B1e,!0),YC.insertTitle(o,"gitTitleText",D1e.titleTopMargin??0,i.getDiagramTitle()),bh(void 0,o,D1e.diagramPadding,D1e.useMaxWidth)},"draw"),hfe={draw:cfe}}),mfe=e(()=>{ufe=mt(t=>` .commit-id, .commit-msg, .branch-label { @@ -847,60 +847,60 @@ For Further details.`}function $st(t){if(t instanceof Wtt)return"SUBRULE";if(t i font-family: 'trebuchet ms', verdana, arial, sans-serif; font-family: var(--mermaid-font-family); } - ${[0,1,2,3,4,5,6,7].map(t=>` - .branch-label${t} { fill: ${e["gitBranchLabel"+t]}; } - .commit${t} { stroke: ${e["git"+t]}; fill: ${e["git"+t]}; } - .commit-highlight${t} { stroke: ${e["gitInv"+t]}; fill: ${e["gitInv"+t]}; } - .label${t} { fill: ${e["git"+t]}; } - .arrow${t} { stroke: ${e["git"+t]}; } + ${[0,1,2,3,4,5,6,7].map(e=>` + .branch-label${e} { fill: ${t["gitBranchLabel"+e]}; } + .commit${e} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; } + .commit-highlight${e} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; } + .label${e} { fill: ${t["git"+e]}; } + .arrow${e} { stroke: ${t["git"+e]}; } `).join(` `)} .branch { stroke-width: 1; - stroke: ${e.lineColor}; + stroke: ${t.lineColor}; stroke-dasharray: 2; } - .commit-label { font-size: ${e.commitLabelFontSize}; fill: ${e.commitLabelColor};} - .commit-label-bkg { font-size: ${e.commitLabelFontSize}; fill: ${e.commitLabelBackground}; opacity: 0.5; } - .tag-label { font-size: ${e.tagLabelFontSize}; fill: ${e.tagLabelColor};} - .tag-label-bkg { fill: ${e.tagLabelBackground}; stroke: ${e.tagLabelBorder}; } - .tag-hole { fill: ${e.textColor}; } + .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};} + .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; } + .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};} + .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; } + .tag-hole { fill: ${t.textColor}; } .commit-merge { - stroke: ${e.primaryColor}; - fill: ${e.primaryColor}; + stroke: ${t.primaryColor}; + fill: ${t.primaryColor}; } .commit-reverse { - stroke: ${e.primaryColor}; - fill: ${e.primaryColor}; + stroke: ${t.primaryColor}; + fill: ${t.primaryColor}; stroke-width: 3; } .commit-highlight-outer { } .commit-highlight-inner { - stroke: ${e.primaryColor}; - fill: ${e.primaryColor}; + stroke: ${t.primaryColor}; + fill: ${t.primaryColor}; } .arrow { stroke-width: 8; stroke-linecap: round; fill: none} .gitTitleText { text-anchor: middle; font-size: 18px; - fill: ${e.textColor}; + fill: ${t.textColor}; } -`,"getStyles"),Kgt=Xgt}),e1t={};oPt(e1t,{diagram:()=>r1t});var r1t,n1t,i1t,a1t=t(()=>{Qgt(),Zgt(),Jgt(),t1t(),r1t={parser:ygt,db:cgt,renderer:Vgt,styles:Kgt}}),s1t=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);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],n=[1,26],i=[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],x=[1,16],b=[1,19],w=[1,20],k=[1,21],T=[1,22],E=[1,23],C=[1,25],_=[1,35],n={trace:me(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:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){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:n.setWeekday("monday");break;case 9:n.setWeekday("tuesday");break;case 10:n.setWeekday("wednesday");break;case 11:n.setWeekday("thursday");break;case 12:n.setWeekday("friday");break;case 13:n.setWeekday("saturday");break;case 14:n.setWeekday("sunday");break;case 15:n.setWeekend("friday");break;case 16:n.setWeekend("saturday");break;case 17:n.setDateFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 18:n.enableInclusiveEndDates(),this.$=a[o].substr(18);break;case 19:n.TopAxis(),this.$=a[o].substr(8);break;case 20:n.setAxisFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 21:n.setTickInterval(a[o].substr(13)),this.$=a[o].substr(13);break;case 22:n.setExcludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 23:n.setIncludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 24:n.setTodayMarker(a[o].substr(12)),this.$=a[o].substr(12);break;case 27:n.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 28:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 29:case 30:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 31:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 33:n.addTask(a[o-1],a[o]),this.$="task";break;case 34:this.$=a[o-1],n.setClickEvent(a[o-1],a[o],null);break;case 35:this.$=a[o-2],n.setClickEvent(a[o-2],a[o-1],a[o]);break;case 36:this.$=a[o-2],n.setClickEvent(a[o-2],a[o-1],null),n.setLink(a[o-2],a[o]);break;case 37:this.$=a[o-3],n.setClickEvent(a[o-3],a[o-2],a[o-1]),n.setLink(a[o-3],a[o]);break;case 38:this.$=a[o-2],n.setClickEvent(a[o-2],a[o],null),n.setLink(a[o-2],a[o-1]);break;case 39:this.$=a[o-3],n.setClickEvent(a[o-3],a[o-1],a[o]),n.setLink(a[o-3],a[o-2]);break;case 40:this.$=a[o-1],n.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]},e(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:17,12:n,13:i,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:x,30:b,31:w,33:k,35:T,36:E,37:24,38:C,40:_},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:36,11:17,12:n,13:i,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:x,30:b,31:w,33:k,35:T,36:E,37:24,38:C,40:_},e(r,[2,5]),e(r,[2,6]),e(r,[2,17]),e(r,[2,18]),e(r,[2,19]),e(r,[2,20]),e(r,[2,21]),e(r,[2,22]),e(r,[2,23]),e(r,[2,24]),e(r,[2,25]),e(r,[2,26]),e(r,[2,27]),{32:[1,37]},{34:[1,38]},e(r,[2,30]),e(r,[2,31]),e(r,[2,32]),{39:[1,39]},e(r,[2,8]),e(r,[2,9]),e(r,[2,10]),e(r,[2,11]),e(r,[2,12]),e(r,[2,13]),e(r,[2,14]),e(r,[2,15]),e(r,[2,16]),{41:[1,40],43:[1,41]},e(r,[2,4]),e(r,[2,28]),e(r,[2,29]),e(r,[2,33]),e(r,[2,34],{42:[1,42],43:[1,43]}),e(r,[2,40],{41:[1,44]}),e(r,[2,35],{43:[1,45]}),e(r,[2,36]),e(r,[2,38],{42:[1,46]}),e(r,[2,37]),e(r,[2,39])],defaultActions:{},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"vfe});var vfe,xfe,bfe,wfe=e(()=>{gfe(),pfe(),ffe(),mfe(),vfe={parser:M1e,db:C1e,renderer:hfe,styles:dfe}}),kfe=e(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=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],n=[1,26],i=[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],x=[1,16],b=[1,19],w=[1,20],k=[1,21],T=[1,22],E=[1,23],C=[1,25],S=[1,35],n={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,n,i,a,s){var o=a.length-1;switch(i){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:n.setWeekday("monday");break;case 9:n.setWeekday("tuesday");break;case 10:n.setWeekday("wednesday");break;case 11:n.setWeekday("thursday");break;case 12:n.setWeekday("friday");break;case 13:n.setWeekday("saturday");break;case 14:n.setWeekday("sunday");break;case 15:n.setWeekend("friday");break;case 16:n.setWeekend("saturday");break;case 17:n.setDateFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 18:n.enableInclusiveEndDates(),this.$=a[o].substr(18);break;case 19:n.TopAxis(),this.$=a[o].substr(8);break;case 20:n.setAxisFormat(a[o].substr(11)),this.$=a[o].substr(11);break;case 21:n.setTickInterval(a[o].substr(13)),this.$=a[o].substr(13);break;case 22:n.setExcludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 23:n.setIncludes(a[o].substr(9)),this.$=a[o].substr(9);break;case 24:n.setTodayMarker(a[o].substr(12)),this.$=a[o].substr(12);break;case 27:n.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 28:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 29:case 30:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 31:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 33:n.addTask(a[o-1],a[o]),this.$="task";break;case 34:this.$=a[o-1],n.setClickEvent(a[o-1],a[o],null);break;case 35:this.$=a[o-2],n.setClickEvent(a[o-2],a[o-1],a[o]);break;case 36:this.$=a[o-2],n.setClickEvent(a[o-2],a[o-1],null),n.setLink(a[o-2],a[o]);break;case 37:this.$=a[o-3],n.setClickEvent(a[o-3],a[o-2],a[o-1]),n.setLink(a[o-3],a[o]);break;case 38:this.$=a[o-2],n.setClickEvent(a[o-2],a[o],null),n.setLink(a[o-2],a[o-1]);break;case 39:this.$=a[o-3],n.setClickEvent(a[o-3],a[o-1],a[o]),n.setLink(a[o-3],a[o-2]);break;case 40:this.$=a[o-1],n.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:n,13:i,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:x,30:b,31:w,33:k,35:T,36:E,37:24,38:C,40:S},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:36,11:17,12:n,13:i,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:x,30:b,31:w,33:k,35:T,36:E,37:24,38:C,40:S},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,n=[0],i=[],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"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0{function r(){return function(t,e,i){var a=me(function(t){return t.add(4-t.isoWeekday(),"day")},"a"),s=((e=e.prototype).isoWeekYear=function(){return a(this).year()},e.isoWeek=function(t){var e,r,n;return this.$utils().u(t)?(r=a(this),n=this.isoWeekYear(),e=4-(n=(this.$u?i.utc:i)().year(n).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,t=/\d/,e=/\d\d/,r=/\d\d?/,n=/\d*[^-_:/,()\s\d]+/,g={},i=me(function(t){return(t=+t)+(68{try{if(-1<["x","X"].indexOf(e))return new Date(("X"===e?1e3:1)*t);var i=T(e)(t),a=i.year,s=i.month,o=i.day,l=i.hours,c=i.minutes,h=i.seconds,u=i.milliseconds,d=i.zone,p=i.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(t,e){var a=(e=e.prototype).format;e.format=function(t){var e,r,n=this,i=this.$locale();return this.isValid()?(e=this.$utils(),r=(t||"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(t){switch(t){case"Q":return Math.ceil((n.$M+1)/3);case"Do":return i.ordinal(n.$D);case"gggg":return n.weekYear();case"GGGG":return n.isoWeekYear();case"wo":return i.ordinal(n.week(),"W");case"w":case"ww":return e.s(n.week(),"w"===t?1:2,"0");case"W":case"WW":return e.s(n.isoWeek(),"W"===t?1:2,"0");case"k":case"kk":return e.s(String(0===n.$H?24:n.$H),"k"===t?1:2,"0");case"X":return Math.floor(n.$d.getTime()/1e3);case"x":return n.$d.getTime();case"z":return"["+n.offsetName()+"]";case"zzz":return"["+n.offsetName("long")+"]";default:return t}}),a.bind(this)(r)):a.bind(this)(t)}}}"object"==typeof t&&typeof e<"u"?e.exports=r():"function"==typeof define&&define.amd?define(r):(t=typeof globalThis<"u"?globalThis:t||self).dayjs_plugin_advancedFormat=r()});function h1t(r,n,t){let i=!0;for(;i;)i=!1,t.forEach(function(t){var e=new RegExp("^\\s*"+t+"\\s*$");r[0].match(e)&&(n[t]=!0,r.shift(1),i=!0)})}var u1t,d1t,p1t,g1t,f1t,m1t,y1t,v1t,x1t,b1t,w1t,k1t,T1t,E1t,C1t,_1t,S1t,A1t,L1t,N1t,I1t,R1t,M1t,D1t,O1t,P1t,B1t,F1t,$1t,z1t,G1t,U1t,q1t,j1t,W1t,Y1t,H1t,V1t,X1t,K1t,Z1t,Q1t,J1t,tft,eft,rft,nft,ift,aft,sft,oft,lft,cft,hft,uft,dft,pft,gft,fft,mft,yft,vft,xft,bft,wft,kft,Tft,Eft,Cft,_ft,Sft,Aft,Lft,Nft,Ift,Rft,Mft,Dft,Oft,Pft,Bft,Fft=t(()=>{u1t=tt(tw(),1),d1t=tt(et(),1),R1t=tt(o1t(),1),M1t=tt(l1t(),1),D1t=tt(c1t(),1),e(),mu(),ZE(),fu(),d1t.default.extend(R1t.default),d1t.default.extend(M1t.default),d1t.default.extend(D1t.default),p1t={friday:5,saturday:6},y1t=f1t=g1t="",v1t=[],x1t=[],b1t=new Map,w1t=[],k1t=[],E1t=T1t="",C1t=["active","done","crit","milestone","vert"],A1t=S1t=!(_1t=[]),L1t="sunday",N1t="saturday",I1t=0,R1t=me(function(){w1t=[],k1t=[],_1t=[],mft=[],m1t=fft=gft=void(hft=0),y1t=E1t=f1t=g1t=T1t="",v1t=[],A1t=S1t=!(x1t=[]),I1t=0,b1t=new Map,lh(),L1t="sunday",N1t="saturday"},"clear"),M1t=me(function(t){f1t=t},"setAxisFormat"),D1t=me(function(){return f1t},"getAxisFormat"),O1t=me(function(t){m1t=t},"setTickInterval"),P1t=me(function(){return m1t},"getTickInterval"),B1t=me(function(t){y1t=t},"setTodayMarker"),F1t=me(function(){return y1t},"getTodayMarker"),$1t=me(function(t){g1t=t},"setDateFormat"),z1t=me(function(){S1t=!0},"enableInclusiveEndDates"),G1t=me(function(){return S1t},"endDatesAreInclusive"),U1t=me(function(){A1t=!0},"enableTopAxis"),q1t=me(function(){return A1t},"topAxisEnabled"),j1t=me(function(t){E1t=t},"setDisplayMode"),W1t=me(function(){return E1t},"getDisplayMode"),Y1t=me(function(){return g1t},"getDateFormat"),H1t=me(function(t){v1t=t.toLowerCase().split(/[\s,]+/)},"setIncludes"),V1t=me(function(){return v1t},"getIncludes"),X1t=me(function(t){x1t=t.toLowerCase().split(/[\s,]+/)},"setExcludes"),K1t=me(function(){return x1t},"getExcludes"),Z1t=me(function(){return b1t},"getLinks"),Q1t=me(function(t){T1t=t,w1t.push(t)},"addSection"),J1t=me(function(){return w1t},"getSections"),tft=me(function(){let t=wft(),e=0;for(;!t&&e<10;)t=wft(),e++;return k1t=mft},"getTasks"),eft=me(function(t,e,r,n){return!n.includes(t.format(e.trim()))&&(!((!r.includes("weekends")||t.isoWeekday()!==p1t[N1t]&&t.isoWeekday()!==p1t[N1t]+1)&&!r.includes(t.format("dddd").toLowerCase()))||r.includes(t.format(e.trim())))},"isInvalidDate"),rft=me(function(t){L1t=t},"setWeekday"),nft=me(function(){return L1t},"getWeekday"),ift=me(function(t){N1t=t},"setWeekend"),aft=me(function(e,r,n,i){if(n.length&&!e.manualEndTime){let t;t=(t=e.startTime instanceof Date?(0,d1t.default)(e.startTime):(0,d1t.default)(e.startTime,r,!0)).add(1,"d");var a=e.endTime instanceof Date?(0,d1t.default)(e.endTime):(0,d1t.default)(e.endTime,r,!0),[r,n]=sft(t,a,r,n,i);e.endTime=r.toDate(),e.renderEndTime=n}},"checkTaskDates"),sft=me(function(t,e,r,n,i){let a=!1,s=null;for(;t<=e;)a||(s=e.toDate()),(a=eft(t,r,n,i))&&(e=e.add(1,"d")),t=t.add(1,"d");return[e,s]},"fixTaskDates"),oft=me(function(t,e,r){r=r.trim();var n=/^after\s+(?[\d\w- ]+)/.exec(r);if(null!==n){let t=null;for(var i of n.groups.ids.split(" "))void 0!==(i=xft(i))&&(!t||i.endTime>t.endTime)&&(t=i);return t?t.endTime:((n=new Date).setHours(0,0,0,0),n)}if((n=(0,d1t.default)(r,e.trim(),!0)).isValid())return n.toDate();if(M.debug("Invalid date:"+r),M.debug("With date format:"+e.trim()),void 0===(n=new Date(r))||isNaN(n.getTime())||n.getFullYear()<-1e4||1e4[\d\w- ]+)/.exec(r);if(null!==i){let t=null;for(var a of i.groups.ids.split(" "))void 0!==(a=xft(a))&&(!t||a.startTime{window.open(r,"_self")}),b1t.set(t,r))}),Tft(t,"clickable")},"setLink"),Tft=me(function(t,e){t.split(",").forEach(function(t){void 0!==(t=xft(t))&&t.classes.push(e)})},"setClass"),Eft=me(function(t,e,n){if("loose"===D().securityLevel&&void 0!==e){let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e{HE.runFunc(e,...r)})}},"setClickFun"),Cft=me(function(e,r){_1t.push(function(){var t=document.querySelector(`[id="${e}"]`);null!==t&&t.addEventListener("click",function(){r()})},function(){var t=document.querySelector(`[id="${e}-text"]`);null!==t&&t.addEventListener("click",function(){r()})})},"pushFun"),_ft=me(function(t,e,r){t.split(",").forEach(function(t){Eft(t,e,r)}),Tft(t,"clickable")},"setClickEvent"),Sft=me(function(e){_1t.forEach(function(t){t(e)})},"bindFunctions"),Aft={getConfig:me(()=>D().gantt,"getConfig"),clear:R1t,setDateFormat:$1t,getDateFormat:Y1t,enableInclusiveEndDates:z1t,endDatesAreInclusive:G1t,enableTopAxis:U1t,topAxisEnabled:q1t,setAxisFormat:M1t,getAxisFormat:D1t,setTickInterval:O1t,getTickInterval:P1t,setTodayMarker:B1t,getTodayMarker:F1t,setAccTitle:ch,getAccTitle:hh,setDiagramTitle:ph,getDiagramTitle:gh,setDisplayMode:j1t,getDisplayMode:W1t,setAccDescription:uh,getAccDescription:dh,addSection:Q1t,getSections:J1t,getTasks:tft,addTask:vft,findTaskById:xft,addTaskOrg:bft,setIncludes:H1t,getIncludes:V1t,setExcludes:X1t,getExcludes:K1t,setClickEvent:_ft,setLink:kft,getLinks:Z1t,bindFunctions:Sft,parseDuration:lft,isInvalidDate:eft,setWeekday:rft,getWeekday:nft,setWeekend:ift},me(h1t,"getTaskTags")}),$ft=t(()=>{Lft=tt(et(),1),e(),Q3(),th(),mu(),eh(),Nft=me(function(){M.debug("Something is calling, setConf, remove the call")},"setConf"),Ift={monday:ix,tuesday:ax,wednesday:sx,thursday:ox,friday:lx,saturday:cx,sunday:nx},Rft=me((t,e)=>{let r=[...t].map(()=>-1/0),n=[...t].sort((t,e)=>t.startTime-e.startTime||t.order-e.order),i=0;for(var a of n)for(let t=0;t=r[t]){r[t]=a.endTime,a.order=t+e,t>i&&(i=t);break}return i},"getMaxIntersections"),Dft=me(function(t,l,e,d){let p=D().gantt,r=D().securityLevel,n,i=("sandbox"===r&&(n=H("#i"+l)),H("sandbox"===r?n.nodes()[0].contentDocument.body:"body")),s="sandbox"===r?n.nodes()[0].contentDocument:document,a=s.getElementById(l),u=(void 0===(Mft=a.parentElement.offsetWidth)&&(Mft=1200),void 0!==p.useWidth&&(Mft=p.useWidth),d.db.getTasks()),g=[];for(var o of u)g.push(o.type);g=A(g);let c={},h=2*p.topPadding;if("compact"===d.db.getDisplayMode()||"compact"===p.displayMode){var f,m,y={};for(f of u)void 0===y[f.section]?y[f.section]=[f]:y[f.section].push(f);let t=0;for(m of Object.keys(y)){var v=Rft(y[m],t)+1;t+=v,h+=v*(p.barHeight+p.barGap),c[m]=v}}else{h+=u.length*(p.barHeight+p.barGap);for(let e of g)c[e]=u.filter(t=>t.type===e).length}a.setAttribute("viewBox","0 0 "+Mft+" "+h);let x=i.select(`[id="${l}"]`),b=o4().domain([Yu(u,function(t){return t.startTime}),ju(u,function(t){return t.endTime})]).rangeRound([0,Mft-p.leftPadding-p.rightPadding]);function w(t,e){let r=t.startTime,n=e.startTime,i=0;return nt.vert===e.vert?0:t.vert?1:-1);var a=[...new Set(t.map(t=>t.order))].map(e=>t.find(t=>t.order===e));x.append("g").selectAll("rect").data(a).enter().append("rect").attr("x",0).attr("y",function(t,e){return t.order*r+n-2}).attr("width",function(){return h-p.rightPadding/2}).attr("height",r).attr("class",function(t){for(var[e,r]of g.entries())if(t.type===r)return"section section"+e%p.numberSectionStyles;return"section section0"}).enter();let s=x.append("g").selectAll("rect").data(t).enter(),o=d.db.getLinks();if(s.append("rect").attr("id",function(t){return t.id}).attr("rx",3).attr("ry",3).attr("x",function(t){return t.milestone?b(t.startTime)+i+.5*(b(t.endTime)-b(t.startTime))-.5*c:b(t.startTime)+i}).attr("y",function(t,e){return e=t.order,t.vert?p.gridLineStartPadding:e*r+n}).attr("width",function(t){return t.milestone?c:t.vert?.08*c:b(t.renderEndTime||t.endTime)-b(t.startTime)}).attr("height",function(t){return t.vert?u.length*(p.barHeight+p.barGap)+2*p.barHeight:c}).attr("transform-origin",function(t,e){return e=t.order,(b(t.startTime)+i+.5*(b(t.endTime)-b(t.startTime))).toString()+"px "+(e*r+n+.5*c).toString()+"px"}).attr("class",function(t){let e="",r=(0r-e?r+t+1.5*p.leftPadding>h?e+i-5:r+i+5:(r-e)/2+e+i}).attr("y",function(t,e){return t.vert?p.gridLineStartPadding+u.length*(p.barHeight+p.barGap)+60:t.order*r+p.barHeight/2+(p.fontSize/2-2)+n}).attr("text-height",c).attr("class",function(t){let e=b(t.startTime),r=b(t.endTime),n=(t.milestone&&(r=e+c),this.getBBox().width),i="",a=(0r-e?r+n+1.5*p.leftPadding>h?i+" taskTextOutsideLeft taskTextOutside"+a+" "+l:i+" taskTextOutsideRight taskTextOutside"+a+" "+l+" width-"+n:i+" taskText taskText"+a+" "+l+" width-"+n}),"sandbox"===D().securityLevel){let a=H("#i"+l).nodes()[0].contentDocument;s.filter(function(t){return o.has(t.id)}).each(function(t){var e=a.querySelector("#"+t.id),r=a.querySelector("#"+t.id+"-text"),n=e.parentNode,i=a.createElement("a");i.setAttribute("xlink:href",o.get(t.id)),i.setAttribute("target","_top"),n.appendChild(i),i.appendChild(e),i.appendChild(r)})}}function E(s,o,l,t,c,e,h,u){if(0!==h.length||0!==u.length){let i,a;for(var{startTime:r,endTime:n}of e)(void 0===i||ra)&&(a=n);if(i&&a)if(5<(0,Lft.default)(a).diff((0,Lft.default)(i),"year"))M.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 t=d.db.getDateFormat(),e=[],r=null,n=(0,Lft.default)(i);for(;n.valueOf()<=a;)d.db.isInvalidDate(n,t,h,u)?r?r.end=n:r={start:n,end:n}:r&&(e.push(r),r=null),n=n.add(1,"d");x.append("g").selectAll("rect").data(e).enter().append("rect").attr("id",function(t){return"exclude-"+t.start.format("YYYY-MM-DD")}).attr("x",function(t){return b(t.start)+l}).attr("y",p.gridLineStartPadding).attr("width",function(t){var e=t.end.add(1,"day");return b(e)-b(t.start)}).attr("height",c-o-p.gridLineStartPadding).attr("transform-origin",function(t,e){return(b(t.start)+l+.5*(b(t.end)-b(t.start))).toString()+"px "+(e*s+.5*c).toString()+"px"}).attr("class","exclude-range")}}}function C(t,e,r,n){var i=sd(b).tickSize(-n+e+p.gridLineStartPadding).tickFormat(e4(d.db.getAxisFormat()||p.axisFormat||"%Y-%m-%d")),a=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(d.db.getTickInterval()||p.tickInterval);if(null!==a){var s=a[1],o=a[2],l=d.db.getWeekday()||p.weekday;switch(o){case"millisecond":i.ticks(zv.every(s));break;case"second":i.ticks(Gv.every(s));break;case"minute":i.ticks(Uv.every(s));break;case"hour":i.ticks(jv.every(s));break;case"day":i.ticks(Yv.every(s));break;case"week":i.ticks(Ift[l].every(s));break;case"month":i.ticks(yx.every(s))}}if(x.append("g").attr("class","grid").attr("transform","translate("+t+", "+(n-50)+")").call(i).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),d.db.topAxisEnabled()||p.topAxis){var c=ad(b).tickSize(-n+e+p.gridLineStartPadding).tickFormat(e4(d.db.getAxisFormat()||p.axisFormat||"%Y-%m-%d"));if(null!==a){var h=a[1],o=a[2],u=d.db.getWeekday()||p.weekday;switch(o){case"millisecond":c.ticks(zv.every(h));break;case"second":c.ticks(Gv.every(h));break;case"minute":c.ticks(Uv.every(h));break;case"hour":c.ticks(jv.every(h));break;case"day":c.ticks(Yv.every(h));break;case"week":c.ticks(Ift[u].every(h));break;case"month":c.ticks(yx.every(h))}}x.append("g").attr("class","grid").attr("transform","translate("+t+", "+e+")").call(c).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function _(r,n){let i=0,a=Object.keys(c).map(t=>[t,c[t]]);x.append("g").selectAll("text").data(a).enter().append(function(t){var e,r,n=-((t=t[0].split(L.lineBreakRegex)).length-1)/2,i=s.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("dy",n+"em");for([e,r]of t.entries()){var a=s.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttribute("alignment-baseline","central"),a.setAttribute("x","10"),0{Pft=me(t=>` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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,i){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,n;return this.$utils().u(e)?(r=a(this),n=this.isoWeekYear(),t=4-(n=(this.$u?i.utc:i)().year(n).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?/,n=/\d*[^-_:/,()\s\d]+/,g={},i=mt(function(e){return(e=+e)+(68{try{if(-1<["x","X"].indexOf(t))return new Date(("X"===t?1e3:1)*e);var i=T(t)(e),a=i.year,s=i.month,o=i.day,l=i.hours,c=i.minutes,h=i.seconds,u=i.milliseconds,d=i.zone,p=i.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,n=this,i=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((n.$M+1)/3);case"Do":return i.ordinal(n.$D);case"gggg":return n.weekYear();case"GGGG":return n.isoWeekYear();case"wo":return i.ordinal(n.week(),"W");case"w":case"ww":return t.s(n.week(),"w"===e?1:2,"0");case"W":case"WW":return t.s(n.isoWeek(),"W"===e?1:2,"0");case"k":case"kk":return t.s(String(0===n.$H?24:n.$H),"k"===e?1:2,"0");case"X":return Math.floor(n.$d.getTime()/1e3);case"x":return n.$d.getTime();case"z":return"["+n.offsetName()+"]";case"zzz":return"["+n.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 Sfe(r,n,e){let i=!0;for(;i;)i=!1,e.forEach(function(e){var t=new RegExp("^\\s*"+e+"\\s*$");r[0].match(t)&&(n[e]=!0,r.shift(1),i=!0)})}var _fe,Afe,Lfe,Nfe,Ife,Rfe,Mfe,Dfe,Ofe,Pfe,Bfe,$fe,Ffe,zfe,Gfe,Ufe,qfe,jfe,Wfe,Yfe,Hfe,Vfe,Xfe,Kfe,Zfe,Qfe,Jfe,eme,tme,rme,nme,ime,ame,sme,ome,lme,cme,hme,ume,dme,pme,gme,fme,mme,yme,vme,xme,bme,wme,kme,Tme,Eme,Cme,Sme,_me,Ame,Lme,Nme,Ime,Rme,Mme,Dme,Ome,Pme,Bme,$me,Fme,zme,Gme,Ume,qme,jme,Wme,Yme,Hme,Vme,Xme,Kme,Zme,Qme,Jme,eye=e(()=>{_fe=ee(Jw(),1),Afe=ee(te(),1),Vfe=ee(Tfe(),1),Xfe=ee(Efe(),1),Kfe=ee(Cfe(),1),t(),mu(),KC(),fu(),Afe.default.extend(Vfe.default),Afe.default.extend(Xfe.default),Afe.default.extend(Kfe.default),Lfe={friday:5,saturday:6},Mfe=Ife=Nfe="",Dfe=[],Ofe=[],Pfe=new Map,Bfe=[],$fe=[],zfe=Ffe="",Gfe=["active","done","crit","milestone","vert"],jfe=qfe=!(Ufe=[]),Wfe="sunday",Yfe="saturday",Hfe=0,Vfe=mt(function(){Bfe=[],$fe=[],Ufe=[],Rme=[],Rfe=Ime=Nme=void(Sme=0),Mfe=zfe=Ife=Nfe=Ffe="",Dfe=[],jfe=qfe=!(Ofe=[]),Hfe=0,Pfe=new Map,lh(),Wfe="sunday",Yfe="saturday"},"clear"),Xfe=mt(function(e){Ife=e},"setAxisFormat"),Kfe=mt(function(){return Ife},"getAxisFormat"),Zfe=mt(function(e){Rfe=e},"setTickInterval"),Qfe=mt(function(){return Rfe},"getTickInterval"),Jfe=mt(function(e){Mfe=e},"setTodayMarker"),eme=mt(function(){return Mfe},"getTodayMarker"),tme=mt(function(e){Nfe=e},"setDateFormat"),rme=mt(function(){qfe=!0},"enableInclusiveEndDates"),nme=mt(function(){return qfe},"endDatesAreInclusive"),ime=mt(function(){jfe=!0},"enableTopAxis"),ame=mt(function(){return jfe},"topAxisEnabled"),sme=mt(function(e){zfe=e},"setDisplayMode"),ome=mt(function(){return zfe},"getDisplayMode"),lme=mt(function(){return Nfe},"getDateFormat"),cme=mt(function(e){Dfe=e.toLowerCase().split(/[\s,]+/)},"setIncludes"),hme=mt(function(){return Dfe},"getIncludes"),ume=mt(function(e){Ofe=e.toLowerCase().split(/[\s,]+/)},"setExcludes"),dme=mt(function(){return Ofe},"getExcludes"),pme=mt(function(){return Pfe},"getLinks"),gme=mt(function(e){Ffe=e,Bfe.push(e)},"addSection"),fme=mt(function(){return Bfe},"getSections"),mme=mt(function(){let e=Bme(),t=0;for(;!e&&t<10;)e=Bme(),t++;return $fe=Rme},"getTasks"),yme=mt(function(e,t,r,n){return!n.includes(e.format(t.trim()))&&(!((!r.includes("weekends")||e.isoWeekday()!==Lfe[Yfe]&&e.isoWeekday()!==Lfe[Yfe]+1)&&!r.includes(e.format("dddd").toLowerCase()))||r.includes(e.format(t.trim())))},"isInvalidDate"),vme=mt(function(e){Wfe=e},"setWeekday"),xme=mt(function(){return Wfe},"getWeekday"),bme=mt(function(e){Yfe=e},"setWeekend"),wme=mt(function(t,r,n,i){if(n.length&&!t.manualEndTime){let e;e=(e=t.startTime instanceof Date?(0,Afe.default)(t.startTime):(0,Afe.default)(t.startTime,r,!0)).add(1,"d");var a=t.endTime instanceof Date?(0,Afe.default)(t.endTime):(0,Afe.default)(t.endTime,r,!0),[r,n]=kme(e,a,r,n,i);t.endTime=r.toDate(),t.renderEndTime=n}},"checkTaskDates"),kme=mt(function(e,t,r,n,i){let a=!1,s=null;for(;e<=t;)a||(s=t.toDate()),(a=yme(e,r,n,i))&&(t=t.add(1,"d")),e=e.add(1,"d");return[t,s]},"fixTaskDates"),Tme=mt(function(e,t,r){r=r.trim();var n=/^after\s+(?[\d\w- ]+)/.exec(r);if(null!==n){let e=null;for(var i of n.groups.ids.split(" "))void 0!==(i=Ome(i))&&(!e||i.endTime>e.endTime)&&(e=i);return e?e.endTime:((n=new Date).setHours(0,0,0,0),n)}if((n=(0,Afe.default)(r,t.trim(),!0)).isValid())return n.toDate();if(M.debug("Invalid date:"+r),M.debug("With date format:"+t.trim()),void 0===(n=new Date(r))||isNaN(n.getTime())||n.getFullYear()<-1e4||1e4[\d\w- ]+)/.exec(r);if(null!==i){let e=null;for(var a of i.groups.ids.split(" "))void 0!==(a=Ome(a))&&(!e||a.startTime{window.open(r,"_self")}),Pfe.set(e,r))}),Fme(e,"clickable")},"setLink"),Fme=mt(function(e,t){e.split(",").forEach(function(e){void 0!==(e=Ome(e))&&e.classes.push(t)})},"setClass"),zme=mt(function(e,t,n){if("loose"===D().securityLevel&&void 0!==t){let r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t{YC.runFunc(t,...r)})}},"setClickFun"),Gme=mt(function(t,r){Ufe.push(function(){var e=document.querySelector(`[id="${t}"]`);null!==e&&e.addEventListener("click",function(){r()})},function(){var e=document.querySelector(`[id="${t}-text"]`);null!==e&&e.addEventListener("click",function(){r()})})},"pushFun"),Ume=mt(function(e,t,r){e.split(",").forEach(function(e){zme(e,t,r)}),Fme(e,"clickable")},"setClickEvent"),qme=mt(function(t){Ufe.forEach(function(e){e(t)})},"bindFunctions"),jme={getConfig:mt(()=>D().gantt,"getConfig"),clear:Vfe,setDateFormat:tme,getDateFormat:lme,enableInclusiveEndDates:rme,endDatesAreInclusive:nme,enableTopAxis:ime,topAxisEnabled:ame,setAxisFormat:Xfe,getAxisFormat:Kfe,setTickInterval:Zfe,getTickInterval:Qfe,setTodayMarker:Jfe,getTodayMarker:eme,setAccTitle:ch,getAccTitle:hh,setDiagramTitle:ph,getDiagramTitle:gh,setDisplayMode:sme,getDisplayMode:ome,setAccDescription:uh,getAccDescription:dh,addSection:gme,getSections:fme,getTasks:mme,addTask:Dme,findTaskById:Ome,addTaskOrg:Pme,setIncludes:cme,getIncludes:hme,setExcludes:ume,getExcludes:dme,setClickEvent:Ume,setLink:$me,getLinks:pme,bindFunctions:qme,parseDuration:Eme,isInvalidDate:yme,setWeekday:vme,getWeekday:xme,setWeekend:bme},mt(Sfe,"getTaskTags")}),tye=e(()=>{Wme=ee(te(),1),t(),Zw(),eh(),mu(),th(),Yme=mt(function(){M.debug("Something is calling, setConf, remove the call")},"setConf"),Hme={monday:nb,tuesday:ib,wednesday:ab,thursday:sb,friday:ob,saturday:lb,sunday:rb},Vme=mt((e,t)=>{let r=[...e].map(()=>-1/0),n=[...e].sort((e,t)=>e.startTime-t.startTime||e.order-t.order),i=0;for(var a of n)for(let e=0;e=r[e]){r[e]=a.endTime,a.order=e+t,e>i&&(i=e);break}return i},"getMaxIntersections"),Kme=mt(function(e,l,t,d){let p=D().gantt,r=D().securityLevel,n,i=("sandbox"===r&&(n=H("#i"+l)),H("sandbox"===r?n.nodes()[0].contentDocument.body:"body")),s="sandbox"===r?n.nodes()[0].contentDocument:document,a=s.getElementById(l),u=(void 0===(Xme=a.parentElement.offsetWidth)&&(Xme=1200),void 0!==p.useWidth&&(Xme=p.useWidth),d.db.getTasks()),g=[];for(var o of u)g.push(o.type);g=A(g);let c={},h=2*p.topPadding;if("compact"===d.db.getDisplayMode()||"compact"===p.displayMode){var f,m,y={};for(f of u)void 0===y[f.section]?y[f.section]=[f]:y[f.section].push(f);let e=0;for(m of Object.keys(y)){var v=Vme(y[m],e)+1;e+=v,h+=v*(p.barHeight+p.barGap),c[m]=v}}else{h+=u.length*(p.barHeight+p.barGap);for(let t of g)c[t]=u.filter(e=>e.type===t).length}a.setAttribute("viewBox","0 0 "+Xme+" "+h);let x=i.select(`[id="${l}"]`),b=s5().domain([Yu(u,function(e){return e.startTime}),ju(u,function(e){return e.endTime})]).rangeRound([0,Xme-p.leftPadding-p.rightPadding]);function w(e,t){let r=e.startTime,n=t.startTime,i=0;return ne.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));x.append("g").selectAll("rect").data(a).enter().append("rect").attr("x",0).attr("y",function(e,t){return e.order*r+n-2}).attr("width",function(){return h-p.rightPadding/2}).attr("height",r).attr("class",function(e){for(var[t,r]of g.entries())if(e.type===r)return"section section"+t%p.numberSectionStyles;return"section section0"}).enter();let s=x.append("g").selectAll("rect").data(e).enter(),o=d.db.getLinks();if(s.append("rect").attr("id",function(e){return e.id}).attr("rx",3).attr("ry",3).attr("x",function(e){return e.milestone?b(e.startTime)+i+.5*(b(e.endTime)-b(e.startTime))-.5*c:b(e.startTime)+i}).attr("y",function(e,t){return t=e.order,e.vert?p.gridLineStartPadding:t*r+n}).attr("width",function(e){return e.milestone?c:e.vert?.08*c:b(e.renderEndTime||e.endTime)-b(e.startTime)}).attr("height",function(e){return e.vert?u.length*(p.barHeight+p.barGap)+2*p.barHeight:c}).attr("transform-origin",function(e,t){return t=e.order,(b(e.startTime)+i+.5*(b(e.endTime)-b(e.startTime))).toString()+"px "+(t*r+n+.5*c).toString()+"px"}).attr("class",function(e){let t="",r=(0r-t?r+e+1.5*p.leftPadding>h?t+i-5:r+i+5:(r-t)/2+t+i}).attr("y",function(e,t){return e.vert?p.gridLineStartPadding+u.length*(p.barHeight+p.barGap)+60:e.order*r+p.barHeight/2+(p.fontSize/2-2)+n}).attr("text-height",c).attr("class",function(e){let t=b(e.startTime),r=b(e.endTime),n=(e.milestone&&(r=t+c),this.getBBox().width),i="",a=(0r-t?r+n+1.5*p.leftPadding>h?i+" taskTextOutsideLeft taskTextOutside"+a+" "+l:i+" taskTextOutsideRight taskTextOutside"+a+" "+l+" width-"+n:i+" taskText taskText"+a+" "+l+" width-"+n}),"sandbox"===D().securityLevel){let a=H("#i"+l).nodes()[0].contentDocument;s.filter(function(e){return o.has(e.id)}).each(function(e){var t=a.querySelector("#"+e.id),r=a.querySelector("#"+e.id+"-text"),n=t.parentNode,i=a.createElement("a");i.setAttribute("xlink:href",o.get(e.id)),i.setAttribute("target","_top"),n.appendChild(i),i.appendChild(t),i.appendChild(r)})}}function E(s,o,l,e,c,t,h,u){if(0!==h.length||0!==u.length){let i,a;for(var{startTime:r,endTime:n}of t)(void 0===i||ra)&&(a=n);if(i&&a)if(5<(0,Wme.default)(a).diff((0,Wme.default)(i),"year"))M.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=d.db.getDateFormat(),t=[],r=null,n=(0,Wme.default)(i);for(;n.valueOf()<=a;)d.db.isInvalidDate(n,e,h,u)?r?r.end=n:r={start:n,end:n}:r&&(t.push(r),r=null),n=n.add(1,"d");x.append("g").selectAll("rect").data(t).enter().append("rect").attr("id",function(e){return"exclude-"+e.start.format("YYYY-MM-DD")}).attr("x",function(e){return b(e.start)+l}).attr("y",p.gridLineStartPadding).attr("width",function(e){var t=e.end.add(1,"day");return b(t)-b(e.start)}).attr("height",c-o-p.gridLineStartPadding).attr("transform-origin",function(e,t){return(b(e.start)+l+.5*(b(e.end)-b(e.start))).toString()+"px "+(t*s+.5*c).toString()+"px"}).attr("class","exclude-range")}}}function C(e,t,r,n){var i=sd(b).tickSize(-n+t+p.gridLineStartPadding).tickFormat(e5(d.db.getAxisFormat()||p.axisFormat||"%Y-%m-%d")),a=/^([1-9]\d*)(millisecond|second|minute|hour|day|week|month)$/.exec(d.db.getTickInterval()||p.tickInterval);if(null!==a){var s=a[1],o=a[2],l=d.db.getWeekday()||p.weekday;switch(o){case"millisecond":i.ticks(Fx.every(s));break;case"second":i.ticks(zx.every(s));break;case"minute":i.ticks(Gx.every(s));break;case"hour":i.ticks(qx.every(s));break;case"day":i.ticks(Wx.every(s));break;case"week":i.ticks(Hme[l].every(s));break;case"month":i.ticks(mb.every(s))}}if(x.append("g").attr("class","grid").attr("transform","translate("+e+", "+(n-50)+")").call(i).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),d.db.topAxisEnabled()||p.topAxis){var c=ad(b).tickSize(-n+t+p.gridLineStartPadding).tickFormat(e5(d.db.getAxisFormat()||p.axisFormat||"%Y-%m-%d"));if(null!==a){var h=a[1],o=a[2],u=d.db.getWeekday()||p.weekday;switch(o){case"millisecond":c.ticks(Fx.every(h));break;case"second":c.ticks(zx.every(h));break;case"minute":c.ticks(Gx.every(h));break;case"hour":c.ticks(qx.every(h));break;case"day":c.ticks(Wx.every(h));break;case"week":c.ticks(Hme[u].every(h));break;case"month":c.ticks(mb.every(h))}}x.append("g").attr("class","grid").attr("transform","translate("+e+", "+t+")").call(c).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function S(r,n){let i=0,a=Object.keys(c).map(e=>[e,c[e]]);x.append("g").selectAll("text").data(a).enter().append(function(e){var t,r,n=-((e=e[0].split(L.lineBreakRegex)).length-1)/2,i=s.createElementNS("http://www.w3.org/2000/svg","text");i.setAttribute("dy",n+"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{Qme=mt(e=>` .mermaid-main-font { - font-family: ${t.fontFamily}; + font-family: ${e.fontFamily}; } .exclude-range { - fill: ${t.excludeBkgColor}; + fill: ${e.excludeBkgColor}; } .section { @@ -909,52 +909,52 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l } .section0 { - fill: ${t.sectionBkgColor}; + fill: ${e.sectionBkgColor}; } .section2 { - fill: ${t.sectionBkgColor2}; + fill: ${e.sectionBkgColor2}; } .section1, .section3 { - fill: ${t.altSectionBkgColor}; + fill: ${e.altSectionBkgColor}; opacity: 0.2; } .sectionTitle0 { - fill: ${t.titleColor}; + fill: ${e.titleColor}; } .sectionTitle1 { - fill: ${t.titleColor}; + fill: ${e.titleColor}; } .sectionTitle2 { - fill: ${t.titleColor}; + fill: ${e.titleColor}; } .sectionTitle3 { - fill: ${t.titleColor}; + fill: ${e.titleColor}; } .sectionTitle { text-anchor: start; - font-family: ${t.fontFamily}; + font-family: ${e.fontFamily}; } /* Grid and axis */ .grid .tick { - stroke: ${t.gridColor}; + stroke: ${e.gridColor}; opacity: 0.8; shape-rendering: crispEdges; } .grid .tick text { - font-family: ${t.fontFamily}; - fill: ${t.textColor}; + font-family: ${e.fontFamily}; + fill: ${e.textColor}; } .grid path { @@ -966,7 +966,7 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l .today { fill: none; - stroke: ${t.todayLineColor}; + stroke: ${e.todayLineColor}; stroke-width: 2px; } @@ -981,17 +981,17 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l .taskText { text-anchor: middle; - font-family: ${t.fontFamily}; + font-family: ${e.fontFamily}; } .taskTextOutsideRight { - fill: ${t.taskTextDarkColor}; + fill: ${e.taskTextDarkColor}; text-anchor: start; - font-family: ${t.fontFamily}; + font-family: ${e.fontFamily}; } .taskTextOutsideLeft { - fill: ${t.taskTextDarkColor}; + fill: ${e.taskTextDarkColor}; text-anchor: end; } @@ -1004,19 +1004,19 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l .taskText.clickable { cursor: pointer; - fill: ${t.taskTextClickableColor} !important; + fill: ${e.taskTextClickableColor} !important; font-weight: bold; } .taskTextOutsideLeft.clickable { cursor: pointer; - fill: ${t.taskTextClickableColor} !important; + fill: ${e.taskTextClickableColor} !important; font-weight: bold; } .taskTextOutsideRight.clickable { cursor: pointer; - fill: ${t.taskTextClickableColor} !important; + fill: ${e.taskTextClickableColor} !important; font-weight: bold; } @@ -1027,26 +1027,26 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l .taskText1, .taskText2, .taskText3 { - fill: ${t.taskTextColor}; + fill: ${e.taskTextColor}; } .task0, .task1, .task2, .task3 { - fill: ${t.taskBkgColor}; - stroke: ${t.taskBorderColor}; + fill: ${e.taskBkgColor}; + stroke: ${e.taskBorderColor}; } .taskTextOutside0, .taskTextOutside2 { - fill: ${t.taskTextOutsideColor}; + fill: ${e.taskTextOutsideColor}; } .taskTextOutside1, .taskTextOutside3 { - fill: ${t.taskTextOutsideColor}; + fill: ${e.taskTextOutsideColor}; } @@ -1056,15 +1056,15 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l .active1, .active2, .active3 { - fill: ${t.activeTaskBkgColor}; - stroke: ${t.activeTaskBorderColor}; + fill: ${e.activeTaskBkgColor}; + stroke: ${e.activeTaskBorderColor}; } .activeText0, .activeText1, .activeText2, .activeText3 { - fill: ${t.taskTextDarkColor} !important; + fill: ${e.taskTextDarkColor} !important; } @@ -1074,8 +1074,8 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l .done1, .done2, .done3 { - stroke: ${t.doneTaskBorderColor}; - fill: ${t.doneTaskBkgColor}; + stroke: ${e.doneTaskBorderColor}; + fill: ${e.doneTaskBkgColor}; stroke-width: 2; } @@ -1083,7 +1083,7 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l .doneText1, .doneText2, .doneText3 { - fill: ${t.taskTextDarkColor} !important; + fill: ${e.taskTextDarkColor} !important; } @@ -1093,8 +1093,8 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l .crit1, .crit2, .crit3 { - stroke: ${t.critBorderColor}; - fill: ${t.critBkgColor}; + stroke: ${e.critBorderColor}; + fill: ${e.critBkgColor}; stroke-width: 2; } @@ -1102,8 +1102,8 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l .activeCrit1, .activeCrit2, .activeCrit3 { - stroke: ${t.critBorderColor}; - fill: ${t.activeTaskBkgColor}; + stroke: ${e.critBorderColor}; + fill: ${e.activeTaskBkgColor}; stroke-width: 2; } @@ -1111,8 +1111,8 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l .doneCrit1, .doneCrit2, .doneCrit3 { - stroke: ${t.critBorderColor}; - fill: ${t.doneTaskBkgColor}; + stroke: ${e.critBorderColor}; + fill: ${e.doneTaskBkgColor}; stroke-width: 2; cursor: pointer; shape-rendering: crispEdges; @@ -1129,237 +1129,237 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l .doneCritText1, .doneCritText2, .doneCritText3 { - fill: ${t.taskTextDarkColor} !important; + fill: ${e.taskTextDarkColor} !important; } .vert { - stroke: ${t.vertLineColor}; + stroke: ${e.vertLineColor}; } .vertText { font-size: 15px; text-anchor: middle; - fill: ${t.vertLineColor} !important; + fill: ${e.vertLineColor} !important; } .activeCritText0, .activeCritText1, .activeCritText2, .activeCritText3 { - fill: ${t.taskTextDarkColor} !important; + fill: ${e.taskTextDarkColor} !important; } .titleText { text-anchor: middle; font-size: 18px; - fill: ${t.titleColor||t.textColor}; - font-family: ${t.fontFamily}; + fill: ${e.titleColor||e.textColor}; + font-family: ${e.fontFamily}; } -`,"getStyles"),Bft=Pft}),Gft={};oPt(Gft,{diagram:()=>Uft});var Uft,qft,jft,Wft,Yft,Hft,Vft,Xft,Kft,Zft=t(()=>{s1t(),Fft(),$ft(),zft(),Uft={parser:i1t,db:Aft,renderer:Oft,styles:Bft}}),Qft=t(()=>{Mpt(),e(),qft={parse:me(async t=>{t=await Lpt("info",t),M.debug(t)},"parse")}}),Jft=t(()=>{jft={name:"mermaid",version:"11.7.0",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.0.4","@iconify/utils":"^2.1.33","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.11",dayjs:"^1.11.13",dompurify:"^3.2.5",katex:"^0.16.9",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^15.0.7",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.2","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",chokidar:"^4.0.3",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.0.2",jison:"^0.4.18","js-base64":"^3.7.7",jsdom:"^26.0.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.2",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.10","type-fest":"^4.35.0",typedoc:"^0.27.8","typedoc-plugin-markdown":"^4.4.2",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.0.2","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}}}),tmt=t(()=>{Jft(),Wft={version:jft.version+""},Yft=me(()=>Wft.version,"getVersion"),Hft={getVersion:Yft}}),emt=t(()=>{Q3(),mu(),Vft=me(t=>{let e=D().securityLevel,r=H("body"),n;return"sandbox"===e&&(n=H("#i"+t).node()?.contentDocument??document,r=H(n.body)),r.select("#"+t)},"selectSvgElement")}),rmt=t(()=>{e(),emt(),eh(),Xft=me((t,e,r)=>{M.debug(`rendering info diagram -`+t),t=Vft(e),Vc(t,100,400,!0),t.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"),Kft={draw:Xft}}),nmt={};oPt(nmt,{diagram:()=>imt});var imt,amt,smt,omt,lmt,cmt,hmt,umt,dmt,pmt,gmt,fmt,mmt,ymt,vmt,xmt,bmt,wmt,kmt,Tmt=t(()=>{Qft(),tmt(),rmt(),imt={parser:qft,db:Hft,renderer:Kft}}),Emt=t(()=>{e(),fu(),An(),cmt=yr.pie,amt={sections:new Map,showData:!1,config:cmt},smt=amt.sections,omt=amt.showData,lmt=structuredClone(cmt),cmt=me(()=>structuredClone(lmt),"getConfig"),hmt=me(()=>{smt=new Map,omt=amt.showData,lh()},"clear"),umt=me(({label:t,value:e})=>{smt.has(t)||(smt.set(t,e),M.debug(`added new section: ${t}, with value: `+e))},"addSection"),dmt=me(()=>smt,"getSections"),pmt=me(t=>{omt=t},"setShowData"),gmt=me(()=>omt,"getShowData"),fmt={getConfig:cmt,clear:hmt,setDiagramTitle:ph,getDiagramTitle:gh,setAccTitle:ch,getAccTitle:hh,setAccDescription:uh,getAccDescription:dh,addSection:umt,getSections:dmt,setShowData:pmt,getShowData:gmt}}),Cmt=t(()=>{Mpt(),e(),Bpt(),Emt(),mmt=me((t,e)=>{Dpt(t,e),e.setShowData(t.showData),t.sections.map(e.addSection)},"populateDb"),ymt={parse:me(async t=>{t=await Lpt("pie",t),M.debug(t),mmt(t,fmt)},"parse")}}),_mt=t(()=>{vmt=me(t=>` +`,"getStyles"),Jme=Qme}),nye={};JBe(nye,{diagram:()=>iye});var iye,aye,sye,oye,lye,cye,hye,uye,dye,pye=e(()=>{kfe(),eye(),tye(),rye(),iye={parser:bfe,db:jme,renderer:Zme,styles:Jme}}),gye=e(()=>{Xge(),t(),aye={parse:mt(async e=>{e=await Wge("info",e),M.debug(e)},"parse")}}),fye=e(()=>{sye={name:"mermaid",version:"11.8.0",description:"Markdown-ish syntax for generating flowcharts, mindmaps, sequence diagrams, class diagrams, gantt charts, git graphs and more.",type:"module",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",exports:{".":{types:"./dist/mermaid.d.ts",import:"./dist/mermaid.core.mjs",default:"./dist/mermaid.core.mjs"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph","mindmap","packet diagram","c4 diagram","er diagram","pie chart","pie diagram","quadrant chart","requirement diagram","graph"],scripts:{clean:"rimraf dist",dev:"pnpm -w dev","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaid.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts","docs:verify":"pnpm docs:code && pnpm docs:spellcheck && tsx scripts/docs.cli.mts --verify","docs:pre:vitepress":"pnpm --filter ./src/docs prefetch && rimraf src/vitepress && pnpm docs:code && tsx scripts/docs.cli.mts --vitepress && pnpm --filter ./src/vitepress install --no-frozen-lockfile --ignore-scripts","docs:build:vitepress":"pnpm docs:pre:vitepress && (cd src/vitepress && pnpm run build) && cpy --flat src/docs/landing/ ./src/vitepress/.vitepress/dist/landing","docs:dev":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:dev:docker":'pnpm docs:pre:vitepress && concurrently "pnpm --filter ./src/vitepress dev:docker" "tsx scripts/docs.cli.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell "src/docs/**/*.md"',"docs:release-version":"tsx scripts/update-release-version.mts","docs:verify-version":"tsx scripts/update-release-version.mts --verify","types:build-config":"tsx scripts/create-types-from-json-schema.mts","types:verify-config":"tsx scripts/create-types-from-json-schema.mts --verify",checkCircle:"npx madge --circular ./src",prepublishOnly:"pnpm docs:verify-version"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^7.0.4","@iconify/utils":"^2.1.33","@mermaid-js/parser":"workspace:^","@types/d3":"^7.4.3",cytoscape:"^3.29.3","cytoscape-cose-bilkent":"^4.1.0","cytoscape-fcose":"^2.2.0",d3:"^7.9.0","d3-sankey":"^0.12.3","dagre-d3-es":"7.0.11",dayjs:"^1.11.13",dompurify:"^3.2.5",katex:"^0.16.9",khroma:"^2.1.0","lodash-es":"^4.17.21",marked:"^15.0.7",roughjs:"^4.6.6",stylis:"^4.3.6","ts-dedent":"^2.2.0",uuid:"^11.1.0"},devDependencies:{"@adobe/jsonschema2md":"^8.0.2","@iconify/types":"^2.0.0","@types/cytoscape":"^3.21.9","@types/cytoscape-fcose":"^2.2.4","@types/d3-sankey":"^0.12.4","@types/d3-scale":"^4.0.9","@types/d3-scale-chromatic":"^3.1.0","@types/d3-selection":"^3.0.11","@types/d3-shape":"^3.1.7","@types/jsdom":"^21.1.7","@types/katex":"^0.16.7","@types/lodash-es":"^4.17.12","@types/micromatch":"^4.0.9","@types/stylis":"^4.2.7","@types/uuid":"^10.0.0",ajv:"^8.17.1",chokidar:"3.6.0",concurrently:"^9.1.2","csstree-validator":"^4.0.1",globby:"^14.0.2",jison:"^0.4.18","js-base64":"^3.7.7",jsdom:"^26.0.0","json-schema-to-typescript":"^15.0.4",micromatch:"^4.0.8","path-browserify":"^1.0.1",prettier:"^3.5.2",remark:"^15.0.1","remark-frontmatter":"^5.0.0","remark-gfm":"^4.0.1",rimraf:"^6.0.1","start-server-and-test":"^2.0.10","type-fest":"^4.35.0",typedoc:"^0.27.8","typedoc-plugin-markdown":"^4.4.2",typescript:"~5.7.3","unist-util-flatmap":"^1.0.0","unist-util-visit":"^5.0.0",vitepress:"^1.0.2","vitepress-plugin-search":"1.0.4-alpha.22"},files:["dist/","README.md"],publishConfig:{access:"public"}}}),mye=e(()=>{fye(),oye={version:sye.version+""},lye=mt(()=>oye.version,"getVersion"),cye={getVersion:lye}}),yye=e(()=>{Zw(),mu(),hye=mt(e=>{let t=D().securityLevel,r=H("body"),n;return"sandbox"===t&&(n=H("#i"+e).node()?.contentDocument??document,r=H(n.body)),r.select("#"+e)},"selectSvgElement")}),vye=e(()=>{t(),yye(),th(),uye=mt((e,t,r)=>{M.debug(`rendering info diagram +`+e),e=hye(t),Vc(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"),dye={draw:uye}}),xye={};JBe(xye,{diagram:()=>bye});var bye,wye,kye,Tye,Eye,Cye,Sye,_ye,Aye,Lye,Nye,Iye,Rye,Mye,Dye,Oye,Pye,Bye,$ye,Fye=e(()=>{gye(),mye(),vye(),bye={parser:aye,db:cye,renderer:dye}}),zye=e(()=>{t(),fu(),An(),Cye=yr.pie,wye={sections:new Map,showData:!1,config:Cye},kye=wye.sections,Tye=wye.showData,Eye=structuredClone(Cye),Cye=mt(()=>structuredClone(Eye),"getConfig"),Sye=mt(()=>{kye=new Map,Tye=wye.showData,lh()},"clear"),_ye=mt(({label:e,value:t})=>{kye.has(e)||(kye.set(e,t),M.debug(`added new section: ${e}, with value: `+t))},"addSection"),Aye=mt(()=>kye,"getSections"),Lye=mt(e=>{Tye=e},"setShowData"),Nye=mt(()=>Tye,"getShowData"),Iye={getConfig:Cye,clear:Sye,setDiagramTitle:ph,getDiagramTitle:gh,setAccTitle:ch,getAccTitle:hh,setAccDescription:uh,getAccDescription:dh,addSection:_ye,getSections:Aye,setShowData:Lye,getShowData:Nye}}),Gye=e(()=>{Xge(),t(),Jge(),zye(),Rye=mt((e,t)=>{Kge(e,t),t.setShowData(e.showData),e.sections.map(t.addSection)},"populateDb"),Mye={parse:mt(async e=>{e=await Wge("pie",e),M.debug(e),Rye(e,Iye)},"parse")}}),Uye=e(()=>{Dye=mt(e=>` .pieCircle{ - stroke: ${t.pieStrokeColor}; - stroke-width : ${t.pieStrokeWidth}; - opacity : ${t.pieOpacity}; + stroke: ${e.pieStrokeColor}; + stroke-width : ${e.pieStrokeWidth}; + opacity : ${e.pieOpacity}; } .pieOuterCircle{ - stroke: ${t.pieOuterStrokeColor}; - stroke-width: ${t.pieOuterStrokeWidth}; + stroke: ${e.pieOuterStrokeColor}; + stroke-width: ${e.pieOuterStrokeWidth}; fill: none; } .pieTitleText { text-anchor: middle; - font-size: ${t.pieTitleTextSize}; - fill: ${t.pieTitleTextColor}; - font-family: ${t.fontFamily}; + font-size: ${e.pieTitleTextSize}; + fill: ${e.pieTitleTextColor}; + font-family: ${e.fontFamily}; } .slice { - font-family: ${t.fontFamily}; - fill: ${t.pieSectionTextColor}; - font-size:${t.pieSectionTextSize}; + font-family: ${e.fontFamily}; + fill: ${e.pieSectionTextColor}; + font-size:${e.pieSectionTextSize}; // fill: white; } .legend text { - fill: ${t.pieLegendTextColor}; - font-family: ${t.fontFamily}; - font-size: ${t.pieLegendTextSize}; + fill: ${e.pieLegendTextColor}; + font-family: ${e.fontFamily}; + font-size: ${e.pieLegendTextSize}; } -`,"getStyles"),xmt=vmt}),Smt=t(()=>{Q3(),mu(),e(),emt(),eh(),ZE(),bmt=me(t=>(t=[...t.entries()].map(t=>({label:t[0],value:t[1]})).sort((t,e)=>e.value-t.value),r5().value(t=>t.value)(t)),"createPieArcs"),wmt=me((t,e,r,n)=>{M.debug(`rendering pie chart -`+t);let i=n.db,a=D(),s=bE(i.getConfig(),a.pie),o=Vft(e),l=o.append("g");l.attr("transform","translate(225,225)");var t=a.themeVariables,[n]=YE(t.pieOuterStrokeWidth);n??=2;let c=s.textPosition,h=Math.min(450,450)/2-40,u=z4().innerRadius(0).outerRadius(h),d=z4().innerRadius(h*c).outerRadius(h*c),p=(l.append("circle").attr("cx",0).attr("cy",0).attr("r",h+n/2).attr("class","pieOuterCircle"),i.getSections()),g=bmt(p),f=[t.pie1,t.pie2,t.pie3,t.pie4,t.pie5,t.pie6,t.pie7,t.pie8,t.pie9,t.pie10,t.pie11,t.pie12],m=uv(f),y=(l.selectAll("mySlices").data(g).enter().append("path").attr("d",u).attr("fill",t=>m(t.data.label)).attr("class","pieCircle"),0);p.forEach(t=>{y+=t}),l.selectAll("mySlices").data(g).enter().append("text").text(t=>(t.data.value/y*100).toFixed(0)+"%").attr("transform",t=>"translate("+d.centroid(t)+")").style("text-anchor","middle").attr("class","slice"),l.append("text").text(i.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText"),(e=l.selectAll(".legend").data(m.domain()).enter().append("g").attr("class","legend").attr("transform",(t,e)=>"translate(216,"+(22*e-22*m.domain().length/2)+")")).append("rect").attr("width",18).attr("height",18).style("fill",m).style("stroke",m),e.data(g).append("text").attr("x",22).attr("y",14).text(t=>{var{label:t,value:e}=t.data;return i.getShowData()?t+` [${e}]`:t}),t=512+(n=Math.max(...e.selectAll("text").nodes().map(t=>t?.getBoundingClientRect().width??0))),o.attr("viewBox",`0 0 ${t} 450`),Vc(o,450,t,s.useMaxWidth)},"draw"),kmt={draw:wmt}}),Amt={};oPt(Amt,{diagram:()=>Lmt});var Lmt,Nmt,Imt,Rmt,Mmt,Dmt=t(()=>{Cmt(),Emt(),_mt(),Smt(),Lmt={parser:ymt,db:fmt,renderer:kmt,styles:xmt}}),Omt=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,3],n=[1,4],i=[1,5],a=[1,6],s=[1,7],P=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],B=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],o=[55,56,57],F=[2,36],l=[1,37],c=[1,36],h=[1,38],u=[1,35],d=[1,43],p=[1,41],$=[1,14],z=[1,23],G=[1,18],U=[1,19],q=[1,20],j=[1,21],W=[1,22],Y=[1,24],H=[1,25],V=[1,26],X=[1,27],K=[1,28],Z=[1,29],g=[1,32],f=[1,33],m=[1,34],y=[1,39],v=[1,40],x=[1,42],b=[1,44],w=[1,62],k=[1,61],T=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],Q=[1,65],J=[1,66],tt=[1,67],et=[1,68],rt=[1,69],nt=[1,70],it=[1,71],at=[1,72],st=[1,73],ot=[1,74],lt=[1,75],ct=[1,76],E=[4,5,6,7,8,9,10,11,12,13,14,15,18],C=[1,90],_=[1,91],S=[1,92],A=[1,99],L=[1,93],N=[1,96],I=[1,94],R=[1,95],M=[1,97],D=[1,98],ht=[1,102],ut=[10,55,56,57],O=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],r={trace:me(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],[59,1],[59,1],[59,1]],performAction:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){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],n.addClass(a[o-2],a[o]);break;case 37:this.$=[];break;case 42:this.$=a[o].trim(),n.setDiagramTitle(this.$);break;case 43:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 44:case 45:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 46:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 47:n.addPoint(a[o-3],"",a[o-1],a[o],[]);break;case 48:n.addPoint(a[o-4],a[o-3],a[o-1],a[o],[]);break;case 49:n.addPoint(a[o-4],"",a[o-2],a[o-1],a[o]);break;case 50:n.addPoint(a[o-5],a[o-4],a[o-2],a[o-1],a[o]);break;case 51:n.setXAxisLeftText(a[o-2]),n.setXAxisRightText(a[o]);break;case 52:a[o-1].text+=" ⟶ ",n.setXAxisLeftText(a[o-1]);break;case 53:n.setXAxisLeftText(a[o]);break;case 54:n.setYAxisBottomText(a[o-2]),n.setYAxisTopText(a[o]);break;case 55:a[o-1].text+=" ⟶ ",n.setYAxisBottomText(a[o-1]);break;case 56:n.setYAxisBottomText(a[o]);break;case 57:n.setQuadrant1Text(a[o]);break;case 58:n.setQuadrant2Text(a[o]);break;case 59:n.setQuadrant3Text(a[o]);break;case 60:n.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:r,26:1,27:2,28:n,55:i,56:a,57:s},{1:[3]},{18:r,26:8,27:2,28:n,55:i,56:a,57:s},{18:r,26:9,27:2,28:n,55:i,56:a,57:s},e(P,[2,33],{29:10}),e(B,[2,61]),e(B,[2,62]),e(B,[2,63]),{1:[2,30]},{1:[2,31]},e(o,F,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:l,5:c,10:h,12:u,13:d,14:p,18:$,25:z,35:G,37:U,39:q,41:j,42:W,48:Y,50:H,51:V,52:X,53:K,54:Z,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),e(P,[2,34]),{27:45,55:i,56:a,57:s},e(o,[2,37]),e(o,F,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:l,5:c,10:h,12:u,13:d,14:p,18:$,25:z,35:G,37:U,39:q,41:j,42:W,48:Y,50:H,51:V,52:X,53:K,54:Z,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),e(o,[2,39]),e(o,[2,40]),e(o,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},e(o,[2,45]),e(o,[2,46]),{18:[1,50]},{4:l,5:c,10:h,12:u,13:d,14:p,43:51,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:52,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:53,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:54,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:55,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:56,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,44:[1,57],47:[1,58],58:60,59:59,63:m,64:y,65:v,66:x,67:b},e(T,[2,64]),e(T,[2,66]),e(T,[2,67]),e(T,[2,70]),e(T,[2,71]),e(T,[2,72]),e(T,[2,73]),e(T,[2,74]),e(T,[2,75]),e(T,[2,76]),e(T,[2,77]),e(T,[2,78]),e(T,[2,79]),e(T,[2,80]),e(P,[2,35]),e(o,[2,38]),e(o,[2,42]),e(o,[2,43]),e(o,[2,44]),{3:64,4:Q,5:J,6:tt,7:et,8:rt,9:nt,10:it,11:at,12:st,13:ot,14:lt,15:ct,21:63},e(o,[2,53],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,49:[1,77],63:m,64:y,65:v,66:x,67:b}),e(o,[2,56],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,49:[1,78],63:m,64:y,65:v,66:x,67:b}),e(o,[2,57],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),e(o,[2,58],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),e(o,[2,59],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),e(o,[2,60],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),{45:[1,79]},{44:[1,80]},e(T,[2,65]),e(T,[2,81]),e(T,[2,82]),e(T,[2,83]),{3:82,4:Q,5:J,6:tt,7:et,8:rt,9:nt,10:it,11:at,12:st,13:ot,14:lt,15:ct,18:[1,81]},e(E,[2,23]),e(E,[2,1]),e(E,[2,2]),e(E,[2,3]),e(E,[2,4]),e(E,[2,5]),e(E,[2,6]),e(E,[2,7]),e(E,[2,8]),e(E,[2,9]),e(E,[2,10]),e(E,[2,11]),e(E,[2,12]),e(o,[2,52],{58:31,43:83,4:l,5:c,10:h,12:u,13:d,14:p,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),e(o,[2,55],{58:31,43:84,4:l,5:c,10:h,12:u,13:d,14:p,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),{46:[1,85]},{45:[1,86]},{4:C,5:_,6:S,8:A,11:L,13:N,16:89,17:I,18:R,19:M,20:D,22:88,23:87},e(E,[2,24]),e(o,[2,51],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),e(o,[2,54],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),e(o,[2,47],{22:88,16:89,23:100,4:C,5:_,6:S,8:A,11:L,13:N,17:I,18:R,19:M,20:D}),{46:[1,101]},e(o,[2,29],{10:ht}),e(ut,[2,27],{16:103,4:C,5:_,6:S,8:A,11:L,13:N,17:I,18:R,19:M,20:D}),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(o,[2,49],{10:ht}),e(o,[2,48],{22:88,16:89,23:104,4:C,5:_,6:S,8:A,11:L,13:N,17:I,18:R,19:M,20:D}),{4:C,5:_,6:S,8:A,11:L,13:N,16:89,17:I,18:R,19:M,20:D,22:105},e(O,[2,26]),e(o,[2,50],{10:ht}),e(ut,[2,28],{16:103,4:C,5:_,6:S,8:A,11:L,13:N,17:I,18:R,19:M,20:D})],defaultActions:{8:[2,30],9:[2,31]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"{Zw(),mu(),t(),yye(),th(),KC(),Pye=mt(e=>(e=[...e.entries()].map(e=>({label:e[0],value:e[1]})).sort((e,t)=>t.value-e.value),t3().value(e=>e.value)(e)),"createPieArcs"),Bye=mt((e,t,r,n)=>{M.debug(`rendering pie chart +`+e);let i=n.db,a=D(),s=xC(i.getConfig(),a.pie),o=hye(t),l=o.append("g");l.attr("transform","translate(225,225)");var e=a.themeVariables,[n]=WC(e.pieOuterStrokeWidth);n??=2;let c=s.textPosition,h=Math.min(450,450)/2-40,u=F5().innerRadius(0).outerRadius(h),d=F5().innerRadius(h*c).outerRadius(h*c),p=(l.append("circle").attr("cx",0).attr("cy",0).attr("r",h+n/2).attr("class","pieOuterCircle"),i.getSections()),g=Pye(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=hx(f),y=(l.selectAll("mySlices").data(g).enter().append("path").attr("d",u).attr("fill",e=>m(e.data.label)).attr("class","pieCircle"),0);p.forEach(e=>{y+=e}),l.selectAll("mySlices").data(g).enter().append("text").text(e=>(e.data.value/y*100).toFixed(0)+"%").attr("transform",e=>"translate("+d.centroid(e)+")").style("text-anchor","middle").attr("class","slice"),l.append("text").text(i.getDiagramTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText"),(t=l.selectAll(".legend").data(m.domain()).enter().append("g").attr("class","legend").attr("transform",(e,t)=>"translate(216,"+(22*t-22*m.domain().length/2)+")")).append("rect").attr("width",18).attr("height",18).style("fill",m).style("stroke",m),t.data(g).append("text").attr("x",22).attr("y",14).text(e=>{var{label:e,value:t}=e.data;return i.getShowData()?e+` [${t}]`:e}),e=512+(n=Math.max(...t.selectAll("text").nodes().map(e=>e?.getBoundingClientRect().width??0))),o.attr("viewBox",`0 0 ${e} 450`),Vc(o,450,e,s.useMaxWidth)},"draw"),$ye={draw:Bye}}),jye={};JBe(jye,{diagram:()=>Wye});var Wye,Yye,Hye,Vye,Xye,Kye=e(()=>{Gye(),zye(),Uye(),qye(),Wye={parser:Mye,db:Iye,renderer:$ye,styles:Oye}}),Zye=e(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[1,3],n=[1,4],i=[1,5],a=[1,6],s=[1,7],P=[1,4,5,10,12,13,14,18,25,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],B=[1,4,5,10,12,13,14,18,25,28,35,37,39,41,42,48,50,51,52,53,54,55,56,57,60,61,63,64,65,66,67],o=[55,56,57],$=[2,36],l=[1,37],c=[1,36],h=[1,38],u=[1,35],d=[1,43],p=[1,41],F=[1,14],z=[1,23],G=[1,18],U=[1,19],q=[1,20],j=[1,21],W=[1,22],Y=[1,24],H=[1,25],V=[1,26],X=[1,27],K=[1,28],Z=[1,29],g=[1,32],f=[1,33],m=[1,34],y=[1,39],v=[1,40],x=[1,42],b=[1,44],w=[1,62],k=[1,61],T=[4,5,8,10,12,13,14,18,44,47,49,55,56,57,63,64,65,66,67],Q=[1,65],J=[1,66],ee=[1,67],te=[1,68],re=[1,69],ne=[1,70],ie=[1,71],ae=[1,72],se=[1,73],oe=[1,74],le=[1,75],ce=[1,76],E=[4,5,6,7,8,9,10,11,12,13,14,15,18],C=[1,90],S=[1,91],_=[1,92],A=[1,99],L=[1,93],N=[1,96],I=[1,94],R=[1,95],M=[1,97],D=[1,98],he=[1,102],ue=[10,55,56,57],O=[4,5,6,8,10,11,13,17,18,19,20,55,56,57],r={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],[59,1],[59,1],[59,1]],performAction:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){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],n.addClass(a[o-2],a[o]);break;case 37:this.$=[];break;case 42:this.$=a[o].trim(),n.setDiagramTitle(this.$);break;case 43:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 44:case 45:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 46:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 47:n.addPoint(a[o-3],"",a[o-1],a[o],[]);break;case 48:n.addPoint(a[o-4],a[o-3],a[o-1],a[o],[]);break;case 49:n.addPoint(a[o-4],"",a[o-2],a[o-1],a[o]);break;case 50:n.addPoint(a[o-5],a[o-4],a[o-2],a[o-1],a[o]);break;case 51:n.setXAxisLeftText(a[o-2]),n.setXAxisRightText(a[o]);break;case 52:a[o-1].text+=" ⟶ ",n.setXAxisLeftText(a[o-1]);break;case 53:n.setXAxisLeftText(a[o]);break;case 54:n.setYAxisBottomText(a[o-2]),n.setYAxisTopText(a[o]);break;case 55:a[o-1].text+=" ⟶ ",n.setYAxisBottomText(a[o-1]);break;case 56:n.setYAxisBottomText(a[o]);break;case 57:n.setQuadrant1Text(a[o]);break;case 58:n.setQuadrant2Text(a[o]);break;case 59:n.setQuadrant3Text(a[o]);break;case 60:n.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:r,26:1,27:2,28:n,55:i,56:a,57:s},{1:[3]},{18:r,26:8,27:2,28:n,55:i,56:a,57:s},{18:r,26:9,27:2,28:n,55:i,56:a,57:s},t(P,[2,33],{29:10}),t(B,[2,61]),t(B,[2,62]),t(B,[2,63]),{1:[2,30]},{1:[2,31]},t(o,$,{30:11,31:12,24:13,32:15,33:16,34:17,43:30,58:31,1:[2,32],4:l,5:c,10:h,12:u,13:d,14:p,18:F,25:z,35:G,37:U,39:q,41:j,42:W,48:Y,50:H,51:V,52:X,53:K,54:Z,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),t(P,[2,34]),{27:45,55:i,56:a,57:s},t(o,[2,37]),t(o,$,{24:13,32:15,33:16,34:17,43:30,58:31,31:46,4:l,5:c,10:h,12:u,13:d,14:p,18:F,25:z,35:G,37:U,39:q,41:j,42:W,48:Y,50:H,51:V,52:X,53:K,54:Z,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),t(o,[2,39]),t(o,[2,40]),t(o,[2,41]),{36:[1,47]},{38:[1,48]},{40:[1,49]},t(o,[2,45]),t(o,[2,46]),{18:[1,50]},{4:l,5:c,10:h,12:u,13:d,14:p,43:51,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:52,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:53,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:54,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:55,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,10:h,12:u,13:d,14:p,43:56,58:31,60:g,61:f,63:m,64:y,65:v,66:x,67:b},{4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,44:[1,57],47:[1,58],58:60,59:59,63:m,64:y,65:v,66:x,67:b},t(T,[2,64]),t(T,[2,66]),t(T,[2,67]),t(T,[2,70]),t(T,[2,71]),t(T,[2,72]),t(T,[2,73]),t(T,[2,74]),t(T,[2,75]),t(T,[2,76]),t(T,[2,77]),t(T,[2,78]),t(T,[2,79]),t(T,[2,80]),t(P,[2,35]),t(o,[2,38]),t(o,[2,42]),t(o,[2,43]),t(o,[2,44]),{3:64,4:Q,5:J,6:ee,7:te,8:re,9:ne,10:ie,11:ae,12:se,13:oe,14:le,15:ce,21:63},t(o,[2,53],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,49:[1,77],63:m,64:y,65:v,66:x,67:b}),t(o,[2,56],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,49:[1,78],63:m,64:y,65:v,66:x,67:b}),t(o,[2,57],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),t(o,[2,58],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),t(o,[2,59],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),t(o,[2,60],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),{45:[1,79]},{44:[1,80]},t(T,[2,65]),t(T,[2,81]),t(T,[2,82]),t(T,[2,83]),{3:82,4:Q,5:J,6:ee,7:te,8:re,9:ne,10:ie,11:ae,12:se,13:oe,14:le,15:ce,18:[1,81]},t(E,[2,23]),t(E,[2,1]),t(E,[2,2]),t(E,[2,3]),t(E,[2,4]),t(E,[2,5]),t(E,[2,6]),t(E,[2,7]),t(E,[2,8]),t(E,[2,9]),t(E,[2,10]),t(E,[2,11]),t(E,[2,12]),t(o,[2,52],{58:31,43:83,4:l,5:c,10:h,12:u,13:d,14:p,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),t(o,[2,55],{58:31,43:84,4:l,5:c,10:h,12:u,13:d,14:p,60:g,61:f,63:m,64:y,65:v,66:x,67:b}),{46:[1,85]},{45:[1,86]},{4:C,5:S,6:_,8:A,11:L,13:N,16:89,17:I,18:R,19:M,20:D,22:88,23:87},t(E,[2,24]),t(o,[2,51],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),t(o,[2,54],{59:59,58:60,4:l,5:c,8:w,10:h,12:u,13:d,14:p,18:k,63:m,64:y,65:v,66:x,67:b}),t(o,[2,47],{22:88,16:89,23:100,4:C,5:S,6:_,8:A,11:L,13:N,17:I,18:R,19:M,20:D}),{46:[1,101]},t(o,[2,29],{10:he}),t(ue,[2,27],{16:103,4:C,5:S,6:_,8:A,11:L,13:N,17:I,18:R,19:M,20:D}),t(O,[2,25]),t(O,[2,13]),t(O,[2,14]),t(O,[2,15]),t(O,[2,16]),t(O,[2,17]),t(O,[2,18]),t(O,[2,19]),t(O,[2,20]),t(O,[2,21]),t(O,[2,22]),t(o,[2,49],{10:he}),t(o,[2,48],{22:88,16:89,23:104,4:C,5:S,6:_,8:A,11:L,13:N,17:I,18:R,19:M,20:D}),{4:C,5:S,6:_,8:A,11:L,13:N,16:89,17:I,18:R,19:M,20:D,22:105},t(O,[2,26]),t(o,[2,50],{10:he}),t(ue,[2,28],{16:103,4:C,5:S,6:_,8:A,11:L,13:N,17:I,18:R,19:M,20:D})],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,n=[0],i=[],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"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(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,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};r.lexer=n,me(t,"Parser"),(Nmt=new((t.prototype=r).Parser=t)).parser=Nmt,Imt=Nmt}),Pmt=t(()=>{Q3(),An(),e(),Tn(),Rmt=or(),Mmt=class{constructor(){this.classes=new Map,this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData()}static{me(this,"QuadrantBuilder")}getDefaultData(){return{titleText:"",quadrant1Text:"",quadrant2Text:"",quadrant3Text:"",quadrant4Text:"",xAxisLeftText:"",xAxisRightText:"",yAxisBottomText:"",yAxisTopText:"",points:[]}}getDefaultConfig(){return{showXAxis:!0,showYAxis:!0,showTitle:!0,chartHeight:yr.quadrantChart?.chartWidth||500,chartWidth:yr.quadrantChart?.chartHeight||500,titlePadding:yr.quadrantChart?.titlePadding||10,titleFontSize:yr.quadrantChart?.titleFontSize||20,quadrantPadding:yr.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:yr.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:yr.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:yr.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:yr.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:yr.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:yr.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:yr.quadrantChart?.pointTextPadding||5,pointLabelFontSize:yr.quadrantChart?.pointLabelFontSize||12,pointRadius:yr.quadrantChart?.pointRadius||5,xAxisPosition:yr.quadrantChart?.xAxisPosition||"top",yAxisPosition:yr.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:yr.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:yr.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:Rmt.quadrant1Fill,quadrant2Fill:Rmt.quadrant2Fill,quadrant3Fill:Rmt.quadrant3Fill,quadrant4Fill:Rmt.quadrant4Fill,quadrant1TextFill:Rmt.quadrant1TextFill,quadrant2TextFill:Rmt.quadrant2TextFill,quadrant3TextFill:Rmt.quadrant3TextFill,quadrant4TextFill:Rmt.quadrant4TextFill,quadrantPointFill:Rmt.quadrantPointFill,quadrantPointTextFill:Rmt.quadrantPointTextFill,quadrantXAxisTextFill:Rmt.quadrantXAxisTextFill,quadrantYAxisTextFill:Rmt.quadrantYAxisTextFill,quadrantTitleFill:Rmt.quadrantTitleFill,quadrantInternalBorderStrokeFill:Rmt.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:Rmt.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,M.info("clear called")}setData(t){this.data={...this.data,...t}}addPoints(t){this.data.points=[...t,...this.data.points]}addClass(t,e){this.classes.set(t,e)}setConfig(t){M.trace("setConfig called with: ",t),this.config={...this.config,...t}}setThemeConfig(t){M.trace("setThemeConfig called with: ",t),this.themeConfig={...this.themeConfig,...t}}calculateSpace(t,e,r,n){var i=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,t={top:"top"===t&&e?i:0,bottom:"bottom"===t&&e?i:0},e=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,i={left:"left"===this.config.yAxisPosition&&r?e:0,right:"right"===this.config.yAxisPosition&&r?e:0},r=this.config.titleFontSize+2*this.config.titlePadding,e={top:n?r:0},n=this.config.quadrantPadding+i.left,r=this.config.quadrantPadding+t.top+e.top,a=this.config.chartWidth-2*this.config.quadrantPadding-i.left-i.right,s=this.config.chartHeight-2*this.config.quadrantPadding-t.top-t.bottom-e.top;return{xAxisSpace:t,yAxisSpace:i,titleSpace:e,quadrantSpace:{quadrantLeft:n,quadrantTop:r,quadrantWidth:a,quadrantHalfWidth:a/2,quadrantHeight:s,quadrantHalfHeight:s/2}}}getAxisLabels(t,e,r,n){var{quadrantSpace:n,titleSpace:i}=n,{quadrantHalfHeight:n,quadrantHeight:a,quadrantLeft:s,quadrantHalfWidth:o,quadrantTop:l,quadrantWidth:c}=n,h=!!this.data.xAxisRightText,u=!!this.data.yAxisTopText,d=[];return this.data.xAxisLeftText&&e&&d.push({text:this.data.xAxisLeftText,fill:this.themeConfig.quadrantXAxisTextFill,x:s+(h?o/2:0),y:"top"===t?this.config.xAxisLabelPadding+i.top:this.config.xAxisLabelPadding+l+a+this.config.quadrantPadding,fontSize:this.config.xAxisLabelFontSize,verticalPos:h?"center":"left",horizontalPos:"top",rotation:0}),this.data.xAxisRightText&&e&&d.push({text:this.data.xAxisRightText,fill:this.themeConfig.quadrantXAxisTextFill,x:s+o+(h?o/2:0),y:"top"===t?this.config.xAxisLabelPadding+i.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?n/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+n-(u?n/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:-90}),d}getQuadrants(t){var e,{quadrantHalfHeight:t,quadrantLeft:r,quadrantHalfWidth:n,quadrantTop:i}=t=t.quadrantSpace;for(e 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+n,y:i,width:n,height:t,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:i,width:n,height:t,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:i+t,width:n,height:t,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+n,y:i+t,width:n,height:t,fill:this.themeConfig.quadrant4Fill}])e.text.x=e.x+e.width/2,0===this.data.points.length?(e.text.y=e.y+e.height/2,e.text.horizontalPos="middle"):(e.text.y=e.y+this.config.quadrantTextTopPadding,e.text.horizontalPos="top");return r}getQuadrantPoints(t){let e=t.quadrantSpace,{quadrantHeight:r,quadrantLeft:n,quadrantTop:i,quadrantWidth:a}=e,s=Mv().domain([0,1]).range([n,a+n]),o=Mv().domain([0,1]).range([r+i,i]);return this.data.points.map(t=>{var e=this.classes.get(t.className);return e&&(t={...e,...t}),{x:s(t.x),y:o(t.y),fill:t.color??this.themeConfig.quadrantPointFill,radius:t.radius??this.config.pointRadius,text:{text:t.text,fill:this.themeConfig.quadrantPointTextFill,x:s(t.x),y:o(t.y)+this.config.pointTextPadding,verticalPos:"center",horizontalPos:"top",fontSize:this.config.pointLabelFontSize,rotation:0},strokeColor:t.strokeColor??this.themeConfig.quadrantPointFill,strokeWidth:t.strokeWidth??"0px"}})}getBorders(t){var e=this.config.quadrantExternalBorderStrokeWidth/2,{quadrantHalfHeight:t,quadrantHeight:r,quadrantLeft:n,quadrantHalfWidth:i,quadrantTop:a,quadrantWidth:s}=t=t.quadrantSpace;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n-e,y1:a,x2:n+s+e,y2:a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n+s,y1:a+e,x2:n+s,y2:a+r-e},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n-e,y1:a+r,x2:n+s+e,y2:a+r},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n,y1:a+e,x2:n,y2:a+r-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:n+i,y1:a+e,x2:n+i,y2:a+r-e},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:n+e,y1:a+t,x2:n+s-e,y2:a+t}]}getTitle(t){if(t)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 t=this.config.showXAxis&&!(!this.data.xAxisLeftText&&!this.data.xAxisRightText),e=this.config.showYAxis&&!(!this.data.yAxisTopText&&!this.data.yAxisBottomText),r=this.config.showTitle&&!!this.data.titleText,n=0{zmt=class extends Error{static{me(this,"InvalidStyleError")}constructor(t,e,r){super(`value for ${t} ${e} is invalid, please use a valid `+r),this.name="InvalidStyleError"}},me(Bmt,"validateHexCode"),me(Fmt,"validateNumber"),me($mt,"validateSizeInPixels")});function Umt(t){return Sc(t.trim(),nyt)}function qmt(t){iyt.setData({quadrant1Text:Umt(t.text)})}function jmt(t){iyt.setData({quadrant2Text:Umt(t.text)})}function Wmt(t){iyt.setData({quadrant3Text:Umt(t.text)})}function Ymt(t){iyt.setData({quadrant4Text:Umt(t.text)})}function Hmt(t){iyt.setData({xAxisLeftText:Umt(t.text)})}function Vmt(t){iyt.setData({xAxisRightText:Umt(t.text)})}function Xmt(t){iyt.setData({yAxisTopText:Umt(t.text)})}function Kmt(t){iyt.setData({yAxisBottomText:Umt(t.text)})}function Zmt(t){var e,r={};for(e of t){var[n,i]=e.trim().split(/\s*:\s*/);if("radius"===n){if(Fmt(i))throw new zmt(n,i,"number");r.radius=parseInt(i)}else if("color"===n){if(Bmt(i))throw new zmt(n,i,"hex code");r.color=i}else if("stroke-color"===n){if(Bmt(i))throw new zmt(n,i,"hex code");r.strokeColor=i}else{if("stroke-width"!==n)throw new Error(`style named ${n} is not supported.`);if($mt(i))throw new zmt(n,i,"number of pixels (eg. 10px)");r.strokeWidth=i}}return r}function Qmt(t,e,r,n,i){i=Zmt(i),iyt.addPoints([{x:r,y:n,text:Umt(t.text),className:e,...i}])}function Jmt(t,e){iyt.addClass(t,Zmt(e))}function tyt(t){iyt.setConfig({chartWidth:t})}function eyt(t){iyt.setConfig({chartHeight:t})}function ryt(){var{themeVariables:t,quadrantChart:e}=D();return e&&iyt.setConfig(e),iyt.setThemeConfig({quadrant1Fill:t.quadrant1Fill,quadrant2Fill:t.quadrant2Fill,quadrant3Fill:t.quadrant3Fill,quadrant4Fill:t.quadrant4Fill,quadrant1TextFill:t.quadrant1TextFill,quadrant2TextFill:t.quadrant2TextFill,quadrant3TextFill:t.quadrant3TextFill,quadrant4TextFill:t.quadrant4TextFill,quadrantPointFill:t.quadrantPointFill,quadrantPointTextFill:t.quadrantPointTextFill,quadrantXAxisTextFill:t.quadrantXAxisTextFill,quadrantYAxisTextFill:t.quadrantYAxisTextFill,quadrantExternalBorderStrokeFill:t.quadrantExternalBorderStrokeFill,quadrantInternalBorderStrokeFill:t.quadrantInternalBorderStrokeFill,quadrantTitleFill:t.quadrantTitleFill}),iyt.setData({titleText:gh()}),iyt.build()}var nyt,iyt,ayt,syt,oyt,lyt,cyt=t(()=>{mu(),th(),fu(),Pmt(),Gmt(),nyt=D(),me(Umt,"textSanitizer"),iyt=new Mmt,me(qmt,"setQuadrant1Text"),me(jmt,"setQuadrant2Text"),me(Wmt,"setQuadrant3Text"),me(Ymt,"setQuadrant4Text"),me(Hmt,"setXAxisLeftText"),me(Vmt,"setXAxisRightText"),me(Xmt,"setYAxisTopText"),me(Kmt,"setYAxisBottomText"),me(Zmt,"parseStyles"),me(Qmt,"addPoint"),me(Jmt,"addClass"),me(tyt,"setWidth"),me(eyt,"setHeight"),me(ryt,"getQuadrantData"),ayt=me(function(){iyt.clear(),lh()},"clear"),syt={setWidth:tyt,setHeight:eyt,setQuadrant1Text:qmt,setQuadrant2Text:jmt,setQuadrant3Text:Wmt,setQuadrant4Text:Ymt,setXAxisLeftText:Hmt,setXAxisRightText:Vmt,setYAxisTopText:Xmt,setYAxisBottomText:Kmt,parseStyles:Zmt,addPoint:Qmt,addClass:Jmt,getQuadrantData:ryt,clear:ayt,setAccTitle:ch,getAccTitle:hh,setDiagramTitle:ph,getDiagramTitle:gh,getAccDescription:dh,setAccDescription:uh}}),hyt=t(()=>{Q3(),mu(),e(),eh(),oyt=me((t,e,r,n)=>{function i(t){return"top"===t?"hanging":"middle"}function a(t){return"left"===t?"start":"middle"}function s(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}me(i,"getDominantBaseLine"),me(a,"getTextAnchor"),me(s,"getTransformation");var o=D();M.debug(`Rendering quadrant chart -`+t);let l=o.securityLevel,c;"sandbox"===l&&(c=H("#i"+e));var e=(t=H("sandbox"===l?c.nodes()[0].contentDocument.body:"body").select(`[id="${e}"]`)).append("g").attr("class","main"),h=o.quadrantChart?.chartWidth??500,u=o.quadrantChart?.chartHeight??500,o=(Vc(t,u,h,o.quadrantChart?.useMaxWidth??!0),t.attr("viewBox","0 0 "+h+" "+u),n.db.setHeight(u),n.db.setWidth(h),n.db.getQuadrantData()),t=e.append("g").attr("class","quadrants"),u=e.append("g").attr("class","border"),h=e.append("g").attr("class","data-points"),n=e.append("g").attr("class","labels"),e=e.append("g").attr("class","title");o.title&&e.append("text").attr("x",0).attr("y",0).attr("fill",o.title.fill).attr("font-size",o.title.fontSize).attr("dominant-baseline",i(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",t=>t.x1).attr("y1",t=>t.y1).attr("x2",t=>t.x2).attr("y2",t=>t.y2).style("stroke",t=>t.strokeFill).style("stroke-width",t=>t.strokeWidth),(e=t.selectAll("g.quadrant").data(o.quadrants).enter().append("g").attr("class","quadrant")).append("rect").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill),e.append("text").attr("x",0).attr("y",0).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>i(t.text.horizontalPos)).attr("text-anchor",t=>a(t.text.verticalPos)).attr("transform",t=>s(t.text)).text(t=>t.text.text),n.selectAll("g.label").data(o.axisLabels).enter().append("g").attr("class","label").append("text").attr("x",0).attr("y",0).text(t=>t.text).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>i(t.horizontalPos)).attr("text-anchor",t=>a(t.verticalPos)).attr("transform",t=>s(t)),(u=h.selectAll("g.data-point").data(o.points).enter().append("g").attr("class","data-point")).append("circle").attr("cx",t=>t.x).attr("cy",t=>t.y).attr("r",t=>t.radius).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeColor).attr("stroke-width",t=>t.strokeWidth),u.append("text").attr("x",0).attr("y",0).text(t=>t.text.text).attr("fill",t=>t.text.fill).attr("font-size",t=>t.text.fontSize).attr("dominant-baseline",t=>i(t.text.horizontalPos)).attr("text-anchor",t=>a(t.text.verticalPos)).attr("transform",t=>s(t.text))},"draw"),lyt={draw:oyt}}),uyt={};oPt(uyt,{diagram:()=>dyt});var dyt,pyt,gyt,fyt=t(()=>{Omt(),cyt(),hyt(),dyt={parser:Imt,db:syt,renderer:lyt,styles:me(()=>"","styles")}}),myt=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,10,12,14,16,18,19,21,23],n=[2,6],i=[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],x=[1,36],b=[1,37],w=[1,43],k=[1,42],T=[1,47],E=[1,50],C=[1,10,12,14,16,18,19,21,23,34,35,36],_=[1,10,12,14,16,18,19,21,23,24,26,27,28,34,35,36],S=[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],n={trace:me(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:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 5:n.setOrientation(a[o]);break;case 9:n.setDiagramTitle(a[o].text.trim());break;case 12:n.setLineData({text:"",type:"text"},a[o]);break;case 13:n.setLineData(a[o-1],a[o]);break;case 14:n.setBarData({text:"",type:"text"},a[o]);break;case 15:n.setBarData(a[o-1],a[o]);break;case 16:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 17:case 18:this.$=a[o].trim(),n.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:n.setXAxisTitle(a[o]);break;case 23:n.setXAxisTitle(a[o-1]);break;case 24:n.setXAxisTitle({type:"text",text:""});break;case 25:n.setXAxisBand(a[o]);break;case 26:n.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:n.setYAxisTitle(a[o]);break;case 31:n.setYAxisTitle(a[o-1]);break;case 32:n.setYAxisTitle({type:"text",text:""});break;case 33:n.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:[e(r,n,{3:1,4:2,7:4,5:i,34:a,35:s,36:o}),{1:[3]},e(r,n,{4:2,7:4,3:8,5:i,34:a,35:s,36:o}),e(r,n,{4:2,7:4,6:9,3:10,5:i,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]},e(l,[2,34]),e(l,[2,35]),e(l,[2,36]),{1:[2,1]},e(r,n,{4:2,7:4,3:21,5:i,34:a,35:s,36:o}),{1:[2,3]},e(l,[2,5]),e(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:x,50:b},{11:39,13:38,24:w,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:x,50:b},{11:45,15:44,27:T,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:x,50:b},{11:49,17:48,24:E,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:x,50:b},{11:52,17:51,24:E,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:x,50:b},{20:[1,53]},{22:[1,54]},e(C,[2,18]),{1:[2,2]},e(C,[2,8]),e(C,[2,9]),e(_,[2,37],{40:55,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b}),e(_,[2,38]),e(_,[2,39]),e(S,[2,40]),e(S,[2,42]),e(S,[2,43]),e(S,[2,44]),e(S,[2,45]),e(S,[2,46]),e(S,[2,47]),e(S,[2,48]),e(S,[2,49]),e(S,[2,50]),e(S,[2,51]),e(C,[2,10]),e(C,[2,22],{30:41,29:56,24:w,27:k}),e(C,[2,24]),e(C,[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:x,50:b},e(C,[2,11]),e(C,[2,30],{33:60,27:T}),e(C,[2,32]),{31:[1,61]},e(C,[2,12]),{17:62,24:E},{25:63,27:A},e(C,[2,14]),{17:65,24:E},e(C,[2,16]),e(C,[2,17]),e(S,[2,41]),e(C,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},e(C,[2,31]),{27:[1,69]},e(C,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},e(C,[2,15]),e(C,[2,26]),e(C,[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:x,50:b},e(C,[2,33]),e(C,[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:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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,/^(?::)/i,/^(?:\+)/i,/^(?:,)/i,/^(?:=)/i,/^(?:=)/i,/^(?:\*)/i,/^(?:#)/i,/^(?:[\_])/i,/^(?:\.)/i,/^(?:&)/i,/^(?:-)/i,/^(?:[0-9]+)/i,/^(?:\s)/i,/^(?:;)/i,/^(?:[!"#$%&'*+,-.`?\\_/])/i,/^(?:$)/i],conditions:{class_name:{rules:[28],inclusive:!1},point_y:{rules:[33],inclusive:!1},point_x:{rules:[32],inclusive:!1},point_start:{rules:[30,31],inclusive:!1},acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},title:{rules:[5],inclusive:!1},md_string:{rules:[22,23],inclusive:!1},string:{rules:[25,26],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,6,8,10,13,14,15,16,17,18,19,20,21,24,27,29,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51],inclusive:!0}}};r.lexer=n,mt(e,"Parser"),(Yye=new((e.prototype=r).Parser=e)).parser=Yye,Hye=Yye}),Qye=e(()=>{Zw(),An(),t(),Tn(),Vye=or(),Xye=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:yr.quadrantChart?.chartWidth||500,chartWidth:yr.quadrantChart?.chartHeight||500,titlePadding:yr.quadrantChart?.titlePadding||10,titleFontSize:yr.quadrantChart?.titleFontSize||20,quadrantPadding:yr.quadrantChart?.quadrantPadding||5,xAxisLabelPadding:yr.quadrantChart?.xAxisLabelPadding||5,yAxisLabelPadding:yr.quadrantChart?.yAxisLabelPadding||5,xAxisLabelFontSize:yr.quadrantChart?.xAxisLabelFontSize||16,yAxisLabelFontSize:yr.quadrantChart?.yAxisLabelFontSize||16,quadrantLabelFontSize:yr.quadrantChart?.quadrantLabelFontSize||16,quadrantTextTopPadding:yr.quadrantChart?.quadrantTextTopPadding||5,pointTextPadding:yr.quadrantChart?.pointTextPadding||5,pointLabelFontSize:yr.quadrantChart?.pointLabelFontSize||12,pointRadius:yr.quadrantChart?.pointRadius||5,xAxisPosition:yr.quadrantChart?.xAxisPosition||"top",yAxisPosition:yr.quadrantChart?.yAxisPosition||"left",quadrantInternalBorderStrokeWidth:yr.quadrantChart?.quadrantInternalBorderStrokeWidth||1,quadrantExternalBorderStrokeWidth:yr.quadrantChart?.quadrantExternalBorderStrokeWidth||2}}getDefaultThemeConfig(){return{quadrant1Fill:Vye.quadrant1Fill,quadrant2Fill:Vye.quadrant2Fill,quadrant3Fill:Vye.quadrant3Fill,quadrant4Fill:Vye.quadrant4Fill,quadrant1TextFill:Vye.quadrant1TextFill,quadrant2TextFill:Vye.quadrant2TextFill,quadrant3TextFill:Vye.quadrant3TextFill,quadrant4TextFill:Vye.quadrant4TextFill,quadrantPointFill:Vye.quadrantPointFill,quadrantPointTextFill:Vye.quadrantPointTextFill,quadrantXAxisTextFill:Vye.quadrantXAxisTextFill,quadrantYAxisTextFill:Vye.quadrantYAxisTextFill,quadrantTitleFill:Vye.quadrantTitleFill,quadrantInternalBorderStrokeFill:Vye.quadrantInternalBorderStrokeFill,quadrantExternalBorderStrokeFill:Vye.quadrantExternalBorderStrokeFill}}clear(){this.config=this.getDefaultConfig(),this.themeConfig=this.getDefaultThemeConfig(),this.data=this.getDefaultData(),this.classes=new Map,M.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){M.trace("setConfig called with: ",e),this.config={...this.config,...e}}setThemeConfig(e){M.trace("setThemeConfig called with: ",e),this.themeConfig={...this.themeConfig,...e}}calculateSpace(e,t,r,n){var i=2*this.config.xAxisLabelPadding+this.config.xAxisLabelFontSize,e={top:"top"===e&&t?i:0,bottom:"bottom"===e&&t?i:0},t=2*this.config.yAxisLabelPadding+this.config.yAxisLabelFontSize,i={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:n?r:0},n=this.config.quadrantPadding+i.left,r=this.config.quadrantPadding+e.top+t.top,a=this.config.chartWidth-2*this.config.quadrantPadding-i.left-i.right,s=this.config.chartHeight-2*this.config.quadrantPadding-e.top-e.bottom-t.top;return{xAxisSpace:e,yAxisSpace:i,titleSpace:t,quadrantSpace:{quadrantLeft:n,quadrantTop:r,quadrantWidth:a,quadrantHalfWidth:a/2,quadrantHeight:s,quadrantHalfHeight:s/2}}}getAxisLabels(e,t,r,n){var{quadrantSpace:n,titleSpace:i}=n,{quadrantHalfHeight:n,quadrantHeight:a,quadrantLeft:s,quadrantHalfWidth:o,quadrantTop:l,quadrantWidth:c}=n,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+i.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+i.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?n/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+n-(u?n/2:0),fontSize:this.config.yAxisLabelFontSize,verticalPos:u?"center":"left",horizontalPos:"top",rotation:-90}),d}getQuadrants(e){var t,{quadrantHalfHeight:e,quadrantLeft:r,quadrantHalfWidth:n,quadrantTop:i}=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+n,y:i,width:n,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:i,width:n,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:i+e,width:n,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+n,y:i+e,width:n,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:n,quadrantTop:i,quadrantWidth:a}=t,s=Rx().domain([0,1]).range([n,a+n]),o=Rx().domain([0,1]).range([r+i,i]);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:n,quadrantHalfWidth:i,quadrantTop:a,quadrantWidth:s}=e=e.quadrantSpace;return[{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n-t,y1:a,x2:n+s+t,y2:a},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n+s,y1:a+t,x2:n+s,y2:a+r-t},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n-t,y1:a+r,x2:n+s+t,y2:a+r},{strokeFill:this.themeConfig.quadrantExternalBorderStrokeFill,strokeWidth:this.config.quadrantExternalBorderStrokeWidth,x1:n,y1:a+t,x2:n,y2:a+r-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:n+i,y1:a+t,x2:n+i,y2:a+r-t},{strokeFill:this.themeConfig.quadrantInternalBorderStrokeFill,strokeWidth:this.config.quadrantInternalBorderStrokeWidth,x1:n+t,y1:a+e,x2:n+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,n=0{r2e=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(Jye,"validateHexCode"),mt(e2e,"validateNumber"),mt(t2e,"validateSizeInPixels")});function i2e(e){return _c(e.trim(),x2e)}function a2e(e){b2e.setData({quadrant1Text:i2e(e.text)})}function s2e(e){b2e.setData({quadrant2Text:i2e(e.text)})}function o2e(e){b2e.setData({quadrant3Text:i2e(e.text)})}function l2e(e){b2e.setData({quadrant4Text:i2e(e.text)})}function c2e(e){b2e.setData({xAxisLeftText:i2e(e.text)})}function h2e(e){b2e.setData({xAxisRightText:i2e(e.text)})}function u2e(e){b2e.setData({yAxisTopText:i2e(e.text)})}function d2e(e){b2e.setData({yAxisBottomText:i2e(e.text)})}function p2e(e){var t,r={};for(t of e){var[n,i]=t.trim().split(/\s*:\s*/);if("radius"===n){if(e2e(i))throw new r2e(n,i,"number");r.radius=parseInt(i)}else if("color"===n){if(Jye(i))throw new r2e(n,i,"hex code");r.color=i}else if("stroke-color"===n){if(Jye(i))throw new r2e(n,i,"hex code");r.strokeColor=i}else{if("stroke-width"!==n)throw new Error(`style named ${n} is not supported.`);if(t2e(i))throw new r2e(n,i,"number of pixels (eg. 10px)");r.strokeWidth=i}}return r}function g2e(e,t,r,n,i){i=p2e(i),b2e.addPoints([{x:r,y:n,text:i2e(e.text),className:t,...i}])}function f2e(e,t){b2e.addClass(e,p2e(t))}function m2e(e){b2e.setConfig({chartWidth:e})}function y2e(e){b2e.setConfig({chartHeight:e})}function v2e(){var{themeVariables:e,quadrantChart:t}=D();return t&&b2e.setConfig(t),b2e.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}),b2e.setData({titleText:gh()}),b2e.build()}var x2e,b2e,w2e,k2e,T2e,E2e,C2e=e(()=>{mu(),eh(),fu(),Qye(),n2e(),x2e=D(),mt(i2e,"textSanitizer"),b2e=new Xye,mt(a2e,"setQuadrant1Text"),mt(s2e,"setQuadrant2Text"),mt(o2e,"setQuadrant3Text"),mt(l2e,"setQuadrant4Text"),mt(c2e,"setXAxisLeftText"),mt(h2e,"setXAxisRightText"),mt(u2e,"setYAxisTopText"),mt(d2e,"setYAxisBottomText"),mt(p2e,"parseStyles"),mt(g2e,"addPoint"),mt(f2e,"addClass"),mt(m2e,"setWidth"),mt(y2e,"setHeight"),mt(v2e,"getQuadrantData"),w2e=mt(function(){b2e.clear(),lh()},"clear"),k2e={setWidth:m2e,setHeight:y2e,setQuadrant1Text:a2e,setQuadrant2Text:s2e,setQuadrant3Text:o2e,setQuadrant4Text:l2e,setXAxisLeftText:c2e,setXAxisRightText:h2e,setYAxisTopText:u2e,setYAxisBottomText:d2e,parseStyles:p2e,addPoint:g2e,addClass:f2e,getQuadrantData:v2e,clear:w2e,setAccTitle:ch,getAccTitle:hh,setDiagramTitle:ph,getDiagramTitle:gh,getAccDescription:dh,setAccDescription:uh}}),S2e=e(()=>{Zw(),mu(),t(),th(),T2e=mt((e,t,r,n)=>{function i(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(i,"getDominantBaseLine"),mt(a,"getTextAnchor"),mt(s,"getTransformation");var o=D();M.debug(`Rendering quadrant chart +`+e);let l=o.securityLevel,c;"sandbox"===l&&(c=H("#i"+t));var t=(e=H("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=(Vc(e,u,h,o.quadrantChart?.useMaxWidth??!0),e.attr("viewBox","0 0 "+h+" "+u),n.db.setHeight(u),n.db.setWidth(h),n.db.getQuadrantData()),e=t.append("g").attr("class","quadrants"),u=t.append("g").attr("class","border"),h=t.append("g").attr("class","data-points"),n=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",i(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=>i(e.text.horizontalPos)).attr("text-anchor",e=>a(e.text.verticalPos)).attr("transform",e=>s(e.text)).text(e=>e.text.text),n.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=>i(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=>i(e.text.horizontalPos)).attr("text-anchor",e=>a(e.text.verticalPos)).attr("transform",e=>s(e.text))},"draw"),E2e={draw:T2e}}),_2e={};JBe(_2e,{diagram:()=>A2e});var A2e,L2e,N2e,I2e=e(()=>{Zye(),C2e(),S2e(),A2e={parser:Hye,db:k2e,renderer:E2e,styles:mt(()=>"","styles")}}),R2e=e(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[1,10,12,14,16,18,19,21,23],n=[2,6],i=[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],x=[1,36],b=[1,37],w=[1,43],k=[1,42],T=[1,47],E=[1,50],C=[1,10,12,14,16,18,19,21,23,34,35,36],S=[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],n={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,n,i,a,s){var o=a.length-1;switch(i){case 5:n.setOrientation(a[o]);break;case 9:n.setDiagramTitle(a[o].text.trim());break;case 12:n.setLineData({text:"",type:"text"},a[o]);break;case 13:n.setLineData(a[o-1],a[o]);break;case 14:n.setBarData({text:"",type:"text"},a[o]);break;case 15:n.setBarData(a[o-1],a[o]);break;case 16:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 17:case 18:this.$=a[o].trim(),n.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:n.setXAxisTitle(a[o]);break;case 23:n.setXAxisTitle(a[o-1]);break;case 24:n.setXAxisTitle({type:"text",text:""});break;case 25:n.setXAxisBand(a[o]);break;case 26:n.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:n.setYAxisTitle(a[o]);break;case 31:n.setYAxisTitle(a[o-1]);break;case 32:n.setYAxisTitle({type:"text",text:""});break;case 33:n.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,n,{3:1,4:2,7:4,5:i,34:a,35:s,36:o}),{1:[3]},t(r,n,{4:2,7:4,3:8,5:i,34:a,35:s,36:o}),t(r,n,{4:2,7:4,6:9,3:10,5:i,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,n,{4:2,7:4,3:21,5:i,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:x,50:b},{11:39,13:38,24:w,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:x,50:b},{11:45,15:44,27:T,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:x,50:b},{11:49,17:48,24:E,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:x,50:b},{11:52,17:51,24:E,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:x,50:b},{20:[1,53]},{22:[1,54]},t(C,[2,18]),{1:[2,2]},t(C,[2,8]),t(C,[2,9]),t(S,[2,37],{40:55,41:u,42:d,43:p,44:g,45:f,46:m,47:y,48:v,49:x,50:b}),t(S,[2,38]),t(S,[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(C,[2,10]),t(C,[2,22],{30:41,29:56,24:w,27:k}),t(C,[2,24]),t(C,[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:x,50:b},t(C,[2,11]),t(C,[2,30],{33:60,27:T}),t(C,[2,32]),{31:[1,61]},t(C,[2,12]),{17:62,24:E},{25:63,27:A},t(C,[2,14]),{17:65,24:E},t(C,[2,16]),t(C,[2,17]),t(_,[2,41]),t(C,[2,23]),{27:[1,66]},{26:[1,67]},{26:[2,29],28:[1,68]},t(C,[2,31]),{27:[1,69]},t(C,[2,13]),{26:[1,70]},{26:[2,21],28:[1,71]},t(C,[2,15]),t(C,[2,26]),t(C,[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:x,50:b},t(C,[2,33]),t(C,[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,n=[0],i=[],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"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(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,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}};n.lexer=i,me(t,"Parser"),(pyt=new((t.prototype=n).Parser=t)).parser=pyt,gyt=pyt});function yyt(t){return"bar"===t.type}function vyt(t){return"band"===t.type}function xyt(t){return"linear"===t.type}var byt,wyt,kyt,Tyt,Eyt=t(()=>{me(yyt,"isBarPlot"),me(vyt,"isBandAxisData"),me(xyt,"isLinearAxisData")}),Cyt=t(()=>{Y9(),byt=class{constructor(t){this.parentGroup=t}static{me(this,"TextDimensionCalculatorWithFont")}getMaxDimension(t,e){if(!this.parentGroup)return{width:t.reduce((t,e)=>Math.max(e.length,t),0)*e,height:e};var r,n={width:0,height:0},i=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",e);for(r of t){var a=(s=G9(i,1,r))?s.width:r.length*e,s=s?s.height:e;n.width=Math.max(n.width,a),n.height=Math.max(n.height,s)}return i.remove(),n}}}),_yt=t(()=>{wyt=class{constructor(t,e,r,n){this.axisConfig=t,this.title=e,this.textDimensionCalculator=r,this.axisThemeConfig=n,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{me(this,"BaseAxis")}setRange(t){this.range=t,"left"===this.axisPosition||"right"===this.axisPosition?this.boundingRect.height=t[1]-t[0]:this.boundingRect.width=t[1]-t[0],this.recalculateScale()}getRange(){return[this.range[0]+this.outerPadding,this.range[1]-this.outerPadding]}setAxisPosition(t){this.axisPosition=t,this.setRange(this.range)}getTickDistance(){var t=this.getRange();return Math.abs(t[0]-t[1])/this.getTickValues().length}getAxisOuterPadding(){return this.outerPadding}getLabelDimension(){return this.textDimensionCalculator.getMaxDimension(this.getTickValues().map(t=>t.toString()),this.axisConfig.labelFontSize)}recalculateOuterPaddingToDrawBar(){.7*this.getTickDistance()>2*this.outerPadding&&(this.outerPadding=Math.floor(.7*this.getTickDistance()/2)),this.recalculateScale()}calculateSpaceIfDrawnHorizontally(t){let e=t.height;var r,n;this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel&&(r=this.getLabelDimension(),n=.2*t.width,this.outerPadding=Math.min(r.width/2,n),n=r.height+2*this.axisConfig.labelPadding,this.labelTextHeight=r.height,n<=e)&&(e-=n,this.showLabel=!0),this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title&&(n=(r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize)).height+2*this.axisConfig.titlePadding,this.titleTextHeight=r.height,n<=e)&&(e-=n,this.showTitle=!0),this.boundingRect.width=t.width,this.boundingRect.height=t.height-e}calculateSpaceIfDrawnVertical(t){let e=t.width;var r,n;this.axisConfig.showAxisLine&&e>this.axisConfig.axisLineWidth&&(e-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel&&(r=this.getLabelDimension(),n=.2*t.height,this.outerPadding=Math.min(r.height/2,n),(n=r.width+2*this.axisConfig.labelPadding)<=e)&&(e-=n,this.showLabel=!0),this.axisConfig.showTick&&e>=this.axisConfig.tickLength&&(this.showTick=!0,e-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title&&(n=(r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize)).height+2*this.axisConfig.titlePadding,this.titleTextHeight=r.height,n<=e)&&(e-=n,this.showTitle=!0),this.boundingRect.width=t.width-e,this.boundingRect.height=t.height}calculateSpace(t){return"left"===this.axisPosition||"right"===this.axisPosition?this.calculateSpaceIfDrawnVertical(t):this.calculateSpaceIfDrawnHorizontally(t),this.recalculateScale(),{width:this.boundingRect.width,height:this.boundingRect.height}}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}getDrawableElementsForLeftAxis(){var t,r=[];if(this.showAxisLine&&(t=this.boundingRect.x+this.boundingRect.width-this.axisConfig.axisLineWidth/2,r.push({type:"path",groupTexts:["left-axis","axisl-line"],data:[{path:`M ${t},${this.boundingRect.y} L ${t},${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(t=>({text:t.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(t),fill:this.axisThemeConfig.labelColor,fontSize:this.axisConfig.labelFontSize,rotation:0,verticalPos:"middle",horizontalPos:"right"}))}),this.showTick){let e=this.boundingRect.x+this.boundingRect.width-(this.showAxisLine?this.axisConfig.axisLineWidth:0);r.push({type:"path",groupTexts:["left-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${e},${this.getScaleValue(t)} L ${e-this.axisConfig.tickLength},`+this.getScaleValue(t),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 t,r=[];if(this.showAxisLine&&(t=this.boundingRect.y+this.axisConfig.axisLineWidth/2,r.push({type:"path",groupTexts:["bottom-axis","axis-line"],data:[{path:`M ${this.boundingRect.x},${t} L ${this.boundingRect.x+this.boundingRect.width},`+t,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})),this.showLabel&&r.push({type:"text",groupTexts:["bottom-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),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 e=this.boundingRect.y+(this.showAxisLine?this.axisConfig.axisLineWidth:0);r.push({type:"path",groupTexts:["bottom-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${e} L ${this.getScaleValue(t)},`+(e+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 t,r=[];if(this.showAxisLine&&(t=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},${t} L ${this.boundingRect.x+this.boundingRect.width},`+t,strokeFill:this.axisThemeConfig.axisLineColor,strokeWidth:this.axisConfig.axisLineWidth}]})),this.showLabel&&r.push({type:"text",groupTexts:["top-axis","label"],data:this.getTickValues().map(t=>({text:t.toString(),x:this.getScaleValue(t),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 e=this.boundingRect.y;r.push({type:"path",groupTexts:["top-axis","ticks"],data:this.getTickValues().map(t=>({path:`M ${this.getScaleValue(t)},${e+this.boundingRect.height-(this.showAxisLine?this.axisConfig.axisLineWidth:0)} L ${this.getScaleValue(t)},`+(e+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():[]}}}),Syt=t(()=>{Q3(),e(),_yt(),kyt=class extends wyt{static{me(this,"BandAxis")}constructor(t,e,r,n,i){super(t,n,i,e),this.categories=r,this.scale=gv().domain(this.categories).range(this.getRange())}setRange(t){super.setRange(t)}recalculateScale(){this.scale=gv().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),M.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(t){return this.scale(t)??this.getRange()[0]}}}),Ayt=t(()=>{Q3(),_yt(),Tyt=class extends wyt{static{me(this,"LinearAxis")}constructor(t,e,r,n,i){super(t,n,i,e),this.domain=r,this.scale=Mv().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){var t=[...this.domain];"left"===this.axisPosition&&t.reverse(),this.scale=Mv().domain(t).range(this.getRange())}getScaleValue(t){return this.scale(t)}}});function Lyt(t,e,r,n){return n=new byt(n),vyt(t)?new kyt(e,r,t.categories,t.title,n):new Tyt(e,r,[t.min,t.max],t.title,n)}var Nyt=t(()=>{Eyt(),Cyt(),Syt(),Ayt(),me(Lyt,"getAxis")});function Iyt(t,e,r,n){return n=new byt(n),new Ryt(n,t,e,r)}var Ryt,Myt,Dyt,Oyt=t(()=>{Cyt(),Ryt=class{constructor(t,e,r,n){this.textDimensionCalculator=t,this.chartConfig=e,this.chartData=r,this.chartThemeConfig=n,this.boundingRect={x:0,y:0,width:0,height:0},this.showChartTitle=!1}static{me(this,"ChartTitle")}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){var e=this.textDimensionCalculator.getMaxDimension([this.chartData.title],this.chartConfig.titleFontSize),t=Math.max(e.width,t.width),r=e.height+2*this.chartConfig.titlePadding;return e.width<=t&&e.height<=r&&this.chartConfig.showTitle&&this.chartData.title&&(this.boundingRect.width=t,this.boundingRect.height=r,this.showChartTitle=!0),{width:this.boundingRect.width,height:this.boundingRect.height}}getDrawableElements(){var t=[];return this.showChartTitle&&t.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}]}),t}},me(Iyt,"getChartTitleComponent")}),Pyt=t(()=>{Q3(),Myt=class{constructor(t,e,r,n,i){this.plotData=t,this.xAxis=e,this.yAxis=r,this.orientation=n,this.plotIndex=i}static{me(this,"LinePlot")}getDrawableElement(){var t=this.plotData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]);return(t=("horizontal"===this.orientation?K4().y(t=>t[0]).x(t=>t[1]):K4().x(t=>t[0]).y(t=>t[1]))(t))?[{groupTexts:["plot","line-plot-"+this.plotIndex],type:"path",data:[{path:t,strokeFill:this.plotData.strokeFill,strokeWidth:this.plotData.strokeWidth}]}]:[]}}}),Byt=t(()=>{Dyt=class{constructor(t,e,r,n,i,a){this.barData=t,this.boundingRect=e,this.xAxis=r,this.yAxis=n,this.orientation=i,this.plotIndex=a}static{me(this,"BarPlot")}getDrawableElement(){let t=this.barData.data.map(t=>[this.xAxis.getScaleValue(t[0]),this.yAxis.getScaleValue(t[1])]),e=.95*Math.min(2*this.xAxis.getAxisOuterPadding(),this.xAxis.getTickDistance()),r=e/2;return"horizontal"===this.orientation?[{groupTexts:["plot","bar-plot-"+this.plotIndex],type:"rect",data:t.map(t=>({x:this.boundingRect.x,y:t[0]-r,height:e,width:t[1]-this.boundingRect.x,fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]:[{groupTexts:["plot","bar-plot-"+this.plotIndex],type:"rect",data:t.map(t=>({x:t[0]-r,y:t[1],width:e,height:this.boundingRect.y+this.boundingRect.height-t[1],fill:this.barData.fill,strokeWidth:0,strokeFill:this.barData.fill}))}]}}});function Fyt(t,e,r){return new $yt(t,e,r)}var $yt,zyt,Gyt,Uyt=t(()=>{Pyt(),Byt(),$yt=class{constructor(t,e,r){this.chartConfig=t,this.chartData=e,this.chartThemeConfig=r,this.boundingRect={x:0,y:0,width:0,height:0}}static{me(this,"BasePlot")}setAxes(t,e){this.xAxis=t,this.yAxis=e}setBoundingBoxXY(t){this.boundingRect.x=t.x,this.boundingRect.y=t.y}calculateSpace(t){return this.boundingRect.width=t.width,this.boundingRect.height=t.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 t,e,r=[];for([t,e]of this.chartData.plots.entries())switch(e.type){case"line":var n=new Myt(e,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t);r.push(...n.getDrawableElement());break;case"bar":n=new Dyt(e,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,t),r.push(...n.getDrawableElement())}return r}},me(Fyt,"getPlotComponent")}),qyt=t(()=>{Nyt(),Oyt(),Uyt(),Eyt(),zyt=class{constructor(t,e,r,n){this.chartConfig=t,this.chartData=e,this.componentStore={title:Iyt(t,e,r,n),plot:Fyt(t,e,r),xAxis:Lyt(e.xAxis,t.xAxis,{titleColor:r.xAxisTitleColor,labelColor:r.xAxisLabelColor,tickColor:r.xAxisTickColor,axisLineColor:r.xAxisLineColor},n),yAxis:Lyt(e.yAxis,t.yAxis,{titleColor:r.yAxisTitleColor,labelColor:r.yAxisLabelColor,tickColor:r.yAxisTickColor,axisLineColor:r.yAxisLineColor},n)}}static{me(this,"Orchestrator")}calculateVerticalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,r,n,i=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:i,height:a});t-=s.width,n=(s=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e-=s.height})).height,e-=s.height,this.componentStore.xAxis.setAxisPosition("bottom"),e-=this.componentStore.xAxis.calculateSpace({width:t,height:e}).height,this.componentStore.yAxis.setAxisPosition("left"),r=(s=this.componentStore.yAxis.calculateSpace({width:t,height:e})).width,0<(t-=s.width)&&(i+=t),0yyt(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let t=this.chartConfig.width,e=this.chartConfig.height,r,n,i,a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),o=this.componentStore.plot.calculateSpace({width:a,height:s});t-=o.width,r=(o=this.componentStore.title.calculateSpace({width:this.chartConfig.width,height:e-=o.height})).height,e-=o.height,this.componentStore.xAxis.setAxisPosition("left"),t-=(o=this.componentStore.xAxis.calculateSpace({width:t,height:e})).width,n=o.width,this.componentStore.yAxis.setAxisPosition("top"),e-=(o=this.componentStore.yAxis.calculateSpace({width:t,height:e})).height,i=r+o.height,0yyt(t))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateSpace(){"horizontal"===this.chartConfig.chartOrientation?this.calculateHorizontalSpace():this.calculateVerticalSpace()}getDrawableElement(){this.calculateSpace();var t,e=[];this.componentStore.plot.setAxes(this.componentStore.xAxis,this.componentStore.yAxis);for(t of Object.values(this.componentStore))e.push(...t.getDrawableElements());return e}}}),jyt=t(()=>{qyt(),Gyt=class{static{me(this,"XYChartBuilder")}static build(t,e,r,n){return new zyt(t,e,r,n).getDrawableElement()}}});function Wyt(){var t=or(),e=Ir();return bE(t.xyChart,e.themeVariables.xyChart)}function Yyt(){var t=Ir();return bE(yr.xyChart,t.xyChart)}function Hyt(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function Vyt(t){var e=Ir();return Sc(t.trim(),e)}function Xyt(t){d2t=t}function Kyt(t){p2t.chartOrientation="horizontal"===t?"horizontal":"vertical"}function Zyt(t){f2t.xAxis.title=Vyt(t.text)}function Qyt(t,e){f2t.xAxis={type:"linear",title:f2t.xAxis.title,min:t,max:e},y2t=!0}function Jyt(t){f2t.xAxis={type:"band",title:f2t.xAxis.title,categories:t.map(t=>Vyt(t.text))},y2t=!0}function t2t(t){f2t.yAxis.title=Vyt(t.text)}function e2t(t,e){f2t.yAxis={type:"linear",title:f2t.yAxis.title,min:t,max:e},v2t=!0}function r2t(t){var e=Math.min(...t),t=Math.max(...t),r=xyt(f2t.yAxis)?f2t.yAxis.min:1/0,n=xyt(f2t.yAxis)?f2t.yAxis.max:-1/0;f2t.yAxis={type:"linear",title:f2t.yAxis.title,min:Math.min(r,e),max:Math.max(n,t)}}function n2t(r){let t=[],e;if(0!==r.length&&(y2t||(n=xyt(f2t.xAxis)?f2t.xAxis.min:1/0,e=xyt(f2t.xAxis)?f2t.xAxis.max:-1/0,Qyt(Math.min(n,1),Math.max(e,r.length))),v2t||r2t(r),vyt(f2t.xAxis)&&(t=f2t.xAxis.categories.map((t,e)=>[t,r[e]])),xyt(f2t.xAxis))){var n=f2t.xAxis.min,i=f2t.xAxis.max,a=(i-n)/(r.length-1),s=[];for(let t=n;t<=i;t+=a)s.push(""+t);t=s.map((t,e)=>[t,r[e]])}return t}function i2t(t){return m2t[0===t?0:t%m2t.length]}function a2t(t,e){e=n2t(e),f2t.plots.push({type:"line",strokeFill:i2t(u2t),strokeWidth:2,data:e}),u2t++}function s2t(t,e){e=n2t(e),f2t.plots.push({type:"bar",fill:i2t(u2t),data:e}),u2t++}function o2t(){if(0===f2t.plots.length)throw Error("No Plot to render, please provide a plot with some data");return f2t.title=gh(),Gyt.build(p2t,f2t,g2t,d2t)}function l2t(){return g2t}function c2t(){return p2t}function h2t(){return f2t}var u2t,d2t,p2t,g2t,f2t,m2t,y2t,v2t,x2t,b2t,w2t,k2t,T2t=t(()=>{Nn(),An(),Tn(),ZE(),th(),fu(),jyt(),Eyt(),u2t=0,p2t=Yyt(),g2t=Wyt(),f2t=Hyt(),m2t=g2t.plotColorPalette.split(",").map(t=>t.trim()),v2t=y2t=!1,me(Wyt,"getChartDefaultThemeConfig"),me(Yyt,"getChartDefaultConfig"),me(Hyt,"getChartDefaultData"),me(Vyt,"textSanitizer"),me(Xyt,"setTmpSVGG"),me(Kyt,"setOrientation"),me(Zyt,"setXAxisTitle"),me(Qyt,"setXAxisRangeData"),me(Jyt,"setXAxisBand"),me(t2t,"setYAxisTitle"),me(e2t,"setYAxisRangeData"),me(r2t,"setYAxisRangeFromPlotData"),me(n2t,"transformDataWithoutCategory"),me(i2t,"getPlotColorFromPalette"),me(a2t,"setLineData"),me(s2t,"setBarData"),me(o2t,"getDrawableElem"),me(l2t,"getChartThemeConfig"),me(c2t,"getChartConfig"),me(h2t,"getXYChartData"),x2t=me(function(){lh(),u2t=0,p2t=Yyt(),f2t=Hyt(),g2t=Wyt(),m2t=g2t.plotColorPalette.split(",").map(t=>t.trim()),v2t=y2t=!1},"clear"),b2t={getDrawableElem:o2t,clear:x2t,setAccTitle:ch,getAccTitle:hh,setDiagramTitle:ph,getDiagramTitle:gh,getAccDescription:dh,setAccDescription:uh,setOrientation:Kyt,setXAxisTitle:Zyt,setXAxisRangeData:Qyt,setXAxisBand:Jyt,setYAxisTitle:t2t,setYAxisRangeData:e2t,setLineData:a2t,setBarData:s2t,setTmpSVGG:Xyt,getChartThemeConfig:l2t,getChartConfig:c2t,getXYChartData:h2t}}),E2t=t(()=>{e(),emt(),eh(),w2t=me((t,e,r,n)=>{let i=n.db,a=i.getChartThemeConfig(),s=i.getChartConfig(),o=i.getXYChartData().plots[0].data.map(t=>t[1]);function l(t){return"top"===t?"text-before-edge":"middle"}function c(t){return"left"===t?"start":"right"===t?"end":"middle"}function h(t){return`translate(${t.x}, ${t.y}) rotate(${t.rotation||0})`}me(l,"getDominantBaseLine"),me(c,"getTextAnchor"),me(h,"getTextTransformation"),M.debug(`Rendering xychart chart -`+t);let u=Vft(e),d=u.append("g").attr("class","main"),p=d.append("rect").attr("width",s.width).attr("height",s.height).attr("class","background"),g=(Vc(u,s.height,s.width,!0),u.attr("viewBox",`0 0 ${s.width} `+s.height),p.attr("fill",a.backgroundColor),i.setTmpSVGG(u.append("g").attr("class","mermaid-tmp-group")),i.getDrawableElem()),f={};function m(e){let r=d,n="";for(var[i]of e.entries()){let t=d;0t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).attr("fill",t=>t.fill).attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth),s.showDataLabel)if("horizontal"===s.chartOrientation){let n=function(t,e){var{data:t,label:r}=t;return e*r.length*.7<=t.width-10};n,me(n,"fitsHorizontally");var x=(b=y.data.map((t,e)=>({data:t,label:o[e].toString()})).filter(t=>0{let e=t.data,r=.7*e.height;for(;!n(t,r)&&0t.data.x+t.data.width-10).attr("y",t=>t.data.y+t.data.height/2).attr("text-anchor","end").attr("dominant-baseline","middle").attr("fill","black").attr("font-size",x+"px").text(t=>t.label)}else{let i=function(t,e,r){var{data:t,label:n}=t,n=e*n.length*.7,i=t.x+t.width/2;return t.x<=i-n/2&&i+n/2<=t.x+t.width&&t.y+r+e<=t.y+t.height};i,me(i,"fitsInBar");var b,x=(b=y.data.map((t,e)=>({data:t,label:o[e].toString()})).filter(t=>0{let{data:e,label:r}=t,n=e.width/(.7*r.length);for(;!i(t,n,10)&&0t.data.x+t.data.width/2).attr("y",t=>t.data.y+10).attr("text-anchor","middle").attr("dominant-baseline","hanging").attr("fill","black").attr("font-size",w+"px").text(t=>t.label)}break;case"text":v.selectAll("text").data(y.data).enter().append("text").attr("x",0).attr("y",0).attr("fill",t=>t.fill).attr("font-size",t=>t.fontSize).attr("dominant-baseline",t=>l(t.verticalPos)).attr("text-anchor",t=>c(t.horizontalPos)).attr("transform",t=>h(t)).text(t=>t.text);break;case"path":v.selectAll("path").data(y.data).enter().append("path").attr("d",t=>t.path).attr("fill",t=>t.fill||"none").attr("stroke",t=>t.strokeFill).attr("stroke-width",t=>t.strokeWidth)}}},"draw"),k2t={draw:w2t}}),C2t={};oPt(C2t,{diagram:()=>_2t});var _2t,S2t,A2t,L2t,N2t,I2t,R2t=t(()=>{myt(),T2t(),E2t(),_2t={parser:gyt,db:b2t,renderer:k2t}}),M2t=t(()=>{function P(){this.yy={}}var t=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,3],r=[1,4],n=[1,5],i=[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],x=[1,32],b=[1,30],w=[1,39],k=[1,40],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,61],C=[89,90],F=[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],$=[27,29],z=[1,70],G=[1,71],U=[1,72],q=[1,73],j=[1,74],W=[1,75],Y=[1,76],_=[1,83],S=[1,80],H=[1,84],V=[1,85],X=[1,86],K=[1,87],Z=[1,88],Q=[1,89],J=[1,90],tt=[1,91],et=[1,92],rt=[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],nt=[1,101],it=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],L=[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],N=[1,110],I=[1,106],R=[1,107],M=[1,108],D=[1,109],O=[1,111],at=[1,116],st=[1,117],ot=[1,114],lt=[1,115],e={trace:me(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:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 4:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:n.setDirection("TB");break;case 18:n.setDirection("BT");break;case 19:n.setDirection("RL");break;case 20:n.setDirection("LR");break;case 21:n.addRequirement(a[o-3],a[o-4]);break;case 22:n.addRequirement(a[o-5],a[o-6]),n.setClass([a[o-5]],a[o-3]);break;case 23:n.setNewReqId(a[o-2]);break;case 24:n.setNewReqText(a[o-2]);break;case 25:n.setNewReqRisk(a[o-2]);break;case 26:n.setNewReqVerifyMethod(a[o-2]);break;case 29:this.$=n.RequirementType.REQUIREMENT;break;case 30:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=n.RiskLevel.LOW_RISK;break;case 36:this.$=n.RiskLevel.MED_RISK;break;case 37:this.$=n.RiskLevel.HIGH_RISK;break;case 38:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=n.VerifyType.VERIFY_TEST;break;case 42:n.addElement(a[o-3]);break;case 43:n.addElement(a[o-5]),n.setClass([a[o-5]],a[o-3]);break;case 44:n.setNewElementType(a[o-2]);break;case 45:n.setNewElementDocRef(a[o-2]);break;case 48:n.addRelationship(a[o-2],a[o],a[o-4]);break;case 49:n.addRelationship(a[o-2],a[o-4],a[o]);break;case 50:this.$=n.Relationships.CONTAINS;break;case 51:this.$=n.Relationships.COPIES;break;case 52:this.$=n.Relationships.DERIVES;break;case 53:this.$=n.Relationships.SATISFIES;break;case 54:this.$=n.Relationships.VERIFIES;break;case 55:this.$=n.Relationships.REFINES;break;case 56:this.$=n.Relationships.TRACES;break;case 57:this.$=a[o-2],n.defineClass(a[o-1],a[o]);break;case 58:n.setClass(a[o-1],a[o]);break;case 59:n.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],n.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:e,9:r,11:n,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:e,9:r,11:n,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},t(B,[2,6]),{3:12,4:2,6:e,9:r,11:n,13:i},{1:[2,2]},{4:17,5:a,7:13,8:s,9:r,11:n,13:i,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:x,77:b,89:w,90:k},t(B,[2,4]),t(B,[2,5]),{1:[2,1]},{8:[1,41]},{4:17,5:a,7:42,8:s,9:r,11:n,13:i,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:x,77:b,89:w,90:k},{4:17,5:a,7:43,8:s,9:r,11:n,13:i,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:x,77:b,89:w,90:k},{4:17,5:a,7:44,8:s,9:r,11:n,13:i,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:x,77:b,89:w,90:k},{4:17,5:a,7:45,8:s,9:r,11:n,13:i,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:x,77:b,89:w,90:k},{4:17,5:a,7:46,8:s,9:r,11:n,13:i,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:x,77:b,89:w,90:k},{4:17,5:a,7:47,8:s,9:r,11:n,13:i,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:x,77:b,89:w,90:k},{4:17,5:a,7:48,8:s,9:r,11:n,13:i,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:x,77:b,89:w,90:k},{4:17,5:a,7:49,8:s,9:r,11:n,13:i,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:x,77:b,89:w,90:k},{4:17,5:a,7:50,8:s,9:r,11:n,13:i,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:x,77:b,89:w,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]},t(T,[2,17]),t(T,[2,18]),t(T,[2,19]),t(T,[2,20]),{30:60,33:62,75:E,89:w,90:k},{30:63,33:62,75:E,89:w,90:k},{30:64,33:62,75:E,89:w,90:k},t(C,[2,29]),t(C,[2,30]),t(C,[2,31]),t(C,[2,32]),t(C,[2,33]),t(C,[2,34]),t(F,[2,81]),t(F,[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]},t($,[2,79]),t($,[2,80]),{27:[1,67],29:[1,68]},t($,[2,85]),t($,[2,86]),{62:69,65:z,66:G,67:U,68:q,69:j,70:W,71:Y},{62:77,65:z,66:G,67:U,68:q,69:j,70:W,71:Y},{30:78,33:62,75:E,89:w,90:k},{73:79,75:_,76:S,78:81,79:82,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:tt,88:et},t(rt,[2,60]),t(rt,[2,62]),{73:93,75:_,76:S,78:81,79:82,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:tt,88:et},{30:94,33:62,75:E,76:S,89:w,90:k},{5:[1,95]},{30:96,33:62,75:E,89:w,90:k},{5:[1,97]},{30:98,33:62,75:E,89:w,90:k},{63:[1,99]},t(A,[2,50]),t(A,[2,51]),t(A,[2,52]),t(A,[2,53]),t(A,[2,54]),t(A,[2,55]),t(A,[2,56]),{64:[1,100]},t(T,[2,59],{76:S}),t(T,[2,64],{76:nt}),{33:103,75:[1,102],89:w,90:k},t(it,[2,65],{79:104,75:_,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:tt,88:et}),t(L,[2,67]),t(L,[2,69]),t(L,[2,70]),t(L,[2,71]),t(L,[2,72]),t(L,[2,73]),t(L,[2,74]),t(L,[2,75]),t(L,[2,76]),t(L,[2,77]),t(L,[2,78]),t(T,[2,57],{76:nt}),t(T,[2,58],{76:S}),{5:N,28:105,31:I,34:R,36:M,38:D,40:O},{27:[1,112],76:S},{5:at,40:st,56:113,57:ot,59:lt},{27:[1,118],76:S},{33:119,89:w,90:k},{33:120,89:w,90:k},{75:_,78:121,79:82,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:tt,88:et},t(rt,[2,61]),t(rt,[2,63]),t(L,[2,68]),t(T,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:N,28:126,31:I,34:R,36:M,38:D,40:O},t(T,[2,28]),{5:[1,127]},t(T,[2,42]),{32:[1,128]},{32:[1,129]},{5:at,40:st,56:130,57:ot,59:lt},t(T,[2,47]),{5:[1,131]},t(T,[2,48]),t(T,[2,49]),t(it,[2,66],{79:104,75:_,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:tt,88:et}),{33:132,89:w,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]},t(T,[2,27]),{5:N,28:145,31:I,34:R,36:M,38:D,40:O},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},t(T,[2,46]),{5:at,40:st,56:152,57:ot,59:lt},{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]},t(T,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},t(T,[2,43]),{5:N,28:159,31:I,34:R,36:M,38:D,40:O},{5:N,28:160,31:I,34:R,36:M,38:D,40:O},{5:N,28:161,31:I,34:R,36:M,38:D,40:O},{5:N,28:162,31:I,34:R,36:M,38:D,40:O},{5:at,40:st,56:163,57:ot,59:lt},{5:at,40:st,56:164,57:ot,59:lt},t(T,[2,23]),t(T,[2,24]),t(T,[2,25]),t(T,[2,26]),t(T,[2,44]),t(T,[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:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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,20,21,23,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},data:{rules:[0,1,3,4,5,6,7,9,11,14,15,16,17,20,21,22,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_band_data:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,24,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},axis_data:{rules:[0,1,2,4,5,6,7,9,11,14,15,16,17,18,19,20,21,23,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},title:{rules:[],inclusive:!1},md_string:{rules:[],inclusive:!1},string:{rules:[27,28],inclusive:!1},INITIAL:{rules:[0,1,4,5,6,7,9,11,14,15,16,17,20,21,25,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45],inclusive:!0}}};n.lexer=i,mt(e,"Parser"),(L2e=new((e.prototype=n).Parser=e)).parser=L2e,N2e=L2e});function M2e(e){return"bar"===e.type}function D2e(e){return"band"===e.type}function O2e(e){return"linear"===e.type}var P2e,B2e,$2e,F2e,z2e=e(()=>{mt(M2e,"isBarPlot"),mt(D2e,"isBandAxisData"),mt(O2e,"isLinearAxisData")}),G2e=e(()=>{WL(),P2e=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,n={width:0,height:0},i=this.parentGroup.append("g").attr("visibility","hidden").attr("font-size",t);for(r of e){var a=(s=zL(i,1,r))?s.width:r.length*t,s=s?s.height:t;n.width=Math.max(n.width,a),n.height=Math.max(n.height,s)}return i.remove(),n}}}),U2e=e(()=>{B2e=class{constructor(e,t,r,n){this.axisConfig=e,this.title=t,this.textDimensionCalculator=r,this.axisThemeConfig=n,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,n;this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel&&(r=this.getLabelDimension(),n=.2*e.width,this.outerPadding=Math.min(r.width/2,n),n=r.height+2*this.axisConfig.labelPadding,this.labelTextHeight=r.height,n<=t)&&(t-=n,this.showLabel=!0),this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title&&(n=(r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize)).height+2*this.axisConfig.titlePadding,this.titleTextHeight=r.height,n<=t)&&(t-=n,this.showTitle=!0),this.boundingRect.width=e.width,this.boundingRect.height=e.height-t}calculateSpaceIfDrawnVertical(e){let t=e.width;var r,n;this.axisConfig.showAxisLine&&t>this.axisConfig.axisLineWidth&&(t-=this.axisConfig.axisLineWidth,this.showAxisLine=!0),this.axisConfig.showLabel&&(r=this.getLabelDimension(),n=.2*e.height,this.outerPadding=Math.min(r.height/2,n),(n=r.width+2*this.axisConfig.labelPadding)<=t)&&(t-=n,this.showLabel=!0),this.axisConfig.showTick&&t>=this.axisConfig.tickLength&&(this.showTick=!0,t-=this.axisConfig.tickLength),this.axisConfig.showTitle&&this.title&&(n=(r=this.textDimensionCalculator.getMaxDimension([this.title],this.axisConfig.titleFontSize)).height+2*this.axisConfig.titlePadding,this.titleTextHeight=r.height,n<=t)&&(t-=n,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():[]}}}),q2e=e(()=>{Zw(),t(),U2e(),$2e=class extends B2e{static{mt(this,"BandAxis")}constructor(e,t,r,n,i){super(e,n,i,t),this.categories=r,this.scale=px().domain(this.categories).range(this.getRange())}setRange(e){super.setRange(e)}recalculateScale(){this.scale=px().domain(this.categories).range(this.getRange()).paddingInner(1).paddingOuter(0).align(.5),M.trace("BandAxis axis final categories, range: ",this.categories,this.getRange())}getTickValues(){return this.categories}getScaleValue(e){return this.scale(e)??this.getRange()[0]}}}),j2e=e(()=>{Zw(),U2e(),F2e=class extends B2e{static{mt(this,"LinearAxis")}constructor(e,t,r,n,i){super(e,n,i,t),this.domain=r,this.scale=Rx().domain(this.domain).range(this.getRange())}getTickValues(){return this.scale.ticks()}recalculateScale(){var e=[...this.domain];"left"===this.axisPosition&&e.reverse(),this.scale=Rx().domain(e).range(this.getRange())}getScaleValue(e){return this.scale(e)}}});function W2e(e,t,r,n){return n=new P2e(n),D2e(e)?new $2e(t,r,e.categories,e.title,n):new F2e(t,r,[e.min,e.max],e.title,n)}var Y2e=e(()=>{z2e(),G2e(),q2e(),j2e(),mt(W2e,"getAxis")});function H2e(e,t,r,n){return n=new P2e(n),new V2e(n,e,t,r)}var V2e,X2e,K2e,Z2e=e(()=>{G2e(),V2e=class{constructor(e,t,r,n){this.textDimensionCalculator=e,this.chartConfig=t,this.chartData=r,this.chartThemeConfig=n,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(H2e,"getChartTitleComponent")}),Q2e=e(()=>{Zw(),X2e=class{constructor(e,t,r,n,i){this.plotData=e,this.xAxis=t,this.yAxis=r,this.orientation=n,this.plotIndex=i}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?X5().y(e=>e[0]).x(e=>e[1]):X5().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}]}]:[]}}}),J2e=e(()=>{K2e=class{constructor(e,t,r,n,i,a){this.barData=e,this.boundingRect=t,this.xAxis=r,this.yAxis=n,this.orientation=i,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 eve(e,t,r){return new tve(e,t,r)}var tve,rve,nve,ive=e(()=>{Q2e(),J2e(),tve=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 n=new X2e(t,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e);r.push(...n.getDrawableElement());break;case"bar":n=new K2e(t,this.boundingRect,this.xAxis,this.yAxis,this.chartConfig.chartOrientation,e),r.push(...n.getDrawableElement())}return r}},mt(eve,"getPlotComponent")}),ave=e(()=>{Y2e(),Z2e(),ive(),z2e(),rve=class{constructor(e,t,r,n){this.chartConfig=e,this.chartData=t,this.componentStore={title:H2e(e,t,r,n),plot:eve(e,t,r),xAxis:W2e(t.xAxis,e.xAxis,{titleColor:r.xAxisTitleColor,labelColor:r.xAxisLabelColor,tickColor:r.xAxisTickColor,axisLineColor:r.xAxisLineColor},n),yAxis:W2e(t.yAxis,e.yAxis,{titleColor:r.yAxisTitleColor,labelColor:r.yAxisLabelColor,tickColor:r.yAxisTickColor,axisLineColor:r.yAxisLineColor},n)}}static{mt(this,"Orchestrator")}calculateVerticalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,r,n,i=Math.floor(e*this.chartConfig.plotReservedSpacePercent/100),a=Math.floor(t*this.chartConfig.plotReservedSpacePercent/100),s=this.componentStore.plot.calculateSpace({width:i,height:a});e-=s.width,n=(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)&&(i+=e),0M2e(e))&&this.componentStore.xAxis.recalculateOuterPaddingToDrawBar()}calculateHorizontalSpace(){let e=this.chartConfig.width,t=this.chartConfig.height,r,n,i,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,n=o.width,this.componentStore.yAxis.setAxisPosition("top"),t-=(o=this.componentStore.yAxis.calculateSpace({width:e,height:t})).height,i=r+o.height,0M2e(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}}}),sve=e(()=>{ave(),nve=class{static{mt(this,"XYChartBuilder")}static build(e,t,r,n){return new rve(e,t,r,n).getDrawableElement()}}});function ove(){var e=or(),t=Ir();return xC(e.xyChart,t.themeVariables.xyChart)}function lve(){var e=Ir();return xC(yr.xyChart,e.xyChart)}function cve(){return{yAxis:{type:"linear",title:"",min:1/0,max:-1/0},xAxis:{type:"band",title:"",categories:[]},title:"",plots:[]}}function hve(e){var t=Ir();return _c(e.trim(),t)}function uve(e){Ave=e}function dve(e){Lve.chartOrientation="horizontal"===e?"horizontal":"vertical"}function pve(e){Ive.xAxis.title=hve(e.text)}function gve(e,t){Ive.xAxis={type:"linear",title:Ive.xAxis.title,min:e,max:t},Mve=!0}function fve(e){Ive.xAxis={type:"band",title:Ive.xAxis.title,categories:e.map(e=>hve(e.text))},Mve=!0}function mve(e){Ive.yAxis.title=hve(e.text)}function yve(e,t){Ive.yAxis={type:"linear",title:Ive.yAxis.title,min:e,max:t},Dve=!0}function vve(e){var t=Math.min(...e),e=Math.max(...e),r=O2e(Ive.yAxis)?Ive.yAxis.min:1/0,n=O2e(Ive.yAxis)?Ive.yAxis.max:-1/0;Ive.yAxis={type:"linear",title:Ive.yAxis.title,min:Math.min(r,t),max:Math.max(n,e)}}function xve(r){let e=[],t;if(0!==r.length&&(Mve||(n=O2e(Ive.xAxis)?Ive.xAxis.min:1/0,t=O2e(Ive.xAxis)?Ive.xAxis.max:-1/0,gve(Math.min(n,1),Math.max(t,r.length))),Dve||vve(r),D2e(Ive.xAxis)&&(e=Ive.xAxis.categories.map((e,t)=>[e,r[t]])),O2e(Ive.xAxis))){var n=Ive.xAxis.min,i=Ive.xAxis.max,a=(i-n)/(r.length-1),s=[];for(let e=n;e<=i;e+=a)s.push(""+e);e=s.map((e,t)=>[e,r[t]])}return e}function bve(e){return Rve[0===e?0:e%Rve.length]}function wve(e,t){t=xve(t),Ive.plots.push({type:"line",strokeFill:bve(_ve),strokeWidth:2,data:t}),_ve++}function kve(e,t){t=xve(t),Ive.plots.push({type:"bar",fill:bve(_ve),data:t}),_ve++}function Tve(){if(0===Ive.plots.length)throw Error("No Plot to render, please provide a plot with some data");return Ive.title=gh(),nve.build(Lve,Ive,Nve,Ave)}function Eve(){return Nve}function Cve(){return Lve}function Sve(){return Ive}var _ve,Ave,Lve,Nve,Ive,Rve,Mve,Dve,Ove,Pve,Bve,$ve,Fve=e(()=>{Nn(),An(),Tn(),KC(),eh(),fu(),sve(),z2e(),_ve=0,Lve=lve(),Nve=ove(),Ive=cve(),Rve=Nve.plotColorPalette.split(",").map(e=>e.trim()),Dve=Mve=!1,mt(ove,"getChartDefaultThemeConfig"),mt(lve,"getChartDefaultConfig"),mt(cve,"getChartDefaultData"),mt(hve,"textSanitizer"),mt(uve,"setTmpSVGG"),mt(dve,"setOrientation"),mt(pve,"setXAxisTitle"),mt(gve,"setXAxisRangeData"),mt(fve,"setXAxisBand"),mt(mve,"setYAxisTitle"),mt(yve,"setYAxisRangeData"),mt(vve,"setYAxisRangeFromPlotData"),mt(xve,"transformDataWithoutCategory"),mt(bve,"getPlotColorFromPalette"),mt(wve,"setLineData"),mt(kve,"setBarData"),mt(Tve,"getDrawableElem"),mt(Eve,"getChartThemeConfig"),mt(Cve,"getChartConfig"),mt(Sve,"getXYChartData"),Ove=mt(function(){lh(),_ve=0,Lve=lve(),Ive=cve(),Nve=ove(),Rve=Nve.plotColorPalette.split(",").map(e=>e.trim()),Dve=Mve=!1},"clear"),Pve={getDrawableElem:Tve,clear:Ove,setAccTitle:ch,getAccTitle:hh,setDiagramTitle:ph,getDiagramTitle:gh,getAccDescription:dh,setAccDescription:uh,setOrientation:dve,setXAxisTitle:pve,setXAxisRangeData:gve,setXAxisBand:fve,setYAxisTitle:mve,setYAxisRangeData:yve,setLineData:wve,setBarData:kve,setTmpSVGG:uve,getChartThemeConfig:Eve,getChartConfig:Cve,getXYChartData:Sve}}),zve=e(()=>{t(),yye(),th(),Bve=mt((e,t,r,n)=>{let i=n.db,a=i.getChartThemeConfig(),s=i.getChartConfig(),o=i.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"),M.debug(`Rendering xychart chart +`+e);let u=hye(t),d=u.append("g").attr("class","main"),p=d.append("rect").attr("width",s.width).attr("height",s.height).attr("class","background"),g=(Vc(u,s.height,s.width,!0),u.attr("viewBox",`0 0 ${s.width} `+s.height),p.attr("fill",a.backgroundColor),i.setTmpSVGG(u.append("g").attr("class","mermaid-tmp-group")),i.getDrawableElem()),f={};function m(t){let r=d,n="";for(var[i]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)if("horizontal"===s.chartOrientation){let n=function(e,t){var{data:e,label:r}=e;return t*r.length*.7<=e.width-10};n,mt(n,"fitsHorizontally");var x=(b=y.data.map((e,t)=>({data:e,label:o[t].toString()})).filter(e=>0{let t=e.data,r=.7*t.height;for(;!n(e,r)&&0e.data.x+e.data.width-10).attr("y",e=>e.data.y+e.data.height/2).attr("text-anchor","end").attr("dominant-baseline","middle").attr("fill","black").attr("font-size",x+"px").text(e=>e.label)}else{let i=function(e,t,r){var{data:e,label:n}=e,n=t*n.length*.7,i=e.x+e.width/2;return e.x<=i-n/2&&i+n/2<=e.x+e.width&&e.y+r+t<=e.y+e.height};i,mt(i,"fitsInBar");var b,x=(b=y.data.map((e,t)=>({data:e,label:o[t].toString()})).filter(e=>0{let{data:t,label:r}=e,n=t.width/(.7*r.length);for(;!i(e,n,10)&&0e.data.x+e.data.width/2).attr("y",e=>e.data.y+10).attr("text-anchor","middle").attr("dominant-baseline","hanging").attr("fill","black").attr("font-size",w+"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"),$ve={draw:Bve}}),Gve={};JBe(Gve,{diagram:()=>Uve});var Uve,qve,jve,Wve,Yve,Hve,Vve=e(()=>{R2e(),Fve(),zve(),Uve={parser:N2e,db:Pve,renderer:$ve}}),Xve=e(()=>{function P(){this.yy={}}var e=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),t=[1,3],r=[1,4],n=[1,5],i=[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],x=[1,32],b=[1,30],w=[1,39],k=[1,40],T=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,77,89,90],E=[1,61],C=[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],G=[1,71],U=[1,72],q=[1,73],j=[1,74],W=[1,75],Y=[1,76],S=[1,83],_=[1,80],H=[1,84],V=[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],ne=[1,101],ie=[5,8,9,11,13,21,22,23,24,41,42,43,44,45,46,54,72,74,76,77,89,90],L=[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],N=[1,110],I=[1,106],R=[1,107],M=[1,108],D=[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,n,i,a,s){var o=a.length-1;switch(i){case 4:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 5:case 6:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 7:this.$=[];break;case 17:n.setDirection("TB");break;case 18:n.setDirection("BT");break;case 19:n.setDirection("RL");break;case 20:n.setDirection("LR");break;case 21:n.addRequirement(a[o-3],a[o-4]);break;case 22:n.addRequirement(a[o-5],a[o-6]),n.setClass([a[o-5]],a[o-3]);break;case 23:n.setNewReqId(a[o-2]);break;case 24:n.setNewReqText(a[o-2]);break;case 25:n.setNewReqRisk(a[o-2]);break;case 26:n.setNewReqVerifyMethod(a[o-2]);break;case 29:this.$=n.RequirementType.REQUIREMENT;break;case 30:this.$=n.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 31:this.$=n.RequirementType.INTERFACE_REQUIREMENT;break;case 32:this.$=n.RequirementType.PERFORMANCE_REQUIREMENT;break;case 33:this.$=n.RequirementType.PHYSICAL_REQUIREMENT;break;case 34:this.$=n.RequirementType.DESIGN_CONSTRAINT;break;case 35:this.$=n.RiskLevel.LOW_RISK;break;case 36:this.$=n.RiskLevel.MED_RISK;break;case 37:this.$=n.RiskLevel.HIGH_RISK;break;case 38:this.$=n.VerifyType.VERIFY_ANALYSIS;break;case 39:this.$=n.VerifyType.VERIFY_DEMONSTRATION;break;case 40:this.$=n.VerifyType.VERIFY_INSPECTION;break;case 41:this.$=n.VerifyType.VERIFY_TEST;break;case 42:n.addElement(a[o-3]);break;case 43:n.addElement(a[o-5]),n.setClass([a[o-5]],a[o-3]);break;case 44:n.setNewElementType(a[o-2]);break;case 45:n.setNewElementDocRef(a[o-2]);break;case 48:n.addRelationship(a[o-2],a[o],a[o-4]);break;case 49:n.addRelationship(a[o-2],a[o-4],a[o]);break;case 50:this.$=n.Relationships.CONTAINS;break;case 51:this.$=n.Relationships.COPIES;break;case 52:this.$=n.Relationships.DERIVES;break;case 53:this.$=n.Relationships.SATISFIES;break;case 54:this.$=n.Relationships.VERIFIES;break;case 55:this.$=n.Relationships.REFINES;break;case 56:this.$=n.Relationships.TRACES;break;case 57:this.$=a[o-2],n.defineClass(a[o-1],a[o]);break;case 58:n.setClass(a[o-1],a[o]);break;case 59:n.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],n.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:n,13:i},{1:[3]},{3:8,4:2,5:[1,7],6:t,9:r,11:n,13:i},{5:[1,9]},{10:[1,10]},{12:[1,11]},e(B,[2,6]),{3:12,4:2,6:t,9:r,11:n,13:i},{1:[2,2]},{4:17,5:a,7:13,8:s,9:r,11:n,13:i,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:x,77:b,89:w,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:n,13:i,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:x,77:b,89:w,90:k},{4:17,5:a,7:43,8:s,9:r,11:n,13:i,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:x,77:b,89:w,90:k},{4:17,5:a,7:44,8:s,9:r,11:n,13:i,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:x,77:b,89:w,90:k},{4:17,5:a,7:45,8:s,9:r,11:n,13:i,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:x,77:b,89:w,90:k},{4:17,5:a,7:46,8:s,9:r,11:n,13:i,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:x,77:b,89:w,90:k},{4:17,5:a,7:47,8:s,9:r,11:n,13:i,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:x,77:b,89:w,90:k},{4:17,5:a,7:48,8:s,9:r,11:n,13:i,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:x,77:b,89:w,90:k},{4:17,5:a,7:49,8:s,9:r,11:n,13:i,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:x,77:b,89:w,90:k},{4:17,5:a,7:50,8:s,9:r,11:n,13:i,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:x,77:b,89:w,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(T,[2,17]),e(T,[2,18]),e(T,[2,19]),e(T,[2,20]),{30:60,33:62,75:E,89:w,90:k},{30:63,33:62,75:E,89:w,90:k},{30:64,33:62,75:E,89:w,90:k},e(C,[2,29]),e(C,[2,30]),e(C,[2,31]),e(C,[2,32]),e(C,[2,33]),e(C,[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:G,67:U,68:q,69:j,70:W,71:Y},{62:77,65:z,66:G,67:U,68:q,69:j,70:W,71:Y},{30:78,33:62,75:E,89:w,90:k},{73:79,75:S,76:_,78:81,79:82,80:H,81:V,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:S,76:_,78:81,79:82,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te},{30:94,33:62,75:E,76:_,89:w,90:k},{5:[1,95]},{30:96,33:62,75:E,89:w,90:k},{5:[1,97]},{30:98,33:62,75:E,89:w,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(T,[2,59],{76:_}),e(T,[2,64],{76:ne}),{33:103,75:[1,102],89:w,90:k},e(ie,[2,65],{79:104,75:S,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te}),e(L,[2,67]),e(L,[2,69]),e(L,[2,70]),e(L,[2,71]),e(L,[2,72]),e(L,[2,73]),e(L,[2,74]),e(L,[2,75]),e(L,[2,76]),e(L,[2,77]),e(L,[2,78]),e(T,[2,57],{76:ne}),e(T,[2,58],{76:_}),{5:N,28:105,31:I,34:R,36:M,38:D,40:O},{27:[1,112],76:_},{5:ae,40:se,56:113,57:oe,59:le},{27:[1,118],76:_},{33:119,89:w,90:k},{33:120,89:w,90:k},{75:S,78:121,79:82,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te},e(re,[2,61]),e(re,[2,63]),e(L,[2,68]),e(T,[2,21]),{32:[1,122]},{32:[1,123]},{32:[1,124]},{32:[1,125]},{5:N,28:126,31:I,34:R,36:M,38:D,40:O},e(T,[2,28]),{5:[1,127]},e(T,[2,42]),{32:[1,128]},{32:[1,129]},{5:ae,40:se,56:130,57:oe,59:le},e(T,[2,47]),{5:[1,131]},e(T,[2,48]),e(T,[2,49]),e(ie,[2,66],{79:104,75:S,80:H,81:V,82:X,83:K,84:Z,85:Q,86:J,87:ee,88:te}),{33:132,89:w,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(T,[2,27]),{5:N,28:145,31:I,34:R,36:M,38:D,40:O},{58:146,89:[1,147],90:[1,148]},{60:149,89:[1,150],90:[1,151]},e(T,[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(T,[2,22]),{5:[1,157]},{5:[2,87]},{5:[2,88]},{5:[1,158]},{5:[2,89]},{5:[2,90]},e(T,[2,43]),{5:N,28:159,31:I,34:R,36:M,38:D,40:O},{5:N,28:160,31:I,34:R,36:M,38:D,40:O},{5:N,28:161,31:I,34:R,36:M,38:D,40:O},{5:N,28:162,31:I,34:R,36:M,38:D,40:O},{5:ae,40:se,56:163,57:oe,59:le},{5:ae,40:se,56:164,57:oe,59:le},e(T,[2,23]),e(T,[2,24]),e(T,[2,25]),e(T,[2,26]),e(T,[2,44]),e(T,[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,n=[0],i=[],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"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(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}}};e.lexer=B,me(P,"Parser"),(S2t=new((P.prototype=e).Parser=P)).parser=S2t,A2t=S2t}),D2t=t(()=>{mu(),e(),fu(),L2t=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=ch,this.getAccTitle=hh,this.setAccDescription=uh,this.getAccDescription=dh,this.setDiagramTitle=ph,this.getDiagramTitle=gh,this.getConfig=me(()=>D().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{me(this,"RequirementDB")}getDirection(){return this.direction}setDirection(t){this.direction=t}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(t,e){return this.requirements.has(t)||this.requirements.set(t,{name:t,type:e,requirementId:this.latestRequirement.requirementId,text:this.latestRequirement.text,risk:this.latestRequirement.risk,verifyMethod:this.latestRequirement.verifyMethod,cssStyles:[],classes:["default"]}),this.resetLatestRequirement(),this.requirements.get(t)}getRequirements(){return this.requirements}setNewReqId(t){void 0!==this.latestRequirement&&(this.latestRequirement.requirementId=t)}setNewReqText(t){void 0!==this.latestRequirement&&(this.latestRequirement.text=t)}setNewReqRisk(t){void 0!==this.latestRequirement&&(this.latestRequirement.risk=t)}setNewReqVerifyMethod(t){void 0!==this.latestRequirement&&(this.latestRequirement.verifyMethod=t)}addElement(t){return this.elements.has(t)||(this.elements.set(t,{name:t,type:this.latestElement.type,docRef:this.latestElement.docRef,cssStyles:[],classes:["default"]}),M.info("Added new element: ",t)),this.resetLatestElement(),this.elements.get(t)}getElements(){return this.elements}setNewElementType(t){void 0!==this.latestElement&&(this.latestElement.type=t)}setNewElementDocRef(t){void 0!==this.latestElement&&(this.latestElement.docRef=t)}addRelationship(t,e,r){this.relations.push({type:t,src:e,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,lh()}setCssStyle(t,e){for(var r of t){var n,i=this.requirements.get(r)??this.elements.get(r);if(!e||!i)return;for(n of e)n.includes(",")?i.cssStyles.push(...n.split(",")):i.cssStyles.push(n)}}setClass(t,e){for(var r of t){var n=this.requirements.get(r)??this.elements.get(r);if(n)for(var i of e)n.classes.push(i),(i=this.classes.get(i)?.styles)&&n.cssStyles.push(...i)}}defineClass(t,n){for(let e of t){let r=this.classes.get(e);void 0===r&&(r={id:e,styles:[],textStyles:[]},this.classes.set(e,r)),n&&n.forEach(function(t){var e;/color/.exec(t)&&(e=t.replace("fill","bgFill"),r.textStyles.push(e)),r.styles.push(t)}),this.requirements.forEach(t=>{t.classes.includes(e)&&t.cssStyles.push(...n.flatMap(t=>t.split(",")))}),this.elements.forEach(t=>{t.classes.includes(e)&&t.cssStyles.push(...n.flatMap(t=>t.split(",")))})}}getClasses(){return this.classes}getData(){var t,e,r,n=D(),i=[],a=[];for(t of this.requirements.values()){var s=t;s.id=t.name,s.cssStyles=t.cssStyles,s.cssClasses=t.classes.join(" "),s.shape="requirementBox",s.look=n.look,i.push(s)}for(e of this.elements.values()){var o=e;o.shape="requirementBox",o.look=n.look,o.id=e.name,o.cssStyles=e.cssStyles,o.cssClasses=e.classes.join(" "),i.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:n.look};a.push(l)}return{nodes:i,edges:a,other:{},config:n,direction:this.getDirection()}}}}),O2t=t(()=>{N2t=me(t=>` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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"),(qve=new((P.prototype=t).Parser=P)).parser=qve,jve=qve}),Kve=e(()=>{mu(),t(),fu(),Wve=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=ch,this.getAccTitle=hh,this.setAccDescription=uh,this.getAccDescription=dh,this.setDiagramTitle=ph,this.getDiagramTitle=gh,this.getConfig=mt(()=>D().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"]}),M.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,lh()}setCssStyle(e,t){for(var r of e){var n,i=this.requirements.get(r)??this.elements.get(r);if(!t||!i)return;for(n of t)n.includes(",")?i.cssStyles.push(...n.split(",")):i.cssStyles.push(n)}}setClass(e,t){for(var r of e){var n=this.requirements.get(r)??this.elements.get(r);if(n)for(var i of t)n.classes.push(i),(i=this.classes.get(i)?.styles)&&n.cssStyles.push(...i)}}defineClass(e,n){for(let t of e){let r=this.classes.get(t);void 0===r&&(r={id:t,styles:[],textStyles:[]},this.classes.set(t,r)),n&&n.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(...n.flatMap(e=>e.split(",")))}),this.elements.forEach(e=>{e.classes.includes(t)&&e.cssStyles.push(...n.flatMap(e=>e.split(",")))})}}getClasses(){return this.classes}getData(){var e,t,r,n=D(),i=[],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=n.look,i.push(s)}for(t of this.elements.values()){var o=t;o.shape="requirementBox",o.look=n.look,o.id=t.name,o.cssStyles=t.cssStyles,o.cssClasses=t.classes.join(" "),i.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:n.look};a.push(l)}return{nodes:i,edges:a,other:{},config:n,direction:this.getDirection()}}}}),Zve=e(()=>{Yve=mt(e=>` marker { - fill: ${t.relationColor}; - stroke: ${t.relationColor}; + fill: ${e.relationColor}; + stroke: ${e.relationColor}; } marker.cross { - stroke: ${t.lineColor}; + stroke: ${e.lineColor}; } svg { - font-family: ${t.fontFamily}; - font-size: ${t.fontSize}; + font-family: ${e.fontFamily}; + font-size: ${e.fontSize}; } .reqBox { - fill: ${t.requirementBackground}; + fill: ${e.requirementBackground}; fill-opacity: 1.0; - stroke: ${t.requirementBorderColor}; - stroke-width: ${t.requirementBorderSize}; + stroke: ${e.requirementBorderColor}; + stroke-width: ${e.requirementBorderSize}; } .reqTitle, .reqLabel{ - fill: ${t.requirementTextColor}; + fill: ${e.requirementTextColor}; } .reqLabelBox { - fill: ${t.relationLabelBackground}; + fill: ${e.relationLabelBackground}; fill-opacity: 1.0; } .req-title-line { - stroke: ${t.requirementBorderColor}; - stroke-width: ${t.requirementBorderSize}; + stroke: ${e.requirementBorderColor}; + stroke-width: ${e.requirementBorderSize}; } .relationshipLine { - stroke: ${t.relationColor}; + stroke: ${e.relationColor}; stroke-width: 1; } .relationshipLabel { - fill: ${t.relationLabelColor}; + fill: ${e.relationLabelColor}; } .divider { - stroke: ${t.nodeBorder}; + stroke: ${e.nodeBorder}; stroke-width: 1; } .label { - font-family: ${t.fontFamily}; - color: ${t.nodeTextColor||t.textColor}; + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; } .label text,span { - fill: ${t.nodeTextColor||t.textColor}; - color: ${t.nodeTextColor||t.textColor}; + fill: ${e.nodeTextColor||e.textColor}; + color: ${e.nodeTextColor||e.textColor}; } .labelBkg { - background-color: ${t.edgeLabelBackground}; + background-color: ${e.edgeLabelBackground}; } -`,"getStyles"),I2t=N2t}),P2t={};oPt(P2t,{draw:()=>B2t});var B2t,F2t=t(()=>{mu(),e(),jM(),UX(),qX(),ZE(),B2t=me(async function(t,e,r,n){M.info("REF0:"),M.info("Drawing requirement diagram (unified)",e);var{securityLevel:i,state:a,layout:s}=D(),o=n.db.getData(),i=IM(e,i);o.type=n.type,o.layoutAlgorithm=_X(s),o.nodeSpacing=a?.nodeSpacing??50,o.rankSpacing=a?.rankSpacing??50,o.markers=["requirement_contains","requirement_arrow"],o.diagramId=e,await CX(o,i),HE.insertTitle(i,"requirementDiagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),SX(i,8,"requirementDiagram",a?.useMaxWidth??!0)},"draw")}),$2t={};oPt($2t,{diagram:()=>z2t});var z2t,G2t,U2t,q2t,j2t,W2t,Y2t,H2t,V2t,X2t,K2t,Z2t,Q2t,J2t,tvt,evt,rvt,nvt,ivt,avt,svt,ovt,lvt,cvt,hvt,uvt,dvt,pvt,gvt,fvt,mvt,yvt,vvt,xvt,bvt,wvt,kvt,Tvt,Evt,Cvt,_vt=t(()=>{M2t(),D2t(),O2t(),F2t(),z2t={parser:A2t,get db(){return new L2t},renderer:P2t,styles:I2t}}),Svt=t(()=>{function P(){this.yy={}}var t=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),e=[1,2],B=[1,3],F=[1,4],r=[2,4],n=[1,9],i=[1,11],a=[1,13],s=[1,14],o=[1,16],l=[1,17],c=[1,18],h=[1,24],u=[1,25],d=[1,26],p=[1,27],g=[1,28],f=[1,29],m=[1,30],y=[1,31],v=[1,32],x=[1,33],b=[1,34],w=[1,35],k=[1,36],T=[1,37],E=[1,38],C=[1,39],_=[1,41],S=[1,42],A=[1,43],L=[1,44],N=[1,45],I=[1,46],R=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],M=[4,5,16,50,52,53],$=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],z=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],G=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],U=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],D=[68,69,70],O=[1,122],e={trace:me(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 3:return n.apply(a[o]),a[o];case 4:case 9:this.$=[];break;case 5:case 10:a[o-1].push(a[o]),this.$=a[o-1];break;case 6:case 7:case 11:case 12:this.$=a[o];break;case 8:case 13:this.$=[];break;case 15:a[o].type="createParticipant",this.$=a[o];break;case 16:a[o-1].unshift({type:"boxStart",boxData:n.parseBoxData(a[o-2])}),a[o-1].push({type:"boxEnd",boxText:a[o-2]}),this.$=a[o-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-2]),sequenceIndexStep:Number(a[o-1]),sequenceVisible:!0,signalType:n.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:n.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:n.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:n.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:n.LINETYPE.ACTIVE_START,actor:a[o-1].actor};break;case 23:this.$={type:"activeEnd",signalType:n.LINETYPE.ACTIVE_END,actor:a[o-1].actor};break;case 29:n.setDiagramTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 30:n.setDiagramTitle(a[o].substring(7)),this.$=a[o].substring(7);break;case 31:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 32:case 33:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 34:a[o-1].unshift({type:"loopStart",loopText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.LOOP_START}),a[o-1].push({type:"loopEnd",loopText:a[o-2],signalType:n.LINETYPE.LOOP_END}),this.$=a[o-1];break;case 35:a[o-1].unshift({type:"rectStart",color:n.parseMessage(a[o-2]),signalType:n.LINETYPE.RECT_START}),a[o-1].push({type:"rectEnd",color:n.parseMessage(a[o-2]),signalType:n.LINETYPE.RECT_END}),this.$=a[o-1];break;case 36:a[o-1].unshift({type:"optStart",optText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.OPT_START}),a[o-1].push({type:"optEnd",optText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.OPT_END}),this.$=a[o-1];break;case 37:a[o-1].unshift({type:"altStart",altText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.ALT_START}),a[o-1].push({type:"altEnd",signalType:n.LINETYPE.ALT_END}),this.$=a[o-1];break;case 38:a[o-1].unshift({type:"parStart",parText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.PAR_START}),a[o-1].push({type:"parEnd",signalType:n.LINETYPE.PAR_END}),this.$=a[o-1];break;case 39:a[o-1].unshift({type:"parStart",parText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.PAR_OVER_START}),a[o-1].push({type:"parEnd",signalType:n.LINETYPE.PAR_END}),this.$=a[o-1];break;case 40:a[o-1].unshift({type:"criticalStart",criticalText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.CRITICAL_START}),a[o-1].push({type:"criticalEnd",signalType:n.LINETYPE.CRITICAL_END}),this.$=a[o-1];break;case 41:a[o-1].unshift({type:"breakStart",breakText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.BREAK_START}),a[o-1].push({type:"breakEnd",optText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.BREAK_END}),this.$=a[o-1];break;case 43:this.$=a[o-3].concat([{type:"option",optionText:n.parseMessage(a[o-1]),signalType:n.LINETYPE.CRITICAL_OPTION},a[o]]);break;case 45:this.$=a[o-3].concat([{type:"and",parText:n.parseMessage(a[o-1]),signalType:n.LINETYPE.PAR_AND},a[o]]);break;case 47:this.$=a[o-3].concat([{type:"else",altText:n.parseMessage(a[o-1]),signalType:n.LINETYPE.ALT_ELSE},a[o]]);break;case 48:a[o-3].draw="participant",a[o-3].type="addParticipant",a[o-3].description=n.parseMessage(a[o-1]),this.$=a[o-3];break;case 49:a[o-1].draw="participant",a[o-1].type="addParticipant",this.$=a[o-1];break;case 50:a[o-3].draw="actor",a[o-3].type="addParticipant",a[o-3].description=n.parseMessage(a[o-1]),this.$=a[o-3];break;case 51:a[o-1].draw="actor",a[o-1].type="addParticipant",this.$=a[o-1];break;case 52:a[o-1].type="destroyParticipant",this.$=a[o-1];break;case 53:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 54: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:n.PLACEMENT.OVER,actor:a[o-2].slice(0,2),text:a[o]}];break;case 55:this.$=[a[o-1],{type:"addLinks",actor:a[o-1].actor,text:a[o]}];break;case 56:this.$=[a[o-1],{type:"addALink",actor:a[o-1].actor,text:a[o]}];break;case 57:this.$=[a[o-1],{type:"addProperties",actor:a[o-1].actor,text:a[o]}];break;case 58:this.$=[a[o-1],{type:"addDetails",actor:a[o-1].actor,text:a[o]}];break;case 61:this.$=[a[o-2],a[o]];break;case 62:this.$=a[o];break;case 63:this.$=n.PLACEMENT.LEFTOF;break;case 64:this.$=n.PLACEMENT.RIGHTOF;break;case 65: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:n.LINETYPE.ACTIVE_START,actor:a[o-1].actor}];break;case 66: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:n.LINETYPE.ACTIVE_END,actor:a[o-4].actor}];break;case 67: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 68:this.$={type:"addParticipant",actor:a[o]};break;case 69:this.$=n.LINETYPE.SOLID_OPEN;break;case 70:this.$=n.LINETYPE.DOTTED_OPEN;break;case 71:this.$=n.LINETYPE.SOLID;break;case 72:this.$=n.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=n.LINETYPE.DOTTED;break;case 74:this.$=n.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=n.LINETYPE.SOLID_CROSS;break;case 76:this.$=n.LINETYPE.DOTTED_CROSS;break;case 77:this.$=n.LINETYPE.SOLID_POINT;break;case 78:this.$=n.LINETYPE.DOTTED_POINT;break;case 79:this.$=n.parseMessage(a[o].trim().substring(1))}},"anonymous"),table:[{3:1,4:e,5:B,6:F},{1:[3]},{3:5,4:e,5:B,6:F},{3:6,4:e,5:B,6:F},t([1,4,5,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:i,8:8,9:10,12:12,13:a,14:s,17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:E,53:C,54:_,59:S,60:A,61:L,62:N,70:I},t(R,[2,5]),{9:47,12:12,13:a,14:s,17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:E,53:C,54:_,59:S,60:A,61:L,62:N,70:I},t(R,[2,7]),t(R,[2,8]),t(R,[2,14]),{12:48,50:T,52:E,53:C},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:I},{22:55,70:I},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},t(R,[2,29]),t(R,[2,30]),{32:[1,61]},{34:[1,62]},t(R,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:I},{22:72,70:I},{22:73,70:I},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:I},{22:90,70:I},{22:91,70:I},{22:92,70:I},t([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),t(R,[2,6]),t(R,[2,15]),t(M,[2,9],{10:93}),t(R,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},t(R,[2,21]),{5:[1,97]},{5:[1,98]},t(R,[2,24]),t(R,[2,25]),t(R,[2,26]),t(R,[2,27]),t(R,[2,28]),t(R,[2,31]),t(R,[2,32]),t($,r,{7:99}),t($,r,{7:100}),t($,r,{7:101}),t(z,r,{40:102,7:103}),t(G,r,{42:104,7:105}),t(G,r,{7:105,42:106}),t(U,r,{45:107,7:108}),t($,r,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:I},t(D,[2,69]),t(D,[2,70]),t(D,[2,71]),t(D,[2,72]),t(D,[2,73]),t(D,[2,74]),t(D,[2,75]),t(D,[2,76]),t(D,[2,77]),t(D,[2,78]),{22:118,70:I},{22:120,58:119,70:I},{70:[2,63]},{70:[2,64]},{56:121,81:O},{56:123,81:O},{56:124,81:O},{56:125,81:O},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:T,52:E,53:C},{5:[1,131]},t(R,[2,19]),t(R,[2,20]),t(R,[2,22]),t(R,[2,23]),{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[1,132],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:E,53:C,54:_,59:S,60:A,61:L,62:N,70:I},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[1,133],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:E,53:C,54:_,59:S,60:A,61:L,62:N,70:I},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[1,134],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:E,53:C,54:_,59:S,60:A,61:L,62:N,70:I},{16:[1,135]},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[2,46],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,49:[1,136],50:T,52:E,53:C,54:_,59:S,60:A,61:L,62:N,70:I},{16:[1,137]},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[2,44],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,48:[1,138],50:T,52:E,53:C,54:_,59:S,60:A,61:L,62:N,70:I},{16:[1,139]},{16:[1,140]},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[2,42],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,47:[1,141],50:T,52:E,53:C,54:_,59:S,60:A,61:L,62:N,70:I},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[1,142],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:E,53:C,54:_,59:S,60:A,61:L,62:N,70:I},{15:[1,143]},t(R,[2,49]),{15:[1,144]},t(R,[2,51]),t(R,[2,52]),{22:145,70:I},{22:146,70:I},{56:147,81:O},{56:148,81:O},{56:149,81:O},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},t(R,[2,16]),t(M,[2,10]),{12:151,50:T,52:E,53:C},t(M,[2,12]),t(M,[2,13]),t(R,[2,18]),t(R,[2,34]),t(R,[2,35]),t(R,[2,36]),t(R,[2,37]),{15:[1,152]},t(R,[2,38]),{15:[1,153]},t(R,[2,39]),t(R,[2,40]),{15:[1,154]},t(R,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:O},{56:158,81:O},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:I},t(M,[2,11]),t(z,r,{7:103,40:160}),t(G,r,{7:105,42:161}),t(U,r,{7:108,45:162}),t(R,[2,48]),t(R,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"Jve});var Jve,exe=e(()=>{mu(),t(),UD(),zK(),GK(),KC(),Jve=mt(async function(e,t,r,n){M.info("REF0:"),M.info("Drawing requirement diagram (unified)",t);var{securityLevel:i,state:a,layout:s}=D(),o=n.db.getData(),i=LD(t,i);o.type=n.type,o.layoutAlgorithm=EK(s),o.nodeSpacing=a?.nodeSpacing??50,o.rankSpacing=a?.rankSpacing??50,o.markers=["requirement_contains","requirement_arrow"],o.diagramId=t,await TK(o,i),YC.insertTitle(i,"requirementDiagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),CK(i,8,"requirementDiagram",a?.useMaxWidth??!0)},"draw")}),txe={};JBe(txe,{diagram:()=>rxe});var rxe,nxe,ixe,axe,sxe,oxe,lxe,cxe,hxe,uxe,dxe,pxe,gxe,fxe,mxe,yxe,vxe,xxe,bxe,wxe,kxe,Txe,Exe,Cxe,Sxe,_xe,Axe,Lxe,Nxe,Ixe,Rxe,Mxe,Dxe,Oxe,Pxe,Bxe,$xe,Fxe,zxe,Gxe,Uxe=e(()=>{Xve(),Kve(),Zve(),exe(),rxe={parser:jve,get db(){return new Wve},renderer:Qve,styles:Hve}}),qxe=e(()=>{function P(){this.yy={}}var e=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),t=[1,2],B=[1,3],$=[1,4],r=[2,4],n=[1,9],i=[1,11],a=[1,13],s=[1,14],o=[1,16],l=[1,17],c=[1,18],h=[1,24],u=[1,25],d=[1,26],p=[1,27],g=[1,28],f=[1,29],m=[1,30],y=[1,31],v=[1,32],x=[1,33],b=[1,34],w=[1,35],k=[1,36],T=[1,37],E=[1,38],C=[1,39],S=[1,41],_=[1,42],A=[1,43],L=[1,44],N=[1,45],I=[1,46],R=[1,4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,48,49,50,52,53,54,59,60,61,62,70],M=[4,5,16,50,52,53],F=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],z=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,49,50,52,53,54,59,60,61,62,70],G=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,48,50,52,53,54,59,60,61,62,70],U=[4,5,13,14,16,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,47,50,52,53,54,59,60,61,62,70],D=[68,69,70],O=[1,122],t={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,SD:6,document:7,line:8,statement:9,box_section:10,box_line:11,participant_statement:12,create:13,box:14,restOfLine:15,end:16,signal:17,autonumber:18,NUM:19,off:20,activate:21,actor:22,deactivate:23,note_statement:24,links_statement:25,link_statement:26,properties_statement:27,details_statement:28,title:29,legacy_title:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,loop:36,rect:37,opt:38,alt:39,else_sections:40,par:41,par_sections:42,par_over:43,critical:44,option_sections:45,break:46,option:47,and:48,else:49,participant:50,AS:51,participant_actor:52,destroy:53,note:54,placement:55,text2:56,over:57,actor_pair:58,links:59,link:60,properties:61,details:62,spaceList:63,",":64,left_of:65,right_of:66,signaltype:67,"+":68,"-":69,ACTOR:70,SOLID_OPEN_ARROW:71,DOTTED_OPEN_ARROW:72,SOLID_ARROW:73,BIDIRECTIONAL_SOLID_ARROW:74,DOTTED_ARROW:75,BIDIRECTIONAL_DOTTED_ARROW:76,SOLID_CROSS:77,DOTTED_CROSS:78,SOLID_POINT:79,DOTTED_POINT:80,TXT:81,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",6:"SD",13:"create",14:"box",15:"restOfLine",16:"end",18:"autonumber",19:"NUM",20:"off",21:"activate",23:"deactivate",29:"title",30:"legacy_title",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",36:"loop",37:"rect",38:"opt",39:"alt",41:"par",43:"par_over",44:"critical",46:"break",47:"option",48:"and",49:"else",50:"participant",51:"AS",52:"participant_actor",53:"destroy",54:"note",57:"over",59:"links",60:"link",61:"properties",62:"details",64:",",65:"left_of",66:"right_of",68:"+",69:"-",70:"ACTOR",71:"SOLID_OPEN_ARROW",72:"DOTTED_OPEN_ARROW",73:"SOLID_ARROW",74:"BIDIRECTIONAL_SOLID_ARROW",75:"DOTTED_ARROW",76:"BIDIRECTIONAL_DOTTED_ARROW",77:"SOLID_CROSS",78:"DOTTED_CROSS",79:"SOLID_POINT",80:"DOTTED_POINT",81:"TXT"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[8,1],[8,1],[10,0],[10,2],[11,2],[11,1],[11,1],[9,1],[9,2],[9,4],[9,2],[9,4],[9,3],[9,3],[9,2],[9,3],[9,3],[9,2],[9,2],[9,2],[9,2],[9,2],[9,1],[9,1],[9,2],[9,2],[9,1],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[9,4],[45,1],[45,4],[42,1],[42,4],[40,1],[40,4],[12,5],[12,3],[12,5],[12,3],[12,3],[24,4],[24,4],[25,3],[26,3],[27,3],[28,3],[63,2],[63,1],[58,3],[58,1],[55,1],[55,1],[17,5],[17,5],[17,4],[22,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[67,1],[56,1]],performAction:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){case 3:return n.apply(a[o]),a[o];case 4:case 9:this.$=[];break;case 5:case 10:a[o-1].push(a[o]),this.$=a[o-1];break;case 6:case 7:case 11:case 12:this.$=a[o];break;case 8:case 13:this.$=[];break;case 15:a[o].type="createParticipant",this.$=a[o];break;case 16:a[o-1].unshift({type:"boxStart",boxData:n.parseBoxData(a[o-2])}),a[o-1].push({type:"boxEnd",boxText:a[o-2]}),this.$=a[o-1];break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-2]),sequenceIndexStep:Number(a[o-1]),sequenceVisible:!0,signalType:n.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceIndex:Number(a[o-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:n.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:n.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:n.LINETYPE.AUTONUMBER};break;case 22:this.$={type:"activeStart",signalType:n.LINETYPE.ACTIVE_START,actor:a[o-1].actor};break;case 23:this.$={type:"activeEnd",signalType:n.LINETYPE.ACTIVE_END,actor:a[o-1].actor};break;case 29:n.setDiagramTitle(a[o].substring(6)),this.$=a[o].substring(6);break;case 30:n.setDiagramTitle(a[o].substring(7)),this.$=a[o].substring(7);break;case 31:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 32:case 33:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 34:a[o-1].unshift({type:"loopStart",loopText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.LOOP_START}),a[o-1].push({type:"loopEnd",loopText:a[o-2],signalType:n.LINETYPE.LOOP_END}),this.$=a[o-1];break;case 35:a[o-1].unshift({type:"rectStart",color:n.parseMessage(a[o-2]),signalType:n.LINETYPE.RECT_START}),a[o-1].push({type:"rectEnd",color:n.parseMessage(a[o-2]),signalType:n.LINETYPE.RECT_END}),this.$=a[o-1];break;case 36:a[o-1].unshift({type:"optStart",optText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.OPT_START}),a[o-1].push({type:"optEnd",optText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.OPT_END}),this.$=a[o-1];break;case 37:a[o-1].unshift({type:"altStart",altText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.ALT_START}),a[o-1].push({type:"altEnd",signalType:n.LINETYPE.ALT_END}),this.$=a[o-1];break;case 38:a[o-1].unshift({type:"parStart",parText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.PAR_START}),a[o-1].push({type:"parEnd",signalType:n.LINETYPE.PAR_END}),this.$=a[o-1];break;case 39:a[o-1].unshift({type:"parStart",parText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.PAR_OVER_START}),a[o-1].push({type:"parEnd",signalType:n.LINETYPE.PAR_END}),this.$=a[o-1];break;case 40:a[o-1].unshift({type:"criticalStart",criticalText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.CRITICAL_START}),a[o-1].push({type:"criticalEnd",signalType:n.LINETYPE.CRITICAL_END}),this.$=a[o-1];break;case 41:a[o-1].unshift({type:"breakStart",breakText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.BREAK_START}),a[o-1].push({type:"breakEnd",optText:n.parseMessage(a[o-2]),signalType:n.LINETYPE.BREAK_END}),this.$=a[o-1];break;case 43:this.$=a[o-3].concat([{type:"option",optionText:n.parseMessage(a[o-1]),signalType:n.LINETYPE.CRITICAL_OPTION},a[o]]);break;case 45:this.$=a[o-3].concat([{type:"and",parText:n.parseMessage(a[o-1]),signalType:n.LINETYPE.PAR_AND},a[o]]);break;case 47:this.$=a[o-3].concat([{type:"else",altText:n.parseMessage(a[o-1]),signalType:n.LINETYPE.ALT_ELSE},a[o]]);break;case 48:a[o-3].draw="participant",a[o-3].type="addParticipant",a[o-3].description=n.parseMessage(a[o-1]),this.$=a[o-3];break;case 49:a[o-1].draw="participant",a[o-1].type="addParticipant",this.$=a[o-1];break;case 50:a[o-3].draw="actor",a[o-3].type="addParticipant",a[o-3].description=n.parseMessage(a[o-1]),this.$=a[o-3];break;case 51:a[o-1].draw="actor",a[o-1].type="addParticipant",this.$=a[o-1];break;case 52:a[o-1].type="destroyParticipant",this.$=a[o-1];break;case 53:this.$=[a[o-1],{type:"addNote",placement:a[o-2],actor:a[o-1].actor,text:a[o]}];break;case 54: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:n.PLACEMENT.OVER,actor:a[o-2].slice(0,2),text:a[o]}];break;case 55:this.$=[a[o-1],{type:"addLinks",actor:a[o-1].actor,text:a[o]}];break;case 56:this.$=[a[o-1],{type:"addALink",actor:a[o-1].actor,text:a[o]}];break;case 57:this.$=[a[o-1],{type:"addProperties",actor:a[o-1].actor,text:a[o]}];break;case 58:this.$=[a[o-1],{type:"addDetails",actor:a[o-1].actor,text:a[o]}];break;case 61:this.$=[a[o-2],a[o]];break;case 62:this.$=a[o];break;case 63:this.$=n.PLACEMENT.LEFTOF;break;case 64:this.$=n.PLACEMENT.RIGHTOF;break;case 65: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:n.LINETYPE.ACTIVE_START,actor:a[o-1].actor}];break;case 66: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:n.LINETYPE.ACTIVE_END,actor:a[o-4].actor}];break;case 67: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 68:this.$={type:"addParticipant",actor:a[o]};break;case 69:this.$=n.LINETYPE.SOLID_OPEN;break;case 70:this.$=n.LINETYPE.DOTTED_OPEN;break;case 71:this.$=n.LINETYPE.SOLID;break;case 72:this.$=n.LINETYPE.BIDIRECTIONAL_SOLID;break;case 73:this.$=n.LINETYPE.DOTTED;break;case 74:this.$=n.LINETYPE.BIDIRECTIONAL_DOTTED;break;case 75:this.$=n.LINETYPE.SOLID_CROSS;break;case 76:this.$=n.LINETYPE.DOTTED_CROSS;break;case 77:this.$=n.LINETYPE.SOLID_POINT;break;case 78:this.$=n.LINETYPE.DOTTED_POINT;break;case 79:this.$=n.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,13,14,18,21,23,29,30,31,33,35,36,37,38,39,41,43,44,46,50,52,53,54,59,60,61,62,70],r,{7:7}),{1:[2,1]},{1:[2,2]},{1:[2,3],4:n,5:i,8:8,9:10,12:12,13:a,14:s,17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:E,53:C,54:S,59:_,60:A,61:L,62:N,70:I},e(R,[2,5]),{9:47,12:12,13:a,14:s,17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:E,53:C,54:S,59:_,60:A,61:L,62:N,70:I},e(R,[2,7]),e(R,[2,8]),e(R,[2,14]),{12:48,50:T,52:E,53:C},{15:[1,49]},{5:[1,50]},{5:[1,53],19:[1,51],20:[1,52]},{22:54,70:I},{22:55,70:I},{5:[1,56]},{5:[1,57]},{5:[1,58]},{5:[1,59]},{5:[1,60]},e(R,[2,29]),e(R,[2,30]),{32:[1,61]},{34:[1,62]},e(R,[2,33]),{15:[1,63]},{15:[1,64]},{15:[1,65]},{15:[1,66]},{15:[1,67]},{15:[1,68]},{15:[1,69]},{15:[1,70]},{22:71,70:I},{22:72,70:I},{22:73,70:I},{67:74,71:[1,75],72:[1,76],73:[1,77],74:[1,78],75:[1,79],76:[1,80],77:[1,81],78:[1,82],79:[1,83],80:[1,84]},{55:85,57:[1,86],65:[1,87],66:[1,88]},{22:89,70:I},{22:90,70:I},{22:91,70:I},{22:92,70:I},e([5,51,64,71,72,73,74,75,76,77,78,79,80,81],[2,68]),e(R,[2,6]),e(R,[2,15]),e(M,[2,9],{10:93}),e(R,[2,17]),{5:[1,95],19:[1,94]},{5:[1,96]},e(R,[2,21]),{5:[1,97]},{5:[1,98]},e(R,[2,24]),e(R,[2,25]),e(R,[2,26]),e(R,[2,27]),e(R,[2,28]),e(R,[2,31]),e(R,[2,32]),e(F,r,{7:99}),e(F,r,{7:100}),e(F,r,{7:101}),e(z,r,{40:102,7:103}),e(G,r,{42:104,7:105}),e(G,r,{7:105,42:106}),e(U,r,{45:107,7:108}),e(F,r,{7:109}),{5:[1,111],51:[1,110]},{5:[1,113],51:[1,112]},{5:[1,114]},{22:117,68:[1,115],69:[1,116],70:I},e(D,[2,69]),e(D,[2,70]),e(D,[2,71]),e(D,[2,72]),e(D,[2,73]),e(D,[2,74]),e(D,[2,75]),e(D,[2,76]),e(D,[2,77]),e(D,[2,78]),{22:118,70:I},{22:120,58:119,70:I},{70:[2,63]},{70:[2,64]},{56:121,81:O},{56:123,81:O},{56:124,81:O},{56:125,81:O},{4:[1,128],5:[1,130],11:127,12:129,16:[1,126],50:T,52:E,53:C},{5:[1,131]},e(R,[2,19]),e(R,[2,20]),e(R,[2,22]),e(R,[2,23]),{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[1,132],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:E,53:C,54:S,59:_,60:A,61:L,62:N,70:I},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[1,133],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:E,53:C,54:S,59:_,60:A,61:L,62:N,70:I},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[1,134],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:E,53:C,54:S,59:_,60:A,61:L,62:N,70:I},{16:[1,135]},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[2,46],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,49:[1,136],50:T,52:E,53:C,54:S,59:_,60:A,61:L,62:N,70:I},{16:[1,137]},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[2,44],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,48:[1,138],50:T,52:E,53:C,54:S,59:_,60:A,61:L,62:N,70:I},{16:[1,139]},{16:[1,140]},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[2,42],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,47:[1,141],50:T,52:E,53:C,54:S,59:_,60:A,61:L,62:N,70:I},{4:n,5:i,8:8,9:10,12:12,13:a,14:s,16:[1,142],17:15,18:o,21:l,22:40,23:c,24:19,25:20,26:21,27:22,28:23,29:h,30:u,31:d,33:p,35:g,36:f,37:m,38:y,39:v,41:x,43:b,44:w,46:k,50:T,52:E,53:C,54:S,59:_,60:A,61:L,62:N,70:I},{15:[1,143]},e(R,[2,49]),{15:[1,144]},e(R,[2,51]),e(R,[2,52]),{22:145,70:I},{22:146,70:I},{56:147,81:O},{56:148,81:O},{56:149,81:O},{64:[1,150],81:[2,62]},{5:[2,55]},{5:[2,79]},{5:[2,56]},{5:[2,57]},{5:[2,58]},e(R,[2,16]),e(M,[2,10]),{12:151,50:T,52:E,53:C},e(M,[2,12]),e(M,[2,13]),e(R,[2,18]),e(R,[2,34]),e(R,[2,35]),e(R,[2,36]),e(R,[2,37]),{15:[1,152]},e(R,[2,38]),{15:[1,153]},e(R,[2,39]),e(R,[2,40]),{15:[1,154]},e(R,[2,41]),{5:[1,155]},{5:[1,156]},{56:157,81:O},{56:158,81:O},{5:[2,67]},{5:[2,53]},{5:[2,54]},{22:159,70:I},e(M,[2,11]),e(z,r,{7:103,40:160}),e(G,r,{7:105,42:161}),e(U,r,{7:108,45:162}),e(R,[2,48]),e(R,[2,50]),{5:[2,65]},{5:[2,66]},{81:[2,61]},{16:[2,47]},{16:[2,45]},{16:[2,43]}],defaultActions:{5:[2,1],6:[2,2],87:[2,63],88:[2,64],121:[2,55],122:[2,79],123:[2,56],124:[2,57],125:[2,58],147:[2,67],148:[2,53],149:[2,54],157:[2,65],158:[2,66],159:[2,61],160:[2,47],161:[2,45],162:[2,43]},parseError: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,n=[0],i=[],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"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0\->:\n,;]+?([\-]*[^\<->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\<->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\<->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68],inclusive:!0}}};e.lexer=B,me(P,"Parser"),(G2t=new((P.prototype=e).Parser=P)).parser=G2t,U2t=G2t}),Avt=t(()=>{mu(),e(),$pt(),th(),fu(),q2t={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},j2t={FILLED:0,OPEN:1},W2t={LEFTOF:0,RIGHTOF:1,OVER:2},Y2t=class{constructor(){this.state=new Ppt(()=>({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=ch,this.setAccDescription=uh,this.setDiagramTitle=ph,this.getAccTitle=hh,this.getAccDescription=dh,this.getDiagramTitle=gh,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(D().wrap),this.LINETYPE=q2t,this.ARROWTYPE=j2t,this.PLACEMENT=W2t}static{me(this,"SequenceDB")}addBox(t){this.state.records.boxes.push({name:t.text,wrap:t.wrap??this.autoWrap(),fill:t.color,actorKeys:[]}),this.state.records.currentBox=this.state.records.boxes.slice(-1)[0]}addActor(t,e,r,n){let i=this.state.records.currentBox,a=this.state.records.actors.get(t);if(a){if(this.state.records.currentBox&&a.box&&this.state.records.currentBox!==a.box)throw new Error(`A same participant should only be defined in one Box: ${a.name} can't be in '${a.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(i=a.box||this.state.records.currentBox,a.box=i,a&&e===a.name&&null==r)return}null==r?.text&&(r={text:e,type:n}),null!=n&&null!=r.text||(r={text:e,type:n}),this.state.records.actors.set(t,{box:i,name:e,description:r.text,wrap:r.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:n??"participant"}),this.state.records.prevActor&&(e=this.state.records.actors.get(this.state.records.prevActor))&&(e.nextActor=t),this.state.records.currentBox&&this.state.records.currentBox.actorKeys.push(t),this.state.records.prevActor=t}activationCount(t){let e,r=0;if(!t)return 0;for(e=0;e>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},a;return this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t,to:e,message:r?.text??"",wrap:r?.wrap??this.autoWrap(),type:n,activate:i}),!0}hasAtLeastOneBox(){return 0t.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(t){return this.state.records.actors.get(t)}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(t){this.state.records.wrapEnabled=t}extractWrap(t){if(void 0===t)return{};t=t.trim();var e=null!==/^:?wrap:/.exec(t)||null===/^:?nowrap:/.exec(t)&&void 0;return{cleanedText:(void 0===e?t:t.replace(/^:?(?:no)?wrap:/,"")).trim(),wrap:e}}autoWrap(){return void 0!==this.state.records.wrapEnabled?this.state.records.wrapEnabled:D().sequence?.wrap??!1}clear(){this.state.reset(),lh()}parseMessage(t){var t=t.trim(),{wrap:t,cleanedText:e}=this.extractWrap(t),e={text:e,wrap:t};return M.debug("parseMessage: "+JSON.stringify(e)),e}parseBoxData(t){let e=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(t),r=e?.[1]?e[1].trim():"transparent",n=e?.[2]?e[2].trim():void 0;window?.CSS?window.CSS.supports("color",r)||(r="transparent",n=t.trim()):((i=(new Option).style).color=r,i.color!==r&&(r="transparent",n=t.trim()));var{wrap:i,cleanedText:t}=this.extractWrap(n);return{text:t?Sc(t,D()):void 0,color:r,wrap:i}}addNote(t,e,r){var n={actor:t,placement:e,message:r.text,wrap:r.wrap??this.autoWrap()},t=[].concat(t,t);this.state.records.notes.push(n),this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:t[0],to:t[1],message:r.text,wrap:r.wrap??this.autoWrap(),type:this.LINETYPE.NOTE,placement:e})}addLinks(e,r){e=this.getActor(e);try{let t=Sc(r.text,D());t=(t=t.replace(/=/g,"=")).replace(/&/g,"&");var n=JSON.parse(t);this.insertLinks(e,n)}catch(t){M.error("error while parsing actor link text",t)}}addALink(a,s){a=this.getActor(a);try{let t={},e=Sc(s.text,D()),r=e.indexOf("@"),n=(e=(e=e.replace(/=/g,"=")).replace(/&/g,"&")).slice(0,r-1).trim(),i=e.slice(r+1).trim();t[n]=i,this.insertLinks(a,t)}catch(t){M.error("error while parsing actor link text",t)}}insertLinks(t,e){if(null==t.links)t.links=e;else for(var r in e)t.links[r]=e[r]}addProperties(t,e){t=this.getActor(t);try{var r=Sc(e.text,D()),n=JSON.parse(r);this.insertProperties(t,n)}catch(t){M.error("error while parsing actor properties text",t)}}insertProperties(t,e){if(null==t.properties)t.properties=e;else for(var r in e)t.properties[r]=e[r]}boxEnd(){this.state.records.currentBox=void 0}addDetails(t,e){t=this.getActor(t),e=document.getElementById(e.text);try{var r=e.innerHTML,n=JSON.parse(r);n.properties&&this.insertProperties(t,n.properties),n.links&&this.insertLinks(t,n.links)}catch(t){M.error("error while parsing actor details text",t)}}getActorProperty(t,e){if(void 0!==t?.properties)return t.properties[e]}apply(t){if(Array.isArray(t))t.forEach(t=>{this.apply(t)});else switch(t.type){case"sequenceIndex":this.state.records.messages.push({id:this.state.records.messages.length.toString(),from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":this.addActor(t.actor,t.actor,t.description,t.draw);break;case"createParticipant":if(this.state.records.actors.has(t.actor))throw new Error("It is not possible to have actors with the same id, even if one is destroyed before the next is created. Use 'AS' aliases to simulate the behavior");this.state.records.lastCreated=t.actor,this.addActor(t.actor,t.actor,t.description,t.draw),this.state.records.createdActors.set(t.actor,this.state.records.messages.length);break;case"destroyParticipant":this.state.records.lastDestroyed=t.actor,this.state.records.destroyedActors.set(t.actor,this.state.records.messages.length);break;case"activeStart":case"activeEnd":this.addSignal(t.actor,void 0,void 0,t.signalType);break;case"addNote":this.addNote(t.actor,t.placement,t.text);break;case"addLinks":this.addLinks(t.actor,t.text);break;case"addALink":this.addALink(t.actor,t.text);break;case"addProperties":this.addProperties(t.actor,t.text);break;case"addDetails":this.addDetails(t.actor,t.text);break;case"addMessage":if(this.state.records.lastCreated){if(t.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(t.to!==this.state.records.lastDestroyed&&t.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(t.from,t.to,t.msg,t.signalType,t.activate);break;case"boxStart":this.addBox(t.boxData);break;case"boxEnd":this.boxEnd();break;case"loopStart":this.addSignal(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"rectStart":this.addSignal(void 0,void 0,t.color,t.signalType);break;case"rectEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"optStart":this.addSignal(void 0,void 0,t.optText,t.signalType);break;case"optEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"altStart":case"else":this.addSignal(void 0,void 0,t.altText,t.signalType);break;case"altEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":ch(t.text);break;case"parStart":case"and":this.addSignal(void 0,void 0,t.parText,t.signalType);break;case"parEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"criticalStart":this.addSignal(void 0,void 0,t.criticalText,t.signalType);break;case"option":this.addSignal(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":this.addSignal(void 0,void 0,void 0,t.signalType);break;case"breakStart":this.addSignal(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":this.addSignal(void 0,void 0,void 0,t.signalType)}}getConfig(){return D().sequence}}}),Lvt=t(()=>{H2t=me(t=>`.actor { - stroke: ${t.actorBorder}; - fill: ${t.actorBkg}; +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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,;]+?([\-]*[^\<->\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:par_over\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\<->\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\<->\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:<<->>)/i,/^(?:-->>)/i,/^(?:<<-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]*)/i,/^(?::)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[45,46],inclusive:!1},acc_descr:{rules:[43],inclusive:!1},acc_title:{rules:[41],inclusive:!1},ID:{rules:[2,3,12],inclusive:!1},ALIAS:{rules:[2,3,13,14],inclusive:!1},LINE:{rules:[2,3,26],inclusive:!1},INITIAL:{rules:[0,1,3,4,5,6,7,8,9,10,11,15,16,17,18,19,20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36,37,38,39,40,42,44,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68],inclusive:!0}}};t.lexer=B,mt(P,"Parser"),(nxe=new((P.prototype=t).Parser=P)).parser=nxe,ixe=nxe}),jxe=e(()=>{mu(),t(),t1e(),eh(),fu(),axe={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},sxe={FILLED:0,OPEN:1},oxe={LEFTOF:0,RIGHTOF:1,OVER:2},lxe=class{constructor(){this.state=new Qge(()=>({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=ch,this.setAccDescription=uh,this.setDiagramTitle=ph,this.getAccTitle=hh,this.getAccDescription=dh,this.getDiagramTitle=gh,this.apply=this.apply.bind(this),this.parseBoxData=this.parseBoxData.bind(this),this.parseMessage=this.parseMessage.bind(this),this.clear(),this.setWrap(D().wrap),this.LINETYPE=axe,this.ARROWTYPE=sxe,this.PLACEMENT=oxe}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,n){let i=this.state.records.currentBox,a=this.state.records.actors.get(e);if(a){if(this.state.records.currentBox&&a.box&&this.state.records.currentBox!==a.box)throw new Error(`A same participant should only be defined in one Box: ${a.name} can't be in '${a.box.name}' and in '${this.state.records.currentBox.name}' at the same time.`);if(i=a.box||this.state.records.currentBox,a.box=i,a&&t===a.name&&null==r)return}null==r?.text&&(r={text:t,type:n}),null!=n&&null!=r.text||(r={text:t,type:n}),this.state.records.actors.set(e,{box:i,name:t,description:r.text,wrap:r.wrap??this.autoWrap(),prevActor:this.state.records.prevActor,links:{},properties:{},actorCnt:null,rectData:null,type:n??"participant"}),this.state.records.prevActor&&(t=this.state.records.actors.get(this.state.records.prevActor))&&(t.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'"]},a;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:n,activate:i}),!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:D().sequence?.wrap??!1}clear(){this.state.reset(),lh()}parseMessage(e){var e=e.trim(),{wrap:e,cleanedText:t}=this.extractWrap(e),t={text:t,wrap:e};return M.debug("parseMessage: "+JSON.stringify(t)),t}parseBoxData(e){let t=/^((?:rgba?|hsla?)\s*\(.*\)|\w*)(.*)$/.exec(e),r=t?.[1]?t[1].trim():"transparent",n=t?.[2]?t[2].trim():void 0;window?.CSS?window.CSS.supports("color",r)||(r="transparent",n=e.trim()):((i=(new Option).style).color=r,i.color!==r&&(r="transparent",n=e.trim()));var{wrap:i,cleanedText:e}=this.extractWrap(n);return{text:e?_c(e,D()):void 0,color:r,wrap:i}}addNote(e,t,r){var n={actor:e,placement:t,message:r.text,wrap:r.wrap??this.autoWrap()},e=[].concat(e,e);this.state.records.notes.push(n),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=_c(r.text,D());e=(e=e.replace(/=/g,"=")).replace(/&/g,"&");var n=JSON.parse(e);this.insertLinks(t,n)}catch(e){M.error("error while parsing actor link text",e)}}addALink(a,s){a=this.getActor(a);try{let e={},t=_c(s.text,D()),r=t.indexOf("@"),n=(t=(t=t.replace(/=/g,"=")).replace(/&/g,"&")).slice(0,r-1).trim(),i=t.slice(r+1).trim();e[n]=i,this.insertLinks(a,e)}catch(e){M.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=_c(t.text,D()),n=JSON.parse(r);this.insertProperties(e,n)}catch(e){M.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,n=JSON.parse(r);n.properties&&this.insertProperties(e,n.properties),n.links&&this.insertLinks(e,n.links)}catch(e){M.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);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),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"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);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":ch(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 D().sequence}}}),Wxe=e(()=>{cxe=mt(e=>`.actor { + stroke: ${e.actorBorder}; + fill: ${e.actorBkg}; } text.actor > tspan { - fill: ${t.actorTextColor}; + fill: ${e.actorTextColor}; stroke: none; } .actor-line { - stroke: ${t.actorLineColor}; + stroke: ${e.actorLineColor}; } .messageLine0 { stroke-width: 1.5; stroke-dasharray: none; - stroke: ${t.signalColor}; + stroke: ${e.signalColor}; } .messageLine1 { stroke-width: 1.5; stroke-dasharray: 2, 2; - stroke: ${t.signalColor}; + stroke: ${e.signalColor}; } #arrowhead path { - fill: ${t.signalColor}; - stroke: ${t.signalColor}; + fill: ${e.signalColor}; + stroke: ${e.signalColor}; } .sequenceNumber { - fill: ${t.sequenceNumberColor}; + fill: ${e.sequenceNumberColor}; } #sequencenumber { - fill: ${t.signalColor}; + fill: ${e.signalColor}; } #crosshead path { - fill: ${t.signalColor}; - stroke: ${t.signalColor}; + fill: ${e.signalColor}; + stroke: ${e.signalColor}; } .messageText { - fill: ${t.signalTextColor}; + fill: ${e.signalTextColor}; stroke: none; } .labelBox { - stroke: ${t.labelBoxBorderColor}; - fill: ${t.labelBoxBkgColor}; + stroke: ${e.labelBoxBorderColor}; + fill: ${e.labelBoxBkgColor}; } .labelText, .labelText > tspan { - fill: ${t.labelTextColor}; + fill: ${e.labelTextColor}; stroke: none; } .loopText, .loopText > tspan { - fill: ${t.loopTextColor}; + fill: ${e.loopTextColor}; stroke: none; } .loopLine { stroke-width: 2px; stroke-dasharray: 2, 2; - stroke: ${t.labelBoxBorderColor}; - fill: ${t.labelBoxBorderColor}; + stroke: ${e.labelBoxBorderColor}; + fill: ${e.labelBoxBorderColor}; } .note { //stroke: #decc93; - stroke: ${t.noteBorderColor}; - fill: ${t.noteBkgColor}; + stroke: ${e.noteBorderColor}; + fill: ${e.noteBkgColor}; } .noteText, .noteText > tspan { - fill: ${t.noteTextColor}; + fill: ${e.noteTextColor}; stroke: none; } .activation0 { - fill: ${t.activationBkgColor}; - stroke: ${t.activationBorderColor}; + fill: ${e.activationBkgColor}; + stroke: ${e.activationBorderColor}; } .activation1 { - fill: ${t.activationBkgColor}; - stroke: ${t.activationBorderColor}; + fill: ${e.activationBkgColor}; + stroke: ${e.activationBorderColor}; } .activation2 { - fill: ${t.activationBkgColor}; - stroke: ${t.activationBorderColor}; + fill: ${e.activationBkgColor}; + stroke: ${e.activationBorderColor}; } .actorPopupMenu { @@ -1368,28 +1368,28 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l .actorPopupMenuPanel { position: absolute; - fill: ${t.actorBkg}; + 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 line { - stroke: ${t.actorBorder}; - fill: ${t.actorBkg}; + stroke: ${e.actorBorder}; + fill: ${e.actorBkg}; } .actor-man circle, line { - stroke: ${t.actorBorder}; - fill: ${t.actorBkg}; + stroke: ${e.actorBorder}; + fill: ${e.actorBkg}; stroke-width: 2px; } -`,"getStyles"),V2t=H2t}),Nvt=t(()=>{function e(t,e,r,n,i,a,s){g(e.append("text").attr("x",r).attr("y",n).style("text-anchor","start").text(t),s)}function l(t,e,r,n,i,a,s,o){var{actorFontSize:l,actorFontFamily:c,actorFontWeight:h}=o,u=t.split(L.lineBreakRegex);for(let t=0;tr?o.width:r);if((t=l.append("rect")).attr("class","actorPopupMenuPanel"+i),t.attr("x",o.x),t.attr("y",o.height),t.attr("fill",o.fill),t.attr("stroke",o.stroke),t.attr("width",c),t.attr("height",o.height),t.attr("rx",o.rx),t.attr("ry",o.ry),null!=a){var h,u=20;for(h in a){var d=l.append("a"),p=(0,X2t.sanitizeUrl)(a[h]);d.attr("xlink:href",p),d.attr("target","_blank"),Evt(n)(h,d,o.x+10,o.height+u,c,20,{class:"actor"},n),u+=30}}return t.attr("height",u),{height:o.height+u,width:c}},"drawPopup"),tvt=me(function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),evt=me(async function(n,i,a=null){var s=n.append("foreignObject"),o=await Wc(i.text,Ir()),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"===i.class)(n=n.node().firstChild).setAttribute("height",o.height+2*i.textMargin),n=n.getBBox(),s.attr("x",Math.round(n.x+n.width/2-o.width/2)).attr("y",Math.round(n.y+n.height/2-o.height/2));else if(a){let{startx:t,stopx:e,starty:r}=a;t>e&&(n=t,t=e,e=n),s.attr("x",Math.round(t+Math.abs(t-e)/2-o.width/2)),"loopText"===i.class?s.attr("y",Math.round(r)):s.attr("y",Math.round(r-o.height))}return[s]},"drawKatex"),rvt=me(function(t,e){let r=0,n=0,i=e.text.split(L.lineBreakRegex),[a,s]=YE(e.fontSize),o=[],l=0,c=me(()=>e.y,"yfunc");if(void 0!==e.valign&&void 0!==e.textMargin&&0Math.round(e.y+e.textMargin),"yfunc");break;case"middle":case"center":c=me(()=>Math.round(e.y+(r+n+e.textMargin)/2),"yfunc");break;case"bottom":case"end":c=me(()=>Math.round(e.y+(r+n+2*e.textMargin)-e.textMargin),"yfunc")}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle"}for(var[h,u]of i.entries()){void 0!==e.textMargin&&0===e.textMargin&&void 0!==a&&(l=h*a),(h=t.append("text")).attr("x",e.x),h.attr("y",c()),void 0!==e.anchor&&h.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&h.style("font-family",e.fontFamily),void 0!==s&&h.style("font-size",s),void 0!==e.fontWeight&&h.style("font-weight",e.fontWeight),void 0!==e.fill&&h.attr("fill",e.fill),void 0!==e.class&&h.attr("class",e.class),void 0!==e.dy?h.attr("dy",e.dy):0!==l&&h.attr("dy",l);var d,u=u||TE;(e.tspan?((d=h.append("tspan")).attr("x",e.x),void 0!==e.fill&&d.attr("fill",e.fill),d):h).text(u),void 0!==e.valign&&void 0!==e.textMargin&&0{r.select&&t.forEach(t=>{var t=n.get(t),e=r.select("#actor"+t.actorCnt);!i.mirrorActors&&t.stopy?e.attr("y2",t.stopy+t.height/2):i.mirrorActors&&e.attr("y2",t.stopy)})},"fixLifeLineHeights"),svt=me(function(t,e,r,n){var i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+e.height,o=t=t.append("g").lower(),s=(n||(ivt++,Object.keys(e.links||{}).length&&!r.forceMenus&&o.attr("onclick",tvt(`actor${ivt}_popup`)).attr("cursor","pointer"),o.append("line").attr("id","actor"+ivt).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),o=t.append("g"),e.actorCnt=ivt,null!=e.links&&o.attr("id","root-"+ivt)),T3()),a="actor",t=(e.properties?.class?a=e.properties.class:s.fill="#eaeaea",a+=n?" "+Z2t:" actor-top",s.x=e.x,s.y=i,s.width=e.width,s.height=e.height,s.class=a,s.rx=3,s.ry=3,s.name=e.name,Q2t(o,s));e.rectData=s,e.properties?.icon&&("@"===(n=e.properties.icon.trim()).charAt(0)?k3(o,s.x+s.width-20,s.y+10,n.substr(1)):w3(o,s.x+s.width-20,s.y+10,n)),Tvt(r,qc(e.description))(e.description,o,s.x,s.y,s.width,s.height,{class:"actor actor-box"},r);let l=e.height;return t.node&&(i=t.node().getBBox(),e.height=i.height,l=i.height),l},"drawActorTypeParticipant"),ovt=me(function(t,e,r,n){var i=n?e.stopy:e.starty,a=e.x+e.width/2,s=i+80,o=t.append("g").lower(),l=(n||(ivt++,o.append("line").attr("id","actor"+ivt).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",e.name),e.actorCnt=ivt),t.append("g")),c="actor-man";return l.attr("class",c+=n?" "+Z2t:" actor-top"),l.attr("name",e.name),(o=T3()).x=e.x,o.y=i,o.fill="#eaeaea",o.width=e.width,o.height=e.height,o.class="actor",o.rx=3,o.ry=3,l.append("line").attr("id","actor-man-torso"+ivt).attr("x1",a).attr("y1",i+25).attr("x2",a).attr("y2",i+45),l.append("line").attr("id","actor-man-arms"+ivt).attr("x1",a-K2t/2).attr("y1",i+33).attr("x2",a+K2t/2).attr("y2",i+33),l.append("line").attr("x1",a-K2t/2).attr("y1",i+60).attr("x2",a).attr("y2",i+45),l.append("line").attr("x1",a).attr("y1",i+45).attr("x2",a+K2t/2-2).attr("y2",i+60),(s=l.append("circle")).attr("cx",e.x+e.width/2),s.attr("cy",i+10),s.attr("r",15),s.attr("width",e.width),s.attr("height",e.height),t=l.node().getBBox(),e.height=t.height,Tvt(r,qc(e.description))(e.description,l,o.x,o.y+35,o.width,o.height,{class:"actor actor-man"},r),e.height},"drawActorTypeActor"),lvt=me(async function(t,e,r,n){switch(e.type){case"actor":return ovt(t,e,r,n);case"participant":return svt(t,e,r,n)}},"drawActor"),cvt=me(function(t,e,r){t=t.append("g"),pvt(t,e),e.name&&Tvt(r)(e.name,t,e.x,e.y+(e.textMaxHeight||0)/2,e.width,0,{class:"text"},r),t.lower()},"drawBox"),hvt=me(function(t){return t.append("g")},"anchorElement"),uvt=me(function(t,e,r,n,i){var a=T3(),s=e.anchored;a.x=e.startx,a.y=e.starty,a.class="activation"+i%3,a.width=e.stopx-e.startx,a.height=r-e.starty,Q2t(s,a)},"drawActivation"),dvt=me(async function(t,e,r,n){let{boxMargin:i,boxTextMargin:a,labelBoxHeight:s,labelBoxWidth:o,messageFontFamily:l,messageFontSize:c,messageFontWeight:h}=n,u=t.append("g"),d=me(function(t,e,r,n){return u.append("line").attr("x1",t).attr("y1",e).attr("x2",r).attr("y2",n).attr("class","loopLine")},"drawLoopLine"),p=(d(e.startx,e.starty,e.stopx,e.starty),d(e.stopx,e.starty,e.stopx,e.stopy),d(e.startx,e.stopy,e.stopx,e.stopy),d(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach(function(t){d(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}),E3());p.text=r,p.x=e.startx,p.y=e.starty,p.fontFamily=l,p.fontSize=c,p.fontWeight=h,p.anchor="middle",p.valign="middle",p.tspan=!1,p.width=o||50,p.height=s||20,p.textMargin=a,p.class="labelText",nvt(u,p),(p=wvt()).text=e.title,p.x=e.startx+o/2+(e.stopx-e.startx)/2,p.y=e.starty+i+a,p.anchor="middle",p.valign="middle",p.textMargin=a,p.class="loopText",p.fontFamily=l,p.fontSize=c,p.fontWeight=h,p.wrap=!0;var g=qc(p.text)?await evt(u,p,e):rvt(u,p);if(void 0!==e.sectionTitles)for(var[f,m]of Object.entries(e.sectionTitles))m.message&&(p.text=m.message,p.x=e.startx+(e.stopx-e.startx)/2,p.y=e.sections[f].y+i+a,p.class="loopText",p.anchor="middle",p.valign="middle",p.tspan=!1,p.fontFamily=l,p.fontSize=c,p.fontWeight=h,p.wrap=e.wrap,qc(p.text)?(e.starty=e.sections[f].y,await evt(u,p,e)):rvt(u,p),m=Math.round(g.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e)),e.sections[f].height+=m-(i+a));return e.height=Math.round(e.stopy-e.starty),u},"drawLoop"),pvt=me(function(t,e){x3(t,e)},"drawBackgroundRect"),gvt=me(function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),fvt=me(function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),mvt=me(function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),yvt=me(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),vvt=me(function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),xvt=me(function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),bvt=me(function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),wvt=me(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"),kvt=me(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),me(n,"byText"),me(c,"byTspan"),me(i,"byFo"),me(a,"byKatex"),me(f,"_setTextAttrs"),Tvt=function(t,e=!1){return e?a:"fo"===t.textPlacement?i:"old"===t.textPlacement?n:c},me(e,"byText"),me(l,"byTspan"),me(r,"byFo"),me(g,"_setTextAttrs"),Evt=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:l},Cvt={drawRect:Q2t,drawText:rvt,drawLabel:nvt,drawActor:lvt,drawBox:cvt,drawPopup:J2t,anchorElement:hvt,drawActivation:uvt,drawLoop:dvt,drawBackgroundRect:pvt,insertArrowHead:yvt,insertArrowFilledHead:vvt,insertSequenceNumber:xvt,insertArrowCrossHead:bvt,insertDatabaseIcon:gvt,insertComputerIcon:fvt,insertClockIcon:mvt,getTextObj:wvt,getNoteRect:kvt,fixLifeLineHeights:avt,sanitizeUrl:X2t.sanitizeUrl}});async function Ivt(t,e){P.bumpVerticalPos(10);var{startx:r,stopx:n,message:i}=e,a=L.splitBreaks(i).length,s=qc(i),i=s?await jc(i,D()):HE.calculateTextDimensions(i,Bvt(O));s||(s=i.height/a,e.height+=s,P.bumpVerticalPos(s));let o,l=i.height-10,c=i.width;return r===n?(o=P.getVerticalPos()+l,O.rightAngles||(l+=O.boxMargin,o=P.getVerticalPos()+l),l+=30,a=L.getMax(c/2,O.width/2),P.insert(r-a,P.getVerticalPos()-10+l,n+a,P.getVerticalPos()+30+l)):(l+=O.boxMargin,o=P.getVerticalPos()+l,P.insert(r,o-10,n,o)),P.bumpVerticalPos(l),e.height+=l,e.stopy=e.starty+e.height,P.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),o}function Rvt(t,e,r,n,i){P.bumpVerticalPos(r);let a=n;e.id&&e.message&&t[e.id]&&(r=t[e.id].width,t=Bvt(O),e.message=HE.wrapLabel(`[${e.message}]`,r-2*O.wrapPadding,t),e.width=r,e.wrap=!0,r=HE.calculateTextDimensions(e.message,t),t=L.getMax(r.height,O.labelBoxHeight),a=n+t,M.debug(t+" - "+e.message)),i(e),P.bumpVerticalPos(a)}function Mvt(r,n,t,e,i,a,s){function o(t,e){t.x{var e=Bvt(O),r=t.actorKeys.reduce((t,e)=>t+(n.get(e).width+(n.get(e).margin||0)),0),e=(r-=2*O.boxTextMargin,t.wrap&&(t.name=HE.wrapLabel(t.name,r-2*O.wrapPadding,e)),HE.calculateTextDimensions(t.name,e)),e=(c=L.getMax(e.height,c),L.getMax(r,e.width+2*O.wrapPadding));t.margin=O.boxTextMargin,rt.textMaxHeight=c),L.getMax(r,O.height)}var O,P,Pvt,Bvt,Fvt,$vt,zvt,Gvt,Uvt,qvt,jvt,Wvt,Yvt,Hvt,Vvt,Xvt,Kvt,Zvt,Qvt,Jvt=t(()=>{Q3(),Nvt(),e(),th(),th(),ew(),mu(),jr(),ZE(),eh(),O={},P={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:me(function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map(t=>t.height||0))+(0===this.loops.length?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.messages.length?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(0===this.notes.length?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},"getHeight"),clear:me(function(){this.actors=[],this.boxes=[],this.loops=[],this.messages=[],this.notes=[]},"clear"),addBox:me(function(t){this.boxes.push(t)},"addBox"),addActor:me(function(t){this.actors.push(t)},"addActor"),addLoop:me(function(t){this.loops.push(t)},"addLoop"),addMessage:me(function(t){this.messages.push(t)},"addMessage"),addNote:me(function(t){this.notes.push(t)},"addNote"),lastActor:me(function(){return this.actors[this.actors.length-1]},"lastActor"),lastLoop:me(function(){return this.loops[this.loops.length-1]},"lastLoop"),lastMessage:me(function(){return this.messages[this.messages.length-1]},"lastMessage"),lastNote:me(function(){return this.notes[this.notes.length-1]},"lastNote"),actors:[],boxes:[],loops:[],messages:[],notes:[]},init:me(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,jvt(D())},"init"),updateVal:me(function(t,e,r,n){void 0===t[e]?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:me(function(n,i,a,s){let o=this,l=0;function t(r){return me(function(t){l++;var e=o.sequenceItems.length-l+1;o.updateVal(t,"starty",i-e*O.boxMargin,Math.min),o.updateVal(t,"stopy",s+e*O.boxMargin,Math.max),o.updateVal(P.data,"startx",n-e*O.boxMargin,Math.min),o.updateVal(P.data,"stopx",a+e*O.boxMargin,Math.max),"activation"!==r&&(o.updateVal(t,"startx",n-e*O.boxMargin,Math.min),o.updateVal(t,"stopx",a+e*O.boxMargin,Math.max),o.updateVal(P.data,"starty",i-e*O.boxMargin,Math.min),o.updateVal(P.data,"stopy",s+e*O.boxMargin,Math.max))},"updateItemBounds")}me(t,"updateFn"),this.sequenceItems.forEach(t()),this.activations.forEach(t("activation"))},"updateBounds"),insert:me(function(t,e,r,n){var i=L.getMin(t,r),t=L.getMax(t,r),r=L.getMin(e,n),e=L.getMax(e,n);this.updateVal(P.data,"startx",i,Math.min),this.updateVal(P.data,"starty",r,Math.min),this.updateVal(P.data,"stopx",t,Math.max),this.updateVal(P.data,"stopy",e,Math.max),this.updateBounds(i,r,t,e)},"insert"),newActivation:me(function(t,e,r){var r=r.get(t.from),n=Wvt(t.from).length||0,r=r.x+r.width/2+(n-1)*O.activationWidth/2;this.activations.push({startx:r,starty:this.verticalPos+2,stopx:r+O.activationWidth,stopy:void 0,actor:t.from,anchored:Cvt.anchorElement(e)})},"newActivation"),endActivation:me(function(t){return t=this.activations.map(function(t){return t.actor}).lastIndexOf(t.from),this.activations.splice(t,1)[0]},"endActivation"),createLoop:me(function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},"createLoop"),newLoop:me(function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},"newLoop"),endLoop:me(function(){return this.sequenceItems.pop()},"endLoop"),isLoopOverlap:me(function(){return!!this.sequenceItems.length&&this.sequenceItems[this.sequenceItems.length-1].overlap},"isLoopOverlap"),addSectionToLoop:me(function(t){var e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:P.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},"addSectionToLoop"),saveVerticalPos:me(function(){this.isLoopOverlap()&&(this.savedVerticalPos=this.verticalPos)},"saveVerticalPos"),resetVerticalPos:me(function(){this.isLoopOverlap()&&(this.verticalPos=this.savedVerticalPos)},"resetVerticalPos"),bumpVerticalPos:me(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=L.getMax(this.data.stopy,this.verticalPos)},"bumpVerticalPos"),getVerticalPos:me(function(){return this.verticalPos},"getVerticalPos"),getBounds:me(function(){return{bounds:this.data,models:this.models}},"getBounds")},Pvt=me(async function(t,e){P.bumpVerticalPos(O.boxMargin),e.height=O.boxMargin,e.starty=P.getVerticalPos();var r=T3(),t=(r.x=e.startx,r.y=e.starty,r.width=e.width||O.width,r.class="note",t.append("g")),n=Cvt.drawRect(t,r),t=((i=E3()).x=e.startx,i.y=e.starty,i.width=r.width,i.dy="1em",i.text=e.message,i.class="noteText",i.fontFamily=O.noteFontFamily,i.fontSize=O.noteFontSize,i.fontWeight=O.noteFontWeight,i.anchor=O.noteAlign,i.textMargin=O.noteMargin,i.valign="center",qc(i.text)?await evt(t,i):rvt(t,i)),i=Math.round(t.map(t=>(t._groups||t)[0][0].getBBox().height).reduce((t,e)=>t+e));n.attr("height",i+2*O.noteMargin),e.height+=i+2*O.noteMargin,P.bumpVerticalPos(i+2*O.noteMargin),e.stopy=e.starty+i+2*O.noteMargin,e.stopx=e.startx+r.width,P.insert(e.startx,e.starty,e.stopx,e.stopy),P.models.addNote(e)},"drawNote"),Bvt=me(t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),"messageFont"),Fvt=me(t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),"noteFont"),$vt=me(t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),"actorFont"),me(Ivt,"boundMessage"),zvt=me(async function(t,e,r,n){var{startx:e,stopx:i,starty:a,message:s,type:o,sequenceIndex:l,sequenceVisible:c}=e,h=HE.calculateTextDimensions(s,Bvt(O)),u=E3();u.x=e,u.y=a+10,u.width=i-e,u.class="messageText",u.dy="1em",u.text=s,u.fontFamily=O.messageFontFamily,u.fontSize=O.messageFontSize,u.fontWeight=O.messageFontWeight,u.anchor=O.messageAlign,u.valign="center",u.textMargin=O.wrapPadding,u.tspan=!1,qc(u.text)?await evt(t,u,{startx:e,stopx:i,starty:r}):rvt(t,u);let d=h.width,p,g=(e===i?p=O.rightAngles?t.append("path").attr("d",`M ${e},${r} H ${e+L.getMax(O.width/2,d/2)} V ${r+25} H `+e):t.append("path").attr("d","M "+e+","+r+" C "+(e+60)+","+(r-10)+" "+(e+60)+","+(r+30)+" "+e+","+(r+20)):((p=t.append("line")).attr("x1",e),p.attr("y1",r),p.attr("x2",i),p.attr("y2",r)),o===n.db.LINETYPE.DOTTED||o===n.db.LINETYPE.DOTTED_CROSS||o===n.db.LINETYPE.DOTTED_POINT||o===n.db.LINETYPE.DOTTED_OPEN||o===n.db.LINETYPE.BIDIRECTIONAL_DOTTED?(p.style("stroke-dasharray","3, 3"),p.attr("class","messageLine1")):p.attr("class","messageLine0"),"");O.arrowMarkerAbsolute&&(g=Mc(!0)),p.attr("stroke-width",2),p.attr("stroke","none"),p.style("fill","none"),o!==n.db.LINETYPE.SOLID&&o!==n.db.LINETYPE.DOTTED||p.attr("marker-end","url("+g+"#arrowhead)"),o!==n.db.LINETYPE.BIDIRECTIONAL_SOLID&&o!==n.db.LINETYPE.BIDIRECTIONAL_DOTTED||(p.attr("marker-start","url("+g+"#arrowhead)"),p.attr("marker-end","url("+g+"#arrowhead)")),o!==n.db.LINETYPE.SOLID_POINT&&o!==n.db.LINETYPE.DOTTED_POINT||p.attr("marker-end","url("+g+"#filled-head)"),o!==n.db.LINETYPE.SOLID_CROSS&&o!==n.db.LINETYPE.DOTTED_CROSS||p.attr("marker-end","url("+g+"#crosshead)"),(c||O.showSequenceNumbers)&&(p.attr("marker-start","url("+g+"#sequencenumber)"),t.append("text").attr("x",e).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(l))},"drawMessage"),Gvt=me(function(t,e,r,n,i,a,s){let o=0,l=0,c,h=0;for(var u of n){var d=(u=e.get(u)).box;c&&c!=d&&(s||P.models.addBox(c),l+=O.boxMargin+c.margin),d&&d!=c&&(s||(d.x=o+l,d.y=i),l+=d.margin),u.width=u.width||O.width,u.height=L.getMax(u.height||O.height,O.height),u.margin=u.margin||O.actorMargin,h=L.getMax(h,u.height),r.get(u.name)&&(l+=u.width/2),u.x=o+l,u.starty=P.getVerticalPos(),P.insert(u.x,i,u.x+u.width,u.height),o+=u.width+l,u.box&&(u.box.width=o+d.margin-u.box.x),l=u.margin,c=u.box,P.models.addActor(u)}c&&!s&&P.models.addBox(c),P.bumpVerticalPos(h)},"addActorRenderingData"),Uvt=me(async function(e,r,n,t){if(t){let t=0;P.bumpVerticalPos(2*O.boxMargin);for(var i of n)(i=r.get(i)).stopy||(i.stopy=P.getVerticalPos()),i=await Cvt.drawActor(e,i,O,!0),t=L.getMax(t,i);P.bumpVerticalPos(t+O.boxMargin)}else for(var a of n)a=r.get(a),await Cvt.drawActor(e,a,O,!1)},"drawActors"),qvt=me(function(t,e,r,n){let i=0,a=0;for(var s of r){var s=e.get(s),o=Vvt(s);(o=Cvt.drawPopup(t,s,o,O,O.forceMenus,n)).height>i&&(i=o.height),o.width+s.x>a&&(a=o.width+s.x)}return{maxHeight:i,maxWidth:a}},"drawActorsPopup"),jvt=me(function(t){ie(O,t),t.fontFamily&&(O.actorFontFamily=O.noteFontFamily=O.messageFontFamily=t.fontFamily),t.fontSize&&(O.actorFontSize=O.noteFontSize=O.messageFontSize=t.fontSize),t.fontWeight&&(O.actorFontWeight=O.noteFontWeight=O.messageFontWeight=t.fontWeight)},"setConf"),Wvt=me(function(e){return P.activations.filter(function(t){return t.actor===e})},"actorActivations"),Yvt=me(function(t,e){return e=e.get(t),[(t=Wvt(t)).reduce(function(t,e){return L.getMin(t,e.startx)},e.x+e.width/2-1),t.reduce(function(t,e){return L.getMax(t,e.stopx)},e.x+e.width/2+1)]},"activationBounds"),me(Rvt,"adjustLoopHeightForWrap"),me(Mvt,"adjustCreatedDestroyedData"),Hvt=me(async function(n,t,e,i){var{securityLevel:r,sequence:a}=D();O=a;let s;"sandbox"===r&&(s=H("#i"+t));var a=H("sandbox"===r?s.nodes()[0].contentDocument.body:"body"),o="sandbox"===r?s.nodes()[0].contentDocument:document;P.init(),M.debug(i.db);let l="sandbox"===r?a.select(`[id="${t}"]`):H(`[id="${t}"]`),c=i.db.getActors(),h=i.db.getCreatedActors(),u=i.db.getDestroyedActors(),d=i.db.getBoxes(),p=i.db.getActorKeys(),g=i.db.getMessages(),f=i.db.getDiagramTitle(),m=i.db.hasAtLeastOneBox(),y=i.db.hasAtLeastOneBoxWithTitle(),v=await Dvt(c,g,i);if(O.height=await Ovt(c,v,d),Cvt.insertComputerIcon(l),Cvt.insertDatabaseIcon(l),Cvt.insertClockIcon(l),m&&(P.bumpVerticalPos(O.boxMargin),y)&&P.bumpVerticalPos(d[0].textMaxHeight),!0===O.hideUnusedParticipants){let e=new Set;g.forEach(t=>{e.add(t.from),e.add(t.to)}),p=p.filter(t=>e.has(t))}Gvt(l,c,h,p,0,g,!1);var x,b,w,k=await Zvt(g,c,v,i);function T(t,e){var r=P.endActivation(t);r.starty+18>e&&(r.starty=e-6,e+=12),Cvt.drawActivation(l,r,e,O,Wvt(t.from).length),P.insert(r.startx,e-10,r.stopx,e)}Cvt.insertArrowHead(l),Cvt.insertArrowCrossHead(l),Cvt.insertArrowFilledHead(l),Cvt.insertSequenceNumber(l),me(T,"activeEnd");let E=1,C=1,_=[],S=[],A=0;for(x of g){let t,e,r;switch(x.type){case i.db.LINETYPE.NOTE:P.resetVerticalPos(),e=x.noteModel,await Pvt(l,e);break;case i.db.LINETYPE.ACTIVE_START:P.newActivation(x,l,c);break;case i.db.LINETYPE.ACTIVE_END:T(x,P.getVerticalPos());break;case i.db.LINETYPE.LOOP_START:Rvt(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,t=>P.newLoop(t));break;case i.db.LINETYPE.LOOP_END:t=P.endLoop(),await Cvt.drawLoop(l,t,"loop",O),P.bumpVerticalPos(t.stopy-P.getVerticalPos()),P.models.addLoop(t);break;case i.db.LINETYPE.RECT_START:Rvt(k,x,O.boxMargin,O.boxMargin,t=>P.newLoop(void 0,t.message));break;case i.db.LINETYPE.RECT_END:t=P.endLoop(),S.push(t),P.models.addLoop(t),P.bumpVerticalPos(t.stopy-P.getVerticalPos());break;case i.db.LINETYPE.OPT_START:Rvt(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,t=>P.newLoop(t));break;case i.db.LINETYPE.OPT_END:t=P.endLoop(),await Cvt.drawLoop(l,t,"opt",O),P.bumpVerticalPos(t.stopy-P.getVerticalPos()),P.models.addLoop(t);break;case i.db.LINETYPE.ALT_START:Rvt(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,t=>P.newLoop(t));break;case i.db.LINETYPE.ALT_ELSE:Rvt(k,x,O.boxMargin+O.boxTextMargin,O.boxMargin,t=>P.addSectionToLoop(t));break;case i.db.LINETYPE.ALT_END:t=P.endLoop(),await Cvt.drawLoop(l,t,"alt",O),P.bumpVerticalPos(t.stopy-P.getVerticalPos()),P.models.addLoop(t);break;case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.PAR_OVER_START:Rvt(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,t=>P.newLoop(t)),P.saveVerticalPos();break;case i.db.LINETYPE.PAR_AND:Rvt(k,x,O.boxMargin+O.boxTextMargin,O.boxMargin,t=>P.addSectionToLoop(t));break;case i.db.LINETYPE.PAR_END:t=P.endLoop(),await Cvt.drawLoop(l,t,"par",O),P.bumpVerticalPos(t.stopy-P.getVerticalPos()),P.models.addLoop(t);break;case i.db.LINETYPE.AUTONUMBER:E=x.message.start||E,C=x.message.step||C,x.message.visible?i.db.enableSequenceNumbers():i.db.disableSequenceNumbers();break;case i.db.LINETYPE.CRITICAL_START:Rvt(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,t=>P.newLoop(t));break;case i.db.LINETYPE.CRITICAL_OPTION:Rvt(k,x,O.boxMargin+O.boxTextMargin,O.boxMargin,t=>P.addSectionToLoop(t));break;case i.db.LINETYPE.CRITICAL_END:t=P.endLoop(),await Cvt.drawLoop(l,t,"critical",O),P.bumpVerticalPos(t.stopy-P.getVerticalPos()),P.models.addLoop(t);break;case i.db.LINETYPE.BREAK_START:Rvt(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,t=>P.newLoop(t));break;case i.db.LINETYPE.BREAK_END:t=P.endLoop(),await Cvt.drawLoop(l,t,"break",O),P.bumpVerticalPos(t.stopy-P.getVerticalPos()),P.models.addLoop(t);break;default:try{(r=x.msgModel).starty=P.getVerticalPos(),r.sequenceIndex=E,r.sequenceVisible=i.db.showSequenceNumbers();var L=await Ivt(l,r);Mvt(x,r,L,A,c,h,u),_.push({messageModel:r,lineStartY:L}),P.models.addMessage(r)}catch(n){M.error("error while drawing message",n)}}[i.db.LINETYPE.SOLID_OPEN,i.db.LINETYPE.DOTTED_OPEN,i.db.LINETYPE.SOLID,i.db.LINETYPE.DOTTED,i.db.LINETYPE.SOLID_CROSS,i.db.LINETYPE.DOTTED_CROSS,i.db.LINETYPE.SOLID_POINT,i.db.LINETYPE.DOTTED_POINT,i.db.LINETYPE.BIDIRECTIONAL_SOLID,i.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(x.type)&&(E+=C),A++}M.debug("createdActors",h),M.debug("destroyedActors",u),await Uvt(l,c,p,!1);for(b of _)await zvt(l,b.messageModel,b.lineStartY,i);O.mirrorActors&&await Uvt(l,c,p,!0),S.forEach(t=>Cvt.drawBackgroundRect(l,t)),avt(l,c,p,O);for(w of P.models.boxes)w.height=P.getVerticalPos()-w.y,P.insert(w.x,w.y,w.x+w.width,w.height),w.startx=w.x,w.starty=w.y,w.stopx=w.startx+w.width,w.stopy=w.starty+w.height,w.stroke="rgb(0,0,0, 0.5)",Cvt.drawBox(l,w,O);m&&P.bumpVerticalPos(O.boxMargin),r=qvt(l,c,p,o),void 0===(a=P.getBounds().bounds).startx&&(a.startx=0),void 0===a.starty&&(a.starty=0),void 0===a.stopx&&(a.stopx=0),void 0===a.stopy&&(a.stopy=0);let N=a.stopy-a.starty,I=(No?-t:t,"adjustValue");t.from===t.to?c=l:(t.activate&&!h&&(c+=u(O.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN].includes(t.type)||(c+=u(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(t.type)&&(l-=u(3)));var e=[n,i,a,s],r=Math.abs(l-c),d=(t.wrap&&t.message&&(t.message=HE.wrapLabel(t.message,L.getMax(r+2*O.wrapPadding,O.width),Bvt(O))),HE.calculateTextDimensions(t.message,Bvt(O)));return{width:L.getMax(t.wrap?0:d.width+2*O.wrapPadding,r+2*O.wrapPadding,O.width),height:0,startx:l,stopx:c,starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,e),toBounds:Math.max.apply(null,e)}},"buildMessageModel"),Zvt=me(async function(t,n,e,i){let a={},s=[],o,l,c;for(let r of t){switch(r.type){case i.db.LINETYPE.LOOP_START:case i.db.LINETYPE.ALT_START:case i.db.LINETYPE.OPT_START:case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.PAR_OVER_START:case i.db.LINETYPE.CRITICAL_START:case i.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 i.db.LINETYPE.ALT_ELSE:case i.db.LINETYPE.PAR_AND:case i.db.LINETYPE.CRITICAL_OPTION:r.message&&(o=s.pop(),a[o.id]=o,a[r.id]=o,s.push(o));break;case i.db.LINETYPE.LOOP_END:case i.db.LINETYPE.ALT_END:case i.db.LINETYPE.OPT_END:case i.db.LINETYPE.PAR_END:case i.db.LINETYPE.CRITICAL_END:case i.db.LINETYPE.BREAK_END:o=s.pop(),a[o.id]=o;break;case i.db.LINETYPE.ACTIVE_START:var h=n.get(r.from||r.to.actor),u=Wvt(r.from||r.to.actor).length,u={startx:h=h.x+h.width/2+(u-1)*O.activationWidth/2,stopx:h+O.activationWidth,actor:r.from,enabled:!0};P.activations.push(u);break;case i.db.LINETYPE.ACTIVE_END:h=P.activations.map(t=>t.actor).lastIndexOf(r.from),P.activations.splice(h,1).splice(0,1)}void 0!==r.placement?(l=await Xvt(r,n,i),r.noteModel=l,s.forEach(t=>{(o=t).from=L.getMin(o.from,l.startx),o.to=L.getMax(o.to,l.startx+l.width),o.width=L.getMax(o.width,Math.abs(o.from-o.to))-O.labelBoxWidth})):(c=Kvt(r,n,i),(r.msgModel=c).startx&&c.stopx&&0{var e;o=t,c.startx===c.stopx?(t=n.get(r.from),e=n.get(r.to),o.from=L.getMin(t.x-c.width/2,t.x-t.width/2,o.from),o.to=L.getMax(e.x+c.width/2,e.x+t.width/2,o.to),o.width=L.getMax(o.width,Math.abs(o.to-o.from))-O.labelBoxWidth):(o.from=L.getMin(c.startx,o.from),o.to=L.getMax(c.stopx,o.to),o.width=L.getMax(o.width,c.width)-O.labelBoxWidth)}))}return P.activations=[],M.debug("Loop type widths:",a),a},"calculateLoopBounds"),Qvt={bounds:P,drawActors:Uvt,drawActorsPopup:qvt,setConf:jvt,draw:Hvt}}),txt={};oPt(txt,{diagram:()=>ext});var ext,rxt,nxt,ixt,axt,sxt,oxt,lxt,cxt,hxt,uxt,dxt,pxt,gxt,fxt,mxt=t(()=>{Svt(),Avt(),Lvt(),mu(),Jvt(),ext={parser:U2t,get db(){return new Y2t},renderer:Qvt,styles:V2t,init:me(t=>{t.sequence||(t.sequence={}),t.wrap&&(t.sequence.wrap=t.wrap,yh({sequence:{wrap:t.wrap}}))},"init")}}),yxt=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,18],n=[1,19],i=[1,20],a=[1,41],s=[1,42],o=[1,26],l=[1,24],P=[1,25],B=[1,32],F=[1,33],$=[1,34],c=[1,45],z=[1,35],G=[1,36],U=[1,37],q=[1,38],j=[1,27],W=[1,28],Y=[1,29],H=[1,30],V=[1,31],h=[1,44],u=[1,46],d=[1,43],p=[1,47],X=[1,9],g=[1,8,9],f=[1,58],m=[1,59],y=[1,60],v=[1,61],x=[1,62],K=[1,63],Z=[1,64],b=[1,8,9,41],Q=[1,76],w=[1,8,9,12,13,22,39,41,44,66,67,68,69,70,71,72,77,79],k=[1,8,9,12,13,17,20,22,39,41,44,48,58,66,67,68,69,70,71,72,77,79,84,99,101,102],T=[13,58,84,99,101,102],E=[13,58,71,72,84,99,101,102],J=[13,58,66,67,68,69,70,84,99,101,102],tt=[1,98],C=[1,115],_=[1,107],S=[1,113],A=[1,108],L=[1,109],N=[1,110],I=[1,111],R=[1,112],M=[1,114],et=[22,58,59,80,84,85,86,87,88,89],rt=[1,8,9,39,41,44],D=[1,8,9,22],nt=[1,143],it=[1,8,9,59],O=[1,8,9,22,58,59,80,84,85,86,87,88,89],k={trace:me(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,DOT:17,className:18,classLiteralName: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,CLASS:46,ANNOTATION_START:47,ANNOTATION_END:48,MEMBER:49,SEPARATOR:50,relation:51,NOTE_FOR:52,noteText:53,NOTE:54,CLASSDEF:55,classList:56,stylesOpt:57,ALPHA:58,COMMA:59,direction_tb:60,direction_bt:61,direction_rl:62,direction_lr:63,relationType:64,lineType:65,AGGREGATION:66,EXTENSION:67,COMPOSITION:68,DEPENDENCY:69,LOLLIPOP:70,LINE:71,DOTTED_LINE:72,CALLBACK:73,LINK:74,LINK_TARGET:75,CLICK:76,CALLBACK_NAME:77,CALLBACK_ARGS:78,HREF:79,STYLE:80,CSSCLASS:81,style:82,styleComponent:83,NUM:84,COLON:85,UNIT:86,SPACE:87,BRKT:88,PCT:89,commentToken:90,textToken:91,graphCodeTokens:92,textNoTagsToken:93,TAGSTART:94,TAGEND:95,"==":96,"--":97,DEFAULT:98,MINUS:99,keywords:100,UNICODE_TEXT:101,BQUOTE_STR:102,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",17:"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:"CLASS",47:"ANNOTATION_START",48:"ANNOTATION_END",49:"MEMBER",50:"SEPARATOR",52:"NOTE_FOR",54:"NOTE",55:"CLASSDEF",58:"ALPHA",59:"COMMA",60:"direction_tb",61:"direction_bt",62:"direction_rl",63:"direction_lr",66:"AGGREGATION",67:"EXTENSION",68:"COMPOSITION",69:"DEPENDENCY",70:"LOLLIPOP",71:"LINE",72:"DOTTED_LINE",73:"CALLBACK",74:"LINK",75:"LINK_TARGET",76:"CLICK",77:"CALLBACK_NAME",78:"CALLBACK_ARGS",79:"HREF",80:"STYLE",81:"CSSCLASS",84:"NUM",85:"COLON",86:"UNIT",87:"SPACE",88:"BRKT",89:"PCT",92:"graphCodeTokens",94:"TAGSTART",95:"TAGEND",96:"==",97:"--",98:"DEFAULT",99:"MINUS",100:"keywords",101:"UNICODE_TEXT",102:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,3],[15,2],[18,1],[18,3],[18,1],[18,2],[18,2],[18,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],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,6],[43,2],[43,3],[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],[56,1],[56,3],[32,1],[32,1],[32,1],[32,1],[51,3],[51,2],[51,2],[51,1],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,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],[57,1],[57,3],[82,1],[82,2],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[90,1],[90,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[93,1],[93,1],[93,1],[93,1],[16,1],[16,1],[16,1],[16,1],[19,1],[53,1]],performAction:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 8:this.$=a[o-1];break;case 9:case 12:case 14:this.$=a[o];break;case 10:case 13:this.$=a[o-2]+"."+a[o];break;case 11:case 15:this.$=a[o-1]+a[o];break;case 16:case 17:this.$=a[o-1]+"~"+a[o]+"~";break;case 18:n.addRelation(a[o]);break;case 19:a[o-1].title=n.cleanupLabel(a[o]),n.addRelation(a[o-1]);break;case 30:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 31:case 32:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 33:n.addClassesToNamespace(a[o-3],a[o-1]);break;case 34:n.addClassesToNamespace(a[o-4],a[o-1]);break;case 35:this.$=a[o],n.addNamespace(a[o]);break;case 36:this.$=[a[o]];break;case 37:this.$=[a[o-1]];break;case 38:a[o].unshift(a[o-2]),this.$=a[o];break;case 40:n.setCssClass(a[o-2],a[o]);break;case 41:n.addMembers(a[o-3],a[o-1]);break;case 42:n.setCssClass(a[o-5],a[o-3]),n.addMembers(a[o-5],a[o-1]);break;case 43:this.$=a[o],n.addClass(a[o]);break;case 44:this.$=a[o-1],n.addClass(a[o-1]),n.setClassLabel(a[o-1],a[o]);break;case 45:n.addAnnotation(a[o],a[o-2]);break;case 46:case 59:this.$=[a[o]];break;case 47:a[o].push(a[o-1]),this.$=a[o];break;case 48:break;case 49:n.addMember(a[o-1],n.cleanupLabel(a[o]));break;case 50:case 51:break;case 52:this.$={id1:a[o-2],id2:a[o],relation:a[o-1],relationTitle1:"none",relationTitle2:"none"};break;case 53:this.$={id1:a[o-3],id2:a[o],relation:a[o-1],relationTitle1:a[o-2],relationTitle2:"none"};break;case 54:this.$={id1:a[o-3],id2:a[o],relation:a[o-2],relationTitle1:"none",relationTitle2:a[o-1]};break;case 55:this.$={id1:a[o-4],id2:a[o],relation:a[o-2],relationTitle1:a[o-3],relationTitle2:a[o-1]};break;case 56:n.addNote(a[o],a[o-1]);break;case 57:n.addNote(a[o]);break;case 58:this.$=a[o-2],n.defineClass(a[o-1],a[o]);break;case 60:this.$=a[o-2].concat([a[o]]);break;case 61:n.setDirection("TB");break;case 62:n.setDirection("BT");break;case 63:n.setDirection("RL");break;case 64:n.setDirection("LR");break;case 65:this.$={type1:a[o-2],type2:a[o],lineType:a[o-1]};break;case 66:this.$={type1:"none",type2:a[o],lineType:a[o-1]};break;case 67:this.$={type1:a[o-1],type2:"none",lineType:a[o]};break;case 68:this.$={type1:"none",type2:"none",lineType:a[o]};break;case 69:this.$=n.relationType.AGGREGATION;break;case 70:this.$=n.relationType.EXTENSION;break;case 71:this.$=n.relationType.COMPOSITION;break;case 72:this.$=n.relationType.DEPENDENCY;break;case 73:this.$=n.relationType.LOLLIPOP;break;case 74:this.$=n.lineType.LINE;break;case 75:this.$=n.lineType.DOTTED_LINE;break;case 76:case 82:this.$=a[o-2],n.setClickEvent(a[o-1],a[o]);break;case 77:case 83:this.$=a[o-3],n.setClickEvent(a[o-2],a[o-1]),n.setTooltip(a[o-2],a[o]);break;case 78:this.$=a[o-2],n.setLink(a[o-1],a[o]);break;case 79:this.$=a[o-3],n.setLink(a[o-2],a[o-1],a[o]);break;case 80:this.$=a[o-3],n.setLink(a[o-2],a[o-1]),n.setTooltip(a[o-2],a[o]);break;case 81:this.$=a[o-4],n.setLink(a[o-3],a[o-2],a[o]),n.setTooltip(a[o-3],a[o-1]);break;case 84:this.$=a[o-3],n.setClickEvent(a[o-2],a[o-1],a[o]);break;case 85:this.$=a[o-4],n.setClickEvent(a[o-3],a[o-2],a[o-1]),n.setTooltip(a[o-3],a[o]);break;case 86:this.$=a[o-3],n.setLink(a[o-2],a[o]);break;case 87:this.$=a[o-4],n.setLink(a[o-3],a[o-1],a[o]);break;case 88:this.$=a[o-4],n.setLink(a[o-3],a[o-1]),n.setTooltip(a[o-3],a[o]);break;case 89:this.$=a[o-5],n.setLink(a[o-4],a[o-2],a[o]),n.setTooltip(a[o-4],a[o-1]);break;case 90:this.$=a[o-2],n.setCssStyle(a[o-1],a[o]);break;case 91:n.setCssClass(a[o-1],a[o]);break;case 92:this.$=[a[o]];break;case 93:a[o-2].push(a[o]),this.$=a[o-2];break;case 95:this.$=a[o-1]+a[o]}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,18:21,19:40,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:n,37:i,38:22,42:a,43:23,46:s,47:o,49:l,50:P,52:B,54:F,55:$,58:c,60:z,61:G,62:U,63:q,73:j,74:W,76:Y,80:H,81:V,84:h,99:u,101:d,102:p},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},e(X,[2,5],{8:[1,48]}),{8:[1,49]},e(g,[2,18],{22:[1,50]}),e(g,[2,20]),e(g,[2,21]),e(g,[2,22]),e(g,[2,23]),e(g,[2,24]),e(g,[2,25]),e(g,[2,26]),e(g,[2,27]),e(g,[2,28]),e(g,[2,29]),{34:[1,51]},{36:[1,52]},e(g,[2,32]),e(g,[2,48],{51:53,64:56,65:57,13:[1,54],22:[1,55],66:f,67:m,68:y,69:v,70:x,71:K,72:Z}),{39:[1,65]},e(b,[2,39],{39:[1,67],44:[1,66]}),e(g,[2,50]),e(g,[2,51]),{16:68,58:c,84:h,99:u,101:d},{16:39,18:69,19:40,58:c,84:h,99:u,101:d,102:p},{16:39,18:70,19:40,58:c,84:h,99:u,101:d,102:p},{16:39,18:71,19:40,58:c,84:h,99:u,101:d,102:p},{58:[1,72]},{13:[1,73]},{16:39,18:74,19:40,58:c,84:h,99:u,101:d,102:p},{13:Q,53:75},{56:77,58:[1,78]},e(g,[2,61]),e(g,[2,62]),e(g,[2,63]),e(g,[2,64]),e(w,[2,12],{16:39,19:40,18:80,17:[1,79],20:[1,81],58:c,84:h,99:u,101:d,102:p}),e(w,[2,14],{20:[1,82]}),{15:83,16:84,58:c,84:h,99:u,101:d},{16:39,18:85,19:40,58:c,84:h,99:u,101:d,102:p},e(k,[2,118]),e(k,[2,119]),e(k,[2,120]),e(k,[2,121]),e([1,8,9,12,13,20,22,39,41,44,66,67,68,69,70,71,72,77,79],[2,122]),e(X,[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,18:21,38:22,43:23,16:39,19:40,5:86,33:r,35:n,37:i,42:a,46:s,47:o,49:l,50:P,52:B,54:F,55:$,58:c,60:z,61:G,62:U,63:q,73:j,74:W,76:Y,80:H,81:V,84:h,99:u,101:d,102:p}),{5:87,10:5,16:39,18:21,19:40,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:n,37:i,38:22,42:a,43:23,46:s,47:o,49:l,50:P,52:B,54:F,55:$,58:c,60:z,61:G,62:U,63:q,73:j,74:W,76:Y,80:H,81:V,84:h,99:u,101:d,102:p},e(g,[2,19]),e(g,[2,30]),e(g,[2,31]),{13:[1,89],16:39,18:88,19:40,58:c,84:h,99:u,101:d,102:p},{51:90,64:56,65:57,66:f,67:m,68:y,69:v,70:x,71:K,72:Z},e(g,[2,49]),{65:91,71:K,72:Z},e(T,[2,68],{64:92,66:f,67:m,68:y,69:v,70:x}),e(E,[2,69]),e(E,[2,70]),e(E,[2,71]),e(E,[2,72]),e(E,[2,73]),e(J,[2,74]),e(J,[2,75]),{8:[1,94],24:95,40:93,43:23,46:s},{16:96,58:c,84:h,99:u,101:d},{45:97,49:tt},{48:[1,99]},{13:[1,100]},{13:[1,101]},{77:[1,102],79:[1,103]},{22:C,57:104,58:_,80:S,82:105,83:106,84:A,85:L,86:N,87:I,88:R,89:M},{58:[1,116]},{13:Q,53:117},e(g,[2,57]),e(g,[2,123]),{22:C,57:118,58:_,59:[1,119],80:S,82:105,83:106,84:A,85:L,86:N,87:I,88:R,89:M},e(et,[2,59]),{16:39,18:120,19:40,58:c,84:h,99:u,101:d,102:p},e(w,[2,15]),e(w,[2,16]),e(w,[2,17]),{39:[2,35]},{15:122,16:84,17:[1,121],39:[2,9],58:c,84:h,99:u,101:d},e(rt,[2,43],{11:123,12:[1,124]}),e(X,[2,7]),{9:[1,125]},e(D,[2,52]),{16:39,18:126,19:40,58:c,84:h,99:u,101:d,102:p},{13:[1,128],16:39,18:127,19:40,58:c,84:h,99:u,101:d,102:p},e(T,[2,67],{64:129,66:f,67:m,68:y,69:v,70:x}),e(T,[2,66]),{41:[1,130]},{24:95,40:131,43:23,46:s},{8:[1,132],41:[2,36]},e(b,[2,40],{39:[1,133]}),{41:[1,134]},{41:[2,46],45:135,49:tt},{16:39,18:136,19:40,58:c,84:h,99:u,101:d,102:p},e(g,[2,76],{13:[1,137]}),e(g,[2,78],{13:[1,139],75:[1,138]}),e(g,[2,82],{13:[1,140],78:[1,141]}),{13:[1,142]},e(g,[2,90],{59:nt}),e(it,[2,92],{83:144,22:C,58:_,80:S,84:A,85:L,86:N,87:I,88:R,89:M}),e(O,[2,94]),e(O,[2,96]),e(O,[2,97]),e(O,[2,98]),e(O,[2,99]),e(O,[2,100]),e(O,[2,101]),e(O,[2,102]),e(O,[2,103]),e(O,[2,104]),e(g,[2,91]),e(g,[2,56]),e(g,[2,58],{59:nt}),{58:[1,145]},e(w,[2,13]),{15:146,16:84,58:c,84:h,99:u,101:d},{39:[2,11]},e(rt,[2,44]),{13:[1,147]},{1:[2,4]},e(D,[2,54]),e(D,[2,53]),{16:39,18:148,19:40,58:c,84:h,99:u,101:d,102:p},e(T,[2,65]),e(g,[2,33]),{41:[1,149]},{24:95,40:150,41:[2,37],43:23,46:s},{45:151,49:tt},e(b,[2,41]),{41:[2,47]},e(g,[2,45]),e(g,[2,77]),e(g,[2,79]),e(g,[2,80],{75:[1,152]}),e(g,[2,83]),e(g,[2,84],{13:[1,153]}),e(g,[2,86],{13:[1,155],75:[1,154]}),{22:C,58:_,80:S,82:156,83:106,84:A,85:L,86:N,87:I,88:R,89:M},e(O,[2,95]),e(et,[2,60]),{39:[2,10]},{14:[1,157]},e(D,[2,55]),e(g,[2,34]),{41:[2,38]},{41:[1,158]},e(g,[2,81]),e(g,[2,85]),e(g,[2,87]),e(g,[2,88],{75:[1,159]}),e(it,[2,93],{83:144,22:C,58:_,80:S,84:A,85:L,86:N,87:I,88:R,89:M}),e(rt,[2,8]),e(b,[2,42]),e(g,[2,89])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,35],122:[2,11],125:[2,4],135:[2,47],146:[2,10],150:[2,38]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"{function t(e,t,r,n,i,a,s){g(t.append("text").attr("x",r).attr("y",n).style("text-anchor","start").text(e),s)}function l(e,t,r,n,i,a,s,o){var{actorFontSize:l,actorFontFamily:c,actorFontWeight:h}=o,u=e.split(L.lineBreakRegex);for(let e=0;er?o.width:r);if((e=l.append("rect")).attr("class","actorPopupMenuPanel"+i),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,uxe.sanitizeUrl)(a[h]);d.attr("xlink:href",p),d.attr("target","_blank"),zxe(n)(h,d,o.x+10,o.height+u,c,20,{class:"actor"},n),u+=30}}return e.attr("height",u),{height:o.height+u,width:c}},"drawPopup"),mxe=mt(function(e){return"var pu = document.getElementById('"+e+"'); if (pu != null) { pu.style.display = pu.style.display == 'block' ? 'none' : 'block'; }"},"popupMenuToggle"),yxe=mt(async function(n,i,a=null){var s=n.append("foreignObject"),o=await Wc(i.text,Ir()),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"===i.class)(n=n.node().firstChild).setAttribute("height",o.height+2*i.textMargin),n=n.getBBox(),s.attr("x",Math.round(n.x+n.width/2-o.width/2)).attr("y",Math.round(n.y+n.height/2-o.height/2));else if(a){let{startx:e,stopx:t,starty:r}=a;e>t&&(n=e,e=t,t=n),s.attr("x",Math.round(e+Math.abs(e-t)/2-o.width/2)),"loopText"===i.class?s.attr("y",Math.round(r)):s.attr("y",Math.round(r-o.height))}return[s]},"drawKatex"),vxe=mt(function(e,t){let r=0,n=0,i=t.text.split(L.lineBreakRegex),[a,s]=WC(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+n+t.textMargin)/2),"yfunc");break;case"bottom":case"end":c=mt(()=>Math.round(t.y+(r+n+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 i.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||kC;(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=n.get(e),t=r.select("#actor"+e.actorCnt);!i.mirrorActors&&e.stopy?t.attr("y2",e.stopy+e.height/2):i.mirrorActors&&t.attr("y2",e.stopy)})},"fixLifeLineHeights"),kxe=mt(function(e,t,r,n){var i=n?t.stopy:t.starty,a=t.x+t.width/2,s=i+t.height,o=e=e.append("g").lower(),s=(n||(bxe++,Object.keys(t.links||{}).length&&!r.forceMenus&&o.attr("onclick",mxe(`actor${bxe}_popup`)).attr("cursor","pointer"),o.append("line").attr("id","actor"+bxe).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),o=e.append("g"),t.actorCnt=bxe,null!=t.links&&o.attr("id","root-"+bxe)),kw()),a="actor",e=(t.properties?.class?a=t.properties.class:s.fill="#eaeaea",a+=n?" "+pxe:" actor-top",s.x=t.x,s.y=i,s.width=t.width,s.height=t.height,s.class=a,s.rx=3,s.ry=3,s.name=t.name,gxe(o,s));t.rectData=s,t.properties?.icon&&("@"===(n=t.properties.icon.trim()).charAt(0)?ww(o,s.x+s.width-20,s.y+10,n.substr(1)):bw(o,s.x+s.width-20,s.y+10,n)),Fxe(r,qc(t.description))(t.description,o,s.x,s.y,s.width,s.height,{class:"actor actor-box"},r);let l=t.height;return e.node&&(i=e.node().getBBox(),t.height=i.height,l=i.height),l},"drawActorTypeParticipant"),Txe=mt(function(e,t,r,n){var i=n?t.stopy:t.starty,a=t.x+t.width/2,s=i+80,o=e.append("g").lower(),l=(n||(bxe++,o.append("line").attr("id","actor"+bxe).attr("x1",a).attr("y1",s).attr("x2",a).attr("y2",2e3).attr("class","actor-line 200").attr("stroke-width","0.5px").attr("stroke","#999").attr("name",t.name),t.actorCnt=bxe),e.append("g")),c="actor-man";return l.attr("class",c+=n?" "+pxe:" actor-top"),l.attr("name",t.name),(o=kw()).x=t.x,o.y=i,o.fill="#eaeaea",o.width=t.width,o.height=t.height,o.class="actor",o.rx=3,o.ry=3,l.append("line").attr("id","actor-man-torso"+bxe).attr("x1",a).attr("y1",i+25).attr("x2",a).attr("y2",i+45),l.append("line").attr("id","actor-man-arms"+bxe).attr("x1",a-dxe/2).attr("y1",i+33).attr("x2",a+dxe/2).attr("y2",i+33),l.append("line").attr("x1",a-dxe/2).attr("y1",i+60).attr("x2",a).attr("y2",i+45),l.append("line").attr("x1",a).attr("y1",i+45).attr("x2",a+dxe/2-2).attr("y2",i+60),(s=l.append("circle")).attr("cx",t.x+t.width/2),s.attr("cy",i+10),s.attr("r",15),s.attr("width",t.width),s.attr("height",t.height),e=l.node().getBBox(),t.height=e.height,Fxe(r,qc(t.description))(t.description,l,o.x,o.y+35,o.width,o.height,{class:"actor actor-man"},r),t.height},"drawActorTypeActor"),Exe=mt(async function(e,t,r,n){switch(t.type){case"actor":return Txe(e,t,r,n);case"participant":return kxe(e,t,r,n)}},"drawActor"),Cxe=mt(function(e,t,r){e=e.append("g"),Lxe(e,t),t.name&&Fxe(r)(t.name,e,t.x,t.y+(t.textMaxHeight||0)/2,t.width,0,{class:"text"},r),e.lower()},"drawBox"),Sxe=mt(function(e){return e.append("g")},"anchorElement"),_xe=mt(function(e,t,r,n,i){var a=kw(),s=t.anchored;a.x=t.startx,a.y=t.starty,a.class="activation"+i%3,a.width=t.stopx-t.startx,a.height=r-t.starty,gxe(s,a)},"drawActivation"),Axe=mt(async function(e,t,r,n){let{boxMargin:i,boxTextMargin:a,labelBoxHeight:s,labelBoxWidth:o,messageFontFamily:l,messageFontSize:c,messageFontWeight:h}=n,u=e.append("g"),d=mt(function(e,t,r,n){return u.append("line").attr("x1",e).attr("y1",t).attr("x2",r).attr("y2",n).attr("class","loopLine")},"drawLoopLine"),p=(d(t.startx,t.starty,t.stopx,t.starty),d(t.stopx,t.starty,t.stopx,t.stopy),d(t.startx,t.stopy,t.stopx,t.stopy),d(t.startx,t.starty,t.startx,t.stopy),void 0!==t.sections&&t.sections.forEach(function(e){d(t.startx,e.y,t.stopx,e.y).style("stroke-dasharray","3, 3")}),Tw());p.text=r,p.x=t.startx,p.y=t.starty,p.fontFamily=l,p.fontSize=c,p.fontWeight=h,p.anchor="middle",p.valign="middle",p.tspan=!1,p.width=o||50,p.height=s||20,p.textMargin=a,p.class="labelText",xxe(u,p),(p=Bxe()).text=t.title,p.x=t.startx+o/2+(t.stopx-t.startx)/2,p.y=t.starty+i+a,p.anchor="middle",p.valign="middle",p.textMargin=a,p.class="loopText",p.fontFamily=l,p.fontSize=c,p.fontWeight=h,p.wrap=!0;var g=qc(p.text)?await yxe(u,p,t):vxe(u,p);if(void 0!==t.sectionTitles)for(var[f,m]of Object.entries(t.sectionTitles))m.message&&(p.text=m.message,p.x=t.startx+(t.stopx-t.startx)/2,p.y=t.sections[f].y+i+a,p.class="loopText",p.anchor="middle",p.valign="middle",p.tspan=!1,p.fontFamily=l,p.fontSize=c,p.fontWeight=h,p.wrap=t.wrap,qc(p.text)?(t.starty=t.sections[f].y,await yxe(u,p,t)):vxe(u,p),m=Math.round(g.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t)),t.sections[f].height+=m-(i+a));return t.height=Math.round(t.stopy-t.starty),u},"drawLoop"),Lxe=mt(function(e,t){vw(e,t)},"drawBackgroundRect"),Nxe=mt(function(e){e.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},"insertDatabaseIcon"),Ixe=mt(function(e){e.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},"insertComputerIcon"),Rxe=mt(function(e){e.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},"insertClockIcon"),Mxe=mt(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",7.9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto-start-reverse").append("path").attr("d","M -1 0 L 10 5 L 0 10 z")},"insertArrowHead"),Dxe=mt(function(e){e.append("defs").append("marker").attr("id","filled-head").attr("refX",15.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"insertArrowFilledHead"),Oxe=mt(function(e){e.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},"insertSequenceNumber"),Pxe=mt(function(e){e.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",4.5).append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1pt").attr("d","M 1,2 L 6,7 M 6,2 L 1,7")},"insertArrowCrossHead"),Bxe=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"),$xe=mt(function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),mt(n,"byText"),mt(c,"byTspan"),mt(i,"byFo"),mt(a,"byKatex"),mt(f,"_setTextAttrs"),Fxe=function(e,t=!1){return t?a:"fo"===e.textPlacement?i:"old"===e.textPlacement?n:c},mt(t,"byText"),mt(l,"byTspan"),mt(r,"byFo"),mt(g,"_setTextAttrs"),zxe=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:l},Gxe={drawRect:gxe,drawText:vxe,drawLabel:xxe,drawActor:Exe,drawBox:Cxe,drawPopup:fxe,anchorElement:Sxe,drawActivation:_xe,drawLoop:Axe,drawBackgroundRect:Lxe,insertArrowHead:Mxe,insertArrowFilledHead:Dxe,insertSequenceNumber:Oxe,insertArrowCrossHead:Pxe,insertDatabaseIcon:Nxe,insertComputerIcon:Ixe,insertClockIcon:Rxe,getTextObj:Bxe,getNoteRect:$xe,fixLifeLineHeights:wxe,sanitizeUrl:uxe.sanitizeUrl}});async function Hxe(e,t){P.bumpVerticalPos(10);var{startx:r,stopx:n,message:i}=t,a=L.splitBreaks(i).length,s=qc(i),i=s?await jc(i,D()):YC.calculateTextDimensions(i,Jxe(O));s||(s=i.height/a,t.height+=s,P.bumpVerticalPos(s));let o,l=i.height-10,c=i.width;return r===n?(o=P.getVerticalPos()+l,O.rightAngles||(l+=O.boxMargin,o=P.getVerticalPos()+l),l+=30,a=L.getMax(c/2,O.width/2),P.insert(r-a,P.getVerticalPos()-10+l,n+a,P.getVerticalPos()+30+l)):(l+=O.boxMargin,o=P.getVerticalPos()+l,P.insert(r,o-10,n,o)),P.bumpVerticalPos(l),t.height+=l,t.stopy=t.starty+t.height,P.insert(t.fromBounds,t.starty,t.toBounds,t.stopy),o}function Vxe(e,t,r,n,i){P.bumpVerticalPos(r);let a=n;t.id&&t.message&&e[t.id]&&(r=e[t.id].width,e=Jxe(O),t.message=YC.wrapLabel(`[${t.message}]`,r-2*O.wrapPadding,e),t.width=r,t.wrap=!0,r=YC.calculateTextDimensions(t.message,e),e=L.getMax(r.height,O.labelBoxHeight),a=n+e,M.debug(e+" - "+t.message)),i(t),P.bumpVerticalPos(a)}function Xxe(r,n,e,t,i,a,s){function o(e,t){e.x{var t=Jxe(O),r=e.actorKeys.reduce((e,t)=>e+(n.get(t).width+(n.get(t).margin||0)),0),t=(r-=2*O.boxTextMargin,e.wrap&&(e.name=YC.wrapLabel(e.name,r-2*O.wrapPadding,t)),YC.calculateTextDimensions(e.name,t)),t=(c=L.getMax(t.height,c),L.getMax(r,t.width+2*O.wrapPadding));e.margin=O.boxTextMargin,re.textMaxHeight=c),L.getMax(r,O.height)}var O,P,Qxe,Jxe,ebe,tbe,rbe,nbe,ibe,abe,sbe,obe,lbe,cbe,hbe,ube,dbe,pbe,gbe,fbe=e(()=>{Zw(),Yxe(),t(),eh(),eh(),e6(),mu(),jr(),KC(),th(),O={},P={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,sbe(D())},"init"),updateVal:mt(function(e,t,r,n){void 0===e[t]?e[t]=r:e[t]=n(r,e[t])},"updateVal"),updateBounds:mt(function(n,i,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",i-t*O.boxMargin,Math.min),o.updateVal(e,"stopy",s+t*O.boxMargin,Math.max),o.updateVal(P.data,"startx",n-t*O.boxMargin,Math.min),o.updateVal(P.data,"stopx",a+t*O.boxMargin,Math.max),"activation"!==r&&(o.updateVal(e,"startx",n-t*O.boxMargin,Math.min),o.updateVal(e,"stopx",a+t*O.boxMargin,Math.max),o.updateVal(P.data,"starty",i-t*O.boxMargin,Math.min),o.updateVal(P.data,"stopy",s+t*O.boxMargin,Math.max))},"updateItemBounds")}mt(e,"updateFn"),this.sequenceItems.forEach(e()),this.activations.forEach(e("activation"))},"updateBounds"),insert:mt(function(e,t,r,n){var i=L.getMin(e,r),e=L.getMax(e,r),r=L.getMin(t,n),t=L.getMax(t,n);this.updateVal(P.data,"startx",i,Math.min),this.updateVal(P.data,"starty",r,Math.min),this.updateVal(P.data,"stopx",e,Math.max),this.updateVal(P.data,"stopy",t,Math.max),this.updateBounds(i,r,e,t)},"insert"),newActivation:mt(function(e,t,r){var r=r.get(e.from),n=obe(e.from).length||0,r=r.x+r.width/2+(n-1)*O.activationWidth/2;this.activations.push({startx:r,starty:this.verticalPos+2,stopx:r+O.activationWidth,stopy:void 0,actor:e.from,anchored:Gxe.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:P.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=L.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")},Qxe=mt(async function(e,t){P.bumpVerticalPos(O.boxMargin),t.height=O.boxMargin,t.starty=P.getVerticalPos();var r=kw(),e=(r.x=t.startx,r.y=t.starty,r.width=t.width||O.width,r.class="note",e.append("g")),n=Gxe.drawRect(e,r),e=((i=Tw()).x=t.startx,i.y=t.starty,i.width=r.width,i.dy="1em",i.text=t.message,i.class="noteText",i.fontFamily=O.noteFontFamily,i.fontSize=O.noteFontSize,i.fontWeight=O.noteFontWeight,i.anchor=O.noteAlign,i.textMargin=O.noteMargin,i.valign="center",qc(i.text)?await yxe(e,i):vxe(e,i)),i=Math.round(e.map(e=>(e._groups||e)[0][0].getBBox().height).reduce((e,t)=>e+t));n.attr("height",i+2*O.noteMargin),t.height+=i+2*O.noteMargin,P.bumpVerticalPos(i+2*O.noteMargin),t.stopy=t.starty+i+2*O.noteMargin,t.stopx=t.startx+r.width,P.insert(t.startx,t.starty,t.stopx,t.stopy),P.models.addNote(t)},"drawNote"),Jxe=mt(e=>({fontFamily:e.messageFontFamily,fontSize:e.messageFontSize,fontWeight:e.messageFontWeight}),"messageFont"),ebe=mt(e=>({fontFamily:e.noteFontFamily,fontSize:e.noteFontSize,fontWeight:e.noteFontWeight}),"noteFont"),tbe=mt(e=>({fontFamily:e.actorFontFamily,fontSize:e.actorFontSize,fontWeight:e.actorFontWeight}),"actorFont"),mt(Hxe,"boundMessage"),rbe=mt(async function(e,t,r,n){var{startx:t,stopx:i,starty:a,message:s,type:o,sequenceIndex:l,sequenceVisible:c}=t,h=YC.calculateTextDimensions(s,Jxe(O)),u=Tw();u.x=t,u.y=a+10,u.width=i-t,u.class="messageText",u.dy="1em",u.text=s,u.fontFamily=O.messageFontFamily,u.fontSize=O.messageFontSize,u.fontWeight=O.messageFontWeight,u.anchor=O.messageAlign,u.valign="center",u.textMargin=O.wrapPadding,u.tspan=!1,qc(u.text)?await yxe(e,u,{startx:t,stopx:i,starty:r}):vxe(e,u);let d=h.width,p,g=(t===i?p=O.rightAngles?e.append("path").attr("d",`M ${t},${r} H ${t+L.getMax(O.width/2,d/2)} V ${r+25} H `+t):e.append("path").attr("d","M "+t+","+r+" C "+(t+60)+","+(r-10)+" "+(t+60)+","+(r+30)+" "+t+","+(r+20)):((p=e.append("line")).attr("x1",t),p.attr("y1",r),p.attr("x2",i),p.attr("y2",r)),o===n.db.LINETYPE.DOTTED||o===n.db.LINETYPE.DOTTED_CROSS||o===n.db.LINETYPE.DOTTED_POINT||o===n.db.LINETYPE.DOTTED_OPEN||o===n.db.LINETYPE.BIDIRECTIONAL_DOTTED?(p.style("stroke-dasharray","3, 3"),p.attr("class","messageLine1")):p.attr("class","messageLine0"),"");O.arrowMarkerAbsolute&&(g=Mc(!0)),p.attr("stroke-width",2),p.attr("stroke","none"),p.style("fill","none"),o!==n.db.LINETYPE.SOLID&&o!==n.db.LINETYPE.DOTTED||p.attr("marker-end","url("+g+"#arrowhead)"),o!==n.db.LINETYPE.BIDIRECTIONAL_SOLID&&o!==n.db.LINETYPE.BIDIRECTIONAL_DOTTED||(p.attr("marker-start","url("+g+"#arrowhead)"),p.attr("marker-end","url("+g+"#arrowhead)")),o!==n.db.LINETYPE.SOLID_POINT&&o!==n.db.LINETYPE.DOTTED_POINT||p.attr("marker-end","url("+g+"#filled-head)"),o!==n.db.LINETYPE.SOLID_CROSS&&o!==n.db.LINETYPE.DOTTED_CROSS||p.attr("marker-end","url("+g+"#crosshead)"),(c||O.showSequenceNumbers)&&(p.attr("marker-start","url("+g+"#sequencenumber)"),e.append("text").attr("x",t).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(l))},"drawMessage"),nbe=mt(function(e,t,r,n,i,a,s){let o=0,l=0,c,h=0;for(var u of n){var d=(u=t.get(u)).box;c&&c!=d&&(s||P.models.addBox(c),l+=O.boxMargin+c.margin),d&&d!=c&&(s||(d.x=o+l,d.y=i),l+=d.margin),u.width=u.width||O.width,u.height=L.getMax(u.height||O.height,O.height),u.margin=u.margin||O.actorMargin,h=L.getMax(h,u.height),r.get(u.name)&&(l+=u.width/2),u.x=o+l,u.starty=P.getVerticalPos(),P.insert(u.x,i,u.x+u.width,u.height),o+=u.width+l,u.box&&(u.box.width=o+d.margin-u.box.x),l=u.margin,c=u.box,P.models.addActor(u)}c&&!s&&P.models.addBox(c),P.bumpVerticalPos(h)},"addActorRenderingData"),ibe=mt(async function(t,r,n,e){if(e){let e=0;P.bumpVerticalPos(2*O.boxMargin);for(var i of n)(i=r.get(i)).stopy||(i.stopy=P.getVerticalPos()),i=await Gxe.drawActor(t,i,O,!0),e=L.getMax(e,i);P.bumpVerticalPos(e+O.boxMargin)}else for(var a of n)a=r.get(a),await Gxe.drawActor(t,a,O,!1)},"drawActors"),abe=mt(function(e,t,r,n){let i=0,a=0;for(var s of r){var s=t.get(s),o=hbe(s);(o=Gxe.drawPopup(e,s,o,O,O.forceMenus,n)).height>i&&(i=o.height),o.width+s.x>a&&(a=o.width+s.x)}return{maxHeight:i,maxWidth:a}},"drawActorsPopup"),sbe=mt(function(e){it(O,e),e.fontFamily&&(O.actorFontFamily=O.noteFontFamily=O.messageFontFamily=e.fontFamily),e.fontSize&&(O.actorFontSize=O.noteFontSize=O.messageFontSize=e.fontSize),e.fontWeight&&(O.actorFontWeight=O.noteFontWeight=O.messageFontWeight=e.fontWeight)},"setConf"),obe=mt(function(t){return P.activations.filter(function(e){return e.actor===t})},"actorActivations"),lbe=mt(function(e,t){return t=t.get(e),[(e=obe(e)).reduce(function(e,t){return L.getMin(e,t.startx)},t.x+t.width/2-1),e.reduce(function(e,t){return L.getMax(e,t.stopx)},t.x+t.width/2+1)]},"activationBounds"),mt(Vxe,"adjustLoopHeightForWrap"),mt(Xxe,"adjustCreatedDestroyedData"),cbe=mt(async function(n,e,t,i){var{securityLevel:r,sequence:a}=D();O=a;let s;"sandbox"===r&&(s=H("#i"+e));var a=H("sandbox"===r?s.nodes()[0].contentDocument.body:"body"),o="sandbox"===r?s.nodes()[0].contentDocument:document;P.init(),M.debug(i.db);let l="sandbox"===r?a.select(`[id="${e}"]`):H(`[id="${e}"]`),c=i.db.getActors(),h=i.db.getCreatedActors(),u=i.db.getDestroyedActors(),d=i.db.getBoxes(),p=i.db.getActorKeys(),g=i.db.getMessages(),f=i.db.getDiagramTitle(),m=i.db.hasAtLeastOneBox(),y=i.db.hasAtLeastOneBoxWithTitle(),v=await Kxe(c,g,i);if(O.height=await Zxe(c,v,d),Gxe.insertComputerIcon(l),Gxe.insertDatabaseIcon(l),Gxe.insertClockIcon(l),m&&(P.bumpVerticalPos(O.boxMargin),y)&&P.bumpVerticalPos(d[0].textMaxHeight),!0===O.hideUnusedParticipants){let t=new Set;g.forEach(e=>{t.add(e.from),t.add(e.to)}),p=p.filter(e=>t.has(e))}nbe(l,c,h,p,0,g,!1);var x,b,w,k=await pbe(g,c,v,i);function T(e,t){var r=P.endActivation(e);r.starty+18>t&&(r.starty=t-6,t+=12),Gxe.drawActivation(l,r,t,O,obe(e.from).length),P.insert(r.startx,t-10,r.stopx,t)}Gxe.insertArrowHead(l),Gxe.insertArrowCrossHead(l),Gxe.insertArrowFilledHead(l),Gxe.insertSequenceNumber(l),mt(T,"activeEnd");let E=1,C=1,S=[],_=[],A=0;for(x of g){let e,t,r;switch(x.type){case i.db.LINETYPE.NOTE:P.resetVerticalPos(),t=x.noteModel,await Qxe(l,t);break;case i.db.LINETYPE.ACTIVE_START:P.newActivation(x,l,c);break;case i.db.LINETYPE.ACTIVE_END:T(x,P.getVerticalPos());break;case i.db.LINETYPE.LOOP_START:Vxe(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,e=>P.newLoop(e));break;case i.db.LINETYPE.LOOP_END:e=P.endLoop(),await Gxe.drawLoop(l,e,"loop",O),P.bumpVerticalPos(e.stopy-P.getVerticalPos()),P.models.addLoop(e);break;case i.db.LINETYPE.RECT_START:Vxe(k,x,O.boxMargin,O.boxMargin,e=>P.newLoop(void 0,e.message));break;case i.db.LINETYPE.RECT_END:e=P.endLoop(),_.push(e),P.models.addLoop(e),P.bumpVerticalPos(e.stopy-P.getVerticalPos());break;case i.db.LINETYPE.OPT_START:Vxe(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,e=>P.newLoop(e));break;case i.db.LINETYPE.OPT_END:e=P.endLoop(),await Gxe.drawLoop(l,e,"opt",O),P.bumpVerticalPos(e.stopy-P.getVerticalPos()),P.models.addLoop(e);break;case i.db.LINETYPE.ALT_START:Vxe(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,e=>P.newLoop(e));break;case i.db.LINETYPE.ALT_ELSE:Vxe(k,x,O.boxMargin+O.boxTextMargin,O.boxMargin,e=>P.addSectionToLoop(e));break;case i.db.LINETYPE.ALT_END:e=P.endLoop(),await Gxe.drawLoop(l,e,"alt",O),P.bumpVerticalPos(e.stopy-P.getVerticalPos()),P.models.addLoop(e);break;case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.PAR_OVER_START:Vxe(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,e=>P.newLoop(e)),P.saveVerticalPos();break;case i.db.LINETYPE.PAR_AND:Vxe(k,x,O.boxMargin+O.boxTextMargin,O.boxMargin,e=>P.addSectionToLoop(e));break;case i.db.LINETYPE.PAR_END:e=P.endLoop(),await Gxe.drawLoop(l,e,"par",O),P.bumpVerticalPos(e.stopy-P.getVerticalPos()),P.models.addLoop(e);break;case i.db.LINETYPE.AUTONUMBER:E=x.message.start||E,C=x.message.step||C,x.message.visible?i.db.enableSequenceNumbers():i.db.disableSequenceNumbers();break;case i.db.LINETYPE.CRITICAL_START:Vxe(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,e=>P.newLoop(e));break;case i.db.LINETYPE.CRITICAL_OPTION:Vxe(k,x,O.boxMargin+O.boxTextMargin,O.boxMargin,e=>P.addSectionToLoop(e));break;case i.db.LINETYPE.CRITICAL_END:e=P.endLoop(),await Gxe.drawLoop(l,e,"critical",O),P.bumpVerticalPos(e.stopy-P.getVerticalPos()),P.models.addLoop(e);break;case i.db.LINETYPE.BREAK_START:Vxe(k,x,O.boxMargin,O.boxMargin+O.boxTextMargin,e=>P.newLoop(e));break;case i.db.LINETYPE.BREAK_END:e=P.endLoop(),await Gxe.drawLoop(l,e,"break",O),P.bumpVerticalPos(e.stopy-P.getVerticalPos()),P.models.addLoop(e);break;default:try{(r=x.msgModel).starty=P.getVerticalPos(),r.sequenceIndex=E,r.sequenceVisible=i.db.showSequenceNumbers();var L=await Hxe(l,r);Xxe(x,r,L,A,c,h,u),S.push({messageModel:r,lineStartY:L}),P.models.addMessage(r)}catch(n){M.error("error while drawing message",n)}}[i.db.LINETYPE.SOLID_OPEN,i.db.LINETYPE.DOTTED_OPEN,i.db.LINETYPE.SOLID,i.db.LINETYPE.DOTTED,i.db.LINETYPE.SOLID_CROSS,i.db.LINETYPE.DOTTED_CROSS,i.db.LINETYPE.SOLID_POINT,i.db.LINETYPE.DOTTED_POINT,i.db.LINETYPE.BIDIRECTIONAL_SOLID,i.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(x.type)&&(E+=C),A++}M.debug("createdActors",h),M.debug("destroyedActors",u),await ibe(l,c,p,!1);for(b of S)await rbe(l,b.messageModel,b.lineStartY,i);O.mirrorActors&&await ibe(l,c,p,!0),_.forEach(e=>Gxe.drawBackgroundRect(l,e)),wxe(l,c,p,O);for(w of P.models.boxes)w.height=P.getVerticalPos()-w.y,P.insert(w.x,w.y,w.x+w.width,w.height),w.startx=w.x,w.starty=w.y,w.stopx=w.startx+w.width,w.stopy=w.starty+w.height,w.stroke="rgb(0,0,0, 0.5)",Gxe.drawBox(l,w,O);m&&P.bumpVerticalPos(O.boxMargin),r=abe(l,c,p,o),void 0===(a=P.getBounds().bounds).startx&&(a.startx=0),void 0===a.starty&&(a.starty=0),void 0===a.stopx&&(a.stopx=0),void 0===a.stopy&&(a.stopy=0);let N=a.stopy-a.starty,I=(No?-e:e,"adjustValue");e.from===e.to?c=l:(e.activate&&!h&&(c+=u(O.activationWidth/2-1)),[r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN].includes(e.type)||(c+=u(3)),[r.db.LINETYPE.BIDIRECTIONAL_SOLID,r.db.LINETYPE.BIDIRECTIONAL_DOTTED].includes(e.type)&&(l-=u(3)));var t=[n,i,a,s],r=Math.abs(l-c),d=(e.wrap&&e.message&&(e.message=YC.wrapLabel(e.message,L.getMax(r+2*O.wrapPadding,O.width),Jxe(O))),YC.calculateTextDimensions(e.message,Jxe(O)));return{width:L.getMax(e.wrap?0:d.width+2*O.wrapPadding,r+2*O.wrapPadding,O.width),height:0,startx:l,stopx:c,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"),pbe=mt(async function(e,n,t,i){let a={},s=[],o,l,c;for(let r of e){switch(r.type){case i.db.LINETYPE.LOOP_START:case i.db.LINETYPE.ALT_START:case i.db.LINETYPE.OPT_START:case i.db.LINETYPE.PAR_START:case i.db.LINETYPE.PAR_OVER_START:case i.db.LINETYPE.CRITICAL_START:case i.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 i.db.LINETYPE.ALT_ELSE:case i.db.LINETYPE.PAR_AND:case i.db.LINETYPE.CRITICAL_OPTION:r.message&&(o=s.pop(),a[o.id]=o,a[r.id]=o,s.push(o));break;case i.db.LINETYPE.LOOP_END:case i.db.LINETYPE.ALT_END:case i.db.LINETYPE.OPT_END:case i.db.LINETYPE.PAR_END:case i.db.LINETYPE.CRITICAL_END:case i.db.LINETYPE.BREAK_END:o=s.pop(),a[o.id]=o;break;case i.db.LINETYPE.ACTIVE_START:var h=n.get(r.from||r.to.actor),u=obe(r.from||r.to.actor).length,u={startx:h=h.x+h.width/2+(u-1)*O.activationWidth/2,stopx:h+O.activationWidth,actor:r.from,enabled:!0};P.activations.push(u);break;case i.db.LINETYPE.ACTIVE_END:h=P.activations.map(e=>e.actor).lastIndexOf(r.from),P.activations.splice(h,1).splice(0,1)}void 0!==r.placement?(l=await ube(r,n,i),r.noteModel=l,s.forEach(e=>{(o=e).from=L.getMin(o.from,l.startx),o.to=L.getMax(o.to,l.startx+l.width),o.width=L.getMax(o.width,Math.abs(o.from-o.to))-O.labelBoxWidth})):(c=dbe(r,n,i),(r.msgModel=c).startx&&c.stopx&&0{var t;o=e,c.startx===c.stopx?(e=n.get(r.from),t=n.get(r.to),o.from=L.getMin(e.x-c.width/2,e.x-e.width/2,o.from),o.to=L.getMax(t.x+c.width/2,t.x+e.width/2,o.to),o.width=L.getMax(o.width,Math.abs(o.to-o.from))-O.labelBoxWidth):(o.from=L.getMin(c.startx,o.from),o.to=L.getMax(c.stopx,o.to),o.width=L.getMax(o.width,c.width)-O.labelBoxWidth)}))}return P.activations=[],M.debug("Loop type widths:",a),a},"calculateLoopBounds"),gbe={bounds:P,drawActors:ibe,drawActorsPopup:abe,setConf:sbe,draw:cbe}}),mbe={};JBe(mbe,{diagram:()=>ybe});var ybe,vbe,xbe,bbe,wbe,kbe,Tbe,Ebe,Cbe,Sbe,_be,Abe,Lbe,Nbe,Ibe,Rbe=e(()=>{qxe(),jxe(),Wxe(),mu(),fbe(),ybe={parser:ixe,get db(){return new lxe},renderer:gbe,styles:hxe,init:mt(e=>{e.sequence||(e.sequence={}),e.wrap&&(e.sequence.wrap=e.wrap,yh({sequence:{wrap:e.wrap}}))},"init")}}),Mbe=e(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[1,18],n=[1,19],i=[1,20],a=[1,41],s=[1,42],o=[1,26],l=[1,24],P=[1,25],B=[1,32],$=[1,33],F=[1,34],c=[1,45],z=[1,35],G=[1,36],U=[1,37],q=[1,38],j=[1,27],W=[1,28],Y=[1,29],H=[1,30],V=[1,31],h=[1,44],u=[1,46],d=[1,43],p=[1,47],X=[1,9],g=[1,8,9],f=[1,58],m=[1,59],y=[1,60],v=[1,61],x=[1,62],K=[1,63],Z=[1,64],b=[1,8,9,41],Q=[1,76],w=[1,8,9,12,13,22,39,41,44,66,67,68,69,70,71,72,77,79],k=[1,8,9,12,13,17,20,22,39,41,44,48,58,66,67,68,69,70,71,72,77,79,84,99,101,102],T=[13,58,84,99,101,102],E=[13,58,71,72,84,99,101,102],J=[13,58,66,67,68,69,70,84,99,101,102],ee=[1,98],C=[1,115],S=[1,107],_=[1,113],A=[1,108],L=[1,109],N=[1,110],I=[1,111],R=[1,112],M=[1,114],te=[22,58,59,80,84,85,86,87,88,89],re=[1,8,9,39,41,44],D=[1,8,9,22],ne=[1,143],ie=[1,8,9,59],O=[1,8,9,22,58,59,80,84,85,86,87,88,89],k={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,DOT:17,className:18,classLiteralName: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,CLASS:46,ANNOTATION_START:47,ANNOTATION_END:48,MEMBER:49,SEPARATOR:50,relation:51,NOTE_FOR:52,noteText:53,NOTE:54,CLASSDEF:55,classList:56,stylesOpt:57,ALPHA:58,COMMA:59,direction_tb:60,direction_bt:61,direction_rl:62,direction_lr:63,relationType:64,lineType:65,AGGREGATION:66,EXTENSION:67,COMPOSITION:68,DEPENDENCY:69,LOLLIPOP:70,LINE:71,DOTTED_LINE:72,CALLBACK:73,LINK:74,LINK_TARGET:75,CLICK:76,CALLBACK_NAME:77,CALLBACK_ARGS:78,HREF:79,STYLE:80,CSSCLASS:81,style:82,styleComponent:83,NUM:84,COLON:85,UNIT:86,SPACE:87,BRKT:88,PCT:89,commentToken:90,textToken:91,graphCodeTokens:92,textNoTagsToken:93,TAGSTART:94,TAGEND:95,"==":96,"--":97,DEFAULT:98,MINUS:99,keywords:100,UNICODE_TEXT:101,BQUOTE_STR:102,$accept:0,$end:1},terminals_:{2:"error",7:"CLASS_DIAGRAM",8:"NEWLINE",9:"EOF",12:"SQS",13:"STR",14:"SQE",17:"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:"CLASS",47:"ANNOTATION_START",48:"ANNOTATION_END",49:"MEMBER",50:"SEPARATOR",52:"NOTE_FOR",54:"NOTE",55:"CLASSDEF",58:"ALPHA",59:"COMMA",60:"direction_tb",61:"direction_bt",62:"direction_rl",63:"direction_lr",66:"AGGREGATION",67:"EXTENSION",68:"COMPOSITION",69:"DEPENDENCY",70:"LOLLIPOP",71:"LINE",72:"DOTTED_LINE",73:"CALLBACK",74:"LINK",75:"LINK_TARGET",76:"CLICK",77:"CALLBACK_NAME",78:"CALLBACK_ARGS",79:"HREF",80:"STYLE",81:"CSSCLASS",84:"NUM",85:"COLON",86:"UNIT",87:"SPACE",88:"BRKT",89:"PCT",92:"graphCodeTokens",94:"TAGSTART",95:"TAGEND",96:"==",97:"--",98:"DEFAULT",99:"MINUS",100:"keywords",101:"UNICODE_TEXT",102:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[4,1],[6,4],[5,1],[5,2],[5,3],[11,3],[15,1],[15,3],[15,2],[18,1],[18,3],[18,1],[18,2],[18,2],[18,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],[40,1],[40,2],[40,3],[24,1],[24,3],[24,4],[24,6],[43,2],[43,3],[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],[56,1],[56,3],[32,1],[32,1],[32,1],[32,1],[51,3],[51,2],[51,2],[51,1],[64,1],[64,1],[64,1],[64,1],[64,1],[65,1],[65,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],[57,1],[57,3],[82,1],[82,2],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[90,1],[90,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[91,1],[93,1],[93,1],[93,1],[93,1],[16,1],[16,1],[16,1],[16,1],[19,1],[53,1]],performAction:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){case 8:this.$=a[o-1];break;case 9:case 12:case 14:this.$=a[o];break;case 10:case 13:this.$=a[o-2]+"."+a[o];break;case 11:case 15:this.$=a[o-1]+a[o];break;case 16:case 17:this.$=a[o-1]+"~"+a[o]+"~";break;case 18:n.addRelation(a[o]);break;case 19:a[o-1].title=n.cleanupLabel(a[o]),n.addRelation(a[o-1]);break;case 30:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 31:case 32:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 33:n.addClassesToNamespace(a[o-3],a[o-1]);break;case 34:n.addClassesToNamespace(a[o-4],a[o-1]);break;case 35:this.$=a[o],n.addNamespace(a[o]);break;case 36:this.$=[a[o]];break;case 37:this.$=[a[o-1]];break;case 38:a[o].unshift(a[o-2]),this.$=a[o];break;case 40:n.setCssClass(a[o-2],a[o]);break;case 41:n.addMembers(a[o-3],a[o-1]);break;case 42:n.setCssClass(a[o-5],a[o-3]),n.addMembers(a[o-5],a[o-1]);break;case 43:this.$=a[o],n.addClass(a[o]);break;case 44:this.$=a[o-1],n.addClass(a[o-1]),n.setClassLabel(a[o-1],a[o]);break;case 45:n.addAnnotation(a[o],a[o-2]);break;case 46:case 59:this.$=[a[o]];break;case 47:a[o].push(a[o-1]),this.$=a[o];break;case 48:break;case 49:n.addMember(a[o-1],n.cleanupLabel(a[o]));break;case 50:case 51:break;case 52:this.$={id1:a[o-2],id2:a[o],relation:a[o-1],relationTitle1:"none",relationTitle2:"none"};break;case 53:this.$={id1:a[o-3],id2:a[o],relation:a[o-1],relationTitle1:a[o-2],relationTitle2:"none"};break;case 54:this.$={id1:a[o-3],id2:a[o],relation:a[o-2],relationTitle1:"none",relationTitle2:a[o-1]};break;case 55:this.$={id1:a[o-4],id2:a[o],relation:a[o-2],relationTitle1:a[o-3],relationTitle2:a[o-1]};break;case 56:n.addNote(a[o],a[o-1]);break;case 57:n.addNote(a[o]);break;case 58:this.$=a[o-2],n.defineClass(a[o-1],a[o]);break;case 60:this.$=a[o-2].concat([a[o]]);break;case 61:n.setDirection("TB");break;case 62:n.setDirection("BT");break;case 63:n.setDirection("RL");break;case 64:n.setDirection("LR");break;case 65:this.$={type1:a[o-2],type2:a[o],lineType:a[o-1]};break;case 66:this.$={type1:"none",type2:a[o],lineType:a[o-1]};break;case 67:this.$={type1:a[o-1],type2:"none",lineType:a[o]};break;case 68:this.$={type1:"none",type2:"none",lineType:a[o]};break;case 69:this.$=n.relationType.AGGREGATION;break;case 70:this.$=n.relationType.EXTENSION;break;case 71:this.$=n.relationType.COMPOSITION;break;case 72:this.$=n.relationType.DEPENDENCY;break;case 73:this.$=n.relationType.LOLLIPOP;break;case 74:this.$=n.lineType.LINE;break;case 75:this.$=n.lineType.DOTTED_LINE;break;case 76:case 82:this.$=a[o-2],n.setClickEvent(a[o-1],a[o]);break;case 77:case 83:this.$=a[o-3],n.setClickEvent(a[o-2],a[o-1]),n.setTooltip(a[o-2],a[o]);break;case 78:this.$=a[o-2],n.setLink(a[o-1],a[o]);break;case 79:this.$=a[o-3],n.setLink(a[o-2],a[o-1],a[o]);break;case 80:this.$=a[o-3],n.setLink(a[o-2],a[o-1]),n.setTooltip(a[o-2],a[o]);break;case 81:this.$=a[o-4],n.setLink(a[o-3],a[o-2],a[o]),n.setTooltip(a[o-3],a[o-1]);break;case 84:this.$=a[o-3],n.setClickEvent(a[o-2],a[o-1],a[o]);break;case 85:this.$=a[o-4],n.setClickEvent(a[o-3],a[o-2],a[o-1]),n.setTooltip(a[o-3],a[o]);break;case 86:this.$=a[o-3],n.setLink(a[o-2],a[o]);break;case 87:this.$=a[o-4],n.setLink(a[o-3],a[o-1],a[o]);break;case 88:this.$=a[o-4],n.setLink(a[o-3],a[o-1]),n.setTooltip(a[o-3],a[o]);break;case 89:this.$=a[o-5],n.setLink(a[o-4],a[o-2],a[o]),n.setTooltip(a[o-4],a[o-1]);break;case 90:this.$=a[o-2],n.setCssStyle(a[o-1],a[o]);break;case 91:n.setCssClass(a[o-1],a[o]);break;case 92:this.$=[a[o]];break;case 93:a[o-2].push(a[o]),this.$=a[o-2];break;case 95:this.$=a[o-1]+a[o]}},"anonymous"),table:[{3:1,4:2,5:3,6:4,7:[1,6],10:5,16:39,18:21,19:40,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:n,37:i,38:22,42:a,43:23,46:s,47:o,49:l,50:P,52:B,54:$,55:F,58:c,60:z,61:G,62:U,63:q,73:j,74:W,76:Y,80:H,81:V,84:h,99:u,101:d,102:p},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},t(X,[2,5],{8:[1,48]}),{8:[1,49]},t(g,[2,18],{22:[1,50]}),t(g,[2,20]),t(g,[2,21]),t(g,[2,22]),t(g,[2,23]),t(g,[2,24]),t(g,[2,25]),t(g,[2,26]),t(g,[2,27]),t(g,[2,28]),t(g,[2,29]),{34:[1,51]},{36:[1,52]},t(g,[2,32]),t(g,[2,48],{51:53,64:56,65:57,13:[1,54],22:[1,55],66:f,67:m,68:y,69:v,70:x,71:K,72:Z}),{39:[1,65]},t(b,[2,39],{39:[1,67],44:[1,66]}),t(g,[2,50]),t(g,[2,51]),{16:68,58:c,84:h,99:u,101:d},{16:39,18:69,19:40,58:c,84:h,99:u,101:d,102:p},{16:39,18:70,19:40,58:c,84:h,99:u,101:d,102:p},{16:39,18:71,19:40,58:c,84:h,99:u,101:d,102:p},{58:[1,72]},{13:[1,73]},{16:39,18:74,19:40,58:c,84:h,99:u,101:d,102:p},{13:Q,53:75},{56:77,58:[1,78]},t(g,[2,61]),t(g,[2,62]),t(g,[2,63]),t(g,[2,64]),t(w,[2,12],{16:39,19:40,18:80,17:[1,79],20:[1,81],58:c,84:h,99:u,101:d,102:p}),t(w,[2,14],{20:[1,82]}),{15:83,16:84,58:c,84:h,99:u,101:d},{16:39,18:85,19:40,58:c,84:h,99:u,101:d,102:p},t(k,[2,118]),t(k,[2,119]),t(k,[2,120]),t(k,[2,121]),t([1,8,9,12,13,20,22,39,41,44,66,67,68,69,70,71,72,77,79],[2,122]),t(X,[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,18:21,38:22,43:23,16:39,19:40,5:86,33:r,35:n,37:i,42:a,46:s,47:o,49:l,50:P,52:B,54:$,55:F,58:c,60:z,61:G,62:U,63:q,73:j,74:W,76:Y,80:H,81:V,84:h,99:u,101:d,102:p}),{5:87,10:5,16:39,18:21,19:40,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:n,37:i,38:22,42:a,43:23,46:s,47:o,49:l,50:P,52:B,54:$,55:F,58:c,60:z,61:G,62:U,63:q,73:j,74:W,76:Y,80:H,81:V,84:h,99:u,101:d,102:p},t(g,[2,19]),t(g,[2,30]),t(g,[2,31]),{13:[1,89],16:39,18:88,19:40,58:c,84:h,99:u,101:d,102:p},{51:90,64:56,65:57,66:f,67:m,68:y,69:v,70:x,71:K,72:Z},t(g,[2,49]),{65:91,71:K,72:Z},t(T,[2,68],{64:92,66:f,67:m,68:y,69:v,70:x}),t(E,[2,69]),t(E,[2,70]),t(E,[2,71]),t(E,[2,72]),t(E,[2,73]),t(J,[2,74]),t(J,[2,75]),{8:[1,94],24:95,40:93,43:23,46:s},{16:96,58:c,84:h,99:u,101:d},{45:97,49:ee},{48:[1,99]},{13:[1,100]},{13:[1,101]},{77:[1,102],79:[1,103]},{22:C,57:104,58:S,80:_,82:105,83:106,84:A,85:L,86:N,87:I,88:R,89:M},{58:[1,116]},{13:Q,53:117},t(g,[2,57]),t(g,[2,123]),{22:C,57:118,58:S,59:[1,119],80:_,82:105,83:106,84:A,85:L,86:N,87:I,88:R,89:M},t(te,[2,59]),{16:39,18:120,19:40,58:c,84:h,99:u,101:d,102:p},t(w,[2,15]),t(w,[2,16]),t(w,[2,17]),{39:[2,35]},{15:122,16:84,17:[1,121],39:[2,9],58:c,84:h,99:u,101:d},t(re,[2,43],{11:123,12:[1,124]}),t(X,[2,7]),{9:[1,125]},t(D,[2,52]),{16:39,18:126,19:40,58:c,84:h,99:u,101:d,102:p},{13:[1,128],16:39,18:127,19:40,58:c,84:h,99:u,101:d,102:p},t(T,[2,67],{64:129,66:f,67:m,68:y,69:v,70:x}),t(T,[2,66]),{41:[1,130]},{24:95,40:131,43:23,46:s},{8:[1,132],41:[2,36]},t(b,[2,40],{39:[1,133]}),{41:[1,134]},{41:[2,46],45:135,49:ee},{16:39,18:136,19:40,58:c,84:h,99:u,101:d,102:p},t(g,[2,76],{13:[1,137]}),t(g,[2,78],{13:[1,139],75:[1,138]}),t(g,[2,82],{13:[1,140],78:[1,141]}),{13:[1,142]},t(g,[2,90],{59:ne}),t(ie,[2,92],{83:144,22:C,58:S,80:_,84:A,85:L,86:N,87:I,88:R,89:M}),t(O,[2,94]),t(O,[2,96]),t(O,[2,97]),t(O,[2,98]),t(O,[2,99]),t(O,[2,100]),t(O,[2,101]),t(O,[2,102]),t(O,[2,103]),t(O,[2,104]),t(g,[2,91]),t(g,[2,56]),t(g,[2,58],{59:ne}),{58:[1,145]},t(w,[2,13]),{15:146,16:84,58:c,84:h,99:u,101:d},{39:[2,11]},t(re,[2,44]),{13:[1,147]},{1:[2,4]},t(D,[2,54]),t(D,[2,53]),{16:39,18:148,19:40,58:c,84:h,99:u,101:d,102:p},t(T,[2,65]),t(g,[2,33]),{41:[1,149]},{24:95,40:150,41:[2,37],43:23,46:s},{45:151,49:ee},t(b,[2,41]),{41:[2,47]},t(g,[2,45]),t(g,[2,77]),t(g,[2,79]),t(g,[2,80],{75:[1,152]}),t(g,[2,83]),t(g,[2,84],{13:[1,153]}),t(g,[2,86],{13:[1,155],75:[1,154]}),{22:C,58:S,80:_,82:156,83:106,84:A,85:L,86:N,87:I,88:R,89:M},t(O,[2,95]),t(te,[2,60]),{39:[2,10]},{14:[1,157]},t(D,[2,55]),t(g,[2,34]),{41:[2,38]},{41:[1,158]},t(g,[2,81]),t(g,[2,85]),t(g,[2,87]),t(g,[2,88],{75:[1,159]}),t(ie,[2,93],{83:144,22:C,58:S,80:_,84:A,85:L,86:N,87:I,88:R,89:M}),t(re,[2,8]),t(b,[2,42]),t(g,[2,89])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],83:[2,35],122:[2,11],125:[2,4],135:[2,47],146:[2,10],150:[2,38]},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,n=[0],i=[],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"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(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,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}};k.lexer=r,me(t,"Parser"),(rxt=new((t.prototype=k).Parser=t)).parser=rxt,nxt=rxt}),vxt=t(()=>{mu(),th(),ixt=["#","+","~","-",""],axt=class{static{me(this,"ClassMember")}constructor(t,e){this.memberType=e,this.visibility="",this.classifier="",this.text="",e=Sc(t,D()),this.parseMember(e)}getDisplayDetails(){let t=this.visibility+Bc(this.id);"method"===this.memberType&&(t+=`(${Bc(this.parameters.trim())})`,this.returnType)&&(t+=" : "+Bc(this.returnType)),t=t.trim();var e=this.parseClassifier();return{displayText:t,cssStyle:e}}parseMember(t){let e="";"method"===this.memberType?(r=/([#+~-])?(.+)\((.*)\)([\s$*])?(.*)([$*])?/.exec(t))&&(i=r[1]?r[1].trim():"",ixt.includes(i)&&(this.visibility=i),this.id=r[2],this.parameters=r[3]?r[3].trim():"",e=r[4]?r[4].trim():"",this.returnType=r[5]?r[5].trim():"",""===e)&&(i=this.returnType.substring(this.returnType.length-1),/[$*]/.exec(i))&&(e=i,this.returnType=this.returnType.substring(0,this.returnType.length-1)):(r=t.length,i=t.substring(0,1),n=t.substring(r-1),ixt.includes(i)&&(this.visibility=i),/[$*]/.exec(n)&&(e=n),this.id=t.substring(""===this.visibility?0:1,""===e?r:r-1)),this.classifier=e,this.id=this.id.startsWith(" ")?" "+this.id.trim():this.id.trim();var r,n,i=(this.visibility?"\\"+this.visibility:"")+Bc(this.id)+("method"===this.memberType?`(${Bc(this.parameters)})`+(this.returnType?" : "+Bc(this.returnType):""):"");this.text=i.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""}}}}),xxt=t(()=>{Q3(),e(),mu(),th(),ZE(),fu(),vxt(),sxt="classId-",oxt=0,lxt=me(t=>L.sanitizeText(t,D()),"sanitizeText"),cxt=class{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=[],this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,this.functions=[],this.lineType={LINE:0,DOTTED_LINE:1},this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},this.setupToolTips=me(t=>{let r=H(".mermaidTooltip");null===(r._groups||r)[0][0]&&(r=H("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),H(t).select("svg").selectAll("g.node").on("mouseover",t=>{var e;null!==(t=H(t.currentTarget)).attr("title")&&(e=this.getBoundingClientRect(),r.transition().duration(200).style("opacity",".9"),r.text(t.attr("title")).style("left",window.scrollX+e.left+(e.right-e.left)/2+"px").style("top",window.scrollY+e.top-14+document.body.scrollTop+"px"),r.html(r.html().replace(/<br\/>/g,"
")),t.classed("hover",!0))}).on("mouseout",t=>{r.transition().duration(500).style("opacity",0),H(t.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=ch,this.getAccTitle=hh,this.setAccDescription=uh,this.getAccDescription=dh,this.setDiagramTitle=ph,this.getDiagramTitle=gh,this.getConfig=me(()=>D().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.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{me(this,"ClassDB")}splitClassNameAndType(t){let e=L.sanitizeText(t,D()),r="",n=e;return 0`:"")}addClass(t){var t=L.sanitizeText(t,D()),{className:t,type:e}=this.splitClassNameAndType(t);this.classes.has(t)||(t=L.sanitizeText(t,D()),this.classes.set(t,{id:t,type:e,label:t,text:t+(e?`<${e}>`:""),shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:sxt+t+"-"+oxt}),oxt++)}addInterface(t,e){t={id:"interface"+this.interfaces.length,label:t,classId:e},this.interfaces.push(t)}lookUpDomId(t){if(t=L.sanitizeText(t,D()),this.classes.has(t))return this.classes.get(t).domId;throw new Error("Class not found: "+t)}clear(){this.relations=[],this.classes=new Map,this.notes=[],this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.direction="TB",lh()}getClass(t){return this.classes.get(t)}getClasses(){return this.classes}getRelations(){return this.relations}getNotes(){return this.notes}addRelation(t){M.debug("Adding relation: "+JSON.stringify(t));var e=[this.relationType.LOLLIPOP,this.relationType.AGGREGATION,this.relationType.COMPOSITION,this.relationType.DEPENDENCY,this.relationType.EXTENSION];t.relation.type1!==this.relationType.LOLLIPOP||e.includes(t.relation.type2)?t.relation.type2!==this.relationType.LOLLIPOP||e.includes(t.relation.type1)?(this.addClass(t.id1),this.addClass(t.id2)):(this.addClass(t.id1),this.addInterface(t.id2,t.id1),t.id2="interface"+(this.interfaces.length-1)):(this.addClass(t.id2),this.addInterface(t.id1,t.id2),t.id1="interface"+(this.interfaces.length-1)),t.id1=this.splitClassNameAndType(t.id1).className,t.id2=this.splitClassNameAndType(t.id2).className,t.relationTitle1=L.sanitizeText(t.relationTitle1.trim(),D()),t.relationTitle2=L.sanitizeText(t.relationTitle2.trim(),D()),this.relations.push(t)}addAnnotation(t,e){t=this.splitClassNameAndType(t).className,this.classes.get(t).annotations.push(e)}addMember(t,e){this.addClass(t),t=this.splitClassNameAndType(t).className,t=this.classes.get(t),"string"==typeof e&&((e=e.trim()).startsWith("<<")&&e.endsWith(">>")?t.annotations.push(lxt(e.substring(2,e.length-2))):0this.addMember(e,t)))}addNote(t,e){e={id:"note"+this.notes.length,class:e,text:t},this.notes.push(e)}cleanupLabel(t){return t.startsWith(":")&&(t=t.substring(1)),lxt(t.trim())}setCssClass(t,r){t.split(",").forEach(t=>{let e=t;/\d/.exec(t[0])&&(e=sxt+e),(t=this.classes.get(e))&&(t.cssClasses+=" "+r)})}defineClass(t,n){for(let e of t){let r=this.styleClasses.get(e);void 0===r&&(r={id:e,styles:[],textStyles:[]},this.styleClasses.set(e,r)),n&&n.forEach(t=>{var e;/color/.exec(t)&&(e=t.replace("fill","bgFill"),r.textStyles.push(e)),r.styles.push(t)}),this.classes.forEach(t=>{t.cssClasses.includes(e)&&t.styles.push(...n.flatMap(t=>t.split(",")))})}}setTooltip(t,e){t.split(",").forEach(t=>{void 0!==e&&(this.classes.get(t).tooltip=lxt(e))})}getTooltip(t,e){return(e&&this.namespaces.has(e)?this.namespaces.get(e):this).classes.get(t).tooltip}setLink(t,r,n){let i=D();t.split(",").forEach(t=>{let e=t;/\d/.exec(t[0])&&(e=sxt+e),(t=this.classes.get(e))&&(t.link=HE.formatUrl(r,i),"sandbox"===i.securityLevel?t.linkTarget="_top":t.linkTarget="string"==typeof n?lxt(n):"_blank")}),this.setCssClass(t,"clickable")}setClickEvent(t,e,r){t.split(",").forEach(t=>{this.setClickFunc(t,e,r),this.classes.get(t).haveCallback=!0}),this.setCssClass(t,"clickable")}setClickFunc(t,n,i){if(t=L.sanitizeText(t,D()),"loose"===D().securityLevel&&void 0!==n&&this.classes.has(t)){let e=this.lookUpDomId(t),r=[];if("string"==typeof i){r=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let e=0;e{var t=document.querySelector(`[id="${e}"]`);null!==t&&t.addEventListener("click",()=>{HE.runFunc(n,...r)},!1)})}}bindFunctions(e){this.functions.forEach(t=>{t(e)})}getDirection(){return this.direction}setDirection(t){this.direction=t}addNamespace(t){this.namespaces.has(t)||(this.namespaces.set(t,{id:t,classes:new Map,children:{},domId:sxt+t+"-"+this.namespaceCounter}),this.namespaceCounter++)}getNamespace(t){return this.namespaces.get(t)}getNamespaces(){return this.namespaces}addClassesToNamespace(t,e){if(this.namespaces.has(t))for(var r of e)r=this.splitClassNameAndType(r).className,this.classes.get(r).parent=t,this.namespaces.get(t).classes.set(r,this.classes.get(r))}setCssStyle(t,e){var r=this.classes.get(t);if(e&&r)for(var n of e)n.includes(",")?r.styles.push(...n.split(",")):r.styles.push(n)}getArrowMarker(t){let e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}getData(){var t,e,r,n,i,a=[],s=[],o=D();for(t of this.namespaces.keys()){var l=this.namespaces.get(t);l&&(l={id:l.id,label:l.id,isGroup:!0,padding:o.class.padding??16,shape:"rect",cssStyles:["fill: none","stroke: black"],look:o.look},a.push(l))}for(e of this.classes.keys()){var c,h=this.classes.get(e);h&&((c=h).parentId=h.parent,c.look=o.look,a.push(c))}let u=0;for(r of this.notes){u++;var d={id:r.id,label:r.text,isGroup:!1,shape:"note",padding:o.class.padding??6,cssStyles:["text-align: left","white-space: nowrap","fill: "+o.themeVariables.noteBkgColor,"stroke: "+o.themeVariables.noteBorderColor],look:o.look};a.push(d),(d=this.classes.get(r.class)?.id??"")&&(d={id:"edgeNote"+u,start:r.id,end:d,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:o.look},s.push(d))}for(n of this.interfaces){var p={id:n.id,label:n.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:o.look};a.push(p)}u=0;for(i of this.relations){u++;var g={id:KE(i.id1,i.id2,{prefix:"id",counter:u}),start:i.id1,end:i.id2,type:"normal",label:i.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(i.relation.type1),arrowTypeEnd:this.getArrowMarker(i.relation.type2),startLabelRight:"none"===i.relationTitle1?"":i.relationTitle1,endLabelLeft:"none"===i.relationTitle2?"":i.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:i.style||"",pattern:1==i.relation.lineType?"dashed":"solid",look:o.look};s.push(g)}return{nodes:a,edges:s,other:{},config:o,direction:this.getDirection()}}}}),bxt=t(()=>{HX(),hxt=me(t=>`g.classGroup text { - fill: ${t.nodeBorder||t.classText}; +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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,33,34,35,36,37,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},namespace:{rules:[26,29,30,31,32,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},"class-body":{rules:[26,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},class:{rules:[26,39,40,41,42,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr_multiline:{rules:[11,12,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_descr:{rules:[9,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},acc_title:{rules:[7,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_args:{rules:[22,23,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},callback_name:{rules:[19,20,21,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},href:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},struct:{rules:[26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},generic:{rules:[26,49,50,51,52,53,54,55,56,57,58,59,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},bqstring:{rules:[26,49,50,51,52,53,54,55,56,57,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},string:{rules:[24,25,26,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,86,87,88,89,90,91,92,93,94,95,97],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,8,10,13,14,15,16,17,18,26,27,28,29,38,49,50,51,52,53,54,55,56,57,60,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97],inclusive:!0}}};k.lexer=r,mt(e,"Parser"),(vbe=new((e.prototype=k).Parser=e)).parser=vbe,xbe=vbe}),Dbe=e(()=>{mu(),eh(),bbe=["#","+","~","-",""],wbe=class{static{mt(this,"ClassMember")}constructor(e,t){this.memberType=t,this.visibility="",this.classifier="",this.text="",t=_c(e,D()),this.parseMember(t)}getDisplayDetails(){let e=this.visibility+Bc(this.id);"method"===this.memberType&&(e+=`(${Bc(this.parameters.trim())})`,this.returnType)&&(e+=" : "+Bc(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))&&(i=r[1]?r[1].trim():"",bbe.includes(i)&&(this.visibility=i),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)&&(i=this.returnType.substring(this.returnType.length-1),/[$*]/.exec(i))&&(t=i,this.returnType=this.returnType.substring(0,this.returnType.length-1)):(r=e.length,i=e.substring(0,1),n=e.substring(r-1),bbe.includes(i)&&(this.visibility=i),/[$*]/.exec(n)&&(t=n),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,n,i=(this.visibility?"\\"+this.visibility:"")+Bc(this.id)+("method"===this.memberType?`(${Bc(this.parameters)})`+(this.returnType?" : "+Bc(this.returnType):""):"");this.text=i.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""}}}}),Obe=e(()=>{Zw(),t(),mu(),eh(),KC(),fu(),Dbe(),kbe="classId-",Tbe=0,Ebe=mt(e=>L.sanitizeText(e,D()),"sanitizeText"),Cbe=class{constructor(){this.relations=[],this.classes=new Map,this.styleClasses=new Map,this.notes=[],this.interfaces=[],this.namespaces=new Map,this.namespaceCounter=0,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 r=H(".mermaidTooltip");null===(r._groups||r)[0][0]&&(r=H("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),H(e).select("svg").selectAll("g.node").on("mouseover",e=>{var t;null!==(e=H(e.currentTarget)).attr("title")&&(t=this.getBoundingClientRect(),r.transition().duration(200).style("opacity",".9"),r.text(e.attr("title")).style("left",window.scrollX+t.left+(t.right-t.left)/2+"px").style("top",window.scrollY+t.top-14+document.body.scrollTop+"px"),r.html(r.html().replace(/<br\/>/g,"
")),e.classed("hover",!0))}).on("mouseout",e=>{r.transition().duration(500).style("opacity",0),H(e.currentTarget).classed("hover",!1)})},"setupToolTips"),this.direction="TB",this.setAccTitle=ch,this.getAccTitle=hh,this.setAccDescription=uh,this.getAccDescription=dh,this.setDiagramTitle=ph,this.getDiagramTitle=gh,this.getConfig=mt(()=>D().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.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=L.sanitizeText(e,D()),r="",n=t;return 0`:"")}addClass(e){var e=L.sanitizeText(e,D()),{className:e,type:t}=this.splitClassNameAndType(e);this.classes.has(e)||(e=L.sanitizeText(e,D()),this.classes.set(e,{id:e,type:t,label:e,text:e+(t?`<${t}>`:""),shape:"classBox",cssClasses:"default",methods:[],members:[],annotations:[],styles:[],domId:kbe+e+"-"+Tbe}),Tbe++)}addInterface(e,t){e={id:"interface"+this.interfaces.length,label:e,classId:t},this.interfaces.push(e)}lookUpDomId(e){if(e=L.sanitizeText(e,D()),this.classes.has(e))return this.classes.get(e).domId;throw new Error("Class not found: "+e)}clear(){this.relations=[],this.classes=new Map,this.notes=[],this.interfaces=[],this.functions=[],this.functions.push(this.setupToolTips.bind(this)),this.namespaces=new Map,this.namespaceCounter=0,this.direction="TB",lh()}getClass(e){return this.classes.get(e)}getClasses(){return this.classes}getRelations(){return this.relations}getNotes(){return this.notes}addRelation(e){M.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=L.sanitizeText(e.relationTitle1.trim(),D()),e.relationTitle2=L.sanitizeText(e.relationTitle2.trim(),D()),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(Ebe(t.substring(2,t.length-2))):0this.addMember(t,e)))}addNote(e,t){t={id:"note"+this.notes.length,class:t,text:e},this.notes.push(t)}cleanupLabel(e){return e.startsWith(":")&&(e=e.substring(1)),Ebe(e.trim())}setCssClass(e,r){e.split(",").forEach(e=>{let t=e;/\d/.exec(e[0])&&(t=kbe+t),(e=this.classes.get(t))&&(e.cssClasses+=" "+r)})}defineClass(e,n){for(let t of e){let r=this.styleClasses.get(t);void 0===r&&(r={id:t,styles:[],textStyles:[]},this.styleClasses.set(t,r)),n&&n.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(...n.flatMap(e=>e.split(",")))})}}setTooltip(e,t){e.split(",").forEach(e=>{void 0!==t&&(this.classes.get(e).tooltip=Ebe(t))})}getTooltip(e,t){return(t&&this.namespaces.has(t)?this.namespaces.get(t):this).classes.get(e).tooltip}setLink(e,r,n){let i=D();e.split(",").forEach(e=>{let t=e;/\d/.exec(e[0])&&(t=kbe+t),(e=this.classes.get(t))&&(e.link=YC.formatUrl(r,i),"sandbox"===i.securityLevel?e.linkTarget="_top":e.linkTarget="string"==typeof n?Ebe(n):"_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,n,i){if(e=L.sanitizeText(e,D()),"loose"===D().securityLevel&&void 0!==n&&this.classes.has(e)){let t=this.lookUpDomId(e),r=[];if("string"==typeof i){r=i.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let t=0;t{var e=document.querySelector(`[id="${t}"]`);null!==e&&e.addEventListener("click",()=>{YC.runFunc(n,...r)},!1)})}}bindFunctions(t){this.functions.forEach(e=>{e(t)})}getDirection(){return this.direction}setDirection(e){this.direction=e}addNamespace(e){this.namespaces.has(e)||(this.namespaces.set(e,{id:e,classes:new Map,children:{},domId:kbe+e+"-"+this.namespaceCounter}),this.namespaceCounter++)}getNamespace(e){return this.namespaces.get(e)}getNamespaces(){return this.namespaces}addClassesToNamespace(e,t){if(this.namespaces.has(e))for(var r of t)r=this.splitClassNameAndType(r).className,this.classes.get(r).parent=e,this.namespaces.get(e).classes.set(r,this.classes.get(r))}setCssStyle(e,t){var r=this.classes.get(e);if(t&&r)for(var n of t)n.includes(",")?r.styles.push(...n.split(",")):r.styles.push(n)}getArrowMarker(e){let t;switch(e){case 0:t="aggregation";break;case 1:t="extension";break;case 2:t="composition";break;case 3:t="dependency";break;case 4:t="lollipop";break;default:t="none"}return t}getData(){var e,t,r,n,i,a=[],s=[],o=D();for(e of this.namespaces.keys()){var l=this.namespaces.get(e);l&&(l={id:l.id,label:l.id,isGroup:!0,padding:o.class.padding??16,shape:"rect",cssStyles:["fill: none","stroke: black"],look:o.look},a.push(l))}for(t of this.classes.keys()){var c,h=this.classes.get(t);h&&((c=h).parentId=h.parent,c.look=o.look,a.push(c))}let u=0;for(r of this.notes){u++;var d={id:r.id,label:r.text,isGroup:!1,shape:"note",padding:o.class.padding??6,cssStyles:["text-align: left","white-space: nowrap","fill: "+o.themeVariables.noteBkgColor,"stroke: "+o.themeVariables.noteBorderColor],look:o.look};a.push(d),(d=this.classes.get(r.class)?.id??"")&&(d={id:"edgeNote"+u,start:r.id,end:d,type:"normal",thickness:"normal",classes:"relation",arrowTypeStart:"none",arrowTypeEnd:"none",arrowheadStyle:"",labelStyle:[""],style:["fill: none"],pattern:"dotted",look:o.look},s.push(d))}for(n of this.interfaces){var p={id:n.id,label:n.label,isGroup:!1,shape:"rect",cssStyles:["opacity: 0;"],look:o.look};a.push(p)}u=0;for(i of this.relations){u++;var g={id:XC(i.id1,i.id2,{prefix:"id",counter:u}),start:i.id1,end:i.id2,type:"normal",label:i.title,labelpos:"c",thickness:"normal",classes:"relation",arrowTypeStart:this.getArrowMarker(i.relation.type1),arrowTypeEnd:this.getArrowMarker(i.relation.type2),startLabelRight:"none"===i.relationTitle1?"":i.relationTitle1,endLabelLeft:"none"===i.relationTitle2?"":i.relationTitle2,arrowheadStyle:"",labelStyle:["display: inline-block"],style:i.style||"",pattern:1==i.relation.lineType?"dashed":"solid",look:o.look};s.push(g)}return{nodes:a,edges:s,other:{},config:o,direction:this.getDirection()}}}}),Pbe=e(()=>{WK(),Sbe=mt(e=>`g.classGroup text { + fill: ${e.nodeBorder||e.classText}; stroke: none; - font-family: ${t.fontFamily}; + font-family: ${e.fontFamily}; font-size: 10px; .title { @@ -1399,20 +1399,20 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l } .nodeLabel, .edgeLabel { - color: ${t.classText}; + color: ${e.classText}; } .edgeLabel .label rect { - fill: ${t.mainBkg}; + fill: ${e.mainBkg}; } .label text { - fill: ${t.classText}; + fill: ${e.classText}; } .labelBkg { - background: ${t.mainBkg}; + background: ${e.mainBkg}; } .edgeLabel .label span { - background: ${t.mainBkg}; + background: ${e.mainBkg}; } .classTitle { @@ -1423,14 +1423,14 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l .node ellipse, .node polygon, .node path { - fill: ${t.mainBkg}; - stroke: ${t.nodeBorder}; + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; stroke-width: 1px; } .divider { - stroke: ${t.nodeBorder}; + stroke: ${e.nodeBorder}; stroke-width: 1; } @@ -1439,29 +1439,29 @@ g.clickable { } g.classGroup rect { - fill: ${t.mainBkg}; - stroke: ${t.nodeBorder}; + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; } g.classGroup line { - stroke: ${t.nodeBorder}; + stroke: ${e.nodeBorder}; stroke-width: 1; } .classLabel .box { stroke: none; stroke-width: 0; - fill: ${t.mainBkg}; + fill: ${e.mainBkg}; opacity: 0.5; } .classLabel .label { - fill: ${t.nodeBorder}; + fill: ${e.nodeBorder}; font-size: 10px; } .relation { - stroke: ${t.lineColor}; + stroke: ${e.lineColor}; stroke-width: 1; fill: none; } @@ -1475,62 +1475,62 @@ g.classGroup line { } #compositionStart, .composition { - fill: ${t.lineColor} !important; - stroke: ${t.lineColor} !important; + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; stroke-width: 1; } #compositionEnd, .composition { - fill: ${t.lineColor} !important; - stroke: ${t.lineColor} !important; + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; stroke-width: 1; } #dependencyStart, .dependency { - fill: ${t.lineColor} !important; - stroke: ${t.lineColor} !important; + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; stroke-width: 1; } #dependencyStart, .dependency { - fill: ${t.lineColor} !important; - stroke: ${t.lineColor} !important; + fill: ${e.lineColor} !important; + stroke: ${e.lineColor} !important; stroke-width: 1; } #extensionStart, .extension { fill: transparent !important; - stroke: ${t.lineColor} !important; + stroke: ${e.lineColor} !important; stroke-width: 1; } #extensionEnd, .extension { fill: transparent !important; - stroke: ${t.lineColor} !important; + stroke: ${e.lineColor} !important; stroke-width: 1; } #aggregationStart, .aggregation { fill: transparent !important; - stroke: ${t.lineColor} !important; + stroke: ${e.lineColor} !important; stroke-width: 1; } #aggregationEnd, .aggregation { fill: transparent !important; - stroke: ${t.lineColor} !important; + stroke: ${e.lineColor} !important; stroke-width: 1; } #lollipopStart, .lollipop { - fill: ${t.mainBkg} !important; - stroke: ${t.lineColor} !important; + fill: ${e.mainBkg} !important; + stroke: ${e.lineColor} !important; stroke-width: 1; } #lollipopEnd, .lollipop { - fill: ${t.mainBkg} !important; - stroke: ${t.lineColor} !important; + fill: ${e.mainBkg} !important; + stroke: ${e.lineColor} !important; stroke-width: 1; } @@ -1542,53 +1542,53 @@ g.classGroup line { .classTitleText { text-anchor: middle; font-size: 18px; - fill: ${t.textColor}; + fill: ${e.textColor}; } - ${BX()} -`,"getStyles"),uxt=hxt}),wxt=t(()=>{mu(),e(),jM(),UX(),qX(),ZE(),dxt=me((t,e="TB")=>{if(!t.doc)return e;let r=e;for(var n of t.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),pxt=me(function(t,e){return e.db.getClasses()},"getClasses"),gxt=me(async function(t,e,r,n){M.info("REF0:"),M.info("Drawing class diagram (v3)",e);var{securityLevel:i,state:a,layout:s}=D(),o=n.db.getData(),i=IM(e,i);o.type=n.type,o.layoutAlgorithm=_X(s),o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["aggregation","extension","composition","dependency","lollipop"],o.diagramId=e,await CX(o,i),HE.insertTitle(i,"classDiagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),SX(i,8,"classDiagram",a?.useMaxWidth??!0)},"draw"),fxt={getClasses:pxt,draw:gxt,getDir:dxt}}),kxt={};oPt(kxt,{diagram:()=>Txt});var Txt,Ext=t(()=>{yxt(),xxt(),bxt(),wxt(),Txt={parser:nxt,get db(){return new cxt},renderer:fxt,styles:uxt,init:me(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}}),Cxt={};oPt(Cxt,{diagram:()=>_xt});var _xt,Sxt,Axt,Lxt,Nxt,Ixt,Rxt,Mxt,Dxt,Oxt,Pxt,Bxt,Fxt,$xt,zxt,Gxt,Uxt,qxt,jxt,Wxt,Yxt,Hxt,Vxt,Xxt,Kxt,Zxt,Qxt,Jxt,tbt,ebt,rbt,nbt,ibt,abt,sbt,obt,lbt,cbt,hbt,ubt,dbt=t(()=>{yxt(),xxt(),bxt(),wxt(),_xt={parser:nxt,get db(){return new cxt},renderer:fxt,styles:uxt,init:me(t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}}),pbt=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,2],n=[1,3],i=[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],x=[1,27],b=[1,28],w=[1,29],k=[1,30],T=[1,31],E=[1,32],C=[1,35],_=[1,36],S=[1,37],A=[1,38],L=[1,34],N=[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],R=[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:me(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:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 3:return n.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=n.trimColon(a[o]),this.$=c;break;case 14:this.$={stmt:"relation",state1:a[o-2],state2:a[o]};break;case 15:c=n.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:n.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(),n.setAccTitle(this.$);break;case 30:case 31:this.$=a[o].trim(),n.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:n.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:n.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:n.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:n.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:n,6:i},{1:[3]},{3:5,4:r,5:n,6:i},{3:6,4:r,5:n,6:i},e([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:x,37:b,38:w,41:k,45:T,48:E,51:C,52:_,53:S,54:A,57:L},e(N,[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:x,37:b,38:w,41:k,45:T,48:E,51:C,52:_,53:S,54:A,57:L},e(N,[2,7]),e(N,[2,8]),e(N,[2,9]),e(N,[2,10]),e(N,[2,11]),e(N,[2,12],{14:[1,40],15:[1,41]}),e(N,[2,16]),{18:[1,42]},e(N,[2,18],{20:[1,43]}),{23:[1,44]},e(N,[2,22]),e(N,[2,23]),e(N,[2,24]),e(N,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},e(N,[2,28]),{34:[1,49]},{36:[1,50]},e(N,[2,31]),{13:51,24:d,57:L},{42:[1,52],44:[1,53]},{46:[1,54]},{49:[1,55]},e(I,[2,44],{58:[1,56]}),e(I,[2,45],{58:[1,57]}),e(N,[2,38]),e(N,[2,39]),e(N,[2,40]),e(N,[2,41]),e(N,[2,6]),e(N,[2,13]),{13:58,24:d,57:L},e(N,[2,17]),e(R,a,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},e(N,[2,29]),e(N,[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]},e(N,[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:x,37:b,38:w,41:k,45:T,48:E,51:C,52:_,53:S,54:A,57:L},e(N,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},e(N,[2,34]),e(N,[2,35]),e(N,[2,36]),e(N,[2,37]),e(I,[2,46]),e(I,[2,47]),e(N,[2,15]),e(N,[2,19]),e(R,a,{7:78}),e(N,[2,26]),e(N,[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:x,37:b,38:w,41:k,45:T,48:E,51:C,52:_,53:S,54:A,57:L},e(N,[2,32]),e(N,[2,33]),e(N,[2,21])],defaultActions:{5:[2,1],6:[2,2],47:[2,48],48:[2,49]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"{mu(),t(),UD(),zK(),GK(),KC(),Abe=mt((e,t="TB")=>{if(!e.doc)return t;let r=t;for(var n of e.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),Lbe=mt(function(e,t){return t.db.getClasses()},"getClasses"),Nbe=mt(async function(e,t,r,n){M.info("REF0:"),M.info("Drawing class diagram (v3)",t);var{securityLevel:i,state:a,layout:s}=D(),o=n.db.getData(),i=LD(t,i);o.type=n.type,o.layoutAlgorithm=EK(s),o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["aggregation","extension","composition","dependency","lollipop"],o.diagramId=t,await TK(o,i),YC.insertTitle(i,"classDiagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),CK(i,8,"classDiagram",a?.useMaxWidth??!0)},"draw"),Ibe={getClasses:Lbe,draw:Nbe,getDir:Abe}}),$be={};JBe($be,{diagram:()=>Fbe});var Fbe,zbe=e(()=>{Mbe(),Obe(),Pbe(),Bbe(),Fbe={parser:xbe,get db(){return new Cbe},renderer:Ibe,styles:_be,init:mt(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),Gbe={};JBe(Gbe,{diagram:()=>Ube});var Ube,qbe,jbe,Wbe,Ybe,Hbe,Vbe,Xbe,Kbe,Zbe,Qbe,Jbe,e4e,t4e,r4e,n4e,i4e,a4e,s4e,o4e,l4e,c4e,h4e,u4e,d4e,p4e,g4e,f4e,m4e,y4e,v4e,x4e,b4e,w4e,k4e,T4e,E4e,C4e,S4e,_4e,A4e=e(()=>{Mbe(),Obe(),Pbe(),Bbe(),Ube={parser:xbe,get db(){return new Cbe},renderer:Ibe,styles:_be,init:mt(e=>{e.class||(e.class={}),e.class.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),L4e=e(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[1,2],n=[1,3],i=[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],x=[1,27],b=[1,28],w=[1,29],k=[1,30],T=[1,31],E=[1,32],C=[1,35],S=[1,36],_=[1,37],A=[1,38],L=[1,34],N=[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],R=[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,n,i,a,s){var o=a.length-1;switch(i){case 3:return n.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=n.trimColon(a[o]),this.$=c;break;case 14:this.$={stmt:"relation",state1:a[o-2],state2:a[o]};break;case 15:c=n.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:n.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(),n.setAccTitle(this.$);break;case 30:case 31:this.$=a[o].trim(),n.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:n.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:n.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:n.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:n.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:n,6:i},{1:[3]},{3:5,4:r,5:n,6:i},{3:6,4:r,5:n,6:i},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:x,37:b,38:w,41:k,45:T,48:E,51:C,52:S,53:_,54:A,57:L},t(N,[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:x,37:b,38:w,41:k,45:T,48:E,51:C,52:S,53:_,54:A,57:L},t(N,[2,7]),t(N,[2,8]),t(N,[2,9]),t(N,[2,10]),t(N,[2,11]),t(N,[2,12],{14:[1,40],15:[1,41]}),t(N,[2,16]),{18:[1,42]},t(N,[2,18],{20:[1,43]}),{23:[1,44]},t(N,[2,22]),t(N,[2,23]),t(N,[2,24]),t(N,[2,25]),{30:45,31:[1,46],59:[1,47],60:[1,48]},t(N,[2,28]),{34:[1,49]},{36:[1,50]},t(N,[2,31]),{13:51,24:d,57:L},{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(N,[2,38]),t(N,[2,39]),t(N,[2,40]),t(N,[2,41]),t(N,[2,6]),t(N,[2,13]),{13:58,24:d,57:L},t(N,[2,17]),t(R,a,{7:59}),{24:[1,60]},{24:[1,61]},{23:[1,62]},{24:[2,48]},{24:[2,49]},t(N,[2,29]),t(N,[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(N,[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:x,37:b,38:w,41:k,45:T,48:E,51:C,52:S,53:_,54:A,57:L},t(N,[2,20],{20:[1,73]}),{31:[1,74]},{24:[1,75]},{39:[1,76]},{39:[1,77]},t(N,[2,34]),t(N,[2,35]),t(N,[2,36]),t(N,[2,37]),t(I,[2,46]),t(I,[2,47]),t(N,[2,15]),t(N,[2,19]),t(R,a,{7:78}),t(N,[2,26]),t(N,[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:x,37:b,38:w,41:k,45:T,48:E,51:C,52:S,53:_,54:A,57:L},t(N,[2,32]),t(N,[2,33]),t(N,[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,n=[0],i=[],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"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(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,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[12,13],inclusive:!1},struct:{rules:[12,13,25,29,32,38,45,46,47,48,57,58,59,60,74,75,76,77,78],inclusive:!1},FLOATING_NOTE_ID:{rules:[67],inclusive:!1},FLOATING_NOTE:{rules:[64,65,66],inclusive:!1},NOTE_TEXT:{rules:[69,70],inclusive:!1},NOTE_ID:{rules:[68],inclusive:!1},NOTE:{rules:[61,62,63],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[34],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[33],inclusive:!1},CLASS_STYLE:{rules:[31],inclusive:!1},CLASS:{rules:[30],inclusive:!1},CLASSDEFID:{rules:[28],inclusive:!1},CLASSDEF:{rules:[26,27],inclusive:!1},acc_descr_multiline:{rules:[23,24],inclusive:!1},acc_descr:{rules:[21],inclusive:!1},acc_title:{rules:[19],inclusive:!1},SCALE:{rules:[16,17,36,37],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[51],inclusive:!1},STATE_STRING:{rules:[52,53],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[12,13,39,40,41,42,43,44,49,50,54,55,56],inclusive:!1},ID:{rules:[12,13],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,18,20,22,25,29,32,35,38,56,60,71,72,73,74,75,76,77,79,80,81],inclusive:!0}}};r.lexer=n,me(t,"Parser"),(Sxt=new((t.prototype=r).Parser=t)).parser=Sxt,Axt=Sxt}),gbt=t(()=>{Nxt=Lxt="TB",Ixt="dir",Mxt="root",Dxt="relation",Oxt="classDef",Pxt="style",Bxt="applyClass",Fxt="default",zxt="fill:none",Gxt="fill: #333",Uxt="c",qxt="text",jxt="normal",Wxt="rect",Yxt="rectWithTitle",Hxt="stateStart",Vxt="stateEnd",Xxt=$xt="divider",Kxt="roundedWithTitle",Qxt="noteGroup",tbt=(Jxt="statediagram")+"-state",rbt=(ebt="transition")+" note-edge",nbt=Jxt+"-note",ibt=Jxt+"-cluster",abt=Jxt+"-cluster-alt",lbt=Rxt="state",hbt=(cbt="----")+(obt=Zxt="note"),ubt=""+cbt+(sbt="parent")});function fbt(t="",e=0,r="",n=cbt){return n=null!==r&&0"!==e.id&&""!==e.id&&(e.cssClasses&&(Array.isArray(e.cssCompiledStyles)||(e.cssCompiledStyles=[]),e.cssClasses.split(" ").forEach(t=>{(t=r.get(t))&&(e.cssCompiledStyles=[...e.cssCompiledStyles??[],...t.styles])})),(n=t.find(t=>t.id===e.id))?Object.assign(n,e):t.push(e))}function ybt(t){return t?.classes?.join(" ")??""}function vbt(t){return t?.styles??[]}var xbt,bbt,wbt,kbt,Tbt,Ebt,Cbt,_bt,Sbt,Abt,Lbt,Nbt,Ibt,Rbt,Mbt,Dbt,Obt,Pbt,Bbt,Fbt,$bt,zbt,Gbt,Ubt,qbt,jbt,Wbt,Ybt,Hbt,Vbt,Xbt,Kbt,Zbt,Qbt,Jbt,t4t,e4t,r4t=t(()=>{mu(),e(),th(),gbt(),xbt=new Map,bbt=0,me(fbt,"stateDomId"),wbt=me((r,t,n,i,a,s,o,l)=>{M.trace("items",t),t.forEach(t=>{switch(t.stmt){case Rxt:case Fxt:Tbt(r,t,n,i,a,s,o,l);break;case Dxt:Tbt(r,t.state1,n,i,a,s,o,l),Tbt(r,t.state2,n,i,a,s,o,l);var e={id:"edge"+bbt,start:t.state1.id,end:t.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:zxt,labelStyle:"",label:L.sanitizeText(t.description??"",D()),arrowheadStyle:Gxt,labelpos:Uxt,labelType:qxt,thickness:jxt,classes:ebt,look:o};a.push(e),bbt++}})},"setupDoc"),kbt=me((t,e=Nxt)=>{let r=e;if(t.doc)for(var n of t.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),me(mbt,"insertOrUpdateNode"),me(ybt,"getClassesFromDbInfo"),me(vbt,"getStylesFromDbInfo"),Tbt=me((r,n,t,i,a,e,s,o)=>{var l=n.id,c=t.get(l),h=ybt(c),u=vbt(c),d=D();if(M.info("dataFetcher parsedItem",n,c,u),"root"!==l){let t=Wxt;if(!0===n.start?t=Hxt:!1===n.start&&(t=Vxt),n.type!==Fxt&&(t=n.type),xbt.get(l)||xbt.set(l,{id:l,shape:t,description:L.sanitizeText(l,d),cssClasses:h+" "+tbt,cssStyles:u}),c=xbt.get(l),n.description&&(Array.isArray(c.description)?(c.shape=Yxt,c.description.push(n.description)):c.description?.length&&0{xbt.clear(),bbt=0},"reset")}),n4t=t(()=>{mu(),e(),jM(),UX(),qX(),ZE(),gbt(),Cbt=me((t,e=Nxt)=>{if(!t.doc)return e;let r=e;for(var n of t.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),_bt=me(function(t,e){return e.db.getClasses()},"getClasses"),Sbt=me(async function(t,e,r,n){M.info("REF0:"),M.info("Drawing state diagram (v2)",e);var{securityLevel:i,state:a,layout:s}=D();n.db.extract(n.db.getRootDocV2());let o=n.db.getData(),l=IM(e,i);o.type=n.type,o.layoutAlgorithm=s,o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["barb"],o.diagramId=e,await CX(o,l);try{("function"==typeof n.db.getLinks?n.db.getLinks():new Map).forEach((a,t)=>{let s="string"==typeof t?t:"string"==typeof t?.id?t.id:"";if(s){let t=l.node()?.querySelectorAll("g"),e,r,n,i;t?.forEach(t=>{t.textContent?.trim()===s&&(e=t)}),e?(r=e.parentNode)?(n=document.createElementNS("http://www.w3.org/2000/svg","a"),i=a.url.replace(/^"+|"+$/g,""),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i),n.setAttribute("target","_blank"),a.tooltip&&(i=a.tooltip.replace(/^"+|"+$/g,""),n.setAttribute("title",i)),r.replaceChild(n,e),n.appendChild(e),M.info("🔗 Wrapped node in
tag for:",s,a.url)):M.warn("⚠️ Node has no parent, cannot wrap:",s):M.warn("⚠️ Could not find node matching text:",s)}else M.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(t))})}catch(t){M.error("❌ Error injecting clickable links:",t)}HE.insertTitle(l,"statediagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),SX(l,8,Jxt,a?.useMaxWidth??!0)},"draw"),Abt={getClasses:_bt,draw:Sbt,getDir:Cbt}}),i4t=t(()=>{mu(),e(),ZE(),th(),fu(),r4t(),n4t(),gbt(),Lbt={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},Nbt=me(()=>new Map,"newClassesList"),Ibt=me(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),Rbt=me(t=>JSON.parse(JSON.stringify(t)),"clone"),Mbt=class{constructor(t){this.version=t,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=Nbt(),this.documents={root:Ibt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=hh,this.setAccTitle=ch,this.getAccDescription=dh,this.setAccDescription=uh,this.setDiagramTitle=ph,this.getDiagramTitle=gh,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{me(this,"StateDB")}static{this.relationType={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3}}extract(t){this.clear(!0);for(var e of Array.isArray(t)?t:t.doc)switch(e.stmt){case Rxt:this.addState(e.id.trim(),e.type,e.doc,e.description,e.note);break;case Dxt:this.addRelation(e.state1,e.state2,e.description);break;case Oxt:this.addStyleClass(e.id.trim(),e.classes);break;case Pxt:this.handleStyleDef(e);break;case Bxt:this.setCssClass(e.id.trim(),e.styleClass);break;case"click":this.addLink(e.id,e.url,e.tooltip)}var r,t=this.getStates(),n=D();Ebt(),Tbt(void 0,this.getRootDocV2(),t,this.nodes,this.edges,!0,n.look,this.classes);for(r of this.nodes)if(Array.isArray(r.label)){if(r.description=r.label.slice(1),r.isGroup&&0t.replace(/;/g,"")?.trim()))}}setRootDoc(t){M.info("Setting root doc",t),this.rootDoc=t,1===this.version?this.extract(t):this.extract(this.getRootDocV2())}docTranslator(r,n,t){if(n.stmt===Dxt)this.docTranslator(r,n.state1,!0),this.docTranslator(r,n.state2,!1);else if(n.stmt===Rxt&&(n.id===Lbt.START_NODE?(n.id=r.id+(t?"_start":"_end"),n.start=t):n.id=n.id.trim()),(n.stmt===Mxt||n.stmt===Rxt)&&n.doc){let t=[],e=[];for(var i of n.doc){var a;i.type===$xt?((a=Rbt(i)).doc=Rbt(e),t.push(a),e=[]):e.push(i)}0this.docTranslator(n,t,!0))}}getRootDocV2(){return this.docTranslator({id:Mxt,stmt:Mxt},{id:Mxt,stmt:Mxt,doc:this.rootDoc},!0),{id:Mxt,doc:this.rootDoc}}addState(t,e=Fxt,r=void 0,n=void 0,i=void 0,a=void 0,s=void 0,o=void 0){let l=t?.trim();if(this.currentDocument.states.has(l)){if(!(t=this.currentDocument.states.get(l)))throw new Error("State not found: "+l);t.doc||(t.doc=r),t.type||(t.type=e)}else M.info("Adding state ",l,n),this.currentDocument.states.set(l,{stmt:Rxt,id:l,descriptions:[],type:e,doc:r,note:i,classes:[],styles:[],textStyles:[]});if(n&&(M.info("Setting state description",l,n),(Array.isArray(n)?n:[n]).forEach(t=>this.addDescription(l,t.trim()))),i){if(!(t=this.currentDocument.states.get(l)))throw new Error("State not found: "+l);t.note=i,t.note.text=L.sanitizeText(t.note.text,D())}a&&(M.info("Setting state classes",l,a),(Array.isArray(a)?a:[a]).forEach(t=>this.setCssClass(l,t.trim()))),s&&(M.info("Setting state styles",l,s),(Array.isArray(s)?s:[s]).forEach(t=>this.setStyle(l,t.trim()))),o&&(M.info("Setting state styles",l,s),(Array.isArray(o)?o:[o]).forEach(t=>this.setTextStyle(l,t.trim())))}clear(t){this.nodes=[],this.edges=[],this.documents={root:Ibt()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Nbt(),t||(this.links=new Map,lh())}getState(t){return this.currentDocument.states.get(t)}getStates(){return this.currentDocument.states}logDocuments(){M.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(t,e,r){this.links.set(t,{url:e,tooltip:r}),M.warn("Adding link",t,e,r)}getLinks(){return this.links}startIdIfNeeded(t=""){return t===Lbt.START_NODE?(this.startEndCount++,""+Lbt.START_TYPE+this.startEndCount):t}startTypeIfNeeded(t="",e=Fxt){return t===Lbt.START_NODE?Lbt.START_TYPE:e}endIdIfNeeded(t=""){return t===Lbt.END_NODE?(this.startEndCount++,""+Lbt.END_TYPE+this.startEndCount):t}endTypeIfNeeded(t="",e=Fxt){return t===Lbt.END_NODE?Lbt.END_TYPE:e}addRelationObjs(t,e,r=""){var n=this.startIdIfNeeded(t.id.trim()),i=this.startTypeIfNeeded(t.id.trim(),t.type),a=this.startIdIfNeeded(e.id.trim()),s=this.startTypeIfNeeded(e.id.trim(),e.type);this.addState(n,i,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),this.addState(a,s,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),this.currentDocument.relations.push({id1:n,id2:a,relationTitle:L.sanitizeText(r,D())})}addRelation(t,e,r){var n,i;"object"==typeof t&&"object"==typeof e?this.addRelationObjs(t,e,r):"string"==typeof t&&"string"==typeof e&&(n=this.startIdIfNeeded(t.trim()),t=this.startTypeIfNeeded(t),i=this.endIdIfNeeded(e.trim()),e=this.endTypeIfNeeded(e),this.addState(n,t),this.addState(i,e),this.currentDocument.relations.push({id1:n,id2:i,relationTitle:r?L.sanitizeText(r,D()):void 0}))}addDescription(t,e){t=this.currentDocument.states.get(t),e=e.startsWith(":")?e.replace(":","").trim():e,t?.descriptions?.push(L.sanitizeText(e,D()))}cleanupLabel(t){return(t.startsWith(":")?t.slice(2):t).trim()}getDividerId(){return this.dividerCnt++,"divider-id-"+this.dividerCnt}addStyleClass(t,e=""){this.classes.has(t)||this.classes.set(t,{id:t,styles:[],textStyles:[]});let r=this.classes.get(t);e&&r&&e.split(Lbt.STYLECLASS_SEP).forEach(t=>{var e=t.replace(/([^;]*);/,"$1").trim();RegExp(Lbt.COLOR_KEYWORD).exec(t)&&(t=e.replace(Lbt.FILL_KEYWORD,Lbt.BG_FILL).replace(Lbt.COLOR_KEYWORD,Lbt.FILL_KEYWORD),r.textStyles.push(t)),r.styles.push(e)})}getClasses(){return this.classes}setCssClass(t,r){t.split(",").forEach(t=>{let e=this.getState(t);e||(t=t.trim(),this.addState(t),e=this.getState(t)),e?.classes?.push(r)})}setStyle(t,e){this.getState(t)?.styles?.push(e)}setTextStyle(t,e){this.getState(t)?.textStyles?.push(e)}getDirectionStatement(){return this.rootDoc.find(t=>t.stmt===Ixt)}getDirection(){return this.getDirectionStatement()?.value??Lxt}setDirection(t){var e=this.getDirectionStatement();e?e.value=t:this.rootDoc.unshift({stmt:Ixt,value:t})}trimColon(t){return(t.startsWith(":")?t.slice(1):t).trim()}getData(){var t=D();return{nodes:this.nodes,edges:this.edges,other:{},config:t,direction:Cbt(this.getRootDocV2())}}getConfig(){return D().state}}}),a4t=t(()=>{Dbt=me(t=>` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[12,13],inclusive:!1},struct:{rules:[12,13,25,29,32,38,45,46,47,48,57,58,59,60,74,75,76,77,78],inclusive:!1},FLOATING_NOTE_ID:{rules:[67],inclusive:!1},FLOATING_NOTE:{rules:[64,65,66],inclusive:!1},NOTE_TEXT:{rules:[69,70],inclusive:!1},NOTE_ID:{rules:[68],inclusive:!1},NOTE:{rules:[61,62,63],inclusive:!1},STYLEDEF_STYLEOPTS:{rules:[],inclusive:!1},STYLEDEF_STYLES:{rules:[34],inclusive:!1},STYLE_IDS:{rules:[],inclusive:!1},STYLE:{rules:[33],inclusive:!1},CLASS_STYLE:{rules:[31],inclusive:!1},CLASS:{rules:[30],inclusive:!1},CLASSDEFID:{rules:[28],inclusive:!1},CLASSDEF:{rules:[26,27],inclusive:!1},acc_descr_multiline:{rules:[23,24],inclusive:!1},acc_descr:{rules:[21],inclusive:!1},acc_title:{rules:[19],inclusive:!1},SCALE:{rules:[16,17,36,37],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[51],inclusive:!1},STATE_STRING:{rules:[52,53],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[12,13,39,40,41,42,43,44,49,50,54,55,56],inclusive:!1},ID:{rules:[12,13],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,13,14,15,18,20,22,25,29,32,35,38,56,60,71,72,73,74,75,76,77,79,80,81],inclusive:!0}}};r.lexer=n,mt(e,"Parser"),(qbe=new((e.prototype=r).Parser=e)).parser=qbe,jbe=qbe}),N4e=e(()=>{Ybe=Wbe="TB",Hbe="dir",Xbe="root",Kbe="relation",Zbe="classDef",Qbe="style",Jbe="applyClass",e4e="default",r4e="fill:none",n4e="fill: #333",i4e="c",a4e="text",s4e="normal",o4e="rect",l4e="rectWithTitle",c4e="stateStart",h4e="stateEnd",u4e=t4e="divider",d4e="roundedWithTitle",g4e="noteGroup",m4e=(f4e="statediagram")+"-state",v4e=(y4e="transition")+" note-edge",x4e=f4e+"-note",b4e=f4e+"-cluster",w4e=f4e+"-cluster-alt",E4e=Vbe="state",S4e=(C4e="----")+(T4e=p4e="note"),_4e=""+C4e+(k4e="parent")});function I4e(e="",t=0,r="",n=C4e){return n=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])})),(n=e.find(e=>e.id===t.id))?Object.assign(n,t):e.push(t))}function M4e(e){return e?.classes?.join(" ")??""}function D4e(e){return e?.styles??[]}var O4e,P4e,B4e,$4e,F4e,z4e,G4e,U4e,q4e,j4e,W4e,Y4e,H4e,V4e,X4e,K4e,Z4e,Q4e,J4e,e5e,t5e,r5e,n5e,i5e,a5e,s5e,o5e,l5e,c5e,h5e,u5e,d5e,p5e,g5e,f5e,m5e,y5e,v5e=e(()=>{mu(),t(),eh(),N4e(),O4e=new Map,P4e=0,mt(I4e,"stateDomId"),B4e=mt((r,e,n,i,a,s,o,l)=>{M.trace("items",e),e.forEach(e=>{switch(e.stmt){case Vbe:case e4e:F4e(r,e,n,i,a,s,o,l);break;case Kbe:F4e(r,e.state1,n,i,a,s,o,l),F4e(r,e.state2,n,i,a,s,o,l);var t={id:"edge"+P4e,start:e.state1.id,end:e.state2.id,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:r4e,labelStyle:"",label:L.sanitizeText(e.description??"",D()),arrowheadStyle:n4e,labelpos:i4e,labelType:a4e,thickness:s4e,classes:y4e,look:o};a.push(t),P4e++}})},"setupDoc"),$4e=mt((e,t=Ybe)=>{let r=t;if(e.doc)for(var n of e.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),mt(R4e,"insertOrUpdateNode"),mt(M4e,"getClassesFromDbInfo"),mt(D4e,"getStylesFromDbInfo"),F4e=mt((r,n,e,i,a,t,s,o)=>{var l=n.id,c=e.get(l),h=M4e(c),u=D4e(c),d=D();if(M.info("dataFetcher parsedItem",n,c,u),"root"!==l){let e=o4e;if(!0===n.start?e=c4e:!1===n.start&&(e=h4e),n.type!==e4e&&(e=n.type),O4e.get(l)||O4e.set(l,{id:l,shape:e,description:L.sanitizeText(l,d),cssClasses:h+" "+m4e,cssStyles:u}),c=O4e.get(l),n.description&&(Array.isArray(c.description)?(c.shape=l4e,c.description.push(n.description)):c.description?.length&&0{O4e.clear(),P4e=0},"reset")}),x5e=e(()=>{mu(),t(),UD(),zK(),GK(),KC(),N4e(),G4e=mt((e,t=Ybe)=>{if(!e.doc)return t;let r=t;for(var n of e.doc)"dir"===n.stmt&&(r=n.value);return r},"getDir"),U4e=mt(function(e,t){return t.db.getClasses()},"getClasses"),q4e=mt(async function(e,t,r,n){M.info("REF0:"),M.info("Drawing state diagram (v2)",t);var{securityLevel:i,state:a,layout:s}=D();n.db.extract(n.db.getRootDocV2());let o=n.db.getData(),l=LD(t,i);o.type=n.type,o.layoutAlgorithm=s,o.nodeSpacing=a?.nodeSpacing||50,o.rankSpacing=a?.rankSpacing||50,o.markers=["barb"],o.diagramId=t,await TK(o,l);try{("function"==typeof n.db.getLinks?n.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,n,i;e?.forEach(e=>{e.textContent?.trim()===s&&(t=e)}),t?(r=t.parentNode)?(n=document.createElementNS("http://www.w3.org/2000/svg","a"),i=a.url.replace(/^"+|"+$/g,""),n.setAttributeNS("http://www.w3.org/1999/xlink","xlink:href",i),n.setAttribute("target","_blank"),a.tooltip&&(i=a.tooltip.replace(/^"+|"+$/g,""),n.setAttribute("title",i)),r.replaceChild(n,t),n.appendChild(t),M.info("🔗 Wrapped node in tag for:",s,a.url)):M.warn("⚠️ Node has no parent, cannot wrap:",s):M.warn("⚠️ Could not find node matching text:",s)}else M.warn("⚠️ Invalid or missing stateId from key:",JSON.stringify(e))})}catch(e){M.error("❌ Error injecting clickable links:",e)}YC.insertTitle(l,"statediagramTitleText",a?.titleTopMargin??25,n.db.getDiagramTitle()),CK(l,8,f4e,a?.useMaxWidth??!0)},"draw"),j4e={getClasses:U4e,draw:q4e,getDir:G4e}}),b5e=e(()=>{mu(),t(),KC(),eh(),fu(),v5e(),x5e(),N4e(),W4e={START_NODE:"[*]",START_TYPE:"start",END_NODE:"[*]",END_TYPE:"end",COLOR_KEYWORD:"color",FILL_KEYWORD:"fill",BG_FILL:"bgFill",STYLECLASS_SEP:","},Y4e=mt(()=>new Map,"newClassesList"),H4e=mt(()=>({relations:[],states:new Map,documents:{}}),"newDoc"),V4e=mt(e=>JSON.parse(JSON.stringify(e)),"clone"),X4e=class{constructor(e){this.version=e,this.nodes=[],this.edges=[],this.rootDoc=[],this.classes=Y4e(),this.documents={root:H4e()},this.currentDocument=this.documents.root,this.startEndCount=0,this.dividerCnt=0,this.links=new Map,this.getAccTitle=hh,this.setAccTitle=ch,this.getAccDescription=dh,this.setAccDescription=uh,this.setDiagramTitle=ph,this.getDiagramTitle=gh,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 Vbe:this.addState(t.id.trim(),t.type,t.doc,t.description,t.note);break;case Kbe:this.addRelation(t.state1,t.state2,t.description);break;case Zbe:this.addStyleClass(t.id.trim(),t.classes);break;case Qbe:this.handleStyleDef(t);break;case Jbe:this.setCssClass(t.id.trim(),t.styleClass);break;case"click":this.addLink(t.id,t.url,t.tooltip)}var r,e=this.getStates(),n=D();z4e(),F4e(void 0,this.getRootDocV2(),e,this.nodes,this.edges,!0,n.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){M.info("Setting root doc",e),this.rootDoc=e,1===this.version?this.extract(e):this.extract(this.getRootDocV2())}docTranslator(r,n,e){if(n.stmt===Kbe)this.docTranslator(r,n.state1,!0),this.docTranslator(r,n.state2,!1);else if(n.stmt===Vbe&&(n.id===W4e.START_NODE?(n.id=r.id+(e?"_start":"_end"),n.start=e):n.id=n.id.trim()),(n.stmt===Xbe||n.stmt===Vbe)&&n.doc){let e=[],t=[];for(var i of n.doc){var a;i.type===t4e?((a=V4e(i)).doc=V4e(t),e.push(a),t=[]):t.push(i)}0this.docTranslator(n,e,!0))}}getRootDocV2(){return this.docTranslator({id:Xbe,stmt:Xbe},{id:Xbe,stmt:Xbe,doc:this.rootDoc},!0),{id:Xbe,doc:this.rootDoc}}addState(e,t=e4e,r=void 0,n=void 0,i=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 M.info("Adding state ",l,n),this.currentDocument.states.set(l,{stmt:Vbe,id:l,descriptions:[],type:t,doc:r,note:i,classes:[],styles:[],textStyles:[]});if(n&&(M.info("Setting state description",l,n),(Array.isArray(n)?n:[n]).forEach(e=>this.addDescription(l,e.trim()))),i){if(!(e=this.currentDocument.states.get(l)))throw new Error("State not found: "+l);e.note=i,e.note.text=L.sanitizeText(e.note.text,D())}a&&(M.info("Setting state classes",l,a),(Array.isArray(a)?a:[a]).forEach(e=>this.setCssClass(l,e.trim()))),s&&(M.info("Setting state styles",l,s),(Array.isArray(s)?s:[s]).forEach(e=>this.setStyle(l,e.trim()))),o&&(M.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:H4e()},this.currentDocument=this.documents.root,this.startEndCount=0,this.classes=Y4e(),e||(this.links=new Map,lh())}getState(e){return this.currentDocument.states.get(e)}getStates(){return this.currentDocument.states}logDocuments(){M.info("Documents = ",this.documents)}getRelations(){return this.currentDocument.relations}addLink(e,t,r){this.links.set(e,{url:t,tooltip:r}),M.warn("Adding link",e,t,r)}getLinks(){return this.links}startIdIfNeeded(e=""){return e===W4e.START_NODE?(this.startEndCount++,""+W4e.START_TYPE+this.startEndCount):e}startTypeIfNeeded(e="",t=e4e){return e===W4e.START_NODE?W4e.START_TYPE:t}endIdIfNeeded(e=""){return e===W4e.END_NODE?(this.startEndCount++,""+W4e.END_TYPE+this.startEndCount):e}endTypeIfNeeded(e="",t=e4e){return e===W4e.END_NODE?W4e.END_TYPE:t}addRelationObjs(e,t,r=""){var n=this.startIdIfNeeded(e.id.trim()),i=this.startTypeIfNeeded(e.id.trim(),e.type),a=this.startIdIfNeeded(t.id.trim()),s=this.startTypeIfNeeded(t.id.trim(),t.type);this.addState(n,i,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:n,id2:a,relationTitle:L.sanitizeText(r,D())})}addRelation(e,t,r){var n,i;"object"==typeof e&&"object"==typeof t?this.addRelationObjs(e,t,r):"string"==typeof e&&"string"==typeof t&&(n=this.startIdIfNeeded(e.trim()),e=this.startTypeIfNeeded(e),i=this.endIdIfNeeded(t.trim()),t=this.endTypeIfNeeded(t),this.addState(n,e),this.addState(i,t),this.currentDocument.relations.push({id1:n,id2:i,relationTitle:r?L.sanitizeText(r,D()):void 0}))}addDescription(e,t){e=this.currentDocument.states.get(e),t=t.startsWith(":")?t.replace(":","").trim():t,e?.descriptions?.push(L.sanitizeText(t,D()))}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(W4e.STYLECLASS_SEP).forEach(e=>{var t=e.replace(/([^;]*);/,"$1").trim();RegExp(W4e.COLOR_KEYWORD).exec(e)&&(e=t.replace(W4e.FILL_KEYWORD,W4e.BG_FILL).replace(W4e.COLOR_KEYWORD,W4e.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=>e.stmt===Hbe)}getDirection(){return this.getDirectionStatement()?.value??Wbe}setDirection(e){var t=this.getDirectionStatement();t?t.value=e:this.rootDoc.unshift({stmt:Hbe,value:e})}trimColon(e){return(e.startsWith(":")?e.slice(1):e).trim()}getData(){var e=D();return{nodes:this.nodes,edges:this.edges,other:{},config:e,direction:G4e(this.getRootDocV2())}}getConfig(){return D().state}}}),w5e=e(()=>{K4e=mt(e=>` defs #statediagram-barbEnd { - fill: ${t.transitionColor}; - stroke: ${t.transitionColor}; + fill: ${e.transitionColor}; + stroke: ${e.transitionColor}; } g.stateGroup text { - fill: ${t.nodeBorder}; + fill: ${e.nodeBorder}; stroke: none; font-size: 10px; } g.stateGroup text { - fill: ${t.textColor}; + fill: ${e.textColor}; stroke: none; font-size: 10px; } g.stateGroup .state-title { font-weight: bolder; - fill: ${t.stateLabelColor}; + fill: ${e.stateLabelColor}; } g.stateGroup rect { - fill: ${t.mainBkg}; - stroke: ${t.nodeBorder}; + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; } g.stateGroup line { - stroke: ${t.lineColor}; + stroke: ${e.lineColor}; stroke-width: 1; } .transition { - stroke: ${t.transitionColor}; + stroke: ${e.transitionColor}; stroke-width: 1; fill: none; } .stateGroup .composit { - fill: ${t.background}; + fill: ${e.background}; border-bottom: 1px } @@ -1598,11 +1598,11 @@ g.stateGroup line { } .state-note { - stroke: ${t.noteBorderColor}; - fill: ${t.noteBkgColor}; + stroke: ${e.noteBorderColor}; + fill: ${e.noteBkgColor}; text { - fill: ${t.noteTextColor}; + fill: ${e.noteTextColor}; stroke: none; font-size: 10px; } @@ -1611,82 +1611,82 @@ g.stateGroup line { .stateLabel .box { stroke: none; stroke-width: 0; - fill: ${t.mainBkg}; + fill: ${e.mainBkg}; opacity: 0.5; } .edgeLabel .label rect { - fill: ${t.labelBackgroundColor}; + fill: ${e.labelBackgroundColor}; opacity: 0.5; } .edgeLabel { - background-color: ${t.edgeLabelBackground}; + background-color: ${e.edgeLabelBackground}; p { - background-color: ${t.edgeLabelBackground}; + background-color: ${e.edgeLabelBackground}; } rect { opacity: 0.5; - background-color: ${t.edgeLabelBackground}; - fill: ${t.edgeLabelBackground}; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; } text-align: center; } .edgeLabel .label text { - fill: ${t.transitionLabelColor||t.tertiaryTextColor}; + fill: ${e.transitionLabelColor||e.tertiaryTextColor}; } .label div .edgeLabel { - color: ${t.transitionLabelColor||t.tertiaryTextColor}; + color: ${e.transitionLabelColor||e.tertiaryTextColor}; } .stateLabel text { - fill: ${t.stateLabelColor}; + fill: ${e.stateLabelColor}; font-size: 10px; font-weight: bold; } .node circle.state-start { - fill: ${t.specialStateColor}; - stroke: ${t.specialStateColor}; + fill: ${e.specialStateColor}; + stroke: ${e.specialStateColor}; } .node .fork-join { - fill: ${t.specialStateColor}; - stroke: ${t.specialStateColor}; + fill: ${e.specialStateColor}; + stroke: ${e.specialStateColor}; } .node circle.state-end { - fill: ${t.innerEndBackground}; - stroke: ${t.background}; + fill: ${e.innerEndBackground}; + stroke: ${e.background}; stroke-width: 1.5 } .end-state-inner { - fill: ${t.compositeBackground||t.background}; - // stroke: ${t.background}; + fill: ${e.compositeBackground||e.background}; + // stroke: ${e.background}; stroke-width: 1.5 } .node rect { - fill: ${t.stateBkg||t.mainBkg}; - stroke: ${t.stateBorder||t.nodeBorder}; + fill: ${e.stateBkg||e.mainBkg}; + stroke: ${e.stateBorder||e.nodeBorder}; stroke-width: 1px; } .node polygon { - fill: ${t.mainBkg}; - stroke: ${t.stateBorder||t.nodeBorder};; + fill: ${e.mainBkg}; + stroke: ${e.stateBorder||e.nodeBorder};; stroke-width: 1px; } #statediagram-barbEnd { - fill: ${t.lineColor}; + fill: ${e.lineColor}; } .statediagram-cluster rect { - fill: ${t.compositeTitleBackground}; - stroke: ${t.stateBorder||t.nodeBorder}; + fill: ${e.compositeTitleBackground}; + stroke: ${e.stateBorder||e.nodeBorder}; stroke-width: 1px; } .cluster-label, .nodeLabel { - color: ${t.stateLabelColor}; + color: ${e.stateLabelColor}; // line-height: 1; } @@ -1695,7 +1695,7 @@ g.stateGroup line { ry: 5px; } .statediagram-state .divider { - stroke: ${t.stateBorder||t.nodeBorder}; + stroke: ${e.stateBorder||e.nodeBorder}; } .statediagram-state .title-state { @@ -1703,10 +1703,10 @@ g.stateGroup line { ry: 5px; } .statediagram-cluster.statediagram-cluster .inner { - fill: ${t.compositeBackground||t.background}; + fill: ${e.compositeBackground||e.background}; } .statediagram-cluster.statediagram-cluster-alt .inner { - fill: ${t.altBackground||"#efefef"}; + fill: ${e.altBackground||"#efefef"}; } .statediagram-cluster .inner { @@ -1720,7 +1720,7 @@ g.stateGroup line { } .statediagram-state rect.divider { stroke-dasharray: 10,10; - fill: ${t.altBackground||"#efefef"}; + fill: ${e.altBackground||"#efefef"}; } .note-edge { @@ -1728,73 +1728,73 @@ g.stateGroup line { } .statediagram-note rect { - fill: ${t.noteBkgColor}; - stroke: ${t.noteBorderColor}; + fill: ${e.noteBkgColor}; + stroke: ${e.noteBorderColor}; stroke-width: 1px; rx: 0; ry: 0; } .statediagram-note rect { - fill: ${t.noteBkgColor}; - stroke: ${t.noteBorderColor}; + fill: ${e.noteBkgColor}; + stroke: ${e.noteBorderColor}; stroke-width: 1px; rx: 0; ry: 0; } .statediagram-note text { - fill: ${t.noteTextColor}; + fill: ${e.noteTextColor}; } .statediagram-note .nodeLabel { - color: ${t.noteTextColor}; + color: ${e.noteTextColor}; } .statediagram .edgeLabel { - color: red; // ${t.noteTextColor}; + color: red; // ${e.noteTextColor}; } #dependencyStart, #dependencyEnd { - fill: ${t.lineColor}; - stroke: ${t.lineColor}; + fill: ${e.lineColor}; + stroke: ${e.lineColor}; stroke-width: 1; } .statediagramTitleText { text-anchor: middle; font-size: 18px; - fill: ${t.textColor}; + fill: ${e.textColor}; } -`,"getStyles"),Obt=Dbt}),s4t=t(()=>{Q3(),i4t(),ZE(),th(),mu(),e(),Pbt=me(t=>t.append("circle").attr("class","start-state").attr("r",D().state.sizeUnit).attr("cx",D().state.padding+D().state.sizeUnit).attr("cy",D().state.padding+D().state.sizeUnit),"drawStartState"),Bbt=me(t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",D().state.textHeight).attr("class","divider").attr("x2",2*D().state.textHeight).attr("y1",0).attr("y2",0),"drawDivider"),Fbt=me((t,e)=>{var r=(e=t.append("text").attr("x",2*D().state.padding).attr("y",D().state.textHeight+2*D().state.padding).attr("font-size",D().state.fontSize).attr("class","state-title").text(e.id)).node().getBBox();return t.insert("rect",":first-child").attr("x",D().state.padding).attr("y",D().state.padding).attr("width",r.width+2*D().state.padding).attr("height",r.height+2*D().state.padding).attr("rx",D().state.radius),e},"drawSimpleState"),$bt=me((t,e)=>{let r=me(function(t,e,r){t=t.append("tspan").attr("x",2*D().state.padding).text(e),r||t.attr("dy",D().state.textHeight)},"addTspan"),n=t.append("text").attr("x",2*D().state.padding).attr("y",D().state.textHeight+1.3*D().state.padding).attr("font-size",D().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),i=n.height,a=t.append("text").attr("x",D().state.padding).attr("y",i+.4*D().state.padding+D().state.dividerMargin+D().state.textHeight).attr("class","state-description"),s=!0,o=!0;e.descriptions.forEach(function(t){s||(r(a,t,o),o=!1),s=!1});var e=t.append("line").attr("x1",D().state.padding).attr("y1",D().state.padding+i+D().state.dividerMargin/2).attr("y2",D().state.padding+i+D().state.dividerMargin/2).attr("class","descr-divider"),l=a.node().getBBox(),c=Math.max(l.width,n.width);return e.attr("x2",c+3*D().state.padding),t.insert("rect",":first-child").attr("x",D().state.padding).attr("y",D().state.padding).attr("width",c+2*D().state.padding).attr("height",l.height+i+2*D().state.padding).attr("rx",D().state.radius),t},"drawDescrState"),zbt=me((t,e,r)=>{let n=D().state.padding,i=2*D().state.padding,a=t.node().getBBox(),s=a.width,o=a.x,l=t.append("text").attr("x",0).attr("y",D().state.titleShift).attr("font-size",D().state.fontSize).attr("class","state-title").text(e.id),c=l.node().getBBox().width+i,h=Math.max(c,s);h===s&&(h+=i);let u,d=t.node().getBBox();return e.doc,u=o-n,s(t.append("circle").attr("class","end-state-outer").attr("r",D().state.sizeUnit+D().state.miniPadding).attr("cx",D().state.padding+D().state.sizeUnit+D().state.miniPadding).attr("cy",D().state.padding+D().state.sizeUnit+D().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",D().state.sizeUnit).attr("cx",D().state.padding+D().state.sizeUnit+2).attr("cy",D().state.padding+D().state.sizeUnit+2)),"drawEndState"),Ubt=me((t,e)=>{let r=D().state.forkWidth,n=D().state.forkHeight;return e.parentId&&(e=r,r=n,n=e),t.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",n).attr("x",D().state.padding).attr("y",D().state.padding)},"drawForkJoinState"),qbt=me((t,e,r,n)=>{let i=0,a=n.append("text"),s=(a.style("text-anchor","start"),a.attr("class","noteText"),t.replace(/\r\n/g,"
")),o=(s=s.replace(/\n/g,"
")).split(L.lineBreakRegex),l=1.25*D().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),i+=l,h.attr("x",e+D().state.noteMargin),h.attr("y",r+i+1.25*D().state.noteMargin))}return{textWidth:a.node().getBBox().width,textHeight:i}},"_drawLongText"),jbt=me((t,e)=>{e.attr("class","state-note");var r=e.append("rect").attr("x",0).attr("y",D().state.padding),e=e.append("g"),{textWidth:t,textHeight:e}=qbt(t,0,0,e);return r.attr("height",e+2*D().state.noteMargin),r.attr("width",t+2*D().state.noteMargin),r},"drawNote"),Wbt=me(function(t,e){var r={id:n=e.id,label:e.id,width:0,height:0},t=t.append("g").attr("id",n).attr("class","stateGroup"),n=("start"===e.type&&Pbt(t),"end"===e.type&&Gbt(t),"fork"!==e.type&&"join"!==e.type||Ubt(t,e),"note"===e.type&&jbt(e.note.text,t),"divider"===e.type&&Bbt(t),"default"===e.type&&0===e.descriptions.length&&Fbt(t,e),"default"===e.type&&0!Number.isNaN(t.y));let t=h.points,e=K4().x(function(t){return t.x}).y(function(t){return t.y}).curve(d5),r=c.append("path").attr("d",e(t)).attr("id","edge"+Ybt).attr("class","transition"),n="";if(D().state.arrowMarkerAbsolute&&(n=Mc(!0)),r.attr("marker-end","url("+n+"#"+d(Mbt.relationType.DEPENDENCY)+"End)"),void 0!==u.title){let e=c.append("g").attr("class","stateLabel"),{x:r,y:n}=HE.calcLabelPosition(h.points),i=L.getRows(u.title),a=0,s=[],o=0,l=0;for(let t=0;t<=i.length;t++){var p=e.append("text").attr("text-anchor","middle").text(i[t]).attr("x",r).attr("y",n+a),g=p.node().getBBox();o=Math.max(o,g.width),l=Math.min(l,g.x),M.info(g.x,r,n+a),0===a&&(a=p.node().getBBox().height,M.info("Title height",a,n)),s.push(p)}let t=a*i.length;if(1t.attr("y",n+e*a-r)),t=a*i.length}d=e.node().getBBox(),e.insert("rect",":first-child").attr("class","box").attr("x",r-o/2-D().state.padding/2).attr("y",n-t/2-D().state.padding/2-3.5).attr("width",o+D().state.padding).attr("height",t+D().state.padding),M.info(d)}Ybt++},"drawEdge")}),o4t=t(()=>{Q3(),JV(),zW(),e(),th(),s4t(),mu(),eh(),Xbt={},Kbt=me(function(){},"setConf"),Zbt=me(function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"insertMarkers"),Qbt=me(function(t,e,r,n){Vbt=D().state;let i=D().securityLevel,a;"sandbox"===i&&(a=H("#i"+e));var s=H("sandbox"===i?a.nodes()[0].contentDocument.body:"body"),o="sandbox"===i?a.nodes()[0].contentDocument:document,t=(M.debug("Rendering diagram "+t),s.select(`[id='${e}']`)),e=(Zbt(t),n.db.getRootDoc()),e=(t4t(e,t,void 0,!1,s,o,n),Vbt.padding),o=(s=t.node().getBBox()).width+2*e;Vc(t,n=s.height+2*e,1.75*o,Vbt.useMaxWidth),t.attr("viewBox",`${s.x-Vbt.padding} ${s.y-Vbt.padding} `+o+" "+n)},"draw"),Jbt=me(t=>t?t.length*Vbt.fontSizeFactor:1,"getLabelWidth"),t4t=me((t,e,r,n,i,a,s)=>{let o=new FW({compound:!0,multigraph:!0}),l,c=!0;for(l=0;l{let e=t.parentElement,r=0,n=0;e&&(e.parentElement&&(r=e.parentElement.getBBox().width),n=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(n))&&(n=0),t.setAttribute("x1",0-n+8),t.setAttribute("x2",r-n-8)})):M.debug("No Node "+t+": "+JSON.stringify(o.node(t)))}),y.getBBox(),o.edges().forEach(function(t){void 0!==t&&void 0!==o.edge(t)&&(M.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(o.edge(t))),Hbt(e,o.edge(t),o.edge(t).relation))});var d=y.getBBox(),v={id:r||"root",label:r||"root",width:0,height:0};return v.width=d.width+2*Vbt.padding,v.height=d.height+2*Vbt.padding,M.debug("Doc rendered",v,o),v},"renderDoc"),e4t={setConf:Kbt,draw:Qbt}}),l4t={};oPt(l4t,{diagram:()=>c4t});var c4t,h4t=t(()=>{pbt(),i4t(),a4t(),o4t(),c4t={parser:Axt,get db(){return new Mbt(1)},renderer:e4t,styles:Obt,init:me(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}}),u4t={};oPt(u4t,{diagram:()=>d4t});var d4t,p4t,g4t,f4t,m4t,y4t,v4t,x4t,b4t,w4t,k4t,T4t,E4t,C4t,_4t,S4t,A4t,L4t,N4t,I4t,R4t,M4t,D4t,O4t,P4t,B4t,F4t,$4t,z4t,G4t,U4t,q4t=t(()=>{pbt(),i4t(),a4t(),n4t(),d4t={parser:Axt,get db(){return new Mbt(2)},renderer:Abt,styles:Obt,init:me(t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute},"init")}}),j4t=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],a=[1,11],s=[1,12],o=[1,13],l=[1,14],n={trace:me(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:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){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:n.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 10:case 11:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 12:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 13:n.addTask(a[o-1],a[o]),this.$="task"}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:a,16:s,17:o,18:l},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:15,11:n,12:i,14:a,16:s,17:o,18:l},e(r,[2,5]),e(r,[2,6]),e(r,[2,8]),{13:[1,16]},{15:[1,17]},e(r,[2,11]),e(r,[2,12]),{19:[1,18]},e(r,[2,4]),e(r,[2,9]),e(r,[2,10]),e(r,[2,13])],defaultActions:{},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"{Zw(),b5e(),KC(),eh(),mu(),t(),Q4e=mt(e=>e.append("circle").attr("class","start-state").attr("r",D().state.sizeUnit).attr("cx",D().state.padding+D().state.sizeUnit).attr("cy",D().state.padding+D().state.sizeUnit),"drawStartState"),J4e=mt(e=>e.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",D().state.textHeight).attr("class","divider").attr("x2",2*D().state.textHeight).attr("y1",0).attr("y2",0),"drawDivider"),e5e=mt((e,t)=>{var r=(t=e.append("text").attr("x",2*D().state.padding).attr("y",D().state.textHeight+2*D().state.padding).attr("font-size",D().state.fontSize).attr("class","state-title").text(t.id)).node().getBBox();return e.insert("rect",":first-child").attr("x",D().state.padding).attr("y",D().state.padding).attr("width",r.width+2*D().state.padding).attr("height",r.height+2*D().state.padding).attr("rx",D().state.radius),t},"drawSimpleState"),t5e=mt((e,t)=>{let r=mt(function(e,t,r){e=e.append("tspan").attr("x",2*D().state.padding).text(t),r||e.attr("dy",D().state.textHeight)},"addTspan"),n=e.append("text").attr("x",2*D().state.padding).attr("y",D().state.textHeight+1.3*D().state.padding).attr("font-size",D().state.fontSize).attr("class","state-title").text(t.descriptions[0]).node().getBBox(),i=n.height,a=e.append("text").attr("x",D().state.padding).attr("y",i+.4*D().state.padding+D().state.dividerMargin+D().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",D().state.padding).attr("y1",D().state.padding+i+D().state.dividerMargin/2).attr("y2",D().state.padding+i+D().state.dividerMargin/2).attr("class","descr-divider"),l=a.node().getBBox(),c=Math.max(l.width,n.width);return t.attr("x2",c+3*D().state.padding),e.insert("rect",":first-child").attr("x",D().state.padding).attr("y",D().state.padding).attr("width",c+2*D().state.padding).attr("height",l.height+i+2*D().state.padding).attr("rx",D().state.radius),e},"drawDescrState"),r5e=mt((e,t,r)=>{let n=D().state.padding,i=2*D().state.padding,a=e.node().getBBox(),s=a.width,o=a.x,l=e.append("text").attr("x",0).attr("y",D().state.titleShift).attr("font-size",D().state.fontSize).attr("class","state-title").text(t.id),c=l.node().getBBox().width+i,h=Math.max(c,s);h===s&&(h+=i);let u,d=e.node().getBBox();return t.doc,u=o-n,s(e.append("circle").attr("class","end-state-outer").attr("r",D().state.sizeUnit+D().state.miniPadding).attr("cx",D().state.padding+D().state.sizeUnit+D().state.miniPadding).attr("cy",D().state.padding+D().state.sizeUnit+D().state.miniPadding),e.append("circle").attr("class","end-state-inner").attr("r",D().state.sizeUnit).attr("cx",D().state.padding+D().state.sizeUnit+2).attr("cy",D().state.padding+D().state.sizeUnit+2)),"drawEndState"),i5e=mt((e,t)=>{let r=D().state.forkWidth,n=D().state.forkHeight;return t.parentId&&(t=r,r=n,n=t),e.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",n).attr("x",D().state.padding).attr("y",D().state.padding)},"drawForkJoinState"),a5e=mt((e,t,r,n)=>{let i=0,a=n.append("text"),s=(a.style("text-anchor","start"),a.attr("class","noteText"),e.replace(/\r\n/g,"
")),o=(s=s.replace(/\n/g,"
")).split(L.lineBreakRegex),l=1.25*D().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),i+=l,h.attr("x",t+D().state.noteMargin),h.attr("y",r+i+1.25*D().state.noteMargin))}return{textWidth:a.node().getBBox().width,textHeight:i}},"_drawLongText"),s5e=mt((e,t)=>{t.attr("class","state-note");var r=t.append("rect").attr("x",0).attr("y",D().state.padding),t=t.append("g"),{textWidth:e,textHeight:t}=a5e(e,0,0,t);return r.attr("height",t+2*D().state.noteMargin),r.attr("width",e+2*D().state.noteMargin),r},"drawNote"),o5e=mt(function(e,t){var r={id:n=t.id,label:t.id,width:0,height:0},e=e.append("g").attr("id",n).attr("class","stateGroup"),n=("start"===t.type&&Q4e(e),"end"===t.type&&n5e(e),"fork"!==t.type&&"join"!==t.type||i5e(e,t),"note"===t.type&&s5e(t.note.text,e),"divider"===t.type&&J4e(e),"default"===t.type&&0===t.descriptions.length&&e5e(e,t),"default"===t.type&&0!Number.isNaN(e.y));let e=h.points,t=X5().x(function(e){return e.x}).y(function(e){return e.y}).curve(u3),r=c.append("path").attr("d",t(e)).attr("id","edge"+l5e).attr("class","transition"),n="";if(D().state.arrowMarkerAbsolute&&(n=Mc(!0)),r.attr("marker-end","url("+n+"#"+d(X4e.relationType.DEPENDENCY)+"End)"),void 0!==u.title){let t=c.append("g").attr("class","stateLabel"),{x:r,y:n}=YC.calcLabelPosition(h.points),i=L.getRows(u.title),a=0,s=[],o=0,l=0;for(let e=0;e<=i.length;e++){var p=t.append("text").attr("text-anchor","middle").text(i[e]).attr("x",r).attr("y",n+a),g=p.node().getBBox();o=Math.max(o,g.width),l=Math.min(l,g.x),M.info(g.x,r,n+a),0===a&&(a=p.node().getBBox().height,M.info("Title height",a,n)),s.push(p)}let e=a*i.length;if(1e.attr("y",n+t*a-r)),e=a*i.length}d=t.node().getBBox(),t.insert("rect",":first-child").attr("class","box").attr("x",r-o/2-D().state.padding/2).attr("y",n-e/2-D().state.padding/2-3.5).attr("width",o+D().state.padding).attr("height",e+D().state.padding),M.info(d)}l5e++},"drawEdge")}),T5e=e(()=>{Zw(),ZX(),$Y(),t(),eh(),k5e(),mu(),th(),u5e={},d5e=mt(function(){},"setConf"),p5e=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"),g5e=mt(function(e,t,r,n){h5e=D().state;let i=D().securityLevel,a;"sandbox"===i&&(a=H("#i"+t));var s=H("sandbox"===i?a.nodes()[0].contentDocument.body:"body"),o="sandbox"===i?a.nodes()[0].contentDocument:document,e=(M.debug("Rendering diagram "+e),s.select(`[id='${t}']`)),t=(p5e(e),n.db.getRootDoc()),t=(m5e(t,e,void 0,!1,s,o,n),h5e.padding),o=(s=e.node().getBBox()).width+2*t;Vc(e,n=s.height+2*t,1.75*o,h5e.useMaxWidth),e.attr("viewBox",`${s.x-h5e.padding} ${s.y-h5e.padding} `+o+" "+n)},"draw"),f5e=mt(e=>e?e.length*h5e.fontSizeFactor:1,"getLabelWidth"),m5e=mt((e,t,r,n,i,a,s)=>{let o=new PY({compound:!0,multigraph:!0}),l,c=!0;for(l=0;l{let t=e.parentElement,r=0,n=0;t&&(t.parentElement&&(r=t.parentElement.getBBox().width),n=parseInt(t.getAttribute("data-x-shift"),10),Number.isNaN(n))&&(n=0),e.setAttribute("x1",0-n+8),e.setAttribute("x2",r-n-8)})):M.debug("No Node "+e+": "+JSON.stringify(o.node(e)))}),y.getBBox(),o.edges().forEach(function(e){void 0!==e&&void 0!==o.edge(e)&&(M.debug("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(o.edge(e))),c5e(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*h5e.padding,v.height=d.height+2*h5e.padding,M.debug("Doc rendered",v,o),v},"renderDoc"),y5e={setConf:d5e,draw:g5e}}),E5e={};JBe(E5e,{diagram:()=>C5e});var C5e,S5e=e(()=>{L4e(),b5e(),w5e(),T5e(),C5e={parser:jbe,get db(){return new X4e(1)},renderer:y5e,styles:Z4e,init:mt(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),_5e={};JBe(_5e,{diagram:()=>A5e});var A5e,L5e,N5e,I5e,R5e,M5e,D5e,O5e,P5e,B5e,$5e,F5e,z5e,G5e,U5e,q5e,j5e,W5e,Y5e,H5e,V5e,X5e,K5e,Z5e,Q5e,J5e,e3e,t3e,r3e,n3e,i3e,a3e=e(()=>{L4e(),b5e(),w5e(),x5e(),A5e={parser:jbe,get db(){return new X4e(2)},renderer:j4e,styles:Z4e,init:mt(e=>{e.state||(e.state={}),e.state.arrowMarkerAbsolute=e.arrowMarkerAbsolute},"init")}}),s3e=e(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[6,8,10,11,12,14,16,17,18],n=[1,9],i=[1,10],a=[1,11],s=[1,12],o=[1,13],l=[1,14],n={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,n,i,a,s){var o=a.length-1;switch(i){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:n.setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:this.$=a[o].trim(),n.setAccTitle(this.$);break;case 10:case 11:this.$=a[o].trim(),n.setAccDescription(this.$);break;case 12:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 13:n.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:n,12:i,14:a,16:s,17:o,18:l},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:15,11:n,12:i,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,n=[0],i=[],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"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0{mu(),fu(),f4t="",m4t=[],y4t=[],v4t=[],x4t=me(function(){m4t.length=0,y4t.length=0,f4t="",v4t.length=0,lh()},"clear"),b4t=me(function(t){f4t=t,m4t.push(t)},"addSection"),w4t=me(function(){return m4t},"getSections"),k4t=me(function(){let t=_4t(),e=0;for(;!t&&e<100;)t=_4t(),e++;return y4t.push(...v4t),y4t},"getTasks"),T4t=me(function(){let e=[];return y4t.forEach(t=>{t.people&&e.push(...t.people)}),[...new Set(e)].sort()},"updateActors"),E4t=me(function(t,e){let r=e.substr(1).split(":"),n=0;e=(1===r.length?(n=Number(r[0]),[]):(n=Number(r[0]),r[1].split(","))).map(t=>t.trim()),e={section:f4t,type:f4t,people:e,task:t,score:n},v4t.push(e)},"addTask"),C4t=me(function(t){t={section:f4t,type:f4t,description:t,task:t,classes:[]},y4t.push(t)},"addTaskOrg"),_4t=me(function(){let t=me(function(t){return v4t[t].processed},"compileTask"),e=!0;for(var[r,n]of v4t.entries())t(r),e=e&&n.processed;return e},"compileTasks"),S4t=me(function(){return T4t()},"getActors"),A4t={getConfig:me(()=>D().journey,"getConfig"),clear:x4t,setDiagramTitle:ph,getDiagramTitle:gh,setAccTitle:ch,getAccTitle:hh,setAccDescription:uh,getAccDescription:dh,addSection:b4t,getSections:w4t,getTasks:k4t,addTask:E4t,addTaskOrg:C4t,getActors:S4t}}),Y4t=t(()=>{HX(),L4t=me(t=>`.label { - font-family: ${t.fontFamily}; - color: ${t.textColor}; +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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{mu(),fu(),I5e="",R5e=[],M5e=[],D5e=[],O5e=mt(function(){R5e.length=0,M5e.length=0,I5e="",D5e.length=0,lh()},"clear"),P5e=mt(function(e){I5e=e,R5e.push(e)},"addSection"),B5e=mt(function(){return R5e},"getSections"),$5e=mt(function(){let e=U5e(),t=0;for(;!e&&t<100;)e=U5e(),t++;return M5e.push(...D5e),M5e},"getTasks"),F5e=mt(function(){let t=[];return M5e.forEach(e=>{e.people&&t.push(...e.people)}),[...new Set(t)].sort()},"updateActors"),z5e=mt(function(e,t){let r=t.substr(1).split(":"),n=0;t=(1===r.length?(n=Number(r[0]),[]):(n=Number(r[0]),r[1].split(","))).map(e=>e.trim()),t={section:I5e,type:I5e,people:t,task:e,score:n},D5e.push(t)},"addTask"),G5e=mt(function(e){e={section:I5e,type:I5e,description:e,task:e,classes:[]},M5e.push(e)},"addTaskOrg"),U5e=mt(function(){let e=mt(function(e){return D5e[e].processed},"compileTask"),t=!0;for(var[r,n]of D5e.entries())e(r),t=t&&n.processed;return t},"compileTasks"),q5e=mt(function(){return F5e()},"getActors"),j5e={getConfig:mt(()=>D().journey,"getConfig"),clear:O5e,setDiagramTitle:ph,getDiagramTitle:gh,setAccTitle:ch,getAccTitle:hh,setAccDescription:uh,getAccDescription:dh,addSection:P5e,getSections:B5e,getTasks:$5e,addTask:z5e,addTaskOrg:G5e,getActors:q5e}}),l3e=e(()=>{WK(),W5e=mt(e=>`.label { + font-family: ${e.fontFamily}; + color: ${e.textColor}; } .mouth { stroke: #666; } line { - stroke: ${t.textColor} + stroke: ${e.textColor} } .legend { - fill: ${t.textColor}; - font-family: ${t.fontFamily}; + fill: ${e.textColor}; + font-family: ${e.fontFamily}; } .label text { fill: #333; } .label { - color: ${t.textColor} + color: ${e.textColor} } .face { - ${t.faceColor?"fill: "+t.faceColor:"fill: #FFF8DC"}; + ${e.faceColor?"fill: "+e.faceColor:"fill: #FFF8DC"}; stroke: #999; } @@ -1803,8 +1803,8 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l .node ellipse, .node polygon, .node path { - fill: ${t.mainBkg}; - stroke: ${t.nodeBorder}; + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; stroke-width: 1px; } @@ -1816,21 +1816,21 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l } .arrowheadPath { - fill: ${t.arrowheadColor}; + fill: ${e.arrowheadColor}; } .edgePath .path { - stroke: ${t.lineColor}; + stroke: ${e.lineColor}; stroke-width: 1.5px; } .flowchart-link { - stroke: ${t.lineColor}; + stroke: ${e.lineColor}; fill: none; } .edgeLabel { - background-color: ${t.edgeLabelBackground}; + background-color: ${e.edgeLabelBackground}; rect { opacity: 0.5; } @@ -1841,7 +1841,7 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l } .cluster text { - fill: ${t.titleColor}; + fill: ${e.titleColor}; } div.mermaidTooltip { @@ -1849,88 +1849,88 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l text-align: center; max-width: 200px; padding: 2px; - font-family: ${t.fontFamily}; + font-family: ${e.fontFamily}; font-size: 12px; - background: ${t.tertiaryColor}; - border: 1px solid ${t.border2}; + background: ${e.tertiaryColor}; + border: 1px solid ${e.border2}; border-radius: 2px; pointer-events: none; z-index: 100; } .task-type-0, .section-type-0 { - ${t.fillType0?"fill: "+t.fillType0:""}; + ${e.fillType0?"fill: "+e.fillType0:""}; } .task-type-1, .section-type-1 { - ${t.fillType0?"fill: "+t.fillType1:""}; + ${e.fillType0?"fill: "+e.fillType1:""}; } .task-type-2, .section-type-2 { - ${t.fillType0?"fill: "+t.fillType2:""}; + ${e.fillType0?"fill: "+e.fillType2:""}; } .task-type-3, .section-type-3 { - ${t.fillType0?"fill: "+t.fillType3:""}; + ${e.fillType0?"fill: "+e.fillType3:""}; } .task-type-4, .section-type-4 { - ${t.fillType0?"fill: "+t.fillType4:""}; + ${e.fillType0?"fill: "+e.fillType4:""}; } .task-type-5, .section-type-5 { - ${t.fillType0?"fill: "+t.fillType5:""}; + ${e.fillType0?"fill: "+e.fillType5:""}; } .task-type-6, .section-type-6 { - ${t.fillType0?"fill: "+t.fillType6:""}; + ${e.fillType0?"fill: "+e.fillType6:""}; } .task-type-7, .section-type-7 { - ${t.fillType0?"fill: "+t.fillType7:""}; + ${e.fillType0?"fill: "+e.fillType7:""}; } .actor-0 { - ${t.actor0?"fill: "+t.actor0:""}; + ${e.actor0?"fill: "+e.actor0:""}; } .actor-1 { - ${t.actor1?"fill: "+t.actor1:""}; + ${e.actor1?"fill: "+e.actor1:""}; } .actor-2 { - ${t.actor2?"fill: "+t.actor2:""}; + ${e.actor2?"fill: "+e.actor2:""}; } .actor-3 { - ${t.actor3?"fill: "+t.actor3:""}; + ${e.actor3?"fill: "+e.actor3:""}; } .actor-4 { - ${t.actor4?"fill: "+t.actor4:""}; + ${e.actor4?"fill: "+e.actor4:""}; } .actor-5 { - ${t.actor5?"fill: "+t.actor5:""}; + ${e.actor5?"fill: "+e.actor5:""}; } - ${BX()} -`,"getStyles"),N4t=L4t}),H4t=t(()=>{function e(t,e,r,n,i,a,s,o){g(e.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("font-color",o).style("text-anchor","middle").text(t),s)}function c(t,e,r,n,i,a,s,o,l){var{taskFontSize:c,taskFontFamily:h}=o,u=t.split(//gi);for(let t=0;t{var e=r.actors[t].color,e={cx:a,cy:r.y,r:7,fill:e,stroke:"#000",title:t,pos:r.actors[t].position};M4t(i,e),a+=10}),z4t(e)(r.task,i,t.x,t.y,t.width,t.height,{class:"task"},e,r.colour)},"drawTask"),$4t=me(function(t,e){x3(t,e)},"drawBackgroundRect"),me(e,"byText"),me(c,"byTspan"),me(r,"byFo"),me(g,"_setTextAttrs"),z4t=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:c},G4t=me(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics"),U4t={drawRect:I4t,drawCircle:M4t,drawSection:P4t,drawText:D4t,drawLabel:O4t,drawTask:F4t,drawBackgroundRect:$4t,initGraphics:G4t}});function V4t(s){let n=D().journey,o=n.maxLabelWidth,l=(Z4t=0,60);Object.keys(K4t).forEach(e=>{var t=K4t[e].color,t={cx:20,cy:l,r:7,fill:t,stroke:"#000",pos:K4t[e].position};U4t.drawCircle(s,t);let i=s.append("text").attr("visibility","hidden").text(e),r=i.node().getBoundingClientRect().width,a=(i.remove(),[]);if(r<=o)a=[e];else{let t=e.split(" "),n="";i=s.append("text").attr("visibility","hidden"),t.forEach(e=>{var t=n?n+" "+e:e;if(i.text(t),i.node().getBoundingClientRect().width>o){if(n&&a.push(n),n=e,i.text(e),i.node().getBoundingClientRect().width>o){let t="";for(var r of e)t+=r,i.text(t+"-"),i.node().getBoundingClientRect().width>o&&(a.push(t.slice(0,-1)+"-"),t=r);n=t}}else n=t}),n&&a.push(n),i.remove()}a.forEach((t,e)=>{e={x:40,y:l+7+20*e,fill:"#666",text:t,textMargin:n.boxTextMargin??5},t=U4t.drawText(s,e).node().getBoundingClientRect().width,Z4tn.leftMargin-t&&(Z4t=t)}),l+=Math.max(20,20*a.length)})}var X4t,K4t,Z4t,Q4t,J4t,t5t,e5t,r5t,n5t,i5t,a5t,s5t=t(()=>{Q3(),H4t(),mu(),eh(),X4t=me(function(e){Object.keys(e).forEach(function(t){Q4t[t]=e[t]})},"setConf"),K4t={},Z4t=0,me(V4t,"drawActorLegend"),Q4t=D().journey,J4t=0,t5t=me(function(t,e,r,n){let i=D(),a=i.journey.titleColor,s=i.journey.titleFontSize,o=i.journey.titleFontFamily,l=i.securityLevel,c;"sandbox"===l&&(c=H("#i"+e));var h,u=H("sandbox"===l?c.nodes()[0].contentDocument.body:"body"),u=(e5t.init(),u.select("#"+e)),e=(U4t.initGraphics(u),n.db.getTasks()),d=n.db.getDiagramTitle(),n=n.db.getActors();for(h in K4t)delete K4t[h];let p=0;n.forEach(t=>{K4t[t]={color:Q4t.actorColours[p%Q4t.actorColours.length],position:p},p++}),V4t(u),J4t=Q4t.leftMargin+Z4t,e5t.insert(0,0,J4t,50*Object.keys(K4t).length),i5t(u,e,0);var n=e5t.getBounds(),e=(d&&u.append("text").text(d).attr("x",J4t).attr("font-size",s).attr("font-weight","bold").attr("y",25).attr("fill",a).attr("font-family",o),n.stopy-n.starty+2*Q4t.diagramMarginY),g=J4t+n.stopx+2*Q4t.diagramMarginX,d=(Vc(u,e,g,Q4t.useMaxWidth),u.append("line").attr("x1",J4t).attr("y1",4*Q4t.height).attr("x2",g-J4t-4).attr("y2",4*Q4t.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),d?70:0);u.attr("viewBox",n.startx+` -25 ${g} `+(e+d)),u.attr("preserveAspectRatio","xMinYMin meet"),u.attr("height",e+d+25)},"draw"),e5t={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:me(function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},"init"),updateVal:me(function(t,e,r,n){void 0===t[e]?t[e]=r:t[e]=n(r,t[e])},"updateVal"),updateBounds:me(function(n,i,a,s){let o=D().journey,l=this,c=0;function t(r){return me(function(t){c++;var e=l.sequenceItems.length-c+1;l.updateVal(t,"starty",i-e*o.boxMargin,Math.min),l.updateVal(t,"stopy",s+e*o.boxMargin,Math.max),l.updateVal(e5t.data,"startx",n-e*o.boxMargin,Math.min),l.updateVal(e5t.data,"stopx",a+e*o.boxMargin,Math.max),"activation"!==r&&(l.updateVal(t,"startx",n-e*o.boxMargin,Math.min),l.updateVal(t,"stopx",a+e*o.boxMargin,Math.max),l.updateVal(e5t.data,"starty",i-e*o.boxMargin,Math.min),l.updateVal(e5t.data,"stopy",s+e*o.boxMargin,Math.max))},"updateItemBounds")}me(t,"updateFn"),this.sequenceItems.forEach(t())},"updateBounds"),insert:me(function(t,e,r,n){var i=Math.min(t,r),t=Math.max(t,r),r=Math.min(e,n),e=Math.max(e,n);this.updateVal(e5t.data,"startx",i,Math.min),this.updateVal(e5t.data,"starty",r,Math.min),this.updateVal(e5t.data,"stopx",t,Math.max),this.updateVal(e5t.data,"stopy",e,Math.max),this.updateBounds(i,r,t,e)},"insert"),bumpVerticalPos:me(function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},"bumpVerticalPos"),getVerticalPos:me(function(){return this.verticalPos},"getVerticalPos"),getBounds:me(function(){return this.data},"getBounds")},r5t=Q4t.sectionFills,n5t=Q4t.sectionColours,i5t=me(function(t,n,e){let i=D().journey,a="",r=2*i.height+i.diagramMarginY,s=e+r,o=0,l="#CCC",c="black",h=0;for(var[u,d]of n.entries()){if(a!==d.section){l=r5t[o%r5t.length],h=o%r5t.length,c=n5t[o%n5t.length];let e=0,r=d.section;for(let t=u;t(K4t[e]&&(t[e]=K4t[e]),t),{}),d.x=u*i.taskMargin+u*i.width+J4t,d.y=s,d.width=i.diagramMarginX,d.height=i.diagramMarginY,d.colour=c,d.fill=l,d.num=h,d.actors=p,U4t.drawTask(t,d,i),e5t.insert(d.x,d.y,d.x+d.width+i.taskMargin,450)}},"drawTasks"),a5t={setConf:X4t,draw:t5t}}),o5t={};oPt(o5t,{diagram:()=>l5t});var l5t,c5t,h5t,u5t=t(()=>{j4t(),W4t(),Y4t(),s5t(),l5t={parser:g4t,db:A4t,renderer:a5t,styles:N4t,init:me(t=>{a5t.setConf(t.journey),A4t.clear()},"init")}}),d5t=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[6,8,10,11,12,14,16,17,20,21],n=[1,9],i=[1,10],a=[1,11],s=[1,12],o=[1,13],l=[1,16],c=[1,17],n={trace:me(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){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:n.getCommonDb().setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:this.$=a[o].trim(),n.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=a[o].trim(),n.getCommonDb().setAccDescription(this.$);break;case 12:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 15:n.addTask(a[o],0,""),this.$=a[o];break;case 16:n.addEvent(a[o].substr(2)),this.$=a[o]}},"anonymous"),table:[{3:1,4:[1,2]},{1:[3]},e(r,[2,2],{5:3}),{6:[1,4],7:5,8:[1,6],9:7,10:[1,8],11:n,12:i,14:a,16:s,17:o,18:14,19:15,20:l,21:c},e(r,[2,7],{1:[2,1]}),e(r,[2,3]),{9:18,11:n,12:i,14:a,16:s,17:o,18:14,19:15,20:l,21:c},e(r,[2,5]),e(r,[2,6]),e(r,[2,8]),{13:[1,19]},{15:[1,20]},e(r,[2,11]),e(r,[2,12]),e(r,[2,13]),e(r,[2,14]),e(r,[2,15]),e(r,[2,16]),e(r,[2,4]),e(r,[2,9]),e(r,[2,10])],defaultActions:{},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"{function t(e,t,r,n,i,a,s,o){g(t.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("font-color",o).style("text-anchor","middle").text(e),s)}function c(e,t,r,n,i,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:a,cy:r.y,r:7,fill:t,stroke:"#000",title:e,pos:r.actors[e].position};X5e(i,t),a+=10}),r3e(t)(r.task,i,e.x,e.y,e.width,e.height,{class:"task"},t,r.colour)},"drawTask"),t3e=mt(function(e,t){vw(e,t)},"drawBackgroundRect"),mt(t,"byText"),mt(c,"byTspan"),mt(r,"byFo"),mt(g,"_setTextAttrs"),r3e=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:c},n3e=mt(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics"),i3e={drawRect:H5e,drawCircle:X5e,drawSection:Q5e,drawText:K5e,drawLabel:Z5e,drawTask:e3e,drawBackgroundRect:t3e,initGraphics:n3e}});function h3e(s){let n=D().journey,o=n.maxLabelWidth,l=(p3e=0,60);Object.keys(d3e).forEach(t=>{var e=d3e[t].color,e={cx:20,cy:l,r:7,fill:e,stroke:"#000",pos:d3e[t].position};i3e.drawCircle(s,e);let i=s.append("text").attr("visibility","hidden").text(t),r=i.node().getBoundingClientRect().width,a=(i.remove(),[]);if(r<=o)a=[t];else{let e=t.split(" "),n="";i=s.append("text").attr("visibility","hidden"),e.forEach(t=>{var e=n?n+" "+t:t;if(i.text(e),i.node().getBoundingClientRect().width>o){if(n&&a.push(n),n=t,i.text(t),i.node().getBoundingClientRect().width>o){let e="";for(var r of t)e+=r,i.text(e+"-"),i.node().getBoundingClientRect().width>o&&(a.push(e.slice(0,-1)+"-"),e=r);n=e}}else n=e}),n&&a.push(n),i.remove()}a.forEach((e,t)=>{t={x:40,y:l+7+20*t,fill:"#666",text:e,textMargin:n.boxTextMargin??5},e=i3e.drawText(s,t).node().getBoundingClientRect().width,p3en.leftMargin-e&&(p3e=e)}),l+=Math.max(20,20*a.length)})}var u3e,d3e,p3e,g3e,f3e,m3e,y3e,v3e,x3e,b3e,w3e,k3e=e(()=>{Zw(),c3e(),mu(),th(),u3e=mt(function(t){Object.keys(t).forEach(function(e){g3e[e]=t[e]})},"setConf"),d3e={},p3e=0,mt(h3e,"drawActorLegend"),g3e=D().journey,f3e=0,m3e=mt(function(e,t,r,n){let i=D(),a=i.journey.titleColor,s=i.journey.titleFontSize,o=i.journey.titleFontFamily,l=i.securityLevel,c;"sandbox"===l&&(c=H("#i"+t));var h,u=H("sandbox"===l?c.nodes()[0].contentDocument.body:"body"),u=(y3e.init(),u.select("#"+t)),t=(i3e.initGraphics(u),n.db.getTasks()),d=n.db.getDiagramTitle(),n=n.db.getActors();for(h in d3e)delete d3e[h];let p=0;n.forEach(e=>{d3e[e]={color:g3e.actorColours[p%g3e.actorColours.length],position:p},p++}),h3e(u),f3e=g3e.leftMargin+p3e,y3e.insert(0,0,f3e,50*Object.keys(d3e).length),b3e(u,t,0);var n=y3e.getBounds(),t=(d&&u.append("text").text(d).attr("x",f3e).attr("font-size",s).attr("font-weight","bold").attr("y",25).attr("fill",a).attr("font-family",o),n.stopy-n.starty+2*g3e.diagramMarginY),g=f3e+n.stopx+2*g3e.diagramMarginX,d=(Vc(u,t,g,g3e.useMaxWidth),u.append("line").attr("x1",f3e).attr("y1",4*g3e.height).attr("x2",g-f3e-4).attr("y2",4*g3e.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)"),d?70:0);u.attr("viewBox",n.startx+` -25 ${g} `+(t+d)),u.attr("preserveAspectRatio","xMinYMin meet"),u.attr("height",t+d+25)},"draw"),y3e={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,n){void 0===e[t]?e[t]=r:e[t]=n(r,e[t])},"updateVal"),updateBounds:mt(function(n,i,a,s){let o=D().journey,l=this,c=0;function e(r){return mt(function(e){c++;var t=l.sequenceItems.length-c+1;l.updateVal(e,"starty",i-t*o.boxMargin,Math.min),l.updateVal(e,"stopy",s+t*o.boxMargin,Math.max),l.updateVal(y3e.data,"startx",n-t*o.boxMargin,Math.min),l.updateVal(y3e.data,"stopx",a+t*o.boxMargin,Math.max),"activation"!==r&&(l.updateVal(e,"startx",n-t*o.boxMargin,Math.min),l.updateVal(e,"stopx",a+t*o.boxMargin,Math.max),l.updateVal(y3e.data,"starty",i-t*o.boxMargin,Math.min),l.updateVal(y3e.data,"stopy",s+t*o.boxMargin,Math.max))},"updateItemBounds")}mt(e,"updateFn"),this.sequenceItems.forEach(e())},"updateBounds"),insert:mt(function(e,t,r,n){var i=Math.min(e,r),e=Math.max(e,r),r=Math.min(t,n),t=Math.max(t,n);this.updateVal(y3e.data,"startx",i,Math.min),this.updateVal(y3e.data,"starty",r,Math.min),this.updateVal(y3e.data,"stopx",e,Math.max),this.updateVal(y3e.data,"stopy",t,Math.max),this.updateBounds(i,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")},v3e=g3e.sectionFills,x3e=g3e.sectionColours,b3e=mt(function(e,n,t){let i=D().journey,a="",r=2*i.height+i.diagramMarginY,s=t+r,o=0,l="#CCC",c="black",h=0;for(var[u,d]of n.entries()){if(a!==d.section){l=v3e[o%v3e.length],h=o%v3e.length,c=x3e[o%x3e.length];let t=0,r=d.section;for(let e=u;e(d3e[t]&&(e[t]=d3e[t]),e),{}),d.x=u*i.taskMargin+u*i.width+f3e,d.y=s,d.width=i.diagramMarginX,d.height=i.diagramMarginY,d.colour=c,d.fill=l,d.num=h,d.actors=p,i3e.drawTask(e,d,i),y3e.insert(d.x,d.y,d.x+d.width+i.taskMargin,450)}},"drawTasks"),w3e={setConf:u3e,draw:m3e}}),T3e={};JBe(T3e,{diagram:()=>E3e});var E3e,C3e,S3e,_3e=e(()=>{s3e(),o3e(),l3e(),k3e(),E3e={parser:N5e,db:j5e,renderer:w3e,styles:Y5e,init:mt(e=>{w3e.setConf(e.journey),j5e.clear()},"init")}}),A3e=e(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[6,8,10,11,12,14,16,17,20,21],n=[1,9],i=[1,10],a=[1,11],s=[1,12],o=[1,13],l=[1,16],c=[1,17],n={trace:mt(function(){},"trace"),yy:{},symbols_:{error:2,start:3,timeline:4,document:5,EOF:6,line:7,SPACE:8,statement:9,NEWLINE:10,title:11,acc_title:12,acc_title_value:13,acc_descr:14,acc_descr_value:15,acc_descr_multiline_value:16,section:17,period_statement:18,event_statement:19,period:20,event:21,$accept:0,$end:1},terminals_:{2:"error",4:"timeline",6:"EOF",8:"SPACE",10:"NEWLINE",11:"title",12:"acc_title",13:"acc_title_value",14:"acc_descr",15:"acc_descr_value",16:"acc_descr_multiline_value",17:"section",20:"period",21:"event"},productions_:[0,[3,3],[5,0],[5,2],[7,2],[7,1],[7,1],[7,1],[9,1],[9,2],[9,2],[9,1],[9,1],[9,1],[9,1],[18,1],[19,1]],performAction:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){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:n.getCommonDb().setDiagramTitle(a[o].substr(6)),this.$=a[o].substr(6);break;case 9:this.$=a[o].trim(),n.getCommonDb().setAccTitle(this.$);break;case 10:case 11:this.$=a[o].trim(),n.getCommonDb().setAccDescription(this.$);break;case 12:n.addSection(a[o].substr(8)),this.$=a[o].substr(8);break;case 15:n.addTask(a[o],0,""),this.$=a[o];break;case 16:n.addEvent(a[o].substr(2)),this.$=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:n,12:i,14:a,16:s,17:o,18:14,19:15,20:l,21:c},t(r,[2,7],{1:[2,1]}),t(r,[2,3]),{9:18,11:n,12:i,14:a,16:s,17:o,18:14,19:15,20:l,21:c},t(r,[2,5]),t(r,[2,6]),t(r,[2,8]),{13:[1,19]},{15:[1,20]},t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),t(r,[2,4]),t(r,[2,9]),t(r,[2,10])],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,n=[0],i=[],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"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0C5t,addSection:()=>w5t,addTask:()=>E5t,addTaskOrg:()=>_5t,clear:()=>b5t,default:()=>A5t,getCommonDb:()=>x5t,getSections:()=>k5t,getTasks:()=>T5t});var g5t,f5t,m5t,y5t,v5t,x5t,b5t,w5t,k5t,T5t,E5t,C5t,_5t,S5t,A5t,L5t=t(()=>{fu(),g5t="",f5t=0,m5t=[],y5t=[],v5t=[],x5t=me(()=>nh,"getCommonDb"),b5t=me(function(){m5t.length=0,y5t.length=0,g5t="",v5t.length=0,lh()},"clear"),w5t=me(function(t){g5t=t,m5t.push(t)},"addSection"),k5t=me(function(){return m5t},"getSections"),T5t=me(function(){let t=S5t(),e=0;for(;!t&&e<100;)t=S5t(),e++;return y5t.push(...v5t),y5t},"getTasks"),E5t=me(function(t,e,r){t={id:f5t++,section:g5t,type:g5t,task:t,score:e||0,events:r?[r]:[]},v5t.push(t)},"addTask"),C5t=me(function(t){v5t.find(t=>t.id===f5t-1).events.push(t)},"addEvent"),_5t=me(function(t){t={section:g5t,type:g5t,description:t,task:t,classes:[]},y5t.push(t)},"addTaskOrg"),S5t=me(function(){let t=me(function(t){return v5t[t].processed},"compileTask"),e=!0;for(var[r,n]of v5t.entries())t(r),e=e&&n.processed;return e},"compileTasks"),A5t={clear:b5t,getCommonDb:x5t,addSection:w5t,getSections:k5t,getTasks:T5t,addTask:E5t,addTaskOrg:_5t,addEvent:C5t}});function N5t(t,o){t.each(function(){var e,r=H(this),n=r.text().split(/(\s+|
)/).reverse(),i=[],a=r.attr("y"),t=parseFloat(r.attr("dy")),s=r.text(null).append("tspan").attr("x",0).attr("y",a).attr("dy",t+"em");for(let t=0;to||"
"===e)&&(i.pop(),s.text(i.join(" ").trim()),i="
"===e?[""]:[e],s=r.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(e))})}var I5t,R5t,M5t,D5t,O5t,P5t,B5t,F5t,$5t,z5t,G5t,U5t,q5t,j5t,W5t,Y5t,H5t,V5t,X5t,K5t,Z5t,Q5t,J5t,t3t,e3t=t(()=>{function e(t,e,r,n,i,a,s,o){g(e.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("font-color",o).style("text-anchor","middle").text(t),s)}function c(t,e,r,n,i,a,s,o,l){var{taskFontSize:c,taskFontFamily:h}=o,u=t.split(//gi);for(let t=0;t/gi," "),n=((t=t.append("text")).attr("x",e.x),t.attr("y",e.y),t.attr("class","legend"),t.style("text-anchor",e.anchor),void 0!==e.class&&t.attr("class",e.class),t.append("tspan"));return n.attr("x",e.x+2*e.textMargin),n.text(r),t},"drawText"),O5t=me(function(t,e){function r(t,e,r,n,i){return t+","+e+" "+(t+r)+","+e+" "+(t+r)+","+(e+n-i)+" "+(t+r-1.2*i)+","+(e+n)+" "+t+","+(e+n)}me(r,"genPoints");var n=t.append("polygon");n.attr("points",r(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,D5t(t,e)},"drawLabel"),P5t=me(function(t,e,r){var t=t.append("g"),n=G5t();n.x=e.x,n.y=e.y,n.fill=e.fill,n.width=r.width,n.height=r.height,n.class="journey-section section-type-"+e.num,n.rx=3,n.ry=3,I5t(t,n),U5t(r)(e.text,t,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},r,e.colour)},"drawSection"),B5t=-1,F5t=me(function(t,e,r){var n=e.x+r.width/2,t=t.append("g");B5t++,t.append("line").attr("id","task"+B5t).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),R5t(t,{cx:n,cy:300+30*(5-e.score),score:e.score}),(n=G5t()).x=e.x,n.y=e.y,n.fill=e.fill,n.width=r.width,n.height=r.height,n.class="task task-type-"+e.num,n.rx=3,n.ry=3,I5t(t,n),U5t(r)(e.task,t,n.x,n.y,n.width,n.height,{class:"task"},r,e.colour)},"drawTask"),$5t=me(function(t,e){I5t(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},"drawBackgroundRect"),z5t=me(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),G5t=me(function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},"getNoteRect"),me(e,"byText"),me(c,"byTspan"),me(r,"byFo"),me(g,"_setTextAttrs"),U5t=function(t){return"fo"===t.textPlacement?r:"old"===t.textPlacement?e:c},q5t=me(function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics"),me(N5t,"wrap"),j5t=me(function(t,e,r,n){var r=r%12-1,t=t.append("g"),i=(e.section=r,t.attr("class",(e.class?e.class+" ":"")+"timeline-node section-"+r),t.append("g")),a=(t=t.append("g")).append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(N5t,e.width).node().getBBox(),s=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return e.height=a.height+1.1*s*.5+e.padding,e.height=Math.max(e.height,e.maxHeight),e.width=e.width+2*e.padding,t.attr("transform","translate("+e.width/2+", "+e.padding/2+")"),Y5t(i,e,r,n),e},"drawNode"),W5t=me(function(t,e,r){var n=(t=t.append("g")).append("text").text(e.descr).attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle").call(N5t,e.width).node().getBBox(),r=r.fontSize?.replace?r.fontSize.replace("px",""):r.fontSize;return t.remove(),n.height+1.1*r*.5+e.padding},"getVirtualNodeHeight"),Y5t=me(function(t,e,r){t.append("path").attr("id","node-"+e.id).attr("class","node-bkg node-"+e.type).attr("d",`M0 ${e.height-5} v${10-e.height} q0,-5 5,-5 h${e.width-10} q5,0 5,5 v${e.height-5} H0 Z`),t.append("line").attr("class","node-line-"+r).attr("x1",0).attr("y1",e.height).attr("x2",e.width).attr("y2",e.height)},"defaultBkg"),H5t={drawRect:I5t,drawCircle:M5t,drawSection:P5t,drawText:D5t,drawLabel:O5t,drawTask:F5t,drawBackgroundRect:$5t,getTextObj:z5t,getNoteRect:G5t,initGraphics:q5t,drawNode:j5t,getVirtualNodeHeight:W5t}}),r3t=t(()=>{Q3(),e3t(),e(),mu(),eh(),V5t=me(function(t,e,r,n){let i=D(),a=i.leftMargin??50,s=(M.debug("timeline",n.db),i.securityLevel),o,l=("sandbox"===s&&(o=H("#i"+e)),H("sandbox"===s?o.nodes()[0].contentDocument.body:"body").select("#"+e)),c=(l.append("g"),n.db.getTasks()),h=n.db.getCommonDb().getDiagramTitle();M.debug("task",c),H5t.initGraphics(l);var u,d,e=n.db.getSections();M.debug("sections",e);let p=0,g=0,f,m=50+a,y=50,v=0,x=!0,b=(e.forEach(function(t){t={number:v,descr:t,section:v,width:150,padding:20,maxHeight:p},t=H5t.getVirtualNodeHeight(l,t,i),M.debug("sectionHeight before draw",t),p=Math.max(p,t+20)}),0),w=0;M.debug("tasks.length",c.length);for([u,d]of c.entries()){var k,T={number:u,descr:d,section:d.section,width:150,padding:20,maxHeight:g},T=H5t.getVirtualNodeHeight(l,T,i);M.debug("taskHeight before draw",T),g=Math.max(g,T+20),b=Math.max(b,d.events.length);let t=0;for(k of d.events){var E={descr:k,section:d.section,number:d.section,width:150,padding:20,maxHeight:50};t+=H5t.getVirtualNodeHeight(l,E,i)}0{var t=c.filter(t=>t.section===e),r={number:v,descr:e,section:v,width:200*Math.max(t.length,1)-50,padding:20,maxHeight:p},n=(M.debug("sectionNode",r),l.append("g")),r=H5t.drawNode(n,r,v,i);M.debug("sectionNode output",r),n.attr("transform",`translate(${m}, 50)`),y+=p+50,0{},"setConf"),draw:V5t}}),n3t=t(()=>{vn(),Q5t=me(e=>{let r="";for(let t=0;tt[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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 0G3e,addSection:()=>B3e,addTask:()=>z3e,addTaskOrg:()=>U3e,clear:()=>P3e,default:()=>j3e,getCommonDb:()=>O3e,getSections:()=>$3e,getTasks:()=>F3e});var N3e,I3e,R3e,M3e,D3e,O3e,P3e,B3e,$3e,F3e,z3e,G3e,U3e,q3e,j3e,W3e=e(()=>{fu(),N3e="",I3e=0,R3e=[],M3e=[],D3e=[],O3e=mt(()=>nh,"getCommonDb"),P3e=mt(function(){R3e.length=0,M3e.length=0,N3e="",D3e.length=0,lh()},"clear"),B3e=mt(function(e){N3e=e,R3e.push(e)},"addSection"),$3e=mt(function(){return R3e},"getSections"),F3e=mt(function(){let e=q3e(),t=0;for(;!e&&t<100;)e=q3e(),t++;return M3e.push(...D3e),M3e},"getTasks"),z3e=mt(function(e,t,r){e={id:I3e++,section:N3e,type:N3e,task:e,score:t||0,events:r?[r]:[]},D3e.push(e)},"addTask"),G3e=mt(function(e){D3e.find(e=>e.id===I3e-1).events.push(e)},"addEvent"),U3e=mt(function(e){e={section:N3e,type:N3e,description:e,task:e,classes:[]},M3e.push(e)},"addTaskOrg"),q3e=mt(function(){let e=mt(function(e){return D3e[e].processed},"compileTask"),t=!0;for(var[r,n]of D3e.entries())e(r),t=t&&n.processed;return t},"compileTasks"),j3e={clear:P3e,getCommonDb:O3e,addSection:B3e,getSections:$3e,getTasks:F3e,addTask:z3e,addTaskOrg:U3e,addEvent:G3e}});function Y3e(e,o){e.each(function(){var t,r=H(this),n=r.text().split(/(\s+|
)/).reverse(),i=[],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)&&(i.pop(),s.text(i.join(" ").trim()),i="
"===t?[""]:[t],s=r.append("tspan").attr("x",0).attr("y",a).attr("dy","1.1em").text(t))})}var H3e,V3e,X3e,K3e,Z3e,Q3e,J3e,ewe,twe,rwe,nwe,iwe,awe,swe,owe,lwe,cwe,hwe,uwe,dwe,pwe,gwe,fwe,mwe,ywe=e(()=>{function t(e,t,r,n,i,a,s,o){g(t.append("text").attr("x",r+i/2).attr("y",n+a/2+5).style("font-color",o).style("text-anchor","middle").text(e),s)}function c(e,t,r,n,i,a,s,o,l){var{taskFontSize:c,taskFontFamily:h}=o,u=e.split(//gi);for(let e=0;e/gi," "),n=((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 n.attr("x",t.x+2*t.textMargin),n.text(r),e},"drawText"),Z3e=mt(function(e,t){function r(e,t,r,n,i){return e+","+t+" "+(e+r)+","+t+" "+(e+r)+","+(t+n-i)+" "+(e+r-1.2*i)+","+(t+n)+" "+e+","+(t+n)}mt(r,"genPoints");var n=e.append("polygon");n.attr("points",r(t.x,t.y,50,20,7)),n.attr("class","labelBox"),t.y=t.y+t.labelMargin,t.x=t.x+.5*t.labelMargin,K3e(e,t)},"drawLabel"),Q3e=mt(function(e,t,r){var e=e.append("g"),n=nwe();n.x=t.x,n.y=t.y,n.fill=t.fill,n.width=r.width,n.height=r.height,n.class="journey-section section-type-"+t.num,n.rx=3,n.ry=3,H3e(e,n),iwe(r)(t.text,e,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+t.num},r,t.colour)},"drawSection"),J3e=-1,ewe=mt(function(e,t,r){var n=t.x+r.width/2,e=e.append("g");J3e++,e.append("line").attr("id","task"+J3e).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"),V3e(e,{cx:n,cy:300+30*(5-t.score),score:t.score}),(n=nwe()).x=t.x,n.y=t.y,n.fill=t.fill,n.width=r.width,n.height=r.height,n.class="task task-type-"+t.num,n.rx=3,n.ry=3,H3e(e,n),iwe(r)(t.task,e,n.x,n.y,n.width,n.height,{class:"task"},r,t.colour)},"drawTask"),twe=mt(function(e,t){H3e(e,{x:t.startx,y:t.starty,width:t.stopx-t.startx,height:t.stopy-t.starty,fill:t.fill,class:"rect"}).lower()},"drawBackgroundRect"),rwe=mt(function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},"getTextObj"),nwe=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"),iwe=function(e){return"fo"===e.textPlacement?r:"old"===e.textPlacement?t:c},awe=mt(function(e){e.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},"initGraphics"),mt(Y3e,"wrap"),swe=mt(function(e,t,r,n){var r=r%12-1,e=e.append("g"),i=(t.section=r,e.attr("class",(t.class?t.class+" ":"")+"timeline-node section-"+r),e.append("g")),a=(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(Y3e,t.width).node().getBBox(),s=n.fontSize?.replace?n.fontSize.replace("px",""):n.fontSize;return t.height=a.height+1.1*s*.5+t.padding,t.height=Math.max(t.height,t.maxHeight),t.width=t.width+2*t.padding,e.attr("transform","translate("+t.width/2+", "+t.padding/2+")"),lwe(i,t,r,n),t},"drawNode"),owe=mt(function(e,t,r){var n=(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(Y3e,t.width).node().getBBox(),r=r.fontSize?.replace?r.fontSize.replace("px",""):r.fontSize;return e.remove(),n.height+1.1*r*.5+t.padding},"getVirtualNodeHeight"),lwe=mt(function(e,t,r){e.append("path").attr("id","node-"+t.id).attr("class","node-bkg node-"+t.type).attr("d",`M0 ${t.height-5} v${10-t.height} q0,-5 5,-5 h${t.width-10} q5,0 5,5 v${t.height-5} H0 Z`),e.append("line").attr("class","node-line-"+r).attr("x1",0).attr("y1",t.height).attr("x2",t.width).attr("y2",t.height)},"defaultBkg"),cwe={drawRect:H3e,drawCircle:X3e,drawSection:Q3e,drawText:K3e,drawLabel:Z3e,drawTask:ewe,drawBackgroundRect:twe,getTextObj:rwe,getNoteRect:nwe,initGraphics:awe,drawNode:swe,getVirtualNodeHeight:owe}}),vwe=e(()=>{Zw(),ywe(),t(),mu(),th(),hwe=mt(function(e,t,r,n){let i=D(),a=i.leftMargin??50,s=(M.debug("timeline",n.db),i.securityLevel),o,l=("sandbox"===s&&(o=H("#i"+t)),H("sandbox"===s?o.nodes()[0].contentDocument.body:"body").select("#"+t)),c=(l.append("g"),n.db.getTasks()),h=n.db.getCommonDb().getDiagramTitle();M.debug("task",c),cwe.initGraphics(l);var u,d,t=n.db.getSections();M.debug("sections",t);let p=0,g=0,f,m=50+a,y=50,v=0,x=!0,b=(t.forEach(function(e){e={number:v,descr:e,section:v,width:150,padding:20,maxHeight:p},e=cwe.getVirtualNodeHeight(l,e,i),M.debug("sectionHeight before draw",e),p=Math.max(p,e+20)}),0),w=0;M.debug("tasks.length",c.length);for([u,d]of c.entries()){var k,T={number:u,descr:d,section:d.section,width:150,padding:20,maxHeight:g},T=cwe.getVirtualNodeHeight(l,T,i);M.debug("taskHeight before draw",T),g=Math.max(g,T+20),b=Math.max(b,d.events.length);let e=0;for(k of d.events){var E={descr:k,section:d.section,number:d.section,width:150,padding:20,maxHeight:50};e+=cwe.getVirtualNodeHeight(l,E,i)}0{var e=c.filter(e=>e.section===t),r={number:v,descr:t,section:v,width:200*Math.max(e.length,1)-50,padding:20,maxHeight:p},n=(M.debug("sectionNode",r),l.append("g")),r=cwe.drawNode(n,r,v,i);M.debug("sectionNode output",r),n.attr("transform",`translate(${m}, 50)`),y+=p+50,0{},"setConf"),draw:hwe}}),xwe=e(()=>{vn(),gwe=mt(t=>{let r="";for(let e=0;e` + `}return r},"genSections"),fwe=mt(e=>` .edge { stroke-width: 3; } - ${Q5t(t)} + ${gwe(e)} .section-root rect, .section-root path, .section-root circle { - fill: ${t.git0}; + fill: ${e.git0}; } .section-root text { - fill: ${t.gitBranchLabel0}; + fill: ${e.gitBranchLabel0}; } .icon-container { height:100%; @@ -1962,18 +1962,18 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l .eventWrapper { filter: brightness(120%); } -`,"getStyles"),t3t=J5t}),i3t={};oPt(i3t,{diagram:()=>a3t});var a3t,s3t,o3t,l3t,c3t,h3t,u3t,d3t,p3t,g3t,f3t,m3t,y3t,v3t,x3t,b3t,w3t,k3t,T3t=t(()=>{d5t(),L5t(),r3t(),n3t(),a3t={db:p5t,renderer:Z5t,parser:h5t,styles:t3t}}),E3t=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,4],n=[1,13],i=[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:me(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:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 6:case 7:return n;case 8:n.getLogger().trace("Stop NL ");break;case 9:n.getLogger().trace("Stop EOF ");break;case 11:n.getLogger().trace("Stop NL2 ");break;case 12:n.getLogger().trace("Stop EOF2 ");break;case 15:n.getLogger().info("Node: ",a[o].id),n.addNode(a[o-1].length,a[o].id,a[o].descr,a[o].type);break;case 16:n.getLogger().trace("Icon: ",a[o]),n.decorateNode({icon:a[o]});break;case 17:case 21:n.decorateNode({class:a[o]});break;case 18:n.getLogger().trace("SPACELIST");break;case 19:n.getLogger().trace("Node: ",a[o].id),n.addNode(0,a[o].id,a[o].descr,a[o].type);break;case 20:n.decorateNode({icon:a[o]});break;case 25:n.getLogger().trace("node found ..",a[o-2]),this.$={id:a[o-1],descr:a[o-1],type:n.getType(a[o-2],a[o])};break;case 26:this.$={id:a[o],descr:a[o],type:n.nodeType.DEFAULT};break;case 27:n.getLogger().trace("node found ..",a[o-3]),this.$={id:a[o-3],descr:a[o-1],type:n.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:n,7:[1,10],9:9,12:11,13:i,14:14,15:a,16:s,17:17,18:18,19:o,22:l},e(c,[2,3]),{1:[2,2]},e(c,[2,4]),e(c,[2,5]),{1:[2,6],6:n,12:21,13:i,14:14,15:a,16:s,17:17,18:18,19:o,22:l},{6:n,9:22,12:11,13:i,14:14,15:a,16:s,17:17,18:18,19:o,22:l},{6:h,7:u,10:23,11:d},e(p,[2,22],{17:17,18:18,14:27,15:[1,28],16:[1,29],19:o,22:l}),e(p,[2,18]),e(p,[2,19]),e(p,[2,20]),e(p,[2,21]),e(p,[2,23]),e(p,[2,24]),e(p,[2,26],{19:[1,30]}),{20:[1,31]},{6:h,7:u,10:32,11:d},{1:[2,7],6:n,12:21,13:i,14:14,15:a,16:s,17:17,18:18,19:o,22:l},e(g,[2,14],{7:f,11:m}),e(y,[2,8]),e(y,[2,9]),e(y,[2,10]),e(p,[2,15]),e(p,[2,16]),e(p,[2,17]),{20:[1,35]},{21:[1,36]},e(g,[2,13],{7:f,11:m}),e(y,[2,11]),e(y,[2,12]),{21:[1,37]},e(p,[2,25]),e(p,[2,27])],defaultActions:{2:[2,1],6:[2,2]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"wwe});var wwe,kwe,Twe,Ewe,Cwe,Swe,_we,Awe,Lwe,Nwe,Iwe,Rwe,Mwe,Dwe,Owe,Pwe,Bwe,$we,Fwe=e(()=>{A3e(),W3e(),vwe(),xwe(),wwe={db:L3e,renderer:pwe,parser:S3e,styles:mwe}}),zwe=e(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[1,4],n=[1,13],i=[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,n,i,a,s){var o=a.length-1;switch(i){case 6:case 7:return n;case 8:n.getLogger().trace("Stop NL ");break;case 9:n.getLogger().trace("Stop EOF ");break;case 11:n.getLogger().trace("Stop NL2 ");break;case 12:n.getLogger().trace("Stop EOF2 ");break;case 15:n.getLogger().info("Node: ",a[o].id),n.addNode(a[o-1].length,a[o].id,a[o].descr,a[o].type);break;case 16:n.getLogger().trace("Icon: ",a[o]),n.decorateNode({icon:a[o]});break;case 17:case 21:n.decorateNode({class:a[o]});break;case 18:n.getLogger().trace("SPACELIST");break;case 19:n.getLogger().trace("Node: ",a[o].id),n.addNode(0,a[o].id,a[o].descr,a[o].type);break;case 20:n.decorateNode({icon:a[o]});break;case 25:n.getLogger().trace("node found ..",a[o-2]),this.$={id:a[o-1],descr:a[o-1],type:n.getType(a[o-2],a[o])};break;case 26:this.$={id:a[o],descr:a[o],type:n.nodeType.DEFAULT};break;case 27:n.getLogger().trace("node found ..",a[o-3]),this.$={id:a[o-3],descr:a[o-1],type:n.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:n,7:[1,10],9:9,12:11,13:i,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:n,12:21,13:i,14:14,15:a,16:s,17:17,18:18,19:o,22:l},{6:n,9:22,12:11,13:i,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:n,12:21,13:i,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,n=[0],i=[],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"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0{mu(),th(),e(),An(),l3t=[],c3t=0,h3t={},u3t=me(()=>{l3t=[],c3t=0,h3t={}},"clear"),d3t=me(function(e){for(let t=l3t.length-1;0<=t;t--)if(l3t[t].level0{M.info("addNode",t,e,r,n);let i=D(),a=i.mindmap?.padding??yr.mindmap.padding;switch(n){case f3t.ROUNDED_RECT:case f3t.RECT:case f3t.HEXAGON:a*=2}if(e={id:c3t++,nodeId:Sc(e,i),level:t,descr:Sc(r,i),type:n,children:[],width:i.mindmap?.maxNodeWidth??yr.mindmap.maxNodeWidth,padding:a},r=d3t(t))r.children.push(e);else if(0!==l3t.length)throw new Error('There can be only one root. No parent could be found for ("'+e.descr+'")');l3t.push(e)},"addNode"),f3t={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},m3t=me((t,e)=>{switch(M.debug("In get type",t,e),t){case"[":return f3t.RECT;case"(":return")"===e?f3t.ROUNDED_RECT:f3t.CLOUD;case"((":return f3t.CIRCLE;case")":return f3t.CLOUD;case"))":return f3t.BANG;case"{{":return f3t.HEXAGON;default:return f3t.DEFAULT}},"getType"),y3t=me((t,e)=>{h3t[t]=e},"setElementForId"),v3t=me(t=>{var e,r;t&&(e=D(),r=l3t[l3t.length-1],t.icon&&(r.icon=Sc(t.icon,e)),t.class)&&(r.class=Sc(t.class,e))},"decorateNode"),x3t=me(t=>{switch(t){case f3t.DEFAULT:return"no-border";case f3t.RECT:return"rect";case f3t.ROUNDED_RECT:return"rounded-rect";case f3t.CIRCLE:return"circle";case f3t.CLOUD:return"cloud";case f3t.BANG:return"bang";case f3t.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),b3t=me(()=>M,"getLogger"),w3t=me(t=>h3t[t],"getElementById"),k3t={clear:u3t,addNode:g3t,getMindmap:p3t,nodeType:f3t,getType:m3t,setElementForId:y3t,decorateNode:v3t,type2Str:x3t,getLogger:b3t,getElementById:w3t}});function _3t(t){return(_3t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function S3t(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function A3t(t,e){for(var r=0;rt.length)&&(e=t.length);for(var r=0,n=new Array(e);r=t.length?{done:!0}:{done:!1,value:t[a++]}},"n"),e:me(function(t){throw t},"e"),f:e};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 U3t(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function q3t(t,e){return t(e={exports:{}},e.exports),e.exports}function j3t(t){for(var e=t.length;e--&&xTt.test(t.charAt(e)););return e}function W3t(t){return t&&t.slice(0,bTt(t)+1).replace(wTt,"")}function Y3t(t){var e=TTt.call(t,CTt),r=t[CTt];try{var n=!(t[CTt]=void 0)}catch{}var i=ETt.call(t);return n&&(e?t[CTt]=r:delete t[CTt]),i}function H3t(t){return STt.call(t)}function V3t(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":(LTt&<t in Object(t)?_Tt:ATt)(t)}function X3t(t){return null!=t&&"object"==typeof t}function K3t(t){return"symbol"==typeof t||ITt(t)&&"[object Symbol]"==NTt(t)}function Z3t(t){if("number"==typeof t)return t;if(RTt(t))return MTt;if(fTt(t)&&(e="function"==typeof t.valueOf?t.valueOf():t,t=fTt(e)?e+"":e),"string"!=typeof t)return 0===t?t:+t;t=kTt(t);var e=OTt.test(t);return e||PTt.test(t)?BTt(t.slice(2),e?2:8):DTt.test(t)?MTt:+t}function Q3t(n,r,t){var i,a,s,o,l,c,h=0,e=!1,u=!1,d=!0;if("function"!=typeof n)throw new TypeError("Expected a function");function p(t){var e=i,r=a;return i=a=void 0,h=t,o=n.apply(r,e)}function g(t){return h=t,l=setTimeout(y,r),e?p(t):o}function f(t){var e=r-(t-c);return u?zTt(e,s-(t-h)):e}function m(t){var e=t-c;return void 0===c||r<=e||e<0||u&&s<=t-h}function y(){var t=vTt();if(m(t))return v(t);l=setTimeout(y,f(t))}function v(t){return l=void 0,d&&i?p(t):(i=a=void 0,o)}function x(){void 0!==l&&clearTimeout(l),i=c=a=l=void(h=0)}function b(){return void 0===l?o:v(vTt())}function w(){var t=vTt(),e=m(t);if(i=arguments,a=this,c=t,e){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=FTt(r)||0,fTt(t)&&(e=!!t.leading,u="maxWait"in t,s=u?$Tt(FTt(t.maxWait)||0,r):s,d="trailing"in t?!!t.trailing:d),me(p,"invokeFunc"),me(g,"leadingEdge"),me(f,"remainingWait"),me(m,"shouldInvoke"),me(y,"timerExpired"),me(v,"trailingEdge"),me(x,"cancel"),me(b,"flush"),me(w,"debounced"),w.cancel=x,w.flush=b,w}function J3t(t,e,r,n,i,a){var s=Okt(t)?t:dEt[t]||dEt.euclidean;return 0===e&&Okt(t)?s(i,a):s(e,r,n,i,a)}function twt(t,e){var r;return!QEt(t)&&(!("number"!=(r=typeof t)&&"symbol"!=r&&"boolean"!=r&&null!=t&&!RTt(t))||tCt.test(t)||!JEt.test(t)||null!=e&&t in Object(e))}function ewt(t){return!!fTt(t)&&("[object Function]"==(t=NTt(t))||"[object GeneratorFunction]"==t||"[object AsyncFunction]"==t||"[object Proxy]"==t)}function rwt(t){return!!nCt&&nCt in t}function nwt(t){if(null!=t){try{return aCt.call(t)}catch{}try{return t+""}catch{}}return""}function iwt(t){return!(!fTt(t)||iCt(t))&&(rCt(t)?lCt:oCt).test(sCt(t))}function awt(t,e){return t?.[e]}function swt(t,e){return t=hCt(t,e),cCt(t)?t:void 0}function owt(){this.__data__=dCt?dCt(null):{},this.size=0}function lwt(t){return t=this.has(t)&&delete this.__data__[t],this.size-=t?1:0,t}function cwt(t){var e,r=this.__data__;return dCt?"__lodash_hash_undefined__"===(e=r[t])?void 0:e:pCt.call(r,t)?r[t]:void 0}function hwt(t){var e=this.__data__;return dCt?void 0!==e[t]:gCt.call(e,t)}function uwt(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=dCt&&void 0===e?"__lodash_hash_undefined__":e,this}function dwt(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e>0&255)/255,e[1]=(t>>8&255)/255,e[2]=(t>>16&255)/255,e[3]=(t>>24&255)/255,e}function j6t(t){return t[0]+(t[1]<<8)+(t[2]<<16)+(t[3]<<24)}function W6t(e,t){var r=e.createTexture();return r.buffer=function(t){e.bindTexture(e.TEXTURE_2D,r),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_S,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_WRAP_T,e.CLAMP_TO_EDGE),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MAG_FILTER,e.LINEAR),e.texParameteri(e.TEXTURE_2D,e.TEXTURE_MIN_FILTER,e.LINEAR_MIPMAP_NEAREST),e.pixelStorei(e.UNPACK_PREMULTIPLY_ALPHA_WEBGL,!0),e.texImage2D(e.TEXTURE_2D,0,e.RGBA,e.RGBA,e.UNSIGNED_BYTE,t),e.generateMipmap(e.TEXTURE_2D),e.bindTexture(e.TEXTURE_2D,null)},r.deleteTexture=function(){e.deleteTexture(r)},r}function Y6t(t,e){switch(e){case"float":return[1,t.FLOAT,4];case"vec2":return[2,t.FLOAT,4];case"vec3":return[3,t.FLOAT,4];case"vec4":return[4,t.FLOAT,4];case"int":return[1,t.INT,4];case"ivec2":return[2,t.INT,4]}}function H6t(t,e,r){switch(e){case t.FLOAT:return new Float32Array(r);case t.INT:return new Int32Array(r)}}function V6t(t,e,r,n,i,a){switch(e){case t.FLOAT:return new Float32Array(r.buffer,a*n,i);case t.INT:return new Int32Array(r.buffer,a*n,i)}}function X6t(t,e,r,n){var i=(e=I3t(Y6t(t,e),2))[0],n=H6t(t,e=e[1],n),a=t.createBuffer();return t.bindBuffer(t.ARRAY_BUFFER,a),t.bufferData(t.ARRAY_BUFFER,n,t.STATIC_DRAW),e===t.FLOAT?t.vertexAttribPointer(r,i,e,!1,0,0):e===t.INT&&t.vertexAttribIPointer(r,i,e,0,0),t.enableVertexAttribArray(r),t.bindBuffer(t.ARRAY_BUFFER,null),a}function K6t(e,t,r,n){var i=(r=I3t(Y6t(e,r),3))[0],a=r[1],r=r[2],s=H6t(e,a,t*i),o=i*r,l=e.createBuffer();e.bindBuffer(e.ARRAY_BUFFER,l),e.bufferData(e.ARRAY_BUFFER,t*o,e.DYNAMIC_DRAW),e.enableVertexAttribArray(n),a===e.FLOAT?e.vertexAttribPointer(n,i,a,!1,o,0):a===e.INT&&e.vertexAttribIPointer(n,i,a,o,0),e.vertexAttribDivisor(n,1),e.bindBuffer(e.ARRAY_BUFFER,null);for(var c=new Array(t),h=0;h{function n(t){if(S3t(this,n),this._obj=Object.create(null),this.size=0,null!=t)for(var e=null!=t.instanceString&&t.instanceString()===this.instanceString()?t.toArray():t,r=0;r{if(Skt){if(Skt.requestAnimationFrame)return function(t){Skt.requestAnimationFrame(t)};if(Skt.mozRequestAnimationFrame)return function(t){Skt.mozRequestAnimationFrame(t)};if(Skt.webkitRequestAnimationFrame)return function(t){Skt.webkitRequestAnimationFrame(t)};if(Skt.msRequestAnimationFrame)return function(t){Skt.msRequestAnimationFrame(t)}}return function(t){t&&setTimeout(function(){t(qTt())},1e3/60)}})(),WTt=me(function(t){return jTt(t)},"requestAnimationFrame"),YTt=qTt,HTt=me(function(t){for(var e,r=1>1])<0;)t[r]=a,r=s;return t[r]=i},"_siftdown"),u=me(function(t,e,r){var n,i,a,s,o;for(null==r&&(r=d),i=t.length,a=t[o=e],n=2*e+1;ny&&(u[v]=y,g[v]=w,f[v]=x),r||(v=w*o+b,!r&&u[v]>y&&(u[v]=y,g[v]=b,f[v]=x)))}for(var k=0;k=t.x1&&t.y2>=t.y1?{x1:t.x1,y1:t.y1,x2:t.x2,y2:t.y2,w:t.x2-t.x1,h:t.y2-t.y1}:null!=t.w&&null!=t.h&&0<=t.w&&0<=t.h?{x1:t.x1,y1:t.y1,x2:t.x1+t.w,y2:t.y1+t.h,w:t.w,h:t.h}:void 0:void 0},"makeBoundingBox"),n8t=me(function(t){return{x1:t.x1,x2:t.x2,w:t.w,y1:t.y1,y2:t.y2,h:t.h}},"copyBoundingBox"),i8t=me(function(t){t.x1=1/0,t.y1=1/0,t.x2=-1/0,t.y2=-1/0,t.w=0,t.h=0},"clearBoundingBox"),a8t=me(function(t,e,r){return{x1:t.x1+e,x2:t.x2+e,y1:t.y1+r,y2:t.y2+r,w:t.w,h:t.h}},"shiftBoundingBox"),s8t=me(function(t,e){t.x1=Math.min(t.x1,e.x1),t.x2=Math.max(t.x2,e.x2),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,e.y1),t.y2=Math.max(t.y2,e.y2),t.h=t.y2-t.y1},"updateBoundingBox"),o8t=me(function(t,e,r){t.x1=Math.min(t.x1,e),t.x2=Math.max(t.x2,e),t.w=t.x2-t.x1,t.y1=Math.min(t.y1,r),t.y2=Math.max(t.y2,r),t.h=t.y2-t.y1},"expandBoundingBoxByPoint"),l8t=me(function(t){var e=1e.x2||e.x1>t.x2||t.x2e.y2||e.y1>t.y2)},"boundingBoxesIntersect"),d8t=me(function(t,e,r){return t.x1<=e&&e<=t.x2&&t.y1<=r&&r<=t.y2},"inBoundingBox"),p8t=me(function(t,e){return d8t(t,e.x,e.y)},"pointInBoundingBox"),g8t=me(function(t,e){return d8t(t,e.x1,e.y1)&&d8t(t,e.x2,e.y2)},"boundingBoxInBoundingBox"),f8t=me(function(t,e,r,n,i,a,s){var o,l="auto"===(l=7=u&&c[1]<=o||0<(c=L8t(t,e,r,n,h=r+i-l,u=n+a-l,l+s)).length&&c[0]>=h&&c[1]>=u||0<(c=L8t(t,e,r,n,o=r-i+l,h=n+a-l,l+s)).length&&c[0]<=o&&c[1]>=h?[c[0],c[1]]:[]},"roundRectangleIntersectLine"),m8t=me(function(t,e,r,n,i,a,s){var o=Math.min(r,i),r=Math.max(r,i),i=Math.min(n,a),n=Math.max(n,a);return o-s<=t&&t<=r+s&&i-s<=e&&e<=n+s},"inLineVicinity"),y8t=me(function(t,e,r,n,i,a,s,o,l){var c=Math.min(r,s,i)-l,r=Math.max(r,s,i)+l,s=Math.min(n,o,a)-l,i=Math.max(n,o,a)+l;return!(to&&(o=e[s][c],l=c);i[l].push(t[s])}for(var h=0;h=i.threshold||"dendrogram"===i.mode&&1===t.length)return!1;var p=e[s],g=e[n[s]],f="dendrogram"===i.mode?{left:p,right:g,key:p.key}:{value:p.value.concat(g.value),key:p.key};t[p.index]=f,t.splice(g.index,1),e[p.key]=f;for(var m=0;mr[g.key][y.key]&&(a=r[g.key][y.key])):"max"===i.linkage?(a=r[p.key][y.key],r[p.key][y.key]s&&(s=e[i*t+(a=l)])}0=e.minIterations-1||v==e.maxIterations-1)){for(var q=0,R=0;R{var t=o[e];null!=t&&null!=t.then?t.then(function(t){s(e,t)},function(t){n(t)}):s(e,t)})(t)})},jEt.resolve=function(r){return new jEt(function(t,e){t(r)})},jEt.reject=function(r){return new jEt(function(t,e){e(r)})},KEt=typeof Promise<"u"?Promise:jEt,ZEt=me(function(t,e,r){var n=jkt(t),i=!n;(e=this._private=sTt({duration:1e3},e,r)).target=t,e.style=e.style||e.css,e.started=!1,e.playing=!1,e.hooked=!1,e.applying=!1,e.progress=0,e.completes=[],e.frames=[],e.complete&&Okt(e.complete)&&e.completes.push(e.complete),i&&(r=t.position(),e.startPosition=e.startPosition||{x:r.x,y:r.y},e.startStyle=e.startStyle||t.cy().style().getAnimationStartStyle(t,e.style)),n&&(i=t.pan(),e.startPan={x:i.x,y:i.y},e.startZoom=t.zoom()),this.length=1,this[0]=this},"Animation"),t9t=ZEt.prototype,sTt(t9t,{instanceString:me(function(){return"animation"},"instanceString"),hook:me(function(){var t,e=this._private;return e.hooked||(t=e.target._private.animation,(e.queue?t.queue:t.current).push(this),Gkt(e.target)&&e.target.cy().addToAnimationPool(e.target),e.hooked=!0),this},"hook"),play:me(function(){var t=this._private;return 1===t.progress&&(t.progress=0),t.playing=!0,t.started=!1,t.stopped=!1,this.hook(),this},"play"),playing:me(function(){return this._private.playing},"playing"),apply:me(function(){var t=this._private;return t.applying=!0,t.started=!1,t.stopped=!1,this.hook(),this},"apply"),applying:me(function(){return this._private.applying},"applying"),pause:me(function(){var t=this._private;return t.playing=!1,t.started=!1,this},"pause"),stop:me(function(){var t=this._private;return t.playing=!1,t.started=!1,t.stopped=!0,this},"stop"),rewind:me(function(){return this.progress(0)},"rewind"),fastforward:me(function(){return this.progress(1)},"fastforward"),time:me(function(t){var e=this._private;return void 0===t?e.progress*e.duration:this.progress(t/e.duration)},"time"),progress:me(function(t){var e=this._private,r=e.playing;return void 0===t?e.progress:(r&&this.pause(),e.progress=t,e.started=!1,r&&this.play(),this)},"progress"),completed:me(function(){return 1===this._private.progress},"completed"),reverse:me(function(){var n=this._private,t=n.playing,e=(t&&this.pause(),n.progress=1-n.progress,n.started=!1,me(function(t,e){var r=n[t];null!=r&&(n[t]=n[e],n[e]=r)},"swap"));if(e("zoom","startZoom"),e("pan","startPan"),e("position","startPosition"),n.style)for(var r=0;r{try{var t=uCt(Object,"defineProperty");return t({},"",{}),t}catch{}})(),FCt=kAt,me(Fwt,"baseAssignValue"),$Ct=Fwt,jAt=Object.prototype,zCt=jAt.hasOwnProperty,me($wt,"assignValue"),GCt=$wt,UCt=/^(?:0|[1-9]\d*)$/,me(zwt,"isIndex"),qCt=zwt,me(Gwt,"baseSet"),jCt=Gwt,me(Uwt,"set"),WCt=Uwt,me(qwt,"copyArray"),YCt=qwt,me(jwt,"toPath"),HCt=jwt,n9t={data:me(function(b){var t={field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:me(function(t){},"beforeGet"),beforeSet:me(function(t,e){},"beforeSet"),onSet:me(function(t){},"onSet"),canSet:me(function(t){return!0},"canSet")};return b=sTt({},t,b),me(function(t,e){var r,n=b,i=this,a=void 0!==i.length,s=a?i:[i],o=a?i[0]:i;if(Dkt(t)){var l,c=-1!==t.indexOf(".")&&HCt(t);if(n.allowGetting&&void 0===e)return o&&(n.beforeGet(o),l=c&&void 0===o._private[n.field][t]?BCt(o._private[n.field],c):o._private[n.field][t]),l;if(n.allowSetting&&void 0!==e&&!n.immutableKeys[t]){a=N3t({},t,e),n.beforeSet(i,a);for(var h=0,u=s.length;h\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:nTt,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"}).variable="(?:[\\w-.]|(?:\\\\"+XCt.metaChar+"))+",XCt.className="(?:[\\w-]|(?:\\\\"+XCt.metaChar+"))+",XCt.value=XCt.string+"|"+XCt.number,XCt.id=XCt.variable;for(var e,r=XCt.comparatorOp.split("|"),i=0;i{for(var t,e={},r=0;r")+h(t.child,e);case V.ANCESTOR:case V.DESCENDANT:return h(t.ancestor,e)+" "+h(t.descendant,e);case V.COMPOUND_SPLIT:var a=h(t.left,e),i=h(t.subject,e),s=h(t.right,e);return a+(0":u=!0,n=r=":u=!0,n=r<=t;break;case"<":u=!0,n=ta.length?e.substr(a.length):""}function n(){c=c.length>u.length?c.substr(u.length):""}for(e=e.replace(/[/][*](\s|.)+?[*][/]/g,""),me(r,"removeSelAndBlockFromRemaining"),me(n,"removePropAndValFromRem");!e.match(/^\s*$/);){var i=e.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!i){p7t("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+e);break}var a=i[0],s=i[1];if("core"!==s&&new d_t(s).invalid)p7t("Skipping parsing of block: Invalid selector found in string stylesheet: "+s);else{for(var o=i[2],l=!1,c=o,h=[];!c.match(/^\s*$/);){if(!(p=c.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/))){p7t("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}):p7t("Skipping property: Invalid property definition in: "+u):p7t("Skipping property: Invalid property name in: "+u),n()}if(l){r();break}this.selector(s);for(var g=0;gl.max||l.strictMax&&r===l.max)?null:(s={name:e,value:r,strValue:""+r+(x||""),units:x,bypass:n},l.unitless||"px"!==x&&"em"!==x?s.pfValue=r:s.pfValue="px"!==x&&x?this.getEmSizeInPixels()*r:r,"ms"!==x&&"s"!==x||(s.pfValue="ms"===x?r:1e3*r),"deg"!==x&&"rad"!==x||(s.pfValue="rad"===x?r:W7t(r)),"%"===x&&(s.pfValue=r/100),s);if(l.propList){var w,k=[];if("none"!=(w=""+r)){for(var T=w.split(/\s*,\s*|\s+/),E=0;Ethis._private.maxZoom?this._private.maxZoom:e)=n.minZoom&&(n.maxZoom=e),this},"zoomRange"),minZoom:me(function(t){return void 0===t?this._private.minZoom:this.zoomRange({min:t})},"minZoom"),maxZoom:me(function(t){return void 0===t?this._private.maxZoom:this.zoomRange({max:t})},"maxZoom"),getZoomedViewport:me(function(t){var e,r,n=this._private,i=n.pan,a=n.zoom,s=!n.zoomingEnabled;return at(t)?r=t:Bkt(t)&&(r=t.level,null!=t.position?e=F7t(t.position,a,i):null!=t.renderedPosition&&(e=t.renderedPosition),null!=e)&&!n.panningEnabled&&(s=!0),r=(r=r>n.maxZoom?n.maxZoom:r)e.maxZoom||!e.zoomingEnabled?a=!0:(e.zoom=r,i.push("zoom"))),!n||a&&t.cancelOnFailedZoom||!e.panningEnabled||(r=t.pan,at(r.x)&&(e.pan.x=r.x,s=!1),at(r.y)&&(e.pan.y=r.y,s=!1),s)||i.push("pan"),0=r.numIter||(kSt(i,r),i.temperature=i.temperature*r.coolingFactor,i.temperature=r.animationThreshold&&s(),WTt(t)):(DSt(i,r),l())},"frame")();else{for(;h;)h=o(c),c++;DSt(i,r),l()}return this},w6t.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},w6t.prototype.destroy=function(){return this.thread&&this.thread.stop(),this},mSt=me(function(t,e,r){for(var n=r.eles.edges(),i=r.eles.nodes(),a=r8t(r.boundingBox||{x1:0,y1:0,w:t.width(),h:t.height()}),s={isCompound:t.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:n.size(),temperature:r.initialTemp,clientWidth:a.w,clientHeight:a.h,boundingBox:a},o=r.eles.components(),l={},c=0;cn.maxX)&&(n.maxX=e.maxX+n.padRight,i=!0),(null==n.minX||e.minX-n.padLeftn.maxY)&&(n.maxY=e.maxY+n.padBottom,i=!0),(null==n.minY||e.minY-n.padTop(e=w8t(y,v,h[u],h[u+1],h[u+2],h[u+3])))return E(t,e),!0}else if("bezier"===n.edgeType||"multibezier"===n.edgeType||"self"===n.edgeType||"compound"===n.edgeType)for(h=n.allpts,u=0;u+5(e=b8t(y,v,h[u],h[u+1],h[u+2],h[u+3],h[u+4],h[u+5])))return E(t,e),!0;for(var l=l||r.source,c=c||r.target,d=x.getArrowWidth(i,a),p=[{name:"source",x:n.arrowStartX,y:n.arrowStartY,angle:n.srcArrowAngle},{name:"target",x:n.arrowEndX,y:n.arrowEndY,angle:n.tgtArrowAngle},{name:"mid-source",x:n.midX,y:n.midY,angle:n.midsrcArrowAngle},{name:"mid-target",x:n.midX,y:n.midY,angle:n.midtgtArrowAngle}],u=0;uMath.abs(b)?i:n:"upward"===u||"downward"===u?(h=n,y=!0):"leftward"!==u&&"rightward"!==u||(h=i,y=!0),(i=h===n)?b:m),n=V7t(h=i?x:v),b=!1;y&&(p||g)||!("downward"===u&&h<0||"upward"===u&&0=Math.abs(w)},"getIsTooClose"))(m),u=y(Math.abs(w)-Math.abs(m)),!g&&!u||b?i?(h=a.y1+m+(c?o/2*n:0),x=a.x1,e=a.x2,r.segpts=[x,h,e,h]):(p=a.x1+m+(c?s/2*n:0),u=a.y1,d=a.y2,r.segpts=[p,u,p,d]):i?(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?(b=(a.y1+a.y2)/2,v=a.x1,l=a.x2,r.segpts=[v,b,l,b]):r.segpts=[a.x1,a.y2]):(p=Math.abs(h)<=s/2,g=Math.abs(x)<=e/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,b=a.y2,r.segpts=[v,l,v,b]):r.segpts=[a.x2,a.y1]),r.isRound&&(y=t.pstyle("taxi-radius").value,g="arc-radius"===t.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(t,e){var r,n,i,a,s,o,l,c,h,u,d,p,g,f,m,y,v,x,b,w,k,T,E=t._private.rscratch;"bezier"===E.edgeType&&(m=e.srcPos,r=e.tgtPos,n=e.srcW,i=e.srcH,a=e.tgtW,s=e.tgtH,T=e.srcShape,o=e.tgtShape,v=e.srcCornerRadius,l=e.tgtCornerRadius,x=e.srcRs,e=e.tgtRs,y=!at(E.startX)||!at(E.startY),f=!at(E.arrowStartX)||!at(E.arrowStartY),c=!at(E.endX)||!at(E.endY),h=!at(E.arrowEndX)||!at(E.arrowEndY),u=this.getArrowWidth(t.pstyle("width").pfValue,t.pstyle("arrow-scale").value)*this.arrowShapeWidth*3,b=(w=X7t({x:E.ctrlpts[0],y:E.ctrlpts[1]},{x:E.startX,y:E.startY}))i.poolIndex()&&(t=n,n=i,i=t),e.srcPos=n.position()),s=e.tgtPos=i.position(),o=e.srcW=n.outerWidth(),l=e.srcH=n.outerHeight(),c=e.tgtW=i.outerWidth(),h=e.tgtH=i.outerHeight(),u=e.srcShape=D.nodeShapes[M.getNodeShape(n)],d=e.tgtShape=D.nodeShapes[M.getNodeShape(i)],p=e.srcCornerRadius="auto"===n.pstyle("corner-radius").value?"auto":n.pstyle("corner-radius").pfValue,g=e.tgtCornerRadius="auto"===i.pstyle("corner-radius").value?"auto":i.pstyle("corner-radius").pfValue,f=e.tgtRs=i._private.rscratch,m=e.srcRs=n._private.rscratch;e.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var y=0;y=N.desktopTapThreshold2),v(t)),o=(e&&(N.hoverData.tapholdCancelled=!0),me(function(){var t=N.hoverData.dragDelta=N.hoverData.dragDelta||[];0===t.length?(t.push(f[0]),t.push(f[1])):(t[0]+=f[0],t[1]+=f[1])},"updateDragDelta")),y=(i=!0,I(d,["mousemove","vmousemove","tapdrag"],t,{x:l[0],y:l[1]}),me(function(){N.data.bgActivePosistion=void 0,N.hoverData.selecting||a.emit({originalEvent:t,type:"boxstart",position:{x:l[0],y:l[1]}}),u[4]=1,N.hoverData.selecting=!0,N.redrawHint("select",!0),N.redraw()},"goIntoBoxMode"));if(3===N.hoverData.which?e&&(r={originalEvent:t,type:"cxtdrag",position:{x:l[0],y:l[1]}},(g||a).emit(r),N.hoverData.cxtDragged=!0,!N.hoverData.cxtOver||d!==N.hoverData.cxtOver)&&(N.hoverData.cxtOver&&N.hoverData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:l[0],y:l[1]}}),N.hoverData.cxtOver=d)&&d.emit({originalEvent:t,type:"cxtdragover",position:{x:l[0],y:l[1]}}):N.hoverData.dragging?(i=!0,a.panningEnabled()&&a.userPanningEnabled()&&(N.hoverData.justStartedPan?(r=N.hoverData.mdownPos,n={x:(l[0]-r[0])*s,y:(l[1]-r[1])*s},N.hoverData.justStartedPan=!1):n={x:f[0]*s,y:f[1]*s},a.panBy(n),a.emit("dragpan"),N.hoverData.dragged=!0),l=N.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&&I(p,["mouseout","tapdragout"],t,{x:l[0],y:l[1]}),d&&I(d,["mouseover","tapdragover"],t,{x:l[0],y:l[1]}),N.hoverData.last=d),g&&(e?a.boxSelectionEnabled()&&h?(g&&g.grabbed()&&(D(m),g.emit("freeon"),m.emit("free"),N.dragData.didDrag)&&(g.emit("dragfreeon"),m.emit("dragfree")),y()):g&&g.grabbed()&&N.nodeIsDraggable(g)&&((r=!N.dragData.didDrag)&&N.redrawHint("eles",!0),N.dragData.didDrag=!0,N.hoverData.draggingEles||M(m,{inDragLayer:!0}),s={x:0,y:0},at(f[0])&&at(f[1])&&(s.x+=f[0],s.y+=f[1],r)&&((n=N.hoverData.dragDelta)&&at(n[0])&&at(n[1])&&(s.x+=n[0],s.y+=n[1])),N.hoverData.draggingEles=!0,m.silentShift(s).emit("position drag"),N.redrawHint("drag",!0),N.redraw()):o()),i=!0):e&&(N.hoverData.dragging||!a.boxSelectionEnabled()||!h&&a.panningEnabled()&&a.userPanningEnabled()?!N.hoverData.selecting&&a.panningEnabled()&&a.userPanningEnabled()&&R(g,N.hoverData.downs)&&(N.hoverData.dragging=!0,N.hoverData.justStartedPan=!0,u[4]=0,N.data.bgActivePosistion=z7t(c),N.redrawHint("select",!0),N.redraw()):y(),g)&&g.pannable()&&g.active()&&g.unactivate(),u[2]=l[0],u[3]=l[1],i)return t.stopPropagation&&t.stopPropagation(),t.preventDefault&&t.preventDefault(),!1}},"mousemoveHandler"),!1),N.registerBinding(t,"mouseup",me(function(t){var e,r,n,i,a,s,o,l;1===N.hoverData.which&&1!==t.which&&N.hoverData.capture||N.hoverData.capture&&(N.hoverData.capture=!1,e=N.cy,r=N.projectIntoViewport(t.clientX,t.clientY),n=N.selection,o=N.findNearestElement(r[0],r[1],!0,!1),i=N.dragData.possibleDragElements,a=N.hoverData.down,l=v(t),N.data.bgActivePosistion&&(N.redrawHint("select",!0),N.redraw()),N.hoverData.tapholdCancelled=!0,N.data.bgActivePosistion=void 0,a&&a.unactivate(),3===N.hoverData.which?(s={originalEvent:t,type:"cxttapend",position:{x:r[0],y:r[1]}},(a||e).emit(s),N.hoverData.cxtDragged||(s={originalEvent:t,type:"cxttap",position:{x:r[0],y:r[1]}},(a||e).emit(s)),N.hoverData.cxtDragged=!1,N.hoverData.which=null):1===N.hoverData.which&&(I(o,["mouseup","tapend","vmouseup"],t,{x:r[0],y:r[1]}),N.dragData.didDrag||N.hoverData.dragged||N.hoverData.selecting||N.hoverData.isOverThresholdDrag||(I(a,["click","tap","vclick"],t,{x:r[0],y:r[1]}),h=!1,t.timeStamp-u<=e.multiClickDebounceTime()?(c&&clearTimeout(c),h=!0,u=null,I(a,["dblclick","dbltap","vdblclick"],t,{x:r[0],y:r[1]})):(c=setTimeout(function(){h||I(a,["oneclick","onetap","voneclick"],t,{x:r[0],y:r[1]})},e.multiClickDebounceTime()),u=t.timeStamp)),null!=a||N.dragData.didDrag||N.hoverData.selecting||N.hoverData.dragged||v(t)||(e.$(d).unselect(["tapunselect"]),0=N.touchTapThreshold2}if(e&&N.touchData.cxt&&(t.preventDefault(),x=t.touches[0].clientX-q,b=t.touches[0].clientY-j,w=t.touches[1].clientX-q,k=t.touches[1].clientY-j,2.25<=(o=it(x,b,w,k))/G||22500<=o)&&(N.touchData.cxt=!1,N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),p={originalEvent:t,type:"cxttapend",position:{x:i[0],y:i[1]}},N.touchData.start?(N.touchData.start.unactivate().emit(p),N.touchData.start=null):n.emit(p)),e&&N.touchData.cxt){var p={originalEvent:t,type:"cxtdrag",position:{x:i[0],y:i[1]}},g=(N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),(N.touchData.start||n).emit(p),N.touchData.start&&(N.touchData.start._private.grabbed=!1),N.touchData.cxtDragged=!0,N.findNearestElement(i[0],i[1],!0,!0));(!N.touchData.cxtOver||g!==N.touchData.cxtOver)&&(N.touchData.cxtOver&&N.touchData.cxtOver.emit({originalEvent:t,type:"cxtdragout",position:{x:i[0],y:i[1]}}),N.touchData.cxtOver=g)&&g.emit({originalEvent:t,type:"cxtdragover",position:{x:i[0],y:i[1]}})}else if(e&&t.touches[2]&&n.boxSelectionEnabled())t.preventDefault(),N.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,N.touchData.selecting||n.emit({originalEvent:t,type:"boxstart",position:{x:i[0],y:i[1]}}),N.touchData.selecting=!0,N.touchData.didSelect=!0,r[4]=1,r&&0!==r.length&&void 0!==r[0]?(r[2]=(i[0]+i[2]+i[4])/3,r[3]=(i[1]+i[3]+i[5])/3):(r[0]=(i[0]+i[2]+i[4])/3,r[1]=(i[1]+i[3]+i[5])/3,r[2]=(i[0]+i[2]+i[4])/3+1,r[3]=(i[1]+i[3]+i[5])/3+1),N.redrawHint("select",!0),N.redraw();else if(e&&t.touches[1]&&!N.touchData.didSelect&&n.zoomingEnabled()&&n.panningEnabled()&&n.userZoomingEnabled()&&n.userPanningEnabled()){if(t.preventDefault(),N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),T=N.dragData.touchDragEles){N.redrawHint("drag",!0);for(var f=0;f=f.deqFastCost*(1e3/60-(t?n:0)))break}else if(t){if(l>=f.deqCost*i||l>=f.deqAvgCost*n)break}else if(c>=f.deqNoDrawCost*(1e3/60))break;var h=f.deq(p,o,s);if(!(0=.2*t.width&&this.retireTexture(t)},n9t.checkTextureFullness=function(t){var e=this.getTextureQueue(t.height);.8=e)return a.retired=!1,a.usedWidth=0,a.invalidatedWidth=0,a.fullnessChecks=0,k7t(a.eleCaches),a.context.setTransform(1,0,0,1,0,0),a.context.clearRect(0,0,a.width,a.height),w7t(n,a),r.push(a),a}},n9t.queueElement=function(t,e){var r=this.getElementQueue(),n=this.getElementKeyToQueue(),i=this.getKey(t),a=n[i];a?(a.level=Math.max(a.level,e),a.eles.merge(t),a.reqs++,r.updateItem(a)):(a={eles:t.spawn().merge(t),level:e,reqs:1,key:i},r.push(a),n[i]=a)},n9t.dequeue=function(t){for(var e=this.getElementQueue(),r=this.getElementKeyToQueue(),n=[],i=this.lookup,a=0;a<1&&0=f||!g8t(g.bb,v.boundingBox()))&&!(g=p({insert:!0,after:g})))return null;l||m?s.queueLayer(g,v):s.drawEleInLayer(g,v,a,t),g.eles.push(v),x[a]=g}}return l||(m?null:u)},J.getEleLevelForLayerLevel=function(t,e){return t},J.drawEleInLayer=function(t,e,r,n){var i=this.renderer,t=t.context,a=e.boundingBox();0!==a.w&&0!==a.h&&e.visible()&&(r=this.getEleLevelForLayerLevel(r,n),i.setImgSmoothing(t,!1),i.drawCachedElement(t,e,null,null,r,!0),i.setImgSmoothing(t,!0))},J.levelIsComplete=function(t,e){var r=this.layersByLevel[t];if(!r||0===r.length)return!1;for(var n=0,i=0;is.minMbLowQualFrames)&&(s.motionBlurPxRatio=s.mbPxRBlurry),s.clearingMotionBlur&&(s.motionBlurPxRatio=1),s.textureDrawLastFrame&&!a&&(i[s.NODE]=!0,i[s.SELECT_BOX]=!0),e.style()),v=e.zoom(),x=void 0!==c?c:v,b=e.pan(),w={x:b.x,y:b.y},k={zoom:v,pan:{x:b.x,y:b.y}},T=(void 0===(T=s.prevViewport)||k.zoom!==T.zoom||k.pan.x!==T.pan.x||k.pan.y!==T.pan.y||f&&!g||(s.motionBlurPxRatio=1),x*=n,(w=h||w).x*=n,w.y*=n,s.getCachedZSortedEles());function E(t,e,r,n,i){var a=t.globalCompositeOperation;t.globalCompositeOperation="destination-out",s.colorFillStyle(t,255,255,255,s.motionBlurTransparency),t.fillRect(e,r,n,i),t.globalCompositeOperation=a}function C(t,e){var r,n,i,a=s.clearingMotionBlur||t!==u.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]&&t!==u.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]?(r=w,n=x,i=s.canvasWidth,s.canvasHeight):(r={x:b.x*p,y:b.y*p},n=v*p,i=s.canvasWidth*p,s.canvasHeight*p);t.setTransform(1,0,0,1,0,0),"motionBlur"===e?E(t,0,0,i,a):o||void 0!==e&&!e||t.clearRect(0,0,i,a),l||(t.translate(r.x,r.y),t.scale(n,n)),h&&t.translate(h.x,h.y),c&&t.scale(c,c)}me(E,"mbclear"),me(C,"setContextTransform"),a||(s.textureDrawLastFrame=!1),a?(s.textureDrawLastFrame=!0,s.textureCache||(s.textureCache={},s.textureCache.bb=e.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:n*s.textureMult}),(k=s.textureCache.viewport={zoom:e.zoom(),pan:e.pan(),width:s.canvasWidth,height:s.canvasHeight}).mpan={x:(0-k.pan.x)/k.zoom,y:(0-k.pan.y)/k.zoom}),i[s.DRAG]=!1,i[s.NODE]=!1,_=u.contexts[s.NODE],g=s.textureCache.texture,k=s.textureCache.viewport,_.setTransform(1,0,0,1,0,0),d?E(_,0,0,k.width,k.height):_.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(_,f[0],f[1],f[2],m),_.fillRect(0,0,k.width,k.height),v=e.zoom(),C(_,!1),_.clearRect(k.mpan.x,k.mpan.y,k.width/k.zoom/n,k.height/k.zoom/n),_.drawImage(g,k.mpan.x,k.mpan.y,k.width/k.zoom/n,k.height/k.zoom/n)):s.textureOnViewport&&!o&&(s.textureCache=null);var _,S,f=e.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]=!i[s.NODE]&&d&&!s.clearedForMotionBlur[s.NODE]||s.clearingMotionBlur,m[s.NODE]&&(s.clearedForMotionBlur[s.NODE]=!0),m[s.DRAG]=!i[s.DRAG]&&d&&!s.clearedForMotionBlur[s.DRAG]||s.clearingMotionBlur,m[s.DRAG]&&(s.clearedForMotionBlur[s.DRAG]=!0),(i[s.NODE]||l||r||m[s.NODE])&&(S=d&&!m[s.NODE]&&1!==p,C(_=o||(S?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]:u.contexts[s.NODE]),d&&!S?"motionBlur":void 0),g?s.drawCachedNodes(_,T.nondrag,n,f):s.drawLayeredElements(_,T.nondrag,n,f),s.debug&&s.drawDebugPoints(_,T.nondrag),l||d||(i[s.NODE]=!1)),!r&&(i[s.DRAG]||l||m[s.DRAG])&&(S=d&&!m[s.DRAG]&&1!==p,C(_=o||(S?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]:u.contexts[s.DRAG]),d&&!S?"motionBlur":void 0),g?s.drawCachedNodes(_,T.drag,n,f):s.drawCachedElements(_,T.drag,n,f),s.debug&&s.drawDebugPoints(_,T.drag),l||d||(i[s.DRAG]=!1)),this.drawSelectionRectangle(t,C),d&&1!==p&&(r=u.contexts[s.NODE],S=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_NODE],g=u.contexts[s.DRAG],n=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_DRAG],f=me(function(t,e,r){t.setTransform(1,0,0,1,0,0),r||!y?t.clearRect(0,0,s.canvasWidth,s.canvasHeight):E(t,0,0,s.canvasWidth,s.canvasHeight),r=p,t.drawImage(e,0,0,s.canvasWidth*r,s.canvasHeight*r,0,0,s.canvasWidth,s.canvasHeight)},"drawMotionBlur"),(i[s.NODE]||m[s.NODE])&&(f(r,S,m[s.NODE]),i[s.NODE]=!1),i[s.DRAG]||m[s.DRAG])&&(f(g,n,m[s.DRAG]),i[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,i[s.NODE]=!0,i[s.DRAG]=!0,s.redraw()},100)),o||e.emit("render")},drawSelectionRectangle:function(t,e){var r,n=this,i=n.cy,a=n.data,i=i.style(),s=t.drawOnlyNodeLayer,o=t.drawAllLayers,l=a.canvasNeedsRedraw;(n.showFps||!s&&l[n.SELECT_BOX]&&!o)&&(e(s=t.forcedContext||a.contexts[n.SELECT_BOX]),1==n.selection[4]&&(n.hoverData.selecting||n.touchData.selecting)&&(r=n.cy.zoom(),e=i.core("selection-box-border-width").value/r,s.lineWidth=e,s.fillStyle="rgba("+i.core("selection-box-color").value[0]+","+i.core("selection-box-color").value[1]+","+i.core("selection-box-color").value[2]+","+i.core("selection-box-opacity").value+")",s.fillRect(n.selection[0],n.selection[1],n.selection[2]-n.selection[0],n.selection[3]-n.selection[1]),0=e-1)return!1;(this.freePointer.x!==c&&this.enableWrapping?s:(o(),r))()}return this.keyToLocation.set(t,p),this.needsBuffer=!0,p},"draw")},{key:"getOffsets",value:me(function(t){return this.keyToLocation.get(t)},"getOffsets")},{key:"isEmpty",value:me(function(){return 0===this.freePointer.x&&0===this.freePointer.row},"isEmpty")},{key:"canFit",value:me(function(t){var e=this.atlasSize,r=this.rows,t=this.getScale(t).texW;return!(this.freePointer.x+t>e)||this.freePointer.rowt[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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{mu(),eh(),t(),An(),Ewe=[],Cwe=0,Swe={},_we=mt(()=>{Ewe=[],Cwe=0,Swe={}},"clear"),Awe=mt(function(t){for(let e=Ewe.length-1;0<=e;e--)if(Ewe[e].level0{M.info("addNode",e,t,r,n);let i=D(),a=i.mindmap?.padding??yr.mindmap.padding;switch(n){case Iwe.ROUNDED_RECT:case Iwe.RECT:case Iwe.HEXAGON:a*=2}if(t={id:Cwe++,nodeId:_c(t,i),level:e,descr:_c(r,i),type:n,children:[],width:i.mindmap?.maxNodeWidth??yr.mindmap.maxNodeWidth,padding:a},r=Awe(e))r.children.push(t);else if(0!==Ewe.length)throw new Error('There can be only one root. No parent could be found for ("'+t.descr+'")');Ewe.push(t)},"addNode"),Iwe={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},Rwe=mt((e,t)=>{switch(M.debug("In get type",e,t),e){case"[":return Iwe.RECT;case"(":return")"===t?Iwe.ROUNDED_RECT:Iwe.CLOUD;case"((":return Iwe.CIRCLE;case")":return Iwe.CLOUD;case"))":return Iwe.BANG;case"{{":return Iwe.HEXAGON;default:return Iwe.DEFAULT}},"getType"),Mwe=mt((e,t)=>{Swe[e]=t},"setElementForId"),Dwe=mt(e=>{var t,r;e&&(t=D(),r=Ewe[Ewe.length-1],e.icon&&(r.icon=_c(e.icon,t)),e.class)&&(r.class=_c(e.class,t))},"decorateNode"),Owe=mt(e=>{switch(e){case Iwe.DEFAULT:return"no-border";case Iwe.RECT:return"rect";case Iwe.ROUNDED_RECT:return"rounded-rect";case Iwe.CIRCLE:return"circle";case Iwe.CLOUD:return"cloud";case Iwe.BANG:return"bang";case Iwe.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),Pwe=mt(()=>M,"getLogger"),Bwe=mt(e=>Swe[e],"getElementById"),$we={clear:_we,addNode:Nwe,getMindmap:Lwe,nodeType:Iwe,getType:Rwe,setElementForId:Mwe,decorateNode:Dwe,type2Str:Owe,getLogger:Pwe,getElementById:Bwe}});function Uwe(e){return(Uwe="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 qwe(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function jwe(e,t){for(var r=0;re.length)&&(t=e.length);for(var r=0,n=new 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 i6e(e){var t=typeof e;return null!=e&&("object"==t||"function"==t)}function a6e(e,t){return e(t={exports:{}},t.exports),t.exports}function s6e(e){for(var t=e.length;t--&&O7e.test(e.charAt(t)););return t}function o6e(e){return e&&e.slice(0,P7e(e)+1).replace(B7e,"")}function l6e(e){var t=F7e.call(e,G7e),r=e[G7e];try{var n=!(e[G7e]=void 0)}catch{}var i=z7e.call(e);return n&&(t?e[G7e]=r:delete e[G7e]),i}function c6e(e){return q7e.call(e)}function h6e(e){return null==e?void 0===e?"[object Undefined]":"[object Null]":(W7e&&W7e in Object(e)?U7e:j7e)(e)}function u6e(e){return null!=e&&"object"==typeof e}function d6e(e){return"symbol"==typeof e||H7e(e)&&"[object Symbol]"==Y7e(e)}function p6e(e){if("number"==typeof e)return e;if(V7e(e))return X7e;if(I7e(e)&&(t="function"==typeof e.valueOf?e.valueOf():e,e=I7e(t)?t+"":t),"string"!=typeof e)return 0===e?e:+e;e=$7e(e);var t=Z7e.test(e);return t||Q7e.test(e)?J7e(e.slice(2),t?2:8):K7e.test(e)?X7e:+e}function g6e(n,r,e){var i,a,s,o,l,c,h=0,t=!1,u=!1,d=!0;if("function"!=typeof n)throw new TypeError("Expected a function");function p(e){var t=i,r=a;return i=a=void 0,h=e,o=n.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?r8e(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=D7e();if(m(e))return v(e);l=setTimeout(y,f(e))}function v(e){return l=void 0,d&&i?p(e):(i=a=void 0,o)}function x(){void 0!==l&&clearTimeout(l),i=c=a=l=void(h=0)}function b(){return void 0===l?o:v(D7e())}function w(){var e=D7e(),t=m(e);if(i=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=e8e(r)||0,I7e(e)&&(t=!!e.leading,u="maxWait"in e,s=u?t8e(e8e(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(x,"cancel"),mt(b,"flush"),mt(w,"debounced"),w.cancel=x,w.flush=b,w}function f6e(e,t,r,n,i,a){var s=ZTe(e)?e:ACe[e]||ACe.euclidean;return 0===t&&ZTe(e)?s(i,a):s(t,r,n,i,a)}function m6e(e,t){var r;return!gSe(e)&&(!("number"!=(r=typeof e)&&"symbol"!=r&&"boolean"!=r&&null!=e&&!V7e(e))||mSe.test(e)||!fSe.test(e)||null!=t&&e in Object(t))}function y6e(e){return!!I7e(e)&&("[object Function]"==(e=Y7e(e))||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e)}function v6e(e){return!!xSe&&xSe in e}function x6e(e){if(null!=e){try{return wSe.call(e)}catch{}try{return e+""}catch{}}return""}function b6e(e){return!(!I7e(e)||bSe(e))&&(vSe(e)?ESe:TSe).test(kSe(e))}function w6e(e,t){return e?.[t]}function k6e(e,t){return e=SSe(e,t),CSe(e)?e:void 0}function T6e(){this.__data__=ASe?ASe(null):{},this.size=0}function E6e(e){return e=this.has(e)&&delete this.__data__[e],this.size-=e?1:0,e}function C6e(e){var t,r=this.__data__;return ASe?"__lodash_hash_undefined__"===(t=r[e])?void 0:t:LSe.call(r,e)?r[e]:void 0}function S6e(e){var t=this.__data__;return ASe?void 0!==t[e]:NSe.call(t,e)}function _6e(e,t){var r=this.__data__;return this.size+=this.has(e)?0:1,r[e]=ASe&&void 0===t?"__lodash_hash_undefined__":t,this}function A6e(e){var t=-1,r=null==e?0:e.length;for(this.clear();++t>0&255)/255,t[1]=(e>>8&255)/255,t[2]=(e>>16&255)/255,t[3]=(e>>24&255)/255,t}function sTe(e){return e[0]+(e[1]<<8)+(e[2]<<16)+(e[3]<<24)}function oTe(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 lTe(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 cTe(e,t,r){switch(t){case e.FLOAT:return new Float32Array(r);case e.INT:return new Int32Array(r)}}function hTe(e,t,r,n,i,a){switch(t){case e.FLOAT:return new Float32Array(r.buffer,a*n,i);case e.INT:return new Int32Array(r.buffer,a*n,i)}}function uTe(e,t,r,n){var i=(t=Hwe(lTe(e,t),2))[0],n=cTe(e,t=t[1],n),a=e.createBuffer();return e.bindBuffer(e.ARRAY_BUFFER,a),e.bufferData(e.ARRAY_BUFFER,n,e.STATIC_DRAW),t===e.FLOAT?e.vertexAttribPointer(r,i,t,!1,0,0):t===e.INT&&e.vertexAttribIPointer(r,i,t,0,0),e.enableVertexAttribArray(r),e.bindBuffer(e.ARRAY_BUFFER,null),a}function dTe(t,e,r,n){var i=(r=Hwe(lTe(t,r),3))[0],a=r[1],r=r[2],s=cTe(t,a,e*i),o=i*r,l=t.createBuffer();t.bindBuffer(t.ARRAY_BUFFER,l),t.bufferData(t.ARRAY_BUFFER,e*o,t.DYNAMIC_DRAW),t.enableVertexAttribArray(n),a===t.FLOAT?t.vertexAttribPointer(n,i,a,!1,o,0):a===t.INT&&t.vertexAttribIPointer(n,i,a,o,0),t.vertexAttribDivisor(n,1),t.bindBuffer(t.ARRAY_BUFFER,null);for(var c=new Array(e),h=0;h{function n(e){if(qwe(this,n),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(qTe){if(qTe.requestAnimationFrame)return function(e){qTe.requestAnimationFrame(e)};if(qTe.mozRequestAnimationFrame)return function(e){qTe.mozRequestAnimationFrame(e)};if(qTe.webkitRequestAnimationFrame)return function(e){qTe.webkitRequestAnimationFrame(e)};if(qTe.msRequestAnimationFrame)return function(e){qTe.msRequestAnimationFrame(e)}}return function(e){e&&setTimeout(function(){e(a8e())},1e3/60)}})(),o8e=mt(function(e){return s8e(e)},"requestAnimationFrame"),l8e=a8e,c8e=mt(function(e){for(var t,r=1>1])<0;)e[r]=a,r=s;return e[r]=i},"_siftdown"),u=mt(function(e,t,r){var n,i,a,s,o;for(null==r&&(r=d),i=e.length,a=e[o=t],n=2*t+1;ny&&(u[v]=y,g[v]=w,f[v]=x),r||(v=w*o+b,!r&&u[v]>y&&(u[v]=y,g[v]=b,f[v]=x)))}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"),xEe=mt(function(e){return{x1:e.x1,x2:e.x2,w:e.w,y1:e.y1,y2:e.y2,h:e.h}},"copyBoundingBox"),bEe=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"),wEe=mt(function(e,t,r){return{x1:e.x1+t,x2:e.x2+t,y1:e.y1+r,y2:e.y2+r,w:e.w,h:e.h}},"shiftBoundingBox"),kEe=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"),TEe=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"),EEe=mt(function(e){var t=1t.x2||t.x1>e.x2||e.x2t.y2||t.y1>e.y2)},"boundingBoxesIntersect"),AEe=mt(function(e,t,r){return e.x1<=t&&t<=e.x2&&e.y1<=r&&r<=e.y2},"inBoundingBox"),LEe=mt(function(e,t){return AEe(e,t.x,t.y)},"pointInBoundingBox"),NEe=mt(function(e,t){return AEe(e,t.x1,t.y1)&&AEe(e,t.x2,t.y2)},"boundingBoxInBoundingBox"),IEe=mt(function(e,t,r,n,i,a,s){var o,l="auto"===(l=7=u&&c[1]<=o||0<(c=WEe(e,t,r,n,h=r+i-l,u=n+a-l,l+s)).length&&c[0]>=h&&c[1]>=u||0<(c=WEe(e,t,r,n,o=r-i+l,h=n+a-l,l+s)).length&&c[0]<=o&&c[1]>=h?[c[0],c[1]]:[]},"roundRectangleIntersectLine"),REe=mt(function(e,t,r,n,i,a,s){var o=Math.min(r,i),r=Math.max(r,i),i=Math.min(n,a),n=Math.max(n,a);return o-s<=e&&e<=r+s&&i-s<=t&&t<=n+s},"inLineVicinity"),MEe=mt(function(e,t,r,n,i,a,s,o,l){var c=Math.min(r,s,i)-l,r=Math.max(r,s,i)+l,s=Math.min(n,o,a)-l,i=Math.max(n,o,a)+l;return!(eo&&(o=t[s][c],l=c);i[l].push(e[s])}for(var h=0;h=i.threshold||"dendrogram"===i.mode&&1===e.length)return!1;var p=t[s],g=t[n[s]],f="dendrogram"===i.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"===i.linkage?(a=r[p.key][y.key],r[p.key][y.key]s&&(s=t[i*e+(a=l)])}0=t.minIterations-1||v==t.maxIterations-1)){for(var q=0,R=0;R{var e=o[t];null!=e&&null!=e.then?e.then(function(e){s(t,e)},function(e){n(e)}):s(t,e)})(e)})},sSe.resolve=function(r){return new sSe(function(e,t){e(r)})},sSe.reject=function(r){return new sSe(function(e,t){t(r)})},dSe=typeof Promise<"u"?Promise:sSe,pSe=mt(function(e,t,r){var n=s7e(e),i=!n;(t=this._private=k7e({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&&ZTe(t.complete)&&t.completes.push(t.complete),i&&(r=e.position(),t.startPosition=t.startPosition||{x:r.x,y:r.y},t.startStyle=t.startStyle||e.cy().style().getAnimationStartStyle(e,t.style)),n&&(i=e.pan(),t.startPan={x:i.x,y:i.y},t.startZoom=e.zoom()),this.length=1,this[0]=this},"Animation"),yLe=pSe.prototype,k7e(yLe,{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),n7e(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 n=this._private,e=n.playing,t=(e&&this.pause(),n.progress=1-n.progress,n.started=!1,mt(function(e,t){var r=n[e];null!=r&&(n[e]=n[t],n[t]=r)},"swap"));if(t("zoom","startZoom"),t("pan","startPan"),t("position","startPosition"),n.style)for(var r=0;r{try{var e=_Se(Object,"defineProperty");return e({},"",{}),e}catch{}})(),e_e=$9e,mt(eke,"baseAssignValue"),t_e=eke,oLe=Object.prototype,r_e=oLe.hasOwnProperty,mt(tke,"assignValue"),n_e=tke,i_e=/^(?:0|[1-9]\d*)$/,mt(rke,"isIndex"),a_e=rke,mt(nke,"baseSet"),s_e=nke,mt(ike,"set"),o_e=ike,mt(ake,"copyArray"),l_e=ake,mt(ske,"toPath"),c_e=ske,bLe={data:mt(function(b){var e={field:"data",bindingEvent:"data",allowBinding:!1,allowSetting:!1,allowGetting:!1,settingEvent:"data",settingTriggersEvent:!1,triggerFnName:"trigger",immutableKeys:{},updateStyle:!1,beforeGet:mt(function(e){},"beforeGet"),beforeSet:mt(function(e,t){},"beforeSet"),onSet:mt(function(e){},"onSet"),canSet:mt(function(e){return!0},"canSet")};return b=k7e({},e,b),mt(function(e,t){var r,n=b,i=this,a=void 0!==i.length,s=a?i:[i],o=a?i[0]:i;if(KTe(e)){var l,c=-1!==e.indexOf(".")&&c_e(e);if(n.allowGetting&&void 0===t)return o&&(n.beforeGet(o),l=c&&void 0===o._private[n.field][e]?JSe(o._private[n.field],c):o._private[n.field][e]),l;if(n.allowSetting&&void 0!==t&&!n.immutableKeys[e]){a=Ywe({},e,t),n.beforeSet(i,a);for(var h=0,u=s.length;h\\?\\@\\[\\]\\^\\`\\{\\|\\}\\~]",comparatorOp:"=|\\!=|>|>=|<|<=|\\$=|\\^=|\\*=",boolOp:"\\?|\\!|\\^",string:`"(?:\\\\"|[^"])*"|'(?:\\\\'|[^'])*'`,number:x7e,meta:"degree|indegree|outdegree",separator:"\\s*,\\s*",descendant:"\\s+",child:"\\s+>\\s+",subject:"\\$",group:"node|edge|\\*",directedEdge:"\\s+->\\s+",undirectedEdge:"\\s+<->\\s+"}).variable="(?:[\\w-.]|(?:\\\\"+u_e.metaChar+"))+",u_e.className="(?:[\\w-]|(?:\\\\"+u_e.metaChar+"))+",u_e.value=u_e.string+"|"+u_e.number,u_e.id=u_e.variable;for(var t,r=u_e.comparatorOp.split("|"),i=0;i{for(var e,t={},r=0;r")+h(e.child,t);case Q.ANCESTOR:case Q.DESCENDANT:return h(e.ancestor,t)+" "+h(e.descendant,t);case Q.COMPOUND_SPLIT:var a=h(e.left,t),i=h(e.subject,t),s=h(e.right,t);return a+(0":u=!0,n=r=":u=!0,n=r<=e;break;case"<":u=!0,n=ea.length?t.substr(a.length):""}function n(){c=c.length>u.length?c.substr(u.length):""}for(t=t.replace(/[/][*](\s|.)+?[*][/]/g,""),mt(r,"removeSelAndBlockFromRemaining"),mt(n,"removePropAndValFromRem");!t.match(/^\s*$/);){var i=t.match(/^\s*((?:.|\s)+?)\s*\{((?:.|\s)+?)\}/);if(!i){L8e("Halting stylesheet parsing: String stylesheet contains more to parse but no selector and block found in: "+t);break}var a=i[0],s=i[1];if("core"!==s&&new A_e(s).invalid)L8e("Skipping parsing of block: Invalid selector found in string stylesheet: "+s);else{for(var o=i[2],l=!1,c=o,h=[];!c.match(/^\s*$/);){if(!(p=c.match(/^\s*(.+?)\s*:\s*(.+?)(?:\s*;|\s*$)/))){L8e("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}):L8e("Skipping property: Invalid property definition in: "+u):L8e("Skipping property: Invalid property name in: "+u),n()}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+(x||""),units:x,bypass:n},l.unitless||"px"!==x&&"em"!==x?s.pfValue=r:s.pfValue="px"!==x&&x?this.getEmSizeInPixels()*r:r,"ms"!==x&&"s"!==x||(s.pfValue="ms"===x?r:1e3*r),"deg"!==x&&"rad"!==x||(s.pfValue="rad"===x?r:oEe(r)),"%"===x&&(s.pfValue=r/100),s);if(l.propList){var w,k=[];if("none"!=(w=""+r)){for(var T=w.split(/\s*,\s*|\s+/),E=0;Ethis._private.maxZoom?this._private.maxZoom:t)=n.minZoom&&(n.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,n=this._private,i=n.pan,a=n.zoom,s=!n.zoomingEnabled;return ae(e)?r=e:JTe(e)&&(r=e.level,null!=e.position?t=eEe(e.position,a,i):null!=e.renderedPosition&&(t=e.renderedPosition),null!=t)&&!n.panningEnabled&&(s=!0),r=(r=r>n.maxZoom?n.maxZoom:r)t.maxZoom||!t.zoomingEnabled?a=!0:(t.zoom=r,i.push("zoom"))),!n||a&&e.cancelOnFailedZoom||!t.panningEnabled||(r=e.pan,ae(r.x)&&(t.pan.x=r.x,s=!1),ae(r.y)&&(t.pan.y=r.y,s=!1),s)||i.push("pan"),0=r.numIter||($Ae(i,r),i.temperature=i.temperature*r.coolingFactor,i.temperature=r.animationThreshold&&s(),o8e(e)):(KAe(i,r),l())},"frame")();else{for(;h;)h=o(c),c++;KAe(i,r),l()}return this},Bke.prototype.stop=function(){return this.stopped=!0,this.thread&&this.thread.stop(),this.emit("layoutstop"),this},Bke.prototype.destroy=function(){return this.thread&&this.thread.stop(),this},RAe=mt(function(e,t,r){for(var n=r.eles.edges(),i=r.eles.nodes(),a=vEe(r.boundingBox||{x1:0,y1:0,w:e.width(),h:e.height()}),s={isCompound:e.hasCompoundNodes(),layoutNodes:[],idToIndex:{},nodeSize:i.size(),graphSet:[],indexToGraph:[],layoutEdges:[],edgeSize:n.size(),temperature:r.initialTemp,clientWidth:a.w,clientHeight:a.h,boundingBox:a},o=r.eles.components(),l={},c=0;cn.maxX)&&(n.maxX=t.maxX+n.padRight,i=!0),(null==n.minX||t.minX-n.padLeftn.maxY)&&(n.maxY=t.maxY+n.padBottom,i=!0),(null==n.minY||t.minY-n.padTop(t=BEe(y,v,h[u],h[u+1],h[u+2],h[u+3])))return E(e,t),!0}else if("bezier"===n.edgeType||"multibezier"===n.edgeType||"self"===n.edgeType||"compound"===n.edgeType)for(h=n.allpts,u=0;u+5(t=PEe(y,v,h[u],h[u+1],h[u+2],h[u+3],h[u+4],h[u+5])))return E(e,t),!0;for(var l=l||r.source,c=c||r.target,d=x.getArrowWidth(i,a),p=[{name:"source",x:n.arrowStartX,y:n.arrowStartY,angle:n.srcArrowAngle},{name:"target",x:n.arrowEndX,y:n.arrowEndY,angle:n.tgtArrowAngle},{name:"mid-source",x:n.midX,y:n.midY,angle:n.midsrcArrowAngle},{name:"mid-target",x:n.midX,y:n.midY,angle:n.midtgtArrowAngle}],u=0;uMath.abs(b)?i:n:"upward"===u||"downward"===u?(h=n,y=!0):"leftward"!==u&&"rightward"!==u||(h=i,y=!0),(i=h===n)?b:m),n=hEe(h=i?x:v),b=!1;y&&(p||g)||!("downward"===u&&h<0||"upward"===u&&0=Math.abs(w)},"getIsTooClose"))(m),u=y(Math.abs(w)-Math.abs(m)),!g&&!u||b?i?(h=a.y1+m+(c?o/2*n:0),x=a.x1,t=a.x2,r.segpts=[x,h,t,h]):(p=a.x1+m+(c?s/2*n:0),u=a.y1,d=a.y2,r.segpts=[p,u,p,d]):i?(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?(b=(a.y1+a.y2)/2,v=a.x1,l=a.x2,r.segpts=[v,b,l,b]):r.segpts=[a.x1,a.y2]):(p=Math.abs(h)<=s/2,g=Math.abs(x)<=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,b=a.y2,r.segpts=[v,l,v,b]):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,n,i,a,s,o,l,c,h,u,d,p,g,f,m,y,v,x,b,w,k,T,E=e._private.rscratch;"bezier"===E.edgeType&&(m=t.srcPos,r=t.tgtPos,n=t.srcW,i=t.srcH,a=t.tgtW,s=t.tgtH,T=t.srcShape,o=t.tgtShape,v=t.srcCornerRadius,l=t.tgtCornerRadius,x=t.srcRs,t=t.tgtRs,y=!ae(E.startX)||!ae(E.startY),f=!ae(E.arrowStartX)||!ae(E.arrowStartY),c=!ae(E.endX)||!ae(E.endY),h=!ae(E.arrowEndX)||!ae(E.arrowEndY),u=this.getArrowWidth(e.pstyle("width").pfValue,e.pstyle("arrow-scale").value)*this.arrowShapeWidth*3,b=(w=uEe({x:E.ctrlpts[0],y:E.ctrlpts[1]},{x:E.startX,y:E.startY}))i.poolIndex()&&(e=n,n=i,i=e),t.srcPos=n.position()),s=t.tgtPos=i.position(),o=t.srcW=n.outerWidth(),l=t.srcH=n.outerHeight(),c=t.tgtW=i.outerWidth(),h=t.tgtH=i.outerHeight(),u=t.srcShape=D.nodeShapes[M.getNodeShape(n)],d=t.tgtShape=D.nodeShapes[M.getNodeShape(i)],p=t.srcCornerRadius="auto"===n.pstyle("corner-radius").value?"auto":n.pstyle("corner-radius").pfValue,g=t.tgtCornerRadius="auto"===i.pstyle("corner-radius").value?"auto":i.pstyle("corner-radius").pfValue,f=t.tgtRs=i._private.rscratch,m=t.srcRs=n._private.rscratch;t.dirCounts={north:0,west:0,south:0,east:0,northwest:0,southwest:0,northeast:0,southeast:0};for(var y=0;y=N.desktopTapThreshold2),v(e)),o=(t&&(N.hoverData.tapholdCancelled=!0),mt(function(){var e=N.hoverData.dragDelta=N.hoverData.dragDelta||[];0===e.length?(e.push(f[0]),e.push(f[1])):(e[0]+=f[0],e[1]+=f[1])},"updateDragDelta")),y=(i=!0,I(d,["mousemove","vmousemove","tapdrag"],e,{x:l[0],y:l[1]}),mt(function(){N.data.bgActivePosistion=void 0,N.hoverData.selecting||a.emit({originalEvent:e,type:"boxstart",position:{x:l[0],y:l[1]}}),u[4]=1,N.hoverData.selecting=!0,N.redrawHint("select",!0),N.redraw()},"goIntoBoxMode"));if(3===N.hoverData.which?t&&(r={originalEvent:e,type:"cxtdrag",position:{x:l[0],y:l[1]}},(g||a).emit(r),N.hoverData.cxtDragged=!0,!N.hoverData.cxtOver||d!==N.hoverData.cxtOver)&&(N.hoverData.cxtOver&&N.hoverData.cxtOver.emit({originalEvent:e,type:"cxtdragout",position:{x:l[0],y:l[1]}}),N.hoverData.cxtOver=d)&&d.emit({originalEvent:e,type:"cxtdragover",position:{x:l[0],y:l[1]}}):N.hoverData.dragging?(i=!0,a.panningEnabled()&&a.userPanningEnabled()&&(N.hoverData.justStartedPan?(r=N.hoverData.mdownPos,n={x:(l[0]-r[0])*s,y:(l[1]-r[1])*s},N.hoverData.justStartedPan=!1):n={x:f[0]*s,y:f[1]*s},a.panBy(n),a.emit("dragpan"),N.hoverData.dragged=!0),l=N.projectIntoViewport(e.clientX,e.clientY)):1!=u[4]||null!=g&&!g.pannable()?(g&&g.pannable()&&g.active()&&g.unactivate(),g&&g.grabbed()||d==p||(p&&I(p,["mouseout","tapdragout"],e,{x:l[0],y:l[1]}),d&&I(d,["mouseover","tapdragover"],e,{x:l[0],y:l[1]}),N.hoverData.last=d),g&&(t?a.boxSelectionEnabled()&&h?(g&&g.grabbed()&&(D(m),g.emit("freeon"),m.emit("free"),N.dragData.didDrag)&&(g.emit("dragfreeon"),m.emit("dragfree")),y()):g&&g.grabbed()&&N.nodeIsDraggable(g)&&((r=!N.dragData.didDrag)&&N.redrawHint("eles",!0),N.dragData.didDrag=!0,N.hoverData.draggingEles||M(m,{inDragLayer:!0}),s={x:0,y:0},ae(f[0])&&ae(f[1])&&(s.x+=f[0],s.y+=f[1],r)&&((n=N.hoverData.dragDelta)&&ae(n[0])&&ae(n[1])&&(s.x+=n[0],s.y+=n[1])),N.hoverData.draggingEles=!0,m.silentShift(s).emit("position drag"),N.redrawHint("drag",!0),N.redraw()):o()),i=!0):t&&(N.hoverData.dragging||!a.boxSelectionEnabled()||!h&&a.panningEnabled()&&a.userPanningEnabled()?!N.hoverData.selecting&&a.panningEnabled()&&a.userPanningEnabled()&&R(g,N.hoverData.downs)&&(N.hoverData.dragging=!0,N.hoverData.justStartedPan=!0,u[4]=0,N.data.bgActivePosistion=rEe(c),N.redrawHint("select",!0),N.redraw()):y(),g)&&g.pannable()&&g.active()&&g.unactivate(),u[2]=l[0],u[3]=l[1],i)return e.stopPropagation&&e.stopPropagation(),e.preventDefault&&e.preventDefault(),!1}},"mousemoveHandler"),!1),N.registerBinding(e,"mouseup",mt(function(e){var t,r,n,i,a,s,o,l;1===N.hoverData.which&&1!==e.which&&N.hoverData.capture||N.hoverData.capture&&(N.hoverData.capture=!1,t=N.cy,r=N.projectIntoViewport(e.clientX,e.clientY),n=N.selection,o=N.findNearestElement(r[0],r[1],!0,!1),i=N.dragData.possibleDragElements,a=N.hoverData.down,l=v(e),N.data.bgActivePosistion&&(N.redrawHint("select",!0),N.redraw()),N.hoverData.tapholdCancelled=!0,N.data.bgActivePosistion=void 0,a&&a.unactivate(),3===N.hoverData.which?(s={originalEvent:e,type:"cxttapend",position:{x:r[0],y:r[1]}},(a||t).emit(s),N.hoverData.cxtDragged||(s={originalEvent:e,type:"cxttap",position:{x:r[0],y:r[1]}},(a||t).emit(s)),N.hoverData.cxtDragged=!1,N.hoverData.which=null):1===N.hoverData.which&&(I(o,["mouseup","tapend","vmouseup"],e,{x:r[0],y:r[1]}),N.dragData.didDrag||N.hoverData.dragged||N.hoverData.selecting||N.hoverData.isOverThresholdDrag||(I(a,["click","tap","vclick"],e,{x:r[0],y:r[1]}),h=!1,e.timeStamp-u<=t.multiClickDebounceTime()?(c&&clearTimeout(c),h=!0,u=null,I(a,["dblclick","dbltap","vdblclick"],e,{x:r[0],y:r[1]})):(c=setTimeout(function(){h||I(a,["oneclick","onetap","voneclick"],e,{x:r[0],y:r[1]})},t.multiClickDebounceTime()),u=e.timeStamp)),null!=a||N.dragData.didDrag||N.hoverData.selecting||N.hoverData.dragged||v(e)||(t.$(d).unselect(["tapunselect"]),0=N.touchTapThreshold2}if(t&&N.touchData.cxt&&(e.preventDefault(),x=e.touches[0].clientX-q,b=e.touches[0].clientY-j,w=e.touches[1].clientX-q,k=e.touches[1].clientY-j,2.25<=(o=ie(x,b,w,k))/G||22500<=o)&&(N.touchData.cxt=!1,N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),p={originalEvent:e,type:"cxttapend",position:{x:i[0],y:i[1]}},N.touchData.start?(N.touchData.start.unactivate().emit(p),N.touchData.start=null):n.emit(p)),t&&N.touchData.cxt){var p={originalEvent:e,type:"cxtdrag",position:{x:i[0],y:i[1]}},g=(N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),(N.touchData.start||n).emit(p),N.touchData.start&&(N.touchData.start._private.grabbed=!1),N.touchData.cxtDragged=!0,N.findNearestElement(i[0],i[1],!0,!0));(!N.touchData.cxtOver||g!==N.touchData.cxtOver)&&(N.touchData.cxtOver&&N.touchData.cxtOver.emit({originalEvent:e,type:"cxtdragout",position:{x:i[0],y:i[1]}}),N.touchData.cxtOver=g)&&g.emit({originalEvent:e,type:"cxtdragover",position:{x:i[0],y:i[1]}})}else if(t&&e.touches[2]&&n.boxSelectionEnabled())e.preventDefault(),N.data.bgActivePosistion=void 0,this.lastThreeTouch=+new Date,N.touchData.selecting||n.emit({originalEvent:e,type:"boxstart",position:{x:i[0],y:i[1]}}),N.touchData.selecting=!0,N.touchData.didSelect=!0,r[4]=1,r&&0!==r.length&&void 0!==r[0]?(r[2]=(i[0]+i[2]+i[4])/3,r[3]=(i[1]+i[3]+i[5])/3):(r[0]=(i[0]+i[2]+i[4])/3,r[1]=(i[1]+i[3]+i[5])/3,r[2]=(i[0]+i[2]+i[4])/3+1,r[3]=(i[1]+i[3]+i[5])/3+1),N.redrawHint("select",!0),N.redraw();else if(t&&e.touches[1]&&!N.touchData.didSelect&&n.zoomingEnabled()&&n.panningEnabled()&&n.userZoomingEnabled()&&n.userPanningEnabled()){if(e.preventDefault(),N.data.bgActivePosistion=void 0,N.redrawHint("select",!0),T=N.dragData.touchDragEles){N.redrawHint("drag",!0);for(var f=0;f=f.deqFastCost*(1e3/60-(e?n:0)))break}else if(e){if(l>=f.deqCost*i||l>=f.deqAvgCost*n)break}else if(c>=f.deqNoDrawCost*(1e3/60))break;var h=f.deq(p,o,s);if(!(0=.2*e.width&&this.retireTexture(e)},bLe.checkTextureFullness=function(e){var t=this.getTextureQueue(e.height);.8=t)return a.retired=!1,a.usedWidth=0,a.invalidatedWidth=0,a.fullnessChecks=0,$8e(a.eleCaches),a.context.setTransform(1,0,0,1,0,0),a.context.clearRect(0,0,a.width,a.height),B8e(n,a),r.push(a),a}},bLe.queueElement=function(e,t){var r=this.getElementQueue(),n=this.getElementKeyToQueue(),i=this.getKey(e),a=n[i];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:i},r.push(a),n[i]=a)},bLe.dequeue=function(e){for(var t=this.getElementQueue(),r=this.getElementKeyToQueue(),n=[],i=this.lookup,a=0;a<1&&0=f||!NEe(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),x[a]=g}}return l||(m?null:u)},J.getEleLevelForLayerLevel=function(e,t){return e},J.drawEleInLayer=function(e,t,r,n){var i=this.renderer,e=e.context,a=t.boundingBox();0!==a.w&&0!==a.h&&t.visible()&&(r=this.getEleLevelForLayerLevel(r,n),i.setImgSmoothing(e,!1),i.drawCachedElement(e,t,null,null,r,!0),i.setImgSmoothing(e,!0))},J.levelIsComplete=function(e,t){var r=this.layersByLevel[e];if(!r||0===r.length)return!1;for(var n=0,i=0;is.minMbLowQualFrames)&&(s.motionBlurPxRatio=s.mbPxRBlurry),s.clearingMotionBlur&&(s.motionBlurPxRatio=1),s.textureDrawLastFrame&&!a&&(i[s.NODE]=!0,i[s.SELECT_BOX]=!0),t.style()),v=t.zoom(),x=void 0!==c?c:v,b=t.pan(),w={x:b.x,y:b.y},k={zoom:v,pan:{x:b.x,y:b.y}},T=(void 0===(T=s.prevViewport)||k.zoom!==T.zoom||k.pan.x!==T.pan.x||k.pan.y!==T.pan.y||f&&!g||(s.motionBlurPxRatio=1),x*=n,(w=h||w).x*=n,w.y*=n,s.getCachedZSortedEles());function E(e,t,r,n,i){var a=e.globalCompositeOperation;e.globalCompositeOperation="destination-out",s.colorFillStyle(e,255,255,255,s.motionBlurTransparency),e.fillRect(t,r,n,i),e.globalCompositeOperation=a}function C(e,t){var r,n,i,a=s.clearingMotionBlur||e!==u.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]&&e!==u.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]?(r=w,n=x,i=s.canvasWidth,s.canvasHeight):(r={x:b.x*p,y:b.y*p},n=v*p,i=s.canvasWidth*p,s.canvasHeight*p);e.setTransform(1,0,0,1,0,0),"motionBlur"===t?E(e,0,0,i,a):o||void 0!==t&&!t||e.clearRect(0,0,i,a),l||(e.translate(r.x,r.y),e.scale(n,n)),h&&e.translate(h.x,h.y),c&&e.scale(c,c)}mt(E,"mbclear"),mt(C,"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:n*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}),i[s.DRAG]=!1,i[s.NODE]=!1,S=u.contexts[s.NODE],g=s.textureCache.texture,k=s.textureCache.viewport,S.setTransform(1,0,0,1,0,0),d?E(S,0,0,k.width,k.height):S.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(S,f[0],f[1],f[2],m),S.fillRect(0,0,k.width,k.height),v=t.zoom(),C(S,!1),S.clearRect(k.mpan.x,k.mpan.y,k.width/k.zoom/n,k.height/k.zoom/n),S.drawImage(g,k.mpan.x,k.mpan.y,k.width/k.zoom/n,k.height/k.zoom/n)):s.textureOnViewport&&!o&&(s.textureCache=null);var S,_,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]=!i[s.NODE]&&d&&!s.clearedForMotionBlur[s.NODE]||s.clearingMotionBlur,m[s.NODE]&&(s.clearedForMotionBlur[s.NODE]=!0),m[s.DRAG]=!i[s.DRAG]&&d&&!s.clearedForMotionBlur[s.DRAG]||s.clearingMotionBlur,m[s.DRAG]&&(s.clearedForMotionBlur[s.DRAG]=!0),(i[s.NODE]||l||r||m[s.NODE])&&(_=d&&!m[s.NODE]&&1!==p,C(S=o||(_?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_NODE]:u.contexts[s.NODE]),d&&!_?"motionBlur":void 0),g?s.drawCachedNodes(S,T.nondrag,n,f):s.drawLayeredElements(S,T.nondrag,n,f),s.debug&&s.drawDebugPoints(S,T.nondrag),l||d||(i[s.NODE]=!1)),!r&&(i[s.DRAG]||l||m[s.DRAG])&&(_=d&&!m[s.DRAG]&&1!==p,C(S=o||(_?s.data.bufferContexts[s.MOTIONBLUR_BUFFER_DRAG]:u.contexts[s.DRAG]),d&&!_?"motionBlur":void 0),g?s.drawCachedNodes(S,T.drag,n,f):s.drawCachedElements(S,T.drag,n,f),s.debug&&s.drawDebugPoints(S,T.drag),l||d||(i[s.DRAG]=!1)),this.drawSelectionRectangle(e,C),d&&1!==p&&(r=u.contexts[s.NODE],_=s.data.bufferCanvases[s.MOTIONBLUR_BUFFER_NODE],g=u.contexts[s.DRAG],n=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):E(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"),(i[s.NODE]||m[s.NODE])&&(f(r,_,m[s.NODE]),i[s.NODE]=!1),i[s.DRAG]||m[s.DRAG])&&(f(g,n,m[s.DRAG]),i[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,i[s.NODE]=!0,i[s.DRAG]=!0,s.redraw()},100)),o||t.emit("render")},drawSelectionRectangle:function(e,t){var r,n=this,i=n.cy,a=n.data,i=i.style(),s=e.drawOnlyNodeLayer,o=e.drawAllLayers,l=a.canvasNeedsRedraw;(n.showFps||!s&&l[n.SELECT_BOX]&&!o)&&(t(s=e.forcedContext||a.contexts[n.SELECT_BOX]),1==n.selection[4]&&(n.hoverData.selecting||n.touchData.selecting)&&(r=n.cy.zoom(),t=i.core("selection-box-border-width").value/r,s.lineWidth=t,s.fillStyle="rgba("+i.core("selection-box-color").value[0]+","+i.core("selection-box-color").value[1]+","+i.core("selection-box-color").value[2]+","+i.core("selection-box-opacity").value+")",s.fillRect(n.selection[0],n.selection[1],n.selection[2]-n.selection[0],n.selection[3]-n.selection[1]),0=t-1)return!1;(this.freePointer.x!==c&&this.enableWrapping?s:(o(),r))()}return this.keyToLocation.set(e,p),this.needsBuffer=!0,p},"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=this.atlasSize,r=this.rows,e=this.getScale(e).texW;return!(this.freePointer.x+e>t)||this.freePointer.row=this.maxInstances&&this.endBatch()}},"drawTexture")},{key:"drawEdgeArrow",value:me(function(t,e,r){var n,i,a,s,o=t._private.rscratch,o="source"===r?(i=o.arrowStartX,a=o.arrowStartY,o.srcArrowAngle):(i=o.arrowEndX,a=o.arrowEndY,o.tgtArrowAngle);isNaN(i)||null==i||isNaN(a)||null==a||isNaN(o)||null==o||"none"!==t.pstyle(r+"-arrow-shape").value&&(r=t.pstyle(r+"-arrow-color").value,n=t.pstyle("opacity").value*t.pstyle("line-opacity").value,s=t.pstyle("width").pfValue,t=t.pstyle("arrow-scale").value,s=this.r.getArrowWidth(s,t),J6t(t=this.getTempMatrix()),ekt(t,t,[i,a]),nkt(t,t,[s,s]),rkt(t,t,o),i=this.instanceCount,this.vertTypeBuffer.getView(i)[0]=3,q6t(e,this.indexBuffer.getView(i)),U6t(r,n,this.edgeColorBuffer.getView(i)),(a=this.scaleRotate1Buffer.getView(i))[0]=t[0],a[1]=t[1],a[2]=t[3],a[3]=t[4],(s=this.translate1Buffer.getView(i))[0]=t[6],s[1]=t[7],this.instanceCount++,this.instanceCount>=this.maxInstances)&&this.endBatch()},"drawEdgeArrow")},{key:"drawEdgeLine",value:me(function(t,e){var r=t.pstyle("opacity").value,n=t.pstyle("line-opacity").value,i=t.pstyle("width").pfValue,a=t.pstyle("line-color").value,s=r*n,o=this.getEdgePoints(t);if(o.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),4==o.length)r=this.instanceCount,this.vertTypeBuffer.getView(r)[0]=1,q6t(e,this.indexBuffer.getView(r)),U6t(a,s,this.edgeColorBuffer.getView(r)),this.lineWidthBuffer.getView(r)[0]=i,(n=this.pointAPointBBuffer.getView(r))[0]=o[0],n[1]=o[1],n[2]=o[2],n[3]=o[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch();else for(var l=0;l=this.maxInstances&&this.endBatch()}},"drawEdgeLine")},{key:"getEdgePoints",value:me(function(t){var e=t._private.rscratch.allpts;return 4==e.length?e:(t=this.getNumSegments(t),this.getCurveSegmentPoints(e,t))},"getEdgePoints")},{key:"getNumSegments",value:me(function(t){return Math.min(Math.max(15,5),this.maxInstances)},"getNumSegments")},{key:"getCurveSegmentPoints",value:me(function(t,e){if(4==t.length)return t;for(var r=Array(2*(e+1)),n=0;n<=e;n++)0==n?(r[0]=t[0],r[1]=t[1]):n==e?(r[2*n]=t[t.length-2],r[2*n+1]=t[t.length-1]):this.setCurvePoint(t,n/e,r,2*n);return r},"getCurveSegmentPoints")},{key:"setCurvePoint",value:me(function(t,e,r,n){if(!(t.length<=2)){for(var i=Array(t.length-2),a=0;a{me(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof r?r.layoutBase=e():t.layoutBase=e()},"webpackUniversalModuleDefinition")(r,function(){return r=[function(t,e,r){function n(){}me(n,"LayoutConstants"),n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_HALF_SIZE=(n.SIMPLE_NODE_SIZE=40)/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.INITIAL_WORLD_BOUNDARY=(n.WORLD_BOUNDARY=1e6)/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n},function(t,e,r){var n,i=r(2),a=r(8),s=r(9);function o(t,e,r){i.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=t,this.target=e}for(n in me(o,"LEdge"),o.prototype=Object.create(i.prototype),i)o[n]=i[n];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(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},o.prototype.getOtherEndInGraph=function(t,e){for(var r=this.getOtherEnd(t),n=e.getGraphManager().getRoot();;){if(r.getOwner()==e)return r;if(r.getOwner()==n)break;r=r.getOwner().getParent()}return null},o.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[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)},t.exports=o},function(t,e,r){function n(t){this.vGraphObject=t}me(n,"LGraphObject"),t.exports=n},function(t,e,r){var n,i=r(2),a=r(10),s=r(13),o=r(0),l=r(16),c=r(4);function h(t,e,r,n){i.call(this,n=null==r&&null==n?e:n),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=n,this.edges=[],this.graphManager=t,this.rect=null!=r&&null!=e?new s(e.x,e.y,r.width,r.height):new s}for(n in me(h,"LNode"),h.prototype=Object.create(i.prototype),i)h[n]=i[n];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(t){this.rect.width=t},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(t){this.rect.height=t},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(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},h.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},h.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},h.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},h.prototype.getEdgeListToNode=function(e){var r=[],n=this;return n.edges.forEach(function(t){if(t.target==e){if(t.source!=n)throw"Incorrect edge source!";r.push(t)}}),r},h.prototype.getEdgesBetween=function(e){var r=[],n=this;return n.edges.forEach(function(t){if(t.source!=n&&t.target!=n)throw"Incorrect edge source and/or target";t.target!=e&&t.source!=e||r.push(t)}),r},h.prototype.getNeighborsList=function(){var e=new Set,r=this;return r.edges.forEach(function(t){if(t.source==r)e.add(t.target);else{if(t.target!=r)throw"Incorrect incidency!";e.add(t.source)}}),e},h.prototype.withChildren=function(){var e=new Set;if(e.add(this),null!=this.child)for(var t=this.child.getNodes(),r=0;rt&&(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)),this.labelHeight>e)&&("center"==this.labelPos?this.rect.y-=(this.labelHeight-e)/2:"top"==this.labelPos&&(this.rect.y-=this.labelHeight-e),this.setHeight(this.labelHeight))},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(t){(e=this.rect.x)>o.WORLD_BOUNDARY?e=o.WORLD_BOUNDARY:e<-o.WORLD_BOUNDARY&&(e=-o.WORLD_BOUNDARY),(r=this.rect.y)>o.WORLD_BOUNDARY?r=o.WORLD_BOUNDARY:r<-o.WORLD_BOUNDARY&&(r=-o.WORLD_BOUNDARY);var e=new c(e,r),r=t.inverseTransformPoint(e);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()},t.exports=h},function(t,e,r){function n(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}me(n,"PointD"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(t){this.x=t},n.prototype.setY=function(t){this.y=t},n.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=n},function(t,e,r){var n,i=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(t,e,r){i.call(this,r),this.estimatedSize=d.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(n in me(u,"LGraph"),u.prototype=Object.create(i.prototype),i)u[n]=i[n];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(t,e,r){if(null==e&&null==r){var n=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(-1=this.nodes.length&&(r=0,i.forEach(function(t){t.owner==e&&r++}),r==this.nodes.length)&&(this.isConnected=!0)}},t.exports=u},function(t,e,r){var c,h=r(1);function n(t){c=r(5),this.layout=t,this.graphs=[],this.edges=[]}me(n,"LGraphManager"),n.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),t=this.add(t,e);return this.setRootGraph(t),this.rootGraph},n.prototype.add=function(t,e,r,n,i){if(null==r&&null==n&&null==i){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(-1=e.getRight()?r[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(r[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(r[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom())),Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()))),e=(a=e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()?1:a)*r[0],t=r[1]/a;r[0]p.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*p.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-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):(t>p.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(p.COOLING_ADAPTATION_FACTOR,1-(t-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 t,e=this.getAllEdges(),r=0;rthis.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=a.length||o>=a[0].length))for(var l=0;l{me(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e(h9t()):"function"==typeof define&&define.amd?define(["layout-base"],e):"object"==typeof r?r.coseBase=e(h9t()):t.coseBase=e(t.layoutBase)},"webpackUniversalModuleDefinition")(r,function(r){return i=[function(t,e){t.exports=r},function(t,e,r){var n,i=r(0).FDLayoutConstants;function a(){}for(n in me(a,"CoSEConstants"),i)a[n]=i[n];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=i.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,t.exports=a},function(t,e,r){var n,i=r(0).FDLayoutEdge;function a(t,e,r){i.call(this,t,e,r)}for(n in me(a,"CoSEEdge"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];t.exports=a},function(t,e,r){var n,i=r(0).LGraph;function a(t,e,r){i.call(this,t,e,r)}for(n in me(a,"CoSEGraph"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];t.exports=a},function(t,e,r){var n,i=r(0).LGraphManager;function a(t){i.call(this,t)}for(n in me(a,"CoSEGraphManager"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];t.exports=a},function(t,e,r){var n,i=r(0).FDLayoutNode,a=r(0).IMath;function s(t,e,r,n){i.call(this,t,e,r,n)}for(n in me(s,"CoSENode"),s.prototype=Object.create(i.prototype),i)s[n]=i[n];s.prototype.move=function(){var t=this.graphManager.getLayout();this.displacementX=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren,Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.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),t.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(t,e){for(var r,n=this.getChild().getNodes(),i=0;in&&(n=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))},x.radialLayout=function(t,e,r){var n=Math.max(this.maxDiagonalInTree(t),u.DEFAULT_RADIAL_SEPARATION),e=(x.branchRadialLayout(e,null,0,359,0,n),l.calculateBounds(t)),i=new c;i.setDeviceOrgX(e.getMinX()),i.setDeviceOrgY(e.getMinY()),i.setWorldOrgX(r.x),i.setWorldOrgY(r.y);for(var a=0;al&&(l=h.rect.height)}r+=l+t.verticalPadding}},x.prototype.tileCompoundMembers=function(r,n){var i=this;this.tiledMemberPack=[],Object.keys(r).forEach(function(t){var e=n[t];i.tiledMemberPack[t]=i.tileNodes(r[t],e.paddingLeft+e.paddingRight),e.rect.width=i.tiledMemberPack[t].width,e.rect.height=i.tiledMemberPack[t].height})},x.prototype.tileNodes=function(t,e){var r={rows:[],rowWidth:[],rowHeight:[],width:0,height:e,verticalPadding:u.TILING_PADDING_VERTICAL,horizontalPadding:u.TILING_PADDING_HORIZONTAL};t.sort(function(t,e){return t.rect.width*t.rect.height>e.rect.width*e.rect.height?-1:t.rect.width*t.rect.heightt.rowHeight[r]&&(i=t.rowHeight[r],t.rowHeight[r]=n,i=t.rowHeight[r]-i),t.height+=i,t.rows[r].push(e)},x.prototype.getShortestRowIndex=function(t){for(var e=-1,r=Number.MAX_VALUE,n=0;nr&&(e=n,r=t.rowWidth[n]);return e},x.prototype.canAddHorizontal=function(t,e,r){var n,i,a=this.getShortestRowIndex(t);return a<0||(i=t.rowWidth[a])+t.horizontalPadding+e<=t.width||(n=0,t.rowHeight[a]a&&e!=r){n.splice(-1,1),t.rows[r].push(i),t.rowWidth[e]=t.rowWidth[e]-a,t.rowWidth[r]=t.rowWidth[r]+a,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=Number.MIN_VALUE,o=0;os&&(s=n[o].height);0{me(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e(u9t()):"function"==typeof define&&define.amd?define(["cose-base"],e):"object"==typeof r?r.cytoscapeCoseBilkent=e(u9t()):t.cytoscapeCoseBilkent=e(t.coseBase)},"webpackUniversalModuleDefinition")(r,function(r){return i=[function(t,e){t.exports=r},function(t,e,r){var n=r(0).layoutBase.LayoutConstants,i=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:me(function(){},"ready"),stop:me(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(t,e){var r,n={};for(r in t)n[r]=t[r];for(r in e)n[r]=e[r];return n}function l(t){this.options=o(s,t),c(this.options)}me(o,"extend"),me(l,"_CoSELayout");var c=me(function(t){null!=t.nodeRepulsion&&(a.DEFAULT_REPULSION_STRENGTH=i.DEFAULT_REPULSION_STRENGTH=t.nodeRepulsion),null!=t.idealEdgeLength&&(a.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=t.idealEdgeLength),null!=t.edgeElasticity&&(a.DEFAULT_SPRING_STRENGTH=i.DEFAULT_SPRING_STRENGTH=t.edgeElasticity),null!=t.nestingFactor&&(a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=t.nestingFactor),null!=t.gravity&&(a.DEFAULT_GRAVITY_STRENGTH=i.DEFAULT_GRAVITY_STRENGTH=t.gravity),null!=t.numIter&&(a.MAX_ITERATIONS=i.MAX_ITERATIONS=t.numIter),null!=t.gravityRange&&(a.DEFAULT_GRAVITY_RANGE_FACTOR=i.DEFAULT_GRAVITY_RANGE_FACTOR=t.gravityRange),null!=t.gravityCompound&&(a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=t.gravityCompound),null!=t.gravityRangeCompound&&(a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=t.gravityRangeCompound),null!=t.initialEnergyOnIncremental&&(a.DEFAULT_COOLING_FACTOR_INCREMENTAL=i.DEFAULT_COOLING_FACTOR_INCREMENTAL=t.initialEnergyOnIncremental),"draft"==t.quality?n.QUALITY=0:"proof"==t.quality?n.QUALITY=2:n.QUALITY=1,a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=n.NODE_DIMENSIONS_INCLUDE_LABELS=t.nodeDimensionsIncludeLabels,a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=!t.randomize,a.ANIMATE=i.ANIMATE=n.ANIMATE=t.animate,a.TILE=t.tile,a.TILING_PADDING_VERTICAL="function"==typeof t.tilingPaddingVertical?t.tilingPaddingVertical.call():t.tilingPaddingVertical,a.TILING_PADDING_HORIZONTAL="function"==typeof t.tilingPaddingHorizontal?t.tilingPaddingHorizontal.call():t.tilingPaddingHorizontal},"getUserOptions"),r=(l.prototype.run=function(){var s,o,l=this.options,c=(this.idToLNode={},this.layout=new g),h=this,t=(h.stopped=!1,this.cy=this.options.cy,this.cy.trigger({type:"layoutstart",layout:this}),c.newGraphManager()),e=(this.gm=t,this.options.eles.nodes()),r=this.options.eles.edges();this.root=t.addRoot(),this.processChildrenList(this.root,this.getTopMostNodes(e),c);for(var n=0;n{Y9(),ZE(),g9t=me(function(t,e,r,n){e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 ${r.height-5} v${10-r.height} q0,-5 5,-5 h${r.width-10} q5,0 5,5 v${r.height-5} H0 Z`),e.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",r.height).attr("x2",r.width).attr("y2",r.height)},"defaultBkg"),f9t=me(function(t,e,r){e.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("height",r.height).attr("width",r.width)},"rectBkg"),m9t=me(function(t,e,r){var n=r.width,i=r.height,a=.15*n,s=.25*n,o=.35*n,l=.2*n;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 0 a${a},${a} 0 0,1 ${.25*n},${-1*n*.1} + `));i.aPosition=t.getAttribLocation(i,"aPosition"),i.aIndex=t.getAttribLocation(i,"aIndex"),i.aVertType=t.getAttribLocation(i,"aVertType"),i.aAtlasId=t.getAttribLocation(i,"aAtlasId"),i.aTex1=t.getAttribLocation(i,"aTex1"),i.aTex2=t.getAttribLocation(i,"aTex2"),i.aScaleRotate1=t.getAttribLocation(i,"aScaleRotate1"),i.aTranslate1=t.getAttribLocation(i,"aTranslate1"),i.aScaleRotate2=t.getAttribLocation(i,"aScaleRotate2"),i.aTranslate2=t.getAttribLocation(i,"aTranslate2"),i.aPointAPointB=t.getAttribLocation(i,"aPointAPointB"),i.aPointCPointD=t.getAttribLocation(i,"aPointCPointD"),i.aLineWidth=t.getAttribLocation(i,"aLineWidth"),i.aEdgeColor=t.getAttribLocation(i,"aEdgeColor"),i.uPanZoomMatrix=t.getUniformLocation(i,"uPanZoomMatrix"),i.uAtlasSize=t.getUniformLocation(i,"uAtlasSize"),i.uBGColor=t.getUniformLocation(i,"uBGColor"),i.uTextures=[];for(var a=0;a=this.maxInstances&&this.endBatch()}},"drawTexture")},{key:"drawEdgeArrow",value:mt(function(e,t,r){var n,i,a,s,o=e._private.rscratch,o="source"===r?(i=o.arrowStartX,a=o.arrowStartY,o.srcArrowAngle):(i=o.arrowEndX,a=o.arrowEndY,o.tgtArrowAngle);isNaN(i)||null==i||isNaN(a)||null==a||isNaN(o)||null==o||"none"!==e.pstyle(r+"-arrow-shape").value&&(r=e.pstyle(r+"-arrow-color").value,n=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),fTe(e=this.getTempMatrix()),yTe(e,e,[i,a]),xTe(e,e,[s,s]),vTe(e,e,o),i=this.instanceCount,this.vertTypeBuffer.getView(i)[0]=3,aTe(t,this.indexBuffer.getView(i)),iTe(r,n,this.edgeColorBuffer.getView(i)),(a=this.scaleRotate1Buffer.getView(i))[0]=e[0],a[1]=e[1],a[2]=e[3],a[3]=e[4],(s=this.translate1Buffer.getView(i))[0]=e[6],s[1]=e[7],this.instanceCount++,this.instanceCount>=this.maxInstances)&&this.endBatch()},"drawEdgeArrow")},{key:"drawEdgeLine",value:mt(function(e,t){var r=e.pstyle("opacity").value,n=e.pstyle("line-opacity").value,i=e.pstyle("width").pfValue,a=e.pstyle("line-color").value,s=r*n,o=this.getEdgePoints(e);if(o.length/2+this.instanceCount>this.maxInstances&&this.endBatch(),4==o.length)r=this.instanceCount,this.vertTypeBuffer.getView(r)[0]=1,aTe(t,this.indexBuffer.getView(r)),iTe(a,s,this.edgeColorBuffer.getView(r)),this.lineWidthBuffer.getView(r)[0]=i,(n=this.pointAPointBBuffer.getView(r))[0]=o[0],n[1]=o[1],n[2]=o[2],n[3]=o[3],this.instanceCount++,this.instanceCount>=this.maxInstances&&this.endBatch();else for(var l=0;l=this.maxInstances&&this.endBatch()}},"drawEdgeLine")},{key:"getEdgePoints",value:mt(function(e){var t=e._private.rscratch.allpts;return 4==t.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)),n=0;n<=t;n++)0==n?(r[0]=e[0],r[1]=e[1]):n==t?(r[2*n]=e[e.length-2],r[2*n+1]=e[e.length-1]):this.setCurvePoint(e,n/t,r,2*n);return r},"getCurveSegmentPoints")},{key:"setCurvePoint",value:mt(function(e,t,r,n){if(!(e.length<=2)){for(var i=Array(e.length-2),a=0;a{mt(function(e,t){"object"==typeof r&&"object"==typeof n?n.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 n(){}mt(n,"LayoutConstants"),n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_HALF_SIZE=(n.SIMPLE_NODE_SIZE=40)/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.INITIAL_WORLD_BOUNDARY=(n.WORLD_BOUNDARY=1e6)/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,e.exports=n},function(e,t,r){var n,i=r(2),a=r(8),s=r(9);function o(e,t,r){i.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=e,this.target=t}for(n in mt(o,"LEdge"),o.prototype=Object.create(i.prototype),i)o[n]=i[n];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),n=t.getGraphManager().getRoot();;){if(r.getOwner()==t)return r;if(r.getOwner()==n)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 n(e){this.vGraphObject=e}mt(n,"LGraphObject"),e.exports=n},function(e,t,r){var n,i=r(2),a=r(10),s=r(13),o=r(0),l=r(16),c=r(4);function h(e,t,r,n){i.call(this,n=null==r&&null==n?t:n),null!=e.graphManager&&(e=e.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=n,this.edges=[],this.graphManager=e,this.rect=null!=r&&null!=t?new s(t.x,t.y,r.width,r.height):new s}for(n in mt(h,"LNode"),h.prototype=Object.create(i.prototype),i)h[n]=i[n];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=[],n=this;return n.edges.forEach(function(e){if(e.target==t){if(e.source!=n)throw"Incorrect edge source!";r.push(e)}}),r},h.prototype.getEdgesBetween=function(t){var r=[],n=this;return n.edges.forEach(function(e){if(e.source!=n&&e.target!=n)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 n(e,t){null==e&&null==t?(this.x=0,this.y=0):(this.x=e,this.y=t)}mt(n,"PointD"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(e){this.x=e},n.prototype.setY=function(e){this.y=e},n.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=n},function(e,t,r){var n,i=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){i.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(n in mt(u,"LGraph"),u.prototype=Object.create(i.prototype),i)u[n]=i[n];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 n=e;if(null==this.graphManager)throw"Graph has no graph mgr!";if(-1=this.nodes.length&&(r=0,i.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 n(e){c=r(5),this.layout=e,this.graphs=[],this.edges=[]}mt(n,"LGraphManager"),n.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),e=this.add(e,t);return this.setRootGraph(e),this.rootGraph},n.prototype.add=function(e,t,r,n,i){if(null==r&&null==n&&null==i){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 n?n.exports=t(_Le()):"function"==typeof define&&define.amd?define(["layout-base"],t):"object"==typeof r?r.coseBase=t(_Le()):e.coseBase=t(e.layoutBase)},"webpackUniversalModuleDefinition")(r,function(r){return i=[function(e,t){e.exports=r},function(e,t,r){var n,i=r(0).FDLayoutConstants;function a(){}for(n in mt(a,"CoSEConstants"),i)a[n]=i[n];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=i.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 n,i=r(0).FDLayoutEdge;function a(e,t,r){i.call(this,e,t,r)}for(n in mt(a,"CoSEEdge"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];e.exports=a},function(e,t,r){var n,i=r(0).LGraph;function a(e,t,r){i.call(this,e,t,r)}for(n in mt(a,"CoSEGraph"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];e.exports=a},function(e,t,r){var n,i=r(0).LGraphManager;function a(e){i.call(this,e)}for(n in mt(a,"CoSEGraphManager"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];e.exports=a},function(e,t,r){var n,i=r(0).FDLayoutNode,a=r(0).IMath;function s(e,t,r,n){i.call(this,e,t,r,n)}for(n in mt(s,"CoSENode"),s.prototype=Object.create(i.prototype),i)s[n]=i[n];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,n=this.getChild().getNodes(),i=0;in&&(n=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))},x.radialLayout=function(e,t,r){var n=Math.max(this.maxDiagonalInTree(e),u.DEFAULT_RADIAL_SEPARATION),t=(x.branchRadialLayout(t,null,0,359,0,n),l.calculateBounds(e)),i=new c;i.setDeviceOrgX(t.getMinX()),i.setDeviceOrgY(t.getMinY()),i.setWorldOrgX(r.x),i.setWorldOrgY(r.y);for(var a=0;al&&(l=h.rect.height)}r+=l+e.verticalPadding}},x.prototype.tileCompoundMembers=function(r,n){var i=this;this.tiledMemberPack=[],Object.keys(r).forEach(function(e){var t=n[e];i.tiledMemberPack[e]=i.tileNodes(r[e],t.paddingLeft+t.paddingRight),t.rect.width=i.tiledMemberPack[e].width,t.rect.height=i.tiledMemberPack[e].height})},x.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]&&(i=e.rowHeight[r],e.rowHeight[r]=n,i=e.rowHeight[r]-i),e.height+=i,e.rows[r].push(t)},x.prototype.getShortestRowIndex=function(e){for(var t=-1,r=Number.MAX_VALUE,n=0;nr&&(t=n,r=e.rowWidth[n]);return t},x.prototype.canAddHorizontal=function(e,t,r){var n,i,a=this.getShortestRowIndex(e);return a<0||(i=e.rowWidth[a])+e.horizontalPadding+t<=e.width||(n=0,e.rowHeight[a]a&&t!=r){n.splice(-1,1),e.rows[r].push(i),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=n[o].height);0{mt(function(e,t){"object"==typeof r&&"object"==typeof n?n.exports=t(ALe()):"function"==typeof define&&define.amd?define(["cose-base"],t):"object"==typeof r?r.cytoscapeCoseBilkent=t(ALe()):e.cytoscapeCoseBilkent=t(e.coseBase)},"webpackUniversalModuleDefinition")(r,function(r){return i=[function(e,t){e.exports=r},function(e,t,r){var n=r(0).layoutBase.LayoutConstants,i=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,n={};for(r in e)n[r]=e[r];for(r in t)n[r]=t[r];return n}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=i.DEFAULT_REPULSION_STRENGTH=e.nodeRepulsion),null!=e.idealEdgeLength&&(a.DEFAULT_EDGE_LENGTH=i.DEFAULT_EDGE_LENGTH=e.idealEdgeLength),null!=e.edgeElasticity&&(a.DEFAULT_SPRING_STRENGTH=i.DEFAULT_SPRING_STRENGTH=e.edgeElasticity),null!=e.nestingFactor&&(a.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=i.PER_LEVEL_IDEAL_EDGE_LENGTH_FACTOR=e.nestingFactor),null!=e.gravity&&(a.DEFAULT_GRAVITY_STRENGTH=i.DEFAULT_GRAVITY_STRENGTH=e.gravity),null!=e.numIter&&(a.MAX_ITERATIONS=i.MAX_ITERATIONS=e.numIter),null!=e.gravityRange&&(a.DEFAULT_GRAVITY_RANGE_FACTOR=i.DEFAULT_GRAVITY_RANGE_FACTOR=e.gravityRange),null!=e.gravityCompound&&(a.DEFAULT_COMPOUND_GRAVITY_STRENGTH=i.DEFAULT_COMPOUND_GRAVITY_STRENGTH=e.gravityCompound),null!=e.gravityRangeCompound&&(a.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=i.DEFAULT_COMPOUND_GRAVITY_RANGE_FACTOR=e.gravityRangeCompound),null!=e.initialEnergyOnIncremental&&(a.DEFAULT_COOLING_FACTOR_INCREMENTAL=i.DEFAULT_COOLING_FACTOR_INCREMENTAL=e.initialEnergyOnIncremental),"draft"==e.quality?n.QUALITY=0:"proof"==e.quality?n.QUALITY=2:n.QUALITY=1,a.NODE_DIMENSIONS_INCLUDE_LABELS=i.NODE_DIMENSIONS_INCLUDE_LABELS=n.NODE_DIMENSIONS_INCLUDE_LABELS=e.nodeDimensionsIncludeLabels,a.DEFAULT_INCREMENTAL=i.DEFAULT_INCREMENTAL=n.DEFAULT_INCREMENTAL=!e.randomize,a.ANIMATE=i.ANIMATE=n.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 n=0;n{WL(),KC(),ILe=mt(function(e,t,r,n){t.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+e.type2Str(r.type)).attr("d",`M0 ${r.height-5} v${10-r.height} q0,-5 5,-5 h${r.width-10} q5,0 5,5 v${r.height-5} H0 Z`),t.append("line").attr("class","node-line-"+n).attr("x1",0).attr("y1",r.height).attr("x2",r.width).attr("y2",r.height)},"defaultBkg"),RLe=mt(function(e,t,r){t.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+e.type2Str(r.type)).attr("height",r.height).attr("width",r.width)},"rectBkg"),MLe=mt(function(e,t,r){var n=r.width,i=r.height,a=.15*n,s=.25*n,o=.35*n,l=.2*n;t.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+e.type2Str(r.type)).attr("d",`M0 0 a${a},${a} 0 0,1 ${.25*n},${-1*n*.1} a${o},${o} 1 0,1 ${.4*n},${-1*n*.1} a${s},${s} 1 0,1 ${.35*n},${.2*+n} @@ -2188,7 +2188,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho a${a},${a} 1 0,1 ${-1*n*.1},${-1*i*.35} a${l},${l} 1 0,1 ${.1*n},${-1*i*.65} - H0 V0 Z`)},"cloudBkg"),y9t=me(function(t,e,r){var n=r.width,i=r.height,a=.15*n;e.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("d",`M0 0 a${a},${a} 1 0,0 ${.25*n},${-1*i*.1} + H0 V0 Z`)},"cloudBkg"),DLe=mt(function(e,t,r){var n=r.width,i=r.height,a=.15*n;t.append("path").attr("id","node-"+r.id).attr("class","node-bkg node-"+e.type2Str(r.type)).attr("d",`M0 0 a${a},${a} 1 0,0 ${.25*n},${-1*i*.1} a${a},${a} 1 0,0 ${.25*n},0 a${a},${a} 1 0,0 ${.25*n},0 a${a},${a} 1 0,0 ${.25*n},${.1*+i} @@ -2206,27 +2206,27 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho a${.8*a},${.8*a} 1 0,0 0,${-1*i*.34} a${a},${a} 1 0,0 ${.1*n},${-1*i*.33} - H0 V0 Z`)},"bangBkg"),v9t=me(function(t,e,r){e.append("circle").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("r",r.width/2)},"circleBkg"),me(p9t,"insertPolygonShape"),x9t=me(function(t,e,r){var n=r.height,i=n/4,a=r.width-r.padding+2*i;p9t(e,a,n,[{x:i,y:0},{x:a-i,y:0},{x:a,y:-n/2},{x:a-i,y:-n},{x:i,y:-n},{x:0,y:-n/2}],r)},"hexagonBkg"),b9t=me(function(t,e,r){e.append("rect").attr("id","node-"+r.id).attr("class","node-bkg node-"+t.type2Str(r.type)).attr("height",r.height).attr("rx",r.padding).attr("ry",r.padding).attr("width",r.width)},"roundedRectBkg"),w9t=me(async function(t,e,r,n,i){var a=i.htmlLabels,s=n%11,n=e.append("g");let o="section-"+(r.section=s);s<0&&(o+=" section-root"),n.attr("class",(r.class?r.class+" ":"")+"mindmap-node "+o);var l=n.append("g"),e=n.append("g"),c=r.descr.replace(/()/g,` -`),c=(await W9(e,c,{useHtmlLabels:a,width:r.width,classes:"mindmap-node-label"},i),a||e.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),e.node().getBBox()),[i]=YE(i.fontSize);switch(r.height=c.height+1.1*i*.5+r.padding,r.width=c.width+2*r.padding,r.icon?r.type===t.nodeType.CIRCLE?(r.height+=50,r.width+=50,n.append("foreignObject").attr("height","50px").attr("width",r.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+r.icon),e.attr("transform","translate("+r.width/2+", "+(r.height/2-1.5*r.padding)+")")):(r.width+=50,i=r.height,r.height=Math.max(i,60),i=Math.abs(r.height-i),n.append("foreignObject").attr("width","60px").attr("height",r.height).attr("style","text-align: center;margin-top:"+i/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+r.icon),e.attr("transform","translate("+(25+r.width/2)+", "+(i/2+r.padding/2)+")")):a?(i=(r.width-c.width)/2,a=(r.height-c.height)/2,e.attr("transform","translate("+i+", "+a+")")):(c=r.width/2,e.attr("transform","translate("+c+", "+r.padding/2+")")),r.type){case t.nodeType.DEFAULT:g9t(t,l,r,s);break;case t.nodeType.ROUNDED_RECT:b9t(t,l,r,s);break;case t.nodeType.RECT:f9t(t,l,r,s);break;case t.nodeType.CIRCLE:l.attr("transform","translate("+r.width/2+", "+ +r.height/2+")"),v9t(t,l,r,s);break;case t.nodeType.CLOUD:m9t(t,l,r,s);break;case t.nodeType.BANG:y9t(t,l,r,s);break;case t.nodeType.HEXAGON:x9t(t,l,r,s)}return t.setElementForId(r.id,n),r.height},"drawNode"),k9t=me(function(t,e){var t=t.getElementById(e.id),r=e.x||0;t.attr("transform","translate("+r+","+(e.y||0)+")")},"positionNode")});async function E9t(r,n,t,i,a){await w9t(r,n,t,i,a),t.children&&await Promise.all(t.children.map((t,e)=>E9t(r,n,t,i<0?e:i,a)))}function C9t(n,t){t.edges().map((t,e)=>{var r=t.data();t[0]._private.bodyBounds&&(t=t[0]._private.rscratch,M.trace("Edge: ",e,r),n.insert("path").attr("d",`M ${t.startX},${t.startY} L ${t.midX},${t.midY} L${t.endX},${t.endY} `).attr("class","edge section-edge-"+r.section+" edge-depth-"+r.depth))})}function _9t(e,r,n,i){r.add({group:"nodes",data:{id:e.id.toString(),labelText:e.descr,height:e.height,width:e.width,level:i,nodeId:e.id,padding:e.padding,type:e.type},position:{x:e.x,y:e.y}}),e.children&&e.children.forEach(t=>{_9t(t,r,n,i+1),r.add({group:"edges",data:{id:e.id+"_"+t.id,source:e.id,target:t.id,depth:i,section:t.section}})})}function S9t(n,i){return new Promise(e=>{let t=H("body").append("div").attr("id","cy").attr("style","display:none"),r=l9t({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});t.remove(),_9t(n,r,i,0),r.nodes().forEach(function(e){e.layoutDimensions=()=>{var t=e.data();return{w:t.width,h:t.height}}}),r.layout({name:"cose-bilkent",quality:"proof",styleEnabled:!1,animate:!1}).run(),r.ready(t=>{M.info("Ready",t),e(r)})})}function A9t(i,t){t.nodes().map((t,e)=>{var r=t.data(),n=(r.x=t.position().x,r.y=t.position().y,k9t(i,r),i.getElementById(r.nodeId));M.info("id:",e,"Position: (",t.position().x,", ",t.position().y,")",r),n.attr("transform",`translate(${t.position().x-r.width/2}, ${t.position().y-r.height/2})`),n.attr("attr",`apa-${e})`)})}var L9t,N9t,I9t,R9t,M9t,D9t=t(()=>{c9t(),L9t=tt(d9t(),1),Q3(),mu(),e(),emt(),eh(),T9t(),An(),l9t.use(L9t.default),me(E9t,"drawNodes"),me(C9t,"drawEdges"),me(_9t,"addNodes"),me(S9t,"layoutMindmap"),me(A9t,"positionNodes"),L9t=me(async(t,e,r,n)=>{var i,a,s;M.debug(`Rendering mindmap diagram -`+t),(n=(t=n.db).getMindmap())&&((i=D()).htmlLabels=!1,(a=(e=Vft(e)).append("g")).attr("class","mindmap-edges"),(s=e.append("g")).attr("class","mindmap-nodes"),await E9t(t,s,n,-1,i),C9t(a,s=await S9t(n,i)),A9t(t,s),Xc(void 0,e,i.mindmap?.padding??yr.mindmap.padding,i.mindmap?.useMaxWidth??yr.mindmap.useMaxWidth))},"draw"),N9t={draw:L9t}}),O9t=t(()=>{vn(),I9t=me(e=>{let r="";for(let t=0;t)/g,` +`),c=(await jL(t,c,{useHtmlLabels:a,width:r.width,classes:"mindmap-node-label"},i),a||t.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),t.node().getBBox()),[i]=WC(i.fontSize);switch(r.height=c.height+1.1*i*.5+r.padding,r.width=c.width+2*r.padding,r.icon?r.type===e.nodeType.CIRCLE?(r.height+=50,r.width+=50,n.append("foreignObject").attr("height","50px").attr("width",r.width).attr("style","text-align: center;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+r.icon),t.attr("transform","translate("+r.width/2+", "+(r.height/2-1.5*r.padding)+")")):(r.width+=50,i=r.height,r.height=Math.max(i,60),i=Math.abs(r.height-i),n.append("foreignObject").attr("width","60px").attr("height",r.height).attr("style","text-align: center;margin-top:"+i/2+"px;").append("div").attr("class","icon-container").append("i").attr("class","node-icon-"+s+" "+r.icon),t.attr("transform","translate("+(25+r.width/2)+", "+(i/2+r.padding/2)+")")):a?(i=(r.width-c.width)/2,a=(r.height-c.height)/2,t.attr("transform","translate("+i+", "+a+")")):(c=r.width/2,t.attr("transform","translate("+c+", "+r.padding/2+")")),r.type){case e.nodeType.DEFAULT:ILe(e,l,r,s);break;case e.nodeType.ROUNDED_RECT:BLe(e,l,r,s);break;case e.nodeType.RECT:RLe(e,l,r,s);break;case e.nodeType.CIRCLE:l.attr("transform","translate("+r.width/2+", "+ +r.height/2+")"),OLe(e,l,r,s);break;case e.nodeType.CLOUD:MLe(e,l,r,s);break;case e.nodeType.BANG:DLe(e,l,r,s);break;case e.nodeType.HEXAGON:PLe(e,l,r,s)}return e.setElementForId(r.id,n),r.height},"drawNode"),FLe=mt(function(e,t){var e=e.getElementById(t.id),r=t.x||0;e.attr("transform","translate("+r+","+(t.y||0)+")")},"positionNode")});async function GLe(r,n,e,i,a){await $Le(r,n,e,i,a),e.children&&await Promise.all(e.children.map((e,t)=>GLe(r,n,e,i<0?t:i,a)))}function ULe(n,e){e.edges().map((e,t)=>{var r=e.data();e[0]._private.bodyBounds&&(e=e[0]._private.rscratch,M.trace("Edge: ",t,r),n.insert("path").attr("d",`M ${e.startX},${e.startY} L ${e.midX},${e.midY} L${e.endX},${e.endY} `).attr("class","edge section-edge-"+r.section+" edge-depth-"+r.depth))})}function qLe(t,r,n,i){r.add({group:"nodes",data:{id:t.id.toString(),labelText:t.descr,height:t.height,width:t.width,level:i,nodeId:t.id,padding:t.padding,type:t.type},position:{x:t.x,y:t.y}}),t.children&&t.children.forEach(e=>{qLe(e,r,n,i+1),r.add({group:"edges",data:{id:t.id+"_"+e.id,source:t.id,target:e.id,depth:i,section:e.section}})})}function jLe(n,i){return new Promise(t=>{let e=H("body").append("div").attr("id","cy").attr("style","display:none"),r=CLe({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"bezier"}}]});e.remove(),qLe(n,r,i,0),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=>{M.info("Ready",e),t(r)})})}function WLe(i,e){e.nodes().map((e,t)=>{var r=e.data(),n=(r.x=e.position().x,r.y=e.position().y,FLe(i,r),i.getElementById(r.nodeId));M.info("id:",t,"Position: (",e.position().x,", ",e.position().y,")",r),n.attr("transform",`translate(${e.position().x-r.width/2}, ${e.position().y-r.height/2})`),n.attr("attr",`apa-${t})`)})}var YLe,HLe,VLe,XLe,KLe,ZLe=e(()=>{SLe(),YLe=ee(LLe(),1),Zw(),mu(),t(),yye(),th(),zLe(),An(),CLe.use(YLe.default),mt(GLe,"drawNodes"),mt(ULe,"drawEdges"),mt(qLe,"addNodes"),mt(jLe,"layoutMindmap"),mt(WLe,"positionNodes"),YLe=mt(async(e,t,r,n)=>{var i,a,s;M.debug(`Rendering mindmap diagram +`+e),(n=(e=n.db).getMindmap())&&((i=D()).htmlLabels=!1,(a=(t=hye(t)).append("g")).attr("class","mindmap-edges"),(s=t.append("g")).attr("class","mindmap-nodes"),await GLe(e,s,n,-1,i),ULe(a,s=await jLe(n,i)),WLe(e,s),Xc(void 0,t,i.mindmap?.padding??yr.mindmap.padding,i.mindmap?.useMaxWidth??yr.mindmap.useMaxWidth))},"draw"),HLe={draw:YLe}}),QLe=e(()=>{vn(),VLe=mt(t=>{let r="";for(let e=0;e` + `}return r},"genSections"),XLe=mt(e=>` .edge { stroke-width: 3; } - ${I9t(t)} + ${VLe(e)} .section-root rect, .section-root path, .section-root circle, .section-root polygon { - fill: ${t.git0}; + fill: ${e.git0}; } .section-root text { - fill: ${t.gitBranchLabel0}; + fill: ${e.gitBranchLabel0}; } .icon-container { height:100%; @@ -2263,37 +2263,37 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho dominant-baseline: middle; text-align: center; } -`,"getStyles"),M9t=R9t}),P9t={};oPt(P9t,{diagram:()=>B9t});var B9t,F9t,$9t,z9t,G9t,U9t,q9t,j9t,W9t,Y9t,H9t,V9t,X9t,K9t,Z9t,Q9t,J9t,tLt,eLt,rLt,nLt,iLt,aLt,sLt,oLt,lLt=t(()=>{E3t(),C3t(),D9t(),O9t(),B9t={db:k3t,renderer:N9t,parser:o3t,styles:M9t}}),cLt=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,4],n=[1,13],i=[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],x=[1,6,7,11,13,16,17,20,23],b=[1,38],r={trace:me(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:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 6:case 7:return n;case 8:n.getLogger().trace("Stop NL ");break;case 9:n.getLogger().trace("Stop EOF ");break;case 11:n.getLogger().trace("Stop NL2 ");break;case 12:n.getLogger().trace("Stop EOF2 ");break;case 15:n.getLogger().info("Node: ",a[o-1].id),n.addNode(a[o-2].length,a[o-1].id,a[o-1].descr,a[o-1].type,a[o]);break;case 16:n.getLogger().info("Node: ",a[o].id),n.addNode(a[o-1].length,a[o].id,a[o].descr,a[o].type);break;case 17:n.getLogger().trace("Icon: ",a[o]),n.decorateNode({icon:a[o]});break;case 18:case 23:n.decorateNode({class:a[o]});break;case 19:n.getLogger().trace("SPACELIST");break;case 20:n.getLogger().trace("Node: ",a[o-1].id),n.addNode(0,a[o-1].id,a[o-1].descr,a[o-1].type,a[o]);break;case 21:n.getLogger().trace("Node: ",a[o].id),n.addNode(0,a[o].id,a[o].descr,a[o].type);break;case 22:n.decorateNode({icon:a[o]});break;case 27:n.getLogger().trace("node found ..",a[o-2]),this.$={id:a[o-1],descr:a[o-1],type:n.getType(a[o-2],a[o])};break;case 28:this.$={id:a[o],descr:a[o],type:0};break;case 29:n.getLogger().trace("node found ..",a[o-3]),this.$={id:a[o-3],descr:a[o-1],type:n.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:n,7:[1,10],9:9,12:11,13:i,14:14,16:a,17:s,18:17,19:18,20:o,23:l},e(c,[2,3]),{1:[2,2]},e(c,[2,4]),e(c,[2,5]),{1:[2,6],6:n,12:21,13:i,14:14,16:a,17:s,18:17,19:18,20:o,23:l},{6:n,9:22,12:11,13:i,14:14,16:a,17:s,18:17,19:18,20:o,23:l},{6:h,7:u,10:23,11:d},e(p,[2,24],{18:17,19:18,14:27,16:[1,28],17:[1,29],20:o,23:l}),e(p,[2,19]),e(p,[2,21],{15:30,24:g}),e(p,[2,22]),e(p,[2,23]),e(f,[2,25]),e(f,[2,26]),e(f,[2,28],{20:[1,32]}),{21:[1,33]},{6:h,7:u,10:34,11:d},{1:[2,7],6:n,12:21,13:i,14:14,16:a,17:s,18:17,19:18,20:o,23:l},e(m,[2,14],{7:y,11:v}),e(x,[2,8]),e(x,[2,9]),e(x,[2,10]),e(p,[2,16],{15:37,24:g}),e(p,[2,17]),e(p,[2,18]),e(p,[2,20],{24:b}),e(f,[2,31]),{21:[1,39]},{22:[1,40]},e(m,[2,13],{7:y,11:v}),e(x,[2,11]),e(x,[2,12]),e(p,[2,15],{24:b}),e(f,[2,30]),{22:[1,41]},e(f,[2,27]),e(f,[2,29])],defaultActions:{2:[2,1],6:[2,2]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"eNe});var eNe,tNe,rNe,nNe,iNe,aNe,sNe,oNe,lNe,cNe,hNe,uNe,dNe,pNe,gNe,fNe,mNe,yNe,vNe,xNe,bNe,wNe,kNe,TNe,ENe,CNe=e(()=>{zwe(),Gwe(),ZLe(),QLe(),eNe={db:$we,renderer:HLe,parser:Twe,styles:KLe}}),SNe=e(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[1,4],n=[1,13],i=[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],x=[1,6,7,11,13,16,17,20,23],b=[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,n,i,a,s){var o=a.length-1;switch(i){case 6:case 7:return n;case 8:n.getLogger().trace("Stop NL ");break;case 9:n.getLogger().trace("Stop EOF ");break;case 11:n.getLogger().trace("Stop NL2 ");break;case 12:n.getLogger().trace("Stop EOF2 ");break;case 15:n.getLogger().info("Node: ",a[o-1].id),n.addNode(a[o-2].length,a[o-1].id,a[o-1].descr,a[o-1].type,a[o]);break;case 16:n.getLogger().info("Node: ",a[o].id),n.addNode(a[o-1].length,a[o].id,a[o].descr,a[o].type);break;case 17:n.getLogger().trace("Icon: ",a[o]),n.decorateNode({icon:a[o]});break;case 18:case 23:n.decorateNode({class:a[o]});break;case 19:n.getLogger().trace("SPACELIST");break;case 20:n.getLogger().trace("Node: ",a[o-1].id),n.addNode(0,a[o-1].id,a[o-1].descr,a[o-1].type,a[o]);break;case 21:n.getLogger().trace("Node: ",a[o].id),n.addNode(0,a[o].id,a[o].descr,a[o].type);break;case 22:n.decorateNode({icon:a[o]});break;case 27:n.getLogger().trace("node found ..",a[o-2]),this.$={id:a[o-1],descr:a[o-1],type:n.getType(a[o-2],a[o])};break;case 28:this.$={id:a[o],descr:a[o],type:0};break;case 29:n.getLogger().trace("node found ..",a[o-3]),this.$={id:a[o-3],descr:a[o-1],type:n.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:n,7:[1,10],9:9,12:11,13:i,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:n,12:21,13:i,14:14,16:a,17:s,18:17,19:18,20:o,23:l},{6:n,9:22,12:11,13:i,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:n,12:21,13:i,14:14,16:a,17:s,18:17,19:18,20:o,23:l},t(m,[2,14],{7:y,11:v}),t(x,[2,8]),t(x,[2,9]),t(x,[2,10]),t(p,[2,16],{15:37,24:g}),t(p,[2,17]),t(p,[2,18]),t(p,[2,20],{24:b}),t(f,[2,31]),{21:[1,39]},{22:[1,40]},t(m,[2,13],{7:y,11:v}),t(x,[2,11]),t(x,[2,12]),t(p,[2,15],{24:b}),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,n=[0],i=[],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"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0"),24;case 4:return 24;case 5:this.popState();break;case 6:return t.getLogger().trace("Found comment",e.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:t.getLogger().trace("Begin icon"),this.begin("ICON");break;case 12:return t.getLogger().trace("SPACELINE"),6;case 13:return 7;case 14:return 16;case 15:t.getLogger().trace("end icon"),this.popState();break;case 16:return t.getLogger().trace("Exploding node"),this.begin("NODE"),20;case 17:return t.getLogger().trace("Cloud"),this.begin("NODE"),20;case 18:return t.getLogger().trace("Explosion Bang"),this.begin("NODE"),20;case 19:return t.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:t.getLogger().trace("Starting NSTR"),this.begin("NSTR");break;case 31:return t.getLogger().trace("description:",e.yytext),"NODE_DESCR";case 32:this.popState();break;case 33:return this.popState(),t.getLogger().trace("node end ))"),"NODE_DEND";case 34:return this.popState(),t.getLogger().trace("node end )"),"NODE_DEND";case 35:return this.popState(),t.getLogger().trace("node end ...",e.yytext),"NODE_DEND";case 36:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 37:case 38:return this.popState(),t.getLogger().trace("node end (-"),"NODE_DEND";case 39:case 40:return this.popState(),t.getLogger().trace("node end (("),"NODE_DEND";case 41:case 42:return t.getLogger().trace("Long description:",e.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,me(t,"Parser"),(F9t=new((t.prototype=r).Parser=t)).parser=F9t,$9t=F9t}),hLt=t(()=>{mu(),th(),e(),An(),RA(),z9t=[],G9t=[],U9t=0,q9t={},j9t=me(()=>{z9t=[],G9t=[],U9t=0,q9t={}},"clear"),W9t=me(t=>{if(0===z9t.length)return null;let e=z9t[0].level,r=null;for(let t=z9t.length-1;0<=t;t--)if(z9t[t].level===e&&(r=r||z9t[t]),z9t[t].levelt.parentId===e.id)){var s={id:i.id,parentId:e.id,label:Sc(i.label??"",n),isGroup:!1,ticket:i?.ticket,priority:i?.priority,assigned:i?.assigned,icon:i?.icon,shape:"kanbanItem",level:i.level,rx:5,ry:5,cssStyles:["text-align: left"]};t.push(s)}}return{nodes:t,edges:[],other:{},config:D()}},"getData"),V9t=me((t,e,r,n,i)=>{let a=D(),s=a.mindmap?.padding??yr.mindmap.padding;switch(n){case X9t.ROUNDED_RECT:case X9t.RECT:case X9t.HEXAGON:s*=2}if(n={id:Sc(e,a)||"kbn"+U9t++,level:t,label:Sc(r,a),width:a.mindmap?.maxNodeWidth??yr.mindmap.maxNodeWidth,padding:s,isGroup:!1},void 0!==i){if(i=i.includes(` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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"),(tNe=new((e.prototype=r).Parser=e)).parser=tNe,rNe=tNe}),_Ne=e(()=>{mu(),eh(),t(),An(),I9(),nNe=[],iNe=[],aNe=0,sNe={},oNe=mt(()=>{nNe=[],iNe=[],aNe=0,sNe={}},"clear"),lNe=mt(e=>{if(0===nNe.length)return null;let t=nNe[0].level,r=null;for(let e=nNe.length-1;0<=e;e--)if(nNe[e].level===t&&(r=r||nNe[e]),nNe[e].levele.parentId===t.id)){var s={id:i.id,parentId:t.id,label:_c(i.label??"",n),isGroup:!1,ticket:i?.ticket,priority:i?.priority,assigned:i?.assigned,icon:i?.icon,shape:"kanbanItem",level:i.level,rx:5,ry:5,cssStyles:["text-align: left"]};e.push(s)}}return{nodes:e,edges:[],other:{},config:D()}},"getData"),uNe=mt((e,t,r,n,i)=>{let a=D(),s=a.mindmap?.padding??yr.mindmap.padding;switch(n){case dNe.ROUNDED_RECT:case dNe.RECT:case dNe.HEXAGON:s*=2}if(n={id:_c(t,a)||"kbn"+aNe++,level:e,label:_c(r,a),width:a.mindmap?.maxNodeWidth??yr.mindmap.maxNodeWidth,padding:s,isGroup:!1},void 0!==i){if(i=i.includes(` `)?i+` `:`{ `+i+` -}`,(e=IA(i,{schema:NA})).shape&&(e.shape!==e.shape.toLowerCase()||e.shape.includes("_")))throw new Error(`No such shape: ${e.shape}. Shape names should be lowercase.`);e?.shape&&"kanbanItem"===e.shape&&(n.shape=e?.shape),e?.label&&(n.label=e?.label),e?.icon&&(n.icon=e?.icon.toString()),e?.assigned&&(n.assigned=e?.assigned.toString()),e?.ticket&&(n.ticket=e?.ticket.toString()),e?.priority&&(n.priority=e?.priority)}(r=W9t(t))?n.parentId=r.id||"kbn"+U9t++:G9t.push(n),z9t.push(n)},"addNode"),X9t={DEFAULT:0,NO_BORDER:0,ROUNDED_RECT:1,RECT:2,CIRCLE:3,CLOUD:4,BANG:5,HEXAGON:6},K9t=me((t,e)=>{switch(M.debug("In get type",t,e),t){case"[":return X9t.RECT;case"(":return")"===e?X9t.ROUNDED_RECT:X9t.CLOUD;case"((":return X9t.CIRCLE;case")":return X9t.CLOUD;case"))":return X9t.BANG;case"{{":return X9t.HEXAGON;default:return X9t.DEFAULT}},"getType"),Z9t=me((t,e)=>{q9t[t]=e},"setElementForId"),Q9t=me(t=>{var e,r;t&&(e=D(),r=z9t[z9t.length-1],t.icon&&(r.icon=Sc(t.icon,e)),t.class)&&(r.cssClasses=Sc(t.class,e))},"decorateNode"),J9t=me(t=>{switch(t){case X9t.DEFAULT:return"no-border";case X9t.RECT:return"rect";case X9t.ROUNDED_RECT:return"rounded-rect";case X9t.CIRCLE:return"circle";case X9t.CLOUD:return"cloud";case X9t.BANG:return"bang";case X9t.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),tLt=me(()=>M,"getLogger"),eLt=me(t=>q9t[t],"getElementById"),rLt={clear:j9t,addNode:V9t,getSections:Y9t,getData:H9t,nodeType:X9t,getType:K9t,setElementForId:Z9t,decorateNode:Q9t,type2Str:J9t,getLogger:tLt,getElementById:eLt}}),uLt=t(()=>{mu(),e(),emt(),eh(),An(),YM(),UD(),nLt=me(async(t,e,r,n)=>{M.debug(`Rendering kanban diagram -`+t);var i,a=n.db.getData(),s=D(),o=(s.htmlLabels=!1,(t=Vft(e)).append("g")),l=(o.attr("class","sections"),t.append("g"));l.attr("class","items");let c=a.nodes.filter(t=>t.isGroup),h=0,u=[],d=25;for(i of c){var p=s?.kanban?.sectionWidth||200,p=(h+=1,i.x=p*h+10*(h-1)/2,i.width=p,i.y=0,i.height=3*p,i.rx=5,i.ry=5,i.cssClasses=i.cssClasses+" section-"+h,await zM(o,i));d=Math.max(d,p?.labelBBox?.height),u.push(p)}let g=0;for(let i of c){var f,m=u[g];g+=1;let t=s?.kanban?.sectionWidth||200,e=3*-t/2+d,r=e,n=a.nodes.filter(t=>t.parentId===i.id);for(f of n){if(f.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");f.x=i.x,f.width=t-15;var y=(await PD(l,f,{config:s})).node().getBBox();f.y=r+y.height/2,await zD(f),r=f.y+y.height/2+5}var m=m.cluster.select("rect"),v=Math.max(r-e+30,50)+(d-25);m.attr("height",v)}Xc(void 0,t,s.mindmap?.padding??yr.kanban.padding,s.mindmap?.useMaxWidth??yr.kanban.useMaxWidth)},"draw"),iLt={draw:nLt}}),dLt=t(()=>{vn(),HX(),aLt=me(r=>{let e="";for(let t=0;t(r.darkMode?Ve:a)(t,e),"adjuster");for(let t=0;t{switch(M.debug("In get type",e,t),e){case"[":return dNe.RECT;case"(":return")"===t?dNe.ROUNDED_RECT:dNe.CLOUD;case"((":return dNe.CIRCLE;case")":return dNe.CLOUD;case"))":return dNe.BANG;case"{{":return dNe.HEXAGON;default:return dNe.DEFAULT}},"getType"),gNe=mt((e,t)=>{sNe[e]=t},"setElementForId"),fNe=mt(e=>{var t,r;e&&(t=D(),r=nNe[nNe.length-1],e.icon&&(r.icon=_c(e.icon,t)),e.class)&&(r.cssClasses=_c(e.class,t))},"decorateNode"),mNe=mt(e=>{switch(e){case dNe.DEFAULT:return"no-border";case dNe.RECT:return"rect";case dNe.ROUNDED_RECT:return"rounded-rect";case dNe.CIRCLE:return"circle";case dNe.CLOUD:return"cloud";case dNe.BANG:return"bang";case dNe.HEXAGON:return"hexgon";default:return"no-border"}},"type2Str"),yNe=mt(()=>M,"getLogger"),vNe=mt(e=>sNe[e],"getElementById"),xNe={clear:oNe,addNode:uNe,getSections:cNe,getData:hNe,nodeType:dNe,getType:pNe,setElementForId:gNe,decorateNode:fNe,type2Str:mNe,getLogger:yNe,getElementById:vNe}}),ANe=e(()=>{mu(),t(),yye(),th(),An(),jD(),zO(),bNe=mt(async(e,t,r,n)=>{M.debug(`Rendering kanban diagram +`+e);var i,a=n.db.getData(),s=D(),o=(s.htmlLabels=!1,(e=hye(t)).append("g")),l=(o.attr("class","sections"),e.append("g"));l.attr("class","items");let c=a.nodes.filter(e=>e.isGroup),h=0,u=[],d=25;for(i of c){var p=s?.kanban?.sectionWidth||200,p=(h+=1,i.x=p*h+10*(h-1)/2,i.width=p,i.y=0,i.height=3*p,i.rx=5,i.ry=5,i.cssClasses=i.cssClasses+" section-"+h,await $D(o,i));d=Math.max(d,p?.labelBBox?.height),u.push(p)}let g=0;for(let i of c){var f,m=u[g];g+=1;let e=s?.kanban?.sectionWidth||200,t=3*-e/2+d,r=t,n=a.nodes.filter(e=>e.parentId===i.id);for(f of n){if(f.isGroup)throw new Error("Groups within groups are not allowed in Kanban diagrams");f.x=i.x,f.width=e-15;var y=(await DO(l,f,{config:s})).node().getBBox();f.y=r+y.height/2,await $O(f),r=f.y+y.height/2+5}var m=m.cluster.select("rect"),v=Math.max(r-t+30,50)+(d-25);m.attr("height",v)}Xc(void 0,e,s.mindmap?.padding??yr.kanban.padding,s.mindmap?.useMaxWidth??yr.kanban.useMaxWidth)},"draw"),wNe={draw:bNe}}),LNe=e(()=>{vn(),WK(),kNe=mt(r=>{let t="";for(let e=0;e(r.darkMode?Vt:a)(e,t),"adjuster");for(let e=0;e` + `}return t},"genSections"),TNe=mt(e=>` .edge { stroke-width: 3; } - ${aLt(t)} + ${kNe(e)} .section-root rect, .section-root path, .section-root circle, .section-root polygon { - fill: ${t.git0}; + fill: ${e.git0}; } .section-root text { - fill: ${t.gitBranchLabel0}; + fill: ${e.gitBranchLabel0}; } .icon-container { height:100%; @@ -2340,8 +2340,8 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l fill: none; } .cluster-label, .label { - color: ${t.textColor}; - fill: ${t.textColor}; + color: ${e.textColor}; + fill: ${e.textColor}; } .kanban-label { dy: 1em; @@ -2350,102 +2350,102 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l dominant-baseline: middle; text-align: center; } - ${BX()} -`,"getStyles"),oLt=sLt}),pLt={};oPt(pLt,{diagram:()=>gLt});var gLt,fLt,mLt,yLt,vLt,xLt,bLt,wLt,kLt,TLt,ELt,CLt,_Lt,SLt,ALt,LLt=t(()=>{cLt(),hLt(),uLt(),dLt(),gLt={db:rLt,renderer:iLt,parser:$9t,styles:oLt}}),NLt=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,9],n=[1,10],i=[1,5,10,12],i={trace:me(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:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 7:var l=n.findOrCreateNode(a[o-4].trim().replaceAll('""','"')),c=n.findOrCreateNode(a[o-2].trim().replaceAll('""','"')),h=parseFloat(a[o].trim());n.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:n},{1:[2,6],7:11,10:[1,12]},e(n,[2,4],{9:13,5:[1,14]}),{12:[1,15]},e(i,[2,8]),e(i,[2,9]),{19:[1,16]},e(i,[2,11]),{1:[2,1]},{1:[2,5]},e(n,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:r,20:n},{15:18,16:7,17:8,18:r,20:n},{18:[1,19]},e(n,[2,3]),{12:[1,20]},e(i,[2,10]),{15:21,16:7,17:8,18:r,20:n},e([1,5,10],[2,7])],defaultActions:{11:[2,1],12:[2,5]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"INe});var INe,RNe,MNe,DNe,ONe,PNe,BNe,$Ne,FNe,zNe,GNe,UNe,qNe,jNe,WNe,YNe=e(()=>{SNe(),_Ne(),ANe(),LNe(),INe={db:xNe,renderer:wNe,parser:rNe,styles:ENe}}),HNe=e(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[1,9],n=[1,10],i=[1,5,10,12],i={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,n,i,a,s){var o=a.length-1;switch(i){case 7:var l=n.findOrCreateNode(a[o-4].trim().replaceAll('""','"')),c=n.findOrCreateNode(a[o-2].trim().replaceAll('""','"')),h=parseFloat(a[o].trim());n.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:n},{1:[2,6],7:11,10:[1,12]},t(n,[2,4],{9:13,5:[1,14]}),{12:[1,15]},t(i,[2,8]),t(i,[2,9]),{19:[1,16]},t(i,[2,11]),{1:[2,1]},{1:[2,5]},t(n,[2,2]),{6:17,8:5,15:6,16:7,17:8,18:r,20:n},{15:18,16:7,17:8,18:r,20:n},{18:[1,19]},t(n,[2,3]),{12:[1,20]},t(i,[2,10]),{15:21,16:7,17:8,18:r,20:n},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,n=[0],i=[],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"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0{mu(),th(),fu(),yLt=[],vLt=[],xLt=new Map,bLt=me(()=>{yLt=[],vLt=[],xLt=new Map,lh()},"clear"),wLt=class{constructor(t,e,r=0){this.source=t,this.target=e,this.value=r}static{me(this,"SankeyLink")}},kLt=me((t,e,r)=>{yLt.push(new wLt(t,e,r))},"addLink"),TLt=class{constructor(t){this.ID=t}static{me(this,"SankeyNode")}},ELt=me(t=>{t=L.sanitizeText(t,D());let e=xLt.get(t);return void 0===e&&(e=new TLt(t),xLt.set(t,e),vLt.push(e)),e},"findOrCreateNode"),CLt=me(()=>vLt,"getNodes"),_Lt=me(()=>yLt,"getLinks"),SLt=me(()=>({nodes:vLt.map(t=>({id:t.ID})),links:yLt.map(t=>({source:t.source.ID,target:t.target.ID,value:t.value}))}),"getGraph"),ALt={nodesMap:xLt,getConfig:me(()=>D().sankey,"getConfig"),getNodes:CLt,getLinks:_Lt,getGraph:SLt,addLink:kLt,findOrCreateNode:ELt,getAccTitle:hh,setAccTitle:ch,getAccDescription:dh,setAccDescription:uh,getDiagramTitle:gh,setDiagramTitle:ph,clear:bLt}});function RLt(e,r){let n;if(void 0===r)for(var t of e)null!=t&&(n{me(RLt,"max")});function DLt(e,r){let n;if(void 0===r)for(var t of e)null!=t&&(n>t||void 0===n&&t<=t)&&(n=t);else{let t=-1;for(var i of e)null!=(i=r(i,++t,e))&&(n>i||void 0===n&&i<=i)&&(n=i)}return n}var OLt=t(()=>{me(DLt,"min")});function PLt(e,r){let n=0;if(void 0===r)for(var t of e)(t=+t)&&(n+=t);else{let t=-1;for(var i of e)(i=+r(i,++t,e))&&(n+=i)}return n}var BLt=t(()=>{me(PLt,"sum")}),FLt=t(()=>{MLt(),OLt(),BLt()});function $Lt(t){return t.target.depth}function zLt(t){return t.depth}function GLt(t,e){return e-1-t.height}function ULt(t,e){return t.sourceLinks.length?t.depth:e-1}function qLt(t){return t.targetLinks.length?t.depth:t.sourceLinks.length?DLt(t.sourceLinks,$Lt)-1:0}var jLt=t(()=>{FLt(),me($Lt,"targetDepth"),me(zLt,"left"),me(GLt,"right"),me(ULt,"justify"),me(qLt,"center")});function WLt(t){return function(){return t}}var YLt=t(()=>{me(WLt,"constant")});function HLt(t,e){return XLt(t.source,e.source)||t.index-e.index}function VLt(t,e){return XLt(t.target,e.target)||t.index-e.index}function XLt(t,e){return t.y0-e.y0}function KLt(t){return t.value}function ZLt(t){return t.index}function QLt(t){return t.nodes}function JLt(t){return t.links}function tNt(t,e){if(t=t.get(e))return t;throw new Error("missing: "+e)}function eNt({nodes:t}){for(var r of t){let t=r.y0,e=t;for(var n of r.sourceLinks)n.y0=t+n.width/2,t+=n.width;for(var i of r.targetLinks)i.y1=e+i.width/2,e+=i.width}}function rNt(){let o=0,l=0,c=1,h=1,u=24,i=8,d,p=ZLt,g=ULt,f,m,e=QLt,r=JLt,a=6;function n(){var t={nodes:e.apply(null,arguments),links:r.apply(null,arguments)};return s(t),y(t),v(t),x(t),k(t),eNt(t),t}function s({nodes:r,links:t}){for(var[e,n]of r.entries())n.index=e,n.sourceLinks=[],n.targetLinks=[];var i,a,s=new Map(r.map((t,e)=>[p(t,e,r),t]));for([i,a]of t.entries()){a.index=i;let{source:t,target:e}=a;"object"!=typeof t&&(t=a.source=tNt(s,t)),"object"!=typeof e&&(e=a.target=tNt(s,e)),t.sourceLinks.push(a),e.targetLinks.push(a)}if(null!=m)for(var{sourceLinks:o,targetLinks:l}of r)o.sort(m),l.sort(m)}function y({nodes:t}){for(var e of t)e.value=void 0===e.fixedValue?Math.max(PLt(e.sourceLinks,KLt),PLt(e.targetLinks,KLt)):e.fixedValue}function v({nodes:t}){let e=t.length,r=new Set(t),n=new Set,i=0;for(;r.size;){for(var a of r){a.depth=i;for(var{target:s}of a.sourceLinks)n.add(s)}if(++i>e)throw new Error("circular link");r=n,n=new Set}}function x({nodes:t}){let e=t.length,r=new Set(t),n=new Set,i=0;for(;r.size;){for(var a of r){a.height=i;for(var{source:s}of a.targetLinks)n.add(s)}if(++i>e)throw new Error("circular link");r=n,n=new Set}}function b({nodes:t}){var e,r=RLt(t,t=>t.depth)+1,n=(c-o-u)/(r-1),i=new Array(r);for(e of t){var a=Math.max(0,Math.min(r-1,Math.floor(g.call(null,e,r))));e.layer=a,e.x0=o+a*n,e.x1=e.x0+u,i[a]?i[a].push(e):i[a]=[e]}if(f)for(var s of i)s.sort(f);return i}function w(t){var r,n=DLt(t,t=>(h-l-(t.length-1)*d)/PLt(t,KLt));for(r of t){let e=l;for(var i of r){i.y0=e,i.y1=e+i.value*n,e=i.y1+d;for(var a of i.sourceLinks)a.width=a.value*n}e=(h-e+d)/(r.length+1);for(let t=0;tt.length)-1)),w(e);for(let t=0;t>1,n=t[r];S(t,n.y0-d,r-1,e),_(t,n.y1+d,1+r,e),S(t,h,t.length-1,e),_(t,l,0,e)}function _(t,e,r,n){for(;r{FLt(),jLt(),YLt(),me(HLt,"ascendingSourceBreadth"),me(VLt,"ascendingTargetBreadth"),me(XLt,"ascendingBreadth"),me(KLt,"value"),me(ZLt,"defaultId"),me(QLt,"defaultNodes"),me(JLt,"defaultLinks"),me(tNt,"find"),me(eNt,"computeLinkBreadths"),me(rNt,"Sankey")});function iNt(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function aNt(){return new iNt}var sNt,oNt,lNt,cNt,hNt=t(()=>{sNt=Math.PI,lNt=(oNt=2*sNt)-1e-6,me(iNt,"Path"),me(aNt,"path"),iNt.prototype=aNt.prototype={constructor:iNt,moveTo:me(function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},"moveTo"),closePath:me(function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},"closePath"),lineTo:me(function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},"lineTo"),quadraticCurveTo:me(function(t,e,r,n){this._+="Q"+ +t+","+ +e+","+(this._x1=+r)+","+(this._y1=+n)},"quadraticCurveTo"),bezierCurveTo:me(function(t,e,r,n,i,a){this._+="C"+ +t+","+ +e+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+a)},"bezierCurveTo"),arcTo:me(function(t,e,r,n,i){var a,s,o=this._x1,l=this._y1,c=(r=+r)-(t=+t),h=(n=+n)-(e=+e),u=o-t,d=l-e,p=u*u+d*d;if((i=+i)<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+(this._x1=t)+","+(this._y1=e):1e-6{hNt()});function dNt(t){return me(function(){return t},"constant")}var pNt=t(()=>{me(dNt,"default")});function gNt(t){return t[0]}function fNt(t){return t[1]}var mNt,yNt=t(()=>{me(gNt,"x"),me(fNt,"y")}),vNt=t(()=>{mNt=Array.prototype.slice});function xNt(t){return t.source}function bNt(t){return t.target}function wNt(i){var a=xNt,s=bNt,o=gNt,l=fNt,c=null;function e(){var t,e=mNt.call(arguments),r=a.apply(this,e),n=s.apply(this,e);if(c=c||(t=cNt()),i(c,+o.apply(this,(e[0]=r,e)),+l.apply(this,e),+o.apply(this,(e[0]=n,e)),+l.apply(this,e)),t)return c=null,t+""||null}return me(e,"link"),e.source=function(t){return arguments.length?(a=t,e):a},e.target=function(t){return arguments.length?(s=t,e):s},e.x=function(t){return arguments.length?(o="function"==typeof t?t:dNt(+t),e):o},e.y=function(t){return arguments.length?(l="function"==typeof t?t:dNt(+t),e):l},e.context=function(t){return arguments.length?(c=t??null,e):c},e}function kNt(t,e,r,n,i){t.moveTo(e,r),t.bezierCurveTo(e=(e+n)/2,r,e,i,n,i)}function TNt(){return wNt(kNt)}var ENt=t(()=>{uNt(),vNt(),pNt(),yNt(),me(xNt,"linkSource"),me(bNt,"linkTarget"),me(wNt,"link"),me(kNt,"curveHorizontal"),me(TNt,"linkHorizontal")}),CNt=t(()=>{ENt()});function _Nt(t){return[t.source.x1,t.y0]}function SNt(t){return[t.target.x0,t.y1]}function ANt(){return TNt().source(_Nt).target(SNt)}var LNt,NNt,INt,RNt,MNt,DNt,ONt,PNt=t(()=>{CNt(),me(_Nt,"horizontalSource"),me(SNt,"horizontalTarget"),me(ANt,"default")}),BNt=t(()=>{nNt(),jLt(),PNt()}),FNt=t(()=>{LNt=class e{static{me(this,"Uid")}static{this.count=0}static next(t){return new e(t+ ++e.count)}constructor(t){this.id=t,this.href="#"+t}toString(){return"url("+this.href+")"}}}),$Nt=t(()=>{mu(),Q3(),BNt(),eh(),FNt(),NNt={left:zLt,right:GLt,center:qLt,justify:ULt},INt=me(function(t,e,r,n){let{securityLevel:i,sankey:a}=D(),s=vh.sankey,o,l=("sandbox"===i&&(o=H("#i"+e)),H("sandbox"===i?o.nodes()[0].contentDocument.body:"body")),c="sandbox"===i?l.select(`[id="${e}"]`):H(`[id="${e}"]`),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=n.db.getGraph(),v=NNt[p],x=(rNt().nodeId(t=>t.id).nodeWidth(10).nodePadding(10+(m?15:0)).nodeAlign(v).extent([[0,0],[h,u]])(y),uv(u4));c.append("g").attr("class","nodes").selectAll(".node").data(y.nodes).join("g").attr("class","node").attr("id",t=>(t.uid=LNt.next("node-")).id).attr("transform",function(t){return"translate("+t.x0+","+t.y0+")"}).attr("x",t=>t.x0).attr("y",t=>t.y0).append("rect").attr("height",t=>t.y1-t.y0).attr("width",t=>t.x1-t.x0).attr("fill",t=>x(t.id));var e=me(({id:t,value:e})=>m?t+` -`+g+Math.round(100*e)/100+f:t,"getText"),n=(c.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(y.nodes).join("text").attr("x",t=>t.x0(t.y1+t.y0)/2).attr("dy",`${m?"0":"0.35"}em`).attr("text-anchor",t=>t.x0(t.uid=LNt.next("linearGradient-")).id).attr("gradientUnits","userSpaceOnUse").attr("x1",t=>t.source.x1).attr("x2",t=>t.target.x0)).append("stop").attr("offset","0%").attr("stop-color",t=>x(t.source.id)),e.append("stop").attr("offset","100%").attr("stop-color",t=>x(t.target.id)));let w;switch(b){case"gradient":w=me(t=>t.uid,"coloring");break;case"source":w=me(t=>x(t.source.id),"coloring");break;case"target":w=me(t=>x(t.target.id),"coloring");break;default:w=b}n.append("path").attr("d",ANt()).attr("stroke",w).attr("stroke-width",t=>Math.max(1,t.width)),Xc(void 0,c,0,d)},"draw"),RNt={draw:INt}}),zNt=t(()=>{MNt=me(t=>t.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` -`).trim(),"prepareTextForParsing")}),GNt=t(()=>{DNt=me(t=>`.label { - font-family: ${t.fontFamily}; - }`,"getStyles"),ONt=DNt}),UNt={};oPt(UNt,{diagram:()=>jNt});var qNt,jNt,WNt,YNt,HNt,VNt,XNt,KNt,ZNt,QNt,JNt,tIt,eIt,rIt,nIt,iIt,aIt,sIt,oIt=t(()=>{NLt(),ILt(),$Nt(),zNt(),GNt(),qNt=mLt.parse.bind(mLt),mLt.parse=t=>qNt(MNt(t)),jNt={styles:ONt,parser:mLt,db:ALt,renderer:RNt}}),lIt=t(()=>{Nn(),An(),ZE(),fu(),WNt={packet:[]},YNt=structuredClone(WNt),HNt=yr.packet,VNt=me(()=>{var t=bE({...HNt,...Ir().packet});return t.showBits&&(t.paddingY+=10),t},"getConfig"),XNt=me(()=>YNt.packet,"getPacket"),KNt=me(t=>{0{lh(),YNt=structuredClone(WNt)},"clear"),QNt={pushWord:KNt,getPacket:XNt,getConfig:VNt,clear:ZNt,setAccTitle:ch,getAccTitle:hh,setDiagramTitle:ph,getDiagramTitle:gh,getAccDescription:dh,setAccDescription:uh}}),cIt=t(()=>{Mpt(),e(),Bpt(),lIt(),JNt=me(t=>{Dpt(t,QNt);let e=-1,r=[],n=1,i=QNt.getConfig().bitsPerRow;for(var{start:a,end:s,bits:o,label:l}of t.blocks){if(void 0!==a&&void 0!==s&&s{if(void 0===t.start)throw new Error("start should have been set during first phase");if(void 0===t.end)throw new Error("end should have been set during first phase");if(t.end{t=await Lpt("packet",t),M.debug(t),JNt(t)},"parse")}}),hIt=t(()=>{emt(),eh(),rIt=me((t,e,r,n)=>{var i,a,s=(n=n.db).getConfig(),{rowHeight:o,paddingY:l,bitWidth:c,bitsPerRow:h}=s,u=n.getPacket(),n=n.getDiagramTitle(),o=(l=o+l)*(u.length+1)-(n?0:o),c=c*h+2,d=Vft(e);d.attr("viewbox",`0 0 ${c} `+o),Vc(d,o,c,s.useMaxWidth);for([i,a]of u.entries())nIt(d,a,i,s);d.append("text").text(n).attr("x",c/2).attr("y",o-l/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),nIt=me((t,e,r,{rowHeight:n,paddingX:i,paddingY:a,bitWidth:s,bitsPerRow:o,showBits:l})=>{var c,h=t.append("g"),u=r*(n+a)+a;for(c of e){var d,p,g=c.start%o*s+1,f=(c.end-c.start+1)*s-i;h.append("rect").attr("x",g).attr("y",u).attr("width",f).attr("height",n).attr("class","packetBlock"),h.append("text").attr("x",g+f/2).attr("y",u+n/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"),iIt={draw:rIt}}),uIt=t(()=>{ZE(),aIt={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},sIt=me(({packet:t}={})=>` +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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{mu(),eh(),fu(),DNe=[],ONe=[],PNe=new Map,BNe=mt(()=>{DNe=[],ONe=[],PNe=new Map,lh()},"clear"),$Ne=class{constructor(e,t,r=0){this.source=e,this.target=t,this.value=r}static{mt(this,"SankeyLink")}},FNe=mt((e,t,r)=>{DNe.push(new $Ne(e,t,r))},"addLink"),zNe=class{constructor(e){this.ID=e}static{mt(this,"SankeyNode")}},GNe=mt(e=>{e=L.sanitizeText(e,D());let t=PNe.get(e);return void 0===t&&(t=new zNe(e),PNe.set(e,t),ONe.push(t)),t},"findOrCreateNode"),UNe=mt(()=>ONe,"getNodes"),qNe=mt(()=>DNe,"getLinks"),jNe=mt(()=>({nodes:ONe.map(e=>({id:e.ID})),links:DNe.map(e=>({source:e.source.ID,target:e.target.ID,value:e.value}))}),"getGraph"),WNe={nodesMap:PNe,getConfig:mt(()=>D().sankey,"getConfig"),getNodes:UNe,getLinks:qNe,getGraph:jNe,addLink:FNe,findOrCreateNode:GNe,getAccTitle:hh,setAccTitle:ch,getAccDescription:dh,setAccDescription:uh,getDiagramTitle:gh,setDiagramTitle:ph,clear:BNe}});function XNe(t,r){let n;if(void 0===r)for(var e of t)null!=e&&(n{mt(XNe,"max")});function ZNe(t,r){let n;if(void 0===r)for(var e of t)null!=e&&(n>e||void 0===n&&e<=e)&&(n=e);else{let e=-1;for(var i of t)null!=(i=r(i,++e,t))&&(n>i||void 0===n&&i<=i)&&(n=i)}return n}var QNe=e(()=>{mt(ZNe,"min")});function JNe(t,r){let n=0;if(void 0===r)for(var e of t)(e=+e)&&(n+=e);else{let e=-1;for(var i of t)(i=+r(i,++e,t))&&(n+=i)}return n}var eIe=e(()=>{mt(JNe,"sum")}),tIe=e(()=>{KNe(),QNe(),eIe()});function rIe(e){return e.target.depth}function nIe(e){return e.depth}function iIe(e,t){return t-1-e.height}function aIe(e,t){return e.sourceLinks.length?e.depth:t-1}function sIe(e){return e.targetLinks.length?e.depth:e.sourceLinks.length?ZNe(e.sourceLinks,rIe)-1:0}var oIe=e(()=>{tIe(),mt(rIe,"targetDepth"),mt(nIe,"left"),mt(iIe,"right"),mt(aIe,"justify"),mt(sIe,"center")});function lIe(e){return function(){return e}}var cIe=e(()=>{mt(lIe,"constant")});function hIe(e,t){return dIe(e.source,t.source)||e.index-t.index}function uIe(e,t){return dIe(e.target,t.target)||e.index-t.index}function dIe(e,t){return e.y0-t.y0}function pIe(e){return e.value}function gIe(e){return e.index}function fIe(e){return e.nodes}function mIe(e){return e.links}function yIe(e,t){if(e=e.get(t))return e;throw new Error("missing: "+t)}function vIe({nodes:e}){for(var r of e){let e=r.y0,t=e;for(var n of r.sourceLinks)n.y0=e+n.width/2,e+=n.width;for(var i of r.targetLinks)i.y1=t+i.width/2,t+=i.width}}function xIe(){let o=0,l=0,c=1,h=1,u=24,i=8,d,p=gIe,g=aIe,f,m,t=fIe,r=mIe,a=6;function n(){var e={nodes:t.apply(null,arguments),links:r.apply(null,arguments)};return s(e),y(e),v(e),x(e),k(e),vIe(e),e}function s({nodes:r,links:e}){for(var[t,n]of r.entries())n.index=t,n.sourceLinks=[],n.targetLinks=[];var i,a,s=new Map(r.map((e,t)=>[p(e,t,r),e]));for([i,a]of e.entries()){a.index=i;let{source:e,target:t}=a;"object"!=typeof e&&(e=a.source=yIe(s,e)),"object"!=typeof t&&(t=a.target=yIe(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(JNe(t.sourceLinks,pIe),JNe(t.targetLinks,pIe)):t.fixedValue}function v({nodes:e}){let t=e.length,r=new Set(e),n=new Set,i=0;for(;r.size;){for(var a of r){a.depth=i;for(var{target:s}of a.sourceLinks)n.add(s)}if(++i>t)throw new Error("circular link");r=n,n=new Set}}function x({nodes:e}){let t=e.length,r=new Set(e),n=new Set,i=0;for(;r.size;){for(var a of r){a.height=i;for(var{source:s}of a.targetLinks)n.add(s)}if(++i>t)throw new Error("circular link");r=n,n=new Set}}function b({nodes:e}){var t,r=XNe(e,e=>e.depth)+1,n=(c-o-u)/(r-1),i=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*n,t.x1=t.x0+u,i[a]?i[a].push(t):i[a]=[t]}if(f)for(var s of i)s.sort(f);return i}function w(e){var r,n=ZNe(e,e=>(h-l-(e.length-1)*d)/JNe(e,pIe));for(r of e){let t=l;for(var i of r){i.y0=t,i.y1=t+i.value*n,t=i.y1+d;for(var a of i.sourceLinks)a.width=a.value*n}t=(h-t+d)/(r.length+1);for(let e=0;ee.length)-1)),w(t);for(let e=0;e>1,n=e[r];_(e,n.y0-d,r-1,t),S(e,n.y1+d,1+r,t),_(e,h,e.length-1,t),S(e,l,0,t)}function S(e,t,r,n){for(;r{tIe(),oIe(),cIe(),mt(hIe,"ascendingSourceBreadth"),mt(uIe,"ascendingTargetBreadth"),mt(dIe,"ascendingBreadth"),mt(pIe,"value"),mt(gIe,"defaultId"),mt(fIe,"defaultNodes"),mt(mIe,"defaultLinks"),mt(yIe,"find"),mt(vIe,"computeLinkBreadths"),mt(xIe,"Sankey")});function wIe(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function kIe(){return new wIe}var TIe,EIe,CIe,SIe,_Ie=e(()=>{TIe=Math.PI,CIe=(EIe=2*TIe)-1e-6,mt(wIe,"Path"),mt(kIe,"path"),wIe.prototype=kIe.prototype={constructor:wIe,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,n){this._+="Q"+ +e+","+ +t+","+(this._x1=+r)+","+(this._y1=+n)},"quadraticCurveTo"),bezierCurveTo:mt(function(e,t,r,n,i,a){this._+="C"+ +e+","+ +t+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+a)},"bezierCurveTo"),arcTo:mt(function(e,t,r,n,i){var a,s,o=this._x1,l=this._y1,c=(r=+r)-(e=+e),h=(n=+n)-(t=+t),u=o-e,d=l-t,p=u*u+d*d;if((i=+i)<0)throw new Error("negative radius: "+i);null===this._x1?this._+="M"+(this._x1=e)+","+(this._y1=t):1e-6{_Ie()});function LIe(e){return mt(function(){return e},"constant")}var NIe=e(()=>{mt(LIe,"default")});function IIe(e){return e[0]}function RIe(e){return e[1]}var MIe,DIe=e(()=>{mt(IIe,"x"),mt(RIe,"y")}),OIe=e(()=>{MIe=Array.prototype.slice});function PIe(e){return e.source}function BIe(e){return e.target}function $Ie(i){var a=PIe,s=BIe,o=IIe,l=RIe,c=null;function t(){var e,t=MIe.call(arguments),r=a.apply(this,t),n=s.apply(this,t);if(c=c||(e=SIe()),i(c,+o.apply(this,(t[0]=r,t)),+l.apply(this,t),+o.apply(this,(t[0]=n,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:LIe(+e),t):o},t.y=function(e){return arguments.length?(l="function"==typeof e?e:LIe(+e),t):l},t.context=function(e){return arguments.length?(c=e??null,t):c},t}function FIe(e,t,r,n,i){e.moveTo(t,r),e.bezierCurveTo(t=(t+n)/2,r,t,i,n,i)}function zIe(){return $Ie(FIe)}var GIe=e(()=>{AIe(),OIe(),NIe(),DIe(),mt(PIe,"linkSource"),mt(BIe,"linkTarget"),mt($Ie,"link"),mt(FIe,"curveHorizontal"),mt(zIe,"linkHorizontal")}),UIe=e(()=>{GIe()});function qIe(e){return[e.source.x1,e.y0]}function jIe(e){return[e.target.x0,e.y1]}function WIe(){return zIe().source(qIe).target(jIe)}var YIe,HIe,VIe,XIe,KIe,ZIe,QIe,JIe=e(()=>{UIe(),mt(qIe,"horizontalSource"),mt(jIe,"horizontalTarget"),mt(WIe,"default")}),eRe=e(()=>{bIe(),oIe(),JIe()}),tRe=e(()=>{YIe=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+")"}}}),rRe=e(()=>{mu(),Zw(),eRe(),th(),tRe(),HIe={left:nIe,right:iIe,center:sIe,justify:aIe},VIe=mt(function(e,t,r,n){let{securityLevel:i,sankey:a}=D(),s=vh.sankey,o,l=("sandbox"===i&&(o=H("#i"+t)),H("sandbox"===i?o.nodes()[0].contentDocument.body:"body")),c="sandbox"===i?l.select(`[id="${t}"]`):H(`[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=n.db.getGraph(),v=HIe[p],x=(xIe().nodeId(e=>e.id).nodeWidth(10).nodePadding(10+(m?15:0)).nodeAlign(v).extent([[0,0],[h,u]])(y),hx(h5));c.append("g").attr("class","nodes").selectAll(".node").data(y.nodes).join("g").attr("class","node").attr("id",e=>(e.uid=YIe.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=>x(e.id));var t=mt(({id:e,value:t})=>m?e+` +`+g+Math.round(100*t)/100+f:e,"getText"),n=(c.append("g").attr("class","node-labels").attr("font-size",14).selectAll("text").data(y.nodes).join("text").attr("x",e=>e.x0(e.y1+e.y0)/2).attr("dy",`${m?"0":"0.35"}em`).attr("text-anchor",e=>e.x0(e.uid=YIe.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=>x(e.source.id)),t.append("stop").attr("offset","100%").attr("stop-color",e=>x(e.target.id)));let w;switch(b){case"gradient":w=mt(e=>e.uid,"coloring");break;case"source":w=mt(e=>x(e.source.id),"coloring");break;case"target":w=mt(e=>x(e.target.id),"coloring");break;default:w=b}n.append("path").attr("d",WIe()).attr("stroke",w).attr("stroke-width",e=>Math.max(1,e.width)),Xc(void 0,c,0,d)},"draw"),XIe={draw:VIe}}),nRe=e(()=>{KIe=mt(e=>e.replaceAll(/^[^\S\n\r]+|[^\S\n\r]+$/g,"").replaceAll(/([\n\r])+/g,` +`).trim(),"prepareTextForParsing")}),iRe=e(()=>{ZIe=mt(e=>`.label { + font-family: ${e.fontFamily}; + }`,"getStyles"),QIe=ZIe}),aRe={};JBe(aRe,{diagram:()=>oRe});var sRe,oRe,lRe,cRe,hRe,uRe,dRe,pRe,gRe,fRe,mRe,yRe,vRe,xRe,bRe,wRe,kRe,TRe,ERe=e(()=>{HNe(),VNe(),rRe(),nRe(),iRe(),sRe=MNe.parse.bind(MNe),MNe.parse=e=>sRe(KIe(e)),oRe={styles:QIe,parser:MNe,db:WNe,renderer:XIe}}),CRe=e(()=>{Nn(),An(),KC(),fu(),lRe={packet:[]},cRe=structuredClone(lRe),hRe=yr.packet,uRe=mt(()=>{var e=xC({...hRe,...Ir().packet});return e.showBits&&(e.paddingY+=10),e},"getConfig"),dRe=mt(()=>cRe.packet,"getPacket"),pRe=mt(e=>{0{lh(),cRe=structuredClone(lRe)},"clear"),fRe={pushWord:pRe,getPacket:dRe,getConfig:uRe,clear:gRe,setAccTitle:ch,getAccTitle:hh,setDiagramTitle:ph,getDiagramTitle:gh,getAccDescription:dh,setAccDescription:uh}}),SRe=e(()=>{Xge(),t(),Jge(),CRe(),mRe=mt(e=>{Kge(e,fRe);let t=-1,r=[],n=1,i=fRe.getConfig().bitsPerRow;for(var{start:a,end:s,bits:o,label:l}of e.blocks){if(void 0!==a&&void 0!==s&&s{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{e=await Wge("packet",e),M.debug(e),mRe(e)},"parse")}}),_Re=e(()=>{yye(),th(),xRe=mt((e,t,r,n)=>{var i,a,s=(n=n.db).getConfig(),{rowHeight:o,paddingY:l,bitWidth:c,bitsPerRow:h}=s,u=n.getPacket(),n=n.getDiagramTitle(),o=(l=o+l)*(u.length+1)-(n?0:o),c=c*h+2,d=hye(t);d.attr("viewbox",`0 0 ${c} `+o),Vc(d,o,c,s.useMaxWidth);for([i,a]of u.entries())bRe(d,a,i,s);d.append("text").text(n).attr("x",c/2).attr("y",o-l/2).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("class","packetTitle")},"draw"),bRe=mt((e,t,r,{rowHeight:n,paddingX:i,paddingY:a,bitWidth:s,bitsPerRow:o,showBits:l})=>{var c,h=e.append("g"),u=r*(n+a)+a;for(c of t){var d,p,g=c.start%o*s+1,f=(c.end-c.start+1)*s-i;h.append("rect").attr("x",g).attr("y",u).attr("width",f).attr("height",n).attr("class","packetBlock"),h.append("text").attr("x",g+f/2).attr("y",u+n/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"),wRe={draw:xRe}}),ARe=e(()=>{KC(),kRe={byteFontSize:"10px",startByteColor:"black",endByteColor:"black",labelColor:"black",labelFontSize:"12px",titleColor:"black",titleFontSize:"14px",blockStrokeColor:"black",blockStrokeWidth:"1",blockFillColor:"#efefef"},TRe=mt(({packet:e}={})=>` .packetByte { - font-size: ${(t=bE(aIt,t)).byteFontSize}; + font-size: ${(e=xC(kRe,e)).byteFontSize}; } .packetByte.start { - fill: ${t.startByteColor}; + fill: ${e.startByteColor}; } .packetByte.end { - fill: ${t.endByteColor}; + fill: ${e.endByteColor}; } .packetLabel { - fill: ${t.labelColor}; - font-size: ${t.labelFontSize}; + fill: ${e.labelColor}; + font-size: ${e.labelFontSize}; } .packetTitle { - fill: ${t.titleColor}; - font-size: ${t.titleFontSize}; + fill: ${e.titleColor}; + font-size: ${e.titleFontSize}; } .packetBlock { - stroke: ${t.blockStrokeColor}; - stroke-width: ${t.blockStrokeWidth}; - fill: ${t.blockFillColor}; + stroke: ${e.blockStrokeColor}; + stroke-width: ${e.blockStrokeWidth}; + fill: ${e.blockFillColor}; } - `,"styles")}),dIt={};oPt(dIt,{diagram:()=>pIt});var pIt,gIt,fIt,mIt,yIt,vIt,xIt,bIt,wIt,kIt,TIt,EIt,CIt,_It,SIt,AIt,LIt,NIt=t(()=>{lIt(),cIt(),hIt(),uIt(),pIt={parser:eIt,db:QNt,renderer:iIt,styles:sIt}}),IIt=t(()=>{Nn(),An(),ZE(),fu(),fIt={axes:[],curves:[],options:gIt={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"}},mIt=structuredClone(fIt),yIt=yr.radar,vIt=me(()=>bE({...yIt,...Ir().radar}),"getConfig"),xIt=me(()=>mIt.axes,"getAxes"),bIt=me(()=>mIt.curves,"getCurves"),wIt=me(()=>mIt.options,"getOptions"),kIt=me(t=>{mIt.axes=t.map(t=>({name:t.name,label:t.label??t.name}))},"setAxes"),TIt=me(t=>{mIt.curves=t.map(t=>({name:t.name,label:t.label??t.name,entries:EIt(t.entries)}))},"setCurves"),EIt=me(r=>{if(null==r[0].axis)return r.map(t=>t.value);var t=xIt();if(0===t.length)throw new Error("Axes must be populated before curves for reference entries");return t.map(e=>{var t=r.find(t=>t.axis?.$refText===e.name);if(void 0===t)throw new Error("Missing entry for axis "+e.label);return t.value})},"computeCurveEntries"),CIt=me(t=>{t=t.reduce((t,e)=>(t[e.name]=e,t),{}),mIt.options={showLegend:t.showLegend?.value??gIt.showLegend,ticks:t.ticks?.value??gIt.ticks,max:t.max?.value??gIt.max,min:t.min?.value??gIt.min,graticule:t.graticule?.value??gIt.graticule}},"setOptions"),_It=me(()=>{lh(),mIt=structuredClone(fIt)},"clear"),SIt={getAxes:xIt,getCurves:bIt,getOptions:wIt,setAxes:kIt,setCurves:TIt,setOptions:CIt,getConfig:vIt,clear:_It,setAccTitle:ch,getAccTitle:hh,setDiagramTitle:ph,getDiagramTitle:gh,getAccDescription:dh,setAccDescription:uh}}),RIt=t(()=>{Mpt(),e(),Bpt(),IIt(),AIt=me(t=>{Dpt(t,SIt);var{axes:t,curves:e,options:r}=t;SIt.setAxes(t),SIt.setCurves(e),SIt.setOptions(r)},"populate"),LIt={parse:me(async t=>{t=await Lpt("radar",t),M.debug(t),AIt(t)},"parse")}});function MIt(r,t,e,n,i,a,s){let o=t.length,l=Math.min(s.width,s.height)/2;e.forEach((t,e)=>{t.entries.length===o&&(t=t.entries.map((t,e)=>(e=2*Math.PI*e/o-Math.PI/2,{x:(t=DIt(t,n,i,l))*Math.cos(e),y:t*Math.sin(e)})),"circle"===a?r.append("path").attr("d",OIt(t,s.curveTension)).attr("class","radarCurve-"+e):"polygon"===a&&r.append("polygon").attr("points",t.map(t=>t.x+","+t.y).join(" ")).attr("class","radarCurve-"+e))})}function DIt(t,e,r,n){return n*(Math.min(Math.max(t,e),r)-e)/(r-e)}function OIt(e,r){let n=e.length,i=`M${e[0].x},`+e[0].y;for(let t=0;t{var r=a.append("g").attr("transform",`translate(${n}, ${i+20*e})`);r.append("rect").attr("width",12).attr("height",12).attr("class","radarLegendBox-"+e),r.append("text").attr("x",16).attr("y",0).attr("class","radarLegendText").text(t.label)})}}var BIt,FIt,$It,zIt,GIt,UIt,qIt,jIt,WIt=t(()=>{emt(),BIt=me((t,e,r,n)=>{var i=(n=n.db).getAxes(),a=n.getCurves(),s=n.getOptions(),o=n.getConfig(),n=n.getDiagramTitle(),e=Vft(e),e=FIt(e,o),l=s.max??Math.max(...a.map(t=>Math.max(...t.entries))),c=s.min,h=Math.min(o.width,o.height)/2;$It(e,i,h,s.ticks,s.graticule),zIt(e,i,h,o),MIt(e,i,a,c,l,s.graticule,o),PIt(e,a,s.showLegend,o),e.append("text").attr("class","radarTitle").text(n).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),FIt=me((t,e)=>{var r=e.width+e.marginLeft+e.marginRight,n=e.height+e.marginTop+e.marginBottom,i=e.marginLeft+e.width/2,e=e.marginTop+e.height/2;return t.attr("viewbox",`0 0 ${r} `+n).attr("width",r).attr("height",n),t.append("g").attr("transform",`translate(${i}, ${e})`)},"drawFrame"),$It=me((i,a,s,o,t)=>{if("circle"===t)for(let t=0;t(e=2*e*Math.PI/n-Math.PI/2,r*Math.cos(e)+","+r*Math.sin(e))).join(" ");i.append("polygon").attr("points",t).attr("class","radarGraticule")}}},"drawGraticule"),zIt=me((e,r,n,i)=>{var a=r.length;for(let t=0;t{ZE(),Tn(),Nn(),UIt=me((e,r)=>{let n="";for(let t=0;tNRe});var NRe,IRe,RRe,MRe,DRe,ORe,PRe,BRe,$Re,FRe,zRe,GRe,URe,qRe,jRe,WRe,YRe,HRe=e(()=>{CRe(),SRe(),_Re(),ARe(),NRe={parser:vRe,db:fRe,renderer:wRe,styles:TRe}}),VRe=e(()=>{Nn(),An(),KC(),fu(),RRe={axes:[],curves:[],options:IRe={showLegend:!0,ticks:5,max:null,min:0,graticule:"circle"}},MRe=structuredClone(RRe),DRe=yr.radar,ORe=mt(()=>xC({...DRe,...Ir().radar}),"getConfig"),PRe=mt(()=>MRe.axes,"getAxes"),BRe=mt(()=>MRe.curves,"getCurves"),$Re=mt(()=>MRe.options,"getOptions"),FRe=mt(e=>{MRe.axes=e.map(e=>({name:e.name,label:e.label??e.name}))},"setAxes"),zRe=mt(e=>{MRe.curves=e.map(e=>({name:e.name,label:e.label??e.name,entries:GRe(e.entries)}))},"setCurves"),GRe=mt(r=>{if(null==r[0].axis)return r.map(e=>e.value);var e=PRe();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"),URe=mt(e=>{e=e.reduce((e,t)=>(e[t.name]=t,e),{}),MRe.options={showLegend:e.showLegend?.value??IRe.showLegend,ticks:e.ticks?.value??IRe.ticks,max:e.max?.value??IRe.max,min:e.min?.value??IRe.min,graticule:e.graticule?.value??IRe.graticule}},"setOptions"),qRe=mt(()=>{lh(),MRe=structuredClone(RRe)},"clear"),jRe={getAxes:PRe,getCurves:BRe,getOptions:$Re,setAxes:FRe,setCurves:zRe,setOptions:URe,getConfig:ORe,clear:qRe,setAccTitle:ch,getAccTitle:hh,setDiagramTitle:ph,getDiagramTitle:gh,getAccDescription:dh,setAccDescription:uh}}),XRe=e(()=>{Xge(),t(),Jge(),VRe(),WRe=mt(e=>{Kge(e,jRe);var{axes:e,curves:t,options:r}=e;jRe.setAxes(e),jRe.setCurves(t),jRe.setOptions(r)},"populate"),YRe={parse:mt(async e=>{e=await Wge("radar",e),M.debug(e),WRe(e)},"parse")}});function KRe(r,e,t,n,i,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=ZRe(e,n,i,l))*Math.cos(t),y:e*Math.sin(t)})),"circle"===a?r.append("path").attr("d",QRe(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 ZRe(e,t,r,n){return n*(Math.min(Math.max(e,t),r)-t)/(r-t)}function QRe(t,r){let n=t.length,i=`M${t[0].x},`+t[0].y;for(let e=0;e{var r=a.append("g").attr("transform",`translate(${n}, ${i+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 eMe,tMe,rMe,nMe,iMe,aMe,sMe,oMe,lMe=e(()=>{yye(),eMe=mt((e,t,r,n)=>{var i=(n=n.db).getAxes(),a=n.getCurves(),s=n.getOptions(),o=n.getConfig(),n=n.getDiagramTitle(),t=hye(t),t=tMe(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;rMe(t,i,h,s.ticks,s.graticule),nMe(t,i,h,o),KRe(t,i,a,c,l,s.graticule,o),JRe(t,a,s.showLegend,o),t.append("text").attr("class","radarTitle").text(n).attr("x",0).attr("y",-o.height/2-o.marginTop)},"draw"),tMe=mt((e,t)=>{var r=t.width+t.marginLeft+t.marginRight,n=t.height+t.marginTop+t.marginBottom,i=t.marginLeft+t.width/2,t=t.marginTop+t.height/2;return e.attr("viewbox",`0 0 ${r} `+n).attr("width",r).attr("height",n),e.append("g").attr("transform",`translate(${i}, ${t})`)},"drawFrame"),rMe=mt((i,a,s,o,e)=>{if("circle"===e)for(let e=0;e(t=2*t*Math.PI/n-Math.PI/2,r*Math.cos(t)+","+r*Math.sin(t))).join(" ");i.append("polygon").attr("points",e).attr("class","radarGraticule")}}},"drawGraticule"),nMe=mt((t,r,n,i)=>{var a=r.length;for(let e=0;e{KC(),Tn(),Nn(),aMe=mt((t,r)=>{let n="";for(let e=0;e{var e=bE(or(),Ir().themeVariables);return{themeVariables:e,radarOptions:bE(e.radar,t)}},"buildRadarStyleOptions"),jIt=me(({radar:t}={})=>{var{themeVariables:t,radarOptions:e}=qIt(t);return` + `}return n},"genIndexStyles"),sMe=mt(e=>{var t=xC(or(),Ir().themeVariables);return{themeVariables:t,radarOptions:xC(t.radar,e)}},"buildRadarStyleOptions"),oMe=mt(({radar:e}={})=>{var{themeVariables:e,radarOptions:t}=sMe(e);return` .radarTitle { - font-size: ${t.fontSize}; - color: ${t.titleColor}; + font-size: ${e.fontSize}; + color: ${e.titleColor}; dominant-baseline: hanging; text-anchor: middle; } .radarAxisLine { - stroke: ${e.axisColor}; - stroke-width: ${e.axisStrokeWidth}; + stroke: ${t.axisColor}; + stroke-width: ${t.axisStrokeWidth}; } .radarAxisLabel { dominant-baseline: middle; text-anchor: middle; - font-size: ${e.axisLabelFontSize}px; - color: ${e.axisColor}; + font-size: ${t.axisLabelFontSize}px; + color: ${t.axisColor}; } .radarGraticule { - fill: ${e.graticuleColor}; - fill-opacity: ${e.graticuleOpacity}; - stroke: ${e.graticuleColor}; - stroke-width: ${e.graticuleStrokeWidth}; + fill: ${t.graticuleColor}; + fill-opacity: ${t.graticuleOpacity}; + stroke: ${t.graticuleColor}; + stroke-width: ${t.graticuleStrokeWidth}; } .radarLegendText { text-anchor: start; - font-size: ${e.legendFontSize}px; + font-size: ${t.legendFontSize}px; dominant-baseline: hanging; } - ${UIt(t,e)} - `},"styles")}),HIt={};oPt(HIt,{diagram:()=>VIt});var VIt,XIt,KIt,ZIt=t(()=>{IIt(),RIt(),WIt(),YIt(),VIt={parser:LIt,db:SIt,renderer:GIt,styles:jIt}}),QIt=t(()=>{function t(){this.yy={}}var e=me(function(t,e,r,n){for(r=r||{},n=t.length;n--;r[t[n]]=e);return r},"o"),r=[1,7],n=[1,13],i=[1,14],a=[1,15],s=[1,19],o=[1,16],l=[1,17],c=[1,18],h=[8,30],u=[8,21,28,29,30,31,32,40,44,47],d=[1,23],p=[1,24],g=[8,15,16,21,28,29,30,31,32,40,44,47],f=[8,15,16,21,27,28,29,30,31,32,40,44,47],m=[1,49],h={trace:me(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,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList: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:49,$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:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"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],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:me(function(t,e,r,n,i,a,s){var o=a.length-1;switch(i){case 4:n.getLogger().debug("Rule: separator (NL) ");break;case 5:n.getLogger().debug("Rule: separator (Space) ");break;case 6:n.getLogger().debug("Rule: separator (EOF) ");break;case 7:n.getLogger().debug("Rule: hierarchy: ",a[o-1]),n.setHierarchy(a[o-1]);break;case 8:n.getLogger().debug("Stop NL ");break;case 9:n.getLogger().debug("Stop EOF ");break;case 10:n.getLogger().debug("Stop NL2 ");break;case 11:n.getLogger().debug("Stop EOF2 ");break;case 12:n.getLogger().debug("Rule: statement: ",a[o]),"number"==typeof a[o].length?this.$=a[o]:this.$=[a[o]];break;case 13:n.getLogger().debug("Rule: statement #2: ",a[o-1]),this.$=[a[o-1]].concat(a[o]);break;case 14:n.getLogger().debug("Rule: link: ",a[o],t),this.$={edgeTypeStr:a[o],label:""};break;case 15:n.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=n.generateId();this.$={id:c,type:"space",label:"",width:l,children:[]};break;case 23:n.getLogger().debug("Rule: (nodeStatement link node) ",a[o-2],a[o-1],a[o]," typestr: ",a[o-1].edgeTypeStr),c=n.edgeStrToEdgeData(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",directions:a[o].directions,arrowTypeEnd:c,arrowTypeStart:"arrow_open"},{id:a[o].id,label:a[o].label,type:n.typeStr2Type(a[o].typeStr),directions:a[o].directions}];break;case 24:n.getLogger().debug("Rule: nodeStatement (abc88 node size) ",a[o-1],a[o]),this.$={id:a[o-1].id,label:a[o-1].label,type:n.typeStr2Type(a[o-1].typeStr),directions:a[o-1].directions,widthInColumns:parseInt(a[o],10)};break;case 25:n.getLogger().debug("Rule: nodeStatement (node) ",a[o]),this.$={id:a[o].id,label:a[o].label,type:n.typeStr2Type(a[o].typeStr),directions:a[o].directions,widthInColumns:1};break;case 26:n.getLogger().debug("APA123",this||"na"),n.getLogger().debug("COLUMNS: ",a[o]),this.$={type:"column-setting",columns:"auto"===a[o]?-1:parseInt(a[o])};break;case 27:n.getLogger().debug("Rule: id-block statement : ",a[o-2],a[o-1]),n.generateId(),this.$={...a[o-2],type:"composite",children:a[o-1]};break;case 28:n.getLogger().debug("Rule: blockStatement : ",a[o-2],a[o-1],a[o]),l=n.generateId(),this.$={id:l,type:"composite",label:"",children:a[o-1]};break;case 29:n.getLogger().debug("Rule: node (NODE_ID separator): ",a[o]),this.$={id:a[o]};break;case 30:n.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:n.getLogger().debug("Rule: dirList: ",a[o]),this.$=[a[o]];break;case 32:n.getLogger().debug("Rule: dirList: ",a[o-1],a[o]),this.$=[a[o-1]].concat(a[o]);break;case 33:n.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:n.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]},{11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,32:s,40:o,44:l,47:c},{8:[1,20]},e(h,[2,12],{13:4,19:5,20:6,22:8,23:9,24:10,25:11,26:12,11:21,21:r,28:n,29:i,31:a,32:s,40:o,44:l,47:c}),e(u,[2,16],{14:22,15:d,16:p}),e(u,[2,17]),e(u,[2,18]),e(u,[2,19]),e(u,[2,20]),e(u,[2,21]),e(u,[2,22]),e(g,[2,25],{27:[1,25]}),e(u,[2,26]),{19:26,26:12,32:s},{11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,32:s,40:o,44:l,47:c},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},e(f,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},e(h,[2,13]),{26:35,32:s},{32:[2,14]},{17:[1,36]},e(g,[2,24]),{11:37,13:4,14:22,15:d,16:p,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,32:s,40:o,44:l,47:c},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[1,42]},e(f,[2,30]),{18:[1,43]},{18:[1,44]},e(g,[2,23]),{18:[1,45]},{30:[1,46]},e(u,[2,28]),e(u,[2,35]),e(u,[2,36]),e(u,[2,37]),e(u,[2,38]),{37:[1,47]},{34:48,35:m},{15:[1,50]},e(u,[2,27]),e(f,[2,33]),{39:[1,51]},{34:52,35:m,39:[2,31]},{32:[2,15]},e(f,[2,34]),{39:[2,32]}],defaultActions:{20:[2,7],23:[2,14],50:[2,15],52:[2,32]},parseError:me(function(t,e){var r;if(!e.recoverable)throw(r=new Error(t)).hash=e,r;this.trace(t)},"parseError"),parse:me(function(t){var e,r=this,n=[0],i=[],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(e in this.yy)Object.prototype.hasOwnProperty.call(this.yy,e)&&(f.yy[e]=this.yy[e]);g.setInput(t,f.yy),f.yy.lexer=g,f.yy.parser=this,"u"uMe});var uMe,dMe,pMe,gMe=e(()=>{VRe(),XRe(),lMe(),cMe(),uMe={parser:YRe,db:jRe,renderer:iMe,styles:oMe}}),fMe=e(()=>{function e(){this.yy={}}var t=mt(function(e,t,r,n){for(r=r||{},n=e.length;n--;r[e[n]]=t);return r},"o"),r=[1,7],n=[1,13],i=[1,14],a=[1,15],s=[1,19],o=[1,16],l=[1,17],c=[1,18],h=[8,30],u=[8,21,28,29,30,31,32,40,44,47],d=[1,23],p=[1,24],g=[8,15,16,21,28,29,30,31,32,40,44,47],f=[8,15,16,21,27,28,29,30,31,32,40,44,47],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,block:31,NODE_ID:32,nodeShapeNLabel:33,dirList: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:49,$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:"block",32:"NODE_ID",35:"DIR",36:"NODE_DSTART",37:"NODE_DEND",38:"BLOCK_ARROW_START",39:"BLOCK_ARROW_END",40:"classDef",41:"CLASSDEF_ID",42:"CLASSDEF_STYLEOPTS",43:"DEFAULT",44:"class",45:"CLASSENTITY_IDS",46:"STYLECLASS",47:"style",48:"STYLE_ENTITY_IDS",49:"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],[34,1],[34,2],[33,3],[33,4],[23,3],[23,3],[24,3],[25,3]],performAction:mt(function(e,t,r,n,i,a,s){var o=a.length-1;switch(i){case 4:n.getLogger().debug("Rule: separator (NL) ");break;case 5:n.getLogger().debug("Rule: separator (Space) ");break;case 6:n.getLogger().debug("Rule: separator (EOF) ");break;case 7:n.getLogger().debug("Rule: hierarchy: ",a[o-1]),n.setHierarchy(a[o-1]);break;case 8:n.getLogger().debug("Stop NL ");break;case 9:n.getLogger().debug("Stop EOF ");break;case 10:n.getLogger().debug("Stop NL2 ");break;case 11:n.getLogger().debug("Stop EOF2 ");break;case 12:n.getLogger().debug("Rule: statement: ",a[o]),"number"==typeof a[o].length?this.$=a[o]:this.$=[a[o]];break;case 13:n.getLogger().debug("Rule: statement #2: ",a[o-1]),this.$=[a[o-1]].concat(a[o]);break;case 14:n.getLogger().debug("Rule: link: ",a[o],e),this.$={edgeTypeStr:a[o],label:""};break;case 15:n.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=n.generateId();this.$={id:c,type:"space",label:"",width:l,children:[]};break;case 23:n.getLogger().debug("Rule: (nodeStatement link node) ",a[o-2],a[o-1],a[o]," typestr: ",a[o-1].edgeTypeStr),c=n.edgeStrToEdgeData(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",directions:a[o].directions,arrowTypeEnd:c,arrowTypeStart:"arrow_open"},{id:a[o].id,label:a[o].label,type:n.typeStr2Type(a[o].typeStr),directions:a[o].directions}];break;case 24:n.getLogger().debug("Rule: nodeStatement (abc88 node size) ",a[o-1],a[o]),this.$={id:a[o-1].id,label:a[o-1].label,type:n.typeStr2Type(a[o-1].typeStr),directions:a[o-1].directions,widthInColumns:parseInt(a[o],10)};break;case 25:n.getLogger().debug("Rule: nodeStatement (node) ",a[o]),this.$={id:a[o].id,label:a[o].label,type:n.typeStr2Type(a[o].typeStr),directions:a[o].directions,widthInColumns:1};break;case 26:n.getLogger().debug("APA123",this||"na"),n.getLogger().debug("COLUMNS: ",a[o]),this.$={type:"column-setting",columns:"auto"===a[o]?-1:parseInt(a[o])};break;case 27:n.getLogger().debug("Rule: id-block statement : ",a[o-2],a[o-1]),n.generateId(),this.$={...a[o-2],type:"composite",children:a[o-1]};break;case 28:n.getLogger().debug("Rule: blockStatement : ",a[o-2],a[o-1],a[o]),l=n.generateId(),this.$={id:l,type:"composite",label:"",children:a[o-1]};break;case 29:n.getLogger().debug("Rule: node (NODE_ID separator): ",a[o]),this.$={id:a[o]};break;case 30:n.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:n.getLogger().debug("Rule: dirList: ",a[o]),this.$=[a[o]];break;case 32:n.getLogger().debug("Rule: dirList: ",a[o-1],a[o]),this.$=[a[o-1]].concat(a[o]);break;case 33:n.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:n.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]},{11:3,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,32:s,40:o,44:l,47: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,21:r,28:n,29:i,31:a,32:s,40:o,44:l,47: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,32:s},{11:27,13:4,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,32:s,40:o,44:l,47:c},{41:[1,28],43:[1,29]},{45:[1,30]},{48:[1,31]},t(f,[2,29],{33:32,36:[1,33],38:[1,34]}),{1:[2,7]},t(h,[2,13]),{26:35,32:s},{32:[2,14]},{17:[1,36]},t(g,[2,24]),{11:37,13:4,14:22,15:d,16:p,19:5,20:6,21:r,22:8,23:9,24:10,25:11,26:12,28:n,29:i,31:a,32:s,40:o,44:l,47:c},{30:[1,38]},{42:[1,39]},{42:[1,40]},{46:[1,41]},{49:[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]),{37:[1,47]},{34:48,35:m},{15:[1,50]},t(u,[2,27]),t(f,[2,33]),{39:[1,51]},{34:52,35:m,39:[2,31]},{32:[2,15]},t(f,[2,34]),{39:[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,n=[0],i=[],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"e[0].length)){if(e=r,n=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(r,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[n]))&&t:""===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:me(function(){return this.next()||this.lex()},"lex"),begin:me(function(t){this.conditionStack.push(t)},"begin"),popState:me(function(){return 0"),"NODE_DEND";case 54:return this.popState(),t.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return t.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return t.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return t.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return t.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 60:case 61:case 62:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 63:return t.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return t.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 65:return t.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 66:case 67:case 68:case 69:case 70:case 71:case 72:return this.pushState("NODE"),36;case 73:return t.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),t.getLogger().debug("LEX ARR START"),38;case 75:return t.getLogger().debug("Lex: NODE_ID",e.yytext),32;case 76:return t.getLogger().debug("Lex: EOF",e.yytext),8;case 77:case 78:this.pushState("md_string");break;case 79:return"NODE_DESCR";case 80:this.popState();break;case 81:t.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:t.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return t.getLogger().debug("LEX: NODE_DESCR:",e.yytext),"NODE_DESCR";case 84:t.getLogger().debug("LEX POPPING"),this.popState();break;case 85:t.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (right): dir:",e.yytext),"DIR";case 87:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (left):",e.yytext),"DIR";case 88:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (x):",e.yytext),"DIR";case 89:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (y):",e.yytext),"DIR";case 90:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (up):",e.yytext),"DIR";case 91:return e.yytext=e.yytext.replace(/^,\s*/,""),t.getLogger().debug("Lex (down):",e.yytext),"DIR";case 92:return e.yytext="]>",t.getLogger().debug("Lex (ARROW_DIR end):",e.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 94:case 95:case 96:return t.getLogger().debug("Lex: LINK",e.yytext),15;case 97:case 98:case 99:return t.getLogger().debug("Lex: START_LINK",e.yytext),this.pushState("LLABEL"),16;case 100:this.pushState("md_string");break;case 101:return t.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),t.getLogger().debug("Lex: LINK","#"+e.yytext+"#"),15;case 103:case 104:return this.popState(),t.getLogger().debug("Lex: LINK",e.yytext),15;case 105:return t.getLogger().debug("Lex: COLON",e.yytext),e.yytext=e.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};h.lexer=d,me(t,"Parser"),(XIt=new((t.prototype=h).Parser=t)).parser=XIt,KIt=XIt});function JIt(t){switch(M.debug("typeStr2Type",t),t){case"[]":return"square";case"()":return M.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 tRt(t){return"=="!==(M.debug("typeStr2Type",t),t)?"normal":"thick"}function eRt(t){switch(t.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}var rRt,nRt,iRt,aRt,sRt,oRt,lRt,cRt,hRt,uRt,dRt,pRt,gRt,fRt,mRt,yRt,vRt,xRt,bRt,wRt,kRt,TRt,ERt,CRt,_Rt,SRt,ARt,LRt,NRt,IRt,RRt,MRt,DRt,ORt,PRt,BRt,FRt,$Rt,zRt,GRt,URt=t(()=>{n$(),Nn(),mu(),e(),th(),fu(),rRt=new Map,nRt=[],iRt=new Map,aRt=D(),sRt=new Map,oRt=me(t=>L.sanitizeText(t,aRt),"sanitizeText"),lRt=me(function(t,e=""){let r=sRt.get(t);r||(r={id:t,styles:[],textStyles:[]},sRt.set(t,r)),e?.split(",").forEach(t=>{var e=t.replace(/([^;]*);/,"$1").trim();RegExp("color").exec(t)&&(t=e.replace("fill","bgFill").replace("color","fill"),r.textStyles.push(t)),r.styles.push(e)})},"addStyleClass"),cRt=me(function(t,e=""){t=rRt.get(t),null!=e&&(t.styles=e.split(","))},"addStyle2Node"),hRt=me(function(t,r){t.split(",").forEach(function(t){let e=rRt.get(t);void 0===e&&(t=t.trim(),e={id:t,type:"na",children:[]},rRt.set(t,e)),e.classes||(e.classes=[]),e.classes.push(r)})},"setCssClass"),uRt=me((t,e)=>{var r,n=[];for(r of t.flat())if(r.label&&(r.label=oRt(r.label)),"classDef"===r.type)lRt(r.id,r.css);else if("applyClass"===r.type)hRt(r.id,r?.styleClass??"");else if("applyStyles"===r.type)r?.stylesStr&&cRt(r.id,r?.stylesStr);else if("column-setting"===r.type)e.columns=r.columns??-1;else if("edge"===r.type){var i=(iRt.get(r.id)??0)+1;iRt.set(r.id,i),r.id=i+"-"+r.id,nRt.push(r)}else if(r.label||("composite"===r.type?r.label="":r.label=r.id),void 0===(i=rRt.get(r.id))?rRt.set(r.id,r):("na"!==r.type&&(i.type=r.type),r.label!==r.id&&(i.label=r.label)),r.children&&uRt(r.children,r),"space"===r.type){var a=r.width??1;for(let t=0;t{M.debug("Clear called"),lh(),pRt={id:"root",type:"composite",children:[],columns:-1},rRt=new Map([["root",pRt]]),dRt=[],sRt=new Map,nRt=[],iRt=new Map},"clear"),me(JIt,"typeStr2Type"),me(tRt,"edgeTypeStr2Type"),me(eRt,"edgeStrToEdgeData"),fRt=0,mRt=me(()=>(fRt++,"id-"+Math.random().toString(36).substr(2,12)+"-"+fRt),"generateId"),yRt=me(t=>{pRt.children=t,uRt(t,pRt),dRt=pRt.children},"setHierarchy"),vRt=me(t=>(t=rRt.get(t))?t.columns||(t.children?t.children.length:-1):-1,"getColumns"),xRt=me(()=>[...rRt.values()],"getBlocksFlat"),bRt=me(()=>dRt||[],"getBlocks"),wRt=me(()=>nRt,"getEdges"),kRt=me(t=>rRt.get(t),"getBlock"),TRt=me(t=>{rRt.set(t.id,t)},"setBlock"),CRt=me(()=>console,"getLogger"),ERt=me(function(){return sRt},"getClasses"),CRt={getConfig:me(()=>Ir().block,"getConfig"),typeStr2Type:JIt,edgeTypeStr2Type:tRt,edgeStrToEdgeData:eRt,getLogger:CRt,getBlocksFlat:xRt,getBlocks:bRt,getEdges:wRt,setHierarchy:yRt,getBlock:kRt,setBlock:TRt,getColumns:vRt,getClasses:ERt,clear:gRt,generateId:mRt},_Rt=CRt}),qRt=t(()=>{vn(),HX(),SRt=me((t,e)=>{var r=(i=Be)(t,"r"),n=i(t,"g"),i=i(t,"b");return Oe(r,n,i,e)},"fade"),ARt=me(t=>`.label { - font-family: ${t.fontFamily}; - color: ${t.nodeTextColor||t.textColor}; +Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==d?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(_,{text:g.match,token:this.terminals_[x]||x,line:g.yylineno,loc:m,expected:A})}if(k[0]instanceof Array&&1t[0].length)){if(t=r,n=a,this.options.backtrack_lexer){if(!1!==(e=this.test_match(r,i[a])))return e;if(this._backtrack){t=!1;continue}return!1}if(!this.options.flex)break}return t?!1!==(e=this.test_match(t,i[n]))&&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 54:return this.popState(),e.getLogger().debug("Lex: ]"),"NODE_DEND";case 55:return e.getLogger().debug("Lexa: -)"),this.pushState("NODE"),36;case 56:return e.getLogger().debug("Lexa: (-"),this.pushState("NODE"),36;case 57:return e.getLogger().debug("Lexa: ))"),this.pushState("NODE"),36;case 58:return e.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 59:return e.getLogger().debug("Lex: ((("),this.pushState("NODE"),36;case 60:case 61:case 62:return e.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 63:return e.getLogger().debug("Lexc: >"),this.pushState("NODE"),36;case 64:return e.getLogger().debug("Lexa: (["),this.pushState("NODE"),36;case 65:return e.getLogger().debug("Lexa: )"),this.pushState("NODE"),36;case 66:case 67:case 68:case 69:case 70:case 71:case 72:return this.pushState("NODE"),36;case 73:return e.getLogger().debug("Lexa: ["),this.pushState("NODE"),36;case 74:return this.pushState("BLOCK_ARROW"),e.getLogger().debug("LEX ARR START"),38;case 75:return e.getLogger().debug("Lex: NODE_ID",t.yytext),32;case 76:return e.getLogger().debug("Lex: EOF",t.yytext),8;case 77:case 78:this.pushState("md_string");break;case 79:return"NODE_DESCR";case 80:this.popState();break;case 81:e.getLogger().debug("Lex: Starting string"),this.pushState("string");break;case 82:e.getLogger().debug("LEX ARR: Starting string"),this.pushState("string");break;case 83:return e.getLogger().debug("LEX: NODE_DESCR:",t.yytext),"NODE_DESCR";case 84:e.getLogger().debug("LEX POPPING"),this.popState();break;case 85:e.getLogger().debug("Lex: =>BAE"),this.pushState("ARROW_DIR");break;case 86:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (right): dir:",t.yytext),"DIR";case 87:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (left):",t.yytext),"DIR";case 88:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (x):",t.yytext),"DIR";case 89:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (y):",t.yytext),"DIR";case 90:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (up):",t.yytext),"DIR";case 91:return t.yytext=t.yytext.replace(/^,\s*/,""),e.getLogger().debug("Lex (down):",t.yytext),"DIR";case 92:return t.yytext="]>",e.getLogger().debug("Lex (ARROW_DIR end):",t.yytext),this.popState(),this.popState(),"BLOCK_ARROW_END";case 93:return e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 94:case 95:case 96:return e.getLogger().debug("Lex: LINK",t.yytext),15;case 97:case 98:case 99:return e.getLogger().debug("Lex: START_LINK",t.yytext),this.pushState("LLABEL"),16;case 100:this.pushState("md_string");break;case 101:return e.getLogger().debug("Lex: Starting string"),this.pushState("string"),"LINK_LABEL";case 102:return this.popState(),e.getLogger().debug("Lex: LINK","#"+t.yytext+"#"),15;case 103:case 104:return this.popState(),e.getLogger().debug("Lex: LINK",t.yytext),15;case 105:return e.getLogger().debug("Lex: COLON",t.yytext),t.yytext=t.yytext.slice(1),27}},"anonymous"),rules:[/^(?:block-beta\b)/,/^(?:block\s+)/,/^(?:block\n+)/,/^(?:block:)/,/^(?:[\s]+)/,/^(?:[\n]+)/,/^(?:((\u000D\u000A)|(\u000A)))/,/^(?:columns\s+auto\b)/,/^(?:columns\s+[\d]+)/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:space[:]\d+)/,/^(?:space\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\s+)/,/^(?:DEFAULT\s+)/,/^(?:\w+\s+)/,/^(?:[^\n]*)/,/^(?:class\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:style\s+)/,/^(?:(\w+)+((,\s*\w+)*))/,/^(?:[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:end\b\s*)/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:[\)]\))/,/^(?:\}\})/,/^(?:\})/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\()/,/^(?:\]\])/,/^(?:\()/,/^(?:\]\))/,/^(?:\\\])/,/^(?:\/\])/,/^(?:\)\])/,/^(?:[\)])/,/^(?:\]>)/,/^(?:[\]])/,/^(?:-\))/,/^(?:\(-)/,/^(?:\)\))/,/^(?:\))/,/^(?:\(\(\()/,/^(?:\(\()/,/^(?:\{\{)/,/^(?:\{)/,/^(?:>)/,/^(?:\(\[)/,/^(?:\()/,/^(?:\[\[)/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\)\))/,/^(?:\[\\)/,/^(?:\[\/)/,/^(?:\[\\)/,/^(?:\[)/,/^(?:<\[)/,/^(?:[^\(\[\n\-\)\{\}\s\<\>:]+)/,/^(?:$)/,/^(?:["][`])/,/^(?:["][`])/,/^(?:[^`"]+)/,/^(?:[`]["])/,/^(?:["])/,/^(?:["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:\]>\s*\()/,/^(?:,?\s*right\s*)/,/^(?:,?\s*left\s*)/,/^(?:,?\s*x\s*)/,/^(?:,?\s*y\s*)/,/^(?:,?\s*up\s*)/,/^(?:,?\s*down\s*)/,/^(?:\)\s*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:["][`])/,/^(?:["])/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?::\d+)/],conditions:{STYLE_DEFINITION:{rules:[29],inclusive:!1},STYLE_STMNT:{rules:[28],inclusive:!1},CLASSDEFID:{rules:[23],inclusive:!1},CLASSDEF:{rules:[21,22],inclusive:!1},CLASS_STYLE:{rules:[26],inclusive:!1},CLASS:{rules:[25],inclusive:!1},LLABEL:{rules:[100,101,102,103,104],inclusive:!1},ARROW_DIR:{rules:[86,87,88,89,90,91,92],inclusive:!1},BLOCK_ARROW:{rules:[77,82,85],inclusive:!1},NODE:{rules:[38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,78,81],inclusive:!1},md_string:{rules:[10,11,79,80],inclusive:!1},space:{rules:[],inclusive:!1},string:{rules:[13,14,83,84],inclusive:!1},acc_descr_multiline:{rules:[35,36],inclusive:!1},acc_descr:{rules:[33],inclusive:!1},acc_title:{rules:[31],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,12,15,16,17,18,19,20,24,27,30,32,34,37,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,93,94,95,96,97,98,99,105],inclusive:!0}}};h.lexer=d,mt(e,"Parser"),(dMe=new((e.prototype=h).Parser=e)).parser=dMe,pMe=dMe});function mMe(e){switch(M.debug("typeStr2Type",e),e){case"[]":return"square";case"()":return M.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 yMe(e){return"=="!==(M.debug("typeStr2Type",e),e)?"normal":"thick"}function vMe(e){switch(e.trim()){case"--x":return"arrow_cross";case"--o":return"arrow_circle";default:return"arrow_point"}}var xMe,bMe,wMe,kMe,TMe,EMe,CMe,SMe,_Me,AMe,LMe,NMe,IMe,RMe,MMe,DMe,OMe,PMe,BMe,$Me,FMe,zMe,GMe,UMe,qMe,jMe,WMe,YMe,HMe,VMe,XMe,KMe,ZMe,QMe,JMe,eDe,tDe,rDe,nDe,iDe,aDe=e(()=>{tz(),Nn(),mu(),t(),eh(),fu(),xMe=new Map,bMe=[],wMe=new Map,kMe=D(),TMe=new Map,EMe=mt(e=>L.sanitizeText(e,kMe),"sanitizeText"),CMe=mt(function(e,t=""){let r=TMe.get(e);r||(r={id:e,styles:[],textStyles:[]},TMe.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"),SMe=mt(function(e,t=""){e=xMe.get(e),null!=t&&(e.styles=t.split(","))},"addStyle2Node"),_Me=mt(function(e,r){e.split(",").forEach(function(e){let t=xMe.get(e);void 0===t&&(e=e.trim(),t={id:e,type:"na",children:[]},xMe.set(e,t)),t.classes||(t.classes=[]),t.classes.push(r)})},"setCssClass"),AMe=mt((e,t)=>{var r,n=[];for(r of e.flat())if(r.label&&(r.label=EMe(r.label)),"classDef"===r.type)CMe(r.id,r.css);else if("applyClass"===r.type)_Me(r.id,r?.styleClass??"");else if("applyStyles"===r.type)r?.stylesStr&&SMe(r.id,r?.stylesStr);else if("column-setting"===r.type)t.columns=r.columns??-1;else if("edge"===r.type){var i=(wMe.get(r.id)??0)+1;wMe.set(r.id,i),r.id=i+"-"+r.id,bMe.push(r)}else if(r.label||("composite"===r.type?r.label="":r.label=r.id),void 0===(i=xMe.get(r.id))?xMe.set(r.id,r):("na"!==r.type&&(i.type=r.type),r.label!==r.id&&(i.label=r.label)),r.children&&AMe(r.children,r),"space"===r.type){var a=r.width??1;for(let e=0;e{M.debug("Clear called"),lh(),NMe={id:"root",type:"composite",children:[],columns:-1},xMe=new Map([["root",NMe]]),LMe=[],TMe=new Map,bMe=[],wMe=new Map},"clear"),mt(mMe,"typeStr2Type"),mt(yMe,"edgeTypeStr2Type"),mt(vMe,"edgeStrToEdgeData"),RMe=0,MMe=mt(()=>(RMe++,"id-"+Math.random().toString(36).substr(2,12)+"-"+RMe),"generateId"),DMe=mt(e=>{NMe.children=e,AMe(e,NMe),LMe=NMe.children},"setHierarchy"),OMe=mt(e=>(e=xMe.get(e))?e.columns||(e.children?e.children.length:-1):-1,"getColumns"),PMe=mt(()=>[...xMe.values()],"getBlocksFlat"),BMe=mt(()=>LMe||[],"getBlocks"),$Me=mt(()=>bMe,"getEdges"),FMe=mt(e=>xMe.get(e),"getBlock"),zMe=mt(e=>{xMe.set(e.id,e)},"setBlock"),UMe=mt(()=>console,"getLogger"),GMe=mt(function(){return TMe},"getClasses"),UMe={getConfig:mt(()=>Ir().block,"getConfig"),typeStr2Type:mMe,edgeTypeStr2Type:yMe,edgeStrToEdgeData:vMe,getLogger:UMe,getBlocksFlat:PMe,getBlocks:BMe,getEdges:$Me,setHierarchy:DMe,getBlock:FMe,setBlock:zMe,getColumns:OMe,getClasses:GMe,clear:IMe,generateId:MMe},qMe=UMe}),sDe=e(()=>{vn(),WK(),jMe=mt((e,t)=>{var r=(i=Bt)(e,"r"),n=i(e,"g"),i=i(e,"b");return Ot(r,n,i,t)},"fade"),WMe=mt(e=>`.label { + font-family: ${e.fontFamily}; + color: ${e.nodeTextColor||e.textColor}; } .cluster-label text { - fill: ${t.titleColor}; + fill: ${e.titleColor}; } .cluster-label span,p { - color: ${t.titleColor}; + color: ${e.titleColor}; } .label text,span,p { - fill: ${t.nodeTextColor||t.textColor}; - color: ${t.nodeTextColor||t.textColor}; + fill: ${e.nodeTextColor||e.textColor}; + color: ${e.nodeTextColor||e.textColor}; } .node rect, @@ -2453,8 +2453,8 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l .node ellipse, .node polygon, .node path { - fill: ${t.mainBkg}; - stroke: ${t.nodeBorder}; + fill: ${e.mainBkg}; + stroke: ${e.nodeBorder}; stroke-width: 1px; } .flowchart-label text { @@ -2475,52 +2475,52 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l } .arrowheadPath { - fill: ${t.arrowheadColor}; + fill: ${e.arrowheadColor}; } .edgePath .path { - stroke: ${t.lineColor}; + stroke: ${e.lineColor}; stroke-width: 2.0px; } .flowchart-link { - stroke: ${t.lineColor}; + stroke: ${e.lineColor}; fill: none; } .edgeLabel { - background-color: ${t.edgeLabelBackground}; + background-color: ${e.edgeLabelBackground}; rect { opacity: 0.5; - background-color: ${t.edgeLabelBackground}; - fill: ${t.edgeLabelBackground}; + background-color: ${e.edgeLabelBackground}; + fill: ${e.edgeLabelBackground}; } text-align: center; } /* For html labels only */ .labelBkg { - background-color: ${SRt(t.edgeLabelBackground,.5)}; + background-color: ${jMe(e.edgeLabelBackground,.5)}; // background-color: } .node .cluster { - // fill: ${SRt(t.mainBkg,.5)}; - fill: ${SRt(t.clusterBkg,.5)}; - stroke: ${SRt(t.clusterBorder,.2)}; + // fill: ${jMe(e.mainBkg,.5)}; + fill: ${jMe(e.clusterBkg,.5)}; + stroke: ${jMe(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: ${t.titleColor}; + fill: ${e.titleColor}; } .cluster span,p { - color: ${t.titleColor}; + color: ${e.titleColor}; } /* .cluster div { - color: ${t.titleColor}; + color: ${e.titleColor}; } */ div.mermaidTooltip { @@ -2528,10 +2528,10 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l text-align: center; max-width: 200px; padding: 2px; - font-family: ${t.fontFamily}; + font-family: ${e.fontFamily}; font-size: 12px; - background: ${t.tertiaryColor}; - border: 1px solid ${t.border2}; + background: ${e.tertiaryColor}; + border: 1px solid ${e.border2}; border-radius: 2px; pointer-events: none; z-index: 100; @@ -2540,27 +2540,27 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l .flowchartTitleText { text-anchor: middle; font-size: 18px; - fill: ${t.textColor}; + fill: ${e.textColor}; } - ${BX()} -`,"getStyles"),LRt=ARt}),jRt=t(()=>{e(),NRt=me((e,t,r,n)=>{t.forEach(t=>{zRt[t](e,r,n)})},"insertMarkers"),IRt=me((t,e,r)=>{M.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},"extension"),RRt=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),MRt=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),DRt=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),ORt=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6)},"lollipop"),PRt=me((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",6).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"point"),BRt=me((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},"circle"),FRt=me((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},"cross"),$Rt=me((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),zRt={extension:IRt,composition:RRt,aggregation:MRt,dependency:DRt,lollipop:ORt,point:PRt,circle:BRt,cross:FRt,barb:$Rt},GRt=NRt});function WRt(t,e){if(0===t||!Number.isInteger(t))throw new Error("Columns must be an integer !== 0.");if(e<0||!Number.isInteger(e))throw new Error("Position must be a non-negative integer."+e);return t<0?{px:e,py:0}:1===t?{px:0,py:e}:{px:e%t,py:Math.floor(e/t)}}function YRt(s,o,l=0,c=0){if(M.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 a=n.columns??-1;if(M.debug("layoutBlocks columns abc95",n.id,"=>",a,n),n.children&&0 x:${s.size.x} y:${s.size.y} ${s.widthInColumns} (width * (child?.w || 1)) / 2 `+l*(s?.widthInColumns??1)/2),e=s.size.x+u,s.size.y=d.size.y-d.size.height/2+h*(c+KRt)+c/2+KRt,M.debug(`abc88 layout blocks (calc) px, pyid:${s.id}startingPosX${e}${KRt}${u}=>x:${s.size.x}y:${s.size.y}${s.widthInColumns}(width * (child?.w || 1)) / 2`+l*(s?.widthInColumns??1)/2)),s.children&&HRt(s,i),t+=s?.widthInColumns??1,M.debug("abc88 columnsPos",s,t))}}M.debug(`layout blocks (<==layoutBlocks) ${n.id} x: ${n?.size?.x} y: ${n?.size?.y} width: `+n?.size?.width)}function VRt(t,{minX:e,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){var a,s,o,l;if(t.size&&"root"!==t.id&&({x:a,y:s,width:o,height:l}=t.size,a-o/2{e(),mu(),KRt=D()?.block?.padding??8,me(WRt,"calculateBlockPosition"),ZRt=me(t=>{let e=0,r=0;for(var n of t.children){var{width:i,height:a,x:s,y:o}=n.size??{width:0,height:0,x:0,y:0};M.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",a,"x:",s,"y:",o,n.type),"space"!==n.type&&(i>e&&(e=i/(t.widthInColumns??1)),a>r)&&(r=a)}return{width:e,height:r}},"getMaxChildSize"),me(YRt,"setBlockSizes"),me(HRt,"layoutBlocks"),me(VRt,"findBounds"),me(XRt,"layout")});function JRt(t,e){e&&t.attr("style",e)}function tMt(t){var e=H(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=t.label,i=t.isNode?"nodeLabel":"edgeLabel",a=r.append("span");return a.html(n),JRt(a,t.labelStyle),a.attr("class",i),JRt(r,t.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}var eMt,rMt,nMt,iMt,aMt,sMt=t(()=>{Q3(),e(),mu(),th(),ZE(),Y9(),me(JRt,"applyStyle"),me(tMt,"addHtmlLabel"),eMt=me(async(t,e,r,n)=>{let i=t||"";if("object"==typeof i&&(i=i[0]),Dc(D().flowchart.htmlLabels))return i=i.replace(/\\n|\n/g,"
"),M.debug("vertexText"+i),tMt({isNode:n,label:await j9(XE(i)),labelStyle:e.replace("fill:","color:")});var a,s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",e.replace("color:","fill:"));for(a of"string"==typeof i?i.split(/\\n|\n|/gi):Array.isArray(i)?i:[]){var o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),r?o.setAttribute("class","title-row"):o.setAttribute("class","row"),o.textContent=a.trim(),s.appendChild(o)}return s},"createLabel"),rMt=eMt}),oMt=t(()=>{e(),nMt=me((t,e,r,n,i)=>{e.arrowTypeStart&&aMt(t,"start",e.arrowTypeStart,r,n,i),e.arrowTypeEnd&&aMt(t,"end",e.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),iMt={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},aMt=me((t,e,r,n,i,a)=>{var s=iMt[r];s?t.attr("marker-"+e,`url(${n}#${i}_${a}-${s}${"start"===e?"Start":"End"})`):M.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function lMt(t,e){D().flowchart.htmlLabels&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}var cMt,hMt,uMt,dMt,pMt,gMt,fMt,mMt,yMt,vMt,xMt=t(()=>{e(),sMt(),Y9(),Q3(),mu(),ZE(),th(),tD(),WM(),oMt(),cMt={},hMt={},uMt=me(async(t,e)=>{var r,n=D(),i=Dc(n.flowchart.htmlLabels),n="markdown"===e.labelType?W9(t,e.label,{style:e.labelStyle,useHtmlLabels:i,addSvgBackground:!0},n):await rMt(e.label,e.labelStyle),a=t.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label");s.node().appendChild(n);let o=n.getBBox();i&&(i=n.children[0],r=H(n),o=i.getBoundingClientRect(),r.attr("width",o.width),r.attr("height",o.height)),s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),cMt[e.id]=a,e.width=o.width,e.height=o.height;let l;return e.startLabelLeft&&(i=await rMt(e.startLabelLeft,e.labelStyle),s=(r=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(i),a=i.getBBox(),s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),hMt[e.id]||(hMt[e.id]={}),hMt[e.id].startLeft=r,lMt(l,e.startLabelLeft)),e.startLabelRight&&(i=await rMt(e.startLabelRight,e.labelStyle),a=(s=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(i),a.node().appendChild(i),r=i.getBBox(),a.attr("transform","translate("+-r.width/2+", "+-r.height/2+")"),hMt[e.id]||(hMt[e.id]={}),hMt[e.id].startRight=s,lMt(l,e.startLabelRight)),e.endLabelLeft&&(i=await rMt(e.endLabelLeft,e.labelStyle),r=(a=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=r.node().appendChild(i),s=i.getBBox(),r.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),a.node().appendChild(i),hMt[e.id]||(hMt[e.id]={}),hMt[e.id].endLeft=a,lMt(l,e.endLabelLeft)),e.endLabelRight&&(r=await rMt(e.endLabelRight,e.labelStyle),i=(s=t.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=i.node().appendChild(r),a=r.getBBox(),i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),s.node().appendChild(r),hMt[e.id]||(hMt[e.id]={}),hMt[e.id].endRight=s,lMt(l,e.endLabelRight)),n},"insertEdgeLabel"),me(lMt,"setTerminalWidth"),dMt=me((n,i)=>{M.debug("Moving label abc88 ",n.id,n.label,cMt[n.id],i);var a,s=i.updatedPath||i.originalPath,o=D(),o=RM(o).subGraphTitleTotalMargin;if(n.label){let t=cMt[n.id],e=n.x,r=n.y;s&&(a=HE.calcLabelPosition(s),M.debug("Moving label "+n.label+" from (",e,",",r,") to (",a.x,",",a.y,") abc88"),i.updatedPath)&&(e=a.x,r=a.y),t.attr("transform",`translate(${e}, ${r+o/2})`)}if(n.startLabelLeft){let t=hMt[n.id].startLeft,e=n.x,r=n.y;s&&(i=HE.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_left",s),e=i.x,r=i.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.startLabelRight){let t=hMt[n.id].startRight,e=n.x,r=n.y;s&&(a=HE.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_right",s),e=a.x,r=a.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.endLabelLeft){let t=hMt[n.id].endLeft,e=n.x,r=n.y;s&&(o=HE.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_left",s),e=o.x,r=o.y),t.attr("transform",`translate(${e}, ${r})`)}if(n.endLabelRight){let t=hMt[n.id].endRight,e=n.x,r=n.y;s&&(i=HE.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_right",s),e=i.x,r=i.y),t.attr("transform",`translate(${e}, ${r})`)}},"positionEdgeLabel"),pMt=me((t,e)=>{var r=t.x,n=t.y,r=Math.abs(e.x-r),e=Math.abs(e.y-n);return t.width/2<=r||t.height/2<=e},"outsideNode"),gMt=me((t,n,i)=>{M.debug(`intersection calc abc89: + ${OK()} +`,"getStyles"),YMe=WMe}),oDe=e(()=>{t(),HMe=mt((t,e,r,n)=>{e.forEach(e=>{nDe[e](t,r,n)})},"insertMarkers"),VMe=mt((e,t,r)=>{M.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"),XMe=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"),KMe=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"),ZMe=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"),QMe=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"),JMe=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"),eDe=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"),tDe=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"),rDe=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"),nDe={extension:VMe,composition:XMe,aggregation:KMe,dependency:ZMe,lollipop:QMe,point:JMe,circle:eDe,cross:tDe,barb:rDe},iDe=HMe});function lDe(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 cDe(s,o,l=0,c=0){if(M.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 a=n.columns??-1;if(M.debug("layoutBlocks columns abc95",n.id,"=>",a,n),n.children&&0 x:${s.size.x} y:${s.size.y} ${s.widthInColumns} (width * (child?.w || 1)) / 2 `+l*(s?.widthInColumns??1)/2),t=s.size.x+u,s.size.y=d.size.y-d.size.height/2+h*(c+pDe)+c/2+pDe,M.debug(`abc88 layout blocks (calc) px, pyid:${s.id}startingPosX${t}${pDe}${u}=>x:${s.size.x}y:${s.size.y}${s.widthInColumns}(width * (child?.w || 1)) / 2`+l*(s?.widthInColumns??1)/2)),s.children&&hDe(s,i),e+=s?.widthInColumns??1,M.debug("abc88 columnsPos",s,e))}}M.debug(`layout blocks (<==layoutBlocks) ${n.id} x: ${n?.size?.x} y: ${n?.size?.y} width: `+n?.size?.width)}function uDe(e,{minX:t,minY:r,maxX:n,maxY:i}={minX:0,minY:0,maxX:0,maxY:0}){var a,s,o,l;if(e.size&&"root"!==e.id&&({x:a,y:s,width:o,height:l}=e.size,a-o/2{t(),mu(),pDe=D()?.block?.padding??8,mt(lDe,"calculateBlockPosition"),gDe=mt(e=>{let t=0,r=0;for(var n of e.children){var{width:i,height:a,x:s,y:o}=n.size??{width:0,height:0,x:0,y:0};M.debug("getMaxChildSize abc95 child:",n.id,"width:",i,"height:",a,"x:",s,"y:",o,n.type),"space"!==n.type&&(i>t&&(t=i/(e.widthInColumns??1)),a>r)&&(r=a)}return{width:t,height:r}},"getMaxChildSize"),mt(cDe,"setBlockSizes"),mt(hDe,"layoutBlocks"),mt(uDe,"findBounds"),mt(dDe,"layout")});function mDe(e,t){t&&e.attr("style",t)}function yDe(e){var t=H(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=t.append("xhtml:div"),n=e.label,i=e.isNode?"nodeLabel":"edgeLabel",a=r.append("span");return a.html(n),mDe(a,e.labelStyle),a.attr("class",i),mDe(r,e.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),t.node()}var vDe,xDe,bDe,wDe,kDe,TDe=e(()=>{Zw(),t(),mu(),eh(),KC(),WL(),mt(mDe,"applyStyle"),mt(yDe,"addHtmlLabel"),vDe=mt(async(e,t,r,n)=>{let i=e||"";if("object"==typeof i&&(i=i[0]),Dc(D().flowchart.htmlLabels))return i=i.replace(/\\n|\n/g,"
"),M.debug("vertexText"+i),yDe({isNode:n,label:await qL(VC(i)),labelStyle:t.replace("fill:","color:")});var a,s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",t.replace("color:","fill:"));for(a of"string"==typeof i?i.split(/\\n|\n|/gi):Array.isArray(i)?i:[]){var o=document.createElementNS("http://www.w3.org/2000/svg","tspan");o.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),o.setAttribute("dy","1em"),o.setAttribute("x","0"),r?o.setAttribute("class","title-row"):o.setAttribute("class","row"),o.textContent=a.trim(),s.appendChild(o)}return s},"createLabel"),xDe=vDe}),EDe=e(()=>{t(),bDe=mt((e,t,r,n,i)=>{t.arrowTypeStart&&kDe(e,"start",t.arrowTypeStart,r,n,i),t.arrowTypeEnd&&kDe(e,"end",t.arrowTypeEnd,r,n,i)},"addEdgeMarkers"),wDe={arrow_cross:"cross",arrow_point:"point",arrow_barb:"barb",arrow_circle:"circle",aggregation:"aggregation",extension:"extension",composition:"composition",dependency:"dependency",lollipop:"lollipop"},kDe=mt((e,t,r,n,i,a)=>{var s=wDe[r];s?e.attr("marker-"+t,`url(${n}#${i}_${a}-${s}${"start"===t?"Start":"End"})`):M.warn("Unknown arrow type: "+r)},"addEdgeMarker")});function CDe(e,t){D().flowchart.htmlLabels&&e&&(e.style.width=9*t.length+"px",e.style.height="12px")}var SDe,_De,ADe,LDe,NDe,IDe,RDe,MDe,DDe,ODe,PDe=e(()=>{t(),TDe(),WL(),Zw(),mu(),KC(),eh(),QD(),qD(),EDe(),SDe={},_De={},ADe=mt(async(e,t)=>{var r,n=D(),i=Dc(n.flowchart.htmlLabels),n="markdown"===t.labelType?jL(e,t.label,{style:t.labelStyle,useHtmlLabels:i,addSvgBackground:!0},n):await xDe(t.label,t.labelStyle),a=e.insert("g").attr("class","edgeLabel"),s=a.insert("g").attr("class","label");s.node().appendChild(n);let o=n.getBBox();i&&(i=n.children[0],r=H(n),o=i.getBoundingClientRect(),r.attr("width",o.width),r.attr("height",o.height)),s.attr("transform","translate("+-o.width/2+", "+-o.height/2+")"),SDe[t.id]=a,t.width=o.width,t.height=o.height;let l;return t.startLabelLeft&&(i=await xDe(t.startLabelLeft,t.labelStyle),s=(r=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(i),a=i.getBBox(),s.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),_De[t.id]||(_De[t.id]={}),_De[t.id].startLeft=r,CDe(l,t.startLabelLeft)),t.startLabelRight&&(i=await xDe(t.startLabelRight,t.labelStyle),a=(s=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=s.node().appendChild(i),a.node().appendChild(i),r=i.getBBox(),a.attr("transform","translate("+-r.width/2+", "+-r.height/2+")"),_De[t.id]||(_De[t.id]={}),_De[t.id].startRight=s,CDe(l,t.startLabelRight)),t.endLabelLeft&&(i=await xDe(t.endLabelLeft,t.labelStyle),r=(a=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=r.node().appendChild(i),s=i.getBBox(),r.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),a.node().appendChild(i),_De[t.id]||(_De[t.id]={}),_De[t.id].endLeft=a,CDe(l,t.endLabelLeft)),t.endLabelRight&&(r=await xDe(t.endLabelRight,t.labelStyle),i=(s=e.insert("g").attr("class","edgeTerminals")).insert("g").attr("class","inner"),l=i.node().appendChild(r),a=r.getBBox(),i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),s.node().appendChild(r),_De[t.id]||(_De[t.id]={}),_De[t.id].endRight=s,CDe(l,t.endLabelRight)),n},"insertEdgeLabel"),mt(CDe,"setTerminalWidth"),LDe=mt((n,i)=>{M.debug("Moving label abc88 ",n.id,n.label,SDe[n.id],i);var a,s=i.updatedPath||i.originalPath,o=D(),o=ND(o).subGraphTitleTotalMargin;if(n.label){let e=SDe[n.id],t=n.x,r=n.y;s&&(a=YC.calcLabelPosition(s),M.debug("Moving label "+n.label+" from (",t,",",r,") to (",a.x,",",a.y,") abc88"),i.updatedPath)&&(t=a.x,r=a.y),e.attr("transform",`translate(${t}, ${r+o/2})`)}if(n.startLabelLeft){let e=_De[n.id].startLeft,t=n.x,r=n.y;s&&(i=YC.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_left",s),t=i.x,r=i.y),e.attr("transform",`translate(${t}, ${r})`)}if(n.startLabelRight){let e=_De[n.id].startRight,t=n.x,r=n.y;s&&(a=YC.calcTerminalLabelPosition(n.arrowTypeStart?10:0,"start_right",s),t=a.x,r=a.y),e.attr("transform",`translate(${t}, ${r})`)}if(n.endLabelLeft){let e=_De[n.id].endLeft,t=n.x,r=n.y;s&&(o=YC.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_left",s),t=o.x,r=o.y),e.attr("transform",`translate(${t}, ${r})`)}if(n.endLabelRight){let e=_De[n.id].endRight,t=n.x,r=n.y;s&&(i=YC.calcTerminalLabelPosition(n.arrowTypeEnd?10:0,"end_right",s),t=i.x,r=i.y),e.attr("transform",`translate(${t}, ${r})`)}},"positionEdgeLabel"),NDe=mt((e,t)=>{var r=e.x,n=e.y,r=Math.abs(t.x-r),t=Math.abs(t.y-n);return e.width/2<=r||e.height/2<=t},"outsideNode"),IDe=mt((e,n,i)=>{M.debug(`intersection calc abc89: outsidePoint: ${JSON.stringify(n)} insidePoint : ${JSON.stringify(i)} - node : x:${t.x} y:${t.y} w:${t.width} h:`+t.height);let a=t.x,e=t.y,r=Math.abs(a-i.x),s=t.width/2,o=i.xMath.abs(a-n.x)*l)return t=i.y{M.debug("abc88 cutPathAtIntersect",t,n);let i=[],a=t[0],s=!1;return t.forEach(t=>{if(pMt(n,t)||s)a=t,s||i.push(t);else{let e=gMt(n,a,t),r=!1;i.forEach(t=>{r=r||t.x===e.x&&t.y===e.y}),i.some(t=>t.x===e.x&&t.y===e.y)||i.push(e),s=!0}}),i},"cutPathAtIntersect"),mMt=me(function(t,e,r,n,i,a,s){let o=r.points,l=(M.debug("abc88 InsertEdge: edge=",r,"e=",e),!1),c=a.node(e.v),h=a.node(e.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&&(M.debug("to cluster abc88",n[r.toCluster]),o=fMt(r.points,n[r.toCluster].node),l=!0),r.fromCluster&&(M.debug("from cluster abc88",n[r.fromCluster]),o=fMt(o.reverse(),n[r.fromCluster].node).reverse(),l=!0),o.filter(t=>!Number.isNaN(t.y))),d=d5,{x:p,y:g}=(!r.curve||"graph"!==i&&"flowchart"!==i||(d=r.curve),KM(r)),f=K4().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=t.append("path").attr("d",f(u)).attr("id",r.id).attr("class"," "+m+(r.classes?" "+r.classes:"")).attr("style",r.style),v="";return(D().flowchart.arrowMarkerAbsolute||D().state.arrowMarkerAbsolute)&&(v=Mc(!0)),nMt(y,r,v,s,i),a={},l&&(a.updatedPath=o),a.originalPath=r.points,a},"insertEdge")}),bMt=t(()=>{yMt=me(t=>{var e,r=new Set;for(e of t)switch(e){case"x":r.add("right"),r.add("left");break;case"y":r.add("up"),r.add("down");break;default:r.add(e)}return r},"expandAndDeduplicateDirections"),vMt=me((t,e,r)=>{var t=yMt(t),n=e.height+2*r.padding,i=n/2,e=e.width+2*i+r.padding,r=r.padding/2;return t.has("right")&&t.has("left")&&t.has("up")&&t.has("down")?[{x:0,y:0},{x:i,y:0},{x:e/2,y:2*r},{x:e-i,y:0},{x:e,y:0},{x:e,y:-n/3},{x:e+2*r,y:-n/2},{x:e,y:-2*n/3},{x:e,y:-n},{x:e-i,y:-n},{x:e/2,y:-n-2*r},{x:i,y:-n},{x:0,y:-n},{x:0,y:-2*n/3},{x:-2*r,y:-n/2},{x:0,y:-n/3}]:t.has("right")&&t.has("left")&&t.has("up")?[{x:i,y:0},{x:e-i,y:0},{x:e,y:-n/2},{x:e-i,y:-n},{x:i,y:-n},{x:0,y:-n/2}]:t.has("right")&&t.has("left")&&t.has("down")?[{x:0,y:0},{x:i,y:-n},{x:e-i,y:-n},{x:e,y:0}]:t.has("right")&&t.has("up")&&t.has("down")?[{x:0,y:0},{x:e,y:-i},{x:e,y:i-n},{x:0,y:-n}]:t.has("left")&&t.has("up")&&t.has("down")?[{x:e,y:0},{x:0,y:-i},{x:0,y:i-n},{x:e,y:-n}]:t.has("right")&&t.has("left")?[{x:i,y:0},{x:i,y:-r},{x:e-i,y:-r},{x:e-i,y:0},{x:e,y:-n/2},{x:e-i,y:-n},{x:e-i,y:r-n},{x:i,y:r-n},{x:i,y:-n},{x:0,y:-n/2}]:t.has("up")&&t.has("down")?[{x:e/2,y:0},{x:0,y:-r},{x:i,y:-r},{x:i,y:r-n},{x:0,y:r-n},{x:e/2,y:-n},{x:e,y:r-n},{x:e-i,y:r-n},{x:e-i,y:-r},{x:e,y:-r}]:t.has("right")&&t.has("up")?[{x:0,y:0},{x:e,y:-i},{x:0,y:-n}]:t.has("right")&&t.has("down")?[{x:0,y:0},{x:e,y:0},{x:0,y:-n}]:t.has("left")&&t.has("up")?[{x:e,y:0},{x:0,y:-i},{x:e,y:-n}]:t.has("left")&&t.has("down")?[{x:e,y:0},{x:0,y:0},{x:e,y:-n}]:t.has("right")?[{x:i,y:-r},{x:i,y:-r},{x:e-i,y:-r},{x:e-i,y:0},{x:e,y:-n/2},{x:e-i,y:-n},{x:e-i,y:r-n},{x:i,y:r-n},{x:i,y:r-n}]:t.has("left")?[{x:i,y:0},{x:i,y:-r},{x:e-i,y:-r},{x:e-i,y:r-n},{x:i,y:r-n},{x:i,y:-n},{x:0,y:-n/2}]:t.has("up")?[{x:i,y:-r},{x:i,y:r-n},{x:0,y:r-n},{x:e/2,y:-n},{x:e,y:r-n},{x:e-i,y:r-n},{x:e-i,y:-r}]:t.has("down")?[{x:e/2,y:0},{x:0,y:-r},{x:i,y:-r},{x:i,y:r-n},{x:e-i,y:r-n},{x:e-i,y:-r},{x:e,y:-r}]:[{x:0,y:0}]},"getArrowPoints")});function wMt(t,e){return t.intersect(e)}var kMt,TMt=t(()=>{me(wMt,"intersectNode"),kMt=wMt});function EMt(t,e,r,n){var i=t.x,t=t.y,a=i-n.x,s=t-n.y,o=Math.sqrt(e*e*s*s+r*r*a*a),a=Math.abs(e*r*a/o),e=(n.x{me(EMt,"intersectEllipse"),CMt=EMt});function SMt(t,e,r){return CMt(t,e,e,r)}var AMt,LMt=t(()=>{_Mt(),me(SMt,"intersectCircle"),AMt=SMt});function NMt(t,e,r,n){var i,a,s,o,l=e.y-t.y,c=t.x-e.x,h=e.x*t.y-t.x*e.y,u=l*r.x+c*r.y+h,d=l*n.x+c*n.y+h;if(!(0!=u&&0!=d&&0{me(NMt,"intersectLine"),me(IMt,"sameSign"),RMt=NMt});function DMt(t,e,n){var r=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){s=Math.min(s,t.x),o=Math.min(o,t.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));for(var l=r-t.width/2-s,c=i-t.height/2-o,h=0;h{MMt(),me(OMt=DMt,"intersectPolygon")}),zMt=t(()=>{PMt=me((t,e)=>{var r,n=t.x,i=t.y,a=e.x-n,e=e.y-i,s=t.width/2,t=t.height/2,t=Math.abs(e)*s>Math.abs(a)*t?(e<0&&(t=-t),r=0==e?0:t*a/e,t):(r=s=a<0?-s:s,0==a?0:s*e/a);return{x:n+r,y:i+t}},"intersectRect"),BMt=PMt}),GMt=t(()=>{TMt(),LMt(),_Mt(),$Mt(),zMt(),FMt={node:kMt,circle:AMt,ellipse:CMt,polygon:OMt,rect:BMt}});function UMt(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}var qMt,jMt,WMt,YMt,HMt=t(()=>{sMt(),Y9(),mu(),Q3(),th(),ZE(),qMt=me(async(t,e,r,i)=>{let a=D(),n,s=e.useHtmlLabels||Dc(a.flowchart.htmlLabels),o=(n=r||"node default",t.insert("g").attr("class",n).attr("id",e.domId||e.id)),l=o.insert("g").attr("class","label").attr("style",e.labelStyle),c,h=(c=void 0===e.labelText?"":"string"==typeof e.labelText?e.labelText:e.labelText[0],l.node()),u,d=(u="markdown"===e.labelType?W9(l,Sc(XE(c),a),{useHtmlLabels:s,width:e.width||a.flowchart.wrappingWidth,classes:"markdown-node-label"},a):h.appendChild(await rMt(Sc(XE(c),a),e.labelStyle,!1,i))).getBBox(),p=e.padding/2;if(Dc(a.flowchart.htmlLabels)){if(r=u.children[0],t=H(u),i=r.getElementsByTagName("img")){let n=""===c.replace(/]*>/g,"").trim();await Promise.all([...i].map(r=>new Promise(e=>{function t(){var t;r.style.display="flex",r.style.flexDirection="column",n?(t=a.fontSize||window.getComputedStyle(document.body).fontSize,t=5*parseInt(t,10)+"px",r.style.minWidth=t,r.style.maxWidth=t):r.style.width="100%",e(r)}me(t,"setupImage"),setTimeout(()=>{r.complete&&t()}),r.addEventListener("error",t),r.addEventListener("load",t)})))}d=r.getBoundingClientRect(),t.attr("width",d.width),t.attr("height",d.height)}return s?l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):l.attr("transform","translate(0, "+-d.height/2+")"),e.centerLabel&&l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:o,bbox:d,halfPadding:p,label:l}},"labelHelper"),jMt=me((t,e)=>{e=e.node().getBBox(),t.width=e.width,t.height=e.height},"updateNodeBounds"),me(UMt,"insertPolygonShape")}),VMt=t(()=>{HMt(),e(),mu(),GMt(),WMt=me(async(t,e)=>{e.useHtmlLabels||D().flowchart.htmlLabels||(e.centerLabel=!0);var{shapeSvg:t,bbox:r,halfPadding:n}=await qMt(t,e,"node "+e.classes,!0),i=(M.info("Classes = ",e.classes),t.insert("rect",":first-child"));return i.attr("rx",e.rx).attr("ry",e.ry).attr("x",-r.width/2-n).attr("y",-r.height/2-n).attr("width",r.width+e.padding).attr("height",r.height+e.padding),jMt(e,i),e.intersect=function(t){return FMt.rect(e,t)},t},"note"),YMt=WMt});function XMt(t,e,r,n){let i=[],a=me(t=>{i.push(t,0)},"addBorder"),s=me(t=>{i.push(0,t)},"skipBorder");(e.includes("t")?(M.debug("add top border"),a):s)(r),(e.includes("r")?(M.debug("add right border"),a):s)(n),(e.includes("b")?(M.debug("add bottom border"),a):s)(r),(e.includes("l")?(M.debug("add left border"),a):s)(n),t.attr("stroke-dasharray",i.join(" "))}var KMt,ZMt,QMt,JMt,tDt,eDt,rDt,nDt,iDt,aDt,sDt,oDt,lDt,cDt,hDt,uDt,dDt,pDt,gDt,fDt,mDt,yDt,vDt,xDt,bDt,wDt,kDt,TDt,EDt,CDt=t(()=>{Q3(),mu(),th(),e(),bMt(),sMt(),GMt(),VMt(),HMt(),KMt=me(t=>t?" "+t:"","formatClass"),ZMt=me((t,e)=>`${e||"node default"}${KMt(t.classes)} `+KMt(t.class),"getClassesFromNode"),QMt=me(async(t,e)=>{let{shapeSvg:r,bbox:n}=await qMt(t,e,ZMt(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=i+a,o=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];return M.info("Question main (Circle)"),(t=UMt(r,s,s,o)).attr("style",e.style),jMt(e,t),e.intersect=function(t){return M.warn("Intersect called"),FMt.polygon(e,o,t)},r},"question"),JMt=me((t,e)=>((t=t.insert("g").attr("class","node default").attr("id",e.domId||e.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(t){return t.x+","+t.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(t){return FMt.circle(e,14,t)},t),"choice"),tDt=me(async(t,e)=>{let{shapeSvg:r,bbox:n}=await qMt(t,e,ZMt(e,void 0),!0),i=n.height+e.padding,a=i/4,s=n.width+2*a+e.padding,o=[{x:a,y:0},{x:s-a,y:0},{x:s,y:-i/2},{x:s-a,y:-i},{x:a,y:-i},{x:0,y:-i/2}],l=UMt(r,s,i,o);return l.attr("style",e.style),jMt(e,l),e.intersect=function(t){return FMt.polygon(e,o,t)},r},"hexagon"),eDt=me(async(t,e)=>{let{shapeSvg:r,bbox:n}=await qMt(t,e,void 0,!0),i=n.height+2*e.padding,a=i/2,s=n.width+2*a+e.padding,o=vMt(e.directions,n,e),l=UMt(r,s,i,o);return l.attr("style",e.style),jMt(e,l),e.intersect=function(t){return FMt.polygon(e,o,t)},r},"block_arrow"),rDt=me(async(t,e)=>{let{shapeSvg:r,bbox:n}=await qMt(t,e,ZMt(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return UMt(r,i,a,s).attr("style",e.style),e.width=i+a,e.height=a,e.intersect=function(t){return FMt.polygon(e,s,t)},r},"rect_left_inv_arrow"),nDt=me(async(t,e)=>{let{shapeSvg:r,bbox:n}=await qMt(t,e,ZMt(e),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],o=UMt(r,i,a,s);return o.attr("style",e.style),jMt(e,o),e.intersect=function(t){return FMt.polygon(e,s,t)},r},"lean_right"),iDt=me(async(t,e)=>{let{shapeSvg:r,bbox:n}=await qMt(t,e,ZMt(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],o=UMt(r,i,a,s);return o.attr("style",e.style),jMt(e,o),e.intersect=function(t){return FMt.polygon(e,s,t)},r},"lean_left"),aDt=me(async(t,e)=>{let{shapeSvg:r,bbox:n}=await qMt(t,e,ZMt(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],o=UMt(r,i,a,s);return o.attr("style",e.style),jMt(e,o),e.intersect=function(t){return FMt.polygon(e,s,t)},r},"trapezoid"),sDt=me(async(t,e)=>{let{shapeSvg:r,bbox:n}=await qMt(t,e,ZMt(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],o=UMt(r,i,a,s);return o.attr("style",e.style),jMt(e,o),e.intersect=function(t){return FMt.polygon(e,s,t)},r},"inv_trapezoid"),oDt=me(async(t,e)=>{let{shapeSvg:r,bbox:n}=await qMt(t,e,ZMt(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],o=UMt(r,i,a,s);return o.attr("style",e.style),jMt(e,o),e.intersect=function(t){return FMt.polygon(e,s,t)},r},"rect_right_inv_arrow"),lDt=me(async(t,i)=>{let{shapeSvg:e,bbox:r}=await qMt(t,i,ZMt(i,void 0),!0),n=r.width+i.padding,a=n/2,s=a/(2.5+n/50),o=r.height+s+i.padding,l="M 0,"+s+" a "+a+","+s+" 0,0,0 "+n+" 0 a "+a+","+s+" 0,0,0 "+-n+" 0 l 0,"+o+" a "+a+","+s+" 0,0,0 "+n+" 0 l 0,"+-o,c=e.attr("label-offset-y",s).insert("path",":first-child").attr("style",i.style).attr("d",l).attr("transform","translate("+-n/2+","+-(o/2+s)+")");return jMt(i,c),i.intersect=function(e){var r=FMt.rect(i,e),n=r.x-i.x;if(0!=a&&(Math.abs(n)i.height/2-s)){let t=s*s*(1-n*n/(a*a));0!=t&&(t=Math.sqrt(t)),t=s-t,0{var{shapeSvg:t,bbox:r,halfPadding:n}=await qMt(t,e,"node "+e.classes+" "+e.class,!0),i=t.insert("rect",":first-child"),a=e.positioned?e.width:r.width+e.padding,s=e.positioned?e.height:r.height+e.padding,o=e.positioned?-a/2:-r.width/2-n,r=e.positioned?-s/2:-r.height/2-n;return i.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",o).attr("y",r).attr("width",a).attr("height",s),e.props&&(n=new Set(Object.keys(e.props)),e.props.borders&&(XMt(i,e.props.borders,a,s),n.delete("borders")),n.forEach(t=>{M.warn("Unknown node property "+t)})),jMt(e,i),e.intersect=function(t){return FMt.rect(e,t)},t},"rect"),hDt=me(async(t,e)=>{var{shapeSvg:t,bbox:r,halfPadding:n}=await qMt(t,e,"node "+e.classes,!0),i=t.insert("rect",":first-child"),a=e.positioned?e.width:r.width+e.padding,s=e.positioned?e.height:r.height+e.padding,o=e.positioned?-a/2:-r.width/2-n,r=e.positioned?-s/2:-r.height/2-n;return i.attr("class","basic cluster composite label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",o).attr("y",r).attr("width",a).attr("height",s),e.props&&(n=new Set(Object.keys(e.props)),e.props.borders&&(XMt(i,e.props.borders,a,s),n.delete("borders")),n.forEach(t=>{M.warn("Unknown node property "+t)})),jMt(e,i),e.intersect=function(t){return FMt.rect(e,t)},t},"composite"),uDt=me(async(t,e)=>{var r,t=(await qMt(t,e,"label",!0)).shapeSvg,n=(M.trace("Classes = ",e.class),t.insert("rect",":first-child"));return n.attr("width",0).attr("height",0),t.attr("class","label edgeLabel"),e.props&&(r=new Set(Object.keys(e.props)),e.props.borders&&(XMt(n,e.props.borders,0,0),r.delete("borders")),r.forEach(t=>{M.warn("Unknown node property "+t)})),jMt(e,n),e.intersect=function(t){return FMt.rect(e,t)},t},"labelRect"),me(XMt,"applyNodePropertyBorders"),dDt=me(async(t,e)=>{let r,n=(r=e.classes?"node "+e.classes:"node default",t.insert("g").attr("class",r).attr("id",e.domId||e.id)),i=n.insert("rect",":first-child"),a=n.insert("line"),s=n.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText,l,c=(l="object"==typeof o?o[0]:o,M.info("Label text abc79",l,o,"object"==typeof o),s.node().appendChild(await rMt(l,e.labelStyle,!0,!0))),h={width:0,height:0};Dc(D().flowchart.htmlLabels)&&(t=c.children[0],d=H(c),h=t.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)),M.info("Text 2",o);var u,t=o.slice(1,o.length),d=c.getBBox(),t=s.node().appendChild(await rMt(t.join?t.join("
"):t,e.labelStyle,!0,!0)),p=(Dc(D().flowchart.htmlLabels)&&(p=t.children[0],u=H(t),h=p.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)),e.padding/2);return H(t).attr("transform","translate( "+(h.width>d.width?0:(d.width-h.width)/2)+", "+(d.height+p+5)+")"),H(c).attr("transform","translate( "+(h.width{var{shapeSvg:t,bbox:r}=await qMt(t,e,ZMt(e,void 0),!0),n=r.height+e.padding,r=r.width+n/4+e.padding,r=t.insert("rect",":first-child").attr("style",e.style).attr("rx",n/2).attr("ry",n/2).attr("x",-r/2).attr("y",-n/2).attr("width",r).attr("height",n);return jMt(e,r),e.intersect=function(t){return FMt.rect(e,t)},t},"stadium"),gDt=me(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await qMt(t,e,ZMt(e,void 0),!0),a=r.insert("circle",":first-child");return a.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),M.info("Circle main"),jMt(e,a),e.intersect=function(t){return M.info("Circle intersect",e,n.width/2+i,t),FMt.circle(e,n.width/2+i,t)},r},"circle"),fDt=me(async(t,e)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await qMt(t,e,ZMt(e,void 0),!0),a=r.insert("g",":first-child"),s=a.insert("circle"),o=a.insert("circle");return a.attr("class",e.class),s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i+5).attr("width",n.width+e.padding+10).attr("height",n.height+e.padding+10),o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),M.info("DoubleCircle main"),jMt(e,s),e.intersect=function(t){return M.info("DoubleCircle intersect",e,n.width/2+i+5,t),FMt.circle(e,n.width/2+i+5,t)},r},"doublecircle"),mDt=me(async(t,e)=>{let{shapeSvg:r,bbox:n}=await qMt(t,e,ZMt(e,void 0),!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],o=UMt(r,i,a,s);return o.attr("style",e.style),jMt(e,o),e.intersect=function(t){return FMt.polygon(e,s,t)},r},"subroutine"),yDt=me((t,e)=>{var r=(t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id)).insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),jMt(e,r),e.intersect=function(t){return FMt.circle(e,7,t)},t},"start"),vDt=me((t,e,r)=>{let n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=70,a=10;return"LR"===r&&(i=10,a=70),t=n.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join"),jMt(e,t),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return FMt.rect(e,t)},n},"forkJoin"),xDt=me((t,e)=>{var r=(t=t.insert("g").attr("class","node default").attr("id",e.domId||e.id)).insert("circle",":first-child"),n=t.insert("circle",":first-child");return n.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),jMt(e,n),e.intersect=function(t){return FMt.circle(e,7,t)},t},"end"),bDt=me(async(t,s)=>{let e=s.padding/2,r,n=(r=s.classes?"node "+s.classes:"node default",t.insert("g").attr("class",r).attr("id",s.domId||s.id)),i=n.insert("rect",":first-child"),a=n.insert("line"),o=n.insert("line"),l=0,c=4,h=n.insert("g").attr("class","label"),u=0,d=s.classData.annotations?.[0],p=s.classData.annotations[0]?"«"+s.classData.annotations[0]+"»":"",g=h.node().appendChild(await rMt(p,s.labelStyle,!0,!0)),f=g.getBBox(),m=(Dc(D().flowchart.htmlLabels)&&(t=g.children[0],y=H(g),f=t.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&&(D().flowchart.htmlLabels?m+="<"+s.classData.type+">":m+="<"+s.classData.type+">"),H(t=h.node().appendChild(await rMt(m,s.labelStyle,!0,!0))).attr("class","classTitle");let v=t.getBBox(),x=(Dc(D().flowchart.htmlLabels)&&(y=t.children[0],w=H(t),v=y.getBoundingClientRect(),w.attr("width",v.width),w.attr("height",v.height)),c+=v.height+4,v.width>l&&(l=v.width),[]),b=(s.classData.members.forEach(async t=>{let e=t.getDisplayDetails(),r=e.displayText,n=(D().flowchart.htmlLabels&&(r=r.replace(//g,">")),h.node().appendChild(await rMt(r,e.cssStyle||s.labelStyle,!0,!0))),i=n.getBBox(),a;Dc(D().flowchart.htmlLabels)&&(t=n.children[0],a=H(n),i=t.getBoundingClientRect(),a.attr("width",i.width),a.attr("height",i.height)),i.width>l&&(l=i.width),c+=i.height+4,x.push(n)}),c+=8,[]);s.classData.methods.forEach(async t=>{let e=t.getDisplayDetails(),r=e.displayText,n=(D().flowchart.htmlLabels&&(r=r.replace(//g,">")),h.node().appendChild(await rMt(r,e.cssStyle||s.labelStyle,!0,!0))),i=n.getBBox(),a;Dc(D().flowchart.htmlLabels)&&(t=n.children[0],a=H(n),i=t.getBoundingClientRect(),a.attr("width",i.width),a.attr("height",i.height)),i.width>l&&(l=i.width),c+=i.height+4,b.push(n)}),c+=8,d&&(y=(l-f.width)/2,H(g).attr("transform","translate( "+(-1*l/2+y)+", "+-1*c/2+")"),u=f.height+4);var w=(l-v.width)/2;return H(t).attr("transform","translate( "+(-1*l/2+w)+", "+(-1*c/2+u)+")"),u+=v.height+4,a.attr("class","divider").attr("x1",-l/2-e).attr("x2",l/2+e).attr("y1",-c/2-e+8+u).attr("y2",-c/2-e+8+u),u+=8,x.forEach(t=>{H(t).attr("transform","translate( "+-l/2+", "+(-1*c/2+u+4)+")"),t=t?.getBBox(),u+=(t?.height??0)+4}),u+=8,o.attr("class","divider").attr("x1",-l/2-e).attr("x2",l/2+e).attr("y1",-c/2-e+8+u).attr("y2",-c/2-e+8+u),u+=8,b.forEach(t=>{H(t).attr("transform","translate( "+-l/2+", "+(-1*c/2+u)+")"),t=t?.getBBox(),u+=(t?.height??0)+4}),i.attr("style",s.style).attr("class","outer title-state").attr("x",-l/2-e).attr("y",-c/2-e).attr("width",l+s.padding).attr("height",c+s.padding),jMt(s,i),s.intersect=function(t){return FMt.rect(s,t)},n},"class_box"),wDt={rhombus:QMt,composite:hDt,question:QMt,rect:cDt,labelRect:uDt,rectWithTitle:dDt,choice:JMt,circle:gDt,doublecircle:fDt,stadium:pDt,hexagon:tDt,block_arrow:eDt,rect_left_inv_arrow:rDt,lean_right:nDt,lean_left:iDt,trapezoid:aDt,inv_trapezoid:sDt,rect_right_inv_arrow:oDt,cylinder:lDt,start:yDt,end:xDt,note:YMt,subroutine:mDt,fork:vDt,join:vDt,class_box:bDt},kDt={},TDt=me(async(e,r,n)=>{let i,a;if(r.link){let t;"sandbox"===D().securityLevel?t="_top":r.linkTarget&&(t=r.linkTarget||"_blank"),i=e.insert("svg:a").attr("xlink:href",r.link).attr("target",t),a=await wDt[r.shape](i,r,n)}else a=await wDt[r.shape](e,r,n),i=a;return r.tooltip&&a.attr("title",r.tooltip),r.class&&a.attr("class","node default "+r.class),kDt[r.id]=i,r.haveCallback&&kDt[r.id].attr("class",kDt[r.id].attr("class")+" clickable"),i},"insertNode"),EDt=me(t=>{var e=kDt[t.id],r=(M.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")"),t.diff||0);return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode")});function _Dt(t,e,r=!1){let n=t,i="default",a=(0<(n?.classes?.length||0)&&(i=(n?.classes??[]).join(" ")),i+=" flowchart-label",0),s="",o;switch(n.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 t=fE(n?.styles??[]),l=n.size??{width:0,height:0,x:0,y:0};return{labelStyle:t.labelStyle,shape:s,labelText:n.label,rx:a,ry:a,class:i,style:t.style,id:n.id,directions:n.directions,width:l.width,height:l.height,x:l.x,y:l.y,positioned:r,intersect:void 0,type:n.type,padding:o??Ir()?.block?.padding??0}}async function SDt(t,e,r){var n;"group"!==(e=_Dt(e,0,!1)).type&&(n=Ir(),n=(t=await TDt(t,e,{config:n})).node().getBBox(),(e=r.getBlock(e.id)).size={width:n.width,height:n.height,x:0,y:0,node:t},r.setBlock(e),t.remove())}async function ADt(t,e,r){var n=_Dt(e,0,!0);"space"!==r.getBlock(n.id).type&&(r=Ir(),await TDt(t,n,{config:r}),e.intersect=n?.intersect,EDt(n))}async function LDt(t,e,r,n){for(var i of e)await n(t,i,r),i.children&&await LDt(t,i.children,r,n)}async function NDt(t,e,r){await LDt(t,e,r,SDt)}async function IDt(t,e,r){await LDt(t,e,r,ADt)}async function RDt(t,e,r,n,i){var a,s,o,l,c=new FW({multigraph:!0,compound:!0});c.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(a of r)a.size&&c.setNode(a.id,{width:a.size.width,height:a.size.height,intersect:a.intersect});for(s of e)s.start&&s.end&&(l=n.getBlock(s.start),o=n.getBlock(s.end),l?.size)&&o?.size&&(l=l.size,o=o.size,l=[{x:l.x,y:l.y},{x:l.x+(o.x-l.x)/2,y:l.y+(o.y-l.y)/2},{x:o.x,y:o.y}],mMt(t,{v:s.start,w:s.end,name:s.id},{...s,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",c,i),s.label)&&(await uMt(t,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),dMt({...s,x:l[1].x,y:l[1].y},{originalPath:l}))}var MDt,DDt,ODt,PDt=t(()=>{zW(),Nn(),xMt(),CDt(),ZE(),me(_Dt,"getNodeFromBlock"),me(SDt,"calculateBlockSize"),me(ADt,"insertBlockPositioned"),me(LDt,"performOperations"),me(NDt,"calculateBlockSizes"),me(IDt,"insertBlocks"),me(RDt,"insertEdges")}),BDt=t(()=>{Q3(),Nn(),jRt(),e(),eh(),QRt(),PDt(),MDt=me(function(t,e){return e.db.getClasses()},"getClasses"),DDt=me(async function(t,e,r,n){let{securityLevel:i,block:a}=Ir(),s=n.db,o;"sandbox"===i&&(o=H("#i"+e));var l=H("sandbox"===i?o.nodes()[0].contentDocument.body:"body"),l="sandbox"===i?l.select(`[id="${e}"]`):H(`[id="${e}"]`),n=(GRt(l,["point","circle","cross"],n.type,e),s.getBlocks()),c=s.getBlocksFlat(),h=s.getEdges(),u=l.insert("g").attr("class","block"),d=(await NDt(u,n,s),XRt(s));await IDt(u,n,s),await RDt(u,h,c,s,e),d&&(n=d,u=Math.max(1,Math.round(n.width/n.height*.125)),h=n.height+u+10,c=n.width+10,e=a.useMaxWidth,Vc(l,h,c,!!e),M.debug("Here Bounds",d,n),l.attr("viewBox",`${n.x-5} ${n.y-5} ${n.width+10} `+(n.height+10)))},"draw"),ODt={draw:DDt,getClasses:MDt}}),FDt={};oPt(FDt,{diagram:()=>$Dt});var $Dt,zDt,GDt,UDt,qDt,jDt,WDt,YDt,HDt,VDt,XDt,KDt,ZDt,QDt,JDt,tOt,eOt,rOt,nOt,iOt=t(()=>{QIt(),URt(),qRt(),BDt(),$Dt={parser:KIt,db:_Rt,renderer:ODt,styles:LRt}}),aOt=t(()=>{zDt={L:"left",R:"right",T:"top",B:"bottom"},GDt={L:me(t=>t+`,${t/2} 0,${t} 0,0`,"L"),R:me(t=>`0,${t/2} ${t},0 ${t},`+t,"R"),T:me(t=>`0,0 ${t},0 ${t/2},`+t,"T"),B:me(t=>t/2+`,0 ${t},${t} 0,`+t,"B")},UDt={L:me((t,e)=>t-e+2,"L"),R:me((t,e)=>t-2,"R"),T:me((t,e)=>t-e+2,"T"),B:me((t,e)=>t-2,"B")},qDt=me(function(t){return WDt(t)?"L"===t?"R":"L":"T"===t?"B":"T"},"getOppositeArchitectureDirection"),jDt=me(function(t){return"L"===t||"R"===t||"T"===t||"B"===t},"isArchitectureDirection"),WDt=me(function(t){return"L"===t||"R"===t},"isArchitectureDirectionX"),YDt=me(function(t){return"T"===t||"B"===t},"isArchitectureDirectionY"),HDt=me(function(t,e){var r=WDt(t)&&YDt(e),t=YDt(t)&&WDt(e);return r||t},"isArchitectureDirectionXY"),VDt=me(function(t){var e=t[0],t=t[1],r=WDt(e)&&YDt(t),e=YDt(e)&&WDt(t);return r||e},"isArchitecturePairXY"),XDt=me(function(t){return"LL"!==t&&"RR"!==t&&"TT"!==t&&"BB"!==t},"isValidArchitectureDirectionPair"),KDt=me(function(t,e){return XDt(t=""+t+e)?t:void 0},"getArchitectureDirectionPair"),ZDt=me(function([t,e],r){var n=r[0],r=r[1];return WDt(n)?YDt(r)?[t+("L"===n?-1:1),e+("T"===r?1:-1)]:[t+("L"===n?-1:1),e]:WDt(r)?[t+("L"===r?1:-1),e+("T"===n?1:-1)]:[t,e+("T"===n?1:-1)]},"shiftPositionByArchitectureDirectionPair"),QDt=me(function(t){return"LT"===t||"TL"===t?[1,1]:"BL"===t||"LB"===t?[1,-1]:"BR"===t||"RB"===t?[-1,-1]:[-1,1]},"getArchitectureDirectionXYFactors"),JDt=me(function(t,e){return HDt(t,e)?"bend":WDt(t)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),tOt=me(function(t){return"service"===t.type},"isArchitectureService"),eOt=me(function(t){return"junction"===t.type},"isArchitectureJunction"),rOt=me(t=>t.data(),"edgeData"),nOt=me(t=>t.data(),"nodeData")});function sOt(t){return TOt()[t]}var oOt,lOt,cOt,hOt,uOt,dOt,pOt,gOt,fOt,mOt,yOt,vOt,xOt,bOt,wOt,kOt,TOt,EOt,COt,_Ot,SOt,AOt,LOt,NOt,IOt,ROt,MOt,DOt,OOt=t(()=>{An(),Nn(),$pt(),fu(),aOt(),ZE(),oOt=yr.architecture,lOt=new Ppt(()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:oOt,dataStructures:void 0,elements:{}})),cOt=me(()=>{lOt.reset(),lh()},"clear"),hOt=me(function({id:t,icon:e,in:r,title:n,iconText:i}){if(void 0!==lOt.records.registeredIds[t])throw new Error(`The service id [${t}] is already in use by another `+lOt.records.registeredIds[t]);if(void 0!==r){if(t===r)throw new Error(`The service [${t}] cannot be placed within itself`);if(void 0===lOt.records.registeredIds[r])throw new Error(`The service [${t}]'s parent does not exist. Please make sure the parent is created before this service`);if("node"===lOt.records.registeredIds[r])throw new Error(`The service [${t}]'s parent is not a group`)}lOt.records.registeredIds[t]="node",lOt.records.nodes[t]={id:t,type:"service",icon:e,iconText:i,title:n,edges:[],in:r}},"addService"),uOt=me(()=>Object.values(lOt.records.nodes).filter(tOt),"getServices"),dOt=me(function({id:t,in:e}){lOt.records.registeredIds[t]="node",lOt.records.nodes[t]={id:t,type:"junction",edges:[],in:e}},"addJunction"),pOt=me(()=>Object.values(lOt.records.nodes).filter(eOt),"getJunctions"),gOt=me(()=>Object.values(lOt.records.nodes),"getNodes"),fOt=me(t=>lOt.records.nodes[t],"getNode"),mOt=me(function({id:t,icon:e,in:r,title:n}){if(void 0!==lOt.records.registeredIds[t])throw new Error(`The group id [${t}] is already in use by another `+lOt.records.registeredIds[t]);if(void 0!==r){if(t===r)throw new Error(`The group [${t}] cannot be placed within itself`);if(void 0===lOt.records.registeredIds[r])throw new Error(`The group [${t}]'s parent does not exist. Please make sure the parent is created before this group`);if("node"===lOt.records.registeredIds[r])throw new Error(`The group [${t}]'s parent is not a group`)}lOt.records.registeredIds[t]="group",lOt.records.groups[t]={id:t,icon:e,title:n,in:r}},"addGroup"),yOt=me(()=>Object.values(lOt.records.groups),"getGroups"),vOt=me(function({lhsId:t,rhsId:e,lhsDir:r,rhsDir:n,lhsInto:i,rhsInto:a,lhsGroup:s,rhsGroup:o,title:l}){if(!jDt(r))throw new Error(`Invalid direction given for left hand side of edge ${t}--${e}. Expected (L,R,T,B) got `+r);if(!jDt(n))throw new Error(`Invalid direction given for right hand side of edge ${t}--${e}. Expected (L,R,T,B) got `+n);if(void 0===lOt.records.nodes[t]&&void 0===lOt.records.groups[t])throw new Error(`The left-hand id [${t}] does not yet exist. Please create the service/group before declaring an edge to it.`);if(void 0===lOt.records.nodes[e]&&void 0===lOt.records.groups[t])throw new Error(`The right-hand id [${e}] does not yet exist. Please create the service/group before declaring an edge to it.`);var c=lOt.records.nodes[t].in,h=lOt.records.nodes[e].in;if(s&&c&&h&&c==h)throw new Error(`The left-hand id [${t}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);if(o&&c&&h&&c==h)throw new Error(`The right-hand id [${e}] is modified to traverse the group boundary, but the edge does not pass through two groups.`);lOt.records.edges.push({lhsId:t,lhsDir:r,lhsInto:i,lhsGroup:s,rhsId:e,rhsDir:n,rhsInto:a,rhsGroup:o,title:l}),lOt.records.nodes[t]&&lOt.records.nodes[e]&&(lOt.records.nodes[t].edges.push(lOt.records.edges[lOt.records.edges.length-1]),lOt.records.nodes[e].edges.push(lOt.records.edges[lOt.records.edges.length-1]))},"addEdge"),xOt=me(()=>lOt.records.edges,"getEdges"),bOt=me(()=>{if(void 0===lOt.records.dataStructures){let s={},o=Object.entries(lOt.records.nodes).reduce((t,[a,e])=>(t[a]=e.edges.reduce((t,e)=>{var r,n=fOt(e.lhsId)?.in,i=fOt(e.rhsId)?.in;return n&&i&&n!==i&&"bend"!==(r=JDt(e.lhsDir,e.rhsDir))&&(s[n]??={},s[n][i]=r,s[i]??={},s[i][n]=r),e.lhsId===a?(i=KDt(e.lhsDir,e.rhsDir))&&(t[i]=e.rhsId):(n=KDt(e.rhsDir,e.lhsDir))&&(t[n]=e.lhsId),t},{}),t),{}),r=Object.keys(o)[0],l={[r]:1},c=Object.keys(o).reduce((t,e)=>e===r?t:{...t,[e]:1},{}),t=me(t=>{let i={[t]:[0,0]},a=[t];for(;0{l[e]||(i[e]=ZDt([r,n],t),a.push(e))})}}return i},"BFS"),e=[t(r)];for(;0{lOt.records.elements[t]=e},"setElementForId"),kOt=me(t=>lOt.records.elements[t],"getElementById"),TOt=me(()=>bE({...oOt,...Ir().architecture}),"getConfig"),EOt={clear:cOt,setDiagramTitle:ph,getDiagramTitle:gh,setAccTitle:ch,getAccTitle:hh,setAccDescription:uh,getAccDescription:dh,getConfig:TOt,addService:hOt,getServices:uOt,addJunction:dOt,getJunctions:pOt,getNodes:gOt,getNode:fOt,addGroup:mOt,getGroups:yOt,addEdge:vOt,getEdges:xOt,setElementForId:wOt,getElementById:kOt,getDataStructures:bOt},me(sOt,"getConfigField")}),POt=t(()=>{Mpt(),e(),Bpt(),OOt(),COt=me((t,e)=>{Dpt(t,e),t.groups.map(e.addGroup),t.services.map(t=>e.addService({...t,type:"service"})),t.junctions.map(t=>e.addJunction({...t,type:"junction"})),t.edges.map(e.addEdge)},"populateDb"),_Ot={parse:me(async t=>{t=await Lpt("architecture",t),M.debug(t),COt(t,EOt)},"parse")}}),BOt=t(()=>{SOt=me(t=>` + node : x:${e.x} y:${e.y} w:${e.width} h:`+e.height);let a=e.x,t=e.y,r=Math.abs(a-i.x),s=e.width/2,o=i.xMath.abs(a-n.x)*l)return e=i.y{M.debug("abc88 cutPathAtIntersect",e,n);let i=[],a=e[0],s=!1;return e.forEach(e=>{if(NDe(n,e)||s)a=e,s||i.push(e);else{let t=IDe(n,a,e),r=!1;i.forEach(e=>{r=r||e.x===t.x&&e.y===t.y}),i.some(e=>e.x===t.x&&e.y===t.y)||i.push(t),s=!0}}),i},"cutPathAtIntersect"),MDe=mt(function(e,t,r,n,i,a,s){let o=r.points,l=(M.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&&(M.debug("to cluster abc88",n[r.toCluster]),o=RDe(r.points,n[r.toCluster].node),l=!0),r.fromCluster&&(M.debug("from cluster abc88",n[r.fromCluster]),o=RDe(o.reverse(),n[r.fromCluster].node).reverse(),l=!0),o.filter(e=>!Number.isNaN(e.y))),d=u3,{x:p,y:g}=(!r.curve||"graph"!==i&&"flowchart"!==i||(d=r.curve),VD(r)),f=X5().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(D().flowchart.arrowMarkerAbsolute||D().state.arrowMarkerAbsolute)&&(v=Mc(!0)),bDe(y,r,v,s,i),a={},l&&(a.updatedPath=o),a.originalPath=r.points,a},"insertEdge")}),BDe=e(()=>{DDe=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"),ODe=mt((e,t,r)=>{var e=DDe(e),n=t.height+2*r.padding,i=n/2,t=t.width+2*i+r.padding,r=r.padding/2;return e.has("right")&&e.has("left")&&e.has("up")&&e.has("down")?[{x:0,y:0},{x:i,y:0},{x:t/2,y:2*r},{x:t-i,y:0},{x:t,y:0},{x:t,y:-n/3},{x:t+2*r,y:-n/2},{x:t,y:-2*n/3},{x:t,y:-n},{x:t-i,y:-n},{x:t/2,y:-n-2*r},{x:i,y:-n},{x:0,y:-n},{x:0,y:-2*n/3},{x:-2*r,y:-n/2},{x:0,y:-n/3}]:e.has("right")&&e.has("left")&&e.has("up")?[{x:i,y:0},{x:t-i,y:0},{x:t,y:-n/2},{x:t-i,y:-n},{x:i,y:-n},{x:0,y:-n/2}]:e.has("right")&&e.has("left")&&e.has("down")?[{x:0,y:0},{x:i,y:-n},{x:t-i,y:-n},{x:t,y:0}]:e.has("right")&&e.has("up")&&e.has("down")?[{x:0,y:0},{x:t,y:-i},{x:t,y:i-n},{x:0,y:-n}]:e.has("left")&&e.has("up")&&e.has("down")?[{x:t,y:0},{x:0,y:-i},{x:0,y:i-n},{x:t,y:-n}]:e.has("right")&&e.has("left")?[{x:i,y:0},{x:i,y:-r},{x:t-i,y:-r},{x:t-i,y:0},{x:t,y:-n/2},{x:t-i,y:-n},{x:t-i,y:r-n},{x:i,y:r-n},{x:i,y:-n},{x:0,y:-n/2}]:e.has("up")&&e.has("down")?[{x:t/2,y:0},{x:0,y:-r},{x:i,y:-r},{x:i,y:r-n},{x:0,y:r-n},{x:t/2,y:-n},{x:t,y:r-n},{x:t-i,y:r-n},{x:t-i,y:-r},{x:t,y:-r}]:e.has("right")&&e.has("up")?[{x:0,y:0},{x:t,y:-i},{x:0,y:-n}]:e.has("right")&&e.has("down")?[{x:0,y:0},{x:t,y:0},{x:0,y:-n}]:e.has("left")&&e.has("up")?[{x:t,y:0},{x:0,y:-i},{x:t,y:-n}]:e.has("left")&&e.has("down")?[{x:t,y:0},{x:0,y:0},{x:t,y:-n}]:e.has("right")?[{x:i,y:-r},{x:i,y:-r},{x:t-i,y:-r},{x:t-i,y:0},{x:t,y:-n/2},{x:t-i,y:-n},{x:t-i,y:r-n},{x:i,y:r-n},{x:i,y:r-n}]:e.has("left")?[{x:i,y:0},{x:i,y:-r},{x:t-i,y:-r},{x:t-i,y:r-n},{x:i,y:r-n},{x:i,y:-n},{x:0,y:-n/2}]:e.has("up")?[{x:i,y:-r},{x:i,y:r-n},{x:0,y:r-n},{x:t/2,y:-n},{x:t,y:r-n},{x:t-i,y:r-n},{x:t-i,y:-r}]:e.has("down")?[{x:t/2,y:0},{x:0,y:-r},{x:i,y:-r},{x:i,y:r-n},{x:t-i,y:r-n},{x:t-i,y:-r},{x:t,y:-r}]:[{x:0,y:0}]},"getArrowPoints")});function $De(e,t){return e.intersect(t)}var FDe,zDe=e(()=>{mt($De,"intersectNode"),FDe=$De});function GDe(e,t,r,n){var i=e.x,e=e.y,a=i-n.x,s=e-n.y,o=Math.sqrt(t*t*s*s+r*r*a*a),a=Math.abs(t*r*a/o),t=(n.x{mt(GDe,"intersectEllipse"),UDe=GDe});function jDe(e,t,r){return UDe(e,t,t,r)}var WDe,YDe=e(()=>{qDe(),mt(jDe,"intersectCircle"),WDe=jDe});function HDe(e,t,r,n){var i,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*n.x+c*n.y+h;if(!(0!=u&&0!=d&&0{mt(HDe,"intersectLine"),mt(VDe,"sameSign"),XDe=HDe});function ZDe(e,t,n){var r=e.x,i=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=i-e.height/2-o,h=0;h{KDe(),mt(QDe=ZDe,"intersectPolygon")}),nOe=e(()=>{JDe=mt((e,t)=>{var r,n=e.x,i=e.y,a=t.x-n,t=t.y-i,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:n+r,y:i+e}},"intersectRect"),eOe=JDe}),iOe=e(()=>{zDe(),YDe(),qDe(),rOe(),nOe(),tOe={node:FDe,circle:WDe,ellipse:UDe,polygon:QDe,rect:eOe}});function aOe(e,t,r,n){return e.insert("polygon",":first-child").attr("points",n.map(function(e){return e.x+","+e.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-t/2+","+r/2+")")}var sOe,oOe,lOe,cOe,hOe=e(()=>{TDe(),WL(),mu(),Zw(),eh(),KC(),sOe=mt(async(e,t,r,i)=>{let a=D(),n,s=t.useHtmlLabels||Dc(a.flowchart.htmlLabels),o=(n=r||"node default",e.insert("g").attr("class",n).attr("id",t.domId||t.id)),l=o.insert("g").attr("class","label").attr("style",t.labelStyle),c,h=(c=void 0===t.labelText?"":"string"==typeof t.labelText?t.labelText:t.labelText[0],l.node()),u,d=(u="markdown"===t.labelType?jL(l,_c(VC(c),a),{useHtmlLabels:s,width:t.width||a.flowchart.wrappingWidth,classes:"markdown-node-label"},a):h.appendChild(await xDe(_c(VC(c),a),t.labelStyle,!1,i))).getBBox(),p=t.padding/2;if(Dc(a.flowchart.htmlLabels)){if(r=u.children[0],e=H(u),i=r.getElementsByTagName("img")){let n=""===c.replace(/]*>/g,"").trim();await Promise.all([...i].map(r=>new Promise(t=>{function e(){var e;r.style.display="flex",r.style.flexDirection="column",n?(e=a.fontSize||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)})))}d=r.getBoundingClientRect(),e.attr("width",d.width),e.attr("height",d.height)}return s?l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"):l.attr("transform","translate(0, "+-d.height/2+")"),t.centerLabel&&l.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.insert("rect",":first-child"),{shapeSvg:o,bbox:d,halfPadding:p,label:l}},"labelHelper"),oOe=mt((e,t)=>{t=t.node().getBBox(),e.width=t.width,e.height=t.height},"updateNodeBounds"),mt(aOe,"insertPolygonShape")}),uOe=e(()=>{hOe(),t(),mu(),iOe(),lOe=mt(async(e,t)=>{t.useHtmlLabels||D().flowchart.htmlLabels||(t.centerLabel=!0);var{shapeSvg:e,bbox:r,halfPadding:n}=await sOe(e,t,"node "+t.classes,!0),i=(M.info("Classes = ",t.classes),e.insert("rect",":first-child"));return i.attr("rx",t.rx).attr("ry",t.ry).attr("x",-r.width/2-n).attr("y",-r.height/2-n).attr("width",r.width+t.padding).attr("height",r.height+t.padding),oOe(t,i),t.intersect=function(e){return tOe.rect(t,e)},e},"note"),cOe=lOe});function dOe(e,t,r,n){let i=[],a=mt(e=>{i.push(e,0)},"addBorder"),s=mt(e=>{i.push(0,e)},"skipBorder");(t.includes("t")?(M.debug("add top border"),a):s)(r),(t.includes("r")?(M.debug("add right border"),a):s)(n),(t.includes("b")?(M.debug("add bottom border"),a):s)(r),(t.includes("l")?(M.debug("add left border"),a):s)(n),e.attr("stroke-dasharray",i.join(" "))}var pOe,gOe,fOe,mOe,yOe,vOe,xOe,bOe,wOe,kOe,TOe,EOe,COe,SOe,_Oe,AOe,LOe,NOe,IOe,ROe,MOe,DOe,OOe,POe,BOe,$Oe,FOe,zOe,GOe,UOe=e(()=>{Zw(),mu(),eh(),t(),BDe(),TDe(),iOe(),uOe(),hOe(),pOe=mt(e=>e?" "+e:"","formatClass"),gOe=mt((e,t)=>`${t||"node default"}${pOe(e.classes)} `+pOe(e.class),"getClassesFromNode"),fOe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n}=await sOe(e,t,gOe(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=i+a,o=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];return M.info("Question main (Circle)"),(e=aOe(r,s,s,o)).attr("style",t.style),oOe(t,e),t.intersect=function(e){return M.warn("Intersect called"),tOe.polygon(t,o,e)},r},"question"),mOe=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 tOe.circle(t,14,e)},e),"choice"),yOe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n}=await sOe(e,t,gOe(t,void 0),!0),i=n.height+t.padding,a=i/4,s=n.width+2*a+t.padding,o=[{x:a,y:0},{x:s-a,y:0},{x:s,y:-i/2},{x:s-a,y:-i},{x:a,y:-i},{x:0,y:-i/2}],l=aOe(r,s,i,o);return l.attr("style",t.style),oOe(t,l),t.intersect=function(e){return tOe.polygon(t,o,e)},r},"hexagon"),vOe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n}=await sOe(e,t,void 0,!0),i=n.height+2*t.padding,a=i/2,s=n.width+2*a+t.padding,o=ODe(t.directions,n,t),l=aOe(r,s,i,o);return l.attr("style",t.style),oOe(t,l),t.intersect=function(e){return tOe.polygon(t,o,e)},r},"block_arrow"),xOe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n}=await sOe(e,t,gOe(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return aOe(r,i,a,s).attr("style",t.style),t.width=i+a,t.height=a,t.intersect=function(e){return tOe.polygon(t,s,e)},r},"rect_left_inv_arrow"),bOe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n}=await sOe(e,t,gOe(t),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],o=aOe(r,i,a,s);return o.attr("style",t.style),oOe(t,o),t.intersect=function(e){return tOe.polygon(t,s,e)},r},"lean_right"),wOe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n}=await sOe(e,t,gOe(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],o=aOe(r,i,a,s);return o.attr("style",t.style),oOe(t,o),t.intersect=function(e){return tOe.polygon(t,s,e)},r},"lean_left"),kOe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n}=await sOe(e,t,gOe(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],o=aOe(r,i,a,s);return o.attr("style",t.style),oOe(t,o),t.intersect=function(e){return tOe.polygon(t,s,e)},r},"trapezoid"),TOe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n}=await sOe(e,t,gOe(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],o=aOe(r,i,a,s);return o.attr("style",t.style),oOe(t,o),t.intersect=function(e){return tOe.polygon(t,s,e)},r},"inv_trapezoid"),EOe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n}=await sOe(e,t,gOe(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],o=aOe(r,i,a,s);return o.attr("style",t.style),oOe(t,o),t.intersect=function(e){return tOe.polygon(t,s,e)},r},"rect_right_inv_arrow"),COe=mt(async(e,i)=>{let{shapeSvg:t,bbox:r}=await sOe(e,i,gOe(i,void 0),!0),n=r.width+i.padding,a=n/2,s=a/(2.5+n/50),o=r.height+s+i.padding,l="M 0,"+s+" a "+a+","+s+" 0,0,0 "+n+" 0 a "+a+","+s+" 0,0,0 "+-n+" 0 l 0,"+o+" a "+a+","+s+" 0,0,0 "+n+" 0 l 0,"+-o,c=t.attr("label-offset-y",s).insert("path",":first-child").attr("style",i.style).attr("d",l).attr("transform","translate("+-n/2+","+-(o/2+s)+")");return oOe(i,c),i.intersect=function(t){var r=tOe.rect(i,t),n=r.x-i.x;if(0!=a&&(Math.abs(n)i.height/2-s)){let e=s*s*(1-n*n/(a*a));0!=e&&(e=Math.sqrt(e)),e=s-e,0{var{shapeSvg:e,bbox:r,halfPadding:n}=await sOe(e,t,"node "+t.classes+" "+t.class,!0),i=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-n,r=t.positioned?-s/2:-r.height/2-n;return i.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&&(n=new Set(Object.keys(t.props)),t.props.borders&&(dOe(i,t.props.borders,a,s),n.delete("borders")),n.forEach(e=>{M.warn("Unknown node property "+e)})),oOe(t,i),t.intersect=function(e){return tOe.rect(t,e)},e},"rect"),_Oe=mt(async(e,t)=>{var{shapeSvg:e,bbox:r,halfPadding:n}=await sOe(e,t,"node "+t.classes,!0),i=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-n,r=t.positioned?-s/2:-r.height/2-n;return i.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&&(n=new Set(Object.keys(t.props)),t.props.borders&&(dOe(i,t.props.borders,a,s),n.delete("borders")),n.forEach(e=>{M.warn("Unknown node property "+e)})),oOe(t,i),t.intersect=function(e){return tOe.rect(t,e)},e},"composite"),AOe=mt(async(e,t)=>{var r,e=(await sOe(e,t,"label",!0)).shapeSvg,n=(M.trace("Classes = ",t.class),e.insert("rect",":first-child"));return n.attr("width",0).attr("height",0),e.attr("class","label edgeLabel"),t.props&&(r=new Set(Object.keys(t.props)),t.props.borders&&(dOe(n,t.props.borders,0,0),r.delete("borders")),r.forEach(e=>{M.warn("Unknown node property "+e)})),oOe(t,n),t.intersect=function(e){return tOe.rect(t,e)},e},"labelRect"),mt(dOe,"applyNodePropertyBorders"),LOe=mt(async(e,t)=>{let r,n=(r=t.classes?"node "+t.classes:"node default",e.insert("g").attr("class",r).attr("id",t.domId||t.id)),i=n.insert("rect",":first-child"),a=n.insert("line"),s=n.insert("g").attr("class","label"),o=t.labelText.flat?t.labelText.flat():t.labelText,l,c=(l="object"==typeof o?o[0]:o,M.info("Label text abc79",l,o,"object"==typeof o),s.node().appendChild(await xDe(l,t.labelStyle,!0,!0))),h={width:0,height:0};Dc(D().flowchart.htmlLabels)&&(e=c.children[0],d=H(c),h=e.getBoundingClientRect(),d.attr("width",h.width),d.attr("height",h.height)),M.info("Text 2",o);var u,e=o.slice(1,o.length),d=c.getBBox(),e=s.node().appendChild(await xDe(e.join?e.join("
"):e,t.labelStyle,!0,!0)),p=(Dc(D().flowchart.htmlLabels)&&(p=e.children[0],u=H(e),h=p.getBoundingClientRect(),u.attr("width",h.width),u.attr("height",h.height)),t.padding/2);return H(e).attr("transform","translate( "+(h.width>d.width?0:(d.width-h.width)/2)+", "+(d.height+p+5)+")"),H(c).attr("transform","translate( "+(h.width{var{shapeSvg:e,bbox:r}=await sOe(e,t,gOe(t,void 0),!0),n=r.height+t.padding,r=r.width+n/4+t.padding,r=e.insert("rect",":first-child").attr("style",t.style).attr("rx",n/2).attr("ry",n/2).attr("x",-r/2).attr("y",-n/2).attr("width",r).attr("height",n);return oOe(t,r),t.intersect=function(e){return tOe.rect(t,e)},e},"stadium"),IOe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await sOe(e,t,gOe(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",n.width/2+i).attr("width",n.width+t.padding).attr("height",n.height+t.padding),M.info("Circle main"),oOe(t,a),t.intersect=function(e){return M.info("Circle intersect",t,n.width/2+i,e),tOe.circle(t,n.width/2+i,e)},r},"circle"),ROe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n,halfPadding:i}=await sOe(e,t,gOe(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",n.width/2+i+5).attr("width",n.width+t.padding+10).attr("height",n.height+t.padding+10),o.attr("style",t.style).attr("rx",t.rx).attr("ry",t.ry).attr("r",n.width/2+i).attr("width",n.width+t.padding).attr("height",n.height+t.padding),M.info("DoubleCircle main"),oOe(t,s),t.intersect=function(e){return M.info("DoubleCircle intersect",t,n.width/2+i+5,e),tOe.circle(t,n.width/2+i+5,e)},r},"doublecircle"),MOe=mt(async(e,t)=>{let{shapeSvg:r,bbox:n}=await sOe(e,t,gOe(t,void 0),!0),i=n.width+t.padding,a=n.height+t.padding,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],o=aOe(r,i,a,s);return o.attr("style",t.style),oOe(t,o),t.intersect=function(e){return tOe.polygon(t,s,e)},r},"subroutine"),DOe=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),oOe(t,r),t.intersect=function(e){return tOe.circle(t,7,e)},e},"start"),OOe=mt((e,t,r)=>{let n=e.insert("g").attr("class","node default").attr("id",t.domId||t.id),i=70,a=10;return"LR"===r&&(i=10,a=70),e=n.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join"),oOe(t,e),t.height=t.height+t.padding/2,t.width=t.width+t.padding/2,t.intersect=function(e){return tOe.rect(t,e)},n},"forkJoin"),POe=mt((e,t)=>{var r=(e=e.insert("g").attr("class","node default").attr("id",t.domId||t.id)).insert("circle",":first-child"),n=e.insert("circle",":first-child");return n.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),oOe(t,n),t.intersect=function(e){return tOe.circle(t,7,e)},e},"end"),BOe=mt(async(e,s)=>{let t=s.padding/2,r,n=(r=s.classes?"node "+s.classes:"node default",e.insert("g").attr("class",r).attr("id",s.domId||s.id)),i=n.insert("rect",":first-child"),a=n.insert("line"),o=n.insert("line"),l=0,c=4,h=n.insert("g").attr("class","label"),u=0,d=s.classData.annotations?.[0],p=s.classData.annotations[0]?"«"+s.classData.annotations[0]+"»":"",g=h.node().appendChild(await xDe(p,s.labelStyle,!0,!0)),f=g.getBBox(),m=(Dc(D().flowchart.htmlLabels)&&(e=g.children[0],y=H(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&&(D().flowchart.htmlLabels?m+="<"+s.classData.type+">":m+="<"+s.classData.type+">"),H(e=h.node().appendChild(await xDe(m,s.labelStyle,!0,!0))).attr("class","classTitle");let v=e.getBBox(),x=(Dc(D().flowchart.htmlLabels)&&(y=e.children[0],w=H(e),v=y.getBoundingClientRect(),w.attr("width",v.width),w.attr("height",v.height)),c+=v.height+4,v.width>l&&(l=v.width),[]),b=(s.classData.members.forEach(async e=>{let t=e.getDisplayDetails(),r=t.displayText,n=(D().flowchart.htmlLabels&&(r=r.replace(//g,">")),h.node().appendChild(await xDe(r,t.cssStyle||s.labelStyle,!0,!0))),i=n.getBBox(),a;Dc(D().flowchart.htmlLabels)&&(e=n.children[0],a=H(n),i=e.getBoundingClientRect(),a.attr("width",i.width),a.attr("height",i.height)),i.width>l&&(l=i.width),c+=i.height+4,x.push(n)}),c+=8,[]);s.classData.methods.forEach(async e=>{let t=e.getDisplayDetails(),r=t.displayText,n=(D().flowchart.htmlLabels&&(r=r.replace(//g,">")),h.node().appendChild(await xDe(r,t.cssStyle||s.labelStyle,!0,!0))),i=n.getBBox(),a;Dc(D().flowchart.htmlLabels)&&(e=n.children[0],a=H(n),i=e.getBoundingClientRect(),a.attr("width",i.width),a.attr("height",i.height)),i.width>l&&(l=i.width),c+=i.height+4,b.push(n)}),c+=8,d&&(y=(l-f.width)/2,H(g).attr("transform","translate( "+(-1*l/2+y)+", "+-1*c/2+")"),u=f.height+4);var w=(l-v.width)/2;return H(e).attr("transform","translate( "+(-1*l/2+w)+", "+(-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,x.forEach(e=>{H(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,b.forEach(e=>{H(e).attr("transform","translate( "+-l/2+", "+(-1*c/2+u)+")"),e=e?.getBBox(),u+=(e?.height??0)+4}),i.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),oOe(s,i),s.intersect=function(e){return tOe.rect(s,e)},n},"class_box"),$Oe={rhombus:fOe,composite:_Oe,question:fOe,rect:SOe,labelRect:AOe,rectWithTitle:LOe,choice:mOe,circle:IOe,doublecircle:ROe,stadium:NOe,hexagon:yOe,block_arrow:vOe,rect_left_inv_arrow:xOe,lean_right:bOe,lean_left:wOe,trapezoid:kOe,inv_trapezoid:TOe,rect_right_inv_arrow:EOe,cylinder:COe,start:DOe,end:POe,note:cOe,subroutine:MOe,fork:OOe,join:OOe,class_box:BOe},FOe={},zOe=mt(async(t,r,n)=>{let i,a;if(r.link){let e;"sandbox"===D().securityLevel?e="_top":r.linkTarget&&(e=r.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",r.link).attr("target",e),a=await $Oe[r.shape](i,r,n)}else a=await $Oe[r.shape](t,r,n),i=a;return r.tooltip&&a.attr("title",r.tooltip),r.class&&a.attr("class","node default "+r.class),FOe[r.id]=i,r.haveCallback&&FOe[r.id].attr("class",FOe[r.id].attr("class")+" clickable"),i},"insertNode"),GOe=mt(e=>{var t=FOe[e.id],r=(M.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 qOe(e,t,r=!1){let n=e,i="default",a=(0<(n?.classes?.length||0)&&(i=(n?.classes??[]).join(" ")),i+=" flowchart-label",0),s="",o;switch(n.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=gC(n?.styles??[]),l=n.size??{width:0,height:0,x:0,y:0};return{labelStyle:e.labelStyle,shape:s,labelText:n.label,rx:a,ry:a,class:i,style:e.style,id:n.id,directions:n.directions,width:l.width,height:l.height,x:l.x,y:l.y,positioned:r,intersect:void 0,type:n.type,padding:o??Ir()?.block?.padding??0}}async function jOe(e,t,r){var n;"group"!==(t=qOe(t,0,!1)).type&&(n=Ir(),n=(e=await zOe(e,t,{config:n})).node().getBBox(),(t=r.getBlock(t.id)).size={width:n.width,height:n.height,x:0,y:0,node:e},r.setBlock(t),e.remove())}async function WOe(e,t,r){var n=qOe(t,0,!0);"space"!==r.getBlock(n.id).type&&(r=Ir(),await zOe(e,n,{config:r}),t.intersect=n?.intersect,GOe(n))}async function YOe(e,t,r,n){for(var i of t)await n(e,i,r),i.children&&await YOe(e,i.children,r,n)}async function HOe(e,t,r){await YOe(e,t,r,jOe)}async function VOe(e,t,r){await YOe(e,t,r,WOe)}async function XOe(e,t,r,n,i){var a,s,o,l,c=new PY({multigraph:!0,compound:!0});c.setGraph({rankdir:"TB",nodesep:10,ranksep:10,marginx:8,marginy:8});for(a of r)a.size&&c.setNode(a.id,{width:a.size.width,height:a.size.height,intersect:a.intersect});for(s of t)s.start&&s.end&&(l=n.getBlock(s.start),o=n.getBlock(s.end),l?.size)&&o?.size&&(l=l.size,o=o.size,l=[{x:l.x,y:l.y},{x:l.x+(o.x-l.x)/2,y:l.y+(o.y-l.y)/2},{x:o.x,y:o.y}],MDe(e,{v:s.start,w:s.end,name:s.id},{...s,arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"},void 0,"block",c,i),s.label)&&(await ADe(e,{...s,label:s.label,labelStyle:"stroke: #333; stroke-width: 1.5px;fill:none;",arrowTypeEnd:s.arrowTypeEnd,arrowTypeStart:s.arrowTypeStart,points:l,classes:"edge-thickness-normal edge-pattern-solid flowchart-link LS-a1 LE-b1"}),LDe({...s,x:l[1].x,y:l[1].y},{originalPath:l}))}var KOe,ZOe,QOe,JOe=e(()=>{$Y(),Nn(),PDe(),UOe(),KC(),mt(qOe,"getNodeFromBlock"),mt(jOe,"calculateBlockSize"),mt(WOe,"insertBlockPositioned"),mt(YOe,"performOperations"),mt(HOe,"calculateBlockSizes"),mt(VOe,"insertBlocks"),mt(XOe,"insertEdges")}),ePe=e(()=>{Zw(),Nn(),oDe(),t(),th(),fDe(),JOe(),KOe=mt(function(e,t){return t.db.getClasses()},"getClasses"),ZOe=mt(async function(e,t,r,n){let{securityLevel:i,block:a}=Ir(),s=n.db,o;"sandbox"===i&&(o=H("#i"+t));var l=H("sandbox"===i?o.nodes()[0].contentDocument.body:"body"),l="sandbox"===i?l.select(`[id="${t}"]`):H(`[id="${t}"]`),n=(iDe(l,["point","circle","cross"],n.type,t),s.getBlocks()),c=s.getBlocksFlat(),h=s.getEdges(),u=l.insert("g").attr("class","block"),d=(await HOe(u,n,s),dDe(s));await VOe(u,n,s),await XOe(u,h,c,s,t),d&&(n=d,u=Math.max(1,Math.round(n.width/n.height*.125)),h=n.height+u+10,c=n.width+10,t=a.useMaxWidth,Vc(l,h,c,!!t),M.debug("Here Bounds",d,n),l.attr("viewBox",`${n.x-5} ${n.y-5} ${n.width+10} `+(n.height+10)))},"draw"),QOe={draw:ZOe,getClasses:KOe}}),tPe={};JBe(tPe,{diagram:()=>rPe});var rPe,nPe,iPe,aPe,sPe,oPe,lPe,cPe,hPe,uPe,dPe,pPe,gPe,fPe,mPe,yPe,vPe,xPe,bPe,wPe=e(()=>{fMe(),aDe(),sDe(),ePe(),rPe={parser:pMe,db:qMe,renderer:QOe,styles:YMe}}),kPe=e(()=>{nPe={L:"left",R:"right",T:"top",B:"bottom"},iPe={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")},aPe={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")},sPe=mt(function(e){return lPe(e)?"L"===e?"R":"L":"T"===e?"B":"T"},"getOppositeArchitectureDirection"),oPe=mt(function(e){return"L"===e||"R"===e||"T"===e||"B"===e},"isArchitectureDirection"),lPe=mt(function(e){return"L"===e||"R"===e},"isArchitectureDirectionX"),cPe=mt(function(e){return"T"===e||"B"===e},"isArchitectureDirectionY"),hPe=mt(function(e,t){var r=lPe(e)&&cPe(t),e=cPe(e)&&lPe(t);return r||e},"isArchitectureDirectionXY"),uPe=mt(function(e){var t=e[0],e=e[1],r=lPe(t)&&cPe(e),t=cPe(t)&&lPe(e);return r||t},"isArchitecturePairXY"),dPe=mt(function(e){return"LL"!==e&&"RR"!==e&&"TT"!==e&&"BB"!==e},"isValidArchitectureDirectionPair"),pPe=mt(function(e,t){return dPe(e=""+e+t)?e:void 0},"getArchitectureDirectionPair"),gPe=mt(function([e,t],r){var n=r[0],r=r[1];return lPe(n)?cPe(r)?[e+("L"===n?-1:1),t+("T"===r?1:-1)]:[e+("L"===n?-1:1),t]:lPe(r)?[e+("L"===r?1:-1),t+("T"===n?1:-1)]:[e,t+("T"===n?1:-1)]},"shiftPositionByArchitectureDirectionPair"),fPe=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"),mPe=mt(function(e,t){return hPe(e,t)?"bend":lPe(e)?"horizontal":"vertical"},"getArchitectureDirectionAlignment"),yPe=mt(function(e){return"service"===e.type},"isArchitectureService"),vPe=mt(function(e){return"junction"===e.type},"isArchitectureJunction"),xPe=mt(e=>e.data(),"edgeData"),bPe=mt(e=>e.data(),"nodeData")});function TPe(e){return zPe()[e]}var EPe,CPe,SPe,_Pe,APe,LPe,NPe,IPe,RPe,MPe,DPe,OPe,PPe,BPe,$Pe,FPe,zPe,GPe,UPe,qPe,jPe,WPe,YPe,HPe,VPe,XPe,KPe,ZPe,QPe=e(()=>{An(),Nn(),t1e(),fu(),kPe(),KC(),EPe=yr.architecture,CPe=new Qge(()=>({nodes:{},groups:{},edges:[],registeredIds:{},config:EPe,dataStructures:void 0,elements:{}})),SPe=mt(()=>{CPe.reset(),lh()},"clear"),_Pe=mt(function({id:e,icon:t,in:r,title:n,iconText:i}){if(void 0!==CPe.records.registeredIds[e])throw new Error(`The service id [${e}] is already in use by another `+CPe.records.registeredIds[e]);if(void 0!==r){if(e===r)throw new Error(`The service [${e}] cannot be placed within itself`);if(void 0===CPe.records.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"===CPe.records.registeredIds[r])throw new Error(`The service [${e}]'s parent is not a group`)}CPe.records.registeredIds[e]="node",CPe.records.nodes[e]={id:e,type:"service",icon:t,iconText:i,title:n,edges:[],in:r}},"addService"),APe=mt(()=>Object.values(CPe.records.nodes).filter(yPe),"getServices"),LPe=mt(function({id:e,in:t}){CPe.records.registeredIds[e]="node",CPe.records.nodes[e]={id:e,type:"junction",edges:[],in:t}},"addJunction"),NPe=mt(()=>Object.values(CPe.records.nodes).filter(vPe),"getJunctions"),IPe=mt(()=>Object.values(CPe.records.nodes),"getNodes"),RPe=mt(e=>CPe.records.nodes[e],"getNode"),MPe=mt(function({id:e,icon:t,in:r,title:n}){if(void 0!==CPe.records.registeredIds[e])throw new Error(`The group id [${e}] is already in use by another `+CPe.records.registeredIds[e]);if(void 0!==r){if(e===r)throw new Error(`The group [${e}] cannot be placed within itself`);if(void 0===CPe.records.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"===CPe.records.registeredIds[r])throw new Error(`The group [${e}]'s parent is not a group`)}CPe.records.registeredIds[e]="group",CPe.records.groups[e]={id:e,icon:t,title:n,in:r}},"addGroup"),DPe=mt(()=>Object.values(CPe.records.groups),"getGroups"),OPe=mt(function({lhsId:e,rhsId:t,lhsDir:r,rhsDir:n,lhsInto:i,rhsInto:a,lhsGroup:s,rhsGroup:o,title:l}){if(!oPe(r))throw new Error(`Invalid direction given for left hand side of edge ${e}--${t}. Expected (L,R,T,B) got `+r);if(!oPe(n))throw new Error(`Invalid direction given for right hand side of edge ${e}--${t}. Expected (L,R,T,B) got `+n);if(void 0===CPe.records.nodes[e]&&void 0===CPe.records.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===CPe.records.nodes[t]&&void 0===CPe.records.groups[e])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=CPe.records.nodes[e].in,h=CPe.records.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.`);CPe.records.edges.push({lhsId:e,lhsDir:r,lhsInto:i,lhsGroup:s,rhsId:t,rhsDir:n,rhsInto:a,rhsGroup:o,title:l}),CPe.records.nodes[e]&&CPe.records.nodes[t]&&(CPe.records.nodes[e].edges.push(CPe.records.edges[CPe.records.edges.length-1]),CPe.records.nodes[t].edges.push(CPe.records.edges[CPe.records.edges.length-1]))},"addEdge"),PPe=mt(()=>CPe.records.edges,"getEdges"),BPe=mt(()=>{if(void 0===CPe.records.dataStructures){let s={},o=Object.entries(CPe.records.nodes).reduce((e,[a,t])=>(e[a]=t.edges.reduce((e,t)=>{var r,n=RPe(t.lhsId)?.in,i=RPe(t.rhsId)?.in;return n&&i&&n!==i&&"bend"!==(r=mPe(t.lhsDir,t.rhsDir))&&(s[n]??={},s[n][i]=r,s[i]??={},s[i][n]=r),t.lhsId===a?(i=pPe(t.lhsDir,t.rhsDir))&&(e[i]=t.rhsId):(n=pPe(t.rhsDir,t.lhsDir))&&(e[n]=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 i={[e]:[0,0]},a=[e];for(;0{l[t]||(i[t]=gPe([r,n],e),a.push(t))})}}return i},"BFS"),t=[e(r)];for(;0{CPe.records.elements[e]=t},"setElementForId"),FPe=mt(e=>CPe.records.elements[e],"getElementById"),zPe=mt(()=>xC({...EPe,...Ir().architecture}),"getConfig"),GPe={clear:SPe,setDiagramTitle:ph,getDiagramTitle:gh,setAccTitle:ch,getAccTitle:hh,setAccDescription:uh,getAccDescription:dh,getConfig:zPe,addService:_Pe,getServices:APe,addJunction:LPe,getJunctions:NPe,getNodes:IPe,getNode:RPe,addGroup:MPe,getGroups:DPe,addEdge:OPe,getEdges:PPe,setElementForId:$Pe,getElementById:FPe,getDataStructures:BPe},mt(TPe,"getConfigField")}),JPe=e(()=>{Xge(),t(),Jge(),QPe(),UPe=mt((e,t)=>{Kge(e,t),e.groups.map(t.addGroup),e.services.map(e=>t.addService({...e,type:"service"})),e.junctions.map(e=>t.addJunction({...e,type:"junction"})),e.edges.map(t.addEdge)},"populateDb"),qPe={parse:mt(async e=>{e=await Wge("architecture",e),M.debug(e),UPe(e,GPe)},"parse")}}),eBe=e(()=>{jPe=mt(e=>` .edge { - stroke-width: ${t.archEdgeWidth}; - stroke: ${t.archEdgeColor}; + stroke-width: ${e.archEdgeWidth}; + stroke: ${e.archEdgeColor}; fill: none; } .arrow { - fill: ${t.archEdgeArrowColor}; + fill: ${e.archEdgeArrowColor}; } .node-bkg { fill: none; - stroke: ${t.archGroupBorderColor}; - stroke-width: ${t.archGroupBorderWidth}; + stroke: ${e.archGroupBorderColor}; + stroke-width: ${e.archGroupBorderWidth}; stroke-dasharray: 8; } .node-icon-text { @@ -2577,17 +2577,40 @@ Expecting `+A.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on l display: -webkit-box; -webkit-box-orient: vertical; } -`,"getStyles"),AOt=SOt}),FOt=rPt((r,n)=>{me(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof r?r.layoutBase=e():t.layoutBase=e()},"webpackUniversalModuleDefinition")(r,function(){return r=[function(t,e,r){function n(){}me(n,"LayoutConstants"),n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_HALF_SIZE=(n.SIMPLE_NODE_SIZE=40)/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.INITIAL_WORLD_BOUNDARY=(n.WORLD_BOUNDARY=1e6)/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,t.exports=n},function(t,e,r){var n,i=r(2),a=r(8),s=r(9);function o(t,e,r){i.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=t,this.target=e}for(n in me(o,"LEdge"),o.prototype=Object.create(i.prototype),i)o[n]=i[n];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(t){if(this.source===t)return this.target;if(this.target===t)return this.source;throw"Node is not incident with this edge"},o.prototype.getOtherEndInGraph=function(t,e){for(var r=this.getOtherEnd(t),n=e.getGraphManager().getRoot();;){if(r.getOwner()==e)return r;if(r.getOwner()==n)break;r=r.getOwner().getParent()}return null},o.prototype.updateLength=function(){var t=new Array(4);this.isOverlapingSourceAndTarget=a.getIntersection(this.target.getRect(),this.source.getRect(),t),this.isOverlapingSourceAndTarget||(this.lengthX=t[0]-t[2],this.lengthY=t[1]-t[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)},t.exports=o},function(t,e,r){function n(t){this.vGraphObject=t}me(n,"LGraphObject"),t.exports=n},function(t,e,r){var n,i=r(2),a=r(10),s=r(13),o=r(0),l=r(16),c=r(5);function h(t,e,r,n){i.call(this,n=null==r&&null==n?e:n),null!=t.graphManager&&(t=t.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=n,this.edges=[],this.graphManager=t,this.rect=null!=r&&null!=e?new s(e.x,e.y,r.width,r.height):new s}for(n in me(h,"LNode"),h.prototype=Object.create(i.prototype),i)h[n]=i[n];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(t){this.rect.width=t},h.prototype.getHeight=function(){return this.rect.height},h.prototype.setHeight=function(t){this.rect.height=t},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(t,e){this.rect.x=t.x,this.rect.y=t.y,this.rect.width=e.width,this.rect.height=e.height},h.prototype.setCenter=function(t,e){this.rect.x=t-this.rect.width/2,this.rect.y=e-this.rect.height/2},h.prototype.setLocation=function(t,e){this.rect.x=t,this.rect.y=e},h.prototype.moveBy=function(t,e){this.rect.x+=t,this.rect.y+=e},h.prototype.getEdgeListToNode=function(e){var r=[],n=this;return n.edges.forEach(function(t){if(t.target==e){if(t.source!=n)throw"Incorrect edge source!";r.push(t)}}),r},h.prototype.getEdgesBetween=function(e){var r=[],n=this;return n.edges.forEach(function(t){if(t.source!=n&&t.target!=n)throw"Incorrect edge source and/or target";t.target!=e&&t.source!=e||r.push(t)}),r},h.prototype.getNeighborsList=function(){var e=new Set,r=this;return r.edges.forEach(function(t){if(t.source==r)e.add(t.target);else{if(t.target!=r)throw"Incorrect incidency!";e.add(t.source)}}),e},h.prototype.withChildren=function(){var e=new Set;if(e.add(this),null!=this.child)for(var t=this.child.getNodes(),r=0;rt?(this.rect.x-=(this.labelWidth-t)/2,this.setWidth(this.labelWidth)):"right"==this.labelPosHorizontal&&this.setWidth(t+this.labelWidth)),this.labelHeight)&&("top"==this.labelPosVertical?(this.rect.y-=this.labelHeight,this.setHeight(e+this.labelHeight)):"center"==this.labelPosVertical&&this.labelHeight>e?(this.rect.y-=(this.labelHeight-e)/2,this.setHeight(this.labelHeight)):"bottom"==this.labelPosVertical&&this.setHeight(e+this.labelHeight))},h.prototype.getInclusionTreeDepth=function(){if(this.inclusionTreeDepth==a.MAX_VALUE)throw"assert failed";return this.inclusionTreeDepth},h.prototype.transform=function(t){(e=this.rect.x)>o.WORLD_BOUNDARY?e=o.WORLD_BOUNDARY:e<-o.WORLD_BOUNDARY&&(e=-o.WORLD_BOUNDARY),(r=this.rect.y)>o.WORLD_BOUNDARY?r=o.WORLD_BOUNDARY:r<-o.WORLD_BOUNDARY&&(r=-o.WORLD_BOUNDARY);var e=new c(e,r),r=t.inverseTransformPoint(e);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()},t.exports=h},function(t,e,r){var n,i=r(0);function a(){}for(n in me(a,"FDLayoutConstants"),i)a[n]=i[n];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,t.exports=a},function(t,e,r){function n(t,e){null==t&&null==e?(this.x=0,this.y=0):(this.x=t,this.y=e)}me(n,"PointD"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(t){this.x=t},n.prototype.setY=function(t){this.y=t},n.prototype.getDifference=function(t){return new DimensionD(this.x-t.x,this.y-t.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(t){return this.x+=t.width,this.y+=t.height,this},t.exports=n},function(t,e,r){var n,i=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(t,e,r){i.call(this,r),this.estimatedSize=d.MIN_VALUE,this.margin=a.DEFAULT_GRAPH_MARGIN,this.edges=[],this.nodes=[],this.isConnected=!1,this.parent=t,null!=e&&e instanceof s?this.graphManager=e:null!=e&&e instanceof Layout&&(this.graphManager=e.graphManager)}for(n in me(u,"LGraph"),u.prototype=Object.create(i.prototype),i)u[n]=i[n];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(t,e,r){if(null==e&&null==r){var n=t;if(null==this.graphManager)throw"Graph has no graph mgr!";if(-1=this.nodes.length&&(r=0,i.forEach(function(t){t.owner==e&&r++}),r==this.nodes.length)&&(this.isConnected=!0)}},t.exports=u},function(t,e,r){var c,h=r(1);function n(t){c=r(6),this.layout=t,this.graphs=[],this.edges=[]}me(n,"LGraphManager"),n.prototype.addRoot=function(){var t=this.layout.newGraph(),e=this.layout.newNode(null),t=this.add(t,e);return this.setRootGraph(t),this.rootGraph},n.prototype.add=function(t,e,r,n,i){if(null==r&&null==n&&null==i){if(null==t)throw"Graph is null!";if(null==e)throw"Parent node is null!";if(-1=e.getRight()?r[0]+=Math.min(e.getX()-t.getX(),t.getRight()-e.getRight()):e.getX()<=t.getX()&&e.getRight()>=t.getRight()&&(r[0]+=Math.min(t.getX()-e.getX(),e.getRight()-t.getRight())),t.getY()<=e.getY()&&t.getBottom()>=e.getBottom()?r[1]+=Math.min(e.getY()-t.getY(),t.getBottom()-e.getBottom()):e.getY()<=t.getY()&&e.getBottom()>=t.getBottom()&&(r[1]+=Math.min(t.getY()-e.getY(),e.getBottom()-t.getBottom())),Math.abs((e.getCenterY()-t.getCenterY())/(e.getCenterX()-t.getCenterX()))),e=(a=e.getCenterY()===t.getCenterY()&&e.getCenterX()===t.getCenterX()?1:a)*r[0],t=r[1]/a;r[0]p.ADAPTATION_LOWER_NODE_LIMIT&&(this.coolingFactor=Math.max(this.coolingFactor*p.COOLING_ADAPTATION_FACTOR,this.coolingFactor-(t-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):(t>p.ADAPTATION_LOWER_NODE_LIMIT?this.coolingFactor=Math.max(p.COOLING_ADAPTATION_FACTOR,1-(t-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 t,e=this.getAllEdges(),r=0;rthis.maxIterations/3&&(e=Math.abs(this.totalDisplacement-this.oldTotalDisplacement)<2),t=this.totalDisplacement=a.length||o>=a[0].length))for(var l=0;l{for(var e=[];0{for(var e=[];0{for(var e=[];0=this.s[u+1]);){var M=this.s[u];if(this.s[u]=this.s[u+1],this.s[u+1]=M,uMath.abs(e)?(r=e/t,Math.abs(t)*Math.sqrt(1+r*r)):0!=e?(r=t/e,Math.abs(e)*Math.sqrt(1+r*r)):0},t.exports=At},function(t,e,r){var n,i;function a(t,e){for(var r=0;r{me(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e(FOt()):"function"==typeof define&&define.amd?define(["layout-base"],e):"object"==typeof r?r.coseBase=e(FOt()):t.coseBase=e(t.layoutBase)},"webpackUniversalModuleDefinition")(r,function(e){return n={45:(t,e,r)=>{var n={};n.layoutBase=r(551),n.CoSEConstants=r(806),n.CoSEEdge=r(767),n.CoSEGraph=r(880),n.CoSEGraphManager=r(578),n.CoSELayout=r(765),n.CoSENode=r(991),n.ConstraintHandler=r(902),t.exports=n},806:(t,e,r)=>{var n,i=r(551).FDLayoutConstants;function a(){}for(n in me(a,"CoSEConstants"),i)a[n]=i[n];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=i.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,t.exports=a},767:(t,e,r)=>{var n,i=r(551).FDLayoutEdge;function a(t,e,r){i.call(this,t,e,r)}for(n in me(a,"CoSEEdge"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];t.exports=a},880:(t,e,r)=>{var n,i=r(551).LGraph;function a(t,e,r){i.call(this,t,e,r)}for(n in me(a,"CoSEGraph"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];t.exports=a},578:(t,e,r)=>{var n,i=r(551).LGraphManager;function a(t){i.call(this,t)}for(n in me(a,"CoSEGraphManager"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];t.exports=a},765:(t,e,r)=>{var n,i=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,x=r(551).LGraph,b=r(551).Transform,w=r(551).LinkedList;function k(){i.call(this),this.toBeTiled={},this.constraints={}}for(n in me(k,"CoSELayout"),k.prototype=Object.create(i.prototype),i)k[n]=i[n];k.prototype.newGraphManager=function(){var t=new a(this);return this.graphManager=t},k.prototype.newGraph=function(t){return new s(null,this.graphManager,t)},k.prototype.newNode=function(t){return new h(this.graphManager,t)},k.prototype.newEdge=function(t){return new o(null,null,t)},k.prototype.initParameters=function(){i.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(){i.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 t,e,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(),e=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(r)):0<(t=this.getFlatForest()).length?this.positionNodesRadially(t):(this.reduceTrees(),this.graphManager.resetAllNodesToApplyGravitation(),e=new Set(this.getAllNodes()),r=this.nodesWithGravity.filter(function(t){return e.has(t)}),this.graphManager.setAllNodesToApplyGravitation(r),this.positionNodesRandomly()),0=2*t.length/3;n--)e=Math.floor(Math.random()*(n+1)),r=t[n],t[n]=t[e],t[e]=r;return t},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(t){var e,r;t.left?(r=h.has(t.left)?h.get(t.left):t.left,e=h.has(t.right)?h.get(t.right):t.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(e)||(s.nodesInRelativeHorizontal.push(e),s.nodeToRelativeConstraintMapHorizontal.set(e,[]),s.dummyToNodeForVerticalAlignment.has(e)?s.nodeToTempPositionMapHorizontal.set(e,s.idToNodeMap.get(s.dummyToNodeForVerticalAlignment.get(e)[0]).getCenterX()):s.nodeToTempPositionMapHorizontal.set(e,s.idToNodeMap.get(e).getCenterX())),s.nodeToRelativeConstraintMapHorizontal.get(r).push({right:e,gap:t.gap}),s.nodeToRelativeConstraintMapHorizontal.get(e).push({left:r,gap:t.gap})):(e=u.has(t.top)?u.get(t.top):t.top,r=u.has(t.bottom)?u.get(t.bottom):t.bottom,s.nodesInRelativeVertical.includes(e)||(s.nodesInRelativeVertical.push(e),s.nodeToRelativeConstraintMapVertical.set(e,[]),s.dummyToNodeForHorizontalAlignment.has(e)?s.nodeToTempPositionMapVertical.set(e,s.idToNodeMap.get(s.dummyToNodeForHorizontalAlignment.get(e)[0]).getCenterY()):s.nodeToTempPositionMapVertical.set(e,s.idToNodeMap.get(e).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(e).push({bottom:r,gap:t.gap}),s.nodeToRelativeConstraintMapVertical.get(r).push({top:e,gap:t.gap}))})):(a=new Map,o=new Map,this.constraints.relativePlacementConstraint.forEach(function(t){var e,r;t.left?(r=h.has(t.left)?h.get(t.left):t.left,e=h.has(t.right)?h.get(t.right):t.right,a.has(r)?a.get(r).push(e):a.set(r,[e]),a.has(e)?a.get(e).push(r):a.set(e,[r])):(e=u.has(t.top)?u.get(t.top):t.top,r=u.has(t.bottom)?u.get(t.bottom):t.bottom,o.has(e)?o.get(e).push(r):o.set(e,[r]),o.has(r)?o.get(r).push(e):o.set(r,[e]))}),c=(l=me(function(n,i){var a=[],s=[],o=new w,l=new Set,c=0;return n.forEach(function(t,e){if(!l.has(e)){for(a[c]=[],s[c]=!1,o.push(r=e),l.add(r),a[c].push(r);0!=o.length;){var r=o.shift();i.has(r)&&(s[c]=!0),n.get(r).forEach(function(t){l.has(t)||(o.push(t),l.add(t),a[c].push(t))})}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 i=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(t){(t=i.idToNodeMap.get(t.nodeId)).displacementX=0,t.displacementY=0}),this.constraints.alignmentConstraint){if(this.constraints.alignmentConstraint.vertical)for(var t=this.constraints.alignmentConstraint.vertical,e=0;en&&(n=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(t,e,r){var n=Math.max(this.maxDiagonalInTree(t),f.DEFAULT_RADIAL_SEPARATION),e=(k.branchRadialLayout(e,null,0,359,0,n),x.calculateBounds(t)),i=new b;i.setDeviceOrgX(e.getMinX()),i.setDeviceOrgY(e.getMinY()),i.setWorldOrgX(r.x),i.setWorldOrgY(r.y);for(var a=0;at?(r.rect.x-=(r.labelWidth-t)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-t)/2):"right"==r.labelPosHorizontal&&r.setWidth(t+r.labelWidth)),r.labelHeight)&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(e+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>e?(r.rect.y-=(r.labelHeight-e)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-e)/2):"bottom"==r.labelPosVertical&&r.setHeight(e+r.labelHeight))})},k.prototype.repopulateCompounds=function(){for(var t=this.compoundOrder.length-1;0<=t;t--){var e=this.compoundOrder[t],r=e.id;this.adjustLocations(this.tiledMemberPack[r],e.rect.x,e.rect.y,e.paddingLeft,e.paddingTop,e.labelMarginLeft,e.labelMarginTop)}},k.prototype.repopulateZeroDegreeMembers=function(){var n=this,i=this.tiledZeroDegreePack;Object.keys(i).forEach(function(t){var e=n.idToDummyNode[t],r=e.paddingLeft;n.adjustLocations(i[t],e.rect.x,e.rect.y,r,e.paddingTop,e.labelMarginLeft,e.labelMarginTop)})},k.prototype.getToBeTiled=function(t){var e=t.id;if(null!=this.toBeTiled[e])return this.toBeTiled[e];if(null==(t=t.getChild()))return this.toBeTiled[e]=!1;for(var r=t.getNodes(),n=0;nh&&(h=d.rect.height)}r+=h+t.verticalPadding}},k.prototype.tileCompoundMembers=function(n,i){var a=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(t){var e,r=i[t];a.tiledMemberPack[t]=a.tileNodes(n[t],r.paddingLeft+r.paddingRight),r.rect.width=a.tiledMemberPack[t].width,r.rect.height=a.tiledMemberPack[t].height,r.setCenter(a.tiledMemberPack[t].centerX,a.tiledMemberPack[t].centerY),r.labelMarginLeft=0,r.labelMarginTop=0,f.NODE_DIMENSIONS_INCLUDE_LABELS&&(t=r.rect.width,e=r.rect.height,r.labelWidth&&("left"==r.labelPosHorizontal?(r.rect.x-=r.labelWidth,r.setWidth(t+r.labelWidth),r.labelMarginLeft=r.labelWidth):"center"==r.labelPosHorizontal&&r.labelWidth>t?(r.rect.x-=(r.labelWidth-t)/2,r.setWidth(r.labelWidth),r.labelMarginLeft=(r.labelWidth-t)/2):"right"==r.labelPosHorizontal&&r.setWidth(t+r.labelWidth)),r.labelHeight)&&("top"==r.labelPosVertical?(r.rect.y-=r.labelHeight,r.setHeight(e+r.labelHeight),r.labelMarginTop=r.labelHeight):"center"==r.labelPosVertical&&r.labelHeight>e?(r.rect.y-=(r.labelHeight-e)/2,r.setHeight(r.labelHeight),r.labelMarginTop=(r.labelHeight-e)/2):"bottom"==r.labelPosVertical&&r.setHeight(e+r.labelHeight))})},k.prototype.tileNodes=function(t,e){var r=this.tileNodesByFavoringDim(t,e,!0),t=this.tileNodesByFavoringDim(t,e,!1),e=this.getOrgRatio(r);return this.getOrgRatio(t)l&&(l=t.getWidth())}),s/a),c=o/a,c=Math.pow(n-i,2)+4*(t+i)*(c+n)*a,a=(i-n+Math.sqrt(c))/(2*(t+i));return e?(r=Math.ceil(a))==a&&r++:r=Math.floor(a),((n=r*(t+i)-i)t.rowHeight[r]&&(i=t.rowHeight[r],t.rowHeight[r]=n,i=t.rowHeight[r]-i),t.height+=i,t.rows[r].push(e)},k.prototype.getShortestRowIndex=function(t){for(var e=-1,r=Number.MAX_VALUE,n=0;nr&&(e=n,r=t.rowWidth[n]);return e},k.prototype.canAddHorizontal=function(t,e,r){var n,i,a;return t.idealRowWidth?(i=t.rows.length-1,t.rowWidth[i]+e+t.horizontalPadding<=t.idealRowWidth):(i=this.getShortestRowIndex(t))<0||(a=t.rowWidth[i])+t.horizontalPadding+e<=t.width||(n=0,t.rowHeight[i]a&&e!=r){n.splice(-1,1),t.rows[r].push(i),t.rowWidth[e]=t.rowWidth[e]-a,t.rowWidth[r]=t.rowWidth[r]+a,t.width=t.rowWidth[instance.getLongestRowIndex(t)];for(var s=Number.MIN_VALUE,o=0;os&&(s=n[o].height);0{var n,i=r(551).FDLayoutNode,a=r(551).IMath;function s(t,e,r,n){i.call(this,t,e,r,n)}for(n in me(s,"CoSENode"),s.prototype=Object.create(i.prototype),i)s[n]=i[n];s.prototype.calculateDisplacement=function(){var t=this.graphManager.getLayout();null!=this.getChild()&&this.fixedNodeWeight?(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.fixedNodeWeight,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.fixedNodeWeight):(this.displacementX+=t.coolingFactor*(this.springForceX+this.repulsionForceX+this.gravitationForceX)/this.noOfChildren,this.displacementY+=t.coolingFactor*(this.springForceY+this.repulsionForceY+this.gravitationForceY)/this.noOfChildren),Math.abs(this.displacementX)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementX=t.coolingFactor*t.maxNodeDisplacement*a.sign(this.displacementX)),Math.abs(this.displacementY)>t.coolingFactor*t.maxNodeDisplacement&&(this.displacementY=t.coolingFactor*t.maxNodeDisplacement*a.sign(this.displacementY)),this.child&&0{function Pt(t){if(Array.isArray(t)){for(var e=0,r=Array(t.length);eX&&(X=m[w].length,K=w);X{t.exports=e}},i={},me(r,"__webpack_require__"),r(45);function r(t){var e=i[t];return void 0===e&&(e=i[t]={exports:{}},n[t](e,e.exports,r)),e.exports}var n,i})}),zOt=rPt((r,n)=>{me(function(t,e){"object"==typeof r&&"object"==typeof n?n.exports=e($Ot()):"function"==typeof define&&define.amd?define(["cose-base"],e):"object"==typeof r?r.cytoscapeFcose=e($Ot()):t.cytoscapeFcose=e(t.coseBase)},"webpackUniversalModuleDefinition")(r,function(e){return n={658:t=>{t.exports=null!=Object.assign?Object.assign.bind(Object):function(r){for(var t=arguments.length,e=Array(1{me(C,"sliceIterator");var n=r(140).layoutBase.LinkedList;function C(t,e){var r=[],n=!0,i=!1,a=void 0;try{for(var s,o=t[Symbol.iterator]();!(n=(s=o.next()).done)&&(r.push(s.value),!e||r.length!==e);n=!0);}catch(t){i=!0,a=t}finally{try{!n&&o.return&&o.return()}finally{if(i)throw a}}return r}t.exports=r={getTopMostNodes:function(t){for(var n={},e=0;e{if(Array.isArray(t))return t;if(Symbol.iterator in Object(t))return C(t,2);throw new TypeError("Invalid attempt to destructure non-iterable instance")})(h.value),v=y[0],x=y[1],b=e.cy.getElementById(v);b&&(d=b.boundingBox(),p=i.xCoords[x]-d.w/2,g=i.xCoords[x]+d.w/2,f=i.yCoords[x]-d.h/2,m=i.yCoords[x]+d.h/2,p{var v=r(548),o=r(140).CoSELayout,x=r(140).CoSENode,b=r(140).layoutBase.PointD,w=r(140).layoutBase.DimensionD,l=r(140).layoutBase.LayoutConstants,u=r(140).layoutBase.FDLayoutConstants,k=r(140).CoSEConstants,r=me(function(c,t){var e=c.cy,r=(i=c.eles).nodes(),n=i.edges(),d=void 0,p=void 0,g=void 0,f={},h=(c.randomize&&(d=t.nodeIndexes,p=t.xCoords,g=t.yCoords),me(function(t){return"function"==typeof t},"isFn")),m=me(function(t,e){return h(t)?t(e):t},"optFn"),y=v.calcParentsWithoutChildren(e,i),t=me(function t(e,r,n,i){for(var a=r.length,s=0;s{function n(t,e){for(var r=0;r{var G=r(548),U=r(140).layoutBase.Matrix,q=r(140).layoutBase.SVD,r=me(function(t){var i=t.cy,a=t.eles,e=a.nodes(),r=a.nodes(":parent"),s=new Map,m=new Map,o=new Map,y=[],g=[],f=[],h=[],v=[],x=[],u=[],b=[],w=void 0,k=t.piTol,n=t.samplingType,T=t.nodeSeparation,d=void 0,P=me(function(){for(var t=0,e=!1;t{var n=r(212),r=me(function(t){t&&t("layout","fcose",n)},"register");typeof cytoscape<"u"&&r(cytoscape),t.exports=r},140:t=>{t.exports=e}},i={},me(r,"__webpack_require__"),r(579);function r(t){var e=i[t];return void 0===e&&(e=i[t]={exports:{}},n[t](e,e.exports,r)),e.exports}var n,i})}),GOt=t(()=>{jt(),LOt=me(t=>`${t}`,"wrapIcon"),NOt={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:LOt('')},server:{body:LOt('')},disk:{body:LOt('')},internet:{body:LOt('')},cloud:{body:LOt('')},unknown:Rt,blank:{body:LOt("")}}}}),UOt=t(()=>{jt(),mu(),Y9(),OOt(),GOt(),aOt(),IOt=me(async function(w,t){let k=TOt().padding,e=TOt().iconSize,T=e/2,E=e/6,C=E/2;await Promise.all(t.edges().map(async t=>{let{source:e,sourceDir:r,sourceArrow:n,sourceGroup:i,target:a,targetDir:s,targetArrow:o,targetGroup:l,label:c}=rOt(t),{x:h,y:u}=t[0].sourceEndpoint(),{x:d,y:p}=t[0].midpoint(),{x:g,y:f}=t[0].targetEndpoint(),m=k+4;var y,v,x,b;i&&(WDt(r)?h+="L"===r?-m:m:u+="T"===r?-m:m+18),l&&(WDt(s)?g+="L"===s?-m:m:f+="T"===s?-m:m+18),i||"junction"!==EOt.getNode(e)?.type||(WDt(r)?h+="L"===r?T:-T:u+="T"===r?T:-T),l||"junction"!==EOt.getNode(a)?.type||(WDt(s)?g+="L"===s?T:-T:f+="T"===s?T:-T),t[0]._private.rscratch&&((t=w.insert("g")).insert("path").attr("d",`M ${h},${u} L ${d},${p} L${g},${f} `).attr("class","edge"),n&&(b=WDt(r)?UDt[r](h,E):h-C,y=YDt(r)?UDt[r](u,E):u-C,t.insert("polygon").attr("points",GDt[r](E)).attr("transform",`translate(${b},${y})`).attr("class","arrow")),o&&(b=WDt(s)?UDt[s](g,E):g-C,y=YDt(s)?UDt[s](f,E):f-C,t.insert("polygon").attr("points",GDt[s](E)).attr("transform",`translate(${b},${y})`).attr("class","arrow")),c)&&(v=0,v="X"==(x=HDt(r,s)?"XY":WDt(r)?"X":"Y")?Math.abs(h-g):"Y"==x?Math.abs(u-f)/1.5:Math.abs(h-g)/2,b=t.append("g"),await W9(b,c,{useHtmlLabels:!1,width:v,classes:"architecture-service-label"},D()),b.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),"X"==x?b.attr("transform","translate("+d+", "+p+")"):"Y"==x?b.attr("transform","translate("+d+", "+p+") rotate(-90)"):"XY"==x&&(y=KDt(r,s))&&VDt(y)&&(t=b.node().getBoundingClientRect(),[y,v]=QDt(y),b.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*y*v*45})`),x=b.node().getBoundingClientRect(),b.attr("transform",` - translate(${d}, ${p-t.height/2}) +`,"getStyles"),WPe=jPe}),tBe=VBe((r,n)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof n?n.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 n(){}mt(n,"LayoutConstants"),n.QUALITY=1,n.DEFAULT_CREATE_BENDS_AS_NEEDED=!1,n.DEFAULT_INCREMENTAL=!1,n.DEFAULT_ANIMATION_ON_LAYOUT=!0,n.DEFAULT_ANIMATION_DURING_LAYOUT=!1,n.DEFAULT_ANIMATION_PERIOD=50,n.DEFAULT_UNIFORM_LEAF_NODE_SIZES=!1,n.DEFAULT_GRAPH_MARGIN=15,n.NODE_DIMENSIONS_INCLUDE_LABELS=!1,n.SIMPLE_NODE_HALF_SIZE=(n.SIMPLE_NODE_SIZE=40)/2,n.EMPTY_COMPOUND_NODE_SIZE=40,n.MIN_EDGE_LENGTH=1,n.INITIAL_WORLD_BOUNDARY=(n.WORLD_BOUNDARY=1e6)/1e3,n.WORLD_CENTER_X=1200,n.WORLD_CENTER_Y=900,e.exports=n},function(e,t,r){var n,i=r(2),a=r(8),s=r(9);function o(e,t,r){i.call(this,r),this.isOverlapingSourceAndTarget=!1,this.vGraphObject=r,this.bendpoints=[],this.source=e,this.target=t}for(n in mt(o,"LEdge"),o.prototype=Object.create(i.prototype),i)o[n]=i[n];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),n=t.getGraphManager().getRoot();;){if(r.getOwner()==t)return r;if(r.getOwner()==n)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 n(e){this.vGraphObject=e}mt(n,"LGraphObject"),e.exports=n},function(e,t,r){var n,i=r(2),a=r(10),s=r(13),o=r(0),l=r(16),c=r(5);function h(e,t,r,n){i.call(this,n=null==r&&null==n?t:n),null!=e.graphManager&&(e=e.graphManager),this.estimatedSize=a.MIN_VALUE,this.inclusionTreeDepth=a.MAX_VALUE,this.vGraphObject=n,this.edges=[],this.graphManager=e,this.rect=null!=r&&null!=t?new s(t.x,t.y,r.width,r.height):new s}for(n in mt(h,"LNode"),h.prototype=Object.create(i.prototype),i)h[n]=i[n];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=[],n=this;return n.edges.forEach(function(e){if(e.target==t){if(e.source!=n)throw"Incorrect edge source!";r.push(e)}}),r},h.prototype.getEdgesBetween=function(t){var r=[],n=this;return n.edges.forEach(function(e){if(e.source!=n&&e.target!=n)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 n,i=r(0);function a(){}for(n in mt(a,"FDLayoutConstants"),i)a[n]=i[n];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 n(e,t){null==e&&null==t?(this.x=0,this.y=0):(this.x=e,this.y=t)}mt(n,"PointD"),n.prototype.getX=function(){return this.x},n.prototype.getY=function(){return this.y},n.prototype.setX=function(e){this.x=e},n.prototype.setY=function(e){this.y=e},n.prototype.getDifference=function(e){return new DimensionD(this.x-e.x,this.y-e.y)},n.prototype.getCopy=function(){return new n(this.x,this.y)},n.prototype.translate=function(e){return this.x+=e.width,this.y+=e.height,this},e.exports=n},function(e,t,r){var n,i=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){i.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(n in mt(u,"LGraph"),u.prototype=Object.create(i.prototype),i)u[n]=i[n];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 n=e;if(null==this.graphManager)throw"Graph has no graph mgr!";if(-1=this.nodes.length&&(r=0,i.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 n(e){c=r(6),this.layout=e,this.graphs=[],this.edges=[]}mt(n,"LGraphManager"),n.prototype.addRoot=function(){var e=this.layout.newGraph(),t=this.layout.newNode(null),e=this.add(e,t);return this.setRootGraph(e),this.rootGraph},n.prototype.add=function(e,t,r,n,i){if(null==r&&null==n&&null==i){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 M=this.s[u];if(this.s[u]=this.s[u+1],this.s[u+1]=M,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 n,i;function a(e,t){for(var r=0;r{mt(function(e,t){"object"==typeof r&&"object"==typeof n?n.exports=t(tBe()):"function"==typeof define&&define.amd?define(["layout-base"],t):"object"==typeof r?r.coseBase=t(tBe()):e.coseBase=t(e.layoutBase)},"webpackUniversalModuleDefinition")(r,function(t){return n={45:(e,t,r)=>{var n={};n.layoutBase=r(551),n.CoSEConstants=r(806),n.CoSEEdge=r(767),n.CoSEGraph=r(880),n.CoSEGraphManager=r(578),n.CoSELayout=r(765),n.CoSENode=r(991),n.ConstraintHandler=r(902),e.exports=n},806:(e,t,r)=>{var n,i=r(551).FDLayoutConstants;function a(){}for(n in mt(a,"CoSEConstants"),i)a[n]=i[n];a.DEFAULT_USE_MULTI_LEVEL_SCALING=!1,a.DEFAULT_RADIAL_SEPARATION=i.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 n,i=r(551).FDLayoutEdge;function a(e,t,r){i.call(this,e,t,r)}for(n in mt(a,"CoSEEdge"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];e.exports=a},880:(e,t,r)=>{var n,i=r(551).LGraph;function a(e,t,r){i.call(this,e,t,r)}for(n in mt(a,"CoSEGraph"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];e.exports=a},578:(e,t,r)=>{var n,i=r(551).LGraphManager;function a(e){i.call(this,e)}for(n in mt(a,"CoSEGraphManager"),a.prototype=Object.create(i.prototype),i)a[n]=i[n];e.exports=a},765:(e,t,r)=>{var n,i=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,x=r(551).LGraph,b=r(551).Transform,w=r(551).LinkedList;function k(){i.call(this),this.toBeTiled={},this.constraints={}}for(n in mt(k,"CoSELayout"),k.prototype=Object.create(i.prototype),i)k[n]=i[n];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(){i.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(){i.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;n--)t=Math.floor(Math.random()*(n+1)),r=e[n],e[n]=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(n,i){var a=[],s=[],o=new w,l=new Set,c=0;return n.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();i.has(r)&&(s[c]=!0),n.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 i=this;if(this.constraints.fixedNodeConstraint&&this.constraints.fixedNodeConstraint.forEach(function(e){(e=i.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;tn&&(n=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 n=Math.max(this.maxDiagonalInTree(e),f.DEFAULT_RADIAL_SEPARATION),t=(k.branchRadialLayout(t,null,0,359,0,n),x.calculateBounds(e)),i=new b;i.setDeviceOrgX(t.getMinX()),i.setDeviceOrgY(t.getMinY()),i.setWorldOrgX(r.x),i.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 n=this,i=this.tiledZeroDegreePack;Object.keys(i).forEach(function(e){var t=n.idToDummyNode[e],r=t.paddingLeft;n.adjustLocations(i[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(),n=0;nh&&(h=d.rect.height)}r+=h+e.verticalPadding}},k.prototype.tileCompoundMembers=function(n,i){var a=this;this.tiledMemberPack=[],Object.keys(n).forEach(function(e){var t,r=i[e];a.tiledMemberPack[e]=a.tileNodes(n[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(n-i,2)+4*(e+i)*(c+n)*a,a=(i-n+Math.sqrt(c))/(2*(e+i));return t?(r=Math.ceil(a))==a&&r++:r=Math.floor(a),((n=r*(e+i)-i)e.rowHeight[r]&&(i=e.rowHeight[r],e.rowHeight[r]=n,i=e.rowHeight[r]-i),e.height+=i,e.rows[r].push(t)},k.prototype.getShortestRowIndex=function(e){for(var t=-1,r=Number.MAX_VALUE,n=0;nr&&(t=n,r=e.rowWidth[n]);return t},k.prototype.canAddHorizontal=function(e,t,r){var n,i,a;return e.idealRowWidth?(i=e.rows.length-1,e.rowWidth[i]+t+e.horizontalPadding<=e.idealRowWidth):(i=this.getShortestRowIndex(e))<0||(a=e.rowWidth[i])+e.horizontalPadding+t<=e.width||(n=0,e.rowHeight[i]a&&t!=r){n.splice(-1,1),e.rows[r].push(i),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=n[o].height);0{var n,i=r(551).FDLayoutNode,a=r(551).IMath;function s(e,t,r,n){i.call(this,e,t,r,n)}for(n in mt(s,"CoSENode"),s.prototype=Object.create(i.prototype),i)s[n]=i[n];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[w].length,K=w);X{e.exports=t}},i={},mt(r,"__webpack_require__"),r(45);function r(e){var t=i[e];return void 0===t&&(t=i[e]={exports:{}},n[e](t,t.exports,r)),t.exports}var n,i})}),nBe=VBe((r,n)=>{mt(function(e,t){"object"==typeof r&&"object"==typeof n?n.exports=t(rBe()):"function"==typeof define&&define.amd?define(["cose-base"],t):"object"==typeof r?r.cytoscapeFcose=t(rBe()):e.cytoscapeFcose=t(e.coseBase)},"webpackUniversalModuleDefinition")(r,function(t){return n={658:e=>{e.exports=null!=Object.assign?Object.assign.bind(Object):function(r){for(var e=arguments.length,t=Array(1{mt(C,"sliceIterator");var n=r(140).layoutBase.LinkedList;function C(e,t){var r=[],n=!0,i=!1,a=void 0;try{for(var s,o=e[Symbol.iterator]();!(n=(s=o.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){i=!0,a=e}finally{try{!n&&o.return&&o.return()}finally{if(i)throw a}}return r}e.exports=r={getTopMostNodes:function(e){for(var n={},t=0;t{if(Array.isArray(e))return e;if(Symbol.iterator in Object(e))return C(e,2);throw new TypeError("Invalid attempt to destructure non-iterable instance")})(h.value),v=y[0],x=y[1],b=t.cy.getElementById(v);b&&(d=b.boundingBox(),p=i.xCoords[x]-d.w/2,g=i.xCoords[x]+d.w/2,f=i.yCoords[x]-d.h/2,m=i.yCoords[x]+d.h/2,p{var v=r(548),o=r(140).CoSELayout,x=r(140).CoSENode,b=r(140).layoutBase.PointD,w=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=(i=c.eles).nodes(),n=i.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,i),e=mt(function e(t,r,n,i){for(var a=r.length,s=0;s{function n(e,t){for(var r=0;r{var G=r(548),U=r(140).layoutBase.Matrix,q=r(140).layoutBase.SVD,r=mt(function(e){var i=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=[],x=[],u=[],b=[],w=void 0,k=e.piTol,n=e.samplingType,T=e.nodeSeparation,d=void 0,P=mt(function(){for(var e=0,t=!1;e{var n=r(212),r=mt(function(e){e&&e("layout","fcose",n)},"register");typeof cytoscape<"u"&&r(cytoscape),e.exports=r},140:e=>{e.exports=t}},i={},mt(r,"__webpack_require__"),r(579);function r(e){var t=i[e];return void 0===t&&(t=i[e]={exports:{}},n[e](t,t.exports,r)),t.exports}var n,i})}),iBe=e(()=>{je(),YPe=mt(e=>`${e}`,"wrapIcon"),HPe={prefix:"mermaid-architecture",height:80,width:80,icons:{database:{body:YPe('')},server:{body:YPe('')},disk:{body:YPe('')},internet:{body:YPe('')},cloud:{body:YPe('')},unknown:Re,blank:{body:YPe("")}}}}),aBe=e(()=>{je(),mu(),WL(),QPe(),iBe(),kPe(),VPe=mt(async function(w,e){let k=zPe().padding,t=zPe().iconSize,T=t/2,E=t/6,C=E/2;await Promise.all(e.edges().map(async e=>{let{source:t,sourceDir:r,sourceArrow:n,sourceGroup:i,target:a,targetDir:s,targetArrow:o,targetGroup:l,label:c}=xPe(e),{x:h,y:u}=e[0].sourceEndpoint(),{x:d,y:p}=e[0].midpoint(),{x:g,y:f}=e[0].targetEndpoint(),m=k+4;var y,v,x,b;i&&(lPe(r)?h+="L"===r?-m:m:u+="T"===r?-m:m+18),l&&(lPe(s)?g+="L"===s?-m:m:f+="T"===s?-m:m+18),i||"junction"!==GPe.getNode(t)?.type||(lPe(r)?h+="L"===r?T:-T:u+="T"===r?T:-T),l||"junction"!==GPe.getNode(a)?.type||(lPe(s)?g+="L"===s?T:-T:f+="T"===s?T:-T),e[0]._private.rscratch&&((e=w.insert("g")).insert("path").attr("d",`M ${h},${u} L ${d},${p} L${g},${f} `).attr("class","edge"),n&&(b=lPe(r)?aPe[r](h,E):h-C,y=cPe(r)?aPe[r](u,E):u-C,e.insert("polygon").attr("points",iPe[r](E)).attr("transform",`translate(${b},${y})`).attr("class","arrow")),o&&(b=lPe(s)?aPe[s](g,E):g-C,y=cPe(s)?aPe[s](f,E):f-C,e.insert("polygon").attr("points",iPe[s](E)).attr("transform",`translate(${b},${y})`).attr("class","arrow")),c)&&(v=0,v="X"==(x=hPe(r,s)?"XY":lPe(r)?"X":"Y")?Math.abs(h-g):"Y"==x?Math.abs(u-f)/1.5:Math.abs(h-g)/2,b=e.append("g"),await jL(b,c,{useHtmlLabels:!1,width:v,classes:"architecture-service-label"},D()),b.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),"X"==x?b.attr("transform","translate("+d+", "+p+")"):"Y"==x?b.attr("transform","translate("+d+", "+p+") rotate(-90)"):"XY"==x&&(y=pPe(r,s))&&uPe(y)&&(e=b.node().getBoundingClientRect(),[y,v]=fPe(y),b.attr("dominant-baseline","auto").attr("transform",`rotate(${-1*y*v*45})`),x=b.node().getBoundingClientRect(),b.attr("transform",` + translate(${d}, ${p-e.height/2}) translate(${y*x.width/2}, ${v*x.height/2}) - rotate(${-1*y*v*45}, 0, ${t.height/2}) - `)))}))},"drawEdges"),ROt=me(async function(l,t){let c=.75*TOt().padding,h=TOt().fontSize,u=TOt().iconSize/2;await Promise.all(t.nodes().map(async n=>{var i=nOt(n);if("group"===i.type){var{h:n,w:a,x1:s,y1:o}=n.boundingBox();l.append("rect").attr("x",s+u).attr("y",o+u).attr("width",a).attr("height",n).attr("class","node-bkg");let t=l.append("g"),e=s,r=o;i.icon&&((n=t.append("g")).html(`${await Ft(i.icon,{height:c,width:c,fallbackPrefix:NOt.prefix})}`),n.attr("transform","translate("+(e+u+1)+", "+(r+u+1)+")"),e+=c,r+=h/2-1-2),i.label&&(s=t.append("g"),await W9(s,i.label,{useHtmlLabels:!1,width:a,classes:"architecture-service-label"},D()),s.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","start").attr("text-anchor","start"),s.attr("transform","translate("+(e+u+4)+", "+(r+u+2)+")"))}}))},"drawGroups"),MOt=me(async function(t,e,r){for(var n of r){var i=e.append("g"),a=TOt().iconSize,s=(n.title&&(s=i.append("g"),await W9(s,n.title,{useHtmlLabels:!1,width:1.5*a,classes:"architecture-service-label"},D()),s.attr("dy","1em").attr("alignment-baseline","middle").attr("dominant-baseline","middle").attr("text-anchor","middle"),s.attr("transform","translate("+a/2+", "+a+")")),i.append("g")),{width:o,height:l}=(n.icon?s.html(`${await Ft(n.icon,{height:a,width:a,fallbackPrefix:NOt.prefix})}`):n.iconText?(s.html(`${await Ft("blank",{height:a,width:a,fallbackPrefix:NOt.prefix})}`),o=s.append("g").append("foreignObject").attr("width",a).attr("height",a).append("div").attr("class","node-icon-text").attr("style",`height: ${a}px;`).append("div").html(n.iconText),l=parseInt(window.getComputedStyle(o.node(),null).getPropertyValue("font-size").replace(/\D/g,""))??16,o.attr("style",`-webkit-line-clamp: ${Math.floor((a-2)/l)};`)):s.append("path").attr("class","node-bkg").attr("id","node-"+n.id).attr("d",`M0 ${a} v${-a} q0,-5 5,-5 h${a} q5,0 5,5 v${a} H0 Z`),i.attr("class","architecture-service"),i._groups[0][0].getBBox());n.width=o,n.height=l,t.setElementForId(n.id,i)}return 0},"drawServices"),DOt=me(function(i,a,t){t.forEach(t=>{var e=a.append("g"),r=TOt().iconSize,{width:r,height:n}=(e.append("g").append("rect").attr("id","node-"+t.id).attr("fill-opacity","0").attr("width",r).attr("height",r),e.attr("class","architecture-junction"),e._groups[0][0].getBBox());e.width=r,e.height=n,i.setElementForId(t.id,e)})},"drawJunctions")});function qOt(t,e){t.forEach(t=>{e.add({group:"nodes",data:{type:"service",id:t.id,icon:t.icon,label:t.title,parent:t.in,width:TOt().iconSize,height:TOt().iconSize},classes:"node-service"})})}function jOt(t,e){t.forEach(t=>{e.add({group:"nodes",data:{type:"junction",id:t.id,parent:t.in,width:TOt().iconSize,height:TOt().iconSize},classes:"node-junction"})})}function WOt(r,t){t.nodes().map(t=>{var e=nOt(t);"group"!==e.type&&(e.x=t.position().x,e.y=t.position().y,r.getElementById(e.id).attr("transform","translate("+(e.x||0)+","+(e.y||0)+")"))})}function YOt(t,e){t.forEach(t=>{e.add({group:"nodes",data:{type:"group",id:t.id,icon:t.icon,label:t.title,parent:t.in},classes:"node-group"})})}function HOt(t,h){t.forEach(t=>{var{lhsId:e,rhsId:r,lhsInto:n,lhsGroup:i,rhsInto:a,lhsDir:s,rhsDir:o,rhsGroup:l,title:c}=t,t=HDt(t.lhsDir,t.rhsDir)?"segments":"straight";h.add({group:"edges",data:{id:e+"-"+r,label:c,source:e,sourceDir:s,sourceArrow:n,sourceGroup:i,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:t})})}function VOt(s,t,u){let e=me((t,h)=>Object.entries(t).reduce((r,[n,t])=>{let i=0,a=Object.entries(t);if(1===a.length)r[n]=a[0][1];else for(let e=0;e{let i={},a={};return Object.entries(t).forEach(([t,[e,r]])=>{var n=s.getNode(t)?.in??"default";i[r]??={},i[r][n]??=[],i[r][n].push(t),a[e]??={},a[e][n]??=[],a[e][n].push(t)}),{horiz:Object.values(e(i,"horizontal")).filter(t=>11[[...t,...r],[...e,...n]],[[],[]]);return{horizontal:n,vertical:i}}function XOt(t){let l=[],c=me(t=>t[0]+","+t[1],"posToStr"),h=me(t=>t.split(",").map(t=>parseInt(t)),"strToPos");return t.forEach(t=>{let a=Object.fromEntries(Object.entries(t).map(([t,e])=>[c(e),t])),s=[c([0,0])],o={},e={L:[-1,0],R:[1,0],T:[0,1],B:[0,-1]};for(;0{var e=c([n[0]+e[0],n[1]+e[1]]),r=a[e];r&&!o[e]&&(s.push(e),l.push({[zDt[t]]:r,[zDt[qDt(t)]]:i,gap:1.5*TOt().iconSize}))})}}}}),l}function KOt(i,a,l,c,h,{spatialMaps:u,groupAlignments:d}){return new Promise(e=>{let t=H("body").append("div").attr("id","cy").attr("style","display:none"),s=l9t({container:document.getElementById("cy"),style:[{selector:"edge",style:{"curve-style":"straight",label:"data(label)","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"edge.segments",style:{"curve-style":"segments","segment-weights":"0","segment-distances":[.5],"edge-distances":"endpoints","source-endpoint":"data(sourceEndpoint)","target-endpoint":"data(targetEndpoint)"}},{selector:"node",style:{"compound-sizing-wrt-labels":"include"}},{selector:"node[label]",style:{"text-valign":"bottom","text-halign":"center","font-size":TOt().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:TOt().padding+"px"}}]}),r=(t.remove(),YOt(l,s),qOt(i,s),jOt(a,s),HOt(c,s),VOt(h,u,d)),n=XOt(u),o=s.layout({name:"fcose",quality:"proof",styleEnabled:!1,animate:!1,nodeDimensionsIncludeLabels:!1,idealEdgeLength(t){var[t,e]=t.connectedNodes();return(t=nOt(t).parent)===nOt(e).parent?1.5*TOt().iconSize:.5*TOt().iconSize},edgeElasticity(t){var[t,e]=t.connectedNodes();return(t=nOt(t).parent)===nOt(e).parent?.45:.001},alignmentConstraint:r,relativePlacementConstraint:n});o.one("layoutstop",()=>{function t(t,e,r,n){var{x:t,y:i}=t,{x:e,y:a}=e,s=(n-i+(t-r)*(i-a)/(t-e))/Math.sqrt(1+Math.pow((i-a)/(t-e),2)),o=Math.sqrt(Math.pow(n-i,2)+Math.pow(r-t,2)-Math.pow(s,2));o/=Math.sqrt(Math.pow(e-t,2)+Math.pow(a-i,2));let l=(e-t)*(n-i)-(a-i)*(r-t);switch(!0){case 0<=l:l=1;break;case l<0:l=-1}let c=(e-t)*(r-t)+(a-i)*(n-i);switch(!0){case 0<=c:c=1;break;case c<0:c=-1}return{distances:Math.abs(s)*l,weights:o*=c}}me(t,"getSegmentWeights"),s.startBatch();for(var e of Object.values(s.edges())){var r,n,i,a;e.data?.()&&({x:i,y:n}=e.source().position(),{x:a,y:r}=e.target().position(),i!==a)&&n!==r&&(i=e.sourceEndpoint(),a=e.targetEndpoint(),n=rOt(e).sourceDir,[r,n]=YDt(n)?[i.x,a.y]:[a.x,i.y],{weights:i,distances:a}=t(i,a,r,n),e.style("segment-distances",a),e.style("segment-weights",i))}s.endBatch(),o.run()}),o.run(),s.ready(t=>{M.info("Ready",t),e(s)})})}var ZOt,QOt,JOt=t(()=>{jt(),c9t(),ZOt=tt(zOt(),1),Q3(),e(),emt(),eh(),OOt(),GOt(),aOt(),UOt(),Ot([{name:NOt.prefix,icons:NOt}]),l9t.use(ZOt.default),me(qOt,"addServices"),me(jOt,"addJunctions"),me(WOt,"positionNodes"),me(YOt,"addGroups"),me(HOt,"addEdges"),me(VOt,"getAlignments"),me(XOt,"getRelativeConstraints"),me(KOt,"layoutArchitecture"),ZOt=me(async(t,e,r,n)=>{var i=(n=n.db).getServices(),a=n.getJunctions(),s=n.getGroups(),o=n.getEdges(),l=n.getDataStructures(),c=(e=Vft(e)).append("g"),h=(c.attr("class","architecture-edges"),(u=e.append("g")).attr("class","architecture-services"),e.append("g")),u=(h.attr("class","architecture-groups"),await MOt(n,u,i),DOt(n,u,a),await KOt(i,a,s,o,n,l));await IOt(c,u),await ROt(h,u),WOt(n,u),Xc(void 0,e,TOt().padding,TOt().useMaxWidth)},"draw"),QOt={draw:ZOt}}),tPt={};oPt(tPt,{diagram:()=>ePt});var ePt,rPt,nPt=t(()=>{POt(),OOt(),BOt(),JOt(),ePt={parser:_Ot,db:EOt,renderer:QOt,styles:AOt}}),iPt=(oPt(rPt={},{default:()=>fFt}),jt(),$r(),Ur(),{id:"c4",detector:me(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:me(async()=>({id:"c4",diagram:(await Promise.resolve().then(()=>(EC(),kC))).diagram}),"loader")}),aPt={id:"flowchart",detector:me((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t),"detector"),loader:me(async()=>({id:"flowchart",diagram:(await Promise.resolve().then(()=>(tK(),XX))).diagram}),"loader")},sPt="flowchart-v2",t=me((t,e)=>"dagre-d3"!==e?.flowchart?.defaultRenderer&&("elk"===e?.flowchart?.defaultRenderer&&(e.layout="elk"),!(!/^\s*graph/.test(t)||"dagre-wrapper"!==e?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(t)),"detector"),oPt=me(async()=>{var t=(await Promise.resolve().then(()=>(tK(),XX))).diagram;return{id:sPt,diagram:t}},"loader"),lPt={id:sPt,detector:t,loader:oPt},cPt={id:"er",detector:me(t=>/^\s*erDiagram/.test(t),"detector"),loader:me(async()=>({id:"er",diagram:(await Promise.resolve().then(()=>(dK(),hK))).diagram}),"loader")},hPt={id:"gitGraph",detector:me(t=>/^\s*gitGraph/.test(t),"detector"),loader:me(async()=>({id:"gitGraph",diagram:(await Promise.resolve().then(()=>(a1t(),e1t))).diagram}),"loader")},uPt={id:"gantt",detector:me(t=>/^\s*gantt/.test(t),"detector"),loader:me(async()=>({id:"gantt",diagram:(await Promise.resolve().then(()=>(Zft(),Gft))).diagram}),"loader")},dPt={id:"info",detector:me(t=>/^\s*info/.test(t),"detector"),loader:me(async()=>({id:"info",diagram:(await Promise.resolve().then(()=>(Tmt(),nmt))).diagram}),"loader")},pPt={id:"pie",detector:me(t=>/^\s*pie/.test(t),"detector"),loader:me(async()=>({id:"pie",diagram:(await Promise.resolve().then(()=>(Dmt(),Amt))).diagram}),"loader")},gPt="quadrantChart",t=me(t=>/^\s*quadrantChart/.test(t),"detector"),oPt=me(async()=>{var t=(await Promise.resolve().then(()=>(fyt(),uyt))).diagram;return{id:gPt,diagram:t}},"loader"),fPt={id:gPt,detector:t,loader:oPt},mPt={id:"xychart",detector:me(t=>/^\s*xychart-beta/.test(t),"detector"),loader:me(async()=>({id:"xychart",diagram:(await Promise.resolve().then(()=>(R2t(),C2t))).diagram}),"loader")},yPt="requirement",t=me(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),oPt=me(async()=>{var t=(await Promise.resolve().then(()=>(_vt(),$2t))).diagram;return{id:yPt,diagram:t}},"loader"),vPt={id:yPt,detector:t,loader:oPt},xPt={id:"sequence",detector:me(t=>/^\s*sequenceDiagram/.test(t),"detector"),loader:me(async()=>({id:"sequence",diagram:(await Promise.resolve().then(()=>(mxt(),txt))).diagram}),"loader")},bPt={id:"class",detector:me((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t),"detector"),loader:me(async()=>({id:"class",diagram:(await Promise.resolve().then(()=>(Ext(),kxt))).diagram}),"loader")},wPt="classDiagram",t=me((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t),"detector"),oPt=me(async()=>{var t=(await Promise.resolve().then(()=>(dbt(),Cxt))).diagram;return{id:wPt,diagram:t}},"loader"),kPt={id:wPt,detector:t,loader:oPt},TPt={id:"state",detector:me((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t),"detector"),loader:me(async()=>({id:"state",diagram:(await Promise.resolve().then(()=>(h4t(),l4t))).diagram}),"loader")},EPt="stateDiagram",t=me((t,e)=>!!(/^\s*stateDiagram-v2/.test(t)||/^\s*stateDiagram/.test(t)&&"dagre-wrapper"===e?.state?.defaultRenderer),"detector"),oPt=me(async()=>{var t=(await Promise.resolve().then(()=>(q4t(),u4t))).diagram;return{id:EPt,diagram:t}},"loader"),CPt={id:EPt,detector:t,loader:oPt},_Pt={id:"journey",detector:me(t=>/^\s*journey/.test(t),"detector"),loader:me(async()=>({id:"journey",diagram:(await Promise.resolve().then(()=>(u5t(),o5t))).diagram}),"loader")},SPt=(e(),emt(),eh(),t={draw:me((t,e,r)=>{M.debug(`rendering svg for syntax error -`);var n=(e=Vft(e)).append("g");e.attr("viewBox","0 0 2412 512"),Vc(e,100,512,!0),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),n.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"),n.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")}),APt={db:{},renderer:t,parser:{parse:me(()=>{},"parse")}},LPt="flowchart-elk",oPt=me((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*flowchart|graph/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0),"detector"),t=me(async()=>{var t=(await Promise.resolve().then(()=>(tK(),XX))).diagram;return{id:LPt,diagram:t}},"loader"),NPt={id:LPt,detector:oPt,loader:t},IPt={id:"timeline",detector:me(t=>/^\s*timeline/.test(t),"detector"),loader:me(async()=>({id:"timeline",diagram:(await Promise.resolve().then(()=>(T3t(),i3t))).diagram}),"loader")},RPt={id:"mindmap",detector:me(t=>/^\s*mindmap/.test(t),"detector"),loader:me(async()=>({id:"mindmap",diagram:(await Promise.resolve().then(()=>(lLt(),P9t))).diagram}),"loader")},MPt={id:"kanban",detector:me(t=>/^\s*kanban/.test(t),"detector"),loader:me(async()=>({id:"kanban",diagram:(await Promise.resolve().then(()=>(LLt(),pLt))).diagram}),"loader")},DPt={id:"sankey",detector:me(t=>/^\s*sankey-beta/.test(t),"detector"),loader:me(async()=>({id:"sankey",diagram:(await Promise.resolve().then(()=>(oIt(),UNt))).diagram}),"loader")},OPt={id:"packet",detector:me(t=>/^\s*packet-beta/.test(t),"detector"),loader:me(async()=>({id:"packet",diagram:(await Promise.resolve().then(()=>(NIt(),dIt))).diagram}),"loader")},PPt={id:"radar",detector:me(t=>/^\s*radar-beta/.test(t),"detector"),loader:me(async()=>({id:"radar",diagram:(await Promise.resolve().then(()=>(ZIt(),HIt))).diagram}),"loader")},BPt={id:"block",detector:me(t=>/^\s*block-beta/.test(t),"detector"),loader:me(async()=>({id:"block",diagram:(await Promise.resolve().then(()=>(iOt(),FDt))).diagram}),"loader")},FPt="architecture",oPt=me(t=>/^\s*architecture/.test(t),"detector"),t=me(async()=>{var t=(await Promise.resolve().then(()=>(nPt(),tPt))).diagram;return{id:FPt,diagram:t}},"loader"),$Pt={id:FPt,detector:oPt,loader:t},zPt=(Ur(),mu(),!1),GPt=me(()=>{zPt||(zPt=!0,Th("error",APt,t=>"error"===t.toLowerCase().trim()),Th("---",{db:{clear:me(()=>{},"clear")},styles:{},renderer:{draw:me(()=>{},"draw")},parser:{parse:me(()=>{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:me(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),Qt(NPt,RPt,$Pt),Qt(iPt,MPt,kPt,bPt,cPt,uPt,dPt,pPt,vPt,xPt,lPt,aPt,IPt,hPt,CPt,TPt,_Pt,fPt,DPt,OPt,mPt,BPt,PPt))},"addDiagrams"),UPt=(e(),Ur(),mu(),me(async()=>{M.debug("Loading registered diagrams");var t=(await Promise.allSettled(Object.entries(Kt).map(async([t,{detector:e,loader:r}])=>{if(r)try{Eh(t)}catch{try{var{diagram:n,id:i}=await r();Th(i,n,e)}catch(e){throw M.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete Kt[t],e}}}))).filter(t=>"rejected"===t.status);if(0{RBt.forEach(t=>{t()}),RBt=[]},"attachFunctions"),DBt=(e(),me(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments"));function OBt(t){var e,r,n=t.match(Yt);return n?(r={},(e="object"!=typeof(e=IA(n[1],{schema:NA})??{})||Array.isArray(e)?{}:e).displayMode&&(r.displayMode=e.displayMode.toString()),e.title&&(r.title=e.title.toString()),e.config&&(r.config=e.config),{text:t.slice(n[0].length),metadata:r}):{text:t,metadata:{}}}zr(),RA(),me(OBt,"extractFrontMatter"),ZE();var PBt=me(t=>t.replace(/\r\n?/g,` -`).replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),BBt=me(t=>{var{text:t,metadata:e}=OBt(t),{displayMode:e,title:r,config:n={}}=e;return e&&(n.gantt||(n.gantt={}),n.gantt.displayMode=e),{title:r,config:n,text:t}},"processFrontmatter"),FBt=me(t=>{var e=HE.detectInit(t)??{},r=HE.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:t})=>"wrap"===t):"wrap"===r?.type&&(e.wrap=!0),{text:AE(t),directive:e}},"processDirectives");function $Bt(t){var e=PBt(t),e=BBt(e),r=FBt(e.text),n=bE(e.config,r.directive);return{code:t=DBt(r.text),title:e.title,config:n}}function zBt(t){return t=(new TextEncoder).encode(t),t=Array.from(t,t=>String.fromCodePoint(t)).join(""),btoa(t)}me($Bt,"preprocessDiagram"),rh(),_n(),ZE(),me(zBt,"toBase64");var GBt=["foreignobject"],UBt=["dominant-baseline"];function qBt(t){return t=$Bt(t),Dr(),Mr(t.config??{}),t}async function jBt(t,e){GPt();try{var{code:r,config:n}=qBt(t);return{diagramType:(await tFt(r)).type,config:n}}catch(t){if(e?.suppressErrors)return!1;throw t}}me(qBt,"processAndSetConfigs"),me(jBt,"parse");var WBt=me((t,e,r=[])=>` -.${t} ${e} { ${r.join(" !important; ")} !important; }`,"cssImportantStyles"),YBt=me((e,r=new Map)=>{let n="";if(void 0!==e.themeCSS&&(n+=` -`+e.themeCSS),void 0!==e.fontFamily&&(n+=` -:root { --mermaid-font-family: ${e.fontFamily}}`),void 0!==e.altFontFamily&&(n+=` -:root { --mermaid-alt-font-family: ${e.altFontFamily}}`),r instanceof Map){let t=e.htmlLabels??e.flowchart?.htmlLabels?["> *","span"]:["rect","polygon","ellipse","circle","path"];r.forEach(e=>{sq(e.styles)||t.forEach(t=>{n+=WBt(e.id,t,e.styles)}),sq(e.textStyles)||(n+=WBt(e.id,"tspan",(e?.textStyles||[]).map(t=>t.replace("color","fill"))))})}return n},"createCssStyles"),HBt=me((t,e,r,n)=>(r=YBt(t,r),SBt(kBt(n+`{${Jc(e,r,t.themeVariables)}}`),ABt)),"createUserStyles"),VBt=me((t="",e,r)=>{let n=t;return r||e||(n=n.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),n=(n=XE(n)).replace(/
/g,"
")},"cleanUpSvgCode"),XBt=me((t="",e)=>``,"putIntoIFrame"),KBt=me((t,e,r,n,i)=>{var a=t.append("div"),r=(a.attr("id",r),n&&a.attr("style",n),a.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg"));return i&&r.attr("xmlns:xlink",i),r.append("g"),t},"appendDivSvgG");function ZBt(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}me(ZBt,"sandboxedIframe");var QBt=me((t,e,r,n)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(n)?.remove()},"removeExistingElements"),oPt=me(async function(t,e,r){GPt();var n=qBt(e),i=(e=n.code,Ir());M.debug(i),e.length>(i?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");let a="#"+t,s="i"+t,o="#"+s,l="d"+t,c="#"+l,h=me(()=>{var t=H(d?o:c).node();t&&"remove"in t&&t.remove()},"removeTempElements"),u=H("body"),d="sandbox"===i.securityLevel,p="loose"===i.securityLevel,g=i.fontFamily;void 0!==r?(r&&(r.innerHTML=""),d?(y=ZBt(H(r),s),(u=H(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=H(r),KBt(u,t,l,"font-family: "+g,"http://www.w3.org/1999/xlink")):(QBt(document,t,l,s),d?(y=ZBt(H("body"),s),(u=H(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=H("body"),KBt(u,t,l));let f,m;try{f=await IBt.fromText(e,{title:n.title})}catch(r){if(i.suppressErrorRendering)throw h(),r;f=await IBt.fromText("error"),m=r}var r=u.select(c).node(),y=f.type,r=(n=r.firstChild).firstChild,v=f.renderer.getClasses?.(e,f),v=HBt(i,y,v,a),x=document.createElement("style");x.innerHTML=v,n.insertBefore(x,r);try{await f.renderer.draw(e,t,jft.version,f)}catch(r){throw i.suppressErrorRendering?h():SPt.draw(e,t,jft.version),r}eFt(y,u.select(c+" svg"),f.db.getAccTitle?.(),f.db.getAccDescription?.()),u.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let b=u.select(c).node().innerHTML;if(M.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),b=VBt(b,d,Dc(i.arrowMarkerAbsolute)),d?(v=u.select(c+" svg").node(),b=XBt(b,v)):p||(b=Mi.sanitize(b,{ADD_TAGS:GBt,ADD_ATTR:UBt,HTML_INTEGRATION_POINTS:{foreignobject:!0}})),MBt(),m)throw m;return h(),{diagramType:y,svg:b,bindFunctions:f.db.bindFunctions}},"render");function JBt(t={}){(t=ie({},t))?.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),Sr(t),t?.theme&&t.theme in dr?t.themeVariables=dr[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=dr.default.getThemeVariables(t.themeVariables)),t="object"==typeof t?_r(t):Lr(),T(t.logLevel),GPt()}me(JBt,"initialize");var tFt=me((t,e={})=>(t=$Bt(t).code,IBt.fromText(t,e)),"getDiagramFromText");function eFt(t,e,r,n){LBt(e,t),NBt(e,r,n,e.attr("id"))}me(eFt,"addA11yInfo");var rFt=Object.freeze({render:oPt,parse:jBt,getDiagramFromText:tFt,initialize:JBt,getConfig:Ir,setConfig:Nr,getSiteConfig:Lr,updateSiteConfig:Ar,reset:me(()=>{Dr()},"reset"),globalReset:me(()=>{Dr(br)},"globalReset"),defaultConfig:br}),nFt=(T(Ir().logLevel),Dr(Ir()),UX(),ZE(),me((t,e,r)=>{M.warn(t),xE(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError")),iFt=me(async function(e={querySelector:".mermaid"}){try{await aFt(e)}catch(t){if(xE(t)&&M.error(t.str),gFt.parseError&&gFt.parseError(t),!e.suppressErrors)throw M.error("Use the suppressErrors option to suppress these errors"),t}},"run"),aFt=me(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){var n=rFt.getConfig();M.debug(`${t?"":"No "}Callback function found`);let i;if(r)i=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");i=document.querySelectorAll(e)}M.debug(`Found ${i.length} diagrams`),void 0!==n?.startOnLoad&&(M.debug("Start On Load: "+n?.startOnLoad),rFt.updateSiteConfig({startOnLoad:n?.startOnLoad}));var a,s=new HE.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed),o=[];for(a of Array.from(i))if(M.info("Rendering diagram: "+a.id),!a.getAttribute("data-processed")){a.setAttribute("data-processed","true");var l="mermaid-"+s.next(),c=a.innerHTML,h=(c=Wt(HE.entityDecode(c)).trim().replace(//gi,"
"),HE.detectInit(c));h&&M.debug("Detected early reinit: ",h);try{var{svg:u,bindFunctions:d}=await pFt(l,c,a);a.innerHTML=u,t&&await t(l),d&&d(a)}catch(t){nFt(t,o,gFt.parseError)}}if(0{GPt(),Qt(...t),!1===e&&await UPt()},"registerExternalDiagrams"),oFt=me(function(){gFt.startOnLoad&&rFt.getConfig().startOnLoad&&gFt.run().catch(t=>M.error("Mermaid failed to initialize",t))},"contentLoaded"),lFt=(typeof document<"u"&&window.addEventListener("load",oFt,!1),me(function(t){gFt.parseError=t},"setParseErrorHandler")),cFt=[],hFt=!1,uFt=me(async()=>{if(!hFt){for(hFt=!0;0new Promise((n,i)=>{var t=me(()=>new Promise((e,r)=>{rFt.parse(a,s).then(t=>{e(t),n(t)},t=>{M.error("Error parsing",t),gFt.parseError?.(t),r(t),i(t)})}),"performCall");cFt.push(t),uFt().catch(i)}),"parse"),pFt=me((a,s,o)=>new Promise((n,i)=>{var t=me(()=>new Promise((e,r)=>{rFt.render(a,s,o).then(t=>{e(t),n(t)},t=>{M.error("Error parsing",t),gFt.parseError?.(t),r(t),i(t)})}),"performCall");cFt.push(t),uFt().catch(i)}),"render"),gFt={startOnLoad:!0,mermaidAPI:rFt,parse:dFt,render:pFt,init:t,run:iFt,registerExternalDiagrams:oPt,registerLayoutLoaders:EX,initialize:sFt,parseError:void 0,contentLoaded:oFt,setParseErrorHandler:lFt,detectType:Zt,registerIconPacks:Ot},fFt=gFt,dFt=rPt;return W(z({},"__esModule",{value:!0}),dFt)})(),globalThis.mermaid=globalThis.__esbuild_esm_mermaid_nm.mermaid.default; +`,"putIntoIFrame"),qFe=mt((e,t,r,n,i)=>{var a=e.append("div"),r=(a.attr("id",r),n&&a.attr("style",n),a.append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg"));return i&&r.attr("xmlns:xlink",i),r.append("g"),e},"appendDivSvgG");function jFe(e,t){return e.append("iframe").attr("id",t).attr("style","width: 100%; height: 100%;").attr("sandbox","")}mt(jFe,"sandboxedIframe");var WFe=mt((e,t,r,n)=>{e.getElementById(t)?.remove(),e.getElementById(r)?.remove(),e.getElementById(n)?.remove()},"removeExistingElements"),JBe=mt(async function(e,t,r){D$e();var n=PFe(t),i=(t=n.code,Ir());M.debug(i),t.length>(i?.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=H(d?o:c).node();e&&"remove"in e&&e.remove()},"removeTempElements"),u=H("body"),d="sandbox"===i.securityLevel,p="loose"===i.securityLevel,g=i.fontFamily;void 0!==r?(r&&(r.innerHTML=""),d?(y=jFe(H(r),s),(u=H(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=H(r),qFe(u,e,l,"font-family: "+g,"http://www.w3.org/1999/xlink")):(WFe(document,e,l,s),d?(y=jFe(H("body"),s),(u=H(y.nodes()[0].contentDocument.body)).node().style.margin=0):u=H("body"),qFe(u,e,l));let f,m;try{f=await EFe.fromText(t,{title:n.title})}catch(r){if(i.suppressErrorRendering)throw h(),r;f=await EFe.fromText("error"),m=r}var r=u.select(c).node(),y=f.type,r=(n=r.firstChild).firstChild,v=f.renderer.getClasses?.(t,f),v=zFe(i,y,v,a),x=document.createElement("style");x.innerHTML=v,n.insertBefore(x,r);try{await f.renderer.draw(t,e,sye.version,f)}catch(r){throw i.suppressErrorRendering?h():x$e.draw(t,e,sye.version),r}VFe(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 b=u.select(c).node().innerHTML;if(M.debug("config.arrowMarkerAbsolute",i.arrowMarkerAbsolute),b=GFe(b,d,Dc(i.arrowMarkerAbsolute)),d?(v=u.select(c+" svg").node(),b=UFe(b,v)):p||(b=Mi.sanitize(b,{ADD_TAGS:DFe,ADD_ATTR:OFe,HTML_INTEGRATION_POINTS:{foreignobject:!0}})),SFe(),m)throw m;return h(),{diagramType:y,svg:b,bindFunctions:f.db.bindFunctions}},"render");function YFe(e={}){(e=it({},e))?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),_r(e),e?.theme&&e.theme in dr?e.themeVariables=dr[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=dr.default.getThemeVariables(e.themeVariables)),e="object"==typeof e?Sr(e):Lr(),T(e.logLevel),D$e()}mt(YFe,"initialize");var HFe=mt((e,t={})=>(e=RFe(e).code,EFe.fromText(e,t)),"getDiagramFromText");function VFe(e,t,r,n){kFe(t,e),TFe(t,r,n,t.attr("id"))}mt(VFe,"addA11yInfo");var XFe=Object.freeze({render:JBe,parse:BFe,getDiagramFromText:HFe,initialize:YFe,getConfig:Ir,setConfig:Nr,getSiteConfig:Lr,updateSiteConfig:Ar,reset:mt(()=>{Dr()},"reset"),globalReset:mt(()=>{Dr(br)},"globalReset"),defaultConfig:br}),KFe=(T(Ir().logLevel),Dr(Ir()),zK(),KC(),mt((e,t,r)=>{M.warn(e),vC(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")),ZFe=mt(async function(t={querySelector:".mermaid"}){try{await QFe(t)}catch(e){if(vC(e)&&M.error(e.str),oze.parseError&&oze.parseError(e),!t.suppressErrors)throw M.error("Use the suppressErrors option to suppress these errors"),e}},"run"),QFe=mt(async function({postRenderCallback:e,querySelector:t,nodes:r}={querySelector:".mermaid"}){var n=XFe.getConfig();M.debug(`${e?"":"No "}Callback function found`);let i;if(r)i=r;else{if(!t)throw new Error("Nodes and querySelector are both undefined");i=document.querySelectorAll(t)}M.debug(`Found ${i.length} diagrams`),void 0!==n?.startOnLoad&&(M.debug("Start On Load: "+n?.startOnLoad),XFe.updateSiteConfig({startOnLoad:n?.startOnLoad}));var a,s=new YC.InitIDGenerator(n.deterministicIds,n.deterministicIDSeed),o=[];for(a of Array.from(i))if(M.info("Rendering diagram: "+a.id),!a.getAttribute("data-processed")){a.setAttribute("data-processed","true");var l="mermaid-"+s.next(),c=a.innerHTML,h=(c=We(YC.entityDecode(c)).trim().replace(//gi,"
"),YC.detectInit(c));h&&M.debug("Detected early reinit: ",h);try{var{svg:u,bindFunctions:d}=await sze(l,c,a);a.innerHTML=u,e&&await e(l),d&&d(a)}catch(e){KFe(e,o,oze.parseError)}}if(0{D$e(),Qe(...e),!1===t&&await O$e()},"registerExternalDiagrams"),eze=mt(function(){oze.startOnLoad&&XFe.getConfig().startOnLoad&&oze.run().catch(e=>M.error("Mermaid failed to initialize",e))},"contentLoaded"),tze=(typeof document<"u"&&window.addEventListener("load",eze,!1),mt(function(e){oze.parseError=e},"setParseErrorHandler")),rze=[],nze=!1,ize=mt(async()=>{if(!nze){for(nze=!0;0new Promise((n,i)=>{var e=mt(()=>new Promise((t,r)=>{XFe.parse(a,s).then(e=>{t(e),n(e)},e=>{M.error("Error parsing",e),oze.parseError?.(e),r(e),i(e)})}),"performCall");rze.push(e),ize().catch(i)}),"parse"),sze=mt((a,s,o)=>new Promise((n,i)=>{var e=mt(()=>new Promise((t,r)=>{XFe.render(a,s,o).then(e=>{t(e),n(e)},e=>{M.error("Error parsing",e),oze.parseError?.(e),r(e),i(e)})}),"performCall");rze.push(e),ize().catch(i)}),"render"),oze={startOnLoad:!0,mermaidAPI:XFe,parse:aze,render:sze,init:e,run:ZFe,registerExternalDiagrams:JBe,registerLayoutLoaders:kK,initialize:JFe,parseError:void 0,contentLoaded:eze,setParseErrorHandler:tze,detectType:Ze,registerIconPacks:Oe},lze=oze,aze=VBe;return W(z({},"__esModule",{value:!0}),aze)})(),globalThis.mermaid=globalThis.__esbuild_esm_mermaid_nm.mermaid.default;