unleash-server 4.20.3 → 4.20.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/frontend/build/index.html +1 -1
- package/frontend/build/static/{CreateProject-f5c561c6.js → CreateProject-29a2b285.js} +1 -1
- package/frontend/build/static/{Error-cf50f470.js → Error-934cc570.js} +1 -1
- package/frontend/build/static/{ExpandMore-fa515e9b.js → ExpandMore-c3e13d73.js} +1 -1
- package/frontend/build/static/{FeatureArchiveDialog-9726aebb.js → FeatureArchiveDialog-b5fc8177.js} +1 -1
- package/frontend/build/static/{FeatureMetricsChart-2099cc8f.js → FeatureMetricsChart-13ce1b57.js} +1 -1
- package/frontend/build/static/{FeatureViewLazyExport-251c75f0.js → FeatureViewLazyExport-1bee3351.js} +2 -2
- package/frontend/build/static/{LazyAdminExport-110237f4.js → LazyAdminExport-2f5a25ac.js} +2 -2
- package/frontend/build/static/{LazyProjectExport-22be702f.js → LazyProjectExport-dc65603b.js} +1 -1
- package/frontend/build/static/{NetworkOverview-fa11486d.js → NetworkOverview-8018cd89.js} +45 -45
- package/frontend/build/static/{NetworkTraffic-e401fa21.js → NetworkTraffic-84935c51.js} +1 -1
- package/frontend/build/static/{Playground-d443ad89.js → Playground-6d2eacce.js} +1 -1
- package/frontend/build/static/{StrategyItemContainer-6834f121.js → StrategyItemContainer-93cba46f.js} +1 -1
- package/frontend/build/static/{chartjs-adapter-date-fns.esm-25ba860d.js → chartjs-adapter-date-fns.esm-38d041f7.js} +1 -1
- package/frontend/build/static/{index-ad851f89.js → index-3132dba8.js} +1 -1
- package/frontend/build/static/{index-3efe35ce.js → index-66dec49c.js} +1 -1
- package/frontend/build/static/{index-a09b079f.js → index-c290f941.js} +2 -2
- package/frontend/build/static/{unknownify-a62439db.js → unknownify-86fd295b.js} +1 -1
- package/frontend/build/static/{useProjectRole-6f60c011.js → useProjectRole-b5b140d2.js} +1 -1
- package/package.json +1 -1
|
@@ -1,30 +1,30 @@
|
|
|
1
|
-
import{fe as K4,ff as Z4,fg as Q4,fh as J4,s as bp,r as
|
|
1
|
+
import{fe as K4,ff as Z4,fg as Q4,fh as J4,s as bp,r as Mh,j as Al,bP as tb,aR as eb,C as rb,A as ib,fi as nb}from"./index-c290f941.js";import{u as sb,a as Id}from"./unknownify-86fd295b.js";function ab(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var Nh={},ob={get exports(){return Nh},set exports(t){Nh=t}};(function(t,e){(function(r,i){t.exports=i()})(K4,function(){var r;function i(){return r.apply(null,arguments)}function n(h){return h instanceof Array||Object.prototype.toString.call(h)==="[object Array]"}function s(h){return h!=null&&Object.prototype.toString.call(h)==="[object Object]"}function a(h,y){return Object.prototype.hasOwnProperty.call(h,y)}function o(h){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(h).length===0;for(var y in h)if(a(h,y))return;return 1}function l(h){return h===void 0}function u(h){return typeof h=="number"||Object.prototype.toString.call(h)==="[object Number]"}function d(h){return h instanceof Date||Object.prototype.toString.call(h)==="[object Date]"}function f(h,y){for(var x=[],E=h.length,R=0;R<E;++R)x.push(y(h[R],R));return x}function p(h,y){for(var x in y)a(y,x)&&(h[x]=y[x]);return a(y,"toString")&&(h.toString=y.toString),a(y,"valueOf")&&(h.valueOf=y.valueOf),h}function g(h,y,x,E){return mr(h,y,x,E,!0).utc()}function _(h){return h._pf==null&&(h._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),h._pf}function k(h){if(h._isValid==null){var y=_(h),x=S.call(y.parsedDateParts,function(E){return E!=null}),x=!isNaN(h._d.getTime())&&y.overflow<0&&!y.empty&&!y.invalidEra&&!y.invalidMonth&&!y.invalidWeekday&&!y.weekdayMismatch&&!y.nullInput&&!y.invalidFormat&&!y.userInvalidated&&(!y.meridiem||y.meridiem&&x);if(h._strict&&(x=x&&y.charsLeftOver===0&&y.unusedTokens.length===0&&y.bigHour===void 0),Object.isFrozen!=null&&Object.isFrozen(h))return x;h._isValid=x}return h._isValid}function w(h){var y=g(NaN);return h!=null?p(_(y),h):_(y).userInvalidated=!0,y}var S=Array.prototype.some||function(h){for(var y=Object(this),x=y.length>>>0,E=0;E<x;E++)if(E in y&&h.call(this,y[E],E,y))return!0;return!1},A=i.momentProperties=[],O=!1;function P(h,y){var x,E,R,nt=A.length;if(l(y._isAMomentObject)||(h._isAMomentObject=y._isAMomentObject),l(y._i)||(h._i=y._i),l(y._f)||(h._f=y._f),l(y._l)||(h._l=y._l),l(y._strict)||(h._strict=y._strict),l(y._tzm)||(h._tzm=y._tzm),l(y._isUTC)||(h._isUTC=y._isUTC),l(y._offset)||(h._offset=y._offset),l(y._pf)||(h._pf=_(y)),l(y._locale)||(h._locale=y._locale),0<nt)for(x=0;x<nt;x++)l(R=y[E=A[x]])||(h[E]=R);return h}function W(h){P(this,h),this._d=new Date(h._d!=null?h._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),O===!1&&(O=!0,i.updateOffset(this),O=!1)}function q(h){return h instanceof W||h!=null&&h._isAMomentObject!=null}function z(h){i.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+h)}function H(h,y){var x=!0;return p(function(){if(i.deprecationHandler!=null&&i.deprecationHandler(null,h),x){for(var E,R,nt=[],yt=arguments.length,Ct=0;Ct<yt;Ct++){if(E="",typeof arguments[Ct]=="object"){for(R in E+=`
|
|
2
2
|
[`+Ct+"] ",arguments[0])a(arguments[0],R)&&(E+=R+": "+arguments[0][R]+", ");E=E.slice(0,-2)}else E=arguments[Ct];nt.push(E)}z(h+`
|
|
3
3
|
Arguments: `+Array.prototype.slice.call(nt).join("")+`
|
|
4
|
-
`+new Error().stack),x=!1}return y.apply(this,arguments)},y)}var N={};function M(h,y){i.deprecationHandler!=null&&i.deprecationHandler(h,y),N[h]||(z(y),N[h]=!0)}function C(h){return typeof Function<"u"&&h instanceof Function||Object.prototype.toString.call(h)==="[object Function]"}function v(h,y){var x,E=p({},h);for(x in y)a(y,x)&&(s(h[x])&&s(y[x])?(E[x]={},p(E[x],h[x]),p(E[x],y[x])):y[x]!=null?E[x]=y[x]:delete E[x]);for(x in h)a(h,x)&&!a(y,x)&&s(h[x])&&(E[x]=p({},E[x]));return E}function D(h){h!=null&&this.set(h)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null;var m=Object.keys||function(h){var y,x=[];for(y in h)a(h,y)&&x.push(y);return x};function Q(h,y,x){var E=""+Math.abs(h);return(0<=h?x?"+":"":"-")+Math.pow(10,Math.max(0,y-E.length)).toString().substr(1)+E}var b=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ct=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Dt={},vt={};function j(h,y,x,E){var R=typeof E=="string"?function(){return this[E]()}:E;h&&(vt[h]=R),y&&(vt[y[0]]=function(){return Q(R.apply(this,arguments),y[1],y[2])}),x&&(vt[x]=function(){return this.localeData().ordinal(R.apply(this,arguments),h)})}function ot(h,y){return h.isValid()?(y=rt(y,h.localeData()),Dt[y]=Dt[y]||function(x){for(var E,R=x.match(b),nt=0,yt=R.length;nt<yt;nt++)vt[R[nt]]?R[nt]=vt[R[nt]]:R[nt]=(E=R[nt]).match(/\[[\s\S]/)?E.replace(/^\[|\]$/g,""):E.replace(/\\/g,"");return function(Ct){for(var Pt="",It=0;It<yt;It++)Pt+=C(R[It])?R[It].call(Ct,x):R[It];return Pt}}(y),Dt[y](h)):h.localeData().invalidDate()}function rt(h,y){var x=5;function E(R){return y.longDateFormat(R)||R}for(ct.lastIndex=0;0<=x&&ct.test(h);)h=h.replace(ct,E),ct.lastIndex=0,--x;return h}var it={};function ut(h,y){var x=h.toLowerCase();it[x]=it[x+"s"]=it[y]=h}function bt(h){return typeof h=="string"?it[h]||it[h.toLowerCase()]:void 0}function K(h){var y,x,E={};for(x in h)a(h,x)&&(y=bt(x))&&(E[y]=h[x]);return E}var Ot={};function Y(h,y){Ot[h]=y}function U(h){return h%4==0&&h%100!=0||h%400==0}function X(h){return h<0?Math.ceil(h)||0:Math.floor(h)}function F(y){var y=+y,x=0;return x=y!=0&&isFinite(y)?X(y):x}function I(h,y){return function(x){return x!=null?(J(this,h,x),i.updateOffset(this,y),this):L(this,h)}}function L(h,y){return h.isValid()?h._d["get"+(h._isUTC?"UTC":"")+y]():NaN}function J(h,y,x){h.isValid()&&!isNaN(x)&&(y==="FullYear"&&U(h.year())&&h.month()===1&&h.date()===29?(x=F(x),h._d["set"+(h._isUTC?"UTC":"")+y](x,h.month(),dt(x,h.month()))):h._d["set"+(h._isUTC?"UTC":"")+y](x))}var T=/\d/,ce=/\d\d/,ht=/\d{3}/,es=/\d{4}/,In=/[+-]?\d{6}/,V=/\d\d?/,Yt=/\d\d\d\d?/,et=/\d\d\d\d\d\d?/,Mt=/\d{1,3}/,On=/\d{1,4}/,Bn=/[+-]?\d{1,6}/,Tt=/\d+/,gt=/[+-]?\d+/,Et=/Z|[+-]\d\d:?\d\d/gi,wt=/Z|[+-]\d\d(?::?\d\d)?/gi,pt=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function st(h,y,x){jt[h]=C(y)?y:function(E,R){return E&&x?x:y}}function le(h,y){return a(jt,h)?jt[h](y._strict,y._locale):new RegExp(Xt(h.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(x,E,R,nt,yt){return E||R||nt||yt})))}function Xt(h){return h.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var jt={},Kt={};function Gt(h,y){var x,E,R=y;for(typeof h=="string"&&(h=[h]),u(y)&&(R=function(nt,yt){yt[y]=F(nt)}),E=h.length,x=0;x<E;x++)Kt[h[x]]=R}function Ee(h,y){Gt(h,function(x,E,R,nt){R._w=R._w||{},y(x,R._w,R,nt)})}var Ht,Vt=0,Ft=1,xt=2,ft=3,Lt=4,_t=5,Ut=6,at=7,ie=8;function dt(h,y){if(isNaN(h)||isNaN(y))return NaN;var x=(y%(x=12)+x)%x;return h+=(y-x)/12,x==1?U(h)?29:28:31-x%7%2}Ht=Array.prototype.indexOf||function(h){for(var y=0;y<this.length;++y)if(this[y]===h)return y;return-1},j("M",["MM",2],"Mo",function(){return this.month()+1}),j("MMM",0,0,function(h){return this.localeData().monthsShort(this,h)}),j("MMMM",0,0,function(h){return this.localeData().months(this,h)}),ut("month","M"),Y("month",8),st("M",V),st("MM",V,ce),st("MMM",function(h,y){return y.monthsShortRegex(h)}),st("MMMM",function(h,y){return y.monthsRegex(h)}),Gt(["M","MM"],function(h,y){y[Ft]=F(h)-1}),Gt(["MMM","MMMM"],function(h,y,x,E){E=x._locale.monthsParse(h,E,x._strict),E!=null?y[Ft]=E:_(x).invalidMonth=h});var ee="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),de="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),me=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,be=pt,ke=pt;function $t(h,y){var x;if(h.isValid()){if(typeof y=="string"){if(/^\d+$/.test(y))y=F(y);else if(!u(y=h.localeData().monthsParse(y)))return}x=Math.min(h.date(),dt(h.year(),y)),h._d["set"+(h._isUTC?"UTC":"")+"Month"](y,x)}}function ne(h){return h!=null?($t(this,h),i.updateOffset(this,!0),this):L(this,"Month")}function ge(){function h(yt,Ct){return Ct.length-yt.length}for(var y,x=[],E=[],R=[],nt=0;nt<12;nt++)y=g([2e3,nt]),x.push(this.monthsShort(y,"")),E.push(this.months(y,"")),R.push(this.months(y,"")),R.push(this.monthsShort(y,""));for(x.sort(h),E.sort(h),R.sort(h),nt=0;nt<12;nt++)x[nt]=Xt(x[nt]),E[nt]=Xt(E[nt]);for(nt=0;nt<24;nt++)R[nt]=Xt(R[nt]);this._monthsRegex=new RegExp("^("+R.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+E.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+x.join("|")+")","i")}function Qt(h){return U(h)?366:365}j("Y",0,0,function(){var h=this.year();return h<=9999?Q(h,4):"+"+h}),j(0,["YY",2],0,function(){return this.year()%100}),j(0,["YYYY",4],0,"year"),j(0,["YYYYY",5],0,"year"),j(0,["YYYYYY",6,!0],0,"year"),ut("year","y"),Y("year",1),st("Y",gt),st("YY",V,ce),st("YYYY",On,es),st("YYYYY",Bn,In),st("YYYYYY",Bn,In),Gt(["YYYYY","YYYYYY"],Vt),Gt("YYYY",function(h,y){y[Vt]=h.length===2?i.parseTwoDigitYear(h):F(h)}),Gt("YY",function(h,y){y[Vt]=i.parseTwoDigitYear(h)}),Gt("Y",function(h,y){y[Vt]=parseInt(h,10)}),i.parseTwoDigitYear=function(h){return F(h)+(68<F(h)?1900:2e3)};var cl=I("FullYear",!0);function ni(h,y,x,E,R,nt,yt){var Ct;return h<100&&0<=h?(Ct=new Date(h+400,y,x,E,R,nt,yt),isFinite(Ct.getFullYear())&&Ct.setFullYear(h)):Ct=new Date(h,y,x,E,R,nt,yt),Ct}function zr(h){var y;return h<100&&0<=h?((y=Array.prototype.slice.call(arguments))[0]=h+400,y=new Date(Date.UTC.apply(null,y)),isFinite(y.getUTCFullYear())&&y.setUTCFullYear(h)):y=new Date(Date.UTC.apply(null,arguments)),y}function De(h,y,x){return x=7+y-x,x-(7+zr(h,0,x).getUTCDay()-y)%7-1}function ae(h,yt,Ct,E,R){var nt,yt=1+7*(yt-1)+(7+Ct-E)%7+De(h,E,R),Ct=yt<=0?Qt(nt=h-1)+yt:yt>Qt(h)?(nt=h+1,yt-Qt(h)):(nt=h,yt);return{year:nt,dayOfYear:Ct}}function Be(h,y,x){var E,R,nt=De(h.year(),y,x),nt=Math.floor((h.dayOfYear()-nt-1)/7)+1;return nt<1?E=nt+Oe(R=h.year()-1,y,x):nt>Oe(h.year(),y,x)?(E=nt-Oe(h.year(),y,x),R=h.year()+1):(R=h.year(),E=nt),{week:E,year:R}}function Oe(h,R,x){var E=De(h,R,x),R=De(h+1,R,x);return(Qt(h)-E+R)/7}j("w",["ww",2],"wo","week"),j("W",["WW",2],"Wo","isoWeek"),ut("week","w"),ut("isoWeek","W"),Y("week",5),Y("isoWeek",5),st("w",V),st("ww",V,ce),st("W",V),st("WW",V,ce),Ee(["w","ww","W","WW"],function(h,y,x,E){y[E.substr(0,1)]=F(h)});function Fe(h,y){return h.slice(y,7).concat(h.slice(0,y))}j("d",0,"do","day"),j("dd",0,0,function(h){return this.localeData().weekdaysMin(this,h)}),j("ddd",0,0,function(h){return this.localeData().weekdaysShort(this,h)}),j("dddd",0,0,function(h){return this.localeData().weekdays(this,h)}),j("e",0,0,"weekday"),j("E",0,0,"isoWeekday"),ut("day","d"),ut("weekday","e"),ut("isoWeekday","E"),Y("day",11),Y("weekday",11),Y("isoWeekday",11),st("d",V),st("e",V),st("E",V),st("dd",function(h,y){return y.weekdaysMinRegex(h)}),st("ddd",function(h,y){return y.weekdaysShortRegex(h)}),st("dddd",function(h,y){return y.weekdaysRegex(h)}),Ee(["dd","ddd","dddd"],function(h,y,x,E){E=x._locale.weekdaysParse(h,E,x._strict),E!=null?y.d=E:_(x).invalidWeekday=h}),Ee(["d","e","E"],function(h,y,x,E){y[E]=F(h)});var Pe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ie="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ge="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),tr=pt,zt=pt,Z=pt;function St(){function h(It,ue){return ue.length-It.length}for(var y,x,E,R=[],nt=[],yt=[],Ct=[],Pt=0;Pt<7;Pt++)E=g([2e3,1]).day(Pt),y=Xt(this.weekdaysMin(E,"")),x=Xt(this.weekdaysShort(E,"")),E=Xt(this.weekdays(E,"")),R.push(y),nt.push(x),yt.push(E),Ct.push(y),Ct.push(x),Ct.push(E);R.sort(h),nt.sort(h),yt.sort(h),Ct.sort(h),this._weekdaysRegex=new RegExp("^("+Ct.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+yt.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+nt.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+R.join("|")+")","i")}function Nt(){return this.hours()%12||12}function fe(h,y){j(h,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),y)})}function Me(h,y){return y._meridiemParse}j("H",["HH",2],0,"hour"),j("h",["hh",2],0,Nt),j("k",["kk",2],0,function(){return this.hours()||24}),j("hmm",0,0,function(){return""+Nt.apply(this)+Q(this.minutes(),2)}),j("hmmss",0,0,function(){return""+Nt.apply(this)+Q(this.minutes(),2)+Q(this.seconds(),2)}),j("Hmm",0,0,function(){return""+this.hours()+Q(this.minutes(),2)}),j("Hmmss",0,0,function(){return""+this.hours()+Q(this.minutes(),2)+Q(this.seconds(),2)}),fe("a",!0),fe("A",!1),ut("hour","h"),Y("hour",13),st("a",Me),st("A",Me),st("H",V),st("h",V),st("k",V),st("HH",V,ce),st("hh",V,ce),st("kk",V,ce),st("hmm",Yt),st("hmmss",et),st("Hmm",Yt),st("Hmmss",et),Gt(["H","HH"],ft),Gt(["k","kk"],function(h,y,x){h=F(h),y[ft]=h===24?0:h}),Gt(["a","A"],function(h,y,x){x._isPm=x._locale.isPM(h),x._meridiem=h}),Gt(["h","hh"],function(h,y,x){y[ft]=F(h),_(x).bigHour=!0}),Gt("hmm",function(h,y,x){var E=h.length-2;y[ft]=F(h.substr(0,E)),y[Lt]=F(h.substr(E)),_(x).bigHour=!0}),Gt("hmmss",function(h,y,x){var E=h.length-4,R=h.length-2;y[ft]=F(h.substr(0,E)),y[Lt]=F(h.substr(E,2)),y[_t]=F(h.substr(R)),_(x).bigHour=!0}),Gt("Hmm",function(h,y,x){var E=h.length-2;y[ft]=F(h.substr(0,E)),y[Lt]=F(h.substr(E))}),Gt("Hmmss",function(h,y,x){var E=h.length-4,R=h.length-2;y[ft]=F(h.substr(0,E)),y[Lt]=F(h.substr(E,2)),y[_t]=F(h.substr(R))}),pt=I("Hours",!0);var Le,We={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{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"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:ee,monthsShort:de,week:{dow:0,doy:6},weekdays:Pe,weekdaysMin:Ge,weekdaysShort:Ie,meridiemParse:/[ap]\.?m?\.?/i},xe={},Ne={};function Dn(h){return h&&h.toLowerCase().replace("_","-")}function Mn(h){for(var y,x,E,R,nt=0;nt<h.length;){for(y=(R=Dn(h[nt]).split("-")).length,x=(x=Dn(h[nt+1]))?x.split("-"):null;0<y;){if(E=Or(R.slice(0,y).join("-")))return E;if(x&&x.length>=y&&function(yt,Ct){for(var Pt=Math.min(yt.length,Ct.length),It=0;It<Pt;It+=1)if(yt[It]!==Ct[It])return It;return Pt}(R,x)>=y-1)break;y--}nt++}return Le}function Or(h){var y;if(xe[h]===void 0&&t&&t.exports&&h.match("^[^/\\\\]*$")!=null)try{y=Le._abbr,ab("./locale/"+h),qt(y)}catch{xe[h]=null}return xe[h]}function qt(h,y){return h&&((y=l(y)?oe(h):te(h,y))?Le=y:typeof console<"u"&&console.warn&&console.warn("Locale "+h+" not found. Did you forget to load it?")),Le._abbr}function te(h,y){if(y===null)return delete xe[h],null;var x,E=We;if(y.abbr=h,xe[h]!=null)M("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),E=xe[h]._config;else if(y.parentLocale!=null)if(xe[y.parentLocale]!=null)E=xe[y.parentLocale]._config;else{if((x=Or(y.parentLocale))==null)return Ne[y.parentLocale]||(Ne[y.parentLocale]=[]),Ne[y.parentLocale].push({name:h,config:y}),null;E=x._config}return xe[h]=new D(v(E,y)),Ne[h]&&Ne[h].forEach(function(R){te(R.name,R.config)}),qt(h),xe[h]}function oe(h){var y;if(!(h=h&&h._locale&&h._locale._abbr?h._locale._abbr:h))return Le;if(!n(h)){if(y=Or(h))return y;h=[h]}return Mn(h)}function Rt(h){var y=h._a;return y&&_(h).overflow===-2&&(y=y[Ft]<0||11<y[Ft]?Ft:y[xt]<1||y[xt]>dt(y[Vt],y[Ft])?xt:y[ft]<0||24<y[ft]||y[ft]===24&&(y[Lt]!==0||y[_t]!==0||y[Ut]!==0)?ft:y[Lt]<0||59<y[Lt]?Lt:y[_t]<0||59<y[_t]?_t:y[Ut]<0||999<y[Ut]?Ut:-1,_(h)._overflowDayOfYear&&(y<Vt||xt<y)&&(y=xt),_(h)._overflowWeeks&&y===-1&&(y=at),_(h)._overflowWeekday&&y===-1&&(y=ie),_(h).overflow=y),h}var Ye=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,G=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Zn=/Z|[+-]\d\d(?::?\d\d)?/,tt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],xr=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],rl=/^\/?Date\((-?\d+)/i,Ru=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,il={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function nl(h){var y,x,E,R,nt,yt,Pt=h._i,Ct=Ye.exec(Pt)||G.exec(Pt),Pt=tt.length,It=xr.length;if(Ct){for(_(h).iso=!0,y=0,x=Pt;y<x;y++)if(tt[y][1].exec(Ct[1])){R=tt[y][0],E=tt[y][2]!==!1;break}if(R==null)h._isValid=!1;else{if(Ct[3]){for(y=0,x=It;y<x;y++)if(xr[y][1].exec(Ct[3])){nt=(Ct[2]||" ")+xr[y][0];break}if(nt==null)return void(h._isValid=!1)}if(E||nt==null){if(Ct[4]){if(!Zn.exec(Ct[4]))return void(h._isValid=!1);yt="Z"}h._f=R+(nt||"")+(yt||""),Ba(h)}else h._isValid=!1}}else h._isValid=!1}function er(h,y,x,E,R,nt){return h=[function(yt){yt=parseInt(yt,10);{if(yt<=49)return 2e3+yt;if(yt<=999)return 1900+yt}return yt}(h),de.indexOf(y),parseInt(x,10),parseInt(E,10),parseInt(R,10)],nt&&h.push(parseInt(nt,10)),h}function Di(h){var y,x,E,R,nt=Ru.exec(h._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));nt?(y=er(nt[4],nt[3],nt[2],nt[5],nt[6],nt[7]),x=nt[1],E=y,R=h,x&&Ie.indexOf(x)!==new Date(E[0],E[1],E[2]).getDay()?(_(R).weekdayMismatch=!0,R._isValid=!1):(h._a=y,h._tzm=(x=nt[8],E=nt[9],R=nt[10],x?il[x]:E?0:60*(((x=parseInt(R,10))-(E=x%100))/100)+E),h._d=zr.apply(null,h._a),h._d.setUTCMinutes(h._d.getUTCMinutes()-h._tzm),_(h).rfc2822=!0)):h._isValid=!1}function Mi(h,y,x){return h??y??x}function Qn(h){var y,x,E,R,nt,yt,Ct,Pt,It,ue,re,He=[];if(!h._d){for(E=h,R=new Date(i.now()),x=E._useUTC?[R.getUTCFullYear(),R.getUTCMonth(),R.getUTCDate()]:[R.getFullYear(),R.getMonth(),R.getDate()],h._w&&h._a[xt]==null&&h._a[Ft]==null&&((R=(E=h)._w).GG!=null||R.W!=null||R.E!=null?(Pt=1,It=4,nt=Mi(R.GG,E._a[Vt],Be(Se(),1,4).year),yt=Mi(R.W,1),((Ct=Mi(R.E,1))<1||7<Ct)&&(ue=!0)):(Pt=E._locale._week.dow,It=E._locale._week.doy,re=Be(Se(),Pt,It),nt=Mi(R.gg,E._a[Vt],re.year),yt=Mi(R.w,re.week),R.d!=null?((Ct=R.d)<0||6<Ct)&&(ue=!0):R.e!=null?(Ct=R.e+Pt,(R.e<0||6<R.e)&&(ue=!0)):Ct=Pt),yt<1||yt>Oe(nt,Pt,It)?_(E)._overflowWeeks=!0:ue!=null?_(E)._overflowWeekday=!0:(re=ae(nt,yt,Ct,Pt,It),E._a[Vt]=re.year,E._dayOfYear=re.dayOfYear)),h._dayOfYear!=null&&(R=Mi(h._a[Vt],x[Vt]),(h._dayOfYear>Qt(R)||h._dayOfYear===0)&&(_(h)._overflowDayOfYear=!0),ue=zr(R,0,h._dayOfYear),h._a[Ft]=ue.getUTCMonth(),h._a[xt]=ue.getUTCDate()),y=0;y<3&&h._a[y]==null;++y)h._a[y]=He[y]=x[y];for(;y<7;y++)h._a[y]=He[y]=h._a[y]==null?y===2?1:0:h._a[y];h._a[ft]===24&&h._a[Lt]===0&&h._a[_t]===0&&h._a[Ut]===0&&(h._nextDay=!0,h._a[ft]=0),h._d=(h._useUTC?zr:ni).apply(null,He),nt=h._useUTC?h._d.getUTCDay():h._d.getDay(),h._tzm!=null&&h._d.setUTCMinutes(h._d.getUTCMinutes()-h._tzm),h._nextDay&&(h._a[ft]=24),h._w&&h._w.d!==void 0&&h._w.d!==nt&&(_(h).weekdayMismatch=!0)}}function Ba(h){if(h._f===i.ISO_8601)nl(h);else if(h._f===i.RFC_2822)Di(h);else{h._a=[],_(h).empty=!0;for(var y,x,E,R,nt,yt=""+h._i,Ct=yt.length,Pt=0,It=rt(h._f,h._locale).match(b)||[],ue=It.length,re=0;re<ue;re++)x=It[re],(y=(yt.match(le(x,h))||[])[0])&&(0<(E=yt.substr(0,yt.indexOf(y))).length&&_(h).unusedInput.push(E),yt=yt.slice(yt.indexOf(y)+y.length),Pt+=y.length),vt[x]?(y?_(h).empty=!1:_(h).unusedTokens.push(x),E=x,nt=h,(R=y)!=null&&a(Kt,E)&&Kt[E](R,nt._a,nt,E)):h._strict&&!y&&_(h).unusedTokens.push(x);_(h).charsLeftOver=Ct-Pt,0<yt.length&&_(h).unusedInput.push(yt),h._a[ft]<=12&&_(h).bigHour===!0&&0<h._a[ft]&&(_(h).bigHour=void 0),_(h).parsedDateParts=h._a.slice(0),_(h).meridiem=h._meridiem,h._a[ft]=function(He,rr,oi){return oi==null?rr:He.meridiemHour!=null?He.meridiemHour(rr,oi):He.isPM!=null?((He=He.isPM(oi))&&rr<12&&(rr+=12),rr=He||rr!==12?rr:0):rr}(h._locale,h._a[ft],h._meridiem),(Ct=_(h).era)!==null&&(h._a[Vt]=h._locale.erasConvertYear(Ct,h._a[Vt])),Qn(h),Rt(h)}}function sl(h){var y,x,E,R=h._i,nt=h._f;return h._locale=h._locale||oe(h._l),R===null||nt===void 0&&R===""?w({nullInput:!0}):(typeof R=="string"&&(h._i=R=h._locale.preparse(R)),q(R)?new W(Rt(R)):(d(R)?h._d=R:n(nt)?function(yt){var Ct,Pt,It,ue,re,He,rr=!1,oi=yt._f.length;if(oi===0)return _(yt).invalidFormat=!0,yt._d=new Date(NaN);for(ue=0;ue<oi;ue++)re=0,He=!1,Ct=P({},yt),yt._useUTC!=null&&(Ct._useUTC=yt._useUTC),Ct._f=yt._f[ue],Ba(Ct),k(Ct)&&(He=!0),re=(re+=_(Ct).charsLeftOver)+10*_(Ct).unusedTokens.length,_(Ct).score=re,rr?re<It&&(It=re,Pt=Ct):(It==null||re<It||He)&&(It=re,Pt=Ct,He&&(rr=!0));p(yt,Pt||Ct)}(h):nt?Ba(h):l(nt=(R=h)._i)?R._d=new Date(i.now()):d(nt)?R._d=new Date(nt.valueOf()):typeof nt=="string"?(x=R,(y=rl.exec(x._i))!==null?x._d=new Date(+y[1]):(nl(x),x._isValid===!1&&(delete x._isValid,Di(x),x._isValid===!1&&(delete x._isValid,x._strict?x._isValid=!1:i.createFromInputFallback(x))))):n(nt)?(R._a=f(nt.slice(0),function(yt){return parseInt(yt,10)}),Qn(R)):s(nt)?(y=R)._d||(E=(x=K(y._i)).day===void 0?x.date:x.day,y._a=f([x.year,x.month,E,x.hour,x.minute,x.second,x.millisecond],function(yt){return yt&&parseInt(yt,10)}),Qn(y)):u(nt)?R._d=new Date(nt):i.createFromInputFallback(R),k(h)||(h._d=null),h))}function mr(h,y,x,E,R){var nt={};return y!==!0&&y!==!1||(E=y,y=void 0),x!==!0&&x!==!1||(E=x,x=void 0),(s(h)&&o(h)||n(h)&&h.length===0)&&(h=void 0),nt._isAMomentObject=!0,nt._useUTC=nt._isUTC=R,nt._l=x,nt._i=h,nt._f=y,nt._strict=E,(R=new W(Rt(sl(R=nt))))._nextDay&&(R.add(1,"d"),R._nextDay=void 0),R}function Se(h,y,x,E){return mr(h,y,x,E,!1)}i.createFromInputFallback=H("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(h){h._d=new Date(h._i+(h._useUTC?" UTC":""))}),i.ISO_8601=function(){},i.RFC_2822=function(){},Yt=H("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var h=Se.apply(null,arguments);return this.isValid()&&h.isValid()?h<this?this:h:w()}),et=H("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var h=Se.apply(null,arguments);return this.isValid()&&h.isValid()?this<h?this:h:w()});function Sr(h,y){var x,E;if(!(y=y.length===1&&n(y[0])?y[0]:y).length)return Se();for(x=y[0],E=1;E<y.length;++E)y[E].isValid()&&!y[E][h](x)||(x=y[E]);return x}var ji=["year","quarter","month","week","day","hour","minute","second","millisecond"];function si(y){var y=K(y),x=y.year||0,E=y.quarter||0,R=y.month||0,nt=y.week||y.isoWeek||0,yt=y.day||0,Ct=y.hour||0,Pt=y.minute||0,It=y.second||0,ue=y.millisecond||0;this._isValid=function(re){var He,rr,oi=!1,Wu=ji.length;for(He in re)if(a(re,He)&&(Ht.call(ji,He)===-1||re[He]!=null&&isNaN(re[He])))return!1;for(rr=0;rr<Wu;++rr)if(re[ji[rr]]){if(oi)return!1;parseFloat(re[ji[rr]])!==F(re[ji[rr]])&&(oi=!0)}return!0}(y),this._milliseconds=+ue+1e3*It+6e4*Pt+1e3*Ct*60*60,this._days=+yt+7*nt,this._months=+R+3*E+12*x,this._data={},this._locale=oe(),this._bubble()}function $i(h){return h instanceof si}function Wr(h){return h<0?-1*Math.round(-1*h):Math.round(h)}function Ia(h,y){j(h,0,0,function(){var x=this.utcOffset(),E="+";return x<0&&(x=-x,E="-"),E+Q(~~(x/60),2)+y+Q(~~x%60,2)})}Ia("Z",":"),Ia("ZZ",""),st("Z",wt),st("ZZ",wt),Gt(["Z","ZZ"],function(h,y,x){x._useUTC=!0,x._tzm=Jn(wt,h)});var Is=/([\+\-]|\d\d)/gi;function Jn(h,x){var x=(x||"").match(h);return x===null?null:(x=60*(h=((x[x.length-1]||[])+"").match(Is)||["-",0,0])[1]+F(h[2]))===0?0:h[0]==="+"?x:-x}function Hr(h,y){var x;return y._isUTC?(y=y.clone(),x=(q(h)||d(h)?h:Se(h)).valueOf()-y.valueOf(),y._d.setTime(y._d.valueOf()+x),i.updateOffset(y,!1),y):Se(h).local()}function Fu(h){return-Math.round(h._d.getTimezoneOffset())}function md(){return!!this.isValid()&&this._isUTC&&this._offset===0}i.updateOffset=function(){};var z4=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,W4=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function ai(h,y){var x,E=h,R=null;return $i(h)?E={ms:h._milliseconds,d:h._days,M:h._months}:u(h)||!isNaN(+h)?(E={},y?E[y]=+h:E.milliseconds=+h):(R=z4.exec(h))?(x=R[1]==="-"?-1:1,E={y:0,d:F(R[xt])*x,h:F(R[ft])*x,m:F(R[Lt])*x,s:F(R[_t])*x,ms:F(Wr(1e3*R[Ut]))*x}):(R=W4.exec(h))?(x=R[1]==="-"?-1:1,E={y:ts(R[2],x),M:ts(R[3],x),w:ts(R[4],x),d:ts(R[5],x),h:ts(R[6],x),m:ts(R[7],x),s:ts(R[8],x)}):E==null?E={}:typeof E=="object"&&("from"in E||"to"in E)&&(y=function(nt,yt){var Ct;return!nt.isValid()||!yt.isValid()?{milliseconds:0,months:0}:(yt=Hr(yt,nt),nt.isBefore(yt)?Ct=bd(nt,yt):((Ct=bd(yt,nt)).milliseconds=-Ct.milliseconds,Ct.months=-Ct.months),Ct)}(Se(E.from),Se(E.to)),(E={}).ms=y.milliseconds,E.M=y.months),R=new si(E),$i(h)&&a(h,"_locale")&&(R._locale=h._locale),$i(h)&&a(h,"_isValid")&&(R._isValid=h._isValid),R}function ts(h,y){return h=h&&parseFloat(h.replace(",",".")),(isNaN(h)?0:h)*y}function bd(h,y){var x={};return x.months=y.month()-h.month()+12*(y.year()-h.year()),h.clone().add(x.months,"M").isAfter(y)&&--x.months,x.milliseconds=+y-+h.clone().add(x.months,"M"),x}function _d(h,y){return function(x,E){var R;return E===null||isNaN(+E)||(M(y,"moment()."+y+"(period, number) is deprecated. Please use moment()."+y+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),R=x,x=E,E=R),xd(this,ai(x,E),h),this}}function xd(h,yt,x,E){var R=yt._milliseconds,nt=Wr(yt._days),yt=Wr(yt._months);h.isValid()&&(E=E==null||E,yt&&$t(h,L(h,"Month")+yt*x),nt&&J(h,"Date",L(h,"Date")+nt*x),R&&h._d.setTime(h._d.valueOf()+R*x),E&&i.updateOffset(h,nt||yt))}ai.fn=si.prototype,ai.invalid=function(){return ai(NaN)},ee=_d(1,"add"),Pe=_d(-1,"subtract");function vd(h){return typeof h=="string"||h instanceof String}function H4(h){return q(h)||d(h)||vd(h)||u(h)||function(y){var x=n(y),E=!1;return x&&(E=y.filter(function(R){return!u(R)&&vd(y)}).length===0),x&&E}(h)||function(y){var x,E,R=s(y)&&!o(y),nt=!1,yt=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],Ct=yt.length;for(x=0;x<Ct;x+=1)E=yt[x],nt=nt||a(y,E);return R&&nt}(h)||h==null}function al(h,R){if(h.date()<R.date())return-al(R,h);var x=12*(R.year()-h.year())+(R.month()-h.month()),E=h.clone().add(x,"months"),R=R-E<0?(R-E)/(E-h.clone().add(x-1,"months")):(R-E)/(h.clone().add(1+x,"months")-E);return-(x+R)||0}function kd(h){return h===void 0?this._locale._abbr:((h=oe(h))!=null&&(this._locale=h),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]",Ge=H("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(h){return h===void 0?this.localeData():this.locale(h)});function wd(){return this._locale}var Td=126227808e5;function Os(h,y){return(h%y+y)%y}function Ed(h,y,x){return h<100&&0<=h?new Date(h+400,y,x)-Td:new Date(h,y,x).valueOf()}function Cd(h,y,x){return h<100&&0<=h?Date.UTC(h+400,y,x)-Td:Date.UTC(h,y,x)}function Pu(h,y){return y.erasAbbrRegex(h)}function Yu(){for(var h=[],y=[],x=[],E=[],R=this.eras(),nt=0,yt=R.length;nt<yt;++nt)y.push(Xt(R[nt].name)),h.push(Xt(R[nt].abbr)),x.push(Xt(R[nt].narrow)),E.push(Xt(R[nt].name)),E.push(Xt(R[nt].abbr)),E.push(Xt(R[nt].narrow));this._erasRegex=new RegExp("^("+E.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+y.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+h.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+x.join("|")+")","i")}function ol(h,y){j(0,[h,h.length],0,y)}function Sd(h,y,x,E,R){var nt;return h==null?Be(this,E,R).year:(nt=Oe(h,E,R),function(yt,Ct,Pt,It,ue){return yt=ae(yt,Ct,Pt,It,ue),Ct=zr(yt.year,0,yt.dayOfYear),this.year(Ct.getUTCFullYear()),this.month(Ct.getUTCMonth()),this.date(Ct.getUTCDate()),this}.call(this,h,y=nt<y?nt:y,x,E,R))}j("N",0,0,"eraAbbr"),j("NN",0,0,"eraAbbr"),j("NNN",0,0,"eraAbbr"),j("NNNN",0,0,"eraName"),j("NNNNN",0,0,"eraNarrow"),j("y",["y",1],"yo","eraYear"),j("y",["yy",2],0,"eraYear"),j("y",["yyy",3],0,"eraYear"),j("y",["yyyy",4],0,"eraYear"),st("N",Pu),st("NN",Pu),st("NNN",Pu),st("NNNN",function(h,y){return y.erasNameRegex(h)}),st("NNNNN",function(h,y){return y.erasNarrowRegex(h)}),Gt(["N","NN","NNN","NNNN","NNNNN"],function(h,y,x,E){E=x._locale.erasParse(h,E,x._strict),E?_(x).era=E:_(x).invalidEra=h}),st("y",Tt),st("yy",Tt),st("yyy",Tt),st("yyyy",Tt),st("yo",function(h,y){return y._eraYearOrdinalRegex||Tt}),Gt(["y","yy","yyy","yyyy"],Vt),Gt(["yo"],function(h,y,x,E){var R;x._locale._eraYearOrdinalRegex&&(R=h.match(x._locale._eraYearOrdinalRegex)),x._locale.eraYearOrdinalParse?y[Vt]=x._locale.eraYearOrdinalParse(h,R):y[Vt]=parseInt(h,10)}),j(0,["gg",2],0,function(){return this.weekYear()%100}),j(0,["GG",2],0,function(){return this.isoWeekYear()%100}),ol("gggg","weekYear"),ol("ggggg","weekYear"),ol("GGGG","isoWeekYear"),ol("GGGGG","isoWeekYear"),ut("weekYear","gg"),ut("isoWeekYear","GG"),Y("weekYear",1),Y("isoWeekYear",1),st("G",gt),st("g",gt),st("GG",V,ce),st("gg",V,ce),st("GGGG",On,es),st("gggg",On,es),st("GGGGG",Bn,In),st("ggggg",Bn,In),Ee(["gggg","ggggg","GGGG","GGGGG"],function(h,y,x,E){y[E.substr(0,2)]=F(h)}),Ee(["gg","GG"],function(h,y,x,E){y[E]=i.parseTwoDigitYear(h)}),j("Q",0,"Qo","quarter"),ut("quarter","Q"),Y("quarter",7),st("Q",T),Gt("Q",function(h,y){y[Ft]=3*(F(h)-1)}),j("D",["DD",2],"Do","date"),ut("date","D"),Y("date",9),st("D",V),st("DD",V,ce),st("Do",function(h,y){return h?y._dayOfMonthOrdinalParse||y._ordinalParse:y._dayOfMonthOrdinalParseLenient}),Gt(["D","DD"],xt),Gt("Do",function(h,y){y[xt]=F(h.match(V)[0])}),On=I("Date",!0),j("DDD",["DDDD",3],"DDDo","dayOfYear"),ut("dayOfYear","DDD"),Y("dayOfYear",4),st("DDD",Mt),st("DDDD",ht),Gt(["DDD","DDDD"],function(h,y,x){x._dayOfYear=F(h)}),j("m",["mm",2],0,"minute"),ut("minute","m"),Y("minute",14),st("m",V),st("mm",V,ce),Gt(["m","mm"],Lt);var Nn,es=I("Minutes",!1),Bn=(j("s",["ss",2],0,"second"),ut("second","s"),Y("second",15),st("s",V),st("ss",V,ce),Gt(["s","ss"],_t),I("Seconds",!1));for(j("S",0,0,function(){return~~(this.millisecond()/100)}),j(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),j(0,["SSS",3],0,"millisecond"),j(0,["SSSS",4],0,function(){return 10*this.millisecond()}),j(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),j(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),j(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),j(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),j(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),ut("millisecond","ms"),Y("millisecond",16),st("S",Mt,T),st("SS",Mt,ce),st("SSS",Mt,ht),Nn="SSSS";Nn.length<=9;Nn+="S")st(Nn,Tt);function G4(h,y){y[Ut]=F(1e3*("0."+h))}for(Nn="S";Nn.length<=9;Nn+="S")Gt(Nn,G4);In=I("Milliseconds",!1),j("z",0,0,"zoneAbbr"),j("zz",0,0,"zoneName"),T=W.prototype;function Ad(h){return h}T.add=ee,T.calendar=function(x,R){arguments.length===1&&(arguments[0]?H4(arguments[0])?(x=arguments[0],R=void 0):function(nt){for(var yt=s(nt)&&!o(nt),Ct=!1,Pt=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],It=0;It<Pt.length;It+=1)Ct=Ct||a(nt,Pt[It]);return yt&&Ct}(arguments[0])&&(R=arguments[0],x=void 0):R=x=void 0);var x=x||Se(),E=Hr(x,this).startOf("day"),E=i.calendarFormat(this,E)||"sameElse",R=R&&(C(R[E])?R[E].call(this,x):R[E]);return this.format(R||this.localeData().calendar(E,this,Se(x)))},T.clone=function(){return new W(this)},T.diff=function(h,y,x){var E,R,nt;if(!this.isValid())return NaN;if(!(E=Hr(h,this)).isValid())return NaN;switch(R=6e4*(E.utcOffset()-this.utcOffset()),y=bt(y)){case"year":nt=al(this,E)/12;break;case"month":nt=al(this,E);break;case"quarter":nt=al(this,E)/3;break;case"second":nt=(this-E)/1e3;break;case"minute":nt=(this-E)/6e4;break;case"hour":nt=(this-E)/36e5;break;case"day":nt=(this-E-R)/864e5;break;case"week":nt=(this-E-R)/6048e5;break;default:nt=this-E}return x?nt:X(nt)},T.endOf=function(h){var y,x;if((h=bt(h))===void 0||h==="millisecond"||!this.isValid())return this;switch(x=this._isUTC?Cd:Ed,h){case"year":y=x(this.year()+1,0,1)-1;break;case"quarter":y=x(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":y=x(this.year(),this.month()+1,1)-1;break;case"week":y=x(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":y=x(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":y=x(this.year(),this.month(),this.date()+1)-1;break;case"hour":y=this._d.valueOf(),y+=36e5-Os(y+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":y=this._d.valueOf(),y+=6e4-Os(y,6e4)-1;break;case"second":y=this._d.valueOf(),y+=1e3-Os(y,1e3)-1;break}return this._d.setTime(y),i.updateOffset(this,!0),this},T.format=function(h){return h=h||(this.isUtc()?i.defaultFormatUtc:i.defaultFormat),h=ot(this,h),this.localeData().postformat(h)},T.from=function(h,y){return this.isValid()&&(q(h)&&h.isValid()||Se(h).isValid())?ai({to:this,from:h}).locale(this.locale()).humanize(!y):this.localeData().invalidDate()},T.fromNow=function(h){return this.from(Se(),h)},T.to=function(h,y){return this.isValid()&&(q(h)&&h.isValid()||Se(h).isValid())?ai({from:this,to:h}).locale(this.locale()).humanize(!y):this.localeData().invalidDate()},T.toNow=function(h){return this.to(Se(),h)},T.get=function(h){return C(this[h=bt(h)])?this[h]():this},T.invalidAt=function(){return _(this).overflow},T.isAfter=function(h,y){return h=q(h)?h:Se(h),!(!this.isValid()||!h.isValid())&&((y=bt(y)||"millisecond")==="millisecond"?this.valueOf()>h.valueOf():h.valueOf()<this.clone().startOf(y).valueOf())},T.isBefore=function(h,y){return h=q(h)?h:Se(h),!(!this.isValid()||!h.isValid())&&((y=bt(y)||"millisecond")==="millisecond"?this.valueOf()<h.valueOf():this.clone().endOf(y).valueOf()<h.valueOf())},T.isBetween=function(h,y,x,E){return h=q(h)?h:Se(h),y=q(y)?y:Se(y),!!(this.isValid()&&h.isValid()&&y.isValid())&&((E=E||"()")[0]==="("?this.isAfter(h,x):!this.isBefore(h,x))&&(E[1]===")"?this.isBefore(y,x):!this.isAfter(y,x))},T.isSame=function(x,y){var x=q(x)?x:Se(x);return!(!this.isValid()||!x.isValid())&&((y=bt(y)||"millisecond")==="millisecond"?this.valueOf()===x.valueOf():(x=x.valueOf(),this.clone().startOf(y).valueOf()<=x&&x<=this.clone().endOf(y).valueOf()))},T.isSameOrAfter=function(h,y){return this.isSame(h,y)||this.isAfter(h,y)},T.isSameOrBefore=function(h,y){return this.isSame(h,y)||this.isBefore(h,y)},T.isValid=function(){return k(this)},T.lang=Ge,T.locale=kd,T.localeData=wd,T.max=et,T.min=Yt,T.parsingFlags=function(){return p({},_(this))},T.set=function(h,y){if(typeof h=="object")for(var x=function(nt){var yt,Ct=[];for(yt in nt)a(nt,yt)&&Ct.push({unit:yt,priority:Ot[yt]});return Ct.sort(function(Pt,It){return Pt.priority-It.priority}),Ct}(h=K(h)),E=x.length,R=0;R<E;R++)this[x[R].unit](h[x[R].unit]);else if(C(this[h=bt(h)]))return this[h](y);return this},T.startOf=function(h){var y,x;if((h=bt(h))===void 0||h==="millisecond"||!this.isValid())return this;switch(x=this._isUTC?Cd:Ed,h){case"year":y=x(this.year(),0,1);break;case"quarter":y=x(this.year(),this.month()-this.month()%3,1);break;case"month":y=x(this.year(),this.month(),1);break;case"week":y=x(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":y=x(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":y=x(this.year(),this.month(),this.date());break;case"hour":y=this._d.valueOf(),y-=Os(y+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":y=this._d.valueOf(),y-=Os(y,6e4);break;case"second":y=this._d.valueOf(),y-=Os(y,1e3);break}return this._d.setTime(y),i.updateOffset(this,!0),this},T.subtract=Pe,T.toArray=function(){var h=this;return[h.year(),h.month(),h.date(),h.hour(),h.minute(),h.second(),h.millisecond()]},T.toObject=function(){var h=this;return{years:h.year(),months:h.month(),date:h.date(),hours:h.hours(),minutes:h.minutes(),seconds:h.seconds(),milliseconds:h.milliseconds()}},T.toDate=function(){return new Date(this.valueOf())},T.toISOString=function(h){if(!this.isValid())return null;var y=(h=h!==!0)?this.clone().utc():this;return y.year()<0||9999<y.year()?ot(y,h?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):C(Date.prototype.toISOString)?h?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",ot(y,"Z")):ot(y,h?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},T.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var h,y="moment",x="";return this.isLocal()||(y=this.utcOffset()===0?"moment.utc":"moment.parseZone",x="Z"),y="["+y+'("]',h=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",this.format(y+h+"-MM-DD[T]HH:mm:ss.SSS"+(x+'[")]'))},typeof Symbol<"u"&&Symbol.for!=null&&(T[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),T.toJSON=function(){return this.isValid()?this.toISOString():null},T.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},T.unix=function(){return Math.floor(this.valueOf()/1e3)},T.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},T.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},T.eraName=function(){for(var h,y=this.localeData().eras(),x=0,E=y.length;x<E;++x)if(h=this.clone().startOf("day").valueOf(),y[x].since<=h&&h<=y[x].until||y[x].until<=h&&h<=y[x].since)return y[x].name;return""},T.eraNarrow=function(){for(var h,y=this.localeData().eras(),x=0,E=y.length;x<E;++x)if(h=this.clone().startOf("day").valueOf(),y[x].since<=h&&h<=y[x].until||y[x].until<=h&&h<=y[x].since)return y[x].narrow;return""},T.eraAbbr=function(){for(var h,y=this.localeData().eras(),x=0,E=y.length;x<E;++x)if(h=this.clone().startOf("day").valueOf(),y[x].since<=h&&h<=y[x].until||y[x].until<=h&&h<=y[x].since)return y[x].abbr;return""},T.eraYear=function(){for(var h,y,x=this.localeData().eras(),E=0,R=x.length;E<R;++E)if(h=x[E].since<=x[E].until?1:-1,y=this.clone().startOf("day").valueOf(),x[E].since<=y&&y<=x[E].until||x[E].until<=y&&y<=x[E].since)return(this.year()-i(x[E].since).year())*h+x[E].offset;return this.year()},T.year=cl,T.isLeapYear=function(){return U(this.year())},T.weekYear=function(h){return Sd.call(this,h,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},T.isoWeekYear=function(h){return Sd.call(this,h,this.isoWeek(),this.isoWeekday(),1,4)},T.quarter=T.quarters=function(h){return h==null?Math.ceil((this.month()+1)/3):this.month(3*(h-1)+this.month()%3)},T.month=ne,T.daysInMonth=function(){return dt(this.year(),this.month())},T.week=T.weeks=function(h){var y=this.localeData().week(this);return h==null?y:this.add(7*(h-y),"d")},T.isoWeek=T.isoWeeks=function(h){var y=Be(this,1,4).week;return h==null?y:this.add(7*(h-y),"d")},T.weeksInYear=function(){var h=this.localeData()._week;return Oe(this.year(),h.dow,h.doy)},T.weeksInWeekYear=function(){var h=this.localeData()._week;return Oe(this.weekYear(),h.dow,h.doy)},T.isoWeeksInYear=function(){return Oe(this.year(),1,4)},T.isoWeeksInISOWeekYear=function(){return Oe(this.isoWeekYear(),1,4)},T.date=On,T.day=T.days=function(h){if(!this.isValid())return h!=null?this:NaN;var y,x,E=this._isUTC?this._d.getUTCDay():this._d.getDay();return h!=null?(y=h,x=this.localeData(),h=typeof y!="string"?y:isNaN(y)?typeof(y=x.weekdaysParse(y))=="number"?y:null:parseInt(y,10),this.add(h-E,"d")):E},T.weekday=function(h){if(!this.isValid())return h!=null?this:NaN;var y=(this.day()+7-this.localeData()._week.dow)%7;return h==null?y:this.add(h-y,"d")},T.isoWeekday=function(h){return this.isValid()?h!=null?(y=h,x=this.localeData(),x=typeof y=="string"?x.weekdaysParse(y)%7||7:isNaN(y)?null:y,this.day(this.day()%7?x:x-7)):this.day()||7:h!=null?this:NaN;var y,x},T.dayOfYear=function(h){var y=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return h==null?y:this.add(h-y,"d")},T.hour=T.hours=pt,T.minute=T.minutes=es,T.second=T.seconds=Bn,T.millisecond=T.milliseconds=In,T.utcOffset=function(h,y,x){var E,R=this._offset||0;if(!this.isValid())return h!=null?this:NaN;if(h==null)return this._isUTC?R:Fu(this);if(typeof h=="string"){if((h=Jn(wt,h))===null)return this}else Math.abs(h)<16&&!x&&(h*=60);return!this._isUTC&&y&&(E=Fu(this)),this._offset=h,this._isUTC=!0,E!=null&&this.add(E,"m"),R!==h&&(!y||this._changeInProgress?xd(this,ai(h-R,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this},T.utc=function(h){return this.utcOffset(0,h)},T.local=function(h){return this._isUTC&&(this.utcOffset(0,h),this._isUTC=!1,h&&this.subtract(Fu(this),"m")),this},T.parseZone=function(){var h;return this._tzm!=null?this.utcOffset(this._tzm,!1,!0):typeof this._i=="string"&&((h=Jn(Et,this._i))!=null?this.utcOffset(h):this.utcOffset(0,!0)),this},T.hasAlignedHourOffset=function(h){return!!this.isValid()&&(h=h?Se(h).utcOffset():0,(this.utcOffset()-h)%60==0)},T.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},T.isLocal=function(){return!!this.isValid()&&!this._isUTC},T.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},T.isUtc=md,T.isUTC=md,T.zoneAbbr=function(){return this._isUTC?"UTC":""},T.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},T.dates=H("dates accessor is deprecated. Use date instead.",On),T.months=H("months accessor is deprecated. Use month instead",ne),T.years=H("years accessor is deprecated. Use year instead",cl),T.zone=H("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(h,y){return h!=null?(this.utcOffset(h=typeof h!="string"?-h:h,y),this):-this.utcOffset()}),T.isDSTShifted=H("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var h,y={};return P(y,this),(y=sl(y))._a?(h=(y._isUTC?g:Se)(y._a),this._isDSTShifted=this.isValid()&&0<function(x,E,R){for(var nt=Math.min(x.length,E.length),yt=Math.abs(x.length-E.length),Ct=0,Pt=0;Pt<nt;Pt++)(R&&x[Pt]!==E[Pt]||!R&&F(x[Pt])!==F(E[Pt]))&&Ct++;return Ct+yt}(y._a,h.toArray())):this._isDSTShifted=!1,this._isDSTShifted}),ce=D.prototype;function ll(h,y,x,nt){var R=oe(),nt=g().set(nt,y);return R[x](nt,h)}function Ld(h,y,x){if(u(h)&&(y=h,h=void 0),h=h||"",y!=null)return ll(h,y,x,"month");for(var E=[],R=0;R<12;R++)E[R]=ll(h,R,x,"month");return E}function Vu(h,y,x,E){y=(typeof h=="boolean"?u(y)&&(x=y,y=void 0):(y=h,h=!1,u(x=y)&&(x=y,y=void 0)),y||"");var R,nt=oe(),yt=h?nt._week.dow:0,Ct=[];if(x!=null)return ll(y,(x+yt)%7,E,"day");for(R=0;R<7;R++)Ct[R]=ll(y,(R+yt)%7,E,"day");return Ct}ce.calendar=function(h,y,x){return C(h=this._calendar[h]||this._calendar.sameElse)?h.call(y,x):h},ce.longDateFormat=function(h){var y=this._longDateFormat[h],x=this._longDateFormat[h.toUpperCase()];return y||!x?y:(this._longDateFormat[h]=x.match(b).map(function(E){return E==="MMMM"||E==="MM"||E==="DD"||E==="dddd"?E.slice(1):E}).join(""),this._longDateFormat[h])},ce.invalidDate=function(){return this._invalidDate},ce.ordinal=function(h){return this._ordinal.replace("%d",h)},ce.preparse=Ad,ce.postformat=Ad,ce.relativeTime=function(h,y,x,E){var R=this._relativeTime[x];return C(R)?R(h,y,x,E):R.replace(/%d/i,h)},ce.pastFuture=function(h,y){return C(h=this._relativeTime[0<h?"future":"past"])?h(y):h.replace(/%s/i,y)},ce.set=function(h){var y,x;for(x in h)a(h,x)&&(C(y=h[x])?this[x]=y:this["_"+x]=y);this._config=h,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},ce.eras=function(h,y){for(var x,E=this._eras||oe("en")._eras,R=0,nt=E.length;R<nt;++R){switch(typeof E[R].since){case"string":x=i(E[R].since).startOf("day"),E[R].since=x.valueOf();break}switch(typeof E[R].until){case"undefined":E[R].until=1/0;break;case"string":x=i(E[R].until).startOf("day").valueOf(),E[R].until=x.valueOf();break}}return E},ce.erasParse=function(h,y,x){var E,R,nt,yt,Ct,Pt=this.eras();for(h=h.toUpperCase(),E=0,R=Pt.length;E<R;++E)if(nt=Pt[E].name.toUpperCase(),yt=Pt[E].abbr.toUpperCase(),Ct=Pt[E].narrow.toUpperCase(),x)switch(y){case"N":case"NN":case"NNN":if(yt===h)return Pt[E];break;case"NNNN":if(nt===h)return Pt[E];break;case"NNNNN":if(Ct===h)return Pt[E];break}else if(0<=[nt,yt,Ct].indexOf(h))return Pt[E]},ce.erasConvertYear=function(h,y){var x=h.since<=h.until?1:-1;return y===void 0?i(h.since).year():i(h.since).year()+(y-h.offset)*x},ce.erasAbbrRegex=function(h){return a(this,"_erasAbbrRegex")||Yu.call(this),h?this._erasAbbrRegex:this._erasRegex},ce.erasNameRegex=function(h){return a(this,"_erasNameRegex")||Yu.call(this),h?this._erasNameRegex:this._erasRegex},ce.erasNarrowRegex=function(h){return a(this,"_erasNarrowRegex")||Yu.call(this),h?this._erasNarrowRegex:this._erasRegex},ce.months=function(h,y){return h?(n(this._months)?this._months:this._months[(this._months.isFormat||me).test(y)?"format":"standalone"])[h.month()]:n(this._months)?this._months:this._months.standalone},ce.monthsShort=function(h,y){return h?(n(this._monthsShort)?this._monthsShort:this._monthsShort[me.test(y)?"format":"standalone"])[h.month()]:n(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},ce.monthsParse=function(h,y,x){var E,R;if(this._monthsParseExact)return function(re,yt,Ct){var Pt,It,ue,re=re.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],Pt=0;Pt<12;++Pt)ue=g([2e3,Pt]),this._shortMonthsParse[Pt]=this.monthsShort(ue,"").toLocaleLowerCase(),this._longMonthsParse[Pt]=this.months(ue,"").toLocaleLowerCase();return Ct?yt==="MMM"?(It=Ht.call(this._shortMonthsParse,re))!==-1?It:null:(It=Ht.call(this._longMonthsParse,re))!==-1?It:null:yt==="MMM"?(It=Ht.call(this._shortMonthsParse,re))!==-1||(It=Ht.call(this._longMonthsParse,re))!==-1?It:null:(It=Ht.call(this._longMonthsParse,re))!==-1||(It=Ht.call(this._shortMonthsParse,re))!==-1?It:null}.call(this,h,y,x);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),E=0;E<12;E++)if(R=g([2e3,E]),x&&!this._longMonthsParse[E]&&(this._longMonthsParse[E]=new RegExp("^"+this.months(R,"").replace(".","")+"$","i"),this._shortMonthsParse[E]=new RegExp("^"+this.monthsShort(R,"").replace(".","")+"$","i")),x||this._monthsParse[E]||(R="^"+this.months(R,"")+"|^"+this.monthsShort(R,""),this._monthsParse[E]=new RegExp(R.replace(".",""),"i")),x&&y==="MMMM"&&this._longMonthsParse[E].test(h)||x&&y==="MMM"&&this._shortMonthsParse[E].test(h)||!x&&this._monthsParse[E].test(h))return E},ce.monthsRegex=function(h){return this._monthsParseExact?(a(this,"_monthsRegex")||ge.call(this),h?this._monthsStrictRegex:this._monthsRegex):(a(this,"_monthsRegex")||(this._monthsRegex=ke),this._monthsStrictRegex&&h?this._monthsStrictRegex:this._monthsRegex)},ce.monthsShortRegex=function(h){return this._monthsParseExact?(a(this,"_monthsRegex")||ge.call(this),h?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,"_monthsShortRegex")||(this._monthsShortRegex=be),this._monthsShortStrictRegex&&h?this._monthsShortStrictRegex:this._monthsShortRegex)},ce.week=function(h){return Be(h,this._week.dow,this._week.doy).week},ce.firstDayOfYear=function(){return this._week.doy},ce.firstDayOfWeek=function(){return this._week.dow},ce.weekdays=function(h,y){return y=n(this._weekdays)?this._weekdays:this._weekdays[h&&h!==!0&&this._weekdays.isFormat.test(y)?"format":"standalone"],h===!0?Fe(y,this._week.dow):h?y[h.day()]:y},ce.weekdaysMin=function(h){return h===!0?Fe(this._weekdaysMin,this._week.dow):h?this._weekdaysMin[h.day()]:this._weekdaysMin},ce.weekdaysShort=function(h){return h===!0?Fe(this._weekdaysShort,this._week.dow):h?this._weekdaysShort[h.day()]:this._weekdaysShort},ce.weekdaysParse=function(h,y,x){var E,R;if(this._weekdaysParseExact)return function(re,yt,Ct){var Pt,It,ue,re=re.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],Pt=0;Pt<7;++Pt)ue=g([2e3,1]).day(Pt),this._minWeekdaysParse[Pt]=this.weekdaysMin(ue,"").toLocaleLowerCase(),this._shortWeekdaysParse[Pt]=this.weekdaysShort(ue,"").toLocaleLowerCase(),this._weekdaysParse[Pt]=this.weekdays(ue,"").toLocaleLowerCase();return Ct?yt==="dddd"?(It=Ht.call(this._weekdaysParse,re))!==-1?It:null:yt==="ddd"?(It=Ht.call(this._shortWeekdaysParse,re))!==-1?It:null:(It=Ht.call(this._minWeekdaysParse,re))!==-1?It:null:yt==="dddd"?(It=Ht.call(this._weekdaysParse,re))!==-1||(It=Ht.call(this._shortWeekdaysParse,re))!==-1||(It=Ht.call(this._minWeekdaysParse,re))!==-1?It:null:yt==="ddd"?(It=Ht.call(this._shortWeekdaysParse,re))!==-1||(It=Ht.call(this._weekdaysParse,re))!==-1||(It=Ht.call(this._minWeekdaysParse,re))!==-1?It:null:(It=Ht.call(this._minWeekdaysParse,re))!==-1||(It=Ht.call(this._weekdaysParse,re))!==-1||(It=Ht.call(this._shortWeekdaysParse,re))!==-1?It:null}.call(this,h,y,x);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),E=0;E<7;E++)if(R=g([2e3,1]).day(E),x&&!this._fullWeekdaysParse[E]&&(this._fullWeekdaysParse[E]=new RegExp("^"+this.weekdays(R,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[E]=new RegExp("^"+this.weekdaysShort(R,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[E]=new RegExp("^"+this.weekdaysMin(R,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[E]||(R="^"+this.weekdays(R,"")+"|^"+this.weekdaysShort(R,"")+"|^"+this.weekdaysMin(R,""),this._weekdaysParse[E]=new RegExp(R.replace(".",""),"i")),x&&y==="dddd"&&this._fullWeekdaysParse[E].test(h)||x&&y==="ddd"&&this._shortWeekdaysParse[E].test(h)||x&&y==="dd"&&this._minWeekdaysParse[E].test(h)||!x&&this._weekdaysParse[E].test(h))return E},ce.weekdaysRegex=function(h){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||St.call(this),h?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=tr),this._weekdaysStrictRegex&&h?this._weekdaysStrictRegex:this._weekdaysRegex)},ce.weekdaysShortRegex=function(h){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||St.call(this),h?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=zt),this._weekdaysShortStrictRegex&&h?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},ce.weekdaysMinRegex=function(h){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||St.call(this),h?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Z),this._weekdaysMinStrictRegex&&h?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},ce.isPM=function(h){return(h+"").toLowerCase().charAt(0)==="p"},ce.meridiem=function(h,y,x){return 11<h?x?"pm":"PM":x?"am":"AM"},qt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(h){var y=h%10;return h+(F(h%100/10)===1?"th":y==1?"st":y==2?"nd":y==3?"rd":"th")}}),i.lang=H("moment.lang is deprecated. Use moment.locale instead.",qt),i.langData=H("moment.langData is deprecated. Use moment.localeData instead.",oe);var Xi=Math.abs;function Dd(h,y,x,E){return y=ai(y,x),h._milliseconds+=E*y._milliseconds,h._days+=E*y._days,h._months+=E*y._months,h._bubble()}function Md(h){return h<0?Math.floor(h):Math.ceil(h)}function Nd(h){return 4800*h/146097}function Uu(h){return 146097*h/4800}function Ki(h){return function(){return this.as(h)}}Mt=Ki("ms"),ht=Ki("s"),ee=Ki("m"),et=Ki("h"),Yt=Ki("d"),Pe=Ki("w"),pt=Ki("M"),es=Ki("Q"),Bn=Ki("y");function rs(h){return function(){return this.isValid()?this._data[h]:NaN}}var In=rs("milliseconds"),On=rs("seconds"),cl=rs("minutes"),ce=rs("hours"),q4=rs("days"),j4=rs("months"),$4=rs("years"),Zi=Math.round,Rs={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function X4(h,y,x,E){var It=ai(h).abs(),ue=Zi(It.as("s")),R=Zi(It.as("m")),nt=Zi(It.as("h")),yt=Zi(It.as("d")),Ct=Zi(It.as("M")),Pt=Zi(It.as("w")),It=Zi(It.as("y")),ue=(ue<=x.ss?["s",ue]:ue<x.s&&["ss",ue])||R<=1&&["m"]||R<x.m&&["mm",R]||nt<=1&&["h"]||nt<x.h&&["hh",nt]||yt<=1&&["d"]||yt<x.d&&["dd",yt];return(ue=(ue=x.w!=null?ue||Pt<=1&&["w"]||Pt<x.w&&["ww",Pt]:ue)||Ct<=1&&["M"]||Ct<x.M&&["MM",Ct]||It<=1&&["y"]||["yy",It])[2]=y,ue[3]=0<+h,ue[4]=E,function(re,He,rr,oi,Wu){return Wu.relativeTime(He||1,!!rr,re,oi)}.apply(null,ue)}var zu=Math.abs;function Fs(h){return(0<h)-(h<0)||+h}function ul(){if(!this.isValid())return this.localeData().invalidDate();var h,y,x,E,R,nt,yt,Ct=zu(this._milliseconds)/1e3,Pt=zu(this._days),It=zu(this._months),ue=this.asSeconds();return ue?(h=X(Ct/60),y=X(h/60),Ct%=60,h%=60,x=X(It/12),It%=12,E=Ct?Ct.toFixed(3).replace(/\.?0+$/,""):"",R=Fs(this._months)!==Fs(ue)?"-":"",nt=Fs(this._days)!==Fs(ue)?"-":"",yt=Fs(this._milliseconds)!==Fs(ue)?"-":"",(ue<0?"-":"")+"P"+(x?R+x+"Y":"")+(It?R+It+"M":"")+(Pt?nt+Pt+"D":"")+(y||h||Ct?"T":"")+(y?yt+y+"H":"")+(h?yt+h+"M":"")+(Ct?yt+E+"S":"")):"P0D"}var Ce=si.prototype;return Ce.isValid=function(){return this._isValid},Ce.abs=function(){var h=this._data;return this._milliseconds=Xi(this._milliseconds),this._days=Xi(this._days),this._months=Xi(this._months),h.milliseconds=Xi(h.milliseconds),h.seconds=Xi(h.seconds),h.minutes=Xi(h.minutes),h.hours=Xi(h.hours),h.months=Xi(h.months),h.years=Xi(h.years),this},Ce.add=function(h,y){return Dd(this,h,y,1)},Ce.subtract=function(h,y){return Dd(this,h,y,-1)},Ce.as=function(h){if(!this.isValid())return NaN;var y,x,E=this._milliseconds;if((h=bt(h))==="month"||h==="quarter"||h==="year")switch(y=this._days+E/864e5,x=this._months+Nd(y),h){case"month":return x;case"quarter":return x/3;case"year":return x/12}else switch(y=this._days+Math.round(Uu(this._months)),h){case"week":return y/7+E/6048e5;case"day":return y+E/864e5;case"hour":return 24*y+E/36e5;case"minute":return 1440*y+E/6e4;case"second":return 86400*y+E/1e3;case"millisecond":return Math.floor(864e5*y)+E;default:throw new Error("Unknown unit "+h)}},Ce.asMilliseconds=Mt,Ce.asSeconds=ht,Ce.asMinutes=ee,Ce.asHours=et,Ce.asDays=Yt,Ce.asWeeks=Pe,Ce.asMonths=pt,Ce.asQuarters=es,Ce.asYears=Bn,Ce.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*F(this._months/12):NaN},Ce._bubble=function(){var h=this._milliseconds,y=this._days,x=this._months,E=this._data;return 0<=h&&0<=y&&0<=x||h<=0&&y<=0&&x<=0||(h+=864e5*Md(Uu(x)+y),x=y=0),E.milliseconds=h%1e3,h=X(h/1e3),E.seconds=h%60,h=X(h/60),E.minutes=h%60,h=X(h/60),E.hours=h%24,y+=X(h/24),x+=h=X(Nd(y)),y-=Md(Uu(h)),h=X(x/12),x%=12,E.days=y,E.months=x,E.years=h,this},Ce.clone=function(){return ai(this)},Ce.get=function(h){return h=bt(h),this.isValid()?this[h+"s"]():NaN},Ce.milliseconds=In,Ce.seconds=On,Ce.minutes=cl,Ce.hours=ce,Ce.days=q4,Ce.weeks=function(){return X(this.days()/7)},Ce.months=j4,Ce.years=$4,Ce.humanize=function(h,y){if(!this.isValid())return this.localeData().invalidDate();var x=!1,E=Rs;return typeof h=="object"&&(y=h,h=!1),typeof h=="boolean"&&(x=h),typeof y=="object"&&(E=Object.assign({},Rs,y),y.s!=null&&y.ss==null&&(E.ss=y.s-1)),h=this.localeData(),y=X4(this,!x,E,h),x&&(y=h.pastFuture(+this,y)),h.postformat(y)},Ce.toISOString=ul,Ce.toString=ul,Ce.toJSON=ul,Ce.locale=kd,Ce.localeData=wd,Ce.toIsoString=H("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ul),Ce.lang=Ge,j("X",0,0,"unix"),j("x",0,0,"valueOf"),st("x",gt),st("X",/[+-]?\d+(\.\d{1,3})?/),Gt("X",function(h,y,x){x._d=new Date(1e3*parseFloat(h))}),Gt("x",function(h,y,x){x._d=new Date(F(h))}),i.version="2.29.4",r=Se,i.fn=T,i.min=function(){return Sr("isBefore",[].slice.call(arguments,0))},i.max=function(){return Sr("isAfter",[].slice.call(arguments,0))},i.now=function(){return Date.now?Date.now():+new Date},i.utc=g,i.unix=function(h){return Se(1e3*h)},i.months=function(h,y){return Ld(h,y,"months")},i.isDate=d,i.locale=qt,i.invalid=w,i.duration=ai,i.isMoment=q,i.weekdays=function(h,y,x){return Vu(h,y,x,"weekdays")},i.parseZone=function(){return Se.apply(null,arguments).parseZone()},i.localeData=oe,i.isDuration=$i,i.monthsShort=function(h,y){return Ld(h,y,"monthsShort")},i.weekdaysMin=function(h,y,x){return Vu(h,y,x,"weekdaysMin")},i.defineLocale=te,i.updateLocale=function(h,y){var x,E;return y!=null?(E=We,xe[h]!=null&&xe[h].parentLocale!=null?xe[h].set(v(xe[h]._config,y)):(y=v(E=(x=Or(h))!=null?x._config:E,y),x==null&&(y.abbr=h),(E=new D(y)).parentLocale=xe[h],xe[h]=E),qt(h)):xe[h]!=null&&(xe[h].parentLocale!=null?(xe[h]=xe[h].parentLocale,h===qt()&&qt(h)):xe[h]!=null&&delete xe[h]),xe[h]},i.locales=function(){return m(xe)},i.weekdaysShort=function(h,y,x){return Vu(h,y,x,"weekdaysShort")},i.normalizeUnits=bt,i.relativeTimeRounding=function(h){return h===void 0?Zi:typeof h=="function"&&(Zi=h,!0)},i.relativeTimeThreshold=function(h,y){return Rs[h]!==void 0&&(y===void 0?Rs[h]:(Rs[h]=y,h==="s"&&(Rs.ss=y-1),!0))},i.calendarFormat=function(h,y){return(h=h.diff(y,"days",!0))<-6?"sameElse":h<-1?"lastWeek":h<0?"lastDay":h<1?"sameDay":h<2?"nextDay":h<7?"nextWeek":"sameElse"},i.prototype=T,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i})})(ob);const bi=Mh;var q1={};Object.defineProperty(q1,"__esModule",{value:!0});var wn=q1.sanitizeUrl=void 0,lb=/^([^\w]*)(javascript|data|vbscript)/im,cb=/&#(\w+)(^\w|;)?/g,ub=/&(newline|tab);/gi,hb=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,db=/^.+(:|:)/gim,fb=[".","/"];function pb(t){return fb.indexOf(t[0])>-1}function gb(t){return t.replace(cb,function(e,r){return String.fromCharCode(r)})}function yb(t){var e=gb(t||"").replace(ub,"").replace(hb,"").trim();if(!e)return"about:blank";if(pb(e))return e;var r=e.match(db);if(!r)return e;var i=r[0];return lb.test(i)?"about:blank":e}wn=q1.sanitizeUrl=yb;function Ll(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function mb(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function j1(t){let e,r,i;t.length!==2?(e=Ll,r=(o,l)=>Ll(t(o),l),i=(o,l)=>t(o)-l):(e=t===Ll||t===mb?t:bb,r=t,i=t);function n(o,l,u=0,d=o.length){if(u<d){if(e(l,l)!==0)return d;do{const f=u+d>>>1;r(o[f],l)<0?u=f+1:d=f}while(u<d)}return u}function s(o,l,u=0,d=o.length){if(u<d){if(e(l,l)!==0)return d;do{const f=u+d>>>1;r(o[f],l)<=0?u=f+1:d=f}while(u<d)}return u}function a(o,l,u=0,d=o.length){const f=n(o,l,u,d-1);return f>u&&i(o[f-1],l)>-i(o[f],l)?f-1:f}return{left:n,center:a,right:s}}function bb(){return 0}function _b(t){return t===null?NaN:+t}const xb=j1(Ll),vb=xb.right;j1(_b).center;const kb=vb;class Od extends Map{constructor(e,r=Eb){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(const[i,n]of e)this.set(i,n)}get(e){return super.get(Rd(this,e))}has(e){return super.has(Rd(this,e))}set(e,r){return super.set(wb(this,e),r)}delete(e){return super.delete(Tb(this,e))}}function Rd({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):r}function wb({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):(t.set(i,r),r)}function Tb({_intern:t,_key:e},r){const i=e(r);return t.has(i)&&(r=t.get(i),t.delete(i)),r}function Eb(t){return t!==null&&typeof t=="object"?t.valueOf():t}var Nh=Math.sqrt(50),Bh=Math.sqrt(10),Ih=Math.sqrt(2);function Cb(t,e,r){var i,n=-1,s,a,o;if(e=+e,t=+t,r=+r,t===e&&r>0)return[t];if((i=e<t)&&(s=t,t=e,e=s),(o=_p(t,e,r))===0||!isFinite(o))return[];if(o>0){let l=Math.round(t/o),u=Math.round(e/o);for(l*o<t&&++l,u*o>e&&--u,a=new Array(s=u-l+1);++n<s;)a[n]=(l+n)*o}else{o=-o;let l=Math.round(t*o),u=Math.round(e*o);for(l/o<t&&++l,u/o>e&&--u,a=new Array(s=u-l+1);++n<s;)a[n]=(l+n)/o}return i&&a.reverse(),a}function _p(t,e,r){var i=(e-t)/Math.max(0,r),n=Math.floor(Math.log(i)/Math.LN10),s=i/Math.pow(10,n);return n>=0?(s>=Nh?10:s>=Bh?5:s>=Ih?2:1)*Math.pow(10,n):-Math.pow(10,-n)/(s>=Nh?10:s>=Bh?5:s>=Ih?2:1)}function Oh(t,e,r){var i=Math.abs(e-t)/Math.max(0,r),n=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),s=i/n;return s>=Nh?n*=10:s>=Bh?n*=5:s>=Ih&&(n*=2),e<t?-n:n}function Sb(t,e){let r;if(e===void 0)for(const i of t)i!=null&&(r<i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let n of t)(n=e(n,++i,t))!=null&&(r<n||r===void 0&&n>=n)&&(r=n)}return r}function Ab(t,e){let r;if(e===void 0)for(const i of t)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let n of t)(n=e(n,++i,t))!=null&&(r>n||r===void 0&&n>=n)&&(r=n)}return r}function Lb(t){return t}var Dl=1,Hu=2,Rh=3,hl=4,Fd=1e-6;function Db(t){return"translate("+t+",0)"}function Mb(t){return"translate(0,"+t+")"}function Nb(t){return e=>+t(e)}function Bb(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function Ib(){return!this.__axis}function xp(t,e){var r=[],i=null,n=null,s=6,a=6,o=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,u=t===Dl||t===hl?-1:1,d=t===hl||t===Hu?"x":"y",f=t===Dl||t===Rh?Db:Mb;function p(g){var _=i??(e.ticks?e.ticks.apply(e,r):e.domain()),k=n??(e.tickFormat?e.tickFormat.apply(e,r):Lb),w=Math.max(s,0)+o,S=e.range(),A=+S[0]+l,O=+S[S.length-1]+l,P=(e.bandwidth?Bb:Nb)(e.copy(),l),W=g.selection?g.selection():g,q=W.selectAll(".domain").data([null]),z=W.selectAll(".tick").data(_,e).order(),H=z.exit(),N=z.enter().append("g").attr("class","tick"),M=z.select("line"),C=z.select("text");q=q.merge(q.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),z=z.merge(N),M=M.merge(N.append("line").attr("stroke","currentColor").attr(d+"2",u*s)),C=C.merge(N.append("text").attr("fill","currentColor").attr(d,u*w).attr("dy",t===Dl?"0em":t===Rh?"0.71em":"0.32em")),g!==W&&(q=q.transition(g),z=z.transition(g),M=M.transition(g),C=C.transition(g),H=H.transition(g).attr("opacity",Fd).attr("transform",function(v){return isFinite(v=P(v))?f(v+l):this.getAttribute("transform")}),N.attr("opacity",Fd).attr("transform",function(v){var D=this.parentNode.__axis;return f((D&&isFinite(D=D(v))?D:P(v))+l)})),H.remove(),q.attr("d",t===hl||t===Hu?a?"M"+u*a+","+A+"H"+l+"V"+O+"H"+u*a:"M"+l+","+A+"V"+O:a?"M"+A+","+u*a+"V"+l+"H"+O+"V"+u*a:"M"+A+","+l+"H"+O),z.attr("opacity",1).attr("transform",function(v){return f(P(v)+l)}),M.attr(d+"2",u*s),C.attr(d,u*w).text(k),W.filter(Ib).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Hu?"start":t===hl?"end":"middle"),W.each(function(){this.__axis=P})}return p.scale=function(g){return arguments.length?(e=g,p):e},p.ticks=function(){return r=Array.from(arguments),p},p.tickArguments=function(g){return arguments.length?(r=g==null?[]:Array.from(g),p):r.slice()},p.tickValues=function(g){return arguments.length?(i=g==null?null:Array.from(g),p):i&&i.slice()},p.tickFormat=function(g){return arguments.length?(n=g,p):n},p.tickSize=function(g){return arguments.length?(s=a=+g,p):s},p.tickSizeInner=function(g){return arguments.length?(s=+g,p):s},p.tickSizeOuter=function(g){return arguments.length?(a=+g,p):a},p.tickPadding=function(g){return arguments.length?(o=+g,p):o},p.offset=function(g){return arguments.length?(l=+g,p):l},p}function Ob(t){return xp(Dl,t)}function Rb(t){return xp(Rh,t)}var Fb={value:()=>{}};function vp(){for(var t=0,e=arguments.length,r={},i;t<e;++t){if(!(i=arguments[t]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new Ml(r)}function Ml(t){this._=t}function Pb(t,e){return t.trim().split(/^|\s+/).map(function(r){var i="",n=r.indexOf(".");if(n>=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Ml.prototype=vp.prototype={constructor:Ml,on:function(t,e){var r=this._,i=Pb(t+"",r),n,s=-1,a=i.length;if(arguments.length<2){for(;++s<a;)if((n=(t=i[s]).type)&&(n=Yb(r[n],t.name)))return n;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++s<a;)if(n=(t=i[s]).type)r[n]=Pd(r[n],t.name,e);else if(e==null)for(n in r)r[n]=Pd(r[n],t.name,null);return this},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new Ml(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var r=new Array(n),i=0,n,s;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],i=0,n=s.length;i<n;++i)s[i].value.apply(e,r)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],n=0,s=i.length;n<s;++n)i[n].value.apply(e,r)}};function Yb(t,e){for(var r=0,i=t.length,n;r<i;++r)if((n=t[r]).name===e)return n.value}function Pd(t,e,r){for(var i=0,n=t.length;i<n;++i)if(t[i].name===e){t[i]=Fb,t=t.slice(0,i).concat(t.slice(i+1));break}return r!=null&&t.push({name:e,value:r}),t}var Fh="http://www.w3.org/1999/xhtml";const Yd={svg:"http://www.w3.org/2000/svg",xhtml:Fh,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Kc(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),Yd.hasOwnProperty(e)?{space:Yd[e],local:t}:t}function Vb(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===Fh&&e.documentElement.namespaceURI===Fh?e.createElement(t):e.createElementNS(r,t)}}function Ub(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function kp(t){var e=Kc(t);return(e.local?Ub:Vb)(e)}function zb(){}function $1(t){return t==null?zb:function(){return this.querySelector(t)}}function Wb(t){typeof t!="function"&&(t=$1(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var s=e[n],a=s.length,o=i[n]=new Array(a),l,u,d=0;d<a;++d)(l=s[d])&&(u=t.call(l,l.__data__,d,s))&&("__data__"in l&&(u.__data__=l.__data__),o[d]=u);return new Br(i,this._parents)}function wp(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Hb(){return[]}function Tp(t){return t==null?Hb:function(){return this.querySelectorAll(t)}}function Gb(t){return function(){return wp(t.apply(this,arguments))}}function qb(t){typeof t=="function"?t=Gb(t):t=Tp(t);for(var e=this._groups,r=e.length,i=[],n=[],s=0;s<r;++s)for(var a=e[s],o=a.length,l,u=0;u<o;++u)(l=a[u])&&(i.push(t.call(l,l.__data__,u,a)),n.push(l));return new Br(i,n)}function Ep(t){return function(){return this.matches(t)}}function Cp(t){return function(e){return e.matches(t)}}var jb=Array.prototype.find;function $b(t){return function(){return jb.call(this.children,t)}}function Xb(){return this.firstElementChild}function Kb(t){return this.select(t==null?Xb:$b(typeof t=="function"?t:Cp(t)))}var Zb=Array.prototype.filter;function Qb(){return Array.from(this.children)}function Jb(t){return function(){return Zb.call(this.children,t)}}function t5(t){return this.selectAll(t==null?Qb:Jb(typeof t=="function"?t:Cp(t)))}function e5(t){typeof t!="function"&&(t=Ep(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var s=e[n],a=s.length,o=i[n]=[],l,u=0;u<a;++u)(l=s[u])&&t.call(l,l.__data__,u,s)&&o.push(l);return new Br(i,this._parents)}function Sp(t){return new Array(t.length)}function r5(){return new Br(this._enter||this._groups.map(Sp),this._parents)}function Zl(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Zl.prototype={constructor:Zl,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function i5(t){return function(){return t}}function n5(t,e,r,i,n,s){for(var a=0,o,l=e.length,u=s.length;a<u;++a)(o=e[a])?(o.__data__=s[a],i[a]=o):r[a]=new Zl(t,s[a]);for(;a<l;++a)(o=e[a])&&(n[a]=o)}function s5(t,e,r,i,n,s,a){var o,l,u=new Map,d=e.length,f=s.length,p=new Array(d),g;for(o=0;o<d;++o)(l=e[o])&&(p[o]=g=a.call(l,l.__data__,o,e)+"",u.has(g)?n[o]=l:u.set(g,l));for(o=0;o<f;++o)g=a.call(t,s[o],o,s)+"",(l=u.get(g))?(i[o]=l,l.__data__=s[o],u.delete(g)):r[o]=new Zl(t,s[o]);for(o=0;o<d;++o)(l=e[o])&&u.get(p[o])===l&&(n[o]=l)}function a5(t){return t.__data__}function o5(t,e){if(!arguments.length)return Array.from(this,a5);var r=e?s5:n5,i=this._parents,n=this._groups;typeof t!="function"&&(t=i5(t));for(var s=n.length,a=new Array(s),o=new Array(s),l=new Array(s),u=0;u<s;++u){var d=i[u],f=n[u],p=f.length,g=l5(t.call(d,d&&d.__data__,u,i)),_=g.length,k=o[u]=new Array(_),w=a[u]=new Array(_),S=l[u]=new Array(p);r(d,f,k,w,S,g,e);for(var A=0,O=0,P,W;A<_;++A)if(P=k[A]){for(A>=O&&(O=A+1);!(W=w[O])&&++O<_;);P._next=W||null}}return a=new Br(a,i),a._enter=o,a._exit=l,a}function l5(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function c5(){return new Br(this._exit||this._groups.map(Sp),this._parents)}function u5(t,e,r){var i=this.enter(),n=this,s=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),e!=null&&(n=e(n),n&&(n=n.selection())),r==null?s.remove():r(s),i&&n?i.merge(n).order():n}function h5(t){for(var e=t.selection?t.selection():t,r=this._groups,i=e._groups,n=r.length,s=i.length,a=Math.min(n,s),o=new Array(n),l=0;l<a;++l)for(var u=r[l],d=i[l],f=u.length,p=o[l]=new Array(f),g,_=0;_<f;++_)(g=u[_]||d[_])&&(p[_]=g);for(;l<n;++l)o[l]=r[l];return new Br(o,this._parents)}function d5(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var i=t[e],n=i.length-1,s=i[n],a;--n>=0;)(a=i[n])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function f5(t){t||(t=p5);function e(f,p){return f&&p?t(f.__data__,p.__data__):!f-!p}for(var r=this._groups,i=r.length,n=new Array(i),s=0;s<i;++s){for(var a=r[s],o=a.length,l=n[s]=new Array(o),u,d=0;d<o;++d)(u=a[d])&&(l[d]=u);l.sort(e)}return new Br(n,this._parents).order()}function p5(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function g5(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function y5(){return Array.from(this)}function m5(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],n=0,s=i.length;n<s;++n){var a=i[n];if(a)return a}return null}function b5(){let t=0;for(const e of this)++t;return t}function _5(){return!this.node()}function x5(t){for(var e=this._groups,r=0,i=e.length;r<i;++r)for(var n=e[r],s=0,a=n.length,o;s<a;++s)(o=n[s])&&t.call(o,o.__data__,s,n);return this}function v5(t){return function(){this.removeAttribute(t)}}function k5(t){return function(){this.removeAttributeNS(t.space,t.local)}}function w5(t,e){return function(){this.setAttribute(t,e)}}function T5(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function E5(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function C5(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function S5(t,e){var r=Kc(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((e==null?r.local?k5:v5:typeof e=="function"?r.local?C5:E5:r.local?T5:w5)(r,e))}function Ap(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function A5(t){return function(){this.style.removeProperty(t)}}function L5(t,e,r){return function(){this.style.setProperty(t,e,r)}}function D5(t,e,r){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}function M5(t,e,r){return arguments.length>1?this.each((e==null?A5:typeof e=="function"?D5:L5)(t,e,r??"")):na(this.node(),t)}function na(t,e){return t.style.getPropertyValue(e)||Ap(t).getComputedStyle(t,null).getPropertyValue(e)}function N5(t){return function(){delete this[t]}}function B5(t,e){return function(){this[t]=e}}function I5(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function O5(t,e){return arguments.length>1?this.each((e==null?N5:typeof e=="function"?I5:B5)(t,e)):this.node()[t]}function Lp(t){return t.trim().split(/^|\s+/)}function X1(t){return t.classList||new Dp(t)}function Dp(t){this._node=t,this._names=Lp(t.getAttribute("class")||"")}Dp.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Mp(t,e){for(var r=X1(t),i=-1,n=e.length;++i<n;)r.add(e[i])}function Np(t,e){for(var r=X1(t),i=-1,n=e.length;++i<n;)r.remove(e[i])}function R5(t){return function(){Mp(this,t)}}function F5(t){return function(){Np(this,t)}}function P5(t,e){return function(){(e.apply(this,arguments)?Mp:Np)(this,t)}}function Y5(t,e){var r=Lp(t+"");if(arguments.length<2){for(var i=X1(this.node()),n=-1,s=r.length;++n<s;)if(!i.contains(r[n]))return!1;return!0}return this.each((typeof e=="function"?P5:e?R5:F5)(r,e))}function V5(){this.textContent=""}function U5(t){return function(){this.textContent=t}}function z5(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function W5(t){return arguments.length?this.each(t==null?V5:(typeof t=="function"?z5:U5)(t)):this.node().textContent}function H5(){this.innerHTML=""}function G5(t){return function(){this.innerHTML=t}}function q5(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function j5(t){return arguments.length?this.each(t==null?H5:(typeof t=="function"?q5:G5)(t)):this.node().innerHTML}function $5(){this.nextSibling&&this.parentNode.appendChild(this)}function X5(){return this.each($5)}function K5(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Z5(){return this.each(K5)}function Q5(t){var e=typeof t=="function"?t:kp(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function J5(){return null}function t_(t,e){var r=typeof t=="function"?t:kp(t),i=e==null?J5:typeof e=="function"?e:$1(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function e_(){var t=this.parentNode;t&&t.removeChild(this)}function r_(){return this.each(e_)}function i_(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function n_(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function s_(t){return this.select(t?n_:i_)}function a_(t){return arguments.length?this.property("__data__",t):this.node().__data__}function o_(t){return function(e){t.call(this,e,this.__data__)}}function l_(t){return t.trim().split(/^|\s+/).map(function(e){var r="",i=e.indexOf(".");return i>=0&&(r=e.slice(i+1),e=e.slice(0,i)),{type:e,name:r}})}function c_(t){return function(){var e=this.__on;if(e){for(var r=0,i=-1,n=e.length,s;r<n;++r)s=e[r],(!t.type||s.type===t.type)&&s.name===t.name?this.removeEventListener(s.type,s.listener,s.options):e[++i]=s;++i?e.length=i:delete this.__on}}}function u_(t,e,r){return function(){var i=this.__on,n,s=o_(e);if(i){for(var a=0,o=i.length;a<o;++a)if((n=i[a]).type===t.type&&n.name===t.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=s,n.options=r),n.value=e;return}}this.addEventListener(t.type,s,r),n={type:t.type,name:t.name,value:e,listener:s,options:r},i?i.push(n):this.__on=[n]}}function h_(t,e,r){var i=l_(t+""),n,s=i.length,a;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,u=o.length,d;l<u;++l)for(n=0,d=o[l];n<s;++n)if((a=i[n]).type===d.type&&a.name===d.name)return d.value}return}for(o=e?u_:c_,n=0;n<s;++n)this.each(o(i[n],e,r));return this}function Bp(t,e,r){var i=Ap(t),n=i.CustomEvent;typeof n=="function"?n=new n(e,r):(n=i.document.createEvent("Event"),r?(n.initEvent(e,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(e,!1,!1)),t.dispatchEvent(n)}function d_(t,e){return function(){return Bp(this,t,e)}}function f_(t,e){return function(){return Bp(this,t,e.apply(this,arguments))}}function p_(t,e){return this.each((typeof e=="function"?f_:d_)(t,e))}function*g_(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],n=0,s=i.length,a;n<s;++n)(a=i[n])&&(yield a)}var K1=[null];function Br(t,e){this._groups=t,this._parents=e}function zo(){return new Br([[document.documentElement]],K1)}function y_(){return this}Br.prototype=zo.prototype={constructor:Br,select:Wb,selectAll:qb,selectChild:Kb,selectChildren:t5,filter:e5,data:o5,enter:r5,exit:c5,join:u5,merge:h5,selection:y_,order:d5,sort:f5,call:g5,nodes:y5,node:m5,size:b5,empty:_5,each:x5,attr:S5,style:M5,property:O5,classed:Y5,text:W5,html:j5,raise:X5,lower:Z5,append:Q5,insert:t_,remove:r_,clone:s_,datum:a_,on:h_,dispatch:p_,[Symbol.iterator]:g_};function At(t){return typeof t=="string"?new Br([[document.querySelector(t)]],[document.documentElement]):new Br([[t]],K1)}function Z1(t){return typeof t=="string"?new Br([document.querySelectorAll(t)],[document.documentElement]):new Br([wp(t)],K1)}function Wo(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function Zc(t,e){var r=Object.create(t.prototype);for(var i in e)r[i]=e[i];return r}function Es(){}var ho=.7,Ql=1/ho,Zs="\\s*([+-]?\\d+)\\s*",fo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Pi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",m_=/^#([0-9a-f]{3,8})$/,b_=new RegExp(`^rgb\\(${Zs},${Zs},${Zs}\\)$`),__=new RegExp(`^rgb\\(${Pi},${Pi},${Pi}\\)$`),x_=new RegExp(`^rgba\\(${Zs},${Zs},${Zs},${fo}\\)$`),v_=new RegExp(`^rgba\\(${Pi},${Pi},${Pi},${fo}\\)$`),k_=new RegExp(`^hsl\\(${fo},${Pi},${Pi}\\)$`),w_=new RegExp(`^hsla\\(${fo},${Pi},${Pi},${fo}\\)$`),Vd={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};Wo(Es,ps,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Ud,formatHex:Ud,formatHex8:T_,formatHsl:E_,formatRgb:zd,toString:zd});function Ud(){return this.rgb().formatHex()}function T_(){return this.rgb().formatHex8()}function E_(){return Op(this).formatHsl()}function zd(){return this.rgb().formatRgb()}function ps(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=m_.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?Wd(e):r===3?new Tr(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?dl(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?dl(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=b_.exec(t))?new Tr(e[1],e[2],e[3],1):(e=__.exec(t))?new Tr(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=x_.exec(t))?dl(e[1],e[2],e[3],e[4]):(e=v_.exec(t))?dl(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=k_.exec(t))?qd(e[1],e[2]/100,e[3]/100,1):(e=w_.exec(t))?qd(e[1],e[2]/100,e[3]/100,e[4]):Vd.hasOwnProperty(t)?Wd(Vd[t]):t==="transparent"?new Tr(NaN,NaN,NaN,0):null}function Wd(t){return new Tr(t>>16&255,t>>8&255,t&255,1)}function dl(t,e,r,i){return i<=0&&(t=e=r=NaN),new Tr(t,e,r,i)}function Ip(t){return t instanceof Es||(t=ps(t)),t?(t=t.rgb(),new Tr(t.r,t.g,t.b,t.opacity)):new Tr}function Ph(t,e,r,i){return arguments.length===1?Ip(t):new Tr(t,e,r,i??1)}function Tr(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}Wo(Tr,Ph,Zc(Es,{brighter(t){return t=t==null?Ql:Math.pow(Ql,t),new Tr(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?ho:Math.pow(ho,t),new Tr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Tr(ds(this.r),ds(this.g),ds(this.b),Jl(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:Hd,formatHex:Hd,formatHex8:C_,formatRgb:Gd,toString:Gd}));function Hd(){return`#${hs(this.r)}${hs(this.g)}${hs(this.b)}`}function C_(){return`#${hs(this.r)}${hs(this.g)}${hs(this.b)}${hs((isNaN(this.opacity)?1:this.opacity)*255)}`}function Gd(){const t=Jl(this.opacity);return`${t===1?"rgb(":"rgba("}${ds(this.r)}, ${ds(this.g)}, ${ds(this.b)}${t===1?")":`, ${t})`}`}function Jl(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ds(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function hs(t){return t=ds(t),(t<16?"0":"")+t.toString(16)}function qd(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new hi(t,e,r,i)}function Op(t){if(t instanceof hi)return new hi(t.h,t.s,t.l,t.opacity);if(t instanceof Es||(t=ps(t)),!t)return new hi;if(t instanceof hi)return t;t=t.rgb();var e=t.r/255,r=t.g/255,i=t.b/255,n=Math.min(e,r,i),s=Math.max(e,r,i),a=NaN,o=s-n,l=(s+n)/2;return o?(e===s?a=(r-i)/o+(r<i)*6:r===s?a=(i-e)/o+2:a=(e-r)/o+4,o/=l<.5?s+n:2-s-n,a*=60):o=l>0&&l<1?0:a,new hi(a,o,l,t.opacity)}function S_(t,e,r,i){return arguments.length===1?Op(t):new hi(t,e,r,i??1)}function hi(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}Wo(hi,S_,Zc(Es,{brighter(t){return t=t==null?Ql:Math.pow(Ql,t),new hi(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?ho:Math.pow(ho,t),new hi(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*e,n=2*r-i;return new Tr(Gu(t>=240?t-240:t+120,n,i),Gu(t,n,i),Gu(t<120?t+240:t-120,n,i),this.opacity)},clamp(){return new hi(jd(this.h),fl(this.s),fl(this.l),Jl(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(){const t=Jl(this.opacity);return`${t===1?"hsl(":"hsla("}${jd(this.h)}, ${fl(this.s)*100}%, ${fl(this.l)*100}%${t===1?")":`, ${t})`}`}}));function jd(t){return t=(t||0)%360,t<0?t+360:t}function fl(t){return Math.max(0,Math.min(1,t||0))}function Gu(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const A_=Math.PI/180,L_=180/Math.PI,tc=18,Rp=.96422,Fp=1,Pp=.82521,Yp=4/29,Qs=6/29,Vp=3*Qs*Qs,D_=Qs*Qs*Qs;function Up(t){if(t instanceof Yi)return new Yi(t.l,t.a,t.b,t.opacity);if(t instanceof cn)return zp(t);t instanceof Tr||(t=Ip(t));var e=Xu(t.r),r=Xu(t.g),i=Xu(t.b),n=qu((.2225045*e+.7168786*r+.0606169*i)/Fp),s,a;return e===r&&r===i?s=a=n:(s=qu((.4360747*e+.3850649*r+.1430804*i)/Rp),a=qu((.0139322*e+.0971045*r+.7141733*i)/Pp)),new Yi(116*n-16,500*(s-n),200*(n-a),t.opacity)}function M_(t,e,r,i){return arguments.length===1?Up(t):new Yi(t,e,r,i??1)}function Yi(t,e,r,i){this.l=+t,this.a=+e,this.b=+r,this.opacity=+i}Wo(Yi,M_,Zc(Es,{brighter(t){return new Yi(this.l+tc*(t??1),this.a,this.b,this.opacity)},darker(t){return new Yi(this.l-tc*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return e=Rp*ju(e),t=Fp*ju(t),r=Pp*ju(r),new Tr($u(3.1338561*e-1.6168667*t-.4906146*r),$u(-.9787684*e+1.9161415*t+.033454*r),$u(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}}));function qu(t){return t>D_?Math.pow(t,1/3):t/Vp+Yp}function ju(t){return t>Qs?t*t*t:Vp*(t-Yp)}function $u(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Xu(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function N_(t){if(t instanceof cn)return new cn(t.h,t.c,t.l,t.opacity);if(t instanceof Yi||(t=Up(t)),t.a===0&&t.b===0)return new cn(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*L_;return new cn(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Yh(t,e,r,i){return arguments.length===1?N_(t):new cn(t,e,r,i??1)}function cn(t,e,r,i){this.h=+t,this.c=+e,this.l=+r,this.opacity=+i}function zp(t){if(isNaN(t.h))return new Yi(t.l,0,0,t.opacity);var e=t.h*A_;return new Yi(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Wo(cn,Yh,Zc(Es,{brighter(t){return new cn(this.h,this.c,this.l+tc*(t??1),this.opacity)},darker(t){return new cn(this.h,this.c,this.l-tc*(t??1),this.opacity)},rgb(){return zp(this).rgb()}}));const Qc=t=>()=>t;function Wp(t,e){return function(r){return t+r*e}}function B_(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(i){return Math.pow(t+i*e,r)}}function I_(t,e){var r=e-t;return r?Wp(t,r>180||r<-180?r-360*Math.round(r/360):r):Qc(isNaN(t)?e:t)}function O_(t){return(t=+t)==1?Ja:function(e,r){return r-e?B_(e,r,t):Qc(isNaN(e)?r:e)}}function Ja(t,e){var r=e-t;return r?Wp(t,r):Qc(isNaN(t)?e:t)}const ec=function t(e){var r=O_(e);function i(n,s){var a=r((n=Ph(n)).r,(s=Ph(s)).r),o=r(n.g,s.g),l=r(n.b,s.b),u=Ja(n.opacity,s.opacity);return function(d){return n.r=a(d),n.g=o(d),n.b=l(d),n.opacity=u(d),n+""}}return i.gamma=t,i}(1);function R_(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,i=e.slice(),n;return function(s){for(n=0;n<r;++n)i[n]=t[n]*(1-s)+e[n]*s;return i}}function F_(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function P_(t,e){var r=e?e.length:0,i=t?Math.min(r,t.length):0,n=new Array(i),s=new Array(r),a;for(a=0;a<i;++a)n[a]=Q1(t[a],e[a]);for(;a<r;++a)s[a]=e[a];return function(o){for(a=0;a<i;++a)s[a]=n[a](o);return s}}function Y_(t,e){var r=new Date;return t=+t,e=+e,function(i){return r.setTime(t*(1-i)+e*i),r}}function ui(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function V_(t,e){var r={},i={},n;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(n in e)n in t?r[n]=Q1(t[n],e[n]):i[n]=e[n];return function(s){for(n in r)i[n]=r[n](s);return i}}var Vh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ku=new RegExp(Vh.source,"g");function U_(t){return function(){return t}}function z_(t){return function(e){return t(e)+""}}function Hp(t,e){var r=Vh.lastIndex=Ku.lastIndex=0,i,n,s,a=-1,o=[],l=[];for(t=t+"",e=e+"";(i=Vh.exec(t))&&(n=Ku.exec(e));)(s=n.index)>r&&(s=e.slice(r,s),o[a]?o[a]+=s:o[++a]=s),(i=i[0])===(n=n[0])?o[a]?o[a]+=n:o[++a]=n:(o[++a]=null,l.push({i:a,x:ui(i,n)})),r=Ku.lastIndex;return r<e.length&&(s=e.slice(r),o[a]?o[a]+=s:o[++a]=s),o.length<2?l[0]?z_(l[0].x):U_(e):(e=l.length,function(u){for(var d=0,f;d<e;++d)o[(f=l[d]).i]=f.x(u);return o.join("")})}function Q1(t,e){var r=typeof e,i;return e==null||r==="boolean"?Qc(e):(r==="number"?ui:r==="string"?(i=ps(e))?(e=i,ec):Hp:e instanceof ps?ec:e instanceof Date?Y_:F_(e)?R_:Array.isArray(e)?P_:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?V_:ui)(t,e)}function W_(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}var $d=180/Math.PI,Uh={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Gp(t,e,r,i,n,s){var a,o,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*r+e*i)&&(r-=t*l,i-=e*l),(o=Math.sqrt(r*r+i*i))&&(r/=o,i/=o,l/=o),t*i<e*r&&(t=-t,e=-e,l=-l,a=-a),{translateX:n,translateY:s,rotate:Math.atan2(e,t)*$d,skewX:Math.atan(l)*$d,scaleX:a,scaleY:o}}var pl;function H_(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?Uh:Gp(e.a,e.b,e.c,e.d,e.e,e.f)}function G_(t){return t==null||(pl||(pl=document.createElementNS("http://www.w3.org/2000/svg","g")),pl.setAttribute("transform",t),!(t=pl.transform.baseVal.consolidate()))?Uh:(t=t.matrix,Gp(t.a,t.b,t.c,t.d,t.e,t.f))}function qp(t,e,r,i){function n(u){return u.length?u.pop()+" ":""}function s(u,d,f,p,g,_){if(u!==f||d!==p){var k=g.push("translate(",null,e,null,r);_.push({i:k-4,x:ui(u,f)},{i:k-2,x:ui(d,p)})}else(f||p)&&g.push("translate("+f+e+p+r)}function a(u,d,f,p){u!==d?(u-d>180?d+=360:d-u>180&&(u+=360),p.push({i:f.push(n(f)+"rotate(",null,i)-2,x:ui(u,d)})):d&&f.push(n(f)+"rotate("+d+i)}function o(u,d,f,p){u!==d?p.push({i:f.push(n(f)+"skewX(",null,i)-2,x:ui(u,d)}):d&&f.push(n(f)+"skewX("+d+i)}function l(u,d,f,p,g,_){if(u!==f||d!==p){var k=g.push(n(g)+"scale(",null,",",null,")");_.push({i:k-4,x:ui(u,f)},{i:k-2,x:ui(d,p)})}else(f!==1||p!==1)&&g.push(n(g)+"scale("+f+","+p+")")}return function(u,d){var f=[],p=[];return u=t(u),d=t(d),s(u.translateX,u.translateY,d.translateX,d.translateY,f,p),a(u.rotate,d.rotate,f,p),o(u.skewX,d.skewX,f,p),l(u.scaleX,u.scaleY,d.scaleX,d.scaleY,f,p),u=d=null,function(g){for(var _=-1,k=p.length,w;++_<k;)f[(w=p[_]).i]=w.x(g);return f.join("")}}}var q_=qp(H_,"px, ","px)","deg)"),j_=qp(G_,", ",")",")");function $_(t){return function(e,r){var i=t((e=Yh(e)).h,(r=Yh(r)).h),n=Ja(e.c,r.c),s=Ja(e.l,r.l),a=Ja(e.opacity,r.opacity);return function(o){return e.h=i(o),e.c=n(o),e.l=s(o),e.opacity=a(o),e+""}}}const X_=$_(I_);var sa=0,ja=0,Oa=0,jp=1e3,rc,$a,ic=0,gs=0,Jc=0,po=typeof performance=="object"&&performance.now?performance:Date,$p=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function J1(){return gs||($p(K_),gs=po.now()+Jc)}function K_(){gs=0}function nc(){this._call=this._time=this._next=null}nc.prototype=Xp.prototype={constructor:nc,restart:function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?J1():+r)+(e==null?0:+e),!this._next&&$a!==this&&($a?$a._next=this:rc=this,$a=this),this._call=t,this._time=r,zh()},stop:function(){this._call&&(this._call=null,this._time=1/0,zh())}};function Xp(t,e,r){var i=new nc;return i.restart(t,e,r),i}function Z_(){J1(),++sa;for(var t=rc,e;t;)(e=gs-t._time)>=0&&t._call.call(void 0,e),t=t._next;--sa}function Xd(){gs=(ic=po.now())+Jc,sa=ja=0;try{Z_()}finally{sa=0,J_(),gs=0}}function Q_(){var t=po.now(),e=t-ic;e>jp&&(Jc-=e,ic=t)}function J_(){for(var t,e=rc,r,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:rc=r);$a=t,zh(i)}function zh(t){if(!sa){ja&&(ja=clearTimeout(ja));var e=t-gs;e>24?(t<1/0&&(ja=setTimeout(Xd,t-po.now()-Jc)),Oa&&(Oa=clearInterval(Oa))):(Oa||(ic=po.now(),Oa=setInterval(Q_,jp)),sa=1,$p(Xd))}}function Kd(t,e,r){var i=new nc;return e=e==null?0:+e,i.restart(n=>{i.stop(),t(n+e)},e,r),i}var tx=vp("start","end","cancel","interrupt"),ex=[],Kp=0,Zd=1,Wh=2,Nl=3,Qd=4,Hh=5,Bl=6;function tu(t,e,r,i,n,s){var a=t.__transition;if(!a)t.__transition={};else if(r in a)return;rx(t,r,{name:e,index:i,group:n,on:tx,tween:ex,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Kp})}function t0(t,e){var r=wi(t,e);if(r.state>Kp)throw new Error("too late; already scheduled");return r}function Hi(t,e){var r=wi(t,e);if(r.state>Nl)throw new Error("too late; already running");return r}function wi(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function rx(t,e,r){var i=t.__transition,n;i[e]=r,r.timer=Xp(s,0,r.time);function s(u){r.state=Zd,r.timer.restart(a,r.delay,r.time),r.delay<=u&&a(u-r.delay)}function a(u){var d,f,p,g;if(r.state!==Zd)return l();for(d in i)if(g=i[d],g.name===r.name){if(g.state===Nl)return Kd(a);g.state===Qd?(g.state=Bl,g.timer.stop(),g.on.call("interrupt",t,t.__data__,g.index,g.group),delete i[d]):+d<e&&(g.state=Bl,g.timer.stop(),g.on.call("cancel",t,t.__data__,g.index,g.group),delete i[d])}if(Kd(function(){r.state===Nl&&(r.state=Qd,r.timer.restart(o,r.delay,r.time),o(u))}),r.state=Wh,r.on.call("start",t,t.__data__,r.index,r.group),r.state===Wh){for(r.state=Nl,n=new Array(p=r.tween.length),d=0,f=-1;d<p;++d)(g=r.tween[d].value.call(t,t.__data__,r.index,r.group))&&(n[++f]=g);n.length=f+1}}function o(u){for(var d=u<r.duration?r.ease.call(null,u/r.duration):(r.timer.restart(l),r.state=Hh,1),f=-1,p=n.length;++f<p;)n[f].call(t,d);r.state===Hh&&(r.on.call("end",t,t.__data__,r.index,r.group),l())}function l(){r.state=Bl,r.timer.stop(),delete i[e];for(var u in i)return;delete t.__transition}}function ix(t,e){var r=t.__transition,i,n,s=!0,a;if(r){e=e==null?null:e+"";for(a in r){if((i=r[a]).name!==e){s=!1;continue}n=i.state>Wh&&i.state<Hh,i.state=Bl,i.timer.stop(),i.on.call(n?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete r[a]}s&&delete t.__transition}}function nx(t){return this.each(function(){ix(this,t)})}function sx(t,e){var r,i;return function(){var n=Hi(this,t),s=n.tween;if(s!==r){i=r=s;for(var a=0,o=i.length;a<o;++a)if(i[a].name===e){i=i.slice(),i.splice(a,1);break}}n.tween=i}}function ax(t,e,r){var i,n;if(typeof r!="function")throw new Error;return function(){var s=Hi(this,t),a=s.tween;if(a!==i){n=(i=a).slice();for(var o={name:e,value:r},l=0,u=n.length;l<u;++l)if(n[l].name===e){n[l]=o;break}l===u&&n.push(o)}s.tween=n}}function ox(t,e){var r=this._id;if(t+="",arguments.length<2){for(var i=wi(this.node(),r).tween,n=0,s=i.length,a;n<s;++n)if((a=i[n]).name===t)return a.value;return null}return this.each((e==null?sx:ax)(r,t,e))}function e0(t,e,r){var i=t._id;return t.each(function(){var n=Hi(this,i);(n.value||(n.value={}))[e]=r.apply(this,arguments)}),function(n){return wi(n,i).value[e]}}function Zp(t,e){var r;return(typeof e=="number"?ui:e instanceof ps?ec:(r=ps(e))?(e=r,ec):Hp)(t,e)}function lx(t){return function(){this.removeAttribute(t)}}function cx(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ux(t,e,r){var i,n=r+"",s;return function(){var a=this.getAttribute(t);return a===n?null:a===i?s:s=e(i=a,r)}}function hx(t,e,r){var i,n=r+"",s;return function(){var a=this.getAttributeNS(t.space,t.local);return a===n?null:a===i?s:s=e(i=a,r)}}function dx(t,e,r){var i,n,s;return function(){var a,o=r(this),l;return o==null?void this.removeAttribute(t):(a=this.getAttribute(t),l=o+"",a===l?null:a===i&&l===n?s:(n=l,s=e(i=a,o)))}}function fx(t,e,r){var i,n,s;return function(){var a,o=r(this),l;return o==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),l=o+"",a===l?null:a===i&&l===n?s:(n=l,s=e(i=a,o)))}}function px(t,e){var r=Kc(t),i=r==="transform"?j_:Zp;return this.attrTween(t,typeof e=="function"?(r.local?fx:dx)(r,i,e0(this,"attr."+t,e)):e==null?(r.local?cx:lx)(r):(r.local?hx:ux)(r,i,e))}function gx(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function yx(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function mx(t,e){var r,i;function n(){var s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&yx(t,s)),r}return n._value=e,n}function bx(t,e){var r,i;function n(){var s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&gx(t,s)),r}return n._value=e,n}function _x(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var i=Kc(t);return this.tween(r,(i.local?mx:bx)(i,e))}function xx(t,e){return function(){t0(this,t).delay=+e.apply(this,arguments)}}function vx(t,e){return e=+e,function(){t0(this,t).delay=e}}function kx(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?xx:vx)(e,t)):wi(this.node(),e).delay}function wx(t,e){return function(){Hi(this,t).duration=+e.apply(this,arguments)}}function Tx(t,e){return e=+e,function(){Hi(this,t).duration=e}}function Ex(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?wx:Tx)(e,t)):wi(this.node(),e).duration}function Cx(t,e){if(typeof e!="function")throw new Error;return function(){Hi(this,t).ease=e}}function Sx(t){var e=this._id;return arguments.length?this.each(Cx(e,t)):wi(this.node(),e).ease}function Ax(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;Hi(this,t).ease=r}}function Lx(t){if(typeof t!="function")throw new Error;return this.each(Ax(this._id,t))}function Dx(t){typeof t!="function"&&(t=Ep(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var s=e[n],a=s.length,o=i[n]=[],l,u=0;u<a;++u)(l=s[u])&&t.call(l,l.__data__,u,s)&&o.push(l);return new bn(i,this._parents,this._name,this._id)}function Mx(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,i=e.length,n=r.length,s=Math.min(i,n),a=new Array(i),o=0;o<s;++o)for(var l=e[o],u=r[o],d=l.length,f=a[o]=new Array(d),p,g=0;g<d;++g)(p=l[g]||u[g])&&(f[g]=p);for(;o<i;++o)a[o]=e[o];return new bn(a,this._parents,this._name,this._id)}function Nx(t){return(t+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function Bx(t,e,r){var i,n,s=Nx(e)?t0:Hi;return function(){var a=s(this,t),o=a.on;o!==i&&(n=(i=o).copy()).on(e,r),a.on=n}}function Ix(t,e){var r=this._id;return arguments.length<2?wi(this.node(),r).on.on(t):this.each(Bx(r,t,e))}function Ox(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function Rx(){return this.on("end.remove",Ox(this._id))}function Fx(t){var e=this._name,r=this._id;typeof t!="function"&&(t=$1(t));for(var i=this._groups,n=i.length,s=new Array(n),a=0;a<n;++a)for(var o=i[a],l=o.length,u=s[a]=new Array(l),d,f,p=0;p<l;++p)(d=o[p])&&(f=t.call(d,d.__data__,p,o))&&("__data__"in d&&(f.__data__=d.__data__),u[p]=f,tu(u[p],e,r,p,u,wi(d,r)));return new bn(s,this._parents,e,r)}function Px(t){var e=this._name,r=this._id;typeof t!="function"&&(t=Tp(t));for(var i=this._groups,n=i.length,s=[],a=[],o=0;o<n;++o)for(var l=i[o],u=l.length,d,f=0;f<u;++f)if(d=l[f]){for(var p=t.call(d,d.__data__,f,l),g,_=wi(d,r),k=0,w=p.length;k<w;++k)(g=p[k])&&tu(g,e,r,k,p,_);s.push(p),a.push(d)}return new bn(s,a,e,r)}var Yx=zo.prototype.constructor;function Vx(){return new Yx(this._groups,this._parents)}function Ux(t,e){var r,i,n;return function(){var s=na(this,t),a=(this.style.removeProperty(t),na(this,t));return s===a?null:s===r&&a===i?n:n=e(r=s,i=a)}}function Qp(t){return function(){this.style.removeProperty(t)}}function zx(t,e,r){var i,n=r+"",s;return function(){var a=na(this,t);return a===n?null:a===i?s:s=e(i=a,r)}}function Wx(t,e,r){var i,n,s;return function(){var a=na(this,t),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(t),na(this,t))),a===l?null:a===i&&l===n?s:(n=l,s=e(i=a,o))}}function Hx(t,e){var r,i,n,s="style."+e,a="end."+s,o;return function(){var l=Hi(this,t),u=l.on,d=l.value[s]==null?o||(o=Qp(e)):void 0;(u!==r||n!==d)&&(i=(r=u).copy()).on(a,n=d),l.on=i}}function Gx(t,e,r){var i=(t+="")=="transform"?q_:Zp;return e==null?this.styleTween(t,Ux(t,i)).on("end.style."+t,Qp(t)):typeof e=="function"?this.styleTween(t,Wx(t,i,e0(this,"style."+t,e))).each(Hx(this._id,t)):this.styleTween(t,zx(t,i,e),r).on("end.style."+t,null)}function qx(t,e,r){return function(i){this.style.setProperty(t,e.call(this,i),r)}}function jx(t,e,r){var i,n;function s(){var a=e.apply(this,arguments);return a!==n&&(i=(n=a)&&qx(t,a,r)),i}return s._value=e,s}function $x(t,e,r){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!="function")throw new Error;return this.tween(i,jx(t,e,r??""))}function Xx(t){return function(){this.textContent=t}}function Kx(t){return function(){var e=t(this);this.textContent=e??""}}function Zx(t){return this.tween("text",typeof t=="function"?Kx(e0(this,"text",t)):Xx(t==null?"":t+""))}function Qx(t){return function(e){this.textContent=t.call(this,e)}}function Jx(t){var e,r;function i(){var n=t.apply(this,arguments);return n!==r&&(e=(r=n)&&Qx(n)),e}return i._value=t,i}function tv(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,Jx(t))}function ev(){for(var t=this._name,e=this._id,r=Jp(),i=this._groups,n=i.length,s=0;s<n;++s)for(var a=i[s],o=a.length,l,u=0;u<o;++u)if(l=a[u]){var d=wi(l,e);tu(l,t,r,u,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new bn(i,this._parents,t,r)}function rv(){var t,e,r=this,i=r._id,n=r.size();return new Promise(function(s,a){var o={value:a},l={value:function(){--n===0&&s()}};r.each(function(){var u=Hi(this,i),d=u.on;d!==t&&(e=(t=d).copy(),e._.cancel.push(o),e._.interrupt.push(o),e._.end.push(l)),u.on=e}),n===0&&s()})}var iv=0;function bn(t,e,r,i){this._groups=t,this._parents=e,this._name=r,this._id=i}function Jp(){return++iv}var Qi=zo.prototype;bn.prototype={constructor:bn,select:Fx,selectAll:Px,selectChild:Qi.selectChild,selectChildren:Qi.selectChildren,filter:Dx,merge:Mx,selection:Vx,transition:ev,call:Qi.call,nodes:Qi.nodes,node:Qi.node,size:Qi.size,empty:Qi.empty,each:Qi.each,on:Ix,attr:px,attrTween:_x,style:Gx,styleTween:$x,text:Zx,textTween:tv,remove:Rx,tween:ox,delay:kx,duration:Ex,ease:Sx,easeVarying:Lx,end:rv,[Symbol.iterator]:Qi[Symbol.iterator]};function nv(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var sv={time:null,delay:0,duration:250,ease:nv};function av(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 ov(t){var e,r;t instanceof bn?(e=t._id,t=t._name):(e=Jp(),(r=sv).time=J1(),t=t==null?null:t+"");for(var i=this._groups,n=i.length,s=0;s<n;++s)for(var a=i[s],o=a.length,l,u=0;u<o;++u)(l=a[u])&&tu(l,t,e,u,a,r||av(l,e));return new bn(i,this._parents,t,e)}zo.prototype.interrupt=nx;zo.prototype.transition=ov;const Gh=Math.PI,qh=2*Gh,os=1e-6,lv=qh-os;function tg(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}function cv(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return tg;const r=10**e;return function(i){this._+=i[0];for(let n=1,s=i.length;n<s;++n)this._+=Math.round(arguments[n]*r)/r+i[n]}}class uv{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?tg:cv(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,i,n){this._append`Q${+e},${+r},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(e,r,i,n,s,a){this._append`C${+e},${+r},${+i},${+n},${this._x1=+s},${this._y1=+a}`}arcTo(e,r,i,n,s){if(e=+e,r=+r,i=+i,n=+n,s=+s,s<0)throw new Error(`negative radius: ${s}`);let a=this._x1,o=this._y1,l=i-e,u=n-r,d=a-e,f=o-r,p=d*d+f*f;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(p>os)if(!(Math.abs(f*l-u*d)>os)||!s)this._append`L${this._x1=e},${this._y1=r}`;else{let g=i-a,_=n-o,k=l*l+u*u,w=g*g+_*_,S=Math.sqrt(k),A=Math.sqrt(p),O=s*Math.tan((Gh-Math.acos((k+p-w)/(2*S*A)))/2),P=O/A,W=O/S;Math.abs(P-1)>os&&this._append`L${e+P*d},${r+P*f}`,this._append`A${s},${s},0,0,${+(f*g>d*_)},${this._x1=e+W*l},${this._y1=r+W*u}`}}arc(e,r,i,n,s,a){if(e=+e,r=+r,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let o=i*Math.cos(n),l=i*Math.sin(n),u=e+o,d=r+l,f=1^a,p=a?n-s:s-n;this._x1===null?this._append`M${u},${d}`:(Math.abs(this._x1-u)>os||Math.abs(this._y1-d)>os)&&this._append`L${u},${d}`,i&&(p<0&&(p=p%qh+qh),p>lv?this._append`A${i},${i},0,1,${f},${e-o},${r-l}A${i},${i},0,1,${f},${this._x1=u},${this._y1=d}`:p>os&&this._append`A${i},${i},0,${+(p>=Gh)},${f},${this._x1=e+i*Math.cos(s)},${this._y1=r+i*Math.sin(s)}`)}rect(e,r,i,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}}function hv(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function dv(t,e){return fetch(t,e).then(hv)}function fv(t){return(e,r)=>dv(e,r).then(i=>new DOMParser().parseFromString(i,t))}var pv=fv("image/svg+xml");function gv(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function sc(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,i=t.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+t.slice(r+1)]}function aa(t){return t=sc(Math.abs(t)),t?t[1]:NaN}function yv(t,e){return function(r,i){for(var n=r.length,s=[],a=0,o=t[0],l=0;n>0&&o>0&&(l+o+1>i&&(o=Math.max(1,i-l)),s.push(r.substring(n-=o,n+o)),!((l+=o+1)>i));)o=t[a=(a+1)%t.length];return s.reverse().join(e)}}function mv(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var bv=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ac(t){if(!(e=bv.exec(t)))throw new Error("invalid format: "+t);var e;return new r0({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]})}ac.prototype=r0.prototype;function r0(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}r0.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function _v(t){t:for(var e=t.length,r=1,i=-1,n;r<e;++r)switch(t[r]){case".":i=n=r;break;case"0":i===0&&(i=r),n=r;break;default:if(!+t[r])break t;i>0&&(i=0);break}return i>0?t.slice(0,i)+t.slice(n+1):t}var eg;function xv(t,e){var r=sc(t,e);if(!r)return t+"";var i=r[0],n=r[1],s=n-(eg=Math.max(-8,Math.min(8,Math.floor(n/3)))*3)+1,a=i.length;return s===a?i:s>a?i+new Array(s-a+1).join("0"):s>0?i.slice(0,s)+"."+i.slice(s):"0."+new Array(1-s).join("0")+sc(t,Math.max(0,e+s-1))[0]}function Jd(t,e){var r=sc(t,e);if(!r)return t+"";var i=r[0],n=r[1];return n<0?"0."+new Array(-n).join("0")+i:i.length>n+1?i.slice(0,n+1)+"."+i.slice(n+1):i+new Array(n-i.length+2).join("0")}const tf={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:gv,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Jd(t*100,e),r:Jd,s:xv,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function ef(t){return t}var rf=Array.prototype.map,nf=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function vv(t){var e=t.grouping===void 0||t.thousands===void 0?ef:yv(rf.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",i=t.currency===void 0?"":t.currency[1]+"",n=t.decimal===void 0?".":t.decimal+"",s=t.numerals===void 0?ef:mv(rf.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",o=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function u(f){f=ac(f);var p=f.fill,g=f.align,_=f.sign,k=f.symbol,w=f.zero,S=f.width,A=f.comma,O=f.precision,P=f.trim,W=f.type;W==="n"?(A=!0,W="g"):tf[W]||(O===void 0&&(O=12),P=!0,W="g"),(w||p==="0"&&g==="=")&&(w=!0,p="0",g="=");var q=k==="$"?r:k==="#"&&/[boxX]/.test(W)?"0"+W.toLowerCase():"",z=k==="$"?i:/[%p]/.test(W)?a:"",H=tf[W],N=/[defgprs%]/.test(W);O=O===void 0?6:/[gprs]/.test(W)?Math.max(1,Math.min(21,O)):Math.max(0,Math.min(20,O));function M(C){var v=q,D=z,m,Q,b;if(W==="c")D=H(C)+D,C="";else{C=+C;var ct=C<0||1/C<0;if(C=isNaN(C)?l:H(Math.abs(C),O),P&&(C=_v(C)),ct&&+C==0&&_!=="+"&&(ct=!1),v=(ct?_==="("?_:o:_==="-"||_==="("?"":_)+v,D=(W==="s"?nf[8+eg/3]:"")+D+(ct&&_==="("?")":""),N){for(m=-1,Q=C.length;++m<Q;)if(b=C.charCodeAt(m),48>b||b>57){D=(b===46?n+C.slice(m+1):C.slice(m))+D,C=C.slice(0,m);break}}}A&&!w&&(C=e(C,1/0));var Dt=v.length+C.length+D.length,vt=Dt<S?new Array(S-Dt+1).join(p):"";switch(A&&w&&(C=e(vt+C,vt.length?S-D.length:1/0),vt=""),g){case"<":C=v+C+D+vt;break;case"=":C=v+vt+C+D;break;case"^":C=vt.slice(0,Dt=vt.length>>1)+v+C+D+vt.slice(Dt);break;default:C=vt+v+C+D;break}return s(C)}return M.toString=function(){return f+""},M}function d(f,p){var g=u((f=ac(f),f.type="f",f)),_=Math.max(-8,Math.min(8,Math.floor(aa(p)/3)))*3,k=Math.pow(10,-_),w=nf[8+_/3];return function(S){return g(k*S)+w}}return{format:u,formatPrefix:d}}var gl,rg,ig;kv({thousands:",",grouping:[3],currency:["$",""]});function kv(t){return gl=vv(t),rg=gl.format,ig=gl.formatPrefix,gl}function wv(t){return Math.max(0,-aa(Math.abs(t)))}function Tv(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(aa(e)/3)))*3-aa(Math.abs(t)))}function Ev(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,aa(e)-aa(t))+1}function i0(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const sf=Symbol("implicit");function ng(){var t=new Od,e=[],r=[],i=sf;function n(s){let a=t.get(s);if(a===void 0){if(i!==sf)return i;t.set(s,a=e.push(s)-1)}return r[a%r.length]}return n.domain=function(s){if(!arguments.length)return e.slice();e=[],t=new Od;for(const a of s)t.has(a)||t.set(a,e.push(a)-1);return n},n.range=function(s){return arguments.length?(r=Array.from(s),n):r.slice()},n.unknown=function(s){return arguments.length?(i=s,n):i},n.copy=function(){return ng(e,r).unknown(i)},i0.apply(n,arguments),n}function Cv(t){return function(){return t}}function Sv(t){return+t}var af=[0,1];function zs(t){return t}function jh(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:Cv(isNaN(e)?NaN:.5)}function Av(t,e){var r;return t>e&&(r=t,t=e,e=r),function(i){return Math.max(t,Math.min(e,i))}}function Lv(t,e,r){var i=t[0],n=t[1],s=e[0],a=e[1];return n<i?(i=jh(n,i),s=r(a,s)):(i=jh(i,n),s=r(s,a)),function(o){return s(i(o))}}function Dv(t,e,r){var i=Math.min(t.length,e.length)-1,n=new Array(i),s=new Array(i),a=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<i;)n[a]=jh(t[a],t[a+1]),s[a]=r(e[a],e[a+1]);return function(o){var l=kb(t,o,1,i)-1;return s[l](n[l](o))}}function sg(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Mv(){var t=af,e=af,r=Q1,i,n,s,a=zs,o,l,u;function d(){var p=Math.min(t.length,e.length);return a!==zs&&(a=Av(t[0],t[p-1])),o=p>2?Dv:Lv,l=u=null,f}function f(p){return p==null||isNaN(p=+p)?s:(l||(l=o(t.map(i),e,r)))(i(a(p)))}return f.invert=function(p){return a(n((u||(u=o(e,t.map(i),ui)))(p)))},f.domain=function(p){return arguments.length?(t=Array.from(p,Sv),d()):t.slice()},f.range=function(p){return arguments.length?(e=Array.from(p),d()):e.slice()},f.rangeRound=function(p){return e=Array.from(p),r=W_,d()},f.clamp=function(p){return arguments.length?(a=p?!0:zs,d()):a!==zs},f.interpolate=function(p){return arguments.length?(r=p,d()):r},f.unknown=function(p){return arguments.length?(s=p,f):s},function(p,g){return i=p,n=g,d()}}function ag(){return Mv()(zs,zs)}function Nv(t,e,r,i){var n=Oh(t,e,r),s;switch(i=ac(i??",f"),i.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return i.precision==null&&!isNaN(s=Tv(n,a))&&(i.precision=s),ig(i,a)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(s=Ev(n,Math.max(Math.abs(t),Math.abs(e))))&&(i.precision=s-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(s=wv(n))&&(i.precision=s-(i.type==="%")*2);break}}return rg(i)}function Bv(t){var e=t.domain;return t.ticks=function(r){var i=e();return Cb(i[0],i[i.length-1],r??10)},t.tickFormat=function(r,i){var n=e();return Nv(n[0],n[n.length-1],r??10,i)},t.nice=function(r){r==null&&(r=10);var i=e(),n=0,s=i.length-1,a=i[n],o=i[s],l,u,d=10;for(o<a&&(u=a,a=o,o=u,u=n,n=s,s=u);d-- >0;){if(u=_p(a,o,r),u===l)return i[n]=a,i[s]=o,e(i);if(u>0)a=Math.floor(a/u)*u,o=Math.ceil(o/u)*u;else if(u<0)a=Math.ceil(a*u)/u,o=Math.floor(o*u)/u;else break;l=u}return t},t}function og(){var t=ag();return t.copy=function(){return sg(t,og())},i0.apply(t,arguments),Bv(t)}function Iv(t,e){t=t.slice();var r=0,i=t.length-1,n=t[r],s=t[i],a;return s<n&&(a=r,r=i,i=a,a=n,n=s,s=a),t[r]=e.floor(n),t[i]=e.ceil(s),t}const Zu=new Date,Qu=new Date;function hr(t,e,r,i){function n(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return n.floor=s=>(t(s=new Date(+s)),s),n.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),n.round=s=>{const a=n(s),o=n.ceil(s);return s-a<o-s?a:o},n.offset=(s,a)=>(e(s=new Date(+s),a==null?1:Math.floor(a)),s),n.range=(s,a,o)=>{const l=[];if(s=n.ceil(s),o=o==null?1:Math.floor(o),!(s<a)||!(o>0))return l;let u;do l.push(u=new Date(+s)),e(s,o),t(s);while(u<s&&s<a);return l},n.filter=s=>hr(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,o)=>{if(a>=a)if(o<0)for(;++o<=0;)for(;e(a,-1),!s(a););else for(;--o>=0;)for(;e(a,1),!s(a););}),r&&(n.count=(s,a)=>(Zu.setTime(+s),Qu.setTime(+a),t(Zu),t(Qu),Math.floor(r(Zu,Qu))),n.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?n.filter(i?a=>i(a)%s===0:a=>n.count(0,a)%s===0):n)),n}const oc=hr(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);oc.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?hr(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):oc);oc.range;const un=1e3,ti=un*60,hn=ti*60,_n=hn*24,n0=_n*7,of=_n*30,Ju=_n*365,Ws=hr(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*un)},(t,e)=>(e-t)/un,t=>t.getUTCSeconds());Ws.range;const go=hr(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*un)},(t,e)=>{t.setTime(+t+e*ti)},(t,e)=>(e-t)/ti,t=>t.getMinutes());go.range;const lg=hr(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ti)},(t,e)=>(e-t)/ti,t=>t.getUTCMinutes());lg.range;const yo=hr(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*un-t.getMinutes()*ti)},(t,e)=>{t.setTime(+t+e*hn)},(t,e)=>(e-t)/hn,t=>t.getHours());yo.range;const cg=hr(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*hn)},(t,e)=>(e-t)/hn,t=>t.getUTCHours());cg.range;const ys=hr(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ti)/_n,t=>t.getDate()-1);ys.range;const s0=hr(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/_n,t=>t.getUTCDate()-1);s0.range;const ug=hr(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/_n,t=>Math.floor(t/_n));ug.range;function Cs(t){return hr(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*ti)/n0)}const oa=Cs(0),lc=Cs(1),Ov=Cs(2),Rv=Cs(3),la=Cs(4),Fv=Cs(5),Pv=Cs(6);oa.range;lc.range;Ov.range;Rv.range;la.range;Fv.range;Pv.range;function Ss(t){return hr(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/n0)}const a0=Ss(0),cc=Ss(1),Yv=Ss(2),Vv=Ss(3),ca=Ss(4),Uv=Ss(5),zv=Ss(6);a0.range;cc.range;Yv.range;Vv.range;ca.range;Uv.range;zv.range;const mo=hr(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());mo.range;const hg=hr(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());hg.range;const xn=hr(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());xn.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:hr(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)});xn.range;const Gn=hr(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());Gn.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:hr(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)});Gn.range;function dg(t,e,r,i,n,s){const a=[[Ws,1,un],[Ws,5,5*un],[Ws,15,15*un],[Ws,30,30*un],[s,1,ti],[s,5,5*ti],[s,15,15*ti],[s,30,30*ti],[n,1,hn],[n,3,3*hn],[n,6,6*hn],[n,12,12*hn],[i,1,_n],[i,2,2*_n],[r,1,n0],[e,1,of],[e,3,3*of],[t,1,Ju]];function o(u,d,f){const p=d<u;p&&([u,d]=[d,u]);const g=f&&typeof f.range=="function"?f:l(u,d,f),_=g?g.range(u,+d+1):[];return p?_.reverse():_}function l(u,d,f){const p=Math.abs(d-u)/f,g=j1(([,,w])=>w).right(a,p);if(g===a.length)return t.every(Oh(u/Ju,d/Ju,f));if(g===0)return oc.every(Math.max(Oh(u,d,f),1));const[_,k]=a[p/a[g-1][2]<a[g][2]/p?g-1:g];return _.every(k)}return[o,l]}dg(Gn,hg,a0,ug,cg,lg);const[Wv,Hv]=dg(xn,mo,oa,ys,yo,go);function th(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function eh(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Ra(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function Gv(t){var e=t.dateTime,r=t.date,i=t.time,n=t.periods,s=t.days,a=t.shortDays,o=t.months,l=t.shortMonths,u=Fa(n),d=Pa(n),f=Fa(s),p=Pa(s),g=Fa(a),_=Pa(a),k=Fa(o),w=Pa(o),S=Fa(l),A=Pa(l),O={a:ct,A:Dt,b:vt,B:j,c:null,d:ff,e:ff,f:p6,g:T6,G:C6,H:h6,I:d6,j:f6,L:fg,m:g6,M:y6,p:ot,q:rt,Q:yf,s:mf,S:m6,u:b6,U:_6,V:x6,w:v6,W:k6,x:null,X:null,y:w6,Y:E6,Z:S6,"%":gf},P={a:it,A:ut,b:bt,B:K,c:null,d:pf,e:pf,f:M6,g:U6,G:W6,H:A6,I:L6,j:D6,L:gg,m:N6,M:B6,p:Ot,q:Y,Q:yf,s:mf,S:I6,u:O6,U:R6,V:F6,w:P6,W:Y6,x:null,X:null,y:V6,Y:z6,Z:H6,"%":gf},W={a:M,A:C,b:v,B:D,c:m,d:hf,e:hf,f:o6,g:uf,G:cf,H:df,I:df,j:i6,L:a6,m:r6,M:n6,p:N,q:e6,Q:c6,s:u6,S:s6,u:Kv,U:Zv,V:Qv,w:Xv,W:Jv,x:Q,X:b,y:uf,Y:cf,Z:t6,"%":l6};O.x=q(r,O),O.X=q(i,O),O.c=q(e,O),P.x=q(r,P),P.X=q(i,P),P.c=q(e,P);function q(U,X){return function(F){var I=[],L=-1,J=0,T=U.length,ht,V,Yt;for(F instanceof Date||(F=new Date(+F));++L<T;)U.charCodeAt(L)===37&&(I.push(U.slice(J,L)),(V=lf[ht=U.charAt(++L)])!=null?ht=U.charAt(++L):V=ht==="e"?" ":"0",(Yt=X[ht])&&(ht=Yt(F,V)),I.push(ht),J=L+1);return I.push(U.slice(J,L)),I.join("")}}function z(U,X){return function(F){var I=Ra(1900,void 0,1),L=H(I,U,F+="",0),J,T;if(L!=F.length)return null;if("Q"in I)return new Date(I.Q);if("s"in I)return new Date(I.s*1e3+("L"in I?I.L:0));if(X&&!("Z"in I)&&(I.Z=0),"p"in I&&(I.H=I.H%12+I.p*12),I.m===void 0&&(I.m="q"in I?I.q:0),"V"in I){if(I.V<1||I.V>53)return null;"w"in I||(I.w=1),"Z"in I?(J=eh(Ra(I.y,0,1)),T=J.getUTCDay(),J=T>4||T===0?cc.ceil(J):cc(J),J=s0.offset(J,(I.V-1)*7),I.y=J.getUTCFullYear(),I.m=J.getUTCMonth(),I.d=J.getUTCDate()+(I.w+6)%7):(J=th(Ra(I.y,0,1)),T=J.getDay(),J=T>4||T===0?lc.ceil(J):lc(J),J=ys.offset(J,(I.V-1)*7),I.y=J.getFullYear(),I.m=J.getMonth(),I.d=J.getDate()+(I.w+6)%7)}else("W"in I||"U"in I)&&("w"in I||(I.w="u"in I?I.u%7:"W"in I?1:0),T="Z"in I?eh(Ra(I.y,0,1)).getUTCDay():th(Ra(I.y,0,1)).getDay(),I.m=0,I.d="W"in I?(I.w+6)%7+I.W*7-(T+5)%7:I.w+I.U*7-(T+6)%7);return"Z"in I?(I.H+=I.Z/100|0,I.M+=I.Z%100,eh(I)):th(I)}}function H(U,X,F,I){for(var L=0,J=X.length,T=F.length,ht,V;L<J;){if(I>=T)return-1;if(ht=X.charCodeAt(L++),ht===37){if(ht=X.charAt(L++),V=W[ht in lf?X.charAt(L++):ht],!V||(I=V(U,F,I))<0)return-1}else if(ht!=F.charCodeAt(I++))return-1}return I}function N(U,X,F){var I=u.exec(X.slice(F));return I?(U.p=d.get(I[0].toLowerCase()),F+I[0].length):-1}function M(U,X,F){var I=g.exec(X.slice(F));return I?(U.w=_.get(I[0].toLowerCase()),F+I[0].length):-1}function C(U,X,F){var I=f.exec(X.slice(F));return I?(U.w=p.get(I[0].toLowerCase()),F+I[0].length):-1}function v(U,X,F){var I=S.exec(X.slice(F));return I?(U.m=A.get(I[0].toLowerCase()),F+I[0].length):-1}function D(U,X,F){var I=k.exec(X.slice(F));return I?(U.m=w.get(I[0].toLowerCase()),F+I[0].length):-1}function m(U,X,F){return H(U,e,X,F)}function Q(U,X,F){return H(U,r,X,F)}function b(U,X,F){return H(U,i,X,F)}function ct(U){return a[U.getDay()]}function Dt(U){return s[U.getDay()]}function vt(U){return l[U.getMonth()]}function j(U){return o[U.getMonth()]}function ot(U){return n[+(U.getHours()>=12)]}function rt(U){return 1+~~(U.getMonth()/3)}function it(U){return a[U.getUTCDay()]}function ut(U){return s[U.getUTCDay()]}function bt(U){return l[U.getUTCMonth()]}function K(U){return o[U.getUTCMonth()]}function Ot(U){return n[+(U.getUTCHours()>=12)]}function Y(U){return 1+~~(U.getUTCMonth()/3)}return{format:function(U){var X=q(U+="",O);return X.toString=function(){return U},X},parse:function(U){var X=z(U+="",!1);return X.toString=function(){return U},X},utcFormat:function(U){var X=q(U+="",P);return X.toString=function(){return U},X},utcParse:function(U){var X=z(U+="",!0);return X.toString=function(){return U},X}}}var lf={"-":"",_:" ",0:"0"},yr=/^\s*\d+/,qv=/^%/,jv=/[\\^$*+?|[\]().{}]/g;function Ae(t,e,r){var i=t<0?"-":"",n=(i?-t:t)+"",s=n.length;return i+(s<r?new Array(r-s+1).join(e)+n:n)}function $v(t){return t.replace(jv,"\\$&")}function Fa(t){return new RegExp("^(?:"+t.map($v).join("|")+")","i")}function Pa(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]))}function Xv(t,e,r){var i=yr.exec(e.slice(r,r+1));return i?(t.w=+i[0],r+i[0].length):-1}function Kv(t,e,r){var i=yr.exec(e.slice(r,r+1));return i?(t.u=+i[0],r+i[0].length):-1}function Zv(t,e,r){var i=yr.exec(e.slice(r,r+2));return i?(t.U=+i[0],r+i[0].length):-1}function Qv(t,e,r){var i=yr.exec(e.slice(r,r+2));return i?(t.V=+i[0],r+i[0].length):-1}function Jv(t,e,r){var i=yr.exec(e.slice(r,r+2));return i?(t.W=+i[0],r+i[0].length):-1}function cf(t,e,r){var i=yr.exec(e.slice(r,r+4));return i?(t.y=+i[0],r+i[0].length):-1}function uf(t,e,r){var i=yr.exec(e.slice(r,r+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function t6(t,e,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function e6(t,e,r){var i=yr.exec(e.slice(r,r+1));return i?(t.q=i[0]*3-3,r+i[0].length):-1}function r6(t,e,r){var i=yr.exec(e.slice(r,r+2));return i?(t.m=i[0]-1,r+i[0].length):-1}function hf(t,e,r){var i=yr.exec(e.slice(r,r+2));return i?(t.d=+i[0],r+i[0].length):-1}function i6(t,e,r){var i=yr.exec(e.slice(r,r+3));return i?(t.m=0,t.d=+i[0],r+i[0].length):-1}function df(t,e,r){var i=yr.exec(e.slice(r,r+2));return i?(t.H=+i[0],r+i[0].length):-1}function n6(t,e,r){var i=yr.exec(e.slice(r,r+2));return i?(t.M=+i[0],r+i[0].length):-1}function s6(t,e,r){var i=yr.exec(e.slice(r,r+2));return i?(t.S=+i[0],r+i[0].length):-1}function a6(t,e,r){var i=yr.exec(e.slice(r,r+3));return i?(t.L=+i[0],r+i[0].length):-1}function o6(t,e,r){var i=yr.exec(e.slice(r,r+6));return i?(t.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function l6(t,e,r){var i=qv.exec(e.slice(r,r+1));return i?r+i[0].length:-1}function c6(t,e,r){var i=yr.exec(e.slice(r));return i?(t.Q=+i[0],r+i[0].length):-1}function u6(t,e,r){var i=yr.exec(e.slice(r));return i?(t.s=+i[0],r+i[0].length):-1}function ff(t,e){return Ae(t.getDate(),e,2)}function h6(t,e){return Ae(t.getHours(),e,2)}function d6(t,e){return Ae(t.getHours()%12||12,e,2)}function f6(t,e){return Ae(1+ys.count(xn(t),t),e,3)}function fg(t,e){return Ae(t.getMilliseconds(),e,3)}function p6(t,e){return fg(t,e)+"000"}function g6(t,e){return Ae(t.getMonth()+1,e,2)}function y6(t,e){return Ae(t.getMinutes(),e,2)}function m6(t,e){return Ae(t.getSeconds(),e,2)}function b6(t){var e=t.getDay();return e===0?7:e}function _6(t,e){return Ae(oa.count(xn(t)-1,t),e,2)}function pg(t){var e=t.getDay();return e>=4||e===0?la(t):la.ceil(t)}function x6(t,e){return t=pg(t),Ae(la.count(xn(t),t)+(xn(t).getDay()===4),e,2)}function v6(t){return t.getDay()}function k6(t,e){return Ae(lc.count(xn(t)-1,t),e,2)}function w6(t,e){return Ae(t.getFullYear()%100,e,2)}function T6(t,e){return t=pg(t),Ae(t.getFullYear()%100,e,2)}function E6(t,e){return Ae(t.getFullYear()%1e4,e,4)}function C6(t,e){var r=t.getDay();return t=r>=4||r===0?la(t):la.ceil(t),Ae(t.getFullYear()%1e4,e,4)}function S6(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Ae(e/60|0,"0",2)+Ae(e%60,"0",2)}function pf(t,e){return Ae(t.getUTCDate(),e,2)}function A6(t,e){return Ae(t.getUTCHours(),e,2)}function L6(t,e){return Ae(t.getUTCHours()%12||12,e,2)}function D6(t,e){return Ae(1+s0.count(Gn(t),t),e,3)}function gg(t,e){return Ae(t.getUTCMilliseconds(),e,3)}function M6(t,e){return gg(t,e)+"000"}function N6(t,e){return Ae(t.getUTCMonth()+1,e,2)}function B6(t,e){return Ae(t.getUTCMinutes(),e,2)}function I6(t,e){return Ae(t.getUTCSeconds(),e,2)}function O6(t){var e=t.getUTCDay();return e===0?7:e}function R6(t,e){return Ae(a0.count(Gn(t)-1,t),e,2)}function yg(t){var e=t.getUTCDay();return e>=4||e===0?ca(t):ca.ceil(t)}function F6(t,e){return t=yg(t),Ae(ca.count(Gn(t),t)+(Gn(t).getUTCDay()===4),e,2)}function P6(t){return t.getUTCDay()}function Y6(t,e){return Ae(cc.count(Gn(t)-1,t),e,2)}function V6(t,e){return Ae(t.getUTCFullYear()%100,e,2)}function U6(t,e){return t=yg(t),Ae(t.getUTCFullYear()%100,e,2)}function z6(t,e){return Ae(t.getUTCFullYear()%1e4,e,4)}function W6(t,e){var r=t.getUTCDay();return t=r>=4||r===0?ca(t):ca.ceil(t),Ae(t.getUTCFullYear()%1e4,e,4)}function H6(){return"+0000"}function gf(){return"%"}function yf(t){return+t}function mf(t){return Math.floor(+t/1e3)}var Ps,uc;G6({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function G6(t){return Ps=Gv(t),uc=Ps.format,Ps.parse,Ps.utcFormat,Ps.utcParse,Ps}function q6(t){return new Date(t)}function j6(t){return t instanceof Date?+t:+new Date(+t)}function mg(t,e,r,i,n,s,a,o,l,u){var d=ag(),f=d.invert,p=d.domain,g=u(".%L"),_=u(":%S"),k=u("%I:%M"),w=u("%I %p"),S=u("%a %d"),A=u("%b %d"),O=u("%B"),P=u("%Y");function W(q){return(l(q)<q?g:o(q)<q?_:a(q)<q?k:s(q)<q?w:i(q)<q?n(q)<q?S:A:r(q)<q?O:P)(q)}return d.invert=function(q){return new Date(f(q))},d.domain=function(q){return arguments.length?p(Array.from(q,j6)):p().map(q6)},d.ticks=function(q){var z=p();return t(z[0],z[z.length-1],q??10)},d.tickFormat=function(q,z){return z==null?W:u(z)},d.nice=function(q){var z=p();return(!q||typeof q.range!="function")&&(q=e(z[0],z[z.length-1],q??10)),q?p(Iv(z,q)):d},d.copy=function(){return sg(d,mg(t,e,r,i,n,s,a,o,l,u))},d}function $6(){return i0.apply(mg(Wv,Hv,xn,mo,oa,ys,yo,go,Ws,uc).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Ke(t){return function(){return t}}const bf=Math.abs,vr=Math.atan2,is=Math.cos,X6=Math.max,rh=Math.min,Ni=Math.sin,Hs=Math.sqrt,Rr=1e-12,bo=Math.PI,hc=bo/2,Il=2*bo;function K6(t){return t>1?0:t<-1?bo:Math.acos(t)}function _f(t){return t>=1?hc:t<=-1?-hc:Math.asin(t)}function bg(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);e=i}return t},()=>new uv(e)}function Z6(t){return t.innerRadius}function Q6(t){return t.outerRadius}function J6(t){return t.startAngle}function tk(t){return t.endAngle}function ek(t){return t&&t.padAngle}function rk(t,e,r,i,n,s,a,o){var l=r-t,u=i-e,d=a-n,f=o-s,p=f*l-d*u;if(!(p*p<Rr))return p=(d*(e-s)-f*(t-n))/p,[t+p*l,e+p*u]}function yl(t,e,r,i,n,s,a){var o=t-r,l=e-i,u=(a?s:-s)/Hs(o*o+l*l),d=u*l,f=-u*o,p=t+d,g=e+f,_=r+d,k=i+f,w=(p+_)/2,S=(g+k)/2,A=_-p,O=k-g,P=A*A+O*O,W=n-s,q=p*k-_*g,z=(O<0?-1:1)*Hs(X6(0,W*W*P-q*q)),H=(q*O-A*z)/P,N=(-q*A-O*z)/P,M=(q*O+A*z)/P,C=(-q*A+O*z)/P,v=H-w,D=N-S,m=M-w,Q=C-S;return v*v+D*D>m*m+Q*Q&&(H=M,N=C),{cx:H,cy:N,x01:-d,y01:-f,x11:H*(n/W-1),y11:N*(n/W-1)}}function $h(){var t=Z6,e=Q6,r=Ke(0),i=null,n=J6,s=tk,a=ek,o=null,l=bg(u);function u(){var d,f,p=+t.apply(this,arguments),g=+e.apply(this,arguments),_=n.apply(this,arguments)-hc,k=s.apply(this,arguments)-hc,w=bf(k-_),S=k>_;if(o||(o=d=l()),g<p&&(f=g,g=p,p=f),!(g>Rr))o.moveTo(0,0);else if(w>Il-Rr)o.moveTo(g*is(_),g*Ni(_)),o.arc(0,0,g,_,k,!S),p>Rr&&(o.moveTo(p*is(k),p*Ni(k)),o.arc(0,0,p,k,_,S));else{var A=_,O=k,P=_,W=k,q=w,z=w,H=a.apply(this,arguments)/2,N=H>Rr&&(i?+i.apply(this,arguments):Hs(p*p+g*g)),M=rh(bf(g-p)/2,+r.apply(this,arguments)),C=M,v=M,D,m;if(N>Rr){var Q=_f(N/p*Ni(H)),b=_f(N/g*Ni(H));(q-=Q*2)>Rr?(Q*=S?1:-1,P+=Q,W-=Q):(q=0,P=W=(_+k)/2),(z-=b*2)>Rr?(b*=S?1:-1,A+=b,O-=b):(z=0,A=O=(_+k)/2)}var ct=g*is(A),Dt=g*Ni(A),vt=p*is(W),j=p*Ni(W);if(M>Rr){var ot=g*is(O),rt=g*Ni(O),it=p*is(P),ut=p*Ni(P),bt;if(w<bo)if(bt=rk(ct,Dt,it,ut,ot,rt,vt,j)){var K=ct-bt[0],Ot=Dt-bt[1],Y=ot-bt[0],U=rt-bt[1],X=1/Ni(K6((K*Y+Ot*U)/(Hs(K*K+Ot*Ot)*Hs(Y*Y+U*U)))/2),F=Hs(bt[0]*bt[0]+bt[1]*bt[1]);C=rh(M,(p-F)/(X-1)),v=rh(M,(g-F)/(X+1))}else C=v=0}z>Rr?v>Rr?(D=yl(it,ut,ct,Dt,g,v,S),m=yl(ot,rt,vt,j,g,v,S),o.moveTo(D.cx+D.x01,D.cy+D.y01),v<M?o.arc(D.cx,D.cy,v,vr(D.y01,D.x01),vr(m.y01,m.x01),!S):(o.arc(D.cx,D.cy,v,vr(D.y01,D.x01),vr(D.y11,D.x11),!S),o.arc(0,0,g,vr(D.cy+D.y11,D.cx+D.x11),vr(m.cy+m.y11,m.cx+m.x11),!S),o.arc(m.cx,m.cy,v,vr(m.y11,m.x11),vr(m.y01,m.x01),!S))):(o.moveTo(ct,Dt),o.arc(0,0,g,A,O,!S)):o.moveTo(ct,Dt),!(p>Rr)||!(q>Rr)?o.lineTo(vt,j):C>Rr?(D=yl(vt,j,ot,rt,p,-C,S),m=yl(ct,Dt,it,ut,p,-C,S),o.lineTo(D.cx+D.x01,D.cy+D.y01),C<M?o.arc(D.cx,D.cy,C,vr(D.y01,D.x01),vr(m.y01,m.x01),!S):(o.arc(D.cx,D.cy,C,vr(D.y01,D.x01),vr(D.y11,D.x11),!S),o.arc(0,0,p,vr(D.cy+D.y11,D.cx+D.x11),vr(m.cy+m.y11,m.cx+m.x11),S),o.arc(m.cx,m.cy,C,vr(m.y11,m.x11),vr(m.y01,m.x01),!S))):o.arc(0,0,p,W,P,S)}if(o.closePath(),d)return o=null,d+""||null}return u.centroid=function(){var d=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,f=(+n.apply(this,arguments)+ +s.apply(this,arguments))/2-bo/2;return[is(f)*d,Ni(f)*d]},u.innerRadius=function(d){return arguments.length?(t=typeof d=="function"?d:Ke(+d),u):t},u.outerRadius=function(d){return arguments.length?(e=typeof d=="function"?d:Ke(+d),u):e},u.cornerRadius=function(d){return arguments.length?(r=typeof d=="function"?d:Ke(+d),u):r},u.padRadius=function(d){return arguments.length?(i=d==null?null:typeof d=="function"?d:Ke(+d),u):i},u.startAngle=function(d){return arguments.length?(n=typeof d=="function"?d:Ke(+d),u):n},u.endAngle=function(d){return arguments.length?(s=typeof d=="function"?d:Ke(+d),u):s},u.padAngle=function(d){return arguments.length?(a=typeof d=="function"?d:Ke(+d),u):a},u.context=function(d){return arguments.length?(o=d??null,u):o},u}function _g(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function xg(t){this._context=t}xg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function $r(t){return new xg(t)}function ik(t){return t[0]}function nk(t){return t[1]}function Ca(t,e){var r=Ke(!0),i=null,n=$r,s=null,a=bg(o);t=typeof t=="function"?t:t===void 0?ik:Ke(t),e=typeof e=="function"?e:e===void 0?nk:Ke(e);function o(l){var u,d=(l=_g(l)).length,f,p=!1,g;for(i==null&&(s=n(g=a())),u=0;u<=d;++u)!(u<d&&r(f=l[u],u,l))===p&&((p=!p)?s.lineStart():s.lineEnd()),p&&s.point(+t(f,u,l),+e(f,u,l));if(g)return s=null,g+""||null}return o.x=function(l){return arguments.length?(t=typeof l=="function"?l:Ke(+l),o):t},o.y=function(l){return arguments.length?(e=typeof l=="function"?l:Ke(+l),o):e},o.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Ke(!!l),o):r},o.curve=function(l){return arguments.length?(n=l,i!=null&&(s=n(i)),o):n},o.context=function(l){return arguments.length?(l==null?i=s=null:s=n(i=l),o):i},o}function sk(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function ak(t){return t}function ok(){var t=ak,e=sk,r=null,i=Ke(0),n=Ke(Il),s=Ke(0);function a(o){var l,u=(o=_g(o)).length,d,f,p=0,g=new Array(u),_=new Array(u),k=+i.apply(this,arguments),w=Math.min(Il,Math.max(-Il,n.apply(this,arguments)-k)),S,A=Math.min(Math.abs(w)/u,s.apply(this,arguments)),O=A*(w<0?-1:1),P;for(l=0;l<u;++l)(P=_[g[l]=l]=+t(o[l],l,o))>0&&(p+=P);for(e!=null?g.sort(function(W,q){return e(_[W],_[q])}):r!=null&&g.sort(function(W,q){return r(o[W],o[q])}),l=0,f=p?(w-u*O)/p:0;l<u;++l,k=S)d=g[l],P=_[d],S=k+(P>0?P*f:0)+O,_[d]={data:o[d],index:l,value:P,startAngle:k,endAngle:S,padAngle:A};return _}return a.value=function(o){return arguments.length?(t=typeof o=="function"?o:Ke(+o),a):t},a.sortValues=function(o){return arguments.length?(e=o,r=null,a):e},a.sort=function(o){return arguments.length?(r=o,e=null,a):r},a.startAngle=function(o){return arguments.length?(i=typeof o=="function"?o:Ke(+o),a):i},a.endAngle=function(o){return arguments.length?(n=typeof o=="function"?o:Ke(+o),a):n},a.padAngle=function(o){return arguments.length?(s=typeof o=="function"?o:Ke(+o),a):s},a}function dc(){}function fc(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 vg(t){this._context=t}vg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:fc(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(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:fc(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function ua(t){return new vg(t)}function kg(t){this._context=t}kg.prototype={areaStart:dc,areaEnd:dc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(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:fc(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function lk(t){return new kg(t)}function wg(t){this._context=t}wg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:fc(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function ck(t){return new wg(t)}function Tg(t){this._context=t}Tg.prototype={areaStart:dc,areaEnd:dc,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function uk(t){return new Tg(t)}function xf(t){return t<0?-1:1}function vf(t,e,r){var i=t._x1-t._x0,n=e-t._x1,s=(t._y1-t._y0)/(i||n<0&&-0),a=(r-t._y1)/(n||i<0&&-0),o=(s*n+a*i)/(i+n);return(xf(s)+xf(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(o))||0}function kf(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function ih(t,e,r){var i=t._x0,n=t._y0,s=t._x1,a=t._y1,o=(s-i)/3;t._context.bezierCurveTo(i+o,n+o*e,s-o,a-o*r,s,a)}function pc(t){this._context=t}pc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ih(this,this._t0,kf(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,ih(this,kf(this,r=vf(this,t,e)),r);break;default:ih(this,this._t0,r=vf(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function Eg(t){this._context=new Cg(t)}(Eg.prototype=Object.create(pc.prototype)).point=function(t,e){pc.prototype.point.call(this,e,t)};function Cg(t){this._context=t}Cg.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,i,n,s){this._context.bezierCurveTo(e,t,i,r,s,n)}};function hk(t){return new pc(t)}function dk(t){return new Eg(t)}function Sg(t){this._context=t}Sg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var i=wf(t),n=wf(e),s=0,a=1;a<r;++s,++a)this._context.bezierCurveTo(i[0][s],n[0][s],i[1][s],n[1][s],t[a],e[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function wf(t){var e,r=t.length-1,i,n=new Array(r),s=new Array(r),a=new Array(r);for(n[0]=0,s[0]=2,a[0]=t[0]+2*t[1],e=1;e<r-1;++e)n[e]=1,s[e]=4,a[e]=4*t[e]+2*t[e+1];for(n[r-1]=2,s[r-1]=7,a[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)i=n[e]/s[e-1],s[e]-=i,a[e]-=i*a[e-1];for(n[r-1]=a[r-1]/s[r-1],e=r-2;e>=0;--e)n[e]=(a[e]-n[e+1])/s[e];for(s[r-1]=(t[r]+n[r-1])/2,e=0;e<r-1;++e)s[e]=2*t[e+1]-n[e+1];return[n,s]}function fk(t){return new Sg(t)}function eu(t,e){this._context=t,this._t=e}eu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e}};function pk(t){return new eu(t,.5)}function gk(t){return new eu(t,0)}function yk(t){return new eu(t,1)}function Gs(t,e,r){this.k=t,this.x=e,this.y=r}Gs.prototype={constructor:Gs,scale:function(t){return t===1?this:new Gs(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Gs(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};new Gs(1,0,0);Gs.prototype;/*! @license DOMPurify 2.4.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.1/LICENSE */function Fn(t){return Fn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fn(t)}function Xh(t,e){return Xh=Object.setPrototypeOf||function(i,n){return i.__proto__=n,i},Xh(t,e)}function mk(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ol(t,e,r){return mk()?Ol=Reflect.construct:Ol=function(n,s,a){var o=[null];o.push.apply(o,s);var l=Function.bind.apply(n,o),u=new l;return a&&Xh(u,a.prototype),u},Ol.apply(null,arguments)}function ci(t){return bk(t)||_k(t)||xk(t)||vk()}function bk(t){if(Array.isArray(t))return Kh(t)}function _k(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function xk(t,e){if(t){if(typeof t=="string")return Kh(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Kh(t,e)}}function Kh(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i}function vk(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
5
|
-
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var kk=Object.hasOwnProperty,Tf=Object.setPrototypeOf,wk=Object.isFrozen,Tk=Object.getPrototypeOf,Ek=Object.getOwnPropertyDescriptor,Ir=Object.freeze,_i=Object.seal,Ck=Object.create,Ag=typeof Reflect<"u"&&Reflect,gc=Ag.apply,Zh=Ag.construct;gc||(gc=function(e,r,i){return e.apply(r,i)});Ir||(Ir=function(e){return e});_i||(_i=function(e){return e});Zh||(Zh=function(e,r){return Ol(e,ci(r))});var Sk=ei(Array.prototype.forEach),Ef=ei(Array.prototype.pop),Ya=ei(Array.prototype.push),Rl=ei(String.prototype.toLowerCase),nh=ei(String.prototype.toString),Ak=ei(String.prototype.match),li=ei(String.prototype.replace),Lk=ei(String.prototype.indexOf),Dk=ei(String.prototype.trim),Ar=ei(RegExp.prototype.test),sh=Mk(TypeError);function ei(t){return function(e){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return gc(t,e,i)}}function Mk(t){return function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return Zh(t,r)}}function we(t,e,r){r=r||Rl,Tf&&Tf(t,null);for(var i=e.length;i--;){var n=e[i];if(typeof n=="string"){var s=r(n);s!==n&&(wk(e)||(e[i]=s),n=s)}t[n]=!0}return t}function ns(t){var e=Ck(null),r;for(r in t)gc(kk,t,[r])&&(e[r]=t[r]);return e}function ml(t,e){for(;t!==null;){var r=Ek(t,e);if(r){if(r.get)return ei(r.get);if(typeof r.value=="function")return ei(r.value)}t=Tk(t)}function i(n){return console.warn("fallback value for",n),null}return i}var Cf=Ir(["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"]),ah=Ir(["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"]),oh=Ir(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Nk=Ir(["animate","color-profile","cursor","discard","fedropshadow","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"]),lh=Ir(["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"]),Bk=Ir(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Sf=Ir(["#text"]),Af=Ir(["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","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","xmlns","slot"]),ch=Ir(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Lf=Ir(["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"]),bl=Ir(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ik=_i(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Ok=_i(/<%[\w\W]*|[\w\W]*%>/gm),Rk=_i(/\${[\w\W]*}/gm),Fk=_i(/^data-[\-\w.\u00B7-\uFFFF]/),Pk=_i(/^aria-[\-\w]+$/),Yk=_i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Vk=_i(/^(?:\w+script|data):/i),Uk=_i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),zk=_i(/^html$/i),Wk=function(){return typeof window>"u"?null:window},Hk=function(e,r){if(Fn(e)!=="object"||typeof e.createPolicy!="function")return null;var i=null,n="data-tt-policy-suffix";r.currentScript&&r.currentScript.hasAttribute(n)&&(i=r.currentScript.getAttribute(n));var s="dompurify"+(i?"#"+i:"");try{return e.createPolicy(s,{createHTML:function(o){return o},createScriptURL:function(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function Lg(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Wk(),e=function(Z){return Lg(Z)};if(e.version="2.4.1",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;var r=t.document,i=t.document,n=t.DocumentFragment,s=t.HTMLTemplateElement,a=t.Node,o=t.Element,l=t.NodeFilter,u=t.NamedNodeMap,d=u===void 0?t.NamedNodeMap||t.MozNamedAttrMap:u,f=t.HTMLFormElement,p=t.DOMParser,g=t.trustedTypes,_=o.prototype,k=ml(_,"cloneNode"),w=ml(_,"nextSibling"),S=ml(_,"childNodes"),A=ml(_,"parentNode");if(typeof s=="function"){var O=i.createElement("template");O.content&&O.content.ownerDocument&&(i=O.content.ownerDocument)}var P=Hk(g,r),W=P?P.createHTML(""):"",q=i,z=q.implementation,H=q.createNodeIterator,N=q.createDocumentFragment,M=q.getElementsByTagName,C=r.importNode,v={};try{v=ns(i).documentMode?i.documentMode:{}}catch{}var D={};e.isSupported=typeof A=="function"&&z&&typeof z.createHTMLDocument<"u"&&v!==9;var m=Ik,Q=Ok,b=Rk,ct=Fk,Dt=Pk,vt=Vk,j=Uk,ot=Yk,rt=null,it=we({},[].concat(ci(Cf),ci(ah),ci(oh),ci(lh),ci(Sf))),ut=null,bt=we({},[].concat(ci(Af),ci(ch),ci(Lf),ci(bl))),K=Object.seal(Object.create(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}})),Ot=null,Y=null,U=!0,X=!0,F=!1,I=!1,L=!1,J=!1,T=!1,ht=!1,V=!1,Yt=!1,et=!0,Mt=!1,Tt="user-content-",gt=!0,Et=!1,wt={},pt=null,st=we({},["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"]),le=null,Xt=we({},["audio","video","img","source","image","track"]),jt=null,Kt=we({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Gt="http://www.w3.org/1998/Math/MathML",Ee="http://www.w3.org/2000/svg",Ht="http://www.w3.org/1999/xhtml",Vt=Ht,Ft=!1,xt=null,ft=we({},[Gt,Ee,Ht],nh),Lt,_t=["application/xhtml+xml","text/html"],Ut="text/html",at,ie=null,dt=i.createElement("form"),ee=function(Z){return Z instanceof RegExp||Z instanceof Function},de=function(Z){ie&&ie===Z||((!Z||Fn(Z)!=="object")&&(Z={}),Z=ns(Z),Lt=_t.indexOf(Z.PARSER_MEDIA_TYPE)===-1?Lt=Ut:Lt=Z.PARSER_MEDIA_TYPE,at=Lt==="application/xhtml+xml"?nh:Rl,rt="ALLOWED_TAGS"in Z?we({},Z.ALLOWED_TAGS,at):it,ut="ALLOWED_ATTR"in Z?we({},Z.ALLOWED_ATTR,at):bt,xt="ALLOWED_NAMESPACES"in Z?we({},Z.ALLOWED_NAMESPACES,nh):ft,jt="ADD_URI_SAFE_ATTR"in Z?we(ns(Kt),Z.ADD_URI_SAFE_ATTR,at):Kt,le="ADD_DATA_URI_TAGS"in Z?we(ns(Xt),Z.ADD_DATA_URI_TAGS,at):Xt,pt="FORBID_CONTENTS"in Z?we({},Z.FORBID_CONTENTS,at):st,Ot="FORBID_TAGS"in Z?we({},Z.FORBID_TAGS,at):{},Y="FORBID_ATTR"in Z?we({},Z.FORBID_ATTR,at):{},wt="USE_PROFILES"in Z?Z.USE_PROFILES:!1,U=Z.ALLOW_ARIA_ATTR!==!1,X=Z.ALLOW_DATA_ATTR!==!1,F=Z.ALLOW_UNKNOWN_PROTOCOLS||!1,I=Z.SAFE_FOR_TEMPLATES||!1,L=Z.WHOLE_DOCUMENT||!1,ht=Z.RETURN_DOM||!1,V=Z.RETURN_DOM_FRAGMENT||!1,Yt=Z.RETURN_TRUSTED_TYPE||!1,T=Z.FORCE_BODY||!1,et=Z.SANITIZE_DOM!==!1,Mt=Z.SANITIZE_NAMED_PROPS||!1,gt=Z.KEEP_CONTENT!==!1,Et=Z.IN_PLACE||!1,ot=Z.ALLOWED_URI_REGEXP||ot,Vt=Z.NAMESPACE||Ht,Z.CUSTOM_ELEMENT_HANDLING&&ee(Z.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(K.tagNameCheck=Z.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Z.CUSTOM_ELEMENT_HANDLING&&ee(Z.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(K.attributeNameCheck=Z.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Z.CUSTOM_ELEMENT_HANDLING&&typeof Z.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(K.allowCustomizedBuiltInElements=Z.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),I&&(X=!1),V&&(ht=!0),wt&&(rt=we({},ci(Sf)),ut=[],wt.html===!0&&(we(rt,Cf),we(ut,Af)),wt.svg===!0&&(we(rt,ah),we(ut,ch),we(ut,bl)),wt.svgFilters===!0&&(we(rt,oh),we(ut,ch),we(ut,bl)),wt.mathMl===!0&&(we(rt,lh),we(ut,Lf),we(ut,bl))),Z.ADD_TAGS&&(rt===it&&(rt=ns(rt)),we(rt,Z.ADD_TAGS,at)),Z.ADD_ATTR&&(ut===bt&&(ut=ns(ut)),we(ut,Z.ADD_ATTR,at)),Z.ADD_URI_SAFE_ATTR&&we(jt,Z.ADD_URI_SAFE_ATTR,at),Z.FORBID_CONTENTS&&(pt===st&&(pt=ns(pt)),we(pt,Z.FORBID_CONTENTS,at)),gt&&(rt["#text"]=!0),L&&we(rt,["html","head","body"]),rt.table&&(we(rt,["tbody"]),delete Ot.tbody),Ir&&Ir(Z),ie=Z)},me=we({},["mi","mo","mn","ms","mtext"]),be=we({},["foreignobject","desc","title","annotation-xml"]),ke=we({},["title","style","font","a","script"]),$t=we({},ah);we($t,oh),we($t,Nk);var ne=we({},lh);we(ne,Bk);var ge=function(Z){var St=A(Z);(!St||!St.tagName)&&(St={namespaceURI:Vt,tagName:"template"});var Nt=Rl(Z.tagName),fe=Rl(St.tagName);return xt[Z.namespaceURI]?Z.namespaceURI===Ee?St.namespaceURI===Ht?Nt==="svg":St.namespaceURI===Gt?Nt==="svg"&&(fe==="annotation-xml"||me[fe]):Boolean($t[Nt]):Z.namespaceURI===Gt?St.namespaceURI===Ht?Nt==="math":St.namespaceURI===Ee?Nt==="math"&&be[fe]:Boolean(ne[Nt]):Z.namespaceURI===Ht?St.namespaceURI===Ee&&!be[fe]||St.namespaceURI===Gt&&!me[fe]?!1:!ne[Nt]&&(ke[Nt]||!$t[Nt]):!!(Lt==="application/xhtml+xml"&&xt[Z.namespaceURI]):!1},Qt=function(Z){Ya(e.removed,{element:Z});try{Z.parentNode.removeChild(Z)}catch{try{Z.outerHTML=W}catch{Z.remove()}}},ni=function(Z,St){try{Ya(e.removed,{attribute:St.getAttributeNode(Z),from:St})}catch{Ya(e.removed,{attribute:null,from:St})}if(St.removeAttribute(Z),Z==="is"&&!ut[Z])if(ht||V)try{Qt(St)}catch{}else try{St.setAttribute(Z,"")}catch{}},zr=function(Z){var St,Nt;if(T)Z="<remove></remove>"+Z;else{var fe=Ak(Z,/^[\r\n\t ]+/);Nt=fe&&fe[0]}Lt==="application/xhtml+xml"&&Vt===Ht&&(Z='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Z+"</body></html>");var Me=P?P.createHTML(Z):Z;if(Vt===Ht)try{St=new p().parseFromString(Me,Lt)}catch{}if(!St||!St.documentElement){St=z.createDocument(Vt,"template",null);try{St.documentElement.innerHTML=Ft?"":Me}catch{}}var Le=St.body||St.documentElement;return Z&&Nt&&Le.insertBefore(i.createTextNode(Nt),Le.childNodes[0]||null),Vt===Ht?M.call(St,L?"html":"body")[0]:L?St.documentElement:Le},De=function(Z){return H.call(Z.ownerDocument||Z,Z,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},ae=function(Z){return Z instanceof f&&(typeof Z.nodeName!="string"||typeof Z.textContent!="string"||typeof Z.removeChild!="function"||!(Z.attributes instanceof d)||typeof Z.removeAttribute!="function"||typeof Z.setAttribute!="function"||typeof Z.namespaceURI!="string"||typeof Z.insertBefore!="function"||typeof Z.hasChildNodes!="function")},Be=function(Z){return Fn(a)==="object"?Z instanceof a:Z&&Fn(Z)==="object"&&typeof Z.nodeType=="number"&&typeof Z.nodeName=="string"},Oe=function(Z,St,Nt){D[Z]&&Sk(D[Z],function(fe){fe.call(e,St,Nt,ie)})},Fe=function(Z){var St;if(Oe("beforeSanitizeElements",Z,null),ae(Z)||Ar(/[\u0080-\uFFFF]/,Z.nodeName))return Qt(Z),!0;var Nt=at(Z.nodeName);if(Oe("uponSanitizeElement",Z,{tagName:Nt,allowedTags:rt}),Z.hasChildNodes()&&!Be(Z.firstElementChild)&&(!Be(Z.content)||!Be(Z.content.firstElementChild))&&Ar(/<[/\w]/g,Z.innerHTML)&&Ar(/<[/\w]/g,Z.textContent)||Nt==="select"&&Ar(/<template/i,Z.innerHTML))return Qt(Z),!0;if(!rt[Nt]||Ot[Nt]){if(!Ot[Nt]&&Ie(Nt)&&(K.tagNameCheck instanceof RegExp&&Ar(K.tagNameCheck,Nt)||K.tagNameCheck instanceof Function&&K.tagNameCheck(Nt)))return!1;if(gt&&!pt[Nt]){var fe=A(Z)||Z.parentNode,Me=S(Z)||Z.childNodes;if(Me&&fe)for(var Le=Me.length,We=Le-1;We>=0;--We)fe.insertBefore(k(Me[We],!0),w(Z))}return Qt(Z),!0}return Z instanceof o&&!ge(Z)||(Nt==="noscript"||Nt==="noembed")&&Ar(/<\/no(script|embed)/i,Z.innerHTML)?(Qt(Z),!0):(I&&Z.nodeType===3&&(St=Z.textContent,St=li(St,m," "),St=li(St,Q," "),St=li(St,b," "),Z.textContent!==St&&(Ya(e.removed,{element:Z.cloneNode()}),Z.textContent=St)),Oe("afterSanitizeElements",Z,null),!1)},Pe=function(Z,St,Nt){if(et&&(St==="id"||St==="name")&&(Nt in i||Nt in dt))return!1;if(!(X&&!Y[St]&&Ar(ct,St))){if(!(U&&Ar(Dt,St))){if(!ut[St]||Y[St]){if(!(Ie(Z)&&(K.tagNameCheck instanceof RegExp&&Ar(K.tagNameCheck,Z)||K.tagNameCheck instanceof Function&&K.tagNameCheck(Z))&&(K.attributeNameCheck instanceof RegExp&&Ar(K.attributeNameCheck,St)||K.attributeNameCheck instanceof Function&&K.attributeNameCheck(St))||St==="is"&&K.allowCustomizedBuiltInElements&&(K.tagNameCheck instanceof RegExp&&Ar(K.tagNameCheck,Nt)||K.tagNameCheck instanceof Function&&K.tagNameCheck(Nt))))return!1}else if(!jt[St]){if(!Ar(ot,li(Nt,j,""))){if(!((St==="src"||St==="xlink:href"||St==="href")&&Z!=="script"&&Lk(Nt,"data:")===0&&le[Z])){if(!(F&&!Ar(vt,li(Nt,j,"")))){if(Nt)return!1}}}}}}return!0},Ie=function(Z){return Z.indexOf("-")>0},Ge=function(Z){var St,Nt,fe,Me;Oe("beforeSanitizeAttributes",Z,null);var Le=Z.attributes;if(Le){var We={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ut};for(Me=Le.length;Me--;){St=Le[Me];var xe=St,Ne=xe.name,Dn=xe.namespaceURI;if(Nt=Ne==="value"?St.value:Dk(St.value),fe=at(Ne),We.attrName=fe,We.attrValue=Nt,We.keepAttr=!0,We.forceKeepAttr=void 0,Oe("uponSanitizeAttribute",Z,We),Nt=We.attrValue,!We.forceKeepAttr&&(ni(Ne,Z),!!We.keepAttr)){if(Ar(/\/>/i,Nt)){ni(Ne,Z);continue}I&&(Nt=li(Nt,m," "),Nt=li(Nt,Q," "),Nt=li(Nt,b," "));var Mn=at(Z.nodeName);if(Pe(Mn,fe,Nt)){if(Mt&&(fe==="id"||fe==="name")&&(ni(Ne,Z),Nt=Tt+Nt),P&&Fn(g)==="object"&&typeof g.getAttributeType=="function"&&!Dn)switch(g.getAttributeType(Mn,fe)){case"TrustedHTML":Nt=P.createHTML(Nt);break;case"TrustedScriptURL":Nt=P.createScriptURL(Nt);break}try{Dn?Z.setAttributeNS(Dn,Ne,Nt):Z.setAttribute(Ne,Nt),Ef(e.removed)}catch{}}}}Oe("afterSanitizeAttributes",Z,null)}},tr=function zt(Z){var St,Nt=De(Z);for(Oe("beforeSanitizeShadowDOM",Z,null);St=Nt.nextNode();)Oe("uponSanitizeShadowNode",St,null),!Fe(St)&&(St.content instanceof n&&zt(St.content),Ge(St));Oe("afterSanitizeShadowDOM",Z,null)};return e.sanitize=function(zt){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},St,Nt,fe,Me,Le;if(Ft=!zt,Ft&&(zt="<!-->"),typeof zt!="string"&&!Be(zt)){if(typeof zt.toString!="function")throw sh("toString is not a function");if(zt=zt.toString(),typeof zt!="string")throw sh("dirty is not a string, aborting")}if(!e.isSupported){if(Fn(t.toStaticHTML)==="object"||typeof t.toStaticHTML=="function"){if(typeof zt=="string")return t.toStaticHTML(zt);if(Be(zt))return t.toStaticHTML(zt.outerHTML)}return zt}if(J||de(Z),e.removed=[],typeof zt=="string"&&(Et=!1),Et){if(zt.nodeName){var We=at(zt.nodeName);if(!rt[We]||Ot[We])throw sh("root node is forbidden and cannot be sanitized in-place")}}else if(zt instanceof a)St=zr("<!---->"),Nt=St.ownerDocument.importNode(zt,!0),Nt.nodeType===1&&Nt.nodeName==="BODY"||Nt.nodeName==="HTML"?St=Nt:St.appendChild(Nt);else{if(!ht&&!I&&!L&&zt.indexOf("<")===-1)return P&&Yt?P.createHTML(zt):zt;if(St=zr(zt),!St)return ht?null:Yt?W:""}St&&T&&Qt(St.firstChild);for(var xe=De(Et?zt:St);fe=xe.nextNode();)fe.nodeType===3&&fe===Me||Fe(fe)||(fe.content instanceof n&&tr(fe.content),Ge(fe),Me=fe);if(Me=null,Et)return zt;if(ht){if(V)for(Le=N.call(St.ownerDocument);St.firstChild;)Le.appendChild(St.firstChild);else Le=St;return ut.shadowroot&&(Le=C.call(r,Le,!0)),Le}var Ne=L?St.outerHTML:St.innerHTML;return L&&rt["!doctype"]&&St.ownerDocument&&St.ownerDocument.doctype&&St.ownerDocument.doctype.name&&Ar(zk,St.ownerDocument.doctype.name)&&(Ne="<!DOCTYPE "+St.ownerDocument.doctype.name+`>
|
|
6
|
-
`+Ne),I&&(Ne=li(Ne,m," "),Ne=li(Ne,Q," "),Ne=li(Ne,b," ")),P&&Yt?P.createHTML(Ne):Ne},e.setConfig=function(zt){de(zt),J=!0},e.clearConfig=function(){ie=null,J=!1},e.isValidAttribute=function(zt,Z,St){ie||de({});var Nt=at(zt),fe=at(Z);return Pe(Nt,fe,St)},e.addHook=function(zt,Z){typeof Z=="function"&&(D[zt]=D[zt]||[],Ya(D[zt],Z))},e.removeHook=function(zt){if(D[zt])return Ef(D[zt])},e.removeHooks=function(zt){D[zt]&&(D[zt]=[])},e.removeAllHooks=function(){D={}},e}var _o=Lg();const Fl={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:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},i)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;const n=r<.5?r*(1+e):r+e-r*e,s=2*r-n;switch(i){case"r":return Fl.hue2rgb(s,n,t+1/3)*255;case"g":return Fl.hue2rgb(s,n,t)*255;case"b":return Fl.hue2rgb(s,n,t-1/3)*255}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;const n=Math.max(t,e,r),s=Math.min(t,e,r),a=(n+s)/2;if(i==="l")return a*100;if(n===s)return 0;const o=n-s,l=a>.5?o/(2-n-s):o/(n+s);if(i==="s")return l*100;switch(n){case t:return((e-r)/o+(e<r?6:0))*60;case e:return((r-t)/o+2)*60;case r:return((t-e)/o+4)*60;default:return-1}}},Gk=Fl,qk={clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},jk=qk,$k={dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},Xk=$k,Kk={channel:Gk,lang:jk,unit:Xk},ve=Kk,Rn={};for(let t=0;t<=255;t++)Rn[t]=ve.unit.dec2hex(t);const kr={ALL:0,RGB:1,HSL:2};class Zk{constructor(){this.type=kr.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=kr.ALL}is(e){return this.type===e}}const Qk=Zk;class Jk{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new Qk}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=kr.ALL,this}_ensureHSL(){const e=this.data,{h:r,s:i,l:n}=e;r===void 0&&(e.h=ve.channel.rgb2hsl(e,"h")),i===void 0&&(e.s=ve.channel.rgb2hsl(e,"s")),n===void 0&&(e.l=ve.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r,g:i,b:n}=e;r===void 0&&(e.r=ve.channel.hsl2rgb(e,"r")),i===void 0&&(e.g=ve.channel.hsl2rgb(e,"g")),n===void 0&&(e.b=ve.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,r=e.r;return!this.type.is(kr.HSL)&&r!==void 0?r:(this._ensureHSL(),ve.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,r=e.g;return!this.type.is(kr.HSL)&&r!==void 0?r:(this._ensureHSL(),ve.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,r=e.b;return!this.type.is(kr.HSL)&&r!==void 0?r:(this._ensureHSL(),ve.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,r=e.h;return!this.type.is(kr.RGB)&&r!==void 0?r:(this._ensureRGB(),ve.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,r=e.s;return!this.type.is(kr.RGB)&&r!==void 0?r:(this._ensureRGB(),ve.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,r=e.l;return!this.type.is(kr.RGB)&&r!==void 0?r:(this._ensureRGB(),ve.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(kr.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(kr.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(kr.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(kr.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(kr.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(kr.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const t8=Jk,e8=new t8({r:0,g:0,b:0,a:0},"transparent"),ru=e8,Dg={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;const e=t.match(Dg.re);if(!e)return;const r=e[1],i=parseInt(r,16),n=r.length,s=n%4===0,a=n>4,o=a?1:17,l=a?8:4,u=s?0:-1,d=a?255:15;return ru.set({r:(i>>l*(u+3)&d)*o,g:(i>>l*(u+2)&d)*o,b:(i>>l*(u+1)&d)*o,a:s?(i&d)*o/255:1},t)},stringify:t=>{const{r:e,g:r,b:i,a:n}=t;return n<1?`#${Rn[Math.round(e)]}${Rn[Math.round(r)]}${Rn[Math.round(i)]}${Rn[Math.round(n*255)]}`:`#${Rn[Math.round(e)]}${Rn[Math.round(r)]}${Rn[Math.round(i)]}`}},to=Dg,Pl={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:t=>{const e=t.match(Pl.hueRe);if(e){const[,r,i]=e;switch(i){case"grad":return ve.channel.clamp.h(parseFloat(r)*.9);case"rad":return ve.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return ve.channel.clamp.h(parseFloat(r)*360)}}return ve.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(e!==104&&e!==72)return;const r=t.match(Pl.re);if(!r)return;const[,i,n,s,a,o]=r;return ru.set({h:Pl._hue2deg(i),s:ve.channel.clamp.s(parseFloat(n)),l:ve.channel.clamp.l(parseFloat(s)),a:a?ve.channel.clamp.a(o?parseFloat(a)/100:parseFloat(a)):1},t)},stringify:t=>{const{h:e,s:r,l:i,a:n}=t;return n<1?`hsla(${ve.lang.round(e)}, ${ve.lang.round(r)}%, ${ve.lang.round(i)}%, ${n})`:`hsl(${ve.lang.round(e)}, ${ve.lang.round(r)}%, ${ve.lang.round(i)}%)`}},_l=Pl,Yl={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:t=>{t=t.toLowerCase();const e=Yl.colors[t];if(e)return to.parse(e)},stringify:t=>{const e=to.stringify(t);for(const r in Yl.colors)if(Yl.colors[r]===e)return r}},Df=Yl,Mg={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:t=>{const e=t.charCodeAt(0);if(e!==114&&e!==82)return;const r=t.match(Mg.re);if(!r)return;const[,i,n,s,a,o,l,u,d]=r;return ru.set({r:ve.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:ve.channel.clamp.g(a?parseFloat(s)*2.55:parseFloat(s)),b:ve.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:u?ve.channel.clamp.a(d?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{const{r:e,g:r,b:i,a:n}=t;return n<1?`rgba(${ve.lang.round(e)}, ${ve.lang.round(r)}, ${ve.lang.round(i)}, ${ve.lang.round(n)})`:`rgb(${ve.lang.round(e)}, ${ve.lang.round(r)}, ${ve.lang.round(i)})`}},xl=Mg,r8={format:{keyword:Df,hex:to,rgb:xl,rgba:xl,hsl:_l,hsla:_l},parse:t=>{if(typeof t!="string")return t;const e=to.parse(t)||xl.parse(t)||_l.parse(t)||Df.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(kr.HSL)||t.data.r===void 0?_l.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?xl.stringify(t):to.stringify(t)},vn=r8,i8=(t,e)=>{const r=vn.parse(t);for(const i in e)r[i]=ve.channel.clamp[i](e[i]);return vn.stringify(r)},Ng=i8,n8=(t,e,r=0,i=1)=>{if(typeof t!="number")return Ng(t,{a:e});const n=ru.set({r:ve.channel.clamp.r(t),g:ve.channel.clamp.g(e),b:ve.channel.clamp.b(r),a:ve.channel.clamp.a(i)});return vn.stringify(n)},eo=n8,s8=(t,e,r)=>{const i=vn.parse(t),n=i[e],s=ve.channel.clamp[e](n+r);return n!==s&&(i[e]=s),vn.stringify(i)},Bg=s8,a8=(t,e)=>Bg(t,"l",e),se=a8,o8=(t,e)=>Bg(t,"l",-e),pe=o8,l8=(t,e)=>{const r=vn.parse(t),i={};for(const n in e)e[n]&&(i[n]=r[n]+e[n]);return Ng(t,i)},mt=l8,c8=(t,e,r=50)=>{const{r:i,g:n,b:s,a}=vn.parse(t),{r:o,g:l,b:u,a:d}=vn.parse(e),f=r/100,p=f*2-1,g=a-d,k=((p*g===-1?p:(p+g)/(1+p*g))+1)/2,w=1-k,S=i*k+o*w,A=n*k+l*w,O=s*k+u*w,P=a*f+d*(1-f);return eo(S,A,O,P)},u8=c8,h8=(t,e=100)=>{const r=vn.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,u8(r,t,e)},Wt=h8;var d8=typeof global=="object"&&global&&global.Object===Object&&global;const Ig=d8;var f8=typeof self=="object"&&self&&self.Object===Object&&self,p8=Ig||f8||Function("return this")();const Ti=p8;var g8=Ti.Symbol;const ri=g8;var Og=Object.prototype,y8=Og.hasOwnProperty,m8=Og.toString,Va=ri?ri.toStringTag:void 0;function b8(t){var e=y8.call(t,Va),r=t[Va];try{t[Va]=void 0;var i=!0}catch{}var n=m8.call(t);return i&&(e?t[Va]=r:delete t[Va]),n}var _8=Object.prototype,x8=_8.toString;function v8(t){return x8.call(t)}var k8="[object Null]",w8="[object Undefined]",Mf=ri?ri.toStringTag:void 0;function As(t){return t==null?t===void 0?w8:k8:Mf&&Mf in Object(t)?b8(t):v8(t)}function Xr(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var T8="[object AsyncFunction]",E8="[object Function]",C8="[object GeneratorFunction]",S8="[object Proxy]";function ha(t){if(!Xr(t))return!1;var e=As(t);return e==E8||e==C8||e==T8||e==S8}var A8=Ti["__core-js_shared__"];const uh=A8;var Nf=function(){var t=/[^.]+$/.exec(uh&&uh.keys&&uh.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function L8(t){return!!Nf&&Nf in t}var D8=Function.prototype,M8=D8.toString;function Ls(t){if(t!=null){try{return M8.call(t)}catch{}try{return t+""}catch{}}return""}var N8=/[\\^$.*+?()[\]{}|]/g,B8=/^\[object .+?Constructor\]$/,I8=Function.prototype,O8=Object.prototype,R8=I8.toString,F8=O8.hasOwnProperty,P8=RegExp("^"+R8.call(F8).replace(N8,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Y8(t){if(!Xr(t)||L8(t))return!1;var e=ha(t)?P8:B8;return e.test(Ls(t))}function V8(t,e){return t==null?void 0:t[e]}function Ds(t,e){var r=V8(t,e);return Y8(r)?r:void 0}var U8=Ds(Object,"create");const xo=U8;function z8(){this.__data__=xo?xo(null):{},this.size=0}function W8(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var H8="__lodash_hash_undefined__",G8=Object.prototype,q8=G8.hasOwnProperty;function j8(t){var e=this.__data__;if(xo){var r=e[t];return r===H8?void 0:r}return q8.call(e,t)?e[t]:void 0}var $8=Object.prototype,X8=$8.hasOwnProperty;function K8(t){var e=this.__data__;return xo?e[t]!==void 0:X8.call(e,t)}var Z8="__lodash_hash_undefined__";function Q8(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=xo&&e===void 0?Z8:e,this}function ms(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}ms.prototype.clear=z8;ms.prototype.delete=W8;ms.prototype.get=j8;ms.prototype.has=K8;ms.prototype.set=Q8;function J8(){this.__data__=[],this.size=0}function Sa(t,e){return t===e||t!==t&&e!==e}function iu(t,e){for(var r=t.length;r--;)if(Sa(t[r][0],e))return r;return-1}var tw=Array.prototype,ew=tw.splice;function rw(t){var e=this.__data__,r=iu(e,t);if(r<0)return!1;var i=e.length-1;return r==i?e.pop():ew.call(e,r,1),--this.size,!0}function iw(t){var e=this.__data__,r=iu(e,t);return r<0?void 0:e[r][1]}function nw(t){return iu(this.__data__,t)>-1}function sw(t,e){var r=this.__data__,i=iu(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}function Tn(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}Tn.prototype.clear=J8;Tn.prototype.delete=rw;Tn.prototype.get=iw;Tn.prototype.has=nw;Tn.prototype.set=sw;var aw=Ds(Ti,"Map");const vo=aw;function ow(){this.size=0,this.__data__={hash:new ms,map:new(vo||Tn),string:new ms}}function lw(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function nu(t,e){var r=t.__data__;return lw(e)?r[typeof e=="string"?"string":"hash"]:r.map}function cw(t){var e=nu(this,t).delete(t);return this.size-=e?1:0,e}function uw(t){return nu(this,t).get(t)}function hw(t){return nu(this,t).has(t)}function dw(t,e){var r=nu(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}function En(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}En.prototype.clear=ow;En.prototype.delete=cw;En.prototype.get=uw;En.prototype.has=hw;En.prototype.set=dw;var fw="Expected a function";function Aa(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(fw);var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],s=r.cache;if(s.has(n))return s.get(n);var a=t.apply(this,i);return r.cache=s.set(n,a)||s,a};return r.cache=new(Aa.Cache||En),r}Aa.Cache=En;function zi(t){return t!=null&&typeof t=="object"}var pw="[object Symbol]";function bs(t){return typeof t=="symbol"||zi(t)&&As(t)==pw}function Js(t,e){for(var r=-1,i=t==null?0:t.length,n=Array(i);++r<i;)n[r]=e(t[r],r,t);return n}var gw=Array.isArray;const ar=gw;var yw=1/0,Bf=ri?ri.prototype:void 0,If=Bf?Bf.toString:void 0;function Rg(t){if(typeof t=="string")return t;if(ar(t))return Js(t,Rg)+"";if(bs(t))return If?If.call(t):"";var e=t+"";return e=="0"&&1/t==-yw?"-0":e}var mw=/\s/;function bw(t){for(var e=t.length;e--&&mw.test(t.charAt(e)););return e}var _w=/^\s+/;function xw(t){return t&&t.slice(0,bw(t)+1).replace(_w,"")}var Of=0/0,vw=/^[-+]0x[0-9a-f]+$/i,kw=/^0b[01]+$/i,ww=/^0o[0-7]+$/i,Tw=parseInt;function Ew(t){if(typeof t=="number")return t;if(bs(t))return Of;if(Xr(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Xr(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=xw(t);var r=kw.test(t);return r||ww.test(t)?Tw(t.slice(2),r?2:8):vw.test(t)?Of:+t}var Rf=1/0,Cw=17976931348623157e292;function Vl(t){if(!t)return t===0?t:0;if(t=Ew(t),t===Rf||t===-Rf){var e=t<0?-1:1;return e*Cw}return t===t?t:0}function Sw(t){var e=Vl(t),r=e%1;return e===e?r?e-r:e:0}function Ms(t){return t}var Aw=Ds(Ti,"WeakMap");const Qh=Aw;var Ff=Object.create,Lw=function(){function t(){}return function(e){if(!Xr(e))return{};if(Ff)return Ff(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();const Dw=Lw;function Mw(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)}function Nw(){}function Fg(t,e){var r=-1,i=t.length;for(e||(e=Array(i));++r<i;)e[r]=t[r];return e}var Bw=800,Iw=16,Ow=Date.now;function Rw(t){var e=0,r=0;return function(){var i=Ow(),n=Iw-(i-r);if(r=i,n>0){if(++e>=Bw)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function qs(t){return function(){return t}}var Fw=function(){try{var t=Ds(Object,"defineProperty");return t({},"",{}),t}catch{}}();const yc=Fw;var Pw=yc?function(t,e){return yc(t,"toString",{configurable:!0,enumerable:!1,value:qs(e),writable:!0})}:Ms;const Yw=Pw;var Vw=Rw(Yw);const Pg=Vw;function Yg(t,e){for(var r=-1,i=t==null?0:t.length;++r<i&&e(t[r],r,t)!==!1;);return t}function Vg(t,e,r,i){for(var n=t.length,s=r+(i?1:-1);i?s--:++s<n;)if(e(t[s],s,t))return s;return-1}function Uw(t){return t!==t}function zw(t,e,r){for(var i=r-1,n=t.length;++i<n;)if(t[i]===e)return i;return-1}function Ww(t,e,r){return e===e?zw(t,e,r):Vg(t,Uw,r)}function Hw(t,e){var r=t==null?0:t.length;return!!r&&Ww(t,e,0)>-1}var Gw=9007199254740991,qw=/^(?:0|[1-9]\d*)$/;function su(t,e){var r=typeof t;return e=e??Gw,!!e&&(r=="number"||r!="symbol"&&qw.test(t))&&t>-1&&t%1==0&&t<e}function au(t,e,r){e=="__proto__"&&yc?yc(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var jw=Object.prototype,$w=jw.hasOwnProperty;function ou(t,e,r){var i=t[e];(!($w.call(t,e)&&Sa(i,r))||r===void 0&&!(e in t))&&au(t,e,r)}function Ho(t,e,r,i){var n=!r;r||(r={});for(var s=-1,a=e.length;++s<a;){var o=e[s],l=i?i(r[o],t[o],o,r,t):void 0;l===void 0&&(l=t[o]),n?au(r,o,l):ou(r,o,l)}return r}var Pf=Math.max;function Ug(t,e,r){return e=Pf(e===void 0?t.length-1:e,0),function(){for(var i=arguments,n=-1,s=Pf(i.length-e,0),a=Array(s);++n<s;)a[n]=i[e+n];n=-1;for(var o=Array(e+1);++n<e;)o[n]=i[n];return o[e]=r(a),Mw(t,this,o)}}function lu(t,e){return Pg(Ug(t,e,Ms),t+"")}var Xw=9007199254740991;function o0(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Xw}function $n(t){return t!=null&&o0(t.length)&&!ha(t)}function ko(t,e,r){if(!Xr(r))return!1;var i=typeof e;return(i=="number"?$n(r)&&su(e,r.length):i=="string"&&e in r)?Sa(r[e],t):!1}function Kw(t){return lu(function(e,r){var i=-1,n=r.length,s=n>1?r[n-1]:void 0,a=n>2?r[2]:void 0;for(s=t.length>3&&typeof s=="function"?(n--,s):void 0,a&&ko(r[0],r[1],a)&&(s=n<3?void 0:s,n=1),e=Object(e);++i<n;){var o=r[i];o&&t(e,o,i,s)}return e})}var Zw=Object.prototype;function cu(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Zw;return t===r}function Qw(t,e){for(var r=-1,i=Array(t);++r<t;)i[r]=e(r);return i}var Jw="[object Arguments]";function Yf(t){return zi(t)&&As(t)==Jw}var zg=Object.prototype,t7=zg.hasOwnProperty,e7=zg.propertyIsEnumerable,r7=Yf(function(){return arguments}())?Yf:function(t){return zi(t)&&t7.call(t,"callee")&&!e7.call(t,"callee")};const da=r7;function i7(){return!1}var Wg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vf=Wg&&typeof module=="object"&&module&&!module.nodeType&&module,n7=Vf&&Vf.exports===Wg,Uf=n7?Ti.Buffer:void 0,s7=Uf?Uf.isBuffer:void 0,a7=s7||i7;const fa=a7;var o7="[object Arguments]",l7="[object Array]",c7="[object Boolean]",u7="[object Date]",h7="[object Error]",d7="[object Function]",f7="[object Map]",p7="[object Number]",g7="[object Object]",y7="[object RegExp]",m7="[object Set]",b7="[object String]",_7="[object WeakMap]",x7="[object ArrayBuffer]",v7="[object DataView]",k7="[object Float32Array]",w7="[object Float64Array]",T7="[object Int8Array]",E7="[object Int16Array]",C7="[object Int32Array]",S7="[object Uint8Array]",A7="[object Uint8ClampedArray]",L7="[object Uint16Array]",D7="[object Uint32Array]",Ve={};Ve[k7]=Ve[w7]=Ve[T7]=Ve[E7]=Ve[C7]=Ve[S7]=Ve[A7]=Ve[L7]=Ve[D7]=!0;Ve[o7]=Ve[l7]=Ve[x7]=Ve[c7]=Ve[v7]=Ve[u7]=Ve[h7]=Ve[d7]=Ve[f7]=Ve[p7]=Ve[g7]=Ve[y7]=Ve[m7]=Ve[b7]=Ve[_7]=!1;function M7(t){return zi(t)&&o0(t.length)&&!!Ve[As(t)]}function uu(t){return function(e){return t(e)}}var Hg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ro=Hg&&typeof module=="object"&&module&&!module.nodeType&&module,N7=ro&&ro.exports===Hg,hh=N7&&Ig.process,B7=function(){try{var t=ro&&ro.require&&ro.require("util").types;return t||hh&&hh.binding&&hh.binding("util")}catch{}}();const pa=B7;var zf=pa&&pa.isTypedArray,I7=zf?uu(zf):M7;const hu=I7;var O7=Object.prototype,R7=O7.hasOwnProperty;function Gg(t,e){var r=ar(t),i=!r&&da(t),n=!r&&!i&&fa(t),s=!r&&!i&&!n&&hu(t),a=r||i||n||s,o=a?Qw(t.length,String):[],l=o.length;for(var u in t)(e||R7.call(t,u))&&!(a&&(u=="length"||n&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||su(u,l)))&&o.push(u);return o}function qg(t,e){return function(r){return t(e(r))}}var F7=qg(Object.keys,Object);const P7=F7;var Y7=Object.prototype,V7=Y7.hasOwnProperty;function jg(t){if(!cu(t))return P7(t);var e=[];for(var r in Object(t))V7.call(t,r)&&r!="constructor"&&e.push(r);return e}function jr(t){return $n(t)?Gg(t):jg(t)}function U7(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var z7=Object.prototype,W7=z7.hasOwnProperty;function H7(t){if(!Xr(t))return U7(t);var e=cu(t),r=[];for(var i in t)i=="constructor"&&(e||!W7.call(t,i))||r.push(i);return r}function Ns(t){return $n(t)?Gg(t,!0):H7(t)}var G7=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,q7=/^\w*$/;function l0(t,e){if(ar(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||bs(t)?!0:q7.test(t)||!G7.test(t)||e!=null&&t in Object(e)}var j7=500;function $7(t){var e=Aa(t,function(i){return r.size===j7&&r.clear(),i}),r=e.cache;return e}var X7=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,K7=/\\(\\)?/g,Z7=$7(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(X7,function(r,i,n,s){e.push(n?s.replace(K7,"$1"):i||r)}),e});const Q7=Z7;function $g(t){return t==null?"":Rg(t)}function du(t,e){return ar(t)?t:l0(t,e)?[t]:Q7($g(t))}var J7=1/0;function Go(t){if(typeof t=="string"||bs(t))return t;var e=t+"";return e=="0"&&1/t==-J7?"-0":e}function fu(t,e){e=du(e,t);for(var r=0,i=e.length;t!=null&&r<i;)t=t[Go(e[r++])];return r&&r==i?t:void 0}function tT(t,e,r){var i=t==null?void 0:fu(t,e);return i===void 0?r:i}function c0(t,e){for(var r=-1,i=e.length,n=t.length;++r<i;)t[n+r]=e[r];return t}var Wf=ri?ri.isConcatSpreadable:void 0;function eT(t){return ar(t)||da(t)||!!(Wf&&t&&t[Wf])}function pu(t,e,r,i,n){var s=-1,a=t.length;for(r||(r=eT),n||(n=[]);++s<a;){var o=t[s];e>0&&r(o)?e>1?pu(o,e-1,r,i,n):c0(n,o):i||(n[n.length]=o)}return n}function La(t){var e=t==null?0:t.length;return e?pu(t,1):[]}function rT(t){return Pg(Ug(t,void 0,La),t+"")}var iT=qg(Object.getPrototypeOf,Object);const u0=iT;var nT="[object Object]",sT=Function.prototype,aT=Object.prototype,Xg=sT.toString,oT=aT.hasOwnProperty,lT=Xg.call(Object);function Kg(t){if(!zi(t)||As(t)!=nT)return!1;var e=u0(t);if(e===null)return!0;var r=oT.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Xg.call(r)==lT}function cT(t,e,r,i){var n=-1,s=t==null?0:t.length;for(i&&s&&(r=t[++n]);++n<s;)r=e(r,t[n],n,t);return r}function uT(){this.__data__=new Tn,this.size=0}function hT(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function dT(t){return this.__data__.get(t)}function fT(t){return this.__data__.has(t)}var pT=200;function gT(t,e){var r=this.__data__;if(r instanceof Tn){var i=r.__data__;if(!vo||i.length<pT-1)return i.push([t,e]),this.size=++r.size,this;r=this.__data__=new En(i)}return r.set(t,e),this.size=r.size,this}function gi(t){var e=this.__data__=new Tn(t);this.size=e.size}gi.prototype.clear=uT;gi.prototype.delete=hT;gi.prototype.get=dT;gi.prototype.has=fT;gi.prototype.set=gT;function yT(t,e){return t&&Ho(e,jr(e),t)}function mT(t,e){return t&&Ho(e,Ns(e),t)}var Zg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Hf=Zg&&typeof module=="object"&&module&&!module.nodeType&&module,bT=Hf&&Hf.exports===Zg,Gf=bT?Ti.Buffer:void 0,qf=Gf?Gf.allocUnsafe:void 0;function Qg(t,e){if(e)return t.slice();var r=t.length,i=qf?qf(r):new t.constructor(r);return t.copy(i),i}function Jg(t,e){for(var r=-1,i=t==null?0:t.length,n=0,s=[];++r<i;){var a=t[r];e(a,r,t)&&(s[n++]=a)}return s}function ty(){return[]}var _T=Object.prototype,xT=_T.propertyIsEnumerable,jf=Object.getOwnPropertySymbols,vT=jf?function(t){return t==null?[]:(t=Object(t),Jg(jf(t),function(e){return xT.call(t,e)}))}:ty;const h0=vT;function kT(t,e){return Ho(t,h0(t),e)}var wT=Object.getOwnPropertySymbols,TT=wT?function(t){for(var e=[];t;)c0(e,h0(t)),t=u0(t);return e}:ty;const ey=TT;function ET(t,e){return Ho(t,ey(t),e)}function ry(t,e,r){var i=e(t);return ar(t)?i:c0(i,r(t))}function Jh(t){return ry(t,jr,h0)}function CT(t){return ry(t,Ns,ey)}var ST=Ds(Ti,"DataView");const t1=ST;var AT=Ds(Ti,"Promise");const e1=AT;var LT=Ds(Ti,"Set");const ta=LT;var $f="[object Map]",DT="[object Object]",Xf="[object Promise]",Kf="[object Set]",Zf="[object WeakMap]",Qf="[object DataView]",MT=Ls(t1),NT=Ls(vo),BT=Ls(e1),IT=Ls(ta),OT=Ls(Qh),ls=As;(t1&&ls(new t1(new ArrayBuffer(1)))!=Qf||vo&&ls(new vo)!=$f||e1&&ls(e1.resolve())!=Xf||ta&&ls(new ta)!=Kf||Qh&&ls(new Qh)!=Zf)&&(ls=function(t){var e=As(t),r=e==DT?t.constructor:void 0,i=r?Ls(r):"";if(i)switch(i){case MT:return Qf;case NT:return $f;case BT:return Xf;case IT:return Kf;case OT:return Zf}return e});const ga=ls;var RT=Object.prototype,FT=RT.hasOwnProperty;function PT(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&FT.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var YT=Ti.Uint8Array;const mc=YT;function d0(t){var e=new t.constructor(t.byteLength);return new mc(e).set(new mc(t)),e}function VT(t,e){var r=e?d0(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var UT=/\w*$/;function zT(t){var e=new t.constructor(t.source,UT.exec(t));return e.lastIndex=t.lastIndex,e}var Jf=ri?ri.prototype:void 0,t2=Jf?Jf.valueOf:void 0;function WT(t){return t2?Object(t2.call(t)):{}}function iy(t,e){var r=e?d0(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var HT="[object Boolean]",GT="[object Date]",qT="[object Map]",jT="[object Number]",$T="[object RegExp]",XT="[object Set]",KT="[object String]",ZT="[object Symbol]",QT="[object ArrayBuffer]",JT="[object DataView]",tE="[object Float32Array]",eE="[object Float64Array]",rE="[object Int8Array]",iE="[object Int16Array]",nE="[object Int32Array]",sE="[object Uint8Array]",aE="[object Uint8ClampedArray]",oE="[object Uint16Array]",lE="[object Uint32Array]";function cE(t,e,r){var i=t.constructor;switch(e){case QT:return d0(t);case HT:case GT:return new i(+t);case JT:return VT(t,r);case tE:case eE:case rE:case iE:case nE:case sE:case aE:case oE:case lE:return iy(t,r);case qT:return new i;case jT:case KT:return new i(t);case $T:return zT(t);case XT:return new i;case ZT:return WT(t)}}function ny(t){return typeof t.constructor=="function"&&!cu(t)?Dw(u0(t)):{}}var uE="[object Map]";function hE(t){return zi(t)&&ga(t)==uE}var e2=pa&&pa.isMap,dE=e2?uu(e2):hE;const fE=dE;var pE="[object Set]";function gE(t){return zi(t)&&ga(t)==pE}var r2=pa&&pa.isSet,yE=r2?uu(r2):gE;const mE=yE;var bE=1,_E=2,xE=4,sy="[object Arguments]",vE="[object Array]",kE="[object Boolean]",wE="[object Date]",TE="[object Error]",ay="[object Function]",EE="[object GeneratorFunction]",CE="[object Map]",SE="[object Number]",oy="[object Object]",AE="[object RegExp]",LE="[object Set]",DE="[object String]",ME="[object Symbol]",NE="[object WeakMap]",BE="[object ArrayBuffer]",IE="[object DataView]",OE="[object Float32Array]",RE="[object Float64Array]",FE="[object Int8Array]",PE="[object Int16Array]",YE="[object Int32Array]",VE="[object Uint8Array]",UE="[object Uint8ClampedArray]",zE="[object Uint16Array]",WE="[object Uint32Array]",Re={};Re[sy]=Re[vE]=Re[BE]=Re[IE]=Re[kE]=Re[wE]=Re[OE]=Re[RE]=Re[FE]=Re[PE]=Re[YE]=Re[CE]=Re[SE]=Re[oy]=Re[AE]=Re[LE]=Re[DE]=Re[ME]=Re[VE]=Re[UE]=Re[zE]=Re[WE]=!0;Re[TE]=Re[ay]=Re[NE]=!1;function io(t,e,r,i,n,s){var a,o=e&bE,l=e&_E,u=e&xE;if(r&&(a=n?r(t,i,n,s):r(t)),a!==void 0)return a;if(!Xr(t))return t;var d=ar(t);if(d){if(a=PT(t),!o)return Fg(t,a)}else{var f=ga(t),p=f==ay||f==EE;if(fa(t))return Qg(t,o);if(f==oy||f==sy||p&&!n){if(a=l||p?{}:ny(t),!o)return l?ET(t,mT(a,t)):kT(t,yT(a,t))}else{if(!Re[f])return n?t:{};a=cE(t,f,o)}}s||(s=new gi);var g=s.get(t);if(g)return g;s.set(t,a),mE(t)?t.forEach(function(w){a.add(io(w,e,r,w,t,s))}):fE(t)&&t.forEach(function(w,S){a.set(S,io(w,e,r,S,t,s))});var _=u?l?CT:Jh:l?Ns:jr,k=d?void 0:_(t);return Yg(k||t,function(w,S){k&&(S=w,w=t[S]),ou(a,S,io(w,e,r,S,t,s))}),a}var HE=4;function GE(t){return io(t,HE)}var qE=1,jE=4;function $E(t){return io(t,qE|jE)}var XE="__lodash_hash_undefined__";function KE(t){return this.__data__.set(t,XE),this}function ZE(t){return this.__data__.has(t)}function wo(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new En;++e<r;)this.add(t[e])}wo.prototype.add=wo.prototype.push=KE;wo.prototype.has=ZE;function QE(t,e){for(var r=-1,i=t==null?0:t.length;++r<i;)if(e(t[r],r,t))return!0;return!1}function ly(t,e){return t.has(e)}var JE=1,tC=2;function cy(t,e,r,i,n,s){var a=r&JE,o=t.length,l=e.length;if(o!=l&&!(a&&l>o))return!1;var u=s.get(t),d=s.get(e);if(u&&d)return u==e&&d==t;var f=-1,p=!0,g=r&tC?new wo:void 0;for(s.set(t,e),s.set(e,t);++f<o;){var _=t[f],k=e[f];if(i)var w=a?i(k,_,f,e,t,s):i(_,k,f,t,e,s);if(w!==void 0){if(w)continue;p=!1;break}if(g){if(!QE(e,function(S,A){if(!ly(g,A)&&(_===S||n(_,S,r,i,s)))return g.push(A)})){p=!1;break}}else if(!(_===k||n(_,k,r,i,s))){p=!1;break}}return s.delete(t),s.delete(e),p}function eC(t){var e=-1,r=Array(t.size);return t.forEach(function(i,n){r[++e]=[n,i]}),r}function f0(t){var e=-1,r=Array(t.size);return t.forEach(function(i){r[++e]=i}),r}var rC=1,iC=2,nC="[object Boolean]",sC="[object Date]",aC="[object Error]",oC="[object Map]",lC="[object Number]",cC="[object RegExp]",uC="[object Set]",hC="[object String]",dC="[object Symbol]",fC="[object ArrayBuffer]",pC="[object DataView]",i2=ri?ri.prototype:void 0,dh=i2?i2.valueOf:void 0;function gC(t,e,r,i,n,s,a){switch(r){case pC:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case fC:return!(t.byteLength!=e.byteLength||!s(new mc(t),new mc(e)));case nC:case sC:case lC:return Sa(+t,+e);case aC:return t.name==e.name&&t.message==e.message;case cC:case hC:return t==e+"";case oC:var o=eC;case uC:var l=i&rC;if(o||(o=f0),t.size!=e.size&&!l)return!1;var u=a.get(t);if(u)return u==e;i|=iC,a.set(t,e);var d=cy(o(t),o(e),i,n,s,a);return a.delete(t),d;case dC:if(dh)return dh.call(t)==dh.call(e)}return!1}var yC=1,mC=Object.prototype,bC=mC.hasOwnProperty;function _C(t,e,r,i,n,s){var a=r&yC,o=Jh(t),l=o.length,u=Jh(e),d=u.length;if(l!=d&&!a)return!1;for(var f=l;f--;){var p=o[f];if(!(a?p in e:bC.call(e,p)))return!1}var g=s.get(t),_=s.get(e);if(g&&_)return g==e&&_==t;var k=!0;s.set(t,e),s.set(e,t);for(var w=a;++f<l;){p=o[f];var S=t[p],A=e[p];if(i)var O=a?i(A,S,p,e,t,s):i(S,A,p,t,e,s);if(!(O===void 0?S===A||n(S,A,r,i,s):O)){k=!1;break}w||(w=p=="constructor")}if(k&&!w){var P=t.constructor,W=e.constructor;P!=W&&"constructor"in t&&"constructor"in e&&!(typeof P=="function"&&P instanceof P&&typeof W=="function"&&W instanceof W)&&(k=!1)}return s.delete(t),s.delete(e),k}var xC=1,n2="[object Arguments]",s2="[object Array]",vl="[object Object]",vC=Object.prototype,a2=vC.hasOwnProperty;function kC(t,e,r,i,n,s){var a=ar(t),o=ar(e),l=a?s2:ga(t),u=o?s2:ga(e);l=l==n2?vl:l,u=u==n2?vl:u;var d=l==vl,f=u==vl,p=l==u;if(p&&fa(t)){if(!fa(e))return!1;a=!0,d=!1}if(p&&!d)return s||(s=new gi),a||hu(t)?cy(t,e,r,i,n,s):gC(t,e,l,r,i,n,s);if(!(r&xC)){var g=d&&a2.call(t,"__wrapped__"),_=f&&a2.call(e,"__wrapped__");if(g||_){var k=g?t.value():t,w=_?e.value():e;return s||(s=new gi),n(k,w,r,i,s)}}return p?(s||(s=new gi),_C(t,e,r,i,n,s)):!1}function p0(t,e,r,i,n){return t===e?!0:t==null||e==null||!zi(t)&&!zi(e)?t!==t&&e!==e:kC(t,e,r,i,p0,n)}var wC=1,TC=2;function EC(t,e,r,i){var n=r.length,s=n,a=!i;if(t==null)return!s;for(t=Object(t);n--;){var o=r[n];if(a&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++n<s;){o=r[n];var l=o[0],u=t[l],d=o[1];if(a&&o[2]){if(u===void 0&&!(l in t))return!1}else{var f=new gi;if(i)var p=i(u,d,l,t,e,f);if(!(p===void 0?p0(d,u,wC|TC,i,f):p))return!1}}return!0}function uy(t){return t===t&&!Xr(t)}function CC(t){for(var e=jr(t),r=e.length;r--;){var i=e[r],n=t[i];e[r]=[i,n,uy(n)]}return e}function hy(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}function SC(t){var e=CC(t);return e.length==1&&e[0][2]?hy(e[0][0],e[0][1]):function(r){return r===t||EC(r,t,e)}}function AC(t,e){return t!=null&&e in Object(t)}function dy(t,e,r){e=du(e,t);for(var i=-1,n=e.length,s=!1;++i<n;){var a=Go(e[i]);if(!(s=t!=null&&r(t,a)))break;t=t[a]}return s||++i!=n?s:(n=t==null?0:t.length,!!n&&o0(n)&&su(a,n)&&(ar(t)||da(t)))}function fy(t,e){return t!=null&&dy(t,e,AC)}var LC=1,DC=2;function MC(t,e){return l0(t)&&uy(e)?hy(Go(t),e):function(r){var i=tT(r,t);return i===void 0&&i===e?fy(r,t):p0(e,i,LC|DC)}}function NC(t){return function(e){return e==null?void 0:e[t]}}function BC(t){return function(e){return fu(e,t)}}function IC(t){return l0(t)?NC(Go(t)):BC(t)}function Xn(t){return typeof t=="function"?t:t==null?Ms:typeof t=="object"?ar(t)?MC(t[0],t[1]):SC(t):IC(t)}function OC(t){return function(e,r,i){for(var n=-1,s=Object(e),a=i(e),o=a.length;o--;){var l=a[t?o:++n];if(r(s[l],l,s)===!1)break}return e}}var RC=OC();const g0=RC;function py(t,e){return t&&g0(t,e,jr)}function FC(t,e){return function(r,i){if(r==null)return r;if(!$n(r))return t(r,i);for(var n=r.length,s=e?n:-1,a=Object(r);(e?s--:++s<n)&&i(a[s],s,a)!==!1;);return r}}var PC=FC(py);const gu=PC;var YC=function(){return Ti.Date.now()};const o2=YC;var gy=Object.prototype,VC=gy.hasOwnProperty,UC=lu(function(t,e){t=Object(t);var r=-1,i=e.length,n=i>2?e[2]:void 0;for(n&&ko(e[0],e[1],n)&&(i=1);++r<i;)for(var s=e[r],a=Ns(s),o=-1,l=a.length;++o<l;){var u=a[o],d=t[u];(d===void 0||Sa(d,gy[u])&&!VC.call(t,u))&&(t[u]=s[u])}return t});const Vs=UC;function r1(t,e,r){(r!==void 0&&!Sa(t[e],r)||r===void 0&&!(e in t))&&au(t,e,r)}function yy(t){return zi(t)&&$n(t)}function i1(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function zC(t){return Ho(t,Ns(t))}function WC(t,e,r,i,n,s,a){var o=i1(t,r),l=i1(e,r),u=a.get(l);if(u){r1(t,r,u);return}var d=s?s(o,l,r+"",t,e,a):void 0,f=d===void 0;if(f){var p=ar(l),g=!p&&fa(l),_=!p&&!g&&hu(l);d=l,p||g||_?ar(o)?d=o:yy(o)?d=Fg(o):g?(f=!1,d=Qg(l,!0)):_?(f=!1,d=iy(l,!0)):d=[]:Kg(l)||da(l)?(d=o,da(o)?d=zC(o):(!Xr(o)||ha(o))&&(d=ny(l))):f=!1}f&&(a.set(l,d),n(d,l,i,s,a),a.delete(l)),r1(t,r,d)}function my(t,e,r,i,n){t!==e&&g0(e,function(s,a){if(n||(n=new gi),Xr(s))WC(t,e,a,r,my,i,n);else{var o=i?i(i1(t,a),s,a+"",t,e,n):void 0;o===void 0&&(o=s),r1(t,a,o)}},Ns)}function HC(t,e,r){for(var i=-1,n=t==null?0:t.length;++i<n;)if(r(e,t[i]))return!0;return!1}function bc(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function by(t){return typeof t=="function"?t:Ms}function kt(t,e){var r=ar(t)?Yg:gu;return r(t,by(e))}function GC(t,e){var r=[];return gu(t,function(i,n,s){e(i,n,s)&&r.push(i)}),r}function dn(t,e){var r=ar(t)?Jg:GC;return r(t,Xn(e))}function qC(t){return function(e,r,i){var n=Object(e);if(!$n(e)){var s=Xn(r);e=jr(e),r=function(o){return s(n[o],o,n)}}var a=t(e,r,i);return a>-1?n[s?e[a]:a]:void 0}}var jC=Math.max;function $C(t,e,r){var i=t==null?0:t.length;if(!i)return-1;var n=r==null?0:Sw(r);return n<0&&(n=jC(i+n,0)),Vg(t,Xn(e),n)}var XC=qC($C);const y0=XC;function _y(t,e){var r=-1,i=$n(t)?Array(t.length):[];return gu(t,function(n,s,a){i[++r]=e(n,s,a)}),i}function sr(t,e){var r=ar(t)?Js:_y;return r(t,Xn(e))}function KC(t,e){return t==null?t:g0(t,by(e),Ns)}function ZC(t,e){return t>e}var QC=Object.prototype,JC=QC.hasOwnProperty;function t9(t,e){return t!=null&&JC.call(t,e)}function _e(t,e){return t!=null&&dy(t,e,t9)}function e9(t,e){return Js(e,function(r){return t[r]})}function yn(t){return t==null?[]:e9(t,jr(t))}var r9="[object Map]",i9="[object Set]",n9=Object.prototype,s9=n9.hasOwnProperty;function ea(t){if(t==null)return!0;if($n(t)&&(ar(t)||typeof t=="string"||typeof t.splice=="function"||fa(t)||hu(t)||da(t)))return!t.length;var e=ga(t);if(e==r9||e==i9)return!t.size;if(cu(t))return!jg(t).length;for(var r in t)if(s9.call(t,r))return!1;return!0}function Ze(t){return t===void 0}function xy(t,e){return t<e}function yu(t,e){var r={};return e=Xn(e),py(t,function(i,n,s){au(r,n,e(i,n,s))}),r}function m0(t,e,r){for(var i=-1,n=t.length;++i<n;){var s=t[i],a=e(s);if(a!=null&&(o===void 0?a===a&&!bs(a):r(a,o)))var o=a,l=s}return l}function _s(t){return t&&t.length?m0(t,Ms,ZC):void 0}var a9=Kw(function(t,e,r){my(t,e,r)});const n1=a9;function To(t){return t&&t.length?m0(t,Ms,xy):void 0}function b0(t,e){return t&&t.length?m0(t,Xn(e),xy):void 0}function o9(t,e,r,i){if(!Xr(t))return t;e=du(e,t);for(var n=-1,s=e.length,a=s-1,o=t;o!=null&&++n<s;){var l=Go(e[n]),u=r;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(n!=a){var d=o[l];u=i?i(d,l,o):void 0,u===void 0&&(u=Xr(d)?d:su(e[n+1])?[]:{})}ou(o,l,u),o=o[l]}return t}function l9(t,e,r){for(var i=-1,n=e.length,s={};++i<n;){var a=e[i],o=fu(t,a);r(o,a)&&o9(s,du(a,t),o)}return s}function c9(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}function u9(t,e){if(t!==e){var r=t!==void 0,i=t===null,n=t===t,s=bs(t),a=e!==void 0,o=e===null,l=e===e,u=bs(e);if(!o&&!u&&!s&&t>e||s&&a&&l&&!o&&!u||i&&a&&l||!r&&l||!n)return 1;if(!i&&!s&&!u&&t<e||u&&r&&n&&!i&&!s||o&&r&&n||!a&&n||!l)return-1}return 0}function h9(t,e,r){for(var i=-1,n=t.criteria,s=e.criteria,a=n.length,o=r.length;++i<a;){var l=u9(n[i],s[i]);if(l){if(i>=o)return l;var u=r[i];return l*(u=="desc"?-1:1)}}return t.index-e.index}function d9(t,e,r){e.length?e=Js(e,function(s){return ar(s)?function(a){return fu(a,s.length===1?s[0]:s)}:s}):e=[Ms];var i=-1;e=Js(e,uu(Xn));var n=_y(t,function(s,a,o){var l=Js(e,function(u){return u(s)});return{criteria:l,index:++i,value:s}});return c9(n,function(s,a){return h9(s,a,r)})}function f9(t,e){return l9(t,e,function(r,i){return fy(t,i)})}var p9=rT(function(t,e){return t==null?{}:f9(t,e)});const Eo=p9;var g9=Math.ceil,y9=Math.max;function m9(t,e,r,i){for(var n=-1,s=y9(g9((e-t)/(r||1)),0),a=Array(s);s--;)a[i?s:++n]=t,t+=r;return a}function b9(t){return function(e,r,i){return i&&typeof i!="number"&&ko(e,r,i)&&(r=i=void 0),e=Vl(e),r===void 0?(r=e,e=0):r=Vl(r),i=i===void 0?e<r?1:-1:Vl(i),m9(e,r,i,t)}}var _9=b9();const xs=_9;function x9(t,e,r,i,n){return n(t,function(s,a,o){r=i?(i=!1,s):e(r,s,a,o)}),r}function qo(t,e,r){var i=ar(t)?cT:x9,n=arguments.length<3;return i(t,Xn(e),r,n,gu)}var v9=lu(function(t,e){if(t==null)return[];var r=e.length;return r>1&&ko(t,e[0],e[1])?e=[]:r>2&&ko(e[0],e[1],e[2])&&(e=[e[0]]),d9(t,pu(e,1),[])});const jo=v9;var k9=1/0,w9=ta&&1/f0(new ta([,-0]))[1]==k9?function(t){return new ta(t)}:Nw;const T9=w9;var E9=200;function C9(t,e,r){var i=-1,n=Hw,s=t.length,a=!0,o=[],l=o;if(r)a=!1,n=HC;else if(s>=E9){var u=e?null:T9(t);if(u)return f0(u);a=!1,n=ly,l=new wo}else l=e?[]:o;t:for(;++i<s;){var d=t[i],f=e?e(d):d;if(d=r||d!==0?d:0,a&&f===f){for(var p=l.length;p--;)if(l[p]===f)continue t;e&&l.push(f),o.push(d)}else n(l,f,r)||(l!==o&&l.push(f),o.push(d))}return o}var S9=lu(function(t){return C9(pu(t,1,yy,!0))});const A9=S9;var L9=0;function mu(t){var e=++L9;return $g(t)+e}function D9(t,e,r){for(var i=-1,n=t.length,s=e.length,a={};++i<n;){var o=i<s?e[i]:void 0;r(a,t[i],o)}return a}function M9(t,e){return D9(t||[],e||[],ou)}var N9="\0",ss="\0",l2="";class or{constructor(e={}){this._isDirected=_e(e,"directed")?e.directed:!0,this._isMultigraph=_e(e,"multigraph")?e.multigraph:!1,this._isCompound=_e(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=qs(void 0),this._defaultEdgeLabelFn=qs(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[ss]={}),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 ha(e)||(e=qs(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return jr(this._nodes)}sources(){var e=this;return dn(this.nodes(),function(r){return ea(e._in[r])})}sinks(){var e=this;return dn(this.nodes(),function(r){return ea(e._out[r])})}setNodes(e,r){var i=arguments,n=this;return kt(e,function(s){i.length>1?n.setNode(s,r):n.setNode(s)}),this}setNode(e,r){return _e(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=r),this):(this._nodes[e]=arguments.length>1?r:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=ss,this._children[e]={},this._children[ss][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return _e(this._nodes,e)}removeNode(e){var r=this;if(_e(this._nodes,e)){var i=function(n){r.removeEdge(r._edgeObjs[n])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],kt(this.children(e),function(n){r.setParent(n)}),delete this._children[e]),kt(jr(this._in[e]),i),delete this._in[e],delete this._preds[e],kt(jr(this._out[e]),i),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Ze(r))r=ss;else{r+="";for(var i=r;!Ze(i);i=this.parent(i))if(i===e)throw new Error("Setting "+r+" as parent of "+e+" would create a cycle");this.setNode(r)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=r,this._children[r][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var r=this._parent[e];if(r!==ss)return r}}children(e){if(Ze(e)&&(e=ss),this._isCompound){var r=this._children[e];if(r)return jr(r)}else{if(e===ss)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var r=this._preds[e];if(r)return jr(r)}successors(e){var r=this._sucs[e];if(r)return jr(r)}neighbors(e){var r=this.predecessors(e);if(r)return A9(r,this.successors(e))}isLeaf(e){var r;return this.isDirected()?r=this.successors(e):r=this.neighbors(e),r.length===0}filterNodes(e){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var i=this;kt(this._nodes,function(a,o){e(o)&&r.setNode(o,a)}),kt(this._edgeObjs,function(a){r.hasNode(a.v)&&r.hasNode(a.w)&&r.setEdge(a,i.edge(a))});var n={};function s(a){var o=i.parent(a);return o===void 0||r.hasNode(o)?(n[a]=o,o):o in n?n[o]:s(o)}return this._isCompound&&kt(r.nodes(),function(a){r.setParent(a,s(a))}),r}setDefaultEdgeLabel(e){return ha(e)||(e=qs(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return yn(this._edgeObjs)}setPath(e,r){var i=this,n=arguments;return qo(e,function(s,a){return n.length>1?i.setEdge(s,a,r):i.setEdge(s,a),a}),this}setEdge(){var e,r,i,n,s=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(e=a.v,r=a.w,i=a.name,arguments.length===2&&(n=arguments[1],s=!0)):(e=a,r=arguments[1],i=arguments[3],arguments.length>2&&(n=arguments[2],s=!0)),e=""+e,r=""+r,Ze(i)||(i=""+i);var o=Xa(this._isDirected,e,r,i);if(_e(this._edgeLabels,o))return s&&(this._edgeLabels[o]=n),this;if(!Ze(i)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(r),this._edgeLabels[o]=s?n:this._defaultEdgeLabelFn(e,r,i);var l=B9(this._isDirected,e,r,i);return e=l.v,r=l.w,Object.freeze(l),this._edgeObjs[o]=l,c2(this._preds[r],e),c2(this._sucs[e],r),this._in[r][o]=l,this._out[e][o]=l,this._edgeCount++,this}edge(e,r,i){var n=arguments.length===1?fh(this._isDirected,arguments[0]):Xa(this._isDirected,e,r,i);return this._edgeLabels[n]}hasEdge(e,r,i){var n=arguments.length===1?fh(this._isDirected,arguments[0]):Xa(this._isDirected,e,r,i);return _e(this._edgeLabels,n)}removeEdge(e,r,i){var n=arguments.length===1?fh(this._isDirected,arguments[0]):Xa(this._isDirected,e,r,i),s=this._edgeObjs[n];return s&&(e=s.v,r=s.w,delete this._edgeLabels[n],delete this._edgeObjs[n],u2(this._preds[r],e),u2(this._sucs[e],r),delete this._in[r][n],delete this._out[e][n],this._edgeCount--),this}inEdges(e,r){var i=this._in[e];if(i){var n=yn(i);return r?dn(n,function(s){return s.v===r}):n}}outEdges(e,r){var i=this._out[e];if(i){var n=yn(i);return r?dn(n,function(s){return s.w===r}):n}}nodeEdges(e,r){var i=this.inEdges(e,r);if(i)return i.concat(this.outEdges(e,r))}}or.prototype._nodeCount=0;or.prototype._edgeCount=0;function c2(t,e){t[e]?t[e]++:t[e]=1}function u2(t,e){--t[e]||delete t[e]}function Xa(t,e,r,i){var n=""+e,s=""+r;if(!t&&n>s){var a=n;n=s,s=a}return n+l2+s+l2+(Ze(i)?N9:i)}function B9(t,e,r,i){var n=""+e,s=""+r;if(!t&&n>s){var a=n;n=s,s=a}var o={v:n,w:s};return i&&(o.name=i),o}function fh(t,e){return Xa(t,e.v,e.w,e.name)}class I9{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,r=e._prev;if(r!==e)return h2(r),r}enqueue(e){var r=this._sentinel;e._prev&&e._next&&h2(e),e._next=r._next,r._next._prev=e,r._next=e,e._prev=r}toString(){for(var e=[],r=this._sentinel,i=r._prev;i!==r;)e.push(JSON.stringify(i,O9)),i=i._prev;return"["+e.join(", ")+"]"}}function h2(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function O9(t,e){if(t!=="_next"&&t!=="_prev")return e}var R9=qs(1);function F9(t,e){if(t.nodeCount()<=1)return[];var r=Y9(t,e||R9),i=P9(r.graph,r.buckets,r.zeroIdx);return La(sr(i,function(n){return t.outEdges(n.v,n.w)}))}function P9(t,e,r){for(var i=[],n=e[e.length-1],s=e[0],a;t.nodeCount();){for(;a=s.dequeue();)ph(t,e,r,a);for(;a=n.dequeue();)ph(t,e,r,a);if(t.nodeCount()){for(var o=e.length-2;o>0;--o)if(a=e[o].dequeue(),a){i=i.concat(ph(t,e,r,a,!0));break}}}return i}function ph(t,e,r,i,n){var s=n?[]:void 0;return kt(t.inEdges(i.v),function(a){var o=t.edge(a),l=t.node(a.v);n&&s.push({v:a.v,w:a.w}),l.out-=o,s1(e,r,l)}),kt(t.outEdges(i.v),function(a){var o=t.edge(a),l=a.w,u=t.node(l);u.in-=o,s1(e,r,u)}),t.removeNode(i.v),s}function Y9(t,e){var r=new or,i=0,n=0;kt(t.nodes(),function(o){r.setNode(o,{v:o,in:0,out:0})}),kt(t.edges(),function(o){var l=r.edge(o.v,o.w)||0,u=e(o),d=l+u;r.setEdge(o.v,o.w,d),n=Math.max(n,r.node(o.v).out+=u),i=Math.max(i,r.node(o.w).in+=u)});var s=xs(n+i+3).map(function(){return new I9}),a=i+1;return kt(r.nodes(),function(o){s1(s,a,r.node(o))}),{graph:r,buckets:s,zeroIdx:a}}function s1(t,e,r){r.out?r.in?t[r.out-r.in+e].enqueue(r):t[t.length-1].enqueue(r):t[0].enqueue(r)}function V9(t){var e=t.graph().acyclicer==="greedy"?F9(t,r(t)):U9(t);kt(e,function(i){var n=t.edge(i);t.removeEdge(i),n.forwardName=i.name,n.reversed=!0,t.setEdge(i.w,i.v,n,mu("rev"))});function r(i){return function(n){return i.edge(n).weight}}}function U9(t){var e=[],r={},i={};function n(s){_e(i,s)||(i[s]=!0,r[s]=!0,kt(t.outEdges(s),function(a){_e(r,a.w)?e.push(a):n(a.w)}),delete r[s])}return kt(t.nodes(),n),e}function z9(t){kt(t.edges(),function(e){var r=t.edge(e);if(r.reversed){t.removeEdge(e);var i=r.forwardName;delete r.reversed,delete r.forwardName,t.setEdge(e.w,e.v,r,i)}})}function Da(t,e,r,i){var n;do n=mu(i);while(t.hasNode(n));return r.dummy=e,t.setNode(n,r),n}function W9(t){var e=new or().setGraph(t.graph());return kt(t.nodes(),function(r){e.setNode(r,t.node(r))}),kt(t.edges(),function(r){var i=e.edge(r.v,r.w)||{weight:0,minlen:1},n=t.edge(r);e.setEdge(r.v,r.w,{weight:i.weight+n.weight,minlen:Math.max(i.minlen,n.minlen)})}),e}function vy(t){var e=new or({multigraph:t.isMultigraph()}).setGraph(t.graph());return kt(t.nodes(),function(r){t.children(r).length||e.setNode(r,t.node(r))}),kt(t.edges(),function(r){e.setEdge(r,t.edge(r))}),e}function d2(t,e){var r=t.x,i=t.y,n=e.x-r,s=e.y-i,a=t.width/2,o=t.height/2;if(!n&&!s)throw new Error("Not possible to find intersection inside of the rectangle");var l,u;return Math.abs(s)*a>Math.abs(n)*o?(s<0&&(o=-o),l=o*n/s,u=o):(n<0&&(a=-a),l=a,u=a*s/n),{x:r+l,y:i+u}}function bu(t){var e=sr(xs(ky(t)+1),function(){return[]});return kt(t.nodes(),function(r){var i=t.node(r),n=i.rank;Ze(n)||(e[n][i.order]=r)}),e}function H9(t){var e=To(sr(t.nodes(),function(r){return t.node(r).rank}));kt(t.nodes(),function(r){var i=t.node(r);_e(i,"rank")&&(i.rank-=e)})}function G9(t){var e=To(sr(t.nodes(),function(s){return t.node(s).rank})),r=[];kt(t.nodes(),function(s){var a=t.node(s).rank-e;r[a]||(r[a]=[]),r[a].push(s)});var i=0,n=t.graph().nodeRankFactor;kt(r,function(s,a){Ze(s)&&a%n!==0?--i:i&&kt(s,function(o){t.node(o).rank+=i})})}function f2(t,e,r,i){var n={width:0,height:0};return arguments.length>=4&&(n.rank=r,n.order=i),Da(t,"border",n,e)}function ky(t){return _s(sr(t.nodes(),function(e){var r=t.node(e).rank;if(!Ze(r))return r}))}function q9(t,e){var r={lhs:[],rhs:[]};return kt(t,function(i){e(i)?r.lhs.push(i):r.rhs.push(i)}),r}function j9(t,e){var r=o2();try{return e()}finally{console.log(t+" time: "+(o2()-r)+"ms")}}function $9(t,e){return e()}function X9(t){function e(r){var i=t.children(r),n=t.node(r);if(i.length&&kt(i,e),_e(n,"minRank")){n.borderLeft=[],n.borderRight=[];for(var s=n.minRank,a=n.maxRank+1;s<a;++s)p2(t,"borderLeft","_bl",r,n,s),p2(t,"borderRight","_br",r,n,s)}}kt(t.children(),e)}function p2(t,e,r,i,n,s){var a={width:0,height:0,rank:s,borderType:e},o=n[e][s-1],l=Da(t,"border",a,r);n[e][s]=l,t.setParent(l,i),o&&t.setEdge(o,l,{weight:1})}function K9(t){var e=t.graph().rankdir.toLowerCase();(e==="lr"||e==="rl")&&wy(t)}function Z9(t){var e=t.graph().rankdir.toLowerCase();(e==="bt"||e==="rl")&&Q9(t),(e==="lr"||e==="rl")&&(J9(t),wy(t))}function wy(t){kt(t.nodes(),function(e){g2(t.node(e))}),kt(t.edges(),function(e){g2(t.edge(e))})}function g2(t){var e=t.width;t.width=t.height,t.height=e}function Q9(t){kt(t.nodes(),function(e){gh(t.node(e))}),kt(t.edges(),function(e){var r=t.edge(e);kt(r.points,gh),_e(r,"y")&&gh(r)})}function gh(t){t.y=-t.y}function J9(t){kt(t.nodes(),function(e){yh(t.node(e))}),kt(t.edges(),function(e){var r=t.edge(e);kt(r.points,yh),_e(r,"x")&&yh(r)})}function yh(t){var e=t.x;t.x=t.y,t.y=e}function tS(t){var e=Da(t,"root",{},"_root"),r=eS(t),i=_s(yn(r))-1,n=2*i+1;t.graph().nestingRoot=e,kt(t.edges(),function(a){t.edge(a).minlen*=n});var s=rS(t)+1;kt(t.children(),function(a){Ty(t,e,n,s,i,r,a)}),t.graph().nodeRankFactor=n}function Ty(t,e,r,i,n,s,a){var o=t.children(a);if(!o.length){a!==e&&t.setEdge(e,a,{weight:0,minlen:r});return}var l=f2(t,"_bt"),u=f2(t,"_bb"),d=t.node(a);t.setParent(l,a),d.borderTop=l,t.setParent(u,a),d.borderBottom=u,kt(o,function(f){Ty(t,e,r,i,n,s,f);var p=t.node(f),g=p.borderTop?p.borderTop:f,_=p.borderBottom?p.borderBottom:f,k=p.borderTop?i:2*i,w=g!==_?1:n-s[a]+1;t.setEdge(l,g,{weight:k,minlen:w,nestingEdge:!0}),t.setEdge(_,u,{weight:k,minlen:w,nestingEdge:!0})}),t.parent(a)||t.setEdge(e,l,{weight:0,minlen:n+s[a]})}function eS(t){var e={};function r(i,n){var s=t.children(i);s&&s.length&&kt(s,function(a){r(a,n+1)}),e[i]=n}return kt(t.children(),function(i){r(i,1)}),e}function rS(t){return qo(t.edges(),function(e,r){return e+t.edge(r).weight},0)}function iS(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,kt(t.edges(),function(r){var i=t.edge(r);i.nestingEdge&&t.removeEdge(r)})}function nS(t,e,r){var i={},n;kt(r,function(s){for(var a=t.parent(s),o,l;a;){if(o=t.parent(a),o?(l=i[o],i[o]=a):(l=n,n=a),l&&l!==a){e.setEdge(l,a);return}a=o}})}function sS(t,e,r){var i=aS(t),n=new or({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(s){return t.node(s)});return kt(t.nodes(),function(s){var a=t.node(s),o=t.parent(s);(a.rank===e||a.minRank<=e&&e<=a.maxRank)&&(n.setNode(s),n.setParent(s,o||i),kt(t[r](s),function(l){var u=l.v===s?l.w:l.v,d=n.edge(u,s),f=Ze(d)?0:d.weight;n.setEdge(u,s,{weight:t.edge(l).weight+f})}),_e(a,"minRank")&&n.setNode(s,{borderLeft:a.borderLeft[e],borderRight:a.borderRight[e]}))}),n}function aS(t){for(var e;t.hasNode(e=mu("_root")););return e}function oS(t,e){for(var r=0,i=1;i<e.length;++i)r+=lS(t,e[i-1],e[i]);return r}function lS(t,e,r){for(var i=M9(r,sr(r,function(u,d){return d})),n=La(sr(e,function(u){return jo(sr(t.outEdges(u),function(d){return{pos:i[d.w],weight:t.edge(d).weight}}),"pos")})),s=1;s<r.length;)s<<=1;var a=2*s-1;s-=1;var o=sr(new Array(a),function(){return 0}),l=0;return kt(n.forEach(function(u){var d=u.pos+s;o[d]+=u.weight;for(var f=0;d>0;)d%2&&(f+=o[d+1]),d=d-1>>1,o[d]+=u.weight;l+=u.weight*f})),l}function cS(t){var e={},r=dn(t.nodes(),function(o){return!t.children(o).length}),i=_s(sr(r,function(o){return t.node(o).rank})),n=sr(xs(i+1),function(){return[]});function s(o){if(!_e(e,o)){e[o]=!0;var l=t.node(o);n[l.rank].push(o),kt(t.successors(o),s)}}var a=jo(r,function(o){return t.node(o).rank});return kt(a,s),n}function uS(t,e){return sr(e,function(r){var i=t.inEdges(r);if(i.length){var n=qo(i,function(s,a){var o=t.edge(a),l=t.node(a.v);return{sum:s.sum+o.weight*l.order,weight:s.weight+o.weight}},{sum:0,weight:0});return{v:r,barycenter:n.sum/n.weight,weight:n.weight}}else return{v:r}})}function hS(t,e){var r={};kt(t,function(n,s){var a=r[n.v]={indegree:0,in:[],out:[],vs:[n.v],i:s};Ze(n.barycenter)||(a.barycenter=n.barycenter,a.weight=n.weight)}),kt(e.edges(),function(n){var s=r[n.v],a=r[n.w];!Ze(s)&&!Ze(a)&&(a.indegree++,s.out.push(r[n.w]))});var i=dn(r,function(n){return!n.indegree});return dS(i)}function dS(t){var e=[];function r(s){return function(a){a.merged||(Ze(a.barycenter)||Ze(s.barycenter)||a.barycenter>=s.barycenter)&&fS(s,a)}}function i(s){return function(a){a.in.push(s),--a.indegree===0&&t.push(a)}}for(;t.length;){var n=t.pop();e.push(n),kt(n.in.reverse(),r(n)),kt(n.out,i(n))}return sr(dn(e,function(s){return!s.merged}),function(s){return Eo(s,["vs","i","barycenter","weight"])})}function fS(t,e){var r=0,i=0;t.weight&&(r+=t.barycenter*t.weight,i+=t.weight),e.weight&&(r+=e.barycenter*e.weight,i+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=r/i,t.weight=i,t.i=Math.min(e.i,t.i),e.merged=!0}function pS(t,e){var r=q9(t,function(d){return _e(d,"barycenter")}),i=r.lhs,n=jo(r.rhs,function(d){return-d.i}),s=[],a=0,o=0,l=0;i.sort(gS(!!e)),l=y2(s,n,l),kt(i,function(d){l+=d.vs.length,s.push(d.vs),a+=d.barycenter*d.weight,o+=d.weight,l=y2(s,n,l)});var u={vs:La(s)};return o&&(u.barycenter=a/o,u.weight=o),u}function y2(t,e,r){for(var i;e.length&&(i=bc(e)).i<=r;)e.pop(),t.push(i.vs),r++;return r}function gS(t){return function(e,r){return e.barycenter<r.barycenter?-1:e.barycenter>r.barycenter?1:t?r.i-e.i:e.i-r.i}}function Ey(t,e,r,i){var n=t.children(e),s=t.node(e),a=s?s.borderLeft:void 0,o=s?s.borderRight:void 0,l={};a&&(n=dn(n,function(_){return _!==a&&_!==o}));var u=uS(t,n);kt(u,function(_){if(t.children(_.v).length){var k=Ey(t,_.v,r,i);l[_.v]=k,_e(k,"barycenter")&&mS(_,k)}});var d=hS(u,r);yS(d,l);var f=pS(d,i);if(a&&(f.vs=La([a,f.vs,o]),t.predecessors(a).length)){var p=t.node(t.predecessors(a)[0]),g=t.node(t.predecessors(o)[0]);_e(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+p.order+g.order)/(f.weight+2),f.weight+=2}return f}function yS(t,e){kt(t,function(r){r.vs=La(r.vs.map(function(i){return e[i]?e[i].vs:i}))})}function mS(t,e){Ze(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)}function bS(t){var e=ky(t),r=m2(t,xs(1,e+1),"inEdges"),i=m2(t,xs(e-1,-1,-1),"outEdges"),n=cS(t);b2(t,n);for(var s=Number.POSITIVE_INFINITY,a,o=0,l=0;l<4;++o,++l){_S(o%2?r:i,o%4>=2),n=bu(t);var u=oS(t,n);u<s&&(l=0,a=$E(n),s=u)}b2(t,a)}function m2(t,e,r){return sr(e,function(i){return sS(t,i,r)})}function _S(t,e){var r=new or;kt(t,function(i){var n=i.graph().root,s=Ey(i,n,r,e);kt(s.vs,function(a,o){i.node(a).order=o}),nS(i,r,s.vs)})}function b2(t,e){kt(e,function(r){kt(r,function(i,n){t.node(i).order=n})})}function xS(t){var e=kS(t);kt(t.graph().dummyChains,function(r){for(var i=t.node(r),n=i.edgeObj,s=vS(t,e,n.v,n.w),a=s.path,o=s.lca,l=0,u=a[l],d=!0;r!==n.w;){if(i=t.node(r),d){for(;(u=a[l])!==o&&t.node(u).maxRank<i.rank;)l++;u===o&&(d=!1)}if(!d){for(;l<a.length-1&&t.node(u=a[l+1]).minRank<=i.rank;)l++;u=a[l]}t.setParent(r,u),r=t.successors(r)[0]}})}function vS(t,e,r,i){var n=[],s=[],a=Math.min(e[r].low,e[i].low),o=Math.max(e[r].lim,e[i].lim),l,u;l=r;do l=t.parent(l),n.push(l);while(l&&(e[l].low>a||o>e[l].lim));for(u=l,l=i;(l=t.parent(l))!==u;)s.push(l);return{path:n.concat(s.reverse()),lca:u}}function kS(t){var e={},r=0;function i(n){var s=r;kt(t.children(n),i),e[n]={low:s,lim:r++}}return kt(t.children(),i),e}function wS(t,e){var r={};function i(n,s){var a=0,o=0,l=n.length,u=bc(s);return kt(s,function(d,f){var p=ES(t,d),g=p?t.node(p).order:l;(p||d===u)&&(kt(s.slice(o,f+1),function(_){kt(t.predecessors(_),function(k){var w=t.node(k),S=w.order;(S<a||g<S)&&!(w.dummy&&t.node(_).dummy)&&Cy(r,k,_)})}),o=f+1,a=g)}),s}return qo(e,i),r}function TS(t,e){var r={};function i(s,a,o,l,u){var d;kt(xs(a,o),function(f){d=s[f],t.node(d).dummy&&kt(t.predecessors(d),function(p){var g=t.node(p);g.dummy&&(g.order<l||g.order>u)&&Cy(r,p,d)})})}function n(s,a){var o=-1,l,u=0;return kt(a,function(d,f){if(t.node(d).dummy==="border"){var p=t.predecessors(d);p.length&&(l=t.node(p[0]).order,i(a,u,f,o,l),u=f,o=l)}i(a,u,a.length,l,s.length)}),a}return qo(e,n),r}function ES(t,e){if(t.node(e).dummy)return y0(t.predecessors(e),function(r){return t.node(r).dummy})}function Cy(t,e,r){if(e>r){var i=e;e=r,r=i}var n=t[e];n||(t[e]=n={}),n[r]=!0}function CS(t,e,r){if(e>r){var i=e;e=r,r=i}return _e(t[e],r)}function SS(t,e,r,i){var n={},s={},a={};return kt(e,function(o){kt(o,function(l,u){n[l]=l,s[l]=l,a[l]=u})}),kt(e,function(o){var l=-1;kt(o,function(u){var d=i(u);if(d.length){d=jo(d,function(k){return a[k]});for(var f=(d.length-1)/2,p=Math.floor(f),g=Math.ceil(f);p<=g;++p){var _=d[p];s[u]===u&&l<a[_]&&!CS(r,u,_)&&(s[_]=u,s[u]=n[u]=n[_],l=a[_])}}})}),{root:n,align:s}}function AS(t,e,r,i,n){var s={},a=LS(t,e,r,n),o=n?"borderLeft":"borderRight";function l(f,p){for(var g=a.nodes(),_=g.pop(),k={};_;)k[_]?f(_):(k[_]=!0,g.push(_),g=g.concat(p(_))),_=g.pop()}function u(f){s[f]=a.inEdges(f).reduce(function(p,g){return Math.max(p,s[g.v]+a.edge(g))},0)}function d(f){var p=a.outEdges(f).reduce(function(_,k){return Math.min(_,s[k.w]-a.edge(k))},Number.POSITIVE_INFINITY),g=t.node(f);p!==Number.POSITIVE_INFINITY&&g.borderType!==o&&(s[f]=Math.max(s[f],p))}return l(u,a.predecessors.bind(a)),l(d,a.successors.bind(a)),kt(i,function(f){s[f]=s[r[f]]}),s}function LS(t,e,r,i){var n=new or,s=t.graph(),a=IS(s.nodesep,s.edgesep,i);return kt(e,function(o){var l;kt(o,function(u){var d=r[u];if(n.setNode(d),l){var f=r[l],p=n.edge(f,d);n.setEdge(f,d,Math.max(a(t,u,l),p||0))}l=u})}),n}function DS(t,e){return b0(yn(e),function(r){var i=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY;return KC(r,function(s,a){var o=OS(t,a)/2;i=Math.max(s+o,i),n=Math.min(s-o,n)}),i-n})}function MS(t,e){var r=yn(e),i=To(r),n=_s(r);kt(["u","d"],function(s){kt(["l","r"],function(a){var o=s+a,l=t[o],u;if(l!==e){var d=yn(l);u=a==="l"?i-To(d):n-_s(d),u&&(t[o]=yu(l,function(f){return f+u}))}})})}function NS(t,e){return yu(t.ul,function(r,i){if(e)return t[e.toLowerCase()][i];var n=jo(sr(t,i));return(n[1]+n[2])/2})}function BS(t){var e=bu(t),r=n1(wS(t,e),TS(t,e)),i={},n;kt(["u","d"],function(a){n=a==="u"?e:yn(e).reverse(),kt(["l","r"],function(o){o==="r"&&(n=sr(n,function(f){return yn(f).reverse()}));var l=(a==="u"?t.predecessors:t.successors).bind(t),u=SS(t,n,r,l),d=AS(t,n,u.root,u.align,o==="r");o==="r"&&(d=yu(d,function(f){return-f})),i[a+o]=d})});var s=DS(t,i);return MS(i,s),NS(i,t.graph().align)}function IS(t,e,r){return function(i,n,s){var a=i.node(n),o=i.node(s),l=0,u;if(l+=a.width/2,_e(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":u=-a.width/2;break;case"r":u=a.width/2;break}if(u&&(l+=r?u:-u),u=0,l+=(a.dummy?e:t)/2,l+=(o.dummy?e:t)/2,l+=o.width/2,_e(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":u=o.width/2;break;case"r":u=-o.width/2;break}return u&&(l+=r?u:-u),u=0,l}}function OS(t,e){return t.node(e).width}function RS(t){t=vy(t),FS(t),kt(BS(t),function(e,r){t.node(r).x=e})}function FS(t){var e=bu(t),r=t.graph().ranksep,i=0;kt(e,function(n){var s=_s(sr(n,function(a){return t.node(a).height}));kt(n,function(a){t.node(a).y=i+s/2}),i+=s+r})}function Ma(t,e){var r=e&&e.debugTiming?j9:$9;r("layout",function(){var i=r(" buildLayoutGraph",function(){return $S(t)});r(" runLayout",function(){PS(i,r)}),r(" updateInputGraph",function(){YS(t,i)})})}function PS(t,e){e(" makeSpaceForEdgeLabels",function(){XS(t)}),e(" removeSelfEdges",function(){nA(t)}),e(" acyclic",function(){V9(t)}),e(" nestingGraph.run",function(){tS(t)}),e(" rank",function(){_A(vy(t))}),e(" injectEdgeLabelProxies",function(){KS(t)}),e(" removeEmptyRanks",function(){G9(t)}),e(" nestingGraph.cleanup",function(){iS(t)}),e(" normalizeRanks",function(){H9(t)}),e(" assignRankMinMax",function(){ZS(t)}),e(" removeEdgeLabelProxies",function(){QS(t)}),e(" normalize.run",function(){oA(t)}),e(" parentDummyChains",function(){xS(t)}),e(" addBorderSegments",function(){X9(t)}),e(" order",function(){bS(t)}),e(" insertSelfEdges",function(){sA(t)}),e(" adjustCoordinateSystem",function(){K9(t)}),e(" position",function(){RS(t)}),e(" positionSelfEdges",function(){aA(t)}),e(" removeBorderNodes",function(){iA(t)}),e(" normalize.undo",function(){cA(t)}),e(" fixupEdgeLabelCoords",function(){eA(t)}),e(" undoCoordinateSystem",function(){Z9(t)}),e(" translateGraph",function(){JS(t)}),e(" assignNodeIntersects",function(){tA(t)}),e(" reversePoints",function(){rA(t)}),e(" acyclic.undo",function(){z9(t)})}function YS(t,e){kt(t.nodes(),function(r){var i=t.node(r),n=e.node(r);i&&(i.x=n.x,i.y=n.y,e.children(r).length&&(i.width=n.width,i.height=n.height))}),kt(t.edges(),function(r){var i=t.edge(r),n=e.edge(r);i.points=n.points,_e(n,"x")&&(i.x=n.x,i.y=n.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}var VS=["nodesep","edgesep","ranksep","marginx","marginy"],US={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},zS=["acyclicer","ranker","rankdir","align"],WS=["width","height"],HS={width:0,height:0},GS=["minlen","weight","width","height","labeloffset"],qS={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},jS=["labelpos"];function $S(t){var e=new or({multigraph:!0,compound:!0}),r=bh(t.graph());return e.setGraph(n1({},US,mh(r,VS),Eo(r,zS))),kt(t.nodes(),function(i){var n=bh(t.node(i));e.setNode(i,Vs(mh(n,WS),HS)),e.setParent(i,t.parent(i))}),kt(t.edges(),function(i){var n=bh(t.edge(i));e.setEdge(i,n1({},qS,mh(n,GS),Eo(n,jS)))}),e}function XS(t){var e=t.graph();e.ranksep/=2,kt(t.edges(),function(r){var i=t.edge(r);i.minlen*=2,i.labelpos.toLowerCase()!=="c"&&(e.rankdir==="TB"||e.rankdir==="BT"?i.width+=i.labeloffset:i.height+=i.labeloffset)})}function KS(t){kt(t.edges(),function(e){var r=t.edge(e);if(r.width&&r.height){var i=t.node(e.v),n=t.node(e.w),s={rank:(n.rank-i.rank)/2+i.rank,e};Da(t,"edge-proxy",s,"_ep")}})}function ZS(t){var e=0;kt(t.nodes(),function(r){var i=t.node(r);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,e=_s(e,i.maxRank))}),t.graph().maxRank=e}function QS(t){kt(t.nodes(),function(e){var r=t.node(e);r.dummy==="edge-proxy"&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}function JS(t){var e=Number.POSITIVE_INFINITY,r=0,i=Number.POSITIVE_INFINITY,n=0,s=t.graph(),a=s.marginx||0,o=s.marginy||0;function l(u){var d=u.x,f=u.y,p=u.width,g=u.height;e=Math.min(e,d-p/2),r=Math.max(r,d+p/2),i=Math.min(i,f-g/2),n=Math.max(n,f+g/2)}kt(t.nodes(),function(u){l(t.node(u))}),kt(t.edges(),function(u){var d=t.edge(u);_e(d,"x")&&l(d)}),e-=a,i-=o,kt(t.nodes(),function(u){var d=t.node(u);d.x-=e,d.y-=i}),kt(t.edges(),function(u){var d=t.edge(u);kt(d.points,function(f){f.x-=e,f.y-=i}),_e(d,"x")&&(d.x-=e),_e(d,"y")&&(d.y-=i)}),s.width=r-e+a,s.height=n-i+o}function tA(t){kt(t.edges(),function(e){var r=t.edge(e),i=t.node(e.v),n=t.node(e.w),s,a;r.points?(s=r.points[0],a=r.points[r.points.length-1]):(r.points=[],s=n,a=i),r.points.unshift(d2(i,s)),r.points.push(d2(n,a))})}function eA(t){kt(t.edges(),function(e){var r=t.edge(e);if(_e(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function rA(t){kt(t.edges(),function(e){var r=t.edge(e);r.reversed&&r.points.reverse()})}function iA(t){kt(t.nodes(),function(e){if(t.children(e).length){var r=t.node(e),i=t.node(r.borderTop),n=t.node(r.borderBottom),s=t.node(bc(r.borderLeft)),a=t.node(bc(r.borderRight));r.width=Math.abs(a.x-s.x),r.height=Math.abs(n.y-i.y),r.x=s.x+r.width/2,r.y=i.y+r.height/2}}),kt(t.nodes(),function(e){t.node(e).dummy==="border"&&t.removeNode(e)})}function nA(t){kt(t.edges(),function(e){if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}})}function sA(t){var e=bu(t);kt(e,function(r){var i=0;kt(r,function(n,s){var a=t.node(n);a.order=s+i,kt(a.selfEdges,function(o){Da(t,"selfedge",{width:o.label.width,height:o.label.height,rank:a.rank,order:s+ ++i,e:o.e,label:o.label},"_se")}),delete a.selfEdges})})}function aA(t){kt(t.nodes(),function(e){var r=t.node(e);if(r.dummy==="selfedge"){var i=t.node(r.e.v),n=i.x+i.width/2,s=i.y,a=r.x-n,o=i.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:n+2*a/3,y:s-o},{x:n+5*a/6,y:s-o},{x:n+a,y:s},{x:n+5*a/6,y:s+o},{x:n+2*a/3,y:s+o}],r.label.x=r.x,r.label.y=r.y}})}function mh(t,e){return yu(Eo(t,e),Number)}function bh(t){var e={};return kt(t,function(r,i){e[i.toLowerCase()]=r}),e}function oA(t){t.graph().dummyChains=[],kt(t.edges(),function(e){lA(t,e)})}function lA(t,e){var r=e.v,i=t.node(r).rank,n=e.w,s=t.node(n).rank,a=e.name,o=t.edge(e),l=o.labelRank;if(s!==i+1){t.removeEdge(e);var u,d,f;for(f=0,++i;i<s;++f,++i)o.points=[],d={width:0,height:0,edgeLabel:o,edgeObj:e,rank:i},u=Da(t,"edge",d,"_d"),i===l&&(d.width=o.width,d.height=o.height,d.dummy="edge-label",d.labelpos=o.labelpos),t.setEdge(r,u,{weight:o.weight},a),f===0&&t.graph().dummyChains.push(u),r=u;t.setEdge(r,n,{weight:o.weight},a)}}function cA(t){kt(t.graph().dummyChains,function(e){var r=t.node(e),i=r.edgeLabel,n;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)})}function _0(t){var e={};function r(i){var n=t.node(i);if(_e(e,i))return n.rank;e[i]=!0;var s=To(sr(t.outEdges(i),function(a){return r(a.w)-t.edge(a).minlen}));return(s===Number.POSITIVE_INFINITY||s===void 0||s===null)&&(s=0),n.rank=s}kt(t.sources(),r)}function Co(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}function Sy(t){var e=new or({directed:!1}),r=t.nodes()[0],i=t.nodeCount();e.setNode(r,{});for(var n,s;uA(e,t)<i;)n=hA(e,t),s=e.hasNode(n.v)?Co(t,n):-Co(t,n),dA(e,t,s);return e}function uA(t,e){function r(i){kt(e.nodeEdges(i),function(n){var s=n.v,a=i===s?n.w:s;!t.hasNode(a)&&!Co(e,n)&&(t.setNode(a,{}),t.setEdge(i,a,{}),r(a))})}return kt(t.nodes(),r),t.nodeCount()}function hA(t,e){return b0(e.edges(),function(r){if(t.hasNode(r.v)!==t.hasNode(r.w))return Co(e,r)})}function dA(t,e,r){kt(t.nodes(),function(i){e.node(i).rank+=r})}function fA(){}fA.prototype=new Error;function Ay(t,e,r){ar(e)||(e=[e]);var i=(t.isDirected()?t.successors:t.neighbors).bind(t),n=[],s={};return kt(e,function(a){if(!t.hasNode(a))throw new Error("Graph does not have node: "+a);Ly(t,a,r==="post",s,i,n)}),n}function Ly(t,e,r,i,n,s){_e(i,e)||(i[e]=!0,r||s.push(e),kt(n(e),function(a){Ly(t,a,r,i,n,s)}),r&&s.push(e))}function pA(t,e){return Ay(t,e,"post")}function gA(t,e){return Ay(t,e,"pre")}Bs.initLowLimValues=v0;Bs.initCutValues=x0;Bs.calcCutValue=Dy;Bs.leaveEdge=Ny;Bs.enterEdge=By;Bs.exchangeEdges=Iy;function Bs(t){t=W9(t),_0(t);var e=Sy(t);v0(e),x0(e,t);for(var r,i;r=Ny(e);)i=By(e,t,r),Iy(e,t,r,i)}function x0(t,e){var r=pA(t,t.nodes());r=r.slice(0,r.length-1),kt(r,function(i){yA(t,e,i)})}function yA(t,e,r){var i=t.node(r),n=i.parent;t.edge(r,n).cutvalue=Dy(t,e,r)}function Dy(t,e,r){var i=t.node(r),n=i.parent,s=!0,a=e.edge(r,n),o=0;return a||(s=!1,a=e.edge(n,r)),o=a.weight,kt(e.nodeEdges(r),function(l){var u=l.v===r,d=u?l.w:l.v;if(d!==n){var f=u===s,p=e.edge(l).weight;if(o+=f?p:-p,bA(t,r,d)){var g=t.edge(r,d).cutvalue;o+=f?-g:g}}}),o}function v0(t,e){arguments.length<2&&(e=t.nodes()[0]),My(t,{},1,e)}function My(t,e,r,i,n){var s=r,a=t.node(i);return e[i]=!0,kt(t.neighbors(i),function(o){_e(e,o)||(r=My(t,e,r,o,i))}),a.low=s,a.lim=r++,n?a.parent=n:delete a.parent,r}function Ny(t){return y0(t.edges(),function(e){return t.edge(e).cutvalue<0})}function By(t,e,r){var i=r.v,n=r.w;e.hasEdge(i,n)||(i=r.w,n=r.v);var s=t.node(i),a=t.node(n),o=s,l=!1;s.lim>a.lim&&(o=a,l=!0);var u=dn(e.edges(),function(d){return l===_2(t,t.node(d.v),o)&&l!==_2(t,t.node(d.w),o)});return b0(u,function(d){return Co(e,d)})}function Iy(t,e,r,i){var n=r.v,s=r.w;t.removeEdge(n,s),t.setEdge(i.v,i.w,{}),v0(t),x0(t,e),mA(t,e)}function mA(t,e){var r=y0(t.nodes(),function(n){return!e.node(n).parent}),i=gA(t,r);i=i.slice(1),kt(i,function(n){var s=t.node(n).parent,a=e.edge(n,s),o=!1;a||(a=e.edge(s,n),o=!0),e.node(n).rank=e.node(s).rank+(o?a.minlen:-a.minlen)})}function bA(t,e,r){return t.hasEdge(e,r)}function _2(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}function _A(t){switch(t.graph().ranker){case"network-simplex":x2(t);break;case"tight-tree":vA(t);break;case"longest-path":xA(t);break;default:x2(t)}}var xA=_0;function vA(t){_0(t),Sy(t)}function x2(t){Bs(t)}function fn(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:kA(t),edges:wA(t)};return Ze(t.graph())||(e.value=GE(t.graph())),e}function kA(t){return sr(t.nodes(),function(e){var r=t.node(e),i=t.parent(e),n={v:e};return Ze(r)||(n.value=r),Ze(i)||(n.parent=i),n})}function wA(t){return sr(t.edges(),function(e){var r=t.edge(e),i={v:e.v,w:e.w};return Ze(e.name)||(i.name=e.name),Ze(r)||(i.value=r),i})}let kl;const TA=new Uint8Array(16);function EA(){if(!kl&&(kl=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!kl))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return kl(TA)}const br=[];for(let t=0;t<256;++t)br.push((t+256).toString(16).slice(1));function CA(t,e=0){return(br[t[e+0]]+br[t[e+1]]+br[t[e+2]]+br[t[e+3]]+"-"+br[t[e+4]]+br[t[e+5]]+"-"+br[t[e+6]]+br[t[e+7]]+"-"+br[t[e+8]]+br[t[e+9]]+"-"+br[t[e+10]]+br[t[e+11]]+br[t[e+12]]+br[t[e+13]]+br[t[e+14]]+br[t[e+15]]).toLowerCase()}const SA=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),v2={randomUUID:SA};function AA(t,e,r){if(v2.randomUUID&&!e&&!t)return v2.randomUUID();t=t||{};const i=t.random||(t.rng||EA)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){r=r||0;for(let n=0;n<16;++n)e[r+n]=i[n];return e}return CA(i)}function Oy(t,e){return!!t.children(e).length}function Ry(t){return _h(t.v)+":"+_h(t.w)+":"+_h(t.name)}var LA=/:/g;function _h(t){return t?String(t).replace(LA,"\\:"):""}function Gi(t,e){e&&t.attr("style",e)}function Fy(t,e,r){e&&t.attr("class",e).attr("class",r+" "+t.attr("class"))}function xi(t,e){var r=e.graph();if(Kg(r)){var i=r.transition;if(ha(i))return i(t)}return t}var a1={normal:MA,vee:NA,undirected:BA};function DA(t){a1=t}function MA(t,e,r,i){var n=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=n.append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");Gi(s,r[i+"Style"]),r[i+"Class"]&&s.attr("class",r[i+"Class"])}function NA(t,e,r,i){var n=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=n.append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");Gi(s,r[i+"Style"]),r[i+"Class"]&&s.attr("class",r[i+"Class"])}function BA(t,e,r,i){var n=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=n.append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");Gi(s,r[i+"Style"]),r[i+"Class"]&&s.attr("class",r[i+"Class"])}function k0(t,e){var r=t.append("foreignObject").attr("width","100000"),i=r.append("xhtml:div");i.attr("xmlns","http://www.w3.org/1999/xhtml");var n=e.label;switch(typeof n){case"function":i.insert(n);break;case"object":i.insert(function(){return n});break;default:i.html(n)}Gi(i,e.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap");var s=i.node().getBoundingClientRect();return r.attr("width",s.width).attr("height",s.height),r}function IA(t,e){var r=t;return r.node().appendChild(e.label),Gi(r,e.labelStyle),r}function OA(t,e){for(var r=t.append("text"),i=RA(e.label).split(`
|
|
4
|
+
`+new Error().stack),x=!1}return y.apply(this,arguments)},y)}var N={};function M(h,y){i.deprecationHandler!=null&&i.deprecationHandler(h,y),N[h]||(z(y),N[h]=!0)}function C(h){return typeof Function<"u"&&h instanceof Function||Object.prototype.toString.call(h)==="[object Function]"}function v(h,y){var x,E=p({},h);for(x in y)a(y,x)&&(s(h[x])&&s(y[x])?(E[x]={},p(E[x],h[x]),p(E[x],y[x])):y[x]!=null?E[x]=y[x]:delete E[x]);for(x in h)a(h,x)&&!a(y,x)&&s(h[x])&&(E[x]=p({},E[x]));return E}function D(h){h!=null&&this.set(h)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null;var m=Object.keys||function(h){var y,x=[];for(y in h)a(h,y)&&x.push(y);return x};function Q(h,y,x){var E=""+Math.abs(h);return(0<=h?x?"+":"":"-")+Math.pow(10,Math.max(0,y-E.length)).toString().substr(1)+E}var b=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,ct=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,Dt={},vt={};function j(h,y,x,E){var R=typeof E=="string"?function(){return this[E]()}:E;h&&(vt[h]=R),y&&(vt[y[0]]=function(){return Q(R.apply(this,arguments),y[1],y[2])}),x&&(vt[x]=function(){return this.localeData().ordinal(R.apply(this,arguments),h)})}function ot(h,y){return h.isValid()?(y=rt(y,h.localeData()),Dt[y]=Dt[y]||function(x){for(var E,R=x.match(b),nt=0,yt=R.length;nt<yt;nt++)vt[R[nt]]?R[nt]=vt[R[nt]]:R[nt]=(E=R[nt]).match(/\[[\s\S]/)?E.replace(/^\[|\]$/g,""):E.replace(/\\/g,"");return function(Ct){for(var Pt="",It=0;It<yt;It++)Pt+=C(R[It])?R[It].call(Ct,x):R[It];return Pt}}(y),Dt[y](h)):h.localeData().invalidDate()}function rt(h,y){var x=5;function E(R){return y.longDateFormat(R)||R}for(ct.lastIndex=0;0<=x&&ct.test(h);)h=h.replace(ct,E),ct.lastIndex=0,--x;return h}var it={};function ut(h,y){var x=h.toLowerCase();it[x]=it[x+"s"]=it[y]=h}function bt(h){return typeof h=="string"?it[h]||it[h.toLowerCase()]:void 0}function K(h){var y,x,E={};for(x in h)a(h,x)&&(y=bt(x))&&(E[y]=h[x]);return E}var Ot={};function Y(h,y){Ot[h]=y}function U(h){return h%4==0&&h%100!=0||h%400==0}function X(h){return h<0?Math.ceil(h)||0:Math.floor(h)}function F(y){var y=+y,x=0;return x=y!=0&&isFinite(y)?X(y):x}function I(h,y){return function(x){return x!=null?(J(this,h,x),i.updateOffset(this,y),this):L(this,h)}}function L(h,y){return h.isValid()?h._d["get"+(h._isUTC?"UTC":"")+y]():NaN}function J(h,y,x){h.isValid()&&!isNaN(x)&&(y==="FullYear"&&U(h.year())&&h.month()===1&&h.date()===29?(x=F(x),h._d["set"+(h._isUTC?"UTC":"")+y](x,h.month(),dt(x,h.month()))):h._d["set"+(h._isUTC?"UTC":"")+y](x))}var T=/\d/,ce=/\d\d/,ht=/\d{3}/,es=/\d{4}/,In=/[+-]?\d{6}/,V=/\d\d?/,Yt=/\d\d\d\d?/,et=/\d\d\d\d\d\d?/,Mt=/\d{1,3}/,On=/\d{1,4}/,Bn=/[+-]?\d{1,6}/,Tt=/\d+/,gt=/[+-]?\d+/,Et=/Z|[+-]\d\d:?\d\d/gi,wt=/Z|[+-]\d\d(?::?\d\d)?/gi,pt=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function st(h,y,x){jt[h]=C(y)?y:function(E,R){return E&&x?x:y}}function le(h,y){return a(jt,h)?jt[h](y._strict,y._locale):new RegExp(Xt(h.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(x,E,R,nt,yt){return E||R||nt||yt})))}function Xt(h){return h.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var jt={},Kt={};function Gt(h,y){var x,E,R=y;for(typeof h=="string"&&(h=[h]),u(y)&&(R=function(nt,yt){yt[y]=F(nt)}),E=h.length,x=0;x<E;x++)Kt[h[x]]=R}function Ee(h,y){Gt(h,function(x,E,R,nt){R._w=R._w||{},y(x,R._w,R,nt)})}var Ht,Vt=0,Ft=1,xt=2,ft=3,Lt=4,_t=5,Ut=6,at=7,ie=8;function dt(h,y){if(isNaN(h)||isNaN(y))return NaN;var x=(y%(x=12)+x)%x;return h+=(y-x)/12,x==1?U(h)?29:28:31-x%7%2}Ht=Array.prototype.indexOf||function(h){for(var y=0;y<this.length;++y)if(this[y]===h)return y;return-1},j("M",["MM",2],"Mo",function(){return this.month()+1}),j("MMM",0,0,function(h){return this.localeData().monthsShort(this,h)}),j("MMMM",0,0,function(h){return this.localeData().months(this,h)}),ut("month","M"),Y("month",8),st("M",V),st("MM",V,ce),st("MMM",function(h,y){return y.monthsShortRegex(h)}),st("MMMM",function(h,y){return y.monthsRegex(h)}),Gt(["M","MM"],function(h,y){y[Ft]=F(h)-1}),Gt(["MMM","MMMM"],function(h,y,x,E){E=x._locale.monthsParse(h,E,x._strict),E!=null?y[Ft]=E:_(x).invalidMonth=h});var ee="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),de="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),me=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,be=pt,ke=pt;function $t(h,y){var x;if(h.isValid()){if(typeof y=="string"){if(/^\d+$/.test(y))y=F(y);else if(!u(y=h.localeData().monthsParse(y)))return}x=Math.min(h.date(),dt(h.year(),y)),h._d["set"+(h._isUTC?"UTC":"")+"Month"](y,x)}}function ne(h){return h!=null?($t(this,h),i.updateOffset(this,!0),this):L(this,"Month")}function ge(){function h(yt,Ct){return Ct.length-yt.length}for(var y,x=[],E=[],R=[],nt=0;nt<12;nt++)y=g([2e3,nt]),x.push(this.monthsShort(y,"")),E.push(this.months(y,"")),R.push(this.months(y,"")),R.push(this.monthsShort(y,""));for(x.sort(h),E.sort(h),R.sort(h),nt=0;nt<12;nt++)x[nt]=Xt(x[nt]),E[nt]=Xt(E[nt]);for(nt=0;nt<24;nt++)R[nt]=Xt(R[nt]);this._monthsRegex=new RegExp("^("+R.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+E.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+x.join("|")+")","i")}function Qt(h){return U(h)?366:365}j("Y",0,0,function(){var h=this.year();return h<=9999?Q(h,4):"+"+h}),j(0,["YY",2],0,function(){return this.year()%100}),j(0,["YYYY",4],0,"year"),j(0,["YYYYY",5],0,"year"),j(0,["YYYYYY",6,!0],0,"year"),ut("year","y"),Y("year",1),st("Y",gt),st("YY",V,ce),st("YYYY",On,es),st("YYYYY",Bn,In),st("YYYYYY",Bn,In),Gt(["YYYYY","YYYYYY"],Vt),Gt("YYYY",function(h,y){y[Vt]=h.length===2?i.parseTwoDigitYear(h):F(h)}),Gt("YY",function(h,y){y[Vt]=i.parseTwoDigitYear(h)}),Gt("Y",function(h,y){y[Vt]=parseInt(h,10)}),i.parseTwoDigitYear=function(h){return F(h)+(68<F(h)?1900:2e3)};var cl=I("FullYear",!0);function ni(h,y,x,E,R,nt,yt){var Ct;return h<100&&0<=h?(Ct=new Date(h+400,y,x,E,R,nt,yt),isFinite(Ct.getFullYear())&&Ct.setFullYear(h)):Ct=new Date(h,y,x,E,R,nt,yt),Ct}function zr(h){var y;return h<100&&0<=h?((y=Array.prototype.slice.call(arguments))[0]=h+400,y=new Date(Date.UTC.apply(null,y)),isFinite(y.getUTCFullYear())&&y.setUTCFullYear(h)):y=new Date(Date.UTC.apply(null,arguments)),y}function De(h,y,x){return x=7+y-x,x-(7+zr(h,0,x).getUTCDay()-y)%7-1}function ae(h,yt,Ct,E,R){var nt,yt=1+7*(yt-1)+(7+Ct-E)%7+De(h,E,R),Ct=yt<=0?Qt(nt=h-1)+yt:yt>Qt(h)?(nt=h+1,yt-Qt(h)):(nt=h,yt);return{year:nt,dayOfYear:Ct}}function Be(h,y,x){var E,R,nt=De(h.year(),y,x),nt=Math.floor((h.dayOfYear()-nt-1)/7)+1;return nt<1?E=nt+Oe(R=h.year()-1,y,x):nt>Oe(h.year(),y,x)?(E=nt-Oe(h.year(),y,x),R=h.year()+1):(R=h.year(),E=nt),{week:E,year:R}}function Oe(h,R,x){var E=De(h,R,x),R=De(h+1,R,x);return(Qt(h)-E+R)/7}j("w",["ww",2],"wo","week"),j("W",["WW",2],"Wo","isoWeek"),ut("week","w"),ut("isoWeek","W"),Y("week",5),Y("isoWeek",5),st("w",V),st("ww",V,ce),st("W",V),st("WW",V,ce),Ee(["w","ww","W","WW"],function(h,y,x,E){y[E.substr(0,1)]=F(h)});function Fe(h,y){return h.slice(y,7).concat(h.slice(0,y))}j("d",0,"do","day"),j("dd",0,0,function(h){return this.localeData().weekdaysMin(this,h)}),j("ddd",0,0,function(h){return this.localeData().weekdaysShort(this,h)}),j("dddd",0,0,function(h){return this.localeData().weekdays(this,h)}),j("e",0,0,"weekday"),j("E",0,0,"isoWeekday"),ut("day","d"),ut("weekday","e"),ut("isoWeekday","E"),Y("day",11),Y("weekday",11),Y("isoWeekday",11),st("d",V),st("e",V),st("E",V),st("dd",function(h,y){return y.weekdaysMinRegex(h)}),st("ddd",function(h,y){return y.weekdaysShortRegex(h)}),st("dddd",function(h,y){return y.weekdaysRegex(h)}),Ee(["dd","ddd","dddd"],function(h,y,x,E){E=x._locale.weekdaysParse(h,E,x._strict),E!=null?y.d=E:_(x).invalidWeekday=h}),Ee(["d","e","E"],function(h,y,x,E){y[E]=F(h)});var Pe="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Ie="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Ge="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),tr=pt,zt=pt,Z=pt;function St(){function h(It,ue){return ue.length-It.length}for(var y,x,E,R=[],nt=[],yt=[],Ct=[],Pt=0;Pt<7;Pt++)E=g([2e3,1]).day(Pt),y=Xt(this.weekdaysMin(E,"")),x=Xt(this.weekdaysShort(E,"")),E=Xt(this.weekdays(E,"")),R.push(y),nt.push(x),yt.push(E),Ct.push(y),Ct.push(x),Ct.push(E);R.sort(h),nt.sort(h),yt.sort(h),Ct.sort(h),this._weekdaysRegex=new RegExp("^("+Ct.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+yt.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+nt.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+R.join("|")+")","i")}function Nt(){return this.hours()%12||12}function fe(h,y){j(h,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),y)})}function Me(h,y){return y._meridiemParse}j("H",["HH",2],0,"hour"),j("h",["hh",2],0,Nt),j("k",["kk",2],0,function(){return this.hours()||24}),j("hmm",0,0,function(){return""+Nt.apply(this)+Q(this.minutes(),2)}),j("hmmss",0,0,function(){return""+Nt.apply(this)+Q(this.minutes(),2)+Q(this.seconds(),2)}),j("Hmm",0,0,function(){return""+this.hours()+Q(this.minutes(),2)}),j("Hmmss",0,0,function(){return""+this.hours()+Q(this.minutes(),2)+Q(this.seconds(),2)}),fe("a",!0),fe("A",!1),ut("hour","h"),Y("hour",13),st("a",Me),st("A",Me),st("H",V),st("h",V),st("k",V),st("HH",V,ce),st("hh",V,ce),st("kk",V,ce),st("hmm",Yt),st("hmmss",et),st("Hmm",Yt),st("Hmmss",et),Gt(["H","HH"],ft),Gt(["k","kk"],function(h,y,x){h=F(h),y[ft]=h===24?0:h}),Gt(["a","A"],function(h,y,x){x._isPm=x._locale.isPM(h),x._meridiem=h}),Gt(["h","hh"],function(h,y,x){y[ft]=F(h),_(x).bigHour=!0}),Gt("hmm",function(h,y,x){var E=h.length-2;y[ft]=F(h.substr(0,E)),y[Lt]=F(h.substr(E)),_(x).bigHour=!0}),Gt("hmmss",function(h,y,x){var E=h.length-4,R=h.length-2;y[ft]=F(h.substr(0,E)),y[Lt]=F(h.substr(E,2)),y[_t]=F(h.substr(R)),_(x).bigHour=!0}),Gt("Hmm",function(h,y,x){var E=h.length-2;y[ft]=F(h.substr(0,E)),y[Lt]=F(h.substr(E))}),Gt("Hmmss",function(h,y,x){var E=h.length-4,R=h.length-2;y[ft]=F(h.substr(0,E)),y[Lt]=F(h.substr(E,2)),y[_t]=F(h.substr(R))}),pt=I("Hours",!0);var Le,We={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{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"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:ee,monthsShort:de,week:{dow:0,doy:6},weekdays:Pe,weekdaysMin:Ge,weekdaysShort:Ie,meridiemParse:/[ap]\.?m?\.?/i},xe={},Ne={};function Dn(h){return h&&h.toLowerCase().replace("_","-")}function Mn(h){for(var y,x,E,R,nt=0;nt<h.length;){for(y=(R=Dn(h[nt]).split("-")).length,x=(x=Dn(h[nt+1]))?x.split("-"):null;0<y;){if(E=Or(R.slice(0,y).join("-")))return E;if(x&&x.length>=y&&function(yt,Ct){for(var Pt=Math.min(yt.length,Ct.length),It=0;It<Pt;It+=1)if(yt[It]!==Ct[It])return It;return Pt}(R,x)>=y-1)break;y--}nt++}return Le}function Or(h){var y;if(xe[h]===void 0&&t&&t.exports&&h.match("^[^/\\\\]*$")!=null)try{y=Le._abbr,ab("./locale/"+h),qt(y)}catch{xe[h]=null}return xe[h]}function qt(h,y){return h&&((y=l(y)?oe(h):te(h,y))?Le=y:typeof console<"u"&&console.warn&&console.warn("Locale "+h+" not found. Did you forget to load it?")),Le._abbr}function te(h,y){if(y===null)return delete xe[h],null;var x,E=We;if(y.abbr=h,xe[h]!=null)M("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),E=xe[h]._config;else if(y.parentLocale!=null)if(xe[y.parentLocale]!=null)E=xe[y.parentLocale]._config;else{if((x=Or(y.parentLocale))==null)return Ne[y.parentLocale]||(Ne[y.parentLocale]=[]),Ne[y.parentLocale].push({name:h,config:y}),null;E=x._config}return xe[h]=new D(v(E,y)),Ne[h]&&Ne[h].forEach(function(R){te(R.name,R.config)}),qt(h),xe[h]}function oe(h){var y;if(!(h=h&&h._locale&&h._locale._abbr?h._locale._abbr:h))return Le;if(!n(h)){if(y=Or(h))return y;h=[h]}return Mn(h)}function Rt(h){var y=h._a;return y&&_(h).overflow===-2&&(y=y[Ft]<0||11<y[Ft]?Ft:y[xt]<1||y[xt]>dt(y[Vt],y[Ft])?xt:y[ft]<0||24<y[ft]||y[ft]===24&&(y[Lt]!==0||y[_t]!==0||y[Ut]!==0)?ft:y[Lt]<0||59<y[Lt]?Lt:y[_t]<0||59<y[_t]?_t:y[Ut]<0||999<y[Ut]?Ut:-1,_(h)._overflowDayOfYear&&(y<Vt||xt<y)&&(y=xt),_(h)._overflowWeeks&&y===-1&&(y=at),_(h)._overflowWeekday&&y===-1&&(y=ie),_(h).overflow=y),h}var Ye=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,G=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Zn=/Z|[+-]\d\d(?::?\d\d)?/,tt=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],xr=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],rl=/^\/?Date\((-?\d+)/i,Ru=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,il={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function nl(h){var y,x,E,R,nt,yt,Pt=h._i,Ct=Ye.exec(Pt)||G.exec(Pt),Pt=tt.length,It=xr.length;if(Ct){for(_(h).iso=!0,y=0,x=Pt;y<x;y++)if(tt[y][1].exec(Ct[1])){R=tt[y][0],E=tt[y][2]!==!1;break}if(R==null)h._isValid=!1;else{if(Ct[3]){for(y=0,x=It;y<x;y++)if(xr[y][1].exec(Ct[3])){nt=(Ct[2]||" ")+xr[y][0];break}if(nt==null)return void(h._isValid=!1)}if(E||nt==null){if(Ct[4]){if(!Zn.exec(Ct[4]))return void(h._isValid=!1);yt="Z"}h._f=R+(nt||"")+(yt||""),Ba(h)}else h._isValid=!1}}else h._isValid=!1}function er(h,y,x,E,R,nt){return h=[function(yt){yt=parseInt(yt,10);{if(yt<=49)return 2e3+yt;if(yt<=999)return 1900+yt}return yt}(h),de.indexOf(y),parseInt(x,10),parseInt(E,10),parseInt(R,10)],nt&&h.push(parseInt(nt,10)),h}function Di(h){var y,x,E,R,nt=Ru.exec(h._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));nt?(y=er(nt[4],nt[3],nt[2],nt[5],nt[6],nt[7]),x=nt[1],E=y,R=h,x&&Ie.indexOf(x)!==new Date(E[0],E[1],E[2]).getDay()?(_(R).weekdayMismatch=!0,R._isValid=!1):(h._a=y,h._tzm=(x=nt[8],E=nt[9],R=nt[10],x?il[x]:E?0:60*(((x=parseInt(R,10))-(E=x%100))/100)+E),h._d=zr.apply(null,h._a),h._d.setUTCMinutes(h._d.getUTCMinutes()-h._tzm),_(h).rfc2822=!0)):h._isValid=!1}function Mi(h,y,x){return h??y??x}function Qn(h){var y,x,E,R,nt,yt,Ct,Pt,It,ue,re,He=[];if(!h._d){for(E=h,R=new Date(i.now()),x=E._useUTC?[R.getUTCFullYear(),R.getUTCMonth(),R.getUTCDate()]:[R.getFullYear(),R.getMonth(),R.getDate()],h._w&&h._a[xt]==null&&h._a[Ft]==null&&((R=(E=h)._w).GG!=null||R.W!=null||R.E!=null?(Pt=1,It=4,nt=Mi(R.GG,E._a[Vt],Be(Se(),1,4).year),yt=Mi(R.W,1),((Ct=Mi(R.E,1))<1||7<Ct)&&(ue=!0)):(Pt=E._locale._week.dow,It=E._locale._week.doy,re=Be(Se(),Pt,It),nt=Mi(R.gg,E._a[Vt],re.year),yt=Mi(R.w,re.week),R.d!=null?((Ct=R.d)<0||6<Ct)&&(ue=!0):R.e!=null?(Ct=R.e+Pt,(R.e<0||6<R.e)&&(ue=!0)):Ct=Pt),yt<1||yt>Oe(nt,Pt,It)?_(E)._overflowWeeks=!0:ue!=null?_(E)._overflowWeekday=!0:(re=ae(nt,yt,Ct,Pt,It),E._a[Vt]=re.year,E._dayOfYear=re.dayOfYear)),h._dayOfYear!=null&&(R=Mi(h._a[Vt],x[Vt]),(h._dayOfYear>Qt(R)||h._dayOfYear===0)&&(_(h)._overflowDayOfYear=!0),ue=zr(R,0,h._dayOfYear),h._a[Ft]=ue.getUTCMonth(),h._a[xt]=ue.getUTCDate()),y=0;y<3&&h._a[y]==null;++y)h._a[y]=He[y]=x[y];for(;y<7;y++)h._a[y]=He[y]=h._a[y]==null?y===2?1:0:h._a[y];h._a[ft]===24&&h._a[Lt]===0&&h._a[_t]===0&&h._a[Ut]===0&&(h._nextDay=!0,h._a[ft]=0),h._d=(h._useUTC?zr:ni).apply(null,He),nt=h._useUTC?h._d.getUTCDay():h._d.getDay(),h._tzm!=null&&h._d.setUTCMinutes(h._d.getUTCMinutes()-h._tzm),h._nextDay&&(h._a[ft]=24),h._w&&h._w.d!==void 0&&h._w.d!==nt&&(_(h).weekdayMismatch=!0)}}function Ba(h){if(h._f===i.ISO_8601)nl(h);else if(h._f===i.RFC_2822)Di(h);else{h._a=[],_(h).empty=!0;for(var y,x,E,R,nt,yt=""+h._i,Ct=yt.length,Pt=0,It=rt(h._f,h._locale).match(b)||[],ue=It.length,re=0;re<ue;re++)x=It[re],(y=(yt.match(le(x,h))||[])[0])&&(0<(E=yt.substr(0,yt.indexOf(y))).length&&_(h).unusedInput.push(E),yt=yt.slice(yt.indexOf(y)+y.length),Pt+=y.length),vt[x]?(y?_(h).empty=!1:_(h).unusedTokens.push(x),E=x,nt=h,(R=y)!=null&&a(Kt,E)&&Kt[E](R,nt._a,nt,E)):h._strict&&!y&&_(h).unusedTokens.push(x);_(h).charsLeftOver=Ct-Pt,0<yt.length&&_(h).unusedInput.push(yt),h._a[ft]<=12&&_(h).bigHour===!0&&0<h._a[ft]&&(_(h).bigHour=void 0),_(h).parsedDateParts=h._a.slice(0),_(h).meridiem=h._meridiem,h._a[ft]=function(He,rr,oi){return oi==null?rr:He.meridiemHour!=null?He.meridiemHour(rr,oi):He.isPM!=null?((He=He.isPM(oi))&&rr<12&&(rr+=12),rr=He||rr!==12?rr:0):rr}(h._locale,h._a[ft],h._meridiem),(Ct=_(h).era)!==null&&(h._a[Vt]=h._locale.erasConvertYear(Ct,h._a[Vt])),Qn(h),Rt(h)}}function sl(h){var y,x,E,R=h._i,nt=h._f;return h._locale=h._locale||oe(h._l),R===null||nt===void 0&&R===""?w({nullInput:!0}):(typeof R=="string"&&(h._i=R=h._locale.preparse(R)),q(R)?new W(Rt(R)):(d(R)?h._d=R:n(nt)?function(yt){var Ct,Pt,It,ue,re,He,rr=!1,oi=yt._f.length;if(oi===0)return _(yt).invalidFormat=!0,yt._d=new Date(NaN);for(ue=0;ue<oi;ue++)re=0,He=!1,Ct=P({},yt),yt._useUTC!=null&&(Ct._useUTC=yt._useUTC),Ct._f=yt._f[ue],Ba(Ct),k(Ct)&&(He=!0),re=(re+=_(Ct).charsLeftOver)+10*_(Ct).unusedTokens.length,_(Ct).score=re,rr?re<It&&(It=re,Pt=Ct):(It==null||re<It||He)&&(It=re,Pt=Ct,He&&(rr=!0));p(yt,Pt||Ct)}(h):nt?Ba(h):l(nt=(R=h)._i)?R._d=new Date(i.now()):d(nt)?R._d=new Date(nt.valueOf()):typeof nt=="string"?(x=R,(y=rl.exec(x._i))!==null?x._d=new Date(+y[1]):(nl(x),x._isValid===!1&&(delete x._isValid,Di(x),x._isValid===!1&&(delete x._isValid,x._strict?x._isValid=!1:i.createFromInputFallback(x))))):n(nt)?(R._a=f(nt.slice(0),function(yt){return parseInt(yt,10)}),Qn(R)):s(nt)?(y=R)._d||(E=(x=K(y._i)).day===void 0?x.date:x.day,y._a=f([x.year,x.month,E,x.hour,x.minute,x.second,x.millisecond],function(yt){return yt&&parseInt(yt,10)}),Qn(y)):u(nt)?R._d=new Date(nt):i.createFromInputFallback(R),k(h)||(h._d=null),h))}function mr(h,y,x,E,R){var nt={};return y!==!0&&y!==!1||(E=y,y=void 0),x!==!0&&x!==!1||(E=x,x=void 0),(s(h)&&o(h)||n(h)&&h.length===0)&&(h=void 0),nt._isAMomentObject=!0,nt._useUTC=nt._isUTC=R,nt._l=x,nt._i=h,nt._f=y,nt._strict=E,(R=new W(Rt(sl(R=nt))))._nextDay&&(R.add(1,"d"),R._nextDay=void 0),R}function Se(h,y,x,E){return mr(h,y,x,E,!1)}i.createFromInputFallback=H("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(h){h._d=new Date(h._i+(h._useUTC?" UTC":""))}),i.ISO_8601=function(){},i.RFC_2822=function(){},Yt=H("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var h=Se.apply(null,arguments);return this.isValid()&&h.isValid()?h<this?this:h:w()}),et=H("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var h=Se.apply(null,arguments);return this.isValid()&&h.isValid()?this<h?this:h:w()});function Sr(h,y){var x,E;if(!(y=y.length===1&&n(y[0])?y[0]:y).length)return Se();for(x=y[0],E=1;E<y.length;++E)y[E].isValid()&&!y[E][h](x)||(x=y[E]);return x}var ji=["year","quarter","month","week","day","hour","minute","second","millisecond"];function si(y){var y=K(y),x=y.year||0,E=y.quarter||0,R=y.month||0,nt=y.week||y.isoWeek||0,yt=y.day||0,Ct=y.hour||0,Pt=y.minute||0,It=y.second||0,ue=y.millisecond||0;this._isValid=function(re){var He,rr,oi=!1,Wu=ji.length;for(He in re)if(a(re,He)&&(Ht.call(ji,He)===-1||re[He]!=null&&isNaN(re[He])))return!1;for(rr=0;rr<Wu;++rr)if(re[ji[rr]]){if(oi)return!1;parseFloat(re[ji[rr]])!==F(re[ji[rr]])&&(oi=!0)}return!0}(y),this._milliseconds=+ue+1e3*It+6e4*Pt+1e3*Ct*60*60,this._days=+yt+7*nt,this._months=+R+3*E+12*x,this._data={},this._locale=oe(),this._bubble()}function $i(h){return h instanceof si}function Wr(h){return h<0?-1*Math.round(-1*h):Math.round(h)}function Ia(h,y){j(h,0,0,function(){var x=this.utcOffset(),E="+";return x<0&&(x=-x,E="-"),E+Q(~~(x/60),2)+y+Q(~~x%60,2)})}Ia("Z",":"),Ia("ZZ",""),st("Z",wt),st("ZZ",wt),Gt(["Z","ZZ"],function(h,y,x){x._useUTC=!0,x._tzm=Jn(wt,h)});var Is=/([\+\-]|\d\d)/gi;function Jn(h,x){var x=(x||"").match(h);return x===null?null:(x=60*(h=((x[x.length-1]||[])+"").match(Is)||["-",0,0])[1]+F(h[2]))===0?0:h[0]==="+"?x:-x}function Hr(h,y){var x;return y._isUTC?(y=y.clone(),x=(q(h)||d(h)?h:Se(h)).valueOf()-y.valueOf(),y._d.setTime(y._d.valueOf()+x),i.updateOffset(y,!1),y):Se(h).local()}function Fu(h){return-Math.round(h._d.getTimezoneOffset())}function bd(){return!!this.isValid()&&this._isUTC&&this._offset===0}i.updateOffset=function(){};var z4=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,W4=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function ai(h,y){var x,E=h,R=null;return $i(h)?E={ms:h._milliseconds,d:h._days,M:h._months}:u(h)||!isNaN(+h)?(E={},y?E[y]=+h:E.milliseconds=+h):(R=z4.exec(h))?(x=R[1]==="-"?-1:1,E={y:0,d:F(R[xt])*x,h:F(R[ft])*x,m:F(R[Lt])*x,s:F(R[_t])*x,ms:F(Wr(1e3*R[Ut]))*x}):(R=W4.exec(h))?(x=R[1]==="-"?-1:1,E={y:ts(R[2],x),M:ts(R[3],x),w:ts(R[4],x),d:ts(R[5],x),h:ts(R[6],x),m:ts(R[7],x),s:ts(R[8],x)}):E==null?E={}:typeof E=="object"&&("from"in E||"to"in E)&&(y=function(nt,yt){var Ct;return!nt.isValid()||!yt.isValid()?{milliseconds:0,months:0}:(yt=Hr(yt,nt),nt.isBefore(yt)?Ct=_d(nt,yt):((Ct=_d(yt,nt)).milliseconds=-Ct.milliseconds,Ct.months=-Ct.months),Ct)}(Se(E.from),Se(E.to)),(E={}).ms=y.milliseconds,E.M=y.months),R=new si(E),$i(h)&&a(h,"_locale")&&(R._locale=h._locale),$i(h)&&a(h,"_isValid")&&(R._isValid=h._isValid),R}function ts(h,y){return h=h&&parseFloat(h.replace(",",".")),(isNaN(h)?0:h)*y}function _d(h,y){var x={};return x.months=y.month()-h.month()+12*(y.year()-h.year()),h.clone().add(x.months,"M").isAfter(y)&&--x.months,x.milliseconds=+y-+h.clone().add(x.months,"M"),x}function xd(h,y){return function(x,E){var R;return E===null||isNaN(+E)||(M(y,"moment()."+y+"(period, number) is deprecated. Please use moment()."+y+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),R=x,x=E,E=R),vd(this,ai(x,E),h),this}}function vd(h,yt,x,E){var R=yt._milliseconds,nt=Wr(yt._days),yt=Wr(yt._months);h.isValid()&&(E=E==null||E,yt&&$t(h,L(h,"Month")+yt*x),nt&&J(h,"Date",L(h,"Date")+nt*x),R&&h._d.setTime(h._d.valueOf()+R*x),E&&i.updateOffset(h,nt||yt))}ai.fn=si.prototype,ai.invalid=function(){return ai(NaN)},ee=xd(1,"add"),Pe=xd(-1,"subtract");function kd(h){return typeof h=="string"||h instanceof String}function H4(h){return q(h)||d(h)||kd(h)||u(h)||function(y){var x=n(y),E=!1;return x&&(E=y.filter(function(R){return!u(R)&&kd(y)}).length===0),x&&E}(h)||function(y){var x,E,R=s(y)&&!o(y),nt=!1,yt=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],Ct=yt.length;for(x=0;x<Ct;x+=1)E=yt[x],nt=nt||a(y,E);return R&&nt}(h)||h==null}function al(h,R){if(h.date()<R.date())return-al(R,h);var x=12*(R.year()-h.year())+(R.month()-h.month()),E=h.clone().add(x,"months"),R=R-E<0?(R-E)/(E-h.clone().add(x-1,"months")):(R-E)/(h.clone().add(1+x,"months")-E);return-(x+R)||0}function wd(h){return h===void 0?this._locale._abbr:((h=oe(h))!=null&&(this._locale=h),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]",Ge=H("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(h){return h===void 0?this.localeData():this.locale(h)});function Td(){return this._locale}var Ed=126227808e5;function Os(h,y){return(h%y+y)%y}function Cd(h,y,x){return h<100&&0<=h?new Date(h+400,y,x)-Ed:new Date(h,y,x).valueOf()}function Sd(h,y,x){return h<100&&0<=h?Date.UTC(h+400,y,x)-Ed:Date.UTC(h,y,x)}function Pu(h,y){return y.erasAbbrRegex(h)}function Yu(){for(var h=[],y=[],x=[],E=[],R=this.eras(),nt=0,yt=R.length;nt<yt;++nt)y.push(Xt(R[nt].name)),h.push(Xt(R[nt].abbr)),x.push(Xt(R[nt].narrow)),E.push(Xt(R[nt].name)),E.push(Xt(R[nt].abbr)),E.push(Xt(R[nt].narrow));this._erasRegex=new RegExp("^("+E.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+y.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+h.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+x.join("|")+")","i")}function ol(h,y){j(0,[h,h.length],0,y)}function Ad(h,y,x,E,R){var nt;return h==null?Be(this,E,R).year:(nt=Oe(h,E,R),function(yt,Ct,Pt,It,ue){return yt=ae(yt,Ct,Pt,It,ue),Ct=zr(yt.year,0,yt.dayOfYear),this.year(Ct.getUTCFullYear()),this.month(Ct.getUTCMonth()),this.date(Ct.getUTCDate()),this}.call(this,h,y=nt<y?nt:y,x,E,R))}j("N",0,0,"eraAbbr"),j("NN",0,0,"eraAbbr"),j("NNN",0,0,"eraAbbr"),j("NNNN",0,0,"eraName"),j("NNNNN",0,0,"eraNarrow"),j("y",["y",1],"yo","eraYear"),j("y",["yy",2],0,"eraYear"),j("y",["yyy",3],0,"eraYear"),j("y",["yyyy",4],0,"eraYear"),st("N",Pu),st("NN",Pu),st("NNN",Pu),st("NNNN",function(h,y){return y.erasNameRegex(h)}),st("NNNNN",function(h,y){return y.erasNarrowRegex(h)}),Gt(["N","NN","NNN","NNNN","NNNNN"],function(h,y,x,E){E=x._locale.erasParse(h,E,x._strict),E?_(x).era=E:_(x).invalidEra=h}),st("y",Tt),st("yy",Tt),st("yyy",Tt),st("yyyy",Tt),st("yo",function(h,y){return y._eraYearOrdinalRegex||Tt}),Gt(["y","yy","yyy","yyyy"],Vt),Gt(["yo"],function(h,y,x,E){var R;x._locale._eraYearOrdinalRegex&&(R=h.match(x._locale._eraYearOrdinalRegex)),x._locale.eraYearOrdinalParse?y[Vt]=x._locale.eraYearOrdinalParse(h,R):y[Vt]=parseInt(h,10)}),j(0,["gg",2],0,function(){return this.weekYear()%100}),j(0,["GG",2],0,function(){return this.isoWeekYear()%100}),ol("gggg","weekYear"),ol("ggggg","weekYear"),ol("GGGG","isoWeekYear"),ol("GGGGG","isoWeekYear"),ut("weekYear","gg"),ut("isoWeekYear","GG"),Y("weekYear",1),Y("isoWeekYear",1),st("G",gt),st("g",gt),st("GG",V,ce),st("gg",V,ce),st("GGGG",On,es),st("gggg",On,es),st("GGGGG",Bn,In),st("ggggg",Bn,In),Ee(["gggg","ggggg","GGGG","GGGGG"],function(h,y,x,E){y[E.substr(0,2)]=F(h)}),Ee(["gg","GG"],function(h,y,x,E){y[E]=i.parseTwoDigitYear(h)}),j("Q",0,"Qo","quarter"),ut("quarter","Q"),Y("quarter",7),st("Q",T),Gt("Q",function(h,y){y[Ft]=3*(F(h)-1)}),j("D",["DD",2],"Do","date"),ut("date","D"),Y("date",9),st("D",V),st("DD",V,ce),st("Do",function(h,y){return h?y._dayOfMonthOrdinalParse||y._ordinalParse:y._dayOfMonthOrdinalParseLenient}),Gt(["D","DD"],xt),Gt("Do",function(h,y){y[xt]=F(h.match(V)[0])}),On=I("Date",!0),j("DDD",["DDDD",3],"DDDo","dayOfYear"),ut("dayOfYear","DDD"),Y("dayOfYear",4),st("DDD",Mt),st("DDDD",ht),Gt(["DDD","DDDD"],function(h,y,x){x._dayOfYear=F(h)}),j("m",["mm",2],0,"minute"),ut("minute","m"),Y("minute",14),st("m",V),st("mm",V,ce),Gt(["m","mm"],Lt);var Nn,es=I("Minutes",!1),Bn=(j("s",["ss",2],0,"second"),ut("second","s"),Y("second",15),st("s",V),st("ss",V,ce),Gt(["s","ss"],_t),I("Seconds",!1));for(j("S",0,0,function(){return~~(this.millisecond()/100)}),j(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),j(0,["SSS",3],0,"millisecond"),j(0,["SSSS",4],0,function(){return 10*this.millisecond()}),j(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),j(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),j(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),j(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),j(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),ut("millisecond","ms"),Y("millisecond",16),st("S",Mt,T),st("SS",Mt,ce),st("SSS",Mt,ht),Nn="SSSS";Nn.length<=9;Nn+="S")st(Nn,Tt);function G4(h,y){y[Ut]=F(1e3*("0."+h))}for(Nn="S";Nn.length<=9;Nn+="S")Gt(Nn,G4);In=I("Milliseconds",!1),j("z",0,0,"zoneAbbr"),j("zz",0,0,"zoneName"),T=W.prototype;function Ld(h){return h}T.add=ee,T.calendar=function(x,R){arguments.length===1&&(arguments[0]?H4(arguments[0])?(x=arguments[0],R=void 0):function(nt){for(var yt=s(nt)&&!o(nt),Ct=!1,Pt=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],It=0;It<Pt.length;It+=1)Ct=Ct||a(nt,Pt[It]);return yt&&Ct}(arguments[0])&&(R=arguments[0],x=void 0):R=x=void 0);var x=x||Se(),E=Hr(x,this).startOf("day"),E=i.calendarFormat(this,E)||"sameElse",R=R&&(C(R[E])?R[E].call(this,x):R[E]);return this.format(R||this.localeData().calendar(E,this,Se(x)))},T.clone=function(){return new W(this)},T.diff=function(h,y,x){var E,R,nt;if(!this.isValid())return NaN;if(!(E=Hr(h,this)).isValid())return NaN;switch(R=6e4*(E.utcOffset()-this.utcOffset()),y=bt(y)){case"year":nt=al(this,E)/12;break;case"month":nt=al(this,E);break;case"quarter":nt=al(this,E)/3;break;case"second":nt=(this-E)/1e3;break;case"minute":nt=(this-E)/6e4;break;case"hour":nt=(this-E)/36e5;break;case"day":nt=(this-E-R)/864e5;break;case"week":nt=(this-E-R)/6048e5;break;default:nt=this-E}return x?nt:X(nt)},T.endOf=function(h){var y,x;if((h=bt(h))===void 0||h==="millisecond"||!this.isValid())return this;switch(x=this._isUTC?Sd:Cd,h){case"year":y=x(this.year()+1,0,1)-1;break;case"quarter":y=x(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":y=x(this.year(),this.month()+1,1)-1;break;case"week":y=x(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":y=x(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":y=x(this.year(),this.month(),this.date()+1)-1;break;case"hour":y=this._d.valueOf(),y+=36e5-Os(y+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":y=this._d.valueOf(),y+=6e4-Os(y,6e4)-1;break;case"second":y=this._d.valueOf(),y+=1e3-Os(y,1e3)-1;break}return this._d.setTime(y),i.updateOffset(this,!0),this},T.format=function(h){return h=h||(this.isUtc()?i.defaultFormatUtc:i.defaultFormat),h=ot(this,h),this.localeData().postformat(h)},T.from=function(h,y){return this.isValid()&&(q(h)&&h.isValid()||Se(h).isValid())?ai({to:this,from:h}).locale(this.locale()).humanize(!y):this.localeData().invalidDate()},T.fromNow=function(h){return this.from(Se(),h)},T.to=function(h,y){return this.isValid()&&(q(h)&&h.isValid()||Se(h).isValid())?ai({from:this,to:h}).locale(this.locale()).humanize(!y):this.localeData().invalidDate()},T.toNow=function(h){return this.to(Se(),h)},T.get=function(h){return C(this[h=bt(h)])?this[h]():this},T.invalidAt=function(){return _(this).overflow},T.isAfter=function(h,y){return h=q(h)?h:Se(h),!(!this.isValid()||!h.isValid())&&((y=bt(y)||"millisecond")==="millisecond"?this.valueOf()>h.valueOf():h.valueOf()<this.clone().startOf(y).valueOf())},T.isBefore=function(h,y){return h=q(h)?h:Se(h),!(!this.isValid()||!h.isValid())&&((y=bt(y)||"millisecond")==="millisecond"?this.valueOf()<h.valueOf():this.clone().endOf(y).valueOf()<h.valueOf())},T.isBetween=function(h,y,x,E){return h=q(h)?h:Se(h),y=q(y)?y:Se(y),!!(this.isValid()&&h.isValid()&&y.isValid())&&((E=E||"()")[0]==="("?this.isAfter(h,x):!this.isBefore(h,x))&&(E[1]===")"?this.isBefore(y,x):!this.isAfter(y,x))},T.isSame=function(x,y){var x=q(x)?x:Se(x);return!(!this.isValid()||!x.isValid())&&((y=bt(y)||"millisecond")==="millisecond"?this.valueOf()===x.valueOf():(x=x.valueOf(),this.clone().startOf(y).valueOf()<=x&&x<=this.clone().endOf(y).valueOf()))},T.isSameOrAfter=function(h,y){return this.isSame(h,y)||this.isAfter(h,y)},T.isSameOrBefore=function(h,y){return this.isSame(h,y)||this.isBefore(h,y)},T.isValid=function(){return k(this)},T.lang=Ge,T.locale=wd,T.localeData=Td,T.max=et,T.min=Yt,T.parsingFlags=function(){return p({},_(this))},T.set=function(h,y){if(typeof h=="object")for(var x=function(nt){var yt,Ct=[];for(yt in nt)a(nt,yt)&&Ct.push({unit:yt,priority:Ot[yt]});return Ct.sort(function(Pt,It){return Pt.priority-It.priority}),Ct}(h=K(h)),E=x.length,R=0;R<E;R++)this[x[R].unit](h[x[R].unit]);else if(C(this[h=bt(h)]))return this[h](y);return this},T.startOf=function(h){var y,x;if((h=bt(h))===void 0||h==="millisecond"||!this.isValid())return this;switch(x=this._isUTC?Sd:Cd,h){case"year":y=x(this.year(),0,1);break;case"quarter":y=x(this.year(),this.month()-this.month()%3,1);break;case"month":y=x(this.year(),this.month(),1);break;case"week":y=x(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":y=x(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":y=x(this.year(),this.month(),this.date());break;case"hour":y=this._d.valueOf(),y-=Os(y+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":y=this._d.valueOf(),y-=Os(y,6e4);break;case"second":y=this._d.valueOf(),y-=Os(y,1e3);break}return this._d.setTime(y),i.updateOffset(this,!0),this},T.subtract=Pe,T.toArray=function(){var h=this;return[h.year(),h.month(),h.date(),h.hour(),h.minute(),h.second(),h.millisecond()]},T.toObject=function(){var h=this;return{years:h.year(),months:h.month(),date:h.date(),hours:h.hours(),minutes:h.minutes(),seconds:h.seconds(),milliseconds:h.milliseconds()}},T.toDate=function(){return new Date(this.valueOf())},T.toISOString=function(h){if(!this.isValid())return null;var y=(h=h!==!0)?this.clone().utc():this;return y.year()<0||9999<y.year()?ot(y,h?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):C(Date.prototype.toISOString)?h?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",ot(y,"Z")):ot(y,h?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},T.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var h,y="moment",x="";return this.isLocal()||(y=this.utcOffset()===0?"moment.utc":"moment.parseZone",x="Z"),y="["+y+'("]',h=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",this.format(y+h+"-MM-DD[T]HH:mm:ss.SSS"+(x+'[")]'))},typeof Symbol<"u"&&Symbol.for!=null&&(T[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),T.toJSON=function(){return this.isValid()?this.toISOString():null},T.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},T.unix=function(){return Math.floor(this.valueOf()/1e3)},T.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},T.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},T.eraName=function(){for(var h,y=this.localeData().eras(),x=0,E=y.length;x<E;++x)if(h=this.clone().startOf("day").valueOf(),y[x].since<=h&&h<=y[x].until||y[x].until<=h&&h<=y[x].since)return y[x].name;return""},T.eraNarrow=function(){for(var h,y=this.localeData().eras(),x=0,E=y.length;x<E;++x)if(h=this.clone().startOf("day").valueOf(),y[x].since<=h&&h<=y[x].until||y[x].until<=h&&h<=y[x].since)return y[x].narrow;return""},T.eraAbbr=function(){for(var h,y=this.localeData().eras(),x=0,E=y.length;x<E;++x)if(h=this.clone().startOf("day").valueOf(),y[x].since<=h&&h<=y[x].until||y[x].until<=h&&h<=y[x].since)return y[x].abbr;return""},T.eraYear=function(){for(var h,y,x=this.localeData().eras(),E=0,R=x.length;E<R;++E)if(h=x[E].since<=x[E].until?1:-1,y=this.clone().startOf("day").valueOf(),x[E].since<=y&&y<=x[E].until||x[E].until<=y&&y<=x[E].since)return(this.year()-i(x[E].since).year())*h+x[E].offset;return this.year()},T.year=cl,T.isLeapYear=function(){return U(this.year())},T.weekYear=function(h){return Ad.call(this,h,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},T.isoWeekYear=function(h){return Ad.call(this,h,this.isoWeek(),this.isoWeekday(),1,4)},T.quarter=T.quarters=function(h){return h==null?Math.ceil((this.month()+1)/3):this.month(3*(h-1)+this.month()%3)},T.month=ne,T.daysInMonth=function(){return dt(this.year(),this.month())},T.week=T.weeks=function(h){var y=this.localeData().week(this);return h==null?y:this.add(7*(h-y),"d")},T.isoWeek=T.isoWeeks=function(h){var y=Be(this,1,4).week;return h==null?y:this.add(7*(h-y),"d")},T.weeksInYear=function(){var h=this.localeData()._week;return Oe(this.year(),h.dow,h.doy)},T.weeksInWeekYear=function(){var h=this.localeData()._week;return Oe(this.weekYear(),h.dow,h.doy)},T.isoWeeksInYear=function(){return Oe(this.year(),1,4)},T.isoWeeksInISOWeekYear=function(){return Oe(this.isoWeekYear(),1,4)},T.date=On,T.day=T.days=function(h){if(!this.isValid())return h!=null?this:NaN;var y,x,E=this._isUTC?this._d.getUTCDay():this._d.getDay();return h!=null?(y=h,x=this.localeData(),h=typeof y!="string"?y:isNaN(y)?typeof(y=x.weekdaysParse(y))=="number"?y:null:parseInt(y,10),this.add(h-E,"d")):E},T.weekday=function(h){if(!this.isValid())return h!=null?this:NaN;var y=(this.day()+7-this.localeData()._week.dow)%7;return h==null?y:this.add(h-y,"d")},T.isoWeekday=function(h){return this.isValid()?h!=null?(y=h,x=this.localeData(),x=typeof y=="string"?x.weekdaysParse(y)%7||7:isNaN(y)?null:y,this.day(this.day()%7?x:x-7)):this.day()||7:h!=null?this:NaN;var y,x},T.dayOfYear=function(h){var y=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return h==null?y:this.add(h-y,"d")},T.hour=T.hours=pt,T.minute=T.minutes=es,T.second=T.seconds=Bn,T.millisecond=T.milliseconds=In,T.utcOffset=function(h,y,x){var E,R=this._offset||0;if(!this.isValid())return h!=null?this:NaN;if(h==null)return this._isUTC?R:Fu(this);if(typeof h=="string"){if((h=Jn(wt,h))===null)return this}else Math.abs(h)<16&&!x&&(h*=60);return!this._isUTC&&y&&(E=Fu(this)),this._offset=h,this._isUTC=!0,E!=null&&this.add(E,"m"),R!==h&&(!y||this._changeInProgress?vd(this,ai(h-R,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this},T.utc=function(h){return this.utcOffset(0,h)},T.local=function(h){return this._isUTC&&(this.utcOffset(0,h),this._isUTC=!1,h&&this.subtract(Fu(this),"m")),this},T.parseZone=function(){var h;return this._tzm!=null?this.utcOffset(this._tzm,!1,!0):typeof this._i=="string"&&((h=Jn(Et,this._i))!=null?this.utcOffset(h):this.utcOffset(0,!0)),this},T.hasAlignedHourOffset=function(h){return!!this.isValid()&&(h=h?Se(h).utcOffset():0,(this.utcOffset()-h)%60==0)},T.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},T.isLocal=function(){return!!this.isValid()&&!this._isUTC},T.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},T.isUtc=bd,T.isUTC=bd,T.zoneAbbr=function(){return this._isUTC?"UTC":""},T.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},T.dates=H("dates accessor is deprecated. Use date instead.",On),T.months=H("months accessor is deprecated. Use month instead",ne),T.years=H("years accessor is deprecated. Use year instead",cl),T.zone=H("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(h,y){return h!=null?(this.utcOffset(h=typeof h!="string"?-h:h,y),this):-this.utcOffset()}),T.isDSTShifted=H("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var h,y={};return P(y,this),(y=sl(y))._a?(h=(y._isUTC?g:Se)(y._a),this._isDSTShifted=this.isValid()&&0<function(x,E,R){for(var nt=Math.min(x.length,E.length),yt=Math.abs(x.length-E.length),Ct=0,Pt=0;Pt<nt;Pt++)(R&&x[Pt]!==E[Pt]||!R&&F(x[Pt])!==F(E[Pt]))&&Ct++;return Ct+yt}(y._a,h.toArray())):this._isDSTShifted=!1,this._isDSTShifted}),ce=D.prototype;function ll(h,y,x,nt){var R=oe(),nt=g().set(nt,y);return R[x](nt,h)}function Dd(h,y,x){if(u(h)&&(y=h,h=void 0),h=h||"",y!=null)return ll(h,y,x,"month");for(var E=[],R=0;R<12;R++)E[R]=ll(h,R,x,"month");return E}function Vu(h,y,x,E){y=(typeof h=="boolean"?u(y)&&(x=y,y=void 0):(y=h,h=!1,u(x=y)&&(x=y,y=void 0)),y||"");var R,nt=oe(),yt=h?nt._week.dow:0,Ct=[];if(x!=null)return ll(y,(x+yt)%7,E,"day");for(R=0;R<7;R++)Ct[R]=ll(y,(R+yt)%7,E,"day");return Ct}ce.calendar=function(h,y,x){return C(h=this._calendar[h]||this._calendar.sameElse)?h.call(y,x):h},ce.longDateFormat=function(h){var y=this._longDateFormat[h],x=this._longDateFormat[h.toUpperCase()];return y||!x?y:(this._longDateFormat[h]=x.match(b).map(function(E){return E==="MMMM"||E==="MM"||E==="DD"||E==="dddd"?E.slice(1):E}).join(""),this._longDateFormat[h])},ce.invalidDate=function(){return this._invalidDate},ce.ordinal=function(h){return this._ordinal.replace("%d",h)},ce.preparse=Ld,ce.postformat=Ld,ce.relativeTime=function(h,y,x,E){var R=this._relativeTime[x];return C(R)?R(h,y,x,E):R.replace(/%d/i,h)},ce.pastFuture=function(h,y){return C(h=this._relativeTime[0<h?"future":"past"])?h(y):h.replace(/%s/i,y)},ce.set=function(h){var y,x;for(x in h)a(h,x)&&(C(y=h[x])?this[x]=y:this["_"+x]=y);this._config=h,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},ce.eras=function(h,y){for(var x,E=this._eras||oe("en")._eras,R=0,nt=E.length;R<nt;++R){switch(typeof E[R].since){case"string":x=i(E[R].since).startOf("day"),E[R].since=x.valueOf();break}switch(typeof E[R].until){case"undefined":E[R].until=1/0;break;case"string":x=i(E[R].until).startOf("day").valueOf(),E[R].until=x.valueOf();break}}return E},ce.erasParse=function(h,y,x){var E,R,nt,yt,Ct,Pt=this.eras();for(h=h.toUpperCase(),E=0,R=Pt.length;E<R;++E)if(nt=Pt[E].name.toUpperCase(),yt=Pt[E].abbr.toUpperCase(),Ct=Pt[E].narrow.toUpperCase(),x)switch(y){case"N":case"NN":case"NNN":if(yt===h)return Pt[E];break;case"NNNN":if(nt===h)return Pt[E];break;case"NNNNN":if(Ct===h)return Pt[E];break}else if(0<=[nt,yt,Ct].indexOf(h))return Pt[E]},ce.erasConvertYear=function(h,y){var x=h.since<=h.until?1:-1;return y===void 0?i(h.since).year():i(h.since).year()+(y-h.offset)*x},ce.erasAbbrRegex=function(h){return a(this,"_erasAbbrRegex")||Yu.call(this),h?this._erasAbbrRegex:this._erasRegex},ce.erasNameRegex=function(h){return a(this,"_erasNameRegex")||Yu.call(this),h?this._erasNameRegex:this._erasRegex},ce.erasNarrowRegex=function(h){return a(this,"_erasNarrowRegex")||Yu.call(this),h?this._erasNarrowRegex:this._erasRegex},ce.months=function(h,y){return h?(n(this._months)?this._months:this._months[(this._months.isFormat||me).test(y)?"format":"standalone"])[h.month()]:n(this._months)?this._months:this._months.standalone},ce.monthsShort=function(h,y){return h?(n(this._monthsShort)?this._monthsShort:this._monthsShort[me.test(y)?"format":"standalone"])[h.month()]:n(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},ce.monthsParse=function(h,y,x){var E,R;if(this._monthsParseExact)return function(re,yt,Ct){var Pt,It,ue,re=re.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],Pt=0;Pt<12;++Pt)ue=g([2e3,Pt]),this._shortMonthsParse[Pt]=this.monthsShort(ue,"").toLocaleLowerCase(),this._longMonthsParse[Pt]=this.months(ue,"").toLocaleLowerCase();return Ct?yt==="MMM"?(It=Ht.call(this._shortMonthsParse,re))!==-1?It:null:(It=Ht.call(this._longMonthsParse,re))!==-1?It:null:yt==="MMM"?(It=Ht.call(this._shortMonthsParse,re))!==-1||(It=Ht.call(this._longMonthsParse,re))!==-1?It:null:(It=Ht.call(this._longMonthsParse,re))!==-1||(It=Ht.call(this._shortMonthsParse,re))!==-1?It:null}.call(this,h,y,x);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),E=0;E<12;E++)if(R=g([2e3,E]),x&&!this._longMonthsParse[E]&&(this._longMonthsParse[E]=new RegExp("^"+this.months(R,"").replace(".","")+"$","i"),this._shortMonthsParse[E]=new RegExp("^"+this.monthsShort(R,"").replace(".","")+"$","i")),x||this._monthsParse[E]||(R="^"+this.months(R,"")+"|^"+this.monthsShort(R,""),this._monthsParse[E]=new RegExp(R.replace(".",""),"i")),x&&y==="MMMM"&&this._longMonthsParse[E].test(h)||x&&y==="MMM"&&this._shortMonthsParse[E].test(h)||!x&&this._monthsParse[E].test(h))return E},ce.monthsRegex=function(h){return this._monthsParseExact?(a(this,"_monthsRegex")||ge.call(this),h?this._monthsStrictRegex:this._monthsRegex):(a(this,"_monthsRegex")||(this._monthsRegex=ke),this._monthsStrictRegex&&h?this._monthsStrictRegex:this._monthsRegex)},ce.monthsShortRegex=function(h){return this._monthsParseExact?(a(this,"_monthsRegex")||ge.call(this),h?this._monthsShortStrictRegex:this._monthsShortRegex):(a(this,"_monthsShortRegex")||(this._monthsShortRegex=be),this._monthsShortStrictRegex&&h?this._monthsShortStrictRegex:this._monthsShortRegex)},ce.week=function(h){return Be(h,this._week.dow,this._week.doy).week},ce.firstDayOfYear=function(){return this._week.doy},ce.firstDayOfWeek=function(){return this._week.dow},ce.weekdays=function(h,y){return y=n(this._weekdays)?this._weekdays:this._weekdays[h&&h!==!0&&this._weekdays.isFormat.test(y)?"format":"standalone"],h===!0?Fe(y,this._week.dow):h?y[h.day()]:y},ce.weekdaysMin=function(h){return h===!0?Fe(this._weekdaysMin,this._week.dow):h?this._weekdaysMin[h.day()]:this._weekdaysMin},ce.weekdaysShort=function(h){return h===!0?Fe(this._weekdaysShort,this._week.dow):h?this._weekdaysShort[h.day()]:this._weekdaysShort},ce.weekdaysParse=function(h,y,x){var E,R;if(this._weekdaysParseExact)return function(re,yt,Ct){var Pt,It,ue,re=re.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],Pt=0;Pt<7;++Pt)ue=g([2e3,1]).day(Pt),this._minWeekdaysParse[Pt]=this.weekdaysMin(ue,"").toLocaleLowerCase(),this._shortWeekdaysParse[Pt]=this.weekdaysShort(ue,"").toLocaleLowerCase(),this._weekdaysParse[Pt]=this.weekdays(ue,"").toLocaleLowerCase();return Ct?yt==="dddd"?(It=Ht.call(this._weekdaysParse,re))!==-1?It:null:yt==="ddd"?(It=Ht.call(this._shortWeekdaysParse,re))!==-1?It:null:(It=Ht.call(this._minWeekdaysParse,re))!==-1?It:null:yt==="dddd"?(It=Ht.call(this._weekdaysParse,re))!==-1||(It=Ht.call(this._shortWeekdaysParse,re))!==-1||(It=Ht.call(this._minWeekdaysParse,re))!==-1?It:null:yt==="ddd"?(It=Ht.call(this._shortWeekdaysParse,re))!==-1||(It=Ht.call(this._weekdaysParse,re))!==-1||(It=Ht.call(this._minWeekdaysParse,re))!==-1?It:null:(It=Ht.call(this._minWeekdaysParse,re))!==-1||(It=Ht.call(this._weekdaysParse,re))!==-1||(It=Ht.call(this._shortWeekdaysParse,re))!==-1?It:null}.call(this,h,y,x);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),E=0;E<7;E++)if(R=g([2e3,1]).day(E),x&&!this._fullWeekdaysParse[E]&&(this._fullWeekdaysParse[E]=new RegExp("^"+this.weekdays(R,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[E]=new RegExp("^"+this.weekdaysShort(R,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[E]=new RegExp("^"+this.weekdaysMin(R,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[E]||(R="^"+this.weekdays(R,"")+"|^"+this.weekdaysShort(R,"")+"|^"+this.weekdaysMin(R,""),this._weekdaysParse[E]=new RegExp(R.replace(".",""),"i")),x&&y==="dddd"&&this._fullWeekdaysParse[E].test(h)||x&&y==="ddd"&&this._shortWeekdaysParse[E].test(h)||x&&y==="dd"&&this._minWeekdaysParse[E].test(h)||!x&&this._weekdaysParse[E].test(h))return E},ce.weekdaysRegex=function(h){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||St.call(this),h?this._weekdaysStrictRegex:this._weekdaysRegex):(a(this,"_weekdaysRegex")||(this._weekdaysRegex=tr),this._weekdaysStrictRegex&&h?this._weekdaysStrictRegex:this._weekdaysRegex)},ce.weekdaysShortRegex=function(h){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||St.call(this),h?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(a(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=zt),this._weekdaysShortStrictRegex&&h?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},ce.weekdaysMinRegex=function(h){return this._weekdaysParseExact?(a(this,"_weekdaysRegex")||St.call(this),h?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(a(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Z),this._weekdaysMinStrictRegex&&h?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},ce.isPM=function(h){return(h+"").toLowerCase().charAt(0)==="p"},ce.meridiem=function(h,y,x){return 11<h?x?"pm":"PM":x?"am":"AM"},qt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(h){var y=h%10;return h+(F(h%100/10)===1?"th":y==1?"st":y==2?"nd":y==3?"rd":"th")}}),i.lang=H("moment.lang is deprecated. Use moment.locale instead.",qt),i.langData=H("moment.langData is deprecated. Use moment.localeData instead.",oe);var Xi=Math.abs;function Md(h,y,x,E){return y=ai(y,x),h._milliseconds+=E*y._milliseconds,h._days+=E*y._days,h._months+=E*y._months,h._bubble()}function Nd(h){return h<0?Math.floor(h):Math.ceil(h)}function Bd(h){return 4800*h/146097}function Uu(h){return 146097*h/4800}function Ki(h){return function(){return this.as(h)}}Mt=Ki("ms"),ht=Ki("s"),ee=Ki("m"),et=Ki("h"),Yt=Ki("d"),Pe=Ki("w"),pt=Ki("M"),es=Ki("Q"),Bn=Ki("y");function rs(h){return function(){return this.isValid()?this._data[h]:NaN}}var In=rs("milliseconds"),On=rs("seconds"),cl=rs("minutes"),ce=rs("hours"),q4=rs("days"),j4=rs("months"),$4=rs("years"),Zi=Math.round,Rs={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function X4(h,y,x,E){var It=ai(h).abs(),ue=Zi(It.as("s")),R=Zi(It.as("m")),nt=Zi(It.as("h")),yt=Zi(It.as("d")),Ct=Zi(It.as("M")),Pt=Zi(It.as("w")),It=Zi(It.as("y")),ue=(ue<=x.ss?["s",ue]:ue<x.s&&["ss",ue])||R<=1&&["m"]||R<x.m&&["mm",R]||nt<=1&&["h"]||nt<x.h&&["hh",nt]||yt<=1&&["d"]||yt<x.d&&["dd",yt];return(ue=(ue=x.w!=null?ue||Pt<=1&&["w"]||Pt<x.w&&["ww",Pt]:ue)||Ct<=1&&["M"]||Ct<x.M&&["MM",Ct]||It<=1&&["y"]||["yy",It])[2]=y,ue[3]=0<+h,ue[4]=E,function(re,He,rr,oi,Wu){return Wu.relativeTime(He||1,!!rr,re,oi)}.apply(null,ue)}var zu=Math.abs;function Fs(h){return(0<h)-(h<0)||+h}function ul(){if(!this.isValid())return this.localeData().invalidDate();var h,y,x,E,R,nt,yt,Ct=zu(this._milliseconds)/1e3,Pt=zu(this._days),It=zu(this._months),ue=this.asSeconds();return ue?(h=X(Ct/60),y=X(h/60),Ct%=60,h%=60,x=X(It/12),It%=12,E=Ct?Ct.toFixed(3).replace(/\.?0+$/,""):"",R=Fs(this._months)!==Fs(ue)?"-":"",nt=Fs(this._days)!==Fs(ue)?"-":"",yt=Fs(this._milliseconds)!==Fs(ue)?"-":"",(ue<0?"-":"")+"P"+(x?R+x+"Y":"")+(It?R+It+"M":"")+(Pt?nt+Pt+"D":"")+(y||h||Ct?"T":"")+(y?yt+y+"H":"")+(h?yt+h+"M":"")+(Ct?yt+E+"S":"")):"P0D"}var Ce=si.prototype;return Ce.isValid=function(){return this._isValid},Ce.abs=function(){var h=this._data;return this._milliseconds=Xi(this._milliseconds),this._days=Xi(this._days),this._months=Xi(this._months),h.milliseconds=Xi(h.milliseconds),h.seconds=Xi(h.seconds),h.minutes=Xi(h.minutes),h.hours=Xi(h.hours),h.months=Xi(h.months),h.years=Xi(h.years),this},Ce.add=function(h,y){return Md(this,h,y,1)},Ce.subtract=function(h,y){return Md(this,h,y,-1)},Ce.as=function(h){if(!this.isValid())return NaN;var y,x,E=this._milliseconds;if((h=bt(h))==="month"||h==="quarter"||h==="year")switch(y=this._days+E/864e5,x=this._months+Bd(y),h){case"month":return x;case"quarter":return x/3;case"year":return x/12}else switch(y=this._days+Math.round(Uu(this._months)),h){case"week":return y/7+E/6048e5;case"day":return y+E/864e5;case"hour":return 24*y+E/36e5;case"minute":return 1440*y+E/6e4;case"second":return 86400*y+E/1e3;case"millisecond":return Math.floor(864e5*y)+E;default:throw new Error("Unknown unit "+h)}},Ce.asMilliseconds=Mt,Ce.asSeconds=ht,Ce.asMinutes=ee,Ce.asHours=et,Ce.asDays=Yt,Ce.asWeeks=Pe,Ce.asMonths=pt,Ce.asQuarters=es,Ce.asYears=Bn,Ce.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*F(this._months/12):NaN},Ce._bubble=function(){var h=this._milliseconds,y=this._days,x=this._months,E=this._data;return 0<=h&&0<=y&&0<=x||h<=0&&y<=0&&x<=0||(h+=864e5*Nd(Uu(x)+y),x=y=0),E.milliseconds=h%1e3,h=X(h/1e3),E.seconds=h%60,h=X(h/60),E.minutes=h%60,h=X(h/60),E.hours=h%24,y+=X(h/24),x+=h=X(Bd(y)),y-=Nd(Uu(h)),h=X(x/12),x%=12,E.days=y,E.months=x,E.years=h,this},Ce.clone=function(){return ai(this)},Ce.get=function(h){return h=bt(h),this.isValid()?this[h+"s"]():NaN},Ce.milliseconds=In,Ce.seconds=On,Ce.minutes=cl,Ce.hours=ce,Ce.days=q4,Ce.weeks=function(){return X(this.days()/7)},Ce.months=j4,Ce.years=$4,Ce.humanize=function(h,y){if(!this.isValid())return this.localeData().invalidDate();var x=!1,E=Rs;return typeof h=="object"&&(y=h,h=!1),typeof h=="boolean"&&(x=h),typeof y=="object"&&(E=Object.assign({},Rs,y),y.s!=null&&y.ss==null&&(E.ss=y.s-1)),h=this.localeData(),y=X4(this,!x,E,h),x&&(y=h.pastFuture(+this,y)),h.postformat(y)},Ce.toISOString=ul,Ce.toString=ul,Ce.toJSON=ul,Ce.locale=wd,Ce.localeData=Td,Ce.toIsoString=H("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",ul),Ce.lang=Ge,j("X",0,0,"unix"),j("x",0,0,"valueOf"),st("x",gt),st("X",/[+-]?\d+(\.\d{1,3})?/),Gt("X",function(h,y,x){x._d=new Date(1e3*parseFloat(h))}),Gt("x",function(h,y,x){x._d=new Date(F(h))}),i.version="2.29.4",r=Se,i.fn=T,i.min=function(){return Sr("isBefore",[].slice.call(arguments,0))},i.max=function(){return Sr("isAfter",[].slice.call(arguments,0))},i.now=function(){return Date.now?Date.now():+new Date},i.utc=g,i.unix=function(h){return Se(1e3*h)},i.months=function(h,y){return Dd(h,y,"months")},i.isDate=d,i.locale=qt,i.invalid=w,i.duration=ai,i.isMoment=q,i.weekdays=function(h,y,x){return Vu(h,y,x,"weekdays")},i.parseZone=function(){return Se.apply(null,arguments).parseZone()},i.localeData=oe,i.isDuration=$i,i.monthsShort=function(h,y){return Dd(h,y,"monthsShort")},i.weekdaysMin=function(h,y,x){return Vu(h,y,x,"weekdaysMin")},i.defineLocale=te,i.updateLocale=function(h,y){var x,E;return y!=null?(E=We,xe[h]!=null&&xe[h].parentLocale!=null?xe[h].set(v(xe[h]._config,y)):(y=v(E=(x=Or(h))!=null?x._config:E,y),x==null&&(y.abbr=h),(E=new D(y)).parentLocale=xe[h],xe[h]=E),qt(h)):xe[h]!=null&&(xe[h].parentLocale!=null?(xe[h]=xe[h].parentLocale,h===qt()&&qt(h)):xe[h]!=null&&delete xe[h]),xe[h]},i.locales=function(){return m(xe)},i.weekdaysShort=function(h,y,x){return Vu(h,y,x,"weekdaysShort")},i.normalizeUnits=bt,i.relativeTimeRounding=function(h){return h===void 0?Zi:typeof h=="function"&&(Zi=h,!0)},i.relativeTimeThreshold=function(h,y){return Rs[h]!==void 0&&(y===void 0?Rs[h]:(Rs[h]=y,h==="s"&&(Rs.ss=y-1),!0))},i.calendarFormat=function(h,y){return(h=h.diff(y,"days",!0))<-6?"sameElse":h<-1?"lastWeek":h<0?"lastDay":h<1?"sameDay":h<2?"nextDay":h<7?"nextWeek":"sameElse"},i.prototype=T,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i})})(ob);const bi=Nh;var j1={};Object.defineProperty(j1,"__esModule",{value:!0});var wn=j1.sanitizeUrl=void 0,lb=/^([^\w]*)(javascript|data|vbscript)/im,cb=/&#(\w+)(^\w|;)?/g,ub=/&(newline|tab);/gi,hb=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,db=/^.+(:|:)/gim,fb=[".","/"];function pb(t){return fb.indexOf(t[0])>-1}function gb(t){return t.replace(cb,function(e,r){return String.fromCharCode(r)})}function yb(t){var e=gb(t||"").replace(ub,"").replace(hb,"").trim();if(!e)return"about:blank";if(pb(e))return e;var r=e.match(db);if(!r)return e;var i=r[0];return lb.test(i)?"about:blank":e}wn=j1.sanitizeUrl=yb;function Ll(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function mb(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function $1(t){let e,r,i;t.length!==2?(e=Ll,r=(o,l)=>Ll(t(o),l),i=(o,l)=>t(o)-l):(e=t===Ll||t===mb?t:bb,r=t,i=t);function n(o,l,u=0,d=o.length){if(u<d){if(e(l,l)!==0)return d;do{const f=u+d>>>1;r(o[f],l)<0?u=f+1:d=f}while(u<d)}return u}function s(o,l,u=0,d=o.length){if(u<d){if(e(l,l)!==0)return d;do{const f=u+d>>>1;r(o[f],l)<=0?u=f+1:d=f}while(u<d)}return u}function a(o,l,u=0,d=o.length){const f=n(o,l,u,d-1);return f>u&&i(o[f-1],l)>-i(o[f],l)?f-1:f}return{left:n,center:a,right:s}}function bb(){return 0}function _b(t){return t===null?NaN:+t}const xb=$1(Ll),vb=xb.right;$1(_b).center;const kb=vb;class Od extends Map{constructor(e,r=Eb){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(const[i,n]of e)this.set(i,n)}get(e){return super.get(Rd(this,e))}has(e){return super.has(Rd(this,e))}set(e,r){return super.set(wb(this,e),r)}delete(e){return super.delete(Tb(this,e))}}function Rd({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):r}function wb({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):(t.set(i,r),r)}function Tb({_intern:t,_key:e},r){const i=e(r);return t.has(i)&&(r=t.get(i),t.delete(i)),r}function Eb(t){return t!==null&&typeof t=="object"?t.valueOf():t}var Bh=Math.sqrt(50),Ih=Math.sqrt(10),Oh=Math.sqrt(2);function Cb(t,e,r){var i,n=-1,s,a,o;if(e=+e,t=+t,r=+r,t===e&&r>0)return[t];if((i=e<t)&&(s=t,t=e,e=s),(o=_p(t,e,r))===0||!isFinite(o))return[];if(o>0){let l=Math.round(t/o),u=Math.round(e/o);for(l*o<t&&++l,u*o>e&&--u,a=new Array(s=u-l+1);++n<s;)a[n]=(l+n)*o}else{o=-o;let l=Math.round(t*o),u=Math.round(e*o);for(l/o<t&&++l,u/o>e&&--u,a=new Array(s=u-l+1);++n<s;)a[n]=(l+n)/o}return i&&a.reverse(),a}function _p(t,e,r){var i=(e-t)/Math.max(0,r),n=Math.floor(Math.log(i)/Math.LN10),s=i/Math.pow(10,n);return n>=0?(s>=Bh?10:s>=Ih?5:s>=Oh?2:1)*Math.pow(10,n):-Math.pow(10,-n)/(s>=Bh?10:s>=Ih?5:s>=Oh?2:1)}function Rh(t,e,r){var i=Math.abs(e-t)/Math.max(0,r),n=Math.pow(10,Math.floor(Math.log(i)/Math.LN10)),s=i/n;return s>=Bh?n*=10:s>=Ih?n*=5:s>=Oh&&(n*=2),e<t?-n:n}function Sb(t,e){let r;if(e===void 0)for(const i of t)i!=null&&(r<i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let n of t)(n=e(n,++i,t))!=null&&(r<n||r===void 0&&n>=n)&&(r=n)}return r}function Ab(t,e){let r;if(e===void 0)for(const i of t)i!=null&&(r>i||r===void 0&&i>=i)&&(r=i);else{let i=-1;for(let n of t)(n=e(n,++i,t))!=null&&(r>n||r===void 0&&n>=n)&&(r=n)}return r}function Lb(t){return t}var Dl=1,Hu=2,Fh=3,hl=4,Fd=1e-6;function Db(t){return"translate("+t+",0)"}function Mb(t){return"translate(0,"+t+")"}function Nb(t){return e=>+t(e)}function Bb(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function Ib(){return!this.__axis}function xp(t,e){var r=[],i=null,n=null,s=6,a=6,o=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,u=t===Dl||t===hl?-1:1,d=t===hl||t===Hu?"x":"y",f=t===Dl||t===Fh?Db:Mb;function p(g){var _=i??(e.ticks?e.ticks.apply(e,r):e.domain()),k=n??(e.tickFormat?e.tickFormat.apply(e,r):Lb),w=Math.max(s,0)+o,S=e.range(),A=+S[0]+l,O=+S[S.length-1]+l,P=(e.bandwidth?Bb:Nb)(e.copy(),l),W=g.selection?g.selection():g,q=W.selectAll(".domain").data([null]),z=W.selectAll(".tick").data(_,e).order(),H=z.exit(),N=z.enter().append("g").attr("class","tick"),M=z.select("line"),C=z.select("text");q=q.merge(q.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),z=z.merge(N),M=M.merge(N.append("line").attr("stroke","currentColor").attr(d+"2",u*s)),C=C.merge(N.append("text").attr("fill","currentColor").attr(d,u*w).attr("dy",t===Dl?"0em":t===Fh?"0.71em":"0.32em")),g!==W&&(q=q.transition(g),z=z.transition(g),M=M.transition(g),C=C.transition(g),H=H.transition(g).attr("opacity",Fd).attr("transform",function(v){return isFinite(v=P(v))?f(v+l):this.getAttribute("transform")}),N.attr("opacity",Fd).attr("transform",function(v){var D=this.parentNode.__axis;return f((D&&isFinite(D=D(v))?D:P(v))+l)})),H.remove(),q.attr("d",t===hl||t===Hu?a?"M"+u*a+","+A+"H"+l+"V"+O+"H"+u*a:"M"+l+","+A+"V"+O:a?"M"+A+","+u*a+"V"+l+"H"+O+"V"+u*a:"M"+A+","+l+"H"+O),z.attr("opacity",1).attr("transform",function(v){return f(P(v)+l)}),M.attr(d+"2",u*s),C.attr(d,u*w).text(k),W.filter(Ib).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Hu?"start":t===hl?"end":"middle"),W.each(function(){this.__axis=P})}return p.scale=function(g){return arguments.length?(e=g,p):e},p.ticks=function(){return r=Array.from(arguments),p},p.tickArguments=function(g){return arguments.length?(r=g==null?[]:Array.from(g),p):r.slice()},p.tickValues=function(g){return arguments.length?(i=g==null?null:Array.from(g),p):i&&i.slice()},p.tickFormat=function(g){return arguments.length?(n=g,p):n},p.tickSize=function(g){return arguments.length?(s=a=+g,p):s},p.tickSizeInner=function(g){return arguments.length?(s=+g,p):s},p.tickSizeOuter=function(g){return arguments.length?(a=+g,p):a},p.tickPadding=function(g){return arguments.length?(o=+g,p):o},p.offset=function(g){return arguments.length?(l=+g,p):l},p}function Ob(t){return xp(Dl,t)}function Rb(t){return xp(Fh,t)}var Fb={value:()=>{}};function vp(){for(var t=0,e=arguments.length,r={},i;t<e;++t){if(!(i=arguments[t]+"")||i in r||/[\s.]/.test(i))throw new Error("illegal type: "+i);r[i]=[]}return new Ml(r)}function Ml(t){this._=t}function Pb(t,e){return t.trim().split(/^|\s+/).map(function(r){var i="",n=r.indexOf(".");if(n>=0&&(i=r.slice(n+1),r=r.slice(0,n)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:i}})}Ml.prototype=vp.prototype={constructor:Ml,on:function(t,e){var r=this._,i=Pb(t+"",r),n,s=-1,a=i.length;if(arguments.length<2){for(;++s<a;)if((n=(t=i[s]).type)&&(n=Yb(r[n],t.name)))return n;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++s<a;)if(n=(t=i[s]).type)r[n]=Pd(r[n],t.name,e);else if(e==null)for(n in r)r[n]=Pd(r[n],t.name,null);return this},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new Ml(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var r=new Array(n),i=0,n,s;i<n;++i)r[i]=arguments[i+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(s=this._[t],i=0,n=s.length;i<n;++i)s[i].value.apply(e,r)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],n=0,s=i.length;n<s;++n)i[n].value.apply(e,r)}};function Yb(t,e){for(var r=0,i=t.length,n;r<i;++r)if((n=t[r]).name===e)return n.value}function Pd(t,e,r){for(var i=0,n=t.length;i<n;++i)if(t[i].name===e){t[i]=Fb,t=t.slice(0,i).concat(t.slice(i+1));break}return r!=null&&t.push({name:e,value:r}),t}var Ph="http://www.w3.org/1999/xhtml";const Yd={svg:"http://www.w3.org/2000/svg",xhtml:Ph,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Kc(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),Yd.hasOwnProperty(e)?{space:Yd[e],local:t}:t}function Vb(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===Ph&&e.documentElement.namespaceURI===Ph?e.createElement(t):e.createElementNS(r,t)}}function Ub(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function kp(t){var e=Kc(t);return(e.local?Ub:Vb)(e)}function zb(){}function X1(t){return t==null?zb:function(){return this.querySelector(t)}}function Wb(t){typeof t!="function"&&(t=X1(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var s=e[n],a=s.length,o=i[n]=new Array(a),l,u,d=0;d<a;++d)(l=s[d])&&(u=t.call(l,l.__data__,d,s))&&("__data__"in l&&(u.__data__=l.__data__),o[d]=u);return new Br(i,this._parents)}function wp(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function Hb(){return[]}function Tp(t){return t==null?Hb:function(){return this.querySelectorAll(t)}}function Gb(t){return function(){return wp(t.apply(this,arguments))}}function qb(t){typeof t=="function"?t=Gb(t):t=Tp(t);for(var e=this._groups,r=e.length,i=[],n=[],s=0;s<r;++s)for(var a=e[s],o=a.length,l,u=0;u<o;++u)(l=a[u])&&(i.push(t.call(l,l.__data__,u,a)),n.push(l));return new Br(i,n)}function Ep(t){return function(){return this.matches(t)}}function Cp(t){return function(e){return e.matches(t)}}var jb=Array.prototype.find;function $b(t){return function(){return jb.call(this.children,t)}}function Xb(){return this.firstElementChild}function Kb(t){return this.select(t==null?Xb:$b(typeof t=="function"?t:Cp(t)))}var Zb=Array.prototype.filter;function Qb(){return Array.from(this.children)}function Jb(t){return function(){return Zb.call(this.children,t)}}function t5(t){return this.selectAll(t==null?Qb:Jb(typeof t=="function"?t:Cp(t)))}function e5(t){typeof t!="function"&&(t=Ep(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var s=e[n],a=s.length,o=i[n]=[],l,u=0;u<a;++u)(l=s[u])&&t.call(l,l.__data__,u,s)&&o.push(l);return new Br(i,this._parents)}function Sp(t){return new Array(t.length)}function r5(){return new Br(this._enter||this._groups.map(Sp),this._parents)}function Zl(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Zl.prototype={constructor:Zl,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function i5(t){return function(){return t}}function n5(t,e,r,i,n,s){for(var a=0,o,l=e.length,u=s.length;a<u;++a)(o=e[a])?(o.__data__=s[a],i[a]=o):r[a]=new Zl(t,s[a]);for(;a<l;++a)(o=e[a])&&(n[a]=o)}function s5(t,e,r,i,n,s,a){var o,l,u=new Map,d=e.length,f=s.length,p=new Array(d),g;for(o=0;o<d;++o)(l=e[o])&&(p[o]=g=a.call(l,l.__data__,o,e)+"",u.has(g)?n[o]=l:u.set(g,l));for(o=0;o<f;++o)g=a.call(t,s[o],o,s)+"",(l=u.get(g))?(i[o]=l,l.__data__=s[o],u.delete(g)):r[o]=new Zl(t,s[o]);for(o=0;o<d;++o)(l=e[o])&&u.get(p[o])===l&&(n[o]=l)}function a5(t){return t.__data__}function o5(t,e){if(!arguments.length)return Array.from(this,a5);var r=e?s5:n5,i=this._parents,n=this._groups;typeof t!="function"&&(t=i5(t));for(var s=n.length,a=new Array(s),o=new Array(s),l=new Array(s),u=0;u<s;++u){var d=i[u],f=n[u],p=f.length,g=l5(t.call(d,d&&d.__data__,u,i)),_=g.length,k=o[u]=new Array(_),w=a[u]=new Array(_),S=l[u]=new Array(p);r(d,f,k,w,S,g,e);for(var A=0,O=0,P,W;A<_;++A)if(P=k[A]){for(A>=O&&(O=A+1);!(W=w[O])&&++O<_;);P._next=W||null}}return a=new Br(a,i),a._enter=o,a._exit=l,a}function l5(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function c5(){return new Br(this._exit||this._groups.map(Sp),this._parents)}function u5(t,e,r){var i=this.enter(),n=this,s=this.exit();return typeof t=="function"?(i=t(i),i&&(i=i.selection())):i=i.append(t+""),e!=null&&(n=e(n),n&&(n=n.selection())),r==null?s.remove():r(s),i&&n?i.merge(n).order():n}function h5(t){for(var e=t.selection?t.selection():t,r=this._groups,i=e._groups,n=r.length,s=i.length,a=Math.min(n,s),o=new Array(n),l=0;l<a;++l)for(var u=r[l],d=i[l],f=u.length,p=o[l]=new Array(f),g,_=0;_<f;++_)(g=u[_]||d[_])&&(p[_]=g);for(;l<n;++l)o[l]=r[l];return new Br(o,this._parents)}function d5(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var i=t[e],n=i.length-1,s=i[n],a;--n>=0;)(a=i[n])&&(s&&a.compareDocumentPosition(s)^4&&s.parentNode.insertBefore(a,s),s=a);return this}function f5(t){t||(t=p5);function e(f,p){return f&&p?t(f.__data__,p.__data__):!f-!p}for(var r=this._groups,i=r.length,n=new Array(i),s=0;s<i;++s){for(var a=r[s],o=a.length,l=n[s]=new Array(o),u,d=0;d<o;++d)(u=a[d])&&(l[d]=u);l.sort(e)}return new Br(n,this._parents).order()}function p5(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function g5(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function y5(){return Array.from(this)}function m5(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],n=0,s=i.length;n<s;++n){var a=i[n];if(a)return a}return null}function b5(){let t=0;for(const e of this)++t;return t}function _5(){return!this.node()}function x5(t){for(var e=this._groups,r=0,i=e.length;r<i;++r)for(var n=e[r],s=0,a=n.length,o;s<a;++s)(o=n[s])&&t.call(o,o.__data__,s,n);return this}function v5(t){return function(){this.removeAttribute(t)}}function k5(t){return function(){this.removeAttributeNS(t.space,t.local)}}function w5(t,e){return function(){this.setAttribute(t,e)}}function T5(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function E5(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function C5(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function S5(t,e){var r=Kc(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((e==null?r.local?k5:v5:typeof e=="function"?r.local?C5:E5:r.local?T5:w5)(r,e))}function Ap(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function A5(t){return function(){this.style.removeProperty(t)}}function L5(t,e,r){return function(){this.style.setProperty(t,e,r)}}function D5(t,e,r){return function(){var i=e.apply(this,arguments);i==null?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}function M5(t,e,r){return arguments.length>1?this.each((e==null?A5:typeof e=="function"?D5:L5)(t,e,r??"")):na(this.node(),t)}function na(t,e){return t.style.getPropertyValue(e)||Ap(t).getComputedStyle(t,null).getPropertyValue(e)}function N5(t){return function(){delete this[t]}}function B5(t,e){return function(){this[t]=e}}function I5(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function O5(t,e){return arguments.length>1?this.each((e==null?N5:typeof e=="function"?I5:B5)(t,e)):this.node()[t]}function Lp(t){return t.trim().split(/^|\s+/)}function K1(t){return t.classList||new Dp(t)}function Dp(t){this._node=t,this._names=Lp(t.getAttribute("class")||"")}Dp.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function Mp(t,e){for(var r=K1(t),i=-1,n=e.length;++i<n;)r.add(e[i])}function Np(t,e){for(var r=K1(t),i=-1,n=e.length;++i<n;)r.remove(e[i])}function R5(t){return function(){Mp(this,t)}}function F5(t){return function(){Np(this,t)}}function P5(t,e){return function(){(e.apply(this,arguments)?Mp:Np)(this,t)}}function Y5(t,e){var r=Lp(t+"");if(arguments.length<2){for(var i=K1(this.node()),n=-1,s=r.length;++n<s;)if(!i.contains(r[n]))return!1;return!0}return this.each((typeof e=="function"?P5:e?R5:F5)(r,e))}function V5(){this.textContent=""}function U5(t){return function(){this.textContent=t}}function z5(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}function W5(t){return arguments.length?this.each(t==null?V5:(typeof t=="function"?z5:U5)(t)):this.node().textContent}function H5(){this.innerHTML=""}function G5(t){return function(){this.innerHTML=t}}function q5(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}function j5(t){return arguments.length?this.each(t==null?H5:(typeof t=="function"?q5:G5)(t)):this.node().innerHTML}function $5(){this.nextSibling&&this.parentNode.appendChild(this)}function X5(){return this.each($5)}function K5(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Z5(){return this.each(K5)}function Q5(t){var e=typeof t=="function"?t:kp(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function J5(){return null}function t_(t,e){var r=typeof t=="function"?t:kp(t),i=e==null?J5:typeof e=="function"?e:X1(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})}function e_(){var t=this.parentNode;t&&t.removeChild(this)}function r_(){return this.each(e_)}function i_(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function n_(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function s_(t){return this.select(t?n_:i_)}function a_(t){return arguments.length?this.property("__data__",t):this.node().__data__}function o_(t){return function(e){t.call(this,e,this.__data__)}}function l_(t){return t.trim().split(/^|\s+/).map(function(e){var r="",i=e.indexOf(".");return i>=0&&(r=e.slice(i+1),e=e.slice(0,i)),{type:e,name:r}})}function c_(t){return function(){var e=this.__on;if(e){for(var r=0,i=-1,n=e.length,s;r<n;++r)s=e[r],(!t.type||s.type===t.type)&&s.name===t.name?this.removeEventListener(s.type,s.listener,s.options):e[++i]=s;++i?e.length=i:delete this.__on}}}function u_(t,e,r){return function(){var i=this.__on,n,s=o_(e);if(i){for(var a=0,o=i.length;a<o;++a)if((n=i[a]).type===t.type&&n.name===t.name){this.removeEventListener(n.type,n.listener,n.options),this.addEventListener(n.type,n.listener=s,n.options=r),n.value=e;return}}this.addEventListener(t.type,s,r),n={type:t.type,name:t.name,value:e,listener:s,options:r},i?i.push(n):this.__on=[n]}}function h_(t,e,r){var i=l_(t+""),n,s=i.length,a;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,u=o.length,d;l<u;++l)for(n=0,d=o[l];n<s;++n)if((a=i[n]).type===d.type&&a.name===d.name)return d.value}return}for(o=e?u_:c_,n=0;n<s;++n)this.each(o(i[n],e,r));return this}function Bp(t,e,r){var i=Ap(t),n=i.CustomEvent;typeof n=="function"?n=new n(e,r):(n=i.document.createEvent("Event"),r?(n.initEvent(e,r.bubbles,r.cancelable),n.detail=r.detail):n.initEvent(e,!1,!1)),t.dispatchEvent(n)}function d_(t,e){return function(){return Bp(this,t,e)}}function f_(t,e){return function(){return Bp(this,t,e.apply(this,arguments))}}function p_(t,e){return this.each((typeof e=="function"?f_:d_)(t,e))}function*g_(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],n=0,s=i.length,a;n<s;++n)(a=i[n])&&(yield a)}var Z1=[null];function Br(t,e){this._groups=t,this._parents=e}function zo(){return new Br([[document.documentElement]],Z1)}function y_(){return this}Br.prototype=zo.prototype={constructor:Br,select:Wb,selectAll:qb,selectChild:Kb,selectChildren:t5,filter:e5,data:o5,enter:r5,exit:c5,join:u5,merge:h5,selection:y_,order:d5,sort:f5,call:g5,nodes:y5,node:m5,size:b5,empty:_5,each:x5,attr:S5,style:M5,property:O5,classed:Y5,text:W5,html:j5,raise:X5,lower:Z5,append:Q5,insert:t_,remove:r_,clone:s_,datum:a_,on:h_,dispatch:p_,[Symbol.iterator]:g_};function At(t){return typeof t=="string"?new Br([[document.querySelector(t)]],[document.documentElement]):new Br([[t]],Z1)}function Q1(t){return typeof t=="string"?new Br([document.querySelectorAll(t)],[document.documentElement]):new Br([wp(t)],Z1)}function Wo(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function Zc(t,e){var r=Object.create(t.prototype);for(var i in e)r[i]=e[i];return r}function Es(){}var ho=.7,Ql=1/ho,Zs="\\s*([+-]?\\d+)\\s*",fo="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Pi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",m_=/^#([0-9a-f]{3,8})$/,b_=new RegExp(`^rgb\\(${Zs},${Zs},${Zs}\\)$`),__=new RegExp(`^rgb\\(${Pi},${Pi},${Pi}\\)$`),x_=new RegExp(`^rgba\\(${Zs},${Zs},${Zs},${fo}\\)$`),v_=new RegExp(`^rgba\\(${Pi},${Pi},${Pi},${fo}\\)$`),k_=new RegExp(`^hsl\\(${fo},${Pi},${Pi}\\)$`),w_=new RegExp(`^hsla\\(${fo},${Pi},${Pi},${fo}\\)$`),Vd={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};Wo(Es,ps,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:Ud,formatHex:Ud,formatHex8:T_,formatHsl:E_,formatRgb:zd,toString:zd});function Ud(){return this.rgb().formatHex()}function T_(){return this.rgb().formatHex8()}function E_(){return Op(this).formatHsl()}function zd(){return this.rgb().formatRgb()}function ps(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=m_.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?Wd(e):r===3?new Tr(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?dl(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?dl(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=b_.exec(t))?new Tr(e[1],e[2],e[3],1):(e=__.exec(t))?new Tr(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=x_.exec(t))?dl(e[1],e[2],e[3],e[4]):(e=v_.exec(t))?dl(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=k_.exec(t))?qd(e[1],e[2]/100,e[3]/100,1):(e=w_.exec(t))?qd(e[1],e[2]/100,e[3]/100,e[4]):Vd.hasOwnProperty(t)?Wd(Vd[t]):t==="transparent"?new Tr(NaN,NaN,NaN,0):null}function Wd(t){return new Tr(t>>16&255,t>>8&255,t&255,1)}function dl(t,e,r,i){return i<=0&&(t=e=r=NaN),new Tr(t,e,r,i)}function Ip(t){return t instanceof Es||(t=ps(t)),t?(t=t.rgb(),new Tr(t.r,t.g,t.b,t.opacity)):new Tr}function Yh(t,e,r,i){return arguments.length===1?Ip(t):new Tr(t,e,r,i??1)}function Tr(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}Wo(Tr,Yh,Zc(Es,{brighter(t){return t=t==null?Ql:Math.pow(Ql,t),new Tr(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?ho:Math.pow(ho,t),new Tr(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Tr(ds(this.r),ds(this.g),ds(this.b),Jl(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:Hd,formatHex:Hd,formatHex8:C_,formatRgb:Gd,toString:Gd}));function Hd(){return`#${hs(this.r)}${hs(this.g)}${hs(this.b)}`}function C_(){return`#${hs(this.r)}${hs(this.g)}${hs(this.b)}${hs((isNaN(this.opacity)?1:this.opacity)*255)}`}function Gd(){const t=Jl(this.opacity);return`${t===1?"rgb(":"rgba("}${ds(this.r)}, ${ds(this.g)}, ${ds(this.b)}${t===1?")":`, ${t})`}`}function Jl(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ds(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function hs(t){return t=ds(t),(t<16?"0":"")+t.toString(16)}function qd(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new hi(t,e,r,i)}function Op(t){if(t instanceof hi)return new hi(t.h,t.s,t.l,t.opacity);if(t instanceof Es||(t=ps(t)),!t)return new hi;if(t instanceof hi)return t;t=t.rgb();var e=t.r/255,r=t.g/255,i=t.b/255,n=Math.min(e,r,i),s=Math.max(e,r,i),a=NaN,o=s-n,l=(s+n)/2;return o?(e===s?a=(r-i)/o+(r<i)*6:r===s?a=(i-e)/o+2:a=(e-r)/o+4,o/=l<.5?s+n:2-s-n,a*=60):o=l>0&&l<1?0:a,new hi(a,o,l,t.opacity)}function S_(t,e,r,i){return arguments.length===1?Op(t):new hi(t,e,r,i??1)}function hi(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}Wo(hi,S_,Zc(Es,{brighter(t){return t=t==null?Ql:Math.pow(Ql,t),new hi(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?ho:Math.pow(ho,t),new hi(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*e,n=2*r-i;return new Tr(Gu(t>=240?t-240:t+120,n,i),Gu(t,n,i),Gu(t<120?t+240:t-120,n,i),this.opacity)},clamp(){return new hi(jd(this.h),fl(this.s),fl(this.l),Jl(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(){const t=Jl(this.opacity);return`${t===1?"hsl(":"hsla("}${jd(this.h)}, ${fl(this.s)*100}%, ${fl(this.l)*100}%${t===1?")":`, ${t})`}`}}));function jd(t){return t=(t||0)%360,t<0?t+360:t}function fl(t){return Math.max(0,Math.min(1,t||0))}function Gu(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const A_=Math.PI/180,L_=180/Math.PI,tc=18,Rp=.96422,Fp=1,Pp=.82521,Yp=4/29,Qs=6/29,Vp=3*Qs*Qs,D_=Qs*Qs*Qs;function Up(t){if(t instanceof Yi)return new Yi(t.l,t.a,t.b,t.opacity);if(t instanceof cn)return zp(t);t instanceof Tr||(t=Ip(t));var e=Xu(t.r),r=Xu(t.g),i=Xu(t.b),n=qu((.2225045*e+.7168786*r+.0606169*i)/Fp),s,a;return e===r&&r===i?s=a=n:(s=qu((.4360747*e+.3850649*r+.1430804*i)/Rp),a=qu((.0139322*e+.0971045*r+.7141733*i)/Pp)),new Yi(116*n-16,500*(s-n),200*(n-a),t.opacity)}function M_(t,e,r,i){return arguments.length===1?Up(t):new Yi(t,e,r,i??1)}function Yi(t,e,r,i){this.l=+t,this.a=+e,this.b=+r,this.opacity=+i}Wo(Yi,M_,Zc(Es,{brighter(t){return new Yi(this.l+tc*(t??1),this.a,this.b,this.opacity)},darker(t){return new Yi(this.l-tc*(t??1),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return e=Rp*ju(e),t=Fp*ju(t),r=Pp*ju(r),new Tr($u(3.1338561*e-1.6168667*t-.4906146*r),$u(-.9787684*e+1.9161415*t+.033454*r),$u(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}}));function qu(t){return t>D_?Math.pow(t,1/3):t/Vp+Yp}function ju(t){return t>Qs?t*t*t:Vp*(t-Yp)}function $u(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Xu(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function N_(t){if(t instanceof cn)return new cn(t.h,t.c,t.l,t.opacity);if(t instanceof Yi||(t=Up(t)),t.a===0&&t.b===0)return new cn(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*L_;return new cn(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Vh(t,e,r,i){return arguments.length===1?N_(t):new cn(t,e,r,i??1)}function cn(t,e,r,i){this.h=+t,this.c=+e,this.l=+r,this.opacity=+i}function zp(t){if(isNaN(t.h))return new Yi(t.l,0,0,t.opacity);var e=t.h*A_;return new Yi(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Wo(cn,Vh,Zc(Es,{brighter(t){return new cn(this.h,this.c,this.l+tc*(t??1),this.opacity)},darker(t){return new cn(this.h,this.c,this.l-tc*(t??1),this.opacity)},rgb(){return zp(this).rgb()}}));const Qc=t=>()=>t;function Wp(t,e){return function(r){return t+r*e}}function B_(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(i){return Math.pow(t+i*e,r)}}function I_(t,e){var r=e-t;return r?Wp(t,r>180||r<-180?r-360*Math.round(r/360):r):Qc(isNaN(t)?e:t)}function O_(t){return(t=+t)==1?Ja:function(e,r){return r-e?B_(e,r,t):Qc(isNaN(e)?r:e)}}function Ja(t,e){var r=e-t;return r?Wp(t,r):Qc(isNaN(t)?e:t)}const ec=function t(e){var r=O_(e);function i(n,s){var a=r((n=Yh(n)).r,(s=Yh(s)).r),o=r(n.g,s.g),l=r(n.b,s.b),u=Ja(n.opacity,s.opacity);return function(d){return n.r=a(d),n.g=o(d),n.b=l(d),n.opacity=u(d),n+""}}return i.gamma=t,i}(1);function R_(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,i=e.slice(),n;return function(s){for(n=0;n<r;++n)i[n]=t[n]*(1-s)+e[n]*s;return i}}function F_(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function P_(t,e){var r=e?e.length:0,i=t?Math.min(r,t.length):0,n=new Array(i),s=new Array(r),a;for(a=0;a<i;++a)n[a]=J1(t[a],e[a]);for(;a<r;++a)s[a]=e[a];return function(o){for(a=0;a<i;++a)s[a]=n[a](o);return s}}function Y_(t,e){var r=new Date;return t=+t,e=+e,function(i){return r.setTime(t*(1-i)+e*i),r}}function ui(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function V_(t,e){var r={},i={},n;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(n in e)n in t?r[n]=J1(t[n],e[n]):i[n]=e[n];return function(s){for(n in r)i[n]=r[n](s);return i}}var Uh=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Ku=new RegExp(Uh.source,"g");function U_(t){return function(){return t}}function z_(t){return function(e){return t(e)+""}}function Hp(t,e){var r=Uh.lastIndex=Ku.lastIndex=0,i,n,s,a=-1,o=[],l=[];for(t=t+"",e=e+"";(i=Uh.exec(t))&&(n=Ku.exec(e));)(s=n.index)>r&&(s=e.slice(r,s),o[a]?o[a]+=s:o[++a]=s),(i=i[0])===(n=n[0])?o[a]?o[a]+=n:o[++a]=n:(o[++a]=null,l.push({i:a,x:ui(i,n)})),r=Ku.lastIndex;return r<e.length&&(s=e.slice(r),o[a]?o[a]+=s:o[++a]=s),o.length<2?l[0]?z_(l[0].x):U_(e):(e=l.length,function(u){for(var d=0,f;d<e;++d)o[(f=l[d]).i]=f.x(u);return o.join("")})}function J1(t,e){var r=typeof e,i;return e==null||r==="boolean"?Qc(e):(r==="number"?ui:r==="string"?(i=ps(e))?(e=i,ec):Hp:e instanceof ps?ec:e instanceof Date?Y_:F_(e)?R_:Array.isArray(e)?P_:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?V_:ui)(t,e)}function W_(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}var $d=180/Math.PI,zh={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Gp(t,e,r,i,n,s){var a,o,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*r+e*i)&&(r-=t*l,i-=e*l),(o=Math.sqrt(r*r+i*i))&&(r/=o,i/=o,l/=o),t*i<e*r&&(t=-t,e=-e,l=-l,a=-a),{translateX:n,translateY:s,rotate:Math.atan2(e,t)*$d,skewX:Math.atan(l)*$d,scaleX:a,scaleY:o}}var pl;function H_(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?zh:Gp(e.a,e.b,e.c,e.d,e.e,e.f)}function G_(t){return t==null||(pl||(pl=document.createElementNS("http://www.w3.org/2000/svg","g")),pl.setAttribute("transform",t),!(t=pl.transform.baseVal.consolidate()))?zh:(t=t.matrix,Gp(t.a,t.b,t.c,t.d,t.e,t.f))}function qp(t,e,r,i){function n(u){return u.length?u.pop()+" ":""}function s(u,d,f,p,g,_){if(u!==f||d!==p){var k=g.push("translate(",null,e,null,r);_.push({i:k-4,x:ui(u,f)},{i:k-2,x:ui(d,p)})}else(f||p)&&g.push("translate("+f+e+p+r)}function a(u,d,f,p){u!==d?(u-d>180?d+=360:d-u>180&&(u+=360),p.push({i:f.push(n(f)+"rotate(",null,i)-2,x:ui(u,d)})):d&&f.push(n(f)+"rotate("+d+i)}function o(u,d,f,p){u!==d?p.push({i:f.push(n(f)+"skewX(",null,i)-2,x:ui(u,d)}):d&&f.push(n(f)+"skewX("+d+i)}function l(u,d,f,p,g,_){if(u!==f||d!==p){var k=g.push(n(g)+"scale(",null,",",null,")");_.push({i:k-4,x:ui(u,f)},{i:k-2,x:ui(d,p)})}else(f!==1||p!==1)&&g.push(n(g)+"scale("+f+","+p+")")}return function(u,d){var f=[],p=[];return u=t(u),d=t(d),s(u.translateX,u.translateY,d.translateX,d.translateY,f,p),a(u.rotate,d.rotate,f,p),o(u.skewX,d.skewX,f,p),l(u.scaleX,u.scaleY,d.scaleX,d.scaleY,f,p),u=d=null,function(g){for(var _=-1,k=p.length,w;++_<k;)f[(w=p[_]).i]=w.x(g);return f.join("")}}}var q_=qp(H_,"px, ","px)","deg)"),j_=qp(G_,", ",")",")");function $_(t){return function(e,r){var i=t((e=Vh(e)).h,(r=Vh(r)).h),n=Ja(e.c,r.c),s=Ja(e.l,r.l),a=Ja(e.opacity,r.opacity);return function(o){return e.h=i(o),e.c=n(o),e.l=s(o),e.opacity=a(o),e+""}}}const X_=$_(I_);var sa=0,ja=0,Oa=0,jp=1e3,rc,$a,ic=0,gs=0,Jc=0,po=typeof performance=="object"&&performance.now?performance:Date,$p=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function t0(){return gs||($p(K_),gs=po.now()+Jc)}function K_(){gs=0}function nc(){this._call=this._time=this._next=null}nc.prototype=Xp.prototype={constructor:nc,restart:function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?t0():+r)+(e==null?0:+e),!this._next&&$a!==this&&($a?$a._next=this:rc=this,$a=this),this._call=t,this._time=r,Wh()},stop:function(){this._call&&(this._call=null,this._time=1/0,Wh())}};function Xp(t,e,r){var i=new nc;return i.restart(t,e,r),i}function Z_(){t0(),++sa;for(var t=rc,e;t;)(e=gs-t._time)>=0&&t._call.call(void 0,e),t=t._next;--sa}function Xd(){gs=(ic=po.now())+Jc,sa=ja=0;try{Z_()}finally{sa=0,J_(),gs=0}}function Q_(){var t=po.now(),e=t-ic;e>jp&&(Jc-=e,ic=t)}function J_(){for(var t,e=rc,r,i=1/0;e;)e._call?(i>e._time&&(i=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:rc=r);$a=t,Wh(i)}function Wh(t){if(!sa){ja&&(ja=clearTimeout(ja));var e=t-gs;e>24?(t<1/0&&(ja=setTimeout(Xd,t-po.now()-Jc)),Oa&&(Oa=clearInterval(Oa))):(Oa||(ic=po.now(),Oa=setInterval(Q_,jp)),sa=1,$p(Xd))}}function Kd(t,e,r){var i=new nc;return e=e==null?0:+e,i.restart(n=>{i.stop(),t(n+e)},e,r),i}var tx=vp("start","end","cancel","interrupt"),ex=[],Kp=0,Zd=1,Hh=2,Nl=3,Qd=4,Gh=5,Bl=6;function tu(t,e,r,i,n,s){var a=t.__transition;if(!a)t.__transition={};else if(r in a)return;rx(t,r,{name:e,index:i,group:n,on:tx,tween:ex,time:s.time,delay:s.delay,duration:s.duration,ease:s.ease,timer:null,state:Kp})}function e0(t,e){var r=wi(t,e);if(r.state>Kp)throw new Error("too late; already scheduled");return r}function Hi(t,e){var r=wi(t,e);if(r.state>Nl)throw new Error("too late; already running");return r}function wi(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function rx(t,e,r){var i=t.__transition,n;i[e]=r,r.timer=Xp(s,0,r.time);function s(u){r.state=Zd,r.timer.restart(a,r.delay,r.time),r.delay<=u&&a(u-r.delay)}function a(u){var d,f,p,g;if(r.state!==Zd)return l();for(d in i)if(g=i[d],g.name===r.name){if(g.state===Nl)return Kd(a);g.state===Qd?(g.state=Bl,g.timer.stop(),g.on.call("interrupt",t,t.__data__,g.index,g.group),delete i[d]):+d<e&&(g.state=Bl,g.timer.stop(),g.on.call("cancel",t,t.__data__,g.index,g.group),delete i[d])}if(Kd(function(){r.state===Nl&&(r.state=Qd,r.timer.restart(o,r.delay,r.time),o(u))}),r.state=Hh,r.on.call("start",t,t.__data__,r.index,r.group),r.state===Hh){for(r.state=Nl,n=new Array(p=r.tween.length),d=0,f=-1;d<p;++d)(g=r.tween[d].value.call(t,t.__data__,r.index,r.group))&&(n[++f]=g);n.length=f+1}}function o(u){for(var d=u<r.duration?r.ease.call(null,u/r.duration):(r.timer.restart(l),r.state=Gh,1),f=-1,p=n.length;++f<p;)n[f].call(t,d);r.state===Gh&&(r.on.call("end",t,t.__data__,r.index,r.group),l())}function l(){r.state=Bl,r.timer.stop(),delete i[e];for(var u in i)return;delete t.__transition}}function ix(t,e){var r=t.__transition,i,n,s=!0,a;if(r){e=e==null?null:e+"";for(a in r){if((i=r[a]).name!==e){s=!1;continue}n=i.state>Hh&&i.state<Gh,i.state=Bl,i.timer.stop(),i.on.call(n?"interrupt":"cancel",t,t.__data__,i.index,i.group),delete r[a]}s&&delete t.__transition}}function nx(t){return this.each(function(){ix(this,t)})}function sx(t,e){var r,i;return function(){var n=Hi(this,t),s=n.tween;if(s!==r){i=r=s;for(var a=0,o=i.length;a<o;++a)if(i[a].name===e){i=i.slice(),i.splice(a,1);break}}n.tween=i}}function ax(t,e,r){var i,n;if(typeof r!="function")throw new Error;return function(){var s=Hi(this,t),a=s.tween;if(a!==i){n=(i=a).slice();for(var o={name:e,value:r},l=0,u=n.length;l<u;++l)if(n[l].name===e){n[l]=o;break}l===u&&n.push(o)}s.tween=n}}function ox(t,e){var r=this._id;if(t+="",arguments.length<2){for(var i=wi(this.node(),r).tween,n=0,s=i.length,a;n<s;++n)if((a=i[n]).name===t)return a.value;return null}return this.each((e==null?sx:ax)(r,t,e))}function r0(t,e,r){var i=t._id;return t.each(function(){var n=Hi(this,i);(n.value||(n.value={}))[e]=r.apply(this,arguments)}),function(n){return wi(n,i).value[e]}}function Zp(t,e){var r;return(typeof e=="number"?ui:e instanceof ps?ec:(r=ps(e))?(e=r,ec):Hp)(t,e)}function lx(t){return function(){this.removeAttribute(t)}}function cx(t){return function(){this.removeAttributeNS(t.space,t.local)}}function ux(t,e,r){var i,n=r+"",s;return function(){var a=this.getAttribute(t);return a===n?null:a===i?s:s=e(i=a,r)}}function hx(t,e,r){var i,n=r+"",s;return function(){var a=this.getAttributeNS(t.space,t.local);return a===n?null:a===i?s:s=e(i=a,r)}}function dx(t,e,r){var i,n,s;return function(){var a,o=r(this),l;return o==null?void this.removeAttribute(t):(a=this.getAttribute(t),l=o+"",a===l?null:a===i&&l===n?s:(n=l,s=e(i=a,o)))}}function fx(t,e,r){var i,n,s;return function(){var a,o=r(this),l;return o==null?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local),l=o+"",a===l?null:a===i&&l===n?s:(n=l,s=e(i=a,o)))}}function px(t,e){var r=Kc(t),i=r==="transform"?j_:Zp;return this.attrTween(t,typeof e=="function"?(r.local?fx:dx)(r,i,r0(this,"attr."+t,e)):e==null?(r.local?cx:lx)(r):(r.local?hx:ux)(r,i,e))}function gx(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function yx(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function mx(t,e){var r,i;function n(){var s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&yx(t,s)),r}return n._value=e,n}function bx(t,e){var r,i;function n(){var s=e.apply(this,arguments);return s!==i&&(r=(i=s)&&gx(t,s)),r}return n._value=e,n}function _x(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var i=Kc(t);return this.tween(r,(i.local?mx:bx)(i,e))}function xx(t,e){return function(){e0(this,t).delay=+e.apply(this,arguments)}}function vx(t,e){return e=+e,function(){e0(this,t).delay=e}}function kx(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?xx:vx)(e,t)):wi(this.node(),e).delay}function wx(t,e){return function(){Hi(this,t).duration=+e.apply(this,arguments)}}function Tx(t,e){return e=+e,function(){Hi(this,t).duration=e}}function Ex(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?wx:Tx)(e,t)):wi(this.node(),e).duration}function Cx(t,e){if(typeof e!="function")throw new Error;return function(){Hi(this,t).ease=e}}function Sx(t){var e=this._id;return arguments.length?this.each(Cx(e,t)):wi(this.node(),e).ease}function Ax(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;Hi(this,t).ease=r}}function Lx(t){if(typeof t!="function")throw new Error;return this.each(Ax(this._id,t))}function Dx(t){typeof t!="function"&&(t=Ep(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var s=e[n],a=s.length,o=i[n]=[],l,u=0;u<a;++u)(l=s[u])&&t.call(l,l.__data__,u,s)&&o.push(l);return new bn(i,this._parents,this._name,this._id)}function Mx(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,i=e.length,n=r.length,s=Math.min(i,n),a=new Array(i),o=0;o<s;++o)for(var l=e[o],u=r[o],d=l.length,f=a[o]=new Array(d),p,g=0;g<d;++g)(p=l[g]||u[g])&&(f[g]=p);for(;o<i;++o)a[o]=e[o];return new bn(a,this._parents,this._name,this._id)}function Nx(t){return(t+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function Bx(t,e,r){var i,n,s=Nx(e)?e0:Hi;return function(){var a=s(this,t),o=a.on;o!==i&&(n=(i=o).copy()).on(e,r),a.on=n}}function Ix(t,e){var r=this._id;return arguments.length<2?wi(this.node(),r).on.on(t):this.each(Bx(r,t,e))}function Ox(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function Rx(){return this.on("end.remove",Ox(this._id))}function Fx(t){var e=this._name,r=this._id;typeof t!="function"&&(t=X1(t));for(var i=this._groups,n=i.length,s=new Array(n),a=0;a<n;++a)for(var o=i[a],l=o.length,u=s[a]=new Array(l),d,f,p=0;p<l;++p)(d=o[p])&&(f=t.call(d,d.__data__,p,o))&&("__data__"in d&&(f.__data__=d.__data__),u[p]=f,tu(u[p],e,r,p,u,wi(d,r)));return new bn(s,this._parents,e,r)}function Px(t){var e=this._name,r=this._id;typeof t!="function"&&(t=Tp(t));for(var i=this._groups,n=i.length,s=[],a=[],o=0;o<n;++o)for(var l=i[o],u=l.length,d,f=0;f<u;++f)if(d=l[f]){for(var p=t.call(d,d.__data__,f,l),g,_=wi(d,r),k=0,w=p.length;k<w;++k)(g=p[k])&&tu(g,e,r,k,p,_);s.push(p),a.push(d)}return new bn(s,a,e,r)}var Yx=zo.prototype.constructor;function Vx(){return new Yx(this._groups,this._parents)}function Ux(t,e){var r,i,n;return function(){var s=na(this,t),a=(this.style.removeProperty(t),na(this,t));return s===a?null:s===r&&a===i?n:n=e(r=s,i=a)}}function Qp(t){return function(){this.style.removeProperty(t)}}function zx(t,e,r){var i,n=r+"",s;return function(){var a=na(this,t);return a===n?null:a===i?s:s=e(i=a,r)}}function Wx(t,e,r){var i,n,s;return function(){var a=na(this,t),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(t),na(this,t))),a===l?null:a===i&&l===n?s:(n=l,s=e(i=a,o))}}function Hx(t,e){var r,i,n,s="style."+e,a="end."+s,o;return function(){var l=Hi(this,t),u=l.on,d=l.value[s]==null?o||(o=Qp(e)):void 0;(u!==r||n!==d)&&(i=(r=u).copy()).on(a,n=d),l.on=i}}function Gx(t,e,r){var i=(t+="")=="transform"?q_:Zp;return e==null?this.styleTween(t,Ux(t,i)).on("end.style."+t,Qp(t)):typeof e=="function"?this.styleTween(t,Wx(t,i,r0(this,"style."+t,e))).each(Hx(this._id,t)):this.styleTween(t,zx(t,i,e),r).on("end.style."+t,null)}function qx(t,e,r){return function(i){this.style.setProperty(t,e.call(this,i),r)}}function jx(t,e,r){var i,n;function s(){var a=e.apply(this,arguments);return a!==n&&(i=(n=a)&&qx(t,a,r)),i}return s._value=e,s}function $x(t,e,r){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(e==null)return this.tween(i,null);if(typeof e!="function")throw new Error;return this.tween(i,jx(t,e,r??""))}function Xx(t){return function(){this.textContent=t}}function Kx(t){return function(){var e=t(this);this.textContent=e??""}}function Zx(t){return this.tween("text",typeof t=="function"?Kx(r0(this,"text",t)):Xx(t==null?"":t+""))}function Qx(t){return function(e){this.textContent=t.call(this,e)}}function Jx(t){var e,r;function i(){var n=t.apply(this,arguments);return n!==r&&(e=(r=n)&&Qx(n)),e}return i._value=t,i}function tv(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,Jx(t))}function ev(){for(var t=this._name,e=this._id,r=Jp(),i=this._groups,n=i.length,s=0;s<n;++s)for(var a=i[s],o=a.length,l,u=0;u<o;++u)if(l=a[u]){var d=wi(l,e);tu(l,t,r,u,a,{time:d.time+d.delay+d.duration,delay:0,duration:d.duration,ease:d.ease})}return new bn(i,this._parents,t,r)}function rv(){var t,e,r=this,i=r._id,n=r.size();return new Promise(function(s,a){var o={value:a},l={value:function(){--n===0&&s()}};r.each(function(){var u=Hi(this,i),d=u.on;d!==t&&(e=(t=d).copy(),e._.cancel.push(o),e._.interrupt.push(o),e._.end.push(l)),u.on=e}),n===0&&s()})}var iv=0;function bn(t,e,r,i){this._groups=t,this._parents=e,this._name=r,this._id=i}function Jp(){return++iv}var Qi=zo.prototype;bn.prototype={constructor:bn,select:Fx,selectAll:Px,selectChild:Qi.selectChild,selectChildren:Qi.selectChildren,filter:Dx,merge:Mx,selection:Vx,transition:ev,call:Qi.call,nodes:Qi.nodes,node:Qi.node,size:Qi.size,empty:Qi.empty,each:Qi.each,on:Ix,attr:px,attrTween:_x,style:Gx,styleTween:$x,text:Zx,textTween:tv,remove:Rx,tween:ox,delay:kx,duration:Ex,ease:Sx,easeVarying:Lx,end:rv,[Symbol.iterator]:Qi[Symbol.iterator]};function nv(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var sv={time:null,delay:0,duration:250,ease:nv};function av(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 ov(t){var e,r;t instanceof bn?(e=t._id,t=t._name):(e=Jp(),(r=sv).time=t0(),t=t==null?null:t+"");for(var i=this._groups,n=i.length,s=0;s<n;++s)for(var a=i[s],o=a.length,l,u=0;u<o;++u)(l=a[u])&&tu(l,t,e,u,a,r||av(l,e));return new bn(i,this._parents,t,e)}zo.prototype.interrupt=nx;zo.prototype.transition=ov;const qh=Math.PI,jh=2*qh,os=1e-6,lv=jh-os;function tg(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}function cv(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return tg;const r=10**e;return function(i){this._+=i[0];for(let n=1,s=i.length;n<s;++n)this._+=Math.round(arguments[n]*r)/r+i[n]}}class uv{constructor(e){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=e==null?tg:cv(e)}moveTo(e,r){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(e,r){this._append`L${this._x1=+e},${this._y1=+r}`}quadraticCurveTo(e,r,i,n){this._append`Q${+e},${+r},${this._x1=+i},${this._y1=+n}`}bezierCurveTo(e,r,i,n,s,a){this._append`C${+e},${+r},${+i},${+n},${this._x1=+s},${this._y1=+a}`}arcTo(e,r,i,n,s){if(e=+e,r=+r,i=+i,n=+n,s=+s,s<0)throw new Error(`negative radius: ${s}`);let a=this._x1,o=this._y1,l=i-e,u=n-r,d=a-e,f=o-r,p=d*d+f*f;if(this._x1===null)this._append`M${this._x1=e},${this._y1=r}`;else if(p>os)if(!(Math.abs(f*l-u*d)>os)||!s)this._append`L${this._x1=e},${this._y1=r}`;else{let g=i-a,_=n-o,k=l*l+u*u,w=g*g+_*_,S=Math.sqrt(k),A=Math.sqrt(p),O=s*Math.tan((qh-Math.acos((k+p-w)/(2*S*A)))/2),P=O/A,W=O/S;Math.abs(P-1)>os&&this._append`L${e+P*d},${r+P*f}`,this._append`A${s},${s},0,0,${+(f*g>d*_)},${this._x1=e+W*l},${this._y1=r+W*u}`}}arc(e,r,i,n,s,a){if(e=+e,r=+r,i=+i,a=!!a,i<0)throw new Error(`negative radius: ${i}`);let o=i*Math.cos(n),l=i*Math.sin(n),u=e+o,d=r+l,f=1^a,p=a?n-s:s-n;this._x1===null?this._append`M${u},${d}`:(Math.abs(this._x1-u)>os||Math.abs(this._y1-d)>os)&&this._append`L${u},${d}`,i&&(p<0&&(p=p%jh+jh),p>lv?this._append`A${i},${i},0,1,${f},${e-o},${r-l}A${i},${i},0,1,${f},${this._x1=u},${this._y1=d}`:p>os&&this._append`A${i},${i},0,${+(p>=qh)},${f},${this._x1=e+i*Math.cos(s)},${this._y1=r+i*Math.sin(s)}`)}rect(e,r,i,n){this._append`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${i=+i}v${+n}h${-i}Z`}toString(){return this._}}function hv(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function dv(t,e){return fetch(t,e).then(hv)}function fv(t){return(e,r)=>dv(e,r).then(i=>new DOMParser().parseFromString(i,t))}var pv=fv("image/svg+xml");function gv(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function sc(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,i=t.slice(0,r);return[i.length>1?i[0]+i.slice(2):i,+t.slice(r+1)]}function aa(t){return t=sc(Math.abs(t)),t?t[1]:NaN}function yv(t,e){return function(r,i){for(var n=r.length,s=[],a=0,o=t[0],l=0;n>0&&o>0&&(l+o+1>i&&(o=Math.max(1,i-l)),s.push(r.substring(n-=o,n+o)),!((l+=o+1)>i));)o=t[a=(a+1)%t.length];return s.reverse().join(e)}}function mv(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var bv=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function ac(t){if(!(e=bv.exec(t)))throw new Error("invalid format: "+t);var e;return new i0({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]})}ac.prototype=i0.prototype;function i0(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}i0.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function _v(t){t:for(var e=t.length,r=1,i=-1,n;r<e;++r)switch(t[r]){case".":i=n=r;break;case"0":i===0&&(i=r),n=r;break;default:if(!+t[r])break t;i>0&&(i=0);break}return i>0?t.slice(0,i)+t.slice(n+1):t}var eg;function xv(t,e){var r=sc(t,e);if(!r)return t+"";var i=r[0],n=r[1],s=n-(eg=Math.max(-8,Math.min(8,Math.floor(n/3)))*3)+1,a=i.length;return s===a?i:s>a?i+new Array(s-a+1).join("0"):s>0?i.slice(0,s)+"."+i.slice(s):"0."+new Array(1-s).join("0")+sc(t,Math.max(0,e+s-1))[0]}function Jd(t,e){var r=sc(t,e);if(!r)return t+"";var i=r[0],n=r[1];return n<0?"0."+new Array(-n).join("0")+i:i.length>n+1?i.slice(0,n+1)+"."+i.slice(n+1):i+new Array(n-i.length+2).join("0")}const tf={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:gv,e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>Jd(t*100,e),r:Jd,s:xv,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function ef(t){return t}var rf=Array.prototype.map,nf=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function vv(t){var e=t.grouping===void 0||t.thousands===void 0?ef:yv(rf.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",i=t.currency===void 0?"":t.currency[1]+"",n=t.decimal===void 0?".":t.decimal+"",s=t.numerals===void 0?ef:mv(rf.call(t.numerals,String)),a=t.percent===void 0?"%":t.percent+"",o=t.minus===void 0?"−":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function u(f){f=ac(f);var p=f.fill,g=f.align,_=f.sign,k=f.symbol,w=f.zero,S=f.width,A=f.comma,O=f.precision,P=f.trim,W=f.type;W==="n"?(A=!0,W="g"):tf[W]||(O===void 0&&(O=12),P=!0,W="g"),(w||p==="0"&&g==="=")&&(w=!0,p="0",g="=");var q=k==="$"?r:k==="#"&&/[boxX]/.test(W)?"0"+W.toLowerCase():"",z=k==="$"?i:/[%p]/.test(W)?a:"",H=tf[W],N=/[defgprs%]/.test(W);O=O===void 0?6:/[gprs]/.test(W)?Math.max(1,Math.min(21,O)):Math.max(0,Math.min(20,O));function M(C){var v=q,D=z,m,Q,b;if(W==="c")D=H(C)+D,C="";else{C=+C;var ct=C<0||1/C<0;if(C=isNaN(C)?l:H(Math.abs(C),O),P&&(C=_v(C)),ct&&+C==0&&_!=="+"&&(ct=!1),v=(ct?_==="("?_:o:_==="-"||_==="("?"":_)+v,D=(W==="s"?nf[8+eg/3]:"")+D+(ct&&_==="("?")":""),N){for(m=-1,Q=C.length;++m<Q;)if(b=C.charCodeAt(m),48>b||b>57){D=(b===46?n+C.slice(m+1):C.slice(m))+D,C=C.slice(0,m);break}}}A&&!w&&(C=e(C,1/0));var Dt=v.length+C.length+D.length,vt=Dt<S?new Array(S-Dt+1).join(p):"";switch(A&&w&&(C=e(vt+C,vt.length?S-D.length:1/0),vt=""),g){case"<":C=v+C+D+vt;break;case"=":C=v+vt+C+D;break;case"^":C=vt.slice(0,Dt=vt.length>>1)+v+C+D+vt.slice(Dt);break;default:C=vt+v+C+D;break}return s(C)}return M.toString=function(){return f+""},M}function d(f,p){var g=u((f=ac(f),f.type="f",f)),_=Math.max(-8,Math.min(8,Math.floor(aa(p)/3)))*3,k=Math.pow(10,-_),w=nf[8+_/3];return function(S){return g(k*S)+w}}return{format:u,formatPrefix:d}}var gl,rg,ig;kv({thousands:",",grouping:[3],currency:["$",""]});function kv(t){return gl=vv(t),rg=gl.format,ig=gl.formatPrefix,gl}function wv(t){return Math.max(0,-aa(Math.abs(t)))}function Tv(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(aa(e)/3)))*3-aa(Math.abs(t)))}function Ev(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,aa(e)-aa(t))+1}function n0(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}const sf=Symbol("implicit");function ng(){var t=new Od,e=[],r=[],i=sf;function n(s){let a=t.get(s);if(a===void 0){if(i!==sf)return i;t.set(s,a=e.push(s)-1)}return r[a%r.length]}return n.domain=function(s){if(!arguments.length)return e.slice();e=[],t=new Od;for(const a of s)t.has(a)||t.set(a,e.push(a)-1);return n},n.range=function(s){return arguments.length?(r=Array.from(s),n):r.slice()},n.unknown=function(s){return arguments.length?(i=s,n):i},n.copy=function(){return ng(e,r).unknown(i)},n0.apply(n,arguments),n}function Cv(t){return function(){return t}}function Sv(t){return+t}var af=[0,1];function zs(t){return t}function $h(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:Cv(isNaN(e)?NaN:.5)}function Av(t,e){var r;return t>e&&(r=t,t=e,e=r),function(i){return Math.max(t,Math.min(e,i))}}function Lv(t,e,r){var i=t[0],n=t[1],s=e[0],a=e[1];return n<i?(i=$h(n,i),s=r(a,s)):(i=$h(i,n),s=r(s,a)),function(o){return s(i(o))}}function Dv(t,e,r){var i=Math.min(t.length,e.length)-1,n=new Array(i),s=new Array(i),a=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<i;)n[a]=$h(t[a],t[a+1]),s[a]=r(e[a],e[a+1]);return function(o){var l=kb(t,o,1,i)-1;return s[l](n[l](o))}}function sg(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Mv(){var t=af,e=af,r=J1,i,n,s,a=zs,o,l,u;function d(){var p=Math.min(t.length,e.length);return a!==zs&&(a=Av(t[0],t[p-1])),o=p>2?Dv:Lv,l=u=null,f}function f(p){return p==null||isNaN(p=+p)?s:(l||(l=o(t.map(i),e,r)))(i(a(p)))}return f.invert=function(p){return a(n((u||(u=o(e,t.map(i),ui)))(p)))},f.domain=function(p){return arguments.length?(t=Array.from(p,Sv),d()):t.slice()},f.range=function(p){return arguments.length?(e=Array.from(p),d()):e.slice()},f.rangeRound=function(p){return e=Array.from(p),r=W_,d()},f.clamp=function(p){return arguments.length?(a=p?!0:zs,d()):a!==zs},f.interpolate=function(p){return arguments.length?(r=p,d()):r},f.unknown=function(p){return arguments.length?(s=p,f):s},function(p,g){return i=p,n=g,d()}}function ag(){return Mv()(zs,zs)}function Nv(t,e,r,i){var n=Rh(t,e,r),s;switch(i=ac(i??",f"),i.type){case"s":{var a=Math.max(Math.abs(t),Math.abs(e));return i.precision==null&&!isNaN(s=Tv(n,a))&&(i.precision=s),ig(i,a)}case"":case"e":case"g":case"p":case"r":{i.precision==null&&!isNaN(s=Ev(n,Math.max(Math.abs(t),Math.abs(e))))&&(i.precision=s-(i.type==="e"));break}case"f":case"%":{i.precision==null&&!isNaN(s=wv(n))&&(i.precision=s-(i.type==="%")*2);break}}return rg(i)}function Bv(t){var e=t.domain;return t.ticks=function(r){var i=e();return Cb(i[0],i[i.length-1],r??10)},t.tickFormat=function(r,i){var n=e();return Nv(n[0],n[n.length-1],r??10,i)},t.nice=function(r){r==null&&(r=10);var i=e(),n=0,s=i.length-1,a=i[n],o=i[s],l,u,d=10;for(o<a&&(u=a,a=o,o=u,u=n,n=s,s=u);d-- >0;){if(u=_p(a,o,r),u===l)return i[n]=a,i[s]=o,e(i);if(u>0)a=Math.floor(a/u)*u,o=Math.ceil(o/u)*u;else if(u<0)a=Math.ceil(a*u)/u,o=Math.floor(o*u)/u;else break;l=u}return t},t}function og(){var t=ag();return t.copy=function(){return sg(t,og())},n0.apply(t,arguments),Bv(t)}function Iv(t,e){t=t.slice();var r=0,i=t.length-1,n=t[r],s=t[i],a;return s<n&&(a=r,r=i,i=a,a=n,n=s,s=a),t[r]=e.floor(n),t[i]=e.ceil(s),t}const Zu=new Date,Qu=new Date;function hr(t,e,r,i){function n(s){return t(s=arguments.length===0?new Date:new Date(+s)),s}return n.floor=s=>(t(s=new Date(+s)),s),n.ceil=s=>(t(s=new Date(s-1)),e(s,1),t(s),s),n.round=s=>{const a=n(s),o=n.ceil(s);return s-a<o-s?a:o},n.offset=(s,a)=>(e(s=new Date(+s),a==null?1:Math.floor(a)),s),n.range=(s,a,o)=>{const l=[];if(s=n.ceil(s),o=o==null?1:Math.floor(o),!(s<a)||!(o>0))return l;let u;do l.push(u=new Date(+s)),e(s,o),t(s);while(u<s&&s<a);return l},n.filter=s=>hr(a=>{if(a>=a)for(;t(a),!s(a);)a.setTime(a-1)},(a,o)=>{if(a>=a)if(o<0)for(;++o<=0;)for(;e(a,-1),!s(a););else for(;--o>=0;)for(;e(a,1),!s(a););}),r&&(n.count=(s,a)=>(Zu.setTime(+s),Qu.setTime(+a),t(Zu),t(Qu),Math.floor(r(Zu,Qu))),n.every=s=>(s=Math.floor(s),!isFinite(s)||!(s>0)?null:s>1?n.filter(i?a=>i(a)%s===0:a=>n.count(0,a)%s===0):n)),n}const oc=hr(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);oc.every=t=>(t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?hr(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):oc);oc.range;const un=1e3,ti=un*60,hn=ti*60,_n=hn*24,s0=_n*7,of=_n*30,Ju=_n*365,Ws=hr(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*un)},(t,e)=>(e-t)/un,t=>t.getUTCSeconds());Ws.range;const go=hr(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*un)},(t,e)=>{t.setTime(+t+e*ti)},(t,e)=>(e-t)/ti,t=>t.getMinutes());go.range;const lg=hr(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*ti)},(t,e)=>(e-t)/ti,t=>t.getUTCMinutes());lg.range;const yo=hr(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*un-t.getMinutes()*ti)},(t,e)=>{t.setTime(+t+e*hn)},(t,e)=>(e-t)/hn,t=>t.getHours());yo.range;const cg=hr(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*hn)},(t,e)=>(e-t)/hn,t=>t.getUTCHours());cg.range;const ys=hr(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*ti)/_n,t=>t.getDate()-1);ys.range;const a0=hr(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/_n,t=>t.getUTCDate()-1);a0.range;const ug=hr(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/_n,t=>Math.floor(t/_n));ug.range;function Cs(t){return hr(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(e,r)=>{e.setDate(e.getDate()+r*7)},(e,r)=>(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*ti)/s0)}const oa=Cs(0),lc=Cs(1),Ov=Cs(2),Rv=Cs(3),la=Cs(4),Fv=Cs(5),Pv=Cs(6);oa.range;lc.range;Ov.range;Rv.range;la.range;Fv.range;Pv.range;function Ss(t){return hr(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCDate(e.getUTCDate()+r*7)},(e,r)=>(r-e)/s0)}const o0=Ss(0),cc=Ss(1),Yv=Ss(2),Vv=Ss(3),ca=Ss(4),Uv=Ss(5),zv=Ss(6);o0.range;cc.range;Yv.range;Vv.range;ca.range;Uv.range;zv.range;const mo=hr(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());mo.range;const hg=hr(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth());hg.range;const xn=hr(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());xn.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:hr(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,r)=>{e.setFullYear(e.getFullYear()+r*t)});xn.range;const Gn=hr(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());Gn.every=t=>!isFinite(t=Math.floor(t))||!(t>0)?null:hr(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,r)=>{e.setUTCFullYear(e.getUTCFullYear()+r*t)});Gn.range;function dg(t,e,r,i,n,s){const a=[[Ws,1,un],[Ws,5,5*un],[Ws,15,15*un],[Ws,30,30*un],[s,1,ti],[s,5,5*ti],[s,15,15*ti],[s,30,30*ti],[n,1,hn],[n,3,3*hn],[n,6,6*hn],[n,12,12*hn],[i,1,_n],[i,2,2*_n],[r,1,s0],[e,1,of],[e,3,3*of],[t,1,Ju]];function o(u,d,f){const p=d<u;p&&([u,d]=[d,u]);const g=f&&typeof f.range=="function"?f:l(u,d,f),_=g?g.range(u,+d+1):[];return p?_.reverse():_}function l(u,d,f){const p=Math.abs(d-u)/f,g=$1(([,,w])=>w).right(a,p);if(g===a.length)return t.every(Rh(u/Ju,d/Ju,f));if(g===0)return oc.every(Math.max(Rh(u,d,f),1));const[_,k]=a[p/a[g-1][2]<a[g][2]/p?g-1:g];return _.every(k)}return[o,l]}dg(Gn,hg,o0,ug,cg,lg);const[Wv,Hv]=dg(xn,mo,oa,ys,yo,go);function th(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function eh(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function Ra(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function Gv(t){var e=t.dateTime,r=t.date,i=t.time,n=t.periods,s=t.days,a=t.shortDays,o=t.months,l=t.shortMonths,u=Fa(n),d=Pa(n),f=Fa(s),p=Pa(s),g=Fa(a),_=Pa(a),k=Fa(o),w=Pa(o),S=Fa(l),A=Pa(l),O={a:ct,A:Dt,b:vt,B:j,c:null,d:ff,e:ff,f:p6,g:T6,G:C6,H:h6,I:d6,j:f6,L:fg,m:g6,M:y6,p:ot,q:rt,Q:yf,s:mf,S:m6,u:b6,U:_6,V:x6,w:v6,W:k6,x:null,X:null,y:w6,Y:E6,Z:S6,"%":gf},P={a:it,A:ut,b:bt,B:K,c:null,d:pf,e:pf,f:M6,g:U6,G:W6,H:A6,I:L6,j:D6,L:gg,m:N6,M:B6,p:Ot,q:Y,Q:yf,s:mf,S:I6,u:O6,U:R6,V:F6,w:P6,W:Y6,x:null,X:null,y:V6,Y:z6,Z:H6,"%":gf},W={a:M,A:C,b:v,B:D,c:m,d:hf,e:hf,f:o6,g:uf,G:cf,H:df,I:df,j:i6,L:a6,m:r6,M:n6,p:N,q:e6,Q:c6,s:u6,S:s6,u:Kv,U:Zv,V:Qv,w:Xv,W:Jv,x:Q,X:b,y:uf,Y:cf,Z:t6,"%":l6};O.x=q(r,O),O.X=q(i,O),O.c=q(e,O),P.x=q(r,P),P.X=q(i,P),P.c=q(e,P);function q(U,X){return function(F){var I=[],L=-1,J=0,T=U.length,ht,V,Yt;for(F instanceof Date||(F=new Date(+F));++L<T;)U.charCodeAt(L)===37&&(I.push(U.slice(J,L)),(V=lf[ht=U.charAt(++L)])!=null?ht=U.charAt(++L):V=ht==="e"?" ":"0",(Yt=X[ht])&&(ht=Yt(F,V)),I.push(ht),J=L+1);return I.push(U.slice(J,L)),I.join("")}}function z(U,X){return function(F){var I=Ra(1900,void 0,1),L=H(I,U,F+="",0),J,T;if(L!=F.length)return null;if("Q"in I)return new Date(I.Q);if("s"in I)return new Date(I.s*1e3+("L"in I?I.L:0));if(X&&!("Z"in I)&&(I.Z=0),"p"in I&&(I.H=I.H%12+I.p*12),I.m===void 0&&(I.m="q"in I?I.q:0),"V"in I){if(I.V<1||I.V>53)return null;"w"in I||(I.w=1),"Z"in I?(J=eh(Ra(I.y,0,1)),T=J.getUTCDay(),J=T>4||T===0?cc.ceil(J):cc(J),J=a0.offset(J,(I.V-1)*7),I.y=J.getUTCFullYear(),I.m=J.getUTCMonth(),I.d=J.getUTCDate()+(I.w+6)%7):(J=th(Ra(I.y,0,1)),T=J.getDay(),J=T>4||T===0?lc.ceil(J):lc(J),J=ys.offset(J,(I.V-1)*7),I.y=J.getFullYear(),I.m=J.getMonth(),I.d=J.getDate()+(I.w+6)%7)}else("W"in I||"U"in I)&&("w"in I||(I.w="u"in I?I.u%7:"W"in I?1:0),T="Z"in I?eh(Ra(I.y,0,1)).getUTCDay():th(Ra(I.y,0,1)).getDay(),I.m=0,I.d="W"in I?(I.w+6)%7+I.W*7-(T+5)%7:I.w+I.U*7-(T+6)%7);return"Z"in I?(I.H+=I.Z/100|0,I.M+=I.Z%100,eh(I)):th(I)}}function H(U,X,F,I){for(var L=0,J=X.length,T=F.length,ht,V;L<J;){if(I>=T)return-1;if(ht=X.charCodeAt(L++),ht===37){if(ht=X.charAt(L++),V=W[ht in lf?X.charAt(L++):ht],!V||(I=V(U,F,I))<0)return-1}else if(ht!=F.charCodeAt(I++))return-1}return I}function N(U,X,F){var I=u.exec(X.slice(F));return I?(U.p=d.get(I[0].toLowerCase()),F+I[0].length):-1}function M(U,X,F){var I=g.exec(X.slice(F));return I?(U.w=_.get(I[0].toLowerCase()),F+I[0].length):-1}function C(U,X,F){var I=f.exec(X.slice(F));return I?(U.w=p.get(I[0].toLowerCase()),F+I[0].length):-1}function v(U,X,F){var I=S.exec(X.slice(F));return I?(U.m=A.get(I[0].toLowerCase()),F+I[0].length):-1}function D(U,X,F){var I=k.exec(X.slice(F));return I?(U.m=w.get(I[0].toLowerCase()),F+I[0].length):-1}function m(U,X,F){return H(U,e,X,F)}function Q(U,X,F){return H(U,r,X,F)}function b(U,X,F){return H(U,i,X,F)}function ct(U){return a[U.getDay()]}function Dt(U){return s[U.getDay()]}function vt(U){return l[U.getMonth()]}function j(U){return o[U.getMonth()]}function ot(U){return n[+(U.getHours()>=12)]}function rt(U){return 1+~~(U.getMonth()/3)}function it(U){return a[U.getUTCDay()]}function ut(U){return s[U.getUTCDay()]}function bt(U){return l[U.getUTCMonth()]}function K(U){return o[U.getUTCMonth()]}function Ot(U){return n[+(U.getUTCHours()>=12)]}function Y(U){return 1+~~(U.getUTCMonth()/3)}return{format:function(U){var X=q(U+="",O);return X.toString=function(){return U},X},parse:function(U){var X=z(U+="",!1);return X.toString=function(){return U},X},utcFormat:function(U){var X=q(U+="",P);return X.toString=function(){return U},X},utcParse:function(U){var X=z(U+="",!0);return X.toString=function(){return U},X}}}var lf={"-":"",_:" ",0:"0"},yr=/^\s*\d+/,qv=/^%/,jv=/[\\^$*+?|[\]().{}]/g;function Ae(t,e,r){var i=t<0?"-":"",n=(i?-t:t)+"",s=n.length;return i+(s<r?new Array(r-s+1).join(e)+n:n)}function $v(t){return t.replace(jv,"\\$&")}function Fa(t){return new RegExp("^(?:"+t.map($v).join("|")+")","i")}function Pa(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]))}function Xv(t,e,r){var i=yr.exec(e.slice(r,r+1));return i?(t.w=+i[0],r+i[0].length):-1}function Kv(t,e,r){var i=yr.exec(e.slice(r,r+1));return i?(t.u=+i[0],r+i[0].length):-1}function Zv(t,e,r){var i=yr.exec(e.slice(r,r+2));return i?(t.U=+i[0],r+i[0].length):-1}function Qv(t,e,r){var i=yr.exec(e.slice(r,r+2));return i?(t.V=+i[0],r+i[0].length):-1}function Jv(t,e,r){var i=yr.exec(e.slice(r,r+2));return i?(t.W=+i[0],r+i[0].length):-1}function cf(t,e,r){var i=yr.exec(e.slice(r,r+4));return i?(t.y=+i[0],r+i[0].length):-1}function uf(t,e,r){var i=yr.exec(e.slice(r,r+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function t6(t,e,r){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),r+i[0].length):-1}function e6(t,e,r){var i=yr.exec(e.slice(r,r+1));return i?(t.q=i[0]*3-3,r+i[0].length):-1}function r6(t,e,r){var i=yr.exec(e.slice(r,r+2));return i?(t.m=i[0]-1,r+i[0].length):-1}function hf(t,e,r){var i=yr.exec(e.slice(r,r+2));return i?(t.d=+i[0],r+i[0].length):-1}function i6(t,e,r){var i=yr.exec(e.slice(r,r+3));return i?(t.m=0,t.d=+i[0],r+i[0].length):-1}function df(t,e,r){var i=yr.exec(e.slice(r,r+2));return i?(t.H=+i[0],r+i[0].length):-1}function n6(t,e,r){var i=yr.exec(e.slice(r,r+2));return i?(t.M=+i[0],r+i[0].length):-1}function s6(t,e,r){var i=yr.exec(e.slice(r,r+2));return i?(t.S=+i[0],r+i[0].length):-1}function a6(t,e,r){var i=yr.exec(e.slice(r,r+3));return i?(t.L=+i[0],r+i[0].length):-1}function o6(t,e,r){var i=yr.exec(e.slice(r,r+6));return i?(t.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function l6(t,e,r){var i=qv.exec(e.slice(r,r+1));return i?r+i[0].length:-1}function c6(t,e,r){var i=yr.exec(e.slice(r));return i?(t.Q=+i[0],r+i[0].length):-1}function u6(t,e,r){var i=yr.exec(e.slice(r));return i?(t.s=+i[0],r+i[0].length):-1}function ff(t,e){return Ae(t.getDate(),e,2)}function h6(t,e){return Ae(t.getHours(),e,2)}function d6(t,e){return Ae(t.getHours()%12||12,e,2)}function f6(t,e){return Ae(1+ys.count(xn(t),t),e,3)}function fg(t,e){return Ae(t.getMilliseconds(),e,3)}function p6(t,e){return fg(t,e)+"000"}function g6(t,e){return Ae(t.getMonth()+1,e,2)}function y6(t,e){return Ae(t.getMinutes(),e,2)}function m6(t,e){return Ae(t.getSeconds(),e,2)}function b6(t){var e=t.getDay();return e===0?7:e}function _6(t,e){return Ae(oa.count(xn(t)-1,t),e,2)}function pg(t){var e=t.getDay();return e>=4||e===0?la(t):la.ceil(t)}function x6(t,e){return t=pg(t),Ae(la.count(xn(t),t)+(xn(t).getDay()===4),e,2)}function v6(t){return t.getDay()}function k6(t,e){return Ae(lc.count(xn(t)-1,t),e,2)}function w6(t,e){return Ae(t.getFullYear()%100,e,2)}function T6(t,e){return t=pg(t),Ae(t.getFullYear()%100,e,2)}function E6(t,e){return Ae(t.getFullYear()%1e4,e,4)}function C6(t,e){var r=t.getDay();return t=r>=4||r===0?la(t):la.ceil(t),Ae(t.getFullYear()%1e4,e,4)}function S6(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Ae(e/60|0,"0",2)+Ae(e%60,"0",2)}function pf(t,e){return Ae(t.getUTCDate(),e,2)}function A6(t,e){return Ae(t.getUTCHours(),e,2)}function L6(t,e){return Ae(t.getUTCHours()%12||12,e,2)}function D6(t,e){return Ae(1+a0.count(Gn(t),t),e,3)}function gg(t,e){return Ae(t.getUTCMilliseconds(),e,3)}function M6(t,e){return gg(t,e)+"000"}function N6(t,e){return Ae(t.getUTCMonth()+1,e,2)}function B6(t,e){return Ae(t.getUTCMinutes(),e,2)}function I6(t,e){return Ae(t.getUTCSeconds(),e,2)}function O6(t){var e=t.getUTCDay();return e===0?7:e}function R6(t,e){return Ae(o0.count(Gn(t)-1,t),e,2)}function yg(t){var e=t.getUTCDay();return e>=4||e===0?ca(t):ca.ceil(t)}function F6(t,e){return t=yg(t),Ae(ca.count(Gn(t),t)+(Gn(t).getUTCDay()===4),e,2)}function P6(t){return t.getUTCDay()}function Y6(t,e){return Ae(cc.count(Gn(t)-1,t),e,2)}function V6(t,e){return Ae(t.getUTCFullYear()%100,e,2)}function U6(t,e){return t=yg(t),Ae(t.getUTCFullYear()%100,e,2)}function z6(t,e){return Ae(t.getUTCFullYear()%1e4,e,4)}function W6(t,e){var r=t.getUTCDay();return t=r>=4||r===0?ca(t):ca.ceil(t),Ae(t.getUTCFullYear()%1e4,e,4)}function H6(){return"+0000"}function gf(){return"%"}function yf(t){return+t}function mf(t){return Math.floor(+t/1e3)}var Ps,uc;G6({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function G6(t){return Ps=Gv(t),uc=Ps.format,Ps.parse,Ps.utcFormat,Ps.utcParse,Ps}function q6(t){return new Date(t)}function j6(t){return t instanceof Date?+t:+new Date(+t)}function mg(t,e,r,i,n,s,a,o,l,u){var d=ag(),f=d.invert,p=d.domain,g=u(".%L"),_=u(":%S"),k=u("%I:%M"),w=u("%I %p"),S=u("%a %d"),A=u("%b %d"),O=u("%B"),P=u("%Y");function W(q){return(l(q)<q?g:o(q)<q?_:a(q)<q?k:s(q)<q?w:i(q)<q?n(q)<q?S:A:r(q)<q?O:P)(q)}return d.invert=function(q){return new Date(f(q))},d.domain=function(q){return arguments.length?p(Array.from(q,j6)):p().map(q6)},d.ticks=function(q){var z=p();return t(z[0],z[z.length-1],q??10)},d.tickFormat=function(q,z){return z==null?W:u(z)},d.nice=function(q){var z=p();return(!q||typeof q.range!="function")&&(q=e(z[0],z[z.length-1],q??10)),q?p(Iv(z,q)):d},d.copy=function(){return sg(d,mg(t,e,r,i,n,s,a,o,l,u))},d}function $6(){return n0.apply(mg(Wv,Hv,xn,mo,oa,ys,yo,go,Ws,uc).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function Ke(t){return function(){return t}}const bf=Math.abs,vr=Math.atan2,is=Math.cos,X6=Math.max,rh=Math.min,Ni=Math.sin,Hs=Math.sqrt,Rr=1e-12,bo=Math.PI,hc=bo/2,Il=2*bo;function K6(t){return t>1?0:t<-1?bo:Math.acos(t)}function _f(t){return t>=1?hc:t<=-1?-hc:Math.asin(t)}function bg(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(r==null)e=null;else{const i=Math.floor(r);if(!(i>=0))throw new RangeError(`invalid digits: ${r}`);e=i}return t},()=>new uv(e)}function Z6(t){return t.innerRadius}function Q6(t){return t.outerRadius}function J6(t){return t.startAngle}function tk(t){return t.endAngle}function ek(t){return t&&t.padAngle}function rk(t,e,r,i,n,s,a,o){var l=r-t,u=i-e,d=a-n,f=o-s,p=f*l-d*u;if(!(p*p<Rr))return p=(d*(e-s)-f*(t-n))/p,[t+p*l,e+p*u]}function yl(t,e,r,i,n,s,a){var o=t-r,l=e-i,u=(a?s:-s)/Hs(o*o+l*l),d=u*l,f=-u*o,p=t+d,g=e+f,_=r+d,k=i+f,w=(p+_)/2,S=(g+k)/2,A=_-p,O=k-g,P=A*A+O*O,W=n-s,q=p*k-_*g,z=(O<0?-1:1)*Hs(X6(0,W*W*P-q*q)),H=(q*O-A*z)/P,N=(-q*A-O*z)/P,M=(q*O+A*z)/P,C=(-q*A+O*z)/P,v=H-w,D=N-S,m=M-w,Q=C-S;return v*v+D*D>m*m+Q*Q&&(H=M,N=C),{cx:H,cy:N,x01:-d,y01:-f,x11:H*(n/W-1),y11:N*(n/W-1)}}function Xh(){var t=Z6,e=Q6,r=Ke(0),i=null,n=J6,s=tk,a=ek,o=null,l=bg(u);function u(){var d,f,p=+t.apply(this,arguments),g=+e.apply(this,arguments),_=n.apply(this,arguments)-hc,k=s.apply(this,arguments)-hc,w=bf(k-_),S=k>_;if(o||(o=d=l()),g<p&&(f=g,g=p,p=f),!(g>Rr))o.moveTo(0,0);else if(w>Il-Rr)o.moveTo(g*is(_),g*Ni(_)),o.arc(0,0,g,_,k,!S),p>Rr&&(o.moveTo(p*is(k),p*Ni(k)),o.arc(0,0,p,k,_,S));else{var A=_,O=k,P=_,W=k,q=w,z=w,H=a.apply(this,arguments)/2,N=H>Rr&&(i?+i.apply(this,arguments):Hs(p*p+g*g)),M=rh(bf(g-p)/2,+r.apply(this,arguments)),C=M,v=M,D,m;if(N>Rr){var Q=_f(N/p*Ni(H)),b=_f(N/g*Ni(H));(q-=Q*2)>Rr?(Q*=S?1:-1,P+=Q,W-=Q):(q=0,P=W=(_+k)/2),(z-=b*2)>Rr?(b*=S?1:-1,A+=b,O-=b):(z=0,A=O=(_+k)/2)}var ct=g*is(A),Dt=g*Ni(A),vt=p*is(W),j=p*Ni(W);if(M>Rr){var ot=g*is(O),rt=g*Ni(O),it=p*is(P),ut=p*Ni(P),bt;if(w<bo)if(bt=rk(ct,Dt,it,ut,ot,rt,vt,j)){var K=ct-bt[0],Ot=Dt-bt[1],Y=ot-bt[0],U=rt-bt[1],X=1/Ni(K6((K*Y+Ot*U)/(Hs(K*K+Ot*Ot)*Hs(Y*Y+U*U)))/2),F=Hs(bt[0]*bt[0]+bt[1]*bt[1]);C=rh(M,(p-F)/(X-1)),v=rh(M,(g-F)/(X+1))}else C=v=0}z>Rr?v>Rr?(D=yl(it,ut,ct,Dt,g,v,S),m=yl(ot,rt,vt,j,g,v,S),o.moveTo(D.cx+D.x01,D.cy+D.y01),v<M?o.arc(D.cx,D.cy,v,vr(D.y01,D.x01),vr(m.y01,m.x01),!S):(o.arc(D.cx,D.cy,v,vr(D.y01,D.x01),vr(D.y11,D.x11),!S),o.arc(0,0,g,vr(D.cy+D.y11,D.cx+D.x11),vr(m.cy+m.y11,m.cx+m.x11),!S),o.arc(m.cx,m.cy,v,vr(m.y11,m.x11),vr(m.y01,m.x01),!S))):(o.moveTo(ct,Dt),o.arc(0,0,g,A,O,!S)):o.moveTo(ct,Dt),!(p>Rr)||!(q>Rr)?o.lineTo(vt,j):C>Rr?(D=yl(vt,j,ot,rt,p,-C,S),m=yl(ct,Dt,it,ut,p,-C,S),o.lineTo(D.cx+D.x01,D.cy+D.y01),C<M?o.arc(D.cx,D.cy,C,vr(D.y01,D.x01),vr(m.y01,m.x01),!S):(o.arc(D.cx,D.cy,C,vr(D.y01,D.x01),vr(D.y11,D.x11),!S),o.arc(0,0,p,vr(D.cy+D.y11,D.cx+D.x11),vr(m.cy+m.y11,m.cx+m.x11),S),o.arc(m.cx,m.cy,C,vr(m.y11,m.x11),vr(m.y01,m.x01),!S))):o.arc(0,0,p,W,P,S)}if(o.closePath(),d)return o=null,d+""||null}return u.centroid=function(){var d=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,f=(+n.apply(this,arguments)+ +s.apply(this,arguments))/2-bo/2;return[is(f)*d,Ni(f)*d]},u.innerRadius=function(d){return arguments.length?(t=typeof d=="function"?d:Ke(+d),u):t},u.outerRadius=function(d){return arguments.length?(e=typeof d=="function"?d:Ke(+d),u):e},u.cornerRadius=function(d){return arguments.length?(r=typeof d=="function"?d:Ke(+d),u):r},u.padRadius=function(d){return arguments.length?(i=d==null?null:typeof d=="function"?d:Ke(+d),u):i},u.startAngle=function(d){return arguments.length?(n=typeof d=="function"?d:Ke(+d),u):n},u.endAngle=function(d){return arguments.length?(s=typeof d=="function"?d:Ke(+d),u):s},u.padAngle=function(d){return arguments.length?(a=typeof d=="function"?d:Ke(+d),u):a},u.context=function(d){return arguments.length?(o=d??null,u):o},u}function _g(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function xg(t){this._context=t}xg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function $r(t){return new xg(t)}function ik(t){return t[0]}function nk(t){return t[1]}function Ca(t,e){var r=Ke(!0),i=null,n=$r,s=null,a=bg(o);t=typeof t=="function"?t:t===void 0?ik:Ke(t),e=typeof e=="function"?e:e===void 0?nk:Ke(e);function o(l){var u,d=(l=_g(l)).length,f,p=!1,g;for(i==null&&(s=n(g=a())),u=0;u<=d;++u)!(u<d&&r(f=l[u],u,l))===p&&((p=!p)?s.lineStart():s.lineEnd()),p&&s.point(+t(f,u,l),+e(f,u,l));if(g)return s=null,g+""||null}return o.x=function(l){return arguments.length?(t=typeof l=="function"?l:Ke(+l),o):t},o.y=function(l){return arguments.length?(e=typeof l=="function"?l:Ke(+l),o):e},o.defined=function(l){return arguments.length?(r=typeof l=="function"?l:Ke(!!l),o):r},o.curve=function(l){return arguments.length?(n=l,i!=null&&(s=n(i)),o):n},o.context=function(l){return arguments.length?(l==null?i=s=null:s=n(i=l),o):i},o}function sk(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function ak(t){return t}function ok(){var t=ak,e=sk,r=null,i=Ke(0),n=Ke(Il),s=Ke(0);function a(o){var l,u=(o=_g(o)).length,d,f,p=0,g=new Array(u),_=new Array(u),k=+i.apply(this,arguments),w=Math.min(Il,Math.max(-Il,n.apply(this,arguments)-k)),S,A=Math.min(Math.abs(w)/u,s.apply(this,arguments)),O=A*(w<0?-1:1),P;for(l=0;l<u;++l)(P=_[g[l]=l]=+t(o[l],l,o))>0&&(p+=P);for(e!=null?g.sort(function(W,q){return e(_[W],_[q])}):r!=null&&g.sort(function(W,q){return r(o[W],o[q])}),l=0,f=p?(w-u*O)/p:0;l<u;++l,k=S)d=g[l],P=_[d],S=k+(P>0?P*f:0)+O,_[d]={data:o[d],index:l,value:P,startAngle:k,endAngle:S,padAngle:A};return _}return a.value=function(o){return arguments.length?(t=typeof o=="function"?o:Ke(+o),a):t},a.sortValues=function(o){return arguments.length?(e=o,r=null,a):e},a.sort=function(o){return arguments.length?(r=o,e=null,a):r},a.startAngle=function(o){return arguments.length?(i=typeof o=="function"?o:Ke(+o),a):i},a.endAngle=function(o){return arguments.length?(n=typeof o=="function"?o:Ke(+o),a):n},a.padAngle=function(o){return arguments.length?(s=typeof o=="function"?o:Ke(+o),a):s},a}function dc(){}function fc(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 vg(t){this._context=t}vg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:fc(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(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:fc(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function ua(t){return new vg(t)}function kg(t){this._context=t}kg.prototype={areaStart:dc,areaEnd:dc,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(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:fc(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function lk(t){return new kg(t)}function wg(t){this._context=t}wg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,i):this._context.moveTo(r,i);break;case 3:this._point=4;default:fc(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function ck(t){return new wg(t)}function Tg(t){this._context=t}Tg.prototype={areaStart:dc,areaEnd:dc,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function uk(t){return new Tg(t)}function xf(t){return t<0?-1:1}function vf(t,e,r){var i=t._x1-t._x0,n=e-t._x1,s=(t._y1-t._y0)/(i||n<0&&-0),a=(r-t._y1)/(n||i<0&&-0),o=(s*n+a*i)/(i+n);return(xf(s)+xf(a))*Math.min(Math.abs(s),Math.abs(a),.5*Math.abs(o))||0}function kf(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function ih(t,e,r){var i=t._x0,n=t._y0,s=t._x1,a=t._y1,o=(s-i)/3;t._context.bezierCurveTo(i+o,n+o*e,s-o,a-o*r,s,a)}function pc(t){this._context=t}pc.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:ih(this,this._t0,kf(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,ih(this,kf(this,r=vf(this,t,e)),r);break;default:ih(this,this._t0,r=vf(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function Eg(t){this._context=new Cg(t)}(Eg.prototype=Object.create(pc.prototype)).point=function(t,e){pc.prototype.point.call(this,e,t)};function Cg(t){this._context=t}Cg.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,r,i,n,s){this._context.bezierCurveTo(e,t,i,r,s,n)}};function hk(t){return new pc(t)}function dk(t){return new Eg(t)}function Sg(t){this._context=t}Sg.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var i=wf(t),n=wf(e),s=0,a=1;a<r;++s,++a)this._context.bezierCurveTo(i[0][s],n[0][s],i[1][s],n[1][s],t[a],e[a]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function wf(t){var e,r=t.length-1,i,n=new Array(r),s=new Array(r),a=new Array(r);for(n[0]=0,s[0]=2,a[0]=t[0]+2*t[1],e=1;e<r-1;++e)n[e]=1,s[e]=4,a[e]=4*t[e]+2*t[e+1];for(n[r-1]=2,s[r-1]=7,a[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)i=n[e]/s[e-1],s[e]-=i,a[e]-=i*a[e-1];for(n[r-1]=a[r-1]/s[r-1],e=r-2;e>=0;--e)n[e]=(a[e]-n[e+1])/s[e];for(s[r-1]=(t[r]+n[r-1])/2,e=0;e<r-1;++e)s[e]=2*t[e+1]-n[e+1];return[n,s]}function fk(t){return new Sg(t)}function eu(t,e){this._context=t,this._t=e}eu.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e}};function pk(t){return new eu(t,.5)}function gk(t){return new eu(t,0)}function yk(t){return new eu(t,1)}function Gs(t,e,r){this.k=t,this.x=e,this.y=r}Gs.prototype={constructor:Gs,scale:function(t){return t===1?this:new Gs(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Gs(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}};new Gs(1,0,0);Gs.prototype;/*! @license DOMPurify 2.4.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.1/LICENSE */function Fn(t){return Fn=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Fn(t)}function Kh(t,e){return Kh=Object.setPrototypeOf||function(i,n){return i.__proto__=n,i},Kh(t,e)}function mk(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Ol(t,e,r){return mk()?Ol=Reflect.construct:Ol=function(n,s,a){var o=[null];o.push.apply(o,s);var l=Function.bind.apply(n,o),u=new l;return a&&Kh(u,a.prototype),u},Ol.apply(null,arguments)}function ci(t){return bk(t)||_k(t)||xk(t)||vk()}function bk(t){if(Array.isArray(t))return Zh(t)}function _k(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function xk(t,e){if(t){if(typeof t=="string")return Zh(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Zh(t,e)}}function Zh(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=new Array(e);r<e;r++)i[r]=t[r];return i}function vk(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
|
|
5
|
+
In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var kk=Object.hasOwnProperty,Tf=Object.setPrototypeOf,wk=Object.isFrozen,Tk=Object.getPrototypeOf,Ek=Object.getOwnPropertyDescriptor,Ir=Object.freeze,_i=Object.seal,Ck=Object.create,Ag=typeof Reflect<"u"&&Reflect,gc=Ag.apply,Qh=Ag.construct;gc||(gc=function(e,r,i){return e.apply(r,i)});Ir||(Ir=function(e){return e});_i||(_i=function(e){return e});Qh||(Qh=function(e,r){return Ol(e,ci(r))});var Sk=ei(Array.prototype.forEach),Ef=ei(Array.prototype.pop),Ya=ei(Array.prototype.push),Rl=ei(String.prototype.toLowerCase),nh=ei(String.prototype.toString),Ak=ei(String.prototype.match),li=ei(String.prototype.replace),Lk=ei(String.prototype.indexOf),Dk=ei(String.prototype.trim),Ar=ei(RegExp.prototype.test),sh=Mk(TypeError);function ei(t){return function(e){for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return gc(t,e,i)}}function Mk(t){return function(){for(var e=arguments.length,r=new Array(e),i=0;i<e;i++)r[i]=arguments[i];return Qh(t,r)}}function we(t,e,r){r=r||Rl,Tf&&Tf(t,null);for(var i=e.length;i--;){var n=e[i];if(typeof n=="string"){var s=r(n);s!==n&&(wk(e)||(e[i]=s),n=s)}t[n]=!0}return t}function ns(t){var e=Ck(null),r;for(r in t)gc(kk,t,[r])&&(e[r]=t[r]);return e}function ml(t,e){for(;t!==null;){var r=Ek(t,e);if(r){if(r.get)return ei(r.get);if(typeof r.value=="function")return ei(r.value)}t=Tk(t)}function i(n){return console.warn("fallback value for",n),null}return i}var Cf=Ir(["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"]),ah=Ir(["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"]),oh=Ir(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),Nk=Ir(["animate","color-profile","cursor","discard","fedropshadow","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"]),lh=Ir(["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"]),Bk=Ir(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Sf=Ir(["#text"]),Af=Ir(["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","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","xmlns","slot"]),ch=Ir(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),Lf=Ir(["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"]),bl=Ir(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),Ik=_i(/\{\{[\w\W]*|[\w\W]*\}\}/gm),Ok=_i(/<%[\w\W]*|[\w\W]*%>/gm),Rk=_i(/\${[\w\W]*}/gm),Fk=_i(/^data-[\-\w.\u00B7-\uFFFF]/),Pk=_i(/^aria-[\-\w]+$/),Yk=_i(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),Vk=_i(/^(?:\w+script|data):/i),Uk=_i(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),zk=_i(/^html$/i),Wk=function(){return typeof window>"u"?null:window},Hk=function(e,r){if(Fn(e)!=="object"||typeof e.createPolicy!="function")return null;var i=null,n="data-tt-policy-suffix";r.currentScript&&r.currentScript.hasAttribute(n)&&(i=r.currentScript.getAttribute(n));var s="dompurify"+(i?"#"+i:"");try{return e.createPolicy(s,{createHTML:function(o){return o},createScriptURL:function(o){return o}})}catch{return console.warn("TrustedTypes policy "+s+" could not be created."),null}};function Lg(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Wk(),e=function(Z){return Lg(Z)};if(e.version="2.4.1",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;var r=t.document,i=t.document,n=t.DocumentFragment,s=t.HTMLTemplateElement,a=t.Node,o=t.Element,l=t.NodeFilter,u=t.NamedNodeMap,d=u===void 0?t.NamedNodeMap||t.MozNamedAttrMap:u,f=t.HTMLFormElement,p=t.DOMParser,g=t.trustedTypes,_=o.prototype,k=ml(_,"cloneNode"),w=ml(_,"nextSibling"),S=ml(_,"childNodes"),A=ml(_,"parentNode");if(typeof s=="function"){var O=i.createElement("template");O.content&&O.content.ownerDocument&&(i=O.content.ownerDocument)}var P=Hk(g,r),W=P?P.createHTML(""):"",q=i,z=q.implementation,H=q.createNodeIterator,N=q.createDocumentFragment,M=q.getElementsByTagName,C=r.importNode,v={};try{v=ns(i).documentMode?i.documentMode:{}}catch{}var D={};e.isSupported=typeof A=="function"&&z&&typeof z.createHTMLDocument<"u"&&v!==9;var m=Ik,Q=Ok,b=Rk,ct=Fk,Dt=Pk,vt=Vk,j=Uk,ot=Yk,rt=null,it=we({},[].concat(ci(Cf),ci(ah),ci(oh),ci(lh),ci(Sf))),ut=null,bt=we({},[].concat(ci(Af),ci(ch),ci(Lf),ci(bl))),K=Object.seal(Object.create(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}})),Ot=null,Y=null,U=!0,X=!0,F=!1,I=!1,L=!1,J=!1,T=!1,ht=!1,V=!1,Yt=!1,et=!0,Mt=!1,Tt="user-content-",gt=!0,Et=!1,wt={},pt=null,st=we({},["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"]),le=null,Xt=we({},["audio","video","img","source","image","track"]),jt=null,Kt=we({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Gt="http://www.w3.org/1998/Math/MathML",Ee="http://www.w3.org/2000/svg",Ht="http://www.w3.org/1999/xhtml",Vt=Ht,Ft=!1,xt=null,ft=we({},[Gt,Ee,Ht],nh),Lt,_t=["application/xhtml+xml","text/html"],Ut="text/html",at,ie=null,dt=i.createElement("form"),ee=function(Z){return Z instanceof RegExp||Z instanceof Function},de=function(Z){ie&&ie===Z||((!Z||Fn(Z)!=="object")&&(Z={}),Z=ns(Z),Lt=_t.indexOf(Z.PARSER_MEDIA_TYPE)===-1?Lt=Ut:Lt=Z.PARSER_MEDIA_TYPE,at=Lt==="application/xhtml+xml"?nh:Rl,rt="ALLOWED_TAGS"in Z?we({},Z.ALLOWED_TAGS,at):it,ut="ALLOWED_ATTR"in Z?we({},Z.ALLOWED_ATTR,at):bt,xt="ALLOWED_NAMESPACES"in Z?we({},Z.ALLOWED_NAMESPACES,nh):ft,jt="ADD_URI_SAFE_ATTR"in Z?we(ns(Kt),Z.ADD_URI_SAFE_ATTR,at):Kt,le="ADD_DATA_URI_TAGS"in Z?we(ns(Xt),Z.ADD_DATA_URI_TAGS,at):Xt,pt="FORBID_CONTENTS"in Z?we({},Z.FORBID_CONTENTS,at):st,Ot="FORBID_TAGS"in Z?we({},Z.FORBID_TAGS,at):{},Y="FORBID_ATTR"in Z?we({},Z.FORBID_ATTR,at):{},wt="USE_PROFILES"in Z?Z.USE_PROFILES:!1,U=Z.ALLOW_ARIA_ATTR!==!1,X=Z.ALLOW_DATA_ATTR!==!1,F=Z.ALLOW_UNKNOWN_PROTOCOLS||!1,I=Z.SAFE_FOR_TEMPLATES||!1,L=Z.WHOLE_DOCUMENT||!1,ht=Z.RETURN_DOM||!1,V=Z.RETURN_DOM_FRAGMENT||!1,Yt=Z.RETURN_TRUSTED_TYPE||!1,T=Z.FORCE_BODY||!1,et=Z.SANITIZE_DOM!==!1,Mt=Z.SANITIZE_NAMED_PROPS||!1,gt=Z.KEEP_CONTENT!==!1,Et=Z.IN_PLACE||!1,ot=Z.ALLOWED_URI_REGEXP||ot,Vt=Z.NAMESPACE||Ht,Z.CUSTOM_ELEMENT_HANDLING&&ee(Z.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(K.tagNameCheck=Z.CUSTOM_ELEMENT_HANDLING.tagNameCheck),Z.CUSTOM_ELEMENT_HANDLING&&ee(Z.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(K.attributeNameCheck=Z.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),Z.CUSTOM_ELEMENT_HANDLING&&typeof Z.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(K.allowCustomizedBuiltInElements=Z.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),I&&(X=!1),V&&(ht=!0),wt&&(rt=we({},ci(Sf)),ut=[],wt.html===!0&&(we(rt,Cf),we(ut,Af)),wt.svg===!0&&(we(rt,ah),we(ut,ch),we(ut,bl)),wt.svgFilters===!0&&(we(rt,oh),we(ut,ch),we(ut,bl)),wt.mathMl===!0&&(we(rt,lh),we(ut,Lf),we(ut,bl))),Z.ADD_TAGS&&(rt===it&&(rt=ns(rt)),we(rt,Z.ADD_TAGS,at)),Z.ADD_ATTR&&(ut===bt&&(ut=ns(ut)),we(ut,Z.ADD_ATTR,at)),Z.ADD_URI_SAFE_ATTR&&we(jt,Z.ADD_URI_SAFE_ATTR,at),Z.FORBID_CONTENTS&&(pt===st&&(pt=ns(pt)),we(pt,Z.FORBID_CONTENTS,at)),gt&&(rt["#text"]=!0),L&&we(rt,["html","head","body"]),rt.table&&(we(rt,["tbody"]),delete Ot.tbody),Ir&&Ir(Z),ie=Z)},me=we({},["mi","mo","mn","ms","mtext"]),be=we({},["foreignobject","desc","title","annotation-xml"]),ke=we({},["title","style","font","a","script"]),$t=we({},ah);we($t,oh),we($t,Nk);var ne=we({},lh);we(ne,Bk);var ge=function(Z){var St=A(Z);(!St||!St.tagName)&&(St={namespaceURI:Vt,tagName:"template"});var Nt=Rl(Z.tagName),fe=Rl(St.tagName);return xt[Z.namespaceURI]?Z.namespaceURI===Ee?St.namespaceURI===Ht?Nt==="svg":St.namespaceURI===Gt?Nt==="svg"&&(fe==="annotation-xml"||me[fe]):Boolean($t[Nt]):Z.namespaceURI===Gt?St.namespaceURI===Ht?Nt==="math":St.namespaceURI===Ee?Nt==="math"&&be[fe]:Boolean(ne[Nt]):Z.namespaceURI===Ht?St.namespaceURI===Ee&&!be[fe]||St.namespaceURI===Gt&&!me[fe]?!1:!ne[Nt]&&(ke[Nt]||!$t[Nt]):!!(Lt==="application/xhtml+xml"&&xt[Z.namespaceURI]):!1},Qt=function(Z){Ya(e.removed,{element:Z});try{Z.parentNode.removeChild(Z)}catch{try{Z.outerHTML=W}catch{Z.remove()}}},ni=function(Z,St){try{Ya(e.removed,{attribute:St.getAttributeNode(Z),from:St})}catch{Ya(e.removed,{attribute:null,from:St})}if(St.removeAttribute(Z),Z==="is"&&!ut[Z])if(ht||V)try{Qt(St)}catch{}else try{St.setAttribute(Z,"")}catch{}},zr=function(Z){var St,Nt;if(T)Z="<remove></remove>"+Z;else{var fe=Ak(Z,/^[\r\n\t ]+/);Nt=fe&&fe[0]}Lt==="application/xhtml+xml"&&Vt===Ht&&(Z='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+Z+"</body></html>");var Me=P?P.createHTML(Z):Z;if(Vt===Ht)try{St=new p().parseFromString(Me,Lt)}catch{}if(!St||!St.documentElement){St=z.createDocument(Vt,"template",null);try{St.documentElement.innerHTML=Ft?"":Me}catch{}}var Le=St.body||St.documentElement;return Z&&Nt&&Le.insertBefore(i.createTextNode(Nt),Le.childNodes[0]||null),Vt===Ht?M.call(St,L?"html":"body")[0]:L?St.documentElement:Le},De=function(Z){return H.call(Z.ownerDocument||Z,Z,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},ae=function(Z){return Z instanceof f&&(typeof Z.nodeName!="string"||typeof Z.textContent!="string"||typeof Z.removeChild!="function"||!(Z.attributes instanceof d)||typeof Z.removeAttribute!="function"||typeof Z.setAttribute!="function"||typeof Z.namespaceURI!="string"||typeof Z.insertBefore!="function"||typeof Z.hasChildNodes!="function")},Be=function(Z){return Fn(a)==="object"?Z instanceof a:Z&&Fn(Z)==="object"&&typeof Z.nodeType=="number"&&typeof Z.nodeName=="string"},Oe=function(Z,St,Nt){D[Z]&&Sk(D[Z],function(fe){fe.call(e,St,Nt,ie)})},Fe=function(Z){var St;if(Oe("beforeSanitizeElements",Z,null),ae(Z)||Ar(/[\u0080-\uFFFF]/,Z.nodeName))return Qt(Z),!0;var Nt=at(Z.nodeName);if(Oe("uponSanitizeElement",Z,{tagName:Nt,allowedTags:rt}),Z.hasChildNodes()&&!Be(Z.firstElementChild)&&(!Be(Z.content)||!Be(Z.content.firstElementChild))&&Ar(/<[/\w]/g,Z.innerHTML)&&Ar(/<[/\w]/g,Z.textContent)||Nt==="select"&&Ar(/<template/i,Z.innerHTML))return Qt(Z),!0;if(!rt[Nt]||Ot[Nt]){if(!Ot[Nt]&&Ie(Nt)&&(K.tagNameCheck instanceof RegExp&&Ar(K.tagNameCheck,Nt)||K.tagNameCheck instanceof Function&&K.tagNameCheck(Nt)))return!1;if(gt&&!pt[Nt]){var fe=A(Z)||Z.parentNode,Me=S(Z)||Z.childNodes;if(Me&&fe)for(var Le=Me.length,We=Le-1;We>=0;--We)fe.insertBefore(k(Me[We],!0),w(Z))}return Qt(Z),!0}return Z instanceof o&&!ge(Z)||(Nt==="noscript"||Nt==="noembed")&&Ar(/<\/no(script|embed)/i,Z.innerHTML)?(Qt(Z),!0):(I&&Z.nodeType===3&&(St=Z.textContent,St=li(St,m," "),St=li(St,Q," "),St=li(St,b," "),Z.textContent!==St&&(Ya(e.removed,{element:Z.cloneNode()}),Z.textContent=St)),Oe("afterSanitizeElements",Z,null),!1)},Pe=function(Z,St,Nt){if(et&&(St==="id"||St==="name")&&(Nt in i||Nt in dt))return!1;if(!(X&&!Y[St]&&Ar(ct,St))){if(!(U&&Ar(Dt,St))){if(!ut[St]||Y[St]){if(!(Ie(Z)&&(K.tagNameCheck instanceof RegExp&&Ar(K.tagNameCheck,Z)||K.tagNameCheck instanceof Function&&K.tagNameCheck(Z))&&(K.attributeNameCheck instanceof RegExp&&Ar(K.attributeNameCheck,St)||K.attributeNameCheck instanceof Function&&K.attributeNameCheck(St))||St==="is"&&K.allowCustomizedBuiltInElements&&(K.tagNameCheck instanceof RegExp&&Ar(K.tagNameCheck,Nt)||K.tagNameCheck instanceof Function&&K.tagNameCheck(Nt))))return!1}else if(!jt[St]){if(!Ar(ot,li(Nt,j,""))){if(!((St==="src"||St==="xlink:href"||St==="href")&&Z!=="script"&&Lk(Nt,"data:")===0&&le[Z])){if(!(F&&!Ar(vt,li(Nt,j,"")))){if(Nt)return!1}}}}}}return!0},Ie=function(Z){return Z.indexOf("-")>0},Ge=function(Z){var St,Nt,fe,Me;Oe("beforeSanitizeAttributes",Z,null);var Le=Z.attributes;if(Le){var We={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ut};for(Me=Le.length;Me--;){St=Le[Me];var xe=St,Ne=xe.name,Dn=xe.namespaceURI;if(Nt=Ne==="value"?St.value:Dk(St.value),fe=at(Ne),We.attrName=fe,We.attrValue=Nt,We.keepAttr=!0,We.forceKeepAttr=void 0,Oe("uponSanitizeAttribute",Z,We),Nt=We.attrValue,!We.forceKeepAttr&&(ni(Ne,Z),!!We.keepAttr)){if(Ar(/\/>/i,Nt)){ni(Ne,Z);continue}I&&(Nt=li(Nt,m," "),Nt=li(Nt,Q," "),Nt=li(Nt,b," "));var Mn=at(Z.nodeName);if(Pe(Mn,fe,Nt)){if(Mt&&(fe==="id"||fe==="name")&&(ni(Ne,Z),Nt=Tt+Nt),P&&Fn(g)==="object"&&typeof g.getAttributeType=="function"&&!Dn)switch(g.getAttributeType(Mn,fe)){case"TrustedHTML":Nt=P.createHTML(Nt);break;case"TrustedScriptURL":Nt=P.createScriptURL(Nt);break}try{Dn?Z.setAttributeNS(Dn,Ne,Nt):Z.setAttribute(Ne,Nt),Ef(e.removed)}catch{}}}}Oe("afterSanitizeAttributes",Z,null)}},tr=function zt(Z){var St,Nt=De(Z);for(Oe("beforeSanitizeShadowDOM",Z,null);St=Nt.nextNode();)Oe("uponSanitizeShadowNode",St,null),!Fe(St)&&(St.content instanceof n&&zt(St.content),Ge(St));Oe("afterSanitizeShadowDOM",Z,null)};return e.sanitize=function(zt){var Z=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},St,Nt,fe,Me,Le;if(Ft=!zt,Ft&&(zt="<!-->"),typeof zt!="string"&&!Be(zt)){if(typeof zt.toString!="function")throw sh("toString is not a function");if(zt=zt.toString(),typeof zt!="string")throw sh("dirty is not a string, aborting")}if(!e.isSupported){if(Fn(t.toStaticHTML)==="object"||typeof t.toStaticHTML=="function"){if(typeof zt=="string")return t.toStaticHTML(zt);if(Be(zt))return t.toStaticHTML(zt.outerHTML)}return zt}if(J||de(Z),e.removed=[],typeof zt=="string"&&(Et=!1),Et){if(zt.nodeName){var We=at(zt.nodeName);if(!rt[We]||Ot[We])throw sh("root node is forbidden and cannot be sanitized in-place")}}else if(zt instanceof a)St=zr("<!---->"),Nt=St.ownerDocument.importNode(zt,!0),Nt.nodeType===1&&Nt.nodeName==="BODY"||Nt.nodeName==="HTML"?St=Nt:St.appendChild(Nt);else{if(!ht&&!I&&!L&&zt.indexOf("<")===-1)return P&&Yt?P.createHTML(zt):zt;if(St=zr(zt),!St)return ht?null:Yt?W:""}St&&T&&Qt(St.firstChild);for(var xe=De(Et?zt:St);fe=xe.nextNode();)fe.nodeType===3&&fe===Me||Fe(fe)||(fe.content instanceof n&&tr(fe.content),Ge(fe),Me=fe);if(Me=null,Et)return zt;if(ht){if(V)for(Le=N.call(St.ownerDocument);St.firstChild;)Le.appendChild(St.firstChild);else Le=St;return ut.shadowroot&&(Le=C.call(r,Le,!0)),Le}var Ne=L?St.outerHTML:St.innerHTML;return L&&rt["!doctype"]&&St.ownerDocument&&St.ownerDocument.doctype&&St.ownerDocument.doctype.name&&Ar(zk,St.ownerDocument.doctype.name)&&(Ne="<!DOCTYPE "+St.ownerDocument.doctype.name+`>
|
|
6
|
+
`+Ne),I&&(Ne=li(Ne,m," "),Ne=li(Ne,Q," "),Ne=li(Ne,b," ")),P&&Yt?P.createHTML(Ne):Ne},e.setConfig=function(zt){de(zt),J=!0},e.clearConfig=function(){ie=null,J=!1},e.isValidAttribute=function(zt,Z,St){ie||de({});var Nt=at(zt),fe=at(Z);return Pe(Nt,fe,St)},e.addHook=function(zt,Z){typeof Z=="function"&&(D[zt]=D[zt]||[],Ya(D[zt],Z))},e.removeHook=function(zt){if(D[zt])return Ef(D[zt])},e.removeHooks=function(zt){D[zt]&&(D[zt]=[])},e.removeAllHooks=function(){D={}},e}var _o=Lg();const Fl={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:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},i)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;const n=r<.5?r*(1+e):r+e-r*e,s=2*r-n;switch(i){case"r":return Fl.hue2rgb(s,n,t+1/3)*255;case"g":return Fl.hue2rgb(s,n,t)*255;case"b":return Fl.hue2rgb(s,n,t-1/3)*255}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;const n=Math.max(t,e,r),s=Math.min(t,e,r),a=(n+s)/2;if(i==="l")return a*100;if(n===s)return 0;const o=n-s,l=a>.5?o/(2-n-s):o/(n+s);if(i==="s")return l*100;switch(n){case t:return((e-r)/o+(e<r?6:0))*60;case e:return((r-t)/o+2)*60;case r:return((t-e)/o+4)*60;default:return-1}}},Gk=Fl,qk={clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(t*1e10)/1e10},jk=qk,$k={dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}},Xk=$k,Kk={channel:Gk,lang:jk,unit:Xk},ve=Kk,Rn={};for(let t=0;t<=255;t++)Rn[t]=ve.unit.dec2hex(t);const kr={ALL:0,RGB:1,HSL:2};class Zk{constructor(){this.type=kr.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=kr.ALL}is(e){return this.type===e}}const Qk=Zk;class Jk{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new Qk}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=kr.ALL,this}_ensureHSL(){const e=this.data,{h:r,s:i,l:n}=e;r===void 0&&(e.h=ve.channel.rgb2hsl(e,"h")),i===void 0&&(e.s=ve.channel.rgb2hsl(e,"s")),n===void 0&&(e.l=ve.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r,g:i,b:n}=e;r===void 0&&(e.r=ve.channel.hsl2rgb(e,"r")),i===void 0&&(e.g=ve.channel.hsl2rgb(e,"g")),n===void 0&&(e.b=ve.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,r=e.r;return!this.type.is(kr.HSL)&&r!==void 0?r:(this._ensureHSL(),ve.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,r=e.g;return!this.type.is(kr.HSL)&&r!==void 0?r:(this._ensureHSL(),ve.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,r=e.b;return!this.type.is(kr.HSL)&&r!==void 0?r:(this._ensureHSL(),ve.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,r=e.h;return!this.type.is(kr.RGB)&&r!==void 0?r:(this._ensureRGB(),ve.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,r=e.s;return!this.type.is(kr.RGB)&&r!==void 0?r:(this._ensureRGB(),ve.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,r=e.l;return!this.type.is(kr.RGB)&&r!==void 0?r:(this._ensureRGB(),ve.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(kr.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(kr.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(kr.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(kr.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(kr.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(kr.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const t8=Jk,e8=new t8({r:0,g:0,b:0,a:0},"transparent"),ru=e8,Dg={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;const e=t.match(Dg.re);if(!e)return;const r=e[1],i=parseInt(r,16),n=r.length,s=n%4===0,a=n>4,o=a?1:17,l=a?8:4,u=s?0:-1,d=a?255:15;return ru.set({r:(i>>l*(u+3)&d)*o,g:(i>>l*(u+2)&d)*o,b:(i>>l*(u+1)&d)*o,a:s?(i&d)*o/255:1},t)},stringify:t=>{const{r:e,g:r,b:i,a:n}=t;return n<1?`#${Rn[Math.round(e)]}${Rn[Math.round(r)]}${Rn[Math.round(i)]}${Rn[Math.round(n*255)]}`:`#${Rn[Math.round(e)]}${Rn[Math.round(r)]}${Rn[Math.round(i)]}`}},to=Dg,Pl={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:t=>{const e=t.match(Pl.hueRe);if(e){const[,r,i]=e;switch(i){case"grad":return ve.channel.clamp.h(parseFloat(r)*.9);case"rad":return ve.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return ve.channel.clamp.h(parseFloat(r)*360)}}return ve.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(e!==104&&e!==72)return;const r=t.match(Pl.re);if(!r)return;const[,i,n,s,a,o]=r;return ru.set({h:Pl._hue2deg(i),s:ve.channel.clamp.s(parseFloat(n)),l:ve.channel.clamp.l(parseFloat(s)),a:a?ve.channel.clamp.a(o?parseFloat(a)/100:parseFloat(a)):1},t)},stringify:t=>{const{h:e,s:r,l:i,a:n}=t;return n<1?`hsla(${ve.lang.round(e)}, ${ve.lang.round(r)}%, ${ve.lang.round(i)}%, ${n})`:`hsl(${ve.lang.round(e)}, ${ve.lang.round(r)}%, ${ve.lang.round(i)}%)`}},_l=Pl,Yl={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:t=>{t=t.toLowerCase();const e=Yl.colors[t];if(e)return to.parse(e)},stringify:t=>{const e=to.stringify(t);for(const r in Yl.colors)if(Yl.colors[r]===e)return r}},Df=Yl,Mg={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:t=>{const e=t.charCodeAt(0);if(e!==114&&e!==82)return;const r=t.match(Mg.re);if(!r)return;const[,i,n,s,a,o,l,u,d]=r;return ru.set({r:ve.channel.clamp.r(n?parseFloat(i)*2.55:parseFloat(i)),g:ve.channel.clamp.g(a?parseFloat(s)*2.55:parseFloat(s)),b:ve.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:u?ve.channel.clamp.a(d?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{const{r:e,g:r,b:i,a:n}=t;return n<1?`rgba(${ve.lang.round(e)}, ${ve.lang.round(r)}, ${ve.lang.round(i)}, ${ve.lang.round(n)})`:`rgb(${ve.lang.round(e)}, ${ve.lang.round(r)}, ${ve.lang.round(i)})`}},xl=Mg,r8={format:{keyword:Df,hex:to,rgb:xl,rgba:xl,hsl:_l,hsla:_l},parse:t=>{if(typeof t!="string")return t;const e=to.parse(t)||xl.parse(t)||_l.parse(t)||Df.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(kr.HSL)||t.data.r===void 0?_l.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?xl.stringify(t):to.stringify(t)},vn=r8,i8=(t,e)=>{const r=vn.parse(t);for(const i in e)r[i]=ve.channel.clamp[i](e[i]);return vn.stringify(r)},Ng=i8,n8=(t,e,r=0,i=1)=>{if(typeof t!="number")return Ng(t,{a:e});const n=ru.set({r:ve.channel.clamp.r(t),g:ve.channel.clamp.g(e),b:ve.channel.clamp.b(r),a:ve.channel.clamp.a(i)});return vn.stringify(n)},eo=n8,s8=(t,e,r)=>{const i=vn.parse(t),n=i[e],s=ve.channel.clamp[e](n+r);return n!==s&&(i[e]=s),vn.stringify(i)},Bg=s8,a8=(t,e)=>Bg(t,"l",e),se=a8,o8=(t,e)=>Bg(t,"l",-e),pe=o8,l8=(t,e)=>{const r=vn.parse(t),i={};for(const n in e)e[n]&&(i[n]=r[n]+e[n]);return Ng(t,i)},mt=l8,c8=(t,e,r=50)=>{const{r:i,g:n,b:s,a}=vn.parse(t),{r:o,g:l,b:u,a:d}=vn.parse(e),f=r/100,p=f*2-1,g=a-d,k=((p*g===-1?p:(p+g)/(1+p*g))+1)/2,w=1-k,S=i*k+o*w,A=n*k+l*w,O=s*k+u*w,P=a*f+d*(1-f);return eo(S,A,O,P)},u8=c8,h8=(t,e=100)=>{const r=vn.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,u8(r,t,e)},Wt=h8;var d8=typeof global=="object"&&global&&global.Object===Object&&global;const Ig=d8;var f8=typeof self=="object"&&self&&self.Object===Object&&self,p8=Ig||f8||Function("return this")();const Ti=p8;var g8=Ti.Symbol;const ri=g8;var Og=Object.prototype,y8=Og.hasOwnProperty,m8=Og.toString,Va=ri?ri.toStringTag:void 0;function b8(t){var e=y8.call(t,Va),r=t[Va];try{t[Va]=void 0;var i=!0}catch{}var n=m8.call(t);return i&&(e?t[Va]=r:delete t[Va]),n}var _8=Object.prototype,x8=_8.toString;function v8(t){return x8.call(t)}var k8="[object Null]",w8="[object Undefined]",Mf=ri?ri.toStringTag:void 0;function As(t){return t==null?t===void 0?w8:k8:Mf&&Mf in Object(t)?b8(t):v8(t)}function Xr(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var T8="[object AsyncFunction]",E8="[object Function]",C8="[object GeneratorFunction]",S8="[object Proxy]";function ha(t){if(!Xr(t))return!1;var e=As(t);return e==E8||e==C8||e==T8||e==S8}var A8=Ti["__core-js_shared__"];const uh=A8;var Nf=function(){var t=/[^.]+$/.exec(uh&&uh.keys&&uh.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function L8(t){return!!Nf&&Nf in t}var D8=Function.prototype,M8=D8.toString;function Ls(t){if(t!=null){try{return M8.call(t)}catch{}try{return t+""}catch{}}return""}var N8=/[\\^$.*+?()[\]{}|]/g,B8=/^\[object .+?Constructor\]$/,I8=Function.prototype,O8=Object.prototype,R8=I8.toString,F8=O8.hasOwnProperty,P8=RegExp("^"+R8.call(F8).replace(N8,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function Y8(t){if(!Xr(t)||L8(t))return!1;var e=ha(t)?P8:B8;return e.test(Ls(t))}function V8(t,e){return t==null?void 0:t[e]}function Ds(t,e){var r=V8(t,e);return Y8(r)?r:void 0}var U8=Ds(Object,"create");const xo=U8;function z8(){this.__data__=xo?xo(null):{},this.size=0}function W8(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var H8="__lodash_hash_undefined__",G8=Object.prototype,q8=G8.hasOwnProperty;function j8(t){var e=this.__data__;if(xo){var r=e[t];return r===H8?void 0:r}return q8.call(e,t)?e[t]:void 0}var $8=Object.prototype,X8=$8.hasOwnProperty;function K8(t){var e=this.__data__;return xo?e[t]!==void 0:X8.call(e,t)}var Z8="__lodash_hash_undefined__";function Q8(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=xo&&e===void 0?Z8:e,this}function ms(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}ms.prototype.clear=z8;ms.prototype.delete=W8;ms.prototype.get=j8;ms.prototype.has=K8;ms.prototype.set=Q8;function J8(){this.__data__=[],this.size=0}function Sa(t,e){return t===e||t!==t&&e!==e}function iu(t,e){for(var r=t.length;r--;)if(Sa(t[r][0],e))return r;return-1}var tw=Array.prototype,ew=tw.splice;function rw(t){var e=this.__data__,r=iu(e,t);if(r<0)return!1;var i=e.length-1;return r==i?e.pop():ew.call(e,r,1),--this.size,!0}function iw(t){var e=this.__data__,r=iu(e,t);return r<0?void 0:e[r][1]}function nw(t){return iu(this.__data__,t)>-1}function sw(t,e){var r=this.__data__,i=iu(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this}function Tn(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}Tn.prototype.clear=J8;Tn.prototype.delete=rw;Tn.prototype.get=iw;Tn.prototype.has=nw;Tn.prototype.set=sw;var aw=Ds(Ti,"Map");const vo=aw;function ow(){this.size=0,this.__data__={hash:new ms,map:new(vo||Tn),string:new ms}}function lw(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}function nu(t,e){var r=t.__data__;return lw(e)?r[typeof e=="string"?"string":"hash"]:r.map}function cw(t){var e=nu(this,t).delete(t);return this.size-=e?1:0,e}function uw(t){return nu(this,t).get(t)}function hw(t){return nu(this,t).has(t)}function dw(t,e){var r=nu(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this}function En(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}En.prototype.clear=ow;En.prototype.delete=cw;En.prototype.get=uw;En.prototype.has=hw;En.prototype.set=dw;var fw="Expected a function";function Aa(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(fw);var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],s=r.cache;if(s.has(n))return s.get(n);var a=t.apply(this,i);return r.cache=s.set(n,a)||s,a};return r.cache=new(Aa.Cache||En),r}Aa.Cache=En;function zi(t){return t!=null&&typeof t=="object"}var pw="[object Symbol]";function bs(t){return typeof t=="symbol"||zi(t)&&As(t)==pw}function Js(t,e){for(var r=-1,i=t==null?0:t.length,n=Array(i);++r<i;)n[r]=e(t[r],r,t);return n}var gw=Array.isArray;const ar=gw;var yw=1/0,Bf=ri?ri.prototype:void 0,If=Bf?Bf.toString:void 0;function Rg(t){if(typeof t=="string")return t;if(ar(t))return Js(t,Rg)+"";if(bs(t))return If?If.call(t):"";var e=t+"";return e=="0"&&1/t==-yw?"-0":e}var mw=/\s/;function bw(t){for(var e=t.length;e--&&mw.test(t.charAt(e)););return e}var _w=/^\s+/;function xw(t){return t&&t.slice(0,bw(t)+1).replace(_w,"")}var Of=0/0,vw=/^[-+]0x[0-9a-f]+$/i,kw=/^0b[01]+$/i,ww=/^0o[0-7]+$/i,Tw=parseInt;function Ew(t){if(typeof t=="number")return t;if(bs(t))return Of;if(Xr(t)){var e=typeof t.valueOf=="function"?t.valueOf():t;t=Xr(e)?e+"":e}if(typeof t!="string")return t===0?t:+t;t=xw(t);var r=kw.test(t);return r||ww.test(t)?Tw(t.slice(2),r?2:8):vw.test(t)?Of:+t}var Rf=1/0,Cw=17976931348623157e292;function Vl(t){if(!t)return t===0?t:0;if(t=Ew(t),t===Rf||t===-Rf){var e=t<0?-1:1;return e*Cw}return t===t?t:0}function Sw(t){var e=Vl(t),r=e%1;return e===e?r?e-r:e:0}function Ms(t){return t}var Aw=Ds(Ti,"WeakMap");const Jh=Aw;var Ff=Object.create,Lw=function(){function t(){}return function(e){if(!Xr(e))return{};if(Ff)return Ff(e);t.prototype=e;var r=new t;return t.prototype=void 0,r}}();const Dw=Lw;function Mw(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)}function Nw(){}function Fg(t,e){var r=-1,i=t.length;for(e||(e=Array(i));++r<i;)e[r]=t[r];return e}var Bw=800,Iw=16,Ow=Date.now;function Rw(t){var e=0,r=0;return function(){var i=Ow(),n=Iw-(i-r);if(r=i,n>0){if(++e>=Bw)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}function qs(t){return function(){return t}}var Fw=function(){try{var t=Ds(Object,"defineProperty");return t({},"",{}),t}catch{}}();const yc=Fw;var Pw=yc?function(t,e){return yc(t,"toString",{configurable:!0,enumerable:!1,value:qs(e),writable:!0})}:Ms;const Yw=Pw;var Vw=Rw(Yw);const Pg=Vw;function Yg(t,e){for(var r=-1,i=t==null?0:t.length;++r<i&&e(t[r],r,t)!==!1;);return t}function Vg(t,e,r,i){for(var n=t.length,s=r+(i?1:-1);i?s--:++s<n;)if(e(t[s],s,t))return s;return-1}function Uw(t){return t!==t}function zw(t,e,r){for(var i=r-1,n=t.length;++i<n;)if(t[i]===e)return i;return-1}function Ww(t,e,r){return e===e?zw(t,e,r):Vg(t,Uw,r)}function Hw(t,e){var r=t==null?0:t.length;return!!r&&Ww(t,e,0)>-1}var Gw=9007199254740991,qw=/^(?:0|[1-9]\d*)$/;function su(t,e){var r=typeof t;return e=e??Gw,!!e&&(r=="number"||r!="symbol"&&qw.test(t))&&t>-1&&t%1==0&&t<e}function au(t,e,r){e=="__proto__"&&yc?yc(t,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):t[e]=r}var jw=Object.prototype,$w=jw.hasOwnProperty;function ou(t,e,r){var i=t[e];(!($w.call(t,e)&&Sa(i,r))||r===void 0&&!(e in t))&&au(t,e,r)}function Ho(t,e,r,i){var n=!r;r||(r={});for(var s=-1,a=e.length;++s<a;){var o=e[s],l=i?i(r[o],t[o],o,r,t):void 0;l===void 0&&(l=t[o]),n?au(r,o,l):ou(r,o,l)}return r}var Pf=Math.max;function Ug(t,e,r){return e=Pf(e===void 0?t.length-1:e,0),function(){for(var i=arguments,n=-1,s=Pf(i.length-e,0),a=Array(s);++n<s;)a[n]=i[e+n];n=-1;for(var o=Array(e+1);++n<e;)o[n]=i[n];return o[e]=r(a),Mw(t,this,o)}}function lu(t,e){return Pg(Ug(t,e,Ms),t+"")}var Xw=9007199254740991;function l0(t){return typeof t=="number"&&t>-1&&t%1==0&&t<=Xw}function $n(t){return t!=null&&l0(t.length)&&!ha(t)}function ko(t,e,r){if(!Xr(r))return!1;var i=typeof e;return(i=="number"?$n(r)&&su(e,r.length):i=="string"&&e in r)?Sa(r[e],t):!1}function Kw(t){return lu(function(e,r){var i=-1,n=r.length,s=n>1?r[n-1]:void 0,a=n>2?r[2]:void 0;for(s=t.length>3&&typeof s=="function"?(n--,s):void 0,a&&ko(r[0],r[1],a)&&(s=n<3?void 0:s,n=1),e=Object(e);++i<n;){var o=r[i];o&&t(e,o,i,s)}return e})}var Zw=Object.prototype;function cu(t){var e=t&&t.constructor,r=typeof e=="function"&&e.prototype||Zw;return t===r}function Qw(t,e){for(var r=-1,i=Array(t);++r<t;)i[r]=e(r);return i}var Jw="[object Arguments]";function Yf(t){return zi(t)&&As(t)==Jw}var zg=Object.prototype,t7=zg.hasOwnProperty,e7=zg.propertyIsEnumerable,r7=Yf(function(){return arguments}())?Yf:function(t){return zi(t)&&t7.call(t,"callee")&&!e7.call(t,"callee")};const da=r7;function i7(){return!1}var Wg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Vf=Wg&&typeof module=="object"&&module&&!module.nodeType&&module,n7=Vf&&Vf.exports===Wg,Uf=n7?Ti.Buffer:void 0,s7=Uf?Uf.isBuffer:void 0,a7=s7||i7;const fa=a7;var o7="[object Arguments]",l7="[object Array]",c7="[object Boolean]",u7="[object Date]",h7="[object Error]",d7="[object Function]",f7="[object Map]",p7="[object Number]",g7="[object Object]",y7="[object RegExp]",m7="[object Set]",b7="[object String]",_7="[object WeakMap]",x7="[object ArrayBuffer]",v7="[object DataView]",k7="[object Float32Array]",w7="[object Float64Array]",T7="[object Int8Array]",E7="[object Int16Array]",C7="[object Int32Array]",S7="[object Uint8Array]",A7="[object Uint8ClampedArray]",L7="[object Uint16Array]",D7="[object Uint32Array]",Ve={};Ve[k7]=Ve[w7]=Ve[T7]=Ve[E7]=Ve[C7]=Ve[S7]=Ve[A7]=Ve[L7]=Ve[D7]=!0;Ve[o7]=Ve[l7]=Ve[x7]=Ve[c7]=Ve[v7]=Ve[u7]=Ve[h7]=Ve[d7]=Ve[f7]=Ve[p7]=Ve[g7]=Ve[y7]=Ve[m7]=Ve[b7]=Ve[_7]=!1;function M7(t){return zi(t)&&l0(t.length)&&!!Ve[As(t)]}function uu(t){return function(e){return t(e)}}var Hg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,ro=Hg&&typeof module=="object"&&module&&!module.nodeType&&module,N7=ro&&ro.exports===Hg,hh=N7&&Ig.process,B7=function(){try{var t=ro&&ro.require&&ro.require("util").types;return t||hh&&hh.binding&&hh.binding("util")}catch{}}();const pa=B7;var zf=pa&&pa.isTypedArray,I7=zf?uu(zf):M7;const hu=I7;var O7=Object.prototype,R7=O7.hasOwnProperty;function Gg(t,e){var r=ar(t),i=!r&&da(t),n=!r&&!i&&fa(t),s=!r&&!i&&!n&&hu(t),a=r||i||n||s,o=a?Qw(t.length,String):[],l=o.length;for(var u in t)(e||R7.call(t,u))&&!(a&&(u=="length"||n&&(u=="offset"||u=="parent")||s&&(u=="buffer"||u=="byteLength"||u=="byteOffset")||su(u,l)))&&o.push(u);return o}function qg(t,e){return function(r){return t(e(r))}}var F7=qg(Object.keys,Object);const P7=F7;var Y7=Object.prototype,V7=Y7.hasOwnProperty;function jg(t){if(!cu(t))return P7(t);var e=[];for(var r in Object(t))V7.call(t,r)&&r!="constructor"&&e.push(r);return e}function jr(t){return $n(t)?Gg(t):jg(t)}function U7(t){var e=[];if(t!=null)for(var r in Object(t))e.push(r);return e}var z7=Object.prototype,W7=z7.hasOwnProperty;function H7(t){if(!Xr(t))return U7(t);var e=cu(t),r=[];for(var i in t)i=="constructor"&&(e||!W7.call(t,i))||r.push(i);return r}function Ns(t){return $n(t)?Gg(t,!0):H7(t)}var G7=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,q7=/^\w*$/;function c0(t,e){if(ar(t))return!1;var r=typeof t;return r=="number"||r=="symbol"||r=="boolean"||t==null||bs(t)?!0:q7.test(t)||!G7.test(t)||e!=null&&t in Object(e)}var j7=500;function $7(t){var e=Aa(t,function(i){return r.size===j7&&r.clear(),i}),r=e.cache;return e}var X7=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,K7=/\\(\\)?/g,Z7=$7(function(t){var e=[];return t.charCodeAt(0)===46&&e.push(""),t.replace(X7,function(r,i,n,s){e.push(n?s.replace(K7,"$1"):i||r)}),e});const Q7=Z7;function $g(t){return t==null?"":Rg(t)}function du(t,e){return ar(t)?t:c0(t,e)?[t]:Q7($g(t))}var J7=1/0;function Go(t){if(typeof t=="string"||bs(t))return t;var e=t+"";return e=="0"&&1/t==-J7?"-0":e}function fu(t,e){e=du(e,t);for(var r=0,i=e.length;t!=null&&r<i;)t=t[Go(e[r++])];return r&&r==i?t:void 0}function tT(t,e,r){var i=t==null?void 0:fu(t,e);return i===void 0?r:i}function u0(t,e){for(var r=-1,i=e.length,n=t.length;++r<i;)t[n+r]=e[r];return t}var Wf=ri?ri.isConcatSpreadable:void 0;function eT(t){return ar(t)||da(t)||!!(Wf&&t&&t[Wf])}function pu(t,e,r,i,n){var s=-1,a=t.length;for(r||(r=eT),n||(n=[]);++s<a;){var o=t[s];e>0&&r(o)?e>1?pu(o,e-1,r,i,n):u0(n,o):i||(n[n.length]=o)}return n}function La(t){var e=t==null?0:t.length;return e?pu(t,1):[]}function rT(t){return Pg(Ug(t,void 0,La),t+"")}var iT=qg(Object.getPrototypeOf,Object);const h0=iT;var nT="[object Object]",sT=Function.prototype,aT=Object.prototype,Xg=sT.toString,oT=aT.hasOwnProperty,lT=Xg.call(Object);function Kg(t){if(!zi(t)||As(t)!=nT)return!1;var e=h0(t);if(e===null)return!0;var r=oT.call(e,"constructor")&&e.constructor;return typeof r=="function"&&r instanceof r&&Xg.call(r)==lT}function cT(t,e,r,i){var n=-1,s=t==null?0:t.length;for(i&&s&&(r=t[++n]);++n<s;)r=e(r,t[n],n,t);return r}function uT(){this.__data__=new Tn,this.size=0}function hT(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r}function dT(t){return this.__data__.get(t)}function fT(t){return this.__data__.has(t)}var pT=200;function gT(t,e){var r=this.__data__;if(r instanceof Tn){var i=r.__data__;if(!vo||i.length<pT-1)return i.push([t,e]),this.size=++r.size,this;r=this.__data__=new En(i)}return r.set(t,e),this.size=r.size,this}function gi(t){var e=this.__data__=new Tn(t);this.size=e.size}gi.prototype.clear=uT;gi.prototype.delete=hT;gi.prototype.get=dT;gi.prototype.has=fT;gi.prototype.set=gT;function yT(t,e){return t&&Ho(e,jr(e),t)}function mT(t,e){return t&&Ho(e,Ns(e),t)}var Zg=typeof exports=="object"&&exports&&!exports.nodeType&&exports,Hf=Zg&&typeof module=="object"&&module&&!module.nodeType&&module,bT=Hf&&Hf.exports===Zg,Gf=bT?Ti.Buffer:void 0,qf=Gf?Gf.allocUnsafe:void 0;function Qg(t,e){if(e)return t.slice();var r=t.length,i=qf?qf(r):new t.constructor(r);return t.copy(i),i}function Jg(t,e){for(var r=-1,i=t==null?0:t.length,n=0,s=[];++r<i;){var a=t[r];e(a,r,t)&&(s[n++]=a)}return s}function ty(){return[]}var _T=Object.prototype,xT=_T.propertyIsEnumerable,jf=Object.getOwnPropertySymbols,vT=jf?function(t){return t==null?[]:(t=Object(t),Jg(jf(t),function(e){return xT.call(t,e)}))}:ty;const d0=vT;function kT(t,e){return Ho(t,d0(t),e)}var wT=Object.getOwnPropertySymbols,TT=wT?function(t){for(var e=[];t;)u0(e,d0(t)),t=h0(t);return e}:ty;const ey=TT;function ET(t,e){return Ho(t,ey(t),e)}function ry(t,e,r){var i=e(t);return ar(t)?i:u0(i,r(t))}function t1(t){return ry(t,jr,d0)}function CT(t){return ry(t,Ns,ey)}var ST=Ds(Ti,"DataView");const e1=ST;var AT=Ds(Ti,"Promise");const r1=AT;var LT=Ds(Ti,"Set");const ta=LT;var $f="[object Map]",DT="[object Object]",Xf="[object Promise]",Kf="[object Set]",Zf="[object WeakMap]",Qf="[object DataView]",MT=Ls(e1),NT=Ls(vo),BT=Ls(r1),IT=Ls(ta),OT=Ls(Jh),ls=As;(e1&&ls(new e1(new ArrayBuffer(1)))!=Qf||vo&&ls(new vo)!=$f||r1&&ls(r1.resolve())!=Xf||ta&&ls(new ta)!=Kf||Jh&&ls(new Jh)!=Zf)&&(ls=function(t){var e=As(t),r=e==DT?t.constructor:void 0,i=r?Ls(r):"";if(i)switch(i){case MT:return Qf;case NT:return $f;case BT:return Xf;case IT:return Kf;case OT:return Zf}return e});const ga=ls;var RT=Object.prototype,FT=RT.hasOwnProperty;function PT(t){var e=t.length,r=new t.constructor(e);return e&&typeof t[0]=="string"&&FT.call(t,"index")&&(r.index=t.index,r.input=t.input),r}var YT=Ti.Uint8Array;const mc=YT;function f0(t){var e=new t.constructor(t.byteLength);return new mc(e).set(new mc(t)),e}function VT(t,e){var r=e?f0(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.byteLength)}var UT=/\w*$/;function zT(t){var e=new t.constructor(t.source,UT.exec(t));return e.lastIndex=t.lastIndex,e}var Jf=ri?ri.prototype:void 0,t2=Jf?Jf.valueOf:void 0;function WT(t){return t2?Object(t2.call(t)):{}}function iy(t,e){var r=e?f0(t.buffer):t.buffer;return new t.constructor(r,t.byteOffset,t.length)}var HT="[object Boolean]",GT="[object Date]",qT="[object Map]",jT="[object Number]",$T="[object RegExp]",XT="[object Set]",KT="[object String]",ZT="[object Symbol]",QT="[object ArrayBuffer]",JT="[object DataView]",tE="[object Float32Array]",eE="[object Float64Array]",rE="[object Int8Array]",iE="[object Int16Array]",nE="[object Int32Array]",sE="[object Uint8Array]",aE="[object Uint8ClampedArray]",oE="[object Uint16Array]",lE="[object Uint32Array]";function cE(t,e,r){var i=t.constructor;switch(e){case QT:return f0(t);case HT:case GT:return new i(+t);case JT:return VT(t,r);case tE:case eE:case rE:case iE:case nE:case sE:case aE:case oE:case lE:return iy(t,r);case qT:return new i;case jT:case KT:return new i(t);case $T:return zT(t);case XT:return new i;case ZT:return WT(t)}}function ny(t){return typeof t.constructor=="function"&&!cu(t)?Dw(h0(t)):{}}var uE="[object Map]";function hE(t){return zi(t)&&ga(t)==uE}var e2=pa&&pa.isMap,dE=e2?uu(e2):hE;const fE=dE;var pE="[object Set]";function gE(t){return zi(t)&&ga(t)==pE}var r2=pa&&pa.isSet,yE=r2?uu(r2):gE;const mE=yE;var bE=1,_E=2,xE=4,sy="[object Arguments]",vE="[object Array]",kE="[object Boolean]",wE="[object Date]",TE="[object Error]",ay="[object Function]",EE="[object GeneratorFunction]",CE="[object Map]",SE="[object Number]",oy="[object Object]",AE="[object RegExp]",LE="[object Set]",DE="[object String]",ME="[object Symbol]",NE="[object WeakMap]",BE="[object ArrayBuffer]",IE="[object DataView]",OE="[object Float32Array]",RE="[object Float64Array]",FE="[object Int8Array]",PE="[object Int16Array]",YE="[object Int32Array]",VE="[object Uint8Array]",UE="[object Uint8ClampedArray]",zE="[object Uint16Array]",WE="[object Uint32Array]",Re={};Re[sy]=Re[vE]=Re[BE]=Re[IE]=Re[kE]=Re[wE]=Re[OE]=Re[RE]=Re[FE]=Re[PE]=Re[YE]=Re[CE]=Re[SE]=Re[oy]=Re[AE]=Re[LE]=Re[DE]=Re[ME]=Re[VE]=Re[UE]=Re[zE]=Re[WE]=!0;Re[TE]=Re[ay]=Re[NE]=!1;function io(t,e,r,i,n,s){var a,o=e&bE,l=e&_E,u=e&xE;if(r&&(a=n?r(t,i,n,s):r(t)),a!==void 0)return a;if(!Xr(t))return t;var d=ar(t);if(d){if(a=PT(t),!o)return Fg(t,a)}else{var f=ga(t),p=f==ay||f==EE;if(fa(t))return Qg(t,o);if(f==oy||f==sy||p&&!n){if(a=l||p?{}:ny(t),!o)return l?ET(t,mT(a,t)):kT(t,yT(a,t))}else{if(!Re[f])return n?t:{};a=cE(t,f,o)}}s||(s=new gi);var g=s.get(t);if(g)return g;s.set(t,a),mE(t)?t.forEach(function(w){a.add(io(w,e,r,w,t,s))}):fE(t)&&t.forEach(function(w,S){a.set(S,io(w,e,r,S,t,s))});var _=u?l?CT:t1:l?Ns:jr,k=d?void 0:_(t);return Yg(k||t,function(w,S){k&&(S=w,w=t[S]),ou(a,S,io(w,e,r,S,t,s))}),a}var HE=4;function GE(t){return io(t,HE)}var qE=1,jE=4;function $E(t){return io(t,qE|jE)}var XE="__lodash_hash_undefined__";function KE(t){return this.__data__.set(t,XE),this}function ZE(t){return this.__data__.has(t)}function wo(t){var e=-1,r=t==null?0:t.length;for(this.__data__=new En;++e<r;)this.add(t[e])}wo.prototype.add=wo.prototype.push=KE;wo.prototype.has=ZE;function QE(t,e){for(var r=-1,i=t==null?0:t.length;++r<i;)if(e(t[r],r,t))return!0;return!1}function ly(t,e){return t.has(e)}var JE=1,tC=2;function cy(t,e,r,i,n,s){var a=r&JE,o=t.length,l=e.length;if(o!=l&&!(a&&l>o))return!1;var u=s.get(t),d=s.get(e);if(u&&d)return u==e&&d==t;var f=-1,p=!0,g=r&tC?new wo:void 0;for(s.set(t,e),s.set(e,t);++f<o;){var _=t[f],k=e[f];if(i)var w=a?i(k,_,f,e,t,s):i(_,k,f,t,e,s);if(w!==void 0){if(w)continue;p=!1;break}if(g){if(!QE(e,function(S,A){if(!ly(g,A)&&(_===S||n(_,S,r,i,s)))return g.push(A)})){p=!1;break}}else if(!(_===k||n(_,k,r,i,s))){p=!1;break}}return s.delete(t),s.delete(e),p}function eC(t){var e=-1,r=Array(t.size);return t.forEach(function(i,n){r[++e]=[n,i]}),r}function p0(t){var e=-1,r=Array(t.size);return t.forEach(function(i){r[++e]=i}),r}var rC=1,iC=2,nC="[object Boolean]",sC="[object Date]",aC="[object Error]",oC="[object Map]",lC="[object Number]",cC="[object RegExp]",uC="[object Set]",hC="[object String]",dC="[object Symbol]",fC="[object ArrayBuffer]",pC="[object DataView]",i2=ri?ri.prototype:void 0,dh=i2?i2.valueOf:void 0;function gC(t,e,r,i,n,s,a){switch(r){case pC:if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case fC:return!(t.byteLength!=e.byteLength||!s(new mc(t),new mc(e)));case nC:case sC:case lC:return Sa(+t,+e);case aC:return t.name==e.name&&t.message==e.message;case cC:case hC:return t==e+"";case oC:var o=eC;case uC:var l=i&rC;if(o||(o=p0),t.size!=e.size&&!l)return!1;var u=a.get(t);if(u)return u==e;i|=iC,a.set(t,e);var d=cy(o(t),o(e),i,n,s,a);return a.delete(t),d;case dC:if(dh)return dh.call(t)==dh.call(e)}return!1}var yC=1,mC=Object.prototype,bC=mC.hasOwnProperty;function _C(t,e,r,i,n,s){var a=r&yC,o=t1(t),l=o.length,u=t1(e),d=u.length;if(l!=d&&!a)return!1;for(var f=l;f--;){var p=o[f];if(!(a?p in e:bC.call(e,p)))return!1}var g=s.get(t),_=s.get(e);if(g&&_)return g==e&&_==t;var k=!0;s.set(t,e),s.set(e,t);for(var w=a;++f<l;){p=o[f];var S=t[p],A=e[p];if(i)var O=a?i(A,S,p,e,t,s):i(S,A,p,t,e,s);if(!(O===void 0?S===A||n(S,A,r,i,s):O)){k=!1;break}w||(w=p=="constructor")}if(k&&!w){var P=t.constructor,W=e.constructor;P!=W&&"constructor"in t&&"constructor"in e&&!(typeof P=="function"&&P instanceof P&&typeof W=="function"&&W instanceof W)&&(k=!1)}return s.delete(t),s.delete(e),k}var xC=1,n2="[object Arguments]",s2="[object Array]",vl="[object Object]",vC=Object.prototype,a2=vC.hasOwnProperty;function kC(t,e,r,i,n,s){var a=ar(t),o=ar(e),l=a?s2:ga(t),u=o?s2:ga(e);l=l==n2?vl:l,u=u==n2?vl:u;var d=l==vl,f=u==vl,p=l==u;if(p&&fa(t)){if(!fa(e))return!1;a=!0,d=!1}if(p&&!d)return s||(s=new gi),a||hu(t)?cy(t,e,r,i,n,s):gC(t,e,l,r,i,n,s);if(!(r&xC)){var g=d&&a2.call(t,"__wrapped__"),_=f&&a2.call(e,"__wrapped__");if(g||_){var k=g?t.value():t,w=_?e.value():e;return s||(s=new gi),n(k,w,r,i,s)}}return p?(s||(s=new gi),_C(t,e,r,i,n,s)):!1}function g0(t,e,r,i,n){return t===e?!0:t==null||e==null||!zi(t)&&!zi(e)?t!==t&&e!==e:kC(t,e,r,i,g0,n)}var wC=1,TC=2;function EC(t,e,r,i){var n=r.length,s=n,a=!i;if(t==null)return!s;for(t=Object(t);n--;){var o=r[n];if(a&&o[2]?o[1]!==t[o[0]]:!(o[0]in t))return!1}for(;++n<s;){o=r[n];var l=o[0],u=t[l],d=o[1];if(a&&o[2]){if(u===void 0&&!(l in t))return!1}else{var f=new gi;if(i)var p=i(u,d,l,t,e,f);if(!(p===void 0?g0(d,u,wC|TC,i,f):p))return!1}}return!0}function uy(t){return t===t&&!Xr(t)}function CC(t){for(var e=jr(t),r=e.length;r--;){var i=e[r],n=t[i];e[r]=[i,n,uy(n)]}return e}function hy(t,e){return function(r){return r==null?!1:r[t]===e&&(e!==void 0||t in Object(r))}}function SC(t){var e=CC(t);return e.length==1&&e[0][2]?hy(e[0][0],e[0][1]):function(r){return r===t||EC(r,t,e)}}function AC(t,e){return t!=null&&e in Object(t)}function dy(t,e,r){e=du(e,t);for(var i=-1,n=e.length,s=!1;++i<n;){var a=Go(e[i]);if(!(s=t!=null&&r(t,a)))break;t=t[a]}return s||++i!=n?s:(n=t==null?0:t.length,!!n&&l0(n)&&su(a,n)&&(ar(t)||da(t)))}function fy(t,e){return t!=null&&dy(t,e,AC)}var LC=1,DC=2;function MC(t,e){return c0(t)&&uy(e)?hy(Go(t),e):function(r){var i=tT(r,t);return i===void 0&&i===e?fy(r,t):g0(e,i,LC|DC)}}function NC(t){return function(e){return e==null?void 0:e[t]}}function BC(t){return function(e){return fu(e,t)}}function IC(t){return c0(t)?NC(Go(t)):BC(t)}function Xn(t){return typeof t=="function"?t:t==null?Ms:typeof t=="object"?ar(t)?MC(t[0],t[1]):SC(t):IC(t)}function OC(t){return function(e,r,i){for(var n=-1,s=Object(e),a=i(e),o=a.length;o--;){var l=a[t?o:++n];if(r(s[l],l,s)===!1)break}return e}}var RC=OC();const y0=RC;function py(t,e){return t&&y0(t,e,jr)}function FC(t,e){return function(r,i){if(r==null)return r;if(!$n(r))return t(r,i);for(var n=r.length,s=e?n:-1,a=Object(r);(e?s--:++s<n)&&i(a[s],s,a)!==!1;);return r}}var PC=FC(py);const gu=PC;var YC=function(){return Ti.Date.now()};const o2=YC;var gy=Object.prototype,VC=gy.hasOwnProperty,UC=lu(function(t,e){t=Object(t);var r=-1,i=e.length,n=i>2?e[2]:void 0;for(n&&ko(e[0],e[1],n)&&(i=1);++r<i;)for(var s=e[r],a=Ns(s),o=-1,l=a.length;++o<l;){var u=a[o],d=t[u];(d===void 0||Sa(d,gy[u])&&!VC.call(t,u))&&(t[u]=s[u])}return t});const Vs=UC;function i1(t,e,r){(r!==void 0&&!Sa(t[e],r)||r===void 0&&!(e in t))&&au(t,e,r)}function yy(t){return zi(t)&&$n(t)}function n1(t,e){if(!(e==="constructor"&&typeof t[e]=="function")&&e!="__proto__")return t[e]}function zC(t){return Ho(t,Ns(t))}function WC(t,e,r,i,n,s,a){var o=n1(t,r),l=n1(e,r),u=a.get(l);if(u){i1(t,r,u);return}var d=s?s(o,l,r+"",t,e,a):void 0,f=d===void 0;if(f){var p=ar(l),g=!p&&fa(l),_=!p&&!g&&hu(l);d=l,p||g||_?ar(o)?d=o:yy(o)?d=Fg(o):g?(f=!1,d=Qg(l,!0)):_?(f=!1,d=iy(l,!0)):d=[]:Kg(l)||da(l)?(d=o,da(o)?d=zC(o):(!Xr(o)||ha(o))&&(d=ny(l))):f=!1}f&&(a.set(l,d),n(d,l,i,s,a),a.delete(l)),i1(t,r,d)}function my(t,e,r,i,n){t!==e&&y0(e,function(s,a){if(n||(n=new gi),Xr(s))WC(t,e,a,r,my,i,n);else{var o=i?i(n1(t,a),s,a+"",t,e,n):void 0;o===void 0&&(o=s),i1(t,a,o)}},Ns)}function HC(t,e,r){for(var i=-1,n=t==null?0:t.length;++i<n;)if(r(e,t[i]))return!0;return!1}function bc(t){var e=t==null?0:t.length;return e?t[e-1]:void 0}function by(t){return typeof t=="function"?t:Ms}function kt(t,e){var r=ar(t)?Yg:gu;return r(t,by(e))}function GC(t,e){var r=[];return gu(t,function(i,n,s){e(i,n,s)&&r.push(i)}),r}function dn(t,e){var r=ar(t)?Jg:GC;return r(t,Xn(e))}function qC(t){return function(e,r,i){var n=Object(e);if(!$n(e)){var s=Xn(r);e=jr(e),r=function(o){return s(n[o],o,n)}}var a=t(e,r,i);return a>-1?n[s?e[a]:a]:void 0}}var jC=Math.max;function $C(t,e,r){var i=t==null?0:t.length;if(!i)return-1;var n=r==null?0:Sw(r);return n<0&&(n=jC(i+n,0)),Vg(t,Xn(e),n)}var XC=qC($C);const m0=XC;function _y(t,e){var r=-1,i=$n(t)?Array(t.length):[];return gu(t,function(n,s,a){i[++r]=e(n,s,a)}),i}function sr(t,e){var r=ar(t)?Js:_y;return r(t,Xn(e))}function KC(t,e){return t==null?t:y0(t,by(e),Ns)}function ZC(t,e){return t>e}var QC=Object.prototype,JC=QC.hasOwnProperty;function t9(t,e){return t!=null&&JC.call(t,e)}function _e(t,e){return t!=null&&dy(t,e,t9)}function e9(t,e){return Js(e,function(r){return t[r]})}function yn(t){return t==null?[]:e9(t,jr(t))}var r9="[object Map]",i9="[object Set]",n9=Object.prototype,s9=n9.hasOwnProperty;function ea(t){if(t==null)return!0;if($n(t)&&(ar(t)||typeof t=="string"||typeof t.splice=="function"||fa(t)||hu(t)||da(t)))return!t.length;var e=ga(t);if(e==r9||e==i9)return!t.size;if(cu(t))return!jg(t).length;for(var r in t)if(s9.call(t,r))return!1;return!0}function Ze(t){return t===void 0}function xy(t,e){return t<e}function yu(t,e){var r={};return e=Xn(e),py(t,function(i,n,s){au(r,n,e(i,n,s))}),r}function b0(t,e,r){for(var i=-1,n=t.length;++i<n;){var s=t[i],a=e(s);if(a!=null&&(o===void 0?a===a&&!bs(a):r(a,o)))var o=a,l=s}return l}function _s(t){return t&&t.length?b0(t,Ms,ZC):void 0}var a9=Kw(function(t,e,r){my(t,e,r)});const s1=a9;function To(t){return t&&t.length?b0(t,Ms,xy):void 0}function _0(t,e){return t&&t.length?b0(t,Xn(e),xy):void 0}function o9(t,e,r,i){if(!Xr(t))return t;e=du(e,t);for(var n=-1,s=e.length,a=s-1,o=t;o!=null&&++n<s;){var l=Go(e[n]),u=r;if(l==="__proto__"||l==="constructor"||l==="prototype")return t;if(n!=a){var d=o[l];u=i?i(d,l,o):void 0,u===void 0&&(u=Xr(d)?d:su(e[n+1])?[]:{})}ou(o,l,u),o=o[l]}return t}function l9(t,e,r){for(var i=-1,n=e.length,s={};++i<n;){var a=e[i],o=fu(t,a);r(o,a)&&o9(s,du(a,t),o)}return s}function c9(t,e){var r=t.length;for(t.sort(e);r--;)t[r]=t[r].value;return t}function u9(t,e){if(t!==e){var r=t!==void 0,i=t===null,n=t===t,s=bs(t),a=e!==void 0,o=e===null,l=e===e,u=bs(e);if(!o&&!u&&!s&&t>e||s&&a&&l&&!o&&!u||i&&a&&l||!r&&l||!n)return 1;if(!i&&!s&&!u&&t<e||u&&r&&n&&!i&&!s||o&&r&&n||!a&&n||!l)return-1}return 0}function h9(t,e,r){for(var i=-1,n=t.criteria,s=e.criteria,a=n.length,o=r.length;++i<a;){var l=u9(n[i],s[i]);if(l){if(i>=o)return l;var u=r[i];return l*(u=="desc"?-1:1)}}return t.index-e.index}function d9(t,e,r){e.length?e=Js(e,function(s){return ar(s)?function(a){return fu(a,s.length===1?s[0]:s)}:s}):e=[Ms];var i=-1;e=Js(e,uu(Xn));var n=_y(t,function(s,a,o){var l=Js(e,function(u){return u(s)});return{criteria:l,index:++i,value:s}});return c9(n,function(s,a){return h9(s,a,r)})}function f9(t,e){return l9(t,e,function(r,i){return fy(t,i)})}var p9=rT(function(t,e){return t==null?{}:f9(t,e)});const Eo=p9;var g9=Math.ceil,y9=Math.max;function m9(t,e,r,i){for(var n=-1,s=y9(g9((e-t)/(r||1)),0),a=Array(s);s--;)a[i?s:++n]=t,t+=r;return a}function b9(t){return function(e,r,i){return i&&typeof i!="number"&&ko(e,r,i)&&(r=i=void 0),e=Vl(e),r===void 0?(r=e,e=0):r=Vl(r),i=i===void 0?e<r?1:-1:Vl(i),m9(e,r,i,t)}}var _9=b9();const xs=_9;function x9(t,e,r,i,n){return n(t,function(s,a,o){r=i?(i=!1,s):e(r,s,a,o)}),r}function qo(t,e,r){var i=ar(t)?cT:x9,n=arguments.length<3;return i(t,Xn(e),r,n,gu)}var v9=lu(function(t,e){if(t==null)return[];var r=e.length;return r>1&&ko(t,e[0],e[1])?e=[]:r>2&&ko(e[0],e[1],e[2])&&(e=[e[0]]),d9(t,pu(e,1),[])});const jo=v9;var k9=1/0,w9=ta&&1/p0(new ta([,-0]))[1]==k9?function(t){return new ta(t)}:Nw;const T9=w9;var E9=200;function C9(t,e,r){var i=-1,n=Hw,s=t.length,a=!0,o=[],l=o;if(r)a=!1,n=HC;else if(s>=E9){var u=e?null:T9(t);if(u)return p0(u);a=!1,n=ly,l=new wo}else l=e?[]:o;t:for(;++i<s;){var d=t[i],f=e?e(d):d;if(d=r||d!==0?d:0,a&&f===f){for(var p=l.length;p--;)if(l[p]===f)continue t;e&&l.push(f),o.push(d)}else n(l,f,r)||(l!==o&&l.push(f),o.push(d))}return o}var S9=lu(function(t){return C9(pu(t,1,yy,!0))});const A9=S9;var L9=0;function mu(t){var e=++L9;return $g(t)+e}function D9(t,e,r){for(var i=-1,n=t.length,s=e.length,a={};++i<n;){var o=i<s?e[i]:void 0;r(a,t[i],o)}return a}function M9(t,e){return D9(t||[],e||[],ou)}var N9="\0",ss="\0",l2="";class or{constructor(e={}){this._isDirected=_e(e,"directed")?e.directed:!0,this._isMultigraph=_e(e,"multigraph")?e.multigraph:!1,this._isCompound=_e(e,"compound")?e.compound:!1,this._label=void 0,this._defaultNodeLabelFn=qs(void 0),this._defaultEdgeLabelFn=qs(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[ss]={}),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 ha(e)||(e=qs(e)),this._defaultNodeLabelFn=e,this}nodeCount(){return this._nodeCount}nodes(){return jr(this._nodes)}sources(){var e=this;return dn(this.nodes(),function(r){return ea(e._in[r])})}sinks(){var e=this;return dn(this.nodes(),function(r){return ea(e._out[r])})}setNodes(e,r){var i=arguments,n=this;return kt(e,function(s){i.length>1?n.setNode(s,r):n.setNode(s)}),this}setNode(e,r){return _e(this._nodes,e)?(arguments.length>1&&(this._nodes[e]=r),this):(this._nodes[e]=arguments.length>1?r:this._defaultNodeLabelFn(e),this._isCompound&&(this._parent[e]=ss,this._children[e]={},this._children[ss][e]=!0),this._in[e]={},this._preds[e]={},this._out[e]={},this._sucs[e]={},++this._nodeCount,this)}node(e){return this._nodes[e]}hasNode(e){return _e(this._nodes,e)}removeNode(e){var r=this;if(_e(this._nodes,e)){var i=function(n){r.removeEdge(r._edgeObjs[n])};delete this._nodes[e],this._isCompound&&(this._removeFromParentsChildList(e),delete this._parent[e],kt(this.children(e),function(n){r.setParent(n)}),delete this._children[e]),kt(jr(this._in[e]),i),delete this._in[e],delete this._preds[e],kt(jr(this._out[e]),i),delete this._out[e],delete this._sucs[e],--this._nodeCount}return this}setParent(e,r){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(Ze(r))r=ss;else{r+="";for(var i=r;!Ze(i);i=this.parent(i))if(i===e)throw new Error("Setting "+r+" as parent of "+e+" would create a cycle");this.setNode(r)}return this.setNode(e),this._removeFromParentsChildList(e),this._parent[e]=r,this._children[r][e]=!0,this}_removeFromParentsChildList(e){delete this._children[this._parent[e]][e]}parent(e){if(this._isCompound){var r=this._parent[e];if(r!==ss)return r}}children(e){if(Ze(e)&&(e=ss),this._isCompound){var r=this._children[e];if(r)return jr(r)}else{if(e===ss)return this.nodes();if(this.hasNode(e))return[]}}predecessors(e){var r=this._preds[e];if(r)return jr(r)}successors(e){var r=this._sucs[e];if(r)return jr(r)}neighbors(e){var r=this.predecessors(e);if(r)return A9(r,this.successors(e))}isLeaf(e){var r;return this.isDirected()?r=this.successors(e):r=this.neighbors(e),r.length===0}filterNodes(e){var r=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});r.setGraph(this.graph());var i=this;kt(this._nodes,function(a,o){e(o)&&r.setNode(o,a)}),kt(this._edgeObjs,function(a){r.hasNode(a.v)&&r.hasNode(a.w)&&r.setEdge(a,i.edge(a))});var n={};function s(a){var o=i.parent(a);return o===void 0||r.hasNode(o)?(n[a]=o,o):o in n?n[o]:s(o)}return this._isCompound&&kt(r.nodes(),function(a){r.setParent(a,s(a))}),r}setDefaultEdgeLabel(e){return ha(e)||(e=qs(e)),this._defaultEdgeLabelFn=e,this}edgeCount(){return this._edgeCount}edges(){return yn(this._edgeObjs)}setPath(e,r){var i=this,n=arguments;return qo(e,function(s,a){return n.length>1?i.setEdge(s,a,r):i.setEdge(s,a),a}),this}setEdge(){var e,r,i,n,s=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(e=a.v,r=a.w,i=a.name,arguments.length===2&&(n=arguments[1],s=!0)):(e=a,r=arguments[1],i=arguments[3],arguments.length>2&&(n=arguments[2],s=!0)),e=""+e,r=""+r,Ze(i)||(i=""+i);var o=Xa(this._isDirected,e,r,i);if(_e(this._edgeLabels,o))return s&&(this._edgeLabels[o]=n),this;if(!Ze(i)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(e),this.setNode(r),this._edgeLabels[o]=s?n:this._defaultEdgeLabelFn(e,r,i);var l=B9(this._isDirected,e,r,i);return e=l.v,r=l.w,Object.freeze(l),this._edgeObjs[o]=l,c2(this._preds[r],e),c2(this._sucs[e],r),this._in[r][o]=l,this._out[e][o]=l,this._edgeCount++,this}edge(e,r,i){var n=arguments.length===1?fh(this._isDirected,arguments[0]):Xa(this._isDirected,e,r,i);return this._edgeLabels[n]}hasEdge(e,r,i){var n=arguments.length===1?fh(this._isDirected,arguments[0]):Xa(this._isDirected,e,r,i);return _e(this._edgeLabels,n)}removeEdge(e,r,i){var n=arguments.length===1?fh(this._isDirected,arguments[0]):Xa(this._isDirected,e,r,i),s=this._edgeObjs[n];return s&&(e=s.v,r=s.w,delete this._edgeLabels[n],delete this._edgeObjs[n],u2(this._preds[r],e),u2(this._sucs[e],r),delete this._in[r][n],delete this._out[e][n],this._edgeCount--),this}inEdges(e,r){var i=this._in[e];if(i){var n=yn(i);return r?dn(n,function(s){return s.v===r}):n}}outEdges(e,r){var i=this._out[e];if(i){var n=yn(i);return r?dn(n,function(s){return s.w===r}):n}}nodeEdges(e,r){var i=this.inEdges(e,r);if(i)return i.concat(this.outEdges(e,r))}}or.prototype._nodeCount=0;or.prototype._edgeCount=0;function c2(t,e){t[e]?t[e]++:t[e]=1}function u2(t,e){--t[e]||delete t[e]}function Xa(t,e,r,i){var n=""+e,s=""+r;if(!t&&n>s){var a=n;n=s,s=a}return n+l2+s+l2+(Ze(i)?N9:i)}function B9(t,e,r,i){var n=""+e,s=""+r;if(!t&&n>s){var a=n;n=s,s=a}var o={v:n,w:s};return i&&(o.name=i),o}function fh(t,e){return Xa(t,e.v,e.w,e.name)}class I9{constructor(){var e={};e._next=e._prev=e,this._sentinel=e}dequeue(){var e=this._sentinel,r=e._prev;if(r!==e)return h2(r),r}enqueue(e){var r=this._sentinel;e._prev&&e._next&&h2(e),e._next=r._next,r._next._prev=e,r._next=e,e._prev=r}toString(){for(var e=[],r=this._sentinel,i=r._prev;i!==r;)e.push(JSON.stringify(i,O9)),i=i._prev;return"["+e.join(", ")+"]"}}function h2(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function O9(t,e){if(t!=="_next"&&t!=="_prev")return e}var R9=qs(1);function F9(t,e){if(t.nodeCount()<=1)return[];var r=Y9(t,e||R9),i=P9(r.graph,r.buckets,r.zeroIdx);return La(sr(i,function(n){return t.outEdges(n.v,n.w)}))}function P9(t,e,r){for(var i=[],n=e[e.length-1],s=e[0],a;t.nodeCount();){for(;a=s.dequeue();)ph(t,e,r,a);for(;a=n.dequeue();)ph(t,e,r,a);if(t.nodeCount()){for(var o=e.length-2;o>0;--o)if(a=e[o].dequeue(),a){i=i.concat(ph(t,e,r,a,!0));break}}}return i}function ph(t,e,r,i,n){var s=n?[]:void 0;return kt(t.inEdges(i.v),function(a){var o=t.edge(a),l=t.node(a.v);n&&s.push({v:a.v,w:a.w}),l.out-=o,a1(e,r,l)}),kt(t.outEdges(i.v),function(a){var o=t.edge(a),l=a.w,u=t.node(l);u.in-=o,a1(e,r,u)}),t.removeNode(i.v),s}function Y9(t,e){var r=new or,i=0,n=0;kt(t.nodes(),function(o){r.setNode(o,{v:o,in:0,out:0})}),kt(t.edges(),function(o){var l=r.edge(o.v,o.w)||0,u=e(o),d=l+u;r.setEdge(o.v,o.w,d),n=Math.max(n,r.node(o.v).out+=u),i=Math.max(i,r.node(o.w).in+=u)});var s=xs(n+i+3).map(function(){return new I9}),a=i+1;return kt(r.nodes(),function(o){a1(s,a,r.node(o))}),{graph:r,buckets:s,zeroIdx:a}}function a1(t,e,r){r.out?r.in?t[r.out-r.in+e].enqueue(r):t[t.length-1].enqueue(r):t[0].enqueue(r)}function V9(t){var e=t.graph().acyclicer==="greedy"?F9(t,r(t)):U9(t);kt(e,function(i){var n=t.edge(i);t.removeEdge(i),n.forwardName=i.name,n.reversed=!0,t.setEdge(i.w,i.v,n,mu("rev"))});function r(i){return function(n){return i.edge(n).weight}}}function U9(t){var e=[],r={},i={};function n(s){_e(i,s)||(i[s]=!0,r[s]=!0,kt(t.outEdges(s),function(a){_e(r,a.w)?e.push(a):n(a.w)}),delete r[s])}return kt(t.nodes(),n),e}function z9(t){kt(t.edges(),function(e){var r=t.edge(e);if(r.reversed){t.removeEdge(e);var i=r.forwardName;delete r.reversed,delete r.forwardName,t.setEdge(e.w,e.v,r,i)}})}function Da(t,e,r,i){var n;do n=mu(i);while(t.hasNode(n));return r.dummy=e,t.setNode(n,r),n}function W9(t){var e=new or().setGraph(t.graph());return kt(t.nodes(),function(r){e.setNode(r,t.node(r))}),kt(t.edges(),function(r){var i=e.edge(r.v,r.w)||{weight:0,minlen:1},n=t.edge(r);e.setEdge(r.v,r.w,{weight:i.weight+n.weight,minlen:Math.max(i.minlen,n.minlen)})}),e}function vy(t){var e=new or({multigraph:t.isMultigraph()}).setGraph(t.graph());return kt(t.nodes(),function(r){t.children(r).length||e.setNode(r,t.node(r))}),kt(t.edges(),function(r){e.setEdge(r,t.edge(r))}),e}function d2(t,e){var r=t.x,i=t.y,n=e.x-r,s=e.y-i,a=t.width/2,o=t.height/2;if(!n&&!s)throw new Error("Not possible to find intersection inside of the rectangle");var l,u;return Math.abs(s)*a>Math.abs(n)*o?(s<0&&(o=-o),l=o*n/s,u=o):(n<0&&(a=-a),l=a,u=a*s/n),{x:r+l,y:i+u}}function bu(t){var e=sr(xs(ky(t)+1),function(){return[]});return kt(t.nodes(),function(r){var i=t.node(r),n=i.rank;Ze(n)||(e[n][i.order]=r)}),e}function H9(t){var e=To(sr(t.nodes(),function(r){return t.node(r).rank}));kt(t.nodes(),function(r){var i=t.node(r);_e(i,"rank")&&(i.rank-=e)})}function G9(t){var e=To(sr(t.nodes(),function(s){return t.node(s).rank})),r=[];kt(t.nodes(),function(s){var a=t.node(s).rank-e;r[a]||(r[a]=[]),r[a].push(s)});var i=0,n=t.graph().nodeRankFactor;kt(r,function(s,a){Ze(s)&&a%n!==0?--i:i&&kt(s,function(o){t.node(o).rank+=i})})}function f2(t,e,r,i){var n={width:0,height:0};return arguments.length>=4&&(n.rank=r,n.order=i),Da(t,"border",n,e)}function ky(t){return _s(sr(t.nodes(),function(e){var r=t.node(e).rank;if(!Ze(r))return r}))}function q9(t,e){var r={lhs:[],rhs:[]};return kt(t,function(i){e(i)?r.lhs.push(i):r.rhs.push(i)}),r}function j9(t,e){var r=o2();try{return e()}finally{console.log(t+" time: "+(o2()-r)+"ms")}}function $9(t,e){return e()}function X9(t){function e(r){var i=t.children(r),n=t.node(r);if(i.length&&kt(i,e),_e(n,"minRank")){n.borderLeft=[],n.borderRight=[];for(var s=n.minRank,a=n.maxRank+1;s<a;++s)p2(t,"borderLeft","_bl",r,n,s),p2(t,"borderRight","_br",r,n,s)}}kt(t.children(),e)}function p2(t,e,r,i,n,s){var a={width:0,height:0,rank:s,borderType:e},o=n[e][s-1],l=Da(t,"border",a,r);n[e][s]=l,t.setParent(l,i),o&&t.setEdge(o,l,{weight:1})}function K9(t){var e=t.graph().rankdir.toLowerCase();(e==="lr"||e==="rl")&&wy(t)}function Z9(t){var e=t.graph().rankdir.toLowerCase();(e==="bt"||e==="rl")&&Q9(t),(e==="lr"||e==="rl")&&(J9(t),wy(t))}function wy(t){kt(t.nodes(),function(e){g2(t.node(e))}),kt(t.edges(),function(e){g2(t.edge(e))})}function g2(t){var e=t.width;t.width=t.height,t.height=e}function Q9(t){kt(t.nodes(),function(e){gh(t.node(e))}),kt(t.edges(),function(e){var r=t.edge(e);kt(r.points,gh),_e(r,"y")&&gh(r)})}function gh(t){t.y=-t.y}function J9(t){kt(t.nodes(),function(e){yh(t.node(e))}),kt(t.edges(),function(e){var r=t.edge(e);kt(r.points,yh),_e(r,"x")&&yh(r)})}function yh(t){var e=t.x;t.x=t.y,t.y=e}function tS(t){var e=Da(t,"root",{},"_root"),r=eS(t),i=_s(yn(r))-1,n=2*i+1;t.graph().nestingRoot=e,kt(t.edges(),function(a){t.edge(a).minlen*=n});var s=rS(t)+1;kt(t.children(),function(a){Ty(t,e,n,s,i,r,a)}),t.graph().nodeRankFactor=n}function Ty(t,e,r,i,n,s,a){var o=t.children(a);if(!o.length){a!==e&&t.setEdge(e,a,{weight:0,minlen:r});return}var l=f2(t,"_bt"),u=f2(t,"_bb"),d=t.node(a);t.setParent(l,a),d.borderTop=l,t.setParent(u,a),d.borderBottom=u,kt(o,function(f){Ty(t,e,r,i,n,s,f);var p=t.node(f),g=p.borderTop?p.borderTop:f,_=p.borderBottom?p.borderBottom:f,k=p.borderTop?i:2*i,w=g!==_?1:n-s[a]+1;t.setEdge(l,g,{weight:k,minlen:w,nestingEdge:!0}),t.setEdge(_,u,{weight:k,minlen:w,nestingEdge:!0})}),t.parent(a)||t.setEdge(e,l,{weight:0,minlen:n+s[a]})}function eS(t){var e={};function r(i,n){var s=t.children(i);s&&s.length&&kt(s,function(a){r(a,n+1)}),e[i]=n}return kt(t.children(),function(i){r(i,1)}),e}function rS(t){return qo(t.edges(),function(e,r){return e+t.edge(r).weight},0)}function iS(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,kt(t.edges(),function(r){var i=t.edge(r);i.nestingEdge&&t.removeEdge(r)})}function nS(t,e,r){var i={},n;kt(r,function(s){for(var a=t.parent(s),o,l;a;){if(o=t.parent(a),o?(l=i[o],i[o]=a):(l=n,n=a),l&&l!==a){e.setEdge(l,a);return}a=o}})}function sS(t,e,r){var i=aS(t),n=new or({compound:!0}).setGraph({root:i}).setDefaultNodeLabel(function(s){return t.node(s)});return kt(t.nodes(),function(s){var a=t.node(s),o=t.parent(s);(a.rank===e||a.minRank<=e&&e<=a.maxRank)&&(n.setNode(s),n.setParent(s,o||i),kt(t[r](s),function(l){var u=l.v===s?l.w:l.v,d=n.edge(u,s),f=Ze(d)?0:d.weight;n.setEdge(u,s,{weight:t.edge(l).weight+f})}),_e(a,"minRank")&&n.setNode(s,{borderLeft:a.borderLeft[e],borderRight:a.borderRight[e]}))}),n}function aS(t){for(var e;t.hasNode(e=mu("_root")););return e}function oS(t,e){for(var r=0,i=1;i<e.length;++i)r+=lS(t,e[i-1],e[i]);return r}function lS(t,e,r){for(var i=M9(r,sr(r,function(u,d){return d})),n=La(sr(e,function(u){return jo(sr(t.outEdges(u),function(d){return{pos:i[d.w],weight:t.edge(d).weight}}),"pos")})),s=1;s<r.length;)s<<=1;var a=2*s-1;s-=1;var o=sr(new Array(a),function(){return 0}),l=0;return kt(n.forEach(function(u){var d=u.pos+s;o[d]+=u.weight;for(var f=0;d>0;)d%2&&(f+=o[d+1]),d=d-1>>1,o[d]+=u.weight;l+=u.weight*f})),l}function cS(t){var e={},r=dn(t.nodes(),function(o){return!t.children(o).length}),i=_s(sr(r,function(o){return t.node(o).rank})),n=sr(xs(i+1),function(){return[]});function s(o){if(!_e(e,o)){e[o]=!0;var l=t.node(o);n[l.rank].push(o),kt(t.successors(o),s)}}var a=jo(r,function(o){return t.node(o).rank});return kt(a,s),n}function uS(t,e){return sr(e,function(r){var i=t.inEdges(r);if(i.length){var n=qo(i,function(s,a){var o=t.edge(a),l=t.node(a.v);return{sum:s.sum+o.weight*l.order,weight:s.weight+o.weight}},{sum:0,weight:0});return{v:r,barycenter:n.sum/n.weight,weight:n.weight}}else return{v:r}})}function hS(t,e){var r={};kt(t,function(n,s){var a=r[n.v]={indegree:0,in:[],out:[],vs:[n.v],i:s};Ze(n.barycenter)||(a.barycenter=n.barycenter,a.weight=n.weight)}),kt(e.edges(),function(n){var s=r[n.v],a=r[n.w];!Ze(s)&&!Ze(a)&&(a.indegree++,s.out.push(r[n.w]))});var i=dn(r,function(n){return!n.indegree});return dS(i)}function dS(t){var e=[];function r(s){return function(a){a.merged||(Ze(a.barycenter)||Ze(s.barycenter)||a.barycenter>=s.barycenter)&&fS(s,a)}}function i(s){return function(a){a.in.push(s),--a.indegree===0&&t.push(a)}}for(;t.length;){var n=t.pop();e.push(n),kt(n.in.reverse(),r(n)),kt(n.out,i(n))}return sr(dn(e,function(s){return!s.merged}),function(s){return Eo(s,["vs","i","barycenter","weight"])})}function fS(t,e){var r=0,i=0;t.weight&&(r+=t.barycenter*t.weight,i+=t.weight),e.weight&&(r+=e.barycenter*e.weight,i+=e.weight),t.vs=e.vs.concat(t.vs),t.barycenter=r/i,t.weight=i,t.i=Math.min(e.i,t.i),e.merged=!0}function pS(t,e){var r=q9(t,function(d){return _e(d,"barycenter")}),i=r.lhs,n=jo(r.rhs,function(d){return-d.i}),s=[],a=0,o=0,l=0;i.sort(gS(!!e)),l=y2(s,n,l),kt(i,function(d){l+=d.vs.length,s.push(d.vs),a+=d.barycenter*d.weight,o+=d.weight,l=y2(s,n,l)});var u={vs:La(s)};return o&&(u.barycenter=a/o,u.weight=o),u}function y2(t,e,r){for(var i;e.length&&(i=bc(e)).i<=r;)e.pop(),t.push(i.vs),r++;return r}function gS(t){return function(e,r){return e.barycenter<r.barycenter?-1:e.barycenter>r.barycenter?1:t?r.i-e.i:e.i-r.i}}function Ey(t,e,r,i){var n=t.children(e),s=t.node(e),a=s?s.borderLeft:void 0,o=s?s.borderRight:void 0,l={};a&&(n=dn(n,function(_){return _!==a&&_!==o}));var u=uS(t,n);kt(u,function(_){if(t.children(_.v).length){var k=Ey(t,_.v,r,i);l[_.v]=k,_e(k,"barycenter")&&mS(_,k)}});var d=hS(u,r);yS(d,l);var f=pS(d,i);if(a&&(f.vs=La([a,f.vs,o]),t.predecessors(a).length)){var p=t.node(t.predecessors(a)[0]),g=t.node(t.predecessors(o)[0]);_e(f,"barycenter")||(f.barycenter=0,f.weight=0),f.barycenter=(f.barycenter*f.weight+p.order+g.order)/(f.weight+2),f.weight+=2}return f}function yS(t,e){kt(t,function(r){r.vs=La(r.vs.map(function(i){return e[i]?e[i].vs:i}))})}function mS(t,e){Ze(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)}function bS(t){var e=ky(t),r=m2(t,xs(1,e+1),"inEdges"),i=m2(t,xs(e-1,-1,-1),"outEdges"),n=cS(t);b2(t,n);for(var s=Number.POSITIVE_INFINITY,a,o=0,l=0;l<4;++o,++l){_S(o%2?r:i,o%4>=2),n=bu(t);var u=oS(t,n);u<s&&(l=0,a=$E(n),s=u)}b2(t,a)}function m2(t,e,r){return sr(e,function(i){return sS(t,i,r)})}function _S(t,e){var r=new or;kt(t,function(i){var n=i.graph().root,s=Ey(i,n,r,e);kt(s.vs,function(a,o){i.node(a).order=o}),nS(i,r,s.vs)})}function b2(t,e){kt(e,function(r){kt(r,function(i,n){t.node(i).order=n})})}function xS(t){var e=kS(t);kt(t.graph().dummyChains,function(r){for(var i=t.node(r),n=i.edgeObj,s=vS(t,e,n.v,n.w),a=s.path,o=s.lca,l=0,u=a[l],d=!0;r!==n.w;){if(i=t.node(r),d){for(;(u=a[l])!==o&&t.node(u).maxRank<i.rank;)l++;u===o&&(d=!1)}if(!d){for(;l<a.length-1&&t.node(u=a[l+1]).minRank<=i.rank;)l++;u=a[l]}t.setParent(r,u),r=t.successors(r)[0]}})}function vS(t,e,r,i){var n=[],s=[],a=Math.min(e[r].low,e[i].low),o=Math.max(e[r].lim,e[i].lim),l,u;l=r;do l=t.parent(l),n.push(l);while(l&&(e[l].low>a||o>e[l].lim));for(u=l,l=i;(l=t.parent(l))!==u;)s.push(l);return{path:n.concat(s.reverse()),lca:u}}function kS(t){var e={},r=0;function i(n){var s=r;kt(t.children(n),i),e[n]={low:s,lim:r++}}return kt(t.children(),i),e}function wS(t,e){var r={};function i(n,s){var a=0,o=0,l=n.length,u=bc(s);return kt(s,function(d,f){var p=ES(t,d),g=p?t.node(p).order:l;(p||d===u)&&(kt(s.slice(o,f+1),function(_){kt(t.predecessors(_),function(k){var w=t.node(k),S=w.order;(S<a||g<S)&&!(w.dummy&&t.node(_).dummy)&&Cy(r,k,_)})}),o=f+1,a=g)}),s}return qo(e,i),r}function TS(t,e){var r={};function i(s,a,o,l,u){var d;kt(xs(a,o),function(f){d=s[f],t.node(d).dummy&&kt(t.predecessors(d),function(p){var g=t.node(p);g.dummy&&(g.order<l||g.order>u)&&Cy(r,p,d)})})}function n(s,a){var o=-1,l,u=0;return kt(a,function(d,f){if(t.node(d).dummy==="border"){var p=t.predecessors(d);p.length&&(l=t.node(p[0]).order,i(a,u,f,o,l),u=f,o=l)}i(a,u,a.length,l,s.length)}),a}return qo(e,n),r}function ES(t,e){if(t.node(e).dummy)return m0(t.predecessors(e),function(r){return t.node(r).dummy})}function Cy(t,e,r){if(e>r){var i=e;e=r,r=i}var n=t[e];n||(t[e]=n={}),n[r]=!0}function CS(t,e,r){if(e>r){var i=e;e=r,r=i}return _e(t[e],r)}function SS(t,e,r,i){var n={},s={},a={};return kt(e,function(o){kt(o,function(l,u){n[l]=l,s[l]=l,a[l]=u})}),kt(e,function(o){var l=-1;kt(o,function(u){var d=i(u);if(d.length){d=jo(d,function(k){return a[k]});for(var f=(d.length-1)/2,p=Math.floor(f),g=Math.ceil(f);p<=g;++p){var _=d[p];s[u]===u&&l<a[_]&&!CS(r,u,_)&&(s[_]=u,s[u]=n[u]=n[_],l=a[_])}}})}),{root:n,align:s}}function AS(t,e,r,i,n){var s={},a=LS(t,e,r,n),o=n?"borderLeft":"borderRight";function l(f,p){for(var g=a.nodes(),_=g.pop(),k={};_;)k[_]?f(_):(k[_]=!0,g.push(_),g=g.concat(p(_))),_=g.pop()}function u(f){s[f]=a.inEdges(f).reduce(function(p,g){return Math.max(p,s[g.v]+a.edge(g))},0)}function d(f){var p=a.outEdges(f).reduce(function(_,k){return Math.min(_,s[k.w]-a.edge(k))},Number.POSITIVE_INFINITY),g=t.node(f);p!==Number.POSITIVE_INFINITY&&g.borderType!==o&&(s[f]=Math.max(s[f],p))}return l(u,a.predecessors.bind(a)),l(d,a.successors.bind(a)),kt(i,function(f){s[f]=s[r[f]]}),s}function LS(t,e,r,i){var n=new or,s=t.graph(),a=IS(s.nodesep,s.edgesep,i);return kt(e,function(o){var l;kt(o,function(u){var d=r[u];if(n.setNode(d),l){var f=r[l],p=n.edge(f,d);n.setEdge(f,d,Math.max(a(t,u,l),p||0))}l=u})}),n}function DS(t,e){return _0(yn(e),function(r){var i=Number.NEGATIVE_INFINITY,n=Number.POSITIVE_INFINITY;return KC(r,function(s,a){var o=OS(t,a)/2;i=Math.max(s+o,i),n=Math.min(s-o,n)}),i-n})}function MS(t,e){var r=yn(e),i=To(r),n=_s(r);kt(["u","d"],function(s){kt(["l","r"],function(a){var o=s+a,l=t[o],u;if(l!==e){var d=yn(l);u=a==="l"?i-To(d):n-_s(d),u&&(t[o]=yu(l,function(f){return f+u}))}})})}function NS(t,e){return yu(t.ul,function(r,i){if(e)return t[e.toLowerCase()][i];var n=jo(sr(t,i));return(n[1]+n[2])/2})}function BS(t){var e=bu(t),r=s1(wS(t,e),TS(t,e)),i={},n;kt(["u","d"],function(a){n=a==="u"?e:yn(e).reverse(),kt(["l","r"],function(o){o==="r"&&(n=sr(n,function(f){return yn(f).reverse()}));var l=(a==="u"?t.predecessors:t.successors).bind(t),u=SS(t,n,r,l),d=AS(t,n,u.root,u.align,o==="r");o==="r"&&(d=yu(d,function(f){return-f})),i[a+o]=d})});var s=DS(t,i);return MS(i,s),NS(i,t.graph().align)}function IS(t,e,r){return function(i,n,s){var a=i.node(n),o=i.node(s),l=0,u;if(l+=a.width/2,_e(a,"labelpos"))switch(a.labelpos.toLowerCase()){case"l":u=-a.width/2;break;case"r":u=a.width/2;break}if(u&&(l+=r?u:-u),u=0,l+=(a.dummy?e:t)/2,l+=(o.dummy?e:t)/2,l+=o.width/2,_e(o,"labelpos"))switch(o.labelpos.toLowerCase()){case"l":u=o.width/2;break;case"r":u=-o.width/2;break}return u&&(l+=r?u:-u),u=0,l}}function OS(t,e){return t.node(e).width}function RS(t){t=vy(t),FS(t),kt(BS(t),function(e,r){t.node(r).x=e})}function FS(t){var e=bu(t),r=t.graph().ranksep,i=0;kt(e,function(n){var s=_s(sr(n,function(a){return t.node(a).height}));kt(n,function(a){t.node(a).y=i+s/2}),i+=s+r})}function Ma(t,e){var r=e&&e.debugTiming?j9:$9;r("layout",function(){var i=r(" buildLayoutGraph",function(){return $S(t)});r(" runLayout",function(){PS(i,r)}),r(" updateInputGraph",function(){YS(t,i)})})}function PS(t,e){e(" makeSpaceForEdgeLabels",function(){XS(t)}),e(" removeSelfEdges",function(){nA(t)}),e(" acyclic",function(){V9(t)}),e(" nestingGraph.run",function(){tS(t)}),e(" rank",function(){_A(vy(t))}),e(" injectEdgeLabelProxies",function(){KS(t)}),e(" removeEmptyRanks",function(){G9(t)}),e(" nestingGraph.cleanup",function(){iS(t)}),e(" normalizeRanks",function(){H9(t)}),e(" assignRankMinMax",function(){ZS(t)}),e(" removeEdgeLabelProxies",function(){QS(t)}),e(" normalize.run",function(){oA(t)}),e(" parentDummyChains",function(){xS(t)}),e(" addBorderSegments",function(){X9(t)}),e(" order",function(){bS(t)}),e(" insertSelfEdges",function(){sA(t)}),e(" adjustCoordinateSystem",function(){K9(t)}),e(" position",function(){RS(t)}),e(" positionSelfEdges",function(){aA(t)}),e(" removeBorderNodes",function(){iA(t)}),e(" normalize.undo",function(){cA(t)}),e(" fixupEdgeLabelCoords",function(){eA(t)}),e(" undoCoordinateSystem",function(){Z9(t)}),e(" translateGraph",function(){JS(t)}),e(" assignNodeIntersects",function(){tA(t)}),e(" reversePoints",function(){rA(t)}),e(" acyclic.undo",function(){z9(t)})}function YS(t,e){kt(t.nodes(),function(r){var i=t.node(r),n=e.node(r);i&&(i.x=n.x,i.y=n.y,e.children(r).length&&(i.width=n.width,i.height=n.height))}),kt(t.edges(),function(r){var i=t.edge(r),n=e.edge(r);i.points=n.points,_e(n,"x")&&(i.x=n.x,i.y=n.y)}),t.graph().width=e.graph().width,t.graph().height=e.graph().height}var VS=["nodesep","edgesep","ranksep","marginx","marginy"],US={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},zS=["acyclicer","ranker","rankdir","align"],WS=["width","height"],HS={width:0,height:0},GS=["minlen","weight","width","height","labeloffset"],qS={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},jS=["labelpos"];function $S(t){var e=new or({multigraph:!0,compound:!0}),r=bh(t.graph());return e.setGraph(s1({},US,mh(r,VS),Eo(r,zS))),kt(t.nodes(),function(i){var n=bh(t.node(i));e.setNode(i,Vs(mh(n,WS),HS)),e.setParent(i,t.parent(i))}),kt(t.edges(),function(i){var n=bh(t.edge(i));e.setEdge(i,s1({},qS,mh(n,GS),Eo(n,jS)))}),e}function XS(t){var e=t.graph();e.ranksep/=2,kt(t.edges(),function(r){var i=t.edge(r);i.minlen*=2,i.labelpos.toLowerCase()!=="c"&&(e.rankdir==="TB"||e.rankdir==="BT"?i.width+=i.labeloffset:i.height+=i.labeloffset)})}function KS(t){kt(t.edges(),function(e){var r=t.edge(e);if(r.width&&r.height){var i=t.node(e.v),n=t.node(e.w),s={rank:(n.rank-i.rank)/2+i.rank,e};Da(t,"edge-proxy",s,"_ep")}})}function ZS(t){var e=0;kt(t.nodes(),function(r){var i=t.node(r);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,e=_s(e,i.maxRank))}),t.graph().maxRank=e}function QS(t){kt(t.nodes(),function(e){var r=t.node(e);r.dummy==="edge-proxy"&&(t.edge(r.e).labelRank=r.rank,t.removeNode(e))})}function JS(t){var e=Number.POSITIVE_INFINITY,r=0,i=Number.POSITIVE_INFINITY,n=0,s=t.graph(),a=s.marginx||0,o=s.marginy||0;function l(u){var d=u.x,f=u.y,p=u.width,g=u.height;e=Math.min(e,d-p/2),r=Math.max(r,d+p/2),i=Math.min(i,f-g/2),n=Math.max(n,f+g/2)}kt(t.nodes(),function(u){l(t.node(u))}),kt(t.edges(),function(u){var d=t.edge(u);_e(d,"x")&&l(d)}),e-=a,i-=o,kt(t.nodes(),function(u){var d=t.node(u);d.x-=e,d.y-=i}),kt(t.edges(),function(u){var d=t.edge(u);kt(d.points,function(f){f.x-=e,f.y-=i}),_e(d,"x")&&(d.x-=e),_e(d,"y")&&(d.y-=i)}),s.width=r-e+a,s.height=n-i+o}function tA(t){kt(t.edges(),function(e){var r=t.edge(e),i=t.node(e.v),n=t.node(e.w),s,a;r.points?(s=r.points[0],a=r.points[r.points.length-1]):(r.points=[],s=n,a=i),r.points.unshift(d2(i,s)),r.points.push(d2(n,a))})}function eA(t){kt(t.edges(),function(e){var r=t.edge(e);if(_e(r,"x"))switch((r.labelpos==="l"||r.labelpos==="r")&&(r.width-=r.labeloffset),r.labelpos){case"l":r.x-=r.width/2+r.labeloffset;break;case"r":r.x+=r.width/2+r.labeloffset;break}})}function rA(t){kt(t.edges(),function(e){var r=t.edge(e);r.reversed&&r.points.reverse()})}function iA(t){kt(t.nodes(),function(e){if(t.children(e).length){var r=t.node(e),i=t.node(r.borderTop),n=t.node(r.borderBottom),s=t.node(bc(r.borderLeft)),a=t.node(bc(r.borderRight));r.width=Math.abs(a.x-s.x),r.height=Math.abs(n.y-i.y),r.x=s.x+r.width/2,r.y=i.y+r.height/2}}),kt(t.nodes(),function(e){t.node(e).dummy==="border"&&t.removeNode(e)})}function nA(t){kt(t.edges(),function(e){if(e.v===e.w){var r=t.node(e.v);r.selfEdges||(r.selfEdges=[]),r.selfEdges.push({e,label:t.edge(e)}),t.removeEdge(e)}})}function sA(t){var e=bu(t);kt(e,function(r){var i=0;kt(r,function(n,s){var a=t.node(n);a.order=s+i,kt(a.selfEdges,function(o){Da(t,"selfedge",{width:o.label.width,height:o.label.height,rank:a.rank,order:s+ ++i,e:o.e,label:o.label},"_se")}),delete a.selfEdges})})}function aA(t){kt(t.nodes(),function(e){var r=t.node(e);if(r.dummy==="selfedge"){var i=t.node(r.e.v),n=i.x+i.width/2,s=i.y,a=r.x-n,o=i.height/2;t.setEdge(r.e,r.label),t.removeNode(e),r.label.points=[{x:n+2*a/3,y:s-o},{x:n+5*a/6,y:s-o},{x:n+a,y:s},{x:n+5*a/6,y:s+o},{x:n+2*a/3,y:s+o}],r.label.x=r.x,r.label.y=r.y}})}function mh(t,e){return yu(Eo(t,e),Number)}function bh(t){var e={};return kt(t,function(r,i){e[i.toLowerCase()]=r}),e}function oA(t){t.graph().dummyChains=[],kt(t.edges(),function(e){lA(t,e)})}function lA(t,e){var r=e.v,i=t.node(r).rank,n=e.w,s=t.node(n).rank,a=e.name,o=t.edge(e),l=o.labelRank;if(s!==i+1){t.removeEdge(e);var u,d,f;for(f=0,++i;i<s;++f,++i)o.points=[],d={width:0,height:0,edgeLabel:o,edgeObj:e,rank:i},u=Da(t,"edge",d,"_d"),i===l&&(d.width=o.width,d.height=o.height,d.dummy="edge-label",d.labelpos=o.labelpos),t.setEdge(r,u,{weight:o.weight},a),f===0&&t.graph().dummyChains.push(u),r=u;t.setEdge(r,n,{weight:o.weight},a)}}function cA(t){kt(t.graph().dummyChains,function(e){var r=t.node(e),i=r.edgeLabel,n;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),r.dummy==="edge-label"&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)})}function x0(t){var e={};function r(i){var n=t.node(i);if(_e(e,i))return n.rank;e[i]=!0;var s=To(sr(t.outEdges(i),function(a){return r(a.w)-t.edge(a).minlen}));return(s===Number.POSITIVE_INFINITY||s===void 0||s===null)&&(s=0),n.rank=s}kt(t.sources(),r)}function Co(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}function Sy(t){var e=new or({directed:!1}),r=t.nodes()[0],i=t.nodeCount();e.setNode(r,{});for(var n,s;uA(e,t)<i;)n=hA(e,t),s=e.hasNode(n.v)?Co(t,n):-Co(t,n),dA(e,t,s);return e}function uA(t,e){function r(i){kt(e.nodeEdges(i),function(n){var s=n.v,a=i===s?n.w:s;!t.hasNode(a)&&!Co(e,n)&&(t.setNode(a,{}),t.setEdge(i,a,{}),r(a))})}return kt(t.nodes(),r),t.nodeCount()}function hA(t,e){return _0(e.edges(),function(r){if(t.hasNode(r.v)!==t.hasNode(r.w))return Co(e,r)})}function dA(t,e,r){kt(t.nodes(),function(i){e.node(i).rank+=r})}function fA(){}fA.prototype=new Error;function Ay(t,e,r){ar(e)||(e=[e]);var i=(t.isDirected()?t.successors:t.neighbors).bind(t),n=[],s={};return kt(e,function(a){if(!t.hasNode(a))throw new Error("Graph does not have node: "+a);Ly(t,a,r==="post",s,i,n)}),n}function Ly(t,e,r,i,n,s){_e(i,e)||(i[e]=!0,r||s.push(e),kt(n(e),function(a){Ly(t,a,r,i,n,s)}),r&&s.push(e))}function pA(t,e){return Ay(t,e,"post")}function gA(t,e){return Ay(t,e,"pre")}Bs.initLowLimValues=k0;Bs.initCutValues=v0;Bs.calcCutValue=Dy;Bs.leaveEdge=Ny;Bs.enterEdge=By;Bs.exchangeEdges=Iy;function Bs(t){t=W9(t),x0(t);var e=Sy(t);k0(e),v0(e,t);for(var r,i;r=Ny(e);)i=By(e,t,r),Iy(e,t,r,i)}function v0(t,e){var r=pA(t,t.nodes());r=r.slice(0,r.length-1),kt(r,function(i){yA(t,e,i)})}function yA(t,e,r){var i=t.node(r),n=i.parent;t.edge(r,n).cutvalue=Dy(t,e,r)}function Dy(t,e,r){var i=t.node(r),n=i.parent,s=!0,a=e.edge(r,n),o=0;return a||(s=!1,a=e.edge(n,r)),o=a.weight,kt(e.nodeEdges(r),function(l){var u=l.v===r,d=u?l.w:l.v;if(d!==n){var f=u===s,p=e.edge(l).weight;if(o+=f?p:-p,bA(t,r,d)){var g=t.edge(r,d).cutvalue;o+=f?-g:g}}}),o}function k0(t,e){arguments.length<2&&(e=t.nodes()[0]),My(t,{},1,e)}function My(t,e,r,i,n){var s=r,a=t.node(i);return e[i]=!0,kt(t.neighbors(i),function(o){_e(e,o)||(r=My(t,e,r,o,i))}),a.low=s,a.lim=r++,n?a.parent=n:delete a.parent,r}function Ny(t){return m0(t.edges(),function(e){return t.edge(e).cutvalue<0})}function By(t,e,r){var i=r.v,n=r.w;e.hasEdge(i,n)||(i=r.w,n=r.v);var s=t.node(i),a=t.node(n),o=s,l=!1;s.lim>a.lim&&(o=a,l=!0);var u=dn(e.edges(),function(d){return l===_2(t,t.node(d.v),o)&&l!==_2(t,t.node(d.w),o)});return _0(u,function(d){return Co(e,d)})}function Iy(t,e,r,i){var n=r.v,s=r.w;t.removeEdge(n,s),t.setEdge(i.v,i.w,{}),k0(t),v0(t,e),mA(t,e)}function mA(t,e){var r=m0(t.nodes(),function(n){return!e.node(n).parent}),i=gA(t,r);i=i.slice(1),kt(i,function(n){var s=t.node(n).parent,a=e.edge(n,s),o=!1;a||(a=e.edge(s,n),o=!0),e.node(n).rank=e.node(s).rank+(o?a.minlen:-a.minlen)})}function bA(t,e,r){return t.hasEdge(e,r)}function _2(t,e,r){return r.low<=e.lim&&e.lim<=r.lim}function _A(t){switch(t.graph().ranker){case"network-simplex":x2(t);break;case"tight-tree":vA(t);break;case"longest-path":xA(t);break;default:x2(t)}}var xA=x0;function vA(t){x0(t),Sy(t)}function x2(t){Bs(t)}function fn(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:kA(t),edges:wA(t)};return Ze(t.graph())||(e.value=GE(t.graph())),e}function kA(t){return sr(t.nodes(),function(e){var r=t.node(e),i=t.parent(e),n={v:e};return Ze(r)||(n.value=r),Ze(i)||(n.parent=i),n})}function wA(t){return sr(t.edges(),function(e){var r=t.edge(e),i={v:e.v,w:e.w};return Ze(e.name)||(i.name=e.name),Ze(r)||(i.value=r),i})}let kl;const TA=new Uint8Array(16);function EA(){if(!kl&&(kl=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!kl))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return kl(TA)}const br=[];for(let t=0;t<256;++t)br.push((t+256).toString(16).slice(1));function CA(t,e=0){return(br[t[e+0]]+br[t[e+1]]+br[t[e+2]]+br[t[e+3]]+"-"+br[t[e+4]]+br[t[e+5]]+"-"+br[t[e+6]]+br[t[e+7]]+"-"+br[t[e+8]]+br[t[e+9]]+"-"+br[t[e+10]]+br[t[e+11]]+br[t[e+12]]+br[t[e+13]]+br[t[e+14]]+br[t[e+15]]).toLowerCase()}const SA=typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto),v2={randomUUID:SA};function AA(t,e,r){if(v2.randomUUID&&!e&&!t)return v2.randomUUID();t=t||{};const i=t.random||(t.rng||EA)();if(i[6]=i[6]&15|64,i[8]=i[8]&63|128,e){r=r||0;for(let n=0;n<16;++n)e[r+n]=i[n];return e}return CA(i)}function Oy(t,e){return!!t.children(e).length}function Ry(t){return _h(t.v)+":"+_h(t.w)+":"+_h(t.name)}var LA=/:/g;function _h(t){return t?String(t).replace(LA,"\\:"):""}function Gi(t,e){e&&t.attr("style",e)}function Fy(t,e,r){e&&t.attr("class",e).attr("class",r+" "+t.attr("class"))}function xi(t,e){var r=e.graph();if(Kg(r)){var i=r.transition;if(ha(i))return i(t)}return t}var o1={normal:MA,vee:NA,undirected:BA};function DA(t){o1=t}function MA(t,e,r,i){var n=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=n.append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");Gi(s,r[i+"Style"]),r[i+"Class"]&&s.attr("class",r[i+"Class"])}function NA(t,e,r,i){var n=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=n.append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");Gi(s,r[i+"Style"]),r[i+"Class"]&&s.attr("class",r[i+"Class"])}function BA(t,e,r,i){var n=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),s=n.append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");Gi(s,r[i+"Style"]),r[i+"Class"]&&s.attr("class",r[i+"Class"])}function w0(t,e){var r=t.append("foreignObject").attr("width","100000"),i=r.append("xhtml:div");i.attr("xmlns","http://www.w3.org/1999/xhtml");var n=e.label;switch(typeof n){case"function":i.insert(n);break;case"object":i.insert(function(){return n});break;default:i.html(n)}Gi(i,e.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap");var s=i.node().getBoundingClientRect();return r.attr("width",s.width).attr("height",s.height),r}function IA(t,e){var r=t;return r.node().appendChild(e.label),Gi(r,e.labelStyle),r}function OA(t,e){for(var r=t.append("text"),i=RA(e.label).split(`
|
|
7
7
|
`),n=0;n<i.length;n++)r.append("tspan").attr("xml:space","preserve").attr("dy","1em").attr("x","1").text(i[n]);return Gi(r,e.labelStyle),r}function RA(t){for(var e="",r=!1,i,n=0;n<t.length;++n)if(i=t[n],r){switch(i){case"n":e+=`
|
|
8
|
-
`;break;default:e+=i}r=!1}else i==="\\"?r=!0:e+=i;return e}function w0(t,e,r){var i=e.label,n=t.append("g");e.labelType==="svg"?IA(n,e):typeof i!="string"||e.labelType==="html"?k0(n,e):OA(n,e);var s=n.node().getBBox(),a;switch(r){case"top":a=-e.height/2;break;case"bottom":a=e.height/2-s.height;break;default:a=-s.height/2}return n.attr("transform","translate("+-s.width/2+","+a+")"),n}var o1=function(t,e){var r=e.nodes().filter(function(s){return Oy(e,s)}),i=t.selectAll("g.cluster").data(r,function(s){return s});xi(i.exit(),e).style("opacity",0).remove();var n=i.enter().append("g").attr("class","cluster").attr("id",function(s){var a=e.node(s);return a.id}).style("opacity",0).each(function(s){var a=e.node(s),o=At(this);At(this).append("rect");var l=o.append("g").attr("class","label");w0(l,a,a.clusterLabelPos)});return i=i.merge(n),i=xi(i,e).style("opacity",1),i.selectAll("rect").each(function(s){var a=e.node(s),o=At(this);Gi(o,a.style)}),i};function FA(t){o1=t}let l1=function(t,e){var r=t.selectAll("g.edgeLabel").data(e.edges(),function(n){return Ry(n)}).classed("update",!0);r.exit().remove(),r.enter().append("g").classed("edgeLabel",!0).style("opacity",0),r=t.selectAll("g.edgeLabel"),r.each(function(n){var s=At(this);s.select(".label").remove();var a=e.edge(n),o=w0(s,e.edge(n),0).classed("label",!0),l=o.node().getBBox();a.labelId&&o.attr("id",a.labelId),_e(a,"width")||(a.width=l.width),_e(a,"height")||(a.height=l.height)});var i;return r.exit?i=r.exit():i=r.selectAll(null),xi(i,e).style("opacity",0).remove(),r};function PA(t){l1=t}function k2(t,e){return t.intersect(e)}var c1=function(t,e,r){var i=t.selectAll("g.edgePath").data(e.edges(),function(a){return Ry(a)}).classed("update",!0),n=WA(i,e);HA(i,e);var s=i.merge!==void 0?i.merge(n):i;return xi(s,e).style("opacity",1),s.each(function(a){var o=At(this),l=e.edge(a);l.elem=this,l.id&&o.attr("id",l.id),Fy(o,l.class,(o.classed("update")?"update ":"")+"edgePath")}),s.selectAll("path.path").each(function(a){var o=e.edge(a);o.arrowheadId=mu("arrowhead");var l=At(this).attr("marker-end",function(){return"url("+VA(location.href,o.arrowheadId)+")"}).style("fill","none");xi(l,e).attr("d",function(u){return UA(e,u)}),Gi(l,o.style)}),s.selectAll("defs *").remove(),s.selectAll("defs").each(function(a){var o=e.edge(a),l=r[o.arrowhead];l(At(this),o.arrowheadId,o,"arrowhead")}),s};function YA(t){c1=t}function VA(t,e){var r=t.split("#")[0];return r+"#"+e}function UA(t,e){var r=t.edge(e),i=t.node(e.v),n=t.node(e.w),s=r.points.slice(1,r.points.length-1);return s.unshift(k2(i,s[0])),s.push(k2(n,s[s.length-1])),Py(r,s)}function Py(t,e){var r=(Ca||pv.line)().x(function(i){return i.x}).y(function(i){return i.y});return(r.curve||r.interpolate)(t.curve),r(e)}function zA(t){var e=t.getBBox(),r=t.ownerSVGElement.getScreenCTM().inverse().multiply(t.getScreenCTM()).translate(e.width/2,e.height/2);return{x:r.e,y:r.f}}function WA(t,e){var r=t.enter().append("g").attr("class","edgePath").style("opacity",0);return r.append("path").attr("class","path").attr("d",function(i){var n=e.edge(i),s=e.node(i.v).elem,a=xs(n.points.length).map(function(){return zA(s)});return Py(n,a)}),r.append("defs"),r}function HA(t,e){var r=t.exit();xi(r,e).style("opacity",0).remove()}var u1=function(t,e,r){var i=e.nodes().filter(function(a){return!Oy(e,a)}),n=t.selectAll("g.node").data(i,function(a){return a}).classed("update",!0);n.exit().remove(),n.enter().append("g").attr("class","node").style("opacity",0),n=t.selectAll("g.node"),n.each(function(a){var o=e.node(a),l=At(this);Fy(l,o.class,(l.classed("update")?"update ":"")+"node"),l.select("g.label").remove();var u=l.append("g").attr("class","label"),d=w0(u,o),f=r[o.shape],p=Eo(d.node().getBBox(),"width","height");o.elem=this,o.id&&l.attr("id",o.id),o.labelId&&u.attr("id",o.labelId),_e(o,"width")&&(p.width=o.width),_e(o,"height")&&(p.height=o.height),p.width+=o.paddingLeft+o.paddingRight,p.height+=o.paddingTop+o.paddingBottom,u.attr("transform","translate("+(o.paddingLeft-o.paddingRight)/2+","+(o.paddingTop-o.paddingBottom)/2+")");var g=At(this);g.select(".label-container").remove();var _=f(g,p,o).classed("label-container",!0);Gi(_,o.style);var k=_.node().getBBox();o.width=k.width,o.height=k.height});var s;return n.exit?s=n.exit():s=n.selectAll(null),xi(s,e).style("opacity",0).remove(),n};function GA(t){u1=t}function qA(t,e){var r=t.filter(function(){return!At(this).classed("update")});function i(n){var s=e.node(n);return"translate("+s.x+","+s.y+")"}r.attr("transform",i),xi(t,e).style("opacity",1).attr("transform",i),xi(r.selectAll("rect"),e).attr("width",function(n){return e.node(n).width}).attr("height",function(n){return e.node(n).height}).attr("x",function(n){var s=e.node(n);return-s.width/2}).attr("y",function(n){var s=e.node(n);return-s.height/2})}function jA(t,e){var r=t.filter(function(){return!At(this).classed("update")});function i(n){var s=e.edge(n);return _e(s,"x")?"translate("+s.x+","+s.y+")":""}r.attr("transform",i),xi(t,e).style("opacity",1).attr("transform",i)}function $A(t,e){var r=t.filter(function(){return!At(this).classed("update")});function i(n){var s=e.node(n);return"translate("+s.x+","+s.y+")"}r.attr("transform",i),xi(t,e).style("opacity",1).attr("transform",i)}function Yy(t,e,r,i){var n=t.x,s=t.y,a=n-i.x,o=s-i.y,l=Math.sqrt(e*e*o*o+r*r*a*a),u=Math.abs(e*r*a/l);i.x<n&&(u=-u);var d=Math.abs(e*r*o/l);return i.y<s&&(d=-d),{x:n+u,y:s+d}}function XA(t,e,r){return Yy(t,e,e,r)}function KA(t,e,r,i){var n,s,a,o,l,u,d,f,p,g,_,k,w,S,A;if(n=e.y-t.y,a=t.x-e.x,l=e.x*t.y-t.x*e.y,p=n*r.x+a*r.y+l,g=n*i.x+a*i.y+l,!(p!==0&&g!==0&&w2(p,g))&&(s=i.y-r.y,o=r.x-i.x,u=i.x*r.y-r.x*i.y,d=s*t.x+o*t.y+u,f=s*e.x+o*e.y+u,!(d!==0&&f!==0&&w2(d,f))&&(_=n*o-s*a,_!==0)))return k=Math.abs(_/2),w=a*u-o*l,S=w<0?(w-k)/_:(w+k)/_,w=s*l-n*u,A=w<0?(w-k)/_:(w+k)/_,{x:S,y:A}}function w2(t,e){return t*e>0}function qi(t,e,r){var i=t.x,n=t.y,s=[],a=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;e.forEach(function(_){a=Math.min(a,_.x),o=Math.min(o,_.y)});for(var l=i-t.width/2-a,u=n-t.height/2-o,d=0;d<e.length;d++){var f=e[d],p=e[d<e.length-1?d+1:0],g=KA(t,r,{x:l+f.x,y:u+f.y},{x:l+p.x,y:u+p.y});g&&s.push(g)}return s.length?(s.length>1&&s.sort(function(_,k){var w=_.x-r.x,S=_.y-r.y,A=Math.sqrt(w*w+S*S),O=k.x-r.x,P=k.y-r.y,W=Math.sqrt(O*O+P*P);return A<W?-1:A===W?0:1}),s[0]):(console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t)}function T0(t,e){var r=t.x,i=t.y,n=e.x-r,s=e.y-i,a=t.width/2,o=t.height/2,l,u;return Math.abs(s)*a>Math.abs(n)*o?(s<0&&(o=-o),l=s===0?0:o*n/s,u=o):(n<0&&(a=-a),l=a,u=n===0?0:a*s/n),{x:r+l,y:i+u}}var h1={rect:QA,ellipse:JA,circle:tL,diamond:eL};function ZA(t){h1=t}function QA(t,e,r){var i=t.insert("rect",":first-child").attr("rx",r.rx).attr("ry",r.ry).attr("x",-e.width/2).attr("y",-e.height/2).attr("width",e.width).attr("height",e.height);return r.intersect=function(n){return T0(r,n)},i}function JA(t,e,r){var i=e.width/2,n=e.height/2,s=t.insert("ellipse",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("rx",i).attr("ry",n);return r.intersect=function(a){return Yy(r,i,n,a)},s}function tL(t,e,r){var i=Math.max(e.width,e.height)/2,n=t.insert("circle",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("r",i);return r.intersect=function(s){return XA(r,i,s)},n}function eL(t,e,r){var i=e.width*Math.SQRT2/2,n=e.height*Math.SQRT2/2,s=[{x:0,y:-n},{x:-i,y:0},{x:0,y:n},{x:i,y:0}],a=t.insert("polygon",":first-child").attr("points",s.map(function(o){return o.x+","+o.y}).join(" "));return r.intersect=function(o){return qi(r,s,o)},a}function rL(){var t=function(e,r){sL(r);var i=Ua(e,"output"),n=Ua(i,"clusters"),s=Ua(i,"edgePaths"),a=l1(Ua(i,"edgeLabels"),r),o=u1(Ua(i,"nodes"),r,h1);Ma(r),$A(o,r),jA(a,r),c1(s,r,a1);var l=o1(n,r);qA(l,r),aL(r)};return t.createNodes=function(e){return arguments.length?(GA(e),t):u1},t.createClusters=function(e){return arguments.length?(FA(e),t):o1},t.createEdgeLabels=function(e){return arguments.length?(PA(e),t):l1},t.createEdgePaths=function(e){return arguments.length?(YA(e),t):c1},t.shapes=function(e){return arguments.length?(ZA(e),t):h1},t.arrows=function(e){return arguments.length?(DA(e),t):a1},t}var iL={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},nL={arrowhead:"normal",curve:$r};function sL(t){t.nodes().forEach(function(e){var r=t.node(e);!_e(r,"label")&&!t.children(e).length&&(r.label=e),_e(r,"paddingX")&&Vs(r,{paddingLeft:r.paddingX,paddingRight:r.paddingX}),_e(r,"paddingY")&&Vs(r,{paddingTop:r.paddingY,paddingBottom:r.paddingY}),_e(r,"padding")&&Vs(r,{paddingLeft:r.padding,paddingRight:r.padding,paddingTop:r.padding,paddingBottom:r.padding}),Vs(r,iL),kt(["paddingLeft","paddingRight","paddingTop","paddingBottom"],function(i){r[i]=Number(r[i])}),_e(r,"width")&&(r._prevWidth=r.width),_e(r,"height")&&(r._prevHeight=r.height)}),t.edges().forEach(function(e){var r=t.edge(e);_e(r,"label")||(r.label=""),Vs(r,nL)})}function aL(t){kt(t.nodes(),function(e){var r=t.node(e);_e(r,"_prevWidth")?r.width=r._prevWidth:delete r.width,_e(r,"_prevHeight")?r.height=r._prevHeight:delete r.height,delete r._prevWidth,delete r._prevHeight})}function Ua(t,e){var r=t.select("g."+e);return r.empty()&&(r=t.append("g").attr("class",e)),r}var oL=Object.defineProperty,lL=(t,e,r)=>e in t?oL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,za=(t,e,r)=>(lL(t,typeof e!="symbol"?e+"":e,r),r);const Ji={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},B={trace:(...t)=>{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},E0=function(t="fatal"){let e=Ji.fatal;typeof t=="string"?(t=t.toLowerCase(),t in Ji&&(e=Ji[t])):typeof t=="number"&&(e=t),B.trace=()=>{},B.debug=()=>{},B.info=()=>{},B.warn=()=>{},B.error=()=>{},B.fatal=()=>{},e<=Ji.fatal&&(B.fatal=console.error?console.error.bind(console,Zr("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Zr("FATAL"))),e<=Ji.error&&(B.error=console.error?console.error.bind(console,Zr("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Zr("ERROR"))),e<=Ji.warn&&(B.warn=console.warn?console.warn.bind(console,Zr("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Zr("WARN"))),e<=Ji.info&&(B.info=console.info?console.info.bind(console,Zr("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Zr("INFO"))),e<=Ji.debug&&(B.debug=console.debug?console.debug.bind(console,Zr("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Zr("DEBUG"))),e<=Ji.trace&&(B.trace=console.debug?console.debug.bind(console,Zr("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Zr("TRACE")))},Zr=t=>`%c${bi().format("ss.SSS")} : ${t} : `,cL=t=>t?Uy(t).replace(/\\n/g,"#br#").split("#br#"):[""],Vy=t=>_o.sanitize(t),T2=(t,e)=>{var r;if(((r=e.flowchart)==null?void 0:r.htmlLabels)!==!1){const i=e.securityLevel;i==="antiscript"||i==="strict"?t=Vy(t):i!=="loose"&&(t=Uy(t),t=t.replace(/</g,"<").replace(/>/g,">"),t=t.replace(/=/g,"="),t=fL(t))}return t},vi=(t,e)=>t&&(e.dompurifyConfig?t=_o.sanitize(T2(t,e),e.dompurifyConfig).toString():t=_o.sanitize(T2(t,e),{FORBID_TAGS:["style"]}).toString(),t),uL=(t,e)=>typeof t=="string"?vi(t,e):t.flat().map(r=>vi(r,e)),_u=/<br\s*\/?>/gi,hL=t=>_u.test(t),dL=t=>t.split(_u),fL=t=>t.replace(/#br#/g,"<br/>"),Uy=t=>t.replace(_u,"#br#"),pL=t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},gr=t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),Vn=function(t){let e=t;return t.includes("~")?(e=e.replace(/~([^~].*)/,"<$1"),e=e.replace(/~([^~]*)$/,">$1"),Vn(e)):e},he={getRows:cL,sanitizeText:vi,sanitizeTextOrArray:uL,hasBreaks:hL,splitBreaks:dL,lineBreakRegex:_u,removeScript:Vy,getUrl:pL,evaluate:gr},Dr=(t,e)=>e?mt(t,{s:-40,l:10}):mt(t,{s:-40,l:-10}),xu="#ffffff",vu="#f2f2f2";class gL{constructor(){this.background="#f4f4f4",this.darkMode=!1,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||mt(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||mt(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Dr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Dr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Dr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Dr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Wt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Wt(this.tertiaryColor),this.lineColor=this.lineColor||Wt(this.background),this.textColor=this.textColor||this.primaryTextColor,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?pe(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||"grey",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||pe(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Wt(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||se(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||mt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||mt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||mt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||mt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||mt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||mt(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||mt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||mt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||mt(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=pe(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=pe(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||Wt(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||se(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||pe(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||mt(this.primaryColor,{h:64}),this.fillType3=this.fillType3||mt(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||mt(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||mt(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||mt(this.primaryColor,{h:128}),this.fillType7=this.fillType7||mt(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||mt(this.primaryColor,{l:-10}),this.pie5=this.pie5||mt(this.secondaryColor,{l:-10}),this.pie6=this.pie6||mt(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||mt(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||mt(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||mt(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||mt(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||mt(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||mt(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?pe(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||mt(this.primaryColor,{h:-30}),this.git4=this.git4||mt(this.primaryColor,{h:-60}),this.git5=this.git5||mt(this.primaryColor,{h:-90}),this.git6=this.git6||mt(this.primaryColor,{h:60}),this.git7=this.git7||mt(this.primaryColor,{h:120}),this.darkMode?(this.git0=se(this.git0,25),this.git1=se(this.git1,25),this.git2=se(this.git2,25),this.git3=se(this.git3,25),this.git4=se(this.git4,25),this.git5=se(this.git5,25),this.git6=se(this.git6,25),this.git7=se(this.git7,25)):(this.git0=pe(this.git0,25),this.git1=pe(this.git1,25),this.git2=pe(this.git2,25),this.git3=pe(this.git3,25),this.git4=pe(this.git4,25),this.git5=pe(this.git5,25),this.git6=pe(this.git6,25),this.git7=pe(this.git7,25)),this.gitInv0=this.gitInv0||Wt(this.git0),this.gitInv1=this.gitInv1||Wt(this.git1),this.gitInv2=this.gitInv2||Wt(this.git2),this.gitInv3=this.gitInv3||Wt(this.git3),this.gitInv4=this.gitInv4||Wt(this.git4),this.gitInv5=this.gitInv5||Wt(this.git5),this.gitInv6=this.gitInv6||Wt(this.git6),this.gitInv7=this.gitInv7||Wt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||xu,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||vu}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}}const yL=t=>{const e=new gL;return e.calculate(t),e};class mL{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=se(this.primaryColor,16),this.tertiaryColor=mt(this.primaryColor,{h:-160}),this.primaryBorderColor=Wt(this.background),this.secondaryBorderColor=Dr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Dr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Wt(this.primaryColor),this.secondaryTextColor=Wt(this.secondaryColor),this.tertiaryTextColor=Wt(this.tertiaryColor),this.lineColor=Wt(this.background),this.textColor=Wt(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=se(Wt("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=eo(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=pe("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.taskBorderColor=eo(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=eo(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=se(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=se(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,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=se(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.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=mt(this.primaryColor,{h:64}),this.fillType3=mt(this.secondaryColor,{h:64}),this.fillType4=mt(this.primaryColor,{h:-64}),this.fillType5=mt(this.secondaryColor,{h:-64}),this.fillType6=mt(this.primaryColor,{h:128}),this.fillType7=mt(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||mt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||mt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||mt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||mt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||mt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||mt(this.primaryColor,{h:210}),this.cScale9=this.cScale9||mt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||mt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||mt(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||Wt(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScalePeer"+e]=this["cScalePeer"+e]||se(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?pe(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=se(this.secondaryColor,20),this.git1=se(this.pie2||this.secondaryColor,20),this.git2=se(this.pie3||this.tertiaryColor,20),this.git3=se(this.pie4||mt(this.primaryColor,{h:-30}),20),this.git4=se(this.pie5||mt(this.primaryColor,{h:-60}),20),this.git5=se(this.pie6||mt(this.primaryColor,{h:-90}),10),this.git6=se(this.pie7||mt(this.primaryColor,{h:60}),10),this.git7=se(this.pie8||mt(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||Wt(this.git0),this.gitInv1=this.gitInv1||Wt(this.git1),this.gitInv2=this.gitInv2||Wt(this.git2),this.gitInv3=this.gitInv3||Wt(this.git3),this.gitInv4=this.gitInv4||Wt(this.git4),this.gitInv5=this.gitInv5||Wt(this.git5),this.gitInv6=this.gitInv6||Wt(this.git6),this.gitInv7=this.gitInv7||Wt(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||se(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||se(this.background,2)}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}}const bL=t=>{const e=new mL;return e.calculate(t),e};class _L{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=mt(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=mt(this.primaryColor,{h:-160}),this.primaryBorderColor=Dr(this.primaryColor,this.darkMode),this.secondaryBorderColor=Dr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Dr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Wt(this.primaryColor),this.secondaryTextColor=Wt(this.secondaryColor),this.tertiaryTextColor=Wt(this.tertiaryColor),this.lineColor=Wt(this.background),this.textColor=Wt(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="#e8e8e8",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="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=eo(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder="calculated",this.personBkg="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||mt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||mt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||mt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||mt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||mt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||mt(this.primaryColor,{h:210}),this.cScale9=this.cScale9||mt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||mt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||mt(this.primaryColor,{h:330}),this["cScalePeer"+1]=this["cScalePeer"+1]||pe(this.secondaryColor,45),this["cScalePeer"+2]=this["cScalePeer"+2]||pe(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=pe(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||pe(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||mt(this["cScale"+e],{h:180});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||Wt(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||Wt(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=se(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=mt(this.primaryColor,{h:64}),this.fillType3=mt(this.secondaryColor,{h:64}),this.fillType4=mt(this.primaryColor,{h:-64}),this.fillType5=mt(this.secondaryColor,{h:-64}),this.fillType6=mt(this.primaryColor,{h:128}),this.fillType7=mt(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||mt(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||mt(this.primaryColor,{l:-10}),this.pie5=this.pie5||mt(this.secondaryColor,{l:-30}),this.pie6=this.pie6||mt(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||mt(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||mt(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||mt(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||mt(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||mt(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||mt(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||mt(this.primaryColor,{h:-30}),this.git4=this.git4||mt(this.primaryColor,{h:-60}),this.git5=this.git5||mt(this.primaryColor,{h:-90}),this.git6=this.git6||mt(this.primaryColor,{h:60}),this.git7=this.git7||mt(this.primaryColor,{h:120}),this.darkMode?(this.git0=se(this.git0,25),this.git1=se(this.git1,25),this.git2=se(this.git2,25),this.git3=se(this.git3,25),this.git4=se(this.git4,25),this.git5=se(this.git5,25),this.git6=se(this.git6,25),this.git7=se(this.git7,25)):(this.git0=pe(this.git0,25),this.git1=pe(this.git1,25),this.git2=pe(this.git2,25),this.git3=pe(this.git3,25),this.git4=pe(this.git4,25),this.git5=pe(this.git5,25),this.git6=pe(this.git6,25),this.git7=pe(this.git7,25)),this.gitInv0=this.gitInv0||pe(Wt(this.git0),25),this.gitInv1=this.gitInv1||Wt(this.git1),this.gitInv2=this.gitInv2||Wt(this.git2),this.gitInv3=this.gitInv3||Wt(this.git3),this.gitInv4=this.gitInv4||Wt(this.git4),this.gitInv5=this.gitInv5||Wt(this.git5),this.gitInv6=this.gitInv6||Wt(this.git6),this.gitInv7=this.gitInv7||Wt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Wt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Wt(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||xu,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||vu}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}}const xL=t=>{const e=new _L;return e.calculate(t),e};class vL{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=se("#cde498",10),this.primaryBorderColor=Dr(this.primaryColor,this.darkMode),this.secondaryBorderColor=Dr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Dr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Wt(this.primaryColor),this.secondaryTextColor=Wt(this.secondaryColor),this.tertiaryTextColor=Wt(this.primaryColor),this.lineColor=Wt(this.background),this.textColor=Wt(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="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||mt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||mt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||mt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||mt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||mt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||mt(this.primaryColor,{h:210}),this.cScale9=this.cScale9||mt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||mt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||mt(this.primaryColor,{h:330}),this["cScalePeer"+1]=this["cScalePeer"+1]||pe(this.secondaryColor,45),this["cScalePeer"+2]=this["cScalePeer"+2]||pe(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=pe(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||pe(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||mt(this["cScale"+e],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.actorBorder=pe(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.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=mt(this.primaryColor,{h:64}),this.fillType3=mt(this.secondaryColor,{h:64}),this.fillType4=mt(this.primaryColor,{h:-64}),this.fillType5=mt(this.secondaryColor,{h:-64}),this.fillType6=mt(this.primaryColor,{h:128}),this.fillType7=mt(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||mt(this.primaryColor,{l:-30}),this.pie5=this.pie5||mt(this.secondaryColor,{l:-30}),this.pie6=this.pie6||mt(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||mt(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||mt(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||mt(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||mt(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||mt(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||mt(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||mt(this.primaryColor,{h:-30}),this.git4=this.git4||mt(this.primaryColor,{h:-60}),this.git5=this.git5||mt(this.primaryColor,{h:-90}),this.git6=this.git6||mt(this.primaryColor,{h:60}),this.git7=this.git7||mt(this.primaryColor,{h:120}),this.darkMode?(this.git0=se(this.git0,25),this.git1=se(this.git1,25),this.git2=se(this.git2,25),this.git3=se(this.git3,25),this.git4=se(this.git4,25),this.git5=se(this.git5,25),this.git6=se(this.git6,25),this.git7=se(this.git7,25)):(this.git0=pe(this.git0,25),this.git1=pe(this.git1,25),this.git2=pe(this.git2,25),this.git3=pe(this.git3,25),this.git4=pe(this.git4,25),this.git5=pe(this.git5,25),this.git6=pe(this.git6,25),this.git7=pe(this.git7,25)),this.gitInv0=this.gitInv0||Wt(this.git0),this.gitInv1=this.gitInv1||Wt(this.git1),this.gitInv2=this.gitInv2||Wt(this.git2),this.gitInv3=this.gitInv3||Wt(this.git3),this.gitInv4=this.gitInv4||Wt(this.git4),this.gitInv5=this.gitInv5||Wt(this.git5),this.gitInv6=this.gitInv6||Wt(this.git6),this.gitInv7=this.gitInv7||Wt(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||xu,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||vu}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}}const kL=t=>{const e=new vL;return e.calculate(t),e};class wL{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=se(this.contrast,55),this.background="#ffffff",this.tertiaryColor=mt(this.primaryColor,{h:-160}),this.primaryBorderColor=Dr(this.primaryColor,this.darkMode),this.secondaryBorderColor=Dr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Dr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Wt(this.primaryColor),this.secondaryTextColor=Wt(this.secondaryColor),this.tertiaryTextColor=Wt(this.tertiaryColor),this.lineColor=Wt(this.background),this.textColor=Wt(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="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=se(this.contrast,55),this.border2=this.contrast,this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||Wt(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||se(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||pe(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.actorBorder=se(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,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.sectionBkgColor=se(this.contrast,30),this.sectionBkgColor2=se(this.contrast,30),this.taskBorderColor=pe(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=se(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=pe(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=mt(this.primaryColor,{h:64}),this.fillType3=mt(this.secondaryColor,{h:64}),this.fillType4=mt(this.primaryColor,{h:-64}),this.fillType5=mt(this.secondaryColor,{h:-64}),this.fillType6=mt(this.primaryColor,{h:128}),this.fillType7=mt(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=pe(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||mt(this.primaryColor,{h:-30}),this.git4=this.pie5||mt(this.primaryColor,{h:-60}),this.git5=this.pie6||mt(this.primaryColor,{h:-90}),this.git6=this.pie7||mt(this.primaryColor,{h:60}),this.git7=this.pie8||mt(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||Wt(this.git0),this.gitInv1=this.gitInv1||Wt(this.git1),this.gitInv2=this.gitInv2||Wt(this.git2),this.gitInv3=this.gitInv3||Wt(this.git3),this.gitInv4=this.gitInv4||Wt(this.git4),this.gitInv5=this.gitInv5||Wt(this.git5),this.gitInv6=this.gitInv6||Wt(this.git6),this.gitInv7=this.gitInv7||Wt(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||xu,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||vu}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}}const TL=t=>{const e=new wL;return e.calculate(t),e},mn={base:{getThemeVariables:yL},dark:{getThemeVariables:bL},default:{getThemeVariables:xL},forest:{getThemeVariables:kL},neutral:{getThemeVariables:TL}},Un={theme:"default",themeVariables:mn.default.getThemeVariables(),themeCSS:void 0,maxTextSize:5e4,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],deterministicIds:!1,deterministicIDSeed:void 0,flowchart:{titleTopMargin:25,diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},sequence:{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,useMaxWidth:!0,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,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",tickInterval:void 0,useMaxWidth:!0,topAxis:!1,useWidth:void 0},journey:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},state:{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,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},er:{titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12,useMaxWidth:!0},pie:{useWidth:void 0,useMaxWidth:!0},requirement:{useWidth:void 0,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},gitGraph:{titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0},c4:{useWidth:void 0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,useMaxWidth:!0,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,personFont:function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},external_personFont:function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},systemFont:function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},external_systemFont:function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},system_dbFont:function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},external_system_dbFont:function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},system_queueFont:function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},external_system_queueFont:function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},containerFont:function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},external_containerFont:function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},container_dbFont:function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},external_container_dbFont:function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},container_queueFont:function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},external_container_queueFont:function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},componentFont:function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},external_componentFont:function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},component_dbFont:function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},external_component_dbFont:function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},component_queueFont:function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},external_component_queueFont:function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},boundaryFont:function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},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"},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},fontSize:16};Un.class&&(Un.class.arrowMarkerAbsolute=Un.arrowMarkerAbsolute);Un.gitGraph&&(Un.gitGraph.arrowMarkerAbsolute=Un.arrowMarkerAbsolute);const zy=(t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:typeof t[i]=="object"&&t[i]!==null?[...r,e+i,...zy(t[i],"")]:[...r,e+i],[]),EL=zy(Un,""),CL=Un;/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function Wy(t){return typeof t>"u"||t===null}function SL(t){return typeof t=="object"&&t!==null}function AL(t){return Array.isArray(t)?t:Wy(t)?[]:[t]}function LL(t,e){var r,i,n,s;if(e)for(s=Object.keys(e),r=0,i=s.length;r<i;r+=1)n=s[r],t[n]=e[n];return t}function DL(t,e){var r="",i;for(i=0;i<e;i+=1)r+=t;return r}function ML(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var NL=Wy,BL=SL,IL=AL,OL=DL,RL=ML,FL=LL,Lr={isNothing:NL,isObject:BL,toArray:IL,repeat:OL,isNegativeZero:RL,extend:FL};function Hy(t,e){var r="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=`
|
|
8
|
+
`;break;default:e+=i}r=!1}else i==="\\"?r=!0:e+=i;return e}function T0(t,e,r){var i=e.label,n=t.append("g");e.labelType==="svg"?IA(n,e):typeof i!="string"||e.labelType==="html"?w0(n,e):OA(n,e);var s=n.node().getBBox(),a;switch(r){case"top":a=-e.height/2;break;case"bottom":a=e.height/2-s.height;break;default:a=-s.height/2}return n.attr("transform","translate("+-s.width/2+","+a+")"),n}var l1=function(t,e){var r=e.nodes().filter(function(s){return Oy(e,s)}),i=t.selectAll("g.cluster").data(r,function(s){return s});xi(i.exit(),e).style("opacity",0).remove();var n=i.enter().append("g").attr("class","cluster").attr("id",function(s){var a=e.node(s);return a.id}).style("opacity",0).each(function(s){var a=e.node(s),o=At(this);At(this).append("rect");var l=o.append("g").attr("class","label");T0(l,a,a.clusterLabelPos)});return i=i.merge(n),i=xi(i,e).style("opacity",1),i.selectAll("rect").each(function(s){var a=e.node(s),o=At(this);Gi(o,a.style)}),i};function FA(t){l1=t}let c1=function(t,e){var r=t.selectAll("g.edgeLabel").data(e.edges(),function(n){return Ry(n)}).classed("update",!0);r.exit().remove(),r.enter().append("g").classed("edgeLabel",!0).style("opacity",0),r=t.selectAll("g.edgeLabel"),r.each(function(n){var s=At(this);s.select(".label").remove();var a=e.edge(n),o=T0(s,e.edge(n),0).classed("label",!0),l=o.node().getBBox();a.labelId&&o.attr("id",a.labelId),_e(a,"width")||(a.width=l.width),_e(a,"height")||(a.height=l.height)});var i;return r.exit?i=r.exit():i=r.selectAll(null),xi(i,e).style("opacity",0).remove(),r};function PA(t){c1=t}function k2(t,e){return t.intersect(e)}var u1=function(t,e,r){var i=t.selectAll("g.edgePath").data(e.edges(),function(a){return Ry(a)}).classed("update",!0),n=WA(i,e);HA(i,e);var s=i.merge!==void 0?i.merge(n):i;return xi(s,e).style("opacity",1),s.each(function(a){var o=At(this),l=e.edge(a);l.elem=this,l.id&&o.attr("id",l.id),Fy(o,l.class,(o.classed("update")?"update ":"")+"edgePath")}),s.selectAll("path.path").each(function(a){var o=e.edge(a);o.arrowheadId=mu("arrowhead");var l=At(this).attr("marker-end",function(){return"url("+VA(location.href,o.arrowheadId)+")"}).style("fill","none");xi(l,e).attr("d",function(u){return UA(e,u)}),Gi(l,o.style)}),s.selectAll("defs *").remove(),s.selectAll("defs").each(function(a){var o=e.edge(a),l=r[o.arrowhead];l(At(this),o.arrowheadId,o,"arrowhead")}),s};function YA(t){u1=t}function VA(t,e){var r=t.split("#")[0];return r+"#"+e}function UA(t,e){var r=t.edge(e),i=t.node(e.v),n=t.node(e.w),s=r.points.slice(1,r.points.length-1);return s.unshift(k2(i,s[0])),s.push(k2(n,s[s.length-1])),Py(r,s)}function Py(t,e){var r=(Ca||pv.line)().x(function(i){return i.x}).y(function(i){return i.y});return(r.curve||r.interpolate)(t.curve),r(e)}function zA(t){var e=t.getBBox(),r=t.ownerSVGElement.getScreenCTM().inverse().multiply(t.getScreenCTM()).translate(e.width/2,e.height/2);return{x:r.e,y:r.f}}function WA(t,e){var r=t.enter().append("g").attr("class","edgePath").style("opacity",0);return r.append("path").attr("class","path").attr("d",function(i){var n=e.edge(i),s=e.node(i.v).elem,a=xs(n.points.length).map(function(){return zA(s)});return Py(n,a)}),r.append("defs"),r}function HA(t,e){var r=t.exit();xi(r,e).style("opacity",0).remove()}var h1=function(t,e,r){var i=e.nodes().filter(function(a){return!Oy(e,a)}),n=t.selectAll("g.node").data(i,function(a){return a}).classed("update",!0);n.exit().remove(),n.enter().append("g").attr("class","node").style("opacity",0),n=t.selectAll("g.node"),n.each(function(a){var o=e.node(a),l=At(this);Fy(l,o.class,(l.classed("update")?"update ":"")+"node"),l.select("g.label").remove();var u=l.append("g").attr("class","label"),d=T0(u,o),f=r[o.shape],p=Eo(d.node().getBBox(),"width","height");o.elem=this,o.id&&l.attr("id",o.id),o.labelId&&u.attr("id",o.labelId),_e(o,"width")&&(p.width=o.width),_e(o,"height")&&(p.height=o.height),p.width+=o.paddingLeft+o.paddingRight,p.height+=o.paddingTop+o.paddingBottom,u.attr("transform","translate("+(o.paddingLeft-o.paddingRight)/2+","+(o.paddingTop-o.paddingBottom)/2+")");var g=At(this);g.select(".label-container").remove();var _=f(g,p,o).classed("label-container",!0);Gi(_,o.style);var k=_.node().getBBox();o.width=k.width,o.height=k.height});var s;return n.exit?s=n.exit():s=n.selectAll(null),xi(s,e).style("opacity",0).remove(),n};function GA(t){h1=t}function qA(t,e){var r=t.filter(function(){return!At(this).classed("update")});function i(n){var s=e.node(n);return"translate("+s.x+","+s.y+")"}r.attr("transform",i),xi(t,e).style("opacity",1).attr("transform",i),xi(r.selectAll("rect"),e).attr("width",function(n){return e.node(n).width}).attr("height",function(n){return e.node(n).height}).attr("x",function(n){var s=e.node(n);return-s.width/2}).attr("y",function(n){var s=e.node(n);return-s.height/2})}function jA(t,e){var r=t.filter(function(){return!At(this).classed("update")});function i(n){var s=e.edge(n);return _e(s,"x")?"translate("+s.x+","+s.y+")":""}r.attr("transform",i),xi(t,e).style("opacity",1).attr("transform",i)}function $A(t,e){var r=t.filter(function(){return!At(this).classed("update")});function i(n){var s=e.node(n);return"translate("+s.x+","+s.y+")"}r.attr("transform",i),xi(t,e).style("opacity",1).attr("transform",i)}function Yy(t,e,r,i){var n=t.x,s=t.y,a=n-i.x,o=s-i.y,l=Math.sqrt(e*e*o*o+r*r*a*a),u=Math.abs(e*r*a/l);i.x<n&&(u=-u);var d=Math.abs(e*r*o/l);return i.y<s&&(d=-d),{x:n+u,y:s+d}}function XA(t,e,r){return Yy(t,e,e,r)}function KA(t,e,r,i){var n,s,a,o,l,u,d,f,p,g,_,k,w,S,A;if(n=e.y-t.y,a=t.x-e.x,l=e.x*t.y-t.x*e.y,p=n*r.x+a*r.y+l,g=n*i.x+a*i.y+l,!(p!==0&&g!==0&&w2(p,g))&&(s=i.y-r.y,o=r.x-i.x,u=i.x*r.y-r.x*i.y,d=s*t.x+o*t.y+u,f=s*e.x+o*e.y+u,!(d!==0&&f!==0&&w2(d,f))&&(_=n*o-s*a,_!==0)))return k=Math.abs(_/2),w=a*u-o*l,S=w<0?(w-k)/_:(w+k)/_,w=s*l-n*u,A=w<0?(w-k)/_:(w+k)/_,{x:S,y:A}}function w2(t,e){return t*e>0}function qi(t,e,r){var i=t.x,n=t.y,s=[],a=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;e.forEach(function(_){a=Math.min(a,_.x),o=Math.min(o,_.y)});for(var l=i-t.width/2-a,u=n-t.height/2-o,d=0;d<e.length;d++){var f=e[d],p=e[d<e.length-1?d+1:0],g=KA(t,r,{x:l+f.x,y:u+f.y},{x:l+p.x,y:u+p.y});g&&s.push(g)}return s.length?(s.length>1&&s.sort(function(_,k){var w=_.x-r.x,S=_.y-r.y,A=Math.sqrt(w*w+S*S),O=k.x-r.x,P=k.y-r.y,W=Math.sqrt(O*O+P*P);return A<W?-1:A===W?0:1}),s[0]):(console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t)}function E0(t,e){var r=t.x,i=t.y,n=e.x-r,s=e.y-i,a=t.width/2,o=t.height/2,l,u;return Math.abs(s)*a>Math.abs(n)*o?(s<0&&(o=-o),l=s===0?0:o*n/s,u=o):(n<0&&(a=-a),l=a,u=n===0?0:a*s/n),{x:r+l,y:i+u}}var d1={rect:QA,ellipse:JA,circle:tL,diamond:eL};function ZA(t){d1=t}function QA(t,e,r){var i=t.insert("rect",":first-child").attr("rx",r.rx).attr("ry",r.ry).attr("x",-e.width/2).attr("y",-e.height/2).attr("width",e.width).attr("height",e.height);return r.intersect=function(n){return E0(r,n)},i}function JA(t,e,r){var i=e.width/2,n=e.height/2,s=t.insert("ellipse",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("rx",i).attr("ry",n);return r.intersect=function(a){return Yy(r,i,n,a)},s}function tL(t,e,r){var i=Math.max(e.width,e.height)/2,n=t.insert("circle",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("r",i);return r.intersect=function(s){return XA(r,i,s)},n}function eL(t,e,r){var i=e.width*Math.SQRT2/2,n=e.height*Math.SQRT2/2,s=[{x:0,y:-n},{x:-i,y:0},{x:0,y:n},{x:i,y:0}],a=t.insert("polygon",":first-child").attr("points",s.map(function(o){return o.x+","+o.y}).join(" "));return r.intersect=function(o){return qi(r,s,o)},a}function rL(){var t=function(e,r){sL(r);var i=Ua(e,"output"),n=Ua(i,"clusters"),s=Ua(i,"edgePaths"),a=c1(Ua(i,"edgeLabels"),r),o=h1(Ua(i,"nodes"),r,d1);Ma(r),$A(o,r),jA(a,r),u1(s,r,o1);var l=l1(n,r);qA(l,r),aL(r)};return t.createNodes=function(e){return arguments.length?(GA(e),t):h1},t.createClusters=function(e){return arguments.length?(FA(e),t):l1},t.createEdgeLabels=function(e){return arguments.length?(PA(e),t):c1},t.createEdgePaths=function(e){return arguments.length?(YA(e),t):u1},t.shapes=function(e){return arguments.length?(ZA(e),t):d1},t.arrows=function(e){return arguments.length?(DA(e),t):o1},t}var iL={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},nL={arrowhead:"normal",curve:$r};function sL(t){t.nodes().forEach(function(e){var r=t.node(e);!_e(r,"label")&&!t.children(e).length&&(r.label=e),_e(r,"paddingX")&&Vs(r,{paddingLeft:r.paddingX,paddingRight:r.paddingX}),_e(r,"paddingY")&&Vs(r,{paddingTop:r.paddingY,paddingBottom:r.paddingY}),_e(r,"padding")&&Vs(r,{paddingLeft:r.padding,paddingRight:r.padding,paddingTop:r.padding,paddingBottom:r.padding}),Vs(r,iL),kt(["paddingLeft","paddingRight","paddingTop","paddingBottom"],function(i){r[i]=Number(r[i])}),_e(r,"width")&&(r._prevWidth=r.width),_e(r,"height")&&(r._prevHeight=r.height)}),t.edges().forEach(function(e){var r=t.edge(e);_e(r,"label")||(r.label=""),Vs(r,nL)})}function aL(t){kt(t.nodes(),function(e){var r=t.node(e);_e(r,"_prevWidth")?r.width=r._prevWidth:delete r.width,_e(r,"_prevHeight")?r.height=r._prevHeight:delete r.height,delete r._prevWidth,delete r._prevHeight})}function Ua(t,e){var r=t.select("g."+e);return r.empty()&&(r=t.append("g").attr("class",e)),r}var oL=Object.defineProperty,lL=(t,e,r)=>e in t?oL(t,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):t[e]=r,za=(t,e,r)=>(lL(t,typeof e!="symbol"?e+"":e,r),r);const Ji={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},B={trace:(...t)=>{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},C0=function(t="fatal"){let e=Ji.fatal;typeof t=="string"?(t=t.toLowerCase(),t in Ji&&(e=Ji[t])):typeof t=="number"&&(e=t),B.trace=()=>{},B.debug=()=>{},B.info=()=>{},B.warn=()=>{},B.error=()=>{},B.fatal=()=>{},e<=Ji.fatal&&(B.fatal=console.error?console.error.bind(console,Zr("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Zr("FATAL"))),e<=Ji.error&&(B.error=console.error?console.error.bind(console,Zr("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Zr("ERROR"))),e<=Ji.warn&&(B.warn=console.warn?console.warn.bind(console,Zr("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Zr("WARN"))),e<=Ji.info&&(B.info=console.info?console.info.bind(console,Zr("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Zr("INFO"))),e<=Ji.debug&&(B.debug=console.debug?console.debug.bind(console,Zr("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Zr("DEBUG"))),e<=Ji.trace&&(B.trace=console.debug?console.debug.bind(console,Zr("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Zr("TRACE")))},Zr=t=>`%c${bi().format("ss.SSS")} : ${t} : `,cL=t=>t?Uy(t).replace(/\\n/g,"#br#").split("#br#"):[""],Vy=t=>_o.sanitize(t),T2=(t,e)=>{var r;if(((r=e.flowchart)==null?void 0:r.htmlLabels)!==!1){const i=e.securityLevel;i==="antiscript"||i==="strict"?t=Vy(t):i!=="loose"&&(t=Uy(t),t=t.replace(/</g,"<").replace(/>/g,">"),t=t.replace(/=/g,"="),t=fL(t))}return t},vi=(t,e)=>t&&(e.dompurifyConfig?t=_o.sanitize(T2(t,e),e.dompurifyConfig).toString():t=_o.sanitize(T2(t,e),{FORBID_TAGS:["style"]}).toString(),t),uL=(t,e)=>typeof t=="string"?vi(t,e):t.flat().map(r=>vi(r,e)),_u=/<br\s*\/?>/gi,hL=t=>_u.test(t),dL=t=>t.split(_u),fL=t=>t.replace(/#br#/g,"<br/>"),Uy=t=>t.replace(_u,"#br#"),pL=t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},gr=t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),Vn=function(t){let e=t;return t.includes("~")?(e=e.replace(/~([^~].*)/,"<$1"),e=e.replace(/~([^~]*)$/,">$1"),Vn(e)):e},he={getRows:cL,sanitizeText:vi,sanitizeTextOrArray:uL,hasBreaks:hL,splitBreaks:dL,lineBreakRegex:_u,removeScript:Vy,getUrl:pL,evaluate:gr},Dr=(t,e)=>e?mt(t,{s:-40,l:10}):mt(t,{s:-40,l:-10}),xu="#ffffff",vu="#f2f2f2";class gL{constructor(){this.background="#f4f4f4",this.darkMode=!1,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||mt(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||mt(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||Dr(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||Dr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||Dr(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||Dr(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Wt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Wt(this.tertiaryColor),this.lineColor=this.lineColor||Wt(this.background),this.textColor=this.textColor||this.primaryTextColor,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?pe(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||"grey",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||pe(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Wt(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||se(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||mt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||mt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||mt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||mt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||mt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||mt(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||mt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||mt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||mt(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=pe(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=pe(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||Wt(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||se(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||pe(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||mt(this.primaryColor,{h:64}),this.fillType3=this.fillType3||mt(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||mt(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||mt(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||mt(this.primaryColor,{h:128}),this.fillType7=this.fillType7||mt(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||mt(this.primaryColor,{l:-10}),this.pie5=this.pie5||mt(this.secondaryColor,{l:-10}),this.pie6=this.pie6||mt(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||mt(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||mt(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||mt(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||mt(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||mt(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||mt(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?pe(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||mt(this.primaryColor,{h:-30}),this.git4=this.git4||mt(this.primaryColor,{h:-60}),this.git5=this.git5||mt(this.primaryColor,{h:-90}),this.git6=this.git6||mt(this.primaryColor,{h:60}),this.git7=this.git7||mt(this.primaryColor,{h:120}),this.darkMode?(this.git0=se(this.git0,25),this.git1=se(this.git1,25),this.git2=se(this.git2,25),this.git3=se(this.git3,25),this.git4=se(this.git4,25),this.git5=se(this.git5,25),this.git6=se(this.git6,25),this.git7=se(this.git7,25)):(this.git0=pe(this.git0,25),this.git1=pe(this.git1,25),this.git2=pe(this.git2,25),this.git3=pe(this.git3,25),this.git4=pe(this.git4,25),this.git5=pe(this.git5,25),this.git6=pe(this.git6,25),this.git7=pe(this.git7,25)),this.gitInv0=this.gitInv0||Wt(this.git0),this.gitInv1=this.gitInv1||Wt(this.git1),this.gitInv2=this.gitInv2||Wt(this.git2),this.gitInv3=this.gitInv3||Wt(this.git3),this.gitInv4=this.gitInv4||Wt(this.git4),this.gitInv5=this.gitInv5||Wt(this.git5),this.gitInv6=this.gitInv6||Wt(this.git6),this.gitInv7=this.gitInv7||Wt(this.git7),this.branchLabelColor=this.branchLabelColor||(this.darkMode?"black":this.labelTextColor),this.gitBranchLabel0=this.gitBranchLabel0||this.branchLabelColor,this.gitBranchLabel1=this.gitBranchLabel1||this.branchLabelColor,this.gitBranchLabel2=this.gitBranchLabel2||this.branchLabelColor,this.gitBranchLabel3=this.gitBranchLabel3||this.branchLabelColor,this.gitBranchLabel4=this.gitBranchLabel4||this.branchLabelColor,this.gitBranchLabel5=this.gitBranchLabel5||this.branchLabelColor,this.gitBranchLabel6=this.gitBranchLabel6||this.branchLabelColor,this.gitBranchLabel7=this.gitBranchLabel7||this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||xu,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||vu}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}}const yL=t=>{const e=new gL;return e.calculate(t),e};class mL{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=se(this.primaryColor,16),this.tertiaryColor=mt(this.primaryColor,{h:-160}),this.primaryBorderColor=Wt(this.background),this.secondaryBorderColor=Dr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Dr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Wt(this.primaryColor),this.secondaryTextColor=Wt(this.secondaryColor),this.tertiaryTextColor=Wt(this.tertiaryColor),this.lineColor=Wt(this.background),this.textColor=Wt(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=se(Wt("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=eo(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=pe("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.taskBorderColor=eo(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=eo(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=se(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=se(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,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=se(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.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=mt(this.primaryColor,{h:64}),this.fillType3=mt(this.secondaryColor,{h:64}),this.fillType4=mt(this.primaryColor,{h:-64}),this.fillType5=mt(this.secondaryColor,{h:-64}),this.fillType6=mt(this.primaryColor,{h:128}),this.fillType7=mt(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||mt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||mt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||mt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||mt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||mt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||mt(this.primaryColor,{h:210}),this.cScale9=this.cScale9||mt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||mt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||mt(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||Wt(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScalePeer"+e]=this["cScalePeer"+e]||se(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?pe(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=se(this.secondaryColor,20),this.git1=se(this.pie2||this.secondaryColor,20),this.git2=se(this.pie3||this.tertiaryColor,20),this.git3=se(this.pie4||mt(this.primaryColor,{h:-30}),20),this.git4=se(this.pie5||mt(this.primaryColor,{h:-60}),20),this.git5=se(this.pie6||mt(this.primaryColor,{h:-90}),10),this.git6=se(this.pie7||mt(this.primaryColor,{h:60}),10),this.git7=se(this.pie8||mt(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||Wt(this.git0),this.gitInv1=this.gitInv1||Wt(this.git1),this.gitInv2=this.gitInv2||Wt(this.git2),this.gitInv3=this.gitInv3||Wt(this.git3),this.gitInv4=this.gitInv4||Wt(this.git4),this.gitInv5=this.gitInv5||Wt(this.git5),this.gitInv6=this.gitInv6||Wt(this.git6),this.gitInv7=this.gitInv7||Wt(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||se(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||se(this.background,2)}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}}const bL=t=>{const e=new mL;return e.calculate(t),e};class _L{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=mt(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=mt(this.primaryColor,{h:-160}),this.primaryBorderColor=Dr(this.primaryColor,this.darkMode),this.secondaryBorderColor=Dr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Dr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Wt(this.primaryColor),this.secondaryTextColor=Wt(this.secondaryColor),this.tertiaryTextColor=Wt(this.tertiaryColor),this.lineColor=Wt(this.background),this.textColor=Wt(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="#e8e8e8",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="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=eo(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder="calculated",this.personBkg="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||mt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||mt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||mt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||mt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||mt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||mt(this.primaryColor,{h:210}),this.cScale9=this.cScale9||mt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||mt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||mt(this.primaryColor,{h:330}),this["cScalePeer"+1]=this["cScalePeer"+1]||pe(this.secondaryColor,45),this["cScalePeer"+2]=this["cScalePeer"+2]||pe(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=pe(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||pe(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||mt(this["cScale"+e],{h:180});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||Wt(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||Wt(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=se(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=mt(this.primaryColor,{h:64}),this.fillType3=mt(this.secondaryColor,{h:64}),this.fillType4=mt(this.primaryColor,{h:-64}),this.fillType5=mt(this.secondaryColor,{h:-64}),this.fillType6=mt(this.primaryColor,{h:128}),this.fillType7=mt(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||mt(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||mt(this.primaryColor,{l:-10}),this.pie5=this.pie5||mt(this.secondaryColor,{l:-30}),this.pie6=this.pie6||mt(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||mt(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||mt(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||mt(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||mt(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||mt(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||mt(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||mt(this.primaryColor,{h:-30}),this.git4=this.git4||mt(this.primaryColor,{h:-60}),this.git5=this.git5||mt(this.primaryColor,{h:-90}),this.git6=this.git6||mt(this.primaryColor,{h:60}),this.git7=this.git7||mt(this.primaryColor,{h:120}),this.darkMode?(this.git0=se(this.git0,25),this.git1=se(this.git1,25),this.git2=se(this.git2,25),this.git3=se(this.git3,25),this.git4=se(this.git4,25),this.git5=se(this.git5,25),this.git6=se(this.git6,25),this.git7=se(this.git7,25)):(this.git0=pe(this.git0,25),this.git1=pe(this.git1,25),this.git2=pe(this.git2,25),this.git3=pe(this.git3,25),this.git4=pe(this.git4,25),this.git5=pe(this.git5,25),this.git6=pe(this.git6,25),this.git7=pe(this.git7,25)),this.gitInv0=this.gitInv0||pe(Wt(this.git0),25),this.gitInv1=this.gitInv1||Wt(this.git1),this.gitInv2=this.gitInv2||Wt(this.git2),this.gitInv3=this.gitInv3||Wt(this.git3),this.gitInv4=this.gitInv4||Wt(this.git4),this.gitInv5=this.gitInv5||Wt(this.git5),this.gitInv6=this.gitInv6||Wt(this.git6),this.gitInv7=this.gitInv7||Wt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Wt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Wt(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||xu,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||vu}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}}const xL=t=>{const e=new _L;return e.calculate(t),e};class vL{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=se("#cde498",10),this.primaryBorderColor=Dr(this.primaryColor,this.darkMode),this.secondaryBorderColor=Dr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Dr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Wt(this.primaryColor),this.secondaryTextColor=Wt(this.secondaryColor),this.tertiaryTextColor=Wt(this.primaryColor),this.lineColor=Wt(this.background),this.textColor=Wt(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="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||mt(this.primaryColor,{h:30}),this.cScale4=this.cScale4||mt(this.primaryColor,{h:60}),this.cScale5=this.cScale5||mt(this.primaryColor,{h:90}),this.cScale6=this.cScale6||mt(this.primaryColor,{h:120}),this.cScale7=this.cScale7||mt(this.primaryColor,{h:150}),this.cScale8=this.cScale8||mt(this.primaryColor,{h:210}),this.cScale9=this.cScale9||mt(this.primaryColor,{h:270}),this.cScale10=this.cScale10||mt(this.primaryColor,{h:300}),this.cScale11=this.cScale11||mt(this.primaryColor,{h:330}),this["cScalePeer"+1]=this["cScalePeer"+1]||pe(this.secondaryColor,45),this["cScalePeer"+2]=this["cScalePeer"+2]||pe(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=pe(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||pe(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||mt(this["cScale"+e],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.actorBorder=pe(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.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=mt(this.primaryColor,{h:64}),this.fillType3=mt(this.secondaryColor,{h:64}),this.fillType4=mt(this.primaryColor,{h:-64}),this.fillType5=mt(this.secondaryColor,{h:-64}),this.fillType6=mt(this.primaryColor,{h:128}),this.fillType7=mt(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||this.tertiaryColor,this.pie4=this.pie4||mt(this.primaryColor,{l:-30}),this.pie5=this.pie5||mt(this.secondaryColor,{l:-30}),this.pie6=this.pie6||mt(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||mt(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||mt(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||mt(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||mt(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||mt(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||mt(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||mt(this.primaryColor,{h:-30}),this.git4=this.git4||mt(this.primaryColor,{h:-60}),this.git5=this.git5||mt(this.primaryColor,{h:-90}),this.git6=this.git6||mt(this.primaryColor,{h:60}),this.git7=this.git7||mt(this.primaryColor,{h:120}),this.darkMode?(this.git0=se(this.git0,25),this.git1=se(this.git1,25),this.git2=se(this.git2,25),this.git3=se(this.git3,25),this.git4=se(this.git4,25),this.git5=se(this.git5,25),this.git6=se(this.git6,25),this.git7=se(this.git7,25)):(this.git0=pe(this.git0,25),this.git1=pe(this.git1,25),this.git2=pe(this.git2,25),this.git3=pe(this.git3,25),this.git4=pe(this.git4,25),this.git5=pe(this.git5,25),this.git6=pe(this.git6,25),this.git7=pe(this.git7,25)),this.gitInv0=this.gitInv0||Wt(this.git0),this.gitInv1=this.gitInv1||Wt(this.git1),this.gitInv2=this.gitInv2||Wt(this.git2),this.gitInv3=this.gitInv3||Wt(this.git3),this.gitInv4=this.gitInv4||Wt(this.git4),this.gitInv5=this.gitInv5||Wt(this.git5),this.gitInv6=this.gitInv6||Wt(this.git6),this.gitInv7=this.gitInv7||Wt(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||xu,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||vu}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}}const kL=t=>{const e=new vL;return e.calculate(t),e};class wL{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=se(this.contrast,55),this.background="#ffffff",this.tertiaryColor=mt(this.primaryColor,{h:-160}),this.primaryBorderColor=Dr(this.primaryColor,this.darkMode),this.secondaryBorderColor=Dr(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=Dr(this.tertiaryColor,this.darkMode),this.primaryTextColor=Wt(this.primaryColor),this.secondaryTextColor=Wt(this.secondaryColor),this.tertiaryTextColor=Wt(this.tertiaryColor),this.lineColor=Wt(this.background),this.textColor=Wt(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="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=se(this.contrast,55),this.border2=this.contrast,this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||Wt(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||se(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||pe(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.actorBorder=se(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,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.sectionBkgColor=se(this.contrast,30),this.sectionBkgColor2=se(this.contrast,30),this.taskBorderColor=pe(this.contrast,10),this.taskBkgColor=this.contrast,this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor=this.text,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.gridColor=se(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=pe(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=mt(this.primaryColor,{h:64}),this.fillType3=mt(this.secondaryColor,{h:64}),this.fillType4=mt(this.primaryColor,{h:-64}),this.fillType5=mt(this.secondaryColor,{h:-64}),this.fillType6=mt(this.primaryColor,{h:128}),this.fillType7=mt(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=pe(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||mt(this.primaryColor,{h:-30}),this.git4=this.pie5||mt(this.primaryColor,{h:-60}),this.git5=this.pie6||mt(this.primaryColor,{h:-90}),this.git6=this.pie7||mt(this.primaryColor,{h:60}),this.git7=this.pie8||mt(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||Wt(this.git0),this.gitInv1=this.gitInv1||Wt(this.git1),this.gitInv2=this.gitInv2||Wt(this.git2),this.gitInv3=this.gitInv3||Wt(this.git3),this.gitInv4=this.gitInv4||Wt(this.git4),this.gitInv5=this.gitInv5||Wt(this.git5),this.gitInv6=this.gitInv6||Wt(this.git6),this.gitInv7=this.gitInv7||Wt(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||xu,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||vu}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(i=>{this[i]=e[i]}),this.updateColors(),r.forEach(i=>{this[i]=e[i]})}}const TL=t=>{const e=new wL;return e.calculate(t),e},mn={base:{getThemeVariables:yL},dark:{getThemeVariables:bL},default:{getThemeVariables:xL},forest:{getThemeVariables:kL},neutral:{getThemeVariables:TL}},Un={theme:"default",themeVariables:mn.default.getThemeVariables(),themeCSS:void 0,maxTextSize:5e4,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],deterministicIds:!1,deterministicIDSeed:void 0,flowchart:{titleTopMargin:25,diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},sequence:{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,useMaxWidth:!0,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,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",tickInterval:void 0,useMaxWidth:!0,topAxis:!1,useWidth:void 0},journey:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},state:{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,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},er:{titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12,useMaxWidth:!0},pie:{useWidth:void 0,useMaxWidth:!0},requirement:{useWidth:void 0,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},gitGraph:{titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0},c4:{useWidth:void 0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,useMaxWidth:!0,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,personFont:function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},external_personFont:function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},systemFont:function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},external_systemFont:function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},system_dbFont:function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},external_system_dbFont:function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},system_queueFont:function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},external_system_queueFont:function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},containerFont:function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},external_containerFont:function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},container_dbFont:function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},external_container_dbFont:function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},container_queueFont:function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},external_container_queueFont:function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},componentFont:function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},external_componentFont:function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},component_dbFont:function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},external_component_dbFont:function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},component_queueFont:function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},external_component_queueFont:function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},boundaryFont:function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},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"},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},fontSize:16};Un.class&&(Un.class.arrowMarkerAbsolute=Un.arrowMarkerAbsolute);Un.gitGraph&&(Un.gitGraph.arrowMarkerAbsolute=Un.arrowMarkerAbsolute);const zy=(t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:typeof t[i]=="object"&&t[i]!==null?[...r,e+i,...zy(t[i],"")]:[...r,e+i],[]),EL=zy(Un,""),CL=Un;/*! js-yaml 4.1.0 https://github.com/nodeca/js-yaml @license MIT */function Wy(t){return typeof t>"u"||t===null}function SL(t){return typeof t=="object"&&t!==null}function AL(t){return Array.isArray(t)?t:Wy(t)?[]:[t]}function LL(t,e){var r,i,n,s;if(e)for(s=Object.keys(e),r=0,i=s.length;r<i;r+=1)n=s[r],t[n]=e[n];return t}function DL(t,e){var r="",i;for(i=0;i<e;i+=1)r+=t;return r}function ML(t){return t===0&&Number.NEGATIVE_INFINITY===1/t}var NL=Wy,BL=SL,IL=AL,OL=DL,RL=ML,FL=LL,Lr={isNothing:NL,isObject:BL,toArray:IL,repeat:OL,isNegativeZero:RL,extend:FL};function Hy(t,e){var r="",i=t.reason||"(unknown reason)";return t.mark?(t.mark.name&&(r+='in "'+t.mark.name+'" '),r+="("+(t.mark.line+1)+":"+(t.mark.column+1)+")",!e&&t.mark.snippet&&(r+=`
|
|
9
9
|
|
|
10
10
|
`+t.mark.snippet),i+" "+r):i}function So(t,e){Error.call(this),this.name="YAMLException",this.reason=t,this.mark=e,this.message=Hy(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=new Error().stack||""}So.prototype=Object.create(Error.prototype);So.prototype.constructor=So;So.prototype.toString=function(e){return this.name+": "+Hy(this,e)};var on=So;function xh(t,e,r,i,n){var s="",a="",o=Math.floor(n/2)-1;return i-e>o&&(s=" ... ",e=i-o+s.length),r-i>o&&(a=" ...",r=i+o-a.length),{str:s+t.slice(e,r).replace(/\t/g,"→")+a,pos:i-e+s.length}}function vh(t,e){return Lr.repeat(" ",e-t.length)+t}function PL(t,e){if(e=Object.create(e||null),!t.buffer)return null;e.maxLength||(e.maxLength=79),typeof e.indent!="number"&&(e.indent=1),typeof e.linesBefore!="number"&&(e.linesBefore=3),typeof e.linesAfter!="number"&&(e.linesAfter=2);for(var r=/\r?\n|\r|\0/g,i=[0],n=[],s,a=-1;s=r.exec(t.buffer);)n.push(s.index),i.push(s.index+s[0].length),t.position<=s.index&&a<0&&(a=i.length-2);a<0&&(a=i.length-1);var o="",l,u,d=Math.min(t.line+e.linesAfter,n.length).toString().length,f=e.maxLength-(e.indent+d+3);for(l=1;l<=e.linesBefore&&!(a-l<0);l++)u=xh(t.buffer,i[a-l],n[a-l],t.position-(i[a]-i[a-l]),f),o=Lr.repeat(" ",e.indent)+vh((t.line-l+1).toString(),d)+" | "+u.str+`
|
|
11
11
|
`+o;for(u=xh(t.buffer,i[a],n[a],t.position,f),o+=Lr.repeat(" ",e.indent)+vh((t.line+1).toString(),d)+" | "+u.str+`
|
|
12
12
|
`,o+=Lr.repeat("-",e.indent+d+3+u.pos)+`^
|
|
13
13
|
`,l=1;l<=e.linesAfter&&!(a+l>=n.length);l++)u=xh(t.buffer,i[a+l],n[a+l],t.position-(i[a]-i[a+l]),f),o+=Lr.repeat(" ",e.indent)+vh((t.line+l+1).toString(),d)+" | "+u.str+`
|
|
14
|
-
`;return o.replace(/\n$/,"")}var YL=PL,VL=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],UL=["scalar","sequence","mapping"];function zL(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(i){e[String(i)]=r})}),e}function WL(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(VL.indexOf(r)===-1)throw new on('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=zL(e.styleAliases||null),UL.indexOf(this.kind)===-1)throw new on('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var Er=WL;function E2(t,e){var r=[];return t[e].forEach(function(i){var n=r.length;r.forEach(function(s,a){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(n=a)}),r[n]=i}),r}function HL(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function i(n){n.multi?(t.multi[n.kind].push(n),t.multi.fallback.push(n)):t[n.kind][n.tag]=t.fallback[n.tag]=n}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(i);return t}function
|
|
15
|
-
\r`;function ED(t){if(t===null)return!1;var e,r,i=0,n=t.length,s=
|
|
16
|
-
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"
":t===95?" ":t===76?"\u2028":t===80?"\u2029":""}function ZD(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var Qy=new Array(256),Jy=new Array(256);for(var Ys=0;Ys<256;Ys++)Qy[Ys]=A2(Ys)?1:0,Jy[Ys]=A2(Ys);function QD(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||WD,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 tm(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=YL(r),new on(e,r)}function Jt(t,e){throw tm(t,e)}function vc(t,e){t.onWarning&&t.onWarning.call(null,tm(t,e))}var L2={YAML:function(e,r,i){var n,s,a;e.version!==null&&Jt(e,"duplication of %YAML directive"),i.length!==1&&Jt(e,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&Jt(e,"ill-formed argument of the YAML directive"),s=parseInt(n[1],10),a=parseInt(n[2],10),s!==1&&Jt(e,"unacceptable YAML version of the document"),e.version=i[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&vc(e,"unsupported YAML version of the document")},TAG:function(e,r,i){var n,s;i.length!==2&&Jt(e,"TAG directive accepts exactly two arguments"),n=i[0],s=i[1],Ky.test(n)||Jt(e,"ill-formed tag handle (first argument) of the TAG directive"),qn.call(e.tagMap,n)&&Jt(e,'there is a previously declared suffix for "'+n+'" tag handle'),Zy.test(s)||Jt(e,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{Jt(e,"tag prefix is malformed: "+s)}e.tagMap[n]=s}};function zn(t,e,r,i){var n,s,a,o;if(e<r){if(o=t.input.slice(e,r),i)for(n=0,s=o.length;n<s;n+=1)a=o.charCodeAt(n),a===9||32<=a&&a<=1114111||Jt(t,"expected valid JSON character");else GD.test(o)&&Jt(t,"the stream contains non-printable characters");t.result+=o}}function D2(t,e,r,i){var n,s,a,o;for(Lr.isObject(r)||Jt(t,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),a=0,o=n.length;a<o;a+=1)s=n[a],qn.call(e,s)||(e[s]=r[s],i[s]=!0)}function $s(t,e,r,i,n,s,a,o,l){var u,d;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),u=0,d=n.length;u<d;u+=1)Array.isArray(n[u])&&Jt(t,"nested arrays are not supported inside keys"),typeof n=="object"&&S2(n[u])==="[object Object]"&&(n[u]="[object Object]");if(typeof n=="object"&&S2(n)==="[object Object]"&&(n="[object Object]"),n=String(n),e===null&&(e={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(u=0,d=s.length;u<d;u+=1)D2(t,e,s[u],r);else D2(t,e,s,r);else!t.json&&!qn.call(r,n)&&qn.call(e,n)&&(t.line=a||t.line,t.lineStart=o||t.lineStart,t.position=l||t.position,Jt(t,"duplicated mapping key")),n==="__proto__"?Object.defineProperty(e,n,{configurable:!0,enumerable:!0,writable:!0,value:s}):e[n]=s,delete r[n];return e}function
|
|
17
|
-
`,e-1))}function JD(t,e,r){var i,n,s,a,o,l,u,d,f=t.kind,p=t.result,g;if(g=t.input.charCodeAt(t.position),Ur(g)||js(g)||g===35||g===38||g===42||g===33||g===124||g===62||g===39||g===34||g===37||g===64||g===96||(g===63||g===45)&&(n=t.input.charCodeAt(t.position+1),Ur(n)||r&&js(n)))return!1;for(t.kind="scalar",t.result="",s=a=t.position,o=!1;g!==0;){if(g===58){if(n=t.input.charCodeAt(t.position+1),Ur(n)||r&&js(n))break}else if(g===35){if(i=t.input.charCodeAt(t.position-1),Ur(i))break}else{if(t.position===t.lineStart&&ku(t)||r&&js(g))break;if(Vi(g))if(l=t.line,u=t.lineStart,d=t.lineIndent,nr(t,!1,-1),t.lineIndent>=e){o=!0,g=t.input.charCodeAt(t.position);continue}else{t.position=a,t.line=l,t.lineStart=u,t.lineIndent=d;break}}o&&(zn(t,s,a,!1),
|
|
14
|
+
`;return o.replace(/\n$/,"")}var YL=PL,VL=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],UL=["scalar","sequence","mapping"];function zL(t){var e={};return t!==null&&Object.keys(t).forEach(function(r){t[r].forEach(function(i){e[String(i)]=r})}),e}function WL(t,e){if(e=e||{},Object.keys(e).forEach(function(r){if(VL.indexOf(r)===-1)throw new on('Unknown option "'+r+'" is met in definition of "'+t+'" YAML type.')}),this.options=e,this.tag=t,this.kind=e.kind||null,this.resolve=e.resolve||function(){return!0},this.construct=e.construct||function(r){return r},this.instanceOf=e.instanceOf||null,this.predicate=e.predicate||null,this.represent=e.represent||null,this.representName=e.representName||null,this.defaultStyle=e.defaultStyle||null,this.multi=e.multi||!1,this.styleAliases=zL(e.styleAliases||null),UL.indexOf(this.kind)===-1)throw new on('Unknown kind "'+this.kind+'" is specified for "'+t+'" YAML type.')}var Er=WL;function E2(t,e){var r=[];return t[e].forEach(function(i){var n=r.length;r.forEach(function(s,a){s.tag===i.tag&&s.kind===i.kind&&s.multi===i.multi&&(n=a)}),r[n]=i}),r}function HL(){var t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}},e,r;function i(n){n.multi?(t.multi[n.kind].push(n),t.multi.fallback.push(n)):t[n.kind][n.tag]=t.fallback[n.tag]=n}for(e=0,r=arguments.length;e<r;e+=1)arguments[e].forEach(i);return t}function f1(t){return this.extend(t)}f1.prototype.extend=function(e){var r=[],i=[];if(e instanceof Er)i.push(e);else if(Array.isArray(e))i=i.concat(e);else if(e&&(Array.isArray(e.implicit)||Array.isArray(e.explicit)))e.implicit&&(r=r.concat(e.implicit)),e.explicit&&(i=i.concat(e.explicit));else throw new on("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");r.forEach(function(s){if(!(s instanceof Er))throw new on("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(s.loadKind&&s.loadKind!=="scalar")throw new on("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(s.multi)throw new on("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),i.forEach(function(s){if(!(s instanceof Er))throw new on("Specified list of YAML types (or a single Type object) contains a non-Type object.")});var n=Object.create(f1.prototype);return n.implicit=(this.implicit||[]).concat(r),n.explicit=(this.explicit||[]).concat(i),n.compiledImplicit=E2(n,"implicit"),n.compiledExplicit=E2(n,"explicit"),n.compiledTypeMap=HL(n.compiledImplicit,n.compiledExplicit),n};var GL=f1,qL=new Er("tag:yaml.org,2002:str",{kind:"scalar",construct:function(t){return t!==null?t:""}}),jL=new Er("tag:yaml.org,2002:seq",{kind:"sequence",construct:function(t){return t!==null?t:[]}}),$L=new Er("tag:yaml.org,2002:map",{kind:"mapping",construct:function(t){return t!==null?t:{}}}),Gy=new GL({explicit:[qL,jL,$L]});function XL(t){if(t===null)return!0;var e=t.length;return e===1&&t==="~"||e===4&&(t==="null"||t==="Null"||t==="NULL")}function KL(){return null}function ZL(t){return t===null}var QL=new Er("tag:yaml.org,2002:null",{kind:"scalar",resolve:XL,construct:KL,predicate:ZL,represent:{canonical:function(){return"~"},lowercase:function(){return"null"},uppercase:function(){return"NULL"},camelcase:function(){return"Null"},empty:function(){return""}},defaultStyle:"lowercase"});function JL(t){if(t===null)return!1;var e=t.length;return e===4&&(t==="true"||t==="True"||t==="TRUE")||e===5&&(t==="false"||t==="False"||t==="FALSE")}function tD(t){return t==="true"||t==="True"||t==="TRUE"}function eD(t){return Object.prototype.toString.call(t)==="[object Boolean]"}var rD=new Er("tag:yaml.org,2002:bool",{kind:"scalar",resolve:JL,construct:tD,predicate:eD,represent:{lowercase:function(t){return t?"true":"false"},uppercase:function(t){return t?"TRUE":"FALSE"},camelcase:function(t){return t?"True":"False"}},defaultStyle:"lowercase"});function iD(t){return 48<=t&&t<=57||65<=t&&t<=70||97<=t&&t<=102}function nD(t){return 48<=t&&t<=55}function sD(t){return 48<=t&&t<=57}function aD(t){if(t===null)return!1;var e=t.length,r=0,i=!1,n;if(!e)return!1;if(n=t[r],(n==="-"||n==="+")&&(n=t[++r]),n==="0"){if(r+1===e)return!0;if(n=t[++r],n==="b"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(n!=="0"&&n!=="1")return!1;i=!0}return i&&n!=="_"}if(n==="x"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(!iD(t.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}if(n==="o"){for(r++;r<e;r++)if(n=t[r],n!=="_"){if(!nD(t.charCodeAt(r)))return!1;i=!0}return i&&n!=="_"}}if(n==="_")return!1;for(;r<e;r++)if(n=t[r],n!=="_"){if(!sD(t.charCodeAt(r)))return!1;i=!0}return!(!i||n==="_")}function oD(t){var e=t,r=1,i;if(e.indexOf("_")!==-1&&(e=e.replace(/_/g,"")),i=e[0],(i==="-"||i==="+")&&(i==="-"&&(r=-1),e=e.slice(1),i=e[0]),e==="0")return 0;if(i==="0"){if(e[1]==="b")return r*parseInt(e.slice(2),2);if(e[1]==="x")return r*parseInt(e.slice(2),16);if(e[1]==="o")return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}function lD(t){return Object.prototype.toString.call(t)==="[object Number]"&&t%1===0&&!Lr.isNegativeZero(t)}var cD=new Er("tag:yaml.org,2002:int",{kind:"scalar",resolve:aD,construct:oD,predicate:lD,represent:{binary:function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},octal:function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},decimal:function(t){return t.toString(10)},hexadecimal:function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)}},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}}),uD=new RegExp("^(?:[-+]?(?:[0-9][0-9_]*)(?:\\.[0-9_]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9_]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function hD(t){return!(t===null||!uD.test(t)||t[t.length-1]==="_")}function dD(t){var e,r;return e=t.replace(/_/g,"").toLowerCase(),r=e[0]==="-"?-1:1,"+-".indexOf(e[0])>=0&&(e=e.slice(1)),e===".inf"?r===1?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:e===".nan"?NaN:r*parseFloat(e,10)}var fD=/^[-+]?[0-9]+e/;function pD(t,e){var r;if(isNaN(t))switch(e){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===t)switch(e){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===t)switch(e){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(Lr.isNegativeZero(t))return"-0.0";return r=t.toString(10),fD.test(r)?r.replace("e",".e"):r}function gD(t){return Object.prototype.toString.call(t)==="[object Number]"&&(t%1!==0||Lr.isNegativeZero(t))}var yD=new Er("tag:yaml.org,2002:float",{kind:"scalar",resolve:hD,construct:dD,predicate:gD,represent:pD,defaultStyle:"lowercase"}),mD=Gy.extend({implicit:[QL,rD,cD,yD]}),bD=mD,qy=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),jy=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9]?)-([0-9][0-9]?)(?:[Tt]|[ \\t]+)([0-9][0-9]?):([0-9][0-9]):([0-9][0-9])(?:\\.([0-9]*))?(?:[ \\t]*(Z|([-+])([0-9][0-9]?)(?::([0-9][0-9]))?))?$");function _D(t){return t===null?!1:qy.exec(t)!==null||jy.exec(t)!==null}function xD(t){var e,r,i,n,s,a,o,l=0,u=null,d,f,p;if(e=qy.exec(t),e===null&&(e=jy.exec(t)),e===null)throw new Error("Date resolve error");if(r=+e[1],i=+e[2]-1,n=+e[3],!e[4])return new Date(Date.UTC(r,i,n));if(s=+e[4],a=+e[5],o=+e[6],e[7]){for(l=e[7].slice(0,3);l.length<3;)l+="0";l=+l}return e[9]&&(d=+e[10],f=+(e[11]||0),u=(d*60+f)*6e4,e[9]==="-"&&(u=-u)),p=new Date(Date.UTC(r,i,n,s,a,o,l)),u&&p.setTime(p.getTime()-u),p}function vD(t){return t.toISOString()}var kD=new Er("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:_D,construct:xD,instanceOf:Date,represent:vD});function wD(t){return t==="<<"||t===null}var TD=new Er("tag:yaml.org,2002:merge",{kind:"scalar",resolve:wD}),S0=`ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=
|
|
15
|
+
\r`;function ED(t){if(t===null)return!1;var e,r,i=0,n=t.length,s=S0;for(r=0;r<n;r++)if(e=s.indexOf(t.charAt(r)),!(e>64)){if(e<0)return!1;i+=6}return i%8===0}function CD(t){var e,r,i=t.replace(/[\r\n=]/g,""),n=i.length,s=S0,a=0,o=[];for(e=0;e<n;e++)e%4===0&&e&&(o.push(a>>16&255),o.push(a>>8&255),o.push(a&255)),a=a<<6|s.indexOf(i.charAt(e));return r=n%4*6,r===0?(o.push(a>>16&255),o.push(a>>8&255),o.push(a&255)):r===18?(o.push(a>>10&255),o.push(a>>2&255)):r===12&&o.push(a>>4&255),new Uint8Array(o)}function SD(t){var e="",r=0,i,n,s=t.length,a=S0;for(i=0;i<s;i++)i%3===0&&i&&(e+=a[r>>18&63],e+=a[r>>12&63],e+=a[r>>6&63],e+=a[r&63]),r=(r<<8)+t[i];return n=s%3,n===0?(e+=a[r>>18&63],e+=a[r>>12&63],e+=a[r>>6&63],e+=a[r&63]):n===2?(e+=a[r>>10&63],e+=a[r>>4&63],e+=a[r<<2&63],e+=a[64]):n===1&&(e+=a[r>>2&63],e+=a[r<<4&63],e+=a[64],e+=a[64]),e}function AD(t){return Object.prototype.toString.call(t)==="[object Uint8Array]"}var LD=new Er("tag:yaml.org,2002:binary",{kind:"scalar",resolve:ED,construct:CD,predicate:AD,represent:SD}),DD=Object.prototype.hasOwnProperty,MD=Object.prototype.toString;function ND(t){if(t===null)return!0;var e=[],r,i,n,s,a,o=t;for(r=0,i=o.length;r<i;r+=1){if(n=o[r],a=!1,MD.call(n)!=="[object Object]")return!1;for(s in n)if(DD.call(n,s))if(!a)a=!0;else return!1;if(!a)return!1;if(e.indexOf(s)===-1)e.push(s);else return!1}return!0}function BD(t){return t!==null?t:[]}var ID=new Er("tag:yaml.org,2002:omap",{kind:"sequence",resolve:ND,construct:BD}),OD=Object.prototype.toString;function RD(t){if(t===null)return!0;var e,r,i,n,s,a=t;for(s=new Array(a.length),e=0,r=a.length;e<r;e+=1){if(i=a[e],OD.call(i)!=="[object Object]"||(n=Object.keys(i),n.length!==1))return!1;s[e]=[n[0],i[n[0]]]}return!0}function FD(t){if(t===null)return[];var e,r,i,n,s,a=t;for(s=new Array(a.length),e=0,r=a.length;e<r;e+=1)i=a[e],n=Object.keys(i),s[e]=[n[0],i[n[0]]];return s}var PD=new Er("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:RD,construct:FD}),YD=Object.prototype.hasOwnProperty;function VD(t){if(t===null)return!0;var e,r=t;for(e in r)if(YD.call(r,e)&&r[e]!==null)return!1;return!0}function UD(t){return t!==null?t:{}}var zD=new Er("tag:yaml.org,2002:set",{kind:"mapping",resolve:VD,construct:UD}),WD=bD.extend({implicit:[kD,TD],explicit:[LD,ID,PD,zD]}),qn=Object.prototype.hasOwnProperty,_c=1,$y=2,Xy=3,xc=4,kh=1,HD=2,C2=3,GD=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,qD=/[\x85\u2028\u2029]/,jD=/[,\[\]\{\}]/,Ky=/^(?:!|!!|![a-z\-]+!)$/i,Zy=/^(?:!|[^,\[\]\{\}])(?:%[0-9a-f]{2}|[0-9a-z\-#;\/\?:@&=\+\$,_\.!~\*'\(\)\[\]])*$/i;function S2(t){return Object.prototype.toString.call(t)}function Vi(t){return t===10||t===13}function fs(t){return t===9||t===32}function Ur(t){return t===9||t===32||t===10||t===13}function js(t){return t===44||t===91||t===93||t===123||t===125}function $D(t){var e;return 48<=t&&t<=57?t-48:(e=t|32,97<=e&&e<=102?e-97+10:-1)}function XD(t){return t===120?2:t===117?4:t===85?8:0}function KD(t){return 48<=t&&t<=57?t-48:-1}function A2(t){return t===48?"\0":t===97?"\x07":t===98?"\b":t===116||t===9?" ":t===110?`
|
|
16
|
+
`:t===118?"\v":t===102?"\f":t===114?"\r":t===101?"\x1B":t===32?" ":t===34?'"':t===47?"/":t===92?"\\":t===78?"
":t===95?" ":t===76?"\u2028":t===80?"\u2029":""}function ZD(t){return t<=65535?String.fromCharCode(t):String.fromCharCode((t-65536>>10)+55296,(t-65536&1023)+56320)}var Qy=new Array(256),Jy=new Array(256);for(var Ys=0;Ys<256;Ys++)Qy[Ys]=A2(Ys)?1:0,Jy[Ys]=A2(Ys);function QD(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||WD,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 tm(t,e){var r={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return r.snippet=YL(r),new on(e,r)}function Jt(t,e){throw tm(t,e)}function vc(t,e){t.onWarning&&t.onWarning.call(null,tm(t,e))}var L2={YAML:function(e,r,i){var n,s,a;e.version!==null&&Jt(e,"duplication of %YAML directive"),i.length!==1&&Jt(e,"YAML directive accepts exactly one argument"),n=/^([0-9]+)\.([0-9]+)$/.exec(i[0]),n===null&&Jt(e,"ill-formed argument of the YAML directive"),s=parseInt(n[1],10),a=parseInt(n[2],10),s!==1&&Jt(e,"unacceptable YAML version of the document"),e.version=i[0],e.checkLineBreaks=a<2,a!==1&&a!==2&&vc(e,"unsupported YAML version of the document")},TAG:function(e,r,i){var n,s;i.length!==2&&Jt(e,"TAG directive accepts exactly two arguments"),n=i[0],s=i[1],Ky.test(n)||Jt(e,"ill-formed tag handle (first argument) of the TAG directive"),qn.call(e.tagMap,n)&&Jt(e,'there is a previously declared suffix for "'+n+'" tag handle'),Zy.test(s)||Jt(e,"ill-formed tag prefix (second argument) of the TAG directive");try{s=decodeURIComponent(s)}catch{Jt(e,"tag prefix is malformed: "+s)}e.tagMap[n]=s}};function zn(t,e,r,i){var n,s,a,o;if(e<r){if(o=t.input.slice(e,r),i)for(n=0,s=o.length;n<s;n+=1)a=o.charCodeAt(n),a===9||32<=a&&a<=1114111||Jt(t,"expected valid JSON character");else GD.test(o)&&Jt(t,"the stream contains non-printable characters");t.result+=o}}function D2(t,e,r,i){var n,s,a,o;for(Lr.isObject(r)||Jt(t,"cannot merge mappings; the provided source object is unacceptable"),n=Object.keys(r),a=0,o=n.length;a<o;a+=1)s=n[a],qn.call(e,s)||(e[s]=r[s],i[s]=!0)}function $s(t,e,r,i,n,s,a,o,l){var u,d;if(Array.isArray(n))for(n=Array.prototype.slice.call(n),u=0,d=n.length;u<d;u+=1)Array.isArray(n[u])&&Jt(t,"nested arrays are not supported inside keys"),typeof n=="object"&&S2(n[u])==="[object Object]"&&(n[u]="[object Object]");if(typeof n=="object"&&S2(n)==="[object Object]"&&(n="[object Object]"),n=String(n),e===null&&(e={}),i==="tag:yaml.org,2002:merge")if(Array.isArray(s))for(u=0,d=s.length;u<d;u+=1)D2(t,e,s[u],r);else D2(t,e,s,r);else!t.json&&!qn.call(r,n)&&qn.call(e,n)&&(t.line=a||t.line,t.lineStart=o||t.lineStart,t.position=l||t.position,Jt(t,"duplicated mapping key")),n==="__proto__"?Object.defineProperty(e,n,{configurable:!0,enumerable:!0,writable:!0,value:s}):e[n]=s,delete r[n];return e}function A0(t){var e;e=t.input.charCodeAt(t.position),e===10?t.position++:e===13?(t.position++,t.input.charCodeAt(t.position)===10&&t.position++):Jt(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function nr(t,e,r){for(var i=0,n=t.input.charCodeAt(t.position);n!==0;){for(;fs(n);)n===9&&t.firstTabInLine===-1&&(t.firstTabInLine=t.position),n=t.input.charCodeAt(++t.position);if(e&&n===35)do n=t.input.charCodeAt(++t.position);while(n!==10&&n!==13&&n!==0);if(Vi(n))for(A0(t),n=t.input.charCodeAt(t.position),i++,t.lineIndent=0;n===32;)t.lineIndent++,n=t.input.charCodeAt(++t.position);else break}return r!==-1&&i!==0&&t.lineIndent<r&&vc(t,"deficient indentation"),i}function ku(t){var e=t.position,r;return r=t.input.charCodeAt(e),!!((r===45||r===46)&&r===t.input.charCodeAt(e+1)&&r===t.input.charCodeAt(e+2)&&(e+=3,r=t.input.charCodeAt(e),r===0||Ur(r)))}function L0(t,e){e===1?t.result+=" ":e>1&&(t.result+=Lr.repeat(`
|
|
17
|
+
`,e-1))}function JD(t,e,r){var i,n,s,a,o,l,u,d,f=t.kind,p=t.result,g;if(g=t.input.charCodeAt(t.position),Ur(g)||js(g)||g===35||g===38||g===42||g===33||g===124||g===62||g===39||g===34||g===37||g===64||g===96||(g===63||g===45)&&(n=t.input.charCodeAt(t.position+1),Ur(n)||r&&js(n)))return!1;for(t.kind="scalar",t.result="",s=a=t.position,o=!1;g!==0;){if(g===58){if(n=t.input.charCodeAt(t.position+1),Ur(n)||r&&js(n))break}else if(g===35){if(i=t.input.charCodeAt(t.position-1),Ur(i))break}else{if(t.position===t.lineStart&&ku(t)||r&&js(g))break;if(Vi(g))if(l=t.line,u=t.lineStart,d=t.lineIndent,nr(t,!1,-1),t.lineIndent>=e){o=!0,g=t.input.charCodeAt(t.position);continue}else{t.position=a,t.line=l,t.lineStart=u,t.lineIndent=d;break}}o&&(zn(t,s,a,!1),L0(t,t.line-l),s=a=t.position,o=!1),fs(g)||(a=t.position+1),g=t.input.charCodeAt(++t.position)}return zn(t,s,a,!1),t.result?!0:(t.kind=f,t.result=p,!1)}function tM(t,e){var r,i,n;if(r=t.input.charCodeAt(t.position),r!==39)return!1;for(t.kind="scalar",t.result="",t.position++,i=n=t.position;(r=t.input.charCodeAt(t.position))!==0;)if(r===39)if(zn(t,i,t.position,!0),r=t.input.charCodeAt(++t.position),r===39)i=t.position,t.position++,n=t.position;else return!0;else Vi(r)?(zn(t,i,n,!0),L0(t,nr(t,!1,e)),i=n=t.position):t.position===t.lineStart&&ku(t)?Jt(t,"unexpected end of the document within a single quoted scalar"):(t.position++,n=t.position);Jt(t,"unexpected end of the stream within a single quoted scalar")}function eM(t,e){var r,i,n,s,a,o;if(o=t.input.charCodeAt(t.position),o!==34)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;(o=t.input.charCodeAt(t.position))!==0;){if(o===34)return zn(t,r,t.position,!0),t.position++,!0;if(o===92){if(zn(t,r,t.position,!0),o=t.input.charCodeAt(++t.position),Vi(o))nr(t,!1,e);else if(o<256&&Qy[o])t.result+=Jy[o],t.position++;else if((a=XD(o))>0){for(n=a,s=0;n>0;n--)o=t.input.charCodeAt(++t.position),(a=$D(o))>=0?s=(s<<4)+a:Jt(t,"expected hexadecimal character");t.result+=ZD(s),t.position++}else Jt(t,"unknown escape sequence");r=i=t.position}else Vi(o)?(zn(t,r,i,!0),L0(t,nr(t,!1,e)),r=i=t.position):t.position===t.lineStart&&ku(t)?Jt(t,"unexpected end of the document within a double quoted scalar"):(t.position++,i=t.position)}Jt(t,"unexpected end of the stream within a double quoted scalar")}function rM(t,e){var r=!0,i,n,s,a=t.tag,o,l=t.anchor,u,d,f,p,g,_=Object.create(null),k,w,S,A;if(A=t.input.charCodeAt(t.position),A===91)d=93,g=!1,o=[];else if(A===123)d=125,g=!0,o={};else return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=o),A=t.input.charCodeAt(++t.position);A!==0;){if(nr(t,!0,e),A=t.input.charCodeAt(t.position),A===d)return t.position++,t.tag=a,t.anchor=l,t.kind=g?"mapping":"sequence",t.result=o,!0;r?A===44&&Jt(t,"expected the node content, but found ','"):Jt(t,"missed comma between flow collection entries"),w=k=S=null,f=p=!1,A===63&&(u=t.input.charCodeAt(t.position+1),Ur(u)&&(f=p=!0,t.position++,nr(t,!0,e))),i=t.line,n=t.lineStart,s=t.position,ya(t,e,_c,!1,!0),w=t.tag,k=t.result,nr(t,!0,e),A=t.input.charCodeAt(t.position),(p||t.line===i)&&A===58&&(f=!0,A=t.input.charCodeAt(++t.position),nr(t,!0,e),ya(t,e,_c,!1,!0),S=t.result),g?$s(t,o,_,w,k,S,i,n,s):f?o.push($s(t,null,_,w,k,S,i,n,s)):o.push(k),nr(t,!0,e),A=t.input.charCodeAt(t.position),A===44?(r=!0,A=t.input.charCodeAt(++t.position)):r=!1}Jt(t,"unexpected end of the stream within a flow collection")}function iM(t,e){var r,i,n=kh,s=!1,a=!1,o=e,l=0,u=!1,d,f;if(f=t.input.charCodeAt(t.position),f===124)i=!1;else if(f===62)i=!0;else return!1;for(t.kind="scalar",t.result="";f!==0;)if(f=t.input.charCodeAt(++t.position),f===43||f===45)kh===n?n=f===43?C2:HD:Jt(t,"repeat of a chomping mode identifier");else if((d=KD(f))>=0)d===0?Jt(t,"bad explicit indentation width of a block scalar; it cannot be less than one"):a?Jt(t,"repeat of an indentation width identifier"):(o=e+d-1,a=!0);else break;if(fs(f)){do f=t.input.charCodeAt(++t.position);while(fs(f));if(f===35)do f=t.input.charCodeAt(++t.position);while(!Vi(f)&&f!==0)}for(;f!==0;){for(A0(t),t.lineIndent=0,f=t.input.charCodeAt(t.position);(!a||t.lineIndent<o)&&f===32;)t.lineIndent++,f=t.input.charCodeAt(++t.position);if(!a&&t.lineIndent>o&&(o=t.lineIndent),Vi(f)){l++;continue}if(t.lineIndent<o){n===C2?t.result+=Lr.repeat(`
|
|
18
18
|
`,s?1+l:l):n===kh&&s&&(t.result+=`
|
|
19
19
|
`);break}for(i?fs(f)?(u=!0,t.result+=Lr.repeat(`
|
|
20
20
|
`,s?1+l:l)):u?(u=!1,t.result+=Lr.repeat(`
|
|
21
21
|
`,l+1)):l===0?s&&(t.result+=" "):t.result+=Lr.repeat(`
|
|
22
22
|
`,l):t.result+=Lr.repeat(`
|
|
23
|
-
`,s?1+l:l),s=!0,a=!0,l=0,r=t.position;!Vi(f)&&f!==0;)f=t.input.charCodeAt(++t.position);zn(t,r,t.position,!1)}return!0}function M2(t,e){var r,i=t.tag,n=t.anchor,s=[],a,o=!1,l;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),l=t.input.charCodeAt(t.position);l!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Jt(t,"tab characters must not be used in indentation")),!(l!==45||(a=t.input.charCodeAt(t.position+1),!Ur(a))));){if(o=!0,t.position++,nr(t,!0,-1)&&t.lineIndent<=e){s.push(null),l=t.input.charCodeAt(t.position);continue}if(r=t.line,ya(t,e,Xy,!1,!0),s.push(t.result),nr(t,!0,-1),l=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&l!==0)Jt(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return o?(t.tag=i,t.anchor=n,t.kind="sequence",t.result=s,!0):!1}function nM(t,e,r){var i,n,s,a,o,l,u=t.tag,d=t.anchor,f={},p=Object.create(null),g=null,_=null,k=null,w=!1,S=!1,A;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=f),A=t.input.charCodeAt(t.position);A!==0;){if(!w&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Jt(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),s=t.line,(A===63||A===58)&&Ur(i))A===63?(w&&($s(t,f,p,g,_,null,a,o,l),g=_=k=null),S=!0,w=!0,n=!0):w?(w=!1,n=!0):Jt(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,A=i;else{if(a=t.line,o=t.lineStart,l=t.position,!ya(t,r,$y,!1,!0))break;if(t.line===s){for(A=t.input.charCodeAt(t.position);fs(A);)A=t.input.charCodeAt(++t.position);if(A===58)A=t.input.charCodeAt(++t.position),Ur(A)||Jt(t,"a whitespace character is expected after the key-value separator within a block mapping"),w&&($s(t,f,p,g,_,null,a,o,l),g=_=k=null),S=!0,w=!1,n=!1,g=t.tag,_=t.result;else if(S)Jt(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=u,t.anchor=d,!0}else if(S)Jt(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=u,t.anchor=d,!0}if((t.line===s||t.lineIndent>e)&&(w&&(a=t.line,o=t.lineStart,l=t.position),ya(t,e,xc,!0,n)&&(w?_=t.result:k=t.result),w||($s(t,f,p,g,_,k,a,o,l),g=_=k=null),nr(t,!0,-1),A=t.input.charCodeAt(t.position)),(t.line===s||t.lineIndent>e)&&A!==0)Jt(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return w&&$s(t,f,p,g,_,null,a,o,l),S&&(t.tag=u,t.anchor=d,t.kind="mapping",t.result=f),S}function sM(t){var e,r=!1,i=!1,n,s,a;if(a=t.input.charCodeAt(t.position),a!==33)return!1;if(t.tag!==null&&Jt(t,"duplication of a tag property"),a=t.input.charCodeAt(++t.position),a===60?(r=!0,a=t.input.charCodeAt(++t.position)):a===33?(i=!0,n="!!",a=t.input.charCodeAt(++t.position)):n="!",e=t.position,r){do a=t.input.charCodeAt(++t.position);while(a!==0&&a!==62);t.position<t.length?(s=t.input.slice(e,t.position),a=t.input.charCodeAt(++t.position)):Jt(t,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!Ur(a);)a===33&&(i?Jt(t,"tag suffix cannot contain exclamation marks"):(n=t.input.slice(e-1,t.position+1),Ky.test(n)||Jt(t,"named tag handle cannot contain such characters"),i=!0,e=t.position+1)),a=t.input.charCodeAt(++t.position);s=t.input.slice(e,t.position),jD.test(s)&&Jt(t,"tag suffix cannot contain flow indicator characters")}s&&!Zy.test(s)&&Jt(t,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{Jt(t,"tag name is malformed: "+s)}return r?t.tag=s:qn.call(t.tagMap,n)?t.tag=t.tagMap[n]+s:n==="!"?t.tag="!"+s:n==="!!"?t.tag="tag:yaml.org,2002:"+s:Jt(t,'undeclared tag handle "'+n+'"'),!0}function aM(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&Jt(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!Ur(r)&&!js(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Jt(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function oM(t){var e,r,i;if(i=t.input.charCodeAt(t.position),i!==42)return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;i!==0&&!Ur(i)&&!js(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&Jt(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),qn.call(t.anchorMap,r)||Jt(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],nr(t,!0,-1),!0}function ya(t,e,r,i,n){var s,a,o,l=1,u=!1,d=!1,f,p,g,_,k,w;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,s=a=o=xc===r||Xy===r,i&&nr(t,!0,-1)&&(u=!0,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)),l===1)for(;sM(t)||aM(t);)nr(t,!0,-1)?(u=!0,o=s,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)):o=!1;if(o&&(o=u||n),(l===1||xc===r)&&(_c===r||$y===r?k=e:k=e+1,w=t.position-t.lineStart,l===1?o&&(M2(t,w)||nM(t,w,k))||rM(t,k)?d=!0:(a&&iM(t,k)||tM(t,k)||eM(t,k)?d=!0:oM(t)?(d=!0,(t.tag!==null||t.anchor!==null)&&Jt(t,"alias node should not have any properties")):JD(t,k,_c===r)&&(d=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):l===0&&(d=o&&M2(t,w))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&Jt(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),f=0,p=t.implicitTypes.length;f<p;f+=1)if(_=t.implicitTypes[f],_.resolve(t.result)){t.result=_.construct(t.result),t.tag=_.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(qn.call(t.typeMap[t.kind||"fallback"],t.tag))_=t.typeMap[t.kind||"fallback"][t.tag];else for(_=null,g=t.typeMap.multi[t.kind||"fallback"],f=0,p=g.length;f<p;f+=1)if(t.tag.slice(0,g[f].tag.length)===g[f].tag){_=g[f];break}_||Jt(t,"unknown tag !<"+t.tag+">"),t.result!==null&&_.kind!==t.kind&&Jt(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+_.kind+'", not "'+t.kind+'"'),_.resolve(t.result,t.tag)?(t.result=_.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Jt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||d}function lM(t){var e=t.position,r,i,n,s=!1,a;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(a=t.input.charCodeAt(t.position))!==0&&(nr(t,!0,-1),a=t.input.charCodeAt(t.position),!(t.lineIndent>0||a!==37));){for(s=!0,a=t.input.charCodeAt(++t.position),r=t.position;a!==0&&!Ur(a);)a=t.input.charCodeAt(++t.position);for(i=t.input.slice(r,t.position),n=[],i.length<1&&Jt(t,"directive name must not be less than one character in length");a!==0;){for(;fs(a);)a=t.input.charCodeAt(++t.position);if(a===35){do a=t.input.charCodeAt(++t.position);while(a!==0&&!Vi(a));break}if(Vi(a))break;for(r=t.position;a!==0&&!Ur(a);)a=t.input.charCodeAt(++t.position);n.push(t.input.slice(r,t.position))}a!==0&&
|
|
24
|
-
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new QD(t,e),i=t.indexOf("\0");for(i!==-1&&(r.position=i,Jt(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)lM(r);return r.documents}function cM(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var i=em(t,r);if(typeof e!="function")return i;for(var n=0,s=i.length;n<s;n+=1)e(i[n])}function uM(t,e){var r=em(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new on("expected a single document in the stream, but found more")}}var hM=cM,dM=uM,fM={loadAll:hM,load:dM},pM=Gy,gM=fM.load;const rm=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s;function yM(t,e){var r;const i=t.match(rm);if(i){const n=gM(i[1],{schema:pM});return n!=null&&n.title&&((r=e.setDiagramTitle)==null||r.call(e,n.title)),t.slice(i[0].length)}else return t}const mM=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,bM=/\s*%%.*\n/gm,kc={},
|
|
25
|
-
`);for(const[r,{detector:i}]of Object.entries(kc))if(i(t,e))return r;throw new Error(`No diagram type detected for text: ${t}`)},im=(t,e,r)=>{if(kc[t])throw new Error(`Detector with key ${t} already exists`);kc[t]={detector:e,loader:r},B.debug(`Detector with key ${t} added${r?" with loader":""}`)},_M=t=>kc[t].loader,
|
|
23
|
+
`,s?1+l:l),s=!0,a=!0,l=0,r=t.position;!Vi(f)&&f!==0;)f=t.input.charCodeAt(++t.position);zn(t,r,t.position,!1)}return!0}function M2(t,e){var r,i=t.tag,n=t.anchor,s=[],a,o=!1,l;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=s),l=t.input.charCodeAt(t.position);l!==0&&(t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Jt(t,"tab characters must not be used in indentation")),!(l!==45||(a=t.input.charCodeAt(t.position+1),!Ur(a))));){if(o=!0,t.position++,nr(t,!0,-1)&&t.lineIndent<=e){s.push(null),l=t.input.charCodeAt(t.position);continue}if(r=t.line,ya(t,e,Xy,!1,!0),s.push(t.result),nr(t,!0,-1),l=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&l!==0)Jt(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return o?(t.tag=i,t.anchor=n,t.kind="sequence",t.result=s,!0):!1}function nM(t,e,r){var i,n,s,a,o,l,u=t.tag,d=t.anchor,f={},p=Object.create(null),g=null,_=null,k=null,w=!1,S=!1,A;if(t.firstTabInLine!==-1)return!1;for(t.anchor!==null&&(t.anchorMap[t.anchor]=f),A=t.input.charCodeAt(t.position);A!==0;){if(!w&&t.firstTabInLine!==-1&&(t.position=t.firstTabInLine,Jt(t,"tab characters must not be used in indentation")),i=t.input.charCodeAt(t.position+1),s=t.line,(A===63||A===58)&&Ur(i))A===63?(w&&($s(t,f,p,g,_,null,a,o,l),g=_=k=null),S=!0,w=!0,n=!0):w?(w=!1,n=!0):Jt(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,A=i;else{if(a=t.line,o=t.lineStart,l=t.position,!ya(t,r,$y,!1,!0))break;if(t.line===s){for(A=t.input.charCodeAt(t.position);fs(A);)A=t.input.charCodeAt(++t.position);if(A===58)A=t.input.charCodeAt(++t.position),Ur(A)||Jt(t,"a whitespace character is expected after the key-value separator within a block mapping"),w&&($s(t,f,p,g,_,null,a,o,l),g=_=k=null),S=!0,w=!1,n=!1,g=t.tag,_=t.result;else if(S)Jt(t,"can not read an implicit mapping pair; a colon is missed");else return t.tag=u,t.anchor=d,!0}else if(S)Jt(t,"can not read a block mapping entry; a multiline key may not be an implicit key");else return t.tag=u,t.anchor=d,!0}if((t.line===s||t.lineIndent>e)&&(w&&(a=t.line,o=t.lineStart,l=t.position),ya(t,e,xc,!0,n)&&(w?_=t.result:k=t.result),w||($s(t,f,p,g,_,k,a,o,l),g=_=k=null),nr(t,!0,-1),A=t.input.charCodeAt(t.position)),(t.line===s||t.lineIndent>e)&&A!==0)Jt(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return w&&$s(t,f,p,g,_,null,a,o,l),S&&(t.tag=u,t.anchor=d,t.kind="mapping",t.result=f),S}function sM(t){var e,r=!1,i=!1,n,s,a;if(a=t.input.charCodeAt(t.position),a!==33)return!1;if(t.tag!==null&&Jt(t,"duplication of a tag property"),a=t.input.charCodeAt(++t.position),a===60?(r=!0,a=t.input.charCodeAt(++t.position)):a===33?(i=!0,n="!!",a=t.input.charCodeAt(++t.position)):n="!",e=t.position,r){do a=t.input.charCodeAt(++t.position);while(a!==0&&a!==62);t.position<t.length?(s=t.input.slice(e,t.position),a=t.input.charCodeAt(++t.position)):Jt(t,"unexpected end of the stream within a verbatim tag")}else{for(;a!==0&&!Ur(a);)a===33&&(i?Jt(t,"tag suffix cannot contain exclamation marks"):(n=t.input.slice(e-1,t.position+1),Ky.test(n)||Jt(t,"named tag handle cannot contain such characters"),i=!0,e=t.position+1)),a=t.input.charCodeAt(++t.position);s=t.input.slice(e,t.position),jD.test(s)&&Jt(t,"tag suffix cannot contain flow indicator characters")}s&&!Zy.test(s)&&Jt(t,"tag name cannot contain such characters: "+s);try{s=decodeURIComponent(s)}catch{Jt(t,"tag name is malformed: "+s)}return r?t.tag=s:qn.call(t.tagMap,n)?t.tag=t.tagMap[n]+s:n==="!"?t.tag="!"+s:n==="!!"?t.tag="tag:yaml.org,2002:"+s:Jt(t,'undeclared tag handle "'+n+'"'),!0}function aM(t){var e,r;if(r=t.input.charCodeAt(t.position),r!==38)return!1;for(t.anchor!==null&&Jt(t,"duplication of an anchor property"),r=t.input.charCodeAt(++t.position),e=t.position;r!==0&&!Ur(r)&&!js(r);)r=t.input.charCodeAt(++t.position);return t.position===e&&Jt(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(e,t.position),!0}function oM(t){var e,r,i;if(i=t.input.charCodeAt(t.position),i!==42)return!1;for(i=t.input.charCodeAt(++t.position),e=t.position;i!==0&&!Ur(i)&&!js(i);)i=t.input.charCodeAt(++t.position);return t.position===e&&Jt(t,"name of an alias node must contain at least one character"),r=t.input.slice(e,t.position),qn.call(t.anchorMap,r)||Jt(t,'unidentified alias "'+r+'"'),t.result=t.anchorMap[r],nr(t,!0,-1),!0}function ya(t,e,r,i,n){var s,a,o,l=1,u=!1,d=!1,f,p,g,_,k,w;if(t.listener!==null&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null,s=a=o=xc===r||Xy===r,i&&nr(t,!0,-1)&&(u=!0,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)),l===1)for(;sM(t)||aM(t);)nr(t,!0,-1)?(u=!0,o=s,t.lineIndent>e?l=1:t.lineIndent===e?l=0:t.lineIndent<e&&(l=-1)):o=!1;if(o&&(o=u||n),(l===1||xc===r)&&(_c===r||$y===r?k=e:k=e+1,w=t.position-t.lineStart,l===1?o&&(M2(t,w)||nM(t,w,k))||rM(t,k)?d=!0:(a&&iM(t,k)||tM(t,k)||eM(t,k)?d=!0:oM(t)?(d=!0,(t.tag!==null||t.anchor!==null)&&Jt(t,"alias node should not have any properties")):JD(t,k,_c===r)&&(d=!0,t.tag===null&&(t.tag="?")),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):l===0&&(d=o&&M2(t,w))),t.tag===null)t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);else if(t.tag==="?"){for(t.result!==null&&t.kind!=="scalar"&&Jt(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"'),f=0,p=t.implicitTypes.length;f<p;f+=1)if(_=t.implicitTypes[f],_.resolve(t.result)){t.result=_.construct(t.result),t.tag=_.tag,t.anchor!==null&&(t.anchorMap[t.anchor]=t.result);break}}else if(t.tag!=="!"){if(qn.call(t.typeMap[t.kind||"fallback"],t.tag))_=t.typeMap[t.kind||"fallback"][t.tag];else for(_=null,g=t.typeMap.multi[t.kind||"fallback"],f=0,p=g.length;f<p;f+=1)if(t.tag.slice(0,g[f].tag.length)===g[f].tag){_=g[f];break}_||Jt(t,"unknown tag !<"+t.tag+">"),t.result!==null&&_.kind!==t.kind&&Jt(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+_.kind+'", not "'+t.kind+'"'),_.resolve(t.result,t.tag)?(t.result=_.construct(t.result,t.tag),t.anchor!==null&&(t.anchorMap[t.anchor]=t.result)):Jt(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return t.listener!==null&&t.listener("close",t),t.tag!==null||t.anchor!==null||d}function lM(t){var e=t.position,r,i,n,s=!1,a;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);(a=t.input.charCodeAt(t.position))!==0&&(nr(t,!0,-1),a=t.input.charCodeAt(t.position),!(t.lineIndent>0||a!==37));){for(s=!0,a=t.input.charCodeAt(++t.position),r=t.position;a!==0&&!Ur(a);)a=t.input.charCodeAt(++t.position);for(i=t.input.slice(r,t.position),n=[],i.length<1&&Jt(t,"directive name must not be less than one character in length");a!==0;){for(;fs(a);)a=t.input.charCodeAt(++t.position);if(a===35){do a=t.input.charCodeAt(++t.position);while(a!==0&&!Vi(a));break}if(Vi(a))break;for(r=t.position;a!==0&&!Ur(a);)a=t.input.charCodeAt(++t.position);n.push(t.input.slice(r,t.position))}a!==0&&A0(t),qn.call(L2,i)?L2[i](t,i,n):vc(t,'unknown document directive "'+i+'"')}if(nr(t,!0,-1),t.lineIndent===0&&t.input.charCodeAt(t.position)===45&&t.input.charCodeAt(t.position+1)===45&&t.input.charCodeAt(t.position+2)===45?(t.position+=3,nr(t,!0,-1)):s&&Jt(t,"directives end mark is expected"),ya(t,t.lineIndent-1,xc,!1,!0),nr(t,!0,-1),t.checkLineBreaks&&qD.test(t.input.slice(e,t.position))&&vc(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&ku(t)){t.input.charCodeAt(t.position)===46&&(t.position+=3,nr(t,!0,-1));return}if(t.position<t.length-1)Jt(t,"end of the stream or a document separator is expected");else return}function em(t,e){t=String(t),e=e||{},t.length!==0&&(t.charCodeAt(t.length-1)!==10&&t.charCodeAt(t.length-1)!==13&&(t+=`
|
|
24
|
+
`),t.charCodeAt(0)===65279&&(t=t.slice(1)));var r=new QD(t,e),i=t.indexOf("\0");for(i!==-1&&(r.position=i,Jt(r,"null byte is not allowed in input")),r.input+="\0";r.input.charCodeAt(r.position)===32;)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)lM(r);return r.documents}function cM(t,e,r){e!==null&&typeof e=="object"&&typeof r>"u"&&(r=e,e=null);var i=em(t,r);if(typeof e!="function")return i;for(var n=0,s=i.length;n<s;n+=1)e(i[n])}function uM(t,e){var r=em(t,e);if(r.length!==0){if(r.length===1)return r[0];throw new on("expected a single document in the stream, but found more")}}var hM=cM,dM=uM,fM={loadAll:hM,load:dM},pM=Gy,gM=fM.load;const rm=/^-{3}\s*[\n\r](.*?)[\n\r]-{3}\s*[\n\r]+/s;function yM(t,e){var r;const i=t.match(rm);if(i){const n=gM(i[1],{schema:pM});return n!=null&&n.title&&((r=e.setDiagramTitle)==null||r.call(e,n.title)),t.slice(i[0].length)}else return t}const mM=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,bM=/\s*%%.*\n/gm,kc={},D0=function(t,e){t=t.replace(rm,"").replace(mM,"").replace(bM,`
|
|
25
|
+
`);for(const[r,{detector:i}]of Object.entries(kc))if(i(t,e))return r;throw new Error(`No diagram type detected for text: ${t}`)},im=(t,e,r)=>{if(kc[t])throw new Error(`Detector with key ${t} already exists`);kc[t]={detector:e,loader:r},B.debug(`Detector with key ${t} added${r?" with loader":""}`)},_M=t=>kc[t].loader,p1=function(t,e,r){const{depth:i,clobber:n}=Object.assign({depth:2,clobber:!1},r);return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(s=>p1(t,s,r)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(s=>{t.includes(s)||t.push(s)}),t):t===void 0||i<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(e!==void 0&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(s=>{typeof e[s]=="object"&&(t[s]===void 0||typeof t[s]=="object")?(t[s]===void 0&&(t[s]=Array.isArray(e[s])?[]:{}),t[s]=p1(t[s],e[s],{depth:i-1,clobber:n})):(n||typeof t[s]!="object"&&typeof e[s]!="object")&&(t[s]=e[s])}),t)},pr=p1,xM={curveBasis:ua,curveBasisClosed:lk,curveBasisOpen:ck,curveLinear:$r,curveLinearClosed:uk,curveMonotoneX:hk,curveMonotoneY:dk,curveNatural:fk,curveStep:pk,curveStepAfter:yk,curveStepBefore:gk},wh=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,vM=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,kM=function(t,e){const r=nm(t,/(?:init\b)|(?:initialize\b)/);let i={};if(Array.isArray(r)){const n=r.map(s=>s.args);vs(n),i=pr(i,[...n])}else i=r.args;if(i){let n=D0(t,e);["config"].forEach(s=>{i[s]!==void 0&&(n==="flowchart-v2"&&(n="flowchart"),i[n]=i[s],delete i[s])})}return i},nm=function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${vM.source})(?=[}][%]{2}).*
|
|
26
26
|
`,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),B.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let i;const n=[];for(;(i=wh.exec(t))!==null;)if(i.index===wh.lastIndex&&wh.lastIndex++,i&&!e||e&&i[1]&&i[1].match(e)||e&&i[2]&&i[2].match(e)){const s=i[1]?i[1]:i[2],a=i[3]?i[3].trim():i[4]?JSON.parse(i[4].trim()):null;n.push({type:s,args:a})}return n.length===0&&n.push({type:t,args:null}),n.length===1?n[0]:n}catch(r){return B.error(`ERROR: ${r.message} - Unable to parse directive
|
|
27
|
-
${e!==null?" type:"+e:""} based on the text:${t}`),{type:null,args:null}}},wM=function(t,e){for(const[r,i]of e.entries())if(i.match(t))return r;return-1};function yi(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return xM[r]||e}function TM(t,e){const r=t.trim();if(r)return e.securityLevel!=="loose"?wn(r):r}const EM=(t,...e)=>{const r=t.split("."),i=r.length-1,n=r[i];let s=window;for(let a=0;a<i;a++)if(s=s[r[a]],!s)return;s[n](...e)};function wc(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function CM(t){let e,r=0;t.forEach(s=>{r+=wc(s,e),e=s});let i=r/2,n;return e=void 0,t.forEach(s=>{if(e&&!n){const a=wc(s,e);if(a<i)i-=a;else{const o=i/a;o<=0&&(n=e),o>=1&&(n={x:s.x,y:s.y}),o>0&&o<1&&(n={x:(1-o)*e.x+o*s.x,y:(1-o)*e.y+o*s.y})}}e=s}),n}function SM(t){return t.length===1?t[0]:CM(t)}const AM=(t,e,r)=>{let i;B.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());let s=25,a;i=void 0,e.forEach(d=>{if(i&&!a){const f=wc(d,i);if(f<s)s-=f;else{const p=s/f;p<=0&&(a=i),p>=1&&(a={x:d.x,y:d.y}),p>0&&p<1&&(a={x:(1-p)*i.x+p*d.x,y:(1-p)*i.y+p*d.y})}}i=d});const o=t?10:5,l=Math.atan2(e[0].y-a.y,e[0].x-a.x),u={x:0,y:0};return u.x=Math.sin(l)*o+(e[0].x+a.x)/2,u.y=-Math.cos(l)*o+(e[0].y+a.y)/2,u};function LM(t,e,r){let i=JSON.parse(JSON.stringify(r)),n;B.info("our points",i),e!=="start_left"&&e!=="start_right"&&(i=i.reverse()),i.forEach(f=>{n=f});let a=25+t,o;n=void 0,i.forEach(f=>{if(n&&!o){const p=wc(f,n);if(p<a)a-=p;else{const g=a/p;g<=0&&(o=n),g>=1&&(o={x:f.x,y:f.y}),g>0&&g<1&&(o={x:(1-g)*n.x+g*f.x,y:(1-g)*n.y+g*f.y})}}n=f});const l=10+t*.5,u=Math.atan2(i[0].y-o.y,i[0].x-o.x),d={x:0,y:0};return d.x=Math.sin(u)*l+(i[0].x+o.x)/2,d.y=-Math.cos(u)*l+(i[0].y+o.y)/2,e==="start_left"&&(d.x=Math.sin(u+Math.PI)*l+(i[0].x+o.x)/2,d.y=-Math.cos(u+Math.PI)*l+(i[0].y+o.y)/2),e==="end_right"&&(d.x=Math.sin(u-Math.PI)*l+(i[0].x+o.x)/2-5,d.y=-Math.cos(u-Math.PI)*l+(i[0].y+o.y)/2-5),e==="end_left"&&(d.x=Math.sin(u)*l+(i[0].x+o.x)/2-5,d.y=-Math.cos(u)*l+(i[0].y+o.y)/2-5),d}function jn(t){let e="",r="";for(const i of t)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}let N2=0;const sm=()=>(N2++,"id-"+Math.random().toString(36).substr(2,12)+"-"+N2);function DM(t){let e="";const r="0123456789abcdef",i=r.length;for(let n=0;n<t;n++)e+=r.charAt(Math.floor(Math.random()*i));return e}const am=t=>DM(t.length),MM=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}},NM=function(t,e){const r=e.text.replace(he.lineBreakRegex," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.style("text-anchor",e.anchor),i.style("font-family",e.fontFamily),i.style("font-size",e.fontSize),i.style("font-weight",e.fontWeight),i.attr("fill",e.fill),e.class!==void 0&&i.attr("class",e.class);const n=i.append("tspan");return n.attr("x",e.x+e.textMargin*2),n.attr("fill",e.fill),n.text(r),i},om=Aa((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),he.lineBreakRegex.test(t)))return t;const i=t.split(" "),n=[];let s="";return i.forEach((a,o)=>{const l=Ui(`${a} `,r),u=Ui(s,r);if(l>e){const{hyphenatedStrings:p,remainingWord:g}=BM(a,e,"-",r);n.push(s,...p),s=g}else u+l>=e?(n.push(s),s=a):s=[s,a].filter(Boolean).join(" ");o+1===i.length&&n.push(s)}),n.filter(a=>a!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),BM=Aa((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...t],s=[];let a="";return n.forEach((o,l)=>{const u=`${a}${o}`;if(Ui(u,i)>=e){const f=l+1,p=n.length===f,g=`${u}${r}`;s.push(p?u:g),a=""}else a=u}),{hyphenatedStrings:s,remainingWord:a}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function p1(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),D0(t,e).height}function Ui(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),D0(t,e).width}const D0=Aa((t,e)=>{e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e);const{fontSize:r,fontFamily:i,fontWeight:n}=e;if(!t)return{width:0,height:0};const s=["sans-serif",i],a=t.split(he.lineBreakRegex),o=[],l=At("body");if(!l.remove)return{width:0,height:0,lineHeight:0};const u=l.append("svg");for(const f of s){let p=0;const g={width:0,height:0,lineHeight:0};for(const _ of a){const k=MM();k.text=_;const w=NM(u,k).style("font-size",r).style("font-weight",n).style("font-family",f),S=(w._groups||w)[0][0].getBBox();g.width=Math.round(Math.max(g.width,S.width)),p=Math.round(S.height),g.height+=p,g.lineHeight=Math.round(Math.max(g.lineHeight,p))}o.push(g)}u.remove();const d=isNaN(o[1].height)||isNaN(o[1].width)||isNaN(o[1].lineHeight)||o[0].height>o[1].height&&o[0].width>o[1].width&&o[0].lineHeight>o[1].lineHeight?0:1;return o[d]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),IM=class{constructor(e,r){this.deterministic=e,this.seed=r,this.count=r?r.length:0}next(){return this.deterministic?this.count++:Date.now()}};let wl;const OM=function(t){return wl=wl||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),wl.innerHTML=t,unescape(wl.textContent)},vs=t=>{if(B.debug("directiveSanitizer called with",t),typeof t=="object"&&(t.length?t.forEach(e=>vs(e)):Object.keys(t).forEach(e=>{B.debug("Checking key",e),e.startsWith("__")&&(B.debug("sanitize deleting __ option",e),delete t[e]),e.includes("proto")&&(B.debug("sanitize deleting proto option",e),delete t[e]),e.includes("constr")&&(B.debug("sanitize deleting constr option",e),delete t[e]),e.includes("themeCSS")&&(B.debug("sanitizing themeCss option"),t[e]=Ul(t[e])),e.includes("fontFamily")&&(B.debug("sanitizing fontFamily option"),t[e]=Ul(t[e])),e.includes("altFontFamily")&&(B.debug("sanitizing altFontFamily option"),t[e]=Ul(t[e])),EL.includes(e)?typeof t[e]=="object"&&(B.debug("sanitize deleting object",e),vs(t[e])):(B.debug("sanitize deleting option",e),delete t[e])})),t.themeVariables){const e=Object.keys(t.themeVariables);for(const r of e){const i=t.themeVariables[r];i&&i.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[r]="")}}B.debug("After sanitization",t)},Ul=t=>{let e=0,r=0;for(const i of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?e++:i==="}"&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t};function M0(t){return"str"in t}function RM(t){return t instanceof Error?t.message:String(t)}const FM=(t,e,r,i)=>{if(!i)return;const n=t.node().getBBox();t.append("text").text(i).attr("x",n.x+n.width/2).attr("y",-r).attr("class",e)},ye={assignWithDepth:pr,wrapLabel:om,calculateTextHeight:p1,calculateTextWidth:Ui,calculateTextDimensions:D0,detectInit:kM,detectDirective:nm,isSubstringInArray:wM,interpolateToCurve:yi,calcLabelPosition:SM,calcCardinalityPosition:AM,calcTerminalLabelPosition:LM,formatUrl:TM,getStylesFromArray:jn,generateId:sm,random:am,runFunc:EM,entityDecode:OM,initIdGenerator:IM,directiveSanitizer:vs,sanitizeCss:Ul,insertTitle:FM},PM="mermaid",YM="9.3.0",VM="Markdown-ish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",UM="./dist/mermaid.min.js",zM="./dist/mermaid.core.mjs",WM="./dist/mermaid.d.ts",HM={".":{require:"./dist/mermaid.min.js",import:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts"},"./*":"./*"},GM=["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph"],qM={clean:"rimraf dist","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaidAPI.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:spellcheck && pnpm docs:code && ts-node-esm src/docs.mts","docs:verify":"pnpm docs:spellcheck && pnpm docs:code && ts-node-esm src/docs.mts --verify","docs:pre:vitepress":"rimraf src/vitepress && pnpm docs:code && ts-node-esm src/docs.mts --vitepress","docs:build:vitepress":"pnpm docs:pre:vitepress && vitepress build src/vitepress","docs:dev":'pnpm docs:pre:vitepress && concurrently "vitepress dev src/vitepress" "ts-node-esm src/docs.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell --config ../../cSpell.json "src/docs/**/*.md"',release:"pnpm build",prepublishOnly:"pnpm -w run build"},jM={type:"git",url:"https://github.com/mermaid-js/mermaid"},$M="Knut Sveidqvist",XM="MIT",KM={ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},ZM={"@braintree/sanitize-url":"^6.0.0",d3:"^7.0.0","dagre-d3-es":"7.0.6",dompurify:"2.4.1",khroma:"^2.0.0","lodash-es":"^4.17.21","moment-mini":"^2.24.0","non-layered-tidy-tree-layout":"^2.0.2",stylis:"^4.1.2",uuid:"^9.0.0"},QM={"@types/d3":"^7.4.0","@types/dompurify":"^2.4.0","@types/jsdom":"^20.0.1","@types/lodash-es":"^4.17.6","@types/micromatch":"^4.0.2","@types/prettier":"^2.7.1","@types/stylis":"^4.0.2","@types/uuid":"^8.3.4","@typescript-eslint/eslint-plugin":"^5.42.1","@typescript-eslint/parser":"^5.42.1",chokidar:"^3.5.3",concurrently:"^7.5.0",coveralls:"^3.1.1",cspell:"^6.14.3",globby:"^13.1.2",jison:"^0.4.18","js-base64":"^3.7.2",jsdom:"^20.0.2",micromatch:"^4.0.5",moment:"^2.29.4","path-browserify":"^1.0.1",prettier:"^2.7.1",remark:"^14.0.2",rimraf:"^3.0.2","start-server-and-test":"^1.14.0",typedoc:"^0.23.18","typedoc-plugin-markdown":"^3.13.6",typescript:"^4.8.4","unist-util-flatmap":"^1.0.0",vitepress:"^1.0.0-alpha.28","vitepress-plugin-search":"^1.0.4-alpha.15"},JM=["dist","README.md"],tN=["**/*.css","**/*.scss"],Tc={name:PM,version:YM,description:VM,main:UM,module:zM,types:WM,exports:HM,keywords:GM,scripts:qM,repository:jM,author:$M,license:XM,standard:KM,dependencies:ZM,devDependencies:QM,files:JM,sideEffects:tN},ma=Object.freeze(CL);let Fr=pr({},ma),lm,ba=[],no=pr({},ma);const wu=(t,e)=>{let r=pr({},t),i={};for(const n of e)hm(n),i=pr(i,n);if(r=pr(r,i),i.theme&&i.theme in mn){const n=pr({},lm),s=pr(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in mn&&(r.themeVariables=mn[r.theme].getThemeVariables(s))}return no=r,fm(no),no},eN=t=>(Fr=pr({},ma),Fr=pr(Fr,t),t.theme&&mn[t.theme]&&(Fr.themeVariables=mn[t.theme].getThemeVariables(t.themeVariables)),wu(Fr,ba),Fr),rN=t=>{lm=pr({},t)},iN=t=>(Fr=pr(Fr,t),wu(Fr,ba),Fr),cm=()=>pr({},Fr),um=t=>(fm(t),pr(no,t),$()),$=()=>pr({},no),hm=t=>{var e;["secure",...(e=Fr.secure)!=null?e:[]].forEach(r=>{t[r]!==void 0&&(B.debug(`Denied attempt to modify a secure key ${r}`,t[r]),delete t[r])}),Object.keys(t).forEach(r=>{r.indexOf("__")===0&&delete t[r]}),Object.keys(t).forEach(r=>{typeof t[r]=="string"&&(t[r].includes("<")||t[r].includes(">")||t[r].includes("url(data:"))&&delete t[r],typeof t[r]=="object"&&hm(t[r])})},N0=t=>{t.fontFamily&&(t.themeVariables?t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily}):t.themeVariables={fontFamily:t.fontFamily}),ba.push(t),wu(Fr,ba)},Ao=(t=Fr)=>{ba=[],wu(t,ba)};var dm=(t=>(t.LAZY_LOAD_DEPRECATED="The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",t))(dm||{});const B2={},nN=t=>{B2[t]||(B.warn(dm[t]),B2[t]=!0)},fm=t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&nN("LAZY_LOAD_DEPRECATED")},sN=function(t,e){for(let r of e)t.attr(r[0],r[1])},aN=function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},Ei=function(t,e,r,i){const n=aN(e,r,i);sN(t,n)},Tu=function(t,e,r,i){const n=e.node().getBBox(),s=n.width,a=n.height;B.info(`SVG bounds: ${s}x${a}`,n);let o=0,l=0;B.info(`Graph bounds: ${o}x${l}`,t),o=s+r*2,l=a+r*2,B.info(`Calculated bounds: ${o}x${l}`),Ei(e,l,o,i);const u=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;e.attr("viewBox",u)},oN=t=>`g.classGroup text {
|
|
27
|
+
${e!==null?" type:"+e:""} based on the text:${t}`),{type:null,args:null}}},wM=function(t,e){for(const[r,i]of e.entries())if(i.match(t))return r;return-1};function yi(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return xM[r]||e}function TM(t,e){const r=t.trim();if(r)return e.securityLevel!=="loose"?wn(r):r}const EM=(t,...e)=>{const r=t.split("."),i=r.length-1,n=r[i];let s=window;for(let a=0;a<i;a++)if(s=s[r[a]],!s)return;s[n](...e)};function wc(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function CM(t){let e,r=0;t.forEach(s=>{r+=wc(s,e),e=s});let i=r/2,n;return e=void 0,t.forEach(s=>{if(e&&!n){const a=wc(s,e);if(a<i)i-=a;else{const o=i/a;o<=0&&(n=e),o>=1&&(n={x:s.x,y:s.y}),o>0&&o<1&&(n={x:(1-o)*e.x+o*s.x,y:(1-o)*e.y+o*s.y})}}e=s}),n}function SM(t){return t.length===1?t[0]:CM(t)}const AM=(t,e,r)=>{let i;B.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());let s=25,a;i=void 0,e.forEach(d=>{if(i&&!a){const f=wc(d,i);if(f<s)s-=f;else{const p=s/f;p<=0&&(a=i),p>=1&&(a={x:d.x,y:d.y}),p>0&&p<1&&(a={x:(1-p)*i.x+p*d.x,y:(1-p)*i.y+p*d.y})}}i=d});const o=t?10:5,l=Math.atan2(e[0].y-a.y,e[0].x-a.x),u={x:0,y:0};return u.x=Math.sin(l)*o+(e[0].x+a.x)/2,u.y=-Math.cos(l)*o+(e[0].y+a.y)/2,u};function LM(t,e,r){let i=JSON.parse(JSON.stringify(r)),n;B.info("our points",i),e!=="start_left"&&e!=="start_right"&&(i=i.reverse()),i.forEach(f=>{n=f});let a=25+t,o;n=void 0,i.forEach(f=>{if(n&&!o){const p=wc(f,n);if(p<a)a-=p;else{const g=a/p;g<=0&&(o=n),g>=1&&(o={x:f.x,y:f.y}),g>0&&g<1&&(o={x:(1-g)*n.x+g*f.x,y:(1-g)*n.y+g*f.y})}}n=f});const l=10+t*.5,u=Math.atan2(i[0].y-o.y,i[0].x-o.x),d={x:0,y:0};return d.x=Math.sin(u)*l+(i[0].x+o.x)/2,d.y=-Math.cos(u)*l+(i[0].y+o.y)/2,e==="start_left"&&(d.x=Math.sin(u+Math.PI)*l+(i[0].x+o.x)/2,d.y=-Math.cos(u+Math.PI)*l+(i[0].y+o.y)/2),e==="end_right"&&(d.x=Math.sin(u-Math.PI)*l+(i[0].x+o.x)/2-5,d.y=-Math.cos(u-Math.PI)*l+(i[0].y+o.y)/2-5),e==="end_left"&&(d.x=Math.sin(u)*l+(i[0].x+o.x)/2-5,d.y=-Math.cos(u)*l+(i[0].y+o.y)/2-5),d}function jn(t){let e="",r="";for(const i of t)i!==void 0&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}let N2=0;const sm=()=>(N2++,"id-"+Math.random().toString(36).substr(2,12)+"-"+N2);function DM(t){let e="";const r="0123456789abcdef",i=r.length;for(let n=0;n<t;n++)e+=r.charAt(Math.floor(Math.random()*i));return e}const am=t=>DM(t.length),MM=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}},NM=function(t,e){const r=e.text.replace(he.lineBreakRegex," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.style("text-anchor",e.anchor),i.style("font-family",e.fontFamily),i.style("font-size",e.fontSize),i.style("font-weight",e.fontWeight),i.attr("fill",e.fill),e.class!==void 0&&i.attr("class",e.class);const n=i.append("tspan");return n.attr("x",e.x+e.textMargin*2),n.attr("fill",e.fill),n.text(r),i},om=Aa((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),he.lineBreakRegex.test(t)))return t;const i=t.split(" "),n=[];let s="";return i.forEach((a,o)=>{const l=Ui(`${a} `,r),u=Ui(s,r);if(l>e){const{hyphenatedStrings:p,remainingWord:g}=BM(a,e,"-",r);n.push(s,...p),s=g}else u+l>=e?(n.push(s),s=a):s=[s,a].filter(Boolean).join(" ");o+1===i.length&&n.push(s)}),n.filter(a=>a!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),BM=Aa((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...t],s=[];let a="";return n.forEach((o,l)=>{const u=`${a}${o}`;if(Ui(u,i)>=e){const f=l+1,p=n.length===f,g=`${u}${r}`;s.push(p?u:g),a=""}else a=u}),{hyphenatedStrings:s,remainingWord:a}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function g1(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),M0(t,e).height}function Ui(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),M0(t,e).width}const M0=Aa((t,e)=>{e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e);const{fontSize:r,fontFamily:i,fontWeight:n}=e;if(!t)return{width:0,height:0};const s=["sans-serif",i],a=t.split(he.lineBreakRegex),o=[],l=At("body");if(!l.remove)return{width:0,height:0,lineHeight:0};const u=l.append("svg");for(const f of s){let p=0;const g={width:0,height:0,lineHeight:0};for(const _ of a){const k=MM();k.text=_;const w=NM(u,k).style("font-size",r).style("font-weight",n).style("font-family",f),S=(w._groups||w)[0][0].getBBox();g.width=Math.round(Math.max(g.width,S.width)),p=Math.round(S.height),g.height+=p,g.lineHeight=Math.round(Math.max(g.lineHeight,p))}o.push(g)}u.remove();const d=isNaN(o[1].height)||isNaN(o[1].width)||isNaN(o[1].lineHeight)||o[0].height>o[1].height&&o[0].width>o[1].width&&o[0].lineHeight>o[1].lineHeight?0:1;return o[d]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),IM=class{constructor(e,r){this.deterministic=e,this.seed=r,this.count=r?r.length:0}next(){return this.deterministic?this.count++:Date.now()}};let wl;const OM=function(t){return wl=wl||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),wl.innerHTML=t,unescape(wl.textContent)},vs=t=>{if(B.debug("directiveSanitizer called with",t),typeof t=="object"&&(t.length?t.forEach(e=>vs(e)):Object.keys(t).forEach(e=>{B.debug("Checking key",e),e.startsWith("__")&&(B.debug("sanitize deleting __ option",e),delete t[e]),e.includes("proto")&&(B.debug("sanitize deleting proto option",e),delete t[e]),e.includes("constr")&&(B.debug("sanitize deleting constr option",e),delete t[e]),e.includes("themeCSS")&&(B.debug("sanitizing themeCss option"),t[e]=Ul(t[e])),e.includes("fontFamily")&&(B.debug("sanitizing fontFamily option"),t[e]=Ul(t[e])),e.includes("altFontFamily")&&(B.debug("sanitizing altFontFamily option"),t[e]=Ul(t[e])),EL.includes(e)?typeof t[e]=="object"&&(B.debug("sanitize deleting object",e),vs(t[e])):(B.debug("sanitize deleting option",e),delete t[e])})),t.themeVariables){const e=Object.keys(t.themeVariables);for(const r of e){const i=t.themeVariables[r];i&&i.match&&!i.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[r]="")}}B.debug("After sanitization",t)},Ul=t=>{let e=0,r=0;for(const i of t){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";i==="{"?e++:i==="}"&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t};function N0(t){return"str"in t}function RM(t){return t instanceof Error?t.message:String(t)}const FM=(t,e,r,i)=>{if(!i)return;const n=t.node().getBBox();t.append("text").text(i).attr("x",n.x+n.width/2).attr("y",-r).attr("class",e)},ye={assignWithDepth:pr,wrapLabel:om,calculateTextHeight:g1,calculateTextWidth:Ui,calculateTextDimensions:M0,detectInit:kM,detectDirective:nm,isSubstringInArray:wM,interpolateToCurve:yi,calcLabelPosition:SM,calcCardinalityPosition:AM,calcTerminalLabelPosition:LM,formatUrl:TM,getStylesFromArray:jn,generateId:sm,random:am,runFunc:EM,entityDecode:OM,initIdGenerator:IM,directiveSanitizer:vs,sanitizeCss:Ul,insertTitle:FM},PM="mermaid",YM="9.3.0",VM="Markdown-ish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",UM="./dist/mermaid.min.js",zM="./dist/mermaid.core.mjs",WM="./dist/mermaid.d.ts",HM={".":{require:"./dist/mermaid.min.js",import:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts"},"./*":"./*"},GM=["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph"],qM={clean:"rimraf dist","docs:code":"typedoc src/defaultConfig.ts src/config.ts src/mermaidAPI.ts && prettier --write ./src/docs/config/setup","docs:build":"rimraf ../../docs && pnpm docs:spellcheck && pnpm docs:code && ts-node-esm src/docs.mts","docs:verify":"pnpm docs:spellcheck && pnpm docs:code && ts-node-esm src/docs.mts --verify","docs:pre:vitepress":"rimraf src/vitepress && pnpm docs:code && ts-node-esm src/docs.mts --vitepress","docs:build:vitepress":"pnpm docs:pre:vitepress && vitepress build src/vitepress","docs:dev":'pnpm docs:pre:vitepress && concurrently "vitepress dev src/vitepress" "ts-node-esm src/docs.mts --watch --vitepress"',"docs:serve":"pnpm docs:build:vitepress && vitepress serve src/vitepress","docs:spellcheck":'cspell --config ../../cSpell.json "src/docs/**/*.md"',release:"pnpm build",prepublishOnly:"pnpm -w run build"},jM={type:"git",url:"https://github.com/mermaid-js/mermaid"},$M="Knut Sveidqvist",XM="MIT",KM={ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},ZM={"@braintree/sanitize-url":"^6.0.0",d3:"^7.0.0","dagre-d3-es":"7.0.6",dompurify:"2.4.1",khroma:"^2.0.0","lodash-es":"^4.17.21","moment-mini":"^2.24.0","non-layered-tidy-tree-layout":"^2.0.2",stylis:"^4.1.2",uuid:"^9.0.0"},QM={"@types/d3":"^7.4.0","@types/dompurify":"^2.4.0","@types/jsdom":"^20.0.1","@types/lodash-es":"^4.17.6","@types/micromatch":"^4.0.2","@types/prettier":"^2.7.1","@types/stylis":"^4.0.2","@types/uuid":"^8.3.4","@typescript-eslint/eslint-plugin":"^5.42.1","@typescript-eslint/parser":"^5.42.1",chokidar:"^3.5.3",concurrently:"^7.5.0",coveralls:"^3.1.1",cspell:"^6.14.3",globby:"^13.1.2",jison:"^0.4.18","js-base64":"^3.7.2",jsdom:"^20.0.2",micromatch:"^4.0.5",moment:"^2.29.4","path-browserify":"^1.0.1",prettier:"^2.7.1",remark:"^14.0.2",rimraf:"^3.0.2","start-server-and-test":"^1.14.0",typedoc:"^0.23.18","typedoc-plugin-markdown":"^3.13.6",typescript:"^4.8.4","unist-util-flatmap":"^1.0.0",vitepress:"^1.0.0-alpha.28","vitepress-plugin-search":"^1.0.4-alpha.15"},JM=["dist","README.md"],tN=["**/*.css","**/*.scss"],Tc={name:PM,version:YM,description:VM,main:UM,module:zM,types:WM,exports:HM,keywords:GM,scripts:qM,repository:jM,author:$M,license:XM,standard:KM,dependencies:ZM,devDependencies:QM,files:JM,sideEffects:tN},ma=Object.freeze(CL);let Fr=pr({},ma),lm,ba=[],no=pr({},ma);const wu=(t,e)=>{let r=pr({},t),i={};for(const n of e)hm(n),i=pr(i,n);if(r=pr(r,i),i.theme&&i.theme in mn){const n=pr({},lm),s=pr(n.themeVariables||{},i.themeVariables);r.theme&&r.theme in mn&&(r.themeVariables=mn[r.theme].getThemeVariables(s))}return no=r,fm(no),no},eN=t=>(Fr=pr({},ma),Fr=pr(Fr,t),t.theme&&mn[t.theme]&&(Fr.themeVariables=mn[t.theme].getThemeVariables(t.themeVariables)),wu(Fr,ba),Fr),rN=t=>{lm=pr({},t)},iN=t=>(Fr=pr(Fr,t),wu(Fr,ba),Fr),cm=()=>pr({},Fr),um=t=>(fm(t),pr(no,t),$()),$=()=>pr({},no),hm=t=>{var e;["secure",...(e=Fr.secure)!=null?e:[]].forEach(r=>{t[r]!==void 0&&(B.debug(`Denied attempt to modify a secure key ${r}`,t[r]),delete t[r])}),Object.keys(t).forEach(r=>{r.indexOf("__")===0&&delete t[r]}),Object.keys(t).forEach(r=>{typeof t[r]=="string"&&(t[r].includes("<")||t[r].includes(">")||t[r].includes("url(data:"))&&delete t[r],typeof t[r]=="object"&&hm(t[r])})},B0=t=>{t.fontFamily&&(t.themeVariables?t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily}):t.themeVariables={fontFamily:t.fontFamily}),ba.push(t),wu(Fr,ba)},Ao=(t=Fr)=>{ba=[],wu(t,ba)};var dm=(t=>(t.LAZY_LOAD_DEPRECATED="The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",t))(dm||{});const B2={},nN=t=>{B2[t]||(B.warn(dm[t]),B2[t]=!0)},fm=t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&nN("LAZY_LOAD_DEPRECATED")},sN=function(t,e){for(let r of e)t.attr(r[0],r[1])},aN=function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},Ei=function(t,e,r,i){const n=aN(e,r,i);sN(t,n)},Tu=function(t,e,r,i){const n=e.node().getBBox(),s=n.width,a=n.height;B.info(`SVG bounds: ${s}x${a}`,n);let o=0,l=0;B.info(`Graph bounds: ${o}x${l}`,t),o=s+r*2,l=a+r*2,B.info(`Calculated bounds: ${o}x${l}`),Ei(e,l,o,i);const u=`${n.x-r} ${n.y-r} ${n.width+2*r} ${n.height+2*r}`;e.attr("viewBox",u)},oN=t=>`g.classGroup text {
|
|
28
28
|
fill: ${t.nodeBorder};
|
|
29
29
|
fill: ${t.classText};
|
|
30
30
|
stroke: none;
|
|
@@ -1134,19 +1134,19 @@ g.stateGroup line {
|
|
|
1134
1134
|
${i}
|
|
1135
1135
|
|
|
1136
1136
|
${e}
|
|
1137
|
-
`},xN=(t,e)=>{zl[t]=e},vN=_N,kN=B,wN=E0,$o=$,TN=t=>vi(t,$o()),wm=Tu,Sc={},dr=(t,e,r)=>{if(Sc[t])throw new Error(`Diagram ${t} already registered.`);Sc[t]=e,r&&im(t,r),xN(t,e.styles),e.injectUtils&&e.injectUtils(kN,wN,$o,TN,wm)},Tm=t=>{if(t in Sc)return Sc[t];throw new Error(`Diagram ${t} not found.`)};var g1=function(){var t=function(H,N,M,C){for(M=M||{},C=H.length;C--;M[H[C]]=N);return M},e=[1,4],r=[1,7],i=[1,5],n=[1,9],s=[1,6],a=[2,6],o=[1,16],l=[6,8,14,20,22,24,25,27,29,32,37,40,50,55],u=[8,14,20,22,24,25,27,29,32,37,40],d=[8,13,14,20,22,24,25,27,29,32,37,40],f=[1,26],p=[6,8,14,50,55],g=[8,14,55],_=[1,53],k=[1,52],w=[8,14,30,33,35,38,55],S=[1,67],A=[1,68],O=[1,69],P=[8,14,33,35,42,55],W={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,GG:6,document:7,EOF:8,":":9,DIR:10,options:11,body:12,OPT:13,NL:14,line:15,statement:16,commitStatement:17,mergeStatement:18,cherryPickStatement:19,acc_title:20,acc_title_value:21,acc_descr:22,acc_descr_value:23,acc_descr_multiline_value:24,section:25,branchStatement:26,CHECKOUT:27,ref:28,BRANCH:29,ORDER:30,NUM:31,CHERRY_PICK:32,COMMIT_ID:33,STR:34,COMMIT_TAG:35,EMPTYSTR:36,MERGE:37,COMMIT_TYPE:38,commitType:39,COMMIT:40,commit_arg:41,COMMIT_MSG:42,NORMAL:43,REVERSE:44,HIGHLIGHT:45,openDirective:46,typeDirective:47,closeDirective:48,argDirective:49,open_directive:50,type_directive:51,arg_directive:52,close_directive:53,ID:54,";":55,$accept:0,$end:1},terminals_:{2:"error",6:"GG",8:"EOF",9:":",10:"DIR",13:"OPT",14:"NL",20:"acc_title",21:"acc_title_value",22:"acc_descr",23:"acc_descr_value",24:"acc_descr_multiline_value",25:"section",27:"CHECKOUT",29:"BRANCH",30:"ORDER",31:"NUM",32:"CHERRY_PICK",33:"COMMIT_ID",34:"STR",35:"COMMIT_TAG",36:"EMPTYSTR",37:"MERGE",38:"COMMIT_TYPE",40:"COMMIT",42:"COMMIT_MSG",43:"NORMAL",44:"REVERSE",45:"HIGHLIGHT",50:"open_directive",51:"type_directive",52:"arg_directive",53:"close_directive",54:"ID",55:";"},productions_:[0,[3,2],[3,2],[3,3],[3,4],[3,5],[7,0],[7,2],[11,2],[11,1],[12,0],[12,2],[15,2],[15,1],[16,1],[16,1],[16,1],[16,2],[16,2],[16,1],[16,1],[16,1],[16,2],[26,2],[26,4],[19,3],[19,5],[19,5],[19,5],[19,5],[18,2],[18,4],[18,4],[18,4],[18,6],[18,6],[18,6],[18,6],[18,6],[18,6],[18,8],[18,8],[18,8],[18,8],[18,8],[18,8],[17,2],[17,3],[17,3],[17,5],[17,5],[17,3],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,3],[17,5],[17,5],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[41,0],[41,1],[39,1],[39,1],[39,1],[5,3],[5,5],[46,1],[47,1],[49,1],[48,1],[28,1],[28,1],[4,1],[4,1],[4,1]],performAction:function(N,M,C,v,D,m,Q){var b=m.length-1;switch(D){case 3:return m[b];case 4:return m[b-1];case 5:return v.setDirection(m[b-3]),m[b-1];case 7:v.setOptions(m[b-1]),this.$=m[b];break;case 8:m[b-1]+=m[b],this.$=m[b-1];break;case 10:this.$=[];break;case 11:m[b-1].push(m[b]),this.$=m[b-1];break;case 12:this.$=m[b-1];break;case 17:this.$=m[b].trim(),v.setAccTitle(this.$);break;case 18:case 19:this.$=m[b].trim(),v.setAccDescription(this.$);break;case 20:v.addSection(m[b].substr(8)),this.$=m[b].substr(8);break;case 22:v.checkout(m[b]);break;case 23:v.branch(m[b]);break;case 24:v.branch(m[b-2],m[b]);break;case 25:v.cherryPick(m[b],"",void 0);break;case 26:v.cherryPick(m[b-2],"",m[b]);break;case 27:case 29:v.cherryPick(m[b-2],"","");break;case 28:v.cherryPick(m[b],"",m[b-2]);break;case 30:v.merge(m[b],"","","");break;case 31:v.merge(m[b-2],m[b],"","");break;case 32:v.merge(m[b-2],"",m[b],"");break;case 33:v.merge(m[b-2],"","",m[b]);break;case 34:v.merge(m[b-4],m[b],"",m[b-2]);break;case 35:v.merge(m[b-4],"",m[b],m[b-2]);break;case 36:v.merge(m[b-4],"",m[b-2],m[b]);break;case 37:v.merge(m[b-4],m[b-2],m[b],"");break;case 38:v.merge(m[b-4],m[b-2],"",m[b]);break;case 39:v.merge(m[b-4],m[b],m[b-2],"");break;case 40:v.merge(m[b-6],m[b-4],m[b-2],m[b]);break;case 41:v.merge(m[b-6],m[b],m[b-4],m[b-2]);break;case 42:v.merge(m[b-6],m[b-4],m[b],m[b-2]);break;case 43:v.merge(m[b-6],m[b-2],m[b-4],m[b]);break;case 44:v.merge(m[b-6],m[b],m[b-2],m[b-4]);break;case 45:v.merge(m[b-6],m[b-2],m[b],m[b-4]);break;case 46:v.commit(m[b]);break;case 47:v.commit("","",v.commitType.NORMAL,m[b]);break;case 48:v.commit("","",m[b],"");break;case 49:v.commit("","",m[b],m[b-2]);break;case 50:v.commit("","",m[b-2],m[b]);break;case 51:v.commit("",m[b],v.commitType.NORMAL,"");break;case 52:v.commit("",m[b-2],v.commitType.NORMAL,m[b]);break;case 53:v.commit("",m[b],v.commitType.NORMAL,m[b-2]);break;case 54:v.commit("",m[b-2],m[b],"");break;case 55:v.commit("",m[b],m[b-2],"");break;case 56:v.commit("",m[b-4],m[b-2],m[b]);break;case 57:v.commit("",m[b-4],m[b],m[b-2]);break;case 58:v.commit("",m[b-2],m[b-4],m[b]);break;case 59:v.commit("",m[b],m[b-4],m[b-2]);break;case 60:v.commit("",m[b],m[b-2],m[b-4]);break;case 61:v.commit("",m[b-2],m[b],m[b-4]);break;case 62:v.commit(m[b],"",v.commitType.NORMAL,"");break;case 63:v.commit(m[b],"",v.commitType.NORMAL,m[b-2]);break;case 64:v.commit(m[b-2],"",v.commitType.NORMAL,m[b]);break;case 65:v.commit(m[b-2],"",m[b],"");break;case 66:v.commit(m[b],"",m[b-2],"");break;case 67:v.commit(m[b],m[b-2],v.commitType.NORMAL,"");break;case 68:v.commit(m[b-2],m[b],v.commitType.NORMAL,"");break;case 69:v.commit(m[b-4],"",m[b-2],m[b]);break;case 70:v.commit(m[b-4],"",m[b],m[b-2]);break;case 71:v.commit(m[b-2],"",m[b-4],m[b]);break;case 72:v.commit(m[b],"",m[b-4],m[b-2]);break;case 73:v.commit(m[b],"",m[b-2],m[b-4]);break;case 74:v.commit(m[b-2],"",m[b],m[b-4]);break;case 75:v.commit(m[b-4],m[b],m[b-2],"");break;case 76:v.commit(m[b-4],m[b-2],m[b],"");break;case 77:v.commit(m[b-2],m[b],m[b-4],"");break;case 78:v.commit(m[b],m[b-2],m[b-4],"");break;case 79:v.commit(m[b],m[b-4],m[b-2],"");break;case 80:v.commit(m[b-2],m[b-4],m[b],"");break;case 81:v.commit(m[b-4],m[b],v.commitType.NORMAL,m[b-2]);break;case 82:v.commit(m[b-4],m[b-2],v.commitType.NORMAL,m[b]);break;case 83:v.commit(m[b-2],m[b],v.commitType.NORMAL,m[b-4]);break;case 84:v.commit(m[b],m[b-2],v.commitType.NORMAL,m[b-4]);break;case 85:v.commit(m[b],m[b-4],v.commitType.NORMAL,m[b-2]);break;case 86:v.commit(m[b-2],m[b-4],v.commitType.NORMAL,m[b]);break;case 87:v.commit(m[b-6],m[b-4],m[b-2],m[b]);break;case 88:v.commit(m[b-6],m[b-4],m[b],m[b-2]);break;case 89:v.commit(m[b-6],m[b-2],m[b-4],m[b]);break;case 90:v.commit(m[b-6],m[b],m[b-4],m[b-2]);break;case 91:v.commit(m[b-6],m[b-2],m[b],m[b-4]);break;case 92:v.commit(m[b-6],m[b],m[b-2],m[b-4]);break;case 93:v.commit(m[b-4],m[b-6],m[b-2],m[b]);break;case 94:v.commit(m[b-4],m[b-6],m[b],m[b-2]);break;case 95:v.commit(m[b-2],m[b-6],m[b-4],m[b]);break;case 96:v.commit(m[b],m[b-6],m[b-4],m[b-2]);break;case 97:v.commit(m[b-2],m[b-6],m[b],m[b-4]);break;case 98:v.commit(m[b],m[b-6],m[b-2],m[b-4]);break;case 99:v.commit(m[b],m[b-4],m[b-2],m[b-6]);break;case 100:v.commit(m[b-2],m[b-4],m[b],m[b-6]);break;case 101:v.commit(m[b],m[b-2],m[b-4],m[b-6]);break;case 102:v.commit(m[b-2],m[b],m[b-4],m[b-6]);break;case 103:v.commit(m[b-4],m[b-2],m[b],m[b-6]);break;case 104:v.commit(m[b-4],m[b],m[b-2],m[b-6]);break;case 105:v.commit(m[b-2],m[b-4],m[b-6],m[b]);break;case 106:v.commit(m[b],m[b-4],m[b-6],m[b-2]);break;case 107:v.commit(m[b-2],m[b],m[b-6],m[b-4]);break;case 108:v.commit(m[b],m[b-2],m[b-6],m[b-4]);break;case 109:v.commit(m[b-4],m[b-2],m[b-6],m[b]);break;case 110:v.commit(m[b-4],m[b],m[b-6],m[b-2]);break;case 111:this.$="";break;case 112:this.$=m[b];break;case 113:this.$=v.commitType.NORMAL;break;case 114:this.$=v.commitType.REVERSE;break;case 115:this.$=v.commitType.HIGHLIGHT;break;case 118:v.parseDirective("%%{","open_directive");break;case 119:v.parseDirective(m[b],"type_directive");break;case 120:m[b]=m[b].trim().replace(/'/g,'"'),v.parseDirective(m[b],"arg_directive");break;case 121:v.parseDirective("}%%","close_directive","gitGraph");break}},table:[{3:1,4:2,5:3,6:e,8:r,14:i,46:8,50:n,55:s},{1:[3]},{3:10,4:2,5:3,6:e,8:r,14:i,46:8,50:n,55:s},{3:11,4:2,5:3,6:e,8:r,14:i,46:8,50:n,55:s},{7:12,8:a,9:[1,13],10:[1,14],11:15,14:o},t(l,[2,124]),t(l,[2,125]),t(l,[2,126]),{47:17,51:[1,18]},{51:[2,118]},{1:[2,1]},{1:[2,2]},{8:[1,19]},{7:20,8:a,11:15,14:o},{9:[1,21]},t(u,[2,10],{12:22,13:[1,23]}),t(d,[2,9]),{9:[1,25],48:24,53:f},t([9,53],[2,119]),{1:[2,3]},{8:[1,27]},{7:28,8:a,11:15,14:o},{8:[2,7],14:[1,31],15:29,16:30,17:32,18:33,19:34,20:[1,35],22:[1,36],24:[1,37],25:[1,38],26:39,27:[1,40],29:[1,44],32:[1,43],37:[1,42],40:[1,41]},t(d,[2,8]),t(p,[2,116]),{49:45,52:[1,46]},t(p,[2,121]),{1:[2,4]},{8:[1,47]},t(u,[2,11]),{4:48,8:r,14:i,55:s},t(u,[2,13]),t(g,[2,14]),t(g,[2,15]),t(g,[2,16]),{21:[1,49]},{23:[1,50]},t(g,[2,19]),t(g,[2,20]),t(g,[2,21]),{28:51,34:_,54:k},t(g,[2,111],{41:54,33:[1,57],34:[1,59],35:[1,55],38:[1,56],42:[1,58]}),{28:60,34:_,54:k},{33:[1,61],35:[1,62]},{28:63,34:_,54:k},{48:64,53:f},{53:[2,120]},{1:[2,5]},t(u,[2,12]),t(g,[2,17]),t(g,[2,18]),t(g,[2,22]),t(w,[2,122]),t(w,[2,123]),t(g,[2,46]),{34:[1,65]},{39:66,43:S,44:A,45:O},{34:[1,70]},{34:[1,71]},t(g,[2,112]),t(g,[2,30],{33:[1,72],35:[1,74],38:[1,73]}),{34:[1,75]},{34:[1,76],36:[1,77]},t(g,[2,23],{30:[1,78]}),t(p,[2,117]),t(g,[2,47],{33:[1,80],38:[1,79],42:[1,81]}),t(g,[2,48],{33:[1,83],35:[1,82],42:[1,84]}),t(P,[2,113]),t(P,[2,114]),t(P,[2,115]),t(g,[2,51],{35:[1,85],38:[1,86],42:[1,87]}),t(g,[2,62],{33:[1,90],35:[1,88],38:[1,89]}),{34:[1,91]},{39:92,43:S,44:A,45:O},{34:[1,93]},t(g,[2,25],{35:[1,94]}),{33:[1,95]},{33:[1,96]},{31:[1,97]},{39:98,43:S,44:A,45:O},{34:[1,99]},{34:[1,100]},{34:[1,101]},{34:[1,102]},{34:[1,103]},{34:[1,104]},{39:105,43:S,44:A,45:O},{34:[1,106]},{34:[1,107]},{39:108,43:S,44:A,45:O},{34:[1,109]},t(g,[2,31],{35:[1,111],38:[1,110]}),t(g,[2,32],{33:[1,113],35:[1,112]}),t(g,[2,33],{33:[1,114],38:[1,115]}),{34:[1,116],36:[1,117]},{34:[1,118]},{34:[1,119]},t(g,[2,24]),t(g,[2,49],{33:[1,120],42:[1,121]}),t(g,[2,53],{38:[1,122],42:[1,123]}),t(g,[2,63],{33:[1,125],38:[1,124]}),t(g,[2,50],{33:[1,126],42:[1,127]}),t(g,[2,55],{35:[1,128],42:[1,129]}),t(g,[2,66],{33:[1,131],35:[1,130]}),t(g,[2,52],{38:[1,132],42:[1,133]}),t(g,[2,54],{35:[1,134],42:[1,135]}),t(g,[2,67],{35:[1,137],38:[1,136]}),t(g,[2,64],{33:[1,139],38:[1,138]}),t(g,[2,65],{33:[1,141],35:[1,140]}),t(g,[2,68],{35:[1,143],38:[1,142]}),{39:144,43:S,44:A,45:O},{34:[1,145]},{34:[1,146]},{34:[1,147]},{34:[1,148]},{39:149,43:S,44:A,45:O},t(g,[2,26]),t(g,[2,27]),t(g,[2,28]),t(g,[2,29]),{34:[1,150]},{34:[1,151]},{39:152,43:S,44:A,45:O},{34:[1,153]},{39:154,43:S,44:A,45:O},{34:[1,155]},{34:[1,156]},{34:[1,157]},{34:[1,158]},{34:[1,159]},{34:[1,160]},{34:[1,161]},{39:162,43:S,44:A,45:O},{34:[1,163]},{34:[1,164]},{34:[1,165]},{39:166,43:S,44:A,45:O},{34:[1,167]},{39:168,43:S,44:A,45:O},{34:[1,169]},{34:[1,170]},{34:[1,171]},{39:172,43:S,44:A,45:O},{34:[1,173]},t(g,[2,37],{35:[1,174]}),t(g,[2,38],{38:[1,175]}),t(g,[2,36],{33:[1,176]}),t(g,[2,39],{35:[1,177]}),t(g,[2,34],{38:[1,178]}),t(g,[2,35],{33:[1,179]}),t(g,[2,60],{42:[1,180]}),t(g,[2,73],{33:[1,181]}),t(g,[2,61],{42:[1,182]}),t(g,[2,84],{38:[1,183]}),t(g,[2,74],{33:[1,184]}),t(g,[2,83],{38:[1,185]}),t(g,[2,59],{42:[1,186]}),t(g,[2,72],{33:[1,187]}),t(g,[2,58],{42:[1,188]}),t(g,[2,78],{35:[1,189]}),t(g,[2,71],{33:[1,190]}),t(g,[2,77],{35:[1,191]}),t(g,[2,57],{42:[1,192]}),t(g,[2,85],{38:[1,193]}),t(g,[2,56],{42:[1,194]}),t(g,[2,79],{35:[1,195]}),t(g,[2,80],{35:[1,196]}),t(g,[2,86],{38:[1,197]}),t(g,[2,70],{33:[1,198]}),t(g,[2,81],{38:[1,199]}),t(g,[2,69],{33:[1,200]}),t(g,[2,75],{35:[1,201]}),t(g,[2,76],{35:[1,202]}),t(g,[2,82],{38:[1,203]}),{34:[1,204]},{39:205,43:S,44:A,45:O},{34:[1,206]},{34:[1,207]},{39:208,43:S,44:A,45:O},{34:[1,209]},{34:[1,210]},{34:[1,211]},{34:[1,212]},{39:213,43:S,44:A,45:O},{34:[1,214]},{39:215,43:S,44:A,45:O},{34:[1,216]},{34:[1,217]},{34:[1,218]},{34:[1,219]},{34:[1,220]},{34:[1,221]},{34:[1,222]},{39:223,43:S,44:A,45:O},{34:[1,224]},{34:[1,225]},{34:[1,226]},{39:227,43:S,44:A,45:O},{34:[1,228]},{39:229,43:S,44:A,45:O},{34:[1,230]},{34:[1,231]},{34:[1,232]},{39:233,43:S,44:A,45:O},t(g,[2,40]),t(g,[2,42]),t(g,[2,41]),t(g,[2,43]),t(g,[2,45]),t(g,[2,44]),t(g,[2,101]),t(g,[2,102]),t(g,[2,99]),t(g,[2,100]),t(g,[2,104]),t(g,[2,103]),t(g,[2,108]),t(g,[2,107]),t(g,[2,106]),t(g,[2,105]),t(g,[2,110]),t(g,[2,109]),t(g,[2,98]),t(g,[2,97]),t(g,[2,96]),t(g,[2,95]),t(g,[2,93]),t(g,[2,94]),t(g,[2,92]),t(g,[2,91]),t(g,[2,90]),t(g,[2,89]),t(g,[2,87]),t(g,[2,88])],defaultActions:{9:[2,118],10:[2,1],11:[2,2],19:[2,3],27:[2,4],46:[2,120],47:[2,5]},parseError:function(N,M){if(M.recoverable)this.trace(N);else{var C=new Error(N);throw C.hash=M,C}},parse:function(N){var M=this,C=[0],v=[],D=[null],m=[],Q=this.table,b="",ct=0,Dt=0,vt=2,j=1,ot=m.slice.call(arguments,1),rt=Object.create(this.lexer),it={yy:{}};for(var ut in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ut)&&(it.yy[ut]=this.yy[ut]);rt.setInput(N,it.yy),it.yy.lexer=rt,it.yy.parser=this,typeof rt.yylloc>"u"&&(rt.yylloc={});var bt=rt.yylloc;m.push(bt);var K=rt.options&&rt.options.ranges;typeof it.yy.parseError=="function"?this.parseError=it.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ot(){var Yt;return Yt=v.pop()||rt.lex()||j,typeof Yt!="number"&&(Yt instanceof Array&&(v=Yt,Yt=v.pop()),Yt=M.symbols_[Yt]||Yt),Yt}for(var Y,U,X,F,I={},L,J,T,ht;;){if(U=C[C.length-1],this.defaultActions[U]?X=this.defaultActions[U]:((Y===null||typeof Y>"u")&&(Y=Ot()),X=Q[U]&&Q[U][Y]),typeof X>"u"||!X.length||!X[0]){var V="";ht=[];for(L in Q[U])this.terminals_[L]&&L>vt&&ht.push("'"+this.terminals_[L]+"'");rt.showPosition?V="Parse error on line "+(ct+1)+`:
|
|
1137
|
+
`},xN=(t,e)=>{zl[t]=e},vN=_N,kN=B,wN=C0,$o=$,TN=t=>vi(t,$o()),wm=Tu,Sc={},dr=(t,e,r)=>{if(Sc[t])throw new Error(`Diagram ${t} already registered.`);Sc[t]=e,r&&im(t,r),xN(t,e.styles),e.injectUtils&&e.injectUtils(kN,wN,$o,TN,wm)},Tm=t=>{if(t in Sc)return Sc[t];throw new Error(`Diagram ${t} not found.`)};var y1=function(){var t=function(H,N,M,C){for(M=M||{},C=H.length;C--;M[H[C]]=N);return M},e=[1,4],r=[1,7],i=[1,5],n=[1,9],s=[1,6],a=[2,6],o=[1,16],l=[6,8,14,20,22,24,25,27,29,32,37,40,50,55],u=[8,14,20,22,24,25,27,29,32,37,40],d=[8,13,14,20,22,24,25,27,29,32,37,40],f=[1,26],p=[6,8,14,50,55],g=[8,14,55],_=[1,53],k=[1,52],w=[8,14,30,33,35,38,55],S=[1,67],A=[1,68],O=[1,69],P=[8,14,33,35,42,55],W={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,GG:6,document:7,EOF:8,":":9,DIR:10,options:11,body:12,OPT:13,NL:14,line:15,statement:16,commitStatement:17,mergeStatement:18,cherryPickStatement:19,acc_title:20,acc_title_value:21,acc_descr:22,acc_descr_value:23,acc_descr_multiline_value:24,section:25,branchStatement:26,CHECKOUT:27,ref:28,BRANCH:29,ORDER:30,NUM:31,CHERRY_PICK:32,COMMIT_ID:33,STR:34,COMMIT_TAG:35,EMPTYSTR:36,MERGE:37,COMMIT_TYPE:38,commitType:39,COMMIT:40,commit_arg:41,COMMIT_MSG:42,NORMAL:43,REVERSE:44,HIGHLIGHT:45,openDirective:46,typeDirective:47,closeDirective:48,argDirective:49,open_directive:50,type_directive:51,arg_directive:52,close_directive:53,ID:54,";":55,$accept:0,$end:1},terminals_:{2:"error",6:"GG",8:"EOF",9:":",10:"DIR",13:"OPT",14:"NL",20:"acc_title",21:"acc_title_value",22:"acc_descr",23:"acc_descr_value",24:"acc_descr_multiline_value",25:"section",27:"CHECKOUT",29:"BRANCH",30:"ORDER",31:"NUM",32:"CHERRY_PICK",33:"COMMIT_ID",34:"STR",35:"COMMIT_TAG",36:"EMPTYSTR",37:"MERGE",38:"COMMIT_TYPE",40:"COMMIT",42:"COMMIT_MSG",43:"NORMAL",44:"REVERSE",45:"HIGHLIGHT",50:"open_directive",51:"type_directive",52:"arg_directive",53:"close_directive",54:"ID",55:";"},productions_:[0,[3,2],[3,2],[3,3],[3,4],[3,5],[7,0],[7,2],[11,2],[11,1],[12,0],[12,2],[15,2],[15,1],[16,1],[16,1],[16,1],[16,2],[16,2],[16,1],[16,1],[16,1],[16,2],[26,2],[26,4],[19,3],[19,5],[19,5],[19,5],[19,5],[18,2],[18,4],[18,4],[18,4],[18,6],[18,6],[18,6],[18,6],[18,6],[18,6],[18,8],[18,8],[18,8],[18,8],[18,8],[18,8],[17,2],[17,3],[17,3],[17,5],[17,5],[17,3],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,3],[17,5],[17,5],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[41,0],[41,1],[39,1],[39,1],[39,1],[5,3],[5,5],[46,1],[47,1],[49,1],[48,1],[28,1],[28,1],[4,1],[4,1],[4,1]],performAction:function(N,M,C,v,D,m,Q){var b=m.length-1;switch(D){case 3:return m[b];case 4:return m[b-1];case 5:return v.setDirection(m[b-3]),m[b-1];case 7:v.setOptions(m[b-1]),this.$=m[b];break;case 8:m[b-1]+=m[b],this.$=m[b-1];break;case 10:this.$=[];break;case 11:m[b-1].push(m[b]),this.$=m[b-1];break;case 12:this.$=m[b-1];break;case 17:this.$=m[b].trim(),v.setAccTitle(this.$);break;case 18:case 19:this.$=m[b].trim(),v.setAccDescription(this.$);break;case 20:v.addSection(m[b].substr(8)),this.$=m[b].substr(8);break;case 22:v.checkout(m[b]);break;case 23:v.branch(m[b]);break;case 24:v.branch(m[b-2],m[b]);break;case 25:v.cherryPick(m[b],"",void 0);break;case 26:v.cherryPick(m[b-2],"",m[b]);break;case 27:case 29:v.cherryPick(m[b-2],"","");break;case 28:v.cherryPick(m[b],"",m[b-2]);break;case 30:v.merge(m[b],"","","");break;case 31:v.merge(m[b-2],m[b],"","");break;case 32:v.merge(m[b-2],"",m[b],"");break;case 33:v.merge(m[b-2],"","",m[b]);break;case 34:v.merge(m[b-4],m[b],"",m[b-2]);break;case 35:v.merge(m[b-4],"",m[b],m[b-2]);break;case 36:v.merge(m[b-4],"",m[b-2],m[b]);break;case 37:v.merge(m[b-4],m[b-2],m[b],"");break;case 38:v.merge(m[b-4],m[b-2],"",m[b]);break;case 39:v.merge(m[b-4],m[b],m[b-2],"");break;case 40:v.merge(m[b-6],m[b-4],m[b-2],m[b]);break;case 41:v.merge(m[b-6],m[b],m[b-4],m[b-2]);break;case 42:v.merge(m[b-6],m[b-4],m[b],m[b-2]);break;case 43:v.merge(m[b-6],m[b-2],m[b-4],m[b]);break;case 44:v.merge(m[b-6],m[b],m[b-2],m[b-4]);break;case 45:v.merge(m[b-6],m[b-2],m[b],m[b-4]);break;case 46:v.commit(m[b]);break;case 47:v.commit("","",v.commitType.NORMAL,m[b]);break;case 48:v.commit("","",m[b],"");break;case 49:v.commit("","",m[b],m[b-2]);break;case 50:v.commit("","",m[b-2],m[b]);break;case 51:v.commit("",m[b],v.commitType.NORMAL,"");break;case 52:v.commit("",m[b-2],v.commitType.NORMAL,m[b]);break;case 53:v.commit("",m[b],v.commitType.NORMAL,m[b-2]);break;case 54:v.commit("",m[b-2],m[b],"");break;case 55:v.commit("",m[b],m[b-2],"");break;case 56:v.commit("",m[b-4],m[b-2],m[b]);break;case 57:v.commit("",m[b-4],m[b],m[b-2]);break;case 58:v.commit("",m[b-2],m[b-4],m[b]);break;case 59:v.commit("",m[b],m[b-4],m[b-2]);break;case 60:v.commit("",m[b],m[b-2],m[b-4]);break;case 61:v.commit("",m[b-2],m[b],m[b-4]);break;case 62:v.commit(m[b],"",v.commitType.NORMAL,"");break;case 63:v.commit(m[b],"",v.commitType.NORMAL,m[b-2]);break;case 64:v.commit(m[b-2],"",v.commitType.NORMAL,m[b]);break;case 65:v.commit(m[b-2],"",m[b],"");break;case 66:v.commit(m[b],"",m[b-2],"");break;case 67:v.commit(m[b],m[b-2],v.commitType.NORMAL,"");break;case 68:v.commit(m[b-2],m[b],v.commitType.NORMAL,"");break;case 69:v.commit(m[b-4],"",m[b-2],m[b]);break;case 70:v.commit(m[b-4],"",m[b],m[b-2]);break;case 71:v.commit(m[b-2],"",m[b-4],m[b]);break;case 72:v.commit(m[b],"",m[b-4],m[b-2]);break;case 73:v.commit(m[b],"",m[b-2],m[b-4]);break;case 74:v.commit(m[b-2],"",m[b],m[b-4]);break;case 75:v.commit(m[b-4],m[b],m[b-2],"");break;case 76:v.commit(m[b-4],m[b-2],m[b],"");break;case 77:v.commit(m[b-2],m[b],m[b-4],"");break;case 78:v.commit(m[b],m[b-2],m[b-4],"");break;case 79:v.commit(m[b],m[b-4],m[b-2],"");break;case 80:v.commit(m[b-2],m[b-4],m[b],"");break;case 81:v.commit(m[b-4],m[b],v.commitType.NORMAL,m[b-2]);break;case 82:v.commit(m[b-4],m[b-2],v.commitType.NORMAL,m[b]);break;case 83:v.commit(m[b-2],m[b],v.commitType.NORMAL,m[b-4]);break;case 84:v.commit(m[b],m[b-2],v.commitType.NORMAL,m[b-4]);break;case 85:v.commit(m[b],m[b-4],v.commitType.NORMAL,m[b-2]);break;case 86:v.commit(m[b-2],m[b-4],v.commitType.NORMAL,m[b]);break;case 87:v.commit(m[b-6],m[b-4],m[b-2],m[b]);break;case 88:v.commit(m[b-6],m[b-4],m[b],m[b-2]);break;case 89:v.commit(m[b-6],m[b-2],m[b-4],m[b]);break;case 90:v.commit(m[b-6],m[b],m[b-4],m[b-2]);break;case 91:v.commit(m[b-6],m[b-2],m[b],m[b-4]);break;case 92:v.commit(m[b-6],m[b],m[b-2],m[b-4]);break;case 93:v.commit(m[b-4],m[b-6],m[b-2],m[b]);break;case 94:v.commit(m[b-4],m[b-6],m[b],m[b-2]);break;case 95:v.commit(m[b-2],m[b-6],m[b-4],m[b]);break;case 96:v.commit(m[b],m[b-6],m[b-4],m[b-2]);break;case 97:v.commit(m[b-2],m[b-6],m[b],m[b-4]);break;case 98:v.commit(m[b],m[b-6],m[b-2],m[b-4]);break;case 99:v.commit(m[b],m[b-4],m[b-2],m[b-6]);break;case 100:v.commit(m[b-2],m[b-4],m[b],m[b-6]);break;case 101:v.commit(m[b],m[b-2],m[b-4],m[b-6]);break;case 102:v.commit(m[b-2],m[b],m[b-4],m[b-6]);break;case 103:v.commit(m[b-4],m[b-2],m[b],m[b-6]);break;case 104:v.commit(m[b-4],m[b],m[b-2],m[b-6]);break;case 105:v.commit(m[b-2],m[b-4],m[b-6],m[b]);break;case 106:v.commit(m[b],m[b-4],m[b-6],m[b-2]);break;case 107:v.commit(m[b-2],m[b],m[b-6],m[b-4]);break;case 108:v.commit(m[b],m[b-2],m[b-6],m[b-4]);break;case 109:v.commit(m[b-4],m[b-2],m[b-6],m[b]);break;case 110:v.commit(m[b-4],m[b],m[b-6],m[b-2]);break;case 111:this.$="";break;case 112:this.$=m[b];break;case 113:this.$=v.commitType.NORMAL;break;case 114:this.$=v.commitType.REVERSE;break;case 115:this.$=v.commitType.HIGHLIGHT;break;case 118:v.parseDirective("%%{","open_directive");break;case 119:v.parseDirective(m[b],"type_directive");break;case 120:m[b]=m[b].trim().replace(/'/g,'"'),v.parseDirective(m[b],"arg_directive");break;case 121:v.parseDirective("}%%","close_directive","gitGraph");break}},table:[{3:1,4:2,5:3,6:e,8:r,14:i,46:8,50:n,55:s},{1:[3]},{3:10,4:2,5:3,6:e,8:r,14:i,46:8,50:n,55:s},{3:11,4:2,5:3,6:e,8:r,14:i,46:8,50:n,55:s},{7:12,8:a,9:[1,13],10:[1,14],11:15,14:o},t(l,[2,124]),t(l,[2,125]),t(l,[2,126]),{47:17,51:[1,18]},{51:[2,118]},{1:[2,1]},{1:[2,2]},{8:[1,19]},{7:20,8:a,11:15,14:o},{9:[1,21]},t(u,[2,10],{12:22,13:[1,23]}),t(d,[2,9]),{9:[1,25],48:24,53:f},t([9,53],[2,119]),{1:[2,3]},{8:[1,27]},{7:28,8:a,11:15,14:o},{8:[2,7],14:[1,31],15:29,16:30,17:32,18:33,19:34,20:[1,35],22:[1,36],24:[1,37],25:[1,38],26:39,27:[1,40],29:[1,44],32:[1,43],37:[1,42],40:[1,41]},t(d,[2,8]),t(p,[2,116]),{49:45,52:[1,46]},t(p,[2,121]),{1:[2,4]},{8:[1,47]},t(u,[2,11]),{4:48,8:r,14:i,55:s},t(u,[2,13]),t(g,[2,14]),t(g,[2,15]),t(g,[2,16]),{21:[1,49]},{23:[1,50]},t(g,[2,19]),t(g,[2,20]),t(g,[2,21]),{28:51,34:_,54:k},t(g,[2,111],{41:54,33:[1,57],34:[1,59],35:[1,55],38:[1,56],42:[1,58]}),{28:60,34:_,54:k},{33:[1,61],35:[1,62]},{28:63,34:_,54:k},{48:64,53:f},{53:[2,120]},{1:[2,5]},t(u,[2,12]),t(g,[2,17]),t(g,[2,18]),t(g,[2,22]),t(w,[2,122]),t(w,[2,123]),t(g,[2,46]),{34:[1,65]},{39:66,43:S,44:A,45:O},{34:[1,70]},{34:[1,71]},t(g,[2,112]),t(g,[2,30],{33:[1,72],35:[1,74],38:[1,73]}),{34:[1,75]},{34:[1,76],36:[1,77]},t(g,[2,23],{30:[1,78]}),t(p,[2,117]),t(g,[2,47],{33:[1,80],38:[1,79],42:[1,81]}),t(g,[2,48],{33:[1,83],35:[1,82],42:[1,84]}),t(P,[2,113]),t(P,[2,114]),t(P,[2,115]),t(g,[2,51],{35:[1,85],38:[1,86],42:[1,87]}),t(g,[2,62],{33:[1,90],35:[1,88],38:[1,89]}),{34:[1,91]},{39:92,43:S,44:A,45:O},{34:[1,93]},t(g,[2,25],{35:[1,94]}),{33:[1,95]},{33:[1,96]},{31:[1,97]},{39:98,43:S,44:A,45:O},{34:[1,99]},{34:[1,100]},{34:[1,101]},{34:[1,102]},{34:[1,103]},{34:[1,104]},{39:105,43:S,44:A,45:O},{34:[1,106]},{34:[1,107]},{39:108,43:S,44:A,45:O},{34:[1,109]},t(g,[2,31],{35:[1,111],38:[1,110]}),t(g,[2,32],{33:[1,113],35:[1,112]}),t(g,[2,33],{33:[1,114],38:[1,115]}),{34:[1,116],36:[1,117]},{34:[1,118]},{34:[1,119]},t(g,[2,24]),t(g,[2,49],{33:[1,120],42:[1,121]}),t(g,[2,53],{38:[1,122],42:[1,123]}),t(g,[2,63],{33:[1,125],38:[1,124]}),t(g,[2,50],{33:[1,126],42:[1,127]}),t(g,[2,55],{35:[1,128],42:[1,129]}),t(g,[2,66],{33:[1,131],35:[1,130]}),t(g,[2,52],{38:[1,132],42:[1,133]}),t(g,[2,54],{35:[1,134],42:[1,135]}),t(g,[2,67],{35:[1,137],38:[1,136]}),t(g,[2,64],{33:[1,139],38:[1,138]}),t(g,[2,65],{33:[1,141],35:[1,140]}),t(g,[2,68],{35:[1,143],38:[1,142]}),{39:144,43:S,44:A,45:O},{34:[1,145]},{34:[1,146]},{34:[1,147]},{34:[1,148]},{39:149,43:S,44:A,45:O},t(g,[2,26]),t(g,[2,27]),t(g,[2,28]),t(g,[2,29]),{34:[1,150]},{34:[1,151]},{39:152,43:S,44:A,45:O},{34:[1,153]},{39:154,43:S,44:A,45:O},{34:[1,155]},{34:[1,156]},{34:[1,157]},{34:[1,158]},{34:[1,159]},{34:[1,160]},{34:[1,161]},{39:162,43:S,44:A,45:O},{34:[1,163]},{34:[1,164]},{34:[1,165]},{39:166,43:S,44:A,45:O},{34:[1,167]},{39:168,43:S,44:A,45:O},{34:[1,169]},{34:[1,170]},{34:[1,171]},{39:172,43:S,44:A,45:O},{34:[1,173]},t(g,[2,37],{35:[1,174]}),t(g,[2,38],{38:[1,175]}),t(g,[2,36],{33:[1,176]}),t(g,[2,39],{35:[1,177]}),t(g,[2,34],{38:[1,178]}),t(g,[2,35],{33:[1,179]}),t(g,[2,60],{42:[1,180]}),t(g,[2,73],{33:[1,181]}),t(g,[2,61],{42:[1,182]}),t(g,[2,84],{38:[1,183]}),t(g,[2,74],{33:[1,184]}),t(g,[2,83],{38:[1,185]}),t(g,[2,59],{42:[1,186]}),t(g,[2,72],{33:[1,187]}),t(g,[2,58],{42:[1,188]}),t(g,[2,78],{35:[1,189]}),t(g,[2,71],{33:[1,190]}),t(g,[2,77],{35:[1,191]}),t(g,[2,57],{42:[1,192]}),t(g,[2,85],{38:[1,193]}),t(g,[2,56],{42:[1,194]}),t(g,[2,79],{35:[1,195]}),t(g,[2,80],{35:[1,196]}),t(g,[2,86],{38:[1,197]}),t(g,[2,70],{33:[1,198]}),t(g,[2,81],{38:[1,199]}),t(g,[2,69],{33:[1,200]}),t(g,[2,75],{35:[1,201]}),t(g,[2,76],{35:[1,202]}),t(g,[2,82],{38:[1,203]}),{34:[1,204]},{39:205,43:S,44:A,45:O},{34:[1,206]},{34:[1,207]},{39:208,43:S,44:A,45:O},{34:[1,209]},{34:[1,210]},{34:[1,211]},{34:[1,212]},{39:213,43:S,44:A,45:O},{34:[1,214]},{39:215,43:S,44:A,45:O},{34:[1,216]},{34:[1,217]},{34:[1,218]},{34:[1,219]},{34:[1,220]},{34:[1,221]},{34:[1,222]},{39:223,43:S,44:A,45:O},{34:[1,224]},{34:[1,225]},{34:[1,226]},{39:227,43:S,44:A,45:O},{34:[1,228]},{39:229,43:S,44:A,45:O},{34:[1,230]},{34:[1,231]},{34:[1,232]},{39:233,43:S,44:A,45:O},t(g,[2,40]),t(g,[2,42]),t(g,[2,41]),t(g,[2,43]),t(g,[2,45]),t(g,[2,44]),t(g,[2,101]),t(g,[2,102]),t(g,[2,99]),t(g,[2,100]),t(g,[2,104]),t(g,[2,103]),t(g,[2,108]),t(g,[2,107]),t(g,[2,106]),t(g,[2,105]),t(g,[2,110]),t(g,[2,109]),t(g,[2,98]),t(g,[2,97]),t(g,[2,96]),t(g,[2,95]),t(g,[2,93]),t(g,[2,94]),t(g,[2,92]),t(g,[2,91]),t(g,[2,90]),t(g,[2,89]),t(g,[2,87]),t(g,[2,88])],defaultActions:{9:[2,118],10:[2,1],11:[2,2],19:[2,3],27:[2,4],46:[2,120],47:[2,5]},parseError:function(N,M){if(M.recoverable)this.trace(N);else{var C=new Error(N);throw C.hash=M,C}},parse:function(N){var M=this,C=[0],v=[],D=[null],m=[],Q=this.table,b="",ct=0,Dt=0,vt=2,j=1,ot=m.slice.call(arguments,1),rt=Object.create(this.lexer),it={yy:{}};for(var ut in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ut)&&(it.yy[ut]=this.yy[ut]);rt.setInput(N,it.yy),it.yy.lexer=rt,it.yy.parser=this,typeof rt.yylloc>"u"&&(rt.yylloc={});var bt=rt.yylloc;m.push(bt);var K=rt.options&&rt.options.ranges;typeof it.yy.parseError=="function"?this.parseError=it.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ot(){var Yt;return Yt=v.pop()||rt.lex()||j,typeof Yt!="number"&&(Yt instanceof Array&&(v=Yt,Yt=v.pop()),Yt=M.symbols_[Yt]||Yt),Yt}for(var Y,U,X,F,I={},L,J,T,ht;;){if(U=C[C.length-1],this.defaultActions[U]?X=this.defaultActions[U]:((Y===null||typeof Y>"u")&&(Y=Ot()),X=Q[U]&&Q[U][Y]),typeof X>"u"||!X.length||!X[0]){var V="";ht=[];for(L in Q[U])this.terminals_[L]&&L>vt&&ht.push("'"+this.terminals_[L]+"'");rt.showPosition?V="Parse error on line "+(ct+1)+`:
|
|
1138
1138
|
`+rt.showPosition()+`
|
|
1139
1139
|
Expecting `+ht.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":V="Parse error on line "+(ct+1)+": Unexpected "+(Y==j?"end of input":"'"+(this.terminals_[Y]||Y)+"'"),this.parseError(V,{text:rt.match,token:this.terminals_[Y]||Y,line:rt.yylineno,loc:bt,expected:ht})}if(X[0]instanceof Array&&X.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+Y);switch(X[0]){case 1:C.push(Y),D.push(rt.yytext),m.push(rt.yylloc),C.push(X[1]),Y=null,Dt=rt.yyleng,b=rt.yytext,ct=rt.yylineno,bt=rt.yylloc;break;case 2:if(J=this.productions_[X[1]][1],I.$=D[D.length-J],I._$={first_line:m[m.length-(J||1)].first_line,last_line:m[m.length-1].last_line,first_column:m[m.length-(J||1)].first_column,last_column:m[m.length-1].last_column},K&&(I._$.range=[m[m.length-(J||1)].range[0],m[m.length-1].range[1]]),F=this.performAction.apply(I,[b,Dt,ct,it.yy,X[1],D,m].concat(ot)),typeof F<"u")return F;J&&(C=C.slice(0,-1*J*2),D=D.slice(0,-1*J),m=m.slice(0,-1*J)),C.push(this.productions_[X[1]][0]),D.push(I.$),m.push(I._$),T=Q[C[C.length-2]][C[C.length-1]],C.push(T);break;case 3:return!0}}return!0}},q=function(){var H={EOF:1,parseError:function(M,C){if(this.yy.parser)this.yy.parser.parseError(M,C);else throw new Error(M)},setInput:function(N,M){return this.yy=M||this.yy||{},this._input=N,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var N=this._input[0];this.yytext+=N,this.yyleng++,this.offset++,this.match+=N,this.matched+=N;var M=N.match(/(?:\r\n?|\n).*/g);return M?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),N},unput:function(N){var M=N.length,C=N.split(/(?:\r\n?|\n)/g);this._input=N+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-M),this.offset-=M;var v=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),C.length-1&&(this.yylineno-=C.length-1);var D=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:C?(C.length===v.length?this.yylloc.first_column:0)+v[v.length-C.length].length-C[0].length:this.yylloc.first_column-M},this.options.ranges&&(this.yylloc.range=[D[0],D[0]+this.yyleng-M]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
1140
1140
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(N){this.unput(this.match.slice(N))},pastInput:function(){var N=this.matched.substr(0,this.matched.length-this.match.length);return(N.length>20?"...":"")+N.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var N=this.match;return N.length<20&&(N+=this._input.substr(0,20-N.length)),(N.substr(0,20)+(N.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var N=this.pastInput(),M=new Array(N.length+1).join("-");return N+this.upcomingInput()+`
|
|
1141
1141
|
`+M+"^"},test_match:function(N,M){var C,v,D;if(this.options.backtrack_lexer&&(D={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(D.yylloc.range=this.yylloc.range.slice(0))),v=N[0].match(/(?:\r\n?|\n).*/g),v&&(this.yylineno+=v.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:v?v[v.length-1].length-v[v.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+N[0].length},this.yytext+=N[0],this.match+=N[0],this.matches=N,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(N[0].length),this.matched+=N[0],C=this.performAction.call(this,this.yy,this,M,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),C)return C;if(this._backtrack){for(var m in D)this[m]=D[m];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var N,M,C,v;this._more||(this.yytext="",this.match="");for(var D=this._currentRules(),m=0;m<D.length;m++)if(C=this._input.match(this.rules[D[m]]),C&&(!M||C[0].length>M[0].length)){if(M=C,v=m,this.options.backtrack_lexer){if(N=this.test_match(C,D[m]),N!==!1)return N;if(this._backtrack){M=!1;continue}else return!1}else if(!this.options.flex)break}return M?(N=this.test_match(M,D[v]),N!==!1?N:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1142
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var M=this.next();return M||this.lex()},begin:function(M){this.conditionStack.push(M)},popState:function(){var M=this.conditionStack.length-1;return M>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(M){return M=this.conditionStack.length-1-Math.abs(M||0),M>=0?this.conditionStack[M]:"INITIAL"},pushState:function(M){this.begin(M)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(M,C,v,D){switch(v){case 0:return this.begin("open_directive"),50;case 1:return this.begin("type_directive"),51;case 2:return this.popState(),this.begin("arg_directive"),9;case 3:return this.popState(),this.popState(),53;case 4:return 52;case 5:return this.begin("acc_title"),20;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),22;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:return 14;case 13:break;case 14:break;case 15:return 6;case 16:return 40;case 17:return 33;case 18:return 38;case 19:return 42;case 20:return 43;case 21:return 44;case 22:return 45;case 23:return 35;case 24:return 29;case 25:return 30;case 26:return 37;case 27:return 32;case 28:return 27;case 29:return 10;case 30:return 10;case 31:return 9;case 32:return"CARET";case 33:this.begin("options");break;case 34:this.popState();break;case 35:return 13;case 36:return 36;case 37:this.begin("string");break;case 38:this.popState();break;case 39:return 34;case 40:return 31;case 41:return 54;case 42:return 8}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit(?=\s|$))/i,/^(?:id:)/i,/^(?:type:)/i,/^(?:msg:)/i,/^(?:NORMAL\b)/i,/^(?:REVERSE\b)/i,/^(?:HIGHLIGHT\b)/i,/^(?:tag:)/i,/^(?:branch(?=\s|$))/i,/^(?:order:)/i,/^(?:merge(?=\s|$))/i,/^(?:cherry-pick(?=\s|$))/i,/^(?:checkout(?=\s|$))/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:[ \r\n\t]+end\b)/i,/^(?:[\s\S]+(?=[ \r\n\t]+end))/i,/^(?:["]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[0-9]+(?=\s|$))/i,/^(?:\w([-\./\w]*[-\w])?)/i,/^(?:$)/i,/^(?:\s+)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},options:{rules:[34,35],inclusive:!1},string:{rules:[38,39],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,36,37,40,41,42,43],inclusive:!0}}};return H}();W.lexer=q;function z(){this.yy={}}return z.prototype=W,W.Parser=z,new z}();
|
|
1143
|
-
`)},Li=function(){return I0},Cn=function(t){Eu=O0(t)},Sn=function(){return Eu};let Ac=$().gitGraph.mainBranchName,SN=$().gitGraph.mainBranchOrder,ur={},Mr=null,Lo={};Lo[Ac]={name:Ac,order:SN};let ir={};ir[Ac]=Mr;let fr=Ac,Em="LR",ks=0;function R0(){return am({length:7})}const AN=function(t,e,r){ze.parseDirective(this,t,e,r)};function LN(t,e){const r=Object.create(null);return t.reduce((i,n)=>{const s=e(n);return r[s]||(r[s]=!0,i.push(n)),i},[])}const DN=function(t){Em=t};let Cm={};const MN=function(t){B.debug("options str",t),t=t&&t.trim(),t=t||"{}";try{Cm=JSON.parse(t)}catch(e){B.error("error while parsing gitGraph options",e.message)}},NN=function(){return Cm},BN=function(t,e,r,i){B.debug("Entering commit:",t,e,r,i),e=he.sanitizeText(e,$()),t=he.sanitizeText(t,$()),i=he.sanitizeText(i,$());const n={id:e||ks+"-"+R0(),message:t,seq:ks++,type:r||Do.NORMAL,tag:i||"",parents:Mr==null?[]:[Mr.id],branch:fr};Mr=n,ur[n.id]=n,ir[fr]=n.id,B.debug("in pushCommit "+n.id)},IN=function(t,e){if(t=he.sanitizeText(t,$()),ir[t]===void 0)ir[t]=Mr!=null?Mr.id:null,Lo[t]={name:t,order:e?parseInt(e,10):null},Sm(t),B.debug("in createBranch");else{let r=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+'")');throw r.hash={text:"branch "+t,token:"branch "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+t+'"']},r}},ON=function(t,e,r,i){t=he.sanitizeText(t,$()),e=he.sanitizeText(e,$());const n=ur[ir[fr]],s=ur[ir[t]];if(fr===t){let o=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},o}else if(n===void 0||!n){let o=new Error('Incorrect usage of "merge". Current branch ('+fr+")has no commits");throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["commit"]},o}else if(ir[t]===void 0){let o=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch "+t]},o}else if(s===void 0||!s){let o=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"commit"']},o}else if(n===s){let o=new Error('Incorrect usage of "merge". Both branches have same head');throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},o}else if(e&&ur[e]!==void 0){let o=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom Id");throw o.hash={text:"merge "+t+e+r+i,token:"merge "+t+e+r+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["merge "+t+" "+e+"_UNIQUE "+r+" "+i]},o}const a={id:e||ks+"-"+R0(),message:"merged branch "+t+" into "+fr,seq:ks++,parents:[Mr==null?null:Mr.id,ir[t]],branch:fr,type:Do.MERGE,customType:r,customId:!!e,tag:i||""};Mr=a,ur[a.id]=a,ir[fr]=a.id,B.debug(ir),B.debug("in mergeBranch")},RN=function(t,e,r){if(B.debug("Entering cherryPick:",t,e,r),t=he.sanitizeText(t,$()),e=he.sanitizeText(e,$()),r=he.sanitizeText(r,$()),!t||ur[t]===void 0){let s=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw s.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},s}let i=ur[t],n=i.branch;if(i.type===Do.MERGE){let s=new Error('Incorrect usage of "cherryPick". Source commit should not be a merge commit');throw s.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},s}if(!e||ur[e]===void 0){if(n===fr){let o=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw o.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},o}const s=ur[ir[fr]];if(s===void 0||!s){let o=new Error('Incorrect usage of "cherry-pick". Current branch ('+fr+")has no commits");throw o.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},o}const a={id:ks+"-"+R0(),message:"cherry-picked "+i+" into "+fr,seq:ks++,parents:[Mr==null?null:Mr.id,i.id],branch:fr,type:Do.CHERRY_PICK,tag:r??"cherry-pick:"+i.id};Mr=a,ur[a.id]=a,ir[fr]=a.id,B.debug(ir),B.debug("in cherryPick")}},Sm=function(t){if(t=he.sanitizeText(t,$()),ir[t]===void 0){let e=new Error('Trying to checkout branch which is not yet created. (Help try using "branch '+t+'")');throw e.hash={text:"checkout "+t,token:"checkout "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"branch '+t+'"']},e}else{fr=t;const e=ir[fr];Mr=ur[e]}};function I2(t,e,r){const i=t.indexOf(e);i===-1?t.push(r):t.splice(i,1,r)}function Am(t){const e=t.reduce((n,s)=>n.seq>s.seq?n:s,t[0]);let r="";t.forEach(function(n){n===e?r+=" *":r+=" |"});const i=[r,e.id,e.seq];for(let n in ir)ir[n]===e.id&&i.push(n);if(B.debug(i.join(" ")),e.parents&&e.parents.length==2){const n=ur[e.parents[0]];I2(t,e,n),t.push(ur[e.parents[1]])}else{if(e.parents.length==0)return;{const n=ur[e.parents];I2(t,e,n)}}t=LN(t,n=>n.id),Am(t)}const FN=function(){B.debug(ur);const t=Lm()[0];Am([t])},PN=function(){ur={},Mr=null;let t=$().gitGraph.mainBranchName,e=$().gitGraph.mainBranchOrder;ir={},ir[t]=null,Lo={},Lo[t]={name:t,order:e},fr=t,ks=0,Ci()},YN=function(){return Object.values(Lo).map((e,r)=>e.order!==null?e:{...e,order:parseFloat(`0.${r}`,10)}).sort((e,r)=>e.order-r.order).map(({name:e})=>({name:e}))},VN=function(){return ir},UN=function(){return ur},Lm=function(){const t=Object.keys(ur).map(function(e){return ur[e]});return t.forEach(function(e){B.debug(e.id)}),t.sort((e,r)=>e.seq-r.seq),t},zN=function(){return fr},WN=function(){return Em},HN=function(){return Mr},Do={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},GN={parseDirective:AN,getConfig:()=>$().gitGraph,setDirection:DN,setOptions:MN,getOptions:NN,commit:BN,branch:IN,merge:ON,cherryPick:RN,checkout:Sm,prettyPrint:FN,clear:PN,getBranchesAsObjArray:YN,getBranches:VN,getCommits:UN,getCommitsArray:Lm,getCurrentBranch:zN,getDirection:WN,getHead:HN,setAccTitle:ii,getAccTitle:Si,getAccDescription:Li,setAccDescription:Ai,setDiagramTitle:Cn,getDiagramTitle:Sn,commitType:Do};let Ka={};const Gr={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},cs=8;let Pr={},Lc={},Dc=[],Mc=0;const qN=()=>{Pr={},Lc={},Ka={},Mc=0,Dc=[]},jN=t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","text");let r=[];typeof t=="string"?r=t.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(t)?r=t:r=[];for(const i of r){const n=document.createElementNS("http://www.w3.org/2000/svg","tspan");n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),n.setAttribute("dy","1em"),n.setAttribute("x","0"),n.setAttribute("class","row"),n.textContent=i.trim(),e.appendChild(n)}return e},O2=(t,e,r)=>{const i=$o().gitGraph,n=t.append("g").attr("class","commit-bullets"),s=t.append("g").attr("class","commit-labels");let a=0;Object.keys(e).sort((u,d)=>e[u].seq-e[d].seq).forEach(u=>{const d=e[u],f=Pr[d.branch].pos,p=a+10;if(r){let g,_=d.customType!==void 0&&d.customType!==""?d.customType:d.type;switch(_){case Gr.NORMAL:g="commit-normal";break;case Gr.REVERSE:g="commit-reverse";break;case Gr.HIGHLIGHT:g="commit-highlight";break;case Gr.MERGE:g="commit-merge";break;case Gr.CHERRY_PICK:g="commit-cherry-pick";break;default:g="commit-normal"}if(_===Gr.HIGHLIGHT){const k=n.append("rect");k.attr("x",p-10),k.attr("y",f-10),k.attr("height",20),k.attr("width",20),k.attr("class",`commit ${d.id} commit-highlight${Pr[d.branch].index%cs} ${g}-outer`),n.append("rect").attr("x",p-6).attr("y",f-6).attr("height",12).attr("width",12).attr("class",`commit ${d.id} commit${Pr[d.branch].index%cs} ${g}-inner`)}else if(_===Gr.CHERRY_PICK)n.append("circle").attr("cx",p).attr("cy",f).attr("r",10).attr("class",`commit ${d.id} ${g}`),n.append("circle").attr("cx",p-3).attr("cy",f+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${d.id} ${g}`),n.append("circle").attr("cx",p+3).attr("cy",f+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${d.id} ${g}`),n.append("line").attr("x1",p+3).attr("y1",f+1).attr("x2",p).attr("y2",f-5).attr("stroke","#fff").attr("class",`commit ${d.id} ${g}`),n.append("line").attr("x1",p-3).attr("y1",f+1).attr("x2",p).attr("y2",f-5).attr("stroke","#fff").attr("class",`commit ${d.id} ${g}`);else{const k=n.append("circle");if(k.attr("cx",p),k.attr("cy",f),k.attr("r",d.type===Gr.MERGE?9:10),k.attr("class",`commit ${d.id} commit${Pr[d.branch].index%cs}`),_===Gr.MERGE){const w=n.append("circle");w.attr("cx",p),w.attr("cy",f),w.attr("r",6),w.attr("class",`commit ${g} ${d.id} commit${Pr[d.branch].index%cs}`)}_===Gr.REVERSE&&n.append("path").attr("d",`M ${p-5},${f-5}L${p+5},${f+5}M${p-5},${f+5}L${p+5},${f-5}`).attr("class",`commit ${g} ${d.id} commit${Pr[d.branch].index%cs}`)}}if(Lc[d.id]={x:a+10,y:f},r){if(d.type!==Gr.CHERRY_PICK&&(d.customId&&d.type===Gr.MERGE||d.type!==Gr.MERGE)&&i.showCommitLabel){const k=s.append("g"),w=k.insert("rect").attr("class","commit-label-bkg"),S=k.append("text").attr("x",a).attr("y",f+25).attr("class","commit-label").text(d.id);let A=S.node().getBBox();if(w.attr("x",a+10-A.width/2-2).attr("y",f+13.5).attr("width",A.width+2*2).attr("height",A.height+2*2),S.attr("x",a+10-A.width/2),i.rotateCommitLabel){let O=-7.5-(A.width+10)/25*9.5,P=10+A.width/25*8.5;k.attr("transform","translate("+O+", "+P+") rotate("+-45+", "+a+", "+f+")")}}if(d.tag){const k=s.insert("polygon"),w=s.append("circle"),S=s.append("text").attr("y",f-16).attr("class","tag-label").text(d.tag);let A=S.node().getBBox();S.attr("x",a+10-A.width/2);const O=A.height/2,P=f-19.2;k.attr("class","tag-label-bkg").attr("points",`
|
|
1142
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var M=this.next();return M||this.lex()},begin:function(M){this.conditionStack.push(M)},popState:function(){var M=this.conditionStack.length-1;return M>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(M){return M=this.conditionStack.length-1-Math.abs(M||0),M>=0?this.conditionStack[M]:"INITIAL"},pushState:function(M){this.begin(M)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(M,C,v,D){switch(v){case 0:return this.begin("open_directive"),50;case 1:return this.begin("type_directive"),51;case 2:return this.popState(),this.begin("arg_directive"),9;case 3:return this.popState(),this.popState(),53;case 4:return 52;case 5:return this.begin("acc_title"),20;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),22;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:return 14;case 13:break;case 14:break;case 15:return 6;case 16:return 40;case 17:return 33;case 18:return 38;case 19:return 42;case 20:return 43;case 21:return 44;case 22:return 45;case 23:return 35;case 24:return 29;case 25:return 30;case 26:return 37;case 27:return 32;case 28:return 27;case 29:return 10;case 30:return 10;case 31:return 9;case 32:return"CARET";case 33:this.begin("options");break;case 34:this.popState();break;case 35:return 13;case 36:return 36;case 37:this.begin("string");break;case 38:this.popState();break;case 39:return 34;case 40:return 31;case 41:return 54;case 42:return 8}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit(?=\s|$))/i,/^(?:id:)/i,/^(?:type:)/i,/^(?:msg:)/i,/^(?:NORMAL\b)/i,/^(?:REVERSE\b)/i,/^(?:HIGHLIGHT\b)/i,/^(?:tag:)/i,/^(?:branch(?=\s|$))/i,/^(?:order:)/i,/^(?:merge(?=\s|$))/i,/^(?:cherry-pick(?=\s|$))/i,/^(?:checkout(?=\s|$))/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:[ \r\n\t]+end\b)/i,/^(?:[\s\S]+(?=[ \r\n\t]+end))/i,/^(?:["]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[0-9]+(?=\s|$))/i,/^(?:\w([-\./\w]*[-\w])?)/i,/^(?:$)/i,/^(?:\s+)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},options:{rules:[34,35],inclusive:!1},string:{rules:[38,39],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,36,37,40,41,42,43],inclusive:!0}}};return H}();W.lexer=q;function z(){this.yy={}}return z.prototype=W,W.Parser=z,new z}();y1.parser=y1;const EN=y1,CN=t=>t.match(/^\s*gitGraph/)!==null;let I0="",Eu="",O0="";const R0=t=>vi(t,$()),Ci=function(){I0="",O0="",Eu=""},ii=function(t){I0=R0(t).replace(/^\s+/g,"")},Si=function(){return I0||Eu},Ai=function(t){O0=R0(t).replace(/\n\s+/g,`
|
|
1143
|
+
`)},Li=function(){return O0},Cn=function(t){Eu=R0(t)},Sn=function(){return Eu};let Ac=$().gitGraph.mainBranchName,SN=$().gitGraph.mainBranchOrder,ur={},Mr=null,Lo={};Lo[Ac]={name:Ac,order:SN};let ir={};ir[Ac]=Mr;let fr=Ac,Em="LR",ks=0;function F0(){return am({length:7})}const AN=function(t,e,r){ze.parseDirective(this,t,e,r)};function LN(t,e){const r=Object.create(null);return t.reduce((i,n)=>{const s=e(n);return r[s]||(r[s]=!0,i.push(n)),i},[])}const DN=function(t){Em=t};let Cm={};const MN=function(t){B.debug("options str",t),t=t&&t.trim(),t=t||"{}";try{Cm=JSON.parse(t)}catch(e){B.error("error while parsing gitGraph options",e.message)}},NN=function(){return Cm},BN=function(t,e,r,i){B.debug("Entering commit:",t,e,r,i),e=he.sanitizeText(e,$()),t=he.sanitizeText(t,$()),i=he.sanitizeText(i,$());const n={id:e||ks+"-"+F0(),message:t,seq:ks++,type:r||Do.NORMAL,tag:i||"",parents:Mr==null?[]:[Mr.id],branch:fr};Mr=n,ur[n.id]=n,ir[fr]=n.id,B.debug("in pushCommit "+n.id)},IN=function(t,e){if(t=he.sanitizeText(t,$()),ir[t]===void 0)ir[t]=Mr!=null?Mr.id:null,Lo[t]={name:t,order:e?parseInt(e,10):null},Sm(t),B.debug("in createBranch");else{let r=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+'")');throw r.hash={text:"branch "+t,token:"branch "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+t+'"']},r}},ON=function(t,e,r,i){t=he.sanitizeText(t,$()),e=he.sanitizeText(e,$());const n=ur[ir[fr]],s=ur[ir[t]];if(fr===t){let o=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},o}else if(n===void 0||!n){let o=new Error('Incorrect usage of "merge". Current branch ('+fr+")has no commits");throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["commit"]},o}else if(ir[t]===void 0){let o=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch "+t]},o}else if(s===void 0||!s){let o=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"commit"']},o}else if(n===s){let o=new Error('Incorrect usage of "merge". Both branches have same head');throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},o}else if(e&&ur[e]!==void 0){let o=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom Id");throw o.hash={text:"merge "+t+e+r+i,token:"merge "+t+e+r+i,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["merge "+t+" "+e+"_UNIQUE "+r+" "+i]},o}const a={id:e||ks+"-"+F0(),message:"merged branch "+t+" into "+fr,seq:ks++,parents:[Mr==null?null:Mr.id,ir[t]],branch:fr,type:Do.MERGE,customType:r,customId:!!e,tag:i||""};Mr=a,ur[a.id]=a,ir[fr]=a.id,B.debug(ir),B.debug("in mergeBranch")},RN=function(t,e,r){if(B.debug("Entering cherryPick:",t,e,r),t=he.sanitizeText(t,$()),e=he.sanitizeText(e,$()),r=he.sanitizeText(r,$()),!t||ur[t]===void 0){let s=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw s.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},s}let i=ur[t],n=i.branch;if(i.type===Do.MERGE){let s=new Error('Incorrect usage of "cherryPick". Source commit should not be a merge commit');throw s.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},s}if(!e||ur[e]===void 0){if(n===fr){let o=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw o.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},o}const s=ur[ir[fr]];if(s===void 0||!s){let o=new Error('Incorrect usage of "cherry-pick". Current branch ('+fr+")has no commits");throw o.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},o}const a={id:ks+"-"+F0(),message:"cherry-picked "+i+" into "+fr,seq:ks++,parents:[Mr==null?null:Mr.id,i.id],branch:fr,type:Do.CHERRY_PICK,tag:r??"cherry-pick:"+i.id};Mr=a,ur[a.id]=a,ir[fr]=a.id,B.debug(ir),B.debug("in cherryPick")}},Sm=function(t){if(t=he.sanitizeText(t,$()),ir[t]===void 0){let e=new Error('Trying to checkout branch which is not yet created. (Help try using "branch '+t+'")');throw e.hash={text:"checkout "+t,token:"checkout "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"branch '+t+'"']},e}else{fr=t;const e=ir[fr];Mr=ur[e]}};function I2(t,e,r){const i=t.indexOf(e);i===-1?t.push(r):t.splice(i,1,r)}function Am(t){const e=t.reduce((n,s)=>n.seq>s.seq?n:s,t[0]);let r="";t.forEach(function(n){n===e?r+=" *":r+=" |"});const i=[r,e.id,e.seq];for(let n in ir)ir[n]===e.id&&i.push(n);if(B.debug(i.join(" ")),e.parents&&e.parents.length==2){const n=ur[e.parents[0]];I2(t,e,n),t.push(ur[e.parents[1]])}else{if(e.parents.length==0)return;{const n=ur[e.parents];I2(t,e,n)}}t=LN(t,n=>n.id),Am(t)}const FN=function(){B.debug(ur);const t=Lm()[0];Am([t])},PN=function(){ur={},Mr=null;let t=$().gitGraph.mainBranchName,e=$().gitGraph.mainBranchOrder;ir={},ir[t]=null,Lo={},Lo[t]={name:t,order:e},fr=t,ks=0,Ci()},YN=function(){return Object.values(Lo).map((e,r)=>e.order!==null?e:{...e,order:parseFloat(`0.${r}`,10)}).sort((e,r)=>e.order-r.order).map(({name:e})=>({name:e}))},VN=function(){return ir},UN=function(){return ur},Lm=function(){const t=Object.keys(ur).map(function(e){return ur[e]});return t.forEach(function(e){B.debug(e.id)}),t.sort((e,r)=>e.seq-r.seq),t},zN=function(){return fr},WN=function(){return Em},HN=function(){return Mr},Do={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},GN={parseDirective:AN,getConfig:()=>$().gitGraph,setDirection:DN,setOptions:MN,getOptions:NN,commit:BN,branch:IN,merge:ON,cherryPick:RN,checkout:Sm,prettyPrint:FN,clear:PN,getBranchesAsObjArray:YN,getBranches:VN,getCommits:UN,getCommitsArray:Lm,getCurrentBranch:zN,getDirection:WN,getHead:HN,setAccTitle:ii,getAccTitle:Si,getAccDescription:Li,setAccDescription:Ai,setDiagramTitle:Cn,getDiagramTitle:Sn,commitType:Do};let Ka={};const Gr={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},cs=8;let Pr={},Lc={},Dc=[],Mc=0;const qN=()=>{Pr={},Lc={},Ka={},Mc=0,Dc=[]},jN=t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","text");let r=[];typeof t=="string"?r=t.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(t)?r=t:r=[];for(const i of r){const n=document.createElementNS("http://www.w3.org/2000/svg","tspan");n.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),n.setAttribute("dy","1em"),n.setAttribute("x","0"),n.setAttribute("class","row"),n.textContent=i.trim(),e.appendChild(n)}return e},O2=(t,e,r)=>{const i=$o().gitGraph,n=t.append("g").attr("class","commit-bullets"),s=t.append("g").attr("class","commit-labels");let a=0;Object.keys(e).sort((u,d)=>e[u].seq-e[d].seq).forEach(u=>{const d=e[u],f=Pr[d.branch].pos,p=a+10;if(r){let g,_=d.customType!==void 0&&d.customType!==""?d.customType:d.type;switch(_){case Gr.NORMAL:g="commit-normal";break;case Gr.REVERSE:g="commit-reverse";break;case Gr.HIGHLIGHT:g="commit-highlight";break;case Gr.MERGE:g="commit-merge";break;case Gr.CHERRY_PICK:g="commit-cherry-pick";break;default:g="commit-normal"}if(_===Gr.HIGHLIGHT){const k=n.append("rect");k.attr("x",p-10),k.attr("y",f-10),k.attr("height",20),k.attr("width",20),k.attr("class",`commit ${d.id} commit-highlight${Pr[d.branch].index%cs} ${g}-outer`),n.append("rect").attr("x",p-6).attr("y",f-6).attr("height",12).attr("width",12).attr("class",`commit ${d.id} commit${Pr[d.branch].index%cs} ${g}-inner`)}else if(_===Gr.CHERRY_PICK)n.append("circle").attr("cx",p).attr("cy",f).attr("r",10).attr("class",`commit ${d.id} ${g}`),n.append("circle").attr("cx",p-3).attr("cy",f+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${d.id} ${g}`),n.append("circle").attr("cx",p+3).attr("cy",f+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${d.id} ${g}`),n.append("line").attr("x1",p+3).attr("y1",f+1).attr("x2",p).attr("y2",f-5).attr("stroke","#fff").attr("class",`commit ${d.id} ${g}`),n.append("line").attr("x1",p-3).attr("y1",f+1).attr("x2",p).attr("y2",f-5).attr("stroke","#fff").attr("class",`commit ${d.id} ${g}`);else{const k=n.append("circle");if(k.attr("cx",p),k.attr("cy",f),k.attr("r",d.type===Gr.MERGE?9:10),k.attr("class",`commit ${d.id} commit${Pr[d.branch].index%cs}`),_===Gr.MERGE){const w=n.append("circle");w.attr("cx",p),w.attr("cy",f),w.attr("r",6),w.attr("class",`commit ${g} ${d.id} commit${Pr[d.branch].index%cs}`)}_===Gr.REVERSE&&n.append("path").attr("d",`M ${p-5},${f-5}L${p+5},${f+5}M${p-5},${f+5}L${p+5},${f-5}`).attr("class",`commit ${g} ${d.id} commit${Pr[d.branch].index%cs}`)}}if(Lc[d.id]={x:a+10,y:f},r){if(d.type!==Gr.CHERRY_PICK&&(d.customId&&d.type===Gr.MERGE||d.type!==Gr.MERGE)&&i.showCommitLabel){const k=s.append("g"),w=k.insert("rect").attr("class","commit-label-bkg"),S=k.append("text").attr("x",a).attr("y",f+25).attr("class","commit-label").text(d.id);let A=S.node().getBBox();if(w.attr("x",a+10-A.width/2-2).attr("y",f+13.5).attr("width",A.width+2*2).attr("height",A.height+2*2),S.attr("x",a+10-A.width/2),i.rotateCommitLabel){let O=-7.5-(A.width+10)/25*9.5,P=10+A.width/25*8.5;k.attr("transform","translate("+O+", "+P+") rotate("+-45+", "+a+", "+f+")")}}if(d.tag){const k=s.insert("polygon"),w=s.append("circle"),S=s.append("text").attr("y",f-16).attr("class","tag-label").text(d.tag);let A=S.node().getBBox();S.attr("x",a+10-A.width/2);const O=A.height/2,P=f-19.2;k.attr("class","tag-label-bkg").attr("points",`
|
|
1144
1144
|
${a-A.width/2-4/2},${P+2}
|
|
1145
1145
|
${a-A.width/2-4/2},${P-2}
|
|
1146
1146
|
${a+10-A.width/2-4},${P-O-2}
|
|
1147
1147
|
${a+10+A.width/2+4},${P-O-2}
|
|
1148
1148
|
${a+10+A.width/2+4},${P+O+2}
|
|
1149
|
-
${a+10-A.width/2-4},${P+O+2}`),w.attr("cx",a-A.width/2+4/2).attr("cy",P).attr("r",1.5).attr("class","tag-hole")}}a+=50,a>Mc&&(Mc=a)})},$N=(t,e,r)=>Object.keys(r).filter(s=>r[s].branch===e.branch&&r[s].seq>t.seq&&r[s].seq<e.seq).length>0,
|
|
1149
|
+
${a+10-A.width/2-4},${P+O+2}`),w.attr("cx",a-A.width/2+4/2).attr("cy",P).attr("r",1.5).attr("class","tag-hole")}}a+=50,a>Mc&&(Mc=a)})},$N=(t,e,r)=>Object.keys(r).filter(s=>r[s].branch===e.branch&&r[s].seq>t.seq&&r[s].seq<e.seq).length>0,m1=(t,e,r=0)=>{const i=t+Math.abs(t-e)/2;if(r>5)return i;if(Dc.every(a=>Math.abs(a-i)>=10))return Dc.push(i),i;const s=Math.abs(t-e);return m1(t,e-s/5,r+1)},XN=(t,e,r,i)=>{const n=Lc[e.id],s=Lc[r.id],a=$N(e,r,i);let o="",l="",u=0,d=0,f=Pr[r.branch].index,p;if(a){o="A 10 10, 0, 0, 0,",l="A 10 10, 0, 0, 1,",u=10,d=10,f=Pr[r.branch].index;const g=n.y<s.y?m1(n.y,s.y):m1(s.y,n.y);n.y<s.y?p=`M ${n.x} ${n.y} L ${n.x} ${g-u} ${o} ${n.x+d} ${g} L ${s.x-u} ${g} ${l} ${s.x} ${g+d} L ${s.x} ${s.y}`:p=`M ${n.x} ${n.y} L ${n.x} ${g+u} ${l} ${n.x+d} ${g} L ${s.x-u} ${g} ${o} ${s.x} ${g-d} L ${s.x} ${s.y}`}else n.y<s.y&&(o="A 20 20, 0, 0, 0,",u=20,d=20,f=Pr[r.branch].index,p=`M ${n.x} ${n.y} L ${n.x} ${s.y-u} ${o} ${n.x+d} ${s.y} L ${s.x} ${s.y}`),n.y>s.y&&(o="A 20 20, 0, 0, 0,",u=20,d=20,f=Pr[e.branch].index,p=`M ${n.x} ${n.y} L ${s.x-u} ${n.y} ${o} ${s.x} ${n.y-d} L ${s.x} ${s.y}`),n.y===s.y&&(f=Pr[e.branch].index,p=`M ${n.x} ${n.y} L ${n.x} ${s.y-u} ${o} ${n.x+d} ${s.y} L ${s.x} ${s.y}`);t.append("path").attr("d",p).attr("class","arrow arrow"+f%cs)},KN=(t,e)=>{const r=t.append("g").attr("class","commit-arrows");Object.keys(e).forEach(i=>{const n=e[i];n.parents&&n.parents.length>0&&n.parents.forEach(s=>{XN(r,e[s],n,e)})})},ZN=(t,e)=>{const r=$o().gitGraph,i=t.append("g");e.forEach((n,s)=>{const a=s%cs,o=Pr[n.name].pos,l=i.append("line");l.attr("x1",0),l.attr("y1",o),l.attr("x2",Mc),l.attr("y2",o),l.attr("class","branch branch"+a),Dc.push(o);let u=n.name;const d=jN(u),f=i.insert("rect"),g=i.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+a);g.node().appendChild(d);let _=d.getBBox();f.attr("class","branchLabelBkg label"+a).attr("rx",4).attr("ry",4).attr("x",-_.width-4-(r.rotateCommitLabel===!0?30:0)).attr("y",-_.height/2+8).attr("width",_.width+18).attr("height",_.height+4),g.attr("transform","translate("+(-_.width-14-(r.rotateCommitLabel===!0?30:0))+", "+(o-_.height/2-1)+")"),f.attr("transform","translate("+-19+", "+(o-_.height/2)+")")})},QN=function(t,e,r,i){var n;qN();const s=$o(),a=s.gitGraph;B.debug("in gitgraph renderer",t+`
|
|
1150
1150
|
`,"id:",e,r),Ka=i.db.getCommits();const o=i.db.getBranchesAsObjArray();let l=0;o.forEach((d,f)=>{Pr[d.name]={pos:l,index:f},l+=50+(a.rotateCommitLabel?40:0)});const u=At(`[id="${e}"]`);O2(u,Ka,!1),a.showBranches&&ZN(u,o),KN(u,Ka),O2(u,Ka,!0),ye.insertTitle(u,"gitTitleText",a.titleTopMargin,i.db.getDiagramTitle()),wm(void 0,u,a.diagramPadding,(n=a.useMaxWidth)!=null?n:s.useMaxWidth)},JN={draw:QN},tB=t=>`
|
|
1151
1151
|
.commit-id,
|
|
1152
1152
|
.commit-msg,
|
|
@@ -1204,93 +1204,93 @@ Expecting `+ht.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":V="Parse error o
|
|
|
1204
1204
|
Expecting `+tr.join(", ")+", got '"+(this.terminals_[De]||De)+"'":zt="Parse error on line "+(ee+1)+": Unexpected "+(De==be?"end of input":"'"+(this.terminals_[De]||De)+"'"),this.parseError(zt,{text:$t.match,token:this.terminals_[De]||De,line:$t.yylineno,loc:Qt,expected:tr})}if(Be[0]instanceof Array&&Be.length>1)throw new Error("Parse Error: multiple actions possible at state: "+ae+", token: "+De);switch(Be[0]){case 1:Lt.push(De),Ut.push($t.yytext),at.push($t.yylloc),Lt.push(Be[1]),De=null,de=$t.yyleng,dt=$t.yytext,ee=$t.yylineno,Qt=$t.yylloc;break;case 2:if(Ie=this.productions_[Be[1]][1],Fe.$=Ut[Ut.length-Ie],Fe._$={first_line:at[at.length-(Ie||1)].first_line,last_line:at[at.length-1].last_line,first_column:at[at.length-(Ie||1)].first_column,last_column:at[at.length-1].last_column},ni&&(Fe._$.range=[at[at.length-(Ie||1)].range[0],at[at.length-1].range[1]]),Oe=this.performAction.apply(Fe,[dt,de,ee,ne.yy,Be[1],Ut,at].concat(ke)),typeof Oe<"u")return Oe;Ie&&(Lt=Lt.slice(0,-1*Ie*2),Ut=Ut.slice(0,-1*Ie),at=at.slice(0,-1*Ie)),Lt.push(this.productions_[Be[1]][0]),Ut.push(Fe.$),at.push(Fe._$),Ge=ie[Lt[Lt.length-2]][Lt[Lt.length-1]],Lt.push(Ge);break;case 3:return!0}}return!0}},Ht=function(){var Ft={EOF:1,parseError:function(ft,Lt){if(this.yy.parser)this.yy.parser.parseError(ft,Lt);else throw new Error(ft)},setInput:function(xt,ft){return this.yy=ft||this.yy||{},this._input=xt,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var xt=this._input[0];this.yytext+=xt,this.yyleng++,this.offset++,this.match+=xt,this.matched+=xt;var ft=xt.match(/(?:\r\n?|\n).*/g);return ft?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),xt},unput:function(xt){var ft=xt.length,Lt=xt.split(/(?:\r\n?|\n)/g);this._input=xt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-ft),this.offset-=ft;var _t=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Lt.length-1&&(this.yylineno-=Lt.length-1);var Ut=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Lt?(Lt.length===_t.length?this.yylloc.first_column:0)+_t[_t.length-Lt.length].length-Lt[0].length:this.yylloc.first_column-ft},this.options.ranges&&(this.yylloc.range=[Ut[0],Ut[0]+this.yyleng-ft]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
1205
1205
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(xt){this.unput(this.match.slice(xt))},pastInput:function(){var xt=this.matched.substr(0,this.matched.length-this.match.length);return(xt.length>20?"...":"")+xt.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var xt=this.match;return xt.length<20&&(xt+=this._input.substr(0,20-xt.length)),(xt.substr(0,20)+(xt.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var xt=this.pastInput(),ft=new Array(xt.length+1).join("-");return xt+this.upcomingInput()+`
|
|
1206
1206
|
`+ft+"^"},test_match:function(xt,ft){var Lt,_t,Ut;if(this.options.backtrack_lexer&&(Ut={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Ut.yylloc.range=this.yylloc.range.slice(0))),_t=xt[0].match(/(?:\r\n?|\n).*/g),_t&&(this.yylineno+=_t.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:_t?_t[_t.length-1].length-_t[_t.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+xt[0].length},this.yytext+=xt[0],this.match+=xt[0],this.matches=xt,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(xt[0].length),this.matched+=xt[0],Lt=this.performAction.call(this,this.yy,this,ft,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Lt)return Lt;if(this._backtrack){for(var at in Ut)this[at]=Ut[at];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var xt,ft,Lt,_t;this._more||(this.yytext="",this.match="");for(var Ut=this._currentRules(),at=0;at<Ut.length;at++)if(Lt=this._input.match(this.rules[Ut[at]]),Lt&&(!ft||Lt[0].length>ft[0].length)){if(ft=Lt,_t=at,this.options.backtrack_lexer){if(xt=this.test_match(Lt,Ut[at]),xt!==!1)return xt;if(this._backtrack){ft=!1;continue}else return!1}else if(!this.options.flex)break}return ft?(xt=this.test_match(ft,Ut[_t]),xt!==!1?xt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1207
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var ft=this.next();return ft||this.lex()},begin:function(ft){this.conditionStack.push(ft)},popState:function(){var ft=this.conditionStack.length-1;return ft>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(ft){return ft=this.conditionStack.length-1-Math.abs(ft||0),ft>=0?this.conditionStack[ft]:"INITIAL"},pushState:function(ft){this.begin(ft)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(ft,Lt,_t,Ut){switch(_t){case 0:return this.begin("open_directive"),18;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 10;case 5:return this.begin("type_directive"),19;case 6:return this.popState(),this.begin("arg_directive"),16;case 7:return this.popState(),this.popState(),21;case 8:return 20;case 9:return 32;case 10:return 33;case 11:return this.begin("acc_title"),34;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),36;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:break;case 19:c;break;case 20:return 15;case 21:break;case 22:return 22;case 23:return 25;case 24:return 26;case 25:return 27;case 26:return 28;case 27:return this.begin("person_ext"),55;case 28:return this.begin("person"),54;case 29:return this.begin("system_ext_queue"),61;case 30:return this.begin("system_ext_db"),60;case 31:return this.begin("system_ext"),59;case 32:return this.begin("system_queue"),58;case 33:return this.begin("system_db"),57;case 34:return this.begin("system"),56;case 35:return this.begin("boundary"),47;case 36:return this.begin("enterprise_boundary"),44;case 37:return this.begin("system_boundary"),46;case 38:return this.begin("container_ext_queue"),67;case 39:return this.begin("container_ext_db"),66;case 40:return this.begin("container_ext"),65;case 41:return this.begin("container_queue"),64;case 42:return this.begin("container_db"),63;case 43:return this.begin("container"),62;case 44:return this.begin("container_boundary"),48;case 45:return this.begin("component_ext_queue"),73;case 46:return this.begin("component_ext_db"),72;case 47:return this.begin("component_ext"),71;case 48:return this.begin("component_queue"),70;case 49:return this.begin("component_db"),69;case 50:return this.begin("component"),68;case 51:return this.begin("node"),49;case 52:return this.begin("node"),49;case 53:return this.begin("node_l"),50;case 54:return this.begin("node_r"),51;case 55:return this.begin("rel"),74;case 56:return this.begin("birel"),75;case 57:return this.begin("rel_u"),76;case 58:return this.begin("rel_u"),76;case 59:return this.begin("rel_d"),77;case 60:return this.begin("rel_d"),77;case 61:return this.begin("rel_l"),78;case 62:return this.begin("rel_l"),78;case 63:return this.begin("rel_r"),79;case 64:return this.begin("rel_r"),79;case 65:return this.begin("rel_b"),80;case 66:return this.begin("rel_index"),81;case 67:return this.begin("update_el_style"),82;case 68:return this.begin("update_rel_style"),83;case 69:return this.begin("update_layout_config"),84;case 70:return"EOF_IN_STRUCT";case 71:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 72:this.begin("attribute");break;case 73:this.popState(),this.popState();break;case 74:return 90;case 75:break;case 76:return 90;case 77:this.begin("string");break;case 78:this.popState();break;case 79:return"STR";case 80:this.begin("string_kv");break;case 81:return this.begin("string_kv_key"),"STR_KEY";case 82:this.popState(),this.begin("string_kv_value");break;case 83:return"STR_VALUE";case 84:this.popState(),this.popState();break;case 85:return"STR";case 86:return"LBRACE";case 87:return"RBRACE";case 88:return"SPACE";case 89:return"EOL";case 90:return 24}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},string_kv_value:{rules:[83,84],inclusive:!1},string_kv_key:{rules:[82],inclusive:!1},string_kv:{rules:[81],inclusive:!1},string:{rules:[78,79],inclusive:!1},attribute:{rules:[73,74,75,76,77,80,85],inclusive:!1},update_layout_config:{rules:[70,71,72,73],inclusive:!1},update_rel_style:{rules:[70,71,72,73],inclusive:!1},update_el_style:{rules:[70,71,72,73],inclusive:!1},rel_b:{rules:[70,71,72,73],inclusive:!1},rel_r:{rules:[70,71,72,73],inclusive:!1},rel_l:{rules:[70,71,72,73],inclusive:!1},rel_d:{rules:[70,71,72,73],inclusive:!1},rel_u:{rules:[70,71,72,73],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[70,71,72,73],inclusive:!1},node_r:{rules:[70,71,72,73],inclusive:!1},node_l:{rules:[70,71,72,73],inclusive:!1},node:{rules:[70,71,72,73],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[70,71,72,73],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[70,71,72,73],inclusive:!1},component_ext:{rules:[70,71,72,73],inclusive:!1},component_queue:{rules:[70,71,72,73],inclusive:!1},component_db:{rules:[70,71,72,73],inclusive:!1},component:{rules:[70,71,72,73],inclusive:!1},container_boundary:{rules:[70,71,72,73],inclusive:!1},container_ext_queue:{rules:[],inclusive:!1},container_ext_db:{rules:[70,71,72,73],inclusive:!1},container_ext:{rules:[70,71,72,73],inclusive:!1},container_queue:{rules:[70,71,72,73],inclusive:!1},container_db:{rules:[70,71,72,73],inclusive:!1},container:{rules:[70,71,72,73],inclusive:!1},birel:{rules:[70,71,72,73],inclusive:!1},system_boundary:{rules:[70,71,72,73],inclusive:!1},enterprise_boundary:{rules:[70,71,72,73],inclusive:!1},boundary:{rules:[70,71,72,73],inclusive:!1},system_ext_queue:{rules:[70,71,72,73],inclusive:!1},system_ext_db:{rules:[70,71,72,73],inclusive:!1},system_ext:{rules:[70,71,72,73],inclusive:!1},system_queue:{rules:[70,71,72,73],inclusive:!1},system_db:{rules:[70,71,72,73],inclusive:!1},system:{rules:[70,71,72,73],inclusive:!1},person_ext:{rules:[70,71,72,73],inclusive:!1},person:{rules:[70,71,72,73],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,86,87,88,89,90],inclusive:!0}}};return Ft}();Ee.lexer=Ht;function Vt(){this.yy={}}return Vt.prototype=Ee,Ee.Parser=Vt,new Vt}();Nc.parser=Nc;const rB=Nc,iB=t=>t.match(/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/)!==null;let ki=[],Wn=[""],Nr="global",mi="",Wi=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Mo=[],F0="",P0=!1,Bc=4,Ic=2;var Dm;const nB=function(){return Dm},sB=function(t){Dm=vi(t,$())},aB=function(t,e,r){ze.parseDirective(this,t,e,r)},oB=function(t,e,r,i,n,s,a,o,l){if(t==null||e===void 0||e===null||r===void 0||r===null||i===void 0||i===null)return;let u={};const d=Mo.find(f=>f.from===e&&f.to===r);if(d?u=d:Mo.push(u),u.type=t,u.from=e,u.to=r,u.label={text:i},n==null)u.techn={text:""};else if(typeof n=="object"){let[f,p]=Object.entries(n)[0];u[f]={text:p}}else u.techn={text:n};if(s==null)u.descr={text:""};else if(typeof s=="object"){let[f,p]=Object.entries(s)[0];u[f]={text:p}}else u.descr={text:s};if(typeof a=="object"){let[f,p]=Object.entries(a)[0];u[f]=p}else u.sprite=a;if(typeof o=="object"){let[f,p]=Object.entries(o)[0];u[f]=p}else u.tags=o;if(typeof l=="object"){let[f,p]=Object.entries(l)[0];u[f]=p}else u.link=l;u.wrap=Kn()},lB=function(t,e,r,i,n,s,a){if(e===null||r===null)return;let o={};const l=ki.find(u=>u.alias===e);if(l&&e===l.alias?o=l:(o.alias=e,ki.push(o)),r==null?o.label={text:""}:o.label={text:r},i==null)o.descr={text:""};else if(typeof i=="object"){let[u,d]=Object.entries(i)[0];o[u]={text:d}}else o.descr={text:i};if(typeof n=="object"){let[u,d]=Object.entries(n)[0];o[u]=d}else o.sprite=n;if(typeof s=="object"){let[u,d]=Object.entries(s)[0];o[u]=d}else o.tags=s;if(typeof a=="object"){let[u,d]=Object.entries(a)[0];o[u]=d}else o.link=a;o.typeC4Shape={text:t},o.parentBoundary=Nr,o.wrap=Kn()},cB=function(t,e,r,i,n,s,a,o){if(e===null||r===null)return;let l={};const u=ki.find(d=>d.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,ki.push(l)),r==null?l.label={text:""}:l.label={text:r},i==null)l.techn={text:""};else if(typeof i=="object"){let[d,f]=Object.entries(i)[0];l[d]={text:f}}else l.techn={text:i};if(n==null)l.descr={text:""};else if(typeof n=="object"){let[d,f]=Object.entries(n)[0];l[d]={text:f}}else l.descr={text:n};if(typeof s=="object"){let[d,f]=Object.entries(s)[0];l[d]=f}else l.sprite=s;if(typeof a=="object"){let[d,f]=Object.entries(a)[0];l[d]=f}else l.tags=a;if(typeof o=="object"){let[d,f]=Object.entries(o)[0];l[d]=f}else l.link=o;l.wrap=Kn(),l.typeC4Shape={text:t},l.parentBoundary=Nr},uB=function(t,e,r,i,n,s,a,o){if(e===null||r===null)return;let l={};const u=ki.find(d=>d.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,ki.push(l)),r==null?l.label={text:""}:l.label={text:r},i==null)l.techn={text:""};else if(typeof i=="object"){let[d,f]=Object.entries(i)[0];l[d]={text:f}}else l.techn={text:i};if(n==null)l.descr={text:""};else if(typeof n=="object"){let[d,f]=Object.entries(n)[0];l[d]={text:f}}else l.descr={text:n};if(typeof s=="object"){let[d,f]=Object.entries(s)[0];l[d]=f}else l.sprite=s;if(typeof a=="object"){let[d,f]=Object.entries(a)[0];l[d]=f}else l.tags=a;if(typeof o=="object"){let[d,f]=Object.entries(o)[0];l[d]=f}else l.link=o;l.wrap=Kn(),l.typeC4Shape={text:t},l.parentBoundary=Nr},hB=function(t,e,r,i,n){if(t===null||e===null)return;let s={};const a=Wi.find(o=>o.alias===t);if(a&&t===a.alias?s=a:(s.alias=t,Wi.push(s)),e==null?s.label={text:""}:s.label={text:e},r==null)s.type={text:"system"};else if(typeof r=="object"){let[o,l]=Object.entries(r)[0];s[o]={text:l}}else s.type={text:r};if(typeof i=="object"){let[o,l]=Object.entries(i)[0];s[o]=l}else s.tags=i;if(typeof n=="object"){let[o,l]=Object.entries(n)[0];s[o]=l}else s.link=n;s.parentBoundary=Nr,s.wrap=Kn(),mi=Nr,Nr=t,Wn.push(mi)},dB=function(t,e,r,i,n){if(t===null||e===null)return;let s={};const a=Wi.find(o=>o.alias===t);if(a&&t===a.alias?s=a:(s.alias=t,Wi.push(s)),e==null?s.label={text:""}:s.label={text:e},r==null)s.type={text:"container"};else if(typeof r=="object"){let[o,l]=Object.entries(r)[0];s[o]={text:l}}else s.type={text:r};if(typeof i=="object"){let[o,l]=Object.entries(i)[0];s[o]=l}else s.tags=i;if(typeof n=="object"){let[o,l]=Object.entries(n)[0];s[o]=l}else s.link=n;s.parentBoundary=Nr,s.wrap=Kn(),mi=Nr,Nr=t,Wn.push(mi)},fB=function(t,e,r,i,n,s,a,o){if(e===null||r===null)return;let l={};const u=Wi.find(d=>d.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,Wi.push(l)),r==null?l.label={text:""}:l.label={text:r},i==null)l.type={text:"node"};else if(typeof i=="object"){let[d,f]=Object.entries(i)[0];l[d]={text:f}}else l.type={text:i};if(n==null)l.descr={text:""};else if(typeof n=="object"){let[d,f]=Object.entries(n)[0];l[d]={text:f}}else l.descr={text:n};if(typeof a=="object"){let[d,f]=Object.entries(a)[0];l[d]=f}else l.tags=a;if(typeof o=="object"){let[d,f]=Object.entries(o)[0];l[d]=f}else l.link=o;l.nodeType=t,l.parentBoundary=Nr,l.wrap=Kn(),mi=Nr,Nr=e,Wn.push(mi)},pB=function(){Nr=mi,Wn.pop(),mi=Wn.pop(),Wn.push(mi)},gB=function(t,e,r,i,n,s,a,o,l,u,d){let f=ki.find(p=>p.alias===e);if(!(f===void 0&&(f=Wi.find(p=>p.alias===e),f===void 0))){if(r!=null)if(typeof r=="object"){let[p,g]=Object.entries(r)[0];f[p]=g}else f.bgColor=r;if(i!=null)if(typeof i=="object"){let[p,g]=Object.entries(i)[0];f[p]=g}else f.fontColor=i;if(n!=null)if(typeof n=="object"){let[p,g]=Object.entries(n)[0];f[p]=g}else f.borderColor=n;if(s!=null)if(typeof s=="object"){let[p,g]=Object.entries(s)[0];f[p]=g}else f.shadowing=s;if(a!=null)if(typeof a=="object"){let[p,g]=Object.entries(a)[0];f[p]=g}else f.shape=a;if(o!=null)if(typeof o=="object"){let[p,g]=Object.entries(o)[0];f[p]=g}else f.sprite=o;if(l!=null)if(typeof l=="object"){let[p,g]=Object.entries(l)[0];f[p]=g}else f.techn=l;if(u!=null)if(typeof u=="object"){let[p,g]=Object.entries(u)[0];f[p]=g}else f.legendText=u;if(d!=null)if(typeof d=="object"){let[p,g]=Object.entries(d)[0];f[p]=g}else f.legendSprite=d}},yB=function(t,e,r,i,n,s,a){const o=Mo.find(l=>l.from===e&&l.to===r);if(o!==void 0){if(i!=null)if(typeof i=="object"){let[l,u]=Object.entries(i)[0];o[l]=u}else o.textColor=i;if(n!=null)if(typeof n=="object"){let[l,u]=Object.entries(n)[0];o[l]=u}else o.lineColor=n;if(s!=null)if(typeof s=="object"){let[l,u]=Object.entries(s)[0];o[l]=parseInt(u)}else o.offsetX=parseInt(s);if(a!=null)if(typeof a=="object"){let[l,u]=Object.entries(a)[0];o[l]=parseInt(u)}else o.offsetY=parseInt(a)}},mB=function(t,e,r){let i=Bc,n=Ic;if(typeof e=="object"){const s=Object.values(e)[0];i=parseInt(s)}else i=parseInt(e);if(typeof r=="object"){const s=Object.values(r)[0];n=parseInt(s)}else n=parseInt(r);i>=1&&(Bc=i),n>=1&&(Ic=n)},bB=function(){return Bc},_B=function(){return Ic},xB=function(){return Nr},vB=function(){return mi},Mm=function(t){return t==null?ki:ki.filter(e=>e.parentBoundary===t)},kB=function(t){return ki.find(e=>e.alias===t)},wB=function(t){return Object.keys(Mm(t))},TB=function(t){return t==null?Wi:Wi.filter(e=>e.parentBoundary===t)},EB=function(){return Mo},CB=function(){return F0},SB=function(t){P0=t},Kn=function(){return P0},AB=function(){ki=[],Wi=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],mi="",Nr="global",Wn=[""],Mo=[],Wn=[""],F0="",P0=!1,Bc=4,Ic=2},LB={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},DB={FILLED:0,OPEN:1},MB={LEFTOF:0,RIGHTOF:1,OVER:2},NB=function(t){F0=vi(t,$())},Nm={addPersonOrSystem:lB,addPersonOrSystemBoundary:hB,addContainer:cB,addContainerBoundary:dB,addComponent:uB,addDeploymentNode:fB,popBoundaryParseStack:pB,addRel:oB,updateElStyle:gB,updateRelStyle:yB,updateLayoutConfig:mB,autoWrap:Kn,setWrap:SB,getC4ShapeArray:Mm,getC4Shape:kB,getC4ShapeKeys:wB,getBoundarys:TB,getCurrentBoundaryParse:xB,getParentBoundaryParse:vB,getRels:EB,getTitle:CB,getC4Type:nB,getC4ShapeInRow:bB,getC4BoundaryInRow:_B,setAccTitle:ii,getAccTitle:Si,getAccDescription:Li,setAccDescription:Ai,parseDirective:aB,getConfig:()=>$().c4,clear:AB,LINETYPE:LB,ARROWTYPE:DB,PLACEMENT:MB,setTitle:NB,setC4Type:sB},Y0=function(t,e){const 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),r.attr("rx",e.rx),r.attr("ry",e.ry),e.attrs!=="undefined"&&e.attrs!==null)for(let i in e.attrs)r.attr(i,e.attrs[i]);return e.class!=="undefined"&&r.attr("class",e.class),r},Bm=function(t,e,r,i,n,s){const a=t.append("image");a.attr("width",e),a.attr("height",r),a.attr("x",i),a.attr("y",n);let o=s.startsWith("data:image/png;base64")?s:wn(s);a.attr("xlink:href",o)},BB=(t,e,r)=>{const i=t.append("g");let n=0;for(let s of e){let a=s.textColor?s.textColor:"#444444",o=s.lineColor?s.lineColor:"#444444",l=s.offsetX?parseInt(s.offsetX):0,u=s.offsetY?parseInt(s.offsetY):0,d="";if(n===0){let p=i.append("line");p.attr("x1",s.startPoint.x),p.attr("y1",s.startPoint.y),p.attr("x2",s.endPoint.x),p.attr("y2",s.endPoint.y),p.attr("stroke-width","1"),p.attr("stroke",o),p.style("fill","none"),s.type!=="rel_b"&&p.attr("marker-end","url("+d+"#arrowhead)"),(s.type==="birel"||s.type==="rel_b")&&p.attr("marker-start","url("+d+"#arrowend)"),n=-1}else{let p=i.append("path");p.attr("fill","none").attr("stroke-width","1").attr("stroke",o).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",s.startPoint.x).replaceAll("starty",s.startPoint.y).replaceAll("controlx",s.startPoint.x+(s.endPoint.x-s.startPoint.x)/2-(s.endPoint.x-s.startPoint.x)/4).replaceAll("controly",s.startPoint.y+(s.endPoint.y-s.startPoint.y)/2).replaceAll("stopx",s.endPoint.x).replaceAll("stopy",s.endPoint.y)),s.type!=="rel_b"&&p.attr("marker-end","url("+d+"#arrowhead)"),(s.type==="birel"||s.type==="rel_b")&&p.attr("marker-start","url("+d+"#arrowend)")}let f=r.messageFont();pn(r)(s.label.text,i,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+l,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+u,s.label.width,s.label.height,{fill:a},f),s.techn&&s.techn.text!==""&&(f=r.messageFont(),pn(r)("["+s.techn.text+"]",i,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+l,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+r.messageFontSize+5+u,Math.max(s.label.width,s.techn.width),s.techn.height,{fill:a,"font-style":"italic"},f))}},IB=function(t,e,r){const i=t.append("g");let n=e.bgColor?e.bgColor:"none",s=e.borderColor?e.borderColor:"#444444",a=e.fontColor?e.fontColor:"black",o={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(o={"stroke-width":1});let l={x:e.x,y:e.y,fill:n,stroke:s,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:o};Y0(i,l);let u=r.boundaryFont();u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=a,pn(r)(e.label.text,i,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},u),e.type&&e.type.text!==""&&(u=r.boundaryFont(),u.fontColor=a,pn(r)(e.type.text,i,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},u)),e.descr&&e.descr.text!==""&&(u=r.boundaryFont(),u.fontSize=u.fontSize-2,u.fontColor=a,pn(r)(e.descr.text,i,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},u))},OB=function(t,e,r){let i=e.bgColor?e.bgColor:r[e.typeC4Shape.text+"_bg_color"],n=e.borderColor?e.borderColor:r[e.typeC4Shape.text+"_border_color"],s=e.fontColor?e.fontColor:"#FFFFFF",a="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":a="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":a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}const o=t.append("g");o.attr("class","person-man");const l=Im();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=i,l.width=e.width,l.height=e.height,l.style="stroke:"+n+";stroke-width:0.5;",l.rx=2.5,l.ry=2.5,Y0(o,l);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":o.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",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",n).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",i).attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",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",n).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2));break}let u=HB(r,e.typeC4Shape.text);switch(o.append("text").attr("fill",s).attr("font-family",u.fontFamily).attr("font-size",u.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":Bm(o,48,48,e.x+e.width/2-24,e.y+e.image.Y,a);break}let d=r[e.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=s,pn(r)(e.label.text,o,e.x,e.y+e.label.Y,e.width,e.height,{fill:s},d),d=r[e.typeC4Shape.text+"Font"](),d.fontColor=s,e.thchn&&e.thchn.text!==""?pn(r)(e.thchn.text,o,e.x,e.y+e.thchn.Y,e.width,e.height,{fill:s,"font-style":"italic"},d):e.type&&e.type.text!==""&&pn(r)(e.type.text,o,e.x,e.y+e.type.Y,e.width,e.height,{fill:s,"font-style":"italic"},d),e.descr&&e.descr.text!==""&&(d=r.personFont(),d.fontColor=s,pn(r)(e.descr.text,o,e.x,e.y+e.descr.Y,e.width,e.height,{fill:s},d)),e.height},RB=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")},FB=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")},PB=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")},YB=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")},VB=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")},UB=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")},zB=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)},WB=function(t){const r=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);r.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),r.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},Im=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},HB=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),pn=function(){function t(n,s,a,o,l,u,d){const f=s.append("text").attr("x",a+l/2).attr("y",o+u/2+5).style("text-anchor","middle").text(n);i(f,d)}function e(n,s,a,o,l,u,d,f){const{fontSize:p,fontFamily:g,fontWeight:_}=f,k=n.split(he.lineBreakRegex);for(let w=0;w<k.length;w++){const S=w*p-p*(k.length-1)/2,A=s.append("text").attr("x",a+l/2).attr("y",o).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",p).style("font-weight",_).style("font-family",g);A.append("tspan").attr("dy",S).text(k[w]).attr("alignment-baseline","mathematical"),i(A,d)}}function r(n,s,a,o,l,u,d,f){const p=s.append("switch"),_=p.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",u).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");_.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,p,a,o,l,u,d,f),i(_,d)}function i(n,s){for(const a in s)s.hasOwnProperty(a)&&n.attr(a,s[a])}return function(n){return n.textPlacement==="fo"?r:n.textPlacement==="old"?t:e}}(),Oi={drawRect:Y0,drawBoundary:IB,drawC4Shape:OB,drawRels:BB,drawImage:Bm,insertArrowHead:YB,insertArrowEnd:VB,insertArrowFilledHead:UB,insertDynamicNumber:zB,insertArrowCrossHead:WB,insertDatabaseIcon:RB,insertComputerIcon:FB,insertClockIcon:PB,getNoteRect:Im,sanitizeUrl:wn};let Oc=0,Rc=0,Om=4,m1=2;Nc.yy=Nm;let Zt={};class Rm{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,b1(e.db.getConfig())}setData(e,r,i,n){this.nextData.startx=this.data.startx=e,this.nextData.stopx=this.data.stopx=r,this.nextData.starty=this.data.starty=i,this.nextData.stopy=this.data.stopy=n}updateVal(e,r,i,n){e[r]===void 0?e[r]=i:e[r]=n(i,e[r])}insert(e){this.nextData.cnt=this.nextData.cnt+1;let r=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+e.margin:this.nextData.stopx+e.margin*2,i=r+e.width,n=this.nextData.starty+e.margin*2,s=n+e.height;(r>=this.data.widthLimit||i>=this.data.widthLimit||this.nextData.cnt>Om)&&(r=this.nextData.startx+e.margin+Zt.nextLinePaddingX,n=this.nextData.stopy+e.margin*2,this.nextData.stopx=i=r+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=s=n+e.height,this.nextData.cnt=1),e.x=r,e.y=n,this.updateVal(this.data,"startx",r,Math.min),this.updateVal(this.data,"starty",n,Math.min),this.updateVal(this.data,"stopx",i,Math.max),this.updateVal(this.data,"stopy",s,Math.max),this.updateVal(this.nextData,"startx",r,Math.min),this.updateVal(this.nextData,"starty",n,Math.min),this.updateVal(this.nextData,"stopx",i,Math.max),this.updateVal(this.nextData,"stopy",s,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},b1(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}}const b1=function(t){pr(Zt,t),t.fontFamily&&(Zt.personFontFamily=Zt.systemFontFamily=Zt.messageFontFamily=t.fontFamily),t.fontSize&&(Zt.personFontSize=Zt.systemFontSize=Zt.messageFontSize=t.fontSize),t.fontWeight&&(Zt.personFontWeight=Zt.systemFontWeight=Zt.messageFontWeight=t.fontWeight)},Wa=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),Wl=t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),GB=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight});function fi(t,e,r,i,n){if(!e[t].width)if(r)e[t].text=om(e[t].text,n,i),e[t].textLines=e[t].text.split(he.lineBreakRegex).length,e[t].width=n,e[t].height=p1(e[t].text,i);else{let s=e[t].text.split(he.lineBreakRegex);e[t].textLines=s.length;let a=0;e[t].height=0,e[t].width=0;for(const o of s)e[t].width=Math.max(Ui(o,i),e[t].width),a=p1(o,i),e[t].height=e[t].height+a}}const Fm=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=Zt.c4ShapeMargin-35;let i=e.wrap&&Zt.wrap,n=Wl(Zt);n.fontSize=n.fontSize+2,n.fontWeight="bold";let s=Ui(e.label.text,n);fi("label",e,i,n,s),Oi.drawBoundary(t,e,Zt)},Pm=function(t,e,r,i){let n=0;for(const s of i){n=0;const a=r[s];let o=Wa(Zt,a.typeC4Shape.text);switch(o.fontSize=o.fontSize-2,a.typeC4Shape.width=Ui("<<"+a.typeC4Shape.text+">>",o),a.typeC4Shape.height=o.fontSize+2,a.typeC4Shape.Y=Zt.c4ShapePadding,n=a.typeC4Shape.Y+a.typeC4Shape.height-4,a.image={width:0,height:0,Y:0},a.typeC4Shape.text){case"person":case"external_person":a.image.width=48,a.image.height=48,a.image.Y=n,n=a.image.Y+a.image.height;break}a.sprite&&(a.image.width=48,a.image.height=48,a.image.Y=n,n=a.image.Y+a.image.height);let l=a.wrap&&Zt.wrap,u=Zt.width-Zt.c4ShapePadding*2,d=Wa(Zt,a.typeC4Shape.text);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",fi("label",a,l,d,u),a.label.Y=n+8,n=a.label.Y+a.label.height,a.type&&a.type.text!==""){a.type.text="["+a.type.text+"]";let g=Wa(Zt,a.typeC4Shape.text);fi("type",a,l,g,u),a.type.Y=n+5,n=a.type.Y+a.type.height}else if(a.techn&&a.techn.text!==""){a.techn.text="["+a.techn.text+"]";let g=Wa(Zt,a.techn.text);fi("techn",a,l,g,u),a.techn.Y=n+5,n=a.techn.Y+a.techn.height}let f=n,p=a.label.width;if(a.descr&&a.descr.text!==""){let g=Wa(Zt,a.typeC4Shape.text);fi("descr",a,l,g,u),a.descr.Y=n+20,n=a.descr.Y+a.descr.height,p=Math.max(a.label.width,a.descr.width),f=n-a.descr.textLines*5}p=p+Zt.c4ShapePadding,a.width=Math.max(a.width||Zt.width,p,Zt.width),a.height=Math.max(a.height||Zt.height,f,Zt.height),a.margin=a.margin||Zt.c4ShapeMargin,t.insert(a),Oi.drawC4Shape(e,a,Zt)}t.bumpLastMargin(Zt.c4ShapeMargin)};class Qr{constructor(e,r){this.x=e,this.y=r}}let R2=function(t,e){let r=t.x,i=t.y,n=e.x,s=e.y,a=r+t.width/2,o=i+t.height/2,l=Math.abs(r-n),u=Math.abs(i-s),d=u/l,f=t.height/t.width,p=null;return i==s&&r<n?p=new Qr(r+t.width,o):i==s&&r>n?p=new Qr(r,o):r==n&&i<s?p=new Qr(a,i+t.height):r==n&&i>s&&(p=new Qr(a,i)),r>n&&i<s?f>=d?p=new Qr(r,o+d*t.width/2):p=new Qr(a-l/u*t.height/2,i+t.height):r<n&&i<s?f>=d?p=new Qr(r+t.width,o+d*t.width/2):p=new Qr(a+l/u*t.height/2,i+t.height):r<n&&i>s?f>=d?p=new Qr(r+t.width,o-d*t.width/2):p=new Qr(a+t.height/2*l/u,i):r>n&&i>s&&(f>=d?p=new Qr(r,o-t.width/2*d):p=new Qr(a-t.height/2*l/u,i)),p},qB=function(t,e){let r={x:0,y:0};r.x=e.x+e.width/2,r.y=e.y+e.height/2;let i=R2(t,r);r.x=t.x+t.width/2,r.y=t.y+t.height/2;let n=R2(e,r);return{startPoint:i,endPoint:n}};const jB=function(t,e,r,i){let n=0;for(let s of e){n=n+1;let a=s.wrap&&Zt.wrap,o=GB(Zt);i.db.getC4Type()==="C4Dynamic"&&(s.label.text=n+": "+s.label.text);let u=Ui(s.label.text,o);fi("label",s,a,o,u),s.techn&&s.techn.text!==""&&(u=Ui(s.techn.text,o),fi("techn",s,a,o,u)),s.descr&&s.descr.text!==""&&(u=Ui(s.descr.text,o),fi("descr",s,a,o,u));let d=r(s.from),f=r(s.to),p=qB(d,f);s.startPoint=p.startPoint,s.endPoint=p.endPoint}Oi.drawRels(t,e,Zt)};function Ym(t,e,r,i,n){let s=new Rm(n);s.data.widthLimit=r.data.widthLimit/Math.min(m1,i.length);for(let[a,o]of i.entries()){let l=0;o.image={width:0,height:0,Y:0},o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=l,l=o.image.Y+o.image.height);let u=o.wrap&&Zt.wrap,d=Wl(Zt);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",fi("label",o,u,d,s.data.widthLimit),o.label.Y=l+8,l=o.label.Y+o.label.height,o.type&&o.type.text!==""){o.type.text="["+o.type.text+"]";let _=Wl(Zt);fi("type",o,u,_,s.data.widthLimit),o.type.Y=l+5,l=o.type.Y+o.type.height}if(o.descr&&o.descr.text!==""){let _=Wl(Zt);_.fontSize=_.fontSize-2,fi("descr",o,u,_,s.data.widthLimit),o.descr.Y=l+20,l=o.descr.Y+o.descr.height}if(a==0||a%m1===0){let _=r.data.startx+Zt.diagramMarginX,k=r.data.stopy+Zt.diagramMarginY+l;s.setData(_,_,k,k)}else{let _=s.data.stopx!==s.data.startx?s.data.stopx+Zt.diagramMarginX:s.data.startx,k=s.data.starty;s.setData(_,_,k,k)}s.name=o.alias;let f=n.db.getC4ShapeArray(o.alias),p=n.db.getC4ShapeKeys(o.alias);p.length>0&&Pm(s,t,f,p),e=o.alias;let g=n.db.getBoundarys(e);g.length>0&&Ym(t,e,s,g,n),o.alias!=="global"&&Fm(t,o,s),r.data.stopy=Math.max(s.data.stopy+Zt.c4ShapeMargin,r.data.stopy),r.data.stopx=Math.max(s.data.stopx+Zt.c4ShapeMargin,r.data.stopx),Oc=Math.max(Oc,r.data.stopx),Rc=Math.max(Rc,r.data.stopy)}}const $B=function(t,e,r,i){Zt=$().c4;const n=$().securityLevel;let s;n==="sandbox"&&(s=At("#i"+e));const a=At(n==="sandbox"?s.nodes()[0].contentDocument.body:"body");let o=i.db;i.db.setWrap(Zt.wrap),Om=o.getC4ShapeInRow(),m1=o.getC4BoundaryInRow(),B.debug(`C:${JSON.stringify(Zt,null,2)}`);const l=n==="sandbox"?a.select(`[id="${e}"]`):At(`[id="${e}"]`);Oi.insertComputerIcon(l),Oi.insertDatabaseIcon(l),Oi.insertClockIcon(l);let u=new Rm(i);u.setData(Zt.diagramMarginX,Zt.diagramMarginX,Zt.diagramMarginY,Zt.diagramMarginY),u.data.widthLimit=screen.availWidth,Oc=Zt.diagramMarginX,Rc=Zt.diagramMarginY;const d=i.db.getTitle();let f=i.db.getBoundarys("");Ym(l,"",u,f,i),Oi.insertArrowHead(l),Oi.insertArrowEnd(l),Oi.insertArrowCrossHead(l),Oi.insertArrowFilledHead(l),jB(l,i.db.getRels(),i.db.getC4Shape,i),u.data.stopx=Oc,u.data.stopy=Rc;const p=u.data;let _=p.stopy-p.starty+2*Zt.diagramMarginY;const w=p.stopx-p.startx+2*Zt.diagramMarginX;d&&l.append("text").text(d).attr("x",(p.stopx-p.startx)/2-4*Zt.diagramMarginX).attr("y",p.starty+Zt.diagramMarginY),Ei(l,_,w,Zt.useMaxWidth);const S=d?60:0;l.attr("viewBox",p.startx-Zt.diagramMarginX+" -"+(Zt.diagramMarginY+S)+" "+w+" "+(_+S)),B.debug("models:",p)},F2={drawPersonOrSystemArray:Pm,drawBoundary:Fm,setConf:b1,draw:$B};var _1=function(){var t=function(F,I,L,J){for(L=L||{},J=F.length;J--;L[F[J]]=I);return L},e=[1,3],r=[1,7],i=[1,8],n=[1,9],s=[1,10],a=[1,13],o=[1,12],l=[1,16,25],u=[1,20],d=[1,32],f=[1,33],p=[1,34],g=[1,36],_=[1,39],k=[1,37],w=[1,38],S=[1,44],A=[1,45],O=[1,40],P=[1,41],W=[1,42],q=[1,43],z=[1,48],H=[1,49],N=[1,50],M=[1,51],C=[16,25],v=[1,65],D=[1,66],m=[1,67],Q=[1,68],b=[1,69],ct=[1,70],Dt=[1,71],vt=[1,80],j=[16,25,32,45,46,54,60,61,62,63,64,65,66,71,73],ot=[16,25,30,32,45,46,50,54,60,61,62,63,64,65,66,71,73,88,89,90,91],rt=[5,8,9,10,11,16,19,23,25],it=[54,88,89,90,91],ut=[54,65,66,88,89,90,91],bt=[54,60,61,62,63,64,88,89,90,91],K=[16,25,32],Ot=[1,107],Y={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statments:5,direction:6,directive:7,direction_tb:8,direction_bt:9,direction_rl:10,direction_lr:11,graphConfig:12,openDirective:13,typeDirective:14,closeDirective:15,NEWLINE:16,":":17,argDirective:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,CLASS_DIAGRAM:23,statements:24,EOF:25,statement:26,className:27,alphaNumToken:28,classLiteralName:29,GENERICTYPE:30,relationStatement:31,LABEL:32,classStatement:33,methodStatement:34,annotationStatement:35,clickStatement:36,cssClassStatement:37,noteStatement:38,acc_title:39,acc_title_value:40,acc_descr:41,acc_descr_value:42,acc_descr_multiline_value:43,CLASS:44,STYLE_SEPARATOR:45,STRUCT_START:46,members:47,STRUCT_STOP:48,ANNOTATION_START:49,ANNOTATION_END:50,MEMBER:51,SEPARATOR:52,relation:53,STR:54,NOTE_FOR:55,noteText:56,NOTE:57,relationType:58,lineType:59,AGGREGATION:60,EXTENSION:61,COMPOSITION:62,DEPENDENCY:63,LOLLIPOP:64,LINE:65,DOTTED_LINE:66,CALLBACK:67,LINK:68,LINK_TARGET:69,CLICK:70,CALLBACK_NAME:71,CALLBACK_ARGS:72,HREF:73,CSSCLASS:74,commentToken:75,textToken:76,graphCodeTokens:77,textNoTagsToken:78,TAGSTART:79,TAGEND:80,"==":81,"--":82,PCT:83,DEFAULT:84,SPACE:85,MINUS:86,keywords:87,UNICODE_TEXT:88,NUM:89,ALPHA:90,BQUOTE_STR:91,$accept:0,$end:1},terminals_:{2:"error",5:"statments",8:"direction_tb",9:"direction_bt",10:"direction_rl",11:"direction_lr",16:"NEWLINE",17:":",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",23:"CLASS_DIAGRAM",25:"EOF",30:"GENERICTYPE",32:"LABEL",39:"acc_title",40:"acc_title_value",41:"acc_descr",42:"acc_descr_value",43:"acc_descr_multiline_value",44:"CLASS",45:"STYLE_SEPARATOR",46:"STRUCT_START",48:"STRUCT_STOP",49:"ANNOTATION_START",50:"ANNOTATION_END",51:"MEMBER",52:"SEPARATOR",54:"STR",55:"NOTE_FOR",57:"NOTE",60:"AGGREGATION",61:"EXTENSION",62:"COMPOSITION",63:"DEPENDENCY",64:"LOLLIPOP",65:"LINE",66:"DOTTED_LINE",67:"CALLBACK",68:"LINK",69:"LINK_TARGET",70:"CLICK",71:"CALLBACK_NAME",72:"CALLBACK_ARGS",73:"HREF",74:"CSSCLASS",77:"graphCodeTokens",79:"TAGSTART",80:"TAGEND",81:"==",82:"--",83:"PCT",84:"DEFAULT",85:"SPACE",86:"MINUS",87:"keywords",88:"UNICODE_TEXT",89:"NUM",90:"ALPHA",91:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[3,1],[3,2],[6,1],[6,1],[6,1],[6,1],[4,1],[7,4],[7,6],[13,1],[14,1],[18,1],[15,1],[12,4],[24,1],[24,2],[24,3],[27,1],[27,1],[27,2],[27,2],[27,2],[26,1],[26,2],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,2],[26,2],[26,1],[33,2],[33,4],[33,5],[33,7],[35,4],[47,1],[47,2],[34,1],[34,2],[34,1],[34,1],[31,3],[31,4],[31,4],[31,5],[38,3],[38,2],[53,3],[53,2],[53,2],[53,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[36,3],[36,4],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[37,3],[75,1],[75,1],[76,1],[76,1],[76,1],[76,1],[76,1],[76,1],[76,1],[78,1],[78,1],[78,1],[78,1],[28,1],[28,1],[28,1],[29,1],[56,1]],performAction:function(I,L,J,T,ht,V,Yt){var et=V.length-1;switch(ht){case 5:T.setDirection("TB");break;case 6:T.setDirection("BT");break;case 7:T.setDirection("RL");break;case 8:T.setDirection("LR");break;case 12:T.parseDirective("%%{","open_directive");break;case 13:T.parseDirective(V[et],"type_directive");break;case 14:V[et]=V[et].trim().replace(/'/g,'"'),T.parseDirective(V[et],"arg_directive");break;case 15:T.parseDirective("}%%","close_directive","class");break;case 20:case 21:this.$=V[et];break;case 22:this.$=V[et-1]+V[et];break;case 23:case 24:this.$=V[et-1]+"~"+V[et];break;case 25:T.addRelation(V[et]);break;case 26:V[et-1].title=T.cleanupLabel(V[et]),T.addRelation(V[et-1]);break;case 35:this.$=V[et].trim(),T.setAccTitle(this.$);break;case 36:case 37:this.$=V[et].trim(),T.setAccDescription(this.$);break;case 38:T.addClass(V[et]);break;case 39:T.addClass(V[et-2]),T.setCssClass(V[et-2],V[et]);break;case 40:T.addClass(V[et-3]),T.addMembers(V[et-3],V[et-1]);break;case 41:T.addClass(V[et-5]),T.setCssClass(V[et-5],V[et-3]),T.addMembers(V[et-5],V[et-1]);break;case 42:T.addAnnotation(V[et],V[et-2]);break;case 43:this.$=[V[et]];break;case 44:V[et].push(V[et-1]),this.$=V[et];break;case 45:break;case 46:T.addMember(V[et-1],T.cleanupLabel(V[et]));break;case 47:break;case 48:break;case 49:this.$={id1:V[et-2],id2:V[et],relation:V[et-1],relationTitle1:"none",relationTitle2:"none"};break;case 50:this.$={id1:V[et-3],id2:V[et],relation:V[et-1],relationTitle1:V[et-2],relationTitle2:"none"};break;case 51:this.$={id1:V[et-3],id2:V[et],relation:V[et-2],relationTitle1:"none",relationTitle2:V[et-1]};break;case 52:this.$={id1:V[et-4],id2:V[et],relation:V[et-2],relationTitle1:V[et-3],relationTitle2:V[et-1]};break;case 53:T.addNote(V[et],V[et-1]);break;case 54:T.addNote(V[et]);break;case 55:this.$={type1:V[et-2],type2:V[et],lineType:V[et-1]};break;case 56:this.$={type1:"none",type2:V[et],lineType:V[et-1]};break;case 57:this.$={type1:V[et-1],type2:"none",lineType:V[et]};break;case 58:this.$={type1:"none",type2:"none",lineType:V[et]};break;case 59:this.$=T.relationType.AGGREGATION;break;case 60:this.$=T.relationType.EXTENSION;break;case 61:this.$=T.relationType.COMPOSITION;break;case 62:this.$=T.relationType.DEPENDENCY;break;case 63:this.$=T.relationType.LOLLIPOP;break;case 64:this.$=T.lineType.LINE;break;case 65:this.$=T.lineType.DOTTED_LINE;break;case 66:case 72:this.$=V[et-2],T.setClickEvent(V[et-1],V[et]);break;case 67:case 73:this.$=V[et-3],T.setClickEvent(V[et-2],V[et-1]),T.setTooltip(V[et-2],V[et]);break;case 68:case 76:this.$=V[et-2],T.setLink(V[et-1],V[et]);break;case 69:this.$=V[et-3],T.setLink(V[et-2],V[et-1],V[et]);break;case 70:case 78:this.$=V[et-3],T.setLink(V[et-2],V[et-1]),T.setTooltip(V[et-2],V[et]);break;case 71:case 79:this.$=V[et-4],T.setLink(V[et-3],V[et-2],V[et]),T.setTooltip(V[et-3],V[et-1]);break;case 74:this.$=V[et-3],T.setClickEvent(V[et-2],V[et-1],V[et]);break;case 75:this.$=V[et-4],T.setClickEvent(V[et-3],V[et-2],V[et-1]),T.setTooltip(V[et-3],V[et]);break;case 77:this.$=V[et-3],T.setLink(V[et-2],V[et-1],V[et]);break;case 80:T.setCssClass(V[et-1],V[et]);break}},table:[{3:1,4:2,5:e,6:4,7:5,8:r,9:i,10:n,11:s,12:6,13:11,19:a,23:o},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{3:14,4:2,5:e,6:4,7:5,8:r,9:i,10:n,11:s,12:6,13:11,19:a,23:o},{1:[2,9]},t(l,[2,5]),t(l,[2,6]),t(l,[2,7]),t(l,[2,8]),{14:15,20:[1,16]},{16:[1,17]},{20:[2,12]},{1:[2,4]},{15:18,17:[1,19],22:u},t([17,22],[2,13]),{6:31,7:30,8:r,9:i,10:n,11:s,13:11,19:a,24:21,26:22,27:35,28:46,29:47,31:23,33:24,34:25,35:26,36:27,37:28,38:29,39:d,41:f,43:p,44:g,49:_,51:k,52:w,55:S,57:A,67:O,68:P,70:W,74:q,88:z,89:H,90:N,91:M},{16:[1,52]},{18:53,21:[1,54]},{16:[2,15]},{25:[1,55]},{16:[1,56],25:[2,17]},t(C,[2,25],{32:[1,57]}),t(C,[2,27]),t(C,[2,28]),t(C,[2,29]),t(C,[2,30]),t(C,[2,31]),t(C,[2,32]),t(C,[2,33]),t(C,[2,34]),{40:[1,58]},{42:[1,59]},t(C,[2,37]),t(C,[2,45],{53:60,58:63,59:64,32:[1,62],54:[1,61],60:v,61:D,62:m,63:Q,64:b,65:ct,66:Dt}),{27:72,28:46,29:47,88:z,89:H,90:N,91:M},t(C,[2,47]),t(C,[2,48]),{28:73,88:z,89:H,90:N},{27:74,28:46,29:47,88:z,89:H,90:N,91:M},{27:75,28:46,29:47,88:z,89:H,90:N,91:M},{27:76,28:46,29:47,88:z,89:H,90:N,91:M},{54:[1,77]},{27:78,28:46,29:47,88:z,89:H,90:N,91:M},{54:vt,56:79},t(j,[2,20],{28:46,29:47,27:81,30:[1,82],88:z,89:H,90:N,91:M}),t(j,[2,21],{30:[1,83]}),t(ot,[2,94]),t(ot,[2,95]),t(ot,[2,96]),t([16,25,30,32,45,46,54,60,61,62,63,64,65,66,71,73],[2,97]),t(rt,[2,10]),{15:84,22:u},{22:[2,14]},{1:[2,16]},{6:31,7:30,8:r,9:i,10:n,11:s,13:11,19:a,24:85,25:[2,18],26:22,27:35,28:46,29:47,31:23,33:24,34:25,35:26,36:27,37:28,38:29,39:d,41:f,43:p,44:g,49:_,51:k,52:w,55:S,57:A,67:O,68:P,70:W,74:q,88:z,89:H,90:N,91:M},t(C,[2,26]),t(C,[2,35]),t(C,[2,36]),{27:86,28:46,29:47,54:[1,87],88:z,89:H,90:N,91:M},{53:88,58:63,59:64,60:v,61:D,62:m,63:Q,64:b,65:ct,66:Dt},t(C,[2,46]),{59:89,65:ct,66:Dt},t(it,[2,58],{58:90,60:v,61:D,62:m,63:Q,64:b}),t(ut,[2,59]),t(ut,[2,60]),t(ut,[2,61]),t(ut,[2,62]),t(ut,[2,63]),t(bt,[2,64]),t(bt,[2,65]),t(C,[2,38],{45:[1,91],46:[1,92]}),{50:[1,93]},{54:[1,94]},{54:[1,95]},{71:[1,96],73:[1,97]},{28:98,88:z,89:H,90:N},{54:vt,56:99},t(C,[2,54]),t(C,[2,98]),t(j,[2,22]),t(j,[2,23]),t(j,[2,24]),{16:[1,100]},{25:[2,19]},t(K,[2,49]),{27:101,28:46,29:47,88:z,89:H,90:N,91:M},{27:102,28:46,29:47,54:[1,103],88:z,89:H,90:N,91:M},t(it,[2,57],{58:104,60:v,61:D,62:m,63:Q,64:b}),t(it,[2,56]),{28:105,88:z,89:H,90:N},{47:106,51:Ot},{27:108,28:46,29:47,88:z,89:H,90:N,91:M},t(C,[2,66],{54:[1,109]}),t(C,[2,68],{54:[1,111],69:[1,110]}),t(C,[2,72],{54:[1,112],72:[1,113]}),t(C,[2,76],{54:[1,115],69:[1,114]}),t(C,[2,80]),t(C,[2,53]),t(rt,[2,11]),t(K,[2,51]),t(K,[2,50]),{27:116,28:46,29:47,88:z,89:H,90:N,91:M},t(it,[2,55]),t(C,[2,39],{46:[1,117]}),{48:[1,118]},{47:119,48:[2,43],51:Ot},t(C,[2,42]),t(C,[2,67]),t(C,[2,69]),t(C,[2,70],{69:[1,120]}),t(C,[2,73]),t(C,[2,74],{54:[1,121]}),t(C,[2,77]),t(C,[2,78],{69:[1,122]}),t(K,[2,52]),{47:123,51:Ot},t(C,[2,40]),{48:[2,44]},t(C,[2,71]),t(C,[2,75]),t(C,[2,79]),{48:[1,124]},t(C,[2,41])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],6:[2,9],13:[2,12],14:[2,4],20:[2,15],54:[2,14],55:[2,16],85:[2,19],119:[2,44]},parseError:function(I,L){if(L.recoverable)this.trace(I);else{var J=new Error(I);throw J.hash=L,J}},parse:function(I){var L=this,J=[0],T=[],ht=[null],V=[],Yt=this.table,et="",Mt=0,Tt=0,gt=2,Et=1,wt=V.slice.call(arguments,1),pt=Object.create(this.lexer),st={yy:{}};for(var le in this.yy)Object.prototype.hasOwnProperty.call(this.yy,le)&&(st.yy[le]=this.yy[le]);pt.setInput(I,st.yy),st.yy.lexer=pt,st.yy.parser=this,typeof pt.yylloc>"u"&&(pt.yylloc={});var Xt=pt.yylloc;V.push(Xt);var jt=pt.options&&pt.options.ranges;typeof st.yy.parseError=="function"?this.parseError=st.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Kt(){var at;return at=T.pop()||pt.lex()||Et,typeof at!="number"&&(at instanceof Array&&(T=at,at=T.pop()),at=L.symbols_[at]||at),at}for(var Gt,Ee,Ht,Vt,Ft={},xt,ft,Lt,_t;;){if(Ee=J[J.length-1],this.defaultActions[Ee]?Ht=this.defaultActions[Ee]:((Gt===null||typeof Gt>"u")&&(Gt=Kt()),Ht=Yt[Ee]&&Yt[Ee][Gt]),typeof Ht>"u"||!Ht.length||!Ht[0]){var Ut="";_t=[];for(xt in Yt[Ee])this.terminals_[xt]&&xt>gt&&_t.push("'"+this.terminals_[xt]+"'");pt.showPosition?Ut="Parse error on line "+(Mt+1)+`:
|
|
1207
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var ft=this.next();return ft||this.lex()},begin:function(ft){this.conditionStack.push(ft)},popState:function(){var ft=this.conditionStack.length-1;return ft>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(ft){return ft=this.conditionStack.length-1-Math.abs(ft||0),ft>=0?this.conditionStack[ft]:"INITIAL"},pushState:function(ft){this.begin(ft)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(ft,Lt,_t,Ut){switch(_t){case 0:return this.begin("open_directive"),18;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 10;case 5:return this.begin("type_directive"),19;case 6:return this.popState(),this.begin("arg_directive"),16;case 7:return this.popState(),this.popState(),21;case 8:return 20;case 9:return 32;case 10:return 33;case 11:return this.begin("acc_title"),34;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),36;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:break;case 19:c;break;case 20:return 15;case 21:break;case 22:return 22;case 23:return 25;case 24:return 26;case 25:return 27;case 26:return 28;case 27:return this.begin("person_ext"),55;case 28:return this.begin("person"),54;case 29:return this.begin("system_ext_queue"),61;case 30:return this.begin("system_ext_db"),60;case 31:return this.begin("system_ext"),59;case 32:return this.begin("system_queue"),58;case 33:return this.begin("system_db"),57;case 34:return this.begin("system"),56;case 35:return this.begin("boundary"),47;case 36:return this.begin("enterprise_boundary"),44;case 37:return this.begin("system_boundary"),46;case 38:return this.begin("container_ext_queue"),67;case 39:return this.begin("container_ext_db"),66;case 40:return this.begin("container_ext"),65;case 41:return this.begin("container_queue"),64;case 42:return this.begin("container_db"),63;case 43:return this.begin("container"),62;case 44:return this.begin("container_boundary"),48;case 45:return this.begin("component_ext_queue"),73;case 46:return this.begin("component_ext_db"),72;case 47:return this.begin("component_ext"),71;case 48:return this.begin("component_queue"),70;case 49:return this.begin("component_db"),69;case 50:return this.begin("component"),68;case 51:return this.begin("node"),49;case 52:return this.begin("node"),49;case 53:return this.begin("node_l"),50;case 54:return this.begin("node_r"),51;case 55:return this.begin("rel"),74;case 56:return this.begin("birel"),75;case 57:return this.begin("rel_u"),76;case 58:return this.begin("rel_u"),76;case 59:return this.begin("rel_d"),77;case 60:return this.begin("rel_d"),77;case 61:return this.begin("rel_l"),78;case 62:return this.begin("rel_l"),78;case 63:return this.begin("rel_r"),79;case 64:return this.begin("rel_r"),79;case 65:return this.begin("rel_b"),80;case 66:return this.begin("rel_index"),81;case 67:return this.begin("update_el_style"),82;case 68:return this.begin("update_rel_style"),83;case 69:return this.begin("update_layout_config"),84;case 70:return"EOF_IN_STRUCT";case 71:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 72:this.begin("attribute");break;case 73:this.popState(),this.popState();break;case 74:return 90;case 75:break;case 76:return 90;case 77:this.begin("string");break;case 78:this.popState();break;case 79:return"STR";case 80:this.begin("string_kv");break;case 81:return this.begin("string_kv_key"),"STR_KEY";case 82:this.popState(),this.begin("string_kv_value");break;case 83:return"STR_VALUE";case 84:this.popState(),this.popState();break;case 85:return"STR";case 86:return"LBRACE";case 87:return"RBRACE";case 88:return"SPACE";case 89:return"EOL";case 90:return 24}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},string_kv_value:{rules:[83,84],inclusive:!1},string_kv_key:{rules:[82],inclusive:!1},string_kv:{rules:[81],inclusive:!1},string:{rules:[78,79],inclusive:!1},attribute:{rules:[73,74,75,76,77,80,85],inclusive:!1},update_layout_config:{rules:[70,71,72,73],inclusive:!1},update_rel_style:{rules:[70,71,72,73],inclusive:!1},update_el_style:{rules:[70,71,72,73],inclusive:!1},rel_b:{rules:[70,71,72,73],inclusive:!1},rel_r:{rules:[70,71,72,73],inclusive:!1},rel_l:{rules:[70,71,72,73],inclusive:!1},rel_d:{rules:[70,71,72,73],inclusive:!1},rel_u:{rules:[70,71,72,73],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[70,71,72,73],inclusive:!1},node_r:{rules:[70,71,72,73],inclusive:!1},node_l:{rules:[70,71,72,73],inclusive:!1},node:{rules:[70,71,72,73],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[70,71,72,73],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[70,71,72,73],inclusive:!1},component_ext:{rules:[70,71,72,73],inclusive:!1},component_queue:{rules:[70,71,72,73],inclusive:!1},component_db:{rules:[70,71,72,73],inclusive:!1},component:{rules:[70,71,72,73],inclusive:!1},container_boundary:{rules:[70,71,72,73],inclusive:!1},container_ext_queue:{rules:[],inclusive:!1},container_ext_db:{rules:[70,71,72,73],inclusive:!1},container_ext:{rules:[70,71,72,73],inclusive:!1},container_queue:{rules:[70,71,72,73],inclusive:!1},container_db:{rules:[70,71,72,73],inclusive:!1},container:{rules:[70,71,72,73],inclusive:!1},birel:{rules:[70,71,72,73],inclusive:!1},system_boundary:{rules:[70,71,72,73],inclusive:!1},enterprise_boundary:{rules:[70,71,72,73],inclusive:!1},boundary:{rules:[70,71,72,73],inclusive:!1},system_ext_queue:{rules:[70,71,72,73],inclusive:!1},system_ext_db:{rules:[70,71,72,73],inclusive:!1},system_ext:{rules:[70,71,72,73],inclusive:!1},system_queue:{rules:[70,71,72,73],inclusive:!1},system_db:{rules:[70,71,72,73],inclusive:!1},system:{rules:[70,71,72,73],inclusive:!1},person_ext:{rules:[70,71,72,73],inclusive:!1},person:{rules:[70,71,72,73],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,86,87,88,89,90],inclusive:!0}}};return Ft}();Ee.lexer=Ht;function Vt(){this.yy={}}return Vt.prototype=Ee,Ee.Parser=Vt,new Vt}();Nc.parser=Nc;const rB=Nc,iB=t=>t.match(/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/)!==null;let ki=[],Wn=[""],Nr="global",mi="",Wi=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],Mo=[],P0="",Y0=!1,Bc=4,Ic=2;var Dm;const nB=function(){return Dm},sB=function(t){Dm=vi(t,$())},aB=function(t,e,r){ze.parseDirective(this,t,e,r)},oB=function(t,e,r,i,n,s,a,o,l){if(t==null||e===void 0||e===null||r===void 0||r===null||i===void 0||i===null)return;let u={};const d=Mo.find(f=>f.from===e&&f.to===r);if(d?u=d:Mo.push(u),u.type=t,u.from=e,u.to=r,u.label={text:i},n==null)u.techn={text:""};else if(typeof n=="object"){let[f,p]=Object.entries(n)[0];u[f]={text:p}}else u.techn={text:n};if(s==null)u.descr={text:""};else if(typeof s=="object"){let[f,p]=Object.entries(s)[0];u[f]={text:p}}else u.descr={text:s};if(typeof a=="object"){let[f,p]=Object.entries(a)[0];u[f]=p}else u.sprite=a;if(typeof o=="object"){let[f,p]=Object.entries(o)[0];u[f]=p}else u.tags=o;if(typeof l=="object"){let[f,p]=Object.entries(l)[0];u[f]=p}else u.link=l;u.wrap=Kn()},lB=function(t,e,r,i,n,s,a){if(e===null||r===null)return;let o={};const l=ki.find(u=>u.alias===e);if(l&&e===l.alias?o=l:(o.alias=e,ki.push(o)),r==null?o.label={text:""}:o.label={text:r},i==null)o.descr={text:""};else if(typeof i=="object"){let[u,d]=Object.entries(i)[0];o[u]={text:d}}else o.descr={text:i};if(typeof n=="object"){let[u,d]=Object.entries(n)[0];o[u]=d}else o.sprite=n;if(typeof s=="object"){let[u,d]=Object.entries(s)[0];o[u]=d}else o.tags=s;if(typeof a=="object"){let[u,d]=Object.entries(a)[0];o[u]=d}else o.link=a;o.typeC4Shape={text:t},o.parentBoundary=Nr,o.wrap=Kn()},cB=function(t,e,r,i,n,s,a,o){if(e===null||r===null)return;let l={};const u=ki.find(d=>d.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,ki.push(l)),r==null?l.label={text:""}:l.label={text:r},i==null)l.techn={text:""};else if(typeof i=="object"){let[d,f]=Object.entries(i)[0];l[d]={text:f}}else l.techn={text:i};if(n==null)l.descr={text:""};else if(typeof n=="object"){let[d,f]=Object.entries(n)[0];l[d]={text:f}}else l.descr={text:n};if(typeof s=="object"){let[d,f]=Object.entries(s)[0];l[d]=f}else l.sprite=s;if(typeof a=="object"){let[d,f]=Object.entries(a)[0];l[d]=f}else l.tags=a;if(typeof o=="object"){let[d,f]=Object.entries(o)[0];l[d]=f}else l.link=o;l.wrap=Kn(),l.typeC4Shape={text:t},l.parentBoundary=Nr},uB=function(t,e,r,i,n,s,a,o){if(e===null||r===null)return;let l={};const u=ki.find(d=>d.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,ki.push(l)),r==null?l.label={text:""}:l.label={text:r},i==null)l.techn={text:""};else if(typeof i=="object"){let[d,f]=Object.entries(i)[0];l[d]={text:f}}else l.techn={text:i};if(n==null)l.descr={text:""};else if(typeof n=="object"){let[d,f]=Object.entries(n)[0];l[d]={text:f}}else l.descr={text:n};if(typeof s=="object"){let[d,f]=Object.entries(s)[0];l[d]=f}else l.sprite=s;if(typeof a=="object"){let[d,f]=Object.entries(a)[0];l[d]=f}else l.tags=a;if(typeof o=="object"){let[d,f]=Object.entries(o)[0];l[d]=f}else l.link=o;l.wrap=Kn(),l.typeC4Shape={text:t},l.parentBoundary=Nr},hB=function(t,e,r,i,n){if(t===null||e===null)return;let s={};const a=Wi.find(o=>o.alias===t);if(a&&t===a.alias?s=a:(s.alias=t,Wi.push(s)),e==null?s.label={text:""}:s.label={text:e},r==null)s.type={text:"system"};else if(typeof r=="object"){let[o,l]=Object.entries(r)[0];s[o]={text:l}}else s.type={text:r};if(typeof i=="object"){let[o,l]=Object.entries(i)[0];s[o]=l}else s.tags=i;if(typeof n=="object"){let[o,l]=Object.entries(n)[0];s[o]=l}else s.link=n;s.parentBoundary=Nr,s.wrap=Kn(),mi=Nr,Nr=t,Wn.push(mi)},dB=function(t,e,r,i,n){if(t===null||e===null)return;let s={};const a=Wi.find(o=>o.alias===t);if(a&&t===a.alias?s=a:(s.alias=t,Wi.push(s)),e==null?s.label={text:""}:s.label={text:e},r==null)s.type={text:"container"};else if(typeof r=="object"){let[o,l]=Object.entries(r)[0];s[o]={text:l}}else s.type={text:r};if(typeof i=="object"){let[o,l]=Object.entries(i)[0];s[o]=l}else s.tags=i;if(typeof n=="object"){let[o,l]=Object.entries(n)[0];s[o]=l}else s.link=n;s.parentBoundary=Nr,s.wrap=Kn(),mi=Nr,Nr=t,Wn.push(mi)},fB=function(t,e,r,i,n,s,a,o){if(e===null||r===null)return;let l={};const u=Wi.find(d=>d.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,Wi.push(l)),r==null?l.label={text:""}:l.label={text:r},i==null)l.type={text:"node"};else if(typeof i=="object"){let[d,f]=Object.entries(i)[0];l[d]={text:f}}else l.type={text:i};if(n==null)l.descr={text:""};else if(typeof n=="object"){let[d,f]=Object.entries(n)[0];l[d]={text:f}}else l.descr={text:n};if(typeof a=="object"){let[d,f]=Object.entries(a)[0];l[d]=f}else l.tags=a;if(typeof o=="object"){let[d,f]=Object.entries(o)[0];l[d]=f}else l.link=o;l.nodeType=t,l.parentBoundary=Nr,l.wrap=Kn(),mi=Nr,Nr=e,Wn.push(mi)},pB=function(){Nr=mi,Wn.pop(),mi=Wn.pop(),Wn.push(mi)},gB=function(t,e,r,i,n,s,a,o,l,u,d){let f=ki.find(p=>p.alias===e);if(!(f===void 0&&(f=Wi.find(p=>p.alias===e),f===void 0))){if(r!=null)if(typeof r=="object"){let[p,g]=Object.entries(r)[0];f[p]=g}else f.bgColor=r;if(i!=null)if(typeof i=="object"){let[p,g]=Object.entries(i)[0];f[p]=g}else f.fontColor=i;if(n!=null)if(typeof n=="object"){let[p,g]=Object.entries(n)[0];f[p]=g}else f.borderColor=n;if(s!=null)if(typeof s=="object"){let[p,g]=Object.entries(s)[0];f[p]=g}else f.shadowing=s;if(a!=null)if(typeof a=="object"){let[p,g]=Object.entries(a)[0];f[p]=g}else f.shape=a;if(o!=null)if(typeof o=="object"){let[p,g]=Object.entries(o)[0];f[p]=g}else f.sprite=o;if(l!=null)if(typeof l=="object"){let[p,g]=Object.entries(l)[0];f[p]=g}else f.techn=l;if(u!=null)if(typeof u=="object"){let[p,g]=Object.entries(u)[0];f[p]=g}else f.legendText=u;if(d!=null)if(typeof d=="object"){let[p,g]=Object.entries(d)[0];f[p]=g}else f.legendSprite=d}},yB=function(t,e,r,i,n,s,a){const o=Mo.find(l=>l.from===e&&l.to===r);if(o!==void 0){if(i!=null)if(typeof i=="object"){let[l,u]=Object.entries(i)[0];o[l]=u}else o.textColor=i;if(n!=null)if(typeof n=="object"){let[l,u]=Object.entries(n)[0];o[l]=u}else o.lineColor=n;if(s!=null)if(typeof s=="object"){let[l,u]=Object.entries(s)[0];o[l]=parseInt(u)}else o.offsetX=parseInt(s);if(a!=null)if(typeof a=="object"){let[l,u]=Object.entries(a)[0];o[l]=parseInt(u)}else o.offsetY=parseInt(a)}},mB=function(t,e,r){let i=Bc,n=Ic;if(typeof e=="object"){const s=Object.values(e)[0];i=parseInt(s)}else i=parseInt(e);if(typeof r=="object"){const s=Object.values(r)[0];n=parseInt(s)}else n=parseInt(r);i>=1&&(Bc=i),n>=1&&(Ic=n)},bB=function(){return Bc},_B=function(){return Ic},xB=function(){return Nr},vB=function(){return mi},Mm=function(t){return t==null?ki:ki.filter(e=>e.parentBoundary===t)},kB=function(t){return ki.find(e=>e.alias===t)},wB=function(t){return Object.keys(Mm(t))},TB=function(t){return t==null?Wi:Wi.filter(e=>e.parentBoundary===t)},EB=function(){return Mo},CB=function(){return P0},SB=function(t){Y0=t},Kn=function(){return Y0},AB=function(){ki=[],Wi=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],mi="",Nr="global",Wn=[""],Mo=[],Wn=[""],P0="",Y0=!1,Bc=4,Ic=2},LB={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},DB={FILLED:0,OPEN:1},MB={LEFTOF:0,RIGHTOF:1,OVER:2},NB=function(t){P0=vi(t,$())},Nm={addPersonOrSystem:lB,addPersonOrSystemBoundary:hB,addContainer:cB,addContainerBoundary:dB,addComponent:uB,addDeploymentNode:fB,popBoundaryParseStack:pB,addRel:oB,updateElStyle:gB,updateRelStyle:yB,updateLayoutConfig:mB,autoWrap:Kn,setWrap:SB,getC4ShapeArray:Mm,getC4Shape:kB,getC4ShapeKeys:wB,getBoundarys:TB,getCurrentBoundaryParse:xB,getParentBoundaryParse:vB,getRels:EB,getTitle:CB,getC4Type:nB,getC4ShapeInRow:bB,getC4BoundaryInRow:_B,setAccTitle:ii,getAccTitle:Si,getAccDescription:Li,setAccDescription:Ai,parseDirective:aB,getConfig:()=>$().c4,clear:AB,LINETYPE:LB,ARROWTYPE:DB,PLACEMENT:MB,setTitle:NB,setC4Type:sB},V0=function(t,e){const 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),r.attr("rx",e.rx),r.attr("ry",e.ry),e.attrs!=="undefined"&&e.attrs!==null)for(let i in e.attrs)r.attr(i,e.attrs[i]);return e.class!=="undefined"&&r.attr("class",e.class),r},Bm=function(t,e,r,i,n,s){const a=t.append("image");a.attr("width",e),a.attr("height",r),a.attr("x",i),a.attr("y",n);let o=s.startsWith("data:image/png;base64")?s:wn(s);a.attr("xlink:href",o)},BB=(t,e,r)=>{const i=t.append("g");let n=0;for(let s of e){let a=s.textColor?s.textColor:"#444444",o=s.lineColor?s.lineColor:"#444444",l=s.offsetX?parseInt(s.offsetX):0,u=s.offsetY?parseInt(s.offsetY):0,d="";if(n===0){let p=i.append("line");p.attr("x1",s.startPoint.x),p.attr("y1",s.startPoint.y),p.attr("x2",s.endPoint.x),p.attr("y2",s.endPoint.y),p.attr("stroke-width","1"),p.attr("stroke",o),p.style("fill","none"),s.type!=="rel_b"&&p.attr("marker-end","url("+d+"#arrowhead)"),(s.type==="birel"||s.type==="rel_b")&&p.attr("marker-start","url("+d+"#arrowend)"),n=-1}else{let p=i.append("path");p.attr("fill","none").attr("stroke-width","1").attr("stroke",o).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",s.startPoint.x).replaceAll("starty",s.startPoint.y).replaceAll("controlx",s.startPoint.x+(s.endPoint.x-s.startPoint.x)/2-(s.endPoint.x-s.startPoint.x)/4).replaceAll("controly",s.startPoint.y+(s.endPoint.y-s.startPoint.y)/2).replaceAll("stopx",s.endPoint.x).replaceAll("stopy",s.endPoint.y)),s.type!=="rel_b"&&p.attr("marker-end","url("+d+"#arrowhead)"),(s.type==="birel"||s.type==="rel_b")&&p.attr("marker-start","url("+d+"#arrowend)")}let f=r.messageFont();pn(r)(s.label.text,i,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+l,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+u,s.label.width,s.label.height,{fill:a},f),s.techn&&s.techn.text!==""&&(f=r.messageFont(),pn(r)("["+s.techn.text+"]",i,Math.min(s.startPoint.x,s.endPoint.x)+Math.abs(s.endPoint.x-s.startPoint.x)/2+l,Math.min(s.startPoint.y,s.endPoint.y)+Math.abs(s.endPoint.y-s.startPoint.y)/2+r.messageFontSize+5+u,Math.max(s.label.width,s.techn.width),s.techn.height,{fill:a,"font-style":"italic"},f))}},IB=function(t,e,r){const i=t.append("g");let n=e.bgColor?e.bgColor:"none",s=e.borderColor?e.borderColor:"#444444",a=e.fontColor?e.fontColor:"black",o={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(o={"stroke-width":1});let l={x:e.x,y:e.y,fill:n,stroke:s,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:o};V0(i,l);let u=r.boundaryFont();u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=a,pn(r)(e.label.text,i,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},u),e.type&&e.type.text!==""&&(u=r.boundaryFont(),u.fontColor=a,pn(r)(e.type.text,i,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},u)),e.descr&&e.descr.text!==""&&(u=r.boundaryFont(),u.fontSize=u.fontSize-2,u.fontColor=a,pn(r)(e.descr.text,i,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},u))},OB=function(t,e,r){let i=e.bgColor?e.bgColor:r[e.typeC4Shape.text+"_bg_color"],n=e.borderColor?e.borderColor:r[e.typeC4Shape.text+"_border_color"],s=e.fontColor?e.fontColor:"#FFFFFF",a="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":a="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":a="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}const o=t.append("g");o.attr("class","person-man");const l=Im();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=i,l.width=e.width,l.height=e.height,l.style="stroke:"+n+";stroke-width:0.5;",l.rx=2.5,l.ry=2.5,V0(o,l);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":o.append("path").attr("fill",i).attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",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",n).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",i).attr("stroke-width","0.5").attr("stroke",n).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",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",n).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2));break}let u=HB(r,e.typeC4Shape.text);switch(o.append("text").attr("fill",s).attr("font-family",u.fontFamily).attr("font-size",u.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":Bm(o,48,48,e.x+e.width/2-24,e.y+e.image.Y,a);break}let d=r[e.typeC4Shape.text+"Font"]();return d.fontWeight="bold",d.fontSize=d.fontSize+2,d.fontColor=s,pn(r)(e.label.text,o,e.x,e.y+e.label.Y,e.width,e.height,{fill:s},d),d=r[e.typeC4Shape.text+"Font"](),d.fontColor=s,e.thchn&&e.thchn.text!==""?pn(r)(e.thchn.text,o,e.x,e.y+e.thchn.Y,e.width,e.height,{fill:s,"font-style":"italic"},d):e.type&&e.type.text!==""&&pn(r)(e.type.text,o,e.x,e.y+e.type.Y,e.width,e.height,{fill:s,"font-style":"italic"},d),e.descr&&e.descr.text!==""&&(d=r.personFont(),d.fontColor=s,pn(r)(e.descr.text,o,e.x,e.y+e.descr.Y,e.width,e.height,{fill:s},d)),e.height},RB=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")},FB=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")},PB=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")},YB=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")},VB=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")},UB=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")},zB=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)},WB=function(t){const r=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);r.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),r.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},Im=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},HB=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),pn=function(){function t(n,s,a,o,l,u,d){const f=s.append("text").attr("x",a+l/2).attr("y",o+u/2+5).style("text-anchor","middle").text(n);i(f,d)}function e(n,s,a,o,l,u,d,f){const{fontSize:p,fontFamily:g,fontWeight:_}=f,k=n.split(he.lineBreakRegex);for(let w=0;w<k.length;w++){const S=w*p-p*(k.length-1)/2,A=s.append("text").attr("x",a+l/2).attr("y",o).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",p).style("font-weight",_).style("font-family",g);A.append("tspan").attr("dy",S).text(k[w]).attr("alignment-baseline","mathematical"),i(A,d)}}function r(n,s,a,o,l,u,d,f){const p=s.append("switch"),_=p.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",u).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");_.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,p,a,o,l,u,d,f),i(_,d)}function i(n,s){for(const a in s)s.hasOwnProperty(a)&&n.attr(a,s[a])}return function(n){return n.textPlacement==="fo"?r:n.textPlacement==="old"?t:e}}(),Oi={drawRect:V0,drawBoundary:IB,drawC4Shape:OB,drawRels:BB,drawImage:Bm,insertArrowHead:YB,insertArrowEnd:VB,insertArrowFilledHead:UB,insertDynamicNumber:zB,insertArrowCrossHead:WB,insertDatabaseIcon:RB,insertComputerIcon:FB,insertClockIcon:PB,getNoteRect:Im,sanitizeUrl:wn};let Oc=0,Rc=0,Om=4,b1=2;Nc.yy=Nm;let Zt={};class Rm{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,_1(e.db.getConfig())}setData(e,r,i,n){this.nextData.startx=this.data.startx=e,this.nextData.stopx=this.data.stopx=r,this.nextData.starty=this.data.starty=i,this.nextData.stopy=this.data.stopy=n}updateVal(e,r,i,n){e[r]===void 0?e[r]=i:e[r]=n(i,e[r])}insert(e){this.nextData.cnt=this.nextData.cnt+1;let r=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+e.margin:this.nextData.stopx+e.margin*2,i=r+e.width,n=this.nextData.starty+e.margin*2,s=n+e.height;(r>=this.data.widthLimit||i>=this.data.widthLimit||this.nextData.cnt>Om)&&(r=this.nextData.startx+e.margin+Zt.nextLinePaddingX,n=this.nextData.stopy+e.margin*2,this.nextData.stopx=i=r+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=s=n+e.height,this.nextData.cnt=1),e.x=r,e.y=n,this.updateVal(this.data,"startx",r,Math.min),this.updateVal(this.data,"starty",n,Math.min),this.updateVal(this.data,"stopx",i,Math.max),this.updateVal(this.data,"stopy",s,Math.max),this.updateVal(this.nextData,"startx",r,Math.min),this.updateVal(this.nextData,"starty",n,Math.min),this.updateVal(this.nextData,"stopx",i,Math.max),this.updateVal(this.nextData,"stopy",s,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},_1(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}}const _1=function(t){pr(Zt,t),t.fontFamily&&(Zt.personFontFamily=Zt.systemFontFamily=Zt.messageFontFamily=t.fontFamily),t.fontSize&&(Zt.personFontSize=Zt.systemFontSize=Zt.messageFontSize=t.fontSize),t.fontWeight&&(Zt.personFontWeight=Zt.systemFontWeight=Zt.messageFontWeight=t.fontWeight)},Wa=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),Wl=t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),GB=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight});function fi(t,e,r,i,n){if(!e[t].width)if(r)e[t].text=om(e[t].text,n,i),e[t].textLines=e[t].text.split(he.lineBreakRegex).length,e[t].width=n,e[t].height=g1(e[t].text,i);else{let s=e[t].text.split(he.lineBreakRegex);e[t].textLines=s.length;let a=0;e[t].height=0,e[t].width=0;for(const o of s)e[t].width=Math.max(Ui(o,i),e[t].width),a=g1(o,i),e[t].height=e[t].height+a}}const Fm=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=Zt.c4ShapeMargin-35;let i=e.wrap&&Zt.wrap,n=Wl(Zt);n.fontSize=n.fontSize+2,n.fontWeight="bold";let s=Ui(e.label.text,n);fi("label",e,i,n,s),Oi.drawBoundary(t,e,Zt)},Pm=function(t,e,r,i){let n=0;for(const s of i){n=0;const a=r[s];let o=Wa(Zt,a.typeC4Shape.text);switch(o.fontSize=o.fontSize-2,a.typeC4Shape.width=Ui("<<"+a.typeC4Shape.text+">>",o),a.typeC4Shape.height=o.fontSize+2,a.typeC4Shape.Y=Zt.c4ShapePadding,n=a.typeC4Shape.Y+a.typeC4Shape.height-4,a.image={width:0,height:0,Y:0},a.typeC4Shape.text){case"person":case"external_person":a.image.width=48,a.image.height=48,a.image.Y=n,n=a.image.Y+a.image.height;break}a.sprite&&(a.image.width=48,a.image.height=48,a.image.Y=n,n=a.image.Y+a.image.height);let l=a.wrap&&Zt.wrap,u=Zt.width-Zt.c4ShapePadding*2,d=Wa(Zt,a.typeC4Shape.text);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",fi("label",a,l,d,u),a.label.Y=n+8,n=a.label.Y+a.label.height,a.type&&a.type.text!==""){a.type.text="["+a.type.text+"]";let g=Wa(Zt,a.typeC4Shape.text);fi("type",a,l,g,u),a.type.Y=n+5,n=a.type.Y+a.type.height}else if(a.techn&&a.techn.text!==""){a.techn.text="["+a.techn.text+"]";let g=Wa(Zt,a.techn.text);fi("techn",a,l,g,u),a.techn.Y=n+5,n=a.techn.Y+a.techn.height}let f=n,p=a.label.width;if(a.descr&&a.descr.text!==""){let g=Wa(Zt,a.typeC4Shape.text);fi("descr",a,l,g,u),a.descr.Y=n+20,n=a.descr.Y+a.descr.height,p=Math.max(a.label.width,a.descr.width),f=n-a.descr.textLines*5}p=p+Zt.c4ShapePadding,a.width=Math.max(a.width||Zt.width,p,Zt.width),a.height=Math.max(a.height||Zt.height,f,Zt.height),a.margin=a.margin||Zt.c4ShapeMargin,t.insert(a),Oi.drawC4Shape(e,a,Zt)}t.bumpLastMargin(Zt.c4ShapeMargin)};class Qr{constructor(e,r){this.x=e,this.y=r}}let R2=function(t,e){let r=t.x,i=t.y,n=e.x,s=e.y,a=r+t.width/2,o=i+t.height/2,l=Math.abs(r-n),u=Math.abs(i-s),d=u/l,f=t.height/t.width,p=null;return i==s&&r<n?p=new Qr(r+t.width,o):i==s&&r>n?p=new Qr(r,o):r==n&&i<s?p=new Qr(a,i+t.height):r==n&&i>s&&(p=new Qr(a,i)),r>n&&i<s?f>=d?p=new Qr(r,o+d*t.width/2):p=new Qr(a-l/u*t.height/2,i+t.height):r<n&&i<s?f>=d?p=new Qr(r+t.width,o+d*t.width/2):p=new Qr(a+l/u*t.height/2,i+t.height):r<n&&i>s?f>=d?p=new Qr(r+t.width,o-d*t.width/2):p=new Qr(a+t.height/2*l/u,i):r>n&&i>s&&(f>=d?p=new Qr(r,o-t.width/2*d):p=new Qr(a-t.height/2*l/u,i)),p},qB=function(t,e){let r={x:0,y:0};r.x=e.x+e.width/2,r.y=e.y+e.height/2;let i=R2(t,r);r.x=t.x+t.width/2,r.y=t.y+t.height/2;let n=R2(e,r);return{startPoint:i,endPoint:n}};const jB=function(t,e,r,i){let n=0;for(let s of e){n=n+1;let a=s.wrap&&Zt.wrap,o=GB(Zt);i.db.getC4Type()==="C4Dynamic"&&(s.label.text=n+": "+s.label.text);let u=Ui(s.label.text,o);fi("label",s,a,o,u),s.techn&&s.techn.text!==""&&(u=Ui(s.techn.text,o),fi("techn",s,a,o,u)),s.descr&&s.descr.text!==""&&(u=Ui(s.descr.text,o),fi("descr",s,a,o,u));let d=r(s.from),f=r(s.to),p=qB(d,f);s.startPoint=p.startPoint,s.endPoint=p.endPoint}Oi.drawRels(t,e,Zt)};function Ym(t,e,r,i,n){let s=new Rm(n);s.data.widthLimit=r.data.widthLimit/Math.min(b1,i.length);for(let[a,o]of i.entries()){let l=0;o.image={width:0,height:0,Y:0},o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=l,l=o.image.Y+o.image.height);let u=o.wrap&&Zt.wrap,d=Wl(Zt);if(d.fontSize=d.fontSize+2,d.fontWeight="bold",fi("label",o,u,d,s.data.widthLimit),o.label.Y=l+8,l=o.label.Y+o.label.height,o.type&&o.type.text!==""){o.type.text="["+o.type.text+"]";let _=Wl(Zt);fi("type",o,u,_,s.data.widthLimit),o.type.Y=l+5,l=o.type.Y+o.type.height}if(o.descr&&o.descr.text!==""){let _=Wl(Zt);_.fontSize=_.fontSize-2,fi("descr",o,u,_,s.data.widthLimit),o.descr.Y=l+20,l=o.descr.Y+o.descr.height}if(a==0||a%b1===0){let _=r.data.startx+Zt.diagramMarginX,k=r.data.stopy+Zt.diagramMarginY+l;s.setData(_,_,k,k)}else{let _=s.data.stopx!==s.data.startx?s.data.stopx+Zt.diagramMarginX:s.data.startx,k=s.data.starty;s.setData(_,_,k,k)}s.name=o.alias;let f=n.db.getC4ShapeArray(o.alias),p=n.db.getC4ShapeKeys(o.alias);p.length>0&&Pm(s,t,f,p),e=o.alias;let g=n.db.getBoundarys(e);g.length>0&&Ym(t,e,s,g,n),o.alias!=="global"&&Fm(t,o,s),r.data.stopy=Math.max(s.data.stopy+Zt.c4ShapeMargin,r.data.stopy),r.data.stopx=Math.max(s.data.stopx+Zt.c4ShapeMargin,r.data.stopx),Oc=Math.max(Oc,r.data.stopx),Rc=Math.max(Rc,r.data.stopy)}}const $B=function(t,e,r,i){Zt=$().c4;const n=$().securityLevel;let s;n==="sandbox"&&(s=At("#i"+e));const a=At(n==="sandbox"?s.nodes()[0].contentDocument.body:"body");let o=i.db;i.db.setWrap(Zt.wrap),Om=o.getC4ShapeInRow(),b1=o.getC4BoundaryInRow(),B.debug(`C:${JSON.stringify(Zt,null,2)}`);const l=n==="sandbox"?a.select(`[id="${e}"]`):At(`[id="${e}"]`);Oi.insertComputerIcon(l),Oi.insertDatabaseIcon(l),Oi.insertClockIcon(l);let u=new Rm(i);u.setData(Zt.diagramMarginX,Zt.diagramMarginX,Zt.diagramMarginY,Zt.diagramMarginY),u.data.widthLimit=screen.availWidth,Oc=Zt.diagramMarginX,Rc=Zt.diagramMarginY;const d=i.db.getTitle();let f=i.db.getBoundarys("");Ym(l,"",u,f,i),Oi.insertArrowHead(l),Oi.insertArrowEnd(l),Oi.insertArrowCrossHead(l),Oi.insertArrowFilledHead(l),jB(l,i.db.getRels(),i.db.getC4Shape,i),u.data.stopx=Oc,u.data.stopy=Rc;const p=u.data;let _=p.stopy-p.starty+2*Zt.diagramMarginY;const w=p.stopx-p.startx+2*Zt.diagramMarginX;d&&l.append("text").text(d).attr("x",(p.stopx-p.startx)/2-4*Zt.diagramMarginX).attr("y",p.starty+Zt.diagramMarginY),Ei(l,_,w,Zt.useMaxWidth);const S=d?60:0;l.attr("viewBox",p.startx-Zt.diagramMarginX+" -"+(Zt.diagramMarginY+S)+" "+w+" "+(_+S)),B.debug("models:",p)},F2={drawPersonOrSystemArray:Pm,drawBoundary:Fm,setConf:_1,draw:$B};var x1=function(){var t=function(F,I,L,J){for(L=L||{},J=F.length;J--;L[F[J]]=I);return L},e=[1,3],r=[1,7],i=[1,8],n=[1,9],s=[1,10],a=[1,13],o=[1,12],l=[1,16,25],u=[1,20],d=[1,32],f=[1,33],p=[1,34],g=[1,36],_=[1,39],k=[1,37],w=[1,38],S=[1,44],A=[1,45],O=[1,40],P=[1,41],W=[1,42],q=[1,43],z=[1,48],H=[1,49],N=[1,50],M=[1,51],C=[16,25],v=[1,65],D=[1,66],m=[1,67],Q=[1,68],b=[1,69],ct=[1,70],Dt=[1,71],vt=[1,80],j=[16,25,32,45,46,54,60,61,62,63,64,65,66,71,73],ot=[16,25,30,32,45,46,50,54,60,61,62,63,64,65,66,71,73,88,89,90,91],rt=[5,8,9,10,11,16,19,23,25],it=[54,88,89,90,91],ut=[54,65,66,88,89,90,91],bt=[54,60,61,62,63,64,88,89,90,91],K=[16,25,32],Ot=[1,107],Y={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statments:5,direction:6,directive:7,direction_tb:8,direction_bt:9,direction_rl:10,direction_lr:11,graphConfig:12,openDirective:13,typeDirective:14,closeDirective:15,NEWLINE:16,":":17,argDirective:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,CLASS_DIAGRAM:23,statements:24,EOF:25,statement:26,className:27,alphaNumToken:28,classLiteralName:29,GENERICTYPE:30,relationStatement:31,LABEL:32,classStatement:33,methodStatement:34,annotationStatement:35,clickStatement:36,cssClassStatement:37,noteStatement:38,acc_title:39,acc_title_value:40,acc_descr:41,acc_descr_value:42,acc_descr_multiline_value:43,CLASS:44,STYLE_SEPARATOR:45,STRUCT_START:46,members:47,STRUCT_STOP:48,ANNOTATION_START:49,ANNOTATION_END:50,MEMBER:51,SEPARATOR:52,relation:53,STR:54,NOTE_FOR:55,noteText:56,NOTE:57,relationType:58,lineType:59,AGGREGATION:60,EXTENSION:61,COMPOSITION:62,DEPENDENCY:63,LOLLIPOP:64,LINE:65,DOTTED_LINE:66,CALLBACK:67,LINK:68,LINK_TARGET:69,CLICK:70,CALLBACK_NAME:71,CALLBACK_ARGS:72,HREF:73,CSSCLASS:74,commentToken:75,textToken:76,graphCodeTokens:77,textNoTagsToken:78,TAGSTART:79,TAGEND:80,"==":81,"--":82,PCT:83,DEFAULT:84,SPACE:85,MINUS:86,keywords:87,UNICODE_TEXT:88,NUM:89,ALPHA:90,BQUOTE_STR:91,$accept:0,$end:1},terminals_:{2:"error",5:"statments",8:"direction_tb",9:"direction_bt",10:"direction_rl",11:"direction_lr",16:"NEWLINE",17:":",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",23:"CLASS_DIAGRAM",25:"EOF",30:"GENERICTYPE",32:"LABEL",39:"acc_title",40:"acc_title_value",41:"acc_descr",42:"acc_descr_value",43:"acc_descr_multiline_value",44:"CLASS",45:"STYLE_SEPARATOR",46:"STRUCT_START",48:"STRUCT_STOP",49:"ANNOTATION_START",50:"ANNOTATION_END",51:"MEMBER",52:"SEPARATOR",54:"STR",55:"NOTE_FOR",57:"NOTE",60:"AGGREGATION",61:"EXTENSION",62:"COMPOSITION",63:"DEPENDENCY",64:"LOLLIPOP",65:"LINE",66:"DOTTED_LINE",67:"CALLBACK",68:"LINK",69:"LINK_TARGET",70:"CLICK",71:"CALLBACK_NAME",72:"CALLBACK_ARGS",73:"HREF",74:"CSSCLASS",77:"graphCodeTokens",79:"TAGSTART",80:"TAGEND",81:"==",82:"--",83:"PCT",84:"DEFAULT",85:"SPACE",86:"MINUS",87:"keywords",88:"UNICODE_TEXT",89:"NUM",90:"ALPHA",91:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[3,1],[3,2],[6,1],[6,1],[6,1],[6,1],[4,1],[7,4],[7,6],[13,1],[14,1],[18,1],[15,1],[12,4],[24,1],[24,2],[24,3],[27,1],[27,1],[27,2],[27,2],[27,2],[26,1],[26,2],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,2],[26,2],[26,1],[33,2],[33,4],[33,5],[33,7],[35,4],[47,1],[47,2],[34,1],[34,2],[34,1],[34,1],[31,3],[31,4],[31,4],[31,5],[38,3],[38,2],[53,3],[53,2],[53,2],[53,1],[58,1],[58,1],[58,1],[58,1],[58,1],[59,1],[59,1],[36,3],[36,4],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[37,3],[75,1],[75,1],[76,1],[76,1],[76,1],[76,1],[76,1],[76,1],[76,1],[78,1],[78,1],[78,1],[78,1],[28,1],[28,1],[28,1],[29,1],[56,1]],performAction:function(I,L,J,T,ht,V,Yt){var et=V.length-1;switch(ht){case 5:T.setDirection("TB");break;case 6:T.setDirection("BT");break;case 7:T.setDirection("RL");break;case 8:T.setDirection("LR");break;case 12:T.parseDirective("%%{","open_directive");break;case 13:T.parseDirective(V[et],"type_directive");break;case 14:V[et]=V[et].trim().replace(/'/g,'"'),T.parseDirective(V[et],"arg_directive");break;case 15:T.parseDirective("}%%","close_directive","class");break;case 20:case 21:this.$=V[et];break;case 22:this.$=V[et-1]+V[et];break;case 23:case 24:this.$=V[et-1]+"~"+V[et];break;case 25:T.addRelation(V[et]);break;case 26:V[et-1].title=T.cleanupLabel(V[et]),T.addRelation(V[et-1]);break;case 35:this.$=V[et].trim(),T.setAccTitle(this.$);break;case 36:case 37:this.$=V[et].trim(),T.setAccDescription(this.$);break;case 38:T.addClass(V[et]);break;case 39:T.addClass(V[et-2]),T.setCssClass(V[et-2],V[et]);break;case 40:T.addClass(V[et-3]),T.addMembers(V[et-3],V[et-1]);break;case 41:T.addClass(V[et-5]),T.setCssClass(V[et-5],V[et-3]),T.addMembers(V[et-5],V[et-1]);break;case 42:T.addAnnotation(V[et],V[et-2]);break;case 43:this.$=[V[et]];break;case 44:V[et].push(V[et-1]),this.$=V[et];break;case 45:break;case 46:T.addMember(V[et-1],T.cleanupLabel(V[et]));break;case 47:break;case 48:break;case 49:this.$={id1:V[et-2],id2:V[et],relation:V[et-1],relationTitle1:"none",relationTitle2:"none"};break;case 50:this.$={id1:V[et-3],id2:V[et],relation:V[et-1],relationTitle1:V[et-2],relationTitle2:"none"};break;case 51:this.$={id1:V[et-3],id2:V[et],relation:V[et-2],relationTitle1:"none",relationTitle2:V[et-1]};break;case 52:this.$={id1:V[et-4],id2:V[et],relation:V[et-2],relationTitle1:V[et-3],relationTitle2:V[et-1]};break;case 53:T.addNote(V[et],V[et-1]);break;case 54:T.addNote(V[et]);break;case 55:this.$={type1:V[et-2],type2:V[et],lineType:V[et-1]};break;case 56:this.$={type1:"none",type2:V[et],lineType:V[et-1]};break;case 57:this.$={type1:V[et-1],type2:"none",lineType:V[et]};break;case 58:this.$={type1:"none",type2:"none",lineType:V[et]};break;case 59:this.$=T.relationType.AGGREGATION;break;case 60:this.$=T.relationType.EXTENSION;break;case 61:this.$=T.relationType.COMPOSITION;break;case 62:this.$=T.relationType.DEPENDENCY;break;case 63:this.$=T.relationType.LOLLIPOP;break;case 64:this.$=T.lineType.LINE;break;case 65:this.$=T.lineType.DOTTED_LINE;break;case 66:case 72:this.$=V[et-2],T.setClickEvent(V[et-1],V[et]);break;case 67:case 73:this.$=V[et-3],T.setClickEvent(V[et-2],V[et-1]),T.setTooltip(V[et-2],V[et]);break;case 68:case 76:this.$=V[et-2],T.setLink(V[et-1],V[et]);break;case 69:this.$=V[et-3],T.setLink(V[et-2],V[et-1],V[et]);break;case 70:case 78:this.$=V[et-3],T.setLink(V[et-2],V[et-1]),T.setTooltip(V[et-2],V[et]);break;case 71:case 79:this.$=V[et-4],T.setLink(V[et-3],V[et-2],V[et]),T.setTooltip(V[et-3],V[et-1]);break;case 74:this.$=V[et-3],T.setClickEvent(V[et-2],V[et-1],V[et]);break;case 75:this.$=V[et-4],T.setClickEvent(V[et-3],V[et-2],V[et-1]),T.setTooltip(V[et-3],V[et]);break;case 77:this.$=V[et-3],T.setLink(V[et-2],V[et-1],V[et]);break;case 80:T.setCssClass(V[et-1],V[et]);break}},table:[{3:1,4:2,5:e,6:4,7:5,8:r,9:i,10:n,11:s,12:6,13:11,19:a,23:o},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{3:14,4:2,5:e,6:4,7:5,8:r,9:i,10:n,11:s,12:6,13:11,19:a,23:o},{1:[2,9]},t(l,[2,5]),t(l,[2,6]),t(l,[2,7]),t(l,[2,8]),{14:15,20:[1,16]},{16:[1,17]},{20:[2,12]},{1:[2,4]},{15:18,17:[1,19],22:u},t([17,22],[2,13]),{6:31,7:30,8:r,9:i,10:n,11:s,13:11,19:a,24:21,26:22,27:35,28:46,29:47,31:23,33:24,34:25,35:26,36:27,37:28,38:29,39:d,41:f,43:p,44:g,49:_,51:k,52:w,55:S,57:A,67:O,68:P,70:W,74:q,88:z,89:H,90:N,91:M},{16:[1,52]},{18:53,21:[1,54]},{16:[2,15]},{25:[1,55]},{16:[1,56],25:[2,17]},t(C,[2,25],{32:[1,57]}),t(C,[2,27]),t(C,[2,28]),t(C,[2,29]),t(C,[2,30]),t(C,[2,31]),t(C,[2,32]),t(C,[2,33]),t(C,[2,34]),{40:[1,58]},{42:[1,59]},t(C,[2,37]),t(C,[2,45],{53:60,58:63,59:64,32:[1,62],54:[1,61],60:v,61:D,62:m,63:Q,64:b,65:ct,66:Dt}),{27:72,28:46,29:47,88:z,89:H,90:N,91:M},t(C,[2,47]),t(C,[2,48]),{28:73,88:z,89:H,90:N},{27:74,28:46,29:47,88:z,89:H,90:N,91:M},{27:75,28:46,29:47,88:z,89:H,90:N,91:M},{27:76,28:46,29:47,88:z,89:H,90:N,91:M},{54:[1,77]},{27:78,28:46,29:47,88:z,89:H,90:N,91:M},{54:vt,56:79},t(j,[2,20],{28:46,29:47,27:81,30:[1,82],88:z,89:H,90:N,91:M}),t(j,[2,21],{30:[1,83]}),t(ot,[2,94]),t(ot,[2,95]),t(ot,[2,96]),t([16,25,30,32,45,46,54,60,61,62,63,64,65,66,71,73],[2,97]),t(rt,[2,10]),{15:84,22:u},{22:[2,14]},{1:[2,16]},{6:31,7:30,8:r,9:i,10:n,11:s,13:11,19:a,24:85,25:[2,18],26:22,27:35,28:46,29:47,31:23,33:24,34:25,35:26,36:27,37:28,38:29,39:d,41:f,43:p,44:g,49:_,51:k,52:w,55:S,57:A,67:O,68:P,70:W,74:q,88:z,89:H,90:N,91:M},t(C,[2,26]),t(C,[2,35]),t(C,[2,36]),{27:86,28:46,29:47,54:[1,87],88:z,89:H,90:N,91:M},{53:88,58:63,59:64,60:v,61:D,62:m,63:Q,64:b,65:ct,66:Dt},t(C,[2,46]),{59:89,65:ct,66:Dt},t(it,[2,58],{58:90,60:v,61:D,62:m,63:Q,64:b}),t(ut,[2,59]),t(ut,[2,60]),t(ut,[2,61]),t(ut,[2,62]),t(ut,[2,63]),t(bt,[2,64]),t(bt,[2,65]),t(C,[2,38],{45:[1,91],46:[1,92]}),{50:[1,93]},{54:[1,94]},{54:[1,95]},{71:[1,96],73:[1,97]},{28:98,88:z,89:H,90:N},{54:vt,56:99},t(C,[2,54]),t(C,[2,98]),t(j,[2,22]),t(j,[2,23]),t(j,[2,24]),{16:[1,100]},{25:[2,19]},t(K,[2,49]),{27:101,28:46,29:47,88:z,89:H,90:N,91:M},{27:102,28:46,29:47,54:[1,103],88:z,89:H,90:N,91:M},t(it,[2,57],{58:104,60:v,61:D,62:m,63:Q,64:b}),t(it,[2,56]),{28:105,88:z,89:H,90:N},{47:106,51:Ot},{27:108,28:46,29:47,88:z,89:H,90:N,91:M},t(C,[2,66],{54:[1,109]}),t(C,[2,68],{54:[1,111],69:[1,110]}),t(C,[2,72],{54:[1,112],72:[1,113]}),t(C,[2,76],{54:[1,115],69:[1,114]}),t(C,[2,80]),t(C,[2,53]),t(rt,[2,11]),t(K,[2,51]),t(K,[2,50]),{27:116,28:46,29:47,88:z,89:H,90:N,91:M},t(it,[2,55]),t(C,[2,39],{46:[1,117]}),{48:[1,118]},{47:119,48:[2,43],51:Ot},t(C,[2,42]),t(C,[2,67]),t(C,[2,69]),t(C,[2,70],{69:[1,120]}),t(C,[2,73]),t(C,[2,74],{54:[1,121]}),t(C,[2,77]),t(C,[2,78],{69:[1,122]}),t(K,[2,52]),{47:123,51:Ot},t(C,[2,40]),{48:[2,44]},t(C,[2,71]),t(C,[2,75]),t(C,[2,79]),{48:[1,124]},t(C,[2,41])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],6:[2,9],13:[2,12],14:[2,4],20:[2,15],54:[2,14],55:[2,16],85:[2,19],119:[2,44]},parseError:function(I,L){if(L.recoverable)this.trace(I);else{var J=new Error(I);throw J.hash=L,J}},parse:function(I){var L=this,J=[0],T=[],ht=[null],V=[],Yt=this.table,et="",Mt=0,Tt=0,gt=2,Et=1,wt=V.slice.call(arguments,1),pt=Object.create(this.lexer),st={yy:{}};for(var le in this.yy)Object.prototype.hasOwnProperty.call(this.yy,le)&&(st.yy[le]=this.yy[le]);pt.setInput(I,st.yy),st.yy.lexer=pt,st.yy.parser=this,typeof pt.yylloc>"u"&&(pt.yylloc={});var Xt=pt.yylloc;V.push(Xt);var jt=pt.options&&pt.options.ranges;typeof st.yy.parseError=="function"?this.parseError=st.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Kt(){var at;return at=T.pop()||pt.lex()||Et,typeof at!="number"&&(at instanceof Array&&(T=at,at=T.pop()),at=L.symbols_[at]||at),at}for(var Gt,Ee,Ht,Vt,Ft={},xt,ft,Lt,_t;;){if(Ee=J[J.length-1],this.defaultActions[Ee]?Ht=this.defaultActions[Ee]:((Gt===null||typeof Gt>"u")&&(Gt=Kt()),Ht=Yt[Ee]&&Yt[Ee][Gt]),typeof Ht>"u"||!Ht.length||!Ht[0]){var Ut="";_t=[];for(xt in Yt[Ee])this.terminals_[xt]&&xt>gt&&_t.push("'"+this.terminals_[xt]+"'");pt.showPosition?Ut="Parse error on line "+(Mt+1)+`:
|
|
1208
1208
|
`+pt.showPosition()+`
|
|
1209
1209
|
Expecting `+_t.join(", ")+", got '"+(this.terminals_[Gt]||Gt)+"'":Ut="Parse error on line "+(Mt+1)+": Unexpected "+(Gt==Et?"end of input":"'"+(this.terminals_[Gt]||Gt)+"'"),this.parseError(Ut,{text:pt.match,token:this.terminals_[Gt]||Gt,line:pt.yylineno,loc:Xt,expected:_t})}if(Ht[0]instanceof Array&&Ht.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ee+", token: "+Gt);switch(Ht[0]){case 1:J.push(Gt),ht.push(pt.yytext),V.push(pt.yylloc),J.push(Ht[1]),Gt=null,Tt=pt.yyleng,et=pt.yytext,Mt=pt.yylineno,Xt=pt.yylloc;break;case 2:if(ft=this.productions_[Ht[1]][1],Ft.$=ht[ht.length-ft],Ft._$={first_line:V[V.length-(ft||1)].first_line,last_line:V[V.length-1].last_line,first_column:V[V.length-(ft||1)].first_column,last_column:V[V.length-1].last_column},jt&&(Ft._$.range=[V[V.length-(ft||1)].range[0],V[V.length-1].range[1]]),Vt=this.performAction.apply(Ft,[et,Tt,Mt,st.yy,Ht[1],ht,V].concat(wt)),typeof Vt<"u")return Vt;ft&&(J=J.slice(0,-1*ft*2),ht=ht.slice(0,-1*ft),V=V.slice(0,-1*ft)),J.push(this.productions_[Ht[1]][0]),ht.push(Ft.$),V.push(Ft._$),Lt=Yt[J[J.length-2]][J[J.length-1]],J.push(Lt);break;case 3:return!0}}return!0}},U=function(){var F={EOF:1,parseError:function(L,J){if(this.yy.parser)this.yy.parser.parseError(L,J);else throw new Error(L)},setInput:function(I,L){return this.yy=L||this.yy||{},this._input=I,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var I=this._input[0];this.yytext+=I,this.yyleng++,this.offset++,this.match+=I,this.matched+=I;var L=I.match(/(?:\r\n?|\n).*/g);return L?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),I},unput:function(I){var L=I.length,J=I.split(/(?:\r\n?|\n)/g);this._input=I+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-L),this.offset-=L;var T=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),J.length-1&&(this.yylineno-=J.length-1);var ht=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:J?(J.length===T.length?this.yylloc.first_column:0)+T[T.length-J.length].length-J[0].length:this.yylloc.first_column-L},this.options.ranges&&(this.yylloc.range=[ht[0],ht[0]+this.yyleng-L]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
1210
1210
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(I){this.unput(this.match.slice(I))},pastInput:function(){var I=this.matched.substr(0,this.matched.length-this.match.length);return(I.length>20?"...":"")+I.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var I=this.match;return I.length<20&&(I+=this._input.substr(0,20-I.length)),(I.substr(0,20)+(I.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var I=this.pastInput(),L=new Array(I.length+1).join("-");return I+this.upcomingInput()+`
|
|
1211
1211
|
`+L+"^"},test_match:function(I,L){var J,T,ht;if(this.options.backtrack_lexer&&(ht={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(ht.yylloc.range=this.yylloc.range.slice(0))),T=I[0].match(/(?:\r\n?|\n).*/g),T&&(this.yylineno+=T.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:T?T[T.length-1].length-T[T.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+I[0].length},this.yytext+=I[0],this.match+=I[0],this.matches=I,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(I[0].length),this.matched+=I[0],J=this.performAction.call(this,this.yy,this,L,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),J)return J;if(this._backtrack){for(var V in ht)this[V]=ht[V];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var I,L,J,T;this._more||(this.yytext="",this.match="");for(var ht=this._currentRules(),V=0;V<ht.length;V++)if(J=this._input.match(this.rules[ht[V]]),J&&(!L||J[0].length>L[0].length)){if(L=J,T=V,this.options.backtrack_lexer){if(I=this.test_match(J,ht[V]),I!==!1)return I;if(this._backtrack){L=!1;continue}else return!1}else if(!this.options.flex)break}return L?(I=this.test_match(L,ht[T]),I!==!1?I:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1212
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var L=this.next();return L||this.lex()},begin:function(L){this.conditionStack.push(L)},popState:function(){var L=this.conditionStack.length-1;return L>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(L){return L=this.conditionStack.length-1-Math.abs(L||0),L>=0?this.conditionStack[L]:"INITIAL"},pushState:function(L){this.begin(L)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(L,J,T,ht){switch(T){case 0:return this.begin("open_directive"),19;case 1:return 8;case 2:return 9;case 3:return 10;case 4:return 11;case 5:return this.begin("type_directive"),20;case 6:return this.popState(),this.begin("arg_directive"),17;case 7:return this.popState(),this.popState(),22;case 8:return 21;case 9:break;case 10:break;case 11:return this.begin("acc_title"),39;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),41;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:return 16;case 19:break;case 20:return 23;case 21:return 23;case 22:return this.begin("struct"),46;case 23:return"EDGE_STATE";case 24:return"EOF_IN_STRUCT";case 25:return"OPEN_IN_STRUCT";case 26:return this.popState(),48;case 27:break;case 28:return"MEMBER";case 29:return 44;case 30:return 74;case 31:return 67;case 32:return 68;case 33:return 70;case 34:return 55;case 35:return 57;case 36:return 49;case 37:return 50;case 38:this.begin("generic");break;case 39:this.popState();break;case 40:return"GENERICTYPE";case 41:this.begin("string");break;case 42:this.popState();break;case 43:return"STR";case 44:this.begin("bqstring");break;case 45:this.popState();break;case 46:return"BQUOTE_STR";case 47:this.begin("href");break;case 48:this.popState();break;case 49:return 73;case 50:this.begin("callback_name");break;case 51:this.popState();break;case 52:this.popState(),this.begin("callback_args");break;case 53:return 71;case 54:this.popState();break;case 55:return 72;case 56:return 69;case 57:return 69;case 58:return 69;case 59:return 69;case 60:return 61;case 61:return 61;case 62:return 63;case 63:return 63;case 64:return 62;case 65:return 60;case 66:return 64;case 67:return 65;case 68:return 66;case 69:return 32;case 70:return 45;case 71:return 86;case 72:return"DOT";case 73:return"PLUS";case 74:return 83;case 75:return"EQUALS";case 76:return"EQUALS";case 77:return 90;case 78:return"PUNCTUATION";case 79:return 89;case 80:return 88;case 81:return 85;case 82:return 25}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:[{])/,/^(?:\[\*\])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:class\b)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[`])/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:_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)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},callback_args:{rules:[54,55],inclusive:!1},callback_name:{rules:[51,52,53],inclusive:!1},href:{rules:[48,49],inclusive:!1},struct:{rules:[23,24,25,26,27,28],inclusive:!1},generic:{rules:[39,40],inclusive:!1},bqstring:{rules:[45,46],inclusive:!1},string:{rules:[42,43],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,23,29,30,31,32,33,34,35,36,37,38,41,44,47,50,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82],inclusive:!0}}};return F}();Y.lexer=U;function X(){this.yy={}}return X.prototype=Y,Y.Parser=X,new X}();_1.parser=_1;const P2=_1,XB=(t,e)=>{var r;return((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:t.match(/^\s*classDiagram/)!==null},KB=(t,e)=>{var r;return t.match(/^\s*classDiagram/)!==null&&((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:t.match(/^\s*classDiagram-v2/)!==null},V0="classid-";let U0=[],Qe={},Fc=[],Y2=0,No=[];const ao=t=>he.sanitizeText(t,$()),ZB=function(t,e,r){ze.parseDirective(this,t,e,r)},Bo=function(t){let e="",r=t;if(t.indexOf("~")>0){let i=t.split("~");r=i[0],e=he.sanitizeText(i[1],$())}return{className:r,type:e}},x1=function(t){let e=Bo(t);Qe[e.className]===void 0&&(Qe[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:V0+e.className+"-"+Y2},Y2++)},Vm=function(t){const e=Object.keys(Qe);for(const r of e)if(Qe[r].id===t)return Qe[r].domId},QB=function(){U0=[],Qe={},Fc=[],No=[],No.push(zm),Ci()},JB=function(t){return Qe[t]},tI=function(){return Qe},eI=function(){return U0},rI=function(){return Fc},iI=function(t){B.debug("Adding relation: "+JSON.stringify(t)),x1(t.id1),x1(t.id2),t.id1=Bo(t.id1).className,t.id2=Bo(t.id2).className,t.relationTitle1=he.sanitizeText(t.relationTitle1.trim(),$()),t.relationTitle2=he.sanitizeText(t.relationTitle2.trim(),$()),U0.push(t)},nI=function(t,e){const r=Bo(t).className;Qe[r].annotations.push(e)},Um=function(t,e){const r=Bo(t).className,i=Qe[r];if(typeof e=="string"){const n=e.trim();n.startsWith("<<")&&n.endsWith(">>")?i.annotations.push(ao(n.substring(2,n.length-2))):n.indexOf(")")>0?i.methods.push(ao(n)):n&&i.members.push(ao(n))}},sI=function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach(r=>Um(t,r)))},aI=function(t,e){const r={id:`note${Fc.length}`,class:e,text:t};Fc.push(r)},oI=function(t){return t.substring(0,1)===":"?he.sanitizeText(t.substr(1).trim(),$()):ao(t.trim())},z0=function(t,e){t.split(",").forEach(function(r){let i=r;r[0].match(/\d/)&&(i=V0+i),Qe[i]!==void 0&&Qe[i].cssClasses.push(e)})},lI=function(t,e){const r=$();t.split(",").forEach(function(i){e!==void 0&&(Qe[i].tooltip=he.sanitizeText(e,r))})},cI=function(t){return Qe[t].tooltip},uI=function(t,e,r){const i=$();t.split(",").forEach(function(n){let s=n;n[0].match(/\d/)&&(s=V0+s),Qe[s]!==void 0&&(Qe[s].link=ye.formatUrl(e,i),i.securityLevel==="sandbox"?Qe[s].linkTarget="_top":typeof r=="string"?Qe[s].linkTarget=ao(r):Qe[s].linkTarget="_blank")}),z0(t,"clickable")},hI=function(t,e,r){t.split(",").forEach(function(i){dI(i,e,r),Qe[i].haveCallback=!0}),z0(t,"clickable")},dI=function(t,e,r){const i=$();let n=t,s=Vm(n);if(i.securityLevel==="loose"&&e!==void 0&&Qe[n]!==void 0){let a=[];if(typeof r=="string"){a=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let o=0;o<a.length;o++){let l=a[o].trim();l.charAt(0)==='"'&&l.charAt(l.length-1)==='"'&&(l=l.substr(1,l.length-2)),a[o]=l}}a.length===0&&a.push(s),No.push(function(){const o=document.querySelector(`[id="${s}"]`);o!==null&&o.addEventListener("click",function(){ye.runFunc(e,...a)},!1)})}},fI=function(t){No.forEach(function(e){e(t)})},pI={LINE:0,DOTTED_LINE:1},gI={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},zm=function(t){let e=At(".mermaidTooltip");(e._groups||e)[0][0]===null&&(e=At("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),At(t).select("svg").selectAll("g.node").on("mouseover",function(){const n=At(this);if(n.attr("title")===null)return;const a=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(n.attr("title")).style("left",window.scrollX+a.left+(a.right-a.left)/2+"px").style("top",window.scrollY+a.top-14+document.body.scrollTop+"px"),e.html(e.html().replace(/<br\/>/g,"<br/>")),n.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),At(this).classed("hover",!1)})};No.push(zm);let Wm="TB";const yI=()=>Wm,mI=t=>{Wm=t},Xs={parseDirective:ZB,setAccTitle:ii,getAccTitle:Si,getAccDescription:Li,setAccDescription:Ai,getConfig:()=>$().class,addClass:x1,bindFunctions:fI,clear:QB,getClass:JB,getClasses:tI,getNotes:rI,addAnnotation:nI,addNote:aI,getRelations:eI,addRelation:iI,getDirection:yI,setDirection:mI,addMember:Um,addMembers:sI,cleanupLabel:oI,lineType:pI,relationType:gI,setClickEvent:hI,setCssClass:z0,setLink:uI,getTooltip:cI,setTooltip:lI,lookUpDomId:Vm,setDiagramTitle:Cn,getDiagramTitle:Sn};let V2=0;const bI=function(t,e,r,i,n){const s=function(A){switch(A){case n.db.relationType.AGGREGATION:return"aggregation";case n.db.relationType.EXTENSION:return"extension";case n.db.relationType.COMPOSITION:return"composition";case n.db.relationType.DEPENDENCY:return"dependency";case n.db.relationType.LOLLIPOP:return"lollipop"}};e.points=e.points.filter(A=>!Number.isNaN(A.y));const a=e.points,o=Ca().x(function(A){return A.x}).y(function(A){return A.y}).curve(ua),l=t.append("path").attr("d",o(a)).attr("id","edge"+V2).attr("class","relation");let u="";i.arrowMarkerAbsolute&&(u=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,u=u.replace(/\(/g,"\\("),u=u.replace(/\)/g,"\\)")),r.relation.lineType==1&&l.attr("class","relation dashed-line"),r.relation.lineType==10&&l.attr("class","relation dotted-line"),r.relation.type1!=="none"&&l.attr("marker-start","url("+u+"#"+s(r.relation.type1)+"Start)"),r.relation.type2!=="none"&&l.attr("marker-end","url("+u+"#"+s(r.relation.type2)+"End)");let d,f;const p=e.points.length;let g=ye.calcLabelPosition(e.points);d=g.x,f=g.y;let _,k,w,S;if(p%2!==0&&p>1){let A=ye.calcCardinalityPosition(r.relation.type1!=="none",e.points,e.points[0]),O=ye.calcCardinalityPosition(r.relation.type2!=="none",e.points,e.points[p-1]);B.debug("cardinality_1_point "+JSON.stringify(A)),B.debug("cardinality_2_point "+JSON.stringify(O)),_=A.x,k=A.y,w=O.x,S=O.y}if(r.title!==void 0){const A=t.append("g").attr("class","classLabel"),O=A.append("text").attr("class","label").attr("x",d).attr("y",f).attr("fill","red").attr("text-anchor","middle").text(r.title);window.label=O;const P=O.node().getBBox();A.insert("rect",":first-child").attr("class","box").attr("x",P.x-i.padding/2).attr("y",P.y-i.padding/2).attr("width",P.width+i.padding).attr("height",P.height+i.padding)}B.info("Rendering relation "+JSON.stringify(r)),r.relationTitle1!==void 0&&r.relationTitle1!=="none"&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",_).attr("y",k).attr("fill","black").attr("font-size","6").text(r.relationTitle1),r.relationTitle2!==void 0&&r.relationTitle2!=="none"&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",w).attr("y",S).attr("fill","black").attr("font-size","6").text(r.relationTitle2),V2++},_I=function(t,e,r,i){B.debug("Rendering class ",e,r);const n=e.id,s={id:n,label:e.id,width:0,height:0},a=t.append("g").attr("id",i.db.lookUpDomId(n)).attr("class","classGroup");let o;e.link?o=a.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",r.textHeight+r.padding).attr("x",0):o=a.append("text").attr("y",r.textHeight+r.padding).attr("x",0);let l=!0;e.annotations.forEach(function(W){const q=o.append("tspan").text("«"+W+"»");l||q.attr("dy",r.textHeight),l=!1});let u=e.id;e.type!==void 0&&e.type!==""&&(u+="<"+e.type+">");const d=o.append("tspan").text(u).attr("class","title");l||d.attr("dy",r.textHeight);const f=o.node().getBBox().height,p=a.append("line").attr("x1",0).attr("y1",r.padding+f+r.dividerMargin/2).attr("y2",r.padding+f+r.dividerMargin/2),g=a.append("text").attr("x",r.padding).attr("y",f+r.dividerMargin+r.textHeight).attr("fill","white").attr("class","classText");l=!0,e.members.forEach(function(W){U2(g,W,l,r),l=!1});const _=g.node().getBBox(),k=a.append("line").attr("x1",0).attr("y1",r.padding+f+r.dividerMargin+_.height).attr("y2",r.padding+f+r.dividerMargin+_.height),w=a.append("text").attr("x",r.padding).attr("y",f+2*r.dividerMargin+_.height+r.textHeight).attr("fill","white").attr("class","classText");l=!0,e.methods.forEach(function(W){U2(w,W,l,r),l=!1});const S=a.node().getBBox();var A=" ";e.cssClasses.length>0&&(A=A+e.cssClasses.join(" "));const P=a.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",S.width+2*r.padding).attr("height",S.height+r.padding+.5*r.dividerMargin).attr("class",A).node().getBBox().width;return o.node().childNodes.forEach(function(W){W.setAttribute("x",(P-W.getBBox().width)/2)}),e.tooltip&&o.insert("title").text(e.tooltip),p.attr("x2",P),k.attr("x2",P),s.width=P,s.height=S.height+r.padding+.5*r.dividerMargin,s},xI=function(t,e,r,i){B.debug("Rendering note ",e,r);const n=e.id,s={id:n,text:e.text,width:0,height:0},a=t.append("g").attr("id",n).attr("class","classGroup");let o=a.append("text").attr("y",r.textHeight+r.padding).attr("x",0);const l=JSON.parse(`"${e.text}"`).split(`
|
|
1213
|
-
`);l.forEach(function(p){B.debug(`Adding line: ${p}`),o.append("tspan").text(p).attr("class","title").attr("dy",r.textHeight)});const u=a.node().getBBox(),f=a.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",u.width+2*r.padding).attr("height",u.height+l.length*r.textHeight+r.padding+.5*r.dividerMargin).node().getBBox().width;return o.node().childNodes.forEach(function(p){p.setAttribute("x",(f-p.getBBox().width)/2)}),s.width=f,s.height=u.height+l.length*r.textHeight+r.padding+.5*r.dividerMargin,s},Pc=function(t){const e=/^([#+~-])?(\w+)(~\w+~|\[])?\s+(\w+) *([$*])?$/,r=/^([#+|~-])?(\w+) *\( *(.*)\) *([$*])? *(\w*[[\]|~]*\s*\w*~?)$/;let i=t.match(e),n=t.match(r);return i&&!n?vI(i):n?kI(n):wI(t)},vI=function(t){let e="",r="";try{let i=t[1]?t[1].trim():"",n=t[2]?t[2].trim():"",s=t[3]?Vn(t[3].trim()):"",a=t[4]?t[4].trim():"",o=t[5]?t[5].trim():"";r=i+n+s+" "+a,e=W0(o)}catch{r=t}return{displayText:r,cssStyle:e}},kI=function(t){let e="",r="";try{let i=t[1]?t[1].trim():"",n=t[2]?t[2].trim():"",s=t[3]?Vn(t[3].trim()):"",a=t[4]?t[4].trim():"",o=t[5]?" : "+Vn(t[5]).trim():"";r=i+n+"("+s+")"+o,e=W0(a)}catch{r=t}return{displayText:r,cssStyle:e}},wI=function(t){let e="",r="",i="",n=t.indexOf("("),s=t.indexOf(")");if(n>1&&s>n&&s<=t.length){let a="",o="",l=t.substring(0,1);l.match(/\w/)?o=t.substring(0,n).trim():(l.match(/[#+~-]/)&&(a=l),o=t.substring(1,n).trim());const u=t.substring(n+1,s);t.substring(s+1,1),r=W0(t.substring(s+1,s+2)),e=a+o+"("+Vn(u.trim())+")",s<t.length&&(i=t.substring(s+2).trim(),i!==""&&(i=" : "+Vn(i),e+=i))}else e=Vn(t);return{displayText:e,cssStyle:r}},U2=function(t,e,r,i){let n=Pc(e);const s=t.append("tspan").attr("x",i.padding).text(n.displayText);n.cssStyle!==""&&s.attr("style",n.cssStyle),r||s.attr("dy",i.textHeight)},W0=function(t){switch(t){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}},Th={drawClass:_I,drawEdge:bI,drawNote:xI,parseMember:Pc};let Hl={};const Tl=20,Ha=function(t){const e=Object.entries(Hl).find(r=>r[1].label===t);if(e)return e[0]},TI=function(t){t.append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),t.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},EI=function(t,e,r,i){const n=$().class;Hl={},B.info("Rendering diagram "+t);const s=$().securityLevel;let a;s==="sandbox"&&(a=At("#i"+e));const o=At(s==="sandbox"?a.nodes()[0].contentDocument.body:"body"),l=o.select(`[id='${e}']`);TI(l);const u=new or({multigraph:!0});u.setGraph({isMultiGraph:!0}),u.setDefaultEdgeLabel(function(){return{}});const d=i.db.getClasses(),f=Object.keys(d);for(const A of f){const O=d[A],P=Th.drawClass(l,O,n,i);Hl[P.id]=P,u.setNode(P.id,P),B.info("Org height: "+P.height)}i.db.getRelations().forEach(function(A){B.info("tjoho"+Ha(A.id1)+Ha(A.id2)+JSON.stringify(A)),u.setEdge(Ha(A.id1),Ha(A.id2),{relation:A},A.title||"DEFAULT")}),i.db.getNotes().forEach(function(A){B.debug(`Adding note: ${JSON.stringify(A)}`);const O=Th.drawNote(l,A,n,i);Hl[O.id]=O,u.setNode(O.id,O),A.class&&A.class in d&&u.setEdge(A.id,Ha(A.class),{relation:{id1:A.id,id2:A.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),Ma(u),u.nodes().forEach(function(A){A!==void 0&&u.node(A)!==void 0&&(B.debug("Node "+A+": "+JSON.stringify(u.node(A))),o.select("#"+(i.db.lookUpDomId(A)||A)).attr("transform","translate("+(u.node(A).x-u.node(A).width/2)+","+(u.node(A).y-u.node(A).height/2)+" )"))}),u.edges().forEach(function(A){A!==void 0&&u.edge(A)!==void 0&&(B.debug("Edge "+A.v+" -> "+A.w+": "+JSON.stringify(u.edge(A))),Th.drawEdge(l,u.edge(A),u.edge(A).relation,n,i))});const _=l.node().getBBox(),k=_.width+Tl*2,w=_.height+Tl*2;Ei(l,w,k,n.useMaxWidth);const S=`${_.x-Tl} ${_.y-Tl} ${k} ${w}`;B.debug(`viewBox ${S}`),l.attr("viewBox",S)},CI={draw:EI},SI=(t,e,r,i)=>{e.forEach(n=>{FI[n](t,r,i)})},AI=(t,e,r)=>{B.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",e+"-extensionStart").attr("class","marker extension "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},LI=(t,e)=>{t.append("defs").append("marker").attr("id",e+"-compositionStart").attr("class","marker composition "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},DI=(t,e)=>{t.append("defs").append("marker").attr("id",e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},MI=(t,e)=>{t.append("defs").append("marker").attr("id",e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},NI=(t,e)=>{t.append("defs").append("marker").attr("id",e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","white").attr("cx",6).attr("cy",7).attr("r",6)},BI=(t,e)=>{t.append("marker").attr("id",e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",10).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",e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",0).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")},II=(t,e)=>{t.append("marker").attr("id",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",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")},OI=(t,e)=>{t.append("marker").attr("id",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",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")},RI=(t,e)=>{t.append("defs").append("marker").attr("id",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")},FI={extension:AI,composition:LI,aggregation:DI,dependency:MI,lollipop:NI,point:BI,circle:II,cross:OI,barb:RI},PI=SI;function YI(t,e){e&&t.attr("style",e)}function VI(t){const e=At(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),i=t.label,n=t.isNode?"nodeLabel":"edgeLabel";return r.html('<span class="'+n+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+i+"</span>"),YI(r,t.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}const UI=(t,e,r,i)=>{let n=t||"";if(typeof n=="object"&&(n=n[0]),gr($().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"<br />"),B.info("vertexText"+n);const s={isNode:i,label:yd(n).replace(/fa[blrs]?:fa-[\w-]+/g,o=>`<i class='${o.replace(":"," ")}'></i>`),labelStyle:e.replace("fill:","color:")};return VI(s)}else{const s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",e.replace("color:","fill:"));let a=[];typeof n=="string"?a=n.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(n)?a=n:a=[];for(const o of a){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=o.trim(),s.appendChild(l)}return s}},Yr=UI,Cr=(t,e,r,i)=>{let n;r?n=r:n="node default";const s=t.insert("g").attr("class",n).attr("id",e.domId||e.id),a=s.insert("g").attr("class","label").attr("style",e.labelStyle);let o;e.labelText===void 0?o="":o=typeof e.labelText=="string"?e.labelText:e.labelText[0];const l=a.node().appendChild(Yr(vi(yd(o),$()),e.labelStyle,!1,i));let u=l.getBBox();if(gr($().flowchart.htmlLabels)){const f=l.children[0],p=At(l);u=f.getBoundingClientRect(),p.attr("width",u.width),p.attr("height",u.height)}const d=e.padding/2;return a.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),{shapeSvg:s,bbox:u,halfPadding:d,label:a}},Je=(t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height};function An(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}let Te={},pi={},Hm={};const zI=()=>{pi={},Hm={},Te={}},Yc=(t,e)=>(B.trace("In isDecendant",e," ",t," = ",pi[e].includes(t)),!!pi[e].includes(t)),WI=(t,e)=>(B.info("Decendants of ",e," is ",pi[e]),B.info("Edge is ",t),t.v===e||t.w===e?!1:pi[e]?pi[e].includes(t.v)||Yc(t.v,e)||Yc(t.w,e)||pi[e].includes(t.w):(B.debug("Tilt, ",e,",not in decendants"),!1)),Gm=(t,e,r,i)=>{B.warn("Copying children of ",t,"root",i,"data",e.node(t),i);const n=e.children(t)||[];t!==i&&n.push(t),B.warn("Copying (nodes) clusterId",t,"nodes",n),n.forEach(s=>{if(e.children(s).length>0)Gm(s,e,r,i);else{const a=e.node(s);B.info("cp ",s," to ",i," with parent ",t),r.setNode(s,a),i!==e.parent(s)&&(B.warn("Setting parent",s,e.parent(s)),r.setParent(s,e.parent(s))),t!==i&&s!==t?(B.debug("Setting parent",s,t),r.setParent(s,t)):(B.info("In copy ",t,"root",i,"data",e.node(t),i),B.debug("Not Setting parent for node=",s,"cluster!==rootId",t!==i,"node!==clusterId",s!==t));const o=e.edges(s);B.debug("Copying Edges",o),o.forEach(l=>{B.info("Edge",l);const u=e.edge(l.v,l.w,l.name);B.info("Edge data",u,i);try{WI(l,i)?(B.info("Copying as ",l.v,l.w,u,l.name),r.setEdge(l.v,l.w,u,l.name),B.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):B.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",i," clusterId:",t)}catch(d){B.error(d)}})}B.debug("Removing node",s),e.removeNode(s)})},qm=(t,e)=>{const r=e.children(t);let i=[...r];for(const n of r)Hm[n]=t,i=[...i,...qm(n,e)];return i},Io=(t,e)=>{B.trace("Searching",t);const r=e.children(t);if(B.trace("Searching children of id ",t,r),r.length<1)return B.trace("This is a valid node",t),t;for(const i of r){const n=Io(i,e);if(n)return B.trace("Found replacement for",t," => ",n),n}},El=t=>!Te[t]||!Te[t].externalConnections?t:Te[t]?Te[t].id:t,HI=(t,e)=>{if(!t||e>10){B.debug("Opting out, no graph ");return}else B.debug("Opting in, graph ");t.nodes().forEach(function(r){t.children(r).length>0&&(B.warn("Cluster identified",r," Replacement id in edges: ",Io(r,t)),pi[r]=qm(r,t),Te[r]={id:Io(r,t),clusterData:t.node(r)})}),t.nodes().forEach(function(r){const i=t.children(r),n=t.edges();i.length>0?(B.debug("Cluster identified",r,pi),n.forEach(s=>{if(s.v!==r&&s.w!==r){const a=Yc(s.v,r),o=Yc(s.w,r);a^o&&(B.warn("Edge: ",s," leaves cluster ",r),B.warn("Decendants of XXX ",r,": ",pi[r]),Te[r].externalConnections=!0)}})):B.debug("Not a cluster ",r,pi)}),t.edges().forEach(function(r){const i=t.edge(r);B.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),B.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(t.edge(r)));let n=r.v,s=r.w;if(B.warn("Fix XXX",Te,"ids:",r.v,r.w,"Translating: ",Te[r.v]," --- ",Te[r.w]),Te[r.v]&&Te[r.w]&&Te[r.v]===Te[r.w]){B.warn("Fixing and trixing link to self - removing XXX",r.v,r.w,r.name),B.warn("Fixing and trixing - removing XXX",r.v,r.w,r.name),n=El(r.v),s=El(r.w),t.removeEdge(r.v,r.w,r.name);const a=r.w+"---"+r.v;t.setNode(a,{domId:a,id:a,labelStyle:"",labelText:i.label,padding:0,shape:"labelRect",style:""});const o=JSON.parse(JSON.stringify(i)),l=JSON.parse(JSON.stringify(i));o.label="",o.arrowTypeEnd="none",l.label="",o.fromCluster=r.v,l.toCluster=r.v,t.setEdge(n,a,o,r.name+"-cyclic-special"),t.setEdge(a,s,l,r.name+"-cyclic-special")}else(Te[r.v]||Te[r.w])&&(B.warn("Fixing and trixing - removing XXX",r.v,r.w,r.name),n=El(r.v),s=El(r.w),t.removeEdge(r.v,r.w,r.name),n!==r.v&&(i.fromCluster=r.v),s!==r.w&&(i.toCluster=r.w),B.warn("Fix Replacing with XXX",n,s,r.name),t.setEdge(n,s,i,r.name))}),B.warn("Adjusted Graph",fn(t)),jm(t,0),B.trace(Te)},jm=(t,e)=>{if(B.warn("extractor - ",e,fn(t),t.children("D")),e>10){B.error("Bailing out");return}let r=t.nodes(),i=!1;for(const n of r){const s=t.children(n);i=i||s.length>0}if(!i){B.debug("Done, no node has children",t.nodes());return}B.debug("Nodes = ",r,e);for(const n of r)if(B.debug("Extracting node",n,Te,Te[n]&&!Te[n].externalConnections,!t.parent(n),t.node(n),t.children("D")," Depth ",e),!Te[n])B.debug("Not a cluster",n,e);else if(!Te[n].externalConnections&&t.children(n)&&t.children(n).length>0){B.warn("Cluster without external connections, without a parent and with children",n,e);let a=t.graph().rankdir==="TB"?"LR":"TB";Te[n]&&Te[n].clusterData&&Te[n].clusterData.dir&&(a=Te[n].clusterData.dir,B.warn("Fixing dir",Te[n].clusterData.dir,a));const o=new or({multigraph:!0,compound:!0}).setGraph({rankdir:a,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});B.warn("Old graph before copy",fn(t)),Gm(n,t,o,n),t.setNode(n,{clusterNode:!0,id:n,clusterData:Te[n].clusterData,labelText:Te[n].labelText,graph:o}),B.warn("New graph after copy node: (",n,")",fn(o)),B.debug("Old graph after copy",fn(t))}else B.warn("Cluster ** ",n," **not meeting the criteria !externalConnections:",!Te[n].externalConnections," no parent: ",!t.parent(n)," children ",t.children(n)&&t.children(n).length>0,t.children("D"),e),B.debug(Te);r=t.nodes(),B.warn("New list of nodes",r);for(const n of r){const s=t.node(n);B.warn(" Now next level",n,s),s.clusterNode&&jm(s.graph,e+1)}},$m=(t,e)=>{if(e.length===0)return[];let r=Object.assign(e);return e.forEach(i=>{const n=t.children(i),s=$m(t,n);r=[...r,...s]}),r},GI=t=>$m(t,t.children());function qI(t,e){return t.intersect(e)}function Xm(t,e,r,i){var n=t.x,s=t.y,a=n-i.x,o=s-i.y,l=Math.sqrt(e*e*o*o+r*r*a*a),u=Math.abs(e*r*a/l);i.x<n&&(u=-u);var d=Math.abs(e*r*o/l);return i.y<s&&(d=-d),{x:n+u,y:s+d}}function jI(t,e,r){return Xm(t,e,e,r)}function $I(t,e,r,i){var n,s,a,o,l,u,d,f,p,g,_,k,w,S,A;if(n=e.y-t.y,a=t.x-e.x,l=e.x*t.y-t.x*e.y,p=n*r.x+a*r.y+l,g=n*i.x+a*i.y+l,!(p!==0&&g!==0&&z2(p,g))&&(s=i.y-r.y,o=r.x-i.x,u=i.x*r.y-r.x*i.y,d=s*t.x+o*t.y+u,f=s*e.x+o*e.y+u,!(d!==0&&f!==0&&z2(d,f))&&(_=n*o-s*a,_!==0)))return k=Math.abs(_/2),w=a*u-o*l,S=w<0?(w-k)/_:(w+k)/_,w=s*l-n*u,A=w<0?(w-k)/_:(w+k)/_,{x:S,y:A}}function z2(t,e){return t*e>0}function XI(t,e,r){var i=t.x,n=t.y,s=[],a=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(_){a=Math.min(a,_.x),o=Math.min(o,_.y)}):(a=Math.min(a,e.x),o=Math.min(o,e.y));for(var l=i-t.width/2-a,u=n-t.height/2-o,d=0;d<e.length;d++){var f=e[d],p=e[d<e.length-1?d+1:0],g=$I(t,r,{x:l+f.x,y:u+f.y},{x:l+p.x,y:u+p.y});g&&s.push(g)}return s.length?(s.length>1&&s.sort(function(_,k){var w=_.x-r.x,S=_.y-r.y,A=Math.sqrt(w*w+S*S),O=k.x-r.x,P=k.y-r.y,W=Math.sqrt(O*O+P*P);return A<W?-1:A===W?0:1}),s[0]):t}const KI=(t,e)=>{var r=t.x,i=t.y,n=e.x-r,s=e.y-i,a=t.width/2,o=t.height/2,l,u;return Math.abs(s)*a>Math.abs(n)*o?(s<0&&(o=-o),l=s===0?0:o*n/s,u=o):(n<0&&(a=-a),l=a,u=n===0?0:a*s/n),{x:r+l,y:i+u}},Xo=KI,$e={node:qI,circle:jI,ellipse:Xm,polygon:XI,rect:Xo},ZI=(t,e)=>{const{shapeSvg:r,bbox:i,halfPadding:n}=Cr(t,e,"node "+e.classes,!0);B.info("Classes = ",e.classes);const s=r.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-n).attr("y",-i.height/2-n).attr("width",i.width+e.padding).attr("height",i.height+e.padding),Je(e,s),e.intersect=function(a){return $e.rect(e,a)},r},QI=ZI,JI=(t,e)=>{const{shapeSvg:r,bbox:i}=Cr(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=n+s,o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}];B.info("Question main (Circle)");const l=An(r,a,a,o);return l.attr("style",e.style),Je(e,l),e.intersect=function(u){return B.warn("Intersect called"),$e.polygon(e,o,u)},r},tO=(t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=28,n=[{x:0,y:i/2},{x:i/2,y:0},{x:0,y:-i/2},{x:-i/2,y:0}];return r.insert("polygon",":first-child").attr("points",n.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(a){return $e.circle(e,14,a)},r},eO=(t,e)=>{const{shapeSvg:r,bbox:i}=Cr(t,e,void 0,!0),n=4,s=i.height+e.padding,a=s/n,o=i.width+2*a+e.padding,l=[{x:a,y:0},{x:o-a,y:0},{x:o,y:-s/2},{x:o-a,y:-s},{x:a,y:-s},{x:0,y:-s/2}],u=An(r,o,s,l);return u.attr("style",e.style),Je(e,u),e.intersect=function(d){return $e.polygon(e,l,d)},r},rO=(t,e)=>{const{shapeSvg:r,bbox:i}=Cr(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=[{x:-s/2,y:0},{x:n,y:0},{x:n,y:-s},{x:-s/2,y:-s},{x:0,y:-s/2}];return An(r,n,s,a).attr("style",e.style),e.width=n+s,e.height=s,e.intersect=function(l){return $e.polygon(e,a,l)},r},iO=(t,e)=>{const{shapeSvg:r,bbox:i}=Cr(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=[{x:-2*s/6,y:0},{x:n-s/6,y:0},{x:n+2*s/6,y:-s},{x:s/6,y:-s}],o=An(r,n,s,a);return o.attr("style",e.style),Je(e,o),e.intersect=function(l){return $e.polygon(e,a,l)},r},nO=(t,e)=>{const{shapeSvg:r,bbox:i}=Cr(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=[{x:2*s/6,y:0},{x:n+s/6,y:0},{x:n-2*s/6,y:-s},{x:-s/6,y:-s}],o=An(r,n,s,a);return o.attr("style",e.style),Je(e,o),e.intersect=function(l){return $e.polygon(e,a,l)},r},sO=(t,e)=>{const{shapeSvg:r,bbox:i}=Cr(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=[{x:-2*s/6,y:0},{x:n+2*s/6,y:0},{x:n-s/6,y:-s},{x:s/6,y:-s}],o=An(r,n,s,a);return o.attr("style",e.style),Je(e,o),e.intersect=function(l){return $e.polygon(e,a,l)},r},aO=(t,e)=>{const{shapeSvg:r,bbox:i}=Cr(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=[{x:s/6,y:0},{x:n-s/6,y:0},{x:n+2*s/6,y:-s},{x:-2*s/6,y:-s}],o=An(r,n,s,a);return o.attr("style",e.style),Je(e,o),e.intersect=function(l){return $e.polygon(e,a,l)},r},oO=(t,e)=>{const{shapeSvg:r,bbox:i}=Cr(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=[{x:0,y:0},{x:n+s/2,y:0},{x:n,y:-s/2},{x:n+s/2,y:-s},{x:0,y:-s}],o=An(r,n,s,a);return o.attr("style",e.style),Je(e,o),e.intersect=function(l){return $e.polygon(e,a,l)},r},lO=(t,e)=>{const{shapeSvg:r,bbox:i}=Cr(t,e,void 0,!0),n=i.width+e.padding,s=n/2,a=s/(2.5+n/50),o=i.height+a+e.padding,l="M 0,"+a+" a "+s+","+a+" 0,0,0 "+n+" 0 a "+s+","+a+" 0,0,0 "+-n+" 0 l 0,"+o+" a "+s+","+a+" 0,0,0 "+n+" 0 l 0,"+-o,u=r.attr("label-offset-y",a).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-n/2+","+-(o/2+a)+")");return Je(e,u),e.intersect=function(d){const f=$e.rect(e,d),p=f.x-e.x;if(s!=0&&(Math.abs(p)<e.width/2||Math.abs(p)==e.width/2&&Math.abs(f.y-e.y)>e.height/2-a)){let g=a*a*(1-p*p/(s*s));g!=0&&(g=Math.sqrt(g)),g=a-g,d.y-e.y>0&&(g=-g),f.y+=g}return f},r},cO=(t,e)=>{const{shapeSvg:r,bbox:i,halfPadding:n}=Cr(t,e,"node "+e.classes,!0);B.trace("Classes = ",e.classes);const s=r.insert("rect",":first-child"),a=i.width+e.padding,o=i.height+e.padding;if(s.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-n).attr("y",-i.height/2-n).attr("width",a).attr("height",o),e.props){const l=new Set(Object.keys(e.props));e.props.borders&&(Km(s,e.props.borders,a,o),l.delete("borders")),l.forEach(u=>{B.warn(`Unknown node property ${u}`)})}return Je(e,s),e.intersect=function(l){return $e.rect(e,l)},r},uO=(t,e)=>{const{shapeSvg:r}=Cr(t,e,"label",!0);B.trace("Classes = ",e.classes);const i=r.insert("rect",":first-child"),n=0,s=0;if(i.attr("width",n).attr("height",s),r.attr("class","label edgeLabel"),e.props){const a=new Set(Object.keys(e.props));e.props.borders&&(Km(i,e.props.borders,n,s),a.delete("borders")),a.forEach(o=>{B.warn(`Unknown node property ${o}`)})}return Je(e,i),e.intersect=function(a){return $e.rect(e,a)},r};function Km(t,e,r,i){const n=[],s=o=>{n.push(o,0)},a=o=>{n.push(0,o)};e.includes("t")?(B.debug("add top border"),s(r)):a(r),e.includes("r")?(B.debug("add right border"),s(i)):a(i),e.includes("b")?(B.debug("add bottom border"),s(r)):a(r),e.includes("l")?(B.debug("add left border"),s(i)):a(i),t.attr("stroke-dasharray",n.join(" "))}const hO=(t,e)=>{let r;e.classes?r="node "+e.classes:r="node default";const i=t.insert("g").attr("class",r).attr("id",e.domId||e.id),n=i.insert("rect",":first-child"),s=i.insert("line"),a=i.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText;let l="";typeof o=="object"?l=o[0]:l=o,B.info("Label text abc79",l,o,typeof o=="object");const u=a.node().appendChild(Yr(l,e.labelStyle,!0,!0));let d={width:0,height:0};if(gr($().flowchart.htmlLabels)){const k=u.children[0],w=At(u);d=k.getBoundingClientRect(),w.attr("width",d.width),w.attr("height",d.height)}B.info("Text 2",o);const f=o.slice(1,o.length);let p=u.getBBox();const g=a.node().appendChild(Yr(f.join?f.join("<br/>"):f,e.labelStyle,!0,!0));if(gr($().flowchart.htmlLabels)){const k=g.children[0],w=At(g);d=k.getBoundingClientRect(),w.attr("width",d.width),w.attr("height",d.height)}const _=e.padding/2;return At(g).attr("transform","translate( "+(d.width>p.width?0:(p.width-d.width)/2)+", "+(p.height+_+5)+")"),At(u).attr("transform","translate( "+(d.width<p.width?0:-(p.width-d.width)/2)+", "+0+")"),d=a.node().getBBox(),a.attr("transform","translate("+-d.width/2+", "+(-d.height/2-_+3)+")"),n.attr("class","outer title-state").attr("x",-d.width/2-_).attr("y",-d.height/2-_).attr("width",d.width+e.padding).attr("height",d.height+e.padding),s.attr("class","divider").attr("x1",-d.width/2-_).attr("x2",d.width/2+_).attr("y1",-d.height/2-_+p.height+_).attr("y2",-d.height/2-_+p.height+_),Je(e,n),e.intersect=function(k){return $e.rect(e,k)},i},dO=(t,e)=>{const{shapeSvg:r,bbox:i}=Cr(t,e,void 0,!0),n=i.height+e.padding,s=i.width+n/4+e.padding,a=r.insert("rect",":first-child").attr("style",e.style).attr("rx",n/2).attr("ry",n/2).attr("x",-s/2).attr("y",-n/2).attr("width",s).attr("height",n);return Je(e,a),e.intersect=function(o){return $e.rect(e,o)},r},fO=(t,e)=>{const{shapeSvg:r,bbox:i,halfPadding:n}=Cr(t,e,void 0,!0),s=r.insert("circle",":first-child");return s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+n).attr("width",i.width+e.padding).attr("height",i.height+e.padding),B.info("Circle main"),Je(e,s),e.intersect=function(a){return B.info("Circle intersect",e,i.width/2+n,a),$e.circle(e,i.width/2+n,a)},r},pO=(t,e)=>{const{shapeSvg:r,bbox:i,halfPadding:n}=Cr(t,e,void 0,!0),s=5,a=r.insert("g",":first-child"),o=a.insert("circle"),l=a.insert("circle");return o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+n+s).attr("width",i.width+e.padding+s*2).attr("height",i.height+e.padding+s*2),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+n).attr("width",i.width+e.padding).attr("height",i.height+e.padding),B.info("DoubleCircle main"),Je(e,o),e.intersect=function(u){return B.info("DoubleCircle intersect",e,i.width/2+n+s,u),$e.circle(e,i.width/2+n+s,u)},r},gO=(t,e)=>{const{shapeSvg:r,bbox:i}=Cr(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=[{x:0,y:0},{x:n,y:0},{x:n,y:-s},{x:0,y:-s},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-s},{x:-8,y:-s},{x:-8,y:0}],o=An(r,n,s,a);return o.attr("style",e.style),Je(e,o),e.intersect=function(l){return $e.polygon(e,a,l)},r},yO=(t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Je(e,i),e.intersect=function(n){return $e.circle(e,7,n)},r},W2=(t,e,r)=>{const i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let n=70,s=10;r==="LR"&&(n=10,s=70);const a=i.append("rect").attr("x",-1*n/2).attr("y",-1*s/2).attr("width",n).attr("height",s).attr("class","fork-join");return Je(e,a),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(o){return $e.rect(e,o)},i},mO=(t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=r.insert("circle",":first-child"),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),i.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),Je(e,n),e.intersect=function(s){return $e.circle(e,7,s)},r},bO=(t,e)=>{const r=e.padding/2,i=4,n=8;let s;e.classes?s="node "+e.classes:s="node default";const a=t.insert("g").attr("class",s).attr("id",e.domId||e.id),o=a.insert("rect",":first-child"),l=a.insert("line"),u=a.insert("line");let d=0,f=i;const p=a.insert("g").attr("class","label");let g=0;const _=e.classData.annotations&&e.classData.annotations[0],k=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",w=p.node().appendChild(Yr(k,e.labelStyle,!0,!0));let S=w.getBBox();if(gr($().flowchart.htmlLabels)){const H=w.children[0],N=At(w);S=H.getBoundingClientRect(),N.attr("width",S.width),N.attr("height",S.height)}e.classData.annotations[0]&&(f+=S.height+i,d+=S.width);let A=e.classData.id;e.classData.type!==void 0&&e.classData.type!==""&&($().flowchart.htmlLabels?A+="<"+e.classData.type+">":A+="<"+e.classData.type+">");const O=p.node().appendChild(Yr(A,e.labelStyle,!0,!0));At(O).attr("class","classTitle");let P=O.getBBox();if(gr($().flowchart.htmlLabels)){const H=O.children[0],N=At(O);P=H.getBoundingClientRect(),N.attr("width",P.width),N.attr("height",P.height)}f+=P.height+i,P.width>d&&(d=P.width);const W=[];e.classData.members.forEach(H=>{const N=Pc(H);let M=N.displayText;$().flowchart.htmlLabels&&(M=M.replace(/</g,"<").replace(/>/g,">"));const C=p.node().appendChild(Yr(M,N.cssStyle?N.cssStyle:e.labelStyle,!0,!0));let v=C.getBBox();if(gr($().flowchart.htmlLabels)){const D=C.children[0],m=At(C);v=D.getBoundingClientRect(),m.attr("width",v.width),m.attr("height",v.height)}v.width>d&&(d=v.width),f+=v.height+i,W.push(C)}),f+=n;const q=[];if(e.classData.methods.forEach(H=>{const N=Pc(H);let M=N.displayText;$().flowchart.htmlLabels&&(M=M.replace(/</g,"<").replace(/>/g,">"));const C=p.node().appendChild(Yr(M,N.cssStyle?N.cssStyle:e.labelStyle,!0,!0));let v=C.getBBox();if(gr($().flowchart.htmlLabels)){const D=C.children[0],m=At(C);v=D.getBoundingClientRect(),m.attr("width",v.width),m.attr("height",v.height)}v.width>d&&(d=v.width),f+=v.height+i,q.push(C)}),f+=n,_){let H=(d-S.width)/2;At(w).attr("transform","translate( "+(-1*d/2+H)+", "+-1*f/2+")"),g=S.height+i}let z=(d-P.width)/2;return At(O).attr("transform","translate( "+(-1*d/2+z)+", "+(-1*f/2+g)+")"),g+=P.height+i,l.attr("class","divider").attr("x1",-d/2-r).attr("x2",d/2+r).attr("y1",-f/2-r+n+g).attr("y2",-f/2-r+n+g),g+=n,W.forEach(H=>{At(H).attr("transform","translate( "+-d/2+", "+(-1*f/2+g+n/2)+")"),g+=P.height+i}),g+=n,u.attr("class","divider").attr("x1",-d/2-r).attr("x2",d/2+r).attr("y1",-f/2-r+n+g).attr("y2",-f/2-r+n+g),g+=n,q.forEach(H=>{At(H).attr("transform","translate( "+-d/2+", "+(-1*f/2+g)+")"),g+=P.height+i}),o.attr("class","outer title-state").attr("x",-d/2-r).attr("y",-(f/2)-r).attr("width",d+e.padding).attr("height",f+e.padding),Je(e,o),e.intersect=function(H){return $e.rect(e,H)},a},H2={question:JI,rect:cO,labelRect:uO,rectWithTitle:hO,choice:tO,circle:fO,doublecircle:pO,stadium:dO,hexagon:eO,rect_left_inv_arrow:rO,lean_right:iO,lean_left:nO,trapezoid:sO,inv_trapezoid:aO,rect_right_inv_arrow:oO,cylinder:lO,start:yO,end:mO,note:QI,subroutine:gO,fork:W2,join:W2,class_box:bO};let ra={};const _O=(t,e,r)=>{let i,n;if(e.link){let s;$().securityLevel==="sandbox"?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s),n=H2[e.shape](i,e,r)}else n=H2[e.shape](t,e,r),i=n;e.tooltip&&n.attr("title",e.tooltip),e.class&&n.attr("class","node default "+e.class),ra[e.id]=i,e.haveCallback&&ra[e.id].attr("class",ra[e.id].attr("class")+" clickable")},xO=(t,e)=>{ra[e.id]=t},vO=()=>{ra={}},G2=t=>{const e=ra[t.id];B.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=8,i=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+i-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),i},kO=(t,e)=>{B.trace("Creating subgraph rect for ",e.id,e);const r=t.insert("g").attr("class","cluster"+(e.class?" "+e.class:"")).attr("id",e.id),i=r.insert("rect",":first-child"),n=r.insert("g").attr("class","cluster-label"),s=n.node().appendChild(Yr(e.labelText,e.labelStyle,void 0,!0));let a=s.getBBox();if(gr($().flowchart.htmlLabels)){const f=s.children[0],p=At(s);a=f.getBoundingClientRect(),p.attr("width",a.width),p.attr("height",a.height)}const o=0*e.padding,l=o/2,u=e.width<=a.width+o?a.width+o:e.width;e.width<=a.width+o?e.diff=(a.width-e.width)/2-e.padding/2:e.diff=-e.padding/2,B.trace("Data ",e,JSON.stringify(e)),i.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-u/2).attr("y",e.y-e.height/2-l).attr("width",u).attr("height",e.height+o),n.attr("transform","translate("+(e.x-a.width/2)+", "+(e.y-e.height/2)+")");const d=i.node().getBBox();return e.width=d.width,e.height=d.height,e.intersect=function(f){return Xo(e,f)},r},wO=(t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.id),i=r.insert("rect",":first-child"),n=0*e.padding,s=n/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-s).attr("y",e.y-e.height/2-s).attr("width",e.width+n).attr("height",e.height+n).attr("fill","none");const a=i.node().getBBox();return e.width=a.width,e.height=a.height,e.intersect=function(o){return Xo(e,o)},r},TO=(t,e)=>{const r=t.insert("g").attr("class",e.classes).attr("id",e.id),i=r.insert("rect",":first-child"),n=r.insert("g").attr("class","cluster-label"),s=r.append("rect"),a=n.node().appendChild(Yr(e.labelText,e.labelStyle,void 0,!0));let o=a.getBBox();if(gr($().flowchart.htmlLabels)){const p=a.children[0],g=At(a);o=p.getBoundingClientRect(),g.attr("width",o.width),g.attr("height",o.height)}o=a.getBBox();const l=0*e.padding,u=l/2,d=e.width<=o.width+e.padding?o.width+e.padding:e.width;e.width<=o.width+e.padding?e.diff=(o.width+e.padding*0-e.width)/2:e.diff=-e.padding/2,i.attr("class","outer").attr("x",e.x-d/2-u).attr("y",e.y-e.height/2-u).attr("width",d+l).attr("height",e.height+l),s.attr("class","inner").attr("x",e.x-d/2-u).attr("y",e.y-e.height/2-u+o.height-1).attr("width",d+l).attr("height",e.height+l-o.height-3),n.attr("transform","translate("+(e.x-o.width/2)+", "+(e.y-e.height/2-e.padding/3+(gr($().flowchart.htmlLabels)?5:3))+")");const f=i.node().getBBox();return e.height=f.height,e.intersect=function(p){return Xo(e,p)},r},EO=(t,e)=>{const r=t.insert("g").attr("class",e.classes).attr("id",e.id),i=r.insert("rect",":first-child"),n=0*e.padding,s=n/2;i.attr("class","divider").attr("x",e.x-e.width/2-s).attr("y",e.y-e.height/2).attr("width",e.width+n).attr("height",e.height+n);const a=i.node().getBBox();return e.width=a.width,e.height=a.height,e.diff=-e.padding/2,e.intersect=function(o){return Xo(e,o)},r},CO={rect:kO,roundedWithTitle:TO,noteGroup:wO,divider:EO};let Zm={};const SO=(t,e)=>{B.trace("Inserting cluster");const r=e.shape||"rect";Zm[e.id]=CO[r](t,e)},AO=()=>{Zm={}};let Vc={},_r={};const LO=()=>{Vc={},_r={}},DO=(t,e)=>{const r=Yr(e.label,e.labelStyle),i=t.insert("g").attr("class","edgeLabel"),n=i.insert("g").attr("class","label");n.node().appendChild(r);let s=r.getBBox();if(gr($().flowchart.htmlLabels)){const o=r.children[0],l=At(r);s=o.getBoundingClientRect(),l.attr("width",s.width),l.attr("height",s.height)}n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),Vc[e.id]=i,e.width=s.width,e.height=s.height;let a;if(e.startLabelLeft){const o=Yr(e.startLabelLeft,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),u=l.insert("g").attr("class","inner");a=u.node().appendChild(o);const d=o.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),_r[e.id]||(_r[e.id]={}),_r[e.id].startLeft=l,Cl(a,e.startLabelLeft)}if(e.startLabelRight){const o=Yr(e.startLabelRight,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),u=l.insert("g").attr("class","inner");a=l.node().appendChild(o),u.node().appendChild(o);const d=o.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),_r[e.id]||(_r[e.id]={}),_r[e.id].startRight=l,Cl(a,e.startLabelRight)}if(e.endLabelLeft){const o=Yr(e.endLabelLeft,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),u=l.insert("g").attr("class","inner");a=u.node().appendChild(o);const d=o.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.node().appendChild(o),_r[e.id]||(_r[e.id]={}),_r[e.id].endLeft=l,Cl(a,e.endLabelLeft)}if(e.endLabelRight){const o=Yr(e.endLabelRight,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),u=l.insert("g").attr("class","inner");a=u.node().appendChild(o);const d=o.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.node().appendChild(o),_r[e.id]||(_r[e.id]={}),_r[e.id].endRight=l,Cl(a,e.endLabelRight)}};function Cl(t,e){$().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}const MO=(t,e)=>{B.info("Moving label abc78 ",t.id,t.label,Vc[t.id]);let r=e.updatedPath?e.updatedPath:e.originalPath;if(t.label){const i=Vc[t.id];let n=t.x,s=t.y;if(r){const a=ye.calcLabelPosition(r);B.info("Moving label "+t.label+" from (",n,",",s,") to (",a.x,",",a.y,") abc78"),e.updatedPath&&(n=a.x,s=a.y)}i.attr("transform","translate("+n+", "+s+")")}if(t.startLabelLeft){const i=_r[t.id].startLeft;let n=t.x,s=t.y;if(r){const a=ye.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);n=a.x,s=a.y}i.attr("transform","translate("+n+", "+s+")")}if(t.startLabelRight){const i=_r[t.id].startRight;let n=t.x,s=t.y;if(r){const a=ye.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);n=a.x,s=a.y}i.attr("transform","translate("+n+", "+s+")")}if(t.endLabelLeft){const i=_r[t.id].endLeft;let n=t.x,s=t.y;if(r){const a=ye.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);n=a.x,s=a.y}i.attr("transform","translate("+n+", "+s+")")}if(t.endLabelRight){const i=_r[t.id].endRight;let n=t.x,s=t.y;if(r){const a=ye.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);n=a.x,s=a.y}i.attr("transform","translate("+n+", "+s+")")}},NO=(t,e)=>{const r=t.x,i=t.y,n=Math.abs(e.x-r),s=Math.abs(e.y-i),a=t.width/2,o=t.height/2;return n>=a||s>=o},BO=(t,e,r)=>{B.warn(`intersection calc abc89:
|
|
1212
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var L=this.next();return L||this.lex()},begin:function(L){this.conditionStack.push(L)},popState:function(){var L=this.conditionStack.length-1;return L>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(L){return L=this.conditionStack.length-1-Math.abs(L||0),L>=0?this.conditionStack[L]:"INITIAL"},pushState:function(L){this.begin(L)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(L,J,T,ht){switch(T){case 0:return this.begin("open_directive"),19;case 1:return 8;case 2:return 9;case 3:return 10;case 4:return 11;case 5:return this.begin("type_directive"),20;case 6:return this.popState(),this.begin("arg_directive"),17;case 7:return this.popState(),this.popState(),22;case 8:return 21;case 9:break;case 10:break;case 11:return this.begin("acc_title"),39;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),41;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:return 16;case 19:break;case 20:return 23;case 21:return 23;case 22:return this.begin("struct"),46;case 23:return"EDGE_STATE";case 24:return"EOF_IN_STRUCT";case 25:return"OPEN_IN_STRUCT";case 26:return this.popState(),48;case 27:break;case 28:return"MEMBER";case 29:return 44;case 30:return 74;case 31:return 67;case 32:return 68;case 33:return 70;case 34:return 55;case 35:return 57;case 36:return 49;case 37:return 50;case 38:this.begin("generic");break;case 39:this.popState();break;case 40:return"GENERICTYPE";case 41:this.begin("string");break;case 42:this.popState();break;case 43:return"STR";case 44:this.begin("bqstring");break;case 45:this.popState();break;case 46:return"BQUOTE_STR";case 47:this.begin("href");break;case 48:this.popState();break;case 49:return 73;case 50:this.begin("callback_name");break;case 51:this.popState();break;case 52:this.popState(),this.begin("callback_args");break;case 53:return 71;case 54:this.popState();break;case 55:return 72;case 56:return 69;case 57:return 69;case 58:return 69;case 59:return 69;case 60:return 61;case 61:return 61;case 62:return 63;case 63:return 63;case 64:return 62;case 65:return 60;case 66:return 64;case 67:return 65;case 68:return 66;case 69:return 32;case 70:return 45;case 71:return 86;case 72:return"DOT";case 73:return"PLUS";case 74:return 83;case 75:return"EQUALS";case 76:return"EQUALS";case 77:return 90;case 78:return"PUNCTUATION";case 79:return 89;case 80:return 88;case 81:return 85;case 82:return 25}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:[{])/,/^(?:\[\*\])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:class\b)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:note for\b)/,/^(?:note\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[`])/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:_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)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},callback_args:{rules:[54,55],inclusive:!1},callback_name:{rules:[51,52,53],inclusive:!1},href:{rules:[48,49],inclusive:!1},struct:{rules:[23,24,25,26,27,28],inclusive:!1},generic:{rules:[39,40],inclusive:!1},bqstring:{rules:[45,46],inclusive:!1},string:{rules:[42,43],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,23,29,30,31,32,33,34,35,36,37,38,41,44,47,50,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82],inclusive:!0}}};return F}();Y.lexer=U;function X(){this.yy={}}return X.prototype=Y,Y.Parser=X,new X}();x1.parser=x1;const P2=x1,XB=(t,e)=>{var r;return((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:t.match(/^\s*classDiagram/)!==null},KB=(t,e)=>{var r;return t.match(/^\s*classDiagram/)!==null&&((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:t.match(/^\s*classDiagram-v2/)!==null},U0="classid-";let z0=[],Qe={},Fc=[],Y2=0,No=[];const ao=t=>he.sanitizeText(t,$()),ZB=function(t,e,r){ze.parseDirective(this,t,e,r)},Bo=function(t){let e="",r=t;if(t.indexOf("~")>0){let i=t.split("~");r=i[0],e=he.sanitizeText(i[1],$())}return{className:r,type:e}},v1=function(t){let e=Bo(t);Qe[e.className]===void 0&&(Qe[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:U0+e.className+"-"+Y2},Y2++)},Vm=function(t){const e=Object.keys(Qe);for(const r of e)if(Qe[r].id===t)return Qe[r].domId},QB=function(){z0=[],Qe={},Fc=[],No=[],No.push(zm),Ci()},JB=function(t){return Qe[t]},tI=function(){return Qe},eI=function(){return z0},rI=function(){return Fc},iI=function(t){B.debug("Adding relation: "+JSON.stringify(t)),v1(t.id1),v1(t.id2),t.id1=Bo(t.id1).className,t.id2=Bo(t.id2).className,t.relationTitle1=he.sanitizeText(t.relationTitle1.trim(),$()),t.relationTitle2=he.sanitizeText(t.relationTitle2.trim(),$()),z0.push(t)},nI=function(t,e){const r=Bo(t).className;Qe[r].annotations.push(e)},Um=function(t,e){const r=Bo(t).className,i=Qe[r];if(typeof e=="string"){const n=e.trim();n.startsWith("<<")&&n.endsWith(">>")?i.annotations.push(ao(n.substring(2,n.length-2))):n.indexOf(")")>0?i.methods.push(ao(n)):n&&i.members.push(ao(n))}},sI=function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach(r=>Um(t,r)))},aI=function(t,e){const r={id:`note${Fc.length}`,class:e,text:t};Fc.push(r)},oI=function(t){return t.substring(0,1)===":"?he.sanitizeText(t.substr(1).trim(),$()):ao(t.trim())},W0=function(t,e){t.split(",").forEach(function(r){let i=r;r[0].match(/\d/)&&(i=U0+i),Qe[i]!==void 0&&Qe[i].cssClasses.push(e)})},lI=function(t,e){const r=$();t.split(",").forEach(function(i){e!==void 0&&(Qe[i].tooltip=he.sanitizeText(e,r))})},cI=function(t){return Qe[t].tooltip},uI=function(t,e,r){const i=$();t.split(",").forEach(function(n){let s=n;n[0].match(/\d/)&&(s=U0+s),Qe[s]!==void 0&&(Qe[s].link=ye.formatUrl(e,i),i.securityLevel==="sandbox"?Qe[s].linkTarget="_top":typeof r=="string"?Qe[s].linkTarget=ao(r):Qe[s].linkTarget="_blank")}),W0(t,"clickable")},hI=function(t,e,r){t.split(",").forEach(function(i){dI(i,e,r),Qe[i].haveCallback=!0}),W0(t,"clickable")},dI=function(t,e,r){const i=$();let n=t,s=Vm(n);if(i.securityLevel==="loose"&&e!==void 0&&Qe[n]!==void 0){let a=[];if(typeof r=="string"){a=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let o=0;o<a.length;o++){let l=a[o].trim();l.charAt(0)==='"'&&l.charAt(l.length-1)==='"'&&(l=l.substr(1,l.length-2)),a[o]=l}}a.length===0&&a.push(s),No.push(function(){const o=document.querySelector(`[id="${s}"]`);o!==null&&o.addEventListener("click",function(){ye.runFunc(e,...a)},!1)})}},fI=function(t){No.forEach(function(e){e(t)})},pI={LINE:0,DOTTED_LINE:1},gI={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},zm=function(t){let e=At(".mermaidTooltip");(e._groups||e)[0][0]===null&&(e=At("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),At(t).select("svg").selectAll("g.node").on("mouseover",function(){const n=At(this);if(n.attr("title")===null)return;const a=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(n.attr("title")).style("left",window.scrollX+a.left+(a.right-a.left)/2+"px").style("top",window.scrollY+a.top-14+document.body.scrollTop+"px"),e.html(e.html().replace(/<br\/>/g,"<br/>")),n.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),At(this).classed("hover",!1)})};No.push(zm);let Wm="TB";const yI=()=>Wm,mI=t=>{Wm=t},Xs={parseDirective:ZB,setAccTitle:ii,getAccTitle:Si,getAccDescription:Li,setAccDescription:Ai,getConfig:()=>$().class,addClass:v1,bindFunctions:fI,clear:QB,getClass:JB,getClasses:tI,getNotes:rI,addAnnotation:nI,addNote:aI,getRelations:eI,addRelation:iI,getDirection:yI,setDirection:mI,addMember:Um,addMembers:sI,cleanupLabel:oI,lineType:pI,relationType:gI,setClickEvent:hI,setCssClass:W0,setLink:uI,getTooltip:cI,setTooltip:lI,lookUpDomId:Vm,setDiagramTitle:Cn,getDiagramTitle:Sn};let V2=0;const bI=function(t,e,r,i,n){const s=function(A){switch(A){case n.db.relationType.AGGREGATION:return"aggregation";case n.db.relationType.EXTENSION:return"extension";case n.db.relationType.COMPOSITION:return"composition";case n.db.relationType.DEPENDENCY:return"dependency";case n.db.relationType.LOLLIPOP:return"lollipop"}};e.points=e.points.filter(A=>!Number.isNaN(A.y));const a=e.points,o=Ca().x(function(A){return A.x}).y(function(A){return A.y}).curve(ua),l=t.append("path").attr("d",o(a)).attr("id","edge"+V2).attr("class","relation");let u="";i.arrowMarkerAbsolute&&(u=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,u=u.replace(/\(/g,"\\("),u=u.replace(/\)/g,"\\)")),r.relation.lineType==1&&l.attr("class","relation dashed-line"),r.relation.lineType==10&&l.attr("class","relation dotted-line"),r.relation.type1!=="none"&&l.attr("marker-start","url("+u+"#"+s(r.relation.type1)+"Start)"),r.relation.type2!=="none"&&l.attr("marker-end","url("+u+"#"+s(r.relation.type2)+"End)");let d,f;const p=e.points.length;let g=ye.calcLabelPosition(e.points);d=g.x,f=g.y;let _,k,w,S;if(p%2!==0&&p>1){let A=ye.calcCardinalityPosition(r.relation.type1!=="none",e.points,e.points[0]),O=ye.calcCardinalityPosition(r.relation.type2!=="none",e.points,e.points[p-1]);B.debug("cardinality_1_point "+JSON.stringify(A)),B.debug("cardinality_2_point "+JSON.stringify(O)),_=A.x,k=A.y,w=O.x,S=O.y}if(r.title!==void 0){const A=t.append("g").attr("class","classLabel"),O=A.append("text").attr("class","label").attr("x",d).attr("y",f).attr("fill","red").attr("text-anchor","middle").text(r.title);window.label=O;const P=O.node().getBBox();A.insert("rect",":first-child").attr("class","box").attr("x",P.x-i.padding/2).attr("y",P.y-i.padding/2).attr("width",P.width+i.padding).attr("height",P.height+i.padding)}B.info("Rendering relation "+JSON.stringify(r)),r.relationTitle1!==void 0&&r.relationTitle1!=="none"&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",_).attr("y",k).attr("fill","black").attr("font-size","6").text(r.relationTitle1),r.relationTitle2!==void 0&&r.relationTitle2!=="none"&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",w).attr("y",S).attr("fill","black").attr("font-size","6").text(r.relationTitle2),V2++},_I=function(t,e,r,i){B.debug("Rendering class ",e,r);const n=e.id,s={id:n,label:e.id,width:0,height:0},a=t.append("g").attr("id",i.db.lookUpDomId(n)).attr("class","classGroup");let o;e.link?o=a.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",r.textHeight+r.padding).attr("x",0):o=a.append("text").attr("y",r.textHeight+r.padding).attr("x",0);let l=!0;e.annotations.forEach(function(W){const q=o.append("tspan").text("«"+W+"»");l||q.attr("dy",r.textHeight),l=!1});let u=e.id;e.type!==void 0&&e.type!==""&&(u+="<"+e.type+">");const d=o.append("tspan").text(u).attr("class","title");l||d.attr("dy",r.textHeight);const f=o.node().getBBox().height,p=a.append("line").attr("x1",0).attr("y1",r.padding+f+r.dividerMargin/2).attr("y2",r.padding+f+r.dividerMargin/2),g=a.append("text").attr("x",r.padding).attr("y",f+r.dividerMargin+r.textHeight).attr("fill","white").attr("class","classText");l=!0,e.members.forEach(function(W){U2(g,W,l,r),l=!1});const _=g.node().getBBox(),k=a.append("line").attr("x1",0).attr("y1",r.padding+f+r.dividerMargin+_.height).attr("y2",r.padding+f+r.dividerMargin+_.height),w=a.append("text").attr("x",r.padding).attr("y",f+2*r.dividerMargin+_.height+r.textHeight).attr("fill","white").attr("class","classText");l=!0,e.methods.forEach(function(W){U2(w,W,l,r),l=!1});const S=a.node().getBBox();var A=" ";e.cssClasses.length>0&&(A=A+e.cssClasses.join(" "));const P=a.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",S.width+2*r.padding).attr("height",S.height+r.padding+.5*r.dividerMargin).attr("class",A).node().getBBox().width;return o.node().childNodes.forEach(function(W){W.setAttribute("x",(P-W.getBBox().width)/2)}),e.tooltip&&o.insert("title").text(e.tooltip),p.attr("x2",P),k.attr("x2",P),s.width=P,s.height=S.height+r.padding+.5*r.dividerMargin,s},xI=function(t,e,r,i){B.debug("Rendering note ",e,r);const n=e.id,s={id:n,text:e.text,width:0,height:0},a=t.append("g").attr("id",n).attr("class","classGroup");let o=a.append("text").attr("y",r.textHeight+r.padding).attr("x",0);const l=JSON.parse(`"${e.text}"`).split(`
|
|
1213
|
+
`);l.forEach(function(p){B.debug(`Adding line: ${p}`),o.append("tspan").text(p).attr("class","title").attr("dy",r.textHeight)});const u=a.node().getBBox(),f=a.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",u.width+2*r.padding).attr("height",u.height+l.length*r.textHeight+r.padding+.5*r.dividerMargin).node().getBBox().width;return o.node().childNodes.forEach(function(p){p.setAttribute("x",(f-p.getBBox().width)/2)}),s.width=f,s.height=u.height+l.length*r.textHeight+r.padding+.5*r.dividerMargin,s},Pc=function(t){const e=/^([#+~-])?(\w+)(~\w+~|\[])?\s+(\w+) *([$*])?$/,r=/^([#+|~-])?(\w+) *\( *(.*)\) *([$*])? *(\w*[[\]|~]*\s*\w*~?)$/;let i=t.match(e),n=t.match(r);return i&&!n?vI(i):n?kI(n):wI(t)},vI=function(t){let e="",r="";try{let i=t[1]?t[1].trim():"",n=t[2]?t[2].trim():"",s=t[3]?Vn(t[3].trim()):"",a=t[4]?t[4].trim():"",o=t[5]?t[5].trim():"";r=i+n+s+" "+a,e=H0(o)}catch{r=t}return{displayText:r,cssStyle:e}},kI=function(t){let e="",r="";try{let i=t[1]?t[1].trim():"",n=t[2]?t[2].trim():"",s=t[3]?Vn(t[3].trim()):"",a=t[4]?t[4].trim():"",o=t[5]?" : "+Vn(t[5]).trim():"";r=i+n+"("+s+")"+o,e=H0(a)}catch{r=t}return{displayText:r,cssStyle:e}},wI=function(t){let e="",r="",i="",n=t.indexOf("("),s=t.indexOf(")");if(n>1&&s>n&&s<=t.length){let a="",o="",l=t.substring(0,1);l.match(/\w/)?o=t.substring(0,n).trim():(l.match(/[#+~-]/)&&(a=l),o=t.substring(1,n).trim());const u=t.substring(n+1,s);t.substring(s+1,1),r=H0(t.substring(s+1,s+2)),e=a+o+"("+Vn(u.trim())+")",s<t.length&&(i=t.substring(s+2).trim(),i!==""&&(i=" : "+Vn(i),e+=i))}else e=Vn(t);return{displayText:e,cssStyle:r}},U2=function(t,e,r,i){let n=Pc(e);const s=t.append("tspan").attr("x",i.padding).text(n.displayText);n.cssStyle!==""&&s.attr("style",n.cssStyle),r||s.attr("dy",i.textHeight)},H0=function(t){switch(t){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}},Th={drawClass:_I,drawEdge:bI,drawNote:xI,parseMember:Pc};let Hl={};const Tl=20,Ha=function(t){const e=Object.entries(Hl).find(r=>r[1].label===t);if(e)return e[0]},TI=function(t){t.append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),t.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},EI=function(t,e,r,i){const n=$().class;Hl={},B.info("Rendering diagram "+t);const s=$().securityLevel;let a;s==="sandbox"&&(a=At("#i"+e));const o=At(s==="sandbox"?a.nodes()[0].contentDocument.body:"body"),l=o.select(`[id='${e}']`);TI(l);const u=new or({multigraph:!0});u.setGraph({isMultiGraph:!0}),u.setDefaultEdgeLabel(function(){return{}});const d=i.db.getClasses(),f=Object.keys(d);for(const A of f){const O=d[A],P=Th.drawClass(l,O,n,i);Hl[P.id]=P,u.setNode(P.id,P),B.info("Org height: "+P.height)}i.db.getRelations().forEach(function(A){B.info("tjoho"+Ha(A.id1)+Ha(A.id2)+JSON.stringify(A)),u.setEdge(Ha(A.id1),Ha(A.id2),{relation:A},A.title||"DEFAULT")}),i.db.getNotes().forEach(function(A){B.debug(`Adding note: ${JSON.stringify(A)}`);const O=Th.drawNote(l,A,n,i);Hl[O.id]=O,u.setNode(O.id,O),A.class&&A.class in d&&u.setEdge(A.id,Ha(A.class),{relation:{id1:A.id,id2:A.class,relation:{type1:"none",type2:"none",lineType:10}}},"DEFAULT")}),Ma(u),u.nodes().forEach(function(A){A!==void 0&&u.node(A)!==void 0&&(B.debug("Node "+A+": "+JSON.stringify(u.node(A))),o.select("#"+(i.db.lookUpDomId(A)||A)).attr("transform","translate("+(u.node(A).x-u.node(A).width/2)+","+(u.node(A).y-u.node(A).height/2)+" )"))}),u.edges().forEach(function(A){A!==void 0&&u.edge(A)!==void 0&&(B.debug("Edge "+A.v+" -> "+A.w+": "+JSON.stringify(u.edge(A))),Th.drawEdge(l,u.edge(A),u.edge(A).relation,n,i))});const _=l.node().getBBox(),k=_.width+Tl*2,w=_.height+Tl*2;Ei(l,w,k,n.useMaxWidth);const S=`${_.x-Tl} ${_.y-Tl} ${k} ${w}`;B.debug(`viewBox ${S}`),l.attr("viewBox",S)},CI={draw:EI},SI=(t,e,r,i)=>{e.forEach(n=>{FI[n](t,r,i)})},AI=(t,e,r)=>{B.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",e+"-extensionStart").attr("class","marker extension "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},LI=(t,e)=>{t.append("defs").append("marker").attr("id",e+"-compositionStart").attr("class","marker composition "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},DI=(t,e)=>{t.append("defs").append("marker").attr("id",e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},MI=(t,e)=>{t.append("defs").append("marker").attr("id",e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},NI=(t,e)=>{t.append("defs").append("marker").attr("id",e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","white").attr("cx",6).attr("cy",7).attr("r",6)},BI=(t,e)=>{t.append("marker").attr("id",e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",10).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",e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",0).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")},II=(t,e)=>{t.append("marker").attr("id",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",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")},OI=(t,e)=>{t.append("marker").attr("id",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",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")},RI=(t,e)=>{t.append("defs").append("marker").attr("id",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")},FI={extension:AI,composition:LI,aggregation:DI,dependency:MI,lollipop:NI,point:BI,circle:II,cross:OI,barb:RI},PI=SI;function YI(t,e){e&&t.attr("style",e)}function VI(t){const e=At(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),i=t.label,n=t.isNode?"nodeLabel":"edgeLabel";return r.html('<span class="'+n+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+i+"</span>"),YI(r,t.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}const UI=(t,e,r,i)=>{let n=t||"";if(typeof n=="object"&&(n=n[0]),gr($().flowchart.htmlLabels)){n=n.replace(/\\n|\n/g,"<br />"),B.info("vertexText"+n);const s={isNode:i,label:md(n).replace(/fa[blrs]?:fa-[\w-]+/g,o=>`<i class='${o.replace(":"," ")}'></i>`),labelStyle:e.replace("fill:","color:")};return VI(s)}else{const s=document.createElementNS("http://www.w3.org/2000/svg","text");s.setAttribute("style",e.replace("color:","fill:"));let a=[];typeof n=="string"?a=n.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(n)?a=n:a=[];for(const o of a){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=o.trim(),s.appendChild(l)}return s}},Yr=UI,Cr=(t,e,r,i)=>{let n;r?n=r:n="node default";const s=t.insert("g").attr("class",n).attr("id",e.domId||e.id),a=s.insert("g").attr("class","label").attr("style",e.labelStyle);let o;e.labelText===void 0?o="":o=typeof e.labelText=="string"?e.labelText:e.labelText[0];const l=a.node().appendChild(Yr(vi(md(o),$()),e.labelStyle,!1,i));let u=l.getBBox();if(gr($().flowchart.htmlLabels)){const f=l.children[0],p=At(l);u=f.getBoundingClientRect(),p.attr("width",u.width),p.attr("height",u.height)}const d=e.padding/2;return a.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),{shapeSvg:s,bbox:u,halfPadding:d,label:a}},Je=(t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height};function An(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}let Te={},pi={},Hm={};const zI=()=>{pi={},Hm={},Te={}},Yc=(t,e)=>(B.trace("In isDecendant",e," ",t," = ",pi[e].includes(t)),!!pi[e].includes(t)),WI=(t,e)=>(B.info("Decendants of ",e," is ",pi[e]),B.info("Edge is ",t),t.v===e||t.w===e?!1:pi[e]?pi[e].includes(t.v)||Yc(t.v,e)||Yc(t.w,e)||pi[e].includes(t.w):(B.debug("Tilt, ",e,",not in decendants"),!1)),Gm=(t,e,r,i)=>{B.warn("Copying children of ",t,"root",i,"data",e.node(t),i);const n=e.children(t)||[];t!==i&&n.push(t),B.warn("Copying (nodes) clusterId",t,"nodes",n),n.forEach(s=>{if(e.children(s).length>0)Gm(s,e,r,i);else{const a=e.node(s);B.info("cp ",s," to ",i," with parent ",t),r.setNode(s,a),i!==e.parent(s)&&(B.warn("Setting parent",s,e.parent(s)),r.setParent(s,e.parent(s))),t!==i&&s!==t?(B.debug("Setting parent",s,t),r.setParent(s,t)):(B.info("In copy ",t,"root",i,"data",e.node(t),i),B.debug("Not Setting parent for node=",s,"cluster!==rootId",t!==i,"node!==clusterId",s!==t));const o=e.edges(s);B.debug("Copying Edges",o),o.forEach(l=>{B.info("Edge",l);const u=e.edge(l.v,l.w,l.name);B.info("Edge data",u,i);try{WI(l,i)?(B.info("Copying as ",l.v,l.w,u,l.name),r.setEdge(l.v,l.w,u,l.name),B.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):B.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",i," clusterId:",t)}catch(d){B.error(d)}})}B.debug("Removing node",s),e.removeNode(s)})},qm=(t,e)=>{const r=e.children(t);let i=[...r];for(const n of r)Hm[n]=t,i=[...i,...qm(n,e)];return i},Io=(t,e)=>{B.trace("Searching",t);const r=e.children(t);if(B.trace("Searching children of id ",t,r),r.length<1)return B.trace("This is a valid node",t),t;for(const i of r){const n=Io(i,e);if(n)return B.trace("Found replacement for",t," => ",n),n}},El=t=>!Te[t]||!Te[t].externalConnections?t:Te[t]?Te[t].id:t,HI=(t,e)=>{if(!t||e>10){B.debug("Opting out, no graph ");return}else B.debug("Opting in, graph ");t.nodes().forEach(function(r){t.children(r).length>0&&(B.warn("Cluster identified",r," Replacement id in edges: ",Io(r,t)),pi[r]=qm(r,t),Te[r]={id:Io(r,t),clusterData:t.node(r)})}),t.nodes().forEach(function(r){const i=t.children(r),n=t.edges();i.length>0?(B.debug("Cluster identified",r,pi),n.forEach(s=>{if(s.v!==r&&s.w!==r){const a=Yc(s.v,r),o=Yc(s.w,r);a^o&&(B.warn("Edge: ",s," leaves cluster ",r),B.warn("Decendants of XXX ",r,": ",pi[r]),Te[r].externalConnections=!0)}})):B.debug("Not a cluster ",r,pi)}),t.edges().forEach(function(r){const i=t.edge(r);B.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),B.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(t.edge(r)));let n=r.v,s=r.w;if(B.warn("Fix XXX",Te,"ids:",r.v,r.w,"Translating: ",Te[r.v]," --- ",Te[r.w]),Te[r.v]&&Te[r.w]&&Te[r.v]===Te[r.w]){B.warn("Fixing and trixing link to self - removing XXX",r.v,r.w,r.name),B.warn("Fixing and trixing - removing XXX",r.v,r.w,r.name),n=El(r.v),s=El(r.w),t.removeEdge(r.v,r.w,r.name);const a=r.w+"---"+r.v;t.setNode(a,{domId:a,id:a,labelStyle:"",labelText:i.label,padding:0,shape:"labelRect",style:""});const o=JSON.parse(JSON.stringify(i)),l=JSON.parse(JSON.stringify(i));o.label="",o.arrowTypeEnd="none",l.label="",o.fromCluster=r.v,l.toCluster=r.v,t.setEdge(n,a,o,r.name+"-cyclic-special"),t.setEdge(a,s,l,r.name+"-cyclic-special")}else(Te[r.v]||Te[r.w])&&(B.warn("Fixing and trixing - removing XXX",r.v,r.w,r.name),n=El(r.v),s=El(r.w),t.removeEdge(r.v,r.w,r.name),n!==r.v&&(i.fromCluster=r.v),s!==r.w&&(i.toCluster=r.w),B.warn("Fix Replacing with XXX",n,s,r.name),t.setEdge(n,s,i,r.name))}),B.warn("Adjusted Graph",fn(t)),jm(t,0),B.trace(Te)},jm=(t,e)=>{if(B.warn("extractor - ",e,fn(t),t.children("D")),e>10){B.error("Bailing out");return}let r=t.nodes(),i=!1;for(const n of r){const s=t.children(n);i=i||s.length>0}if(!i){B.debug("Done, no node has children",t.nodes());return}B.debug("Nodes = ",r,e);for(const n of r)if(B.debug("Extracting node",n,Te,Te[n]&&!Te[n].externalConnections,!t.parent(n),t.node(n),t.children("D")," Depth ",e),!Te[n])B.debug("Not a cluster",n,e);else if(!Te[n].externalConnections&&t.children(n)&&t.children(n).length>0){B.warn("Cluster without external connections, without a parent and with children",n,e);let a=t.graph().rankdir==="TB"?"LR":"TB";Te[n]&&Te[n].clusterData&&Te[n].clusterData.dir&&(a=Te[n].clusterData.dir,B.warn("Fixing dir",Te[n].clusterData.dir,a));const o=new or({multigraph:!0,compound:!0}).setGraph({rankdir:a,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});B.warn("Old graph before copy",fn(t)),Gm(n,t,o,n),t.setNode(n,{clusterNode:!0,id:n,clusterData:Te[n].clusterData,labelText:Te[n].labelText,graph:o}),B.warn("New graph after copy node: (",n,")",fn(o)),B.debug("Old graph after copy",fn(t))}else B.warn("Cluster ** ",n," **not meeting the criteria !externalConnections:",!Te[n].externalConnections," no parent: ",!t.parent(n)," children ",t.children(n)&&t.children(n).length>0,t.children("D"),e),B.debug(Te);r=t.nodes(),B.warn("New list of nodes",r);for(const n of r){const s=t.node(n);B.warn(" Now next level",n,s),s.clusterNode&&jm(s.graph,e+1)}},$m=(t,e)=>{if(e.length===0)return[];let r=Object.assign(e);return e.forEach(i=>{const n=t.children(i),s=$m(t,n);r=[...r,...s]}),r},GI=t=>$m(t,t.children());function qI(t,e){return t.intersect(e)}function Xm(t,e,r,i){var n=t.x,s=t.y,a=n-i.x,o=s-i.y,l=Math.sqrt(e*e*o*o+r*r*a*a),u=Math.abs(e*r*a/l);i.x<n&&(u=-u);var d=Math.abs(e*r*o/l);return i.y<s&&(d=-d),{x:n+u,y:s+d}}function jI(t,e,r){return Xm(t,e,e,r)}function $I(t,e,r,i){var n,s,a,o,l,u,d,f,p,g,_,k,w,S,A;if(n=e.y-t.y,a=t.x-e.x,l=e.x*t.y-t.x*e.y,p=n*r.x+a*r.y+l,g=n*i.x+a*i.y+l,!(p!==0&&g!==0&&z2(p,g))&&(s=i.y-r.y,o=r.x-i.x,u=i.x*r.y-r.x*i.y,d=s*t.x+o*t.y+u,f=s*e.x+o*e.y+u,!(d!==0&&f!==0&&z2(d,f))&&(_=n*o-s*a,_!==0)))return k=Math.abs(_/2),w=a*u-o*l,S=w<0?(w-k)/_:(w+k)/_,w=s*l-n*u,A=w<0?(w-k)/_:(w+k)/_,{x:S,y:A}}function z2(t,e){return t*e>0}function XI(t,e,r){var i=t.x,n=t.y,s=[],a=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(_){a=Math.min(a,_.x),o=Math.min(o,_.y)}):(a=Math.min(a,e.x),o=Math.min(o,e.y));for(var l=i-t.width/2-a,u=n-t.height/2-o,d=0;d<e.length;d++){var f=e[d],p=e[d<e.length-1?d+1:0],g=$I(t,r,{x:l+f.x,y:u+f.y},{x:l+p.x,y:u+p.y});g&&s.push(g)}return s.length?(s.length>1&&s.sort(function(_,k){var w=_.x-r.x,S=_.y-r.y,A=Math.sqrt(w*w+S*S),O=k.x-r.x,P=k.y-r.y,W=Math.sqrt(O*O+P*P);return A<W?-1:A===W?0:1}),s[0]):t}const KI=(t,e)=>{var r=t.x,i=t.y,n=e.x-r,s=e.y-i,a=t.width/2,o=t.height/2,l,u;return Math.abs(s)*a>Math.abs(n)*o?(s<0&&(o=-o),l=s===0?0:o*n/s,u=o):(n<0&&(a=-a),l=a,u=n===0?0:a*s/n),{x:r+l,y:i+u}},Xo=KI,$e={node:qI,circle:jI,ellipse:Xm,polygon:XI,rect:Xo},ZI=(t,e)=>{const{shapeSvg:r,bbox:i,halfPadding:n}=Cr(t,e,"node "+e.classes,!0);B.info("Classes = ",e.classes);const s=r.insert("rect",":first-child");return s.attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-n).attr("y",-i.height/2-n).attr("width",i.width+e.padding).attr("height",i.height+e.padding),Je(e,s),e.intersect=function(a){return $e.rect(e,a)},r},QI=ZI,JI=(t,e)=>{const{shapeSvg:r,bbox:i}=Cr(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=n+s,o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}];B.info("Question main (Circle)");const l=An(r,a,a,o);return l.attr("style",e.style),Je(e,l),e.intersect=function(u){return B.warn("Intersect called"),$e.polygon(e,o,u)},r},tO=(t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=28,n=[{x:0,y:i/2},{x:i/2,y:0},{x:0,y:-i/2},{x:-i/2,y:0}];return r.insert("polygon",":first-child").attr("points",n.map(function(a){return a.x+","+a.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(a){return $e.circle(e,14,a)},r},eO=(t,e)=>{const{shapeSvg:r,bbox:i}=Cr(t,e,void 0,!0),n=4,s=i.height+e.padding,a=s/n,o=i.width+2*a+e.padding,l=[{x:a,y:0},{x:o-a,y:0},{x:o,y:-s/2},{x:o-a,y:-s},{x:a,y:-s},{x:0,y:-s/2}],u=An(r,o,s,l);return u.attr("style",e.style),Je(e,u),e.intersect=function(d){return $e.polygon(e,l,d)},r},rO=(t,e)=>{const{shapeSvg:r,bbox:i}=Cr(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=[{x:-s/2,y:0},{x:n,y:0},{x:n,y:-s},{x:-s/2,y:-s},{x:0,y:-s/2}];return An(r,n,s,a).attr("style",e.style),e.width=n+s,e.height=s,e.intersect=function(l){return $e.polygon(e,a,l)},r},iO=(t,e)=>{const{shapeSvg:r,bbox:i}=Cr(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=[{x:-2*s/6,y:0},{x:n-s/6,y:0},{x:n+2*s/6,y:-s},{x:s/6,y:-s}],o=An(r,n,s,a);return o.attr("style",e.style),Je(e,o),e.intersect=function(l){return $e.polygon(e,a,l)},r},nO=(t,e)=>{const{shapeSvg:r,bbox:i}=Cr(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=[{x:2*s/6,y:0},{x:n+s/6,y:0},{x:n-2*s/6,y:-s},{x:-s/6,y:-s}],o=An(r,n,s,a);return o.attr("style",e.style),Je(e,o),e.intersect=function(l){return $e.polygon(e,a,l)},r},sO=(t,e)=>{const{shapeSvg:r,bbox:i}=Cr(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=[{x:-2*s/6,y:0},{x:n+2*s/6,y:0},{x:n-s/6,y:-s},{x:s/6,y:-s}],o=An(r,n,s,a);return o.attr("style",e.style),Je(e,o),e.intersect=function(l){return $e.polygon(e,a,l)},r},aO=(t,e)=>{const{shapeSvg:r,bbox:i}=Cr(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=[{x:s/6,y:0},{x:n-s/6,y:0},{x:n+2*s/6,y:-s},{x:-2*s/6,y:-s}],o=An(r,n,s,a);return o.attr("style",e.style),Je(e,o),e.intersect=function(l){return $e.polygon(e,a,l)},r},oO=(t,e)=>{const{shapeSvg:r,bbox:i}=Cr(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=[{x:0,y:0},{x:n+s/2,y:0},{x:n,y:-s/2},{x:n+s/2,y:-s},{x:0,y:-s}],o=An(r,n,s,a);return o.attr("style",e.style),Je(e,o),e.intersect=function(l){return $e.polygon(e,a,l)},r},lO=(t,e)=>{const{shapeSvg:r,bbox:i}=Cr(t,e,void 0,!0),n=i.width+e.padding,s=n/2,a=s/(2.5+n/50),o=i.height+a+e.padding,l="M 0,"+a+" a "+s+","+a+" 0,0,0 "+n+" 0 a "+s+","+a+" 0,0,0 "+-n+" 0 l 0,"+o+" a "+s+","+a+" 0,0,0 "+n+" 0 l 0,"+-o,u=r.attr("label-offset-y",a).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-n/2+","+-(o/2+a)+")");return Je(e,u),e.intersect=function(d){const f=$e.rect(e,d),p=f.x-e.x;if(s!=0&&(Math.abs(p)<e.width/2||Math.abs(p)==e.width/2&&Math.abs(f.y-e.y)>e.height/2-a)){let g=a*a*(1-p*p/(s*s));g!=0&&(g=Math.sqrt(g)),g=a-g,d.y-e.y>0&&(g=-g),f.y+=g}return f},r},cO=(t,e)=>{const{shapeSvg:r,bbox:i,halfPadding:n}=Cr(t,e,"node "+e.classes,!0);B.trace("Classes = ",e.classes);const s=r.insert("rect",":first-child"),a=i.width+e.padding,o=i.height+e.padding;if(s.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-n).attr("y",-i.height/2-n).attr("width",a).attr("height",o),e.props){const l=new Set(Object.keys(e.props));e.props.borders&&(Km(s,e.props.borders,a,o),l.delete("borders")),l.forEach(u=>{B.warn(`Unknown node property ${u}`)})}return Je(e,s),e.intersect=function(l){return $e.rect(e,l)},r},uO=(t,e)=>{const{shapeSvg:r}=Cr(t,e,"label",!0);B.trace("Classes = ",e.classes);const i=r.insert("rect",":first-child"),n=0,s=0;if(i.attr("width",n).attr("height",s),r.attr("class","label edgeLabel"),e.props){const a=new Set(Object.keys(e.props));e.props.borders&&(Km(i,e.props.borders,n,s),a.delete("borders")),a.forEach(o=>{B.warn(`Unknown node property ${o}`)})}return Je(e,i),e.intersect=function(a){return $e.rect(e,a)},r};function Km(t,e,r,i){const n=[],s=o=>{n.push(o,0)},a=o=>{n.push(0,o)};e.includes("t")?(B.debug("add top border"),s(r)):a(r),e.includes("r")?(B.debug("add right border"),s(i)):a(i),e.includes("b")?(B.debug("add bottom border"),s(r)):a(r),e.includes("l")?(B.debug("add left border"),s(i)):a(i),t.attr("stroke-dasharray",n.join(" "))}const hO=(t,e)=>{let r;e.classes?r="node "+e.classes:r="node default";const i=t.insert("g").attr("class",r).attr("id",e.domId||e.id),n=i.insert("rect",":first-child"),s=i.insert("line"),a=i.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText;let l="";typeof o=="object"?l=o[0]:l=o,B.info("Label text abc79",l,o,typeof o=="object");const u=a.node().appendChild(Yr(l,e.labelStyle,!0,!0));let d={width:0,height:0};if(gr($().flowchart.htmlLabels)){const k=u.children[0],w=At(u);d=k.getBoundingClientRect(),w.attr("width",d.width),w.attr("height",d.height)}B.info("Text 2",o);const f=o.slice(1,o.length);let p=u.getBBox();const g=a.node().appendChild(Yr(f.join?f.join("<br/>"):f,e.labelStyle,!0,!0));if(gr($().flowchart.htmlLabels)){const k=g.children[0],w=At(g);d=k.getBoundingClientRect(),w.attr("width",d.width),w.attr("height",d.height)}const _=e.padding/2;return At(g).attr("transform","translate( "+(d.width>p.width?0:(p.width-d.width)/2)+", "+(p.height+_+5)+")"),At(u).attr("transform","translate( "+(d.width<p.width?0:-(p.width-d.width)/2)+", "+0+")"),d=a.node().getBBox(),a.attr("transform","translate("+-d.width/2+", "+(-d.height/2-_+3)+")"),n.attr("class","outer title-state").attr("x",-d.width/2-_).attr("y",-d.height/2-_).attr("width",d.width+e.padding).attr("height",d.height+e.padding),s.attr("class","divider").attr("x1",-d.width/2-_).attr("x2",d.width/2+_).attr("y1",-d.height/2-_+p.height+_).attr("y2",-d.height/2-_+p.height+_),Je(e,n),e.intersect=function(k){return $e.rect(e,k)},i},dO=(t,e)=>{const{shapeSvg:r,bbox:i}=Cr(t,e,void 0,!0),n=i.height+e.padding,s=i.width+n/4+e.padding,a=r.insert("rect",":first-child").attr("style",e.style).attr("rx",n/2).attr("ry",n/2).attr("x",-s/2).attr("y",-n/2).attr("width",s).attr("height",n);return Je(e,a),e.intersect=function(o){return $e.rect(e,o)},r},fO=(t,e)=>{const{shapeSvg:r,bbox:i,halfPadding:n}=Cr(t,e,void 0,!0),s=r.insert("circle",":first-child");return s.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+n).attr("width",i.width+e.padding).attr("height",i.height+e.padding),B.info("Circle main"),Je(e,s),e.intersect=function(a){return B.info("Circle intersect",e,i.width/2+n,a),$e.circle(e,i.width/2+n,a)},r},pO=(t,e)=>{const{shapeSvg:r,bbox:i,halfPadding:n}=Cr(t,e,void 0,!0),s=5,a=r.insert("g",":first-child"),o=a.insert("circle"),l=a.insert("circle");return o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+n+s).attr("width",i.width+e.padding+s*2).attr("height",i.height+e.padding+s*2),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+n).attr("width",i.width+e.padding).attr("height",i.height+e.padding),B.info("DoubleCircle main"),Je(e,o),e.intersect=function(u){return B.info("DoubleCircle intersect",e,i.width/2+n+s,u),$e.circle(e,i.width/2+n+s,u)},r},gO=(t,e)=>{const{shapeSvg:r,bbox:i}=Cr(t,e,void 0,!0),n=i.width+e.padding,s=i.height+e.padding,a=[{x:0,y:0},{x:n,y:0},{x:n,y:-s},{x:0,y:-s},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-s},{x:-8,y:-s},{x:-8,y:0}],o=An(r,n,s,a);return o.attr("style",e.style),Je(e,o),e.intersect=function(l){return $e.polygon(e,a,l)},r},yO=(t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),Je(e,i),e.intersect=function(n){return $e.circle(e,7,n)},r},W2=(t,e,r)=>{const i=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let n=70,s=10;r==="LR"&&(n=10,s=70);const a=i.append("rect").attr("x",-1*n/2).attr("y",-1*s/2).attr("width",n).attr("height",s).attr("class","fork-join");return Je(e,a),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(o){return $e.rect(e,o)},i},mO=(t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),i=r.insert("circle",":first-child"),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),i.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),Je(e,n),e.intersect=function(s){return $e.circle(e,7,s)},r},bO=(t,e)=>{const r=e.padding/2,i=4,n=8;let s;e.classes?s="node "+e.classes:s="node default";const a=t.insert("g").attr("class",s).attr("id",e.domId||e.id),o=a.insert("rect",":first-child"),l=a.insert("line"),u=a.insert("line");let d=0,f=i;const p=a.insert("g").attr("class","label");let g=0;const _=e.classData.annotations&&e.classData.annotations[0],k=e.classData.annotations[0]?"«"+e.classData.annotations[0]+"»":"",w=p.node().appendChild(Yr(k,e.labelStyle,!0,!0));let S=w.getBBox();if(gr($().flowchart.htmlLabels)){const H=w.children[0],N=At(w);S=H.getBoundingClientRect(),N.attr("width",S.width),N.attr("height",S.height)}e.classData.annotations[0]&&(f+=S.height+i,d+=S.width);let A=e.classData.id;e.classData.type!==void 0&&e.classData.type!==""&&($().flowchart.htmlLabels?A+="<"+e.classData.type+">":A+="<"+e.classData.type+">");const O=p.node().appendChild(Yr(A,e.labelStyle,!0,!0));At(O).attr("class","classTitle");let P=O.getBBox();if(gr($().flowchart.htmlLabels)){const H=O.children[0],N=At(O);P=H.getBoundingClientRect(),N.attr("width",P.width),N.attr("height",P.height)}f+=P.height+i,P.width>d&&(d=P.width);const W=[];e.classData.members.forEach(H=>{const N=Pc(H);let M=N.displayText;$().flowchart.htmlLabels&&(M=M.replace(/</g,"<").replace(/>/g,">"));const C=p.node().appendChild(Yr(M,N.cssStyle?N.cssStyle:e.labelStyle,!0,!0));let v=C.getBBox();if(gr($().flowchart.htmlLabels)){const D=C.children[0],m=At(C);v=D.getBoundingClientRect(),m.attr("width",v.width),m.attr("height",v.height)}v.width>d&&(d=v.width),f+=v.height+i,W.push(C)}),f+=n;const q=[];if(e.classData.methods.forEach(H=>{const N=Pc(H);let M=N.displayText;$().flowchart.htmlLabels&&(M=M.replace(/</g,"<").replace(/>/g,">"));const C=p.node().appendChild(Yr(M,N.cssStyle?N.cssStyle:e.labelStyle,!0,!0));let v=C.getBBox();if(gr($().flowchart.htmlLabels)){const D=C.children[0],m=At(C);v=D.getBoundingClientRect(),m.attr("width",v.width),m.attr("height",v.height)}v.width>d&&(d=v.width),f+=v.height+i,q.push(C)}),f+=n,_){let H=(d-S.width)/2;At(w).attr("transform","translate( "+(-1*d/2+H)+", "+-1*f/2+")"),g=S.height+i}let z=(d-P.width)/2;return At(O).attr("transform","translate( "+(-1*d/2+z)+", "+(-1*f/2+g)+")"),g+=P.height+i,l.attr("class","divider").attr("x1",-d/2-r).attr("x2",d/2+r).attr("y1",-f/2-r+n+g).attr("y2",-f/2-r+n+g),g+=n,W.forEach(H=>{At(H).attr("transform","translate( "+-d/2+", "+(-1*f/2+g+n/2)+")"),g+=P.height+i}),g+=n,u.attr("class","divider").attr("x1",-d/2-r).attr("x2",d/2+r).attr("y1",-f/2-r+n+g).attr("y2",-f/2-r+n+g),g+=n,q.forEach(H=>{At(H).attr("transform","translate( "+-d/2+", "+(-1*f/2+g)+")"),g+=P.height+i}),o.attr("class","outer title-state").attr("x",-d/2-r).attr("y",-(f/2)-r).attr("width",d+e.padding).attr("height",f+e.padding),Je(e,o),e.intersect=function(H){return $e.rect(e,H)},a},H2={question:JI,rect:cO,labelRect:uO,rectWithTitle:hO,choice:tO,circle:fO,doublecircle:pO,stadium:dO,hexagon:eO,rect_left_inv_arrow:rO,lean_right:iO,lean_left:nO,trapezoid:sO,inv_trapezoid:aO,rect_right_inv_arrow:oO,cylinder:lO,start:yO,end:mO,note:QI,subroutine:gO,fork:W2,join:W2,class_box:bO};let ra={};const _O=(t,e,r)=>{let i,n;if(e.link){let s;$().securityLevel==="sandbox"?s="_top":e.linkTarget&&(s=e.linkTarget||"_blank"),i=t.insert("svg:a").attr("xlink:href",e.link).attr("target",s),n=H2[e.shape](i,e,r)}else n=H2[e.shape](t,e,r),i=n;e.tooltip&&n.attr("title",e.tooltip),e.class&&n.attr("class","node default "+e.class),ra[e.id]=i,e.haveCallback&&ra[e.id].attr("class",ra[e.id].attr("class")+" clickable")},xO=(t,e)=>{ra[e.id]=t},vO=()=>{ra={}},G2=t=>{const e=ra[t.id];B.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=8,i=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+i-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),i},kO=(t,e)=>{B.trace("Creating subgraph rect for ",e.id,e);const r=t.insert("g").attr("class","cluster"+(e.class?" "+e.class:"")).attr("id",e.id),i=r.insert("rect",":first-child"),n=r.insert("g").attr("class","cluster-label"),s=n.node().appendChild(Yr(e.labelText,e.labelStyle,void 0,!0));let a=s.getBBox();if(gr($().flowchart.htmlLabels)){const f=s.children[0],p=At(s);a=f.getBoundingClientRect(),p.attr("width",a.width),p.attr("height",a.height)}const o=0*e.padding,l=o/2,u=e.width<=a.width+o?a.width+o:e.width;e.width<=a.width+o?e.diff=(a.width-e.width)/2-e.padding/2:e.diff=-e.padding/2,B.trace("Data ",e,JSON.stringify(e)),i.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-u/2).attr("y",e.y-e.height/2-l).attr("width",u).attr("height",e.height+o),n.attr("transform","translate("+(e.x-a.width/2)+", "+(e.y-e.height/2)+")");const d=i.node().getBBox();return e.width=d.width,e.height=d.height,e.intersect=function(f){return Xo(e,f)},r},wO=(t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.id),i=r.insert("rect",":first-child"),n=0*e.padding,s=n/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-s).attr("y",e.y-e.height/2-s).attr("width",e.width+n).attr("height",e.height+n).attr("fill","none");const a=i.node().getBBox();return e.width=a.width,e.height=a.height,e.intersect=function(o){return Xo(e,o)},r},TO=(t,e)=>{const r=t.insert("g").attr("class",e.classes).attr("id",e.id),i=r.insert("rect",":first-child"),n=r.insert("g").attr("class","cluster-label"),s=r.append("rect"),a=n.node().appendChild(Yr(e.labelText,e.labelStyle,void 0,!0));let o=a.getBBox();if(gr($().flowchart.htmlLabels)){const p=a.children[0],g=At(a);o=p.getBoundingClientRect(),g.attr("width",o.width),g.attr("height",o.height)}o=a.getBBox();const l=0*e.padding,u=l/2,d=e.width<=o.width+e.padding?o.width+e.padding:e.width;e.width<=o.width+e.padding?e.diff=(o.width+e.padding*0-e.width)/2:e.diff=-e.padding/2,i.attr("class","outer").attr("x",e.x-d/2-u).attr("y",e.y-e.height/2-u).attr("width",d+l).attr("height",e.height+l),s.attr("class","inner").attr("x",e.x-d/2-u).attr("y",e.y-e.height/2-u+o.height-1).attr("width",d+l).attr("height",e.height+l-o.height-3),n.attr("transform","translate("+(e.x-o.width/2)+", "+(e.y-e.height/2-e.padding/3+(gr($().flowchart.htmlLabels)?5:3))+")");const f=i.node().getBBox();return e.height=f.height,e.intersect=function(p){return Xo(e,p)},r},EO=(t,e)=>{const r=t.insert("g").attr("class",e.classes).attr("id",e.id),i=r.insert("rect",":first-child"),n=0*e.padding,s=n/2;i.attr("class","divider").attr("x",e.x-e.width/2-s).attr("y",e.y-e.height/2).attr("width",e.width+n).attr("height",e.height+n);const a=i.node().getBBox();return e.width=a.width,e.height=a.height,e.diff=-e.padding/2,e.intersect=function(o){return Xo(e,o)},r},CO={rect:kO,roundedWithTitle:TO,noteGroup:wO,divider:EO};let Zm={};const SO=(t,e)=>{B.trace("Inserting cluster");const r=e.shape||"rect";Zm[e.id]=CO[r](t,e)},AO=()=>{Zm={}};let Vc={},_r={};const LO=()=>{Vc={},_r={}},DO=(t,e)=>{const r=Yr(e.label,e.labelStyle),i=t.insert("g").attr("class","edgeLabel"),n=i.insert("g").attr("class","label");n.node().appendChild(r);let s=r.getBBox();if(gr($().flowchart.htmlLabels)){const o=r.children[0],l=At(r);s=o.getBoundingClientRect(),l.attr("width",s.width),l.attr("height",s.height)}n.attr("transform","translate("+-s.width/2+", "+-s.height/2+")"),Vc[e.id]=i,e.width=s.width,e.height=s.height;let a;if(e.startLabelLeft){const o=Yr(e.startLabelLeft,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),u=l.insert("g").attr("class","inner");a=u.node().appendChild(o);const d=o.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),_r[e.id]||(_r[e.id]={}),_r[e.id].startLeft=l,Cl(a,e.startLabelLeft)}if(e.startLabelRight){const o=Yr(e.startLabelRight,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),u=l.insert("g").attr("class","inner");a=l.node().appendChild(o),u.node().appendChild(o);const d=o.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),_r[e.id]||(_r[e.id]={}),_r[e.id].startRight=l,Cl(a,e.startLabelRight)}if(e.endLabelLeft){const o=Yr(e.endLabelLeft,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),u=l.insert("g").attr("class","inner");a=u.node().appendChild(o);const d=o.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.node().appendChild(o),_r[e.id]||(_r[e.id]={}),_r[e.id].endLeft=l,Cl(a,e.endLabelLeft)}if(e.endLabelRight){const o=Yr(e.endLabelRight,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),u=l.insert("g").attr("class","inner");a=u.node().appendChild(o);const d=o.getBBox();u.attr("transform","translate("+-d.width/2+", "+-d.height/2+")"),l.node().appendChild(o),_r[e.id]||(_r[e.id]={}),_r[e.id].endRight=l,Cl(a,e.endLabelRight)}};function Cl(t,e){$().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}const MO=(t,e)=>{B.info("Moving label abc78 ",t.id,t.label,Vc[t.id]);let r=e.updatedPath?e.updatedPath:e.originalPath;if(t.label){const i=Vc[t.id];let n=t.x,s=t.y;if(r){const a=ye.calcLabelPosition(r);B.info("Moving label "+t.label+" from (",n,",",s,") to (",a.x,",",a.y,") abc78"),e.updatedPath&&(n=a.x,s=a.y)}i.attr("transform","translate("+n+", "+s+")")}if(t.startLabelLeft){const i=_r[t.id].startLeft;let n=t.x,s=t.y;if(r){const a=ye.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);n=a.x,s=a.y}i.attr("transform","translate("+n+", "+s+")")}if(t.startLabelRight){const i=_r[t.id].startRight;let n=t.x,s=t.y;if(r){const a=ye.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);n=a.x,s=a.y}i.attr("transform","translate("+n+", "+s+")")}if(t.endLabelLeft){const i=_r[t.id].endLeft;let n=t.x,s=t.y;if(r){const a=ye.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);n=a.x,s=a.y}i.attr("transform","translate("+n+", "+s+")")}if(t.endLabelRight){const i=_r[t.id].endRight;let n=t.x,s=t.y;if(r){const a=ye.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);n=a.x,s=a.y}i.attr("transform","translate("+n+", "+s+")")}},NO=(t,e)=>{const r=t.x,i=t.y,n=Math.abs(e.x-r),s=Math.abs(e.y-i),a=t.width/2,o=t.height/2;return n>=a||s>=o},BO=(t,e,r)=>{B.warn(`intersection calc abc89:
|
|
1214
1214
|
outsidePoint: ${JSON.stringify(e)}
|
|
1215
1215
|
insidePoint : ${JSON.stringify(r)}
|
|
1216
|
-
node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const i=t.x,n=t.y,s=Math.abs(i-r.x),a=t.width/2;let o=r.x<e.x?a-s:a+s;const l=t.height/2,u=Math.abs(e.y-r.y),d=Math.abs(e.x-r.x);if(Math.abs(n-e.y)*a>Math.abs(i-e.x)*l){let f=r.y<e.y?e.y-l-n:n-l-e.y;o=d*f/u;const p={x:r.x<e.x?r.x+o:r.x-d+o,y:r.y<e.y?r.y+u-f:r.y-u+f};return o===0&&(p.x=e.x,p.y=e.y),d===0&&(p.x=e.x),u===0&&(p.y=e.y),B.warn(`abc89 topp/bott calc, Q ${u}, q ${f}, R ${d}, r ${o}`,p),p}else{r.x<e.x?o=e.x-a-i:o=i-a-e.x;let f=u*o/d,p=r.x<e.x?r.x+d-o:r.x-d+o,g=r.y<e.y?r.y+f:r.y-f;return B.warn(`sides calc abc89, Q ${u}, q ${f}, R ${d}, r ${o}`,{_x:p,_y:g}),o===0&&(p=e.x,g=e.y),d===0&&(p=e.x),u===0&&(g=e.y),{x:p,y:g}}},q2=(t,e)=>{B.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],n=!1;return t.forEach(s=>{if(B.info("abc88 checking point",s,e),!NO(e,s)&&!n){const a=BO(e,i,s);B.warn("abc88 inside",s,i,a),B.warn("abc88 intersection",a);let o=!1;r.forEach(l=>{o=o||l.x===a.x&&l.y===a.y}),r.some(l=>l.x===a.x&&l.y===a.y)?B.warn("abc88 no intersect",a,r):r.push(a),n=!0}else B.warn("abc88 outside",s,i),i=s,n||r.push(s)}),B.warn("abc88 returning points",r),r},IO=function(t,e,r,i,n,s){let a=r.points,o=!1;const l=s.node(e.v);var u=s.node(e.w);B.info("abc88 InsertEdge: ",r),u.intersect&&l.intersect&&(a=a.slice(1,r.points.length-1),a.unshift(l.intersect(a[0])),B.info("Last point",a[a.length-1],u,u.intersect(a[a.length-1])),a.push(u.intersect(a[a.length-1]))),r.toCluster&&(B.info("to cluster abc88",i[r.toCluster]),a=q2(r.points,i[r.toCluster].node),o=!0),r.fromCluster&&(B.info("from cluster abc88",i[r.fromCluster]),a=q2(a.reverse(),i[r.fromCluster].node).reverse(),o=!0);const d=a.filter(S=>!Number.isNaN(S.y));let f;n==="graph"||n==="flowchart"?f=r.curve||ua:f=ua;const p=Ca().x(function(S){return S.x}).y(function(S){return S.y}).curve(f);let g;switch(r.thickness){case"normal":g="edge-thickness-normal";break;case"thick":g="edge-thickness-thick";break;default:g=""}switch(r.pattern){case"solid":g+=" edge-pattern-solid";break;case"dotted":g+=" edge-pattern-dotted";break;case"dashed":g+=" edge-pattern-dashed";break}const _=t.append("path").attr("d",p(d)).attr("id",r.id).attr("class"," "+g+(r.classes?" "+r.classes:"")).attr("style",r.style);let k="";switch(($().flowchart.arrowMarkerAbsolute||$().state.arrowMarkerAbsolute)&&(k=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,k=k.replace(/\(/g,"\\("),k=k.replace(/\)/g,"\\)")),B.info("arrowTypeStart",r.arrowTypeStart),B.info("arrowTypeEnd",r.arrowTypeEnd),r.arrowTypeStart){case"arrow_cross":_.attr("marker-start","url("+k+"#"+n+"-crossStart)");break;case"arrow_point":_.attr("marker-start","url("+k+"#"+n+"-pointStart)");break;case"arrow_barb":_.attr("marker-start","url("+k+"#"+n+"-barbStart)");break;case"arrow_circle":_.attr("marker-start","url("+k+"#"+n+"-circleStart)");break;case"aggregation":_.attr("marker-start","url("+k+"#"+n+"-aggregationStart)");break;case"extension":_.attr("marker-start","url("+k+"#"+n+"-extensionStart)");break;case"composition":_.attr("marker-start","url("+k+"#"+n+"-compositionStart)");break;case"dependency":_.attr("marker-start","url("+k+"#"+n+"-dependencyStart)");break;case"lollipop":_.attr("marker-start","url("+k+"#"+n+"-lollipopStart)");break}switch(r.arrowTypeEnd){case"arrow_cross":_.attr("marker-end","url("+k+"#"+n+"-crossEnd)");break;case"arrow_point":_.attr("marker-end","url("+k+"#"+n+"-pointEnd)");break;case"arrow_barb":_.attr("marker-end","url("+k+"#"+n+"-barbEnd)");break;case"arrow_circle":_.attr("marker-end","url("+k+"#"+n+"-circleEnd)");break;case"aggregation":_.attr("marker-end","url("+k+"#"+n+"-aggregationEnd)");break;case"extension":_.attr("marker-end","url("+k+"#"+n+"-extensionEnd)");break;case"composition":_.attr("marker-end","url("+k+"#"+n+"-compositionEnd)");break;case"dependency":_.attr("marker-end","url("+k+"#"+n+"-dependencyEnd)");break;case"lollipop":_.attr("marker-end","url("+k+"#"+n+"-lollipopEnd)");break}let w={};return o&&(w.updatedPath=a),w.originalPath=r.points,w},Qm=(t,e,r,i)=>{B.info("Graph in recursive render: XXX",fn(e),i);const n=e.graph().rankdir;B.trace("Dir in recursive render - dir:",n);const s=t.insert("g").attr("class","root");e.nodes()?B.info("Recursive render XXX",e.nodes()):B.info("No nodes found for",e),e.edges().length>0&&B.trace("Recursive edges",e.edge(e.edges()[0]));const a=s.insert("g").attr("class","clusters"),o=s.insert("g").attr("class","edgePaths"),l=s.insert("g").attr("class","edgeLabels"),u=s.insert("g").attr("class","nodes");e.nodes().forEach(function(f){const p=e.node(f);if(i!==void 0){const g=JSON.parse(JSON.stringify(i.clusterData));B.info("Setting data for cluster XXX (",f,") ",g,i),e.setNode(i.id,g),e.parent(f)||(B.trace("Setting parent",f,i.id),e.setParent(f,i.id,g))}if(B.info("(Insert) Node XXX"+f+": "+JSON.stringify(e.node(f))),p&&p.clusterNode){B.info("Cluster identified",f,p.width,e.node(f));const g=Qm(u,p.graph,r,e.node(f)),_=g.elem;Je(p,_),p.diff=g.diff||0,B.info("Node bounds (abc123)",f,p,p.width,p.x,p.y),xO(_,p),B.warn("Recursive render complete ",_,p)}else e.children(f).length>0?(B.info("Cluster - the non recursive path XXX",f,p.id,p,e),B.info(Io(p.id,e)),Te[p.id]={id:Io(p.id,e),node:p}):(B.info("Node - the non recursive path",f,p.id,p),_O(u,e.node(f),n))}),e.edges().forEach(function(f){const p=e.edge(f.v,f.w,f.name);B.info("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(f)),B.info("Edge "+f.v+" -> "+f.w+": ",f," ",JSON.stringify(e.edge(f))),B.info("Fix",Te,"ids:",f.v,f.w,"Translateing: ",Te[f.v],Te[f.w]),DO(l,p)}),e.edges().forEach(function(f){B.info("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(f))}),B.info("#############################################"),B.info("### Layout ###"),B.info("#############################################"),B.info(e),Ma(e),B.info("Graph after layout:",fn(e));let d=0;return GI(e).forEach(function(f){const p=e.node(f);B.info("Position "+f+": "+JSON.stringify(e.node(f))),B.info("Position "+f+": ("+p.x,","+p.y,") width: ",p.width," height: ",p.height),p&&p.clusterNode?G2(p):e.children(f).length>0?(SO(a,p),Te[p.id].node=p):G2(p)}),e.edges().forEach(function(f){const p=e.edge(f);B.info("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(p),p);const g=IO(o,f,p,Te,r,e);MO(p,g)}),e.nodes().forEach(function(f){const p=e.node(f);B.info(f,p.type,p.diff),p.type==="group"&&(d=p.diff)}),{elem:s,diff:d}},
|
|
1217
|
-
`),n.style===void 0&&(s.style=s.style||"stroke: #333; stroke-width: 1.5px;fill:none"),s.labelStyle=s.labelStyle.replace("color:","fill:"))),e.setEdge(n.id1,n.id2,s,i)})},PO=function(t){Object.keys(t).forEach(function(r){t3[r]=t[r]})},YO=function(t,e,r,i){B.info("Drawing class - ",e);const n=$().flowchart,s=$().securityLevel;B.info("config:",n);const a=n.nodeSpacing||50,o=n.rankSpacing||50,l=new or({multigraph:!0,compound:!0}).setGraph({rankdir:i.db.getDirection(),nodesep:a,ranksep:o,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),u=i.db.getClasses(),d=i.db.getRelations(),f=i.db.getNotes();B.info(d),OO(u,l,e,i),FO(d,l),RO(f,l,d.length+1,u);let p;s==="sandbox"&&(p=At("#i"+e));const g=At(s==="sandbox"?p.nodes()[0].contentDocument.body:"body"),_=g.select(`[id="${e}"]`),k=g.select("#"+e+" g");if(
|
|
1216
|
+
node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const i=t.x,n=t.y,s=Math.abs(i-r.x),a=t.width/2;let o=r.x<e.x?a-s:a+s;const l=t.height/2,u=Math.abs(e.y-r.y),d=Math.abs(e.x-r.x);if(Math.abs(n-e.y)*a>Math.abs(i-e.x)*l){let f=r.y<e.y?e.y-l-n:n-l-e.y;o=d*f/u;const p={x:r.x<e.x?r.x+o:r.x-d+o,y:r.y<e.y?r.y+u-f:r.y-u+f};return o===0&&(p.x=e.x,p.y=e.y),d===0&&(p.x=e.x),u===0&&(p.y=e.y),B.warn(`abc89 topp/bott calc, Q ${u}, q ${f}, R ${d}, r ${o}`,p),p}else{r.x<e.x?o=e.x-a-i:o=i-a-e.x;let f=u*o/d,p=r.x<e.x?r.x+d-o:r.x-d+o,g=r.y<e.y?r.y+f:r.y-f;return B.warn(`sides calc abc89, Q ${u}, q ${f}, R ${d}, r ${o}`,{_x:p,_y:g}),o===0&&(p=e.x,g=e.y),d===0&&(p=e.x),u===0&&(g=e.y),{x:p,y:g}}},q2=(t,e)=>{B.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],n=!1;return t.forEach(s=>{if(B.info("abc88 checking point",s,e),!NO(e,s)&&!n){const a=BO(e,i,s);B.warn("abc88 inside",s,i,a),B.warn("abc88 intersection",a);let o=!1;r.forEach(l=>{o=o||l.x===a.x&&l.y===a.y}),r.some(l=>l.x===a.x&&l.y===a.y)?B.warn("abc88 no intersect",a,r):r.push(a),n=!0}else B.warn("abc88 outside",s,i),i=s,n||r.push(s)}),B.warn("abc88 returning points",r),r},IO=function(t,e,r,i,n,s){let a=r.points,o=!1;const l=s.node(e.v);var u=s.node(e.w);B.info("abc88 InsertEdge: ",r),u.intersect&&l.intersect&&(a=a.slice(1,r.points.length-1),a.unshift(l.intersect(a[0])),B.info("Last point",a[a.length-1],u,u.intersect(a[a.length-1])),a.push(u.intersect(a[a.length-1]))),r.toCluster&&(B.info("to cluster abc88",i[r.toCluster]),a=q2(r.points,i[r.toCluster].node),o=!0),r.fromCluster&&(B.info("from cluster abc88",i[r.fromCluster]),a=q2(a.reverse(),i[r.fromCluster].node).reverse(),o=!0);const d=a.filter(S=>!Number.isNaN(S.y));let f;n==="graph"||n==="flowchart"?f=r.curve||ua:f=ua;const p=Ca().x(function(S){return S.x}).y(function(S){return S.y}).curve(f);let g;switch(r.thickness){case"normal":g="edge-thickness-normal";break;case"thick":g="edge-thickness-thick";break;default:g=""}switch(r.pattern){case"solid":g+=" edge-pattern-solid";break;case"dotted":g+=" edge-pattern-dotted";break;case"dashed":g+=" edge-pattern-dashed";break}const _=t.append("path").attr("d",p(d)).attr("id",r.id).attr("class"," "+g+(r.classes?" "+r.classes:"")).attr("style",r.style);let k="";switch(($().flowchart.arrowMarkerAbsolute||$().state.arrowMarkerAbsolute)&&(k=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,k=k.replace(/\(/g,"\\("),k=k.replace(/\)/g,"\\)")),B.info("arrowTypeStart",r.arrowTypeStart),B.info("arrowTypeEnd",r.arrowTypeEnd),r.arrowTypeStart){case"arrow_cross":_.attr("marker-start","url("+k+"#"+n+"-crossStart)");break;case"arrow_point":_.attr("marker-start","url("+k+"#"+n+"-pointStart)");break;case"arrow_barb":_.attr("marker-start","url("+k+"#"+n+"-barbStart)");break;case"arrow_circle":_.attr("marker-start","url("+k+"#"+n+"-circleStart)");break;case"aggregation":_.attr("marker-start","url("+k+"#"+n+"-aggregationStart)");break;case"extension":_.attr("marker-start","url("+k+"#"+n+"-extensionStart)");break;case"composition":_.attr("marker-start","url("+k+"#"+n+"-compositionStart)");break;case"dependency":_.attr("marker-start","url("+k+"#"+n+"-dependencyStart)");break;case"lollipop":_.attr("marker-start","url("+k+"#"+n+"-lollipopStart)");break}switch(r.arrowTypeEnd){case"arrow_cross":_.attr("marker-end","url("+k+"#"+n+"-crossEnd)");break;case"arrow_point":_.attr("marker-end","url("+k+"#"+n+"-pointEnd)");break;case"arrow_barb":_.attr("marker-end","url("+k+"#"+n+"-barbEnd)");break;case"arrow_circle":_.attr("marker-end","url("+k+"#"+n+"-circleEnd)");break;case"aggregation":_.attr("marker-end","url("+k+"#"+n+"-aggregationEnd)");break;case"extension":_.attr("marker-end","url("+k+"#"+n+"-extensionEnd)");break;case"composition":_.attr("marker-end","url("+k+"#"+n+"-compositionEnd)");break;case"dependency":_.attr("marker-end","url("+k+"#"+n+"-dependencyEnd)");break;case"lollipop":_.attr("marker-end","url("+k+"#"+n+"-lollipopEnd)");break}let w={};return o&&(w.updatedPath=a),w.originalPath=r.points,w},Qm=(t,e,r,i)=>{B.info("Graph in recursive render: XXX",fn(e),i);const n=e.graph().rankdir;B.trace("Dir in recursive render - dir:",n);const s=t.insert("g").attr("class","root");e.nodes()?B.info("Recursive render XXX",e.nodes()):B.info("No nodes found for",e),e.edges().length>0&&B.trace("Recursive edges",e.edge(e.edges()[0]));const a=s.insert("g").attr("class","clusters"),o=s.insert("g").attr("class","edgePaths"),l=s.insert("g").attr("class","edgeLabels"),u=s.insert("g").attr("class","nodes");e.nodes().forEach(function(f){const p=e.node(f);if(i!==void 0){const g=JSON.parse(JSON.stringify(i.clusterData));B.info("Setting data for cluster XXX (",f,") ",g,i),e.setNode(i.id,g),e.parent(f)||(B.trace("Setting parent",f,i.id),e.setParent(f,i.id,g))}if(B.info("(Insert) Node XXX"+f+": "+JSON.stringify(e.node(f))),p&&p.clusterNode){B.info("Cluster identified",f,p.width,e.node(f));const g=Qm(u,p.graph,r,e.node(f)),_=g.elem;Je(p,_),p.diff=g.diff||0,B.info("Node bounds (abc123)",f,p,p.width,p.x,p.y),xO(_,p),B.warn("Recursive render complete ",_,p)}else e.children(f).length>0?(B.info("Cluster - the non recursive path XXX",f,p.id,p,e),B.info(Io(p.id,e)),Te[p.id]={id:Io(p.id,e),node:p}):(B.info("Node - the non recursive path",f,p.id,p),_O(u,e.node(f),n))}),e.edges().forEach(function(f){const p=e.edge(f.v,f.w,f.name);B.info("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(f)),B.info("Edge "+f.v+" -> "+f.w+": ",f," ",JSON.stringify(e.edge(f))),B.info("Fix",Te,"ids:",f.v,f.w,"Translateing: ",Te[f.v],Te[f.w]),DO(l,p)}),e.edges().forEach(function(f){B.info("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(f))}),B.info("#############################################"),B.info("### Layout ###"),B.info("#############################################"),B.info(e),Ma(e),B.info("Graph after layout:",fn(e));let d=0;return GI(e).forEach(function(f){const p=e.node(f);B.info("Position "+f+": "+JSON.stringify(e.node(f))),B.info("Position "+f+": ("+p.x,","+p.y,") width: ",p.width," height: ",p.height),p&&p.clusterNode?G2(p):e.children(f).length>0?(SO(a,p),Te[p.id].node=p):G2(p)}),e.edges().forEach(function(f){const p=e.edge(f);B.info("Edge "+f.v+" -> "+f.w+": "+JSON.stringify(p),p);const g=IO(o,f,p,Te,r,e);MO(p,g)}),e.nodes().forEach(function(f){const p=e.node(f);B.info(f,p.type,p.diff),p.type==="group"&&(d=p.diff)}),{elem:s,diff:d}},G0=(t,e,r,i,n)=>{PI(t,r,i,n),vO(),LO(),AO(),zI(),B.warn("Graph at first:",fn(e)),HI(e),B.warn("Graph after:",fn(e)),Qm(t,e,i)},Jm=t=>he.sanitizeText(t,$());let t3={dividerMargin:10,padding:5,textHeight:10};const OO=function(t,e,r,i){const n=Object.keys(t);B.info("keys:",n),B.info(t),n.forEach(function(s){const a=t[s];let o="";a.cssClasses.length>0&&(o=o+" "+a.cssClasses.join(" "));const l={labelStyle:""};let u=a.text!==void 0?a.text:a.id,d=0,f="";switch(a.type){case"class":f="class_box";break;default:f="class_box"}e.setNode(a.id,{labelStyle:l.labelStyle,shape:f,labelText:Jm(u),classData:a,rx:d,ry:d,class:o,style:l.style,id:a.id,domId:a.domId,tooltip:i.db.getTooltip(a.id)||"",haveCallback:a.haveCallback,link:a.link,width:a.type==="group"?500:void 0,type:a.type,padding:$().flowchart.padding}),B.info("setNode",{labelStyle:l.labelStyle,shape:f,labelText:u,rx:d,ry:d,class:o,style:l.style,id:a.id,width:a.type==="group"?500:void 0,type:a.type,padding:$().flowchart.padding})})},RO=function(t,e,r,i){B.info(t),t.forEach(function(n,s){const a=n;let o="";const l={labelStyle:"",style:""};let u=a.text,d=0,f="note";if(e.setNode(a.id,{labelStyle:l.labelStyle,shape:f,labelText:Jm(u),noteData:a,rx:d,ry:d,class:o,style:l.style,id:a.id,domId:a.id,tooltip:"",type:"note",padding:$().flowchart.padding}),B.info("setNode",{labelStyle:l.labelStyle,shape:f,labelText:u,rx:d,ry:d,style:l.style,id:a.id,type:"note",padding:$().flowchart.padding}),!a.class||!(a.class in i))return;const p=r+s,g={};g.classes="relation",g.pattern="dotted",g.id=`edgeNote${p}`,g.arrowhead="none",B.info(`Note edge: ${JSON.stringify(g)}, ${JSON.stringify(a)}`),g.startLabelRight="",g.endLabelLeft="",g.arrowTypeStart="none",g.arrowTypeEnd="none";let _="fill:none",k="";g.style=_,g.labelStyle=k,g.curve=yi(t3.curve,$r),e.setEdge(a.id,a.class,g,p)})},FO=function(t,e){const r=$().flowchart;let i=0;t.forEach(function(n){i++;const s={};s.classes="relation",s.pattern=n.relation.lineType==1?"dashed":"solid",s.id="id"+i,n.type==="arrow_open"?s.arrowhead="none":s.arrowhead="normal",B.info(s,n),s.startLabelRight=n.relationTitle1==="none"?"":n.relationTitle1,s.endLabelLeft=n.relationTitle2==="none"?"":n.relationTitle2,s.arrowTypeStart=j2(n.relation.type1),s.arrowTypeEnd=j2(n.relation.type2);let a="",o="";if(n.style!==void 0){const l=jn(n.style);a=l.style,o=l.labelStyle}else a="fill:none";s.style=a,s.labelStyle=o,n.interpolate!==void 0?s.curve=yi(n.interpolate,$r):t.defaultInterpolate!==void 0?s.curve=yi(t.defaultInterpolate,$r):s.curve=yi(r.curve,$r),n.text=n.title,n.text===void 0?n.style!==void 0&&(s.arrowheadStyle="fill: #333"):(s.arrowheadStyle="fill: #333",s.labelpos="c",$().flowchart.htmlLabels?(s.labelType="html",s.label='<span class="edgeLabel">'+n.text+"</span>"):(s.labelType="text",s.label=n.text.replace(he.lineBreakRegex,`
|
|
1217
|
+
`),n.style===void 0&&(s.style=s.style||"stroke: #333; stroke-width: 1.5px;fill:none"),s.labelStyle=s.labelStyle.replace("color:","fill:"))),e.setEdge(n.id1,n.id2,s,i)})},PO=function(t){Object.keys(t).forEach(function(r){t3[r]=t[r]})},YO=function(t,e,r,i){B.info("Drawing class - ",e);const n=$().flowchart,s=$().securityLevel;B.info("config:",n);const a=n.nodeSpacing||50,o=n.rankSpacing||50,l=new or({multigraph:!0,compound:!0}).setGraph({rankdir:i.db.getDirection(),nodesep:a,ranksep:o,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),u=i.db.getClasses(),d=i.db.getRelations(),f=i.db.getNotes();B.info(d),OO(u,l,e,i),FO(d,l),RO(f,l,d.length+1,u);let p;s==="sandbox"&&(p=At("#i"+e));const g=At(s==="sandbox"?p.nodes()[0].contentDocument.body:"body"),_=g.select(`[id="${e}"]`),k=g.select("#"+e+" g");if(G0(k,l,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",e),ye.insertTitle(_,"classTitleText",n.titleTopMargin,i.db.getDiagramTitle()),Tu(l,_,n.diagramPadding,n.useMaxWidth),!n.htmlLabels){const w=s==="sandbox"?p.nodes()[0].contentDocument:document,S=w.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const A of S){const O=A.getBBox(),P=w.createElementNS("http://www.w3.org/2000/svg","rect");P.setAttribute("rx",0),P.setAttribute("ry",0),P.setAttribute("width",O.width),P.setAttribute("height",O.height),A.insertBefore(P,A.firstChild)}}};function j2(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}const VO={setConf:PO,draw:YO};var k1=function(){var t=function(N,M,C,v){for(C=C||{},v=N.length;v--;C[N[v]]=M);return C},e=[1,2],r=[1,5],i=[6,9,11,23,25,27,29,30,31,49],n=[1,17],s=[1,18],a=[1,19],o=[1,20],l=[1,21],u=[1,22],d=[1,25],f=[1,30],p=[1,31],g=[1,32],_=[1,33],k=[6,9,11,15,20,23,25,27,29,30,31,42,43,44,45,49],w=[1,45],S=[30,31,46,47],A=[4,6,9,11,23,25,27,29,30,31,49],O=[42,43,44,45],P=[22,37],W=[1,64],q={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,entityName:17,relSpec:18,role:19,BLOCK_START:20,attributes:21,BLOCK_STOP:22,title:23,title_value:24,acc_title:25,acc_title_value:26,acc_descr:27,acc_descr_value:28,acc_descr_multiline_value:29,ALPHANUM:30,ENTITY_NAME:31,attribute:32,attributeType:33,attributeName:34,attributeKeyType:35,attributeComment:36,ATTRIBUTE_WORD:37,ATTRIBUTE_KEY:38,COMMENT:39,cardinality:40,relType:41,ZERO_OR_ONE:42,ZERO_OR_MORE:43,ONE_OR_MORE:44,ONLY_ONE:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,open_directive:49,type_directive:50,arg_directive:51,close_directive:52,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",20:"BLOCK_START",22:"BLOCK_STOP",23:"title",24:"title_value",25:"acc_title",26:"acc_title_value",27:"acc_descr",28:"acc_descr_value",29:"acc_descr_multiline_value",30:"ALPHANUM",31:"ENTITY_NAME",37:"ATTRIBUTE_WORD",38:"ATTRIBUTE_KEY",39:"COMMENT",42:"ZERO_OR_ONE",43:"ZERO_OR_MORE",44:"ONE_OR_MORE",45:"ONLY_ONE",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD",49:"open_directive",50:"type_directive",51:"arg_directive",52:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,5],[10,4],[10,3],[10,1],[10,2],[10,2],[10,2],[10,1],[17,1],[17,1],[21,1],[21,2],[32,2],[32,3],[32,3],[32,4],[33,1],[34,1],[35,1],[36,1],[18,3],[40,1],[40,1],[40,1],[40,1],[41,1],[41,1],[19,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(M,C,v,D,m,Q,b){var ct=Q.length-1;switch(m){case 1:break;case 3:this.$=[];break;case 4:Q[ct-1].push(Q[ct]),this.$=Q[ct-1];break;case 5:case 6:this.$=Q[ct];break;case 7:case 8:this.$=[];break;case 12:D.addEntity(Q[ct-4]),D.addEntity(Q[ct-2]),D.addRelationship(Q[ct-4],Q[ct],Q[ct-2],Q[ct-3]);break;case 13:D.addEntity(Q[ct-3]),D.addAttributes(Q[ct-3],Q[ct-1]);break;case 14:D.addEntity(Q[ct-2]);break;case 15:D.addEntity(Q[ct]);break;case 16:case 17:this.$=Q[ct].trim(),D.setAccTitle(this.$);break;case 18:case 19:this.$=Q[ct].trim(),D.setAccDescription(this.$);break;case 20:case 41:this.$=Q[ct];break;case 21:case 39:case 40:this.$=Q[ct].replace(/"/g,"");break;case 22:this.$=[Q[ct]];break;case 23:Q[ct].push(Q[ct-1]),this.$=Q[ct];break;case 24:this.$={attributeType:Q[ct-1],attributeName:Q[ct]};break;case 25:this.$={attributeType:Q[ct-2],attributeName:Q[ct-1],attributeKeyType:Q[ct]};break;case 26:this.$={attributeType:Q[ct-2],attributeName:Q[ct-1],attributeComment:Q[ct]};break;case 27:this.$={attributeType:Q[ct-3],attributeName:Q[ct-2],attributeKeyType:Q[ct-1],attributeComment:Q[ct]};break;case 28:case 29:case 30:this.$=Q[ct];break;case 31:this.$=Q[ct].replace(/"/g,"");break;case 32:this.$={cardA:Q[ct],relType:Q[ct-1],cardB:Q[ct-2]};break;case 33:this.$=D.Cardinality.ZERO_OR_ONE;break;case 34:this.$=D.Cardinality.ZERO_OR_MORE;break;case 35:this.$=D.Cardinality.ONE_OR_MORE;break;case 36:this.$=D.Cardinality.ONLY_ONE;break;case 37:this.$=D.Identification.NON_IDENTIFYING;break;case 38:this.$=D.Identification.IDENTIFYING;break;case 42:D.parseDirective("%%{","open_directive");break;case 43:D.parseDirective(Q[ct],"type_directive");break;case 44:Q[ct]=Q[ct].trim().replace(/'/g,'"'),D.parseDirective(Q[ct],"arg_directive");break;case 45:D.parseDirective("}%%","close_directive","er");break}},table:[{3:1,4:e,7:3,12:4,49:r},{1:[3]},t(i,[2,3],{5:6}),{3:7,4:e,7:3,12:4,49:r},{13:8,50:[1,9]},{50:[2,42]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,23:n,25:s,27:a,29:o,30:l,31:u,49:r},{1:[2,2]},{14:23,15:[1,24],52:d},t([15,52],[2,43]),t(i,[2,8],{1:[2,1]}),t(i,[2,4]),{7:15,10:26,12:4,17:16,23:n,25:s,27:a,29:o,30:l,31:u,49:r},t(i,[2,6]),t(i,[2,7]),t(i,[2,11]),t(i,[2,15],{18:27,40:29,20:[1,28],42:f,43:p,44:g,45:_}),{24:[1,34]},{26:[1,35]},{28:[1,36]},t(i,[2,19]),t(k,[2,20]),t(k,[2,21]),{11:[1,37]},{16:38,51:[1,39]},{11:[2,45]},t(i,[2,5]),{17:40,30:l,31:u},{21:41,22:[1,42],32:43,33:44,37:w},{41:46,46:[1,47],47:[1,48]},t(S,[2,33]),t(S,[2,34]),t(S,[2,35]),t(S,[2,36]),t(i,[2,16]),t(i,[2,17]),t(i,[2,18]),t(A,[2,9]),{14:49,52:d},{52:[2,44]},{15:[1,50]},{22:[1,51]},t(i,[2,14]),{21:52,22:[2,22],32:43,33:44,37:w},{34:53,37:[1,54]},{37:[2,28]},{40:55,42:f,43:p,44:g,45:_},t(O,[2,37]),t(O,[2,38]),{11:[1,56]},{19:57,30:[1,60],31:[1,59],48:[1,58]},t(i,[2,13]),{22:[2,23]},t(P,[2,24],{35:61,36:62,38:[1,63],39:W}),t([22,37,38,39],[2,29]),t([30,31],[2,32]),t(A,[2,10]),t(i,[2,12]),t(i,[2,39]),t(i,[2,40]),t(i,[2,41]),t(P,[2,25],{36:65,39:W}),t(P,[2,26]),t([22,37,39],[2,30]),t(P,[2,31]),t(P,[2,27])],defaultActions:{5:[2,42],7:[2,2],25:[2,45],39:[2,44],45:[2,28],52:[2,23]},parseError:function(M,C){if(C.recoverable)this.trace(M);else{var v=new Error(M);throw v.hash=C,v}},parse:function(M){var C=this,v=[0],D=[],m=[null],Q=[],b=this.table,ct="",Dt=0,vt=0,j=2,ot=1,rt=Q.slice.call(arguments,1),it=Object.create(this.lexer),ut={yy:{}};for(var bt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,bt)&&(ut.yy[bt]=this.yy[bt]);it.setInput(M,ut.yy),ut.yy.lexer=it,ut.yy.parser=this,typeof it.yylloc>"u"&&(it.yylloc={});var K=it.yylloc;Q.push(K);var Ot=it.options&&it.options.ranges;typeof ut.yy.parseError=="function"?this.parseError=ut.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Y(){var et;return et=D.pop()||it.lex()||ot,typeof et!="number"&&(et instanceof Array&&(D=et,et=D.pop()),et=C.symbols_[et]||et),et}for(var U,X,F,I,L={},J,T,ht,V;;){if(X=v[v.length-1],this.defaultActions[X]?F=this.defaultActions[X]:((U===null||typeof U>"u")&&(U=Y()),F=b[X]&&b[X][U]),typeof F>"u"||!F.length||!F[0]){var Yt="";V=[];for(J in b[X])this.terminals_[J]&&J>j&&V.push("'"+this.terminals_[J]+"'");it.showPosition?Yt="Parse error on line "+(Dt+1)+`:
|
|
1218
1218
|
`+it.showPosition()+`
|
|
1219
1219
|
Expecting `+V.join(", ")+", got '"+(this.terminals_[U]||U)+"'":Yt="Parse error on line "+(Dt+1)+": Unexpected "+(U==ot?"end of input":"'"+(this.terminals_[U]||U)+"'"),this.parseError(Yt,{text:it.match,token:this.terminals_[U]||U,line:it.yylineno,loc:K,expected:V})}if(F[0]instanceof Array&&F.length>1)throw new Error("Parse Error: multiple actions possible at state: "+X+", token: "+U);switch(F[0]){case 1:v.push(U),m.push(it.yytext),Q.push(it.yylloc),v.push(F[1]),U=null,vt=it.yyleng,ct=it.yytext,Dt=it.yylineno,K=it.yylloc;break;case 2:if(T=this.productions_[F[1]][1],L.$=m[m.length-T],L._$={first_line:Q[Q.length-(T||1)].first_line,last_line:Q[Q.length-1].last_line,first_column:Q[Q.length-(T||1)].first_column,last_column:Q[Q.length-1].last_column},Ot&&(L._$.range=[Q[Q.length-(T||1)].range[0],Q[Q.length-1].range[1]]),I=this.performAction.apply(L,[ct,vt,Dt,ut.yy,F[1],m,Q].concat(rt)),typeof I<"u")return I;T&&(v=v.slice(0,-1*T*2),m=m.slice(0,-1*T),Q=Q.slice(0,-1*T)),v.push(this.productions_[F[1]][0]),m.push(L.$),Q.push(L._$),ht=b[v[v.length-2]][v[v.length-1]],v.push(ht);break;case 3:return!0}}return!0}},z=function(){var N={EOF:1,parseError:function(C,v){if(this.yy.parser)this.yy.parser.parseError(C,v);else throw new Error(C)},setInput:function(M,C){return this.yy=C||this.yy||{},this._input=M,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var M=this._input[0];this.yytext+=M,this.yyleng++,this.offset++,this.match+=M,this.matched+=M;var C=M.match(/(?:\r\n?|\n).*/g);return C?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),M},unput:function(M){var C=M.length,v=M.split(/(?:\r\n?|\n)/g);this._input=M+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-C),this.offset-=C;var D=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),v.length-1&&(this.yylineno-=v.length-1);var m=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:v?(v.length===D.length?this.yylloc.first_column:0)+D[D.length-v.length].length-v[0].length:this.yylloc.first_column-C},this.options.ranges&&(this.yylloc.range=[m[0],m[0]+this.yyleng-C]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
1220
1220
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(M){this.unput(this.match.slice(M))},pastInput:function(){var M=this.matched.substr(0,this.matched.length-this.match.length);return(M.length>20?"...":"")+M.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var M=this.match;return M.length<20&&(M+=this._input.substr(0,20-M.length)),(M.substr(0,20)+(M.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var M=this.pastInput(),C=new Array(M.length+1).join("-");return M+this.upcomingInput()+`
|
|
1221
1221
|
`+C+"^"},test_match:function(M,C){var v,D,m;if(this.options.backtrack_lexer&&(m={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(m.yylloc.range=this.yylloc.range.slice(0))),D=M[0].match(/(?:\r\n?|\n).*/g),D&&(this.yylineno+=D.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:D?D[D.length-1].length-D[D.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+M[0].length},this.yytext+=M[0],this.match+=M[0],this.matches=M,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(M[0].length),this.matched+=M[0],v=this.performAction.call(this,this.yy,this,C,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),v)return v;if(this._backtrack){for(var Q in m)this[Q]=m[Q];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var M,C,v,D;this._more||(this.yytext="",this.match="");for(var m=this._currentRules(),Q=0;Q<m.length;Q++)if(v=this._input.match(this.rules[m[Q]]),v&&(!C||v[0].length>C[0].length)){if(C=v,D=Q,this.options.backtrack_lexer){if(M=this.test_match(v,m[Q]),M!==!1)return M;if(this._backtrack){C=!1;continue}else return!1}else if(!this.options.flex)break}return C?(M=this.test_match(C,m[D]),M!==!1?M:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1222
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var C=this.next();return C||this.lex()},begin:function(C){this.conditionStack.push(C)},popState:function(){var C=this.conditionStack.length-1;return C>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(C){return C=this.conditionStack.length-1-Math.abs(C||0),C>=0?this.conditionStack[C]:"INITIAL"},pushState:function(C){this.begin(C)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(C,v,D,m){switch(D){case 0:return this.begin("acc_title"),25;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),27;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.begin("open_directive"),49;case 8:return this.begin("type_directive"),50;case 9:return this.popState(),this.begin("arg_directive"),15;case 10:return this.popState(),this.popState(),52;case 11:return 51;case 12:break;case 13:break;case 14:return 11;case 15:break;case 16:return 9;case 17:return 31;case 18:return 48;case 19:return 4;case 20:return this.begin("block"),20;case 21:break;case 22:return 38;case 23:return 37;case 24:return 37;case 25:return 39;case 26:break;case 27:return this.popState(),22;case 28:return v.yytext[0];case 29:return 42;case 30:return 44;case 31:return 44;case 32:return 44;case 33:return 42;case 34:return 42;case 35:return 43;case 36:return 43;case 37:return 43;case 38:return 43;case 39:return 43;case 40:return 44;case 41:return 43;case 42:return 44;case 43:return 45;case 44:return 45;case 45:return 45;case 46:return 45;case 47:return 42;case 48:return 43;case 49:return 44;case 50:return 46;case 51:return 47;case 52:return 47;case 53:return 46;case 54:return 46;case 55:return 46;case 56:return 30;case 57:return v.yytext[0];case 58:return 6}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[A-Za-z][A-Za-z0-9\-_\[\]]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},open_directive:{rules:[8],inclusive:!1},type_directive:{rules:[9,10],inclusive:!1},arg_directive:{rules:[10,11],inclusive:!1},block:{rules:[21,22,23,24,25,26,27,28],inclusive:!1},INITIAL:{rules:[0,2,4,7,12,13,14,15,16,17,18,19,20,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58],inclusive:!0}}};return N}();q.lexer=z;function H(){this.yy={}}return H.prototype=q,q.Parser=H,new H}();v1.parser=v1;const UO=v1,zO=t=>t.match(/^\s*erDiagram/)!==null;let oo={},G0=[];const WO={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE"},HO={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},GO=function(t,e,r){ze.parseDirective(this,t,e,r)},e3=function(t){return oo[t]===void 0&&(oo[t]={attributes:[]},B.info("Added new entity :",t)),oo[t]},qO=()=>oo,jO=function(t,e){let r=e3(t),i;for(i=e.length-1;i>=0;i--)r.attributes.push(e[i]),B.debug("Added attribute ",e[i].attributeName)},$O=function(t,e,r,i){let n={entityA:t,roleA:e,entityB:r,relSpec:i};G0.push(n),B.debug("Added new relationship :",n)},XO=()=>G0,KO=function(){oo={},G0=[],Ci()},ZO={Cardinality:WO,Identification:HO,parseDirective:GO,getConfig:()=>$().er,addEntity:e3,addAttributes:jO,getEntities:qO,addRelationship:$O,getRelationships:XO,clear:KO,setAccTitle:ii,getAccTitle:Si,setAccDescription:Ai,getAccDescription:Li,setDiagramTitle:Cn,getDiagramTitle:Sn},nn={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END"},QO=function(t,e){let r;t.append("defs").append("marker").attr("id",nn.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",nn.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",nn.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",nn.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",nn.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",nn.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),r=t.append("defs").append("marker").attr("id",nn.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),r=t.append("defs").append("marker").attr("id",nn.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},sn={ERMarkers:nn,insertMarkers:QO},JO=/[^\dA-Za-z](\W)*/g;let cr={},Oo=new Map;const tR=function(t){const e=Object.keys(t);for(const r of e)cr[r]=t[r]},eR=(t,e,r)=>{const i=cr.entityPadding/3,n=cr.entityPadding/3,s=cr.fontSize*.85,a=e.node().getBBox(),o=[];let l=!1,u=!1,d=0,f=0,p=0,g=0,_=a.height+i*2,k=1;r.forEach(O=>{O.attributeKeyType!==void 0&&(l=!0),O.attributeComment!==void 0&&(u=!0)}),r.forEach(O=>{const P=`${e.node().id}-attr-${k}`;let W=0;const q=Vn(O.attributeType),z=t.append("text").classed("er entityLabel",!0).attr("id",`${P}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",$().fontFamily).style("font-size",s+"px").text(q),H=t.append("text").classed("er entityLabel",!0).attr("id",`${P}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",$().fontFamily).style("font-size",s+"px").text(O.attributeName),N={};N.tn=z,N.nn=H;const M=z.node().getBBox(),C=H.node().getBBox();if(d=Math.max(d,M.width),f=Math.max(f,C.width),W=Math.max(M.height,C.height),l){const v=t.append("text").classed("er entityLabel",!0).attr("id",`${P}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",$().fontFamily).style("font-size",s+"px").text(O.attributeKeyType||"");N.kn=v;const D=v.node().getBBox();p=Math.max(p,D.width),W=Math.max(W,D.height)}if(u){const v=t.append("text").classed("er entityLabel",!0).attr("id",`${P}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",$().fontFamily).style("font-size",s+"px").text(O.attributeComment||"");N.cn=v;const D=v.node().getBBox();g=Math.max(g,D.width),W=Math.max(W,D.height)}N.height=W,o.push(N),_+=W+i*2,k+=1});let w=4;l&&(w+=2),u&&(w+=2);const S=d+f+p+g,A={width:Math.max(cr.minEntityWidth,Math.max(a.width+cr.entityPadding*2,S+n*w)),height:r.length>0?_:Math.max(cr.minEntityHeight,a.height+cr.entityPadding*2)};if(r.length>0){const O=Math.max(0,(A.width-S-n*w)/(w/2));e.attr("transform","translate("+A.width/2+","+(i+a.height/2)+")");let P=a.height+i*2,W="attributeBoxOdd";o.forEach(q=>{const z=P+i+q.height/2;q.tn.attr("transform","translate("+n+","+z+")");const H=t.insert("rect","#"+q.tn.node().id).classed(`er ${W}`,!0).attr("x",0).attr("y",P).attr("width",d+n*2+O).attr("height",q.height+i*2),N=parseFloat(H.attr("x"))+parseFloat(H.attr("width"));q.nn.attr("transform","translate("+(N+n)+","+z+")");const M=t.insert("rect","#"+q.nn.node().id).classed(`er ${W}`,!0).attr("x",N).attr("y",P).attr("width",f+n*2+O).attr("height",q.height+i*2);let C=parseFloat(M.attr("x"))+parseFloat(M.attr("width"));if(l){q.kn.attr("transform","translate("+(C+n)+","+z+")");const v=t.insert("rect","#"+q.kn.node().id).classed(`er ${W}`,!0).attr("x",C).attr("y",P).attr("width",p+n*2+O).attr("height",q.height+i*2);C=parseFloat(v.attr("x"))+parseFloat(v.attr("width"))}u&&(q.cn.attr("transform","translate("+(C+n)+","+z+")"),t.insert("rect","#"+q.cn.node().id).classed(`er ${W}`,"true").attr("x",C).attr("y",P).attr("width",g+n*2+O).attr("height",q.height+i*2)),P+=q.height+i*2,W=W==="attributeBoxOdd"?"attributeBoxEven":"attributeBoxOdd"})}else A.height=Math.max(cr.minEntityHeight,_),e.attr("transform","translate("+A.width/2+","+A.height/2+")");return A},rR=function(t,e,r){const i=Object.keys(e);let n;return i.forEach(function(s){const a=oR(s,"entity");Oo.set(s,a);const o=t.append("g").attr("id",a);n=n===void 0?a:n;const l="text-"+a,u=o.append("text").classed("er entityLabel",!0).attr("id",l).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",$().fontFamily).style("font-size",cr.fontSize+"px").text(s),{width:d,height:f}=eR(o,u,e[s].attributes),g=o.insert("rect","#"+l).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",d).attr("height",f).node().getBBox();r.setNode(a,{width:g.width,height:g.height,shape:"rect",id:a})}),n},iR=function(t,e){e.nodes().forEach(function(r){r!==void 0&&e.node(r)!==void 0&&t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )")})},r3=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},nR=function(t,e){return t.forEach(function(r){e.setEdge(Oo.get(r.entityA),Oo.get(r.entityB),{relationship:r},r3(r))}),t};let $2=0;const sR=function(t,e,r,i,n){$2++;const s=r.edge(Oo.get(e.entityA),Oo.get(e.entityB),r3(e)),a=Ca().x(function(_){return _.x}).y(function(_){return _.y}).curve(ua),o=t.insert("path","#"+i).classed("er relationshipLine",!0).attr("d",a(s.points)).style("stroke",cr.stroke).style("fill","none");e.relSpec.relType===n.db.Identification.NON_IDENTIFYING&&o.attr("stroke-dasharray","8,8");let l="";switch(cr.arrowMarkerAbsolute&&(l=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,l=l.replace(/\(/g,"\\("),l=l.replace(/\)/g,"\\)")),e.relSpec.cardA){case n.db.Cardinality.ZERO_OR_ONE:o.attr("marker-end","url("+l+"#"+sn.ERMarkers.ZERO_OR_ONE_END+")");break;case n.db.Cardinality.ZERO_OR_MORE:o.attr("marker-end","url("+l+"#"+sn.ERMarkers.ZERO_OR_MORE_END+")");break;case n.db.Cardinality.ONE_OR_MORE:o.attr("marker-end","url("+l+"#"+sn.ERMarkers.ONE_OR_MORE_END+")");break;case n.db.Cardinality.ONLY_ONE:o.attr("marker-end","url("+l+"#"+sn.ERMarkers.ONLY_ONE_END+")");break}switch(e.relSpec.cardB){case n.db.Cardinality.ZERO_OR_ONE:o.attr("marker-start","url("+l+"#"+sn.ERMarkers.ZERO_OR_ONE_START+")");break;case n.db.Cardinality.ZERO_OR_MORE:o.attr("marker-start","url("+l+"#"+sn.ERMarkers.ZERO_OR_MORE_START+")");break;case n.db.Cardinality.ONE_OR_MORE:o.attr("marker-start","url("+l+"#"+sn.ERMarkers.ONE_OR_MORE_START+")");break;case n.db.Cardinality.ONLY_ONE:o.attr("marker-start","url("+l+"#"+sn.ERMarkers.ONLY_ONE_START+")");break}const u=o.node().getTotalLength(),d=o.node().getPointAtLength(u*.5),f="rel"+$2,g=t.append("text").classed("er relationshipLabel",!0).attr("id",f).attr("x",d.x).attr("y",d.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",$().fontFamily).style("font-size",cr.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+f).classed("er relationshipLabelBox",!0).attr("x",d.x-g.width/2).attr("y",d.y-g.height/2).attr("width",g.width).attr("height",g.height)},aR=function(t,e,r,i){cr=$().er,B.info("Drawing ER diagram");const n=$().securityLevel;let s;n==="sandbox"&&(s=At("#i"+e));const o=At(n==="sandbox"?s.nodes()[0].contentDocument.body:"body").select(`[id='${e}']`);sn.insertMarkers(o,cr);let l;l=new or({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:cr.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});const u=rR(o,i.db.getEntities(),l),d=nR(i.db.getRelationships(),l);Ma(l),iR(o,l),d.forEach(function(k){sR(o,k,l,u,i)});const f=cr.diagramPadding;ye.insertTitle(o,"entityTitleText",cr.titleTopMargin,i.db.getDiagramTitle());const p=o.node().getBBox(),g=p.width+f*2,_=p.height+f*2;Ei(o,_,g,cr.useMaxWidth),o.attr("viewBox",`${p.x-f} ${p.y-f} ${g} ${_}`)};function oR(t="",e=""){const r=t.replace(JO,"");return`${X2(e)}${X2(r)}${AA()}`}function X2(t=""){return t.length>0?`${t}-`:""}const lR={setConf:tR,draw:aR};var k1=function(){var t=function(Or,qt,te,oe){for(te=te||{},oe=Or.length;oe--;te[Or[oe]]=qt);return te},e=[1,9],r=[1,7],i=[1,6],n=[1,8],s=[1,20,21,22,23,38,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],a=[2,10],o=[1,20],l=[1,21],u=[1,22],d=[1,23],f=[1,30],p=[1,32],g=[1,33],_=[1,34],k=[1,62],w=[1,48],S=[1,52],A=[1,36],O=[1,37],P=[1,38],W=[1,39],q=[1,40],z=[1,56],H=[1,63],N=[1,51],M=[1,53],C=[1,55],v=[1,59],D=[1,60],m=[1,41],Q=[1,42],b=[1,43],ct=[1,44],Dt=[1,61],vt=[1,50],j=[1,54],ot=[1,57],rt=[1,58],it=[1,49],ut=[1,66],bt=[1,71],K=[1,20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],Ot=[1,75],Y=[1,74],U=[1,76],X=[20,21,23,81,82],F=[1,99],I=[1,104],L=[1,107],J=[1,108],T=[1,101],ht=[1,106],V=[1,109],Yt=[1,102],et=[1,114],Mt=[1,113],Tt=[1,103],gt=[1,105],Et=[1,110],wt=[1,111],pt=[1,112],st=[1,115],le=[20,21,22,23,81,82],Xt=[20,21,22,23,53,81,82],jt=[20,21,22,23,40,52,53,55,57,59,61,63,65,66,67,69,71,73,74,76,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],Kt=[20,21,23],Gt=[20,21,23,52,66,67,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],Ee=[1,12,20,21,22,23,24,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],Ht=[52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],Vt=[1,149],Ft=[1,157],xt=[1,158],ft=[1,159],Lt=[1,160],_t=[1,144],Ut=[1,145],at=[1,141],ie=[1,152],dt=[1,153],ee=[1,154],de=[1,155],me=[1,156],be=[1,161],ke=[1,162],$t=[1,147],ne=[1,150],ge=[1,146],Qt=[1,143],ni=[20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],zr=[1,165],De=[20,21,22,23,26,52,66,67,91,105,106,109,111,112,122,123,124,125,126,127],ae=[20,21,22,23,24,26,38,40,41,42,52,56,58,60,62,64,66,67,68,70,72,73,75,77,81,82,86,87,88,89,90,91,92,95,105,106,109,111,112,113,114,122,123,124,125,126,127],Be=[12,21,22,24],Oe=[22,106],Fe=[1,250],Pe=[1,245],Ie=[1,246],Ge=[1,254],tr=[1,251],zt=[1,248],Z=[1,247],St=[1,249],Nt=[1,252],fe=[1,253],Me=[1,255],Le=[1,273],We=[20,21,23,106],xe=[20,21,22,23,66,67,86,102,105,106,109,110,111,112,113],Ne={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,openDirective:6,typeDirective:7,closeDirective:8,separator:9,":":10,argDirective:11,open_directive:12,type_directive:13,arg_directive:14,close_directive:15,graphConfig:16,document:17,line:18,statement:19,SEMI:20,NEWLINE:21,SPACE:22,EOF:23,GRAPH:24,NODIR:25,DIR:26,FirstStmtSeperator:27,ending:28,endToken:29,spaceList:30,spaceListNewline:31,verticeStatement:32,styleStatement:33,linkStyleStatement:34,classDefStatement:35,classStatement:36,clickStatement:37,subgraph:38,text:39,SQS:40,SQE:41,end:42,direction:43,acc_title:44,acc_title_value:45,acc_descr:46,acc_descr_value:47,acc_descr_multiline_value:48,link:49,node:50,vertex:51,AMP:52,STYLE_SEPARATOR:53,idString:54,DOUBLECIRCLESTART:55,DOUBLECIRCLEEND:56,PS:57,PE:58,"(-":59,"-)":60,STADIUMSTART:61,STADIUMEND:62,SUBROUTINESTART:63,SUBROUTINEEND:64,VERTEX_WITH_PROPS_START:65,ALPHA:66,COLON:67,PIPE:68,CYLINDERSTART:69,CYLINDEREND:70,DIAMOND_START:71,DIAMOND_STOP:72,TAGEND:73,TRAPSTART:74,TRAPEND:75,INVTRAPSTART:76,INVTRAPEND:77,linkStatement:78,arrowText:79,TESTSTR:80,START_LINK:81,LINK:82,textToken:83,STR:84,keywords:85,STYLE:86,LINKSTYLE:87,CLASSDEF:88,CLASS:89,CLICK:90,DOWN:91,UP:92,textNoTags:93,textNoTagsToken:94,DEFAULT:95,stylesOpt:96,alphaNum:97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,HEX:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,MINUS:109,UNIT:110,BRKT:111,DOT:112,PCT:113,TAGSTART:114,alphaNumToken:115,idStringToken:116,alphaNumStatement:117,direction_tb:118,direction_bt:119,direction_rl:120,direction_lr:121,PUNCTUATION:122,UNICODE_TEXT:123,PLUS:124,EQUALS:125,MULT:126,UNDERSCORE:127,graphCodeTokens:128,ARROW_CROSS:129,ARROW_POINT:130,ARROW_CIRCLE:131,ARROW_OPEN:132,QUOTE:133,$accept:0,$end:1},terminals_:{2:"error",10:":",12:"open_directive",13:"type_directive",14:"arg_directive",15:"close_directive",20:"SEMI",21:"NEWLINE",22:"SPACE",23:"EOF",24:"GRAPH",25:"NODIR",26:"DIR",38:"subgraph",40:"SQS",41:"SQE",42:"end",44:"acc_title",45:"acc_title_value",46:"acc_descr",47:"acc_descr_value",48:"acc_descr_multiline_value",52:"AMP",53:"STYLE_SEPARATOR",55:"DOUBLECIRCLESTART",56:"DOUBLECIRCLEEND",57:"PS",58:"PE",59:"(-",60:"-)",61:"STADIUMSTART",62:"STADIUMEND",63:"SUBROUTINESTART",64:"SUBROUTINEEND",65:"VERTEX_WITH_PROPS_START",66:"ALPHA",67:"COLON",68:"PIPE",69:"CYLINDERSTART",70:"CYLINDEREND",71:"DIAMOND_START",72:"DIAMOND_STOP",73:"TAGEND",74:"TRAPSTART",75:"TRAPEND",76:"INVTRAPSTART",77:"INVTRAPEND",80:"TESTSTR",81:"START_LINK",82:"LINK",84:"STR",86:"STYLE",87:"LINKSTYLE",88:"CLASSDEF",89:"CLASS",90:"CLICK",91:"DOWN",92:"UP",95:"DEFAULT",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"HEX",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"MINUS",110:"UNIT",111:"BRKT",112:"DOT",113:"PCT",114:"TAGSTART",118:"direction_tb",119:"direction_bt",120:"direction_rl",121:"direction_lr",122:"PUNCTUATION",123:"UNICODE_TEXT",124:"PLUS",125:"EQUALS",126:"MULT",127:"UNDERSCORE",129:"ARROW_CROSS",130:"ARROW_POINT",131:"ARROW_CIRCLE",132:"ARROW_OPEN",133:"QUOTE"},productions_:[0,[3,1],[3,2],[5,4],[5,6],[6,1],[7,1],[11,1],[8,1],[4,2],[17,0],[17,2],[18,1],[18,1],[18,1],[18,1],[18,1],[16,2],[16,2],[16,2],[16,3],[28,2],[28,1],[29,1],[29,1],[29,1],[27,1],[27,1],[27,2],[31,2],[31,2],[31,1],[31,1],[30,2],[30,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,9],[19,6],[19,4],[19,1],[19,2],[19,2],[19,1],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[50,1],[50,5],[50,3],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,8],[51,4],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,4],[51,4],[51,1],[49,2],[49,3],[49,3],[49,1],[49,3],[78,1],[79,3],[39,1],[39,2],[39,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[93,1],[93,2],[35,5],[35,5],[36,5],[37,2],[37,4],[37,3],[37,5],[37,2],[37,4],[37,4],[37,6],[37,2],[37,4],[37,2],[37,4],[37,4],[37,6],[33,5],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[103,1],[103,3],[96,1],[96,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[94,1],[94,1],[94,1],[94,1],[54,1],[54,2],[97,1],[97,2],[117,1],[117,1],[117,1],[117,1],[43,1],[43,1],[43,1],[43,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1]],performAction:function(qt,te,oe,Rt,Ye,G,Zn){var tt=G.length-1;switch(Ye){case 5:Rt.parseDirective("%%{","open_directive");break;case 6:Rt.parseDirective(G[tt],"type_directive");break;case 7:G[tt]=G[tt].trim().replace(/'/g,'"'),Rt.parseDirective(G[tt],"arg_directive");break;case 8:Rt.parseDirective("}%%","close_directive","flowchart");break;case 10:this.$=[];break;case 11:(!Array.isArray(G[tt])||G[tt].length>0)&&G[tt-1].push(G[tt]),this.$=G[tt-1];break;case 12:case 82:case 84:case 96:case 152:case 154:case 155:this.$=G[tt];break;case 19:Rt.setDirection("TB"),this.$="TB";break;case 20:Rt.setDirection(G[tt-1]),this.$=G[tt-1];break;case 35:this.$=G[tt-1].nodes;break;case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 41:this.$=Rt.addSubGraph(G[tt-6],G[tt-1],G[tt-4]);break;case 42:this.$=Rt.addSubGraph(G[tt-3],G[tt-1],G[tt-3]);break;case 43:this.$=Rt.addSubGraph(void 0,G[tt-1],void 0);break;case 45:this.$=G[tt].trim(),Rt.setAccTitle(this.$);break;case 46:case 47:this.$=G[tt].trim(),Rt.setAccDescription(this.$);break;case 51:Rt.addLink(G[tt-2].stmt,G[tt],G[tt-1]),this.$={stmt:G[tt],nodes:G[tt].concat(G[tt-2].nodes)};break;case 52:Rt.addLink(G[tt-3].stmt,G[tt-1],G[tt-2]),this.$={stmt:G[tt-1],nodes:G[tt-1].concat(G[tt-3].nodes)};break;case 53:this.$={stmt:G[tt-1],nodes:G[tt-1]};break;case 54:this.$={stmt:G[tt],nodes:G[tt]};break;case 55:this.$=[G[tt]];break;case 56:this.$=G[tt-4].concat(G[tt]);break;case 57:this.$=[G[tt-2]],Rt.setClass(G[tt-2],G[tt]);break;case 58:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"square");break;case 59:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"doublecircle");break;case 60:this.$=G[tt-5],Rt.addVertex(G[tt-5],G[tt-2],"circle");break;case 61:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"ellipse");break;case 62:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"stadium");break;case 63:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"subroutine");break;case 64:this.$=G[tt-7],Rt.addVertex(G[tt-7],G[tt-1],"rect",void 0,void 0,void 0,Object.fromEntries([[G[tt-5],G[tt-3]]]));break;case 65:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"cylinder");break;case 66:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"round");break;case 67:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"diamond");break;case 68:this.$=G[tt-5],Rt.addVertex(G[tt-5],G[tt-2],"hexagon");break;case 69:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"odd");break;case 70:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"trapezoid");break;case 71:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"inv_trapezoid");break;case 72:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"lean_right");break;case 73:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"lean_left");break;case 74:this.$=G[tt],Rt.addVertex(G[tt]);break;case 75:G[tt-1].text=G[tt],this.$=G[tt-1];break;case 76:case 77:G[tt-2].text=G[tt-1],this.$=G[tt-2];break;case 78:this.$=G[tt];break;case 79:var xr=Rt.destructLink(G[tt],G[tt-2]);this.$={type:xr.type,stroke:xr.stroke,length:xr.length,text:G[tt-1]};break;case 80:var xr=Rt.destructLink(G[tt]);this.$={type:xr.type,stroke:xr.stroke,length:xr.length};break;case 81:this.$=G[tt-1];break;case 83:case 97:case 153:this.$=G[tt-1]+""+G[tt];break;case 98:case 99:this.$=G[tt-4],Rt.addClass(G[tt-2],G[tt]);break;case 100:this.$=G[tt-4],Rt.setClass(G[tt-2],G[tt]);break;case 101:case 109:this.$=G[tt-1],Rt.setClickEvent(G[tt-1],G[tt]);break;case 102:case 110:this.$=G[tt-3],Rt.setClickEvent(G[tt-3],G[tt-2]),Rt.setTooltip(G[tt-3],G[tt]);break;case 103:this.$=G[tt-2],Rt.setClickEvent(G[tt-2],G[tt-1],G[tt]);break;case 104:this.$=G[tt-4],Rt.setClickEvent(G[tt-4],G[tt-3],G[tt-2]),Rt.setTooltip(G[tt-4],G[tt]);break;case 105:case 111:this.$=G[tt-1],Rt.setLink(G[tt-1],G[tt]);break;case 106:case 112:this.$=G[tt-3],Rt.setLink(G[tt-3],G[tt-2]),Rt.setTooltip(G[tt-3],G[tt]);break;case 107:case 113:this.$=G[tt-3],Rt.setLink(G[tt-3],G[tt-2],G[tt]);break;case 108:case 114:this.$=G[tt-5],Rt.setLink(G[tt-5],G[tt-4],G[tt]),Rt.setTooltip(G[tt-5],G[tt-2]);break;case 115:this.$=G[tt-4],Rt.addVertex(G[tt-2],void 0,void 0,G[tt]);break;case 116:case 118:this.$=G[tt-4],Rt.updateLink(G[tt-2],G[tt]);break;case 117:this.$=G[tt-4],Rt.updateLink([G[tt-2]],G[tt]);break;case 119:this.$=G[tt-8],Rt.updateLinkInterpolate([G[tt-6]],G[tt-2]),Rt.updateLink([G[tt-6]],G[tt]);break;case 120:this.$=G[tt-8],Rt.updateLinkInterpolate(G[tt-6],G[tt-2]),Rt.updateLink(G[tt-6],G[tt]);break;case 121:this.$=G[tt-6],Rt.updateLinkInterpolate([G[tt-4]],G[tt]);break;case 122:this.$=G[tt-6],Rt.updateLinkInterpolate(G[tt-4],G[tt]);break;case 123:case 125:this.$=[G[tt]];break;case 124:case 126:G[tt-2].push(G[tt]),this.$=G[tt-2];break;case 128:this.$=G[tt-1]+G[tt];break;case 150:this.$=G[tt];break;case 151:this.$=G[tt-1]+""+G[tt];break;case 156:this.$="v";break;case 157:this.$="-";break;case 158:this.$={stmt:"dir",value:"TB"};break;case 159:this.$={stmt:"dir",value:"BT"};break;case 160:this.$={stmt:"dir",value:"RL"};break;case 161:this.$={stmt:"dir",value:"LR"};break}},table:[{3:1,4:2,5:3,6:5,12:e,16:4,21:r,22:i,24:n},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:e,16:4,21:r,22:i,24:n},t(s,a,{17:11}),{7:12,13:[1,13]},{16:14,21:r,22:i,24:n},{16:15,21:r,22:i,24:n},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:o,21:l,22:u,23:d,32:24,33:25,34:26,35:27,36:28,37:29,38:f,43:31,44:p,46:g,48:_,50:35,51:45,52:k,54:46,66:w,67:S,86:A,87:O,88:P,89:W,90:q,91:z,95:H,105:N,106:M,109:C,111:v,112:D,116:47,118:m,119:Q,120:b,121:ct,122:Dt,123:vt,124:j,125:ot,126:rt,127:it},{8:64,10:[1,65],15:ut},t([10,15],[2,6]),t(s,[2,17]),t(s,[2,18]),t(s,[2,19]),{20:[1,68],21:[1,69],22:bt,27:67,30:70},t(K,[2,11]),t(K,[2,12]),t(K,[2,13]),t(K,[2,14]),t(K,[2,15]),t(K,[2,16]),{9:72,20:Ot,21:Y,23:U,49:73,78:77,81:[1,78],82:[1,79]},{9:80,20:Ot,21:Y,23:U},{9:81,20:Ot,21:Y,23:U},{9:82,20:Ot,21:Y,23:U},{9:83,20:Ot,21:Y,23:U},{9:84,20:Ot,21:Y,23:U},{9:86,20:Ot,21:Y,22:[1,85],23:U},t(K,[2,44]),{45:[1,87]},{47:[1,88]},t(K,[2,47]),t(X,[2,54],{30:89,22:bt}),{22:[1,90]},{22:[1,91]},{22:[1,92]},{22:[1,93]},{26:F,52:I,66:L,67:J,84:[1,97],91:T,97:96,98:[1,94],100:[1,95],105:ht,106:V,109:Yt,111:et,112:Mt,115:100,117:98,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(K,[2,158]),t(K,[2,159]),t(K,[2,160]),t(K,[2,161]),t(le,[2,55],{53:[1,116]}),t(Xt,[2,74],{116:129,40:[1,117],52:k,55:[1,118],57:[1,119],59:[1,120],61:[1,121],63:[1,122],65:[1,123],66:w,67:S,69:[1,124],71:[1,125],73:[1,126],74:[1,127],76:[1,128],91:z,95:H,105:N,106:M,109:C,111:v,112:D,122:Dt,123:vt,124:j,125:ot,126:rt,127:it}),t(jt,[2,150]),t(jt,[2,175]),t(jt,[2,176]),t(jt,[2,177]),t(jt,[2,178]),t(jt,[2,179]),t(jt,[2,180]),t(jt,[2,181]),t(jt,[2,182]),t(jt,[2,183]),t(jt,[2,184]),t(jt,[2,185]),t(jt,[2,186]),t(jt,[2,187]),t(jt,[2,188]),t(jt,[2,189]),t(jt,[2,190]),{9:130,20:Ot,21:Y,23:U},{11:131,14:[1,132]},t(Kt,[2,8]),t(s,[2,20]),t(s,[2,26]),t(s,[2,27]),{21:[1,133]},t(Gt,[2,34],{30:134,22:bt}),t(K,[2,35]),{50:135,51:45,52:k,54:46,66:w,67:S,91:z,95:H,105:N,106:M,109:C,111:v,112:D,116:47,122:Dt,123:vt,124:j,125:ot,126:rt,127:it},t(Ee,[2,48]),t(Ee,[2,49]),t(Ee,[2,50]),t(Ht,[2,78],{79:136,68:[1,138],80:[1,137]}),{22:Vt,24:Ft,26:xt,38:ft,39:139,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t([52,66,67,68,80,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,80]),t(K,[2,36]),t(K,[2,37]),t(K,[2,38]),t(K,[2,39]),t(K,[2,40]),{22:Vt,24:Ft,26:xt,38:ft,39:163,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(ni,a,{17:164}),t(K,[2,45]),t(K,[2,46]),t(X,[2,53],{52:zr}),{26:F,52:I,66:L,67:J,91:T,97:166,102:[1,167],105:ht,106:V,109:Yt,111:et,112:Mt,115:100,117:98,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{95:[1,168],103:169,105:[1,170]},{26:F,52:I,66:L,67:J,91:T,95:[1,171],97:172,105:ht,106:V,109:Yt,111:et,112:Mt,115:100,117:98,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{26:F,52:I,66:L,67:J,91:T,97:173,105:ht,106:V,109:Yt,111:et,112:Mt,115:100,117:98,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(Kt,[2,101],{22:[1,174],99:[1,175]}),t(Kt,[2,105],{22:[1,176]}),t(Kt,[2,109],{115:100,117:178,22:[1,177],26:F,52:I,66:L,67:J,91:T,105:ht,106:V,109:Yt,111:et,112:Mt,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st}),t(Kt,[2,111],{22:[1,179]}),t(De,[2,152]),t(De,[2,154]),t(De,[2,155]),t(De,[2,156]),t(De,[2,157]),t(ae,[2,162]),t(ae,[2,163]),t(ae,[2,164]),t(ae,[2,165]),t(ae,[2,166]),t(ae,[2,167]),t(ae,[2,168]),t(ae,[2,169]),t(ae,[2,170]),t(ae,[2,171]),t(ae,[2,172]),t(ae,[2,173]),t(ae,[2,174]),{52:k,54:180,66:w,67:S,91:z,95:H,105:N,106:M,109:C,111:v,112:D,116:47,122:Dt,123:vt,124:j,125:ot,126:rt,127:it},{22:Vt,24:Ft,26:xt,38:ft,39:181,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:182,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:184,42:Lt,52:I,57:[1,183],66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:185,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:186,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:187,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{66:[1,188]},{22:Vt,24:Ft,26:xt,38:ft,39:189,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:190,42:Lt,52:I,66:L,67:J,71:[1,191],73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:192,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:193,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:194,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(jt,[2,151]),t(Be,[2,3]),{8:195,15:ut},{15:[2,7]},t(s,[2,28]),t(Gt,[2,33]),t(X,[2,51],{30:196,22:bt}),t(Ht,[2,75],{22:[1,197]}),{22:[1,198]},{22:Vt,24:Ft,26:xt,38:ft,39:199,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,82:[1,200],83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(ae,[2,82]),t(ae,[2,84]),t(ae,[2,140]),t(ae,[2,141]),t(ae,[2,142]),t(ae,[2,143]),t(ae,[2,144]),t(ae,[2,145]),t(ae,[2,146]),t(ae,[2,147]),t(ae,[2,148]),t(ae,[2,149]),t(ae,[2,85]),t(ae,[2,86]),t(ae,[2,87]),t(ae,[2,88]),t(ae,[2,89]),t(ae,[2,90]),t(ae,[2,91]),t(ae,[2,92]),t(ae,[2,93]),t(ae,[2,94]),t(ae,[2,95]),{9:203,20:Ot,21:Y,22:Vt,23:U,24:Ft,26:xt,38:ft,40:[1,202],42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{18:18,19:19,20:o,21:l,22:u,23:d,32:24,33:25,34:26,35:27,36:28,37:29,38:f,42:[1,204],43:31,44:p,46:g,48:_,50:35,51:45,52:k,54:46,66:w,67:S,86:A,87:O,88:P,89:W,90:q,91:z,95:H,105:N,106:M,109:C,111:v,112:D,116:47,118:m,119:Q,120:b,121:ct,122:Dt,123:vt,124:j,125:ot,126:rt,127:it},{22:bt,30:205},{22:[1,206],26:F,52:I,66:L,67:J,91:T,105:ht,106:V,109:Yt,111:et,112:Mt,115:100,117:178,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:[1,207]},{22:[1,208]},{22:[1,209],106:[1,210]},t(Oe,[2,123]),{22:[1,211]},{22:[1,212],26:F,52:I,66:L,67:J,91:T,105:ht,106:V,109:Yt,111:et,112:Mt,115:100,117:178,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:[1,213],26:F,52:I,66:L,67:J,91:T,105:ht,106:V,109:Yt,111:et,112:Mt,115:100,117:178,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{84:[1,214]},t(Kt,[2,103],{22:[1,215]}),{84:[1,216],101:[1,217]},{84:[1,218]},t(De,[2,153]),{84:[1,219],101:[1,220]},t(le,[2,57],{116:129,52:k,66:w,67:S,91:z,95:H,105:N,106:M,109:C,111:v,112:D,122:Dt,123:vt,124:j,125:ot,126:rt,127:it}),{22:Vt,24:Ft,26:xt,38:ft,41:[1,221],42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,56:[1,222],66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:223,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,58:[1,224],66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,60:[1,225],66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,62:[1,226],66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,64:[1,227],66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{67:[1,228]},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,66:L,67:J,70:[1,229],73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,66:L,67:J,72:[1,230],73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:231,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,41:[1,232],42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,66:L,67:J,73:_t,75:[1,233],77:[1,234],81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,66:L,67:J,73:_t,75:[1,236],77:[1,235],81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{9:237,20:Ot,21:Y,23:U},t(X,[2,52],{52:zr}),t(Ht,[2,77]),t(Ht,[2,76]),{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,66:L,67:J,68:[1,238],73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(Ht,[2,79]),t(ae,[2,83]),{22:Vt,24:Ft,26:xt,38:ft,39:239,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(ni,a,{17:240}),t(K,[2,43]),{51:241,52:k,54:46,66:w,67:S,91:z,95:H,105:N,106:M,109:C,111:v,112:D,116:47,122:Dt,123:vt,124:j,125:ot,126:rt,127:it},{22:Fe,66:Pe,67:Ie,86:Ge,96:242,102:tr,105:zt,107:243,108:244,109:Z,110:St,111:Nt,112:fe,113:Me},{22:Fe,66:Pe,67:Ie,86:Ge,96:256,102:tr,105:zt,107:243,108:244,109:Z,110:St,111:Nt,112:fe,113:Me},{22:Fe,66:Pe,67:Ie,86:Ge,96:257,102:tr,104:[1,258],105:zt,107:243,108:244,109:Z,110:St,111:Nt,112:fe,113:Me},{22:Fe,66:Pe,67:Ie,86:Ge,96:259,102:tr,104:[1,260],105:zt,107:243,108:244,109:Z,110:St,111:Nt,112:fe,113:Me},{105:[1,261]},{22:Fe,66:Pe,67:Ie,86:Ge,96:262,102:tr,105:zt,107:243,108:244,109:Z,110:St,111:Nt,112:fe,113:Me},{22:Fe,66:Pe,67:Ie,86:Ge,96:263,102:tr,105:zt,107:243,108:244,109:Z,110:St,111:Nt,112:fe,113:Me},{26:F,52:I,66:L,67:J,91:T,97:264,105:ht,106:V,109:Yt,111:et,112:Mt,115:100,117:98,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(Kt,[2,102]),{84:[1,265]},t(Kt,[2,106],{22:[1,266]}),t(Kt,[2,107]),t(Kt,[2,110]),t(Kt,[2,112],{22:[1,267]}),t(Kt,[2,113]),t(Xt,[2,58]),t(Xt,[2,59]),{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,58:[1,268],66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(Xt,[2,66]),t(Xt,[2,61]),t(Xt,[2,62]),t(Xt,[2,63]),{66:[1,269]},t(Xt,[2,65]),t(Xt,[2,67]),{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,66:L,67:J,72:[1,270],73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(Xt,[2,69]),t(Xt,[2,70]),t(Xt,[2,72]),t(Xt,[2,71]),t(Xt,[2,73]),t(Be,[2,4]),t([22,52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,81]),{22:Vt,24:Ft,26:xt,38:ft,41:[1,271],42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{18:18,19:19,20:o,21:l,22:u,23:d,32:24,33:25,34:26,35:27,36:28,37:29,38:f,42:[1,272],43:31,44:p,46:g,48:_,50:35,51:45,52:k,54:46,66:w,67:S,86:A,87:O,88:P,89:W,90:q,91:z,95:H,105:N,106:M,109:C,111:v,112:D,116:47,118:m,119:Q,120:b,121:ct,122:Dt,123:vt,124:j,125:ot,126:rt,127:it},t(le,[2,56]),t(Kt,[2,115],{106:Le}),t(We,[2,125],{108:274,22:Fe,66:Pe,67:Ie,86:Ge,102:tr,105:zt,109:Z,110:St,111:Nt,112:fe,113:Me}),t(xe,[2,127]),t(xe,[2,129]),t(xe,[2,130]),t(xe,[2,131]),t(xe,[2,132]),t(xe,[2,133]),t(xe,[2,134]),t(xe,[2,135]),t(xe,[2,136]),t(xe,[2,137]),t(xe,[2,138]),t(xe,[2,139]),t(Kt,[2,116],{106:Le}),t(Kt,[2,117],{106:Le}),{22:[1,275]},t(Kt,[2,118],{106:Le}),{22:[1,276]},t(Oe,[2,124]),t(Kt,[2,98],{106:Le}),t(Kt,[2,99],{106:Le}),t(Kt,[2,100],{115:100,117:178,26:F,52:I,66:L,67:J,91:T,105:ht,106:V,109:Yt,111:et,112:Mt,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st}),t(Kt,[2,104]),{101:[1,277]},{101:[1,278]},{58:[1,279]},{68:[1,280]},{72:[1,281]},{9:282,20:Ot,21:Y,23:U},t(K,[2,42]),{22:Fe,66:Pe,67:Ie,86:Ge,102:tr,105:zt,107:283,108:244,109:Z,110:St,111:Nt,112:fe,113:Me},t(xe,[2,128]),{26:F,52:I,66:L,67:J,91:T,97:284,105:ht,106:V,109:Yt,111:et,112:Mt,115:100,117:98,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{26:F,52:I,66:L,67:J,91:T,97:285,105:ht,106:V,109:Yt,111:et,112:Mt,115:100,117:98,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(Kt,[2,108]),t(Kt,[2,114]),t(Xt,[2,60]),{22:Vt,24:Ft,26:xt,38:ft,39:286,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(Xt,[2,68]),t(ni,a,{17:287}),t(We,[2,126],{108:274,22:Fe,66:Pe,67:Ie,86:Ge,102:tr,105:zt,109:Z,110:St,111:Nt,112:fe,113:Me}),t(Kt,[2,121],{115:100,117:178,22:[1,288],26:F,52:I,66:L,67:J,91:T,105:ht,106:V,109:Yt,111:et,112:Mt,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st}),t(Kt,[2,122],{115:100,117:178,22:[1,289],26:F,52:I,66:L,67:J,91:T,105:ht,106:V,109:Yt,111:et,112:Mt,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st}),{22:Vt,24:Ft,26:xt,38:ft,41:[1,290],42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{18:18,19:19,20:o,21:l,22:u,23:d,32:24,33:25,34:26,35:27,36:28,37:29,38:f,42:[1,291],43:31,44:p,46:g,48:_,50:35,51:45,52:k,54:46,66:w,67:S,86:A,87:O,88:P,89:W,90:q,91:z,95:H,105:N,106:M,109:C,111:v,112:D,116:47,118:m,119:Q,120:b,121:ct,122:Dt,123:vt,124:j,125:ot,126:rt,127:it},{22:Fe,66:Pe,67:Ie,86:Ge,96:292,102:tr,105:zt,107:243,108:244,109:Z,110:St,111:Nt,112:fe,113:Me},{22:Fe,66:Pe,67:Ie,86:Ge,96:293,102:tr,105:zt,107:243,108:244,109:Z,110:St,111:Nt,112:fe,113:Me},t(Xt,[2,64]),t(K,[2,41]),t(Kt,[2,119],{106:Le}),t(Kt,[2,120],{106:Le})],defaultActions:{2:[2,1],9:[2,5],10:[2,2],132:[2,7]},parseError:function(qt,te){if(te.recoverable)this.trace(qt);else{var oe=new Error(qt);throw oe.hash=te,oe}},parse:function(qt){var te=this,oe=[0],Rt=[],Ye=[null],G=[],Zn=this.table,tt="",xr=0,rl=0,Ru=2,il=1,nl=G.slice.call(arguments,1),er=Object.create(this.lexer),Di={yy:{}};for(var Mi in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Mi)&&(Di.yy[Mi]=this.yy[Mi]);er.setInput(qt,Di.yy),Di.yy.lexer=er,Di.yy.parser=this,typeof er.yylloc>"u"&&(er.yylloc={});var Qn=er.yylloc;G.push(Qn);var Ba=er.options&&er.options.ranges;typeof Di.yy.parseError=="function"?this.parseError=Di.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function sl(){var Hr;return Hr=Rt.pop()||er.lex()||il,typeof Hr!="number"&&(Hr instanceof Array&&(Rt=Hr,Hr=Rt.pop()),Hr=te.symbols_[Hr]||Hr),Hr}for(var mr,Se,Sr,ji,si={},$i,Wr,Ia,Is;;){if(Se=oe[oe.length-1],this.defaultActions[Se]?Sr=this.defaultActions[Se]:((mr===null||typeof mr>"u")&&(mr=sl()),Sr=Zn[Se]&&Zn[Se][mr]),typeof Sr>"u"||!Sr.length||!Sr[0]){var Jn="";Is=[];for($i in Zn[Se])this.terminals_[$i]&&$i>Ru&&Is.push("'"+this.terminals_[$i]+"'");er.showPosition?Jn="Parse error on line "+(xr+1)+`:
|
|
1222
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var C=this.next();return C||this.lex()},begin:function(C){this.conditionStack.push(C)},popState:function(){var C=this.conditionStack.length-1;return C>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(C){return C=this.conditionStack.length-1-Math.abs(C||0),C>=0?this.conditionStack[C]:"INITIAL"},pushState:function(C){this.begin(C)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(C,v,D,m){switch(D){case 0:return this.begin("acc_title"),25;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),27;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.begin("open_directive"),49;case 8:return this.begin("type_directive"),50;case 9:return this.popState(),this.begin("arg_directive"),15;case 10:return this.popState(),this.popState(),52;case 11:return 51;case 12:break;case 13:break;case 14:return 11;case 15:break;case 16:return 9;case 17:return 31;case 18:return 48;case 19:return 4;case 20:return this.begin("block"),20;case 21:break;case 22:return 38;case 23:return 37;case 24:return 37;case 25:return 39;case 26:break;case 27:return this.popState(),22;case 28:return v.yytext[0];case 29:return 42;case 30:return 44;case 31:return 44;case 32:return 44;case 33:return 42;case 34:return 42;case 35:return 43;case 36:return 43;case 37:return 43;case 38:return 43;case 39:return 43;case 40:return 44;case 41:return 43;case 42:return 44;case 43:return 45;case 44:return 45;case 45:return 45;case 46:return 45;case 47:return 42;case 48:return 43;case 49:return 44;case 50:return 46;case 51:return 47;case 52:return 47;case 53:return 46;case 54:return 46;case 55:return 46;case 56:return 30;case 57:return v.yytext[0];case 58:return 6}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[A-Za-z][A-Za-z0-9\-_\[\]]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:one or zero\b)/i,/^(?:one or more\b)/i,/^(?:one or many\b)/i,/^(?:1\+)/i,/^(?:\|o\b)/i,/^(?:zero or one\b)/i,/^(?:zero or more\b)/i,/^(?:zero or many\b)/i,/^(?:0\+)/i,/^(?:\}o\b)/i,/^(?:many\(0\))/i,/^(?:many\(1\))/i,/^(?:many\b)/i,/^(?:\}\|)/i,/^(?:one\b)/i,/^(?:only one\b)/i,/^(?:1\b)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:to\b)/i,/^(?:optionally to\b)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},open_directive:{rules:[8],inclusive:!1},type_directive:{rules:[9,10],inclusive:!1},arg_directive:{rules:[10,11],inclusive:!1},block:{rules:[21,22,23,24,25,26,27,28],inclusive:!1},INITIAL:{rules:[0,2,4,7,12,13,14,15,16,17,18,19,20,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58],inclusive:!0}}};return N}();q.lexer=z;function H(){this.yy={}}return H.prototype=q,q.Parser=H,new H}();k1.parser=k1;const UO=k1,zO=t=>t.match(/^\s*erDiagram/)!==null;let oo={},q0=[];const WO={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE"},HO={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},GO=function(t,e,r){ze.parseDirective(this,t,e,r)},e3=function(t){return oo[t]===void 0&&(oo[t]={attributes:[]},B.info("Added new entity :",t)),oo[t]},qO=()=>oo,jO=function(t,e){let r=e3(t),i;for(i=e.length-1;i>=0;i--)r.attributes.push(e[i]),B.debug("Added attribute ",e[i].attributeName)},$O=function(t,e,r,i){let n={entityA:t,roleA:e,entityB:r,relSpec:i};q0.push(n),B.debug("Added new relationship :",n)},XO=()=>q0,KO=function(){oo={},q0=[],Ci()},ZO={Cardinality:WO,Identification:HO,parseDirective:GO,getConfig:()=>$().er,addEntity:e3,addAttributes:jO,getEntities:qO,addRelationship:$O,getRelationships:XO,clear:KO,setAccTitle:ii,getAccTitle:Si,setAccDescription:Ai,getAccDescription:Li,setDiagramTitle:Cn,getDiagramTitle:Sn},nn={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END"},QO=function(t,e){let r;t.append("defs").append("marker").attr("id",nn.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",nn.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",nn.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",nn.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",nn.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",nn.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),r=t.append("defs").append("marker").attr("id",nn.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),r=t.append("defs").append("marker").attr("id",nn.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},sn={ERMarkers:nn,insertMarkers:QO},JO=/[^\dA-Za-z](\W)*/g;let cr={},Oo=new Map;const tR=function(t){const e=Object.keys(t);for(const r of e)cr[r]=t[r]},eR=(t,e,r)=>{const i=cr.entityPadding/3,n=cr.entityPadding/3,s=cr.fontSize*.85,a=e.node().getBBox(),o=[];let l=!1,u=!1,d=0,f=0,p=0,g=0,_=a.height+i*2,k=1;r.forEach(O=>{O.attributeKeyType!==void 0&&(l=!0),O.attributeComment!==void 0&&(u=!0)}),r.forEach(O=>{const P=`${e.node().id}-attr-${k}`;let W=0;const q=Vn(O.attributeType),z=t.append("text").classed("er entityLabel",!0).attr("id",`${P}-type`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",$().fontFamily).style("font-size",s+"px").text(q),H=t.append("text").classed("er entityLabel",!0).attr("id",`${P}-name`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",$().fontFamily).style("font-size",s+"px").text(O.attributeName),N={};N.tn=z,N.nn=H;const M=z.node().getBBox(),C=H.node().getBBox();if(d=Math.max(d,M.width),f=Math.max(f,C.width),W=Math.max(M.height,C.height),l){const v=t.append("text").classed("er entityLabel",!0).attr("id",`${P}-key`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",$().fontFamily).style("font-size",s+"px").text(O.attributeKeyType||"");N.kn=v;const D=v.node().getBBox();p=Math.max(p,D.width),W=Math.max(W,D.height)}if(u){const v=t.append("text").classed("er entityLabel",!0).attr("id",`${P}-comment`).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","left").style("font-family",$().fontFamily).style("font-size",s+"px").text(O.attributeComment||"");N.cn=v;const D=v.node().getBBox();g=Math.max(g,D.width),W=Math.max(W,D.height)}N.height=W,o.push(N),_+=W+i*2,k+=1});let w=4;l&&(w+=2),u&&(w+=2);const S=d+f+p+g,A={width:Math.max(cr.minEntityWidth,Math.max(a.width+cr.entityPadding*2,S+n*w)),height:r.length>0?_:Math.max(cr.minEntityHeight,a.height+cr.entityPadding*2)};if(r.length>0){const O=Math.max(0,(A.width-S-n*w)/(w/2));e.attr("transform","translate("+A.width/2+","+(i+a.height/2)+")");let P=a.height+i*2,W="attributeBoxOdd";o.forEach(q=>{const z=P+i+q.height/2;q.tn.attr("transform","translate("+n+","+z+")");const H=t.insert("rect","#"+q.tn.node().id).classed(`er ${W}`,!0).attr("x",0).attr("y",P).attr("width",d+n*2+O).attr("height",q.height+i*2),N=parseFloat(H.attr("x"))+parseFloat(H.attr("width"));q.nn.attr("transform","translate("+(N+n)+","+z+")");const M=t.insert("rect","#"+q.nn.node().id).classed(`er ${W}`,!0).attr("x",N).attr("y",P).attr("width",f+n*2+O).attr("height",q.height+i*2);let C=parseFloat(M.attr("x"))+parseFloat(M.attr("width"));if(l){q.kn.attr("transform","translate("+(C+n)+","+z+")");const v=t.insert("rect","#"+q.kn.node().id).classed(`er ${W}`,!0).attr("x",C).attr("y",P).attr("width",p+n*2+O).attr("height",q.height+i*2);C=parseFloat(v.attr("x"))+parseFloat(v.attr("width"))}u&&(q.cn.attr("transform","translate("+(C+n)+","+z+")"),t.insert("rect","#"+q.cn.node().id).classed(`er ${W}`,"true").attr("x",C).attr("y",P).attr("width",g+n*2+O).attr("height",q.height+i*2)),P+=q.height+i*2,W=W==="attributeBoxOdd"?"attributeBoxEven":"attributeBoxOdd"})}else A.height=Math.max(cr.minEntityHeight,_),e.attr("transform","translate("+A.width/2+","+A.height/2+")");return A},rR=function(t,e,r){const i=Object.keys(e);let n;return i.forEach(function(s){const a=oR(s,"entity");Oo.set(s,a);const o=t.append("g").attr("id",a);n=n===void 0?a:n;const l="text-"+a,u=o.append("text").classed("er entityLabel",!0).attr("id",l).attr("x",0).attr("y",0).style("dominant-baseline","middle").style("text-anchor","middle").style("font-family",$().fontFamily).style("font-size",cr.fontSize+"px").text(s),{width:d,height:f}=eR(o,u,e[s].attributes),g=o.insert("rect","#"+l).classed("er entityBox",!0).attr("x",0).attr("y",0).attr("width",d).attr("height",f).node().getBBox();r.setNode(a,{width:g.width,height:g.height,shape:"rect",id:a})}),n},iR=function(t,e){e.nodes().forEach(function(r){r!==void 0&&e.node(r)!==void 0&&t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )")})},r3=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},nR=function(t,e){return t.forEach(function(r){e.setEdge(Oo.get(r.entityA),Oo.get(r.entityB),{relationship:r},r3(r))}),t};let $2=0;const sR=function(t,e,r,i,n){$2++;const s=r.edge(Oo.get(e.entityA),Oo.get(e.entityB),r3(e)),a=Ca().x(function(_){return _.x}).y(function(_){return _.y}).curve(ua),o=t.insert("path","#"+i).classed("er relationshipLine",!0).attr("d",a(s.points)).style("stroke",cr.stroke).style("fill","none");e.relSpec.relType===n.db.Identification.NON_IDENTIFYING&&o.attr("stroke-dasharray","8,8");let l="";switch(cr.arrowMarkerAbsolute&&(l=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,l=l.replace(/\(/g,"\\("),l=l.replace(/\)/g,"\\)")),e.relSpec.cardA){case n.db.Cardinality.ZERO_OR_ONE:o.attr("marker-end","url("+l+"#"+sn.ERMarkers.ZERO_OR_ONE_END+")");break;case n.db.Cardinality.ZERO_OR_MORE:o.attr("marker-end","url("+l+"#"+sn.ERMarkers.ZERO_OR_MORE_END+")");break;case n.db.Cardinality.ONE_OR_MORE:o.attr("marker-end","url("+l+"#"+sn.ERMarkers.ONE_OR_MORE_END+")");break;case n.db.Cardinality.ONLY_ONE:o.attr("marker-end","url("+l+"#"+sn.ERMarkers.ONLY_ONE_END+")");break}switch(e.relSpec.cardB){case n.db.Cardinality.ZERO_OR_ONE:o.attr("marker-start","url("+l+"#"+sn.ERMarkers.ZERO_OR_ONE_START+")");break;case n.db.Cardinality.ZERO_OR_MORE:o.attr("marker-start","url("+l+"#"+sn.ERMarkers.ZERO_OR_MORE_START+")");break;case n.db.Cardinality.ONE_OR_MORE:o.attr("marker-start","url("+l+"#"+sn.ERMarkers.ONE_OR_MORE_START+")");break;case n.db.Cardinality.ONLY_ONE:o.attr("marker-start","url("+l+"#"+sn.ERMarkers.ONLY_ONE_START+")");break}const u=o.node().getTotalLength(),d=o.node().getPointAtLength(u*.5),f="rel"+$2,g=t.append("text").classed("er relationshipLabel",!0).attr("id",f).attr("x",d.x).attr("y",d.y).style("text-anchor","middle").style("dominant-baseline","middle").style("font-family",$().fontFamily).style("font-size",cr.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+f).classed("er relationshipLabelBox",!0).attr("x",d.x-g.width/2).attr("y",d.y-g.height/2).attr("width",g.width).attr("height",g.height)},aR=function(t,e,r,i){cr=$().er,B.info("Drawing ER diagram");const n=$().securityLevel;let s;n==="sandbox"&&(s=At("#i"+e));const o=At(n==="sandbox"?s.nodes()[0].contentDocument.body:"body").select(`[id='${e}']`);sn.insertMarkers(o,cr);let l;l=new or({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:cr.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});const u=rR(o,i.db.getEntities(),l),d=nR(i.db.getRelationships(),l);Ma(l),iR(o,l),d.forEach(function(k){sR(o,k,l,u,i)});const f=cr.diagramPadding;ye.insertTitle(o,"entityTitleText",cr.titleTopMargin,i.db.getDiagramTitle());const p=o.node().getBBox(),g=p.width+f*2,_=p.height+f*2;Ei(o,_,g,cr.useMaxWidth),o.attr("viewBox",`${p.x-f} ${p.y-f} ${g} ${_}`)};function oR(t="",e=""){const r=t.replace(JO,"");return`${X2(e)}${X2(r)}${AA()}`}function X2(t=""){return t.length>0?`${t}-`:""}const lR={setConf:tR,draw:aR};var w1=function(){var t=function(Or,qt,te,oe){for(te=te||{},oe=Or.length;oe--;te[Or[oe]]=qt);return te},e=[1,9],r=[1,7],i=[1,6],n=[1,8],s=[1,20,21,22,23,38,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],a=[2,10],o=[1,20],l=[1,21],u=[1,22],d=[1,23],f=[1,30],p=[1,32],g=[1,33],_=[1,34],k=[1,62],w=[1,48],S=[1,52],A=[1,36],O=[1,37],P=[1,38],W=[1,39],q=[1,40],z=[1,56],H=[1,63],N=[1,51],M=[1,53],C=[1,55],v=[1,59],D=[1,60],m=[1,41],Q=[1,42],b=[1,43],ct=[1,44],Dt=[1,61],vt=[1,50],j=[1,54],ot=[1,57],rt=[1,58],it=[1,49],ut=[1,66],bt=[1,71],K=[1,20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],Ot=[1,75],Y=[1,74],U=[1,76],X=[20,21,23,81,82],F=[1,99],I=[1,104],L=[1,107],J=[1,108],T=[1,101],ht=[1,106],V=[1,109],Yt=[1,102],et=[1,114],Mt=[1,113],Tt=[1,103],gt=[1,105],Et=[1,110],wt=[1,111],pt=[1,112],st=[1,115],le=[20,21,22,23,81,82],Xt=[20,21,22,23,53,81,82],jt=[20,21,22,23,40,52,53,55,57,59,61,63,65,66,67,69,71,73,74,76,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],Kt=[20,21,23],Gt=[20,21,23,52,66,67,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],Ee=[1,12,20,21,22,23,24,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],Ht=[52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],Vt=[1,149],Ft=[1,157],xt=[1,158],ft=[1,159],Lt=[1,160],_t=[1,144],Ut=[1,145],at=[1,141],ie=[1,152],dt=[1,153],ee=[1,154],de=[1,155],me=[1,156],be=[1,161],ke=[1,162],$t=[1,147],ne=[1,150],ge=[1,146],Qt=[1,143],ni=[20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],zr=[1,165],De=[20,21,22,23,26,52,66,67,91,105,106,109,111,112,122,123,124,125,126,127],ae=[20,21,22,23,24,26,38,40,41,42,52,56,58,60,62,64,66,67,68,70,72,73,75,77,81,82,86,87,88,89,90,91,92,95,105,106,109,111,112,113,114,122,123,124,125,126,127],Be=[12,21,22,24],Oe=[22,106],Fe=[1,250],Pe=[1,245],Ie=[1,246],Ge=[1,254],tr=[1,251],zt=[1,248],Z=[1,247],St=[1,249],Nt=[1,252],fe=[1,253],Me=[1,255],Le=[1,273],We=[20,21,23,106],xe=[20,21,22,23,66,67,86,102,105,106,109,110,111,112,113],Ne={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,openDirective:6,typeDirective:7,closeDirective:8,separator:9,":":10,argDirective:11,open_directive:12,type_directive:13,arg_directive:14,close_directive:15,graphConfig:16,document:17,line:18,statement:19,SEMI:20,NEWLINE:21,SPACE:22,EOF:23,GRAPH:24,NODIR:25,DIR:26,FirstStmtSeperator:27,ending:28,endToken:29,spaceList:30,spaceListNewline:31,verticeStatement:32,styleStatement:33,linkStyleStatement:34,classDefStatement:35,classStatement:36,clickStatement:37,subgraph:38,text:39,SQS:40,SQE:41,end:42,direction:43,acc_title:44,acc_title_value:45,acc_descr:46,acc_descr_value:47,acc_descr_multiline_value:48,link:49,node:50,vertex:51,AMP:52,STYLE_SEPARATOR:53,idString:54,DOUBLECIRCLESTART:55,DOUBLECIRCLEEND:56,PS:57,PE:58,"(-":59,"-)":60,STADIUMSTART:61,STADIUMEND:62,SUBROUTINESTART:63,SUBROUTINEEND:64,VERTEX_WITH_PROPS_START:65,ALPHA:66,COLON:67,PIPE:68,CYLINDERSTART:69,CYLINDEREND:70,DIAMOND_START:71,DIAMOND_STOP:72,TAGEND:73,TRAPSTART:74,TRAPEND:75,INVTRAPSTART:76,INVTRAPEND:77,linkStatement:78,arrowText:79,TESTSTR:80,START_LINK:81,LINK:82,textToken:83,STR:84,keywords:85,STYLE:86,LINKSTYLE:87,CLASSDEF:88,CLASS:89,CLICK:90,DOWN:91,UP:92,textNoTags:93,textNoTagsToken:94,DEFAULT:95,stylesOpt:96,alphaNum:97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,HEX:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,MINUS:109,UNIT:110,BRKT:111,DOT:112,PCT:113,TAGSTART:114,alphaNumToken:115,idStringToken:116,alphaNumStatement:117,direction_tb:118,direction_bt:119,direction_rl:120,direction_lr:121,PUNCTUATION:122,UNICODE_TEXT:123,PLUS:124,EQUALS:125,MULT:126,UNDERSCORE:127,graphCodeTokens:128,ARROW_CROSS:129,ARROW_POINT:130,ARROW_CIRCLE:131,ARROW_OPEN:132,QUOTE:133,$accept:0,$end:1},terminals_:{2:"error",10:":",12:"open_directive",13:"type_directive",14:"arg_directive",15:"close_directive",20:"SEMI",21:"NEWLINE",22:"SPACE",23:"EOF",24:"GRAPH",25:"NODIR",26:"DIR",38:"subgraph",40:"SQS",41:"SQE",42:"end",44:"acc_title",45:"acc_title_value",46:"acc_descr",47:"acc_descr_value",48:"acc_descr_multiline_value",52:"AMP",53:"STYLE_SEPARATOR",55:"DOUBLECIRCLESTART",56:"DOUBLECIRCLEEND",57:"PS",58:"PE",59:"(-",60:"-)",61:"STADIUMSTART",62:"STADIUMEND",63:"SUBROUTINESTART",64:"SUBROUTINEEND",65:"VERTEX_WITH_PROPS_START",66:"ALPHA",67:"COLON",68:"PIPE",69:"CYLINDERSTART",70:"CYLINDEREND",71:"DIAMOND_START",72:"DIAMOND_STOP",73:"TAGEND",74:"TRAPSTART",75:"TRAPEND",76:"INVTRAPSTART",77:"INVTRAPEND",80:"TESTSTR",81:"START_LINK",82:"LINK",84:"STR",86:"STYLE",87:"LINKSTYLE",88:"CLASSDEF",89:"CLASS",90:"CLICK",91:"DOWN",92:"UP",95:"DEFAULT",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"HEX",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"MINUS",110:"UNIT",111:"BRKT",112:"DOT",113:"PCT",114:"TAGSTART",118:"direction_tb",119:"direction_bt",120:"direction_rl",121:"direction_lr",122:"PUNCTUATION",123:"UNICODE_TEXT",124:"PLUS",125:"EQUALS",126:"MULT",127:"UNDERSCORE",129:"ARROW_CROSS",130:"ARROW_POINT",131:"ARROW_CIRCLE",132:"ARROW_OPEN",133:"QUOTE"},productions_:[0,[3,1],[3,2],[5,4],[5,6],[6,1],[7,1],[11,1],[8,1],[4,2],[17,0],[17,2],[18,1],[18,1],[18,1],[18,1],[18,1],[16,2],[16,2],[16,2],[16,3],[28,2],[28,1],[29,1],[29,1],[29,1],[27,1],[27,1],[27,2],[31,2],[31,2],[31,1],[31,1],[30,2],[30,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,9],[19,6],[19,4],[19,1],[19,2],[19,2],[19,1],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[50,1],[50,5],[50,3],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,8],[51,4],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,4],[51,4],[51,1],[49,2],[49,3],[49,3],[49,1],[49,3],[78,1],[79,3],[39,1],[39,2],[39,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[93,1],[93,2],[35,5],[35,5],[36,5],[37,2],[37,4],[37,3],[37,5],[37,2],[37,4],[37,4],[37,6],[37,2],[37,4],[37,2],[37,4],[37,4],[37,6],[33,5],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[103,1],[103,3],[96,1],[96,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[94,1],[94,1],[94,1],[94,1],[54,1],[54,2],[97,1],[97,2],[117,1],[117,1],[117,1],[117,1],[43,1],[43,1],[43,1],[43,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1]],performAction:function(qt,te,oe,Rt,Ye,G,Zn){var tt=G.length-1;switch(Ye){case 5:Rt.parseDirective("%%{","open_directive");break;case 6:Rt.parseDirective(G[tt],"type_directive");break;case 7:G[tt]=G[tt].trim().replace(/'/g,'"'),Rt.parseDirective(G[tt],"arg_directive");break;case 8:Rt.parseDirective("}%%","close_directive","flowchart");break;case 10:this.$=[];break;case 11:(!Array.isArray(G[tt])||G[tt].length>0)&&G[tt-1].push(G[tt]),this.$=G[tt-1];break;case 12:case 82:case 84:case 96:case 152:case 154:case 155:this.$=G[tt];break;case 19:Rt.setDirection("TB"),this.$="TB";break;case 20:Rt.setDirection(G[tt-1]),this.$=G[tt-1];break;case 35:this.$=G[tt-1].nodes;break;case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 41:this.$=Rt.addSubGraph(G[tt-6],G[tt-1],G[tt-4]);break;case 42:this.$=Rt.addSubGraph(G[tt-3],G[tt-1],G[tt-3]);break;case 43:this.$=Rt.addSubGraph(void 0,G[tt-1],void 0);break;case 45:this.$=G[tt].trim(),Rt.setAccTitle(this.$);break;case 46:case 47:this.$=G[tt].trim(),Rt.setAccDescription(this.$);break;case 51:Rt.addLink(G[tt-2].stmt,G[tt],G[tt-1]),this.$={stmt:G[tt],nodes:G[tt].concat(G[tt-2].nodes)};break;case 52:Rt.addLink(G[tt-3].stmt,G[tt-1],G[tt-2]),this.$={stmt:G[tt-1],nodes:G[tt-1].concat(G[tt-3].nodes)};break;case 53:this.$={stmt:G[tt-1],nodes:G[tt-1]};break;case 54:this.$={stmt:G[tt],nodes:G[tt]};break;case 55:this.$=[G[tt]];break;case 56:this.$=G[tt-4].concat(G[tt]);break;case 57:this.$=[G[tt-2]],Rt.setClass(G[tt-2],G[tt]);break;case 58:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"square");break;case 59:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"doublecircle");break;case 60:this.$=G[tt-5],Rt.addVertex(G[tt-5],G[tt-2],"circle");break;case 61:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"ellipse");break;case 62:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"stadium");break;case 63:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"subroutine");break;case 64:this.$=G[tt-7],Rt.addVertex(G[tt-7],G[tt-1],"rect",void 0,void 0,void 0,Object.fromEntries([[G[tt-5],G[tt-3]]]));break;case 65:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"cylinder");break;case 66:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"round");break;case 67:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"diamond");break;case 68:this.$=G[tt-5],Rt.addVertex(G[tt-5],G[tt-2],"hexagon");break;case 69:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"odd");break;case 70:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"trapezoid");break;case 71:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"inv_trapezoid");break;case 72:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"lean_right");break;case 73:this.$=G[tt-3],Rt.addVertex(G[tt-3],G[tt-1],"lean_left");break;case 74:this.$=G[tt],Rt.addVertex(G[tt]);break;case 75:G[tt-1].text=G[tt],this.$=G[tt-1];break;case 76:case 77:G[tt-2].text=G[tt-1],this.$=G[tt-2];break;case 78:this.$=G[tt];break;case 79:var xr=Rt.destructLink(G[tt],G[tt-2]);this.$={type:xr.type,stroke:xr.stroke,length:xr.length,text:G[tt-1]};break;case 80:var xr=Rt.destructLink(G[tt]);this.$={type:xr.type,stroke:xr.stroke,length:xr.length};break;case 81:this.$=G[tt-1];break;case 83:case 97:case 153:this.$=G[tt-1]+""+G[tt];break;case 98:case 99:this.$=G[tt-4],Rt.addClass(G[tt-2],G[tt]);break;case 100:this.$=G[tt-4],Rt.setClass(G[tt-2],G[tt]);break;case 101:case 109:this.$=G[tt-1],Rt.setClickEvent(G[tt-1],G[tt]);break;case 102:case 110:this.$=G[tt-3],Rt.setClickEvent(G[tt-3],G[tt-2]),Rt.setTooltip(G[tt-3],G[tt]);break;case 103:this.$=G[tt-2],Rt.setClickEvent(G[tt-2],G[tt-1],G[tt]);break;case 104:this.$=G[tt-4],Rt.setClickEvent(G[tt-4],G[tt-3],G[tt-2]),Rt.setTooltip(G[tt-4],G[tt]);break;case 105:case 111:this.$=G[tt-1],Rt.setLink(G[tt-1],G[tt]);break;case 106:case 112:this.$=G[tt-3],Rt.setLink(G[tt-3],G[tt-2]),Rt.setTooltip(G[tt-3],G[tt]);break;case 107:case 113:this.$=G[tt-3],Rt.setLink(G[tt-3],G[tt-2],G[tt]);break;case 108:case 114:this.$=G[tt-5],Rt.setLink(G[tt-5],G[tt-4],G[tt]),Rt.setTooltip(G[tt-5],G[tt-2]);break;case 115:this.$=G[tt-4],Rt.addVertex(G[tt-2],void 0,void 0,G[tt]);break;case 116:case 118:this.$=G[tt-4],Rt.updateLink(G[tt-2],G[tt]);break;case 117:this.$=G[tt-4],Rt.updateLink([G[tt-2]],G[tt]);break;case 119:this.$=G[tt-8],Rt.updateLinkInterpolate([G[tt-6]],G[tt-2]),Rt.updateLink([G[tt-6]],G[tt]);break;case 120:this.$=G[tt-8],Rt.updateLinkInterpolate(G[tt-6],G[tt-2]),Rt.updateLink(G[tt-6],G[tt]);break;case 121:this.$=G[tt-6],Rt.updateLinkInterpolate([G[tt-4]],G[tt]);break;case 122:this.$=G[tt-6],Rt.updateLinkInterpolate(G[tt-4],G[tt]);break;case 123:case 125:this.$=[G[tt]];break;case 124:case 126:G[tt-2].push(G[tt]),this.$=G[tt-2];break;case 128:this.$=G[tt-1]+G[tt];break;case 150:this.$=G[tt];break;case 151:this.$=G[tt-1]+""+G[tt];break;case 156:this.$="v";break;case 157:this.$="-";break;case 158:this.$={stmt:"dir",value:"TB"};break;case 159:this.$={stmt:"dir",value:"BT"};break;case 160:this.$={stmt:"dir",value:"RL"};break;case 161:this.$={stmt:"dir",value:"LR"};break}},table:[{3:1,4:2,5:3,6:5,12:e,16:4,21:r,22:i,24:n},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:e,16:4,21:r,22:i,24:n},t(s,a,{17:11}),{7:12,13:[1,13]},{16:14,21:r,22:i,24:n},{16:15,21:r,22:i,24:n},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:o,21:l,22:u,23:d,32:24,33:25,34:26,35:27,36:28,37:29,38:f,43:31,44:p,46:g,48:_,50:35,51:45,52:k,54:46,66:w,67:S,86:A,87:O,88:P,89:W,90:q,91:z,95:H,105:N,106:M,109:C,111:v,112:D,116:47,118:m,119:Q,120:b,121:ct,122:Dt,123:vt,124:j,125:ot,126:rt,127:it},{8:64,10:[1,65],15:ut},t([10,15],[2,6]),t(s,[2,17]),t(s,[2,18]),t(s,[2,19]),{20:[1,68],21:[1,69],22:bt,27:67,30:70},t(K,[2,11]),t(K,[2,12]),t(K,[2,13]),t(K,[2,14]),t(K,[2,15]),t(K,[2,16]),{9:72,20:Ot,21:Y,23:U,49:73,78:77,81:[1,78],82:[1,79]},{9:80,20:Ot,21:Y,23:U},{9:81,20:Ot,21:Y,23:U},{9:82,20:Ot,21:Y,23:U},{9:83,20:Ot,21:Y,23:U},{9:84,20:Ot,21:Y,23:U},{9:86,20:Ot,21:Y,22:[1,85],23:U},t(K,[2,44]),{45:[1,87]},{47:[1,88]},t(K,[2,47]),t(X,[2,54],{30:89,22:bt}),{22:[1,90]},{22:[1,91]},{22:[1,92]},{22:[1,93]},{26:F,52:I,66:L,67:J,84:[1,97],91:T,97:96,98:[1,94],100:[1,95],105:ht,106:V,109:Yt,111:et,112:Mt,115:100,117:98,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(K,[2,158]),t(K,[2,159]),t(K,[2,160]),t(K,[2,161]),t(le,[2,55],{53:[1,116]}),t(Xt,[2,74],{116:129,40:[1,117],52:k,55:[1,118],57:[1,119],59:[1,120],61:[1,121],63:[1,122],65:[1,123],66:w,67:S,69:[1,124],71:[1,125],73:[1,126],74:[1,127],76:[1,128],91:z,95:H,105:N,106:M,109:C,111:v,112:D,122:Dt,123:vt,124:j,125:ot,126:rt,127:it}),t(jt,[2,150]),t(jt,[2,175]),t(jt,[2,176]),t(jt,[2,177]),t(jt,[2,178]),t(jt,[2,179]),t(jt,[2,180]),t(jt,[2,181]),t(jt,[2,182]),t(jt,[2,183]),t(jt,[2,184]),t(jt,[2,185]),t(jt,[2,186]),t(jt,[2,187]),t(jt,[2,188]),t(jt,[2,189]),t(jt,[2,190]),{9:130,20:Ot,21:Y,23:U},{11:131,14:[1,132]},t(Kt,[2,8]),t(s,[2,20]),t(s,[2,26]),t(s,[2,27]),{21:[1,133]},t(Gt,[2,34],{30:134,22:bt}),t(K,[2,35]),{50:135,51:45,52:k,54:46,66:w,67:S,91:z,95:H,105:N,106:M,109:C,111:v,112:D,116:47,122:Dt,123:vt,124:j,125:ot,126:rt,127:it},t(Ee,[2,48]),t(Ee,[2,49]),t(Ee,[2,50]),t(Ht,[2,78],{79:136,68:[1,138],80:[1,137]}),{22:Vt,24:Ft,26:xt,38:ft,39:139,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t([52,66,67,68,80,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,80]),t(K,[2,36]),t(K,[2,37]),t(K,[2,38]),t(K,[2,39]),t(K,[2,40]),{22:Vt,24:Ft,26:xt,38:ft,39:163,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(ni,a,{17:164}),t(K,[2,45]),t(K,[2,46]),t(X,[2,53],{52:zr}),{26:F,52:I,66:L,67:J,91:T,97:166,102:[1,167],105:ht,106:V,109:Yt,111:et,112:Mt,115:100,117:98,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{95:[1,168],103:169,105:[1,170]},{26:F,52:I,66:L,67:J,91:T,95:[1,171],97:172,105:ht,106:V,109:Yt,111:et,112:Mt,115:100,117:98,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{26:F,52:I,66:L,67:J,91:T,97:173,105:ht,106:V,109:Yt,111:et,112:Mt,115:100,117:98,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(Kt,[2,101],{22:[1,174],99:[1,175]}),t(Kt,[2,105],{22:[1,176]}),t(Kt,[2,109],{115:100,117:178,22:[1,177],26:F,52:I,66:L,67:J,91:T,105:ht,106:V,109:Yt,111:et,112:Mt,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st}),t(Kt,[2,111],{22:[1,179]}),t(De,[2,152]),t(De,[2,154]),t(De,[2,155]),t(De,[2,156]),t(De,[2,157]),t(ae,[2,162]),t(ae,[2,163]),t(ae,[2,164]),t(ae,[2,165]),t(ae,[2,166]),t(ae,[2,167]),t(ae,[2,168]),t(ae,[2,169]),t(ae,[2,170]),t(ae,[2,171]),t(ae,[2,172]),t(ae,[2,173]),t(ae,[2,174]),{52:k,54:180,66:w,67:S,91:z,95:H,105:N,106:M,109:C,111:v,112:D,116:47,122:Dt,123:vt,124:j,125:ot,126:rt,127:it},{22:Vt,24:Ft,26:xt,38:ft,39:181,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:182,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:184,42:Lt,52:I,57:[1,183],66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:185,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:186,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:187,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{66:[1,188]},{22:Vt,24:Ft,26:xt,38:ft,39:189,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:190,42:Lt,52:I,66:L,67:J,71:[1,191],73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:192,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:193,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:194,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(jt,[2,151]),t(Be,[2,3]),{8:195,15:ut},{15:[2,7]},t(s,[2,28]),t(Gt,[2,33]),t(X,[2,51],{30:196,22:bt}),t(Ht,[2,75],{22:[1,197]}),{22:[1,198]},{22:Vt,24:Ft,26:xt,38:ft,39:199,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,82:[1,200],83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(ae,[2,82]),t(ae,[2,84]),t(ae,[2,140]),t(ae,[2,141]),t(ae,[2,142]),t(ae,[2,143]),t(ae,[2,144]),t(ae,[2,145]),t(ae,[2,146]),t(ae,[2,147]),t(ae,[2,148]),t(ae,[2,149]),t(ae,[2,85]),t(ae,[2,86]),t(ae,[2,87]),t(ae,[2,88]),t(ae,[2,89]),t(ae,[2,90]),t(ae,[2,91]),t(ae,[2,92]),t(ae,[2,93]),t(ae,[2,94]),t(ae,[2,95]),{9:203,20:Ot,21:Y,22:Vt,23:U,24:Ft,26:xt,38:ft,40:[1,202],42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{18:18,19:19,20:o,21:l,22:u,23:d,32:24,33:25,34:26,35:27,36:28,37:29,38:f,42:[1,204],43:31,44:p,46:g,48:_,50:35,51:45,52:k,54:46,66:w,67:S,86:A,87:O,88:P,89:W,90:q,91:z,95:H,105:N,106:M,109:C,111:v,112:D,116:47,118:m,119:Q,120:b,121:ct,122:Dt,123:vt,124:j,125:ot,126:rt,127:it},{22:bt,30:205},{22:[1,206],26:F,52:I,66:L,67:J,91:T,105:ht,106:V,109:Yt,111:et,112:Mt,115:100,117:178,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:[1,207]},{22:[1,208]},{22:[1,209],106:[1,210]},t(Oe,[2,123]),{22:[1,211]},{22:[1,212],26:F,52:I,66:L,67:J,91:T,105:ht,106:V,109:Yt,111:et,112:Mt,115:100,117:178,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:[1,213],26:F,52:I,66:L,67:J,91:T,105:ht,106:V,109:Yt,111:et,112:Mt,115:100,117:178,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{84:[1,214]},t(Kt,[2,103],{22:[1,215]}),{84:[1,216],101:[1,217]},{84:[1,218]},t(De,[2,153]),{84:[1,219],101:[1,220]},t(le,[2,57],{116:129,52:k,66:w,67:S,91:z,95:H,105:N,106:M,109:C,111:v,112:D,122:Dt,123:vt,124:j,125:ot,126:rt,127:it}),{22:Vt,24:Ft,26:xt,38:ft,41:[1,221],42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,56:[1,222],66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:223,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,58:[1,224],66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,60:[1,225],66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,62:[1,226],66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,64:[1,227],66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{67:[1,228]},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,66:L,67:J,70:[1,229],73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,66:L,67:J,72:[1,230],73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,39:231,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,41:[1,232],42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,66:L,67:J,73:_t,75:[1,233],77:[1,234],81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,66:L,67:J,73:_t,75:[1,236],77:[1,235],81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{9:237,20:Ot,21:Y,23:U},t(X,[2,52],{52:zr}),t(Ht,[2,77]),t(Ht,[2,76]),{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,66:L,67:J,68:[1,238],73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(Ht,[2,79]),t(ae,[2,83]),{22:Vt,24:Ft,26:xt,38:ft,39:239,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(ni,a,{17:240}),t(K,[2,43]),{51:241,52:k,54:46,66:w,67:S,91:z,95:H,105:N,106:M,109:C,111:v,112:D,116:47,122:Dt,123:vt,124:j,125:ot,126:rt,127:it},{22:Fe,66:Pe,67:Ie,86:Ge,96:242,102:tr,105:zt,107:243,108:244,109:Z,110:St,111:Nt,112:fe,113:Me},{22:Fe,66:Pe,67:Ie,86:Ge,96:256,102:tr,105:zt,107:243,108:244,109:Z,110:St,111:Nt,112:fe,113:Me},{22:Fe,66:Pe,67:Ie,86:Ge,96:257,102:tr,104:[1,258],105:zt,107:243,108:244,109:Z,110:St,111:Nt,112:fe,113:Me},{22:Fe,66:Pe,67:Ie,86:Ge,96:259,102:tr,104:[1,260],105:zt,107:243,108:244,109:Z,110:St,111:Nt,112:fe,113:Me},{105:[1,261]},{22:Fe,66:Pe,67:Ie,86:Ge,96:262,102:tr,105:zt,107:243,108:244,109:Z,110:St,111:Nt,112:fe,113:Me},{22:Fe,66:Pe,67:Ie,86:Ge,96:263,102:tr,105:zt,107:243,108:244,109:Z,110:St,111:Nt,112:fe,113:Me},{26:F,52:I,66:L,67:J,91:T,97:264,105:ht,106:V,109:Yt,111:et,112:Mt,115:100,117:98,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(Kt,[2,102]),{84:[1,265]},t(Kt,[2,106],{22:[1,266]}),t(Kt,[2,107]),t(Kt,[2,110]),t(Kt,[2,112],{22:[1,267]}),t(Kt,[2,113]),t(Xt,[2,58]),t(Xt,[2,59]),{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,58:[1,268],66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(Xt,[2,66]),t(Xt,[2,61]),t(Xt,[2,62]),t(Xt,[2,63]),{66:[1,269]},t(Xt,[2,65]),t(Xt,[2,67]),{22:Vt,24:Ft,26:xt,38:ft,42:Lt,52:I,66:L,67:J,72:[1,270],73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(Xt,[2,69]),t(Xt,[2,70]),t(Xt,[2,72]),t(Xt,[2,71]),t(Xt,[2,73]),t(Be,[2,4]),t([22,52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,81]),{22:Vt,24:Ft,26:xt,38:ft,41:[1,271],42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{18:18,19:19,20:o,21:l,22:u,23:d,32:24,33:25,34:26,35:27,36:28,37:29,38:f,42:[1,272],43:31,44:p,46:g,48:_,50:35,51:45,52:k,54:46,66:w,67:S,86:A,87:O,88:P,89:W,90:q,91:z,95:H,105:N,106:M,109:C,111:v,112:D,116:47,118:m,119:Q,120:b,121:ct,122:Dt,123:vt,124:j,125:ot,126:rt,127:it},t(le,[2,56]),t(Kt,[2,115],{106:Le}),t(We,[2,125],{108:274,22:Fe,66:Pe,67:Ie,86:Ge,102:tr,105:zt,109:Z,110:St,111:Nt,112:fe,113:Me}),t(xe,[2,127]),t(xe,[2,129]),t(xe,[2,130]),t(xe,[2,131]),t(xe,[2,132]),t(xe,[2,133]),t(xe,[2,134]),t(xe,[2,135]),t(xe,[2,136]),t(xe,[2,137]),t(xe,[2,138]),t(xe,[2,139]),t(Kt,[2,116],{106:Le}),t(Kt,[2,117],{106:Le}),{22:[1,275]},t(Kt,[2,118],{106:Le}),{22:[1,276]},t(Oe,[2,124]),t(Kt,[2,98],{106:Le}),t(Kt,[2,99],{106:Le}),t(Kt,[2,100],{115:100,117:178,26:F,52:I,66:L,67:J,91:T,105:ht,106:V,109:Yt,111:et,112:Mt,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st}),t(Kt,[2,104]),{101:[1,277]},{101:[1,278]},{58:[1,279]},{68:[1,280]},{72:[1,281]},{9:282,20:Ot,21:Y,23:U},t(K,[2,42]),{22:Fe,66:Pe,67:Ie,86:Ge,102:tr,105:zt,107:283,108:244,109:Z,110:St,111:Nt,112:fe,113:Me},t(xe,[2,128]),{26:F,52:I,66:L,67:J,91:T,97:284,105:ht,106:V,109:Yt,111:et,112:Mt,115:100,117:98,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{26:F,52:I,66:L,67:J,91:T,97:285,105:ht,106:V,109:Yt,111:et,112:Mt,115:100,117:98,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(Kt,[2,108]),t(Kt,[2,114]),t(Xt,[2,60]),{22:Vt,24:Ft,26:xt,38:ft,39:286,42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:140,84:at,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},t(Xt,[2,68]),t(ni,a,{17:287}),t(We,[2,126],{108:274,22:Fe,66:Pe,67:Ie,86:Ge,102:tr,105:zt,109:Z,110:St,111:Nt,112:fe,113:Me}),t(Kt,[2,121],{115:100,117:178,22:[1,288],26:F,52:I,66:L,67:J,91:T,105:ht,106:V,109:Yt,111:et,112:Mt,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st}),t(Kt,[2,122],{115:100,117:178,22:[1,289],26:F,52:I,66:L,67:J,91:T,105:ht,106:V,109:Yt,111:et,112:Mt,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st}),{22:Vt,24:Ft,26:xt,38:ft,41:[1,290],42:Lt,52:I,66:L,67:J,73:_t,81:Ut,83:201,85:151,86:ie,87:dt,88:ee,89:de,90:me,91:be,92:ke,94:142,95:$t,105:ht,106:V,109:ne,111:et,112:Mt,113:ge,114:Qt,115:148,122:Tt,123:gt,124:Et,125:wt,126:pt,127:st},{18:18,19:19,20:o,21:l,22:u,23:d,32:24,33:25,34:26,35:27,36:28,37:29,38:f,42:[1,291],43:31,44:p,46:g,48:_,50:35,51:45,52:k,54:46,66:w,67:S,86:A,87:O,88:P,89:W,90:q,91:z,95:H,105:N,106:M,109:C,111:v,112:D,116:47,118:m,119:Q,120:b,121:ct,122:Dt,123:vt,124:j,125:ot,126:rt,127:it},{22:Fe,66:Pe,67:Ie,86:Ge,96:292,102:tr,105:zt,107:243,108:244,109:Z,110:St,111:Nt,112:fe,113:Me},{22:Fe,66:Pe,67:Ie,86:Ge,96:293,102:tr,105:zt,107:243,108:244,109:Z,110:St,111:Nt,112:fe,113:Me},t(Xt,[2,64]),t(K,[2,41]),t(Kt,[2,119],{106:Le}),t(Kt,[2,120],{106:Le})],defaultActions:{2:[2,1],9:[2,5],10:[2,2],132:[2,7]},parseError:function(qt,te){if(te.recoverable)this.trace(qt);else{var oe=new Error(qt);throw oe.hash=te,oe}},parse:function(qt){var te=this,oe=[0],Rt=[],Ye=[null],G=[],Zn=this.table,tt="",xr=0,rl=0,Ru=2,il=1,nl=G.slice.call(arguments,1),er=Object.create(this.lexer),Di={yy:{}};for(var Mi in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Mi)&&(Di.yy[Mi]=this.yy[Mi]);er.setInput(qt,Di.yy),Di.yy.lexer=er,Di.yy.parser=this,typeof er.yylloc>"u"&&(er.yylloc={});var Qn=er.yylloc;G.push(Qn);var Ba=er.options&&er.options.ranges;typeof Di.yy.parseError=="function"?this.parseError=Di.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function sl(){var Hr;return Hr=Rt.pop()||er.lex()||il,typeof Hr!="number"&&(Hr instanceof Array&&(Rt=Hr,Hr=Rt.pop()),Hr=te.symbols_[Hr]||Hr),Hr}for(var mr,Se,Sr,ji,si={},$i,Wr,Ia,Is;;){if(Se=oe[oe.length-1],this.defaultActions[Se]?Sr=this.defaultActions[Se]:((mr===null||typeof mr>"u")&&(mr=sl()),Sr=Zn[Se]&&Zn[Se][mr]),typeof Sr>"u"||!Sr.length||!Sr[0]){var Jn="";Is=[];for($i in Zn[Se])this.terminals_[$i]&&$i>Ru&&Is.push("'"+this.terminals_[$i]+"'");er.showPosition?Jn="Parse error on line "+(xr+1)+`:
|
|
1223
1223
|
`+er.showPosition()+`
|
|
1224
1224
|
Expecting `+Is.join(", ")+", got '"+(this.terminals_[mr]||mr)+"'":Jn="Parse error on line "+(xr+1)+": Unexpected "+(mr==il?"end of input":"'"+(this.terminals_[mr]||mr)+"'"),this.parseError(Jn,{text:er.match,token:this.terminals_[mr]||mr,line:er.yylineno,loc:Qn,expected:Is})}if(Sr[0]instanceof Array&&Sr.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Se+", token: "+mr);switch(Sr[0]){case 1:oe.push(mr),Ye.push(er.yytext),G.push(er.yylloc),oe.push(Sr[1]),mr=null,rl=er.yyleng,tt=er.yytext,xr=er.yylineno,Qn=er.yylloc;break;case 2:if(Wr=this.productions_[Sr[1]][1],si.$=Ye[Ye.length-Wr],si._$={first_line:G[G.length-(Wr||1)].first_line,last_line:G[G.length-1].last_line,first_column:G[G.length-(Wr||1)].first_column,last_column:G[G.length-1].last_column},Ba&&(si._$.range=[G[G.length-(Wr||1)].range[0],G[G.length-1].range[1]]),ji=this.performAction.apply(si,[tt,rl,xr,Di.yy,Sr[1],Ye,G].concat(nl)),typeof ji<"u")return ji;Wr&&(oe=oe.slice(0,-1*Wr*2),Ye=Ye.slice(0,-1*Wr),G=G.slice(0,-1*Wr)),oe.push(this.productions_[Sr[1]][0]),Ye.push(si.$),G.push(si._$),Ia=Zn[oe[oe.length-2]][oe[oe.length-1]],oe.push(Ia);break;case 3:return!0}}return!0}},Dn=function(){var Or={EOF:1,parseError:function(te,oe){if(this.yy.parser)this.yy.parser.parseError(te,oe);else throw new Error(te)},setInput:function(qt,te){return this.yy=te||this.yy||{},this._input=qt,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var qt=this._input[0];this.yytext+=qt,this.yyleng++,this.offset++,this.match+=qt,this.matched+=qt;var te=qt.match(/(?:\r\n?|\n).*/g);return te?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),qt},unput:function(qt){var te=qt.length,oe=qt.split(/(?:\r\n?|\n)/g);this._input=qt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-te),this.offset-=te;var Rt=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),oe.length-1&&(this.yylineno-=oe.length-1);var Ye=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:oe?(oe.length===Rt.length?this.yylloc.first_column:0)+Rt[Rt.length-oe.length].length-oe[0].length:this.yylloc.first_column-te},this.options.ranges&&(this.yylloc.range=[Ye[0],Ye[0]+this.yyleng-te]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
1225
1225
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(qt){this.unput(this.match.slice(qt))},pastInput:function(){var qt=this.matched.substr(0,this.matched.length-this.match.length);return(qt.length>20?"...":"")+qt.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var qt=this.match;return qt.length<20&&(qt+=this._input.substr(0,20-qt.length)),(qt.substr(0,20)+(qt.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var qt=this.pastInput(),te=new Array(qt.length+1).join("-");return qt+this.upcomingInput()+`
|
|
1226
1226
|
`+te+"^"},test_match:function(qt,te){var oe,Rt,Ye;if(this.options.backtrack_lexer&&(Ye={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Ye.yylloc.range=this.yylloc.range.slice(0))),Rt=qt[0].match(/(?:\r\n?|\n).*/g),Rt&&(this.yylineno+=Rt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Rt?Rt[Rt.length-1].length-Rt[Rt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+qt[0].length},this.yytext+=qt[0],this.match+=qt[0],this.matches=qt,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(qt[0].length),this.matched+=qt[0],oe=this.performAction.call(this,this.yy,this,te,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),oe)return oe;if(this._backtrack){for(var G in Ye)this[G]=Ye[G];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var qt,te,oe,Rt;this._more||(this.yytext="",this.match="");for(var Ye=this._currentRules(),G=0;G<Ye.length;G++)if(oe=this._input.match(this.rules[Ye[G]]),oe&&(!te||oe[0].length>te[0].length)){if(te=oe,Rt=G,this.options.backtrack_lexer){if(qt=this.test_match(oe,Ye[G]),qt!==!1)return qt;if(this._backtrack){te=!1;continue}else return!1}else if(!this.options.flex)break}return te?(qt=this.test_match(te,Ye[Rt]),qt!==!1?qt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1227
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var te=this.next();return te||this.lex()},begin:function(te){this.conditionStack.push(te)},popState:function(){var te=this.conditionStack.length-1;return te>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(te){return te=this.conditionStack.length-1-Math.abs(te||0),te>=0?this.conditionStack[te]:"INITIAL"},pushState:function(te){this.begin(te)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(te,oe,Rt,Ye){switch(Rt){case 0:return this.begin("open_directive"),12;case 1:return this.begin("type_directive"),13;case 2:return this.popState(),this.begin("arg_directive"),10;case 3:return this.popState(),this.popState(),15;case 4:return 14;case 5:break;case 6:break;case 7:return this.begin("acc_title"),44;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),46;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:this.begin("string");break;case 15:this.popState();break;case 16:return"STR";case 17:return 86;case 18:return 95;case 19:return 87;case 20:return 104;case 21:return 88;case 22:return 89;case 23:this.begin("href");break;case 24:this.popState();break;case 25:return 100;case 26:this.begin("callbackname");break;case 27:this.popState();break;case 28:this.popState(),this.begin("callbackargs");break;case 29:return 98;case 30:this.popState();break;case 31:return 99;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 90;case 35:return te.lex.firstGraph()&&this.begin("dir"),24;case 36:return te.lex.firstGraph()&&this.begin("dir"),24;case 37:return 38;case 38:return 42;case 39:return 101;case 40:return 101;case 41:return 101;case 42:return 101;case 43:return this.popState(),25;case 44:return this.popState(),26;case 45:return this.popState(),26;case 46:return this.popState(),26;case 47:return this.popState(),26;case 48:return this.popState(),26;case 49:return this.popState(),26;case 50:return this.popState(),26;case 51:return this.popState(),26;case 52:return this.popState(),26;case 53:return this.popState(),26;case 54:return 118;case 55:return 119;case 56:return 120;case 57:return 121;case 58:return 105;case 59:return 111;case 60:return 53;case 61:return 67;case 62:return 52;case 63:return 20;case 64:return 106;case 65:return 126;case 66:return 82;case 67:return 82;case 68:return 82;case 69:return 81;case 70:return 81;case 71:return 81;case 72:return 59;case 73:return 60;case 74:return 61;case 75:return 62;case 76:return 63;case 77:return 64;case 78:return 65;case 79:return 69;case 80:return 70;case 81:return 55;case 82:return 56;case 83:return 109;case 84:return 112;case 85:return 127;case 86:return 124;case 87:return 113;case 88:return 125;case 89:return 125;case 90:return 114;case 91:return 73;case 92:return 92;case 93:return"SEP";case 94:return 91;case 95:return 66;case 96:return 75;case 97:return 74;case 98:return 77;case 99:return 76;case 100:return 122;case 101:return 123;case 102:return 68;case 103:return 57;case 104:return 58;case 105:return 40;case 106:return 41;case 107:return 71;case 108:return 72;case 109:return 133;case 110:return 21;case 111:return 22;case 112:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[^\}]%%[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?: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]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\[)/,/^(?:\]\))/,/^(?:\[\[)/,/^(?:\]\])/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\])/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_/])/,/^(?:[\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:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[30,31],inclusive:!1},callbackname:{rules:[27,28,29],inclusive:!1},href:{rules:[24,25],inclusive:!1},click:{rules:[33,34],inclusive:!1},vertex:{rules:[],inclusive:!1},dir:{rules:[43,44,45,46,47,48,49,50,51,52,53],inclusive:!1},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},string:{rules:[15,16],inclusive:!1},INITIAL:{rules:[0,5,6,7,9,11,14,17,18,19,20,21,22,23,26,32,35,36,37,38,39,40,41,42,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112],inclusive:!0}}};return Or}();Ne.lexer=Dn;function Mn(){this.yy={}}return Mn.prototype=Ne,Ne.Parser=Mn,new Mn}();k1.parser=k1;const K2=k1,cR=(t,e)=>{var r;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:t.match(/^\s*graph/)!==null},uR=(t,e)=>{var r;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"&&t.match(/^\s*graph/)!==null?!0:t.match(/^\s*flowchart/)!==null},hR="flowchart-";let Z2=0,q0=$(),Ue={},ws=[],Ks={},kn=[],Uc={},j0={},Gl=0,w1=!0,Ii,Cu,Su=[];const Au=t=>he.sanitizeText(t,q0),dR=function(t,e,r){ze.parseDirective(this,t,e,r)},Lu=function(t){const e=Object.keys(Ue);for(const r of e)if(Ue[r].id===t)return Ue[r].domId;return t},fR=function(t,e,r,i,n,s,a={}){let o,l=t;l!==void 0&&l.trim().length!==0&&(Ue[l]===void 0&&(Ue[l]={id:l,domId:hR+l+"-"+Z2,styles:[],classes:[]}),Z2++,e!==void 0?(q0=$(),o=Au(e.trim()),o[0]==='"'&&o[o.length-1]==='"'&&(o=o.substring(1,o.length-1)),Ue[l].text=o):Ue[l].text===void 0&&(Ue[l].text=t),r!==void 0&&(Ue[l].type=r),i!=null&&i.forEach(function(u){Ue[l].styles.push(u)}),n!=null&&n.forEach(function(u){Ue[l].classes.push(u)}),s!==void 0&&(Ue[l].dir=s),Ue[l].props===void 0?Ue[l].props=a:a!==void 0&&Object.assign(Ue[l].props,a))},pR=function(t,e,r,i){const a={start:t,end:e,type:void 0,text:""};i=r.text,i!==void 0&&(a.text=Au(i.trim()),a.text[0]==='"'&&a.text[a.text.length-1]==='"'&&(a.text=a.text.substring(1,a.text.length-1))),r!==void 0&&(a.type=r.type,a.stroke=r.stroke,a.length=r.length),ws.push(a)},gR=function(t,e,r,i){let n,s;for(n=0;n<t.length;n++)for(s=0;s<e.length;s++)pR(t[n],e[s],r,i)},yR=function(t,e){t.forEach(function(r){r==="default"?ws.defaultInterpolate=e:ws[r].interpolate=e})},mR=function(t,e){t.forEach(function(r){r==="default"?ws.defaultStyle=e:(ye.isSubstringInArray("fill",e)===-1&&e.push("fill:none"),ws[r].style=e)})},bR=function(t,e){Ks[t]===void 0&&(Ks[t]={id:t,styles:[],textStyles:[]}),e!=null&&e.forEach(function(r){if(r.match("color")){const n=r.replace("fill","bgFill").replace("color","fill");Ks[t].textStyles.push(n)}Ks[t].styles.push(r)})},_R=function(t){Ii=t,Ii.match(/.*</)&&(Ii="RL"),Ii.match(/.*\^/)&&(Ii="BT"),Ii.match(/.*>/)&&(Ii="LR"),Ii.match(/.*v/)&&(Ii="TB")},$0=function(t,e){t.split(",").forEach(function(r){let i=r;Ue[i]!==void 0&&Ue[i].classes.push(e),Uc[i]!==void 0&&Uc[i].classes.push(e)})},xR=function(t,e){t.split(",").forEach(function(r){e!==void 0&&(j0[Cu==="gen-1"?Lu(r):r]=Au(e))})},vR=function(t,e,r){let i=Lu(t);if($().securityLevel!=="loose"||e===void 0)return;let n=[];if(typeof r=="string"){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let s=0;s<n.length;s++){let a=n[s].trim();a.charAt(0)==='"'&&a.charAt(a.length-1)==='"'&&(a=a.substr(1,a.length-2)),n[s]=a}}n.length===0&&n.push(t),Ue[t]!==void 0&&(Ue[t].haveCallback=!0,Su.push(function(){const s=document.querySelector(`[id="${i}"]`);s!==null&&s.addEventListener("click",function(){ye.runFunc(e,...n)},!1)}))},kR=function(t,e,r){t.split(",").forEach(function(i){Ue[i]!==void 0&&(Ue[i].link=ye.formatUrl(e,q0),Ue[i].linkTarget=r)}),$0(t,"clickable")},wR=function(t){return j0[t]},TR=function(t,e,r){t.split(",").forEach(function(i){vR(i,e,r)}),$0(t,"clickable")},ER=function(t){Su.forEach(function(e){e(t)})},CR=function(){return Ii.trim()},SR=function(){return Ue},AR=function(){return ws},LR=function(){return Ks},i3=function(t){let e=At(".mermaidTooltip");(e._groups||e)[0][0]===null&&(e=At("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),At(t).select("svg").selectAll("g.node").on("mouseover",function(){const n=At(this);if(n.attr("title")===null)return;const a=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(n.attr("title")).style("left",window.scrollX+a.left+(a.right-a.left)/2+"px").style("top",window.scrollY+a.top-14+document.body.scrollTop+"px"),e.html(e.html().replace(/<br\/>/g,"<br/>")),n.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),At(this).classed("hover",!1)})};Su.push(i3);const DR=function(t="gen-1"){Ue={},Ks={},ws=[],Su=[i3],kn=[],Uc={},Gl=0,j0=[],w1=!0,Cu=t,Ci()},MR=t=>{Cu=t||"gen-1"},NR=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},BR=function(t,e,r){let i=t.trim(),n=r;t===r&&r.match(/\s/)&&(i=void 0);function s(d){const f={boolean:{},number:{},string:{}},p=[];let g;return{nodeList:d.filter(function(k){const w=typeof k;return k.stmt&&k.stmt==="dir"?(g=k.value,!1):k.trim()===""?!1:w in f?f[w].hasOwnProperty(k)?!1:f[w][k]=!0:p.includes(k)?!1:p.push(k)}),dir:g}}let a=[];const{nodeList:o,dir:l}=s(a.concat.apply(a,e));if(a=o,Cu==="gen-1")for(let d=0;d<a.length;d++)a[d]=Lu(a[d]);i=i||"subGraph"+Gl,n=n||"",n=Au(n),Gl=Gl+1;const u={id:i,nodes:a,title:n.trim(),classes:[],dir:l};return B.info("Adding",u.id,u.nodes,u.dir),u.nodes=o3(u,kn).nodes,kn.push(u),Uc[i]=u,i},IR=function(t){for(const[e,r]of kn.entries())if(r.id===t)return e;return-1};let Za=-1;const n3=[],s3=function(t,e){const r=kn[e].nodes;if(Za=Za+1,Za>2e3)return;if(n3[Za]=e,kn[e].id===t)return{result:!0,count:0};let i=0,n=1;for(;i<r.length;){const s=IR(r[i]);if(s>=0){const a=s3(t,s);if(a.result)return{result:!0,count:n+a.count};n=n+a.count}i=i+1}return{result:!1,count:n}},OR=function(t){return n3[t]},RR=function(){Za=-1,kn.length>0&&s3("none",kn.length-1)},FR=function(){return kn},PR=()=>w1?(w1=!1,!0):!1,YR=t=>{let e=t.trim(),r="arrow_open";switch(e[0]){case"<":r="arrow_point",e=e.slice(1);break;case"x":r="arrow_cross",e=e.slice(1);break;case"o":r="arrow_circle",e=e.slice(1);break}let i="normal";return e.includes("=")&&(i="thick"),e.includes(".")&&(i="dotted"),{type:r,stroke:i}},VR=(t,e)=>{const r=e.length;let i=0;for(let n=0;n<r;++n)e[n]===t&&++i;return i},UR=t=>{const e=t.trim();let r=e.slice(0,-1),i="arrow_open";switch(e.slice(-1)){case"x":i="arrow_cross",e[0]==="x"&&(i="double_"+i,r=r.slice(1));break;case">":i="arrow_point",e[0]==="<"&&(i="double_"+i,r=r.slice(1));break;case"o":i="arrow_circle",e[0]==="o"&&(i="double_"+i,r=r.slice(1));break}let n="normal",s=r.length-1;r[0]==="="&&(n="thick");let a=VR(".",r);return a&&(n="dotted",s=a),{type:i,stroke:n,length:s}},zR=(t,e)=>{const r=UR(t);let i;if(e){if(i=YR(e),i.stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if(i.type==="arrow_open")i.type=r.type;else{if(i.type!==r.type)return{type:"INVALID",stroke:"INVALID"};i.type="double_"+i.type}return i.type==="double_arrow"&&(i.type="double_arrow_point"),i.length=r.length,i}return r},a3=(t,e)=>{let r=!1;return t.forEach(i=>{i.nodes.indexOf(e)>=0&&(r=!0)}),r},o3=(t,e)=>{const r=[];return t.nodes.forEach((i,n)=>{a3(e,i)||r.push(t.nodes[n])}),{nodes:r}},an={parseDirective:dR,defaultConfig:()=>ma.flowchart,setAccTitle:ii,getAccTitle:Si,getAccDescription:Li,setAccDescription:Ai,addVertex:fR,lookUpDomId:Lu,addLink:gR,updateLinkInterpolate:yR,updateLink:mR,addClass:bR,setDirection:_R,setClass:$0,setTooltip:xR,getTooltip:wR,setClickEvent:TR,setLink:kR,bindFunctions:ER,getDirection:CR,getVertices:SR,getEdges:AR,getClasses:LR,clear:DR,setGen:MR,defaultStyle:NR,addSubGraph:BR,getDepthFirstPos:OR,indexNodes:RR,getSubGraphs:FR,destructLink:zR,lex:{firstGraph:PR},exists:a3,makeUniq:o3,setDiagramTitle:Cn,getDiagramTitle:Sn};function l3(t,e,r){const i=e.width,n=e.height,s=(i+n)*.9,a=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}],o=Ln(t,s,s,a);return r.intersect=function(l){return qi(r,a,l)},o}function c3(t,e,r){const n=e.height,s=n/4,a=e.width+2*s,o=[{x:s,y:0},{x:a-s,y:0},{x:a,y:-n/2},{x:a-s,y:-n},{x:s,y:-n},{x:0,y:-n/2}],l=Ln(t,a,n,o);return r.intersect=function(u){return qi(r,o,u)},l}function u3(t,e,r){const i=e.width,n=e.height,s=[{x:-n/2,y:0},{x:i,y:0},{x:i,y:-n},{x:-n/2,y:-n},{x:0,y:-n/2}],a=Ln(t,i,n,s);return r.intersect=function(o){return qi(r,s,o)},a}function h3(t,e,r){const i=e.width,n=e.height,s=[{x:-2*n/6,y:0},{x:i-n/6,y:0},{x:i+2*n/6,y:-n},{x:n/6,y:-n}],a=Ln(t,i,n,s);return r.intersect=function(o){return qi(r,s,o)},a}function d3(t,e,r){const i=e.width,n=e.height,s=[{x:2*n/6,y:0},{x:i+n/6,y:0},{x:i-2*n/6,y:-n},{x:-n/6,y:-n}],a=Ln(t,i,n,s);return r.intersect=function(o){return qi(r,s,o)},a}function f3(t,e,r){const i=e.width,n=e.height,s=[{x:-2*n/6,y:0},{x:i+2*n/6,y:0},{x:i-n/6,y:-n},{x:n/6,y:-n}],a=Ln(t,i,n,s);return r.intersect=function(o){return qi(r,s,o)},a}function p3(t,e,r){const i=e.width,n=e.height,s=[{x:n/6,y:0},{x:i-n/6,y:0},{x:i+2*n/6,y:-n},{x:-2*n/6,y:-n}],a=Ln(t,i,n,s);return r.intersect=function(o){return qi(r,s,o)},a}function g3(t,e,r){const i=e.width,n=e.height,s=[{x:0,y:0},{x:i+n/2,y:0},{x:i,y:-n/2},{x:i+n/2,y:-n},{x:0,y:-n}],a=Ln(t,i,n,s);return r.intersect=function(o){return qi(r,s,o)},a}function y3(t,e,r){const i=e.height,n=e.width+i/4,s=t.insert("rect",":first-child").attr("rx",i/2).attr("ry",i/2).attr("x",-n/2).attr("y",-i/2).attr("width",n).attr("height",i);return r.intersect=function(a){return T0(r,a)},s}function m3(t,e,r){const i=e.width,n=e.height,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-n},{x:0,y:-n},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-n},{x:-8,y:-n},{x:-8,y:0}],a=Ln(t,i,n,s);return r.intersect=function(o){return qi(r,s,o)},a}function b3(t,e,r){const i=e.width,n=i/2,s=n/(2.5+i/50),a=e.height+s,o="M 0,"+s+" a "+n+","+s+" 0,0,0 "+i+" 0 a "+n+","+s+" 0,0,0 "+-i+" 0 l 0,"+a+" a "+n+","+s+" 0,0,0 "+i+" 0 l 0,"+-a,l=t.attr("label-offset-y",s).insert("path",":first-child").attr("d",o).attr("transform","translate("+-i/2+","+-(a/2+s)+")");return r.intersect=function(u){const d=T0(r,u),f=d.x-r.x;if(n!=0&&(Math.abs(f)<r.width/2||Math.abs(f)==r.width/2&&Math.abs(d.y-r.y)>r.height/2-s)){let p=s*s*(1-f*f/(n*n));p!=0&&(p=Math.sqrt(p)),p=s-p,u.y-r.y>0&&(p=-p),d.y+=p}return d},l}function WR(t){t.shapes().question=l3,t.shapes().hexagon=c3,t.shapes().stadium=y3,t.shapes().subroutine=m3,t.shapes().cylinder=b3,t.shapes().rect_left_inv_arrow=u3,t.shapes().lean_right=h3,t.shapes().lean_left=d3,t.shapes().trapezoid=f3,t.shapes().inv_trapezoid=p3,t.shapes().rect_right_inv_arrow=g3}function HR(t){t({question:l3}),t({hexagon:c3}),t({stadium:y3}),t({subroutine:m3}),t({cylinder:b3}),t({rect_left_inv_arrow:u3}),t({lean_right:h3}),t({lean_left:d3}),t({trapezoid:f3}),t({inv_trapezoid:p3}),t({rect_right_inv_arrow:g3})}function Ln(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("transform","translate("+-e/2+","+r/2+")")}const GR={addToRender:WR,addToRenderV2:HR},_3={},qR=function(t){const e=Object.keys(t);for(const r of e)_3[r]=t[r]},x3=function(t,e,r,i,n,s){const a=i?i.select(`[id="${r}"]`):At(`[id="${r}"]`),o=n||document;Object.keys(t).forEach(function(u){const d=t[u];let f="default";d.classes.length>0&&(f=d.classes.join(" "));const p=jn(d.styles);let g=d.text!==void 0?d.text:d.id,_;if(gr($().flowchart.htmlLabels)){const S={label:g.replace(/fa[blrs]?:fa-[\w-]+/g,A=>`<i class='${A.replace(":"," ")}'></i>`)};_=k0(a,S).node(),_.parentNode.removeChild(_)}else{const S=o.createElementNS("http://www.w3.org/2000/svg","text");S.setAttribute("style",p.labelStyle.replace("color:","fill:"));const A=g.split(he.lineBreakRegex);for(const O of A){const P=o.createElementNS("http://www.w3.org/2000/svg","tspan");P.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),P.setAttribute("dy","1em"),P.setAttribute("x","1"),P.textContent=O,S.appendChild(P)}_=S}let k=0,w="";switch(d.type){case"round":k=5,w="rect";break;case"square":w="rect";break;case"diamond":w="question";break;case"hexagon":w="hexagon";break;case"odd":w="rect_left_inv_arrow";break;case"lean_right":w="lean_right";break;case"lean_left":w="lean_left";break;case"trapezoid":w="trapezoid";break;case"inv_trapezoid":w="inv_trapezoid";break;case"odd_right":w="rect_left_inv_arrow";break;case"circle":w="circle";break;case"ellipse":w="ellipse";break;case"stadium":w="stadium";break;case"subroutine":w="subroutine";break;case"cylinder":w="cylinder";break;case"group":w="rect";break;default:w="rect"}B.warn("Adding node",d.id,d.domId),e.setNode(s.db.lookUpDomId(d.id),{labelType:"svg",labelStyle:p.labelStyle,shape:w,label:_,rx:k,ry:k,class:f,style:p.style,id:s.db.lookUpDomId(d.id)})})},v3=function(t,e,r){let i=0,n,s;if(t.defaultStyle!==void 0){const a=jn(t.defaultStyle);n=a.style,s=a.labelStyle}t.forEach(function(a){i++;var o="L-"+a.start+"-"+a.end,l="LS-"+a.start,u="LE-"+a.end;const d={};a.type==="arrow_open"?d.arrowhead="none":d.arrowhead="normal";let f="",p="";if(a.style!==void 0){const g=jn(a.style);f=g.style,p=g.labelStyle}else switch(a.stroke){case"normal":f="fill:none",n!==void 0&&(f=n),s!==void 0&&(p=s);break;case"dotted":f="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":f=" stroke-width: 3.5px;fill:none";break}d.style=f,d.labelStyle=p,a.interpolate!==void 0?d.curve=yi(a.interpolate,$r):t.defaultInterpolate!==void 0?d.curve=yi(t.defaultInterpolate,$r):d.curve=yi(_3.curve,$r),a.text===void 0?a.style!==void 0&&(d.arrowheadStyle="fill: #333"):(d.arrowheadStyle="fill: #333",d.labelpos="c",gr($().flowchart.htmlLabels)?(d.labelType="html",d.label=`<span id="L-${o}" class="edgeLabel L-${l}' L-${u}" style="${d.labelStyle}">${a.text.replace(/fa[blrs]?:fa-[\w-]+/g,g=>`<i class='${g.replace(":"," ")}'></i>`)}</span>`):(d.labelType="text",d.label=a.text.replace(he.lineBreakRegex,`
|
|
1228
|
-
`),a.style===void 0&&(d.style=d.style||"stroke: #333; stroke-width: 1.5px;fill:none"),d.labelStyle=d.labelStyle.replace("color:","fill:"))),d.id=o,d.class=l+" "+u,d.minlen=a.length||1,e.setEdge(r.db.lookUpDomId(a.start),r.db.lookUpDomId(a.end),d,i)})},jR=function(t,e){B.info("Extracting classes"),e.db.clear();try{return e.parse(t),e.db.getClasses()}catch(r){return B.error(r),{}}},$R=function(t,e,r,i){B.info("Drawing flowchart"),i.db.clear();const{securityLevel:n,flowchart:s}=$();let a;n==="sandbox"&&(a=At("#i"+e));const o=At(n==="sandbox"?a.nodes()[0].contentDocument.body:"body"),l=n==="sandbox"?a.nodes()[0].contentDocument:document;try{i.parser.parse(t)}catch{B.debug("Parsing failed")}let u=i.db.getDirection();u===void 0&&(u="TD");const d=s.nodeSpacing||50,f=s.rankSpacing||50,p=new or({multigraph:!0,compound:!0}).setGraph({rankdir:u,nodesep:d,ranksep:f,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});let g;const _=i.db.getSubGraphs();for(let q=_.length-1;q>=0;q--)g=_[q],i.db.addVertex(g.id,g.title,"group",void 0,g.classes);const k=i.db.getVertices();B.warn("Get vertices",k);const w=i.db.getEdges();let S=0;for(S=_.length-1;S>=0;S--){g=_[S],
|
|
1229
|
-
`),o.style===void 0&&(p.style=p.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),p.labelStyle=p.labelStyle.replace("color:","fill:"),p.id=u,p.classes="flowchart-link "+d+" "+f,e.setEdge(o.start,o.end,p,i)})},ZR=function(t,e){B.info("Extracting classes"),e.db.clear();try{return e.parse(t),e.db.getClasses()}catch{return}},QR=function(t,e,r,i){B.info("Drawing flowchart"),i.db.clear(),an.setGen("gen-2"),i.parser.parse(t);let n=i.db.getDirection();n===void 0&&(n="TD");const{securityLevel:s,flowchart:a}=$(),o=a.nodeSpacing||50,l=a.rankSpacing||50;let u;s==="sandbox"&&(u=At("#i"+e));const d=At(s==="sandbox"?u.nodes()[0].contentDocument.body:"body"),f=s==="sandbox"?u.nodes()[0].contentDocument:document,p=new or({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:o,ranksep:l,marginx:0,marginy:0}).setDefaultEdgeLabel(function(){return{}});let g;const _=i.db.getSubGraphs();B.info("Subgraphs - ",_);for(let W=_.length-1;W>=0;W--)g=_[W],B.info("Subgraph - ",g),i.db.addVertex(g.id,g.title,"group",void 0,g.classes,g.dir);const k=i.db.getVertices(),w=i.db.getEdges();B.info(w);let S=0;for(S=_.length-1;S>=0;S--){g=_[S],
|
|
1227
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var te=this.next();return te||this.lex()},begin:function(te){this.conditionStack.push(te)},popState:function(){var te=this.conditionStack.length-1;return te>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(te){return te=this.conditionStack.length-1-Math.abs(te||0),te>=0?this.conditionStack[te]:"INITIAL"},pushState:function(te){this.begin(te)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(te,oe,Rt,Ye){switch(Rt){case 0:return this.begin("open_directive"),12;case 1:return this.begin("type_directive"),13;case 2:return this.popState(),this.begin("arg_directive"),10;case 3:return this.popState(),this.popState(),15;case 4:return 14;case 5:break;case 6:break;case 7:return this.begin("acc_title"),44;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),46;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:this.begin("string");break;case 15:this.popState();break;case 16:return"STR";case 17:return 86;case 18:return 95;case 19:return 87;case 20:return 104;case 21:return 88;case 22:return 89;case 23:this.begin("href");break;case 24:this.popState();break;case 25:return 100;case 26:this.begin("callbackname");break;case 27:this.popState();break;case 28:this.popState(),this.begin("callbackargs");break;case 29:return 98;case 30:this.popState();break;case 31:return 99;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 90;case 35:return te.lex.firstGraph()&&this.begin("dir"),24;case 36:return te.lex.firstGraph()&&this.begin("dir"),24;case 37:return 38;case 38:return 42;case 39:return 101;case 40:return 101;case 41:return 101;case 42:return 101;case 43:return this.popState(),25;case 44:return this.popState(),26;case 45:return this.popState(),26;case 46:return this.popState(),26;case 47:return this.popState(),26;case 48:return this.popState(),26;case 49:return this.popState(),26;case 50:return this.popState(),26;case 51:return this.popState(),26;case 52:return this.popState(),26;case 53:return this.popState(),26;case 54:return 118;case 55:return 119;case 56:return 120;case 57:return 121;case 58:return 105;case 59:return 111;case 60:return 53;case 61:return 67;case 62:return 52;case 63:return 20;case 64:return 106;case 65:return 126;case 66:return 82;case 67:return 82;case 68:return 82;case 69:return 81;case 70:return 81;case 71:return 81;case 72:return 59;case 73:return 60;case 74:return 61;case 75:return 62;case 76:return 63;case 77:return 64;case 78:return 65;case 79:return 69;case 80:return 70;case 81:return 55;case 82:return 56;case 83:return 109;case 84:return 112;case 85:return 127;case 86:return 124;case 87:return 113;case 88:return 125;case 89:return 125;case 90:return 114;case 91:return 73;case 92:return 92;case 93:return"SEP";case 94:return 91;case 95:return 66;case 96:return 75;case 97:return 74;case 98:return 77;case 99:return 76;case 100:return 122;case 101:return 123;case 102:return 68;case 103:return 57;case 104:return 58;case 105:return 40;case 106:return 41;case 107:return 71;case 108:return 72;case 109:return 133;case 110:return 21;case 111:return 22;case 112:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[^\}]%%[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?: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]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\[)/,/^(?:\]\))/,/^(?:\[\[)/,/^(?:\]\])/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\])/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_/])/,/^(?:[\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:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[30,31],inclusive:!1},callbackname:{rules:[27,28,29],inclusive:!1},href:{rules:[24,25],inclusive:!1},click:{rules:[33,34],inclusive:!1},vertex:{rules:[],inclusive:!1},dir:{rules:[43,44,45,46,47,48,49,50,51,52,53],inclusive:!1},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},string:{rules:[15,16],inclusive:!1},INITIAL:{rules:[0,5,6,7,9,11,14,17,18,19,20,21,22,23,26,32,35,36,37,38,39,40,41,42,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112],inclusive:!0}}};return Or}();Ne.lexer=Dn;function Mn(){this.yy={}}return Mn.prototype=Ne,Ne.Parser=Mn,new Mn}();w1.parser=w1;const K2=w1,cR=(t,e)=>{var r;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:t.match(/^\s*graph/)!==null},uR=(t,e)=>{var r;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"&&t.match(/^\s*graph/)!==null?!0:t.match(/^\s*flowchart/)!==null},hR="flowchart-";let Z2=0,j0=$(),Ue={},ws=[],Ks={},kn=[],Uc={},$0={},Gl=0,T1=!0,Ii,Cu,Su=[];const Au=t=>he.sanitizeText(t,j0),dR=function(t,e,r){ze.parseDirective(this,t,e,r)},Lu=function(t){const e=Object.keys(Ue);for(const r of e)if(Ue[r].id===t)return Ue[r].domId;return t},fR=function(t,e,r,i,n,s,a={}){let o,l=t;l!==void 0&&l.trim().length!==0&&(Ue[l]===void 0&&(Ue[l]={id:l,domId:hR+l+"-"+Z2,styles:[],classes:[]}),Z2++,e!==void 0?(j0=$(),o=Au(e.trim()),o[0]==='"'&&o[o.length-1]==='"'&&(o=o.substring(1,o.length-1)),Ue[l].text=o):Ue[l].text===void 0&&(Ue[l].text=t),r!==void 0&&(Ue[l].type=r),i!=null&&i.forEach(function(u){Ue[l].styles.push(u)}),n!=null&&n.forEach(function(u){Ue[l].classes.push(u)}),s!==void 0&&(Ue[l].dir=s),Ue[l].props===void 0?Ue[l].props=a:a!==void 0&&Object.assign(Ue[l].props,a))},pR=function(t,e,r,i){const a={start:t,end:e,type:void 0,text:""};i=r.text,i!==void 0&&(a.text=Au(i.trim()),a.text[0]==='"'&&a.text[a.text.length-1]==='"'&&(a.text=a.text.substring(1,a.text.length-1))),r!==void 0&&(a.type=r.type,a.stroke=r.stroke,a.length=r.length),ws.push(a)},gR=function(t,e,r,i){let n,s;for(n=0;n<t.length;n++)for(s=0;s<e.length;s++)pR(t[n],e[s],r,i)},yR=function(t,e){t.forEach(function(r){r==="default"?ws.defaultInterpolate=e:ws[r].interpolate=e})},mR=function(t,e){t.forEach(function(r){r==="default"?ws.defaultStyle=e:(ye.isSubstringInArray("fill",e)===-1&&e.push("fill:none"),ws[r].style=e)})},bR=function(t,e){Ks[t]===void 0&&(Ks[t]={id:t,styles:[],textStyles:[]}),e!=null&&e.forEach(function(r){if(r.match("color")){const n=r.replace("fill","bgFill").replace("color","fill");Ks[t].textStyles.push(n)}Ks[t].styles.push(r)})},_R=function(t){Ii=t,Ii.match(/.*</)&&(Ii="RL"),Ii.match(/.*\^/)&&(Ii="BT"),Ii.match(/.*>/)&&(Ii="LR"),Ii.match(/.*v/)&&(Ii="TB")},X0=function(t,e){t.split(",").forEach(function(r){let i=r;Ue[i]!==void 0&&Ue[i].classes.push(e),Uc[i]!==void 0&&Uc[i].classes.push(e)})},xR=function(t,e){t.split(",").forEach(function(r){e!==void 0&&($0[Cu==="gen-1"?Lu(r):r]=Au(e))})},vR=function(t,e,r){let i=Lu(t);if($().securityLevel!=="loose"||e===void 0)return;let n=[];if(typeof r=="string"){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let s=0;s<n.length;s++){let a=n[s].trim();a.charAt(0)==='"'&&a.charAt(a.length-1)==='"'&&(a=a.substr(1,a.length-2)),n[s]=a}}n.length===0&&n.push(t),Ue[t]!==void 0&&(Ue[t].haveCallback=!0,Su.push(function(){const s=document.querySelector(`[id="${i}"]`);s!==null&&s.addEventListener("click",function(){ye.runFunc(e,...n)},!1)}))},kR=function(t,e,r){t.split(",").forEach(function(i){Ue[i]!==void 0&&(Ue[i].link=ye.formatUrl(e,j0),Ue[i].linkTarget=r)}),X0(t,"clickable")},wR=function(t){return $0[t]},TR=function(t,e,r){t.split(",").forEach(function(i){vR(i,e,r)}),X0(t,"clickable")},ER=function(t){Su.forEach(function(e){e(t)})},CR=function(){return Ii.trim()},SR=function(){return Ue},AR=function(){return ws},LR=function(){return Ks},i3=function(t){let e=At(".mermaidTooltip");(e._groups||e)[0][0]===null&&(e=At("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),At(t).select("svg").selectAll("g.node").on("mouseover",function(){const n=At(this);if(n.attr("title")===null)return;const a=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(n.attr("title")).style("left",window.scrollX+a.left+(a.right-a.left)/2+"px").style("top",window.scrollY+a.top-14+document.body.scrollTop+"px"),e.html(e.html().replace(/<br\/>/g,"<br/>")),n.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),At(this).classed("hover",!1)})};Su.push(i3);const DR=function(t="gen-1"){Ue={},Ks={},ws=[],Su=[i3],kn=[],Uc={},Gl=0,$0=[],T1=!0,Cu=t,Ci()},MR=t=>{Cu=t||"gen-1"},NR=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},BR=function(t,e,r){let i=t.trim(),n=r;t===r&&r.match(/\s/)&&(i=void 0);function s(d){const f={boolean:{},number:{},string:{}},p=[];let g;return{nodeList:d.filter(function(k){const w=typeof k;return k.stmt&&k.stmt==="dir"?(g=k.value,!1):k.trim()===""?!1:w in f?f[w].hasOwnProperty(k)?!1:f[w][k]=!0:p.includes(k)?!1:p.push(k)}),dir:g}}let a=[];const{nodeList:o,dir:l}=s(a.concat.apply(a,e));if(a=o,Cu==="gen-1")for(let d=0;d<a.length;d++)a[d]=Lu(a[d]);i=i||"subGraph"+Gl,n=n||"",n=Au(n),Gl=Gl+1;const u={id:i,nodes:a,title:n.trim(),classes:[],dir:l};return B.info("Adding",u.id,u.nodes,u.dir),u.nodes=o3(u,kn).nodes,kn.push(u),Uc[i]=u,i},IR=function(t){for(const[e,r]of kn.entries())if(r.id===t)return e;return-1};let Za=-1;const n3=[],s3=function(t,e){const r=kn[e].nodes;if(Za=Za+1,Za>2e3)return;if(n3[Za]=e,kn[e].id===t)return{result:!0,count:0};let i=0,n=1;for(;i<r.length;){const s=IR(r[i]);if(s>=0){const a=s3(t,s);if(a.result)return{result:!0,count:n+a.count};n=n+a.count}i=i+1}return{result:!1,count:n}},OR=function(t){return n3[t]},RR=function(){Za=-1,kn.length>0&&s3("none",kn.length-1)},FR=function(){return kn},PR=()=>T1?(T1=!1,!0):!1,YR=t=>{let e=t.trim(),r="arrow_open";switch(e[0]){case"<":r="arrow_point",e=e.slice(1);break;case"x":r="arrow_cross",e=e.slice(1);break;case"o":r="arrow_circle",e=e.slice(1);break}let i="normal";return e.includes("=")&&(i="thick"),e.includes(".")&&(i="dotted"),{type:r,stroke:i}},VR=(t,e)=>{const r=e.length;let i=0;for(let n=0;n<r;++n)e[n]===t&&++i;return i},UR=t=>{const e=t.trim();let r=e.slice(0,-1),i="arrow_open";switch(e.slice(-1)){case"x":i="arrow_cross",e[0]==="x"&&(i="double_"+i,r=r.slice(1));break;case">":i="arrow_point",e[0]==="<"&&(i="double_"+i,r=r.slice(1));break;case"o":i="arrow_circle",e[0]==="o"&&(i="double_"+i,r=r.slice(1));break}let n="normal",s=r.length-1;r[0]==="="&&(n="thick");let a=VR(".",r);return a&&(n="dotted",s=a),{type:i,stroke:n,length:s}},zR=(t,e)=>{const r=UR(t);let i;if(e){if(i=YR(e),i.stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if(i.type==="arrow_open")i.type=r.type;else{if(i.type!==r.type)return{type:"INVALID",stroke:"INVALID"};i.type="double_"+i.type}return i.type==="double_arrow"&&(i.type="double_arrow_point"),i.length=r.length,i}return r},a3=(t,e)=>{let r=!1;return t.forEach(i=>{i.nodes.indexOf(e)>=0&&(r=!0)}),r},o3=(t,e)=>{const r=[];return t.nodes.forEach((i,n)=>{a3(e,i)||r.push(t.nodes[n])}),{nodes:r}},an={parseDirective:dR,defaultConfig:()=>ma.flowchart,setAccTitle:ii,getAccTitle:Si,getAccDescription:Li,setAccDescription:Ai,addVertex:fR,lookUpDomId:Lu,addLink:gR,updateLinkInterpolate:yR,updateLink:mR,addClass:bR,setDirection:_R,setClass:X0,setTooltip:xR,getTooltip:wR,setClickEvent:TR,setLink:kR,bindFunctions:ER,getDirection:CR,getVertices:SR,getEdges:AR,getClasses:LR,clear:DR,setGen:MR,defaultStyle:NR,addSubGraph:BR,getDepthFirstPos:OR,indexNodes:RR,getSubGraphs:FR,destructLink:zR,lex:{firstGraph:PR},exists:a3,makeUniq:o3,setDiagramTitle:Cn,getDiagramTitle:Sn};function l3(t,e,r){const i=e.width,n=e.height,s=(i+n)*.9,a=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}],o=Ln(t,s,s,a);return r.intersect=function(l){return qi(r,a,l)},o}function c3(t,e,r){const n=e.height,s=n/4,a=e.width+2*s,o=[{x:s,y:0},{x:a-s,y:0},{x:a,y:-n/2},{x:a-s,y:-n},{x:s,y:-n},{x:0,y:-n/2}],l=Ln(t,a,n,o);return r.intersect=function(u){return qi(r,o,u)},l}function u3(t,e,r){const i=e.width,n=e.height,s=[{x:-n/2,y:0},{x:i,y:0},{x:i,y:-n},{x:-n/2,y:-n},{x:0,y:-n/2}],a=Ln(t,i,n,s);return r.intersect=function(o){return qi(r,s,o)},a}function h3(t,e,r){const i=e.width,n=e.height,s=[{x:-2*n/6,y:0},{x:i-n/6,y:0},{x:i+2*n/6,y:-n},{x:n/6,y:-n}],a=Ln(t,i,n,s);return r.intersect=function(o){return qi(r,s,o)},a}function d3(t,e,r){const i=e.width,n=e.height,s=[{x:2*n/6,y:0},{x:i+n/6,y:0},{x:i-2*n/6,y:-n},{x:-n/6,y:-n}],a=Ln(t,i,n,s);return r.intersect=function(o){return qi(r,s,o)},a}function f3(t,e,r){const i=e.width,n=e.height,s=[{x:-2*n/6,y:0},{x:i+2*n/6,y:0},{x:i-n/6,y:-n},{x:n/6,y:-n}],a=Ln(t,i,n,s);return r.intersect=function(o){return qi(r,s,o)},a}function p3(t,e,r){const i=e.width,n=e.height,s=[{x:n/6,y:0},{x:i-n/6,y:0},{x:i+2*n/6,y:-n},{x:-2*n/6,y:-n}],a=Ln(t,i,n,s);return r.intersect=function(o){return qi(r,s,o)},a}function g3(t,e,r){const i=e.width,n=e.height,s=[{x:0,y:0},{x:i+n/2,y:0},{x:i,y:-n/2},{x:i+n/2,y:-n},{x:0,y:-n}],a=Ln(t,i,n,s);return r.intersect=function(o){return qi(r,s,o)},a}function y3(t,e,r){const i=e.height,n=e.width+i/4,s=t.insert("rect",":first-child").attr("rx",i/2).attr("ry",i/2).attr("x",-n/2).attr("y",-i/2).attr("width",n).attr("height",i);return r.intersect=function(a){return E0(r,a)},s}function m3(t,e,r){const i=e.width,n=e.height,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-n},{x:0,y:-n},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-n},{x:-8,y:-n},{x:-8,y:0}],a=Ln(t,i,n,s);return r.intersect=function(o){return qi(r,s,o)},a}function b3(t,e,r){const i=e.width,n=i/2,s=n/(2.5+i/50),a=e.height+s,o="M 0,"+s+" a "+n+","+s+" 0,0,0 "+i+" 0 a "+n+","+s+" 0,0,0 "+-i+" 0 l 0,"+a+" a "+n+","+s+" 0,0,0 "+i+" 0 l 0,"+-a,l=t.attr("label-offset-y",s).insert("path",":first-child").attr("d",o).attr("transform","translate("+-i/2+","+-(a/2+s)+")");return r.intersect=function(u){const d=E0(r,u),f=d.x-r.x;if(n!=0&&(Math.abs(f)<r.width/2||Math.abs(f)==r.width/2&&Math.abs(d.y-r.y)>r.height/2-s)){let p=s*s*(1-f*f/(n*n));p!=0&&(p=Math.sqrt(p)),p=s-p,u.y-r.y>0&&(p=-p),d.y+=p}return d},l}function WR(t){t.shapes().question=l3,t.shapes().hexagon=c3,t.shapes().stadium=y3,t.shapes().subroutine=m3,t.shapes().cylinder=b3,t.shapes().rect_left_inv_arrow=u3,t.shapes().lean_right=h3,t.shapes().lean_left=d3,t.shapes().trapezoid=f3,t.shapes().inv_trapezoid=p3,t.shapes().rect_right_inv_arrow=g3}function HR(t){t({question:l3}),t({hexagon:c3}),t({stadium:y3}),t({subroutine:m3}),t({cylinder:b3}),t({rect_left_inv_arrow:u3}),t({lean_right:h3}),t({lean_left:d3}),t({trapezoid:f3}),t({inv_trapezoid:p3}),t({rect_right_inv_arrow:g3})}function Ln(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(n){return n.x+","+n.y}).join(" ")).attr("transform","translate("+-e/2+","+r/2+")")}const GR={addToRender:WR,addToRenderV2:HR},_3={},qR=function(t){const e=Object.keys(t);for(const r of e)_3[r]=t[r]},x3=function(t,e,r,i,n,s){const a=i?i.select(`[id="${r}"]`):At(`[id="${r}"]`),o=n||document;Object.keys(t).forEach(function(u){const d=t[u];let f="default";d.classes.length>0&&(f=d.classes.join(" "));const p=jn(d.styles);let g=d.text!==void 0?d.text:d.id,_;if(gr($().flowchart.htmlLabels)){const S={label:g.replace(/fa[blrs]?:fa-[\w-]+/g,A=>`<i class='${A.replace(":"," ")}'></i>`)};_=w0(a,S).node(),_.parentNode.removeChild(_)}else{const S=o.createElementNS("http://www.w3.org/2000/svg","text");S.setAttribute("style",p.labelStyle.replace("color:","fill:"));const A=g.split(he.lineBreakRegex);for(const O of A){const P=o.createElementNS("http://www.w3.org/2000/svg","tspan");P.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),P.setAttribute("dy","1em"),P.setAttribute("x","1"),P.textContent=O,S.appendChild(P)}_=S}let k=0,w="";switch(d.type){case"round":k=5,w="rect";break;case"square":w="rect";break;case"diamond":w="question";break;case"hexagon":w="hexagon";break;case"odd":w="rect_left_inv_arrow";break;case"lean_right":w="lean_right";break;case"lean_left":w="lean_left";break;case"trapezoid":w="trapezoid";break;case"inv_trapezoid":w="inv_trapezoid";break;case"odd_right":w="rect_left_inv_arrow";break;case"circle":w="circle";break;case"ellipse":w="ellipse";break;case"stadium":w="stadium";break;case"subroutine":w="subroutine";break;case"cylinder":w="cylinder";break;case"group":w="rect";break;default:w="rect"}B.warn("Adding node",d.id,d.domId),e.setNode(s.db.lookUpDomId(d.id),{labelType:"svg",labelStyle:p.labelStyle,shape:w,label:_,rx:k,ry:k,class:f,style:p.style,id:s.db.lookUpDomId(d.id)})})},v3=function(t,e,r){let i=0,n,s;if(t.defaultStyle!==void 0){const a=jn(t.defaultStyle);n=a.style,s=a.labelStyle}t.forEach(function(a){i++;var o="L-"+a.start+"-"+a.end,l="LS-"+a.start,u="LE-"+a.end;const d={};a.type==="arrow_open"?d.arrowhead="none":d.arrowhead="normal";let f="",p="";if(a.style!==void 0){const g=jn(a.style);f=g.style,p=g.labelStyle}else switch(a.stroke){case"normal":f="fill:none",n!==void 0&&(f=n),s!==void 0&&(p=s);break;case"dotted":f="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":f=" stroke-width: 3.5px;fill:none";break}d.style=f,d.labelStyle=p,a.interpolate!==void 0?d.curve=yi(a.interpolate,$r):t.defaultInterpolate!==void 0?d.curve=yi(t.defaultInterpolate,$r):d.curve=yi(_3.curve,$r),a.text===void 0?a.style!==void 0&&(d.arrowheadStyle="fill: #333"):(d.arrowheadStyle="fill: #333",d.labelpos="c",gr($().flowchart.htmlLabels)?(d.labelType="html",d.label=`<span id="L-${o}" class="edgeLabel L-${l}' L-${u}" style="${d.labelStyle}">${a.text.replace(/fa[blrs]?:fa-[\w-]+/g,g=>`<i class='${g.replace(":"," ")}'></i>`)}</span>`):(d.labelType="text",d.label=a.text.replace(he.lineBreakRegex,`
|
|
1228
|
+
`),a.style===void 0&&(d.style=d.style||"stroke: #333; stroke-width: 1.5px;fill:none"),d.labelStyle=d.labelStyle.replace("color:","fill:"))),d.id=o,d.class=l+" "+u,d.minlen=a.length||1,e.setEdge(r.db.lookUpDomId(a.start),r.db.lookUpDomId(a.end),d,i)})},jR=function(t,e){B.info("Extracting classes"),e.db.clear();try{return e.parse(t),e.db.getClasses()}catch(r){return B.error(r),{}}},$R=function(t,e,r,i){B.info("Drawing flowchart"),i.db.clear();const{securityLevel:n,flowchart:s}=$();let a;n==="sandbox"&&(a=At("#i"+e));const o=At(n==="sandbox"?a.nodes()[0].contentDocument.body:"body"),l=n==="sandbox"?a.nodes()[0].contentDocument:document;try{i.parser.parse(t)}catch{B.debug("Parsing failed")}let u=i.db.getDirection();u===void 0&&(u="TD");const d=s.nodeSpacing||50,f=s.rankSpacing||50,p=new or({multigraph:!0,compound:!0}).setGraph({rankdir:u,nodesep:d,ranksep:f,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});let g;const _=i.db.getSubGraphs();for(let q=_.length-1;q>=0;q--)g=_[q],i.db.addVertex(g.id,g.title,"group",void 0,g.classes);const k=i.db.getVertices();B.warn("Get vertices",k);const w=i.db.getEdges();let S=0;for(S=_.length-1;S>=0;S--){g=_[S],Q1("cluster").append("text");for(let q=0;q<g.nodes.length;q++)B.warn("Setting subgraph",g.nodes[q],i.db.lookUpDomId(g.nodes[q]),i.db.lookUpDomId(g.id)),p.setParent(i.db.lookUpDomId(g.nodes[q]),i.db.lookUpDomId(g.id))}x3(k,p,e,o,l,i),v3(w,p,i);const A=new rL;GR.addToRender(A),A.arrows().none=function(z,H,N,M){const v=z.append("marker").attr("id",H).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 0 0 L 0 0 z");Gi(v,N[M+"Style"])},A.arrows().normal=function(z,H){z.append("marker").attr("id",H).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowheadPath").style("stroke-width",1).style("stroke-dasharray","1,0")};const O=o.select(`[id="${e}"]`),P=o.select("#"+e+" g");for(A(P,p),P.selectAll("g.node").attr("title",function(){return i.db.getTooltip(this.id)}),i.db.indexNodes("subGraph"+S),S=0;S<_.length;S++)if(g=_[S],g.title!=="undefined"){const q=l.querySelectorAll("#"+e+' [id="'+i.db.lookUpDomId(g.id)+'"] rect'),z=l.querySelectorAll("#"+e+' [id="'+i.db.lookUpDomId(g.id)+'"]'),H=q[0].x.baseVal.value,N=q[0].y.baseVal.value,M=q[0].width.baseVal.value,v=At(z[0]).select(".label");v.attr("transform",`translate(${H+M/2}, ${N+14})`),v.attr("id",e+"Text");for(let D=0;D<g.classes.length;D++)z[0].classList.add(g.classes[D])}if(!s.htmlLabels){const q=l.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const z of q){const H=z.getBBox(),N=l.createElementNS("http://www.w3.org/2000/svg","rect");N.setAttribute("rx",0),N.setAttribute("ry",0),N.setAttribute("width",H.width),N.setAttribute("height",H.height),z.insertBefore(N,z.firstChild)}}Tu(p,O,s.diagramPadding,s.useMaxWidth),Object.keys(k).forEach(function(q){const z=k[q];if(z.link){const H=o.select("#"+e+' [id="'+i.db.lookUpDomId(q)+'"]');if(H){const N=l.createElementNS("http://www.w3.org/2000/svg","a");N.setAttributeNS("http://www.w3.org/2000/svg","class",z.classes.join(" ")),N.setAttributeNS("http://www.w3.org/2000/svg","href",z.link),N.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),n==="sandbox"?N.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):z.linkTarget&&N.setAttributeNS("http://www.w3.org/2000/svg","target",z.linkTarget);const M=H.insert(function(){return N},":first-child"),C=H.select(".label-container");C&&M.append(function(){return C.node()});const v=H.select(".label");v&&M.append(function(){return v.node()})}}})},XR={setConf:qR,addVertices:x3,addEdges:v3,getClasses:jR,draw:$R},k3={},KR=function(t){const e=Object.keys(t);for(const r of e)k3[r]=t[r]},w3=function(t,e,r,i,n,s){const a=i.select(`[id="${r}"]`);Object.keys(t).forEach(function(l){const u=t[l];let d="default";u.classes.length>0&&(d=u.classes.join(" "));const f=jn(u.styles);let p=u.text!==void 0?u.text:u.id,g;if(gr($().flowchart.htmlLabels)){const w={label:p.replace(/fa[blrs]?:fa-[\w-]+/g,S=>`<i class='${S.replace(":"," ")}'></i>`)};g=w0(a,w).node(),g.parentNode.removeChild(g)}else{const w=n.createElementNS("http://www.w3.org/2000/svg","text");w.setAttribute("style",f.labelStyle.replace("color:","fill:"));const S=p.split(he.lineBreakRegex);for(const A of S){const O=n.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","1"),O.textContent=A,w.appendChild(O)}g=w}let _=0,k="";switch(u.type){case"round":_=5,k="rect";break;case"square":k="rect";break;case"diamond":k="question";break;case"hexagon":k="hexagon";break;case"odd":k="rect_left_inv_arrow";break;case"lean_right":k="lean_right";break;case"lean_left":k="lean_left";break;case"trapezoid":k="trapezoid";break;case"inv_trapezoid":k="inv_trapezoid";break;case"odd_right":k="rect_left_inv_arrow";break;case"circle":k="circle";break;case"ellipse":k="ellipse";break;case"stadium":k="stadium";break;case"subroutine":k="subroutine";break;case"cylinder":k="cylinder";break;case"group":k="rect";break;case"doublecircle":k="doublecircle";break;default:k="rect"}e.setNode(u.id,{labelStyle:f.labelStyle,shape:k,labelText:p,rx:_,ry:_,class:d,style:f.style,id:u.id,link:u.link,linkTarget:u.linkTarget,tooltip:s.db.getTooltip(u.id)||"",domId:s.db.lookUpDomId(u.id),haveCallback:u.haveCallback,width:u.type==="group"?500:void 0,dir:u.dir,type:u.type,props:u.props,padding:$().flowchart.padding}),B.info("setNode",{labelStyle:f.labelStyle,shape:k,labelText:p,rx:_,ry:_,class:d,style:f.style,id:u.id,domId:s.db.lookUpDomId(u.id),width:u.type==="group"?500:void 0,type:u.type,dir:u.dir,props:u.props,padding:$().flowchart.padding})})},T3=function(t,e,r){B.info("abc78 edges = ",t);let i=0,n={},s,a;if(t.defaultStyle!==void 0){const o=jn(t.defaultStyle);s=o.style,a=o.labelStyle}t.forEach(function(o){i++;var l="L-"+o.start+"-"+o.end;n[l]===void 0?(n[l]=0,B.info("abc78 new entry",l,n[l])):(n[l]++,B.info("abc78 new entry",l,n[l]));let u=l+"-"+n[l];B.info("abc78 new link id to be used is",l,u,n[l]);var d="LS-"+o.start,f="LE-"+o.end;const p={style:"",labelStyle:""};switch(p.minlen=o.length||1,o.type==="arrow_open"?p.arrowhead="none":p.arrowhead="normal",p.arrowTypeStart="arrow_open",p.arrowTypeEnd="arrow_open",o.type){case"double_arrow_cross":p.arrowTypeStart="arrow_cross";case"arrow_cross":p.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":p.arrowTypeStart="arrow_point";case"arrow_point":p.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":p.arrowTypeStart="arrow_circle";case"arrow_circle":p.arrowTypeEnd="arrow_circle";break}let g="",_="";switch(o.stroke){case"normal":g="fill:none;",s!==void 0&&(g=s),a!==void 0&&(_=a),p.thickness="normal",p.pattern="solid";break;case"dotted":p.thickness="normal",p.pattern="dotted",p.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":p.thickness="thick",p.pattern="solid",p.style="stroke-width: 3.5px;fill:none;";break}if(o.style!==void 0){const k=jn(o.style);g=k.style,_=k.labelStyle}p.style=p.style+=g,p.labelStyle=p.labelStyle+=_,o.interpolate!==void 0?p.curve=yi(o.interpolate,$r):t.defaultInterpolate!==void 0?p.curve=yi(t.defaultInterpolate,$r):p.curve=yi(k3.curve,$r),o.text===void 0?o.style!==void 0&&(p.arrowheadStyle="fill: #333"):(p.arrowheadStyle="fill: #333",p.labelpos="c"),p.labelType="text",p.label=o.text.replace(he.lineBreakRegex,`
|
|
1229
|
+
`),o.style===void 0&&(p.style=p.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),p.labelStyle=p.labelStyle.replace("color:","fill:"),p.id=u,p.classes="flowchart-link "+d+" "+f,e.setEdge(o.start,o.end,p,i)})},ZR=function(t,e){B.info("Extracting classes"),e.db.clear();try{return e.parse(t),e.db.getClasses()}catch{return}},QR=function(t,e,r,i){B.info("Drawing flowchart"),i.db.clear(),an.setGen("gen-2"),i.parser.parse(t);let n=i.db.getDirection();n===void 0&&(n="TD");const{securityLevel:s,flowchart:a}=$(),o=a.nodeSpacing||50,l=a.rankSpacing||50;let u;s==="sandbox"&&(u=At("#i"+e));const d=At(s==="sandbox"?u.nodes()[0].contentDocument.body:"body"),f=s==="sandbox"?u.nodes()[0].contentDocument:document,p=new or({multigraph:!0,compound:!0}).setGraph({rankdir:n,nodesep:o,ranksep:l,marginx:0,marginy:0}).setDefaultEdgeLabel(function(){return{}});let g;const _=i.db.getSubGraphs();B.info("Subgraphs - ",_);for(let W=_.length-1;W>=0;W--)g=_[W],B.info("Subgraph - ",g),i.db.addVertex(g.id,g.title,"group",void 0,g.classes,g.dir);const k=i.db.getVertices(),w=i.db.getEdges();B.info(w);let S=0;for(S=_.length-1;S>=0;S--){g=_[S],Q1("cluster").append("text");for(let W=0;W<g.nodes.length;W++)B.info("Setting up subgraphs",g.nodes[W],g.id),p.setParent(g.nodes[W],g.id)}w3(k,p,e,d,f,i),T3(w,p);const A=d.select(`[id="${e}"]`),O=d.select("#"+e+" g");if(G0(O,p,["point","circle","cross"],"flowchart",e),ye.insertTitle(A,"flowchartTitleText",a.titleTopMargin,i.db.getDiagramTitle()),Tu(p,A,a.diagramPadding,a.useMaxWidth),i.db.indexNodes("subGraph"+S),!a.htmlLabels){const W=f.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const q of W){const z=q.getBBox(),H=f.createElementNS("http://www.w3.org/2000/svg","rect");H.setAttribute("rx",0),H.setAttribute("ry",0),H.setAttribute("width",z.width),H.setAttribute("height",z.height),q.insertBefore(H,q.firstChild)}}Object.keys(k).forEach(function(W){const q=k[W];if(q.link){const z=At("#"+e+' [id="'+W+'"]');if(z){const H=f.createElementNS("http://www.w3.org/2000/svg","a");H.setAttributeNS("http://www.w3.org/2000/svg","class",q.classes.join(" ")),H.setAttributeNS("http://www.w3.org/2000/svg","href",q.link),H.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),s==="sandbox"?H.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):q.linkTarget&&H.setAttributeNS("http://www.w3.org/2000/svg","target",q.linkTarget);const N=z.insert(function(){return H},":first-child"),M=z.select(".label-container");M&&N.append(function(){return M.node()});const C=z.select(".label");C&&N.append(function(){return C.node()})}}})},Eh={setConf:KR,addVertices:w3,addEdges:T3,getClasses:ZR,draw:QR};var E1=function(){var t=function(H,N,M,C){for(M=M||{},C=H.length;C--;M[H[C]]=N);return M},e=[1,3],r=[1,5],i=[7,9,11,12,13,14,15,16,17,18,19,20,21,23,25,26,28,35,40],n=[1,15],s=[1,16],a=[1,17],o=[1,18],l=[1,19],u=[1,20],d=[1,21],f=[1,22],p=[1,23],g=[1,24],_=[1,25],k=[1,26],w=[1,27],S=[1,29],A=[1,31],O=[1,34],P=[5,7,9,11,12,13,14,15,16,17,18,19,20,21,23,25,26,28,35,40],W={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,gantt:5,document:6,EOF:7,line:8,SPACE:9,statement:10,NL:11,dateFormat:12,inclusiveEndDates:13,topAxis:14,axisFormat:15,tickInterval:16,excludes:17,includes:18,todayMarker:19,title:20,acc_title:21,acc_title_value:22,acc_descr:23,acc_descr_value:24,acc_descr_multiline_value:25,section:26,clickStatement:27,taskTxt:28,taskData:29,openDirective:30,typeDirective:31,closeDirective:32,":":33,argDirective:34,click:35,callbackname:36,callbackargs:37,href:38,clickStatementDebug:39,open_directive:40,type_directive:41,arg_directive:42,close_directive:43,$accept:0,$end:1},terminals_:{2:"error",5:"gantt",7:"EOF",9:"SPACE",11:"NL",12:"dateFormat",13:"inclusiveEndDates",14:"topAxis",15:"axisFormat",16:"tickInterval",17:"excludes",18:"includes",19:"todayMarker",20:"title",21:"acc_title",22:"acc_title_value",23:"acc_descr",24:"acc_descr_value",25:"acc_descr_multiline_value",26:"section",28:"taskTxt",29:"taskData",33:":",35:"click",36:"callbackname",37:"callbackargs",38:"href",40:"open_directive",41:"type_directive",42:"arg_directive",43:"close_directive"},productions_:[0,[3,2],[3,3],[6,0],[6,2],[8,2],[8,1],[8,1],[8,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],[10,1],[10,1],[10,2],[10,1],[4,4],[4,6],[27,2],[27,3],[27,3],[27,4],[27,3],[27,4],[27,2],[39,2],[39,3],[39,3],[39,4],[39,3],[39,4],[39,2],[30,1],[31,1],[34,1],[32,1]],performAction:function(N,M,C,v,D,m,Q){var b=m.length-1;switch(D){case 2:return m[b-1];case 3:this.$=[];break;case 4:m[b-1].push(m[b]),this.$=m[b-1];break;case 5:case 6:this.$=m[b];break;case 7:case 8:this.$=[];break;case 9:v.setDateFormat(m[b].substr(11)),this.$=m[b].substr(11);break;case 10:v.enableInclusiveEndDates(),this.$=m[b].substr(18);break;case 11:v.TopAxis(),this.$=m[b].substr(8);break;case 12:v.setAxisFormat(m[b].substr(11)),this.$=m[b].substr(11);break;case 13:v.setTickInterval(m[b].substr(13)),this.$=m[b].substr(13);break;case 14:v.setExcludes(m[b].substr(9)),this.$=m[b].substr(9);break;case 15:v.setIncludes(m[b].substr(9)),this.$=m[b].substr(9);break;case 16:v.setTodayMarker(m[b].substr(12)),this.$=m[b].substr(12);break;case 17:v.setDiagramTitle(m[b].substr(6)),this.$=m[b].substr(6);break;case 18:this.$=m[b].trim(),v.setAccTitle(this.$);break;case 19:case 20:this.$=m[b].trim(),v.setAccDescription(this.$);break;case 21:v.addSection(m[b].substr(8)),this.$=m[b].substr(8);break;case 23:v.addTask(m[b-1],m[b]),this.$="task";break;case 27:this.$=m[b-1],v.setClickEvent(m[b-1],m[b],null);break;case 28:this.$=m[b-2],v.setClickEvent(m[b-2],m[b-1],m[b]);break;case 29:this.$=m[b-2],v.setClickEvent(m[b-2],m[b-1],null),v.setLink(m[b-2],m[b]);break;case 30:this.$=m[b-3],v.setClickEvent(m[b-3],m[b-2],m[b-1]),v.setLink(m[b-3],m[b]);break;case 31:this.$=m[b-2],v.setClickEvent(m[b-2],m[b],null),v.setLink(m[b-2],m[b-1]);break;case 32:this.$=m[b-3],v.setClickEvent(m[b-3],m[b-1],m[b]),v.setLink(m[b-3],m[b-2]);break;case 33:this.$=m[b-1],v.setLink(m[b-1],m[b]);break;case 34:case 40:this.$=m[b-1]+" "+m[b];break;case 35:case 36:case 38:this.$=m[b-2]+" "+m[b-1]+" "+m[b];break;case 37:case 39:this.$=m[b-3]+" "+m[b-2]+" "+m[b-1]+" "+m[b];break;case 41:v.parseDirective("%%{","open_directive");break;case 42:v.parseDirective(m[b],"type_directive");break;case 43:m[b]=m[b].trim().replace(/'/g,'"'),v.parseDirective(m[b],"arg_directive");break;case 44:v.parseDirective("}%%","close_directive","gantt");break}},table:[{3:1,4:2,5:e,30:4,40:r},{1:[3]},{3:6,4:2,5:e,30:4,40:r},t(i,[2,3],{6:7}),{31:8,41:[1,9]},{41:[2,41]},{1:[2,1]},{4:30,7:[1,10],8:11,9:[1,12],10:13,11:[1,14],12:n,13:s,14:a,15:o,16:l,17:u,18:d,19:f,20:p,21:g,23:_,25:k,26:w,27:28,28:S,30:4,35:A,40:r},{32:32,33:[1,33],43:O},t([33,43],[2,42]),t(i,[2,8],{1:[2,2]}),t(i,[2,4]),{4:30,10:35,12:n,13:s,14:a,15:o,16:l,17:u,18:d,19:f,20:p,21:g,23:_,25:k,26:w,27:28,28:S,30:4,35:A,40:r},t(i,[2,6]),t(i,[2,7]),t(i,[2,9]),t(i,[2,10]),t(i,[2,11]),t(i,[2,12]),t(i,[2,13]),t(i,[2,14]),t(i,[2,15]),t(i,[2,16]),t(i,[2,17]),{22:[1,36]},{24:[1,37]},t(i,[2,20]),t(i,[2,21]),t(i,[2,22]),{29:[1,38]},t(i,[2,24]),{36:[1,39],38:[1,40]},{11:[1,41]},{34:42,42:[1,43]},{11:[2,44]},t(i,[2,5]),t(i,[2,18]),t(i,[2,19]),t(i,[2,23]),t(i,[2,27],{37:[1,44],38:[1,45]}),t(i,[2,33],{36:[1,46]}),t(P,[2,25]),{32:47,43:O},{43:[2,43]},t(i,[2,28],{38:[1,48]}),t(i,[2,29]),t(i,[2,31],{37:[1,49]}),{11:[1,50]},t(i,[2,30]),t(i,[2,32]),t(P,[2,26])],defaultActions:{5:[2,41],6:[2,1],34:[2,44],43:[2,43]},parseError:function(N,M){if(M.recoverable)this.trace(N);else{var C=new Error(N);throw C.hash=M,C}},parse:function(N){var M=this,C=[0],v=[],D=[null],m=[],Q=this.table,b="",ct=0,Dt=0,vt=2,j=1,ot=m.slice.call(arguments,1),rt=Object.create(this.lexer),it={yy:{}};for(var ut in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ut)&&(it.yy[ut]=this.yy[ut]);rt.setInput(N,it.yy),it.yy.lexer=rt,it.yy.parser=this,typeof rt.yylloc>"u"&&(rt.yylloc={});var bt=rt.yylloc;m.push(bt);var K=rt.options&&rt.options.ranges;typeof it.yy.parseError=="function"?this.parseError=it.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Ot(){var Yt;return Yt=v.pop()||rt.lex()||j,typeof Yt!="number"&&(Yt instanceof Array&&(v=Yt,Yt=v.pop()),Yt=M.symbols_[Yt]||Yt),Yt}for(var Y,U,X,F,I={},L,J,T,ht;;){if(U=C[C.length-1],this.defaultActions[U]?X=this.defaultActions[U]:((Y===null||typeof Y>"u")&&(Y=Ot()),X=Q[U]&&Q[U][Y]),typeof X>"u"||!X.length||!X[0]){var V="";ht=[];for(L in Q[U])this.terminals_[L]&&L>vt&&ht.push("'"+this.terminals_[L]+"'");rt.showPosition?V="Parse error on line "+(ct+1)+`:
|
|
1230
1230
|
`+rt.showPosition()+`
|
|
1231
1231
|
Expecting `+ht.join(", ")+", got '"+(this.terminals_[Y]||Y)+"'":V="Parse error on line "+(ct+1)+": Unexpected "+(Y==j?"end of input":"'"+(this.terminals_[Y]||Y)+"'"),this.parseError(V,{text:rt.match,token:this.terminals_[Y]||Y,line:rt.yylineno,loc:bt,expected:ht})}if(X[0]instanceof Array&&X.length>1)throw new Error("Parse Error: multiple actions possible at state: "+U+", token: "+Y);switch(X[0]){case 1:C.push(Y),D.push(rt.yytext),m.push(rt.yylloc),C.push(X[1]),Y=null,Dt=rt.yyleng,b=rt.yytext,ct=rt.yylineno,bt=rt.yylloc;break;case 2:if(J=this.productions_[X[1]][1],I.$=D[D.length-J],I._$={first_line:m[m.length-(J||1)].first_line,last_line:m[m.length-1].last_line,first_column:m[m.length-(J||1)].first_column,last_column:m[m.length-1].last_column},K&&(I._$.range=[m[m.length-(J||1)].range[0],m[m.length-1].range[1]]),F=this.performAction.apply(I,[b,Dt,ct,it.yy,X[1],D,m].concat(ot)),typeof F<"u")return F;J&&(C=C.slice(0,-1*J*2),D=D.slice(0,-1*J),m=m.slice(0,-1*J)),C.push(this.productions_[X[1]][0]),D.push(I.$),m.push(I._$),T=Q[C[C.length-2]][C[C.length-1]],C.push(T);break;case 3:return!0}}return!0}},q=function(){var H={EOF:1,parseError:function(M,C){if(this.yy.parser)this.yy.parser.parseError(M,C);else throw new Error(M)},setInput:function(N,M){return this.yy=M||this.yy||{},this._input=N,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var N=this._input[0];this.yytext+=N,this.yyleng++,this.offset++,this.match+=N,this.matched+=N;var M=N.match(/(?:\r\n?|\n).*/g);return M?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),N},unput:function(N){var M=N.length,C=N.split(/(?:\r\n?|\n)/g);this._input=N+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-M),this.offset-=M;var v=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),C.length-1&&(this.yylineno-=C.length-1);var D=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:C?(C.length===v.length?this.yylloc.first_column:0)+v[v.length-C.length].length-C[0].length:this.yylloc.first_column-M},this.options.ranges&&(this.yylloc.range=[D[0],D[0]+this.yyleng-M]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
1232
1232
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(N){this.unput(this.match.slice(N))},pastInput:function(){var N=this.matched.substr(0,this.matched.length-this.match.length);return(N.length>20?"...":"")+N.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var N=this.match;return N.length<20&&(N+=this._input.substr(0,20-N.length)),(N.substr(0,20)+(N.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var N=this.pastInput(),M=new Array(N.length+1).join("-");return N+this.upcomingInput()+`
|
|
1233
1233
|
`+M+"^"},test_match:function(N,M){var C,v,D;if(this.options.backtrack_lexer&&(D={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(D.yylloc.range=this.yylloc.range.slice(0))),v=N[0].match(/(?:\r\n?|\n).*/g),v&&(this.yylineno+=v.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:v?v[v.length-1].length-v[v.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+N[0].length},this.yytext+=N[0],this.match+=N[0],this.matches=N,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(N[0].length),this.matched+=N[0],C=this.performAction.call(this,this.yy,this,M,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),C)return C;if(this._backtrack){for(var m in D)this[m]=D[m];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var N,M,C,v;this._more||(this.yytext="",this.match="");for(var D=this._currentRules(),m=0;m<D.length;m++)if(C=this._input.match(this.rules[D[m]]),C&&(!M||C[0].length>M[0].length)){if(M=C,v=m,this.options.backtrack_lexer){if(N=this.test_match(C,D[m]),N!==!1)return N;if(this._backtrack){M=!1;continue}else return!1}else if(!this.options.flex)break}return M?(N=this.test_match(M,D[v]),N!==!1?N:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1234
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var M=this.next();return M||this.lex()},begin:function(M){this.conditionStack.push(M)},popState:function(){var M=this.conditionStack.length-1;return M>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(M){return M=this.conditionStack.length-1-Math.abs(M||0),M>=0?this.conditionStack[M]:"INITIAL"},pushState:function(M){this.begin(M)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(M,C,v,D){switch(v){case 0:return this.begin("open_directive"),40;case 1:return this.begin("type_directive"),41;case 2:return this.popState(),this.begin("arg_directive"),33;case 3:return this.popState(),this.popState(),43;case 4:return 42;case 5:return this.begin("acc_title"),21;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),23;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:break;case 13:break;case 14:break;case 15:return 11;case 16:break;case 17:break;case 18:break;case 19:this.begin("href");break;case 20:this.popState();break;case 21:return 38;case 22:this.begin("callbackname");break;case 23:this.popState();break;case 24:this.popState(),this.begin("callbackargs");break;case 25:return 36;case 26:this.popState();break;case 27:return 37;case 28:this.begin("click");break;case 29:this.popState();break;case 30:return 35;case 31:return 5;case 32:return 12;case 33:return 13;case 34:return 14;case 35:return 15;case 36:return 16;case 37:return 18;case 38:return 17;case 39:return 19;case 40:return"date";case 41:return 20;case 42:return"accDescription";case 43:return 26;case 44:return 28;case 45:return 29;case 46:return 33;case 47:return 7;case 48:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[26,27],inclusive:!1},callbackname:{rules:[23,24,25],inclusive:!1},href:{rules:[20,21],inclusive:!1},click:{rules:[29,30],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,22,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],inclusive:!0}}};return H}();W.lexer=q;function z(){this.yy={}}return z.prototype=W,W.Parser=z,new z}();T1.parser=T1;const JR=T1,tF=t=>t.match(/^\s*gantt/)!==null;let Fi="",X0="",K0,Z0="",Ko=[],Zo=[],Q0={},J0=[],zc=[],_a="";const E3=["active","done","crit","milestone"];let td=[],Qo=!1,ed=!1,E1=0;const eF=function(t,e,r){ze.parseDirective(this,t,e,r)},rF=function(){J0=[],zc=[],_a="",td=[],ql=0,S1=void 0,jl=void 0,lr=[],Fi="",X0="",K0=void 0,Z0="",Ko=[],Zo=[],Qo=!1,ed=!1,E1=0,Q0={},Ci()},iF=function(t){X0=t},nF=function(){return X0},sF=function(t){K0=t},aF=function(){return K0},oF=function(t){Z0=t},lF=function(){return Z0},cF=function(t){Fi=t},uF=function(){Qo=!0},hF=function(){return Qo},dF=function(){ed=!0},fF=function(){return ed},pF=function(){return Fi},gF=function(t){Ko=t.toLowerCase().split(/[\s,]+/)},yF=function(){return Ko},mF=function(t){Zo=t.toLowerCase().split(/[\s,]+/)},bF=function(){return Zo},_F=function(){return Q0},xF=function(t){_a=t,J0.push(t)},vF=function(){return J0},kF=function(){let t=Q2();const e=10;let r=0;for(;!t&&r<e;)t=Q2(),r++;return zc=lr,zc},C3=function(t,e,r,i){return i.includes(t.format(e.trim()))?!1:t.isoWeekday()>=6&&r.includes("weekends")||r.includes(t.format("dddd").toLowerCase())?!0:r.includes(t.format(e.trim()))},S3=function(t,e,r,i){if(!r.length||t.manualEndTime)return;let n=bi(t.startTime,e,!0);n.add(1,"d");let s=bi(t.endTime,e,!0),a=wF(n,s,e,r,i);t.endTime=s.toDate(),t.renderEndTime=a},wF=function(t,e,r,i,n){let s=!1,a=null;for(;t<=e;)s||(a=e.toDate()),s=C3(t,r,i,n),s&&e.add(1,"d"),t.add(1,"d");return a},C1=function(t,e,r){r=r.trim();const n=/^after\s+([\d\w- ]+)/.exec(r.trim());if(n!==null){let a=null;if(n[1].split(" ").forEach(function(o){let l=Na(o);l!==void 0&&(a?l.endTime>a.endTime&&(a=l):a=l)}),a)return a.endTime;{const o=new Date;return o.setHours(0,0,0,0),o}}let s=bi(r,e.trim(),!0);if(s.isValid())return s.toDate();{B.debug("Invalid date:"+r),B.debug("With date format:"+e.trim());const a=new Date(r);if(a===void 0||isNaN(a.getTime()))throw new Error("Invalid date:"+r);return a}},A3=function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?bi.duration(Number.parseFloat(e[1]),e[2]):bi.duration.invalid()},L3=function(t,e,r,i=!1){r=r.trim();let n=bi(r,e.trim(),!0);if(n.isValid())return i&&n.add(1,"d"),n.toDate();const s=bi(t),a=A3(r);return a.isValid()&&s.add(a),s.toDate()};let ql=0;const ia=function(t){return t===void 0?(ql=ql+1,"task"+ql):t},TF=function(t,e){let r;e.substr(0,1)===":"?r=e.substr(1,e.length):r=e;const i=r.split(","),n={};B3(i,n,E3);for(let a=0;a<i.length;a++)i[a]=i[a].trim();let s="";switch(i.length){case 1:n.id=ia(),n.startTime=t.endTime,s=i[0];break;case 2:n.id=ia(),n.startTime=C1(void 0,Fi,i[0]),s=i[1];break;case 3:n.id=ia(i[0]),n.startTime=C1(void 0,Fi,i[1]),s=i[2];break}return s&&(n.endTime=L3(n.startTime,Fi,s,Qo),n.manualEndTime=bi(s,"YYYY-MM-DD",!0).isValid(),S3(n,Fi,Zo,Ko)),n},EF=function(t,e){let r;e.substr(0,1)===":"?r=e.substr(1,e.length):r=e;const i=r.split(","),n={};B3(i,n,E3);for(let s=0;s<i.length;s++)i[s]=i[s].trim();switch(i.length){case 1:n.id=ia(),n.startTime={type:"prevTaskEnd",id:t},n.endTime={data:i[0]};break;case 2:n.id=ia(),n.startTime={type:"getStartDate",startData:i[0]},n.endTime={data:i[1]};break;case 3:n.id=ia(i[0]),n.startTime={type:"getStartDate",startData:i[1]},n.endTime={data:i[2]};break}return n};let S1,jl,lr=[];const D3={},CF=function(t,e){const r={section:_a,type:_a,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},i=EF(jl,e);r.raw.startTime=i.startTime,r.raw.endTime=i.endTime,r.id=i.id,r.prevTaskId=jl,r.active=i.active,r.done=i.done,r.crit=i.crit,r.milestone=i.milestone,r.order=E1,E1++;const n=lr.push(r);jl=r.id,D3[r.id]=n-1},Na=function(t){const e=D3[t];return lr[e]},SF=function(t,e){const r={section:_a,type:_a,description:t,task:t,classes:[]},i=TF(S1,e);r.startTime=i.startTime,r.endTime=i.endTime,r.id=i.id,r.active=i.active,r.done=i.done,r.crit=i.crit,r.milestone=i.milestone,S1=r,zc.push(r)},Q2=function(){const t=function(r){const i=lr[r];let n="";switch(lr[r].raw.startTime.type){case"prevTaskEnd":{const s=Na(i.prevTaskId);i.startTime=s.endTime;break}case"getStartDate":n=C1(void 0,Fi,lr[r].raw.startTime.startData),n&&(lr[r].startTime=n);break}return lr[r].startTime&&(lr[r].endTime=L3(lr[r].startTime,Fi,lr[r].raw.endTime.data,Qo),lr[r].endTime&&(lr[r].processed=!0,lr[r].manualEndTime=bi(lr[r].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),S3(lr[r],Fi,Zo,Ko))),lr[r].processed};let e=!0;for(const[r,i]of lr.entries())t(r),e=e&&i.processed;return e},AF=function(t,e){let r=e;$().securityLevel!=="loose"&&(r=wn(e)),t.split(",").forEach(function(i){Na(i)!==void 0&&(N3(i,()=>{window.open(r,"_self")}),Q0[i]=r)}),M3(t,"clickable")},M3=function(t,e){t.split(",").forEach(function(r){let i=Na(r);i!==void 0&&i.classes.push(e)})},LF=function(t,e,r){if($().securityLevel!=="loose"||e===void 0)return;let i=[];if(typeof r=="string"){i=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let s=0;s<i.length;s++){let a=i[s].trim();a.charAt(0)==='"'&&a.charAt(a.length-1)==='"'&&(a=a.substr(1,a.length-2)),i[s]=a}}i.length===0&&i.push(t),Na(t)!==void 0&&N3(t,()=>{ye.runFunc(e,...i)})},N3=function(t,e){td.push(function(){const r=document.querySelector(`[id="${t}"]`);r!==null&&r.addEventListener("click",function(){e()})},function(){const r=document.querySelector(`[id="${t}-text"]`);r!==null&&r.addEventListener("click",function(){e()})})},DF=function(t,e,r){t.split(",").forEach(function(i){LF(i,e,r)}),M3(t,"clickable")},MF=function(t){td.forEach(function(e){e(t)})},rd={parseDirective:eF,getConfig:()=>$().gantt,clear:rF,setDateFormat:cF,getDateFormat:pF,enableInclusiveEndDates:uF,endDatesAreInclusive:hF,enableTopAxis:dF,topAxisEnabled:fF,setAxisFormat:iF,getAxisFormat:nF,setTickInterval:sF,getTickInterval:aF,setTodayMarker:oF,getTodayMarker:lF,setAccTitle:ii,getAccTitle:Si,setDiagramTitle:Cn,getDiagramTitle:Sn,setAccDescription:Ai,getAccDescription:Li,addSection:xF,getSections:vF,getTasks:kF,addTask:CF,findTaskById:Na,addTaskOrg:SF,setIncludes:gF,getIncludes:yF,setExcludes:mF,getExcludes:bF,setClickEvent:DF,setLink:AF,getLinks:_F,bindFunctions:MF,parseDuration:A3,isInvalidDate:C3};function B3(t,e,r){let i=!0;for(;i;)i=!1,r.forEach(function(n){const s="^\\s*"+n+"\\s*$",a=new RegExp(s);t[0].match(a)&&(e[n]=!0,t.shift(1),i=!0)})}const NF=function(){B.debug("Something is calling, setConf, remove the call")};let tn;const BF=function(t,e,r,i){const n=$().gantt,s=$().securityLevel;let a;s==="sandbox"&&(a=At("#i"+e));const o=At(s==="sandbox"?a.nodes()[0].contentDocument.body:"body"),l=s==="sandbox"?a.nodes()[0].contentDocument:document,u=l.getElementById(e);tn=u.parentElement.offsetWidth,tn===void 0&&(tn=1200),n.useWidth!==void 0&&(tn=n.useWidth);const d=i.db.getTasks(),f=d.length*(n.barHeight+n.barGap)+2*n.topPadding;u.setAttribute("viewBox","0 0 "+tn+" "+f);const p=o.select(`[id="${e}"]`),g=$6().domain([Ab(d,function(M){return M.startTime}),Sb(d,function(M){return M.endTime})]).rangeRound([0,tn-n.leftPadding-n.rightPadding]);let _=[];for(const M of d)_.push(M.type);const k=_;_=z(_);function w(M,C){const v=M.startTime,D=C.startTime;let m=0;return v>D?m=1:v<D&&(m=-1),m}d.sort(w),S(d,tn,f),Ei(p,f,tn,n.useMaxWidth),p.append("text").text(i.db.getDiagramTitle()).attr("x",tn/2).attr("y",n.titleTopMargin).attr("class","titleText");function S(M,C,v){const D=n.barHeight,m=D+n.barGap,Q=n.topPadding,b=n.leftPadding,ct=og().domain([0,_.length]).range(["#00B9FA","#F95002"]).interpolate(X_);O(m,Q,b,C,v,M,i.db.getExcludes(),i.db.getIncludes()),P(b,Q,C,v),A(M,m,Q,b,D,ct,C),W(m,Q),q(b,Q,C,v)}function A(M,C,v,D,m,Q,b){p.append("g").selectAll("rect").data(M).enter().append("rect").attr("x",0).attr("y",function(j,ot){return ot=j.order,ot*C+v-2}).attr("width",function(){return b-n.rightPadding/2}).attr("height",C).attr("class",function(j){for(const[ot,rt]of _.entries())if(j.type===rt)return"section section"+ot%n.numberSectionStyles;return"section section0"});const ct=p.append("g").selectAll("rect").data(M).enter(),Dt=i.db.getLinks();if(ct.append("rect").attr("id",function(j){return j.id}).attr("rx",3).attr("ry",3).attr("x",function(j){return j.milestone?g(j.startTime)+D+.5*(g(j.endTime)-g(j.startTime))-.5*m:g(j.startTime)+D}).attr("y",function(j,ot){return ot=j.order,ot*C+v}).attr("width",function(j){return j.milestone?m:g(j.renderEndTime||j.endTime)-g(j.startTime)}).attr("height",m).attr("transform-origin",function(j,ot){return ot=j.order,(g(j.startTime)+D+.5*(g(j.endTime)-g(j.startTime))).toString()+"px "+(ot*C+v+.5*m).toString()+"px"}).attr("class",function(j){const ot="task";let rt="";j.classes.length>0&&(rt=j.classes.join(" "));let it=0;for(const[bt,K]of _.entries())j.type===K&&(it=bt%n.numberSectionStyles);let ut="";return j.active?j.crit?ut+=" activeCrit":ut=" active":j.done?j.crit?ut=" doneCrit":ut=" done":j.crit&&(ut+=" crit"),ut.length===0&&(ut=" task"),j.milestone&&(ut=" milestone "+ut),ut+=it,ut+=" "+rt,ot+ut}),ct.append("text").attr("id",function(j){return j.id+"-text"}).text(function(j){return j.task}).attr("font-size",n.fontSize).attr("x",function(j){let ot=g(j.startTime),rt=g(j.renderEndTime||j.endTime);j.milestone&&(ot+=.5*(g(j.endTime)-g(j.startTime))-.5*m),j.milestone&&(rt=ot+m);const it=this.getBBox().width;return it>rt-ot?rt+it+1.5*n.leftPadding>b?ot+D-5:rt+D+5:(rt-ot)/2+ot+D}).attr("y",function(j,ot){return ot=j.order,ot*C+n.barHeight/2+(n.fontSize/2-2)+v}).attr("text-height",m).attr("class",function(j){const ot=g(j.startTime);let rt=g(j.endTime);j.milestone&&(rt=ot+m);const it=this.getBBox().width;let ut="";j.classes.length>0&&(ut=j.classes.join(" "));let bt=0;for(const[Ot,Y]of _.entries())j.type===Y&&(bt=Ot%n.numberSectionStyles);let K="";return j.active&&(j.crit?K="activeCritText"+bt:K="activeText"+bt),j.done?j.crit?K=K+" doneCritText"+bt:K=K+" doneText"+bt:j.crit&&(K=K+" critText"+bt),j.milestone&&(K+=" milestoneText"),it>rt-ot?rt+it+1.5*n.leftPadding>b?ut+" taskTextOutsideLeft taskTextOutside"+bt+" "+K:ut+" taskTextOutsideRight taskTextOutside"+bt+" "+K+" width-"+it:ut+" taskText taskText"+bt+" "+K+" width-"+it}),$().securityLevel==="sandbox"){let j;j=At("#i"+e);const ot=j.nodes()[0].contentDocument;ct.filter(function(rt){return Dt[rt.id]!==void 0}).each(function(rt){var it=ot.querySelector("#"+rt.id),ut=ot.querySelector("#"+rt.id+"-text");const bt=it.parentNode;var K=ot.createElement("a");K.setAttribute("xlink:href",Dt[rt.id]),K.setAttribute("target","_top"),bt.appendChild(K),K.appendChild(it),K.appendChild(ut)})}}function O(M,C,v,D,m,Q,b,ct){const Dt=Q.reduce((bt,{startTime:K})=>bt?Math.min(bt,K):K,0),vt=Q.reduce((bt,{endTime:K})=>bt?Math.max(bt,K):K,0),j=i.db.getDateFormat();if(!Dt||!vt)return;const ot=[];let rt=null,it=bi(Dt);for(;it.valueOf()<=vt;)i.db.isInvalidDate(it,j,b,ct)?rt?rt.end=it.clone():rt={start:it.clone(),end:it.clone()}:rt&&(ot.push(rt),rt=null),it.add(1,"d");p.append("g").selectAll("rect").data(ot).enter().append("rect").attr("id",function(bt){return"exclude-"+bt.start.format("YYYY-MM-DD")}).attr("x",function(bt){return g(bt.start)+v}).attr("y",n.gridLineStartPadding).attr("width",function(bt){const K=bt.end.clone().add(1,"day");return g(K)-g(bt.start)}).attr("height",m-C-n.gridLineStartPadding).attr("transform-origin",function(bt,K){return(g(bt.start)+v+.5*(g(bt.end)-g(bt.start))).toString()+"px "+(K*M+.5*m).toString()+"px"}).attr("class","exclude-range")}function P(M,C,v,D){let m=Rb(g).tickSize(-D+C+n.gridLineStartPadding).tickFormat(uc(i.db.getAxisFormat()||n.axisFormat||"%Y-%m-%d"));const b=/^([1-9]\d*)(minute|hour|day|week|month)$/.exec(i.db.getTickInterval()||n.tickInterval);if(b!==null){const ct=b[1];switch(b[2]){case"minute":m.ticks(go.every(ct));break;case"hour":m.ticks(yo.every(ct));break;case"day":m.ticks(ys.every(ct));break;case"week":m.ticks(oa.every(ct));break;case"month":m.ticks(mo.every(ct));break}}if(p.append("g").attr("class","grid").attr("transform","translate("+M+", "+(D-50)+")").call(m).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),i.db.topAxisEnabled()||n.topAxis){let ct=Ob(g).tickSize(-D+C+n.gridLineStartPadding).tickFormat(uc(i.db.getAxisFormat()||n.axisFormat||"%Y-%m-%d"));if(b!==null){const Dt=b[1];switch(b[2]){case"minute":ct.ticks(go.every(Dt));break;case"hour":ct.ticks(yo.every(Dt));break;case"day":ct.ticks(ys.every(Dt));break;case"week":ct.ticks(oa.every(Dt));break;case"month":ct.ticks(mo.every(Dt));break}}p.append("g").attr("class","grid").attr("transform","translate("+M+", "+C+")").call(ct).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function W(M,C){const v=[];let D=0;for(const[m,Q]of _.entries())v[m]=[Q,N(Q,k)];p.append("g").selectAll("text").data(v).enter().append(function(m){const Q=m[0].split(he.lineBreakRegex),b=-(Q.length-1)/2,ct=l.createElementNS("http://www.w3.org/2000/svg","text");ct.setAttribute("dy",b+"em");for(const[Dt,vt]of Q.entries()){const j=l.createElementNS("http://www.w3.org/2000/svg","tspan");j.setAttribute("alignment-baseline","central"),j.setAttribute("x","10"),Dt>0&&j.setAttribute("dy","1em"),j.textContent=vt,ct.appendChild(j)}return ct}).attr("x",10).attr("y",function(m,Q){if(Q>0)for(let b=0;b<Q;b++)return D+=v[Q-1][1],m[1]*M/2+D*M+C;else return m[1]*M/2+C}).attr("font-size",n.sectionFontSize).attr("font-size",n.sectionFontSize).attr("class",function(m){for(const[Q,b]of _.entries())if(m[0]===b)return"sectionTitle sectionTitle"+Q%n.numberSectionStyles;return"sectionTitle"})}function q(M,C,v,D){const m=i.db.getTodayMarker();if(m==="off")return;const Q=p.append("g").attr("class","today"),b=new Date,ct=Q.append("line");ct.attr("x1",g(b)+M).attr("x2",g(b)+M).attr("y1",n.titleTopMargin).attr("y2",D-n.titleTopMargin).attr("class","today"),m!==""&&ct.attr("style",m.replace(/,/g,";"))}function z(M){const C={},v=[];for(let D=0,m=M.length;D<m;++D)Object.prototype.hasOwnProperty.call(C,M[D])||(C[M[D]]=!0,v.push(M[D]));return v}function H(M){let C=M.length;const v={};for(;C;)v[M[--C]]=(v[M[C]]||0)+1;return v}function N(M,C){return H(C)[M]||0}},IF={setConf:NF,draw:BF};var A1=function(){var t=function(s,a,o,l){for(o=o||{},l=s.length;l--;o[s[l]]=a);return o},e=[6,9,10],r={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(a,o,l,u,d,f,p){switch(f.length-1,d){case 1:return u;case 4:break;case 6:u.setInfo(!0);break}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},t(e,[2,3]),t(e,[2,4]),t(e,[2,5]),t(e,[2,6])],defaultActions:{4:[2,1]},parseError:function(a,o){if(o.recoverable)this.trace(a);else{var l=new Error(a);throw l.hash=o,l}},parse:function(a){var o=this,l=[0],u=[],d=[null],f=[],p=this.table,g="",_=0,k=0,w=2,S=1,A=f.slice.call(arguments,1),O=Object.create(this.lexer),P={yy:{}};for(var W in this.yy)Object.prototype.hasOwnProperty.call(this.yy,W)&&(P.yy[W]=this.yy[W]);O.setInput(a,P.yy),P.yy.lexer=O,P.yy.parser=this,typeof O.yylloc>"u"&&(O.yylloc={});var q=O.yylloc;f.push(q);var z=O.options&&O.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function H(){var vt;return vt=u.pop()||O.lex()||S,typeof vt!="number"&&(vt instanceof Array&&(u=vt,vt=u.pop()),vt=o.symbols_[vt]||vt),vt}for(var N,M,C,v,D={},m,Q,b,ct;;){if(M=l[l.length-1],this.defaultActions[M]?C=this.defaultActions[M]:((N===null||typeof N>"u")&&(N=H()),C=p[M]&&p[M][N]),typeof C>"u"||!C.length||!C[0]){var Dt="";ct=[];for(m in p[M])this.terminals_[m]&&m>w&&ct.push("'"+this.terminals_[m]+"'");O.showPosition?Dt="Parse error on line "+(_+1)+`:
|
|
1234
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var M=this.next();return M||this.lex()},begin:function(M){this.conditionStack.push(M)},popState:function(){var M=this.conditionStack.length-1;return M>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(M){return M=this.conditionStack.length-1-Math.abs(M||0),M>=0?this.conditionStack[M]:"INITIAL"},pushState:function(M){this.begin(M)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(M,C,v,D){switch(v){case 0:return this.begin("open_directive"),40;case 1:return this.begin("type_directive"),41;case 2:return this.popState(),this.begin("arg_directive"),33;case 3:return this.popState(),this.popState(),43;case 4:return 42;case 5:return this.begin("acc_title"),21;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),23;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:break;case 13:break;case 14:break;case 15:return 11;case 16:break;case 17:break;case 18:break;case 19:this.begin("href");break;case 20:this.popState();break;case 21:return 38;case 22:this.begin("callbackname");break;case 23:this.popState();break;case 24:this.popState(),this.begin("callbackargs");break;case 25:return 36;case 26:this.popState();break;case 27:return 37;case 28:this.begin("click");break;case 29:this.popState();break;case 30:return 35;case 31:return 5;case 32:return 12;case 33:return 13;case 34:return 14;case 35:return 15;case 36:return 16;case 37:return 18;case 38:return 17;case 39:return 19;case 40:return"date";case 41:return 20;case 42:return"accDescription";case 43:return 26;case 44:return 28;case 45:return 29;case 46:return 33;case 47:return 7;case 48:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:tickInterval\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[26,27],inclusive:!1},callbackname:{rules:[23,24,25],inclusive:!1},href:{rules:[20,21],inclusive:!1},click:{rules:[29,30],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,22,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48],inclusive:!0}}};return H}();W.lexer=q;function z(){this.yy={}}return z.prototype=W,W.Parser=z,new z}();E1.parser=E1;const JR=E1,tF=t=>t.match(/^\s*gantt/)!==null;let Fi="",K0="",Z0,Q0="",Ko=[],Zo=[],J0={},td=[],zc=[],_a="";const E3=["active","done","crit","milestone"];let ed=[],Qo=!1,rd=!1,C1=0;const eF=function(t,e,r){ze.parseDirective(this,t,e,r)},rF=function(){td=[],zc=[],_a="",ed=[],ql=0,A1=void 0,jl=void 0,lr=[],Fi="",K0="",Z0=void 0,Q0="",Ko=[],Zo=[],Qo=!1,rd=!1,C1=0,J0={},Ci()},iF=function(t){K0=t},nF=function(){return K0},sF=function(t){Z0=t},aF=function(){return Z0},oF=function(t){Q0=t},lF=function(){return Q0},cF=function(t){Fi=t},uF=function(){Qo=!0},hF=function(){return Qo},dF=function(){rd=!0},fF=function(){return rd},pF=function(){return Fi},gF=function(t){Ko=t.toLowerCase().split(/[\s,]+/)},yF=function(){return Ko},mF=function(t){Zo=t.toLowerCase().split(/[\s,]+/)},bF=function(){return Zo},_F=function(){return J0},xF=function(t){_a=t,td.push(t)},vF=function(){return td},kF=function(){let t=Q2();const e=10;let r=0;for(;!t&&r<e;)t=Q2(),r++;return zc=lr,zc},C3=function(t,e,r,i){return i.includes(t.format(e.trim()))?!1:t.isoWeekday()>=6&&r.includes("weekends")||r.includes(t.format("dddd").toLowerCase())?!0:r.includes(t.format(e.trim()))},S3=function(t,e,r,i){if(!r.length||t.manualEndTime)return;let n=bi(t.startTime,e,!0);n.add(1,"d");let s=bi(t.endTime,e,!0),a=wF(n,s,e,r,i);t.endTime=s.toDate(),t.renderEndTime=a},wF=function(t,e,r,i,n){let s=!1,a=null;for(;t<=e;)s||(a=e.toDate()),s=C3(t,r,i,n),s&&e.add(1,"d"),t.add(1,"d");return a},S1=function(t,e,r){r=r.trim();const n=/^after\s+([\d\w- ]+)/.exec(r.trim());if(n!==null){let a=null;if(n[1].split(" ").forEach(function(o){let l=Na(o);l!==void 0&&(a?l.endTime>a.endTime&&(a=l):a=l)}),a)return a.endTime;{const o=new Date;return o.setHours(0,0,0,0),o}}let s=bi(r,e.trim(),!0);if(s.isValid())return s.toDate();{B.debug("Invalid date:"+r),B.debug("With date format:"+e.trim());const a=new Date(r);if(a===void 0||isNaN(a.getTime()))throw new Error("Invalid date:"+r);return a}},A3=function(t){const e=/^(\d+(?:\.\d+)?)([Mdhmswy]|ms)$/.exec(t.trim());return e!==null?bi.duration(Number.parseFloat(e[1]),e[2]):bi.duration.invalid()},L3=function(t,e,r,i=!1){r=r.trim();let n=bi(r,e.trim(),!0);if(n.isValid())return i&&n.add(1,"d"),n.toDate();const s=bi(t),a=A3(r);return a.isValid()&&s.add(a),s.toDate()};let ql=0;const ia=function(t){return t===void 0?(ql=ql+1,"task"+ql):t},TF=function(t,e){let r;e.substr(0,1)===":"?r=e.substr(1,e.length):r=e;const i=r.split(","),n={};B3(i,n,E3);for(let a=0;a<i.length;a++)i[a]=i[a].trim();let s="";switch(i.length){case 1:n.id=ia(),n.startTime=t.endTime,s=i[0];break;case 2:n.id=ia(),n.startTime=S1(void 0,Fi,i[0]),s=i[1];break;case 3:n.id=ia(i[0]),n.startTime=S1(void 0,Fi,i[1]),s=i[2];break}return s&&(n.endTime=L3(n.startTime,Fi,s,Qo),n.manualEndTime=bi(s,"YYYY-MM-DD",!0).isValid(),S3(n,Fi,Zo,Ko)),n},EF=function(t,e){let r;e.substr(0,1)===":"?r=e.substr(1,e.length):r=e;const i=r.split(","),n={};B3(i,n,E3);for(let s=0;s<i.length;s++)i[s]=i[s].trim();switch(i.length){case 1:n.id=ia(),n.startTime={type:"prevTaskEnd",id:t},n.endTime={data:i[0]};break;case 2:n.id=ia(),n.startTime={type:"getStartDate",startData:i[0]},n.endTime={data:i[1]};break;case 3:n.id=ia(i[0]),n.startTime={type:"getStartDate",startData:i[1]},n.endTime={data:i[2]};break}return n};let A1,jl,lr=[];const D3={},CF=function(t,e){const r={section:_a,type:_a,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},i=EF(jl,e);r.raw.startTime=i.startTime,r.raw.endTime=i.endTime,r.id=i.id,r.prevTaskId=jl,r.active=i.active,r.done=i.done,r.crit=i.crit,r.milestone=i.milestone,r.order=C1,C1++;const n=lr.push(r);jl=r.id,D3[r.id]=n-1},Na=function(t){const e=D3[t];return lr[e]},SF=function(t,e){const r={section:_a,type:_a,description:t,task:t,classes:[]},i=TF(A1,e);r.startTime=i.startTime,r.endTime=i.endTime,r.id=i.id,r.active=i.active,r.done=i.done,r.crit=i.crit,r.milestone=i.milestone,A1=r,zc.push(r)},Q2=function(){const t=function(r){const i=lr[r];let n="";switch(lr[r].raw.startTime.type){case"prevTaskEnd":{const s=Na(i.prevTaskId);i.startTime=s.endTime;break}case"getStartDate":n=S1(void 0,Fi,lr[r].raw.startTime.startData),n&&(lr[r].startTime=n);break}return lr[r].startTime&&(lr[r].endTime=L3(lr[r].startTime,Fi,lr[r].raw.endTime.data,Qo),lr[r].endTime&&(lr[r].processed=!0,lr[r].manualEndTime=bi(lr[r].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),S3(lr[r],Fi,Zo,Ko))),lr[r].processed};let e=!0;for(const[r,i]of lr.entries())t(r),e=e&&i.processed;return e},AF=function(t,e){let r=e;$().securityLevel!=="loose"&&(r=wn(e)),t.split(",").forEach(function(i){Na(i)!==void 0&&(N3(i,()=>{window.open(r,"_self")}),J0[i]=r)}),M3(t,"clickable")},M3=function(t,e){t.split(",").forEach(function(r){let i=Na(r);i!==void 0&&i.classes.push(e)})},LF=function(t,e,r){if($().securityLevel!=="loose"||e===void 0)return;let i=[];if(typeof r=="string"){i=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let s=0;s<i.length;s++){let a=i[s].trim();a.charAt(0)==='"'&&a.charAt(a.length-1)==='"'&&(a=a.substr(1,a.length-2)),i[s]=a}}i.length===0&&i.push(t),Na(t)!==void 0&&N3(t,()=>{ye.runFunc(e,...i)})},N3=function(t,e){ed.push(function(){const r=document.querySelector(`[id="${t}"]`);r!==null&&r.addEventListener("click",function(){e()})},function(){const r=document.querySelector(`[id="${t}-text"]`);r!==null&&r.addEventListener("click",function(){e()})})},DF=function(t,e,r){t.split(",").forEach(function(i){LF(i,e,r)}),M3(t,"clickable")},MF=function(t){ed.forEach(function(e){e(t)})},id={parseDirective:eF,getConfig:()=>$().gantt,clear:rF,setDateFormat:cF,getDateFormat:pF,enableInclusiveEndDates:uF,endDatesAreInclusive:hF,enableTopAxis:dF,topAxisEnabled:fF,setAxisFormat:iF,getAxisFormat:nF,setTickInterval:sF,getTickInterval:aF,setTodayMarker:oF,getTodayMarker:lF,setAccTitle:ii,getAccTitle:Si,setDiagramTitle:Cn,getDiagramTitle:Sn,setAccDescription:Ai,getAccDescription:Li,addSection:xF,getSections:vF,getTasks:kF,addTask:CF,findTaskById:Na,addTaskOrg:SF,setIncludes:gF,getIncludes:yF,setExcludes:mF,getExcludes:bF,setClickEvent:DF,setLink:AF,getLinks:_F,bindFunctions:MF,parseDuration:A3,isInvalidDate:C3};function B3(t,e,r){let i=!0;for(;i;)i=!1,r.forEach(function(n){const s="^\\s*"+n+"\\s*$",a=new RegExp(s);t[0].match(a)&&(e[n]=!0,t.shift(1),i=!0)})}const NF=function(){B.debug("Something is calling, setConf, remove the call")};let tn;const BF=function(t,e,r,i){const n=$().gantt,s=$().securityLevel;let a;s==="sandbox"&&(a=At("#i"+e));const o=At(s==="sandbox"?a.nodes()[0].contentDocument.body:"body"),l=s==="sandbox"?a.nodes()[0].contentDocument:document,u=l.getElementById(e);tn=u.parentElement.offsetWidth,tn===void 0&&(tn=1200),n.useWidth!==void 0&&(tn=n.useWidth);const d=i.db.getTasks(),f=d.length*(n.barHeight+n.barGap)+2*n.topPadding;u.setAttribute("viewBox","0 0 "+tn+" "+f);const p=o.select(`[id="${e}"]`),g=$6().domain([Ab(d,function(M){return M.startTime}),Sb(d,function(M){return M.endTime})]).rangeRound([0,tn-n.leftPadding-n.rightPadding]);let _=[];for(const M of d)_.push(M.type);const k=_;_=z(_);function w(M,C){const v=M.startTime,D=C.startTime;let m=0;return v>D?m=1:v<D&&(m=-1),m}d.sort(w),S(d,tn,f),Ei(p,f,tn,n.useMaxWidth),p.append("text").text(i.db.getDiagramTitle()).attr("x",tn/2).attr("y",n.titleTopMargin).attr("class","titleText");function S(M,C,v){const D=n.barHeight,m=D+n.barGap,Q=n.topPadding,b=n.leftPadding,ct=og().domain([0,_.length]).range(["#00B9FA","#F95002"]).interpolate(X_);O(m,Q,b,C,v,M,i.db.getExcludes(),i.db.getIncludes()),P(b,Q,C,v),A(M,m,Q,b,D,ct,C),W(m,Q),q(b,Q,C,v)}function A(M,C,v,D,m,Q,b){p.append("g").selectAll("rect").data(M).enter().append("rect").attr("x",0).attr("y",function(j,ot){return ot=j.order,ot*C+v-2}).attr("width",function(){return b-n.rightPadding/2}).attr("height",C).attr("class",function(j){for(const[ot,rt]of _.entries())if(j.type===rt)return"section section"+ot%n.numberSectionStyles;return"section section0"});const ct=p.append("g").selectAll("rect").data(M).enter(),Dt=i.db.getLinks();if(ct.append("rect").attr("id",function(j){return j.id}).attr("rx",3).attr("ry",3).attr("x",function(j){return j.milestone?g(j.startTime)+D+.5*(g(j.endTime)-g(j.startTime))-.5*m:g(j.startTime)+D}).attr("y",function(j,ot){return ot=j.order,ot*C+v}).attr("width",function(j){return j.milestone?m:g(j.renderEndTime||j.endTime)-g(j.startTime)}).attr("height",m).attr("transform-origin",function(j,ot){return ot=j.order,(g(j.startTime)+D+.5*(g(j.endTime)-g(j.startTime))).toString()+"px "+(ot*C+v+.5*m).toString()+"px"}).attr("class",function(j){const ot="task";let rt="";j.classes.length>0&&(rt=j.classes.join(" "));let it=0;for(const[bt,K]of _.entries())j.type===K&&(it=bt%n.numberSectionStyles);let ut="";return j.active?j.crit?ut+=" activeCrit":ut=" active":j.done?j.crit?ut=" doneCrit":ut=" done":j.crit&&(ut+=" crit"),ut.length===0&&(ut=" task"),j.milestone&&(ut=" milestone "+ut),ut+=it,ut+=" "+rt,ot+ut}),ct.append("text").attr("id",function(j){return j.id+"-text"}).text(function(j){return j.task}).attr("font-size",n.fontSize).attr("x",function(j){let ot=g(j.startTime),rt=g(j.renderEndTime||j.endTime);j.milestone&&(ot+=.5*(g(j.endTime)-g(j.startTime))-.5*m),j.milestone&&(rt=ot+m);const it=this.getBBox().width;return it>rt-ot?rt+it+1.5*n.leftPadding>b?ot+D-5:rt+D+5:(rt-ot)/2+ot+D}).attr("y",function(j,ot){return ot=j.order,ot*C+n.barHeight/2+(n.fontSize/2-2)+v}).attr("text-height",m).attr("class",function(j){const ot=g(j.startTime);let rt=g(j.endTime);j.milestone&&(rt=ot+m);const it=this.getBBox().width;let ut="";j.classes.length>0&&(ut=j.classes.join(" "));let bt=0;for(const[Ot,Y]of _.entries())j.type===Y&&(bt=Ot%n.numberSectionStyles);let K="";return j.active&&(j.crit?K="activeCritText"+bt:K="activeText"+bt),j.done?j.crit?K=K+" doneCritText"+bt:K=K+" doneText"+bt:j.crit&&(K=K+" critText"+bt),j.milestone&&(K+=" milestoneText"),it>rt-ot?rt+it+1.5*n.leftPadding>b?ut+" taskTextOutsideLeft taskTextOutside"+bt+" "+K:ut+" taskTextOutsideRight taskTextOutside"+bt+" "+K+" width-"+it:ut+" taskText taskText"+bt+" "+K+" width-"+it}),$().securityLevel==="sandbox"){let j;j=At("#i"+e);const ot=j.nodes()[0].contentDocument;ct.filter(function(rt){return Dt[rt.id]!==void 0}).each(function(rt){var it=ot.querySelector("#"+rt.id),ut=ot.querySelector("#"+rt.id+"-text");const bt=it.parentNode;var K=ot.createElement("a");K.setAttribute("xlink:href",Dt[rt.id]),K.setAttribute("target","_top"),bt.appendChild(K),K.appendChild(it),K.appendChild(ut)})}}function O(M,C,v,D,m,Q,b,ct){const Dt=Q.reduce((bt,{startTime:K})=>bt?Math.min(bt,K):K,0),vt=Q.reduce((bt,{endTime:K})=>bt?Math.max(bt,K):K,0),j=i.db.getDateFormat();if(!Dt||!vt)return;const ot=[];let rt=null,it=bi(Dt);for(;it.valueOf()<=vt;)i.db.isInvalidDate(it,j,b,ct)?rt?rt.end=it.clone():rt={start:it.clone(),end:it.clone()}:rt&&(ot.push(rt),rt=null),it.add(1,"d");p.append("g").selectAll("rect").data(ot).enter().append("rect").attr("id",function(bt){return"exclude-"+bt.start.format("YYYY-MM-DD")}).attr("x",function(bt){return g(bt.start)+v}).attr("y",n.gridLineStartPadding).attr("width",function(bt){const K=bt.end.clone().add(1,"day");return g(K)-g(bt.start)}).attr("height",m-C-n.gridLineStartPadding).attr("transform-origin",function(bt,K){return(g(bt.start)+v+.5*(g(bt.end)-g(bt.start))).toString()+"px "+(K*M+.5*m).toString()+"px"}).attr("class","exclude-range")}function P(M,C,v,D){let m=Rb(g).tickSize(-D+C+n.gridLineStartPadding).tickFormat(uc(i.db.getAxisFormat()||n.axisFormat||"%Y-%m-%d"));const b=/^([1-9]\d*)(minute|hour|day|week|month)$/.exec(i.db.getTickInterval()||n.tickInterval);if(b!==null){const ct=b[1];switch(b[2]){case"minute":m.ticks(go.every(ct));break;case"hour":m.ticks(yo.every(ct));break;case"day":m.ticks(ys.every(ct));break;case"week":m.ticks(oa.every(ct));break;case"month":m.ticks(mo.every(ct));break}}if(p.append("g").attr("class","grid").attr("transform","translate("+M+", "+(D-50)+")").call(m).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),i.db.topAxisEnabled()||n.topAxis){let ct=Ob(g).tickSize(-D+C+n.gridLineStartPadding).tickFormat(uc(i.db.getAxisFormat()||n.axisFormat||"%Y-%m-%d"));if(b!==null){const Dt=b[1];switch(b[2]){case"minute":ct.ticks(go.every(Dt));break;case"hour":ct.ticks(yo.every(Dt));break;case"day":ct.ticks(ys.every(Dt));break;case"week":ct.ticks(oa.every(Dt));break;case"month":ct.ticks(mo.every(Dt));break}}p.append("g").attr("class","grid").attr("transform","translate("+M+", "+C+")").call(ct).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function W(M,C){const v=[];let D=0;for(const[m,Q]of _.entries())v[m]=[Q,N(Q,k)];p.append("g").selectAll("text").data(v).enter().append(function(m){const Q=m[0].split(he.lineBreakRegex),b=-(Q.length-1)/2,ct=l.createElementNS("http://www.w3.org/2000/svg","text");ct.setAttribute("dy",b+"em");for(const[Dt,vt]of Q.entries()){const j=l.createElementNS("http://www.w3.org/2000/svg","tspan");j.setAttribute("alignment-baseline","central"),j.setAttribute("x","10"),Dt>0&&j.setAttribute("dy","1em"),j.textContent=vt,ct.appendChild(j)}return ct}).attr("x",10).attr("y",function(m,Q){if(Q>0)for(let b=0;b<Q;b++)return D+=v[Q-1][1],m[1]*M/2+D*M+C;else return m[1]*M/2+C}).attr("font-size",n.sectionFontSize).attr("font-size",n.sectionFontSize).attr("class",function(m){for(const[Q,b]of _.entries())if(m[0]===b)return"sectionTitle sectionTitle"+Q%n.numberSectionStyles;return"sectionTitle"})}function q(M,C,v,D){const m=i.db.getTodayMarker();if(m==="off")return;const Q=p.append("g").attr("class","today"),b=new Date,ct=Q.append("line");ct.attr("x1",g(b)+M).attr("x2",g(b)+M).attr("y1",n.titleTopMargin).attr("y2",D-n.titleTopMargin).attr("class","today"),m!==""&&ct.attr("style",m.replace(/,/g,";"))}function z(M){const C={},v=[];for(let D=0,m=M.length;D<m;++D)Object.prototype.hasOwnProperty.call(C,M[D])||(C[M[D]]=!0,v.push(M[D]));return v}function H(M){let C=M.length;const v={};for(;C;)v[M[--C]]=(v[M[C]]||0)+1;return v}function N(M,C){return H(C)[M]||0}},IF={setConf:NF,draw:BF};var L1=function(){var t=function(s,a,o,l){for(o=o||{},l=s.length;l--;o[s[l]]=a);return o},e=[6,9,10],r={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(a,o,l,u,d,f,p){switch(f.length-1,d){case 1:return u;case 4:break;case 6:u.setInfo(!0);break}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},t(e,[2,3]),t(e,[2,4]),t(e,[2,5]),t(e,[2,6])],defaultActions:{4:[2,1]},parseError:function(a,o){if(o.recoverable)this.trace(a);else{var l=new Error(a);throw l.hash=o,l}},parse:function(a){var o=this,l=[0],u=[],d=[null],f=[],p=this.table,g="",_=0,k=0,w=2,S=1,A=f.slice.call(arguments,1),O=Object.create(this.lexer),P={yy:{}};for(var W in this.yy)Object.prototype.hasOwnProperty.call(this.yy,W)&&(P.yy[W]=this.yy[W]);O.setInput(a,P.yy),P.yy.lexer=O,P.yy.parser=this,typeof O.yylloc>"u"&&(O.yylloc={});var q=O.yylloc;f.push(q);var z=O.options&&O.options.ranges;typeof P.yy.parseError=="function"?this.parseError=P.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function H(){var vt;return vt=u.pop()||O.lex()||S,typeof vt!="number"&&(vt instanceof Array&&(u=vt,vt=u.pop()),vt=o.symbols_[vt]||vt),vt}for(var N,M,C,v,D={},m,Q,b,ct;;){if(M=l[l.length-1],this.defaultActions[M]?C=this.defaultActions[M]:((N===null||typeof N>"u")&&(N=H()),C=p[M]&&p[M][N]),typeof C>"u"||!C.length||!C[0]){var Dt="";ct=[];for(m in p[M])this.terminals_[m]&&m>w&&ct.push("'"+this.terminals_[m]+"'");O.showPosition?Dt="Parse error on line "+(_+1)+`:
|
|
1235
1235
|
`+O.showPosition()+`
|
|
1236
1236
|
Expecting `+ct.join(", ")+", got '"+(this.terminals_[N]||N)+"'":Dt="Parse error on line "+(_+1)+": Unexpected "+(N==S?"end of input":"'"+(this.terminals_[N]||N)+"'"),this.parseError(Dt,{text:O.match,token:this.terminals_[N]||N,line:O.yylineno,loc:q,expected:ct})}if(C[0]instanceof Array&&C.length>1)throw new Error("Parse Error: multiple actions possible at state: "+M+", token: "+N);switch(C[0]){case 1:l.push(N),d.push(O.yytext),f.push(O.yylloc),l.push(C[1]),N=null,k=O.yyleng,g=O.yytext,_=O.yylineno,q=O.yylloc;break;case 2:if(Q=this.productions_[C[1]][1],D.$=d[d.length-Q],D._$={first_line:f[f.length-(Q||1)].first_line,last_line:f[f.length-1].last_line,first_column:f[f.length-(Q||1)].first_column,last_column:f[f.length-1].last_column},z&&(D._$.range=[f[f.length-(Q||1)].range[0],f[f.length-1].range[1]]),v=this.performAction.apply(D,[g,k,_,P.yy,C[1],d,f].concat(A)),typeof v<"u")return v;Q&&(l=l.slice(0,-1*Q*2),d=d.slice(0,-1*Q),f=f.slice(0,-1*Q)),l.push(this.productions_[C[1]][0]),d.push(D.$),f.push(D._$),b=p[l[l.length-2]][l[l.length-1]],l.push(b);break;case 3:return!0}}return!0}},i=function(){var s={EOF:1,parseError:function(o,l){if(this.yy.parser)this.yy.parser.parseError(o,l);else throw new Error(o)},setInput:function(a,o){return this.yy=o||this.yy||{},this._input=a,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var a=this._input[0];this.yytext+=a,this.yyleng++,this.offset++,this.match+=a,this.matched+=a;var o=a.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),a},unput:function(a){var o=a.length,l=a.split(/(?:\r\n?|\n)/g);this._input=a+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var d=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===u.length?this.yylloc.first_column:0)+u[u.length-l.length].length-l[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[d[0],d[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
1237
1237
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(a){this.unput(this.match.slice(a))},pastInput:function(){var a=this.matched.substr(0,this.matched.length-this.match.length);return(a.length>20?"...":"")+a.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var a=this.match;return a.length<20&&(a+=this._input.substr(0,20-a.length)),(a.substr(0,20)+(a.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var a=this.pastInput(),o=new Array(a.length+1).join("-");return a+this.upcomingInput()+`
|
|
1238
1238
|
`+o+"^"},test_match:function(a,o){var l,u,d;if(this.options.backtrack_lexer&&(d={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(d.yylloc.range=this.yylloc.range.slice(0))),u=a[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+a[0].length},this.yytext+=a[0],this.match+=a[0],this.matches=a,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(a[0].length),this.matched+=a[0],l=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var f in d)this[f]=d[f];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var a,o,l,u;this._more||(this.yytext="",this.match="");for(var d=this._currentRules(),f=0;f<d.length;f++)if(l=this._input.match(this.rules[d[f]]),l&&(!o||l[0].length>o[0].length)){if(o=l,u=f,this.options.backtrack_lexer){if(a=this.test_match(l,d[f]),a!==!1)return a;if(this._backtrack){o=!1;continue}else return!1}else if(!this.options.flex)break}return o?(a=this.test_match(o,d[u]),a!==!1?a:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1239
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var o=this.next();return o||this.lex()},begin:function(o){this.conditionStack.push(o)},popState:function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},pushState:function(o){this.begin(o)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(o,l,u,d){switch(u){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};return s}();r.lexer=i;function n(){this.yy={}}return n.prototype=r,r.Parser=n,new n}();
|
|
1240
|
-
`+t);const i=$().securityLevel;let n;i==="sandbox"&&(n=At("#i"+e));const a=At(i==="sandbox"?n.nodes()[0].contentDocument.body:"body").select("#"+e);a.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("v "+r),a.attr("height",100),a.attr("width",400)}catch(i){B.error("Error while rendering info diagram"),B.error(i.message)}},zF={draw:UF},WF=t=>t.match(/^\s*info/)!==null;var
|
|
1239
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var o=this.next();return o||this.lex()},begin:function(o){this.conditionStack.push(o)},popState:function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},pushState:function(o){this.begin(o)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(o,l,u,d){switch(u){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};return s}();r.lexer=i;function n(){this.yy={}}return n.prototype=r,r.Parser=n,new n}();L1.parser=L1;const OF=L1;var I3="",O3=!1;const RF=t=>{B.debug("Setting message to: "+t),I3=t},FF=()=>I3,PF=t=>{O3=t},YF=()=>O3,VF={setMessage:RF,getMessage:FF,setInfo:PF,getInfo:YF,clear:Ci},UF=(t,e,r)=>{try{B.debug(`Rendering info diagram
|
|
1240
|
+
`+t);const i=$().securityLevel;let n;i==="sandbox"&&(n=At("#i"+e));const a=At(i==="sandbox"?n.nodes()[0].contentDocument.body:"body").select("#"+e);a.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("v "+r),a.attr("height",100),a.attr("width",400)}catch(i){B.error("Error while rendering info diagram"),B.error(i.message)}},zF={draw:UF},WF=t=>t.match(/^\s*info/)!==null;var D1=function(){var t=function(q,z,H,N){for(H=H||{},N=q.length;N--;H[q[N]]=z);return H},e=[1,4],r=[1,5],i=[1,6],n=[1,7],s=[1,9],a=[1,11,13,15,17,19,20,26,27,28,29],o=[2,5],l=[1,6,11,13,15,17,19,20,26,27,28,29],u=[26,27,28],d=[2,8],f=[1,18],p=[1,19],g=[1,20],_=[1,21],k=[1,22],w=[1,23],S=[1,28],A=[6,26,27,28,29],O={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,PIE:6,document:7,showData:8,line:9,statement:10,txt:11,value:12,title:13,title_value:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,openDirective:21,typeDirective:22,closeDirective:23,":":24,argDirective:25,NEWLINE:26,";":27,EOF:28,open_directive:29,type_directive:30,arg_directive:31,close_directive:32,$accept:0,$end:1},terminals_:{2:"error",6:"PIE",8:"showData",11:"txt",12:"value",13:"title",14:"title_value",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",24:":",26:"NEWLINE",27:";",28:"EOF",29:"open_directive",30:"type_directive",31:"arg_directive",32:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,3],[7,0],[7,2],[9,2],[10,0],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,1],[5,3],[5,5],[4,1],[4,1],[4,1],[21,1],[22,1],[25,1],[23,1]],performAction:function(z,H,N,M,C,v,D){var m=v.length-1;switch(C){case 4:M.setShowData(!0);break;case 7:this.$=v[m-1];break;case 9:M.addSection(v[m-1],M.cleanupValue(v[m]));break;case 10:this.$=v[m].trim(),M.setDiagramTitle(this.$);break;case 11:this.$=v[m].trim(),M.setAccTitle(this.$);break;case 12:case 13:this.$=v[m].trim(),M.setAccDescription(this.$);break;case 14:M.addSection(v[m].substr(8)),this.$=v[m].substr(8);break;case 21:M.parseDirective("%%{","open_directive");break;case 22:M.parseDirective(v[m],"type_directive");break;case 23:v[m]=v[m].trim().replace(/'/g,'"'),M.parseDirective(v[m],"arg_directive");break;case 24:M.parseDirective("}%%","close_directive","pie");break}},table:[{3:1,4:2,5:3,6:e,21:8,26:r,27:i,28:n,29:s},{1:[3]},{3:10,4:2,5:3,6:e,21:8,26:r,27:i,28:n,29:s},{3:11,4:2,5:3,6:e,21:8,26:r,27:i,28:n,29:s},t(a,o,{7:12,8:[1,13]}),t(l,[2,18]),t(l,[2,19]),t(l,[2,20]),{22:14,30:[1,15]},{30:[2,21]},{1:[2,1]},{1:[2,2]},t(u,d,{21:8,9:16,10:17,5:24,1:[2,3],11:f,13:p,15:g,17:_,19:k,20:w,29:s}),t(a,o,{7:25}),{23:26,24:[1,27],32:S},t([24,32],[2,22]),t(a,[2,6]),{4:29,26:r,27:i,28:n},{12:[1,30]},{14:[1,31]},{16:[1,32]},{18:[1,33]},t(u,[2,13]),t(u,[2,14]),t(u,[2,15]),t(u,d,{21:8,9:16,10:17,5:24,1:[2,4],11:f,13:p,15:g,17:_,19:k,20:w,29:s}),t(A,[2,16]),{25:34,31:[1,35]},t(A,[2,24]),t(a,[2,7]),t(u,[2,9]),t(u,[2,10]),t(u,[2,11]),t(u,[2,12]),{23:36,32:S},{32:[2,23]},t(A,[2,17])],defaultActions:{9:[2,21],10:[2,1],11:[2,2],35:[2,23]},parseError:function(z,H){if(H.recoverable)this.trace(z);else{var N=new Error(z);throw N.hash=H,N}},parse:function(z){var H=this,N=[0],M=[],C=[null],v=[],D=this.table,m="",Q=0,b=0,ct=2,Dt=1,vt=v.slice.call(arguments,1),j=Object.create(this.lexer),ot={yy:{}};for(var rt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,rt)&&(ot.yy[rt]=this.yy[rt]);j.setInput(z,ot.yy),ot.yy.lexer=j,ot.yy.parser=this,typeof j.yylloc>"u"&&(j.yylloc={});var it=j.yylloc;v.push(it);var ut=j.options&&j.options.ranges;typeof ot.yy.parseError=="function"?this.parseError=ot.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function bt(){var ht;return ht=M.pop()||j.lex()||Dt,typeof ht!="number"&&(ht instanceof Array&&(M=ht,ht=M.pop()),ht=H.symbols_[ht]||ht),ht}for(var K,Ot,Y,U,X={},F,I,L,J;;){if(Ot=N[N.length-1],this.defaultActions[Ot]?Y=this.defaultActions[Ot]:((K===null||typeof K>"u")&&(K=bt()),Y=D[Ot]&&D[Ot][K]),typeof Y>"u"||!Y.length||!Y[0]){var T="";J=[];for(F in D[Ot])this.terminals_[F]&&F>ct&&J.push("'"+this.terminals_[F]+"'");j.showPosition?T="Parse error on line "+(Q+1)+`:
|
|
1241
1241
|
`+j.showPosition()+`
|
|
1242
1242
|
Expecting `+J.join(", ")+", got '"+(this.terminals_[K]||K)+"'":T="Parse error on line "+(Q+1)+": Unexpected "+(K==Dt?"end of input":"'"+(this.terminals_[K]||K)+"'"),this.parseError(T,{text:j.match,token:this.terminals_[K]||K,line:j.yylineno,loc:it,expected:J})}if(Y[0]instanceof Array&&Y.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Ot+", token: "+K);switch(Y[0]){case 1:N.push(K),C.push(j.yytext),v.push(j.yylloc),N.push(Y[1]),K=null,b=j.yyleng,m=j.yytext,Q=j.yylineno,it=j.yylloc;break;case 2:if(I=this.productions_[Y[1]][1],X.$=C[C.length-I],X._$={first_line:v[v.length-(I||1)].first_line,last_line:v[v.length-1].last_line,first_column:v[v.length-(I||1)].first_column,last_column:v[v.length-1].last_column},ut&&(X._$.range=[v[v.length-(I||1)].range[0],v[v.length-1].range[1]]),U=this.performAction.apply(X,[m,b,Q,ot.yy,Y[1],C,v].concat(vt)),typeof U<"u")return U;I&&(N=N.slice(0,-1*I*2),C=C.slice(0,-1*I),v=v.slice(0,-1*I)),N.push(this.productions_[Y[1]][0]),C.push(X.$),v.push(X._$),L=D[N[N.length-2]][N[N.length-1]],N.push(L);break;case 3:return!0}}return!0}},P=function(){var q={EOF:1,parseError:function(H,N){if(this.yy.parser)this.yy.parser.parseError(H,N);else throw new Error(H)},setInput:function(z,H){return this.yy=H||this.yy||{},this._input=z,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var z=this._input[0];this.yytext+=z,this.yyleng++,this.offset++,this.match+=z,this.matched+=z;var H=z.match(/(?:\r\n?|\n).*/g);return H?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),z},unput:function(z){var H=z.length,N=z.split(/(?:\r\n?|\n)/g);this._input=z+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-H),this.offset-=H;var M=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),N.length-1&&(this.yylineno-=N.length-1);var C=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:N?(N.length===M.length?this.yylloc.first_column:0)+M[M.length-N.length].length-N[0].length:this.yylloc.first_column-H},this.options.ranges&&(this.yylloc.range=[C[0],C[0]+this.yyleng-H]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
1243
1243
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(z){this.unput(this.match.slice(z))},pastInput:function(){var z=this.matched.substr(0,this.matched.length-this.match.length);return(z.length>20?"...":"")+z.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var z=this.match;return z.length<20&&(z+=this._input.substr(0,20-z.length)),(z.substr(0,20)+(z.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var z=this.pastInput(),H=new Array(z.length+1).join("-");return z+this.upcomingInput()+`
|
|
1244
1244
|
`+H+"^"},test_match:function(z,H){var N,M,C;if(this.options.backtrack_lexer&&(C={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(C.yylloc.range=this.yylloc.range.slice(0))),M=z[0].match(/(?:\r\n?|\n).*/g),M&&(this.yylineno+=M.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:M?M[M.length-1].length-M[M.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+z[0].length},this.yytext+=z[0],this.match+=z[0],this.matches=z,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(z[0].length),this.matched+=z[0],N=this.performAction.call(this,this.yy,this,H,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),N)return N;if(this._backtrack){for(var v in C)this[v]=C[v];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var z,H,N,M;this._more||(this.yytext="",this.match="");for(var C=this._currentRules(),v=0;v<C.length;v++)if(N=this._input.match(this.rules[C[v]]),N&&(!H||N[0].length>H[0].length)){if(H=N,M=v,this.options.backtrack_lexer){if(z=this.test_match(N,C[v]),z!==!1)return z;if(this._backtrack){H=!1;continue}else return!1}else if(!this.options.flex)break}return H?(z=this.test_match(H,C[M]),z!==!1?z:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1245
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var H=this.next();return H||this.lex()},begin:function(H){this.conditionStack.push(H)},popState:function(){var H=this.conditionStack.length-1;return H>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(H){return H=this.conditionStack.length-1-Math.abs(H||0),H>=0?this.conditionStack[H]:"INITIAL"},pushState:function(H){this.begin(H)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(H,N,M,C){switch(M){case 0:return this.begin("open_directive"),29;case 1:return this.begin("type_directive"),30;case 2:return this.popState(),this.begin("arg_directive"),24;case 3:return this.popState(),this.popState(),32;case 4:return 31;case 5:break;case 6:break;case 7:return 26;case 8:break;case 9:break;case 10:return this.begin("title"),13;case 11:return this.popState(),"title_value";case 12:return this.begin("acc_title"),15;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),17;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:this.begin("string");break;case 20:this.popState();break;case 21:return"txt";case 22:return 6;case 23:return 8;case 24:return"value";case 25:return 28}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[11],inclusive:!1},string:{rules:[20,21],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,14,16,19,22,23,24,25],inclusive:!0}}};return q}();O.lexer=P;function W(){this.yy={}}return W.prototype=O,O.Parser=W,new W}();
|
|
1246
|
-
`+t);const A=$().securityLevel;let O;A==="sandbox"&&(O=At("#i"+e));const P=At(A==="sandbox"?O.nodes()[0].contentDocument.body:"body"),W=A==="sandbox"?O.nodes()[0].contentDocument:document;i.db.clear(),i.parser.parse(t),B.debug("Parsed info diagram");const q=W.getElementById(e);rn=q.parentElement.offsetWidth,rn===void 0&&(rn=1200),en.useWidth!==void 0&&(rn=en.useWidth),en.pie.useWidth!==void 0&&(rn=en.pie.useWidth);const z=P.select("#"+e);Ei(z,Ga,rn,en.pie.useMaxWidth),q.setAttribute("viewBox","0 0 "+rn+" "+Ga);var n=40,s=18,a=4,o=Math.min(rn,Ga)/2-n,l=z.append("g").attr("transform","translate("+rn/2+","+Ga/2+")"),u=i.db.getSections(),d=0;Object.keys(u).forEach(function(N){d+=u[N]});const H=en.themeVariables;var f=[H.pie1,H.pie2,H.pie3,H.pie4,H.pie5,H.pie6,H.pie7,H.pie8,H.pie9,H.pie10,H.pie11,H.pie12],p=ng().range(f),g=Object.entries(u).map(function(N,M){return{order:M,name:N[0],value:N[1]}}),_=ok().value(function(N){return N.value}).sort(function(N,M){return N.order-M.order}),k=_(g),w=$h().innerRadius(0).outerRadius(o);l.selectAll("mySlices").data(k).enter().append("path").attr("d",w).attr("fill",function(N){return p(N.data.name)}).attr("class","pieCircle"),l.selectAll("mySlices").data(k).enter().append("text").text(function(N){return(N.data.value/d*100).toFixed(0)+"%"}).attr("transform",function(N){return"translate("+w.centroid(N)+")"}).style("text-anchor","middle").attr("class","slice"),l.append("text").text(i.db.getDiagramTitle()).attr("x",0).attr("y",-(Ga-50)/2).attr("class","pieTitleText");var S=l.selectAll(".legend").data(p.domain()).enter().append("g").attr("class","legend").attr("transform",function(N,M){const C=s+a,v=C*p.domain().length/2,D=12*s,m=M*C-v;return"translate("+D+","+m+")"});S.append("rect").attr("width",s).attr("height",s).style("fill",p).style("stroke",p),S.data(k).append("text").attr("x",s+a).attr("y",s-a).text(function(N){return i.db.getShowData()||en.showData||en.pie.showData?N.data.name+" ["+N.data.value+"]":N.data.name})}catch(A){B.error("Error while rendering info diagram"),B.error(A)}},eP={draw:tP};var D1=function(){var t=function(Ot,Y,U,X){for(U=U||{},X=Ot.length;X--;U[Ot[X]]=Y);return U},e=[1,3],r=[1,5],i=[1,6],n=[1,7],s=[1,8],a=[5,6,8,14,16,18,19,40,41,42,43,44,45,53,71,72],o=[1,22],l=[2,13],u=[1,26],d=[1,27],f=[1,28],p=[1,29],g=[1,30],_=[1,31],k=[1,24],w=[1,32],S=[1,33],A=[1,36],O=[71,72],P=[5,8,14,16,18,19,40,41,42,43,44,45,53,60,62,71,72],W=[1,56],q=[1,57],z=[1,58],H=[1,59],N=[1,60],M=[1,61],C=[1,62],v=[62,63],D=[1,74],m=[1,70],Q=[1,71],b=[1,72],ct=[1,73],Dt=[1,75],vt=[1,79],j=[1,80],ot=[1,77],rt=[1,78],it=[5,8,14,16,18,19,40,41,42,43,44,45,53,71,72],ut={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,openDirective:9,typeDirective:10,closeDirective:11,":":12,argDirective:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,requirementDef:23,elementDef:24,relationshipDef:25,requirementType:26,requirementName:27,STRUCT_START:28,requirementBody:29,ID:30,COLONSEP:31,id:32,TEXT:33,text:34,RISK:35,riskLevel:36,VERIFYMTHD:37,verifyType:38,STRUCT_STOP:39,REQUIREMENT:40,FUNCTIONAL_REQUIREMENT:41,INTERFACE_REQUIREMENT:42,PERFORMANCE_REQUIREMENT:43,PHYSICAL_REQUIREMENT:44,DESIGN_CONSTRAINT:45,LOW_RISK:46,MED_RISK:47,HIGH_RISK:48,VERIFY_ANALYSIS:49,VERIFY_DEMONSTRATION:50,VERIFY_INSPECTION:51,VERIFY_TEST:52,ELEMENT:53,elementName:54,elementBody:55,TYPE:56,type:57,DOCREF:58,ref:59,END_ARROW_L:60,relationship:61,LINE:62,END_ARROW_R:63,CONTAINS:64,COPIES:65,DERIVES:66,SATISFIES:67,VERIFIES:68,REFINES:69,TRACES:70,unqString:71,qString:72,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",12:":",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",28:"STRUCT_START",30:"ID",31:"COLONSEP",33:"TEXT",35:"RISK",37:"VERIFYMTHD",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",56:"TYPE",58:"DOCREF",60:"END_ARROW_L",62:"LINE",63:"END_ARROW_R",64:"CONTAINS",65:"COPIES",66:"DERIVES",67:"SATISFIES",68:"VERIFIES",69:"REFINES",70:"TRACES",71:"unqString",72:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,3],[4,5],[4,2],[4,2],[4,1],[9,1],[10,1],[13,1],[11,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[23,5],[29,5],[29,5],[29,5],[29,5],[29,2],[29,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[36,1],[36,1],[36,1],[38,1],[38,1],[38,1],[38,1],[24,5],[55,5],[55,5],[55,2],[55,1],[25,5],[25,5],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[27,1],[27,1],[32,1],[32,1],[34,1],[34,1],[54,1],[54,1],[57,1],[57,1],[59,1],[59,1]],performAction:function(Y,U,X,F,I,L,J){var T=L.length-1;switch(I){case 6:this.$=L[T].trim(),F.setAccTitle(this.$);break;case 7:case 8:this.$=L[T].trim(),F.setAccDescription(this.$);break;case 9:F.parseDirective("%%{","open_directive");break;case 10:F.parseDirective(L[T],"type_directive");break;case 11:L[T]=L[T].trim().replace(/'/g,'"'),F.parseDirective(L[T],"arg_directive");break;case 12:F.parseDirective("}%%","close_directive","pie");break;case 13:this.$=[];break;case 19:F.addRequirement(L[T-3],L[T-4]);break;case 20:F.setNewReqId(L[T-2]);break;case 21:F.setNewReqText(L[T-2]);break;case 22:F.setNewReqRisk(L[T-2]);break;case 23:F.setNewReqVerifyMethod(L[T-2]);break;case 26:this.$=F.RequirementType.REQUIREMENT;break;case 27:this.$=F.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 28:this.$=F.RequirementType.INTERFACE_REQUIREMENT;break;case 29:this.$=F.RequirementType.PERFORMANCE_REQUIREMENT;break;case 30:this.$=F.RequirementType.PHYSICAL_REQUIREMENT;break;case 31:this.$=F.RequirementType.DESIGN_CONSTRAINT;break;case 32:this.$=F.RiskLevel.LOW_RISK;break;case 33:this.$=F.RiskLevel.MED_RISK;break;case 34:this.$=F.RiskLevel.HIGH_RISK;break;case 35:this.$=F.VerifyType.VERIFY_ANALYSIS;break;case 36:this.$=F.VerifyType.VERIFY_DEMONSTRATION;break;case 37:this.$=F.VerifyType.VERIFY_INSPECTION;break;case 38:this.$=F.VerifyType.VERIFY_TEST;break;case 39:F.addElement(L[T-3]);break;case 40:F.setNewElementType(L[T-2]);break;case 41:F.setNewElementDocRef(L[T-2]);break;case 44:F.addRelationship(L[T-2],L[T],L[T-4]);break;case 45:F.addRelationship(L[T-2],L[T-4],L[T]);break;case 46:this.$=F.Relationships.CONTAINS;break;case 47:this.$=F.Relationships.COPIES;break;case 48:this.$=F.Relationships.DERIVES;break;case 49:this.$=F.Relationships.SATISFIES;break;case 50:this.$=F.Relationships.VERIFIES;break;case 51:this.$=F.Relationships.REFINES;break;case 52:this.$=F.Relationships.TRACES;break}},table:[{3:1,4:2,6:e,9:4,14:r,16:i,18:n,19:s},{1:[3]},{3:10,4:2,5:[1,9],6:e,9:4,14:r,16:i,18:n,19:s},{5:[1,11]},{10:12,20:[1,13]},{15:[1,14]},{17:[1,15]},t(a,[2,8]),{20:[2,9]},{3:16,4:2,6:e,9:4,14:r,16:i,18:n,19:s},{1:[2,2]},{4:21,5:o,7:17,8:l,9:4,14:r,16:i,18:n,19:s,23:18,24:19,25:20,26:23,32:25,40:u,41:d,42:f,43:p,44:g,45:_,53:k,71:w,72:S},{11:34,12:[1,35],22:A},t([12,22],[2,10]),t(a,[2,6]),t(a,[2,7]),{1:[2,1]},{8:[1,37]},{4:21,5:o,7:38,8:l,9:4,14:r,16:i,18:n,19:s,23:18,24:19,25:20,26:23,32:25,40:u,41:d,42:f,43:p,44:g,45:_,53:k,71:w,72:S},{4:21,5:o,7:39,8:l,9:4,14:r,16:i,18:n,19:s,23:18,24:19,25:20,26:23,32:25,40:u,41:d,42:f,43:p,44:g,45:_,53:k,71:w,72:S},{4:21,5:o,7:40,8:l,9:4,14:r,16:i,18:n,19:s,23:18,24:19,25:20,26:23,32:25,40:u,41:d,42:f,43:p,44:g,45:_,53:k,71:w,72:S},{4:21,5:o,7:41,8:l,9:4,14:r,16:i,18:n,19:s,23:18,24:19,25:20,26:23,32:25,40:u,41:d,42:f,43:p,44:g,45:_,53:k,71:w,72:S},{4:21,5:o,7:42,8:l,9:4,14:r,16:i,18:n,19:s,23:18,24:19,25:20,26:23,32:25,40:u,41:d,42:f,43:p,44:g,45:_,53:k,71:w,72:S},{27:43,71:[1,44],72:[1,45]},{54:46,71:[1,47],72:[1,48]},{60:[1,49],62:[1,50]},t(O,[2,26]),t(O,[2,27]),t(O,[2,28]),t(O,[2,29]),t(O,[2,30]),t(O,[2,31]),t(P,[2,55]),t(P,[2,56]),t(a,[2,4]),{13:51,21:[1,52]},t(a,[2,12]),{1:[2,3]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{8:[2,17]},{8:[2,18]},{28:[1,53]},{28:[2,53]},{28:[2,54]},{28:[1,54]},{28:[2,59]},{28:[2,60]},{61:55,64:W,65:q,66:z,67:H,68:N,69:M,70:C},{61:63,64:W,65:q,66:z,67:H,68:N,69:M,70:C},{11:64,22:A},{22:[2,11]},{5:[1,65]},{5:[1,66]},{62:[1,67]},t(v,[2,46]),t(v,[2,47]),t(v,[2,48]),t(v,[2,49]),t(v,[2,50]),t(v,[2,51]),t(v,[2,52]),{63:[1,68]},t(a,[2,5]),{5:D,29:69,30:m,33:Q,35:b,37:ct,39:Dt},{5:vt,39:j,55:76,56:ot,58:rt},{32:81,71:w,72:S},{32:82,71:w,72:S},t(it,[2,19]),{31:[1,83]},{31:[1,84]},{31:[1,85]},{31:[1,86]},{5:D,29:87,30:m,33:Q,35:b,37:ct,39:Dt},t(it,[2,25]),t(it,[2,39]),{31:[1,88]},{31:[1,89]},{5:vt,39:j,55:90,56:ot,58:rt},t(it,[2,43]),t(it,[2,44]),t(it,[2,45]),{32:91,71:w,72:S},{34:92,71:[1,93],72:[1,94]},{36:95,46:[1,96],47:[1,97],48:[1,98]},{38:99,49:[1,100],50:[1,101],51:[1,102],52:[1,103]},t(it,[2,24]),{57:104,71:[1,105],72:[1,106]},{59:107,71:[1,108],72:[1,109]},t(it,[2,42]),{5:[1,110]},{5:[1,111]},{5:[2,57]},{5:[2,58]},{5:[1,112]},{5:[2,32]},{5:[2,33]},{5:[2,34]},{5:[1,113]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[2,38]},{5:[1,114]},{5:[2,61]},{5:[2,62]},{5:[1,115]},{5:[2,63]},{5:[2,64]},{5:D,29:116,30:m,33:Q,35:b,37:ct,39:Dt},{5:D,29:117,30:m,33:Q,35:b,37:ct,39:Dt},{5:D,29:118,30:m,33:Q,35:b,37:ct,39:Dt},{5:D,29:119,30:m,33:Q,35:b,37:ct,39:Dt},{5:vt,39:j,55:120,56:ot,58:rt},{5:vt,39:j,55:121,56:ot,58:rt},t(it,[2,20]),t(it,[2,21]),t(it,[2,22]),t(it,[2,23]),t(it,[2,40]),t(it,[2,41])],defaultActions:{8:[2,9],10:[2,2],16:[2,1],37:[2,3],38:[2,14],39:[2,15],40:[2,16],41:[2,17],42:[2,18],44:[2,53],45:[2,54],47:[2,59],48:[2,60],52:[2,11],93:[2,57],94:[2,58],96:[2,32],97:[2,33],98:[2,34],100:[2,35],101:[2,36],102:[2,37],103:[2,38],105:[2,61],106:[2,62],108:[2,63],109:[2,64]},parseError:function(Y,U){if(U.recoverable)this.trace(Y);else{var X=new Error(Y);throw X.hash=U,X}},parse:function(Y){var U=this,X=[0],F=[],I=[null],L=[],J=this.table,T="",ht=0,V=0,Yt=2,et=1,Mt=L.slice.call(arguments,1),Tt=Object.create(this.lexer),gt={yy:{}};for(var Et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Et)&&(gt.yy[Et]=this.yy[Et]);Tt.setInput(Y,gt.yy),gt.yy.lexer=Tt,gt.yy.parser=this,typeof Tt.yylloc>"u"&&(Tt.yylloc={});var wt=Tt.yylloc;L.push(wt);var pt=Tt.options&&Tt.options.ranges;typeof gt.yy.parseError=="function"?this.parseError=gt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function st(){var ft;return ft=F.pop()||Tt.lex()||et,typeof ft!="number"&&(ft instanceof Array&&(F=ft,ft=F.pop()),ft=U.symbols_[ft]||ft),ft}for(var le,Xt,jt,Kt,Gt={},Ee,Ht,Vt,Ft;;){if(Xt=X[X.length-1],this.defaultActions[Xt]?jt=this.defaultActions[Xt]:((le===null||typeof le>"u")&&(le=st()),jt=J[Xt]&&J[Xt][le]),typeof jt>"u"||!jt.length||!jt[0]){var xt="";Ft=[];for(Ee in J[Xt])this.terminals_[Ee]&&Ee>Yt&&Ft.push("'"+this.terminals_[Ee]+"'");Tt.showPosition?xt="Parse error on line "+(ht+1)+`:
|
|
1245
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var H=this.next();return H||this.lex()},begin:function(H){this.conditionStack.push(H)},popState:function(){var H=this.conditionStack.length-1;return H>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(H){return H=this.conditionStack.length-1-Math.abs(H||0),H>=0?this.conditionStack[H]:"INITIAL"},pushState:function(H){this.begin(H)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(H,N,M,C){switch(M){case 0:return this.begin("open_directive"),29;case 1:return this.begin("type_directive"),30;case 2:return this.popState(),this.begin("arg_directive"),24;case 3:return this.popState(),this.popState(),32;case 4:return 31;case 5:break;case 6:break;case 7:return 26;case 8:break;case 9:break;case 10:return this.begin("title"),13;case 11:return this.popState(),"title_value";case 12:return this.begin("acc_title"),15;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),17;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:this.begin("string");break;case 20:this.popState();break;case 21:return"txt";case 22:return 6;case 23:return 8;case 24:return"value";case 25:return 28}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[11],inclusive:!1},string:{rules:[20,21],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,14,16,19,22,23,24,25],inclusive:!0}}};return q}();O.lexer=P;function W(){this.yy={}}return W.prototype=O,O.Parser=W,new W}();D1.parser=D1;const HF=D1,GF=t=>t.match(/^\s*pie/)!==null||t.match(/^\s*bar/)!==null;let Wc={},nd=!1;const qF=function(t,e,r){ze.parseDirective(this,t,e,r)},jF=function(t,e){t=he.sanitizeText(t,$()),Wc[t]===void 0&&(Wc[t]=e,B.debug("Added new section :",t))},$F=()=>Wc,XF=function(t){nd=t},KF=function(){return nd},ZF=function(t){return t.substring(0,1)===":"&&(t=t.substring(1).trim()),Number(t.trim())},QF=function(){Wc={},nd=!1,Ci()},JF={parseDirective:qF,getConfig:()=>$().pie,addSection:jF,getSections:$F,cleanupValue:ZF,clear:QF,setAccTitle:ii,getAccTitle:Si,setDiagramTitle:Cn,getDiagramTitle:Sn,setShowData:XF,getShowData:KF,getAccDescription:Li,setAccDescription:Ai};let en=$(),rn;const Ga=450,tP=(t,e,r,i)=>{try{en=$(),B.debug(`Rendering info diagram
|
|
1246
|
+
`+t);const A=$().securityLevel;let O;A==="sandbox"&&(O=At("#i"+e));const P=At(A==="sandbox"?O.nodes()[0].contentDocument.body:"body"),W=A==="sandbox"?O.nodes()[0].contentDocument:document;i.db.clear(),i.parser.parse(t),B.debug("Parsed info diagram");const q=W.getElementById(e);rn=q.parentElement.offsetWidth,rn===void 0&&(rn=1200),en.useWidth!==void 0&&(rn=en.useWidth),en.pie.useWidth!==void 0&&(rn=en.pie.useWidth);const z=P.select("#"+e);Ei(z,Ga,rn,en.pie.useMaxWidth),q.setAttribute("viewBox","0 0 "+rn+" "+Ga);var n=40,s=18,a=4,o=Math.min(rn,Ga)/2-n,l=z.append("g").attr("transform","translate("+rn/2+","+Ga/2+")"),u=i.db.getSections(),d=0;Object.keys(u).forEach(function(N){d+=u[N]});const H=en.themeVariables;var f=[H.pie1,H.pie2,H.pie3,H.pie4,H.pie5,H.pie6,H.pie7,H.pie8,H.pie9,H.pie10,H.pie11,H.pie12],p=ng().range(f),g=Object.entries(u).map(function(N,M){return{order:M,name:N[0],value:N[1]}}),_=ok().value(function(N){return N.value}).sort(function(N,M){return N.order-M.order}),k=_(g),w=Xh().innerRadius(0).outerRadius(o);l.selectAll("mySlices").data(k).enter().append("path").attr("d",w).attr("fill",function(N){return p(N.data.name)}).attr("class","pieCircle"),l.selectAll("mySlices").data(k).enter().append("text").text(function(N){return(N.data.value/d*100).toFixed(0)+"%"}).attr("transform",function(N){return"translate("+w.centroid(N)+")"}).style("text-anchor","middle").attr("class","slice"),l.append("text").text(i.db.getDiagramTitle()).attr("x",0).attr("y",-(Ga-50)/2).attr("class","pieTitleText");var S=l.selectAll(".legend").data(p.domain()).enter().append("g").attr("class","legend").attr("transform",function(N,M){const C=s+a,v=C*p.domain().length/2,D=12*s,m=M*C-v;return"translate("+D+","+m+")"});S.append("rect").attr("width",s).attr("height",s).style("fill",p).style("stroke",p),S.data(k).append("text").attr("x",s+a).attr("y",s-a).text(function(N){return i.db.getShowData()||en.showData||en.pie.showData?N.data.name+" ["+N.data.value+"]":N.data.name})}catch(A){B.error("Error while rendering info diagram"),B.error(A)}},eP={draw:tP};var M1=function(){var t=function(Ot,Y,U,X){for(U=U||{},X=Ot.length;X--;U[Ot[X]]=Y);return U},e=[1,3],r=[1,5],i=[1,6],n=[1,7],s=[1,8],a=[5,6,8,14,16,18,19,40,41,42,43,44,45,53,71,72],o=[1,22],l=[2,13],u=[1,26],d=[1,27],f=[1,28],p=[1,29],g=[1,30],_=[1,31],k=[1,24],w=[1,32],S=[1,33],A=[1,36],O=[71,72],P=[5,8,14,16,18,19,40,41,42,43,44,45,53,60,62,71,72],W=[1,56],q=[1,57],z=[1,58],H=[1,59],N=[1,60],M=[1,61],C=[1,62],v=[62,63],D=[1,74],m=[1,70],Q=[1,71],b=[1,72],ct=[1,73],Dt=[1,75],vt=[1,79],j=[1,80],ot=[1,77],rt=[1,78],it=[5,8,14,16,18,19,40,41,42,43,44,45,53,71,72],ut={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,openDirective:9,typeDirective:10,closeDirective:11,":":12,argDirective:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,requirementDef:23,elementDef:24,relationshipDef:25,requirementType:26,requirementName:27,STRUCT_START:28,requirementBody:29,ID:30,COLONSEP:31,id:32,TEXT:33,text:34,RISK:35,riskLevel:36,VERIFYMTHD:37,verifyType:38,STRUCT_STOP:39,REQUIREMENT:40,FUNCTIONAL_REQUIREMENT:41,INTERFACE_REQUIREMENT:42,PERFORMANCE_REQUIREMENT:43,PHYSICAL_REQUIREMENT:44,DESIGN_CONSTRAINT:45,LOW_RISK:46,MED_RISK:47,HIGH_RISK:48,VERIFY_ANALYSIS:49,VERIFY_DEMONSTRATION:50,VERIFY_INSPECTION:51,VERIFY_TEST:52,ELEMENT:53,elementName:54,elementBody:55,TYPE:56,type:57,DOCREF:58,ref:59,END_ARROW_L:60,relationship:61,LINE:62,END_ARROW_R:63,CONTAINS:64,COPIES:65,DERIVES:66,SATISFIES:67,VERIFIES:68,REFINES:69,TRACES:70,unqString:71,qString:72,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",12:":",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",28:"STRUCT_START",30:"ID",31:"COLONSEP",33:"TEXT",35:"RISK",37:"VERIFYMTHD",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",56:"TYPE",58:"DOCREF",60:"END_ARROW_L",62:"LINE",63:"END_ARROW_R",64:"CONTAINS",65:"COPIES",66:"DERIVES",67:"SATISFIES",68:"VERIFIES",69:"REFINES",70:"TRACES",71:"unqString",72:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,3],[4,5],[4,2],[4,2],[4,1],[9,1],[10,1],[13,1],[11,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[23,5],[29,5],[29,5],[29,5],[29,5],[29,2],[29,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[36,1],[36,1],[36,1],[38,1],[38,1],[38,1],[38,1],[24,5],[55,5],[55,5],[55,2],[55,1],[25,5],[25,5],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[27,1],[27,1],[32,1],[32,1],[34,1],[34,1],[54,1],[54,1],[57,1],[57,1],[59,1],[59,1]],performAction:function(Y,U,X,F,I,L,J){var T=L.length-1;switch(I){case 6:this.$=L[T].trim(),F.setAccTitle(this.$);break;case 7:case 8:this.$=L[T].trim(),F.setAccDescription(this.$);break;case 9:F.parseDirective("%%{","open_directive");break;case 10:F.parseDirective(L[T],"type_directive");break;case 11:L[T]=L[T].trim().replace(/'/g,'"'),F.parseDirective(L[T],"arg_directive");break;case 12:F.parseDirective("}%%","close_directive","pie");break;case 13:this.$=[];break;case 19:F.addRequirement(L[T-3],L[T-4]);break;case 20:F.setNewReqId(L[T-2]);break;case 21:F.setNewReqText(L[T-2]);break;case 22:F.setNewReqRisk(L[T-2]);break;case 23:F.setNewReqVerifyMethod(L[T-2]);break;case 26:this.$=F.RequirementType.REQUIREMENT;break;case 27:this.$=F.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 28:this.$=F.RequirementType.INTERFACE_REQUIREMENT;break;case 29:this.$=F.RequirementType.PERFORMANCE_REQUIREMENT;break;case 30:this.$=F.RequirementType.PHYSICAL_REQUIREMENT;break;case 31:this.$=F.RequirementType.DESIGN_CONSTRAINT;break;case 32:this.$=F.RiskLevel.LOW_RISK;break;case 33:this.$=F.RiskLevel.MED_RISK;break;case 34:this.$=F.RiskLevel.HIGH_RISK;break;case 35:this.$=F.VerifyType.VERIFY_ANALYSIS;break;case 36:this.$=F.VerifyType.VERIFY_DEMONSTRATION;break;case 37:this.$=F.VerifyType.VERIFY_INSPECTION;break;case 38:this.$=F.VerifyType.VERIFY_TEST;break;case 39:F.addElement(L[T-3]);break;case 40:F.setNewElementType(L[T-2]);break;case 41:F.setNewElementDocRef(L[T-2]);break;case 44:F.addRelationship(L[T-2],L[T],L[T-4]);break;case 45:F.addRelationship(L[T-2],L[T-4],L[T]);break;case 46:this.$=F.Relationships.CONTAINS;break;case 47:this.$=F.Relationships.COPIES;break;case 48:this.$=F.Relationships.DERIVES;break;case 49:this.$=F.Relationships.SATISFIES;break;case 50:this.$=F.Relationships.VERIFIES;break;case 51:this.$=F.Relationships.REFINES;break;case 52:this.$=F.Relationships.TRACES;break}},table:[{3:1,4:2,6:e,9:4,14:r,16:i,18:n,19:s},{1:[3]},{3:10,4:2,5:[1,9],6:e,9:4,14:r,16:i,18:n,19:s},{5:[1,11]},{10:12,20:[1,13]},{15:[1,14]},{17:[1,15]},t(a,[2,8]),{20:[2,9]},{3:16,4:2,6:e,9:4,14:r,16:i,18:n,19:s},{1:[2,2]},{4:21,5:o,7:17,8:l,9:4,14:r,16:i,18:n,19:s,23:18,24:19,25:20,26:23,32:25,40:u,41:d,42:f,43:p,44:g,45:_,53:k,71:w,72:S},{11:34,12:[1,35],22:A},t([12,22],[2,10]),t(a,[2,6]),t(a,[2,7]),{1:[2,1]},{8:[1,37]},{4:21,5:o,7:38,8:l,9:4,14:r,16:i,18:n,19:s,23:18,24:19,25:20,26:23,32:25,40:u,41:d,42:f,43:p,44:g,45:_,53:k,71:w,72:S},{4:21,5:o,7:39,8:l,9:4,14:r,16:i,18:n,19:s,23:18,24:19,25:20,26:23,32:25,40:u,41:d,42:f,43:p,44:g,45:_,53:k,71:w,72:S},{4:21,5:o,7:40,8:l,9:4,14:r,16:i,18:n,19:s,23:18,24:19,25:20,26:23,32:25,40:u,41:d,42:f,43:p,44:g,45:_,53:k,71:w,72:S},{4:21,5:o,7:41,8:l,9:4,14:r,16:i,18:n,19:s,23:18,24:19,25:20,26:23,32:25,40:u,41:d,42:f,43:p,44:g,45:_,53:k,71:w,72:S},{4:21,5:o,7:42,8:l,9:4,14:r,16:i,18:n,19:s,23:18,24:19,25:20,26:23,32:25,40:u,41:d,42:f,43:p,44:g,45:_,53:k,71:w,72:S},{27:43,71:[1,44],72:[1,45]},{54:46,71:[1,47],72:[1,48]},{60:[1,49],62:[1,50]},t(O,[2,26]),t(O,[2,27]),t(O,[2,28]),t(O,[2,29]),t(O,[2,30]),t(O,[2,31]),t(P,[2,55]),t(P,[2,56]),t(a,[2,4]),{13:51,21:[1,52]},t(a,[2,12]),{1:[2,3]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{8:[2,17]},{8:[2,18]},{28:[1,53]},{28:[2,53]},{28:[2,54]},{28:[1,54]},{28:[2,59]},{28:[2,60]},{61:55,64:W,65:q,66:z,67:H,68:N,69:M,70:C},{61:63,64:W,65:q,66:z,67:H,68:N,69:M,70:C},{11:64,22:A},{22:[2,11]},{5:[1,65]},{5:[1,66]},{62:[1,67]},t(v,[2,46]),t(v,[2,47]),t(v,[2,48]),t(v,[2,49]),t(v,[2,50]),t(v,[2,51]),t(v,[2,52]),{63:[1,68]},t(a,[2,5]),{5:D,29:69,30:m,33:Q,35:b,37:ct,39:Dt},{5:vt,39:j,55:76,56:ot,58:rt},{32:81,71:w,72:S},{32:82,71:w,72:S},t(it,[2,19]),{31:[1,83]},{31:[1,84]},{31:[1,85]},{31:[1,86]},{5:D,29:87,30:m,33:Q,35:b,37:ct,39:Dt},t(it,[2,25]),t(it,[2,39]),{31:[1,88]},{31:[1,89]},{5:vt,39:j,55:90,56:ot,58:rt},t(it,[2,43]),t(it,[2,44]),t(it,[2,45]),{32:91,71:w,72:S},{34:92,71:[1,93],72:[1,94]},{36:95,46:[1,96],47:[1,97],48:[1,98]},{38:99,49:[1,100],50:[1,101],51:[1,102],52:[1,103]},t(it,[2,24]),{57:104,71:[1,105],72:[1,106]},{59:107,71:[1,108],72:[1,109]},t(it,[2,42]),{5:[1,110]},{5:[1,111]},{5:[2,57]},{5:[2,58]},{5:[1,112]},{5:[2,32]},{5:[2,33]},{5:[2,34]},{5:[1,113]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[2,38]},{5:[1,114]},{5:[2,61]},{5:[2,62]},{5:[1,115]},{5:[2,63]},{5:[2,64]},{5:D,29:116,30:m,33:Q,35:b,37:ct,39:Dt},{5:D,29:117,30:m,33:Q,35:b,37:ct,39:Dt},{5:D,29:118,30:m,33:Q,35:b,37:ct,39:Dt},{5:D,29:119,30:m,33:Q,35:b,37:ct,39:Dt},{5:vt,39:j,55:120,56:ot,58:rt},{5:vt,39:j,55:121,56:ot,58:rt},t(it,[2,20]),t(it,[2,21]),t(it,[2,22]),t(it,[2,23]),t(it,[2,40]),t(it,[2,41])],defaultActions:{8:[2,9],10:[2,2],16:[2,1],37:[2,3],38:[2,14],39:[2,15],40:[2,16],41:[2,17],42:[2,18],44:[2,53],45:[2,54],47:[2,59],48:[2,60],52:[2,11],93:[2,57],94:[2,58],96:[2,32],97:[2,33],98:[2,34],100:[2,35],101:[2,36],102:[2,37],103:[2,38],105:[2,61],106:[2,62],108:[2,63],109:[2,64]},parseError:function(Y,U){if(U.recoverable)this.trace(Y);else{var X=new Error(Y);throw X.hash=U,X}},parse:function(Y){var U=this,X=[0],F=[],I=[null],L=[],J=this.table,T="",ht=0,V=0,Yt=2,et=1,Mt=L.slice.call(arguments,1),Tt=Object.create(this.lexer),gt={yy:{}};for(var Et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Et)&&(gt.yy[Et]=this.yy[Et]);Tt.setInput(Y,gt.yy),gt.yy.lexer=Tt,gt.yy.parser=this,typeof Tt.yylloc>"u"&&(Tt.yylloc={});var wt=Tt.yylloc;L.push(wt);var pt=Tt.options&&Tt.options.ranges;typeof gt.yy.parseError=="function"?this.parseError=gt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function st(){var ft;return ft=F.pop()||Tt.lex()||et,typeof ft!="number"&&(ft instanceof Array&&(F=ft,ft=F.pop()),ft=U.symbols_[ft]||ft),ft}for(var le,Xt,jt,Kt,Gt={},Ee,Ht,Vt,Ft;;){if(Xt=X[X.length-1],this.defaultActions[Xt]?jt=this.defaultActions[Xt]:((le===null||typeof le>"u")&&(le=st()),jt=J[Xt]&&J[Xt][le]),typeof jt>"u"||!jt.length||!jt[0]){var xt="";Ft=[];for(Ee in J[Xt])this.terminals_[Ee]&&Ee>Yt&&Ft.push("'"+this.terminals_[Ee]+"'");Tt.showPosition?xt="Parse error on line "+(ht+1)+`:
|
|
1247
1247
|
`+Tt.showPosition()+`
|
|
1248
1248
|
Expecting `+Ft.join(", ")+", got '"+(this.terminals_[le]||le)+"'":xt="Parse error on line "+(ht+1)+": Unexpected "+(le==et?"end of input":"'"+(this.terminals_[le]||le)+"'"),this.parseError(xt,{text:Tt.match,token:this.terminals_[le]||le,line:Tt.yylineno,loc:wt,expected:Ft})}if(jt[0]instanceof Array&&jt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Xt+", token: "+le);switch(jt[0]){case 1:X.push(le),I.push(Tt.yytext),L.push(Tt.yylloc),X.push(jt[1]),le=null,V=Tt.yyleng,T=Tt.yytext,ht=Tt.yylineno,wt=Tt.yylloc;break;case 2:if(Ht=this.productions_[jt[1]][1],Gt.$=I[I.length-Ht],Gt._$={first_line:L[L.length-(Ht||1)].first_line,last_line:L[L.length-1].last_line,first_column:L[L.length-(Ht||1)].first_column,last_column:L[L.length-1].last_column},pt&&(Gt._$.range=[L[L.length-(Ht||1)].range[0],L[L.length-1].range[1]]),Kt=this.performAction.apply(Gt,[T,V,ht,gt.yy,jt[1],I,L].concat(Mt)),typeof Kt<"u")return Kt;Ht&&(X=X.slice(0,-1*Ht*2),I=I.slice(0,-1*Ht),L=L.slice(0,-1*Ht)),X.push(this.productions_[jt[1]][0]),I.push(Gt.$),L.push(Gt._$),Vt=J[X[X.length-2]][X[X.length-1]],X.push(Vt);break;case 3:return!0}}return!0}},bt=function(){var Ot={EOF:1,parseError:function(U,X){if(this.yy.parser)this.yy.parser.parseError(U,X);else throw new Error(U)},setInput:function(Y,U){return this.yy=U||this.yy||{},this._input=Y,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var Y=this._input[0];this.yytext+=Y,this.yyleng++,this.offset++,this.match+=Y,this.matched+=Y;var U=Y.match(/(?:\r\n?|\n).*/g);return U?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Y},unput:function(Y){var U=Y.length,X=Y.split(/(?:\r\n?|\n)/g);this._input=Y+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-U),this.offset-=U;var F=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),X.length-1&&(this.yylineno-=X.length-1);var I=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:X?(X.length===F.length?this.yylloc.first_column:0)+F[F.length-X.length].length-X[0].length:this.yylloc.first_column-U},this.options.ranges&&(this.yylloc.range=[I[0],I[0]+this.yyleng-U]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
1249
1249
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(Y){this.unput(this.match.slice(Y))},pastInput:function(){var Y=this.matched.substr(0,this.matched.length-this.match.length);return(Y.length>20?"...":"")+Y.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var Y=this.match;return Y.length<20&&(Y+=this._input.substr(0,20-Y.length)),(Y.substr(0,20)+(Y.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var Y=this.pastInput(),U=new Array(Y.length+1).join("-");return Y+this.upcomingInput()+`
|
|
1250
1250
|
`+U+"^"},test_match:function(Y,U){var X,F,I;if(this.options.backtrack_lexer&&(I={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(I.yylloc.range=this.yylloc.range.slice(0))),F=Y[0].match(/(?:\r\n?|\n).*/g),F&&(this.yylineno+=F.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:F?F[F.length-1].length-F[F.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Y[0].length},this.yytext+=Y[0],this.match+=Y[0],this.matches=Y,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Y[0].length),this.matched+=Y[0],X=this.performAction.call(this,this.yy,this,U,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),X)return X;if(this._backtrack){for(var L in I)this[L]=I[L];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Y,U,X,F;this._more||(this.yytext="",this.match="");for(var I=this._currentRules(),L=0;L<I.length;L++)if(X=this._input.match(this.rules[I[L]]),X&&(!U||X[0].length>U[0].length)){if(U=X,F=L,this.options.backtrack_lexer){if(Y=this.test_match(X,I[L]),Y!==!1)return Y;if(this._backtrack){U=!1;continue}else return!1}else if(!this.options.flex)break}return U?(Y=this.test_match(U,I[F]),Y!==!1?Y:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1251
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var U=this.next();return U||this.lex()},begin:function(U){this.conditionStack.push(U)},popState:function(){var U=this.conditionStack.length-1;return U>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(U){return U=this.conditionStack.length-1-Math.abs(U||0),U>=0?this.conditionStack[U]:"INITIAL"},pushState:function(U){this.begin(U)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(U,X,F,I){switch(F){case 0:return this.begin("open_directive"),19;case 1:return this.begin("type_directive"),20;case 2:return this.popState(),this.begin("arg_directive"),12;case 3:return this.popState(),this.popState(),22;case 4:return 21;case 5:return"title";case 6:return this.begin("acc_title"),14;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),16;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 5;case 14:break;case 15:break;case 16:break;case 17:return 8;case 18:return 6;case 19:return 28;case 20:return 39;case 21:return 31;case 22:return 30;case 23:return 33;case 24:return 35;case 25:return 37;case 26:return 40;case 27:return 41;case 28:return 42;case 29:return 43;case 30:return 44;case 31:return 45;case 32:return 46;case 33:return 47;case 34:return 48;case 35:return 49;case 36:return 50;case 37:return 51;case 38:return 52;case 39:return 53;case 40:return 64;case 41:return 65;case 42:return 66;case 43:return 67;case 44:return 68;case 45:return 69;case 46:return 70;case 47:return 56;case 48:return 58;case 49:return 60;case 50:return 63;case 51:return 62;case 52:this.begin("string");break;case 53:this.popState();break;case 54:return"qString";case 55:return X.yytext=X.yytext.trim(),71}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\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,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[53,54],inclusive:!1},INITIAL:{rules:[0,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,55],inclusive:!0}}};return Ot}();ut.lexer=bt;function K(){this.yy={}}return K.prototype=ut,ut.Parser=K,new K}();
|
|
1251
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var U=this.next();return U||this.lex()},begin:function(U){this.conditionStack.push(U)},popState:function(){var U=this.conditionStack.length-1;return U>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(U){return U=this.conditionStack.length-1-Math.abs(U||0),U>=0?this.conditionStack[U]:"INITIAL"},pushState:function(U){this.begin(U)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(U,X,F,I){switch(F){case 0:return this.begin("open_directive"),19;case 1:return this.begin("type_directive"),20;case 2:return this.popState(),this.begin("arg_directive"),12;case 3:return this.popState(),this.popState(),22;case 4:return 21;case 5:return"title";case 6:return this.begin("acc_title"),14;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),16;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 5;case 14:break;case 15:break;case 16:break;case 17:return 8;case 18:return 6;case 19:return 28;case 20:return 39;case 21:return 31;case 22:return 30;case 23:return 33;case 24:return 35;case 25:return 37;case 26:return 40;case 27:return 41;case 28:return 42;case 29:return 43;case 30:return 44;case 31:return 45;case 32:return 46;case 33:return 47;case 34:return 48;case 35:return 49;case 36:return 50;case 37:return 51;case 38:return 52;case 39:return 53;case 40:return 64;case 41:return 65;case 42:return 66;case 43:return 67;case 44:return 68;case 45:return 69;case 46:return 70;case 47:return 56;case 48:return 58;case 49:return 60;case 50:return 63;case 51:return 62;case 52:this.begin("string");break;case 53:this.popState();break;case 54:return"qString";case 55:return X.yytext=X.yytext.trim(),71}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\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,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[53,54],inclusive:!1},INITIAL:{rules:[0,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,55],inclusive:!0}}};return Ot}();ut.lexer=bt;function K(){this.yy={}}return K.prototype=ut,ut.Parser=K,new K}();M1.parser=M1;const rP=M1,iP=t=>t.match(/^\s*requirement(Diagram)?/)!==null;let sd=[],Vr={},lo={},Hn={},co={};const nP={REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},sP={LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},aP={VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},oP={CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},lP=function(t,e,r){ze.parseDirective(this,t,e,r)},cP=(t,e)=>(lo[t]===void 0&&(lo[t]={name:t,type:e,id:Vr.id,text:Vr.text,risk:Vr.risk,verifyMethod:Vr.verifyMethod}),Vr={},lo[t]),uP=()=>lo,hP=t=>{Vr!==void 0&&(Vr.id=t)},dP=t=>{Vr!==void 0&&(Vr.text=t)},fP=t=>{Vr!==void 0&&(Vr.risk=t)},pP=t=>{Vr!==void 0&&(Vr.verifyMethod=t)},gP=t=>(co[t]===void 0&&(co[t]={name:t,type:Hn.type,docRef:Hn.docRef},B.info("Added new requirement: ",t)),Hn={},co[t]),yP=()=>co,mP=t=>{Hn!==void 0&&(Hn.type=t)},bP=t=>{Hn!==void 0&&(Hn.docRef=t)},_P=(t,e,r)=>{sd.push({type:t,src:e,dst:r})},xP=()=>sd,vP=()=>{sd=[],Vr={},lo={},Hn={},co={},Ci()},kP={RequirementType:nP,RiskLevel:sP,VerifyType:aP,Relationships:oP,parseDirective:lP,getConfig:()=>$().req,addRequirement:cP,getRequirements:uP,setNewReqId:hP,setNewReqText:dP,setNewReqRisk:fP,setNewReqVerifyMethod:pP,setAccTitle:ii,getAccTitle:Si,setAccDescription:Ai,getAccDescription:Li,addElement:gP,getElements:yP,setNewElementType:mP,setNewElementDocRef:bP,addRelationship:_P,getRelationships:xP,clear:vP},N1={CONTAINS:"contains",ARROW:"arrow"},wP=(t,e)=>{let r=t.append("defs").append("marker").attr("id",N1.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");r.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),r.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),r.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",N1.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d",`M0,0
|
|
1252
1252
|
L${e.line_height},${e.line_height/2}
|
|
1253
1253
|
M${e.line_height},${e.line_height/2}
|
|
1254
|
-
L0,${e.line_height}`).attr("stroke-width",1)},R3={ReqMarkers:M1,insertLineEndings:wP};let je={},J2=0;const F3=(t,e)=>t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",je.rect_min_width+"px").attr("height",je.rect_min_height+"px"),P3=(t,e,r)=>{let i=je.rect_min_width/2,n=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",i).attr("y",je.rect_padding).attr("dominant-baseline","hanging"),s=0;r.forEach(u=>{s==0?n.append("tspan").attr("text-anchor","middle").attr("x",je.rect_min_width/2).attr("dy",0).text(u):n.append("tspan").attr("text-anchor","middle").attr("x",je.rect_min_width/2).attr("dy",je.line_height*.75).text(u),s++});let a=1.5*je.rect_padding,o=s*je.line_height*.75,l=a+o;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",je.rect_min_width).attr("y1",l).attr("y2",l),{titleNode:n,y:l}},Y3=(t,e,r,i)=>{let n=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",je.rect_padding).attr("y",i).attr("dominant-baseline","hanging"),s=0;const a=30;let o=[];return r.forEach(l=>{let u=l.length;for(;u>a&&s<3;){let d=l.substring(0,a);l=l.substring(a,l.length),u=l.length,o[o.length]=d,s++}if(s==3){let d=o[o.length-1];o[o.length-1]=d.substring(0,d.length-4)+"..."}else o[o.length]=l;s=0}),o.forEach(l=>{n.append("tspan").attr("x",je.rect_padding).attr("dy",je.line_height).text(l)}),n},TP=(t,e,r,i)=>{const n=e.node().getTotalLength(),s=e.node().getPointAtLength(n*.5),a="rel"+J2;J2++;const l=t.append("text").attr("class","req relationshipLabel").attr("id",a).attr("x",s.x).attr("y",s.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(i).node().getBBox();t.insert("rect","#"+a).attr("class","req reqLabelBox").attr("x",s.x-l.width/2).attr("y",s.y-l.height/2).attr("width",l.width).attr("height",l.height).attr("fill","white").attr("fill-opacity","85%")},EP=function(t,e,r,i,n){const s=r.edge(xa(e.src),xa(e.dst)),a=Ca().x(function(l){return l.x}).y(function(l){return l.y}),o=t.insert("path","#"+i).attr("class","er relationshipLine").attr("d",a(s.points)).attr("fill","none");e.type==n.db.Relationships.CONTAINS?o.attr("marker-start","url("+he.getUrl(je.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(o.attr("stroke-dasharray","10,7"),o.attr("marker-end","url("+he.getUrl(je.arrowMarkerAbsolute)+"#"+R3.ReqMarkers.ARROW+"_line_ending)")),TP(t,o,je,`<<${e.type}>>`)},CP=(t,e,r)=>{Object.keys(t).forEach(i=>{let n=t[i];i=xa(i),B.info("Added new requirement: ",i);const s=r.append("g").attr("id",i),a="req-"+i,o=F3(s,a);let l=P3(s,i+"_title",[`<<${n.type}>>`,`${n.name}`]);Y3(s,i+"_body",[`Id: ${n.id}`,`Text: ${n.text}`,`Risk: ${n.risk}`,`Verification: ${n.verifyMethod}`],l.y);const u=o.node().getBBox();e.setNode(i,{width:u.width,height:u.height,shape:"rect",id:i})})},SP=(t,e,r)=>{Object.keys(t).forEach(i=>{let n=t[i];const s=xa(i),a=r.append("g").attr("id",s),o="element-"+s,l=F3(a,o);let u=P3(a,o+"_title",["<<Element>>",`${i}`]);Y3(a,o+"_body",[`Type: ${n.type||"Not Specified"}`,`Doc Ref: ${n.docRef||"None"}`],u.y);const d=l.node().getBBox();e.setNode(s,{width:d.width,height:d.height,shape:"rect",id:s})})},AP=(t,e)=>(t.forEach(function(r){let i=xa(r.src),n=xa(r.dst);e.setEdge(i,n,{relationship:r})}),t),LP=function(t,e){e.nodes().forEach(function(r){r!==void 0&&e.node(r)!==void 0&&(t.select("#"+r),t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )"))})},xa=t=>t.replace(/\s/g,"").replace(/\./g,"_"),DP=(t,e,r,i)=>{je=$().requirement,i.db.clear(),i.parser.parse(t);const n=je.securityLevel;let s;n==="sandbox"&&(s=At("#i"+e));const o=At(n==="sandbox"?s.nodes()[0].contentDocument.body:"body").select(`[id='${e}']`);R3.insertLineEndings(o,je);const l=new or({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:je.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});let u=i.db.getRequirements(),d=i.db.getElements(),f=i.db.getRelationships();CP(u,l,o),SP(d,l,o),AP(f,l),Ma(l),LP(o,l),f.forEach(function(w){EP(o,w,l,e,i)});const p=je.rect_padding,g=o.node().getBBox(),_=g.width+p*2,k=g.height+p*2;Ei(o,k,_,je.useMaxWidth),o.attr("viewBox",`${g.x-p} ${g.y-p} ${_} ${k}`)},MP={draw:DP};var N1=function(){var t=function(Ot,Y,U,X){for(U=U||{},X=Ot.length;X--;U[Ot[X]]=Y);return U},e=[1,2],r=[1,3],i=[1,5],n=[1,7],s=[2,5],a=[1,15],o=[1,17],l=[1,18],u=[1,19],d=[1,21],f=[1,22],p=[1,23],g=[1,29],_=[1,30],k=[1,31],w=[1,32],S=[1,33],A=[1,34],O=[1,35],P=[1,36],W=[1,37],q=[1,38],z=[1,39],H=[1,40],N=[1,43],M=[1,44],C=[1,45],v=[1,46],D=[1,47],m=[1,48],Q=[1,51],b=[1,4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,50,51,52,53,58,59,60,61,69,79],ct=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,53,58,59,60,61,69,79],Dt=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,52,53,58,59,60,61,69,79],vt=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,51,53,58,59,60,61,69,79],j=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,50,53,58,59,60,61,69,79],ot=[67,68,69],rt=[1,121],it=[1,4,5,7,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,50,51,52,53,58,59,60,61,69,79],ut={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,openDirective:11,typeDirective:12,closeDirective:13,":":14,argDirective:15,participant:16,actor:17,AS:18,restOfLine:19,participant_actor:20,signal:21,autonumber:22,NUM:23,off:24,activate:25,deactivate:26,note_statement:27,links_statement:28,link_statement:29,properties_statement:30,details_statement:31,title:32,legacy_title:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,loop:39,end:40,rect:41,opt:42,alt:43,else_sections:44,par:45,par_sections:46,critical:47,option_sections:48,break:49,option:50,and:51,else:52,note:53,placement:54,text2:55,over:56,actor_pair:57,links:58,link:59,properties:60,details:61,spaceList:62,",":63,left_of:64,right_of:65,signaltype:66,"+":67,"-":68,ACTOR:69,SOLID_OPEN_ARROW:70,DOTTED_OPEN_ARROW:71,SOLID_ARROW:72,DOTTED_ARROW:73,SOLID_CROSS:74,DOTTED_CROSS:75,SOLID_POINT:76,DOTTED_POINT:77,TXT:78,open_directive:79,type_directive:80,arg_directive:81,close_directive:82,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",14:":",16:"participant",18:"AS",19:"restOfLine",20:"participant_actor",22:"autonumber",23:"NUM",24:"off",25:"activate",26:"deactivate",32:"title",33:"legacy_title",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",39:"loop",40:"end",41:"rect",42:"opt",43:"alt",45:"par",47:"critical",49:"break",50:"option",51:"and",52:"else",53:"note",56:"over",58:"links",59:"link",60:"properties",61:"details",63:",",64:"left_of",65:"right_of",67:"+",68:"-",69:"ACTOR",70:"SOLID_OPEN_ARROW",71:"DOTTED_OPEN_ARROW",72:"SOLID_ARROW",73:"DOTTED_ARROW",74:"SOLID_CROSS",75:"DOTTED_CROSS",76:"SOLID_POINT",77:"DOTTED_POINT",78:"TXT",79:"open_directive",80:"type_directive",81:"arg_directive",82:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[6,4],[6,6],[10,5],[10,3],[10,5],[10,3],[10,2],[10,4],[10,3],[10,3],[10,2],[10,3],[10,3],[10,2],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,2],[10,2],[10,1],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[48,1],[48,4],[46,1],[46,4],[44,1],[44,4],[27,4],[27,4],[28,3],[29,3],[30,3],[31,3],[62,2],[62,1],[57,3],[57,1],[54,1],[54,1],[21,5],[21,5],[21,4],[17,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[55,1],[11,1],[12,1],[15,1],[13,1]],performAction:function(Y,U,X,F,I,L,J){var T=L.length-1;switch(I){case 4:return F.apply(L[T]),L[T];case 5:this.$=[];break;case 6:L[T-1].push(L[T]),this.$=L[T-1];break;case 7:case 8:this.$=L[T];break;case 9:this.$=[];break;case 12:L[T-3].type="addParticipant",L[T-3].description=F.parseMessage(L[T-1]),this.$=L[T-3];break;case 13:L[T-1].type="addParticipant",this.$=L[T-1];break;case 14:L[T-3].type="addActor",L[T-3].description=F.parseMessage(L[T-1]),this.$=L[T-3];break;case 15:L[T-1].type="addActor",this.$=L[T-1];break;case 17:this.$={type:"sequenceIndex",sequenceIndex:Number(L[T-2]),sequenceIndexStep:Number(L[T-1]),sequenceVisible:!0,signalType:F.LINETYPE.AUTONUMBER};break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(L[T-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:F.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:F.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:F.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"activeStart",signalType:F.LINETYPE.ACTIVE_START,actor:L[T-1]};break;case 22:this.$={type:"activeEnd",signalType:F.LINETYPE.ACTIVE_END,actor:L[T-1]};break;case 28:F.setDiagramTitle(L[T].substring(6)),this.$=L[T].substring(6);break;case 29:F.setDiagramTitle(L[T].substring(7)),this.$=L[T].substring(7);break;case 30:this.$=L[T].trim(),F.setAccTitle(this.$);break;case 31:case 32:this.$=L[T].trim(),F.setAccDescription(this.$);break;case 33:L[T-1].unshift({type:"loopStart",loopText:F.parseMessage(L[T-2]),signalType:F.LINETYPE.LOOP_START}),L[T-1].push({type:"loopEnd",loopText:L[T-2],signalType:F.LINETYPE.LOOP_END}),this.$=L[T-1];break;case 34:L[T-1].unshift({type:"rectStart",color:F.parseMessage(L[T-2]),signalType:F.LINETYPE.RECT_START}),L[T-1].push({type:"rectEnd",color:F.parseMessage(L[T-2]),signalType:F.LINETYPE.RECT_END}),this.$=L[T-1];break;case 35:L[T-1].unshift({type:"optStart",optText:F.parseMessage(L[T-2]),signalType:F.LINETYPE.OPT_START}),L[T-1].push({type:"optEnd",optText:F.parseMessage(L[T-2]),signalType:F.LINETYPE.OPT_END}),this.$=L[T-1];break;case 36:L[T-1].unshift({type:"altStart",altText:F.parseMessage(L[T-2]),signalType:F.LINETYPE.ALT_START}),L[T-1].push({type:"altEnd",signalType:F.LINETYPE.ALT_END}),this.$=L[T-1];break;case 37:L[T-1].unshift({type:"parStart",parText:F.parseMessage(L[T-2]),signalType:F.LINETYPE.PAR_START}),L[T-1].push({type:"parEnd",signalType:F.LINETYPE.PAR_END}),this.$=L[T-1];break;case 38:L[T-1].unshift({type:"criticalStart",criticalText:F.parseMessage(L[T-2]),signalType:F.LINETYPE.CRITICAL_START}),L[T-1].push({type:"criticalEnd",signalType:F.LINETYPE.CRITICAL_END}),this.$=L[T-1];break;case 39:L[T-1].unshift({type:"breakStart",breakText:F.parseMessage(L[T-2]),signalType:F.LINETYPE.BREAK_START}),L[T-1].push({type:"breakEnd",optText:F.parseMessage(L[T-2]),signalType:F.LINETYPE.BREAK_END}),this.$=L[T-1];break;case 42:this.$=L[T-3].concat([{type:"option",optionText:F.parseMessage(L[T-1]),signalType:F.LINETYPE.CRITICAL_OPTION},L[T]]);break;case 44:this.$=L[T-3].concat([{type:"and",parText:F.parseMessage(L[T-1]),signalType:F.LINETYPE.PAR_AND},L[T]]);break;case 46:this.$=L[T-3].concat([{type:"else",altText:F.parseMessage(L[T-1]),signalType:F.LINETYPE.ALT_ELSE},L[T]]);break;case 47:this.$=[L[T-1],{type:"addNote",placement:L[T-2],actor:L[T-1].actor,text:L[T]}];break;case 48:L[T-2]=[].concat(L[T-1],L[T-1]).slice(0,2),L[T-2][0]=L[T-2][0].actor,L[T-2][1]=L[T-2][1].actor,this.$=[L[T-1],{type:"addNote",placement:F.PLACEMENT.OVER,actor:L[T-2].slice(0,2),text:L[T]}];break;case 49:this.$=[L[T-1],{type:"addLinks",actor:L[T-1].actor,text:L[T]}];break;case 50:this.$=[L[T-1],{type:"addALink",actor:L[T-1].actor,text:L[T]}];break;case 51:this.$=[L[T-1],{type:"addProperties",actor:L[T-1].actor,text:L[T]}];break;case 52:this.$=[L[T-1],{type:"addDetails",actor:L[T-1].actor,text:L[T]}];break;case 55:this.$=[L[T-2],L[T]];break;case 56:this.$=L[T];break;case 57:this.$=F.PLACEMENT.LEFTOF;break;case 58:this.$=F.PLACEMENT.RIGHTOF;break;case 59:this.$=[L[T-4],L[T-1],{type:"addMessage",from:L[T-4].actor,to:L[T-1].actor,signalType:L[T-3],msg:L[T]},{type:"activeStart",signalType:F.LINETYPE.ACTIVE_START,actor:L[T-1]}];break;case 60:this.$=[L[T-4],L[T-1],{type:"addMessage",from:L[T-4].actor,to:L[T-1].actor,signalType:L[T-3],msg:L[T]},{type:"activeEnd",signalType:F.LINETYPE.ACTIVE_END,actor:L[T-4]}];break;case 61:this.$=[L[T-3],L[T-1],{type:"addMessage",from:L[T-3].actor,to:L[T-1].actor,signalType:L[T-2],msg:L[T]}];break;case 62:this.$={type:"addParticipant",actor:L[T]};break;case 63:this.$=F.LINETYPE.SOLID_OPEN;break;case 64:this.$=F.LINETYPE.DOTTED_OPEN;break;case 65:this.$=F.LINETYPE.SOLID;break;case 66:this.$=F.LINETYPE.DOTTED;break;case 67:this.$=F.LINETYPE.SOLID_CROSS;break;case 68:this.$=F.LINETYPE.DOTTED_CROSS;break;case 69:this.$=F.LINETYPE.SOLID_POINT;break;case 70:this.$=F.LINETYPE.DOTTED_POINT;break;case 71:this.$=F.parseMessage(L[T].trim().substring(1));break;case 72:F.parseDirective("%%{","open_directive");break;case 73:F.parseDirective(L[T],"type_directive");break;case 74:L[T]=L[T].trim().replace(/'/g,'"'),F.parseDirective(L[T],"arg_directive");break;case 75:F.parseDirective("}%%","close_directive","sequence");break}},table:[{3:1,4:e,5:r,6:4,7:i,11:6,79:n},{1:[3]},{3:8,4:e,5:r,6:4,7:i,11:6,79:n},{3:9,4:e,5:r,6:4,7:i,11:6,79:n},{3:10,4:e,5:r,6:4,7:i,11:6,79:n},t([1,4,5,16,20,22,25,26,32,33,34,36,38,39,41,42,43,45,47,49,53,58,59,60,61,69,79],s,{8:11}),{12:12,80:[1,13]},{80:[2,72]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:_,34:k,36:w,38:S,39:A,41:O,42:P,43:W,45:q,47:z,49:H,53:N,58:M,59:C,60:v,61:D,69:m,79:n},{13:49,14:[1,50],82:Q},t([14,82],[2,73]),t(b,[2,6]),{6:41,10:52,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:_,34:k,36:w,38:S,39:A,41:O,42:P,43:W,45:q,47:z,49:H,53:N,58:M,59:C,60:v,61:D,69:m,79:n},t(b,[2,8]),t(b,[2,9]),{17:53,69:m},{17:54,69:m},{5:[1,55]},{5:[1,58],23:[1,56],24:[1,57]},{17:59,69:m},{17:60,69:m},{5:[1,61]},{5:[1,62]},{5:[1,63]},{5:[1,64]},{5:[1,65]},t(b,[2,28]),t(b,[2,29]),{35:[1,66]},{37:[1,67]},t(b,[2,32]),{19:[1,68]},{19:[1,69]},{19:[1,70]},{19:[1,71]},{19:[1,72]},{19:[1,73]},{19:[1,74]},t(b,[2,40]),{66:75,70:[1,76],71:[1,77],72:[1,78],73:[1,79],74:[1,80],75:[1,81],76:[1,82],77:[1,83]},{54:84,56:[1,85],64:[1,86],65:[1,87]},{17:88,69:m},{17:89,69:m},{17:90,69:m},{17:91,69:m},t([5,18,63,70,71,72,73,74,75,76,77,78],[2,62]),{5:[1,92]},{15:93,81:[1,94]},{5:[2,75]},t(b,[2,7]),{5:[1,96],18:[1,95]},{5:[1,98],18:[1,97]},t(b,[2,16]),{5:[1,100],23:[1,99]},{5:[1,101]},t(b,[2,20]),{5:[1,102]},{5:[1,103]},t(b,[2,23]),t(b,[2,24]),t(b,[2,25]),t(b,[2,26]),t(b,[2,27]),t(b,[2,30]),t(b,[2,31]),t(ct,s,{8:104}),t(ct,s,{8:105}),t(ct,s,{8:106}),t(Dt,s,{44:107,8:108}),t(vt,s,{46:109,8:110}),t(j,s,{48:111,8:112}),t(ct,s,{8:113}),{17:116,67:[1,114],68:[1,115],69:m},t(ot,[2,63]),t(ot,[2,64]),t(ot,[2,65]),t(ot,[2,66]),t(ot,[2,67]),t(ot,[2,68]),t(ot,[2,69]),t(ot,[2,70]),{17:117,69:m},{17:119,57:118,69:m},{69:[2,57]},{69:[2,58]},{55:120,78:rt},{55:122,78:rt},{55:123,78:rt},{55:124,78:rt},t(it,[2,10]),{13:125,82:Q},{82:[2,74]},{19:[1,126]},t(b,[2,13]),{19:[1,127]},t(b,[2,15]),{5:[1,128]},t(b,[2,18]),t(b,[2,19]),t(b,[2,21]),t(b,[2,22]),{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:_,34:k,36:w,38:S,39:A,40:[1,129],41:O,42:P,43:W,45:q,47:z,49:H,53:N,58:M,59:C,60:v,61:D,69:m,79:n},{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:_,34:k,36:w,38:S,39:A,40:[1,130],41:O,42:P,43:W,45:q,47:z,49:H,53:N,58:M,59:C,60:v,61:D,69:m,79:n},{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:_,34:k,36:w,38:S,39:A,40:[1,131],41:O,42:P,43:W,45:q,47:z,49:H,53:N,58:M,59:C,60:v,61:D,69:m,79:n},{40:[1,132]},{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:_,34:k,36:w,38:S,39:A,40:[2,45],41:O,42:P,43:W,45:q,47:z,49:H,52:[1,133],53:N,58:M,59:C,60:v,61:D,69:m,79:n},{40:[1,134]},{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:_,34:k,36:w,38:S,39:A,40:[2,43],41:O,42:P,43:W,45:q,47:z,49:H,51:[1,135],53:N,58:M,59:C,60:v,61:D,69:m,79:n},{40:[1,136]},{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:_,34:k,36:w,38:S,39:A,40:[2,41],41:O,42:P,43:W,45:q,47:z,49:H,50:[1,137],53:N,58:M,59:C,60:v,61:D,69:m,79:n},{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:_,34:k,36:w,38:S,39:A,40:[1,138],41:O,42:P,43:W,45:q,47:z,49:H,53:N,58:M,59:C,60:v,61:D,69:m,79:n},{17:139,69:m},{17:140,69:m},{55:141,78:rt},{55:142,78:rt},{55:143,78:rt},{63:[1,144],78:[2,56]},{5:[2,49]},{5:[2,71]},{5:[2,50]},{5:[2,51]},{5:[2,52]},{5:[1,145]},{5:[1,146]},{5:[1,147]},t(b,[2,17]),t(b,[2,33]),t(b,[2,34]),t(b,[2,35]),t(b,[2,36]),{19:[1,148]},t(b,[2,37]),{19:[1,149]},t(b,[2,38]),{19:[1,150]},t(b,[2,39]),{55:151,78:rt},{55:152,78:rt},{5:[2,61]},{5:[2,47]},{5:[2,48]},{17:153,69:m},t(it,[2,11]),t(b,[2,12]),t(b,[2,14]),t(Dt,s,{8:108,44:154}),t(vt,s,{8:110,46:155}),t(j,s,{8:112,48:156}),{5:[2,59]},{5:[2,60]},{78:[2,55]},{40:[2,46]},{40:[2,44]},{40:[2,42]}],defaultActions:{7:[2,72],8:[2,1],9:[2,2],10:[2,3],51:[2,75],86:[2,57],87:[2,58],94:[2,74],120:[2,49],121:[2,71],122:[2,50],123:[2,51],124:[2,52],141:[2,61],142:[2,47],143:[2,48],151:[2,59],152:[2,60],153:[2,55],154:[2,46],155:[2,44],156:[2,42]},parseError:function(Y,U){if(U.recoverable)this.trace(Y);else{var X=new Error(Y);throw X.hash=U,X}},parse:function(Y){var U=this,X=[0],F=[],I=[null],L=[],J=this.table,T="",ht=0,V=0,Yt=2,et=1,Mt=L.slice.call(arguments,1),Tt=Object.create(this.lexer),gt={yy:{}};for(var Et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Et)&&(gt.yy[Et]=this.yy[Et]);Tt.setInput(Y,gt.yy),gt.yy.lexer=Tt,gt.yy.parser=this,typeof Tt.yylloc>"u"&&(Tt.yylloc={});var wt=Tt.yylloc;L.push(wt);var pt=Tt.options&&Tt.options.ranges;typeof gt.yy.parseError=="function"?this.parseError=gt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function st(){var ft;return ft=F.pop()||Tt.lex()||et,typeof ft!="number"&&(ft instanceof Array&&(F=ft,ft=F.pop()),ft=U.symbols_[ft]||ft),ft}for(var le,Xt,jt,Kt,Gt={},Ee,Ht,Vt,Ft;;){if(Xt=X[X.length-1],this.defaultActions[Xt]?jt=this.defaultActions[Xt]:((le===null||typeof le>"u")&&(le=st()),jt=J[Xt]&&J[Xt][le]),typeof jt>"u"||!jt.length||!jt[0]){var xt="";Ft=[];for(Ee in J[Xt])this.terminals_[Ee]&&Ee>Yt&&Ft.push("'"+this.terminals_[Ee]+"'");Tt.showPosition?xt="Parse error on line "+(ht+1)+`:
|
|
1254
|
+
L0,${e.line_height}`).attr("stroke-width",1)},R3={ReqMarkers:N1,insertLineEndings:wP};let je={},J2=0;const F3=(t,e)=>t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",je.rect_min_width+"px").attr("height",je.rect_min_height+"px"),P3=(t,e,r)=>{let i=je.rect_min_width/2,n=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",i).attr("y",je.rect_padding).attr("dominant-baseline","hanging"),s=0;r.forEach(u=>{s==0?n.append("tspan").attr("text-anchor","middle").attr("x",je.rect_min_width/2).attr("dy",0).text(u):n.append("tspan").attr("text-anchor","middle").attr("x",je.rect_min_width/2).attr("dy",je.line_height*.75).text(u),s++});let a=1.5*je.rect_padding,o=s*je.line_height*.75,l=a+o;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",je.rect_min_width).attr("y1",l).attr("y2",l),{titleNode:n,y:l}},Y3=(t,e,r,i)=>{let n=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",je.rect_padding).attr("y",i).attr("dominant-baseline","hanging"),s=0;const a=30;let o=[];return r.forEach(l=>{let u=l.length;for(;u>a&&s<3;){let d=l.substring(0,a);l=l.substring(a,l.length),u=l.length,o[o.length]=d,s++}if(s==3){let d=o[o.length-1];o[o.length-1]=d.substring(0,d.length-4)+"..."}else o[o.length]=l;s=0}),o.forEach(l=>{n.append("tspan").attr("x",je.rect_padding).attr("dy",je.line_height).text(l)}),n},TP=(t,e,r,i)=>{const n=e.node().getTotalLength(),s=e.node().getPointAtLength(n*.5),a="rel"+J2;J2++;const l=t.append("text").attr("class","req relationshipLabel").attr("id",a).attr("x",s.x).attr("y",s.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(i).node().getBBox();t.insert("rect","#"+a).attr("class","req reqLabelBox").attr("x",s.x-l.width/2).attr("y",s.y-l.height/2).attr("width",l.width).attr("height",l.height).attr("fill","white").attr("fill-opacity","85%")},EP=function(t,e,r,i,n){const s=r.edge(xa(e.src),xa(e.dst)),a=Ca().x(function(l){return l.x}).y(function(l){return l.y}),o=t.insert("path","#"+i).attr("class","er relationshipLine").attr("d",a(s.points)).attr("fill","none");e.type==n.db.Relationships.CONTAINS?o.attr("marker-start","url("+he.getUrl(je.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(o.attr("stroke-dasharray","10,7"),o.attr("marker-end","url("+he.getUrl(je.arrowMarkerAbsolute)+"#"+R3.ReqMarkers.ARROW+"_line_ending)")),TP(t,o,je,`<<${e.type}>>`)},CP=(t,e,r)=>{Object.keys(t).forEach(i=>{let n=t[i];i=xa(i),B.info("Added new requirement: ",i);const s=r.append("g").attr("id",i),a="req-"+i,o=F3(s,a);let l=P3(s,i+"_title",[`<<${n.type}>>`,`${n.name}`]);Y3(s,i+"_body",[`Id: ${n.id}`,`Text: ${n.text}`,`Risk: ${n.risk}`,`Verification: ${n.verifyMethod}`],l.y);const u=o.node().getBBox();e.setNode(i,{width:u.width,height:u.height,shape:"rect",id:i})})},SP=(t,e,r)=>{Object.keys(t).forEach(i=>{let n=t[i];const s=xa(i),a=r.append("g").attr("id",s),o="element-"+s,l=F3(a,o);let u=P3(a,o+"_title",["<<Element>>",`${i}`]);Y3(a,o+"_body",[`Type: ${n.type||"Not Specified"}`,`Doc Ref: ${n.docRef||"None"}`],u.y);const d=l.node().getBBox();e.setNode(s,{width:d.width,height:d.height,shape:"rect",id:s})})},AP=(t,e)=>(t.forEach(function(r){let i=xa(r.src),n=xa(r.dst);e.setEdge(i,n,{relationship:r})}),t),LP=function(t,e){e.nodes().forEach(function(r){r!==void 0&&e.node(r)!==void 0&&(t.select("#"+r),t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )"))})},xa=t=>t.replace(/\s/g,"").replace(/\./g,"_"),DP=(t,e,r,i)=>{je=$().requirement,i.db.clear(),i.parser.parse(t);const n=je.securityLevel;let s;n==="sandbox"&&(s=At("#i"+e));const o=At(n==="sandbox"?s.nodes()[0].contentDocument.body:"body").select(`[id='${e}']`);R3.insertLineEndings(o,je);const l=new or({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:je.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});let u=i.db.getRequirements(),d=i.db.getElements(),f=i.db.getRelationships();CP(u,l,o),SP(d,l,o),AP(f,l),Ma(l),LP(o,l),f.forEach(function(w){EP(o,w,l,e,i)});const p=je.rect_padding,g=o.node().getBBox(),_=g.width+p*2,k=g.height+p*2;Ei(o,k,_,je.useMaxWidth),o.attr("viewBox",`${g.x-p} ${g.y-p} ${_} ${k}`)},MP={draw:DP};var B1=function(){var t=function(Ot,Y,U,X){for(U=U||{},X=Ot.length;X--;U[Ot[X]]=Y);return U},e=[1,2],r=[1,3],i=[1,5],n=[1,7],s=[2,5],a=[1,15],o=[1,17],l=[1,18],u=[1,19],d=[1,21],f=[1,22],p=[1,23],g=[1,29],_=[1,30],k=[1,31],w=[1,32],S=[1,33],A=[1,34],O=[1,35],P=[1,36],W=[1,37],q=[1,38],z=[1,39],H=[1,40],N=[1,43],M=[1,44],C=[1,45],v=[1,46],D=[1,47],m=[1,48],Q=[1,51],b=[1,4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,50,51,52,53,58,59,60,61,69,79],ct=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,53,58,59,60,61,69,79],Dt=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,52,53,58,59,60,61,69,79],vt=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,51,53,58,59,60,61,69,79],j=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,50,53,58,59,60,61,69,79],ot=[67,68,69],rt=[1,121],it=[1,4,5,7,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,50,51,52,53,58,59,60,61,69,79],ut={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,openDirective:11,typeDirective:12,closeDirective:13,":":14,argDirective:15,participant:16,actor:17,AS:18,restOfLine:19,participant_actor:20,signal:21,autonumber:22,NUM:23,off:24,activate:25,deactivate:26,note_statement:27,links_statement:28,link_statement:29,properties_statement:30,details_statement:31,title:32,legacy_title:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,loop:39,end:40,rect:41,opt:42,alt:43,else_sections:44,par:45,par_sections:46,critical:47,option_sections:48,break:49,option:50,and:51,else:52,note:53,placement:54,text2:55,over:56,actor_pair:57,links:58,link:59,properties:60,details:61,spaceList:62,",":63,left_of:64,right_of:65,signaltype:66,"+":67,"-":68,ACTOR:69,SOLID_OPEN_ARROW:70,DOTTED_OPEN_ARROW:71,SOLID_ARROW:72,DOTTED_ARROW:73,SOLID_CROSS:74,DOTTED_CROSS:75,SOLID_POINT:76,DOTTED_POINT:77,TXT:78,open_directive:79,type_directive:80,arg_directive:81,close_directive:82,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",14:":",16:"participant",18:"AS",19:"restOfLine",20:"participant_actor",22:"autonumber",23:"NUM",24:"off",25:"activate",26:"deactivate",32:"title",33:"legacy_title",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",39:"loop",40:"end",41:"rect",42:"opt",43:"alt",45:"par",47:"critical",49:"break",50:"option",51:"and",52:"else",53:"note",56:"over",58:"links",59:"link",60:"properties",61:"details",63:",",64:"left_of",65:"right_of",67:"+",68:"-",69:"ACTOR",70:"SOLID_OPEN_ARROW",71:"DOTTED_OPEN_ARROW",72:"SOLID_ARROW",73:"DOTTED_ARROW",74:"SOLID_CROSS",75:"DOTTED_CROSS",76:"SOLID_POINT",77:"DOTTED_POINT",78:"TXT",79:"open_directive",80:"type_directive",81:"arg_directive",82:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[6,4],[6,6],[10,5],[10,3],[10,5],[10,3],[10,2],[10,4],[10,3],[10,3],[10,2],[10,3],[10,3],[10,2],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,2],[10,2],[10,1],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[48,1],[48,4],[46,1],[46,4],[44,1],[44,4],[27,4],[27,4],[28,3],[29,3],[30,3],[31,3],[62,2],[62,1],[57,3],[57,1],[54,1],[54,1],[21,5],[21,5],[21,4],[17,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[55,1],[11,1],[12,1],[15,1],[13,1]],performAction:function(Y,U,X,F,I,L,J){var T=L.length-1;switch(I){case 4:return F.apply(L[T]),L[T];case 5:this.$=[];break;case 6:L[T-1].push(L[T]),this.$=L[T-1];break;case 7:case 8:this.$=L[T];break;case 9:this.$=[];break;case 12:L[T-3].type="addParticipant",L[T-3].description=F.parseMessage(L[T-1]),this.$=L[T-3];break;case 13:L[T-1].type="addParticipant",this.$=L[T-1];break;case 14:L[T-3].type="addActor",L[T-3].description=F.parseMessage(L[T-1]),this.$=L[T-3];break;case 15:L[T-1].type="addActor",this.$=L[T-1];break;case 17:this.$={type:"sequenceIndex",sequenceIndex:Number(L[T-2]),sequenceIndexStep:Number(L[T-1]),sequenceVisible:!0,signalType:F.LINETYPE.AUTONUMBER};break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(L[T-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:F.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:F.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:F.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"activeStart",signalType:F.LINETYPE.ACTIVE_START,actor:L[T-1]};break;case 22:this.$={type:"activeEnd",signalType:F.LINETYPE.ACTIVE_END,actor:L[T-1]};break;case 28:F.setDiagramTitle(L[T].substring(6)),this.$=L[T].substring(6);break;case 29:F.setDiagramTitle(L[T].substring(7)),this.$=L[T].substring(7);break;case 30:this.$=L[T].trim(),F.setAccTitle(this.$);break;case 31:case 32:this.$=L[T].trim(),F.setAccDescription(this.$);break;case 33:L[T-1].unshift({type:"loopStart",loopText:F.parseMessage(L[T-2]),signalType:F.LINETYPE.LOOP_START}),L[T-1].push({type:"loopEnd",loopText:L[T-2],signalType:F.LINETYPE.LOOP_END}),this.$=L[T-1];break;case 34:L[T-1].unshift({type:"rectStart",color:F.parseMessage(L[T-2]),signalType:F.LINETYPE.RECT_START}),L[T-1].push({type:"rectEnd",color:F.parseMessage(L[T-2]),signalType:F.LINETYPE.RECT_END}),this.$=L[T-1];break;case 35:L[T-1].unshift({type:"optStart",optText:F.parseMessage(L[T-2]),signalType:F.LINETYPE.OPT_START}),L[T-1].push({type:"optEnd",optText:F.parseMessage(L[T-2]),signalType:F.LINETYPE.OPT_END}),this.$=L[T-1];break;case 36:L[T-1].unshift({type:"altStart",altText:F.parseMessage(L[T-2]),signalType:F.LINETYPE.ALT_START}),L[T-1].push({type:"altEnd",signalType:F.LINETYPE.ALT_END}),this.$=L[T-1];break;case 37:L[T-1].unshift({type:"parStart",parText:F.parseMessage(L[T-2]),signalType:F.LINETYPE.PAR_START}),L[T-1].push({type:"parEnd",signalType:F.LINETYPE.PAR_END}),this.$=L[T-1];break;case 38:L[T-1].unshift({type:"criticalStart",criticalText:F.parseMessage(L[T-2]),signalType:F.LINETYPE.CRITICAL_START}),L[T-1].push({type:"criticalEnd",signalType:F.LINETYPE.CRITICAL_END}),this.$=L[T-1];break;case 39:L[T-1].unshift({type:"breakStart",breakText:F.parseMessage(L[T-2]),signalType:F.LINETYPE.BREAK_START}),L[T-1].push({type:"breakEnd",optText:F.parseMessage(L[T-2]),signalType:F.LINETYPE.BREAK_END}),this.$=L[T-1];break;case 42:this.$=L[T-3].concat([{type:"option",optionText:F.parseMessage(L[T-1]),signalType:F.LINETYPE.CRITICAL_OPTION},L[T]]);break;case 44:this.$=L[T-3].concat([{type:"and",parText:F.parseMessage(L[T-1]),signalType:F.LINETYPE.PAR_AND},L[T]]);break;case 46:this.$=L[T-3].concat([{type:"else",altText:F.parseMessage(L[T-1]),signalType:F.LINETYPE.ALT_ELSE},L[T]]);break;case 47:this.$=[L[T-1],{type:"addNote",placement:L[T-2],actor:L[T-1].actor,text:L[T]}];break;case 48:L[T-2]=[].concat(L[T-1],L[T-1]).slice(0,2),L[T-2][0]=L[T-2][0].actor,L[T-2][1]=L[T-2][1].actor,this.$=[L[T-1],{type:"addNote",placement:F.PLACEMENT.OVER,actor:L[T-2].slice(0,2),text:L[T]}];break;case 49:this.$=[L[T-1],{type:"addLinks",actor:L[T-1].actor,text:L[T]}];break;case 50:this.$=[L[T-1],{type:"addALink",actor:L[T-1].actor,text:L[T]}];break;case 51:this.$=[L[T-1],{type:"addProperties",actor:L[T-1].actor,text:L[T]}];break;case 52:this.$=[L[T-1],{type:"addDetails",actor:L[T-1].actor,text:L[T]}];break;case 55:this.$=[L[T-2],L[T]];break;case 56:this.$=L[T];break;case 57:this.$=F.PLACEMENT.LEFTOF;break;case 58:this.$=F.PLACEMENT.RIGHTOF;break;case 59:this.$=[L[T-4],L[T-1],{type:"addMessage",from:L[T-4].actor,to:L[T-1].actor,signalType:L[T-3],msg:L[T]},{type:"activeStart",signalType:F.LINETYPE.ACTIVE_START,actor:L[T-1]}];break;case 60:this.$=[L[T-4],L[T-1],{type:"addMessage",from:L[T-4].actor,to:L[T-1].actor,signalType:L[T-3],msg:L[T]},{type:"activeEnd",signalType:F.LINETYPE.ACTIVE_END,actor:L[T-4]}];break;case 61:this.$=[L[T-3],L[T-1],{type:"addMessage",from:L[T-3].actor,to:L[T-1].actor,signalType:L[T-2],msg:L[T]}];break;case 62:this.$={type:"addParticipant",actor:L[T]};break;case 63:this.$=F.LINETYPE.SOLID_OPEN;break;case 64:this.$=F.LINETYPE.DOTTED_OPEN;break;case 65:this.$=F.LINETYPE.SOLID;break;case 66:this.$=F.LINETYPE.DOTTED;break;case 67:this.$=F.LINETYPE.SOLID_CROSS;break;case 68:this.$=F.LINETYPE.DOTTED_CROSS;break;case 69:this.$=F.LINETYPE.SOLID_POINT;break;case 70:this.$=F.LINETYPE.DOTTED_POINT;break;case 71:this.$=F.parseMessage(L[T].trim().substring(1));break;case 72:F.parseDirective("%%{","open_directive");break;case 73:F.parseDirective(L[T],"type_directive");break;case 74:L[T]=L[T].trim().replace(/'/g,'"'),F.parseDirective(L[T],"arg_directive");break;case 75:F.parseDirective("}%%","close_directive","sequence");break}},table:[{3:1,4:e,5:r,6:4,7:i,11:6,79:n},{1:[3]},{3:8,4:e,5:r,6:4,7:i,11:6,79:n},{3:9,4:e,5:r,6:4,7:i,11:6,79:n},{3:10,4:e,5:r,6:4,7:i,11:6,79:n},t([1,4,5,16,20,22,25,26,32,33,34,36,38,39,41,42,43,45,47,49,53,58,59,60,61,69,79],s,{8:11}),{12:12,80:[1,13]},{80:[2,72]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:_,34:k,36:w,38:S,39:A,41:O,42:P,43:W,45:q,47:z,49:H,53:N,58:M,59:C,60:v,61:D,69:m,79:n},{13:49,14:[1,50],82:Q},t([14,82],[2,73]),t(b,[2,6]),{6:41,10:52,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:_,34:k,36:w,38:S,39:A,41:O,42:P,43:W,45:q,47:z,49:H,53:N,58:M,59:C,60:v,61:D,69:m,79:n},t(b,[2,8]),t(b,[2,9]),{17:53,69:m},{17:54,69:m},{5:[1,55]},{5:[1,58],23:[1,56],24:[1,57]},{17:59,69:m},{17:60,69:m},{5:[1,61]},{5:[1,62]},{5:[1,63]},{5:[1,64]},{5:[1,65]},t(b,[2,28]),t(b,[2,29]),{35:[1,66]},{37:[1,67]},t(b,[2,32]),{19:[1,68]},{19:[1,69]},{19:[1,70]},{19:[1,71]},{19:[1,72]},{19:[1,73]},{19:[1,74]},t(b,[2,40]),{66:75,70:[1,76],71:[1,77],72:[1,78],73:[1,79],74:[1,80],75:[1,81],76:[1,82],77:[1,83]},{54:84,56:[1,85],64:[1,86],65:[1,87]},{17:88,69:m},{17:89,69:m},{17:90,69:m},{17:91,69:m},t([5,18,63,70,71,72,73,74,75,76,77,78],[2,62]),{5:[1,92]},{15:93,81:[1,94]},{5:[2,75]},t(b,[2,7]),{5:[1,96],18:[1,95]},{5:[1,98],18:[1,97]},t(b,[2,16]),{5:[1,100],23:[1,99]},{5:[1,101]},t(b,[2,20]),{5:[1,102]},{5:[1,103]},t(b,[2,23]),t(b,[2,24]),t(b,[2,25]),t(b,[2,26]),t(b,[2,27]),t(b,[2,30]),t(b,[2,31]),t(ct,s,{8:104}),t(ct,s,{8:105}),t(ct,s,{8:106}),t(Dt,s,{44:107,8:108}),t(vt,s,{46:109,8:110}),t(j,s,{48:111,8:112}),t(ct,s,{8:113}),{17:116,67:[1,114],68:[1,115],69:m},t(ot,[2,63]),t(ot,[2,64]),t(ot,[2,65]),t(ot,[2,66]),t(ot,[2,67]),t(ot,[2,68]),t(ot,[2,69]),t(ot,[2,70]),{17:117,69:m},{17:119,57:118,69:m},{69:[2,57]},{69:[2,58]},{55:120,78:rt},{55:122,78:rt},{55:123,78:rt},{55:124,78:rt},t(it,[2,10]),{13:125,82:Q},{82:[2,74]},{19:[1,126]},t(b,[2,13]),{19:[1,127]},t(b,[2,15]),{5:[1,128]},t(b,[2,18]),t(b,[2,19]),t(b,[2,21]),t(b,[2,22]),{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:_,34:k,36:w,38:S,39:A,40:[1,129],41:O,42:P,43:W,45:q,47:z,49:H,53:N,58:M,59:C,60:v,61:D,69:m,79:n},{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:_,34:k,36:w,38:S,39:A,40:[1,130],41:O,42:P,43:W,45:q,47:z,49:H,53:N,58:M,59:C,60:v,61:D,69:m,79:n},{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:_,34:k,36:w,38:S,39:A,40:[1,131],41:O,42:P,43:W,45:q,47:z,49:H,53:N,58:M,59:C,60:v,61:D,69:m,79:n},{40:[1,132]},{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:_,34:k,36:w,38:S,39:A,40:[2,45],41:O,42:P,43:W,45:q,47:z,49:H,52:[1,133],53:N,58:M,59:C,60:v,61:D,69:m,79:n},{40:[1,134]},{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:_,34:k,36:w,38:S,39:A,40:[2,43],41:O,42:P,43:W,45:q,47:z,49:H,51:[1,135],53:N,58:M,59:C,60:v,61:D,69:m,79:n},{40:[1,136]},{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:_,34:k,36:w,38:S,39:A,40:[2,41],41:O,42:P,43:W,45:q,47:z,49:H,50:[1,137],53:N,58:M,59:C,60:v,61:D,69:m,79:n},{4:a,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:d,25:f,26:p,27:24,28:25,29:26,30:27,31:28,32:g,33:_,34:k,36:w,38:S,39:A,40:[1,138],41:O,42:P,43:W,45:q,47:z,49:H,53:N,58:M,59:C,60:v,61:D,69:m,79:n},{17:139,69:m},{17:140,69:m},{55:141,78:rt},{55:142,78:rt},{55:143,78:rt},{63:[1,144],78:[2,56]},{5:[2,49]},{5:[2,71]},{5:[2,50]},{5:[2,51]},{5:[2,52]},{5:[1,145]},{5:[1,146]},{5:[1,147]},t(b,[2,17]),t(b,[2,33]),t(b,[2,34]),t(b,[2,35]),t(b,[2,36]),{19:[1,148]},t(b,[2,37]),{19:[1,149]},t(b,[2,38]),{19:[1,150]},t(b,[2,39]),{55:151,78:rt},{55:152,78:rt},{5:[2,61]},{5:[2,47]},{5:[2,48]},{17:153,69:m},t(it,[2,11]),t(b,[2,12]),t(b,[2,14]),t(Dt,s,{8:108,44:154}),t(vt,s,{8:110,46:155}),t(j,s,{8:112,48:156}),{5:[2,59]},{5:[2,60]},{78:[2,55]},{40:[2,46]},{40:[2,44]},{40:[2,42]}],defaultActions:{7:[2,72],8:[2,1],9:[2,2],10:[2,3],51:[2,75],86:[2,57],87:[2,58],94:[2,74],120:[2,49],121:[2,71],122:[2,50],123:[2,51],124:[2,52],141:[2,61],142:[2,47],143:[2,48],151:[2,59],152:[2,60],153:[2,55],154:[2,46],155:[2,44],156:[2,42]},parseError:function(Y,U){if(U.recoverable)this.trace(Y);else{var X=new Error(Y);throw X.hash=U,X}},parse:function(Y){var U=this,X=[0],F=[],I=[null],L=[],J=this.table,T="",ht=0,V=0,Yt=2,et=1,Mt=L.slice.call(arguments,1),Tt=Object.create(this.lexer),gt={yy:{}};for(var Et in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Et)&&(gt.yy[Et]=this.yy[Et]);Tt.setInput(Y,gt.yy),gt.yy.lexer=Tt,gt.yy.parser=this,typeof Tt.yylloc>"u"&&(Tt.yylloc={});var wt=Tt.yylloc;L.push(wt);var pt=Tt.options&&Tt.options.ranges;typeof gt.yy.parseError=="function"?this.parseError=gt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function st(){var ft;return ft=F.pop()||Tt.lex()||et,typeof ft!="number"&&(ft instanceof Array&&(F=ft,ft=F.pop()),ft=U.symbols_[ft]||ft),ft}for(var le,Xt,jt,Kt,Gt={},Ee,Ht,Vt,Ft;;){if(Xt=X[X.length-1],this.defaultActions[Xt]?jt=this.defaultActions[Xt]:((le===null||typeof le>"u")&&(le=st()),jt=J[Xt]&&J[Xt][le]),typeof jt>"u"||!jt.length||!jt[0]){var xt="";Ft=[];for(Ee in J[Xt])this.terminals_[Ee]&&Ee>Yt&&Ft.push("'"+this.terminals_[Ee]+"'");Tt.showPosition?xt="Parse error on line "+(ht+1)+`:
|
|
1255
1255
|
`+Tt.showPosition()+`
|
|
1256
1256
|
Expecting `+Ft.join(", ")+", got '"+(this.terminals_[le]||le)+"'":xt="Parse error on line "+(ht+1)+": Unexpected "+(le==et?"end of input":"'"+(this.terminals_[le]||le)+"'"),this.parseError(xt,{text:Tt.match,token:this.terminals_[le]||le,line:Tt.yylineno,loc:wt,expected:Ft})}if(jt[0]instanceof Array&&jt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Xt+", token: "+le);switch(jt[0]){case 1:X.push(le),I.push(Tt.yytext),L.push(Tt.yylloc),X.push(jt[1]),le=null,V=Tt.yyleng,T=Tt.yytext,ht=Tt.yylineno,wt=Tt.yylloc;break;case 2:if(Ht=this.productions_[jt[1]][1],Gt.$=I[I.length-Ht],Gt._$={first_line:L[L.length-(Ht||1)].first_line,last_line:L[L.length-1].last_line,first_column:L[L.length-(Ht||1)].first_column,last_column:L[L.length-1].last_column},pt&&(Gt._$.range=[L[L.length-(Ht||1)].range[0],L[L.length-1].range[1]]),Kt=this.performAction.apply(Gt,[T,V,ht,gt.yy,jt[1],I,L].concat(Mt)),typeof Kt<"u")return Kt;Ht&&(X=X.slice(0,-1*Ht*2),I=I.slice(0,-1*Ht),L=L.slice(0,-1*Ht)),X.push(this.productions_[jt[1]][0]),I.push(Gt.$),L.push(Gt._$),Vt=J[X[X.length-2]][X[X.length-1]],X.push(Vt);break;case 3:return!0}}return!0}},bt=function(){var Ot={EOF:1,parseError:function(U,X){if(this.yy.parser)this.yy.parser.parseError(U,X);else throw new Error(U)},setInput:function(Y,U){return this.yy=U||this.yy||{},this._input=Y,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var Y=this._input[0];this.yytext+=Y,this.yyleng++,this.offset++,this.match+=Y,this.matched+=Y;var U=Y.match(/(?:\r\n?|\n).*/g);return U?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Y},unput:function(Y){var U=Y.length,X=Y.split(/(?:\r\n?|\n)/g);this._input=Y+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-U),this.offset-=U;var F=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),X.length-1&&(this.yylineno-=X.length-1);var I=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:X?(X.length===F.length?this.yylloc.first_column:0)+F[F.length-X.length].length-X[0].length:this.yylloc.first_column-U},this.options.ranges&&(this.yylloc.range=[I[0],I[0]+this.yyleng-U]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
1257
1257
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(Y){this.unput(this.match.slice(Y))},pastInput:function(){var Y=this.matched.substr(0,this.matched.length-this.match.length);return(Y.length>20?"...":"")+Y.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var Y=this.match;return Y.length<20&&(Y+=this._input.substr(0,20-Y.length)),(Y.substr(0,20)+(Y.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var Y=this.pastInput(),U=new Array(Y.length+1).join("-");return Y+this.upcomingInput()+`
|
|
1258
1258
|
`+U+"^"},test_match:function(Y,U){var X,F,I;if(this.options.backtrack_lexer&&(I={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(I.yylloc.range=this.yylloc.range.slice(0))),F=Y[0].match(/(?:\r\n?|\n).*/g),F&&(this.yylineno+=F.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:F?F[F.length-1].length-F[F.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Y[0].length},this.yytext+=Y[0],this.match+=Y[0],this.matches=Y,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Y[0].length),this.matched+=Y[0],X=this.performAction.call(this,this.yy,this,U,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),X)return X;if(this._backtrack){for(var L in I)this[L]=I[L];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Y,U,X,F;this._more||(this.yytext="",this.match="");for(var I=this._currentRules(),L=0;L<I.length;L++)if(X=this._input.match(this.rules[I[L]]),X&&(!U||X[0].length>U[0].length)){if(U=X,F=L,this.options.backtrack_lexer){if(Y=this.test_match(X,I[L]),Y!==!1)return Y;if(this._backtrack){U=!1;continue}else return!1}else if(!this.options.flex)break}return U?(Y=this.test_match(U,I[F]),Y!==!1?Y:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1259
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var U=this.next();return U||this.lex()},begin:function(U){this.conditionStack.push(U)},popState:function(){var U=this.conditionStack.length-1;return U>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(U){return U=this.conditionStack.length-1-Math.abs(U||0),U>=0?this.conditionStack[U]:"INITIAL"},pushState:function(U){this.begin(U)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(U,X,F,I){switch(F){case 0:return this.begin("open_directive"),79;case 1:return this.begin("type_directive"),80;case 2:return this.popState(),this.begin("arg_directive"),14;case 3:return this.popState(),this.popState(),82;case 4:return 81;case 5:return 5;case 6:break;case 7:break;case 8:break;case 9:break;case 10:break;case 11:return 23;case 12:return this.begin("ID"),16;case 13:return this.begin("ID"),20;case 14:return X.yytext=X.yytext.trim(),this.begin("ALIAS"),69;case 15:return this.popState(),this.popState(),this.begin("LINE"),18;case 16:return this.popState(),this.popState(),5;case 17:return this.begin("LINE"),39;case 18:return this.begin("LINE"),41;case 19:return this.begin("LINE"),42;case 20:return this.begin("LINE"),43;case 21:return this.begin("LINE"),52;case 22:return this.begin("LINE"),45;case 23:return this.begin("LINE"),51;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),50;case 26:return this.begin("LINE"),49;case 27:return this.popState(),19;case 28:return 40;case 29:return 64;case 30:return 65;case 31:return 58;case 32:return 59;case 33:return 60;case 34:return 61;case 35:return 56;case 36:return 53;case 37:return this.begin("ID"),25;case 38:return this.begin("ID"),26;case 39:return 32;case 40:return 33;case 41:return this.begin("acc_title"),34;case 42:return this.popState(),"acc_title_value";case 43:return this.begin("acc_descr"),36;case 44:return this.popState(),"acc_descr_value";case 45:this.begin("acc_descr_multiline");break;case 46:this.popState();break;case 47:return"acc_descr_multiline_value";case 48:return 7;case 49:return 22;case 50:return 24;case 51:return 63;case 52:return 5;case 53:return X.yytext=X.yytext.trim(),69;case 54:return 72;case 55:return 73;case 56:return 70;case 57:return 71;case 58:return 74;case 59:return 75;case 60:return 76;case 61:return 77;case 62:return 78;case 63:return 67;case 64:return 68;case 65:return 5;case 66:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:[^\->:\n,;]+?([\-]*[^\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?: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,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[46,47],inclusive:!1},acc_descr:{rules:[44],inclusive:!1},acc_title:{rules:[42],inclusive:!1},open_directive:{rules:[1,8],inclusive:!1},type_directive:{rules:[2,3,8],inclusive:!1},arg_directive:{rules:[3,4,8],inclusive:!1},ID:{rules:[7,8,14],inclusive:!1},ALIAS:{rules:[7,8,15,16],inclusive:!1},LINE:{rules:[7,8,27],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,12,13,17,18,19,20,21,22,23,24,25,26,28,29,30,31,32,33,34,35,36,37,38,39,40,41,43,45,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66],inclusive:!0}}};return Ot}();ut.lexer=bt;function K(){this.yy={}}return K.prototype=ut,ut.Parser=K,new K}();N1.parser=N1;const NP=N1,BP=t=>t.match(/^\s*sequenceDiagram/)!==null;let qa,Yn={},di=[],Du=!1,B1;const IP=function(t,e,r){ze.parseDirective(this,t,e,r)},I1=function(t,e,r,i){const n=Yn[t];n&&e===n.name&&r==null||((r==null||r.text==null)&&(r={text:e,wrap:null,type:i}),(i==null||r.text==null)&&(r={text:e,wrap:null,type:i}),Yn[t]={name:e,description:r.text,wrap:r.wrap===void 0&&va()||!!r.wrap,prevActor:qa,links:{},properties:{},actorCnt:null,rectData:null,type:i||"participant"},qa&&Yn[qa]&&(Yn[qa].nextActor=t),qa=t)},OP=t=>{let e,r=0;for(e=0;e<di.length;e++)di[e].type===Ro.ACTIVE_START&&di[e].from.actor===t&&r++,di[e].type===Ro.ACTIVE_END&&di[e].from.actor===t&&r--;return r},RP=function(t,e,r,i){di.push({from:t,to:e,message:r.text,wrap:r.wrap===void 0&&va()||!!r.wrap,answer:i})},Xe=function(t,e,r={text:void 0,wrap:void 0},i){if(i===Ro.ACTIVE_END&&OP(t.actor)<1){let s=new Error("Trying to inactivate an inactive participant ("+t.actor+")");throw s.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},s}return di.push({from:t,to:e,message:r.text,wrap:r.wrap===void 0&&va()||!!r.wrap,type:i}),!0},FP=function(){return di},PP=function(){return Yn},Jo=function(t){return Yn[t]},YP=function(){return Object.keys(Yn)},VP=function(){Du=!0},UP=function(){Du=!1},zP=()=>Du,WP=function(t){B1=t},va=()=>B1!==void 0?B1:$().sequence.wrap,HP=function(){Yn={},di=[],Du=!1,Ci()},GP=function(t){const e=t.trim(),r={text:e.replace(/^:?(?:no)?wrap:/,"").trim(),wrap:e.match(/^:?wrap:/)!==null?!0:e.match(/^:?nowrap:/)!==null?!1:void 0};return B.debug("parseMessage:",r),r},Ro={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},qP={FILLED:0,OPEN:1},jP={LEFTOF:0,RIGHTOF:1,OVER:2},V3=function(t,e,r){r.text,r.wrap===void 0&&va()||r.wrap;const i=[].concat(t,t);di.push({from:i[0],to:i[1],message:r.text,wrap:r.wrap===void 0&&va()||!!r.wrap,type:Ro.NOTE,placement:e})},U3=function(t,e){const r=Jo(t);try{let i=vi(e.text,$());i=i.replace(/&/g,"&"),i=i.replace(/=/g,"=");const n=JSON.parse(i);sd(r,n)}catch(i){B.error("error while parsing actor link text",i)}},$P=function(t,e){const r=Jo(t);try{const a={};let o=vi(e.text,$());var i=o.indexOf("@");o=o.replace(/&/g,"&"),o=o.replace(/=/g,"=");var n=o.slice(0,i-1).trim(),s=o.slice(i+1).trim();a[n]=s,sd(r,a)}catch(a){B.error("error while parsing actor link text",a)}};function sd(t,e){if(t.links==null)t.links=e;else for(let r in e)t.links[r]=e[r]}const z3=function(t,e){const r=Jo(t);try{let i=vi(e.text,$());const n=JSON.parse(i);W3(r,n)}catch(i){B.error("error while parsing actor properties text",i)}};function W3(t,e){if(t.properties==null)t.properties=e;else for(let r in e)t.properties[r]=e[r]}const H3=function(t,e){const r=Jo(t),i=document.getElementById(e.text);try{const n=i.innerHTML,s=JSON.parse(n);s.properties&&W3(r,s.properties),s.links&&sd(r,s.links)}catch(n){B.error("error while parsing actor details text",n)}},XP=function(t,e){if(t!==void 0&&t.properties!==void 0)return t.properties[e]},G3=function(t){if(Array.isArray(t))t.forEach(function(e){G3(e)});else switch(t.type){case"sequenceIndex":di.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":I1(t.actor,t.actor,t.description,"participant");break;case"addActor":I1(t.actor,t.actor,t.description,"actor");break;case"activeStart":Xe(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":Xe(t.actor,void 0,void 0,t.signalType);break;case"addNote":V3(t.actor,t.placement,t.text);break;case"addLinks":U3(t.actor,t.text);break;case"addALink":$P(t.actor,t.text);break;case"addProperties":z3(t.actor,t.text);break;case"addDetails":H3(t.actor,t.text);break;case"addMessage":Xe(t.from,t.to,t.msg,t.signalType);break;case"loopStart":Xe(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":Xe(void 0,void 0,void 0,t.signalType);break;case"rectStart":Xe(void 0,void 0,t.color,t.signalType);break;case"rectEnd":Xe(void 0,void 0,void 0,t.signalType);break;case"optStart":Xe(void 0,void 0,t.optText,t.signalType);break;case"optEnd":Xe(void 0,void 0,void 0,t.signalType);break;case"altStart":Xe(void 0,void 0,t.altText,t.signalType);break;case"else":Xe(void 0,void 0,t.altText,t.signalType);break;case"altEnd":Xe(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":ii(t.text);break;case"parStart":Xe(void 0,void 0,t.parText,t.signalType);break;case"and":Xe(void 0,void 0,t.parText,t.signalType);break;case"parEnd":Xe(void 0,void 0,void 0,t.signalType);break;case"criticalStart":Xe(void 0,void 0,t.criticalText,t.signalType);break;case"option":Xe(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":Xe(void 0,void 0,void 0,t.signalType);break;case"breakStart":Xe(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":Xe(void 0,void 0,void 0,t.signalType);break}},tp={addActor:I1,addMessage:RP,addSignal:Xe,addLinks:U3,addDetails:H3,addProperties:z3,autoWrap:va,setWrap:WP,enableSequenceNumbers:VP,disableSequenceNumbers:UP,showSequenceNumbers:zP,getMessages:FP,getActors:PP,getActor:Jo,getActorKeys:YP,getActorProperty:XP,getAccTitle:Si,getDiagramTitle:Sn,setDiagramTitle:Cn,parseDirective:IP,getConfig:()=>$().sequence,clear:HP,parseMessage:GP,LINETYPE:Ro,ARROWTYPE:qP,PLACEMENT:jP,addNote:V3,setAccTitle:ii,apply:G3,setAccDescription:Ai,getAccDescription:Li};let O1=[];const KP=t=>{O1.push(t)},q3=()=>{O1.forEach(t=>{t()}),O1=[]},Mu=function(t,e){const r=t.append("rect");return r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),e.class!==void 0&&r.attr("class",e.class),r},j3=(t,e)=>{KP(()=>{const r=document.querySelectorAll(t);r.length!==0&&(r[0].addEventListener("mouseover",function(){tY("actor"+e+"_popup")}),r[0].addEventListener("mouseout",function(){eY("actor"+e+"_popup")}))})},ZP=function(t,e,r,i,n){if(e.links===void 0||e.links===null||Object.keys(e.links).length===0)return{height:0,width:0};const s=e.links,a=e.actorCnt,o=e.rectData;var l="none";n&&(l="block !important");const u=t.append("g");u.attr("id","actor"+a+"_popup"),u.attr("class","actorPopupMenu"),u.attr("display",l),j3("#actor"+a+"_popup",a);var d="";o.class!==void 0&&(d=" "+o.class);let f=o.width>r?o.width:r;const p=u.append("rect");if(p.attr("class","actorPopupMenuPanel"+d),p.attr("x",o.x),p.attr("y",o.height),p.attr("fill",o.fill),p.attr("stroke",o.stroke),p.attr("width",f),p.attr("height",o.height),p.attr("rx",o.rx),p.attr("ry",o.ry),s!=null){var g=20;for(let w in s){var _=u.append("a"),k=wn(s[w]);_.attr("xlink:href",k),_.attr("target","_blank"),yY(i)(w,_,o.x+10,o.height+g,f,20,{class:"actor"},i),g+=30}}return p.attr("height",g),{height:o.height+g,width:f}},$3=function(t,e,r,i){const n=t.append("image");n.attr("x",e),n.attr("y",r);var s=wn(i);n.attr("xlink:href",s)},X3=function(t,e,r,i){const n=t.append("use");n.attr("x",e),n.attr("y",r);var s=wn(i);n.attr("xlink:href","#"+s)},QP=function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = 'block'; }"},JP=function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = 'none'; }"},tY=function(t){var e=document.getElementById(t);e!=null&&(e.style.display="block")},eY=function(t){var e=document.getElementById(t);e!=null&&(e.style.display="none")},ka=function(t,e){let r=0,i=0;const n=e.text.split(he.lineBreakRegex);let s=[],a=0,o=()=>e.y;if(e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0)switch(e.valign){case"top":case"start":o=()=>Math.round(e.y+e.textMargin);break;case"middle":case"center":o=()=>Math.round(e.y+(r+i+e.textMargin)/2);break;case"bottom":case"end":o=()=>Math.round(e.y+(r+i+2*e.textMargin)-e.textMargin);break}if(e.anchor!==void 0&&e.textMargin!==void 0&&e.width!==void 0)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle";break}for(let[l,u]of n.entries()){e.textMargin!==void 0&&e.textMargin===0&&e.fontSize!==void 0&&(a=l*e.fontSize);const d=t.append("text");if(d.attr("x",e.x),d.attr("y",o()),e.anchor!==void 0&&d.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),e.fontFamily!==void 0&&d.style("font-family",e.fontFamily),e.fontSize!==void 0&&d.style("font-size",e.fontSize),e.fontWeight!==void 0&&d.style("font-weight",e.fontWeight),e.fill!==void 0&&d.attr("fill",e.fill),e.class!==void 0&&d.attr("class",e.class),e.dy!==void 0?d.attr("dy",e.dy):a!==0&&d.attr("dy",a),e.tspan){const f=d.append("tspan");f.attr("x",e.x),e.fill!==void 0&&f.attr("fill",e.fill),f.text(u)}else d.text(u);e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0&&(i+=(d._groups||d)[0][0].getBBox().height,r=i),s.push(d)}return s},K3=function(t,e){function r(n,s,a,o,l){return n+","+s+" "+(n+a)+","+s+" "+(n+a)+","+(s+o-l)+" "+(n+a-l*1.2)+","+(s+o)+" "+n+","+(s+o)}const i=t.append("polygon");return i.attr("points",r(e.x,e.y,e.width,e.height,7)),i.attr("class","labelBox"),e.y=e.y+e.height/2,ka(t,e),i};let Ri=-1;const Z3=(t,e)=>{t.selectAll&&t.selectAll(".actor-line").attr("class","200").attr("y2",e-55)},rY=function(t,e,r){const i=e.x+e.width/2,n=t.append("g");var s=n;e.y===0&&(Ri++,s.append("line").attr("id","actor"+Ri).attr("x1",i).attr("y1",5).attr("x2",i).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"),s=n.append("g"),e.actorCnt=Ri,e.links!=null&&(s.attr("id","root-"+Ri),j3("#root-"+Ri,Ri)));const a=Nu();var o="actor";e.properties!=null&&e.properties.class?o=e.properties.class:a.fill="#eaeaea",a.x=e.x,a.y=e.y,a.width=e.width,a.height=e.height,a.class=o,a.rx=3,a.ry=3;const l=Mu(s,a);if(e.rectData=a,e.properties!=null&&e.properties.icon){const d=e.properties.icon.trim();d.charAt(0)==="@"?X3(s,a.x+a.width-20,a.y+10,d.substr(1)):$3(s,a.x+a.width-20,a.y+10,d)}Q3(r)(e.description,s,a.x,a.y,a.width,a.height,{class:"actor"},r);let u=e.height;if(l.node){const d=l.node().getBBox();e.height=d.height,u=d.height}return u},iY=function(t,e,r){const i=e.x+e.width/2;e.y===0&&(Ri++,t.append("line").attr("id","actor"+Ri).attr("x1",i).attr("y1",80).attr("x2",i).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));const n=t.append("g");n.attr("class","actor-man");const s=Nu();s.x=e.x,s.y=e.y,s.fill="#eaeaea",s.width=e.width,s.height=e.height,s.class="actor",s.rx=3,s.ry=3,n.append("line").attr("id","actor-man-torso"+Ri).attr("x1",i).attr("y1",e.y+25).attr("x2",i).attr("y2",e.y+45),n.append("line").attr("id","actor-man-arms"+Ri).attr("x1",i-18).attr("y1",e.y+33).attr("x2",i+18).attr("y2",e.y+33),n.append("line").attr("x1",i-18).attr("y1",e.y+60).attr("x2",i).attr("y2",e.y+45),n.append("line").attr("x1",i).attr("y1",e.y+45).attr("x2",i+16).attr("y2",e.y+60);const a=n.append("circle");a.attr("cx",e.x+e.width/2),a.attr("cy",e.y+10),a.attr("r",15),a.attr("width",e.width),a.attr("height",e.height);const o=n.node().getBBox();return e.height=o.height,Q3(r)(e.description,n,s.x,s.y+35,s.width,s.height,{class:"actor"},r),e.height},nY=function(t,e,r){switch(e.type){case"actor":return iY(t,e,r);case"participant":return rY(t,e,r)}},sY=function(t){return t.append("g")},aY=function(t,e,r,i,n){const s=Nu(),a=e.anchored;s.x=e.startx,s.y=e.starty,s.class="activation"+n%3,s.width=e.stopx-e.startx,s.height=r-e.starty,Mu(a,s)},oY=function(t,e,r,i){const{boxMargin:n,boxTextMargin:s,labelBoxHeight:a,labelBoxWidth:o,messageFontFamily:l,messageFontSize:u,messageFontWeight:d}=i,f=t.append("g"),p=function(k,w,S,A){return f.append("line").attr("x1",k).attr("y1",w).attr("x2",S).attr("y2",A).attr("class","loopLine")};p(e.startx,e.starty,e.stopx,e.starty),p(e.stopx,e.starty,e.stopx,e.stopy),p(e.startx,e.stopy,e.stopx,e.stopy),p(e.startx,e.starty,e.startx,e.stopy),e.sections!==void 0&&e.sections.forEach(function(k){p(e.startx,k.y,e.stopx,k.y).style("stroke-dasharray","3, 3")});let g=R1();g.text=r,g.x=e.startx,g.y=e.starty,g.fontFamily=l,g.fontSize=u,g.fontWeight=d,g.anchor="middle",g.valign="middle",g.tspan=!1,g.width=o||50,g.height=a||20,g.textMargin=s,g.class="labelText",K3(f,g),g=R1(),g.text=e.title,g.x=e.startx+o/2+(e.stopx-e.startx)/2,g.y=e.starty+n+s,g.anchor="middle",g.valign="middle",g.textMargin=s,g.class="loopText",g.fontFamily=l,g.fontSize=u,g.fontWeight=d,g.wrap=!0;let _=ka(f,g);return e.sectionTitles!==void 0&&e.sectionTitles.forEach(function(k,w){if(k.message){g.text=k.message,g.x=e.startx+(e.stopx-e.startx)/2,g.y=e.sections[w].y+n+s,g.class="loopText",g.anchor="middle",g.valign="middle",g.tspan=!1,g.fontFamily=l,g.fontSize=u,g.fontWeight=d,g.wrap=e.wrap,_=ka(f,g);let S=Math.round(_.map(A=>(A._groups||A)[0][0].getBBox().height).reduce((A,O)=>A+O));e.sections[w].height+=S-(n+s)}}),e.height=Math.round(e.stopy-e.starty),f},lY=function(t,e){Mu(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},cY=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")},uY=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")},hY=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")},dY=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")},fY=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")},pY=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)},gY=function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",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")},R1=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}},Nu=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},Q3=function(){function t(n,s,a,o,l,u,d){const f=s.append("text").attr("x",a+l/2).attr("y",o+u/2+5).style("text-anchor","middle").text(n);i(f,d)}function e(n,s,a,o,l,u,d,f){const{actorFontSize:p,actorFontFamily:g,actorFontWeight:_}=f;let k=p&&p.replace?p.replace("px",""):p;const w=n.split(he.lineBreakRegex);for(let S=0;S<w.length;S++){const A=S*k-k*(w.length-1)/2,O=s.append("text").attr("x",a+l/2).attr("y",o).style("text-anchor","middle").style("font-size",p).style("font-weight",_).style("font-family",g);O.append("tspan").attr("x",a+l/2).attr("dy",A).text(w[S]),O.attr("y",o+u/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(O,d)}}function r(n,s,a,o,l,u,d,f){const p=s.append("switch"),_=p.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",u).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");_.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,p,a,o,l,u,d,f),i(_,d)}function i(n,s){for(const a in s)s.hasOwnProperty(a)&&n.attr(a,s[a])}return function(n){return n.textPlacement==="fo"?r:n.textPlacement==="old"?t:e}}(),yY=function(){function t(n,s,a,o,l,u,d){const f=s.append("text").attr("x",a).attr("y",o).style("text-anchor","start").text(n);i(f,d)}function e(n,s,a,o,l,u,d,f){const{actorFontSize:p,actorFontFamily:g,actorFontWeight:_}=f,k=n.split(he.lineBreakRegex);for(let w=0;w<k.length;w++){const S=w*p-p*(k.length-1)/2,A=s.append("text").attr("x",a).attr("y",o).style("text-anchor","start").style("font-size",p).style("font-weight",_).style("font-family",g);A.append("tspan").attr("x",a).attr("dy",S).text(k[w]),A.attr("y",o+u/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(A,d)}}function r(n,s,a,o,l,u,d,f){const p=s.append("switch"),_=p.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",u).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");_.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,p,a,o,l,u,d,f),i(_,d)}function i(n,s){for(const a in s)s.hasOwnProperty(a)&&n.attr(a,s[a])}return function(n){return n.textPlacement==="fo"?r:n.textPlacement==="old"?t:e}}(),qe={drawRect:Mu,drawText:ka,drawLabel:K3,drawActor:nY,drawPopup:ZP,drawImage:$3,drawEmbeddedImage:X3,anchorElement:sY,drawActivation:aY,drawLoop:oY,drawBackgroundRect:lY,insertArrowHead:dY,insertArrowFilledHead:fY,insertSequenceNumber:pY,insertArrowCrossHead:gY,insertDatabaseIcon:cY,insertComputerIcon:uY,insertClockIcon:hY,getTextObj:R1,getNoteRect:Nu,popupMenu:QP,popdownMenu:JP,fixLifeLineHeights:Z3,sanitizeUrl:wn};let lt={};const Bt={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(t=>t.height||0))+(this.loops.length===0?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.messages.length===0?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.notes.length===0?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},clear:function(){this.actors=[],this.loops=[],this.messages=[],this.notes=[]},addActor:function(t){this.actors.push(t)},addLoop:function(t){this.loops.push(t)},addMessage:function(t){this.messages.push(t)},addNote:function(t){this.notes.push(t)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],loops:[],messages:[],notes:[]},init: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,t4($())},updateVal:function(t,e,r,i){t[e]===void 0?t[e]=r:t[e]=i(r,t[e])},updateBounds:function(t,e,r,i){const n=this;let s=0;function a(o){return function(u){s++;const d=n.sequenceItems.length-s+1;n.updateVal(u,"starty",e-d*lt.boxMargin,Math.min),n.updateVal(u,"stopy",i+d*lt.boxMargin,Math.max),n.updateVal(Bt.data,"startx",t-d*lt.boxMargin,Math.min),n.updateVal(Bt.data,"stopx",r+d*lt.boxMargin,Math.max),o!=="activation"&&(n.updateVal(u,"startx",t-d*lt.boxMargin,Math.min),n.updateVal(u,"stopx",r+d*lt.boxMargin,Math.max),n.updateVal(Bt.data,"starty",e-d*lt.boxMargin,Math.min),n.updateVal(Bt.data,"stopy",i+d*lt.boxMargin,Math.max))}}this.sequenceItems.forEach(a()),this.activations.forEach(a("activation"))},insert:function(t,e,r,i){const n=Math.min(t,r),s=Math.max(t,r),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(Bt.data,"startx",n,Math.min),this.updateVal(Bt.data,"starty",a,Math.min),this.updateVal(Bt.data,"stopx",s,Math.max),this.updateVal(Bt.data,"stopy",o,Math.max),this.updateBounds(n,a,s,o)},newActivation:function(t,e,r){const i=r[t.from.actor],n=Bu(t.from.actor).length||0,s=i.x+i.width/2+(n-1)*lt.activationWidth/2;this.activations.push({startx:s,starty:this.verticalPos+2,stopx:s+lt.activationWidth,stopy:void 0,actor:t.from.actor,anchored:qe.anchorElement(e)})},endActivation:function(t){const e=this.activations.map(function(r){return r.actor}).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop: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}},newLoop:function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},endLoop:function(){return this.sequenceItems.pop()},addSectionToLoop:function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:Bt.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},mY=function(t,e){Bt.bumpVerticalPos(lt.boxMargin),e.height=lt.boxMargin,e.starty=Bt.getVerticalPos();const r=qe.getNoteRect();r.x=e.startx,r.y=e.starty,r.width=e.width||lt.width,r.class="note";const i=t.append("g"),n=qe.drawRect(i,r),s=qe.getTextObj();s.x=e.startx,s.y=e.starty,s.width=r.width,s.dy="1em",s.text=e.message,s.class="noteText",s.fontFamily=lt.noteFontFamily,s.fontSize=lt.noteFontSize,s.fontWeight=lt.noteFontWeight,s.anchor=lt.noteAlign,s.textMargin=lt.noteMargin,s.valign="center";const a=ka(i,s),o=Math.round(a.map(l=>(l._groups||l)[0][0].getBBox().height).reduce((l,u)=>l+u));n.attr("height",o+2*lt.noteMargin),e.height+=o+2*lt.noteMargin,Bt.bumpVerticalPos(o+2*lt.noteMargin),e.stopy=e.starty+o+2*lt.noteMargin,e.stopx=e.startx+r.width,Bt.insert(e.startx,e.starty,e.stopx,e.stopy),Bt.models.addNote(e)},wa=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),Us=t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),F1=t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight});function bY(t,e){Bt.bumpVerticalPos(10);const{startx:r,stopx:i,message:n}=e,s=he.splitBreaks(n).length,a=ye.calculateTextDimensions(n,wa(lt)),o=a.height/s;e.height+=o,Bt.bumpVerticalPos(o);let l,u=a.height-10;const d=a.width;if(r===i){l=Bt.getVerticalPos()+u,lt.rightAngles||(u+=lt.boxMargin,l=Bt.getVerticalPos()+u),u+=30;const f=Math.max(d/2,lt.width/2);Bt.insert(r-f,Bt.getVerticalPos()-10+u,i+f,Bt.getVerticalPos()+30+u)}else u+=lt.boxMargin,l=Bt.getVerticalPos()+u,Bt.insert(r,l-10,i,l);return Bt.bumpVerticalPos(u),e.height+=u,e.stopy=e.starty+e.height,Bt.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),l}const _Y=function(t,e,r,i){const{startx:n,stopx:s,starty:a,message:o,type:l,sequenceIndex:u,sequenceVisible:d}=e,f=ye.calculateTextDimensions(o,wa(lt)),p=qe.getTextObj();p.x=n,p.y=a+10,p.width=s-n,p.class="messageText",p.dy="1em",p.text=o,p.fontFamily=lt.messageFontFamily,p.fontSize=lt.messageFontSize,p.fontWeight=lt.messageFontWeight,p.anchor=lt.messageAlign,p.valign="center",p.textMargin=lt.wrapPadding,p.tspan=!1,ka(t,p);const g=f.width;let _;n===s?lt.rightAngles?_=t.append("path").attr("d",`M ${n},${r} H ${n+Math.max(lt.width/2,g/2)} V ${r+25} H ${n}`):_=t.append("path").attr("d","M "+n+","+r+" C "+(n+60)+","+(r-10)+" "+(n+60)+","+(r+30)+" "+n+","+(r+20)):(_=t.append("line"),_.attr("x1",n),_.attr("y1",r),_.attr("x2",s),_.attr("y2",r)),l===i.db.LINETYPE.DOTTED||l===i.db.LINETYPE.DOTTED_CROSS||l===i.db.LINETYPE.DOTTED_POINT||l===i.db.LINETYPE.DOTTED_OPEN?(_.style("stroke-dasharray","3, 3"),_.attr("class","messageLine1")):_.attr("class","messageLine0");let k="";lt.arrowMarkerAbsolute&&(k=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,k=k.replace(/\(/g,"\\("),k=k.replace(/\)/g,"\\)")),_.attr("stroke-width",2),_.attr("stroke","none"),_.style("fill","none"),(l===i.db.LINETYPE.SOLID||l===i.db.LINETYPE.DOTTED)&&_.attr("marker-end","url("+k+"#arrowhead)"),(l===i.db.LINETYPE.SOLID_POINT||l===i.db.LINETYPE.DOTTED_POINT)&&_.attr("marker-end","url("+k+"#filled-head)"),(l===i.db.LINETYPE.SOLID_CROSS||l===i.db.LINETYPE.DOTTED_CROSS)&&_.attr("marker-end","url("+k+"#crosshead)"),(d||lt.showSequenceNumbers)&&(_.attr("marker-start","url("+k+"#sequencenumber)"),t.append("text").attr("x",n).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(u))},P1=function(t,e,r,i,n,s){if(n.hideUnusedParticipants===!0){const u=new Set;s.forEach(d=>{u.add(d.from),u.add(d.to)}),r=r.filter(d=>u.has(d))}let a=0,o=0,l=0;for(const u of r){const d=e[u];d.width=d.width||lt.width,d.height=Math.max(d.height||lt.height,lt.height),d.margin=d.margin||lt.actorMargin,d.x=a+o,d.y=i;const f=qe.drawActor(t,d,lt);l=Math.max(l,f),Bt.insert(d.x,i,d.x+d.width,d.height),a+=d.width,o+=d.margin,Bt.models.addActor(d)}Bt.bumpVerticalPos(l)},J3=function(t,e,r,i){let n=0,s=0;for(const a of r){const o=e[a],l=kY(o),u=qe.drawPopup(t,o,l,lt,lt.forceMenus,i);u.height>n&&(n=u.height),u.width+o.x>s&&(s=u.width+o.x)}return{maxHeight:n,maxWidth:s}},t4=function(t){pr(lt,t),t.fontFamily&&(lt.actorFontFamily=lt.noteFontFamily=lt.messageFontFamily=t.fontFamily),t.fontSize&&(lt.actorFontSize=lt.noteFontSize=lt.messageFontSize=t.fontSize),t.fontWeight&&(lt.actorFontWeight=lt.noteFontWeight=lt.messageFontWeight=t.fontWeight)},Bu=function(t){return Bt.activations.filter(function(e){return e.actor===t})},ep=function(t,e){const r=e[t],i=Bu(t),n=i.reduce(function(a,o){return Math.min(a,o.startx)},r.x+r.width/2),s=i.reduce(function(a,o){return Math.max(a,o.stopx)},r.x+r.width/2);return[n,s]};function Bi(t,e,r,i,n){Bt.bumpVerticalPos(r);let s=i;if(e.id&&e.message&&t[e.id]){const a=t[e.id].width,o=wa(lt);e.message=ye.wrapLabel(`[${e.message}]`,a-2*lt.wrapPadding,o),e.width=a,e.wrap=!0;const l=ye.calculateTextDimensions(e.message,o),u=Math.max(l.height,lt.labelBoxHeight);s=i+u,B.debug(`${u} - ${e.message}`)}n(e),Bt.bumpVerticalPos(s)}const xY=function(t,e,r,i){const{securityLevel:n,sequence:s}=$();lt=s;let a;n==="sandbox"&&(a=At("#i"+e));const o=At(n==="sandbox"?a.nodes()[0].contentDocument.body:"body"),l=n==="sandbox"?a.nodes()[0].contentDocument:document;Bt.init(),B.debug(i.db);const u=n==="sandbox"?o.select(`[id="${e}"]`):At(`[id="${e}"]`),d=i.db.getActors(),f=i.db.getActorKeys(),p=i.db.getMessages(),g=i.db.getDiagramTitle(),_=vY(d,p,i);lt.height=wY(d,_),qe.insertComputerIcon(u),qe.insertDatabaseIcon(u),qe.insertClockIcon(u),P1(u,d,f,0,lt,p);const k=CY(p,d,_,i);qe.insertArrowHead(u),qe.insertArrowCrossHead(u),qe.insertArrowFilledHead(u),qe.insertSequenceNumber(u);function w(v,D){const m=Bt.endActivation(v);m.starty+18>D&&(m.starty=D-6,D+=12),qe.drawActivation(u,m,D,lt,Bu(v.from.actor).length),Bt.insert(m.startx,D-10,m.stopx,D)}let S=1,A=1;const O=[];p.forEach(function(v){let D,m,Q;switch(v.type){case i.db.LINETYPE.NOTE:m=v.noteModel,mY(u,m);break;case i.db.LINETYPE.ACTIVE_START:Bt.newActivation(v,u,d);break;case i.db.LINETYPE.ACTIVE_END:w(v,Bt.getVerticalPos());break;case i.db.LINETYPE.LOOP_START:Bi(k,v,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,b=>Bt.newLoop(b));break;case i.db.LINETYPE.LOOP_END:D=Bt.endLoop(),qe.drawLoop(u,D,"loop",lt),Bt.bumpVerticalPos(D.stopy-Bt.getVerticalPos()),Bt.models.addLoop(D);break;case i.db.LINETYPE.RECT_START:Bi(k,v,lt.boxMargin,lt.boxMargin,b=>Bt.newLoop(void 0,b.message));break;case i.db.LINETYPE.RECT_END:D=Bt.endLoop(),qe.drawBackgroundRect(u,D),Bt.models.addLoop(D),Bt.bumpVerticalPos(D.stopy-Bt.getVerticalPos());break;case i.db.LINETYPE.OPT_START:Bi(k,v,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,b=>Bt.newLoop(b));break;case i.db.LINETYPE.OPT_END:D=Bt.endLoop(),qe.drawLoop(u,D,"opt",lt),Bt.bumpVerticalPos(D.stopy-Bt.getVerticalPos()),Bt.models.addLoop(D);break;case i.db.LINETYPE.ALT_START:Bi(k,v,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,b=>Bt.newLoop(b));break;case i.db.LINETYPE.ALT_ELSE:Bi(k,v,lt.boxMargin+lt.boxTextMargin,lt.boxMargin,b=>Bt.addSectionToLoop(b));break;case i.db.LINETYPE.ALT_END:D=Bt.endLoop(),qe.drawLoop(u,D,"alt",lt),Bt.bumpVerticalPos(D.stopy-Bt.getVerticalPos()),Bt.models.addLoop(D);break;case i.db.LINETYPE.PAR_START:Bi(k,v,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,b=>Bt.newLoop(b));break;case i.db.LINETYPE.PAR_AND:Bi(k,v,lt.boxMargin+lt.boxTextMargin,lt.boxMargin,b=>Bt.addSectionToLoop(b));break;case i.db.LINETYPE.PAR_END:D=Bt.endLoop(),qe.drawLoop(u,D,"par",lt),Bt.bumpVerticalPos(D.stopy-Bt.getVerticalPos()),Bt.models.addLoop(D);break;case i.db.LINETYPE.AUTONUMBER:S=v.message.start||S,A=v.message.step||A,v.message.visible?i.db.enableSequenceNumbers():i.db.disableSequenceNumbers();break;case i.db.LINETYPE.CRITICAL_START:Bi(k,v,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,b=>Bt.newLoop(b));break;case i.db.LINETYPE.CRITICAL_OPTION:Bi(k,v,lt.boxMargin+lt.boxTextMargin,lt.boxMargin,b=>Bt.addSectionToLoop(b));break;case i.db.LINETYPE.CRITICAL_END:D=Bt.endLoop(),qe.drawLoop(u,D,"critical",lt),Bt.bumpVerticalPos(D.stopy-Bt.getVerticalPos()),Bt.models.addLoop(D);break;case i.db.LINETYPE.BREAK_START:Bi(k,v,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,b=>Bt.newLoop(b));break;case i.db.LINETYPE.BREAK_END:D=Bt.endLoop(),qe.drawLoop(u,D,"break",lt),Bt.bumpVerticalPos(D.stopy-Bt.getVerticalPos()),Bt.models.addLoop(D);break;default:try{Q=v.msgModel,Q.starty=Bt.getVerticalPos(),Q.sequenceIndex=S,Q.sequenceVisible=i.db.showSequenceNumbers();const b=bY(u,Q);O.push({messageModel:Q,lineStartY:b}),Bt.models.addMessage(Q)}catch(b){B.error("error while drawing message",b)}}[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].includes(v.type)&&(S=S+A)}),O.forEach(v=>_Y(u,v.messageModel,v.lineStartY,i)),lt.mirrorActors&&(Bt.bumpVerticalPos(lt.boxMargin*2),P1(u,d,f,Bt.getVerticalPos(),lt,p),Bt.bumpVerticalPos(lt.boxMargin),Z3(u,Bt.getVerticalPos()));const P=J3(u,d,f,l),{bounds:W}=Bt.getBounds();B.debug("For line height fix Querying: #"+e+" .actor-line"),Z1("#"+e+" .actor-line").attr("y2",W.stopy);let z=W.stopy-W.starty;z<P.maxHeight&&(z=P.maxHeight);let H=z+2*lt.diagramMarginY;lt.mirrorActors&&(H=H-lt.boxMargin+lt.bottomMarginAdj);let N=W.stopx-W.startx;N<P.maxWidth&&(N=P.maxWidth);const M=N+2*lt.diagramMarginX;g&&u.append("text").text(g).attr("x",(W.stopx-W.startx)/2-2*lt.diagramMarginX).attr("y",-25),Ei(u,H,M,lt.useMaxWidth);const C=g?40:0;u.attr("viewBox",W.startx-lt.diagramMarginX+" -"+(lt.diagramMarginY+C)+" "+M+" "+(H+C)),B.debug("models:",Bt.models)};function vY(t,e,r){const i={};return e.forEach(function(n){if(t[n.to]&&t[n.from]){const s=t[n.to];if(n.placement===r.db.PLACEMENT.LEFTOF&&!s.prevActor||n.placement===r.db.PLACEMENT.RIGHTOF&&!s.nextActor)return;const a=n.placement!==void 0,o=!a,l=a?Us(lt):wa(lt),u=n.wrap?ye.wrapLabel(n.message,lt.width-2*lt.wrapPadding,l):n.message,f=ye.calculateTextDimensions(u,l).width+2*lt.wrapPadding;o&&n.from===s.nextActor?i[n.to]=Math.max(i[n.to]||0,f):o&&n.from===s.prevActor?i[n.from]=Math.max(i[n.from]||0,f):o&&n.from===n.to?(i[n.from]=Math.max(i[n.from]||0,f/2),i[n.to]=Math.max(i[n.to]||0,f/2)):n.placement===r.db.PLACEMENT.RIGHTOF?i[n.from]=Math.max(i[n.from]||0,f):n.placement===r.db.PLACEMENT.LEFTOF?i[s.prevActor]=Math.max(i[s.prevActor]||0,f):n.placement===r.db.PLACEMENT.OVER&&(s.prevActor&&(i[s.prevActor]=Math.max(i[s.prevActor]||0,f/2)),s.nextActor&&(i[n.from]=Math.max(i[n.from]||0,f/2)))}}),B.debug("maxMessageWidthPerActor:",i),i}const kY=function(t){let e=0;const r=F1(lt);for(const i in t.links){const s=ye.calculateTextDimensions(i,r).width+2*lt.wrapPadding+2*lt.boxMargin;e<s&&(e=s)}return e};function wY(t,e){let r=0;Object.keys(t).forEach(i=>{const n=t[i];n.wrap&&(n.description=ye.wrapLabel(n.description,lt.width-2*lt.wrapPadding,F1(lt)));const s=ye.calculateTextDimensions(n.description,F1(lt));n.width=n.wrap?lt.width:Math.max(lt.width,s.width+2*lt.wrapPadding),n.height=n.wrap?Math.max(s.height,lt.height):lt.height,r=Math.max(r,n.height)});for(const i in e){const n=t[i];if(!n)continue;const s=t[n.nextActor];if(!s)continue;const o=e[i]+lt.actorMargin-n.width/2-s.width/2;n.margin=Math.max(o,lt.actorMargin)}return Math.max(r,lt.height)}const TY=function(t,e,r){const i=e[t.from].x,n=e[t.to].x,s=t.wrap&&t.message;let a=ye.calculateTextDimensions(s?ye.wrapLabel(t.message,lt.width,Us(lt)):t.message,Us(lt));const o={width:s?lt.width:Math.max(lt.width,a.width+2*lt.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===r.db.PLACEMENT.RIGHTOF?(o.width=s?Math.max(lt.width,a.width):Math.max(e[t.from].width/2+e[t.to].width/2,a.width+2*lt.noteMargin),o.startx=i+(e[t.from].width+lt.actorMargin)/2):t.placement===r.db.PLACEMENT.LEFTOF?(o.width=Math.max(s?lt.width:e[t.from].width/2+e[t.to].width/2,a.width+2*lt.noteMargin),o.startx=i-o.width+(e[t.from].width-lt.actorMargin)/2):t.to===t.from?(a=ye.calculateTextDimensions(s?ye.wrapLabel(t.message,Math.max(lt.width,e[t.from].width),Us(lt)):t.message,Us(lt)),o.width=s?Math.max(lt.width,e[t.from].width):Math.max(e[t.from].width,lt.width,a.width+2*lt.noteMargin),o.startx=i+(e[t.from].width-o.width)/2):(o.width=Math.abs(i+e[t.from].width/2-(n+e[t.to].width/2))+lt.actorMargin,o.startx=i<n?i+e[t.from].width/2-lt.actorMargin/2:n+e[t.to].width/2-lt.actorMargin/2),s&&(o.message=ye.wrapLabel(t.message,o.width-2*lt.wrapPadding,Us(lt))),B.debug(`NM:[${o.startx},${o.stopx},${o.starty},${o.stopy}:${o.width},${o.height}=${t.message}]`),o},EY=function(t,e,r){let i=!1;if([r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT].includes(t.type)&&(i=!0),!i)return{};const n=ep(t.from,e),s=ep(t.to,e),a=n[0]<=s[0]?1:0,o=n[0]<s[0]?0:1,l=[...n,...s],u=Math.abs(s[o]-n[a]);t.wrap&&t.message&&(t.message=ye.wrapLabel(t.message,Math.max(u+2*lt.wrapPadding,lt.width),wa(lt)));const d=ye.calculateTextDimensions(t.message,wa(lt));return{width:Math.max(t.wrap?0:d.width+2*lt.wrapPadding,u+2*lt.wrapPadding,lt.width),height:0,startx:n[a],stopx:s[o],starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,l),toBounds:Math.max.apply(null,l)}},CY=function(t,e,r,i){const n={},s=[];let a,o,l;return t.forEach(function(u){switch(u.id=ye.random({length:10}),u.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.CRITICAL_START:case i.db.LINETYPE.BREAK_START:s.push({id:u.id,msg:u.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:u.message&&(a=s.pop(),n[a.id]=a,n[u.id]=a,s.push(a));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:a=s.pop(),n[a.id]=a;break;case i.db.LINETYPE.ACTIVE_START:{const f=e[u.from?u.from.actor:u.to.actor],p=Bu(u.from?u.from.actor:u.to.actor).length,g=f.x+f.width/2+(p-1)*lt.activationWidth/2,_={startx:g,stopx:g+lt.activationWidth,actor:u.from.actor,enabled:!0};Bt.activations.push(_)}break;case i.db.LINETYPE.ACTIVE_END:{const f=Bt.activations.map(p=>p.actor).lastIndexOf(u.from.actor);delete Bt.activations.splice(f,1)[0]}break}u.placement!==void 0?(o=TY(u,e,i),u.noteModel=o,s.forEach(f=>{a=f,a.from=Math.min(a.from,o.startx),a.to=Math.max(a.to,o.startx+o.width),a.width=Math.max(a.width,Math.abs(a.from-a.to))-lt.labelBoxWidth})):(l=EY(u,e,i),u.msgModel=l,l.startx&&l.stopx&&s.length>0&&s.forEach(f=>{if(a=f,l.startx===l.stopx){const p=e[u.from],g=e[u.to];a.from=Math.min(p.x-l.width/2,p.x-p.width/2,a.from),a.to=Math.max(g.x+l.width/2,g.x+p.width/2,a.to),a.width=Math.max(a.width,Math.abs(a.to-a.from))-lt.labelBoxWidth}else a.from=Math.min(l.startx,a.from),a.to=Math.max(l.stopx,a.to),a.width=Math.max(a.width,l.width)-lt.labelBoxWidth}))}),Bt.activations=[],B.debug("Loop type widths:",n),n},rp={bounds:Bt,drawActors:P1,drawActorsPopup:J3,setConf:t4,draw:xY};var Y1=function(){var t=function(j,ot,rt,it){for(rt=rt||{},it=j.length;it--;rt[j[it]]=ot);return rt},e=[1,2],r=[1,3],i=[1,5],n=[1,7],s=[2,5],a=[1,15],o=[1,17],l=[1,21],u=[1,22],d=[1,23],f=[1,24],p=[1,37],g=[1,25],_=[1,26],k=[1,27],w=[1,28],S=[1,29],A=[1,32],O=[1,33],P=[1,34],W=[1,35],q=[1,36],z=[1,39],H=[1,40],N=[1,41],M=[1,42],C=[1,38],v=[1,45],D=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],m=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],Q=[1,4,5,7,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],b=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],ct={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,directive:6,SD:7,document:8,line:9,statement:10,classDefStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,class:42,CLASSENTITY_IDS:43,STYLECLASS:44,openDirective:45,typeDirective:46,closeDirective:47,":":48,argDirective:49,direction_tb:50,direction_bt:51,direction_rl:52,direction_lr:53,eol:54,";":55,EDGE_STATE:56,STYLE_SEPARATOR:57,left_of:58,right_of:59,open_directive:60,type_directive:61,arg_directive:62,close_directive:63,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",7:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"class",43:"CLASSENTITY_IDS",44:"STYLECLASS",48:":",50:"direction_tb",51:"direction_bt",52:"direction_rl",53:"direction_lr",55:";",56:"EDGE_STATE",57:"STYLE_SEPARATOR",58:"left_of",59:"right_of",60:"open_directive",61:"type_directive",62:"arg_directive",63:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[10,1],[10,1],[10,1],[10,2],[10,3],[10,4],[10,1],[10,2],[10,1],[10,4],[10,3],[10,6],[10,1],[10,1],[10,1],[10,1],[10,4],[10,4],[10,1],[10,1],[10,2],[10,2],[10,1],[11,3],[11,3],[12,3],[6,3],[6,5],[32,1],[32,1],[32,1],[32,1],[54,1],[54,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1],[45,1],[46,1],[49,1],[47,1]],performAction:function(ot,rt,it,ut,bt,K,Ot){var Y=K.length-1;switch(bt){case 4:return ut.setRootDoc(K[Y]),K[Y];case 5:this.$=[];break;case 6:K[Y]!="nl"&&(K[Y-1].push(K[Y]),this.$=K[Y-1]);break;case 7:case 8:this.$=K[Y];break;case 9:this.$="nl";break;case 12:this.$=K[Y];break;case 13:const I=K[Y-1];I.description=ut.trimColon(K[Y]),this.$=I;break;case 14:this.$={stmt:"relation",state1:K[Y-2],state2:K[Y]};break;case 15:const L=ut.trimColon(K[Y]);this.$={stmt:"relation",state1:K[Y-3],state2:K[Y-1],description:L};break;case 19:this.$={stmt:"state",id:K[Y-3],type:"default",description:"",doc:K[Y-1]};break;case 20:var U=K[Y],X=K[Y-2].trim();if(K[Y].match(":")){var F=K[Y].split(":");U=F[0],X=[X,F[1]]}this.$={stmt:"state",id:U,type:"default",description:X};break;case 21:this.$={stmt:"state",id:K[Y-3],type:"default",description:K[Y-5],doc:K[Y-1]};break;case 22:this.$={stmt:"state",id:K[Y],type:"fork"};break;case 23:this.$={stmt:"state",id:K[Y],type:"join"};break;case 24:this.$={stmt:"state",id:K[Y],type:"choice"};break;case 25:this.$={stmt:"state",id:ut.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:K[Y-1].trim(),note:{position:K[Y-2].trim(),text:K[Y].trim()}};break;case 30:this.$=K[Y].trim(),ut.setAccTitle(this.$);break;case 31:case 32:this.$=K[Y].trim(),ut.setAccDescription(this.$);break;case 33:case 34:this.$={stmt:"classDef",id:K[Y-1].trim(),classes:K[Y].trim()};break;case 35:this.$={stmt:"applyClass",id:K[Y-1].trim(),styleClass:K[Y].trim()};break;case 38:ut.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:ut.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:ut.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:ut.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:K[Y].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:K[Y-2].trim(),classes:[K[Y].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:K[Y-2].trim(),classes:[K[Y].trim()],type:"default",description:""};break;case 50:ut.parseDirective("%%{","open_directive");break;case 51:ut.parseDirective(K[Y],"type_directive");break;case 52:K[Y]=K[Y].trim().replace(/'/g,'"'),ut.parseDirective(K[Y],"arg_directive");break;case 53:ut.parseDirective("}%%","close_directive","state");break}},table:[{3:1,4:e,5:r,6:4,7:i,45:6,60:n},{1:[3]},{3:8,4:e,5:r,6:4,7:i,45:6,60:n},{3:9,4:e,5:r,6:4,7:i,45:6,60:n},{3:10,4:e,5:r,6:4,7:i,45:6,60:n},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],s,{8:11}),{46:12,61:[1,13]},{61:[2,50]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:a,5:o,6:30,9:14,10:16,11:18,12:19,13:20,16:l,17:u,19:d,22:f,24:p,25:g,26:_,27:k,28:w,29:S,32:31,33:A,35:O,37:P,38:W,42:q,45:6,50:z,51:H,52:N,53:M,56:C,60:n},{47:43,48:[1,44],63:v},t([48,63],[2,51]),t(D,[2,6]),{6:30,10:46,11:18,12:19,13:20,16:l,17:u,19:d,22:f,24:p,25:g,26:_,27:k,28:w,29:S,32:31,33:A,35:O,37:P,38:W,42:q,45:6,50:z,51:H,52:N,53:M,56:C,60:n},t(D,[2,8]),t(D,[2,9]),t(D,[2,10]),t(D,[2,11]),t(D,[2,12],{14:[1,47],15:[1,48]}),t(D,[2,16]),{18:[1,49]},t(D,[2,18],{20:[1,50]}),{23:[1,51]},t(D,[2,22]),t(D,[2,23]),t(D,[2,24]),t(D,[2,25]),{30:52,31:[1,53],58:[1,54],59:[1,55]},t(D,[2,28]),t(D,[2,29]),{34:[1,56]},{36:[1,57]},t(D,[2,32]),{39:[1,58],41:[1,59]},{43:[1,60]},t(m,[2,44],{57:[1,61]}),t(m,[2,45],{57:[1,62]}),t(D,[2,38]),t(D,[2,39]),t(D,[2,40]),t(D,[2,41]),t(Q,[2,36]),{49:63,62:[1,64]},t(Q,[2,53]),t(D,[2,7]),t(D,[2,13]),{13:65,24:p,56:C},t(D,[2,17]),t(b,s,{8:66}),{24:[1,67]},{24:[1,68]},{23:[1,69]},{24:[2,48]},{24:[2,49]},t(D,[2,30]),t(D,[2,31]),{40:[1,70]},{40:[1,71]},{44:[1,72]},{24:[1,73]},{24:[1,74]},{47:75,63:v},{63:[2,52]},t(D,[2,14],{14:[1,76]}),{4:a,5:o,6:30,9:14,10:16,11:18,12:19,13:20,16:l,17:u,19:d,21:[1,77],22:f,24:p,25:g,26:_,27:k,28:w,29:S,32:31,33:A,35:O,37:P,38:W,42:q,45:6,50:z,51:H,52:N,53:M,56:C,60:n},t(D,[2,20],{20:[1,78]}),{31:[1,79]},{24:[1,80]},t(D,[2,33]),t(D,[2,34]),t(D,[2,35]),t(m,[2,46]),t(m,[2,47]),t(Q,[2,37]),t(D,[2,15]),t(D,[2,19]),t(b,s,{8:81}),t(D,[2,26]),t(D,[2,27]),{4:a,5:o,6:30,9:14,10:16,11:18,12:19,13:20,16:l,17:u,19:d,21:[1,82],22:f,24:p,25:g,26:_,27:k,28:w,29:S,32:31,33:A,35:O,37:P,38:W,42:q,45:6,50:z,51:H,52:N,53:M,56:C,60:n},t(D,[2,21])],defaultActions:{7:[2,50],8:[2,1],9:[2,2],10:[2,3],54:[2,48],55:[2,49],64:[2,52]},parseError:function(ot,rt){if(rt.recoverable)this.trace(ot);else{var it=new Error(ot);throw it.hash=rt,it}},parse:function(ot){var rt=this,it=[0],ut=[],bt=[null],K=[],Ot=this.table,Y="",U=0,X=0,F=2,I=1,L=K.slice.call(arguments,1),J=Object.create(this.lexer),T={yy:{}};for(var ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ht)&&(T.yy[ht]=this.yy[ht]);J.setInput(ot,T.yy),T.yy.lexer=J,T.yy.parser=this,typeof J.yylloc>"u"&&(J.yylloc={});var V=J.yylloc;K.push(V);var Yt=J.options&&J.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function et(){var Kt;return Kt=ut.pop()||J.lex()||I,typeof Kt!="number"&&(Kt instanceof Array&&(ut=Kt,Kt=ut.pop()),Kt=rt.symbols_[Kt]||Kt),Kt}for(var Mt,Tt,gt,Et,wt={},pt,st,le,Xt;;){if(Tt=it[it.length-1],this.defaultActions[Tt]?gt=this.defaultActions[Tt]:((Mt===null||typeof Mt>"u")&&(Mt=et()),gt=Ot[Tt]&&Ot[Tt][Mt]),typeof gt>"u"||!gt.length||!gt[0]){var jt="";Xt=[];for(pt in Ot[Tt])this.terminals_[pt]&&pt>F&&Xt.push("'"+this.terminals_[pt]+"'");J.showPosition?jt="Parse error on line "+(U+1)+`:
|
|
1259
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var U=this.next();return U||this.lex()},begin:function(U){this.conditionStack.push(U)},popState:function(){var U=this.conditionStack.length-1;return U>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(U){return U=this.conditionStack.length-1-Math.abs(U||0),U>=0?this.conditionStack[U]:"INITIAL"},pushState:function(U){this.begin(U)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(U,X,F,I){switch(F){case 0:return this.begin("open_directive"),79;case 1:return this.begin("type_directive"),80;case 2:return this.popState(),this.begin("arg_directive"),14;case 3:return this.popState(),this.popState(),82;case 4:return 81;case 5:return 5;case 6:break;case 7:break;case 8:break;case 9:break;case 10:break;case 11:return 23;case 12:return this.begin("ID"),16;case 13:return this.begin("ID"),20;case 14:return X.yytext=X.yytext.trim(),this.begin("ALIAS"),69;case 15:return this.popState(),this.popState(),this.begin("LINE"),18;case 16:return this.popState(),this.popState(),5;case 17:return this.begin("LINE"),39;case 18:return this.begin("LINE"),41;case 19:return this.begin("LINE"),42;case 20:return this.begin("LINE"),43;case 21:return this.begin("LINE"),52;case 22:return this.begin("LINE"),45;case 23:return this.begin("LINE"),51;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),50;case 26:return this.begin("LINE"),49;case 27:return this.popState(),19;case 28:return 40;case 29:return 64;case 30:return 65;case 31:return 58;case 32:return 59;case 33:return 60;case 34:return 61;case 35:return 56;case 36:return 53;case 37:return this.begin("ID"),25;case 38:return this.begin("ID"),26;case 39:return 32;case 40:return 33;case 41:return this.begin("acc_title"),34;case 42:return this.popState(),"acc_title_value";case 43:return this.begin("acc_descr"),36;case 44:return this.popState(),"acc_descr_value";case 45:this.begin("acc_descr_multiline");break;case 46:this.popState();break;case 47:return"acc_descr_multiline_value";case 48:return 7;case 49:return 22;case 50:return 24;case 51:return 63;case 52:return 5;case 53:return X.yytext=X.yytext.trim(),69;case 54:return 72;case 55:return 73;case 56:return 70;case 57:return 71;case 58:return 74;case 59:return 75;case 60:return 76;case 61:return 77;case 62:return 78;case 63:return 67;case 64:return 68;case 65:return 5;case 66:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:[^\->:\n,;]+?([\-]*[^\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?: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,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[46,47],inclusive:!1},acc_descr:{rules:[44],inclusive:!1},acc_title:{rules:[42],inclusive:!1},open_directive:{rules:[1,8],inclusive:!1},type_directive:{rules:[2,3,8],inclusive:!1},arg_directive:{rules:[3,4,8],inclusive:!1},ID:{rules:[7,8,14],inclusive:!1},ALIAS:{rules:[7,8,15,16],inclusive:!1},LINE:{rules:[7,8,27],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,12,13,17,18,19,20,21,22,23,24,25,26,28,29,30,31,32,33,34,35,36,37,38,39,40,41,43,45,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66],inclusive:!0}}};return Ot}();ut.lexer=bt;function K(){this.yy={}}return K.prototype=ut,ut.Parser=K,new K}();B1.parser=B1;const NP=B1,BP=t=>t.match(/^\s*sequenceDiagram/)!==null;let qa,Yn={},di=[],Du=!1,I1;const IP=function(t,e,r){ze.parseDirective(this,t,e,r)},O1=function(t,e,r,i){const n=Yn[t];n&&e===n.name&&r==null||((r==null||r.text==null)&&(r={text:e,wrap:null,type:i}),(i==null||r.text==null)&&(r={text:e,wrap:null,type:i}),Yn[t]={name:e,description:r.text,wrap:r.wrap===void 0&&va()||!!r.wrap,prevActor:qa,links:{},properties:{},actorCnt:null,rectData:null,type:i||"participant"},qa&&Yn[qa]&&(Yn[qa].nextActor=t),qa=t)},OP=t=>{let e,r=0;for(e=0;e<di.length;e++)di[e].type===Ro.ACTIVE_START&&di[e].from.actor===t&&r++,di[e].type===Ro.ACTIVE_END&&di[e].from.actor===t&&r--;return r},RP=function(t,e,r,i){di.push({from:t,to:e,message:r.text,wrap:r.wrap===void 0&&va()||!!r.wrap,answer:i})},Xe=function(t,e,r={text:void 0,wrap:void 0},i){if(i===Ro.ACTIVE_END&&OP(t.actor)<1){let s=new Error("Trying to inactivate an inactive participant ("+t.actor+")");throw s.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},s}return di.push({from:t,to:e,message:r.text,wrap:r.wrap===void 0&&va()||!!r.wrap,type:i}),!0},FP=function(){return di},PP=function(){return Yn},Jo=function(t){return Yn[t]},YP=function(){return Object.keys(Yn)},VP=function(){Du=!0},UP=function(){Du=!1},zP=()=>Du,WP=function(t){I1=t},va=()=>I1!==void 0?I1:$().sequence.wrap,HP=function(){Yn={},di=[],Du=!1,Ci()},GP=function(t){const e=t.trim(),r={text:e.replace(/^:?(?:no)?wrap:/,"").trim(),wrap:e.match(/^:?wrap:/)!==null?!0:e.match(/^:?nowrap:/)!==null?!1:void 0};return B.debug("parseMessage:",r),r},Ro={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},qP={FILLED:0,OPEN:1},jP={LEFTOF:0,RIGHTOF:1,OVER:2},V3=function(t,e,r){r.text,r.wrap===void 0&&va()||r.wrap;const i=[].concat(t,t);di.push({from:i[0],to:i[1],message:r.text,wrap:r.wrap===void 0&&va()||!!r.wrap,type:Ro.NOTE,placement:e})},U3=function(t,e){const r=Jo(t);try{let i=vi(e.text,$());i=i.replace(/&/g,"&"),i=i.replace(/=/g,"=");const n=JSON.parse(i);ad(r,n)}catch(i){B.error("error while parsing actor link text",i)}},$P=function(t,e){const r=Jo(t);try{const a={};let o=vi(e.text,$());var i=o.indexOf("@");o=o.replace(/&/g,"&"),o=o.replace(/=/g,"=");var n=o.slice(0,i-1).trim(),s=o.slice(i+1).trim();a[n]=s,ad(r,a)}catch(a){B.error("error while parsing actor link text",a)}};function ad(t,e){if(t.links==null)t.links=e;else for(let r in e)t.links[r]=e[r]}const z3=function(t,e){const r=Jo(t);try{let i=vi(e.text,$());const n=JSON.parse(i);W3(r,n)}catch(i){B.error("error while parsing actor properties text",i)}};function W3(t,e){if(t.properties==null)t.properties=e;else for(let r in e)t.properties[r]=e[r]}const H3=function(t,e){const r=Jo(t),i=document.getElementById(e.text);try{const n=i.innerHTML,s=JSON.parse(n);s.properties&&W3(r,s.properties),s.links&&ad(r,s.links)}catch(n){B.error("error while parsing actor details text",n)}},XP=function(t,e){if(t!==void 0&&t.properties!==void 0)return t.properties[e]},G3=function(t){if(Array.isArray(t))t.forEach(function(e){G3(e)});else switch(t.type){case"sequenceIndex":di.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":O1(t.actor,t.actor,t.description,"participant");break;case"addActor":O1(t.actor,t.actor,t.description,"actor");break;case"activeStart":Xe(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":Xe(t.actor,void 0,void 0,t.signalType);break;case"addNote":V3(t.actor,t.placement,t.text);break;case"addLinks":U3(t.actor,t.text);break;case"addALink":$P(t.actor,t.text);break;case"addProperties":z3(t.actor,t.text);break;case"addDetails":H3(t.actor,t.text);break;case"addMessage":Xe(t.from,t.to,t.msg,t.signalType);break;case"loopStart":Xe(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":Xe(void 0,void 0,void 0,t.signalType);break;case"rectStart":Xe(void 0,void 0,t.color,t.signalType);break;case"rectEnd":Xe(void 0,void 0,void 0,t.signalType);break;case"optStart":Xe(void 0,void 0,t.optText,t.signalType);break;case"optEnd":Xe(void 0,void 0,void 0,t.signalType);break;case"altStart":Xe(void 0,void 0,t.altText,t.signalType);break;case"else":Xe(void 0,void 0,t.altText,t.signalType);break;case"altEnd":Xe(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":ii(t.text);break;case"parStart":Xe(void 0,void 0,t.parText,t.signalType);break;case"and":Xe(void 0,void 0,t.parText,t.signalType);break;case"parEnd":Xe(void 0,void 0,void 0,t.signalType);break;case"criticalStart":Xe(void 0,void 0,t.criticalText,t.signalType);break;case"option":Xe(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":Xe(void 0,void 0,void 0,t.signalType);break;case"breakStart":Xe(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":Xe(void 0,void 0,void 0,t.signalType);break}},tp={addActor:O1,addMessage:RP,addSignal:Xe,addLinks:U3,addDetails:H3,addProperties:z3,autoWrap:va,setWrap:WP,enableSequenceNumbers:VP,disableSequenceNumbers:UP,showSequenceNumbers:zP,getMessages:FP,getActors:PP,getActor:Jo,getActorKeys:YP,getActorProperty:XP,getAccTitle:Si,getDiagramTitle:Sn,setDiagramTitle:Cn,parseDirective:IP,getConfig:()=>$().sequence,clear:HP,parseMessage:GP,LINETYPE:Ro,ARROWTYPE:qP,PLACEMENT:jP,addNote:V3,setAccTitle:ii,apply:G3,setAccDescription:Ai,getAccDescription:Li};let R1=[];const KP=t=>{R1.push(t)},q3=()=>{R1.forEach(t=>{t()}),R1=[]},Mu=function(t,e){const r=t.append("rect");return r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),e.class!==void 0&&r.attr("class",e.class),r},j3=(t,e)=>{KP(()=>{const r=document.querySelectorAll(t);r.length!==0&&(r[0].addEventListener("mouseover",function(){tY("actor"+e+"_popup")}),r[0].addEventListener("mouseout",function(){eY("actor"+e+"_popup")}))})},ZP=function(t,e,r,i,n){if(e.links===void 0||e.links===null||Object.keys(e.links).length===0)return{height:0,width:0};const s=e.links,a=e.actorCnt,o=e.rectData;var l="none";n&&(l="block !important");const u=t.append("g");u.attr("id","actor"+a+"_popup"),u.attr("class","actorPopupMenu"),u.attr("display",l),j3("#actor"+a+"_popup",a);var d="";o.class!==void 0&&(d=" "+o.class);let f=o.width>r?o.width:r;const p=u.append("rect");if(p.attr("class","actorPopupMenuPanel"+d),p.attr("x",o.x),p.attr("y",o.height),p.attr("fill",o.fill),p.attr("stroke",o.stroke),p.attr("width",f),p.attr("height",o.height),p.attr("rx",o.rx),p.attr("ry",o.ry),s!=null){var g=20;for(let w in s){var _=u.append("a"),k=wn(s[w]);_.attr("xlink:href",k),_.attr("target","_blank"),yY(i)(w,_,o.x+10,o.height+g,f,20,{class:"actor"},i),g+=30}}return p.attr("height",g),{height:o.height+g,width:f}},$3=function(t,e,r,i){const n=t.append("image");n.attr("x",e),n.attr("y",r);var s=wn(i);n.attr("xlink:href",s)},X3=function(t,e,r,i){const n=t.append("use");n.attr("x",e),n.attr("y",r);var s=wn(i);n.attr("xlink:href","#"+s)},QP=function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = 'block'; }"},JP=function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = 'none'; }"},tY=function(t){var e=document.getElementById(t);e!=null&&(e.style.display="block")},eY=function(t){var e=document.getElementById(t);e!=null&&(e.style.display="none")},ka=function(t,e){let r=0,i=0;const n=e.text.split(he.lineBreakRegex);let s=[],a=0,o=()=>e.y;if(e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0)switch(e.valign){case"top":case"start":o=()=>Math.round(e.y+e.textMargin);break;case"middle":case"center":o=()=>Math.round(e.y+(r+i+e.textMargin)/2);break;case"bottom":case"end":o=()=>Math.round(e.y+(r+i+2*e.textMargin)-e.textMargin);break}if(e.anchor!==void 0&&e.textMargin!==void 0&&e.width!==void 0)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle";break}for(let[l,u]of n.entries()){e.textMargin!==void 0&&e.textMargin===0&&e.fontSize!==void 0&&(a=l*e.fontSize);const d=t.append("text");if(d.attr("x",e.x),d.attr("y",o()),e.anchor!==void 0&&d.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),e.fontFamily!==void 0&&d.style("font-family",e.fontFamily),e.fontSize!==void 0&&d.style("font-size",e.fontSize),e.fontWeight!==void 0&&d.style("font-weight",e.fontWeight),e.fill!==void 0&&d.attr("fill",e.fill),e.class!==void 0&&d.attr("class",e.class),e.dy!==void 0?d.attr("dy",e.dy):a!==0&&d.attr("dy",a),e.tspan){const f=d.append("tspan");f.attr("x",e.x),e.fill!==void 0&&f.attr("fill",e.fill),f.text(u)}else d.text(u);e.valign!==void 0&&e.textMargin!==void 0&&e.textMargin>0&&(i+=(d._groups||d)[0][0].getBBox().height,r=i),s.push(d)}return s},K3=function(t,e){function r(n,s,a,o,l){return n+","+s+" "+(n+a)+","+s+" "+(n+a)+","+(s+o-l)+" "+(n+a-l*1.2)+","+(s+o)+" "+n+","+(s+o)}const i=t.append("polygon");return i.attr("points",r(e.x,e.y,e.width,e.height,7)),i.attr("class","labelBox"),e.y=e.y+e.height/2,ka(t,e),i};let Ri=-1;const Z3=(t,e)=>{t.selectAll&&t.selectAll(".actor-line").attr("class","200").attr("y2",e-55)},rY=function(t,e,r){const i=e.x+e.width/2,n=t.append("g");var s=n;e.y===0&&(Ri++,s.append("line").attr("id","actor"+Ri).attr("x1",i).attr("y1",5).attr("x2",i).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"),s=n.append("g"),e.actorCnt=Ri,e.links!=null&&(s.attr("id","root-"+Ri),j3("#root-"+Ri,Ri)));const a=Nu();var o="actor";e.properties!=null&&e.properties.class?o=e.properties.class:a.fill="#eaeaea",a.x=e.x,a.y=e.y,a.width=e.width,a.height=e.height,a.class=o,a.rx=3,a.ry=3;const l=Mu(s,a);if(e.rectData=a,e.properties!=null&&e.properties.icon){const d=e.properties.icon.trim();d.charAt(0)==="@"?X3(s,a.x+a.width-20,a.y+10,d.substr(1)):$3(s,a.x+a.width-20,a.y+10,d)}Q3(r)(e.description,s,a.x,a.y,a.width,a.height,{class:"actor"},r);let u=e.height;if(l.node){const d=l.node().getBBox();e.height=d.height,u=d.height}return u},iY=function(t,e,r){const i=e.x+e.width/2;e.y===0&&(Ri++,t.append("line").attr("id","actor"+Ri).attr("x1",i).attr("y1",80).attr("x2",i).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));const n=t.append("g");n.attr("class","actor-man");const s=Nu();s.x=e.x,s.y=e.y,s.fill="#eaeaea",s.width=e.width,s.height=e.height,s.class="actor",s.rx=3,s.ry=3,n.append("line").attr("id","actor-man-torso"+Ri).attr("x1",i).attr("y1",e.y+25).attr("x2",i).attr("y2",e.y+45),n.append("line").attr("id","actor-man-arms"+Ri).attr("x1",i-18).attr("y1",e.y+33).attr("x2",i+18).attr("y2",e.y+33),n.append("line").attr("x1",i-18).attr("y1",e.y+60).attr("x2",i).attr("y2",e.y+45),n.append("line").attr("x1",i).attr("y1",e.y+45).attr("x2",i+16).attr("y2",e.y+60);const a=n.append("circle");a.attr("cx",e.x+e.width/2),a.attr("cy",e.y+10),a.attr("r",15),a.attr("width",e.width),a.attr("height",e.height);const o=n.node().getBBox();return e.height=o.height,Q3(r)(e.description,n,s.x,s.y+35,s.width,s.height,{class:"actor"},r),e.height},nY=function(t,e,r){switch(e.type){case"actor":return iY(t,e,r);case"participant":return rY(t,e,r)}},sY=function(t){return t.append("g")},aY=function(t,e,r,i,n){const s=Nu(),a=e.anchored;s.x=e.startx,s.y=e.starty,s.class="activation"+n%3,s.width=e.stopx-e.startx,s.height=r-e.starty,Mu(a,s)},oY=function(t,e,r,i){const{boxMargin:n,boxTextMargin:s,labelBoxHeight:a,labelBoxWidth:o,messageFontFamily:l,messageFontSize:u,messageFontWeight:d}=i,f=t.append("g"),p=function(k,w,S,A){return f.append("line").attr("x1",k).attr("y1",w).attr("x2",S).attr("y2",A).attr("class","loopLine")};p(e.startx,e.starty,e.stopx,e.starty),p(e.stopx,e.starty,e.stopx,e.stopy),p(e.startx,e.stopy,e.stopx,e.stopy),p(e.startx,e.starty,e.startx,e.stopy),e.sections!==void 0&&e.sections.forEach(function(k){p(e.startx,k.y,e.stopx,k.y).style("stroke-dasharray","3, 3")});let g=F1();g.text=r,g.x=e.startx,g.y=e.starty,g.fontFamily=l,g.fontSize=u,g.fontWeight=d,g.anchor="middle",g.valign="middle",g.tspan=!1,g.width=o||50,g.height=a||20,g.textMargin=s,g.class="labelText",K3(f,g),g=F1(),g.text=e.title,g.x=e.startx+o/2+(e.stopx-e.startx)/2,g.y=e.starty+n+s,g.anchor="middle",g.valign="middle",g.textMargin=s,g.class="loopText",g.fontFamily=l,g.fontSize=u,g.fontWeight=d,g.wrap=!0;let _=ka(f,g);return e.sectionTitles!==void 0&&e.sectionTitles.forEach(function(k,w){if(k.message){g.text=k.message,g.x=e.startx+(e.stopx-e.startx)/2,g.y=e.sections[w].y+n+s,g.class="loopText",g.anchor="middle",g.valign="middle",g.tspan=!1,g.fontFamily=l,g.fontSize=u,g.fontWeight=d,g.wrap=e.wrap,_=ka(f,g);let S=Math.round(_.map(A=>(A._groups||A)[0][0].getBBox().height).reduce((A,O)=>A+O));e.sections[w].height+=S-(n+s)}}),e.height=Math.round(e.stopy-e.starty),f},lY=function(t,e){Mu(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},cY=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")},uY=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")},hY=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")},dY=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")},fY=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")},pY=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)},gY=function(t){t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",4).attr("refY",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")},F1=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}},Nu=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},Q3=function(){function t(n,s,a,o,l,u,d){const f=s.append("text").attr("x",a+l/2).attr("y",o+u/2+5).style("text-anchor","middle").text(n);i(f,d)}function e(n,s,a,o,l,u,d,f){const{actorFontSize:p,actorFontFamily:g,actorFontWeight:_}=f;let k=p&&p.replace?p.replace("px",""):p;const w=n.split(he.lineBreakRegex);for(let S=0;S<w.length;S++){const A=S*k-k*(w.length-1)/2,O=s.append("text").attr("x",a+l/2).attr("y",o).style("text-anchor","middle").style("font-size",p).style("font-weight",_).style("font-family",g);O.append("tspan").attr("x",a+l/2).attr("dy",A).text(w[S]),O.attr("y",o+u/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(O,d)}}function r(n,s,a,o,l,u,d,f){const p=s.append("switch"),_=p.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",u).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");_.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,p,a,o,l,u,d,f),i(_,d)}function i(n,s){for(const a in s)s.hasOwnProperty(a)&&n.attr(a,s[a])}return function(n){return n.textPlacement==="fo"?r:n.textPlacement==="old"?t:e}}(),yY=function(){function t(n,s,a,o,l,u,d){const f=s.append("text").attr("x",a).attr("y",o).style("text-anchor","start").text(n);i(f,d)}function e(n,s,a,o,l,u,d,f){const{actorFontSize:p,actorFontFamily:g,actorFontWeight:_}=f,k=n.split(he.lineBreakRegex);for(let w=0;w<k.length;w++){const S=w*p-p*(k.length-1)/2,A=s.append("text").attr("x",a).attr("y",o).style("text-anchor","start").style("font-size",p).style("font-weight",_).style("font-family",g);A.append("tspan").attr("x",a).attr("dy",S).text(k[w]),A.attr("y",o+u/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(A,d)}}function r(n,s,a,o,l,u,d,f){const p=s.append("switch"),_=p.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",u).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");_.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,p,a,o,l,u,d,f),i(_,d)}function i(n,s){for(const a in s)s.hasOwnProperty(a)&&n.attr(a,s[a])}return function(n){return n.textPlacement==="fo"?r:n.textPlacement==="old"?t:e}}(),qe={drawRect:Mu,drawText:ka,drawLabel:K3,drawActor:nY,drawPopup:ZP,drawImage:$3,drawEmbeddedImage:X3,anchorElement:sY,drawActivation:aY,drawLoop:oY,drawBackgroundRect:lY,insertArrowHead:dY,insertArrowFilledHead:fY,insertSequenceNumber:pY,insertArrowCrossHead:gY,insertDatabaseIcon:cY,insertComputerIcon:uY,insertClockIcon:hY,getTextObj:F1,getNoteRect:Nu,popupMenu:QP,popdownMenu:JP,fixLifeLineHeights:Z3,sanitizeUrl:wn};let lt={};const Bt={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(t=>t.height||0))+(this.loops.length===0?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.messages.length===0?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.notes.length===0?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},clear:function(){this.actors=[],this.loops=[],this.messages=[],this.notes=[]},addActor:function(t){this.actors.push(t)},addLoop:function(t){this.loops.push(t)},addMessage:function(t){this.messages.push(t)},addNote:function(t){this.notes.push(t)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],loops:[],messages:[],notes:[]},init: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,t4($())},updateVal:function(t,e,r,i){t[e]===void 0?t[e]=r:t[e]=i(r,t[e])},updateBounds:function(t,e,r,i){const n=this;let s=0;function a(o){return function(u){s++;const d=n.sequenceItems.length-s+1;n.updateVal(u,"starty",e-d*lt.boxMargin,Math.min),n.updateVal(u,"stopy",i+d*lt.boxMargin,Math.max),n.updateVal(Bt.data,"startx",t-d*lt.boxMargin,Math.min),n.updateVal(Bt.data,"stopx",r+d*lt.boxMargin,Math.max),o!=="activation"&&(n.updateVal(u,"startx",t-d*lt.boxMargin,Math.min),n.updateVal(u,"stopx",r+d*lt.boxMargin,Math.max),n.updateVal(Bt.data,"starty",e-d*lt.boxMargin,Math.min),n.updateVal(Bt.data,"stopy",i+d*lt.boxMargin,Math.max))}}this.sequenceItems.forEach(a()),this.activations.forEach(a("activation"))},insert:function(t,e,r,i){const n=Math.min(t,r),s=Math.max(t,r),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(Bt.data,"startx",n,Math.min),this.updateVal(Bt.data,"starty",a,Math.min),this.updateVal(Bt.data,"stopx",s,Math.max),this.updateVal(Bt.data,"stopy",o,Math.max),this.updateBounds(n,a,s,o)},newActivation:function(t,e,r){const i=r[t.from.actor],n=Bu(t.from.actor).length||0,s=i.x+i.width/2+(n-1)*lt.activationWidth/2;this.activations.push({startx:s,starty:this.verticalPos+2,stopx:s+lt.activationWidth,stopy:void 0,actor:t.from.actor,anchored:qe.anchorElement(e)})},endActivation:function(t){const e=this.activations.map(function(r){return r.actor}).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop: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}},newLoop:function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},endLoop:function(){return this.sequenceItems.pop()},addSectionToLoop:function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:Bt.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},mY=function(t,e){Bt.bumpVerticalPos(lt.boxMargin),e.height=lt.boxMargin,e.starty=Bt.getVerticalPos();const r=qe.getNoteRect();r.x=e.startx,r.y=e.starty,r.width=e.width||lt.width,r.class="note";const i=t.append("g"),n=qe.drawRect(i,r),s=qe.getTextObj();s.x=e.startx,s.y=e.starty,s.width=r.width,s.dy="1em",s.text=e.message,s.class="noteText",s.fontFamily=lt.noteFontFamily,s.fontSize=lt.noteFontSize,s.fontWeight=lt.noteFontWeight,s.anchor=lt.noteAlign,s.textMargin=lt.noteMargin,s.valign="center";const a=ka(i,s),o=Math.round(a.map(l=>(l._groups||l)[0][0].getBBox().height).reduce((l,u)=>l+u));n.attr("height",o+2*lt.noteMargin),e.height+=o+2*lt.noteMargin,Bt.bumpVerticalPos(o+2*lt.noteMargin),e.stopy=e.starty+o+2*lt.noteMargin,e.stopx=e.startx+r.width,Bt.insert(e.startx,e.starty,e.stopx,e.stopy),Bt.models.addNote(e)},wa=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),Us=t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),P1=t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight});function bY(t,e){Bt.bumpVerticalPos(10);const{startx:r,stopx:i,message:n}=e,s=he.splitBreaks(n).length,a=ye.calculateTextDimensions(n,wa(lt)),o=a.height/s;e.height+=o,Bt.bumpVerticalPos(o);let l,u=a.height-10;const d=a.width;if(r===i){l=Bt.getVerticalPos()+u,lt.rightAngles||(u+=lt.boxMargin,l=Bt.getVerticalPos()+u),u+=30;const f=Math.max(d/2,lt.width/2);Bt.insert(r-f,Bt.getVerticalPos()-10+u,i+f,Bt.getVerticalPos()+30+u)}else u+=lt.boxMargin,l=Bt.getVerticalPos()+u,Bt.insert(r,l-10,i,l);return Bt.bumpVerticalPos(u),e.height+=u,e.stopy=e.starty+e.height,Bt.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),l}const _Y=function(t,e,r,i){const{startx:n,stopx:s,starty:a,message:o,type:l,sequenceIndex:u,sequenceVisible:d}=e,f=ye.calculateTextDimensions(o,wa(lt)),p=qe.getTextObj();p.x=n,p.y=a+10,p.width=s-n,p.class="messageText",p.dy="1em",p.text=o,p.fontFamily=lt.messageFontFamily,p.fontSize=lt.messageFontSize,p.fontWeight=lt.messageFontWeight,p.anchor=lt.messageAlign,p.valign="center",p.textMargin=lt.wrapPadding,p.tspan=!1,ka(t,p);const g=f.width;let _;n===s?lt.rightAngles?_=t.append("path").attr("d",`M ${n},${r} H ${n+Math.max(lt.width/2,g/2)} V ${r+25} H ${n}`):_=t.append("path").attr("d","M "+n+","+r+" C "+(n+60)+","+(r-10)+" "+(n+60)+","+(r+30)+" "+n+","+(r+20)):(_=t.append("line"),_.attr("x1",n),_.attr("y1",r),_.attr("x2",s),_.attr("y2",r)),l===i.db.LINETYPE.DOTTED||l===i.db.LINETYPE.DOTTED_CROSS||l===i.db.LINETYPE.DOTTED_POINT||l===i.db.LINETYPE.DOTTED_OPEN?(_.style("stroke-dasharray","3, 3"),_.attr("class","messageLine1")):_.attr("class","messageLine0");let k="";lt.arrowMarkerAbsolute&&(k=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,k=k.replace(/\(/g,"\\("),k=k.replace(/\)/g,"\\)")),_.attr("stroke-width",2),_.attr("stroke","none"),_.style("fill","none"),(l===i.db.LINETYPE.SOLID||l===i.db.LINETYPE.DOTTED)&&_.attr("marker-end","url("+k+"#arrowhead)"),(l===i.db.LINETYPE.SOLID_POINT||l===i.db.LINETYPE.DOTTED_POINT)&&_.attr("marker-end","url("+k+"#filled-head)"),(l===i.db.LINETYPE.SOLID_CROSS||l===i.db.LINETYPE.DOTTED_CROSS)&&_.attr("marker-end","url("+k+"#crosshead)"),(d||lt.showSequenceNumbers)&&(_.attr("marker-start","url("+k+"#sequencenumber)"),t.append("text").attr("x",n).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(u))},Y1=function(t,e,r,i,n,s){if(n.hideUnusedParticipants===!0){const u=new Set;s.forEach(d=>{u.add(d.from),u.add(d.to)}),r=r.filter(d=>u.has(d))}let a=0,o=0,l=0;for(const u of r){const d=e[u];d.width=d.width||lt.width,d.height=Math.max(d.height||lt.height,lt.height),d.margin=d.margin||lt.actorMargin,d.x=a+o,d.y=i;const f=qe.drawActor(t,d,lt);l=Math.max(l,f),Bt.insert(d.x,i,d.x+d.width,d.height),a+=d.width,o+=d.margin,Bt.models.addActor(d)}Bt.bumpVerticalPos(l)},J3=function(t,e,r,i){let n=0,s=0;for(const a of r){const o=e[a],l=kY(o),u=qe.drawPopup(t,o,l,lt,lt.forceMenus,i);u.height>n&&(n=u.height),u.width+o.x>s&&(s=u.width+o.x)}return{maxHeight:n,maxWidth:s}},t4=function(t){pr(lt,t),t.fontFamily&&(lt.actorFontFamily=lt.noteFontFamily=lt.messageFontFamily=t.fontFamily),t.fontSize&&(lt.actorFontSize=lt.noteFontSize=lt.messageFontSize=t.fontSize),t.fontWeight&&(lt.actorFontWeight=lt.noteFontWeight=lt.messageFontWeight=t.fontWeight)},Bu=function(t){return Bt.activations.filter(function(e){return e.actor===t})},ep=function(t,e){const r=e[t],i=Bu(t),n=i.reduce(function(a,o){return Math.min(a,o.startx)},r.x+r.width/2),s=i.reduce(function(a,o){return Math.max(a,o.stopx)},r.x+r.width/2);return[n,s]};function Bi(t,e,r,i,n){Bt.bumpVerticalPos(r);let s=i;if(e.id&&e.message&&t[e.id]){const a=t[e.id].width,o=wa(lt);e.message=ye.wrapLabel(`[${e.message}]`,a-2*lt.wrapPadding,o),e.width=a,e.wrap=!0;const l=ye.calculateTextDimensions(e.message,o),u=Math.max(l.height,lt.labelBoxHeight);s=i+u,B.debug(`${u} - ${e.message}`)}n(e),Bt.bumpVerticalPos(s)}const xY=function(t,e,r,i){const{securityLevel:n,sequence:s}=$();lt=s;let a;n==="sandbox"&&(a=At("#i"+e));const o=At(n==="sandbox"?a.nodes()[0].contentDocument.body:"body"),l=n==="sandbox"?a.nodes()[0].contentDocument:document;Bt.init(),B.debug(i.db);const u=n==="sandbox"?o.select(`[id="${e}"]`):At(`[id="${e}"]`),d=i.db.getActors(),f=i.db.getActorKeys(),p=i.db.getMessages(),g=i.db.getDiagramTitle(),_=vY(d,p,i);lt.height=wY(d,_),qe.insertComputerIcon(u),qe.insertDatabaseIcon(u),qe.insertClockIcon(u),Y1(u,d,f,0,lt,p);const k=CY(p,d,_,i);qe.insertArrowHead(u),qe.insertArrowCrossHead(u),qe.insertArrowFilledHead(u),qe.insertSequenceNumber(u);function w(v,D){const m=Bt.endActivation(v);m.starty+18>D&&(m.starty=D-6,D+=12),qe.drawActivation(u,m,D,lt,Bu(v.from.actor).length),Bt.insert(m.startx,D-10,m.stopx,D)}let S=1,A=1;const O=[];p.forEach(function(v){let D,m,Q;switch(v.type){case i.db.LINETYPE.NOTE:m=v.noteModel,mY(u,m);break;case i.db.LINETYPE.ACTIVE_START:Bt.newActivation(v,u,d);break;case i.db.LINETYPE.ACTIVE_END:w(v,Bt.getVerticalPos());break;case i.db.LINETYPE.LOOP_START:Bi(k,v,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,b=>Bt.newLoop(b));break;case i.db.LINETYPE.LOOP_END:D=Bt.endLoop(),qe.drawLoop(u,D,"loop",lt),Bt.bumpVerticalPos(D.stopy-Bt.getVerticalPos()),Bt.models.addLoop(D);break;case i.db.LINETYPE.RECT_START:Bi(k,v,lt.boxMargin,lt.boxMargin,b=>Bt.newLoop(void 0,b.message));break;case i.db.LINETYPE.RECT_END:D=Bt.endLoop(),qe.drawBackgroundRect(u,D),Bt.models.addLoop(D),Bt.bumpVerticalPos(D.stopy-Bt.getVerticalPos());break;case i.db.LINETYPE.OPT_START:Bi(k,v,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,b=>Bt.newLoop(b));break;case i.db.LINETYPE.OPT_END:D=Bt.endLoop(),qe.drawLoop(u,D,"opt",lt),Bt.bumpVerticalPos(D.stopy-Bt.getVerticalPos()),Bt.models.addLoop(D);break;case i.db.LINETYPE.ALT_START:Bi(k,v,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,b=>Bt.newLoop(b));break;case i.db.LINETYPE.ALT_ELSE:Bi(k,v,lt.boxMargin+lt.boxTextMargin,lt.boxMargin,b=>Bt.addSectionToLoop(b));break;case i.db.LINETYPE.ALT_END:D=Bt.endLoop(),qe.drawLoop(u,D,"alt",lt),Bt.bumpVerticalPos(D.stopy-Bt.getVerticalPos()),Bt.models.addLoop(D);break;case i.db.LINETYPE.PAR_START:Bi(k,v,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,b=>Bt.newLoop(b));break;case i.db.LINETYPE.PAR_AND:Bi(k,v,lt.boxMargin+lt.boxTextMargin,lt.boxMargin,b=>Bt.addSectionToLoop(b));break;case i.db.LINETYPE.PAR_END:D=Bt.endLoop(),qe.drawLoop(u,D,"par",lt),Bt.bumpVerticalPos(D.stopy-Bt.getVerticalPos()),Bt.models.addLoop(D);break;case i.db.LINETYPE.AUTONUMBER:S=v.message.start||S,A=v.message.step||A,v.message.visible?i.db.enableSequenceNumbers():i.db.disableSequenceNumbers();break;case i.db.LINETYPE.CRITICAL_START:Bi(k,v,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,b=>Bt.newLoop(b));break;case i.db.LINETYPE.CRITICAL_OPTION:Bi(k,v,lt.boxMargin+lt.boxTextMargin,lt.boxMargin,b=>Bt.addSectionToLoop(b));break;case i.db.LINETYPE.CRITICAL_END:D=Bt.endLoop(),qe.drawLoop(u,D,"critical",lt),Bt.bumpVerticalPos(D.stopy-Bt.getVerticalPos()),Bt.models.addLoop(D);break;case i.db.LINETYPE.BREAK_START:Bi(k,v,lt.boxMargin,lt.boxMargin+lt.boxTextMargin,b=>Bt.newLoop(b));break;case i.db.LINETYPE.BREAK_END:D=Bt.endLoop(),qe.drawLoop(u,D,"break",lt),Bt.bumpVerticalPos(D.stopy-Bt.getVerticalPos()),Bt.models.addLoop(D);break;default:try{Q=v.msgModel,Q.starty=Bt.getVerticalPos(),Q.sequenceIndex=S,Q.sequenceVisible=i.db.showSequenceNumbers();const b=bY(u,Q);O.push({messageModel:Q,lineStartY:b}),Bt.models.addMessage(Q)}catch(b){B.error("error while drawing message",b)}}[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].includes(v.type)&&(S=S+A)}),O.forEach(v=>_Y(u,v.messageModel,v.lineStartY,i)),lt.mirrorActors&&(Bt.bumpVerticalPos(lt.boxMargin*2),Y1(u,d,f,Bt.getVerticalPos(),lt,p),Bt.bumpVerticalPos(lt.boxMargin),Z3(u,Bt.getVerticalPos()));const P=J3(u,d,f,l),{bounds:W}=Bt.getBounds();B.debug("For line height fix Querying: #"+e+" .actor-line"),Q1("#"+e+" .actor-line").attr("y2",W.stopy);let z=W.stopy-W.starty;z<P.maxHeight&&(z=P.maxHeight);let H=z+2*lt.diagramMarginY;lt.mirrorActors&&(H=H-lt.boxMargin+lt.bottomMarginAdj);let N=W.stopx-W.startx;N<P.maxWidth&&(N=P.maxWidth);const M=N+2*lt.diagramMarginX;g&&u.append("text").text(g).attr("x",(W.stopx-W.startx)/2-2*lt.diagramMarginX).attr("y",-25),Ei(u,H,M,lt.useMaxWidth);const C=g?40:0;u.attr("viewBox",W.startx-lt.diagramMarginX+" -"+(lt.diagramMarginY+C)+" "+M+" "+(H+C)),B.debug("models:",Bt.models)};function vY(t,e,r){const i={};return e.forEach(function(n){if(t[n.to]&&t[n.from]){const s=t[n.to];if(n.placement===r.db.PLACEMENT.LEFTOF&&!s.prevActor||n.placement===r.db.PLACEMENT.RIGHTOF&&!s.nextActor)return;const a=n.placement!==void 0,o=!a,l=a?Us(lt):wa(lt),u=n.wrap?ye.wrapLabel(n.message,lt.width-2*lt.wrapPadding,l):n.message,f=ye.calculateTextDimensions(u,l).width+2*lt.wrapPadding;o&&n.from===s.nextActor?i[n.to]=Math.max(i[n.to]||0,f):o&&n.from===s.prevActor?i[n.from]=Math.max(i[n.from]||0,f):o&&n.from===n.to?(i[n.from]=Math.max(i[n.from]||0,f/2),i[n.to]=Math.max(i[n.to]||0,f/2)):n.placement===r.db.PLACEMENT.RIGHTOF?i[n.from]=Math.max(i[n.from]||0,f):n.placement===r.db.PLACEMENT.LEFTOF?i[s.prevActor]=Math.max(i[s.prevActor]||0,f):n.placement===r.db.PLACEMENT.OVER&&(s.prevActor&&(i[s.prevActor]=Math.max(i[s.prevActor]||0,f/2)),s.nextActor&&(i[n.from]=Math.max(i[n.from]||0,f/2)))}}),B.debug("maxMessageWidthPerActor:",i),i}const kY=function(t){let e=0;const r=P1(lt);for(const i in t.links){const s=ye.calculateTextDimensions(i,r).width+2*lt.wrapPadding+2*lt.boxMargin;e<s&&(e=s)}return e};function wY(t,e){let r=0;Object.keys(t).forEach(i=>{const n=t[i];n.wrap&&(n.description=ye.wrapLabel(n.description,lt.width-2*lt.wrapPadding,P1(lt)));const s=ye.calculateTextDimensions(n.description,P1(lt));n.width=n.wrap?lt.width:Math.max(lt.width,s.width+2*lt.wrapPadding),n.height=n.wrap?Math.max(s.height,lt.height):lt.height,r=Math.max(r,n.height)});for(const i in e){const n=t[i];if(!n)continue;const s=t[n.nextActor];if(!s)continue;const o=e[i]+lt.actorMargin-n.width/2-s.width/2;n.margin=Math.max(o,lt.actorMargin)}return Math.max(r,lt.height)}const TY=function(t,e,r){const i=e[t.from].x,n=e[t.to].x,s=t.wrap&&t.message;let a=ye.calculateTextDimensions(s?ye.wrapLabel(t.message,lt.width,Us(lt)):t.message,Us(lt));const o={width:s?lt.width:Math.max(lt.width,a.width+2*lt.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===r.db.PLACEMENT.RIGHTOF?(o.width=s?Math.max(lt.width,a.width):Math.max(e[t.from].width/2+e[t.to].width/2,a.width+2*lt.noteMargin),o.startx=i+(e[t.from].width+lt.actorMargin)/2):t.placement===r.db.PLACEMENT.LEFTOF?(o.width=Math.max(s?lt.width:e[t.from].width/2+e[t.to].width/2,a.width+2*lt.noteMargin),o.startx=i-o.width+(e[t.from].width-lt.actorMargin)/2):t.to===t.from?(a=ye.calculateTextDimensions(s?ye.wrapLabel(t.message,Math.max(lt.width,e[t.from].width),Us(lt)):t.message,Us(lt)),o.width=s?Math.max(lt.width,e[t.from].width):Math.max(e[t.from].width,lt.width,a.width+2*lt.noteMargin),o.startx=i+(e[t.from].width-o.width)/2):(o.width=Math.abs(i+e[t.from].width/2-(n+e[t.to].width/2))+lt.actorMargin,o.startx=i<n?i+e[t.from].width/2-lt.actorMargin/2:n+e[t.to].width/2-lt.actorMargin/2),s&&(o.message=ye.wrapLabel(t.message,o.width-2*lt.wrapPadding,Us(lt))),B.debug(`NM:[${o.startx},${o.stopx},${o.starty},${o.stopy}:${o.width},${o.height}=${t.message}]`),o},EY=function(t,e,r){let i=!1;if([r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT].includes(t.type)&&(i=!0),!i)return{};const n=ep(t.from,e),s=ep(t.to,e),a=n[0]<=s[0]?1:0,o=n[0]<s[0]?0:1,l=[...n,...s],u=Math.abs(s[o]-n[a]);t.wrap&&t.message&&(t.message=ye.wrapLabel(t.message,Math.max(u+2*lt.wrapPadding,lt.width),wa(lt)));const d=ye.calculateTextDimensions(t.message,wa(lt));return{width:Math.max(t.wrap?0:d.width+2*lt.wrapPadding,u+2*lt.wrapPadding,lt.width),height:0,startx:n[a],stopx:s[o],starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,l),toBounds:Math.max.apply(null,l)}},CY=function(t,e,r,i){const n={},s=[];let a,o,l;return t.forEach(function(u){switch(u.id=ye.random({length:10}),u.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.CRITICAL_START:case i.db.LINETYPE.BREAK_START:s.push({id:u.id,msg:u.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:u.message&&(a=s.pop(),n[a.id]=a,n[u.id]=a,s.push(a));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:a=s.pop(),n[a.id]=a;break;case i.db.LINETYPE.ACTIVE_START:{const f=e[u.from?u.from.actor:u.to.actor],p=Bu(u.from?u.from.actor:u.to.actor).length,g=f.x+f.width/2+(p-1)*lt.activationWidth/2,_={startx:g,stopx:g+lt.activationWidth,actor:u.from.actor,enabled:!0};Bt.activations.push(_)}break;case i.db.LINETYPE.ACTIVE_END:{const f=Bt.activations.map(p=>p.actor).lastIndexOf(u.from.actor);delete Bt.activations.splice(f,1)[0]}break}u.placement!==void 0?(o=TY(u,e,i),u.noteModel=o,s.forEach(f=>{a=f,a.from=Math.min(a.from,o.startx),a.to=Math.max(a.to,o.startx+o.width),a.width=Math.max(a.width,Math.abs(a.from-a.to))-lt.labelBoxWidth})):(l=EY(u,e,i),u.msgModel=l,l.startx&&l.stopx&&s.length>0&&s.forEach(f=>{if(a=f,l.startx===l.stopx){const p=e[u.from],g=e[u.to];a.from=Math.min(p.x-l.width/2,p.x-p.width/2,a.from),a.to=Math.max(g.x+l.width/2,g.x+p.width/2,a.to),a.width=Math.max(a.width,Math.abs(a.to-a.from))-lt.labelBoxWidth}else a.from=Math.min(l.startx,a.from),a.to=Math.max(l.stopx,a.to),a.width=Math.max(a.width,l.width)-lt.labelBoxWidth}))}),Bt.activations=[],B.debug("Loop type widths:",n),n},rp={bounds:Bt,drawActors:Y1,drawActorsPopup:J3,setConf:t4,draw:xY};var V1=function(){var t=function(j,ot,rt,it){for(rt=rt||{},it=j.length;it--;rt[j[it]]=ot);return rt},e=[1,2],r=[1,3],i=[1,5],n=[1,7],s=[2,5],a=[1,15],o=[1,17],l=[1,21],u=[1,22],d=[1,23],f=[1,24],p=[1,37],g=[1,25],_=[1,26],k=[1,27],w=[1,28],S=[1,29],A=[1,32],O=[1,33],P=[1,34],W=[1,35],q=[1,36],z=[1,39],H=[1,40],N=[1,41],M=[1,42],C=[1,38],v=[1,45],D=[1,4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],m=[1,4,5,14,15,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],Q=[1,4,5,7,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],b=[4,5,16,17,19,21,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],ct={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,directive:6,SD:7,document:8,line:9,statement:10,classDefStatement:11,cssClassStatement:12,idStatement:13,DESCR:14,"-->":15,HIDE_EMPTY:16,scale:17,WIDTH:18,COMPOSIT_STATE:19,STRUCT_START:20,STRUCT_STOP:21,STATE_DESCR:22,AS:23,ID:24,FORK:25,JOIN:26,CHOICE:27,CONCURRENT:28,note:29,notePosition:30,NOTE_TEXT:31,direction:32,acc_title:33,acc_title_value:34,acc_descr:35,acc_descr_value:36,acc_descr_multiline_value:37,classDef:38,CLASSDEF_ID:39,CLASSDEF_STYLEOPTS:40,DEFAULT:41,class:42,CLASSENTITY_IDS:43,STYLECLASS:44,openDirective:45,typeDirective:46,closeDirective:47,":":48,argDirective:49,direction_tb:50,direction_bt:51,direction_rl:52,direction_lr:53,eol:54,";":55,EDGE_STATE:56,STYLE_SEPARATOR:57,left_of:58,right_of:59,open_directive:60,type_directive:61,arg_directive:62,close_directive:63,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",7:"SD",14:"DESCR",15:"-->",16:"HIDE_EMPTY",17:"scale",18:"WIDTH",19:"COMPOSIT_STATE",20:"STRUCT_START",21:"STRUCT_STOP",22:"STATE_DESCR",23:"AS",24:"ID",25:"FORK",26:"JOIN",27:"CHOICE",28:"CONCURRENT",29:"note",31:"NOTE_TEXT",33:"acc_title",34:"acc_title_value",35:"acc_descr",36:"acc_descr_value",37:"acc_descr_multiline_value",38:"classDef",39:"CLASSDEF_ID",40:"CLASSDEF_STYLEOPTS",41:"DEFAULT",42:"class",43:"CLASSENTITY_IDS",44:"STYLECLASS",48:":",50:"direction_tb",51:"direction_bt",52:"direction_rl",53:"direction_lr",55:";",56:"EDGE_STATE",57:"STYLE_SEPARATOR",58:"left_of",59:"right_of",60:"open_directive",61:"type_directive",62:"arg_directive",63:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[10,1],[10,1],[10,1],[10,2],[10,3],[10,4],[10,1],[10,2],[10,1],[10,4],[10,3],[10,6],[10,1],[10,1],[10,1],[10,1],[10,4],[10,4],[10,1],[10,1],[10,2],[10,2],[10,1],[11,3],[11,3],[12,3],[6,3],[6,5],[32,1],[32,1],[32,1],[32,1],[54,1],[54,1],[13,1],[13,1],[13,3],[13,3],[30,1],[30,1],[45,1],[46,1],[49,1],[47,1]],performAction:function(ot,rt,it,ut,bt,K,Ot){var Y=K.length-1;switch(bt){case 4:return ut.setRootDoc(K[Y]),K[Y];case 5:this.$=[];break;case 6:K[Y]!="nl"&&(K[Y-1].push(K[Y]),this.$=K[Y-1]);break;case 7:case 8:this.$=K[Y];break;case 9:this.$="nl";break;case 12:this.$=K[Y];break;case 13:const I=K[Y-1];I.description=ut.trimColon(K[Y]),this.$=I;break;case 14:this.$={stmt:"relation",state1:K[Y-2],state2:K[Y]};break;case 15:const L=ut.trimColon(K[Y]);this.$={stmt:"relation",state1:K[Y-3],state2:K[Y-1],description:L};break;case 19:this.$={stmt:"state",id:K[Y-3],type:"default",description:"",doc:K[Y-1]};break;case 20:var U=K[Y],X=K[Y-2].trim();if(K[Y].match(":")){var F=K[Y].split(":");U=F[0],X=[X,F[1]]}this.$={stmt:"state",id:U,type:"default",description:X};break;case 21:this.$={stmt:"state",id:K[Y-3],type:"default",description:K[Y-5],doc:K[Y-1]};break;case 22:this.$={stmt:"state",id:K[Y],type:"fork"};break;case 23:this.$={stmt:"state",id:K[Y],type:"join"};break;case 24:this.$={stmt:"state",id:K[Y],type:"choice"};break;case 25:this.$={stmt:"state",id:ut.getDividerId(),type:"divider"};break;case 26:this.$={stmt:"state",id:K[Y-1].trim(),note:{position:K[Y-2].trim(),text:K[Y].trim()}};break;case 30:this.$=K[Y].trim(),ut.setAccTitle(this.$);break;case 31:case 32:this.$=K[Y].trim(),ut.setAccDescription(this.$);break;case 33:case 34:this.$={stmt:"classDef",id:K[Y-1].trim(),classes:K[Y].trim()};break;case 35:this.$={stmt:"applyClass",id:K[Y-1].trim(),styleClass:K[Y].trim()};break;case 38:ut.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 39:ut.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 40:ut.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 41:ut.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 44:case 45:this.$={stmt:"state",id:K[Y].trim(),type:"default",description:""};break;case 46:this.$={stmt:"state",id:K[Y-2].trim(),classes:[K[Y].trim()],type:"default",description:""};break;case 47:this.$={stmt:"state",id:K[Y-2].trim(),classes:[K[Y].trim()],type:"default",description:""};break;case 50:ut.parseDirective("%%{","open_directive");break;case 51:ut.parseDirective(K[Y],"type_directive");break;case 52:K[Y]=K[Y].trim().replace(/'/g,'"'),ut.parseDirective(K[Y],"arg_directive");break;case 53:ut.parseDirective("}%%","close_directive","state");break}},table:[{3:1,4:e,5:r,6:4,7:i,45:6,60:n},{1:[3]},{3:8,4:e,5:r,6:4,7:i,45:6,60:n},{3:9,4:e,5:r,6:4,7:i,45:6,60:n},{3:10,4:e,5:r,6:4,7:i,45:6,60:n},t([1,4,5,16,17,19,22,24,25,26,27,28,29,33,35,37,38,42,50,51,52,53,56,60],s,{8:11}),{46:12,61:[1,13]},{61:[2,50]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:a,5:o,6:30,9:14,10:16,11:18,12:19,13:20,16:l,17:u,19:d,22:f,24:p,25:g,26:_,27:k,28:w,29:S,32:31,33:A,35:O,37:P,38:W,42:q,45:6,50:z,51:H,52:N,53:M,56:C,60:n},{47:43,48:[1,44],63:v},t([48,63],[2,51]),t(D,[2,6]),{6:30,10:46,11:18,12:19,13:20,16:l,17:u,19:d,22:f,24:p,25:g,26:_,27:k,28:w,29:S,32:31,33:A,35:O,37:P,38:W,42:q,45:6,50:z,51:H,52:N,53:M,56:C,60:n},t(D,[2,8]),t(D,[2,9]),t(D,[2,10]),t(D,[2,11]),t(D,[2,12],{14:[1,47],15:[1,48]}),t(D,[2,16]),{18:[1,49]},t(D,[2,18],{20:[1,50]}),{23:[1,51]},t(D,[2,22]),t(D,[2,23]),t(D,[2,24]),t(D,[2,25]),{30:52,31:[1,53],58:[1,54],59:[1,55]},t(D,[2,28]),t(D,[2,29]),{34:[1,56]},{36:[1,57]},t(D,[2,32]),{39:[1,58],41:[1,59]},{43:[1,60]},t(m,[2,44],{57:[1,61]}),t(m,[2,45],{57:[1,62]}),t(D,[2,38]),t(D,[2,39]),t(D,[2,40]),t(D,[2,41]),t(Q,[2,36]),{49:63,62:[1,64]},t(Q,[2,53]),t(D,[2,7]),t(D,[2,13]),{13:65,24:p,56:C},t(D,[2,17]),t(b,s,{8:66}),{24:[1,67]},{24:[1,68]},{23:[1,69]},{24:[2,48]},{24:[2,49]},t(D,[2,30]),t(D,[2,31]),{40:[1,70]},{40:[1,71]},{44:[1,72]},{24:[1,73]},{24:[1,74]},{47:75,63:v},{63:[2,52]},t(D,[2,14],{14:[1,76]}),{4:a,5:o,6:30,9:14,10:16,11:18,12:19,13:20,16:l,17:u,19:d,21:[1,77],22:f,24:p,25:g,26:_,27:k,28:w,29:S,32:31,33:A,35:O,37:P,38:W,42:q,45:6,50:z,51:H,52:N,53:M,56:C,60:n},t(D,[2,20],{20:[1,78]}),{31:[1,79]},{24:[1,80]},t(D,[2,33]),t(D,[2,34]),t(D,[2,35]),t(m,[2,46]),t(m,[2,47]),t(Q,[2,37]),t(D,[2,15]),t(D,[2,19]),t(b,s,{8:81}),t(D,[2,26]),t(D,[2,27]),{4:a,5:o,6:30,9:14,10:16,11:18,12:19,13:20,16:l,17:u,19:d,21:[1,82],22:f,24:p,25:g,26:_,27:k,28:w,29:S,32:31,33:A,35:O,37:P,38:W,42:q,45:6,50:z,51:H,52:N,53:M,56:C,60:n},t(D,[2,21])],defaultActions:{7:[2,50],8:[2,1],9:[2,2],10:[2,3],54:[2,48],55:[2,49],64:[2,52]},parseError:function(ot,rt){if(rt.recoverable)this.trace(ot);else{var it=new Error(ot);throw it.hash=rt,it}},parse:function(ot){var rt=this,it=[0],ut=[],bt=[null],K=[],Ot=this.table,Y="",U=0,X=0,F=2,I=1,L=K.slice.call(arguments,1),J=Object.create(this.lexer),T={yy:{}};for(var ht in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ht)&&(T.yy[ht]=this.yy[ht]);J.setInput(ot,T.yy),T.yy.lexer=J,T.yy.parser=this,typeof J.yylloc>"u"&&(J.yylloc={});var V=J.yylloc;K.push(V);var Yt=J.options&&J.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function et(){var Kt;return Kt=ut.pop()||J.lex()||I,typeof Kt!="number"&&(Kt instanceof Array&&(ut=Kt,Kt=ut.pop()),Kt=rt.symbols_[Kt]||Kt),Kt}for(var Mt,Tt,gt,Et,wt={},pt,st,le,Xt;;){if(Tt=it[it.length-1],this.defaultActions[Tt]?gt=this.defaultActions[Tt]:((Mt===null||typeof Mt>"u")&&(Mt=et()),gt=Ot[Tt]&&Ot[Tt][Mt]),typeof gt>"u"||!gt.length||!gt[0]){var jt="";Xt=[];for(pt in Ot[Tt])this.terminals_[pt]&&pt>F&&Xt.push("'"+this.terminals_[pt]+"'");J.showPosition?jt="Parse error on line "+(U+1)+`:
|
|
1260
1260
|
`+J.showPosition()+`
|
|
1261
1261
|
Expecting `+Xt.join(", ")+", got '"+(this.terminals_[Mt]||Mt)+"'":jt="Parse error on line "+(U+1)+": Unexpected "+(Mt==I?"end of input":"'"+(this.terminals_[Mt]||Mt)+"'"),this.parseError(jt,{text:J.match,token:this.terminals_[Mt]||Mt,line:J.yylineno,loc:V,expected:Xt})}if(gt[0]instanceof Array&>.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Tt+", token: "+Mt);switch(gt[0]){case 1:it.push(Mt),bt.push(J.yytext),K.push(J.yylloc),it.push(gt[1]),Mt=null,X=J.yyleng,Y=J.yytext,U=J.yylineno,V=J.yylloc;break;case 2:if(st=this.productions_[gt[1]][1],wt.$=bt[bt.length-st],wt._$={first_line:K[K.length-(st||1)].first_line,last_line:K[K.length-1].last_line,first_column:K[K.length-(st||1)].first_column,last_column:K[K.length-1].last_column},Yt&&(wt._$.range=[K[K.length-(st||1)].range[0],K[K.length-1].range[1]]),Et=this.performAction.apply(wt,[Y,X,U,T.yy,gt[1],bt,K].concat(L)),typeof Et<"u")return Et;st&&(it=it.slice(0,-1*st*2),bt=bt.slice(0,-1*st),K=K.slice(0,-1*st)),it.push(this.productions_[gt[1]][0]),bt.push(wt.$),K.push(wt._$),le=Ot[it[it.length-2]][it[it.length-1]],it.push(le);break;case 3:return!0}}return!0}},Dt=function(){var j={EOF:1,parseError:function(rt,it){if(this.yy.parser)this.yy.parser.parseError(rt,it);else throw new Error(rt)},setInput:function(ot,rt){return this.yy=rt||this.yy||{},this._input=ot,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var ot=this._input[0];this.yytext+=ot,this.yyleng++,this.offset++,this.match+=ot,this.matched+=ot;var rt=ot.match(/(?:\r\n?|\n).*/g);return rt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),ot},unput:function(ot){var rt=ot.length,it=ot.split(/(?:\r\n?|\n)/g);this._input=ot+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-rt),this.offset-=rt;var ut=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),it.length-1&&(this.yylineno-=it.length-1);var bt=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:it?(it.length===ut.length?this.yylloc.first_column:0)+ut[ut.length-it.length].length-it[0].length:this.yylloc.first_column-rt},this.options.ranges&&(this.yylloc.range=[bt[0],bt[0]+this.yyleng-rt]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
1262
1262
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(ot){this.unput(this.match.slice(ot))},pastInput:function(){var ot=this.matched.substr(0,this.matched.length-this.match.length);return(ot.length>20?"...":"")+ot.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var ot=this.match;return ot.length<20&&(ot+=this._input.substr(0,20-ot.length)),(ot.substr(0,20)+(ot.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var ot=this.pastInput(),rt=new Array(ot.length+1).join("-");return ot+this.upcomingInput()+`
|
|
1263
1263
|
`+rt+"^"},test_match:function(ot,rt){var it,ut,bt;if(this.options.backtrack_lexer&&(bt={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(bt.yylloc.range=this.yylloc.range.slice(0))),ut=ot[0].match(/(?:\r\n?|\n).*/g),ut&&(this.yylineno+=ut.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:ut?ut[ut.length-1].length-ut[ut.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+ot[0].length},this.yytext+=ot[0],this.match+=ot[0],this.matches=ot,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(ot[0].length),this.matched+=ot[0],it=this.performAction.call(this,this.yy,this,rt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),it)return it;if(this._backtrack){for(var K in bt)this[K]=bt[K];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var ot,rt,it,ut;this._more||(this.yytext="",this.match="");for(var bt=this._currentRules(),K=0;K<bt.length;K++)if(it=this._input.match(this.rules[bt[K]]),it&&(!rt||it[0].length>rt[0].length)){if(rt=it,ut=K,this.options.backtrack_lexer){if(ot=this.test_match(it,bt[K]),ot!==!1)return ot;if(this._backtrack){rt=!1;continue}else return!1}else if(!this.options.flex)break}return rt?(ot=this.test_match(rt,bt[ut]),ot!==!1?ot:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1264
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var rt=this.next();return rt||this.lex()},begin:function(rt){this.conditionStack.push(rt)},popState:function(){var rt=this.conditionStack.length-1;return rt>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(rt){return rt=this.conditionStack.length-1-Math.abs(rt||0),rt>=0?this.conditionStack[rt]:"INITIAL"},pushState:function(rt){this.begin(rt)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(rt,it,ut,bt){switch(ut){case 0:return 41;case 1:return 50;case 2:return 51;case 3:return 52;case 4:return 53;case 5:return this.begin("open_directive"),60;case 6:return this.begin("type_directive"),61;case 7:return this.popState(),this.begin("arg_directive"),48;case 8:return this.popState(),this.popState(),63;case 9:return 62;case 10:break;case 11:break;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:break;case 17:return this.pushState("SCALE"),17;case 18:return 18;case 19:this.popState();break;case 20:return this.begin("acc_title"),33;case 21:return this.popState(),"acc_title_value";case 22:return this.begin("acc_descr"),35;case 23:return this.popState(),"acc_descr_value";case 24:this.begin("acc_descr_multiline");break;case 25:this.popState();break;case 26:return"acc_descr_multiline_value";case 27:return this.pushState("CLASSDEF"),38;case 28:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 29:return this.popState(),this.pushState("CLASSDEFID"),39;case 30:return this.popState(),40;case 31:return this.pushState("CLASS"),42;case 32:return this.popState(),this.pushState("CLASS_STYLE"),43;case 33:return this.popState(),44;case 34:return this.pushState("SCALE"),17;case 35:return 18;case 36:this.popState();break;case 37:this.pushState("STATE");break;case 38:return this.popState(),it.yytext=it.yytext.slice(0,-8).trim(),25;case 39:return this.popState(),it.yytext=it.yytext.slice(0,-8).trim(),26;case 40:return this.popState(),it.yytext=it.yytext.slice(0,-10).trim(),27;case 41:return this.popState(),it.yytext=it.yytext.slice(0,-8).trim(),25;case 42:return this.popState(),it.yytext=it.yytext.slice(0,-8).trim(),26;case 43:return this.popState(),it.yytext=it.yytext.slice(0,-10).trim(),27;case 44:return 50;case 45:return 51;case 46:return 52;case 47:return 53;case 48:this.begin("STATE_STRING");break;case 49:return this.popState(),this.pushState("STATE_ID"),"AS";case 50:return this.popState(),"ID";case 51:this.popState();break;case 52:return"STATE_DESCR";case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState("struct"),20;case 56:break;case 57:return this.popState(),21;case 58:break;case 59:return this.begin("NOTE"),29;case 60:return this.popState(),this.pushState("NOTE_ID"),58;case 61:return this.popState(),this.pushState("NOTE_ID"),59;case 62:this.popState(),this.pushState("FLOATING_NOTE");break;case 63:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 64:break;case 65:return"NOTE_TEXT";case 66:return this.popState(),"ID";case 67:return this.popState(),this.pushState("NOTE_TEXT"),24;case 68:return this.popState(),it.yytext=it.yytext.substr(2).trim(),31;case 69:return this.popState(),it.yytext=it.yytext.slice(0,-8).trim(),31;case 70:return 7;case 71:return 7;case 72:return 16;case 73:return 56;case 74:return 24;case 75:return it.yytext=it.yytext.trim(),14;case 76:return 15;case 77:return 28;case 78:return 57;case 79:return 5;case 80:return"INVALID"}},rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[14,15],inclusive:!1},close_directive:{rules:[14,15],inclusive:!1},arg_directive:{rules:[8,9,14,15],inclusive:!1},type_directive:{rules:[7,8,14,15],inclusive:!1},open_directive:{rules:[6,14,15],inclusive:!1},struct:{rules:[14,15,27,31,37,44,45,46,47,56,57,58,59,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[66],inclusive:!1},FLOATING_NOTE:{rules:[63,64,65],inclusive:!1},NOTE_TEXT:{rules:[68,69],inclusive:!1},NOTE_ID:{rules:[67],inclusive:!1},NOTE:{rules:[60,61,62],inclusive:!1},CLASS_STYLE:{rules:[33],inclusive:!1},CLASS:{rules:[32],inclusive:!1},CLASSDEFID:{rules:[30],inclusive:!1},CLASSDEF:{rules:[28,29],inclusive:!1},acc_descr_multiline:{rules:[25,26],inclusive:!1},acc_descr:{rules:[23],inclusive:!1},acc_title:{rules:[21],inclusive:!1},SCALE:{rules:[18,19,35,36],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[50],inclusive:!1},STATE_STRING:{rules:[51,52],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[14,15,38,39,40,41,42,43,48,49,53,54,55],inclusive:!1},ID:{rules:[14,15],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,10,11,12,13,15,16,17,20,22,24,27,31,34,37,55,59,70,71,72,73,74,75,76,78,79,80],inclusive:!0}}};return j}();ct.lexer=Dt;function vt(){this.yy={}}return vt.prototype=ct,ct.Parser=vt,new vt}();Y1.parser=Y1;const ip=Y1,SY=(t,e)=>{var r;return((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:t.match(/^\s*stateDiagram/)!==null},AY=(t,e)=>{var r;return!!(t.match(/^\s*stateDiagram-v2/)!==null||t.match(/^\s*stateDiagram/)&&((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},LY="LR",DY="TB",Hc="state",ad="relation",MY="classDef",NY="applyClass",tl="default",e4="divider",od="[*]",r4="start",i4=od,n4="end",np="color",sp="fill",BY="bgFill",IY=",";function s4(){return{}}let a4=LY,Gc=[],uo=s4();const o4=()=>({relations:[],states:{},documents:{}});let qc={root:o4()},wr=qc.root,Fo=0,ap=0;const OY={LINE:0,DOTTED_LINE:1},RY={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},Sl=t=>JSON.parse(JSON.stringify(t)),FY=function(t,e,r){ze.parseDirective(this,t,e,r)},PY=t=>{B.info("Setting root doc",t),Gc=t},YY=()=>Gc,$l=(t,e,r)=>{if(e.stmt===ad)$l(t,e.state1,!0),$l(t,e.state2,!1);else if(e.stmt===Hc&&e.id==="[*]"&&(e.id=r?t.id+"_start":t.id+"_end",e.start=r),e.doc){const i=[];let n=[],s;for(s=0;s<e.doc.length;s++)if(e.doc[s].type===e4){const a=Sl(e.doc[s]);a.doc=Sl(n),i.push(a),n=[]}else n.push(e.doc[s]);if(i.length>0&&n.length>0){const a={stmt:Hc,id:sm(),type:"divider",doc:Sl(n)};i.push(Sl(a)),e.doc=i}e.doc.forEach(a=>$l(e,a,!0))}},VY=()=>($l({id:"root"},{id:"root",doc:Gc},!0),{id:"root",doc:Gc}),UY=t=>{let e;t.doc?e=t.doc:e=t,B.info(e),l4(!0),B.info("Extract",e),e.forEach(r=>{switch(r.stmt){case Hc:Ts(r.id,r.type,r.doc,r.description,r.note,r.classes,r.styles,r.textStyles);break;case ad:c4(r.state1,r.state2,r.description);break;case MY:u4(r.id,r.classes);break;case NY:ld(r.id,r.styleClass);break}})},Ts=function(t,e=tl,r=null,i=null,n=null,s=null,a=null,o=null){wr.states[t]===void 0?(B.info("Adding state ",t,i),wr.states[t]={id:t,descriptions:[],type:e,doc:r,note:n,classes:[],styles:[],textStyles:[]}):(wr.states[t].doc||(wr.states[t].doc=r),wr.states[t].type||(wr.states[t].type=e)),i&&(B.info("Setting state description",t,i),typeof i=="string"&&z1(t,i.trim()),typeof i=="object"&&i.forEach(l=>z1(t,l.trim()))),n&&(wr.states[t].note=n,wr.states[t].note.text=he.sanitizeText(wr.states[t].note.text,$())),s&&(B.info("Setting state classes",t,s),(typeof s=="string"?[s]:s).forEach(u=>ld(t,u.trim()))),a&&(B.info("Setting state styles",t,a),(typeof a=="string"?[a]:a).forEach(u=>ZY(t,u.trim()))),o&&(B.info("Setting state styles",t,a),(typeof o=="string"?[o]:o).forEach(u=>QY(t,u.trim())))},l4=function(t){qc={root:o4()},wr=qc.root,Fo=0,uo=s4(),t||Ci()},Po=function(t){return wr.states[t]},zY=function(){return wr.states},WY=function(){B.info("Documents = ",qc)},HY=function(){return wr.relations};function V1(t=""){let e=t;return t===od&&(Fo++,e=`${r4}${Fo}`),e}function U1(t="",e=tl){return t===od?r4:e}function GY(t=""){let e=t;return t===i4&&(Fo++,e=`${n4}${Fo}`),e}function qY(t="",e=tl){return t===i4?n4:e}function jY(t,e,r){let i=V1(t.id),n=U1(t.id,t.type),s=V1(e.id),a=U1(e.id,e.type);Ts(i,n,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),Ts(s,a,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),wr.relations.push({id1:i,id2:s,relationTitle:he.sanitizeText(r,$())})}const c4=function(t,e,r){if(typeof t=="object")jY(t,e,r);else{const i=V1(t),n=U1(t),s=GY(e),a=qY(e);Ts(i,n),Ts(s,a),wr.relations.push({id1:i,id2:s,title:he.sanitizeText(r,$())})}},z1=function(t,e){const r=wr.states[t],i=e.startsWith(":")?e.replace(":","").trim():e;r.descriptions.push(he.sanitizeText(i,$()))},$Y=function(t){return t.substring(0,1)===":"?t.substr(2).trim():t.trim()},XY=()=>(ap++,"divider-id-"+ap),u4=function(t,e=""){uo[t]===void 0&&(uo[t]={id:t,styles:[],textStyles:[]});const r=uo[t];e!=null&&e.split(IY).forEach(i=>{const n=i.replace(/([^;]*);/,"$1").trim();if(i.match(np)){const a=n.replace(sp,BY).replace(np,sp);r.textStyles.push(a)}r.styles.push(n)})},KY=function(){return uo},ld=function(t,e){t.split(",").forEach(function(r){let i=Po(r);if(i===void 0){const n=r.trim();Ts(n),i=Po(n)}i.classes.push(e)})},ZY=function(t,e){const r=Po(t);r!==void 0&&r.textStyles.push(e)},QY=function(t,e){const r=Po(t);r!==void 0&&r.textStyles.push(e)},JY=()=>a4,tV=t=>{a4=t},eV=t=>t&&t[0]===":"?t.substr(1).trim():t.trim(),ln={parseDirective:FY,getConfig:()=>$().state,addState:Ts,clear:l4,getState:Po,getStates:zY,getRelations:HY,getClasses:KY,getDirection:JY,addRelation:c4,getDividerId:XY,setDirection:tV,cleanupLabel:$Y,lineType:OY,relationType:RY,logDocuments:WY,getRootDoc:YY,setRootDoc:PY,getRootDocV2:VY,extract:UY,trimColon:eV,getAccTitle:Si,setAccTitle:ii,getAccDescription:Li,setAccDescription:Ai,addStyleClass:u4,setCssClass:ld,addDescription:z1,setDiagramTitle:Cn,getDiagramTitle:Sn},rV=t=>t.append("circle").attr("class","start-state").attr("r",$().state.sizeUnit).attr("cx",$().state.padding+$().state.sizeUnit).attr("cy",$().state.padding+$().state.sizeUnit),iV=t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",$().state.textHeight).attr("class","divider").attr("x2",$().state.textHeight*2).attr("y1",0).attr("y2",0),nV=(t,e)=>{const r=t.append("text").attr("x",2*$().state.padding).attr("y",$().state.textHeight+2*$().state.padding).attr("font-size",$().state.fontSize).attr("class","state-title").text(e.id),i=r.node().getBBox();return t.insert("rect",":first-child").attr("x",$().state.padding).attr("y",$().state.padding).attr("width",i.width+2*$().state.padding).attr("height",i.height+2*$().state.padding).attr("rx",$().state.radius),r},sV=(t,e)=>{const r=function(p,g,_){const k=p.append("tspan").attr("x",2*$().state.padding).text(g);_||k.attr("dy",$().state.textHeight)},n=t.append("text").attr("x",2*$().state.padding).attr("y",$().state.textHeight+1.3*$().state.padding).attr("font-size",$().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),s=n.height,a=t.append("text").attr("x",$().state.padding).attr("y",s+$().state.padding*.4+$().state.dividerMargin+$().state.textHeight).attr("class","state-description");let o=!0,l=!0;e.descriptions.forEach(function(p){o||(r(a,p,l),l=!1),o=!1});const u=t.append("line").attr("x1",$().state.padding).attr("y1",$().state.padding+s+$().state.dividerMargin/2).attr("y2",$().state.padding+s+$().state.dividerMargin/2).attr("class","descr-divider"),d=a.node().getBBox(),f=Math.max(d.width,n.width);return u.attr("x2",f+3*$().state.padding),t.insert("rect",":first-child").attr("x",$().state.padding).attr("y",$().state.padding).attr("width",f+2*$().state.padding).attr("height",d.height+s+2*$().state.padding).attr("rx",$().state.radius),t},aV=(t,e,r)=>{const i=$().state.padding,n=2*$().state.padding,s=t.node().getBBox(),a=s.width,o=s.x,l=t.append("text").attr("x",0).attr("y",$().state.titleShift).attr("font-size",$().state.fontSize).attr("class","state-title").text(e.id),d=l.node().getBBox().width+n;let f=Math.max(d,a);f===a&&(f=f+n);let p;const g=t.node().getBBox();e.doc,p=o-i,d>a&&(p=(a-f)/2+i),Math.abs(o-g.x)<i&&d>a&&(p=o-(d-a)/2);const _=1-$().state.textHeight;return t.insert("rect",":first-child").attr("x",p).attr("y",_).attr("class",r?"alt-composit":"composit").attr("width",f).attr("height",g.height+$().state.textHeight+$().state.titleShift+1).attr("rx","0"),l.attr("x",p+i),d<=a&&l.attr("x",o+(f-n)/2-d/2+i),t.insert("rect",":first-child").attr("x",p).attr("y",$().state.titleShift-$().state.textHeight-$().state.padding).attr("width",f).attr("height",$().state.textHeight*3).attr("rx",$().state.radius),t.insert("rect",":first-child").attr("x",p).attr("y",$().state.titleShift-$().state.textHeight-$().state.padding).attr("width",f).attr("height",g.height+3+2*$().state.textHeight).attr("rx",$().state.radius),t},oV=t=>(t.append("circle").attr("class","end-state-outer").attr("r",$().state.sizeUnit+$().state.miniPadding).attr("cx",$().state.padding+$().state.sizeUnit+$().state.miniPadding).attr("cy",$().state.padding+$().state.sizeUnit+$().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",$().state.sizeUnit).attr("cx",$().state.padding+$().state.sizeUnit+2).attr("cy",$().state.padding+$().state.sizeUnit+2)),lV=(t,e)=>{let r=$().state.forkWidth,i=$().state.forkHeight;if(e.parentId){let n=r;r=i,i=n}return t.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",i).attr("x",$().state.padding).attr("y",$().state.padding)},cV=(t,e,r,i)=>{let n=0;const s=i.append("text");s.style("text-anchor","start"),s.attr("class","noteText");let a=t.replace(/\r\n/g,"<br/>");a=a.replace(/\n/g,"<br/>");const o=a.split(he.lineBreakRegex);let l=1.25*$().state.noteMargin;for(const u of o){const d=u.trim();if(d.length>0){const f=s.append("tspan");if(f.text(d),l===0){const p=f.node().getBBox();l+=p.height}n+=l,f.attr("x",e+$().state.noteMargin),f.attr("y",r+n+1.25*$().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:n}},uV=(t,e)=>{e.attr("class","state-note");const r=e.append("rect").attr("x",0).attr("y",$().state.padding),i=e.append("g"),{textWidth:n,textHeight:s}=cV(t,0,0,i);return r.attr("height",s+2*$().state.noteMargin),r.attr("width",n+$().state.noteMargin*2),r},op=function(t,e){const r=e.id,i={id:r,label:e.id,width:0,height:0},n=t.append("g").attr("id",r).attr("class","stateGroup");e.type==="start"&&rV(n),e.type==="end"&&oV(n),(e.type==="fork"||e.type==="join")&&lV(n,e),e.type==="note"&&uV(e.note.text,n),e.type==="divider"&&iV(n),e.type==="default"&&e.descriptions.length===0&&nV(n,e),e.type==="default"&&e.descriptions.length>0&&sV(n,e);const s=n.node().getBBox();return i.width=s.width+2*$().state.padding,i.height=s.height+2*$().state.padding,i};let lp=0;const hV=function(t,e,r){const i=function(l){switch(l){case ln.relationType.AGGREGATION:return"aggregation";case ln.relationType.EXTENSION:return"extension";case ln.relationType.COMPOSITION:return"composition";case ln.relationType.DEPENDENCY:return"dependency"}};e.points=e.points.filter(l=>!Number.isNaN(l.y));const n=e.points,s=Ca().x(function(l){return l.x}).y(function(l){return l.y}).curve(ua),a=t.append("path").attr("d",s(n)).attr("id","edge"+lp).attr("class","transition");let o="";if($().state.arrowMarkerAbsolute&&(o=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,o=o.replace(/\(/g,"\\("),o=o.replace(/\)/g,"\\)")),a.attr("marker-end","url("+o+"#"+i(ln.relationType.DEPENDENCY)+"End)"),r.title!==void 0){const l=t.append("g").attr("class","stateLabel"),{x:u,y:d}=ye.calcLabelPosition(e.points),f=he.getRows(r.title);let p=0;const g=[];let _=0,k=0;for(let A=0;A<=f.length;A++){const O=l.append("text").attr("text-anchor","middle").text(f[A]).attr("x",u).attr("y",d+p),P=O.node().getBBox();_=Math.max(_,P.width),k=Math.min(k,P.x),B.info(P.x,u,d+p),p===0&&(p=O.node().getBBox().height,B.info("Title height",p,d)),g.push(O)}let w=p*f.length;if(f.length>1){const A=(f.length-1)*p*.5;g.forEach((O,P)=>O.attr("y",d+P*p-A)),w=p*f.length}const S=l.node().getBBox();l.insert("rect",":first-child").attr("class","box").attr("x",u-_/2-$().state.padding/2).attr("y",d-w/2-$().state.padding/2-3.5).attr("width",_+$().state.padding).attr("height",w+$().state.padding),B.info(S)}lp++};let qr;const Ch={},dV=function(){},fV=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")},pV=function(t,e,r,i){qr=$().state;const n=$().securityLevel;let s;n==="sandbox"&&(s=At("#i"+e));const a=At(n==="sandbox"?s.nodes()[0].contentDocument.body:"body"),o=n==="sandbox"?s.nodes()[0].contentDocument:document;B.debug("Rendering diagram "+t);const l=a.select(`[id='${e}']`);fV(l),new or({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel(function(){return{}});const d=i.db.getRootDoc();h4(d,l,void 0,!1,a,o,i);const f=qr.padding,p=l.node().getBBox(),g=p.width+f*2,_=p.height+f*2,k=g*1.75;Ei(l,_,k,qr.useMaxWidth),l.attr("viewBox",`${p.x-qr.padding} ${p.y-qr.padding} `+g+" "+_)},gV=t=>t?t.length*qr.fontSizeFactor:1,h4=(t,e,r,i,n,s,a)=>{const o=new or({compound:!0,multigraph:!0});let l,u=!0;for(l=0;l<t.length;l++)if(t[l].stmt==="relation"){u=!1;break}r?o.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:u?1:qr.edgeLengthFactor,nodeSep:u?1:50,isMultiGraph:!0}):o.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:u?1:qr.edgeLengthFactor,nodeSep:u?1:50,ranker:"tight-tree",isMultiGraph:!0}),o.setDefaultEdgeLabel(function(){return{}}),a.db.extract(t);const d=a.db.getStates(),f=a.db.getRelations(),p=Object.keys(d);for(const S of p){const A=d[S];r&&(A.parentId=r);let O;if(A.doc){let P=e.append("g").attr("id",A.id).attr("class","stateGroup");O=h4(A.doc,P,A.id,!i,n,s,a);{P=aV(P,A,i);let W=P.node().getBBox();O.width=W.width,O.height=W.height+qr.padding/2,Ch[A.id]={y:qr.compositTitleSize}}}else O=op(e,A);if(A.note){const P={descriptions:[],id:A.id+"-note",note:A.note,type:"note"},W=op(e,P);A.note.position==="left of"?(o.setNode(O.id+"-note",W),o.setNode(O.id,O)):(o.setNode(O.id,O),o.setNode(O.id+"-note",W)),o.setParent(O.id,O.id+"-group"),o.setParent(O.id+"-note",O.id+"-group")}else o.setNode(O.id,O)}B.debug("Count=",o.nodeCount(),o);let g=0;f.forEach(function(S){g++,B.debug("Setting edge",S),o.setEdge(S.id1,S.id2,{relation:S,width:gV(S.title),height:qr.labelHeight*he.getRows(S.title).length,labelpos:"c"},"id"+g)}),Ma(o),B.debug("Graph after layout",o.nodes());const _=e.node();o.nodes().forEach(function(S){S!==void 0&&o.node(S)!==void 0?(B.warn("Node "+S+": "+JSON.stringify(o.node(S))),n.select("#"+_.id+" #"+S).attr("transform","translate("+(o.node(S).x-o.node(S).width/2)+","+(o.node(S).y+(Ch[S]?Ch[S].y:0)-o.node(S).height/2)+" )"),n.select("#"+_.id+" #"+S).attr("data-x-shift",o.node(S).x-o.node(S).width/2),s.querySelectorAll("#"+_.id+" #"+S+" .divider").forEach(O=>{const P=O.parentElement;let W=0,q=0;P&&(P.parentElement&&(W=P.parentElement.getBBox().width),q=parseInt(P.getAttribute("data-x-shift"),10),Number.isNaN(q)&&(q=0)),O.setAttribute("x1",0-q+8),O.setAttribute("x2",W-q-8)})):B.debug("No Node "+S+": "+JSON.stringify(o.node(S)))});let k=_.getBBox();o.edges().forEach(function(S){S!==void 0&&o.edge(S)!==void 0&&(B.debug("Edge "+S.v+" -> "+S.w+": "+JSON.stringify(o.edge(S))),hV(e,o.edge(S),o.edge(S).relation))}),k=_.getBBox();const w={id:r||"root",label:r||"root",width:0,height:0};return w.width=k.width+2*qr.padding,w.height=k.height+2*qr.padding,B.debug("Doc rendered",w,o),w},yV={setConf:dV,draw:pV},Xl="rect",Sh="rectWithTitle",mV="start",bV="end",_V="divider",xV="roundedWithTitle",vV="note",kV="noteGroup",Ta="statediagram",wV="state",TV=`${Ta}-${wV}`,d4="transition",EV="note",CV="note-edge",SV=`${d4} ${CV}`,AV=`${Ta}-${EV}`,LV="cluster",DV=`${Ta}-${LV}`,MV="cluster-alt",NV=`${Ta}-${MV}`,f4="parent",p4="note",BV="state",cd="----",IV=`${cd}${p4}`,cp=`${cd}${f4}`,g4="fill:none",y4="fill: #333",m4="c",b4="text",_4="normal";let Kl={},Pn=0;const OV=function(t){const e=Object.keys(t);for(const r of e)t[r]},RV=function(t,e){B.trace("Extracting classes"),e.db.clear();try{return e.parser.parse(t),e.db.extract(e.db.getRootDocV2()),e.db.getClasses()}catch(r){return r}};function FV(t){return t==null?"":t.classes?t.classes.join(" "):""}function Ah(t="",e=0,r="",i=cd){const n=r!==null&&r.length>0?`${i}${r}`:"";return`${BV}-${t}${n}-${e}`}const Qa=(t,e,r,i,n,s)=>{const a=r.id,o=FV(i[a]);if(a!=="root"){let l=Xl;r.start===!0&&(l=mV),r.start===!1&&(l=bV),r.type!==tl&&(l=r.type),Kl[a]||(Kl[a]={id:a,shape:l,description:he.sanitizeText(a,$()),classes:`${o} ${TV}`});const u=Kl[a];r.description&&(Array.isArray(u.description)?(u.shape=Sh,u.description.push(r.description)):u.description.length>0?(u.shape=Sh,u.description===a?u.description=[r.description]:u.description=[u.description,r.description]):(u.shape=Xl,u.description=r.description),u.description=he.sanitizeTextOrArray(u.description,$())),u.description.length===1&&u.shape===Sh&&(u.shape=Xl),!u.type&&r.doc&&(B.info("Setting cluster for ",a,W1(r)),u.type="group",u.dir=W1(r),u.shape=r.type===e4?_V:xV,u.classes=u.classes+" "+DV+" "+(s?NV:""));const d={labelStyle:"",shape:u.shape,labelText:u.description,classes:u.classes,style:"",id:a,dir:u.dir,domId:Ah(a,Pn),type:u.type,padding:15};if(r.note){const f={labelStyle:"",shape:vV,labelText:r.note.text,classes:AV,style:"",id:a+IV+"-"+Pn,domId:Ah(a,Pn,p4),type:u.type,padding:15},p={labelStyle:"",shape:kV,labelText:r.note.text,classes:u.classes,style:"",id:a+cp,domId:Ah(a,Pn,f4),type:"group",padding:0};Pn++;const g=a+cp;t.setNode(g,p),t.setNode(f.id,f),t.setNode(a,d),t.setParent(a,g),t.setParent(f.id,g);let _=a,k=f.id;r.note.position==="left of"&&(_=f.id,k=a),t.setEdge(_,k,{arrowhead:"none",arrowType:"",style:g4,labelStyle:"",classes:SV,arrowheadStyle:y4,labelpos:m4,labelType:b4,thickness:_4})}else t.setNode(a,d)}e&&e.id!=="root"&&(B.trace("Setting node ",a," to be child of its parent ",e.id),t.setParent(a,e.id)),r.doc&&(B.trace("Adding nodes children "),PV(t,r,r.doc,i,n,!s))},PV=(t,e,r,i,n,s)=>{B.trace("items",r),r.forEach(a=>{switch(a.stmt){case Hc:Qa(t,e,a,i,n,s);break;case tl:Qa(t,e,a,i,n,s);break;case ad:{Qa(t,e,a.state1,i,n,s),Qa(t,e,a.state2,i,n,s);const o={id:"edge"+Pn,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:g4,labelStyle:"",label:he.sanitizeText(a.description,$()),arrowheadStyle:y4,labelpos:m4,labelType:b4,thickness:_4,classes:d4};t.setEdge(a.state1.id,a.state2.id,o,Pn),Pn++}break}})},W1=(t,e=DY)=>{let r=e;if(t.doc)for(let i=0;i<t.doc.length;i++){const n=t.doc[i];n.stmt==="dir"&&(r=n.value)}return r},YV=function(t,e,r,i){B.info("Drawing state diagram (v2)",e),Kl={},i.db.getDirection();const{securityLevel:n,state:s}=$(),a=s.nodeSpacing||50,o=s.rankSpacing||50;B.info(i.db.getRootDocV2()),i.db.extract(i.db.getRootDocV2()),B.info(i.db.getRootDocV2());const l=i.db.getStates(),u=new or({multigraph:!0,compound:!0}).setGraph({rankdir:W1(i.db.getRootDocV2()),nodesep:a,ranksep:o,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});Qa(u,void 0,i.db.getRootDocV2(),l,i.db,!0);let d;n==="sandbox"&&(d=At("#i"+e));const f=At(n==="sandbox"?d.nodes()[0].contentDocument.body:"body"),p=f.select(`[id="${e}"]`),g=f.select("#"+e+" g");H0(g,u,["barb"],Ta,e);const _=8;ye.insertTitle(p,"statediagramTitleText",s.titleTopMargin,i.db.getDiagramTitle());const k=p.node().getBBox(),w=k.width+_*2,S=k.height+_*2;p.attr("class",Ta);const A=p.node().getBBox();Ei(p,S,w,s.useMaxWidth);const O=`${A.x-_} ${A.y-_} ${w} ${S}`;B.debug(`viewBox ${O}`),p.attr("viewBox",O);const P=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const W of P){const q=W.getBBox(),z=document.createElementNS("http://www.w3.org/2000/svg",Xl);z.setAttribute("rx",0),z.setAttribute("ry",0),z.setAttribute("width",q.width),z.setAttribute("height",q.height),W.insertBefore(z,W.firstChild)}},VV={setConf:OV,getClasses:RV,draw:YV};var H1=function(){var t=function(k,w,S,A){for(S=S||{},A=k.length;A--;S[k[A]]=w);return S},e=[1,2],r=[1,5],i=[6,9,11,17,18,20,22,23,24,26],n=[1,15],s=[1,16],a=[1,17],o=[1,18],l=[1,19],u=[1,20],d=[1,24],f=[4,6,9,11,17,18,20,22,23,24,26],p={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,acc_title:18,acc_title_value:19,acc_descr:20,acc_descr_value:21,acc_descr_multiline_value:22,section:23,taskName:24,taskData:25,open_directive:26,type_directive:27,arg_directive:28,close_directive:29,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"acc_title",19:"acc_title_value",20:"acc_descr",21:"acc_descr_value",22:"acc_descr_multiline_value",23:"section",24:"taskName",25:"taskData",26:"open_directive",27:"type_directive",28:"arg_directive",29:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,2],[10,2],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(w,S,A,O,P,W,q){var z=W.length-1;switch(P){case 1:return W[z-1];case 3:this.$=[];break;case 4:W[z-1].push(W[z]),this.$=W[z-1];break;case 5:case 6:this.$=W[z];break;case 7:case 8:this.$=[];break;case 11:O.setDiagramTitle(W[z].substr(6)),this.$=W[z].substr(6);break;case 12:this.$=W[z].trim(),O.setAccTitle(this.$);break;case 13:case 14:this.$=W[z].trim(),O.setAccDescription(this.$);break;case 15:O.addSection(W[z].substr(8)),this.$=W[z].substr(8);break;case 16:O.addTask(W[z-1],W[z]),this.$="task";break;case 18:O.parseDirective("%%{","open_directive");break;case 19:O.parseDirective(W[z],"type_directive");break;case 20:W[z]=W[z].trim().replace(/'/g,'"'),O.parseDirective(W[z],"arg_directive");break;case 21:O.parseDirective("}%%","close_directive","journey");break}},table:[{3:1,4:e,7:3,12:4,26:r},{1:[3]},t(i,[2,3],{5:6}),{3:7,4:e,7:3,12:4,26:r},{13:8,27:[1,9]},{27:[2,18]},{6:[1,10],7:21,8:11,9:[1,12],10:13,11:[1,14],12:4,17:n,18:s,20:a,22:o,23:l,24:u,26:r},{1:[2,2]},{14:22,15:[1,23],29:d},t([15,29],[2,19]),t(i,[2,8],{1:[2,1]}),t(i,[2,4]),{7:21,10:25,12:4,17:n,18:s,20:a,22:o,23:l,24:u,26:r},t(i,[2,6]),t(i,[2,7]),t(i,[2,11]),{19:[1,26]},{21:[1,27]},t(i,[2,14]),t(i,[2,15]),{25:[1,28]},t(i,[2,17]),{11:[1,29]},{16:30,28:[1,31]},{11:[2,21]},t(i,[2,5]),t(i,[2,12]),t(i,[2,13]),t(i,[2,16]),t(f,[2,9]),{14:32,29:d},{29:[2,20]},{11:[1,33]},t(f,[2,10])],defaultActions:{5:[2,18],7:[2,2],24:[2,21],31:[2,20]},parseError:function(w,S){if(S.recoverable)this.trace(w);else{var A=new Error(w);throw A.hash=S,A}},parse:function(w){var S=this,A=[0],O=[],P=[null],W=[],q=this.table,z="",H=0,N=0,M=2,C=1,v=W.slice.call(arguments,1),D=Object.create(this.lexer),m={yy:{}};for(var Q in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Q)&&(m.yy[Q]=this.yy[Q]);D.setInput(w,m.yy),m.yy.lexer=D,m.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var b=D.yylloc;W.push(b);var ct=D.options&&D.options.ranges;typeof m.yy.parseError=="function"?this.parseError=m.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Dt(){var U;return U=O.pop()||D.lex()||C,typeof U!="number"&&(U instanceof Array&&(O=U,U=O.pop()),U=S.symbols_[U]||U),U}for(var vt,j,ot,rt,it={},ut,bt,K,Ot;;){if(j=A[A.length-1],this.defaultActions[j]?ot=this.defaultActions[j]:((vt===null||typeof vt>"u")&&(vt=Dt()),ot=q[j]&&q[j][vt]),typeof ot>"u"||!ot.length||!ot[0]){var Y="";Ot=[];for(ut in q[j])this.terminals_[ut]&&ut>M&&Ot.push("'"+this.terminals_[ut]+"'");D.showPosition?Y="Parse error on line "+(H+1)+`:
|
|
1264
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var rt=this.next();return rt||this.lex()},begin:function(rt){this.conditionStack.push(rt)},popState:function(){var rt=this.conditionStack.length-1;return rt>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(rt){return rt=this.conditionStack.length-1-Math.abs(rt||0),rt>=0?this.conditionStack[rt]:"INITIAL"},pushState:function(rt){this.begin(rt)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(rt,it,ut,bt){switch(ut){case 0:return 41;case 1:return 50;case 2:return 51;case 3:return 52;case 4:return 53;case 5:return this.begin("open_directive"),60;case 6:return this.begin("type_directive"),61;case 7:return this.popState(),this.begin("arg_directive"),48;case 8:return this.popState(),this.popState(),63;case 9:return 62;case 10:break;case 11:break;case 12:return 5;case 13:break;case 14:break;case 15:break;case 16:break;case 17:return this.pushState("SCALE"),17;case 18:return 18;case 19:this.popState();break;case 20:return this.begin("acc_title"),33;case 21:return this.popState(),"acc_title_value";case 22:return this.begin("acc_descr"),35;case 23:return this.popState(),"acc_descr_value";case 24:this.begin("acc_descr_multiline");break;case 25:this.popState();break;case 26:return"acc_descr_multiline_value";case 27:return this.pushState("CLASSDEF"),38;case 28:return this.popState(),this.pushState("CLASSDEFID"),"DEFAULT_CLASSDEF_ID";case 29:return this.popState(),this.pushState("CLASSDEFID"),39;case 30:return this.popState(),40;case 31:return this.pushState("CLASS"),42;case 32:return this.popState(),this.pushState("CLASS_STYLE"),43;case 33:return this.popState(),44;case 34:return this.pushState("SCALE"),17;case 35:return 18;case 36:this.popState();break;case 37:this.pushState("STATE");break;case 38:return this.popState(),it.yytext=it.yytext.slice(0,-8).trim(),25;case 39:return this.popState(),it.yytext=it.yytext.slice(0,-8).trim(),26;case 40:return this.popState(),it.yytext=it.yytext.slice(0,-10).trim(),27;case 41:return this.popState(),it.yytext=it.yytext.slice(0,-8).trim(),25;case 42:return this.popState(),it.yytext=it.yytext.slice(0,-8).trim(),26;case 43:return this.popState(),it.yytext=it.yytext.slice(0,-10).trim(),27;case 44:return 50;case 45:return 51;case 46:return 52;case 47:return 53;case 48:this.begin("STATE_STRING");break;case 49:return this.popState(),this.pushState("STATE_ID"),"AS";case 50:return this.popState(),"ID";case 51:this.popState();break;case 52:return"STATE_DESCR";case 53:return 19;case 54:this.popState();break;case 55:return this.popState(),this.pushState("struct"),20;case 56:break;case 57:return this.popState(),21;case 58:break;case 59:return this.begin("NOTE"),29;case 60:return this.popState(),this.pushState("NOTE_ID"),58;case 61:return this.popState(),this.pushState("NOTE_ID"),59;case 62:this.popState(),this.pushState("FLOATING_NOTE");break;case 63:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 64:break;case 65:return"NOTE_TEXT";case 66:return this.popState(),"ID";case 67:return this.popState(),this.pushState("NOTE_TEXT"),24;case 68:return this.popState(),it.yytext=it.yytext.substr(2).trim(),31;case 69:return this.popState(),it.yytext=it.yytext.slice(0,-8).trim(),31;case 70:return 7;case 71:return 7;case 72:return 16;case 73:return 56;case 74:return 24;case 75:return it.yytext=it.yytext.trim(),14;case 76:return 15;case 77:return 28;case 78:return 57;case 79:return 5;case 80:return"INVALID"}},rules:[/^(?:default\b)/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:classDef\s+)/i,/^(?:DEFAULT\s+)/i,/^(?:\w+\s+)/i,/^(?:[^\n]*)/i,/^(?:class\s+)/i,/^(?:(\w+)+((,\s*\w+)*))/i,/^(?:[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?::::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[14,15],inclusive:!1},close_directive:{rules:[14,15],inclusive:!1},arg_directive:{rules:[8,9,14,15],inclusive:!1},type_directive:{rules:[7,8,14,15],inclusive:!1},open_directive:{rules:[6,14,15],inclusive:!1},struct:{rules:[14,15,27,31,37,44,45,46,47,56,57,58,59,73,74,75,76,77],inclusive:!1},FLOATING_NOTE_ID:{rules:[66],inclusive:!1},FLOATING_NOTE:{rules:[63,64,65],inclusive:!1},NOTE_TEXT:{rules:[68,69],inclusive:!1},NOTE_ID:{rules:[67],inclusive:!1},NOTE:{rules:[60,61,62],inclusive:!1},CLASS_STYLE:{rules:[33],inclusive:!1},CLASS:{rules:[32],inclusive:!1},CLASSDEFID:{rules:[30],inclusive:!1},CLASSDEF:{rules:[28,29],inclusive:!1},acc_descr_multiline:{rules:[25,26],inclusive:!1},acc_descr:{rules:[23],inclusive:!1},acc_title:{rules:[21],inclusive:!1},SCALE:{rules:[18,19,35,36],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[50],inclusive:!1},STATE_STRING:{rules:[51,52],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[14,15,38,39,40,41,42,43,48,49,53,54,55],inclusive:!1},ID:{rules:[14,15],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,10,11,12,13,15,16,17,20,22,24,27,31,34,37,55,59,70,71,72,73,74,75,76,78,79,80],inclusive:!0}}};return j}();ct.lexer=Dt;function vt(){this.yy={}}return vt.prototype=ct,ct.Parser=vt,new vt}();V1.parser=V1;const ip=V1,SY=(t,e)=>{var r;return((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:t.match(/^\s*stateDiagram/)!==null},AY=(t,e)=>{var r;return!!(t.match(/^\s*stateDiagram-v2/)!==null||t.match(/^\s*stateDiagram/)&&((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},LY="LR",DY="TB",Hc="state",od="relation",MY="classDef",NY="applyClass",tl="default",e4="divider",ld="[*]",r4="start",i4=ld,n4="end",np="color",sp="fill",BY="bgFill",IY=",";function s4(){return{}}let a4=LY,Gc=[],uo=s4();const o4=()=>({relations:[],states:{},documents:{}});let qc={root:o4()},wr=qc.root,Fo=0,ap=0;const OY={LINE:0,DOTTED_LINE:1},RY={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},Sl=t=>JSON.parse(JSON.stringify(t)),FY=function(t,e,r){ze.parseDirective(this,t,e,r)},PY=t=>{B.info("Setting root doc",t),Gc=t},YY=()=>Gc,$l=(t,e,r)=>{if(e.stmt===od)$l(t,e.state1,!0),$l(t,e.state2,!1);else if(e.stmt===Hc&&e.id==="[*]"&&(e.id=r?t.id+"_start":t.id+"_end",e.start=r),e.doc){const i=[];let n=[],s;for(s=0;s<e.doc.length;s++)if(e.doc[s].type===e4){const a=Sl(e.doc[s]);a.doc=Sl(n),i.push(a),n=[]}else n.push(e.doc[s]);if(i.length>0&&n.length>0){const a={stmt:Hc,id:sm(),type:"divider",doc:Sl(n)};i.push(Sl(a)),e.doc=i}e.doc.forEach(a=>$l(e,a,!0))}},VY=()=>($l({id:"root"},{id:"root",doc:Gc},!0),{id:"root",doc:Gc}),UY=t=>{let e;t.doc?e=t.doc:e=t,B.info(e),l4(!0),B.info("Extract",e),e.forEach(r=>{switch(r.stmt){case Hc:Ts(r.id,r.type,r.doc,r.description,r.note,r.classes,r.styles,r.textStyles);break;case od:c4(r.state1,r.state2,r.description);break;case MY:u4(r.id,r.classes);break;case NY:cd(r.id,r.styleClass);break}})},Ts=function(t,e=tl,r=null,i=null,n=null,s=null,a=null,o=null){wr.states[t]===void 0?(B.info("Adding state ",t,i),wr.states[t]={id:t,descriptions:[],type:e,doc:r,note:n,classes:[],styles:[],textStyles:[]}):(wr.states[t].doc||(wr.states[t].doc=r),wr.states[t].type||(wr.states[t].type=e)),i&&(B.info("Setting state description",t,i),typeof i=="string"&&W1(t,i.trim()),typeof i=="object"&&i.forEach(l=>W1(t,l.trim()))),n&&(wr.states[t].note=n,wr.states[t].note.text=he.sanitizeText(wr.states[t].note.text,$())),s&&(B.info("Setting state classes",t,s),(typeof s=="string"?[s]:s).forEach(u=>cd(t,u.trim()))),a&&(B.info("Setting state styles",t,a),(typeof a=="string"?[a]:a).forEach(u=>ZY(t,u.trim()))),o&&(B.info("Setting state styles",t,a),(typeof o=="string"?[o]:o).forEach(u=>QY(t,u.trim())))},l4=function(t){qc={root:o4()},wr=qc.root,Fo=0,uo=s4(),t||Ci()},Po=function(t){return wr.states[t]},zY=function(){return wr.states},WY=function(){B.info("Documents = ",qc)},HY=function(){return wr.relations};function U1(t=""){let e=t;return t===ld&&(Fo++,e=`${r4}${Fo}`),e}function z1(t="",e=tl){return t===ld?r4:e}function GY(t=""){let e=t;return t===i4&&(Fo++,e=`${n4}${Fo}`),e}function qY(t="",e=tl){return t===i4?n4:e}function jY(t,e,r){let i=U1(t.id),n=z1(t.id,t.type),s=U1(e.id),a=z1(e.id,e.type);Ts(i,n,t.doc,t.description,t.note,t.classes,t.styles,t.textStyles),Ts(s,a,e.doc,e.description,e.note,e.classes,e.styles,e.textStyles),wr.relations.push({id1:i,id2:s,relationTitle:he.sanitizeText(r,$())})}const c4=function(t,e,r){if(typeof t=="object")jY(t,e,r);else{const i=U1(t),n=z1(t),s=GY(e),a=qY(e);Ts(i,n),Ts(s,a),wr.relations.push({id1:i,id2:s,title:he.sanitizeText(r,$())})}},W1=function(t,e){const r=wr.states[t],i=e.startsWith(":")?e.replace(":","").trim():e;r.descriptions.push(he.sanitizeText(i,$()))},$Y=function(t){return t.substring(0,1)===":"?t.substr(2).trim():t.trim()},XY=()=>(ap++,"divider-id-"+ap),u4=function(t,e=""){uo[t]===void 0&&(uo[t]={id:t,styles:[],textStyles:[]});const r=uo[t];e!=null&&e.split(IY).forEach(i=>{const n=i.replace(/([^;]*);/,"$1").trim();if(i.match(np)){const a=n.replace(sp,BY).replace(np,sp);r.textStyles.push(a)}r.styles.push(n)})},KY=function(){return uo},cd=function(t,e){t.split(",").forEach(function(r){let i=Po(r);if(i===void 0){const n=r.trim();Ts(n),i=Po(n)}i.classes.push(e)})},ZY=function(t,e){const r=Po(t);r!==void 0&&r.textStyles.push(e)},QY=function(t,e){const r=Po(t);r!==void 0&&r.textStyles.push(e)},JY=()=>a4,tV=t=>{a4=t},eV=t=>t&&t[0]===":"?t.substr(1).trim():t.trim(),ln={parseDirective:FY,getConfig:()=>$().state,addState:Ts,clear:l4,getState:Po,getStates:zY,getRelations:HY,getClasses:KY,getDirection:JY,addRelation:c4,getDividerId:XY,setDirection:tV,cleanupLabel:$Y,lineType:OY,relationType:RY,logDocuments:WY,getRootDoc:YY,setRootDoc:PY,getRootDocV2:VY,extract:UY,trimColon:eV,getAccTitle:Si,setAccTitle:ii,getAccDescription:Li,setAccDescription:Ai,addStyleClass:u4,setCssClass:cd,addDescription:W1,setDiagramTitle:Cn,getDiagramTitle:Sn},rV=t=>t.append("circle").attr("class","start-state").attr("r",$().state.sizeUnit).attr("cx",$().state.padding+$().state.sizeUnit).attr("cy",$().state.padding+$().state.sizeUnit),iV=t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",$().state.textHeight).attr("class","divider").attr("x2",$().state.textHeight*2).attr("y1",0).attr("y2",0),nV=(t,e)=>{const r=t.append("text").attr("x",2*$().state.padding).attr("y",$().state.textHeight+2*$().state.padding).attr("font-size",$().state.fontSize).attr("class","state-title").text(e.id),i=r.node().getBBox();return t.insert("rect",":first-child").attr("x",$().state.padding).attr("y",$().state.padding).attr("width",i.width+2*$().state.padding).attr("height",i.height+2*$().state.padding).attr("rx",$().state.radius),r},sV=(t,e)=>{const r=function(p,g,_){const k=p.append("tspan").attr("x",2*$().state.padding).text(g);_||k.attr("dy",$().state.textHeight)},n=t.append("text").attr("x",2*$().state.padding).attr("y",$().state.textHeight+1.3*$().state.padding).attr("font-size",$().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),s=n.height,a=t.append("text").attr("x",$().state.padding).attr("y",s+$().state.padding*.4+$().state.dividerMargin+$().state.textHeight).attr("class","state-description");let o=!0,l=!0;e.descriptions.forEach(function(p){o||(r(a,p,l),l=!1),o=!1});const u=t.append("line").attr("x1",$().state.padding).attr("y1",$().state.padding+s+$().state.dividerMargin/2).attr("y2",$().state.padding+s+$().state.dividerMargin/2).attr("class","descr-divider"),d=a.node().getBBox(),f=Math.max(d.width,n.width);return u.attr("x2",f+3*$().state.padding),t.insert("rect",":first-child").attr("x",$().state.padding).attr("y",$().state.padding).attr("width",f+2*$().state.padding).attr("height",d.height+s+2*$().state.padding).attr("rx",$().state.radius),t},aV=(t,e,r)=>{const i=$().state.padding,n=2*$().state.padding,s=t.node().getBBox(),a=s.width,o=s.x,l=t.append("text").attr("x",0).attr("y",$().state.titleShift).attr("font-size",$().state.fontSize).attr("class","state-title").text(e.id),d=l.node().getBBox().width+n;let f=Math.max(d,a);f===a&&(f=f+n);let p;const g=t.node().getBBox();e.doc,p=o-i,d>a&&(p=(a-f)/2+i),Math.abs(o-g.x)<i&&d>a&&(p=o-(d-a)/2);const _=1-$().state.textHeight;return t.insert("rect",":first-child").attr("x",p).attr("y",_).attr("class",r?"alt-composit":"composit").attr("width",f).attr("height",g.height+$().state.textHeight+$().state.titleShift+1).attr("rx","0"),l.attr("x",p+i),d<=a&&l.attr("x",o+(f-n)/2-d/2+i),t.insert("rect",":first-child").attr("x",p).attr("y",$().state.titleShift-$().state.textHeight-$().state.padding).attr("width",f).attr("height",$().state.textHeight*3).attr("rx",$().state.radius),t.insert("rect",":first-child").attr("x",p).attr("y",$().state.titleShift-$().state.textHeight-$().state.padding).attr("width",f).attr("height",g.height+3+2*$().state.textHeight).attr("rx",$().state.radius),t},oV=t=>(t.append("circle").attr("class","end-state-outer").attr("r",$().state.sizeUnit+$().state.miniPadding).attr("cx",$().state.padding+$().state.sizeUnit+$().state.miniPadding).attr("cy",$().state.padding+$().state.sizeUnit+$().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",$().state.sizeUnit).attr("cx",$().state.padding+$().state.sizeUnit+2).attr("cy",$().state.padding+$().state.sizeUnit+2)),lV=(t,e)=>{let r=$().state.forkWidth,i=$().state.forkHeight;if(e.parentId){let n=r;r=i,i=n}return t.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",i).attr("x",$().state.padding).attr("y",$().state.padding)},cV=(t,e,r,i)=>{let n=0;const s=i.append("text");s.style("text-anchor","start"),s.attr("class","noteText");let a=t.replace(/\r\n/g,"<br/>");a=a.replace(/\n/g,"<br/>");const o=a.split(he.lineBreakRegex);let l=1.25*$().state.noteMargin;for(const u of o){const d=u.trim();if(d.length>0){const f=s.append("tspan");if(f.text(d),l===0){const p=f.node().getBBox();l+=p.height}n+=l,f.attr("x",e+$().state.noteMargin),f.attr("y",r+n+1.25*$().state.noteMargin)}}return{textWidth:s.node().getBBox().width,textHeight:n}},uV=(t,e)=>{e.attr("class","state-note");const r=e.append("rect").attr("x",0).attr("y",$().state.padding),i=e.append("g"),{textWidth:n,textHeight:s}=cV(t,0,0,i);return r.attr("height",s+2*$().state.noteMargin),r.attr("width",n+$().state.noteMargin*2),r},op=function(t,e){const r=e.id,i={id:r,label:e.id,width:0,height:0},n=t.append("g").attr("id",r).attr("class","stateGroup");e.type==="start"&&rV(n),e.type==="end"&&oV(n),(e.type==="fork"||e.type==="join")&&lV(n,e),e.type==="note"&&uV(e.note.text,n),e.type==="divider"&&iV(n),e.type==="default"&&e.descriptions.length===0&&nV(n,e),e.type==="default"&&e.descriptions.length>0&&sV(n,e);const s=n.node().getBBox();return i.width=s.width+2*$().state.padding,i.height=s.height+2*$().state.padding,i};let lp=0;const hV=function(t,e,r){const i=function(l){switch(l){case ln.relationType.AGGREGATION:return"aggregation";case ln.relationType.EXTENSION:return"extension";case ln.relationType.COMPOSITION:return"composition";case ln.relationType.DEPENDENCY:return"dependency"}};e.points=e.points.filter(l=>!Number.isNaN(l.y));const n=e.points,s=Ca().x(function(l){return l.x}).y(function(l){return l.y}).curve(ua),a=t.append("path").attr("d",s(n)).attr("id","edge"+lp).attr("class","transition");let o="";if($().state.arrowMarkerAbsolute&&(o=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,o=o.replace(/\(/g,"\\("),o=o.replace(/\)/g,"\\)")),a.attr("marker-end","url("+o+"#"+i(ln.relationType.DEPENDENCY)+"End)"),r.title!==void 0){const l=t.append("g").attr("class","stateLabel"),{x:u,y:d}=ye.calcLabelPosition(e.points),f=he.getRows(r.title);let p=0;const g=[];let _=0,k=0;for(let A=0;A<=f.length;A++){const O=l.append("text").attr("text-anchor","middle").text(f[A]).attr("x",u).attr("y",d+p),P=O.node().getBBox();_=Math.max(_,P.width),k=Math.min(k,P.x),B.info(P.x,u,d+p),p===0&&(p=O.node().getBBox().height,B.info("Title height",p,d)),g.push(O)}let w=p*f.length;if(f.length>1){const A=(f.length-1)*p*.5;g.forEach((O,P)=>O.attr("y",d+P*p-A)),w=p*f.length}const S=l.node().getBBox();l.insert("rect",":first-child").attr("class","box").attr("x",u-_/2-$().state.padding/2).attr("y",d-w/2-$().state.padding/2-3.5).attr("width",_+$().state.padding).attr("height",w+$().state.padding),B.info(S)}lp++};let qr;const Ch={},dV=function(){},fV=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")},pV=function(t,e,r,i){qr=$().state;const n=$().securityLevel;let s;n==="sandbox"&&(s=At("#i"+e));const a=At(n==="sandbox"?s.nodes()[0].contentDocument.body:"body"),o=n==="sandbox"?s.nodes()[0].contentDocument:document;B.debug("Rendering diagram "+t);const l=a.select(`[id='${e}']`);fV(l),new or({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel(function(){return{}});const d=i.db.getRootDoc();h4(d,l,void 0,!1,a,o,i);const f=qr.padding,p=l.node().getBBox(),g=p.width+f*2,_=p.height+f*2,k=g*1.75;Ei(l,_,k,qr.useMaxWidth),l.attr("viewBox",`${p.x-qr.padding} ${p.y-qr.padding} `+g+" "+_)},gV=t=>t?t.length*qr.fontSizeFactor:1,h4=(t,e,r,i,n,s,a)=>{const o=new or({compound:!0,multigraph:!0});let l,u=!0;for(l=0;l<t.length;l++)if(t[l].stmt==="relation"){u=!1;break}r?o.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:u?1:qr.edgeLengthFactor,nodeSep:u?1:50,isMultiGraph:!0}):o.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:u?1:qr.edgeLengthFactor,nodeSep:u?1:50,ranker:"tight-tree",isMultiGraph:!0}),o.setDefaultEdgeLabel(function(){return{}}),a.db.extract(t);const d=a.db.getStates(),f=a.db.getRelations(),p=Object.keys(d);for(const S of p){const A=d[S];r&&(A.parentId=r);let O;if(A.doc){let P=e.append("g").attr("id",A.id).attr("class","stateGroup");O=h4(A.doc,P,A.id,!i,n,s,a);{P=aV(P,A,i);let W=P.node().getBBox();O.width=W.width,O.height=W.height+qr.padding/2,Ch[A.id]={y:qr.compositTitleSize}}}else O=op(e,A);if(A.note){const P={descriptions:[],id:A.id+"-note",note:A.note,type:"note"},W=op(e,P);A.note.position==="left of"?(o.setNode(O.id+"-note",W),o.setNode(O.id,O)):(o.setNode(O.id,O),o.setNode(O.id+"-note",W)),o.setParent(O.id,O.id+"-group"),o.setParent(O.id+"-note",O.id+"-group")}else o.setNode(O.id,O)}B.debug("Count=",o.nodeCount(),o);let g=0;f.forEach(function(S){g++,B.debug("Setting edge",S),o.setEdge(S.id1,S.id2,{relation:S,width:gV(S.title),height:qr.labelHeight*he.getRows(S.title).length,labelpos:"c"},"id"+g)}),Ma(o),B.debug("Graph after layout",o.nodes());const _=e.node();o.nodes().forEach(function(S){S!==void 0&&o.node(S)!==void 0?(B.warn("Node "+S+": "+JSON.stringify(o.node(S))),n.select("#"+_.id+" #"+S).attr("transform","translate("+(o.node(S).x-o.node(S).width/2)+","+(o.node(S).y+(Ch[S]?Ch[S].y:0)-o.node(S).height/2)+" )"),n.select("#"+_.id+" #"+S).attr("data-x-shift",o.node(S).x-o.node(S).width/2),s.querySelectorAll("#"+_.id+" #"+S+" .divider").forEach(O=>{const P=O.parentElement;let W=0,q=0;P&&(P.parentElement&&(W=P.parentElement.getBBox().width),q=parseInt(P.getAttribute("data-x-shift"),10),Number.isNaN(q)&&(q=0)),O.setAttribute("x1",0-q+8),O.setAttribute("x2",W-q-8)})):B.debug("No Node "+S+": "+JSON.stringify(o.node(S)))});let k=_.getBBox();o.edges().forEach(function(S){S!==void 0&&o.edge(S)!==void 0&&(B.debug("Edge "+S.v+" -> "+S.w+": "+JSON.stringify(o.edge(S))),hV(e,o.edge(S),o.edge(S).relation))}),k=_.getBBox();const w={id:r||"root",label:r||"root",width:0,height:0};return w.width=k.width+2*qr.padding,w.height=k.height+2*qr.padding,B.debug("Doc rendered",w,o),w},yV={setConf:dV,draw:pV},Xl="rect",Sh="rectWithTitle",mV="start",bV="end",_V="divider",xV="roundedWithTitle",vV="note",kV="noteGroup",Ta="statediagram",wV="state",TV=`${Ta}-${wV}`,d4="transition",EV="note",CV="note-edge",SV=`${d4} ${CV}`,AV=`${Ta}-${EV}`,LV="cluster",DV=`${Ta}-${LV}`,MV="cluster-alt",NV=`${Ta}-${MV}`,f4="parent",p4="note",BV="state",ud="----",IV=`${ud}${p4}`,cp=`${ud}${f4}`,g4="fill:none",y4="fill: #333",m4="c",b4="text",_4="normal";let Kl={},Pn=0;const OV=function(t){const e=Object.keys(t);for(const r of e)t[r]},RV=function(t,e){B.trace("Extracting classes"),e.db.clear();try{return e.parser.parse(t),e.db.extract(e.db.getRootDocV2()),e.db.getClasses()}catch(r){return r}};function FV(t){return t==null?"":t.classes?t.classes.join(" "):""}function Ah(t="",e=0,r="",i=ud){const n=r!==null&&r.length>0?`${i}${r}`:"";return`${BV}-${t}${n}-${e}`}const Qa=(t,e,r,i,n,s)=>{const a=r.id,o=FV(i[a]);if(a!=="root"){let l=Xl;r.start===!0&&(l=mV),r.start===!1&&(l=bV),r.type!==tl&&(l=r.type),Kl[a]||(Kl[a]={id:a,shape:l,description:he.sanitizeText(a,$()),classes:`${o} ${TV}`});const u=Kl[a];r.description&&(Array.isArray(u.description)?(u.shape=Sh,u.description.push(r.description)):u.description.length>0?(u.shape=Sh,u.description===a?u.description=[r.description]:u.description=[u.description,r.description]):(u.shape=Xl,u.description=r.description),u.description=he.sanitizeTextOrArray(u.description,$())),u.description.length===1&&u.shape===Sh&&(u.shape=Xl),!u.type&&r.doc&&(B.info("Setting cluster for ",a,H1(r)),u.type="group",u.dir=H1(r),u.shape=r.type===e4?_V:xV,u.classes=u.classes+" "+DV+" "+(s?NV:""));const d={labelStyle:"",shape:u.shape,labelText:u.description,classes:u.classes,style:"",id:a,dir:u.dir,domId:Ah(a,Pn),type:u.type,padding:15};if(r.note){const f={labelStyle:"",shape:vV,labelText:r.note.text,classes:AV,style:"",id:a+IV+"-"+Pn,domId:Ah(a,Pn,p4),type:u.type,padding:15},p={labelStyle:"",shape:kV,labelText:r.note.text,classes:u.classes,style:"",id:a+cp,domId:Ah(a,Pn,f4),type:"group",padding:0};Pn++;const g=a+cp;t.setNode(g,p),t.setNode(f.id,f),t.setNode(a,d),t.setParent(a,g),t.setParent(f.id,g);let _=a,k=f.id;r.note.position==="left of"&&(_=f.id,k=a),t.setEdge(_,k,{arrowhead:"none",arrowType:"",style:g4,labelStyle:"",classes:SV,arrowheadStyle:y4,labelpos:m4,labelType:b4,thickness:_4})}else t.setNode(a,d)}e&&e.id!=="root"&&(B.trace("Setting node ",a," to be child of its parent ",e.id),t.setParent(a,e.id)),r.doc&&(B.trace("Adding nodes children "),PV(t,r,r.doc,i,n,!s))},PV=(t,e,r,i,n,s)=>{B.trace("items",r),r.forEach(a=>{switch(a.stmt){case Hc:Qa(t,e,a,i,n,s);break;case tl:Qa(t,e,a,i,n,s);break;case od:{Qa(t,e,a.state1,i,n,s),Qa(t,e,a.state2,i,n,s);const o={id:"edge"+Pn,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:g4,labelStyle:"",label:he.sanitizeText(a.description,$()),arrowheadStyle:y4,labelpos:m4,labelType:b4,thickness:_4,classes:d4};t.setEdge(a.state1.id,a.state2.id,o,Pn),Pn++}break}})},H1=(t,e=DY)=>{let r=e;if(t.doc)for(let i=0;i<t.doc.length;i++){const n=t.doc[i];n.stmt==="dir"&&(r=n.value)}return r},YV=function(t,e,r,i){B.info("Drawing state diagram (v2)",e),Kl={},i.db.getDirection();const{securityLevel:n,state:s}=$(),a=s.nodeSpacing||50,o=s.rankSpacing||50;B.info(i.db.getRootDocV2()),i.db.extract(i.db.getRootDocV2()),B.info(i.db.getRootDocV2());const l=i.db.getStates(),u=new or({multigraph:!0,compound:!0}).setGraph({rankdir:H1(i.db.getRootDocV2()),nodesep:a,ranksep:o,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});Qa(u,void 0,i.db.getRootDocV2(),l,i.db,!0);let d;n==="sandbox"&&(d=At("#i"+e));const f=At(n==="sandbox"?d.nodes()[0].contentDocument.body:"body"),p=f.select(`[id="${e}"]`),g=f.select("#"+e+" g");G0(g,u,["barb"],Ta,e);const _=8;ye.insertTitle(p,"statediagramTitleText",s.titleTopMargin,i.db.getDiagramTitle());const k=p.node().getBBox(),w=k.width+_*2,S=k.height+_*2;p.attr("class",Ta);const A=p.node().getBBox();Ei(p,S,w,s.useMaxWidth);const O=`${A.x-_} ${A.y-_} ${w} ${S}`;B.debug(`viewBox ${O}`),p.attr("viewBox",O);const P=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(const W of P){const q=W.getBBox(),z=document.createElementNS("http://www.w3.org/2000/svg",Xl);z.setAttribute("rx",0),z.setAttribute("ry",0),z.setAttribute("width",q.width),z.setAttribute("height",q.height),W.insertBefore(z,W.firstChild)}},VV={setConf:OV,getClasses:RV,draw:YV};var G1=function(){var t=function(k,w,S,A){for(S=S||{},A=k.length;A--;S[k[A]]=w);return S},e=[1,2],r=[1,5],i=[6,9,11,17,18,20,22,23,24,26],n=[1,15],s=[1,16],a=[1,17],o=[1,18],l=[1,19],u=[1,20],d=[1,24],f=[4,6,9,11,17,18,20,22,23,24,26],p={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,acc_title:18,acc_title_value:19,acc_descr:20,acc_descr_value:21,acc_descr_multiline_value:22,section:23,taskName:24,taskData:25,open_directive:26,type_directive:27,arg_directive:28,close_directive:29,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"acc_title",19:"acc_title_value",20:"acc_descr",21:"acc_descr_value",22:"acc_descr_multiline_value",23:"section",24:"taskName",25:"taskData",26:"open_directive",27:"type_directive",28:"arg_directive",29:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,2],[10,2],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(w,S,A,O,P,W,q){var z=W.length-1;switch(P){case 1:return W[z-1];case 3:this.$=[];break;case 4:W[z-1].push(W[z]),this.$=W[z-1];break;case 5:case 6:this.$=W[z];break;case 7:case 8:this.$=[];break;case 11:O.setDiagramTitle(W[z].substr(6)),this.$=W[z].substr(6);break;case 12:this.$=W[z].trim(),O.setAccTitle(this.$);break;case 13:case 14:this.$=W[z].trim(),O.setAccDescription(this.$);break;case 15:O.addSection(W[z].substr(8)),this.$=W[z].substr(8);break;case 16:O.addTask(W[z-1],W[z]),this.$="task";break;case 18:O.parseDirective("%%{","open_directive");break;case 19:O.parseDirective(W[z],"type_directive");break;case 20:W[z]=W[z].trim().replace(/'/g,'"'),O.parseDirective(W[z],"arg_directive");break;case 21:O.parseDirective("}%%","close_directive","journey");break}},table:[{3:1,4:e,7:3,12:4,26:r},{1:[3]},t(i,[2,3],{5:6}),{3:7,4:e,7:3,12:4,26:r},{13:8,27:[1,9]},{27:[2,18]},{6:[1,10],7:21,8:11,9:[1,12],10:13,11:[1,14],12:4,17:n,18:s,20:a,22:o,23:l,24:u,26:r},{1:[2,2]},{14:22,15:[1,23],29:d},t([15,29],[2,19]),t(i,[2,8],{1:[2,1]}),t(i,[2,4]),{7:21,10:25,12:4,17:n,18:s,20:a,22:o,23:l,24:u,26:r},t(i,[2,6]),t(i,[2,7]),t(i,[2,11]),{19:[1,26]},{21:[1,27]},t(i,[2,14]),t(i,[2,15]),{25:[1,28]},t(i,[2,17]),{11:[1,29]},{16:30,28:[1,31]},{11:[2,21]},t(i,[2,5]),t(i,[2,12]),t(i,[2,13]),t(i,[2,16]),t(f,[2,9]),{14:32,29:d},{29:[2,20]},{11:[1,33]},t(f,[2,10])],defaultActions:{5:[2,18],7:[2,2],24:[2,21],31:[2,20]},parseError:function(w,S){if(S.recoverable)this.trace(w);else{var A=new Error(w);throw A.hash=S,A}},parse:function(w){var S=this,A=[0],O=[],P=[null],W=[],q=this.table,z="",H=0,N=0,M=2,C=1,v=W.slice.call(arguments,1),D=Object.create(this.lexer),m={yy:{}};for(var Q in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Q)&&(m.yy[Q]=this.yy[Q]);D.setInput(w,m.yy),m.yy.lexer=D,m.yy.parser=this,typeof D.yylloc>"u"&&(D.yylloc={});var b=D.yylloc;W.push(b);var ct=D.options&&D.options.ranges;typeof m.yy.parseError=="function"?this.parseError=m.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Dt(){var U;return U=O.pop()||D.lex()||C,typeof U!="number"&&(U instanceof Array&&(O=U,U=O.pop()),U=S.symbols_[U]||U),U}for(var vt,j,ot,rt,it={},ut,bt,K,Ot;;){if(j=A[A.length-1],this.defaultActions[j]?ot=this.defaultActions[j]:((vt===null||typeof vt>"u")&&(vt=Dt()),ot=q[j]&&q[j][vt]),typeof ot>"u"||!ot.length||!ot[0]){var Y="";Ot=[];for(ut in q[j])this.terminals_[ut]&&ut>M&&Ot.push("'"+this.terminals_[ut]+"'");D.showPosition?Y="Parse error on line "+(H+1)+`:
|
|
1265
1265
|
`+D.showPosition()+`
|
|
1266
1266
|
Expecting `+Ot.join(", ")+", got '"+(this.terminals_[vt]||vt)+"'":Y="Parse error on line "+(H+1)+": Unexpected "+(vt==C?"end of input":"'"+(this.terminals_[vt]||vt)+"'"),this.parseError(Y,{text:D.match,token:this.terminals_[vt]||vt,line:D.yylineno,loc:b,expected:Ot})}if(ot[0]instanceof Array&&ot.length>1)throw new Error("Parse Error: multiple actions possible at state: "+j+", token: "+vt);switch(ot[0]){case 1:A.push(vt),P.push(D.yytext),W.push(D.yylloc),A.push(ot[1]),vt=null,N=D.yyleng,z=D.yytext,H=D.yylineno,b=D.yylloc;break;case 2:if(bt=this.productions_[ot[1]][1],it.$=P[P.length-bt],it._$={first_line:W[W.length-(bt||1)].first_line,last_line:W[W.length-1].last_line,first_column:W[W.length-(bt||1)].first_column,last_column:W[W.length-1].last_column},ct&&(it._$.range=[W[W.length-(bt||1)].range[0],W[W.length-1].range[1]]),rt=this.performAction.apply(it,[z,N,H,m.yy,ot[1],P,W].concat(v)),typeof rt<"u")return rt;bt&&(A=A.slice(0,-1*bt*2),P=P.slice(0,-1*bt),W=W.slice(0,-1*bt)),A.push(this.productions_[ot[1]][0]),P.push(it.$),W.push(it._$),K=q[A[A.length-2]][A[A.length-1]],A.push(K);break;case 3:return!0}}return!0}},g=function(){var k={EOF:1,parseError:function(S,A){if(this.yy.parser)this.yy.parser.parseError(S,A);else throw new Error(S)},setInput:function(w,S){return this.yy=S||this.yy||{},this._input=w,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var w=this._input[0];this.yytext+=w,this.yyleng++,this.offset++,this.match+=w,this.matched+=w;var S=w.match(/(?:\r\n?|\n).*/g);return S?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),w},unput:function(w){var S=w.length,A=w.split(/(?:\r\n?|\n)/g);this._input=w+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-S),this.offset-=S;var O=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),A.length-1&&(this.yylineno-=A.length-1);var P=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:A?(A.length===O.length?this.yylloc.first_column:0)+O[O.length-A.length].length-A[0].length:this.yylloc.first_column-S},this.options.ranges&&(this.yylloc.range=[P[0],P[0]+this.yyleng-S]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
|
|
1267
1267
|
`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(w){this.unput(this.match.slice(w))},pastInput:function(){var w=this.matched.substr(0,this.matched.length-this.match.length);return(w.length>20?"...":"")+w.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var w=this.match;return w.length<20&&(w+=this._input.substr(0,20-w.length)),(w.substr(0,20)+(w.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var w=this.pastInput(),S=new Array(w.length+1).join("-");return w+this.upcomingInput()+`
|
|
1268
1268
|
`+S+"^"},test_match:function(w,S){var A,O,P;if(this.options.backtrack_lexer&&(P={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(P.yylloc.range=this.yylloc.range.slice(0))),O=w[0].match(/(?:\r\n?|\n).*/g),O&&(this.yylineno+=O.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:O?O[O.length-1].length-O[O.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+w[0].length},this.yytext+=w[0],this.match+=w[0],this.matches=w,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(w[0].length),this.matched+=w[0],A=this.performAction.call(this,this.yy,this,S,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),A)return A;if(this._backtrack){for(var W in P)this[W]=P[W];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var w,S,A,O;this._more||(this.yytext="",this.match="");for(var P=this._currentRules(),W=0;W<P.length;W++)if(A=this._input.match(this.rules[P[W]]),A&&(!S||A[0].length>S[0].length)){if(S=A,O=W,this.options.backtrack_lexer){if(w=this.test_match(A,P[W]),w!==!1)return w;if(this._backtrack){S=!1;continue}else return!1}else if(!this.options.flex)break}return S?(w=this.test_match(S,P[O]),w!==!1?w:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
|
|
1269
|
-
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var S=this.next();return S||this.lex()},begin:function(S){this.conditionStack.push(S)},popState:function(){var S=this.conditionStack.length-1;return S>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(S){return S=this.conditionStack.length-1-Math.abs(S||0),S>=0?this.conditionStack[S]:"INITIAL"},pushState:function(S){this.begin(S)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(S,A,O,P){switch(O){case 0:return this.begin("open_directive"),26;case 1:return this.begin("type_directive"),27;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),29;case 4:return 28;case 5:break;case 6:break;case 7:return 11;case 8:break;case 9:break;case 10:return 4;case 11:return 17;case 12:return this.begin("acc_title"),18;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),20;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:return 23;case 20:return 24;case 21:return 25;case 22:return 15;case 23:return 6;case 24:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,14,16,19,20,21,22,23,24],inclusive:!0}}};return k}();p.lexer=g;function _(){this.yy={}}return _.prototype=p,p.Parser=_,new _}();
|
|
1269
|
+
`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var S=this.next();return S||this.lex()},begin:function(S){this.conditionStack.push(S)},popState:function(){var S=this.conditionStack.length-1;return S>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(S){return S=this.conditionStack.length-1-Math.abs(S||0),S>=0?this.conditionStack[S]:"INITIAL"},pushState:function(S){this.begin(S)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(S,A,O,P){switch(O){case 0:return this.begin("open_directive"),26;case 1:return this.begin("type_directive"),27;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),29;case 4:return 28;case 5:break;case 6:break;case 7:return 11;case 8:break;case 9:break;case 10:return 4;case 11:return 17;case 12:return this.begin("acc_title"),18;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),20;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:return 23;case 20:return 24;case 21:return 25;case 22:return 15;case 23:return 6;case 24:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,14,16,19,20,21,22,23,24],inclusive:!0}}};return k}();p.lexer=g;function _(){this.yy={}}return _.prototype=p,p.Parser=_,new _}();G1.parser=G1;const UV=G1,zV=t=>t.match(/^\s*journey/)!==null;let Ea="";const hd=[],Yo=[],Vo=[],WV=function(t,e,r){ze.parseDirective(this,t,e,r)},HV=function(){hd.length=0,Yo.length=0,Ea="",Vo.length=0,Ci()},GV=function(t){Ea=t,hd.push(t)},qV=function(){return hd},jV=function(){let t=up();const e=100;let r=0;for(;!t&&r<e;)t=up(),r++;return Yo.push(...Vo),Yo},$V=function(){const t=[];return Yo.forEach(r=>{r.people&&t.push(...r.people)}),[...new Set(t)].sort()},XV=function(t,e){const r=e.substr(1).split(":");let i=0,n=[];r.length===1?(i=Number(r[0]),n=[]):(i=Number(r[0]),n=r[1].split(","));const s=n.map(o=>o.trim()),a={section:Ea,type:Ea,people:s,task:t,score:i};Vo.push(a)},KV=function(t){const e={section:Ea,type:Ea,description:t,task:t,classes:[]};Yo.push(e)},up=function(){const t=function(r){return Vo[r].processed};let e=!0;for(const[r,i]of Vo.entries())t(r),e=e&&i.processed;return e},ZV=function(){return $V()},hp={parseDirective:WV,getConfig:()=>$().journey,clear:HV,setDiagramTitle:Cn,getDiagramTitle:Sn,setAccTitle:ii,getAccTitle:Si,setAccDescription:Ai,getAccDescription:Li,addSection:GV,getSections:qV,getTasks:jV,addTask:XV,addTaskOrg:KV,getActors:ZV},Iu=function(t,e){const r=t.append("rect");return r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),e.class!==void 0&&r.attr("class",e.class),r},QV=function(t,e){const i=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),n=t.append("g");n.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),n.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function s(l){const u=Xh().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function a(l){const u=Xh().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function o(l){l.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return e.score>3?s(n):e.score<3?a(n):o(n),i},x4=function(t,e){const r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),r.class!==void 0&&r.attr("class",r.class),e.title!==void 0&&r.append("title").text(e.title),r},v4=function(t,e){const r=e.text.replace(/<br\s*\/?>/gi," "),i=t.append("text");i.attr("x",e.x),i.attr("y",e.y),i.attr("class","legend"),i.style("text-anchor",e.anchor),e.class!==void 0&&i.attr("class",e.class);const n=i.append("tspan");return n.attr("x",e.x+e.textMargin*2),n.text(r),i},JV=function(t,e){function r(n,s,a,o,l){return n+","+s+" "+(n+a)+","+s+" "+(n+a)+","+(s+o-l)+" "+(n+a-l*1.2)+","+(s+o)+" "+n+","+(s+o)}const i=t.append("polygon");i.attr("points",r(e.x,e.y,50,20,7)),i.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,v4(t,e)},tU=function(t,e,r){const i=t.append("g"),n=dd();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,Iu(i,n),k4(r)(e.text,i,n.x,n.y,n.width,n.height,{class:"journey-section section-type-"+e.num},r,e.colour)};let dp=-1;const eU=function(t,e,r){const i=e.x+r.width/2,n=t.append("g");dp++;const s=300+5*30;n.append("line").attr("id","task"+dp).attr("x1",i).attr("y1",e.y).attr("x2",i).attr("y2",s).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),QV(n,{cx:i,cy:300+(5-e.score)*30,score:e.score});const a=dd();a.x=e.x,a.y=e.y,a.fill=e.fill,a.width=r.width,a.height=r.height,a.class="task task-type-"+e.num,a.rx=3,a.ry=3,Iu(n,a);let o=e.x+14;e.people.forEach(l=>{const u=e.actors[l].color,d={cx:o,cy:e.y,r:7,fill:u,stroke:"#000",title:l,pos:e.actors[l].position};x4(n,d),o+=10}),k4(r)(e.task,n,a.x,a.y,a.width,a.height,{class:"task"},r,e.colour)},rU=function(t,e){Iu(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},iU=function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},dd=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},k4=function(){function t(n,s,a,o,l,u,d,f){const p=s.append("text").attr("x",a+l/2).attr("y",o+u/2+5).style("font-color",f).style("text-anchor","middle").text(n);i(p,d)}function e(n,s,a,o,l,u,d,f,p){const{taskFontSize:g,taskFontFamily:_}=f,k=n.split(/<br\s*\/?>/gi);for(let w=0;w<k.length;w++){const S=w*g-g*(k.length-1)/2,A=s.append("text").attr("x",a+l/2).attr("y",o).attr("fill",p).style("text-anchor","middle").style("font-size",g).style("font-family",_);A.append("tspan").attr("x",a+l/2).attr("dy",S).text(k[w]),A.attr("y",o+u/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),i(A,d)}}function r(n,s,a,o,l,u,d,f){const p=s.append("switch"),_=p.append("foreignObject").attr("x",a).attr("y",o).attr("width",l).attr("height",u).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");_.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(n),e(n,p,a,o,l,u,d,f),i(_,d)}function i(n,s){for(const a in s)a in s&&n.attr(a,s[a])}return function(n){return n.textPlacement==="fo"?r:n.textPlacement==="old"?t:e}}(),nU=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")},Uo={drawRect:Iu,drawCircle:x4,drawSection:tU,drawText:v4,drawLabel:JV,drawTask:eU,drawBackgroundRect:rU,getTextObj:iU,getNoteRect:dd,initGraphics:nU},sU=function(t){Object.keys(t).forEach(function(r){Ou[r]=t[r]})},gn={};function aU(t){const e=$().journey;let r=60;Object.keys(gn).forEach(i=>{const n=gn[i].color,s={cx:20,cy:r,r:7,fill:n,stroke:"#000",pos:gn[i].position};Uo.drawCircle(t,s);const a={x:40,y:r+7,fill:"#666",text:i,textMargin:e.boxTextMargin|5};Uo.drawText(t,a),r+=20})}const Ou=$().journey,us=Ou.leftMargin,oU=function(t,e,r,i){const n=$().journey;i.db.clear(),i.parser.parse(t+`
|
|
1270
1270
|
`);const s=$().securityLevel;let a;s==="sandbox"&&(a=At("#i"+e));const o=At(s==="sandbox"?a.nodes()[0].contentDocument.body:"body");Jr.init();const l=o.select("#"+e);Uo.initGraphics(l);const u=i.db.getTasks(),d=i.db.getDiagramTitle(),f=i.db.getActors();for(const S in gn)delete gn[S];let p=0;f.forEach(S=>{gn[S]={color:n.actorColours[p%n.actorColours.length],position:p},p++}),aU(l),Jr.insert(0,0,us,Object.keys(gn).length*50),lU(l,u,0);const g=Jr.getBounds();d&&l.append("text").text(d).attr("x",us).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const _=g.stopy-g.starty+2*n.diagramMarginY,k=us+g.stopx+2*n.diagramMarginX;Ei(l,_,k,n.useMaxWidth),l.append("line").attr("x1",us).attr("y1",n.height*4).attr("x2",k-us-4).attr("y2",n.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const w=d?70:0;l.attr("viewBox",`${g.startx} -25 ${k} ${_+w}`),l.attr("preserveAspectRatio","xMinYMin meet"),l.attr("height",_+w+25)},Jr={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,r,i){t[e]===void 0?t[e]=r:t[e]=i(r,t[e])},updateBounds:function(t,e,r,i){const n=$().journey,s=this;let a=0;function o(l){return function(d){a++;const f=s.sequenceItems.length-a+1;s.updateVal(d,"starty",e-f*n.boxMargin,Math.min),s.updateVal(d,"stopy",i+f*n.boxMargin,Math.max),s.updateVal(Jr.data,"startx",t-f*n.boxMargin,Math.min),s.updateVal(Jr.data,"stopx",r+f*n.boxMargin,Math.max),l!=="activation"&&(s.updateVal(d,"startx",t-f*n.boxMargin,Math.min),s.updateVal(d,"stopx",r+f*n.boxMargin,Math.max),s.updateVal(Jr.data,"starty",e-f*n.boxMargin,Math.min),s.updateVal(Jr.data,"stopy",i+f*n.boxMargin,Math.max))}}this.sequenceItems.forEach(o())},insert:function(t,e,r,i){const n=Math.min(t,r),s=Math.max(t,r),a=Math.min(e,i),o=Math.max(e,i);this.updateVal(Jr.data,"startx",n,Math.min),this.updateVal(Jr.data,"starty",a,Math.min),this.updateVal(Jr.data,"stopx",s,Math.max),this.updateVal(Jr.data,"stopy",o,Math.max),this.updateBounds(n,a,s,o)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},Lh=Ou.sectionFills,fp=Ou.sectionColours,lU=function(t,e,r){const i=$().journey;let n="";const s=i.height*2+i.diagramMarginY,a=r+s;let o=0,l="#CCC",u="black",d=0;for(const[f,p]of e.entries()){if(n!==p.section){l=Lh[o%Lh.length],d=o%Lh.length,u=fp[o%fp.length];const _={x:f*i.taskMargin+f*i.width+us,y:50,text:p.section,fill:l,num:d,colour:u};Uo.drawSection(t,_,i),n=p.section,o++}const g=p.people.reduce((_,k)=>(gn[k]&&(_[k]=gn[k]),_),{});p.x=f*i.taskMargin+f*i.width+us,p.y=a,p.width=i.diagramMarginX,p.height=i.diagramMarginY,p.colour=u,p.fill=l,p.num=d,p.actors=g,Uo.drawTask(t,p,i),Jr.insert(p.x,p.y,p.x+p.width+i.taskMargin,300+5*30)}},pp={setConf:sU,draw:oU};let gp={};const cU=function(t){gp={...gp,...t}},uU=(t,e,r)=>{try{B.debug(`Renering svg for syntax error
|
|
1271
|
-
`);const i=At("#"+e),n=i.append("g");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 graph"),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),i.attr("height",100),i.attr("width",500),i.attr("viewBox","768 0 912 512")}catch(i){B.error("Error while rendering info diagram"),B.error(RM(i))}},
|
|
1271
|
+
`);const i=At("#"+e),n=i.append("g");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 graph"),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),i.attr("height",100),i.attr("width",500),i.attr("viewBox","768 0 912 512")}catch(i){B.error("Error while rendering info diagram"),B.error(RM(i))}},fd={setConf:cU,draw:uU};let yp=!1;const el=()=>{yp||(yp=!0,dr("error",{db:{clear:()=>{}},styles:gm,renderer:fd,parser:{parser:{yy:{}},parse:()=>{}},init:()=>{}},t=>t.toLowerCase().trim()==="error"),dr("c4",{parser:rB,db:Nm,renderer:F2,styles:km,init:t=>{F2.setConf(t.c4)}},iB),dr("class",{parser:P2,db:Xs,renderer:CI,styles:so,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Xs.clear()}},XB),dr("classDiagram",{parser:P2,db:Xs,renderer:VO,styles:so,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Xs.clear()}},KB),dr("er",{parser:UO,db:ZO,renderer:lR,styles:pm},zO),dr("gantt",{parser:JR,db:id,renderer:IF,styles:ym},tF),dr("info",{parser:OF,db:VF,renderer:zF,styles:mm},WF),dr("pie",{parser:HF,db:JF,renderer:eP,styles:bm},GF),dr("requirement",{parser:rP,db:kP,renderer:MP,styles:_m},iP),dr("sequence",{parser:NP,db:tp,renderer:rp,styles:xm,init:t=>{if(t.sequence||(t.sequence={}),t.sequence.arrowMarkerAbsolute=t.arrowMarkerAbsolute,"sequenceDiagram"in t)throw new Error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.");tp.setWrap(t.wrap),rp.setConf(t.sequence)}},BP),dr("state",{parser:ip,db:ln,renderer:yV,styles:Cc,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,ln.clear()}},SY),dr("stateDiagram",{parser:ip,db:ln,renderer:VV,styles:Cc,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,ln.clear()}},AY),dr("journey",{parser:UV,db:hp,renderer:pp,styles:vm,init:t=>{pp.setConf(t.journey),hp.clear()}},zV),dr("flowchart",{parser:K2,db:an,renderer:Eh,styles:Ec,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,XR.setConf(t.flowchart),an.clear(),an.setGen("gen-1")}},cR),dr("flowchart-v2",{parser:K2,db:an,renderer:Eh,styles:Ec,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,um({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),Eh.setConf(t.flowchart),an.clear(),an.setGen("gen-2")}},uR),dr("gitGraph",{parser:EN,db:GN,renderer:JN,styles:eB},CN))};class q1{constructor(e,r){za(this,"type","graph"),za(this,"parser"),za(this,"renderer"),za(this,"db"),za(this,"detectTypeFailed",!1);var i,n;this.txt=e;const s=$();this.txt=e;try{this.type=D0(e,s)}catch(l){this.handleError(l,r),this.type="error",this.detectTypeFailed=!0}const a=Tm(this.type);B.debug("Type "+this.type),this.db=a.db,(n=(i=this.db).clear)==null||n.call(i),this.renderer=a.renderer,this.parser=a.parser;const o=this.parser.parse.bind(this.parser);this.parser.parse=l=>o(yM(l,this.db)),this.parser.parser.yy=this.db,a.init&&(a.init(s),B.debug("Initialized diagram "+this.type,s)),this.txt+=`
|
|
1272
1272
|
`,this.parse(this.txt,r)}parse(e,r){var i,n;if(this.detectTypeFailed)return!1;try{return e=e+`
|
|
1273
|
-
`,(n=(i=this.db).clear)==null||n.call(i),this.parser.parse(e),!0}catch(s){this.handleError(s,r)}return!1}handleError(e,r){if(r===void 0)throw e;if(
|
|
1273
|
+
`,(n=(i=this.db).clear)==null||n.call(i),this.parser.parse(e),!0}catch(s){this.handleError(s,r)}return!1}handleError(e,r){if(r===void 0)throw e;if(N0(e)){r(e.str,e.hash);return}r(e)}getParser(){return this.parser}getType(){return this.type}}const pd=(t,e)=>{const r=D0(t,$());try{Tm(r)}catch{const n=_M(r);if(!n)throw new Error(`Diagram ${r} not found.`);return n().then(({diagram:s})=>(dr(r,s,void 0),new q1(t,e)))}return new q1(t,e)},gd=q1;function hU(t,e){ea(e)||t.attr("aria-roledescription",e)}function dU(t,e,r,i){if(t.insert!==void 0)if(e||r){if(r){const n="chart-desc-"+i;t.attr("aria-describedby",n),t.insert("desc",":first-child").attr("id",n).text(r)}if(e){const n="chart-title-"+i;t.attr("aria-labelledby",n),t.insert("title",":first-child").attr("id",n).text(e)}}else return}const yd=["graph","flowchart","flowchart-v2","stateDiagram","stateDiagram-v2"],w4="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa",T4="sandbox",E4="loose",fU="http://www.w3.org/2000/svg",C4="http://www.w3.org/1999/xlink",S4="http://www.w3.org/1999/xhtml",pU="100%",gU="100%",yU="border:0;margin:0;",mU="margin:0",bU="allow-top-navigation-by-user-activation allow-popups",_U='The "iframe" tag is not supported by your browser.',A4=["foreignobject"],L4=["dominant-baseline"];function xU(t,e){return el(),new gd(t,e).parse(t,e)}async function vU(t,e){return el(),(await pd(t,e)).parse(t,e)}const D4=function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){const i=r.substring(1,r.length-1);return/^\+?\d+$/.test(i)?"fl°°"+i+"¶ß":"fl°"+i+"¶ß"}),e},md=function(t){let e=t;return e=e.replace(/fl°°/g,"&#"),e=e.replace(/fl°/g,"&"),e=e.replace(/¶ß/g,";"),e},mp=(t,e,r=[])=>`
|
|
1274
1274
|
.${t} ${e} { ${r.join(" !important; ")} !important; }`,kU=(t,e,r={})=>{var i;let n="";if(t.themeCSS!==void 0&&(n+=`
|
|
1275
1275
|
${t.themeCSS}`),t.fontFamily!==void 0&&(n+=`
|
|
1276
1276
|
:root { --mermaid-font-family: ${t.fontFamily}}`),t.altFontFamily!==void 0&&(n+=`
|
|
1277
|
-
:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),!ea(r)&&
|
|
1277
|
+
:root { --mermaid-alt-font-family: ${t.altFontFamily}}`),!ea(r)&&yd.includes(e)){const l=t.htmlLabels||((i=t.flowchart)==null?void 0:i.htmlLabels)?["> *","span"]:["rect","polygon","ellipse","circle","path"];for(const u in r){const d=r[u];ea(d.styles)||l.forEach(f=>{n+=mp(d.id,f,d.styles)}),ea(d.textStyles)||(n+=mp(d.id,"tspan",d.textStyles))}}return n},M4=(t,e,r,i)=>{const n=kU(t,e,r),s=vN(e,n,t.themeVariables);return Z4(J4(`${i}{${s}}`),Q4)},N4=(t="",e,r)=>{let i=t;return!r&&!e&&(i=i.replace(/marker-end="url\(.*?#/g,'marker-end="url(#')),i=md(i),i=i.replace(/<br>/g,"<br/>"),i},B4=(t="",e)=>{const r=e?e.viewBox.baseVal.height+"px":gU,i=btoa('<body style="'+mU+'">'+t+"</body>");return`<iframe style="width:${pU};height:${r};${yU}" src="data:text/html;base64,${i}" sandbox="${bU}">
|
|
1278
1278
|
${_U}
|
|
1279
|
-
</iframe>`},jc=(t,e,r,i,n)=>{const s=t.append("div");s.attr("id",r),i&&s.attr("style",i);const a=s.append("svg").attr("id",e).attr("width","100%").attr("xmlns",fU);return n&&a.attr("xmlns:xlink",n),a.append("g"),t};function $c(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}const I4=(t,e,r,i)=>{var n,s,a;(n=t.getElementById(e))==null||n.remove(),(s=t.getElementById(r))==null||s.remove(),(a=t.getElementById(i))==null||a.remove()},wU=function(t,e,r,i){var n,s,a,o,l;el(),Ao();const u=ye.detectInit(e);u&&(vs(u),
|
|
1280
|
-
`);const f="#"+t,p="i"+t,g="#"+p,_="d"+t,k="#"+_;let w=At("body");const S=d.securityLevel===T4,A=d.securityLevel===E4,O=d.fontFamily;if(i!==void 0){if(i&&(i.innerHTML=""),S){const vt=$c(At(i),p);w=At(vt.nodes()[0].contentDocument.body),w.node().style.margin=0}else w=At(i);jc(w,t,_,`font-family: ${O}`,C4)}else{if(I4(document,t,_,p),S){const vt=$c(At("body"),p);w=At(vt.nodes()[0].contentDocument.body),w.node().style.margin=0}else w=At("body");jc(w,t,_)}e=D4(e);let P,W;try{if(P=
|
|
1281
|
-
`);const f="#"+t,p="i"+t,g="#"+p,_="d"+t,k="#"+_;let w=At("body");const S=d.securityLevel===T4,A=d.securityLevel===E4,O=d.fontFamily;if(i!==void 0){if(i&&(i.innerHTML=""),S){const vt=$c(At(i),p);w=At(vt.nodes()[0].contentDocument.body),w.node().style.margin=0}else w=At(i);jc(w,t,_,`font-family: ${O}`,C4)}else{if(I4(document,t,_,p),S){const vt=$c(At("body"),p);w=At(vt.nodes()[0].contentDocument.body),w.node().style.margin=0}else w=At("body");jc(w,t,_)}e=D4(e);let P,W;try{P=await
|
|
1279
|
+
</iframe>`},jc=(t,e,r,i,n)=>{const s=t.append("div");s.attr("id",r),i&&s.attr("style",i);const a=s.append("svg").attr("id",e).attr("width","100%").attr("xmlns",fU);return n&&a.attr("xmlns:xlink",n),a.append("g"),t};function $c(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}const I4=(t,e,r,i)=>{var n,s,a;(n=t.getElementById(e))==null||n.remove(),(s=t.getElementById(r))==null||s.remove(),(a=t.getElementById(i))==null||a.remove()},wU=function(t,e,r,i){var n,s,a,o,l;el(),Ao();const u=ye.detectInit(e);u&&(vs(u),B0(u));const d=$();B.debug(d),e.length>((n=d==null?void 0:d.maxTextSize)!=null?n:5e4)&&(e=w4),e=e.replace(/\r\n?/g,`
|
|
1280
|
+
`);const f="#"+t,p="i"+t,g="#"+p,_="d"+t,k="#"+_;let w=At("body");const S=d.securityLevel===T4,A=d.securityLevel===E4,O=d.fontFamily;if(i!==void 0){if(i&&(i.innerHTML=""),S){const vt=$c(At(i),p);w=At(vt.nodes()[0].contentDocument.body),w.node().style.margin=0}else w=At(i);jc(w,t,_,`font-family: ${O}`,C4)}else{if(I4(document,t,_,p),S){const vt=$c(At("body"),p);w=At(vt.nodes()[0].contentDocument.body),w.node().style.margin=0}else w=At("body");jc(w,t,_)}e=D4(e);let P,W;try{if(P=pd(e),"then"in P)throw new Error("Diagram is a promise. Use renderAsync.")}catch(vt){P=new gd("error"),W=vt}const q=w.select(k).node(),z=P.type,H=q.firstChild,N=H.firstChild,M=yd.includes(z)?P.renderer.getClasses(e,P):{},C=M4(d,z,M,f),v=document.createElement("style");v.innerHTML=C,H.insertBefore(v,N);try{P.renderer.draw(e,t,Tc.version,P)}catch(vt){throw fd.draw(e,t,Tc.version),vt}const D=w.select(`${k} svg`),m=(a=(s=P.db).getAccTitle)==null?void 0:a.call(s),Q=(l=(o=P.db).getAccDescription)==null?void 0:l.call(o);O4(z,D,m,Q),w.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",S4);let b=w.select(k).node().innerHTML;if(B.debug("config.arrowMarkerAbsolute",d.arrowMarkerAbsolute),b=N4(b,S,gr(d.arrowMarkerAbsolute)),S){const vt=w.select(k+" svg").node();b=B4(b,vt)}else A||(b=_o.sanitize(b,{ADD_TAGS:A4,ADD_ATTR:L4}));if(r!==void 0)switch(z){case"flowchart":case"flowchart-v2":r(b,an.bindFunctions);break;case"gantt":r(b,id.bindFunctions);break;case"class":case"classDiagram":r(b,Xs.bindFunctions);break;default:r(b)}else B.debug("CB = undefined!");q3();const Dt=At(S?g:k).node();if(Dt&&"remove"in Dt&&Dt.remove(),W)throw W;return b},TU=async function(t,e,r,i){var n,s,a,o,l;el(),Ao();const u=ye.detectInit(e);u&&(vs(u),B0(u));const d=$();B.debug(d),e.length>((n=d==null?void 0:d.maxTextSize)!=null?n:5e4)&&(e=w4),e=e.replace(/\r\n?/g,`
|
|
1281
|
+
`);const f="#"+t,p="i"+t,g="#"+p,_="d"+t,k="#"+_;let w=At("body");const S=d.securityLevel===T4,A=d.securityLevel===E4,O=d.fontFamily;if(i!==void 0){if(i&&(i.innerHTML=""),S){const vt=$c(At(i),p);w=At(vt.nodes()[0].contentDocument.body),w.node().style.margin=0}else w=At(i);jc(w,t,_,`font-family: ${O}`,C4)}else{if(I4(document,t,_,p),S){const vt=$c(At("body"),p);w=At(vt.nodes()[0].contentDocument.body),w.node().style.margin=0}else w=At("body");jc(w,t,_)}e=D4(e);let P,W;try{P=await pd(e)}catch(vt){P=new gd("error"),W=vt}const q=w.select(k).node(),z=P.type,H=q.firstChild,N=H.firstChild,M=yd.includes(z)?P.renderer.getClasses(e,P):{},C=M4(d,z,M,f),v=document.createElement("style");v.innerHTML=C,H.insertBefore(v,N);try{await P.renderer.draw(e,t,Tc.version,P)}catch(vt){throw fd.draw(e,t,Tc.version),vt}const D=w.select(`${k} svg`),m=(a=(s=P.db).getAccTitle)==null?void 0:a.call(s),Q=(l=(o=P.db).getAccDescription)==null?void 0:l.call(o);O4(z,D,m,Q),w.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns",S4);let b=w.select(k).node().innerHTML;if(B.debug("config.arrowMarkerAbsolute",d.arrowMarkerAbsolute),b=N4(b,S,gr(d.arrowMarkerAbsolute)),S){const vt=w.select(k+" svg").node();b=B4(b,vt)}else A||(b=_o.sanitize(b,{ADD_TAGS:A4,ADD_ATTR:L4}));if(r!==void 0)switch(z){case"flowchart":case"flowchart-v2":r(b,an.bindFunctions);break;case"gantt":r(b,id.bindFunctions);break;case"class":case"classDiagram":r(b,Xs.bindFunctions);break;default:r(b)}else B.debug("CB = undefined!");q3();const Dt=At(S?g:k).node();if(Dt&&"remove"in Dt&&Dt.remove(),W)throw W;return b};let as={};const EU=function(t,e,r,i){try{if(e!==void 0)switch(e=e.trim(),r){case"open_directive":as={};break;case"type_directive":if(!as)throw new Error("currentDirective is undefined");as.type=e.toLowerCase();break;case"arg_directive":if(!as)throw new Error("currentDirective is undefined");as.args=JSON.parse(e);break;case"close_directive":CU(t,as,i),as=void 0;break}}catch(n){B.error(`Error while rendering sequenceDiagram directive: ${e} jison context: ${r}`),B.error(n.message)}},CU=function(t,e,r){switch(B.debug(`Directive type=${e.type} with args:`,e.args),e.type){case"init":case"initialize":{["config"].forEach(i=>{e.args[i]!==void 0&&(r==="flowchart-v2"&&(r="flowchart"),e.args[r]=e.args[i],delete e.args[i])}),B.debug("sanitize in handleDirective",e.args),vs(e.args),B.debug("sanitize in handleDirective (done)",e.args),B0(e.args);break}case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap(e.type==="wrap");break;case"themeCss":B.warn("themeCss encountered");break;default:B.warn(`Unhandled directive: source: '%%{${e.type}: ${JSON.stringify(e.args?e.args:{})}}%%`,e);break}};function SU(t={}){var e;t!=null&&t.fontFamily&&!((e=t.themeVariables)!=null&&e.fontFamily)&&(t.themeVariables={fontFamily:t.fontFamily}),rN(t),t!=null&&t.theme&&t.theme in mn?t.themeVariables=mn[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=mn.default.getThemeVariables(t.themeVariables));const r=typeof t=="object"?eN(t):cm();C0(r.logLevel),el()}function O4(t,e,r,i){hU(e,t),dU(e,r,i,e.attr("id"))}const ze=Object.freeze({render:wU,renderAsync:TU,parse:xU,parseAsync:vU,parseDirective:EU,initialize:SU,getConfig:$,setConfig:um,getSiteConfig:cm,updateSiteConfig:iN,reset:()=>{Ao()},globalReset:()=>{Ao(ma)},defaultConfig:ma});C0($().logLevel);Ao($());let R4=!1;const AU=async function(t,e,r){try{R4?await Y4(t,e,r):P4(t,e,r)}catch(i){B.warn("Syntax Error rendering"),N0(i)&&B.warn(i.str),Kr.parseError&&Kr.parseError(i)}},F4=(t,e,r)=>{B.warn(t),N0(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}))},P4=function(t,e,r){const i=ze.getConfig();t&&(Kr.sequenceConfig=t),B.debug(`${r?"":"No "}Callback function found`);let n;if(e===void 0)n=document.querySelectorAll(".mermaid");else if(typeof e=="string")n=document.querySelectorAll(e);else if(e instanceof HTMLElement)n=[e];else if(e instanceof NodeList)n=e;else throw new Error("Invalid argument nodes for mermaid.init");B.debug(`Found ${n.length} diagrams`),(t==null?void 0:t.startOnLoad)!==void 0&&(B.debug("Start On Load: "+(t==null?void 0:t.startOnLoad)),ze.updateSiteConfig({startOnLoad:t==null?void 0:t.startOnLoad}));const s=new ye.initIdGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const o=[];for(const l of Array.from(n)){B.info("Rendering diagram: "+l.id);/*! Check if previously processed */if(l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const u=`mermaid-${s.next()}`;a=l.innerHTML,a=ye.entityDecode(a).trim().replace(/<br\s*\/?>/gi,"<br/>");const d=ye.detectInit(a);d&&B.debug("Detected early reinit: ",d);try{ze.render(u,a,(f,p)=>{l.innerHTML=f,r!==void 0&&r(u),p&&p(l)},l)}catch(f){F4(f,o,Kr.parseError)}}if(o.length>0)throw o[0]},LU=t=>{for(const{id:e,detector:r,loader:i}of t)im(e,r,i)},DU=async t=>{B.debug(`Loading ${t.length} external diagrams`);const r=(await Promise.allSettled(t.map(async({id:i,detector:n,loader:s})=>{const{diagram:a}=await s();dr(i,a,n)}))).filter(i=>i.status==="rejected");if(r.length>0){B.error(`Failed to load ${r.length} external diagrams`);for(const i of r)B.error(i);throw new Error(`Failed to load ${r.length} external diagrams`)}},Y4=async function(t,e,r){const i=ze.getConfig();t&&(Kr.sequenceConfig=t),B.debug(`${r?"":"No "}Callback function found`);let n;if(e===void 0)n=document.querySelectorAll(".mermaid");else if(typeof e=="string")n=document.querySelectorAll(e);else if(e instanceof HTMLElement)n=[e];else if(e instanceof NodeList)n=e;else throw new Error("Invalid argument nodes for mermaid.init");B.debug(`Found ${n.length} diagrams`),(t==null?void 0:t.startOnLoad)!==void 0&&(B.debug("Start On Load: "+(t==null?void 0:t.startOnLoad)),ze.updateSiteConfig({startOnLoad:t==null?void 0:t.startOnLoad}));const s=new ye.initIdGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const o=[];for(const l of Array.from(n)){B.info("Rendering diagram: "+l.id);/*! Check if previously processed */if(l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const u=`mermaid-${s.next()}`;a=l.innerHTML,a=ye.entityDecode(a).trim().replace(/<br\s*\/?>/gi,"<br/>");const d=ye.detectInit(a);d&&B.debug("Detected early reinit: ",d);try{await ze.renderAsync(u,a,(f,p)=>{l.innerHTML=f,r!==void 0&&r(u),p&&p(l)},l)}catch(f){F4(f,o,Kr.parseError)}}if(o.length>0)throw o[0]},MU=function(t){ze.initialize(t)},NU=async(t,{lazyLoad:e=!0}={})=>{e?LU(t):await DU(t),R4=!0},V4=function(){if(Kr.startOnLoad){const{startOnLoad:t}=ze.getConfig();t&&Kr.init()}};if(typeof document<"u"){/*!
|
|
1282
1282
|
* Wait for document loaded before starting the execution
|
|
1283
1283
|
*/window.addEventListener("load",V4,!1)}const BU=function(t){Kr.parseError=t},IU=t=>ze.parse(t,Kr.parseError),Xc=[];let Dh=!1;const U4=async()=>{if(!Dh){for(Dh=!0;Xc.length>0;){const t=Xc.shift();if(t)try{await t()}catch(e){B.error("Error executing queue",e)}}Dh=!1}},OU=t=>new Promise((e,r)=>{const i=()=>new Promise((n,s)=>{ze.parseAsync(t,Kr.parseError).then(a=>{n(a),e(a)},a=>{B.error("Error parsing",a),s(a),r(a)})});Xc.push(i),U4()}),RU=(t,e,r,i)=>new Promise((n,s)=>{const a=()=>new Promise((o,l)=>{ze.renderAsync(t,e,r,i).then(u=>{o(u),n(u)},u=>{B.error("Error parsing",u),l(u),s(u)})});Xc.push(a),U4()}),Kr={startOnLoad:!0,diagrams:{},mermaidAPI:ze,parse:IU,parseAsync:OU,render:ze.render,renderAsync:RU,init:AU,initThrowsErrors:P4,initThrowsErrorsAsync:Y4,registerExternalDiagrams:NU,initialize:MU,parseError:void 0,contentLoaded:V4,setParseErrorHandler:BU},FU=bp("div")(({theme:t})=>({display:"flex",justifyContent:"center","#mermaid .edgeLabel":{backgroundColor:t.palette.background.paper}}));Kr.initialize({startOnLoad:!1,theme:"default",themeCSS:`
|
|
1284
1284
|
.clusters #_ rect {
|
|
1285
1285
|
fill: transparent;
|
|
1286
1286
|
stroke: transparent;
|
|
1287
1287
|
}
|
|
1288
|
-
`});const PU=({children:t,...e})=>{const r=
|
|
1288
|
+
`});const PU=({children:t,...e})=>{const r=Mh.useRef(null);return Mh.useEffect(()=>{Kr.render("mermaid",t,i=>{r.current&&(r.current.innerHTML=i)})},[t]),Al(FU,{ref:r,...e})},YU=bp(PU)(({theme:t})=>({"#mermaid .node rect":{fill:t.palette.secondary.light,stroke:t.palette.secondary.border}})),VU=t=>t[0]*1e3>new Date().getTime()-6e5,UU=t=>{var r;const e=(r=t==null?void 0:t.data)==null?void 0:r.result;return(e==null?void 0:e.map(i=>{var o,l,u;const s=(i.values||[]).filter(d=>VU(d))||[];let a=0;return s.length&&(a=parseFloat(s[s.length-1][1])),{label:Id((o=i.metric)==null?void 0:o.appName),reqs:a.toFixed(2),type:Id((u=(l=i.metric)==null?void 0:l.endpoint)==null?void 0:u.split("/")[2])}}).filter(i=>i.label!=="unknown").filter(i=>i.reqs!=="0.00"))??[]},GU=()=>{tb("Network - Overview");const{metrics:t}=sb(),e=Mh.useMemo(()=>UU(t),[t]),r=`
|
|
1289
1289
|
graph TD
|
|
1290
1290
|
subgraph _[ ]
|
|
1291
1291
|
direction BT
|
|
1292
1292
|
Unleash(<img src='${eb(nb)}' width='60' height='60' /><br/>Unleash)
|
|
1293
|
-
${
|
|
1293
|
+
${e.map(({label:i,reqs:n,type:s},a)=>`app-${a}(${i}) -- ${n} req/s<br>${s} --> Unleash`).join(`
|
|
1294
1294
|
`)}
|
|
1295
1295
|
end
|
|
1296
|
-
`;return Al(rb,{condition:
|
|
1296
|
+
`;return Al(rb,{condition:e.length===0,show:Al(ib,{severity:"warning",children:"No data available."}),elseShow:Al(YU,{children:r})})};export{GU as NetworkOverview,GU as default};
|