ruru
Version:
Grafast-flavoured GraphiQL distribution
3 lines • 930 kB
JavaScript
/*! For license information please see 4636.js.LICENSE.txt */
export const __webpack_esm_id__=4636;export const __webpack_esm_ids__=[4636];export const __webpack_esm_modules__={25552(t,e){Object.defineProperty(e,"__esModule",{value:!0}),e.BLANK_URL=e.relativeFirstCharacters=e.whitespaceEscapeCharsRegex=e.urlSchemeRegex=e.ctrlCharactersRegex=e.htmlCtrlEntityRegex=e.htmlEntitiesRegex=e.invalidProtocolRegex=void 0,e.invalidProtocolRegex=/^([^\w]*)(javascript|data|vbscript)/im,e.htmlEntitiesRegex=/&#(\w+)(^\w|;)?/g,e.htmlCtrlEntityRegex=/&(newline|tab);/gi,e.ctrlCharactersRegex=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,e.urlSchemeRegex=/^.+(:|:)/gim,e.whitespaceEscapeCharsRegex=/(\\|%5[cC])((%(6[eE]|72|74))|[nrt])/g,e.relativeFirstCharacters=[".","/"],e.BLANK_URL="about:blank"},8041(t,e,r){Object.defineProperty(e,"__esModule",{value:!0}),e.sanitizeUrl=function(t){if(!t)return i.BLANK_URL;var e,r=o(t.trim());do{e=(r=o(r=n(r).replace(i.htmlCtrlEntityRegex,"").replace(i.ctrlCharactersRegex,"").replace(i.whitespaceEscapeCharsRegex,"").trim())).match(i.ctrlCharactersRegex)||r.match(i.htmlEntitiesRegex)||r.match(i.htmlCtrlEntityRegex)||r.match(i.whitespaceEscapeCharsRegex)}while(e&&e.length>0);var a=r;if(!a)return i.BLANK_URL;if(function(t){return i.relativeFirstCharacters.indexOf(t[0])>-1}(a))return a;var s=a.trimStart(),l=s.match(i.urlSchemeRegex);if(!l)return a;var h=l[0].toLowerCase().trim();if(i.invalidProtocolRegex.test(h))return i.BLANK_URL;var c=s.replace(/\\/g,"/");if("mailto:"===h||h.includes("://"))return c;if("http:"===h||"https:"===h){if(!function(t){return URL.canParse(t)}(c))return i.BLANK_URL;var u=new URL(c);return u.protocol=u.protocol.toLowerCase(),u.hostname=u.hostname.toLowerCase(),u.toString()}return c};var i=r(25552);function n(t){return t.replace(i.ctrlCharactersRegex,"").replace(i.htmlEntitiesRegex,function(t,e){return String.fromCharCode(e)})}function o(t){try{return decodeURIComponent(t)}catch(e){return t}}},23464(t){t.exports=function(){var t=6e4,e=36e5,r="millisecond",i="second",n="minute",o="hour",a="day",s="week",l="month",h="quarter",c="year",u="date",d="Invalid Date",f=/^(\d{4})[-/]?(\d{1,2})?[-/]?(\d{0,2})[Tt\s]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?[.:]?(\d+)?$/,p=/\[([^\]]+)]|YYYY|YY|M{1,4}|D{1,2}|d{1,4}|H{1,2}|h{1,2}|a|A|m{1,2}|s{1,2}|Z{1,2}|SSS/g,g={name:"en",weekdays:"Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),months:"January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ordinal:function(t){var e=["th","st","nd","rd"],r=t%100;return"["+t+(e[(r-20)%10]||e[r]||e[0])+"]"}},m=function(t,e,r){var i=String(t);return!i||i.length>=e?t:""+Array(e+1-i.length).join(r)+t},y={s:m,z:function(t){var e=-t.utcOffset(),r=Math.abs(e),i=Math.floor(r/60),n=r%60;return(e<=0?"+":"-")+m(i,2,"0")+":"+m(n,2,"0")},m:function t(e,r){if(e.date()<r.date())return-t(r,e);var i=12*(r.year()-e.year())+(r.month()-e.month()),n=e.clone().add(i,l),o=r-n<0,a=e.clone().add(i+(o?-1:1),l);return+(-(i+(r-n)/(o?n-a:a-n))||0)},a:function(t){return t<0?Math.ceil(t)||0:Math.floor(t)},p:function(t){return{M:l,y:c,w:s,d:a,D:u,h:o,m:n,s:i,ms:r,Q:h}[t]||String(t||"").toLowerCase().replace(/s$/,"")},u:function(t){return void 0===t}},b="en",x={};x[b]=g;var C="$isDayjsObject",_=function(t){return t instanceof S||!(!t||!t[C])},k=function t(e,r,i){var n;if(!e)return b;if("string"==typeof e){var o=e.toLowerCase();x[o]&&(n=o),r&&(x[o]=r,n=o);var a=e.split("-");if(!n&&a.length>1)return t(a[0])}else{var s=e.name;x[s]=e,n=s}return!i&&n&&(b=n),n||!i&&b},w=function(t,e){if(_(t))return t.clone();var r="object"==typeof e?e:{};return r.date=t,r.args=arguments,new S(r)},v=y;v.l=k,v.i=_,v.w=function(t,e){return w(t,{locale:e.$L,utc:e.$u,x:e.$x,$offset:e.$offset})};var S=function(){function g(t){this.$L=k(t.locale,null,!0),this.parse(t),this.$x=this.$x||t.x||{},this[C]=!0}var m=g.prototype;return m.parse=function(t){this.$d=function(t){var e=t.date,r=t.utc;if(null===e)return new Date(NaN);if(v.u(e))return new Date;if(e instanceof Date)return new Date(e);if("string"==typeof e&&!/Z$/i.test(e)){var i=e.match(f);if(i){var n=i[2]-1||0,o=(i[7]||"0").substring(0,3);return r?new Date(Date.UTC(i[1],n,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)):new Date(i[1],n,i[3]||1,i[4]||0,i[5]||0,i[6]||0,o)}}return new Date(e)}(t),this.init()},m.init=function(){var t=this.$d;this.$y=t.getFullYear(),this.$M=t.getMonth(),this.$D=t.getDate(),this.$W=t.getDay(),this.$H=t.getHours(),this.$m=t.getMinutes(),this.$s=t.getSeconds(),this.$ms=t.getMilliseconds()},m.$utils=function(){return v},m.isValid=function(){return!(this.$d.toString()===d)},m.isSame=function(t,e){var r=w(t);return this.startOf(e)<=r&&r<=this.endOf(e)},m.isAfter=function(t,e){return w(t)<this.startOf(e)},m.isBefore=function(t,e){return this.endOf(e)<w(t)},m.$g=function(t,e,r){return v.u(t)?this[e]:this.set(r,t)},m.unix=function(){return Math.floor(this.valueOf()/1e3)},m.valueOf=function(){return this.$d.getTime()},m.startOf=function(t,e){var r=this,h=!!v.u(e)||e,d=v.p(t),f=function(t,e){var i=v.w(r.$u?Date.UTC(r.$y,e,t):new Date(r.$y,e,t),r);return h?i:i.endOf(a)},p=function(t,e){return v.w(r.toDate()[t].apply(r.toDate("s"),(h?[0,0,0,0]:[23,59,59,999]).slice(e)),r)},g=this.$W,m=this.$M,y=this.$D,b="set"+(this.$u?"UTC":"");switch(d){case c:return h?f(1,0):f(31,11);case l:return h?f(1,m):f(0,m+1);case s:var x=this.$locale().weekStart||0,C=(g<x?g+7:g)-x;return f(h?y-C:y+(6-C),m);case a:case u:return p(b+"Hours",0);case o:return p(b+"Minutes",1);case n:return p(b+"Seconds",2);case i:return p(b+"Milliseconds",3);default:return this.clone()}},m.endOf=function(t){return this.startOf(t,!1)},m.$set=function(t,e){var s,h=v.p(t),d="set"+(this.$u?"UTC":""),f=(s={},s[a]=d+"Date",s[u]=d+"Date",s[l]=d+"Month",s[c]=d+"FullYear",s[o]=d+"Hours",s[n]=d+"Minutes",s[i]=d+"Seconds",s[r]=d+"Milliseconds",s)[h],p=h===a?this.$D+(e-this.$W):e;if(h===l||h===c){var g=this.clone().set(u,1);g.$d[f](p),g.init(),this.$d=g.set(u,Math.min(this.$D,g.daysInMonth())).$d}else f&&this.$d[f](p);return this.init(),this},m.set=function(t,e){return this.clone().$set(t,e)},m.get=function(t){return this[v.p(t)]()},m.add=function(r,h){var u,d=this;r=Number(r);var f=v.p(h),p=function(t){var e=w(d);return v.w(e.date(e.date()+Math.round(t*r)),d)};if(f===l)return this.set(l,this.$M+r);if(f===c)return this.set(c,this.$y+r);if(f===a)return p(1);if(f===s)return p(7);var g=(u={},u[n]=t,u[o]=e,u[i]=1e3,u)[f]||1,m=this.$d.getTime()+r*g;return v.w(m,this)},m.subtract=function(t,e){return this.add(-1*t,e)},m.format=function(t){var e=this,r=this.$locale();if(!this.isValid())return r.invalidDate||d;var i=t||"YYYY-MM-DDTHH:mm:ssZ",n=v.z(this),o=this.$H,a=this.$m,s=this.$M,l=r.weekdays,h=r.months,c=r.meridiem,u=function(t,r,n,o){return t&&(t[r]||t(e,i))||n[r].slice(0,o)},f=function(t){return v.s(o%12||12,t,"0")},g=c||function(t,e,r){var i=t<12?"AM":"PM";return r?i.toLowerCase():i};return i.replace(p,function(t,i){return i||function(t){switch(t){case"YY":return String(e.$y).slice(-2);case"YYYY":return v.s(e.$y,4,"0");case"M":return s+1;case"MM":return v.s(s+1,2,"0");case"MMM":return u(r.monthsShort,s,h,3);case"MMMM":return u(h,s);case"D":return e.$D;case"DD":return v.s(e.$D,2,"0");case"d":return String(e.$W);case"dd":return u(r.weekdaysMin,e.$W,l,2);case"ddd":return u(r.weekdaysShort,e.$W,l,3);case"dddd":return l[e.$W];case"H":return String(o);case"HH":return v.s(o,2,"0");case"h":return f(1);case"hh":return f(2);case"a":return g(o,a,!0);case"A":return g(o,a,!1);case"m":return String(a);case"mm":return v.s(a,2,"0");case"s":return String(e.$s);case"ss":return v.s(e.$s,2,"0");case"SSS":return v.s(e.$ms,3,"0");case"Z":return n}return null}(t)||n.replace(":","")})},m.utcOffset=function(){return 15*-Math.round(this.$d.getTimezoneOffset()/15)},m.diff=function(r,u,d){var f,p=this,g=v.p(u),m=w(r),y=(m.utcOffset()-this.utcOffset())*t,b=this-m,x=function(){return v.m(p,m)};switch(g){case c:f=x()/12;break;case l:f=x();break;case h:f=x()/3;break;case s:f=(b-y)/6048e5;break;case a:f=(b-y)/864e5;break;case o:f=b/e;break;case n:f=b/t;break;case i:f=b/1e3;break;default:f=b}return d?f:v.a(f)},m.daysInMonth=function(){return this.endOf(l).$D},m.$locale=function(){return x[this.$L]},m.locale=function(t,e){if(!t)return this.$L;var r=this.clone(),i=k(t,e,!0);return i&&(r.$L=i),r},m.clone=function(){return v.w(this.$d,this)},m.toDate=function(){return new Date(this.valueOf())},m.toJSON=function(){return this.isValid()?this.toISOString():null},m.toISOString=function(){return this.$d.toISOString()},m.toString=function(){return this.$d.toUTCString()},g}(),T=S.prototype;return w.prototype=T,[["$ms",r],["$s",i],["$m",n],["$H",o],["$W",a],["$M",l],["$y",c],["$D",u]].forEach(function(t){T[t[1]]=function(e){return this.$g(e,t[0],t[1])}}),w.extend=function(t,e){return t.$i||(t(e,S,w),t.$i=!0),w},w.locale=k,w.isDayjs=_,w.unix=function(t){return w(1e3*t)},w.en=x[b],w.Ls=x,w.p={},w}()},93945(t,e,r){var i;!function(){var e={initialize:function(){this._tasks=new Map},mutate:function(t,e){return n(this,"mutate",t,e)},measure:function(t,e){return n(this,"measure",t,e)},clear:function(t){var e=this._tasks,r=e.get(t);this.fastdom.clear(r),e.delete(t)}};function n(t,e,r,i){var n,o=t._tasks,a=t.fastdom,s=new Promise(function(t,l){n=a[e](function(){o.delete(s);try{t(i?r.call(i):r())}catch(t){l(t)}},i)});return o.set(s,n),s}"f"=="function"[0]?void 0===(i=function(){return e}.call(e,r,e,t))||(t.exports=i):"o"=="object"[0]?t.exports=e:window.fastdomPromised=e}()},47510(t,e,r){var i;!function(e){var n=e.requestAnimationFrame||e.webkitRequestAnimationFrame||e.mozRequestAnimationFrame||e.msRequestAnimationFrame||function(t){return setTimeout(t,16)};function o(){var t=this;t.reads=[],t.writes=[],t.raf=n.bind(e)}function a(t){t.scheduled||(t.scheduled=!0,t.raf(s.bind(null,t)))}function s(t){var e,r=t.writes,i=t.reads;try{i.length,t.runTasks(i),r.length,t.runTasks(r)}catch(t){e=t}if(t.scheduled=!1,(i.length||r.length)&&a(t),e){if(e.message,!t.catch)throw e;t.catch(e)}}function l(t,e){var r=t.indexOf(e);return!!~r&&!!t.splice(r,1)}o.prototype={constructor:o,runTasks:function(t){for(var e;e=t.shift();)e()},measure:function(t,e){var r=e?t.bind(e):t;return this.reads.push(r),a(this),r},mutate:function(t,e){var r=e?t.bind(e):t;return this.writes.push(r),a(this),r},clear:function(t){return l(this.reads,t)||l(this.writes,t)},extend:function(t){if("object"!=typeof t)throw new Error("expected object");var e=Object.create(this);return function(t,e){for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r])}(e,t),e.fastdom=this,e.initialize&&e.initialize(),e},catch:null};var h=e.fastdom=e.fastdom||new o;void 0===(i=function(){return h}.call(h,r,h,t))||(t.exports=i)}("undefined"!=typeof window?window:void 0!==this?this:globalThis)},7083(t,e,r){function i(t,e,r){if(t&&t.length){const[i,n]=e,o=Math.PI/180*r,a=Math.cos(o),s=Math.sin(o);for(const e of t){const[t,r]=e;e[0]=(t-i)*a-(r-n)*s+i,e[1]=(t-i)*s+(r-n)*a+n}}}function n(t,e){return t[0]===e[0]&&t[1]===e[1]}function o(t,e,r,o=1){const a=r,s=Math.max(e,.1),l=t[0]&&t[0][0]&&"number"==typeof t[0][0]?[t]:t,h=[0,0];if(a)for(const t of l)i(t,h,a);const c=function(t,e,r){const i=[];for(const e of t){const t=[...e];n(t[0],t[t.length-1])||t.push([t[0][0],t[0][1]]),t.length>2&&i.push(t)}const o=[];e=Math.max(e,.1);const a=[];for(const t of i)for(let e=0;e<t.length-1;e++){const r=t[e],i=t[e+1];if(r[1]!==i[1]){const t=Math.min(r[1],i[1]);a.push({ymin:t,ymax:Math.max(r[1],i[1]),x:t===r[1]?r[0]:i[0],islope:(i[0]-r[0])/(i[1]-r[1])})}}if(a.sort((t,e)=>t.ymin<e.ymin?-1:t.ymin>e.ymin?1:t.x<e.x?-1:t.x>e.x?1:t.ymax===e.ymax?0:(t.ymax-e.ymax)/Math.abs(t.ymax-e.ymax)),!a.length)return o;let s=[],l=a[0].ymin,h=0;for(;s.length||a.length;){if(a.length){let t=-1;for(let e=0;e<a.length&&!(a[e].ymin>l);e++)t=e;a.splice(0,t+1).forEach(t=>{s.push({s:l,edge:t})})}if(s=s.filter(t=>!(t.edge.ymax<=l)),s.sort((t,e)=>t.edge.x===e.edge.x?0:(t.edge.x-e.edge.x)/Math.abs(t.edge.x-e.edge.x)),(1!==r||h%e==0)&&s.length>1)for(let t=0;t<s.length;t+=2){const e=t+1;if(e>=s.length)break;const r=s[t].edge,i=s[e].edge;o.push([[Math.round(r.x),l],[Math.round(i.x),l]])}l+=r,s.forEach(t=>{t.edge.x=t.edge.x+r*t.edge.islope}),h++}return o}(l,s,o);if(a){for(const t of l)i(t,h,-a);!function(t,e,r){const n=[];t.forEach(t=>n.push(...t)),i(n,e,r)}(c,h,-a)}return c}function a(t,e){var r;const i=e.hachureAngle+90;let n=e.hachureGap;n<0&&(n=4*e.strokeWidth),n=Math.round(Math.max(n,.1));let a=1;return e.roughness>=1&&((null===(r=e.randomizer)||void 0===r?void 0:r.next())||Math.random())>.7&&(a=n),o(t,n,i,a||1)}r.r(e),r.d(e,{default:()=>nt});class s{constructor(t){this.helper=t}fillPolygons(t,e){return this._fillPolygons(t,e)}_fillPolygons(t,e){const r=a(t,e);return{type:"fillSketch",ops:this.renderLines(r,e)}}renderLines(t,e){const r=[];for(const i of t)r.push(...this.helper.doubleLineOps(i[0][0],i[0][1],i[1][0],i[1][1],e));return r}}function l(t){const e=t[0],r=t[1];return Math.sqrt(Math.pow(e[0]-r[0],2)+Math.pow(e[1]-r[1],2))}class h extends s{fillPolygons(t,e){let r=e.hachureGap;r<0&&(r=4*e.strokeWidth),r=Math.max(r,.1);const i=a(t,Object.assign({},e,{hachureGap:r})),n=Math.PI/180*e.hachureAngle,o=[],s=.5*r*Math.cos(n),h=.5*r*Math.sin(n);for(const[t,e]of i)l([t,e])&&o.push([[t[0]-s,t[1]+h],[...e]],[[t[0]+s,t[1]-h],[...e]]);return{type:"fillSketch",ops:this.renderLines(o,e)}}}class c extends s{fillPolygons(t,e){const r=this._fillPolygons(t,e),i=Object.assign({},e,{hachureAngle:e.hachureAngle+90}),n=this._fillPolygons(t,i);return r.ops=r.ops.concat(n.ops),r}}class u{constructor(t){this.helper=t}fillPolygons(t,e){const r=a(t,e=Object.assign({},e,{hachureAngle:0}));return this.dotsOnLines(r,e)}dotsOnLines(t,e){const r=[];let i=e.hachureGap;i<0&&(i=4*e.strokeWidth),i=Math.max(i,.1);let n=e.fillWeight;n<0&&(n=e.strokeWidth/2);const o=i/4;for(const a of t){const t=l(a),s=t/i,h=Math.ceil(s)-1,c=t-h*i,u=(a[0][0]+a[1][0])/2-i/4,d=Math.min(a[0][1],a[1][1]);for(let t=0;t<h;t++){const a=d+c+t*i,s=u-o+2*Math.random()*o,l=a-o+2*Math.random()*o,h=this.helper.ellipse(s,l,n,n,e);r.push(...h.ops)}}return{type:"fillSketch",ops:r}}}class d{constructor(t){this.helper=t}fillPolygons(t,e){const r=a(t,e);return{type:"fillSketch",ops:this.dashedLine(r,e)}}dashedLine(t,e){const r=e.dashOffset<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashOffset,i=e.dashGap<0?e.hachureGap<0?4*e.strokeWidth:e.hachureGap:e.dashGap,n=[];return t.forEach(t=>{const o=l(t),a=Math.floor(o/(r+i)),s=(o+i-a*(r+i))/2;let h=t[0],c=t[1];h[0]>c[0]&&(h=t[1],c=t[0]);const u=Math.atan((c[1]-h[1])/(c[0]-h[0]));for(let t=0;t<a;t++){const o=t*(r+i),a=o+r,l=[h[0]+o*Math.cos(u)+s*Math.cos(u),h[1]+o*Math.sin(u)+s*Math.sin(u)],c=[h[0]+a*Math.cos(u)+s*Math.cos(u),h[1]+a*Math.sin(u)+s*Math.sin(u)];n.push(...this.helper.doubleLineOps(l[0],l[1],c[0],c[1],e))}}),n}}class f{constructor(t){this.helper=t}fillPolygons(t,e){const r=e.hachureGap<0?4*e.strokeWidth:e.hachureGap,i=e.zigzagOffset<0?r:e.zigzagOffset,n=a(t,e=Object.assign({},e,{hachureGap:r+i}));return{type:"fillSketch",ops:this.zigzagLines(n,i,e)}}zigzagLines(t,e,r){const i=[];return t.forEach(t=>{const n=l(t),o=Math.round(n/(2*e));let a=t[0],s=t[1];a[0]>s[0]&&(a=t[1],s=t[0]);const h=Math.atan((s[1]-a[1])/(s[0]-a[0]));for(let t=0;t<o;t++){const n=2*t*e,o=2*(t+1)*e,s=Math.sqrt(2*Math.pow(e,2)),l=[a[0]+n*Math.cos(h),a[1]+n*Math.sin(h)],c=[a[0]+o*Math.cos(h),a[1]+o*Math.sin(h)],u=[l[0]+s*Math.cos(h+Math.PI/4),l[1]+s*Math.sin(h+Math.PI/4)];i.push(...this.helper.doubleLineOps(l[0],l[1],u[0],u[1],r),...this.helper.doubleLineOps(u[0],u[1],c[0],c[1],r))}}),i}}const p={};class g{constructor(t){this.seed=t}next(){return this.seed?(2**31-1&(this.seed=Math.imul(48271,this.seed)))/2**31:Math.random()}}const m={A:7,a:7,C:6,c:6,H:1,h:1,L:2,l:2,M:2,m:2,Q:4,q:4,S:4,s:4,T:2,t:2,V:1,v:1,Z:0,z:0};function y(t,e){return t.type===e}function b(t){const e=[],r=function(t){const e=new Array;for(;""!==t;)if(t.match(/^([ \t\r\n,]+)/))t=t.substr(RegExp.$1.length);else if(t.match(/^([aAcChHlLmMqQsStTvVzZ])/))e[e.length]={type:0,text:RegExp.$1},t=t.substr(RegExp.$1.length);else{if(!t.match(/^(([-+]?[0-9]+(\.[0-9]*)?|[-+]?\.[0-9]+)([eE][-+]?[0-9]+)?)/))return[];e[e.length]={type:1,text:`${parseFloat(RegExp.$1)}`},t=t.substr(RegExp.$1.length)}return e[e.length]={type:2,text:""},e}(t);let i="BOD",n=0,o=r[n];for(;!y(o,2);){let a=0;const s=[];if("BOD"===i){if("M"!==o.text&&"m"!==o.text)return b("M0,0"+t);n++,a=m[o.text],i=o.text}else y(o,1)?a=m[i]:(n++,a=m[o.text],i=o.text);if(!(n+a<r.length))throw new Error("Path data ended short");for(let t=n;t<n+a;t++){const e=r[t];if(!y(e,1))throw new Error("Param not a number: "+i+","+e.text);s[s.length]=+e.text}if("number"!=typeof m[i])throw new Error("Bad segment: "+i);{const t={key:i,data:s};e.push(t),n+=a,o=r[n],"M"===i&&(i="L"),"m"===i&&(i="l")}}return e}function x(t){let e=0,r=0,i=0,n=0;const o=[];for(const{key:a,data:s}of t)switch(a){case"M":o.push({key:"M",data:[...s]}),[e,r]=s,[i,n]=s;break;case"m":e+=s[0],r+=s[1],o.push({key:"M",data:[e,r]}),i=e,n=r;break;case"L":o.push({key:"L",data:[...s]}),[e,r]=s;break;case"l":e+=s[0],r+=s[1],o.push({key:"L",data:[e,r]});break;case"C":o.push({key:"C",data:[...s]}),e=s[4],r=s[5];break;case"c":{const t=s.map((t,i)=>i%2?t+r:t+e);o.push({key:"C",data:t}),e=t[4],r=t[5];break}case"Q":o.push({key:"Q",data:[...s]}),e=s[2],r=s[3];break;case"q":{const t=s.map((t,i)=>i%2?t+r:t+e);o.push({key:"Q",data:t}),e=t[2],r=t[3];break}case"A":o.push({key:"A",data:[...s]}),e=s[5],r=s[6];break;case"a":e+=s[5],r+=s[6],o.push({key:"A",data:[s[0],s[1],s[2],s[3],s[4],e,r]});break;case"H":o.push({key:"H",data:[...s]}),e=s[0];break;case"h":e+=s[0],o.push({key:"H",data:[e]});break;case"V":o.push({key:"V",data:[...s]}),r=s[0];break;case"v":r+=s[0],o.push({key:"V",data:[r]});break;case"S":o.push({key:"S",data:[...s]}),e=s[2],r=s[3];break;case"s":{const t=s.map((t,i)=>i%2?t+r:t+e);o.push({key:"S",data:t}),e=t[2],r=t[3];break}case"T":o.push({key:"T",data:[...s]}),e=s[0],r=s[1];break;case"t":e+=s[0],r+=s[1],o.push({key:"T",data:[e,r]});break;case"Z":case"z":o.push({key:"Z",data:[]}),e=i,r=n}return o}function C(t){const e=[];let r="",i=0,n=0,o=0,a=0,s=0,l=0;for(const{key:h,data:c}of t){switch(h){case"M":e.push({key:"M",data:[...c]}),[i,n]=c,[o,a]=c;break;case"C":e.push({key:"C",data:[...c]}),i=c[4],n=c[5],s=c[2],l=c[3];break;case"L":e.push({key:"L",data:[...c]}),[i,n]=c;break;case"H":i=c[0],e.push({key:"L",data:[i,n]});break;case"V":n=c[0],e.push({key:"L",data:[i,n]});break;case"S":{let t=0,o=0;"C"===r||"S"===r?(t=i+(i-s),o=n+(n-l)):(t=i,o=n),e.push({key:"C",data:[t,o,...c]}),s=c[0],l=c[1],i=c[2],n=c[3];break}case"T":{const[t,o]=c;let a=0,h=0;"Q"===r||"T"===r?(a=i+(i-s),h=n+(n-l)):(a=i,h=n);const u=i+2*(a-i)/3,d=n+2*(h-n)/3,f=t+2*(a-t)/3,p=o+2*(h-o)/3;e.push({key:"C",data:[u,d,f,p,t,o]}),s=a,l=h,i=t,n=o;break}case"Q":{const[t,r,o,a]=c,h=i+2*(t-i)/3,u=n+2*(r-n)/3,d=o+2*(t-o)/3,f=a+2*(r-a)/3;e.push({key:"C",data:[h,u,d,f,o,a]}),s=t,l=r,i=o,n=a;break}case"A":{const t=Math.abs(c[0]),r=Math.abs(c[1]),o=c[2],a=c[3],s=c[4],l=c[5],h=c[6];0===t||0===r?(e.push({key:"C",data:[i,n,l,h,l,h]}),i=l,n=h):i===l&&n===h||(k(i,n,l,h,t,r,o,a,s).forEach(function(t){e.push({key:"C",data:t})}),i=l,n=h);break}case"Z":e.push({key:"Z",data:[]}),i=o,n=a}r=h}return e}function _(t,e,r){return[t*Math.cos(r)-e*Math.sin(r),t*Math.sin(r)+e*Math.cos(r)]}function k(t,e,r,i,n,o,a,s,l,h){const c=(u=a,Math.PI*u/180);var u;let d=[],f=0,p=0,g=0,m=0;if(h)[f,p,g,m]=h;else{[t,e]=_(t,e,-c),[r,i]=_(r,i,-c);const a=(t-r)/2,h=(e-i)/2;let u=a*a/(n*n)+h*h/(o*o);u>1&&(u=Math.sqrt(u),n*=u,o*=u);const d=n*n,y=o*o,b=d*y-d*h*h-y*a*a,x=d*h*h+y*a*a,C=(s===l?-1:1)*Math.sqrt(Math.abs(b/x));g=C*n*h/o+(t+r)/2,m=C*-o*a/n+(e+i)/2,f=Math.asin(parseFloat(((e-m)/o).toFixed(9))),p=Math.asin(parseFloat(((i-m)/o).toFixed(9))),t<g&&(f=Math.PI-f),r<g&&(p=Math.PI-p),f<0&&(f=2*Math.PI+f),p<0&&(p=2*Math.PI+p),l&&f>p&&(f-=2*Math.PI),!l&&p>f&&(p-=2*Math.PI)}let y=p-f;if(Math.abs(y)>120*Math.PI/180){const t=p,e=r,s=i;p=l&&p>f?f+120*Math.PI/180*1:f+120*Math.PI/180*-1,d=k(r=g+n*Math.cos(p),i=m+o*Math.sin(p),e,s,n,o,a,0,l,[p,t,g,m])}y=p-f;const b=Math.cos(f),x=Math.sin(f),C=Math.cos(p),w=Math.sin(p),v=Math.tan(y/4),S=4/3*n*v,T=4/3*o*v,B=[t,e],M=[t+S*x,e-T*b],L=[r+S*w,i-T*C],F=[r,i];if(M[0]=2*B[0]-M[0],M[1]=2*B[1]-M[1],h)return[M,L,F].concat(d);{d=[M,L,F].concat(d);const t=[];for(let e=0;e<d.length;e+=3){const r=_(d[e][0],d[e][1],c),i=_(d[e+1][0],d[e+1][1],c),n=_(d[e+2][0],d[e+2][1],c);t.push([r[0],r[1],i[0],i[1],n[0],n[1]])}return t}}const w={randOffset:function(t,e){return I(t,e)},randOffsetWithRange:function(t,e,r){return D(t,e,r)},ellipse:function(t,e,r,i,n){return M(t,e,n,B(r,i,n)).opset},doubleLineOps:function(t,e,r,i,n){return N(t,e,r,i,n,!0)}};function v(t,e,r,i,n){return{type:"path",ops:N(t,e,r,i,n)}}function S(t,e,r){const i=(t||[]).length;if(i>2){const n=[];for(let e=0;e<i-1;e++)n.push(...N(t[e][0],t[e][1],t[e+1][0],t[e+1][1],r));return e&&n.push(...N(t[i-1][0],t[i-1][1],t[0][0],t[0][1],r)),{type:"path",ops:n}}return 2===i?v(t[0][0],t[0][1],t[1][0],t[1][1],r):{type:"path",ops:[]}}function T(t,e){if(t.length){const r="number"==typeof t[0][0]?[t]:t,i=q(r[0],1*(1+.2*e.roughness),e),n=e.disableMultiStroke?[]:q(r[0],1.5*(1+.22*e.roughness),$(e));for(let t=1;t<r.length;t++){const o=r[t];if(o.length){const t=q(o,1*(1+.2*e.roughness),e),r=e.disableMultiStroke?[]:q(o,1.5*(1+.22*e.roughness),$(e));for(const e of t)"move"!==e.op&&i.push(e);for(const t of r)"move"!==t.op&&n.push(t)}}return{type:"path",ops:i.concat(n)}}return{type:"path",ops:[]}}function B(t,e,r){const i=Math.sqrt(2*Math.PI*Math.sqrt((Math.pow(t/2,2)+Math.pow(e/2,2))/2)),n=Math.ceil(Math.max(r.curveStepCount,r.curveStepCount/Math.sqrt(200)*i)),o=2*Math.PI/n;let a=Math.abs(t/2),s=Math.abs(e/2);const l=1-r.curveFitting;return a+=I(a*l,r),s+=I(s*l,r),{increment:o,rx:a,ry:s}}function M(t,e,r,i){const[n,o]=R(i.increment,t,e,i.rx,i.ry,1,i.increment*D(.1,D(.4,1,r),r),r);let a=z(n,null,r);if(!r.disableMultiStroke&&0!==r.roughness){const[n]=R(i.increment,t,e,i.rx,i.ry,1.5,0,r),o=z(n,null,r);a=a.concat(o)}return{estimatedPoints:o,opset:{type:"path",ops:a}}}function L(t,e,r,i,n,o,a,s,l){const h=t,c=e;let u=Math.abs(r/2),d=Math.abs(i/2);u+=I(.01*u,l),d+=I(.01*d,l);let f=n,p=o;for(;f<0;)f+=2*Math.PI,p+=2*Math.PI;p-f>2*Math.PI&&(f=0,p=2*Math.PI);const g=2*Math.PI/l.curveStepCount,m=Math.min(g/2,(p-f)/2),y=j(m,h,c,u,d,f,p,1,l);if(!l.disableMultiStroke){const t=j(m,h,c,u,d,f,p,1.5,l);y.push(...t)}return a&&(s?y.push(...N(h,c,h+u*Math.cos(f),c+d*Math.sin(f),l),...N(h,c,h+u*Math.cos(p),c+d*Math.sin(p),l)):y.push({op:"lineTo",data:[h,c]},{op:"lineTo",data:[h+u*Math.cos(f),c+d*Math.sin(f)]})),{type:"path",ops:y}}function F(t,e){const r=C(x(b(t))),i=[];let n=[0,0],o=[0,0];for(const{key:t,data:a}of r)switch(t){case"M":o=[a[0],a[1]],n=[a[0],a[1]];break;case"L":i.push(...N(o[0],o[1],a[0],a[1],e)),o=[a[0],a[1]];break;case"C":{const[t,r,n,s,l,h]=a;i.push(...W(t,r,n,s,l,h,o,e)),o=[l,h];break}case"Z":i.push(...N(o[0],o[1],n[0],n[1],e)),o=[n[0],n[1]]}return{type:"path",ops:i}}function A(t,e){const r=[];for(const i of t)if(i.length){const t=e.maxRandomnessOffset||0,n=i.length;if(n>2){r.push({op:"move",data:[i[0][0]+I(t,e),i[0][1]+I(t,e)]});for(let o=1;o<n;o++)r.push({op:"lineTo",data:[i[o][0]+I(t,e),i[o][1]+I(t,e)]})}}return{type:"fillPath",ops:r}}function E(t,e){return function(t,e){let r=t.fillStyle||"hachure";if(!p[r])switch(r){case"zigzag":p[r]||(p[r]=new h(e));break;case"cross-hatch":p[r]||(p[r]=new c(e));break;case"dots":p[r]||(p[r]=new u(e));break;case"dashed":p[r]||(p[r]=new d(e));break;case"zigzag-line":p[r]||(p[r]=new f(e));break;default:r="hachure",p[r]||(p[r]=new s(e))}return p[r]}(e,w).fillPolygons(t,e)}function $(t){const e=Object.assign({},t);return e.randomizer=void 0,t.seed&&(e.seed=t.seed+1),e}function O(t){return t.randomizer||(t.randomizer=new g(t.seed||0)),t.randomizer.next()}function D(t,e,r,i=1){return r.roughness*i*(O(r)*(e-t)+t)}function I(t,e,r=1){return D(-t,t,e,r)}function N(t,e,r,i,n,o=!1){const a=o?n.disableMultiStrokeFill:n.disableMultiStroke,s=P(t,e,r,i,n,!0,!1);if(a)return s;const l=P(t,e,r,i,n,!0,!0);return s.concat(l)}function P(t,e,r,i,n,o,a){const s=Math.pow(t-r,2)+Math.pow(e-i,2),l=Math.sqrt(s);let h=1;h=l<200?1:l>500?.4:-.0016668*l+1.233334;let c=n.maxRandomnessOffset||0;c*c*100>s&&(c=l/10);const u=c/2,d=.2+.2*O(n);let f=n.bowing*n.maxRandomnessOffset*(i-e)/200,p=n.bowing*n.maxRandomnessOffset*(t-r)/200;f=I(f,n,h),p=I(p,n,h);const g=[],m=()=>I(u,n,h),y=()=>I(c,n,h),b=n.preserveVertices;return o&&(a?g.push({op:"move",data:[t+(b?0:m()),e+(b?0:m())]}):g.push({op:"move",data:[t+(b?0:I(c,n,h)),e+(b?0:I(c,n,h))]})),a?g.push({op:"bcurveTo",data:[f+t+(r-t)*d+m(),p+e+(i-e)*d+m(),f+t+2*(r-t)*d+m(),p+e+2*(i-e)*d+m(),r+(b?0:m()),i+(b?0:m())]}):g.push({op:"bcurveTo",data:[f+t+(r-t)*d+y(),p+e+(i-e)*d+y(),f+t+2*(r-t)*d+y(),p+e+2*(i-e)*d+y(),r+(b?0:y()),i+(b?0:y())]}),g}function q(t,e,r){if(!t.length)return[];const i=[];i.push([t[0][0]+I(e,r),t[0][1]+I(e,r)]),i.push([t[0][0]+I(e,r),t[0][1]+I(e,r)]);for(let n=1;n<t.length;n++)i.push([t[n][0]+I(e,r),t[n][1]+I(e,r)]),n===t.length-1&&i.push([t[n][0]+I(e,r),t[n][1]+I(e,r)]);return z(i,null,r)}function z(t,e,r){const i=t.length,n=[];if(i>3){const o=[],a=1-r.curveTightness;n.push({op:"move",data:[t[1][0],t[1][1]]});for(let e=1;e+2<i;e++){const r=t[e];o[0]=[r[0],r[1]],o[1]=[r[0]+(a*t[e+1][0]-a*t[e-1][0])/6,r[1]+(a*t[e+1][1]-a*t[e-1][1])/6],o[2]=[t[e+1][0]+(a*t[e][0]-a*t[e+2][0])/6,t[e+1][1]+(a*t[e][1]-a*t[e+2][1])/6],o[3]=[t[e+1][0],t[e+1][1]],n.push({op:"bcurveTo",data:[o[1][0],o[1][1],o[2][0],o[2][1],o[3][0],o[3][1]]})}if(e&&2===e.length){const t=r.maxRandomnessOffset;n.push({op:"lineTo",data:[e[0]+I(t,r),e[1]+I(t,r)]})}}else 3===i?(n.push({op:"move",data:[t[1][0],t[1][1]]}),n.push({op:"bcurveTo",data:[t[1][0],t[1][1],t[2][0],t[2][1],t[2][0],t[2][1]]})):2===i&&n.push(...P(t[0][0],t[0][1],t[1][0],t[1][1],r,!0,!0));return n}function R(t,e,r,i,n,o,a,s){const l=[],h=[];if(0===s.roughness){t/=4,h.push([e+i*Math.cos(-t),r+n*Math.sin(-t)]);for(let o=0;o<=2*Math.PI;o+=t){const t=[e+i*Math.cos(o),r+n*Math.sin(o)];l.push(t),h.push(t)}h.push([e+i*Math.cos(0),r+n*Math.sin(0)]),h.push([e+i*Math.cos(t),r+n*Math.sin(t)])}else{const c=I(.5,s)-Math.PI/2;h.push([I(o,s)+e+.9*i*Math.cos(c-t),I(o,s)+r+.9*n*Math.sin(c-t)]);const u=2*Math.PI+c-.01;for(let a=c;a<u;a+=t){const t=[I(o,s)+e+i*Math.cos(a),I(o,s)+r+n*Math.sin(a)];l.push(t),h.push(t)}h.push([I(o,s)+e+i*Math.cos(c+2*Math.PI+.5*a),I(o,s)+r+n*Math.sin(c+2*Math.PI+.5*a)]),h.push([I(o,s)+e+.98*i*Math.cos(c+a),I(o,s)+r+.98*n*Math.sin(c+a)]),h.push([I(o,s)+e+.9*i*Math.cos(c+.5*a),I(o,s)+r+.9*n*Math.sin(c+.5*a)])}return[h,l]}function j(t,e,r,i,n,o,a,s,l){const h=o+I(.1,l),c=[];c.push([I(s,l)+e+.9*i*Math.cos(h-t),I(s,l)+r+.9*n*Math.sin(h-t)]);for(let o=h;o<=a;o+=t)c.push([I(s,l)+e+i*Math.cos(o),I(s,l)+r+n*Math.sin(o)]);return c.push([e+i*Math.cos(a),r+n*Math.sin(a)]),c.push([e+i*Math.cos(a),r+n*Math.sin(a)]),z(c,null,l)}function W(t,e,r,i,n,o,a,s){const l=[],h=[s.maxRandomnessOffset||1,(s.maxRandomnessOffset||1)+.3];let c=[0,0];const u=s.disableMultiStroke?1:2,d=s.preserveVertices;for(let f=0;f<u;f++)0===f?l.push({op:"move",data:[a[0],a[1]]}):l.push({op:"move",data:[a[0]+(d?0:I(h[0],s)),a[1]+(d?0:I(h[0],s))]}),c=d?[n,o]:[n+I(h[f],s),o+I(h[f],s)],l.push({op:"bcurveTo",data:[t+I(h[f],s),e+I(h[f],s),r+I(h[f],s),i+I(h[f],s),c[0],c[1]]});return l}function H(t){return[...t]}function U(t,e=0){const r=t.length;if(r<3)throw new Error("A curve must have at least three points.");const i=[];if(3===r)i.push(H(t[0]),H(t[1]),H(t[2]),H(t[2]));else{const r=[];r.push(t[0],t[0]);for(let e=1;e<t.length;e++)r.push(t[e]),e===t.length-1&&r.push(t[e]);const n=[],o=1-e;i.push(H(r[0]));for(let t=1;t+2<r.length;t++){const e=r[t];n[0]=[e[0],e[1]],n[1]=[e[0]+(o*r[t+1][0]-o*r[t-1][0])/6,e[1]+(o*r[t+1][1]-o*r[t-1][1])/6],n[2]=[r[t+1][0]+(o*r[t][0]-o*r[t+2][0])/6,r[t+1][1]+(o*r[t][1]-o*r[t+2][1])/6],n[3]=[r[t+1][0],r[t+1][1]],i.push(n[1],n[2],n[3])}}return i}function Y(t,e){return Math.pow(t[0]-e[0],2)+Math.pow(t[1]-e[1],2)}function G(t,e,r){const i=Y(e,r);if(0===i)return Y(t,e);let n=((t[0]-e[0])*(r[0]-e[0])+(t[1]-e[1])*(r[1]-e[1]))/i;return n=Math.max(0,Math.min(1,n)),Y(t,V(e,r,n))}function V(t,e,r){return[t[0]+(e[0]-t[0])*r,t[1]+(e[1]-t[1])*r]}function X(t,e,r,i){const n=i||[];if(function(t,e){const r=t[e+0],i=t[e+1],n=t[e+2],o=t[e+3];let a=3*i[0]-2*r[0]-o[0];a*=a;let s=3*i[1]-2*r[1]-o[1];s*=s;let l=3*n[0]-2*o[0]-r[0];l*=l;let h=3*n[1]-2*o[1]-r[1];return h*=h,a<l&&(a=l),s<h&&(s=h),a+s}(t,e)<r){const r=t[e+0];n.length?(o=n[n.length-1],a=r,Math.sqrt(Y(o,a))>1&&n.push(r)):n.push(r),n.push(t[e+3])}else{const i=.5,o=t[e+0],a=t[e+1],s=t[e+2],l=t[e+3],h=V(o,a,i),c=V(a,s,i),u=V(s,l,i),d=V(h,c,i),f=V(c,u,i),p=V(d,f,i);X([o,h,d,p],0,r,n),X([p,f,u,l],0,r,n)}var o,a;return n}function Z(t,e){return Q(t,0,t.length,e)}function Q(t,e,r,i,n){const o=n||[],a=t[e],s=t[r-1];let l=0,h=1;for(let i=e+1;i<r-1;++i){const e=G(t[i],a,s);e>l&&(l=e,h=i)}return Math.sqrt(l)>i?(Q(t,e,h+1,i,o),Q(t,h,r,i,o)):(o.length||o.push(a),o.push(s)),o}function K(t,e=.15,r){const i=[],n=(t.length-1)/3;for(let r=0;r<n;r++)X(t,3*r,e,i);return r&&r>0?Q(i,0,i.length,r):i}const J="none";class tt{constructor(t){this.defaultOptions={maxRandomnessOffset:2,roughness:1,bowing:1,stroke:"#000",strokeWidth:1,curveTightness:0,curveFitting:.95,curveStepCount:9,fillStyle:"hachure",fillWeight:-1,hachureAngle:-41,hachureGap:-1,dashOffset:-1,dashGap:-1,zigzagOffset:-1,seed:0,disableMultiStroke:!1,disableMultiStrokeFill:!1,preserveVertices:!1,fillShapeRoughnessGain:.8},this.config=t||{},this.config.options&&(this.defaultOptions=this._o(this.config.options))}static newSeed(){return Math.floor(Math.random()*2**31)}_o(t){return t?Object.assign({},this.defaultOptions,t):this.defaultOptions}_d(t,e,r){return{shape:t,sets:e||[],options:r||this.defaultOptions}}line(t,e,r,i,n){const o=this._o(n);return this._d("line",[v(t,e,r,i,o)],o)}rectangle(t,e,r,i,n){const o=this._o(n),a=[],s=function(t,e,r,i,n){return function(t,e){return S(t,!0,e)}([[t,e],[t+r,e],[t+r,e+i],[t,e+i]],n)}(t,e,r,i,o);if(o.fill){const n=[[t,e],[t+r,e],[t+r,e+i],[t,e+i]];"solid"===o.fillStyle?a.push(A([n],o)):a.push(E([n],o))}return o.stroke!==J&&a.push(s),this._d("rectangle",a,o)}ellipse(t,e,r,i,n){const o=this._o(n),a=[],s=B(r,i,o),l=M(t,e,o,s);if(o.fill)if("solid"===o.fillStyle){const r=M(t,e,o,s).opset;r.type="fillPath",a.push(r)}else a.push(E([l.estimatedPoints],o));return o.stroke!==J&&a.push(l.opset),this._d("ellipse",a,o)}circle(t,e,r,i){const n=this.ellipse(t,e,r,r,i);return n.shape="circle",n}linearPath(t,e){const r=this._o(e);return this._d("linearPath",[S(t,!1,r)],r)}arc(t,e,r,i,n,o,a=!1,s){const l=this._o(s),h=[],c=L(t,e,r,i,n,o,a,!0,l);if(a&&l.fill)if("solid"===l.fillStyle){const a=Object.assign({},l);a.disableMultiStroke=!0;const s=L(t,e,r,i,n,o,!0,!1,a);s.type="fillPath",h.push(s)}else h.push(function(t,e,r,i,n,o,a){const s=t,l=e;let h=Math.abs(r/2),c=Math.abs(i/2);h+=I(.01*h,a),c+=I(.01*c,a);let u=n,d=o;for(;u<0;)u+=2*Math.PI,d+=2*Math.PI;d-u>2*Math.PI&&(u=0,d=2*Math.PI);const f=(d-u)/a.curveStepCount,p=[];for(let t=u;t<=d;t+=f)p.push([s+h*Math.cos(t),l+c*Math.sin(t)]);return p.push([s+h*Math.cos(d),l+c*Math.sin(d)]),p.push([s,l]),E([p],a)}(t,e,r,i,n,o,l));return l.stroke!==J&&h.push(c),this._d("arc",h,l)}curve(t,e){const r=this._o(e),i=[],n=T(t,r);if(r.fill&&r.fill!==J)if("solid"===r.fillStyle){const e=T(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else{const e=[],n=t;if(n.length){const t="number"==typeof n[0][0]?[n]:n;for(const i of t)i.length<3?e.push(...i):3===i.length?e.push(...K(U([i[0],i[0],i[1],i[2]]),10,(1+r.roughness)/2)):e.push(...K(U(i),10,(1+r.roughness)/2))}e.length&&i.push(E([e],r))}return r.stroke!==J&&i.push(n),this._d("curve",i,r)}polygon(t,e){const r=this._o(e),i=[],n=S(t,!0,r);return r.fill&&("solid"===r.fillStyle?i.push(A([t],r)):i.push(E([t],r))),r.stroke!==J&&i.push(n),this._d("polygon",i,r)}path(t,e){const r=this._o(e),i=[];if(!t)return this._d("path",i,r);t=(t||"").replace(/\n/g," ").replace(/(-\s)/g,"-").replace("/(ss)/g"," ");const n=r.fill&&"transparent"!==r.fill&&r.fill!==J,o=r.stroke!==J,a=!!(r.simplification&&r.simplification<1),s=function(t,e,r){const i=C(x(b(t))),n=[];let o=[],a=[0,0],s=[];const l=()=>{s.length>=4&&o.push(...K(s,1)),s=[]},h=()=>{l(),o.length&&(n.push(o),o=[])};for(const{key:t,data:e}of i)switch(t){case"M":h(),a=[e[0],e[1]],o.push(a);break;case"L":l(),o.push([e[0],e[1]]);break;case"C":if(!s.length){const t=o.length?o[o.length-1]:a;s.push([t[0],t[1]])}s.push([e[0],e[1]]),s.push([e[2],e[3]]),s.push([e[4],e[5]]);break;case"Z":l(),o.push([a[0],a[1]])}if(h(),!r)return n;const c=[];for(const t of n){const e=Z(t,r);e.length&&c.push(e)}return c}(t,0,a?4-4*(r.simplification||1):(1+r.roughness)/2),l=F(t,r);if(n)if("solid"===r.fillStyle)if(1===s.length){const e=F(t,Object.assign(Object.assign({},r),{disableMultiStroke:!0,roughness:r.roughness?r.roughness+r.fillShapeRoughnessGain:0}));i.push({type:"fillPath",ops:this._mergedShape(e.ops)})}else i.push(A(s,r));else i.push(E(s,r));return o&&(a?s.forEach(t=>{i.push(S(t,!1,r))}):i.push(l)),this._d("path",i,r)}opsToPath(t,e){let r="";for(const i of t.ops){const t="number"==typeof e&&e>=0?i.data.map(t=>+t.toFixed(e)):i.data;switch(i.op){case"move":r+=`M${t[0]} ${t[1]} `;break;case"bcurveTo":r+=`C${t[0]} ${t[1]}, ${t[2]} ${t[3]}, ${t[4]} ${t[5]} `;break;case"lineTo":r+=`L${t[0]} ${t[1]} `}}return r.trim()}toPaths(t){const e=t.sets||[],r=t.options||this.defaultOptions,i=[];for(const t of e){let e=null;switch(t.type){case"path":e={d:this.opsToPath(t),stroke:r.stroke,strokeWidth:r.strokeWidth,fill:J};break;case"fillPath":e={d:this.opsToPath(t),stroke:J,strokeWidth:0,fill:r.fill||J};break;case"fillSketch":e=this.fillSketch(t,r)}e&&i.push(e)}return i}fillSketch(t,e){let r=e.fillWeight;return r<0&&(r=e.strokeWidth/2),{d:this.opsToPath(t),stroke:e.fill||J,strokeWidth:r,fill:J}}_mergedShape(t){return t.filter((t,e)=>0===e||"move"!==t.op)}}class et{constructor(t,e){this.canvas=t,this.ctx=this.canvas.getContext("2d"),this.gen=new tt(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.ctx,n=t.options.fixedDecimalPlaceDigits;for(const o of e)switch(o.type){case"path":i.save(),i.strokeStyle="none"===r.stroke?"transparent":r.stroke,i.lineWidth=r.strokeWidth,r.strokeLineDash&&i.setLineDash(r.strokeLineDash),r.strokeLineDashOffset&&(i.lineDashOffset=r.strokeLineDashOffset),this._drawToContext(i,o,n),i.restore();break;case"fillPath":{i.save(),i.fillStyle=r.fill||"";const e="curve"===t.shape||"polygon"===t.shape||"path"===t.shape?"evenodd":"nonzero";this._drawToContext(i,o,n,e),i.restore();break}case"fillSketch":this.fillSketch(i,o,r)}}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2),t.save(),r.fillLineDash&&t.setLineDash(r.fillLineDash),r.fillLineDashOffset&&(t.lineDashOffset=r.fillLineDashOffset),t.strokeStyle=r.fill||"",t.lineWidth=i,this._drawToContext(t,e,r.fixedDecimalPlaceDigits),t.restore()}_drawToContext(t,e,r,i="nonzero"){t.beginPath();for(const i of e.ops){const e="number"==typeof r&&r>=0?i.data.map(t=>+t.toFixed(r)):i.data;switch(i.op){case"move":t.moveTo(e[0],e[1]);break;case"bcurveTo":t.bezierCurveTo(e[0],e[1],e[2],e[3],e[4],e[5]);break;case"lineTo":t.lineTo(e[0],e[1])}}"fillPath"===e.type?t.fill(i):t.stroke()}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}line(t,e,r,i,n){const o=this.gen.line(t,e,r,i,n);return this.draw(o),o}rectangle(t,e,r,i,n){const o=this.gen.rectangle(t,e,r,i,n);return this.draw(o),o}ellipse(t,e,r,i,n){const o=this.gen.ellipse(t,e,r,i,n);return this.draw(o),o}circle(t,e,r,i){const n=this.gen.circle(t,e,r,i);return this.draw(n),n}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r),r}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r),r}arc(t,e,r,i,n,o,a=!1,s){const l=this.gen.arc(t,e,r,i,n,o,a,s);return this.draw(l),l}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r),r}path(t,e){const r=this.gen.path(t,e);return this.draw(r),r}}const rt="http://www.w3.org/2000/svg";class it{constructor(t,e){this.svg=t,this.gen=new tt(e)}draw(t){const e=t.sets||[],r=t.options||this.getDefaultOptions(),i=this.svg.ownerDocument||window.document,n=i.createElementNS(rt,"g"),o=t.options.fixedDecimalPlaceDigits;for(const a of e){let e=null;switch(a.type){case"path":e=i.createElementNS(rt,"path"),e.setAttribute("d",this.opsToPath(a,o)),e.setAttribute("stroke",r.stroke),e.setAttribute("stroke-width",r.strokeWidth+""),e.setAttribute("fill","none"),r.strokeLineDash&&e.setAttribute("stroke-dasharray",r.strokeLineDash.join(" ").trim()),r.strokeLineDashOffset&&e.setAttribute("stroke-dashoffset",`${r.strokeLineDashOffset}`);break;case"fillPath":e=i.createElementNS(rt,"path"),e.setAttribute("d",this.opsToPath(a,o)),e.setAttribute("stroke","none"),e.setAttribute("stroke-width","0"),e.setAttribute("fill",r.fill||""),"curve"!==t.shape&&"polygon"!==t.shape||e.setAttribute("fill-rule","evenodd");break;case"fillSketch":e=this.fillSketch(i,a,r)}e&&n.appendChild(e)}return n}fillSketch(t,e,r){let i=r.fillWeight;i<0&&(i=r.strokeWidth/2);const n=t.createElementNS(rt,"path");return n.setAttribute("d",this.opsToPath(e,r.fixedDecimalPlaceDigits)),n.setAttribute("stroke",r.fill||""),n.setAttribute("stroke-width",i+""),n.setAttribute("fill","none"),r.fillLineDash&&n.setAttribute("stroke-dasharray",r.fillLineDash.join(" ").trim()),r.fillLineDashOffset&&n.setAttribute("stroke-dashoffset",`${r.fillLineDashOffset}`),n}get generator(){return this.gen}getDefaultOptions(){return this.gen.defaultOptions}opsToPath(t,e){return this.gen.opsToPath(t,e)}line(t,e,r,i,n){const o=this.gen.line(t,e,r,i,n);return this.draw(o)}rectangle(t,e,r,i,n){const o=this.gen.rectangle(t,e,r,i,n);return this.draw(o)}ellipse(t,e,r,i,n){const o=this.gen.ellipse(t,e,r,i,n);return this.draw(o)}circle(t,e,r,i){const n=this.gen.circle(t,e,r,i);return this.draw(n)}linearPath(t,e){const r=this.gen.linearPath(t,e);return this.draw(r)}polygon(t,e){const r=this.gen.polygon(t,e);return this.draw(r)}arc(t,e,r,i,n,o,a=!1,s){const l=this.gen.arc(t,e,r,i,n,o,a,s);return this.draw(l)}curve(t,e){const r=this.gen.curve(t,e);return this.draw(r)}path(t,e){const r=this.gen.path(t,e);return this.draw(r)}}var nt={canvas:(t,e)=>new et(t,e),svg:(t,e)=>new it(t,e),generator:t=>new tt(t),newSeed:()=>tt.newSeed()}},8968(t,e,r){function i(t){for(var e=[],r=1;r<arguments.length;r++)e[r-1]=arguments[r];var i=Array.from("string"==typeof t?[t]:t);i[i.length-1]=i[i.length-1].replace(/\r?\n([\t ]*)$/,"");var n=i.reduce(function(t,e){var r=e.match(/\n([\t ]+|(?!\s).)/g);return r?t.concat(r.map(function(t){var e,r;return null!==(r=null===(e=t.match(/[\t ]/g))||void 0===e?void 0:e.length)&&void 0!==r?r:0})):t},[]);if(n.length){var o=new RegExp("\n[\t ]{"+Math.min.apply(Math,n)+"}","g");i=i.map(function(t){return t.replace(o,"\n")})}i[0]=i[0].replace(/^\r?\n/,"");var a=i[0];return e.forEach(function(t,e){var r=a.match(/(?:^|\n)( *)$/),n=r?r[1]:"",o=t;"string"==typeof t&&t.includes("\n")&&(o=String(t).split("\n").map(function(t,e){return 0===e?t:""+n+t}).join("\n")),a+=o+i[e+1]}),a}r.r(e),r.d(e,{dedent:()=>i,default:()=>n});const n=i},79806(t,e,r){function i(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function n(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function o(t){let e,r,o;function s(t,i,n=0,o=t.length){if(n<o){if(0!==e(i,i))return o;do{const e=n+o>>>1;r(t[e],i)<0?n=e+1:o=e}while(n<o)}return n}return 2!==t.length?(e=i,r=(e,r)=>i(t(e),r),o=(e,r)=>t(e)-r):(e=t===i||t===n?t:a,r=t,o=t),{left:s,center:function(t,e,r=0,i=t.length){const n=s(t,e,r,i-1);return n>r&&o(t[n-1],e)>-o(t[n],e)?n-1:n},right:function(t,i,n=0,o=t.length){if(n<o){if(0!==e(i,i))return o;do{const e=n+o>>>1;r(t[e],i)<=0?n=e+1:o=e}while(n<o)}return n}}}function a(){return 0}function s(t){return null===t?NaN:+t}r.d(e,{Adder:()=>L,Delaunay:()=>Ns,FormatSpecifier:()=>Yh,InternMap:()=>E,InternSet:()=>$,Node:()=>mg,Path:()=>ta,Voronoi:()=>As,ZoomTransform:()=>_S,active:()=>no,arc:()=>ow,area:()=>fw,areaRadial:()=>kw,ascending:()=>i,autoType:()=>fl,axisBottom:()=>ge,axisLeft:()=>me,axisRight:()=>pe,axisTop:()=>fe,bin:()=>ft,bisect:()=>d,bisectCenter:()=>u,bisectLeft:()=>c,bisectRight:()=>h,bisector:()=>o,blob:()=>Jl,blur:()=>f,blur2:()=>p,blurImage:()=>g,brush:()=>Oo,brushSelection:()=>Ao,brushX:()=>Eo,brushY:()=>$o,buffer:()=>eh,chord:()=>Uo,chordDirected:()=>Go,chordTranspose:()=>Yo,cluster:()=>hg,color:()=>si,contourDensity:()=>ls,contours:()=>ts,count:()=>C,create:()=>$k,creator:()=>kr,cross:()=>v,csv:()=>ah,csvFormat:()=>tl,csvFormatBody:()=>el,csvFormatRow:()=>il,csvFormatRows:()=>rl,csvFormatValue:()=>nl,csvParse:()=>Ks,csvParseRows:()=>Js,cubehelix:()=>Ha,cumsum:()=>S,curveBasis:()=>dv,curveBasisClosed:()=>pv,curveBasisOpen:()=>mv,curveBumpX:()=>Tw,curveBumpY:()=>Bw,curveBundle:()=>bv,curveCardinal:()=>_v,curveCardinalClosed:()=>wv,curveCardinalOpen:()=>Sv,curveCatmullRom:()=>Mv,curveCatmullRomClosed:()=>Fv,curveCatmullRomOpen:()=>Ev,curveLinear:()=>hw,curveLinearClosed:()=>Ov,curveMonotoneX:()=>jv,curveMonotoneY:()=>Wv,curveNatural:()=>Yv,curveStep:()=>Vv,curveStepAfter:()=>Zv,curveStepBefore:()=>Xv,descending:()=>n,deviation:()=>B,difference:()=>Qt,disjoint:()=>Kt,dispatch:()=>ke,drag:()=>Hs,dragDisable:()=>Rr,dragEnable:()=>jr,dsv:()=>oh,dsvFormat:()=>Zs,easeBack:()=>Gl,easeBackIn:()=>Ul,easeBackInOut:()=>Gl,easeBackOut:()=>Yl,easeBounce:()=>jl,easeBounceIn:()=>Rl,easeBounceInOut:()=>Wl,easeBounceOut:()=>jl,easeCircle:()=>$l,easeCircleIn:()=>Al,easeCircleInOut:()=>$l,easeCircleOut:()=>El,easeCubic:()=>to,easeCubicIn:()=>Kn,easeCubicInOut:()=>to,easeCubicOut:()=>Jn,easeElastic:()=>Zl,easeElasticIn:()=>Xl,easeElasticInOut:()=>Ql,easeElasticOut:()=>Zl,easeExp:()=>Fl,easeExpIn:()=>Ml,easeExpInOut:()=>Fl,easeExpOut:()=>Ll,easeLinear:()=>gl,easePoly:()=>_l,easePolyIn:()=>xl,easePolyInOut:()=>_l,easePolyOut:()=>Cl,easeQuad:()=>bl,easeQuadIn:()=>ml,easeQuadInOut:()=>bl,easeQuadOut:()=>yl,easeSin:()=>Tl,easeSinIn:()=>vl,easeSinInOut:()=>Tl,easeSinOut:()=>Sl,every:()=>Ut,extent:()=>M,fcumsum:()=>A,filter:()=>Gt,flatGroup:()=>j,flatRollup:()=>W,forceCenter:()=>gh,forceCollide:()=>Mh,forceLink:()=>Ah,forceManyBody:()=>Nh,forceRadial:()=>Ph,forceSimulation:()=>Ih,forceX:()=>qh,forceY:()=>zh,format:()=>Qh,formatDefaultLocale:()=>rc,formatLocale:()=>ec,formatPrefix:()=>Kh,formatSpecifier:()=>Uh,fsum:()=>F,geoAlbers:()=>vp,geoAlbersUsa:()=>Sp,geoArea:()=>au,geoAzimuthalEqualArea:()=>Lp,geoAzimuthalEqualAreaRaw:()=>Mp,geoAzimuthalEquidistant:()=>Ap,geoAzimuthalEquidistantRaw:()=>Fp,geoBounds:()=>Ru,geoCentroid:()=>Ju,geoCircle:()=>cd,geoClipAntimeridian:()=>_d,geoClipCircle:()=>kd,geoClipExtent:()=>Fd,geoClipRectangle:()=>Ld,geoConicConformal:()=>Np,geoConicConformalRaw:()=>Ip,geoConicEqualArea:()=>wp,geoConicEqualAreaRaw:()=>kp,geoConicEquidistant:()=>Rp,geoConicEquidistantRaw:()=>zp,geoContains:()=>Gd,geoDistance:()=>Pd,geoEqualEarth:()=>Vp,geoEqualEarthRaw:()=>Gp,geoEquirectangular:()=>qp,geoEquirectangularRaw:()=>Pp,geoGnomonic:()=>Zp,geoGnomonicRaw:()=>Xp,geoGraticule:()=>Zd,geoGraticule10:()=>Qd,geoIdentity:()=>Qp,geoInterpolate:()=>Kd,geoLength:()=>Dd,geoMercator:()=>$p,geoMercatorRaw:()=>Ep,geoNaturalEarth1:()=>Jp,geoNaturalEarth1Raw:()=>Kp,geoOrthographic:()=>eg,geoOrthographicRaw:()=>tg,geoPath:()=>ap,geoProjection:()=>xp,geoProjectionMutator:()=>Cp,geoRotation:()=>sd,geoStereographic:()=>ig,geoStereographicRaw:()=>rg,geoStream:()=>Ic,geoTransform:()=>sp,geoTransverseMercator:()=>og,geoTransverseMercatorRaw:()=>ng,gray:()=>va,greatest:()=>Ct,greatestIndex:()=>Nt,group:()=>q,groupSort:()=>tt,groups:()=>z,hcl:()=>$a,hierarchy:()=>ug,histogram:()=>ft,hsl:()=>Ci,html:()=>fh,image:()=>lh,index:()=>Y,indexes:()=>G,interpolate:()=>Yi,interpolateArray:()=>Pi,interpolateBasis:()=>Ti,interpolateBasisClosed:()=>Bi,interpolateBlues:()=>ak,interpolateBrBG:()=>b_,interpolateBuGn:()=>I_,interpolateBuPu:()=>P_,interpolateCividis:()=>yk,interpolateCool:()=>Ck,interpolateCubehelix:()=>Mm,interpolateCubehelixDefault:()=>bk,interpolateCubehelixLong:()=>Lm,interpolateDate:()=>zi,interpolateDiscrete:()=>gm,interpolateGnBu:()=>z_,interpolateGreens:()=>lk,interpolateGreys:()=>ck,interpolateHcl:()=>Sm,interpolateHclLong:()=>Tm,interpolateHsl:()=>_m,interpolateHslLong:()=>km,interpolateHue:()=>mm,interpolateInferno:()=>Ak,interpolateLab:()=>wm,interpolateMagma:()=>Fk,interpolateNumber:()=>Ri,interpolateNumberArray:()=>Ii,interpolateObject:()=>ji,interpolateOrRd:()=>j_,interpolateOranges:()=>mk,interpolatePRGn:()=>C_,interpolatePiYG:()=>k_,interpolatePlasma:()=>Ek,interpolatePuBu:()=>Y_,interpolatePuBuGn:()=>H_,interpolatePuOr:()=>v_,interpolatePuRd:()=>V_,interpolatePurples:()=>dk,interpolateRainbow:()=>kk,interpolateRdBu:()=>T_,interpolateRdGy:()=>M_,interpolateRdPu:()=>Z_,interpolateRdYlBu:()=>F_,interpolateRdYlGn:()=>E_,interpolateReds:()=>pk,interpolateRgb:()=>Ei,interpolateRgbBasis:()=>Oi,interpolateRgbBasisClosed:()=>Di,interpolateRound:()=>ym,interpolateSinebow:()=>Tk,interpolateSpectral:()=>O_,interpolateString:()=>Ui,interpolateTransformCss:()=>Bn,interpolateTransformSvg:()=>Mn,interpolateTurbo:()=>Bk,interpolateViridis:()=>Lk,interpolateWarm:()=>xk,interpolateYlGn:()=>tk,interpolateYlGnBu:()=>K_,interpolateYlOrBr:()=>rk,interpolateYlOrRd:()=>nk,interpolateZoom:()=>xm,interrupt:()=>_n,intersection:()=>Jt,interval:()=>bS,isoFormat:()=>gS,isoParse:()=>yS,json:()=>ch,lab:()=>Sa,lch:()=>Ea,least:()=>Dt,leastIndex:()=>It,line:()=>dw,lineRadial:()=>_w,link:()=>Aw,linkHorizontal:()=>Ew,linkRadial:()=>Ow,linkVertical:()=>$w,local:()=>Dk,map:()=>Vt,matcher:()=>Me,max:()=>pt,maxIndex:()=>gt,mean:()=>Tt,median:()=>Bt,medianIndex:()=>Mt,merge:()=>Lt,min:()=>mt,minIndex:()=>yt,mode:()=>Ft,namespace:()=>We,namespaces:()=>je,nice:()=>ut,now:()=>an,pack:()=>qg,packEnclose:()=>wg,packSiblings:()=>Ng,pairs:()=>At,partition:()=>Ug,path:()=>ea,pathRound:()=>ra,permute:()=>Z,pie:()=>mw,piecewise:()=>Fm,pointRadial:()=>ww,pointer:()=>Vi,pointers:()=>Nk,polygonArea:()=>Em,polygonCentroid:()=>$m,polygonContains:()=>Pm,polygonHull:()=>Nm,polygonLength:()=>qm,precisionFixed:()=>ic,precisionPrefix:()=>nc,precisionRound:()=>oc,quadtree:()=>Ch,quantile:()=>_t,quantileIndex:()=>wt,quantileSorted:()=>kt,quantize:()=>Am,quickselect:()=>bt,radialArea:()=>kw,radialLine:()=>_w,randomBates:()=>Ym,randomBernoulli:()=>Xm,randomBeta:()=>Km,randomBinomial:()=>Jm,randomCauchy:()=>ey,randomExponential:()=>Gm,randomGamma:()=>Qm,randomGeometric:()=>Zm,randomInt:()=>jm,randomIrwinHall:()=>Um,randomLcg:()=>oy,randomLogNormal:()=>Hm,randomLogistic:()=>ry,randomNormal:()=>Wm,randomPareto:()=>Vm,randomPoisson:()=>iy,randomUniform:()=>Rm,randomWeibull:()=>ty,range:()=>$t,rank:()=>Ot,reduce:()=>Xt,reverse:()=>Zt,rgb:()=>ui,ribbon:()=>fa,ribbonArrow:()=>pa,rollup:()=>H,rollups:()=>U,scaleBand:()=>cy,scaleDiverging:()=>JC,scaleDivergingLog:()=>t_,scaleDivergingPow:()=>r_,scaleDivergingSqrt:()=>i_,scaleDivergingSymlog:()=>e_,scaleIdentity:()=>Sy,scaleImplicit:()=>ly,scaleLinear:()=>vy,scaleLog:()=>Oy,scaleOrdinal:()=>hy,scalePoint:()=>dy,scalePow:()=>Wy,scaleQuantile:()=>Gy,scaleQuantize:()=>Vy,scaleRadial:()=>Yy,scaleSequential:()=>YC,scaleSequentialLog:()=>GC,scaleSequentialPow:()=>XC,scaleSequentialQuantile:()=>QC,scaleSequentialSqrt:()=>ZC,scaleSequentialSymlog:()=>VC,scaleSqrt:()=>Hy,scaleSymlog:()=>Py,scaleThreshold:()=>Xy,scaleTime:()=>jC,scaleUtc:()=>WC,scan:()=>Pt,schemeAccent:()=>a_,schemeBlues:()=>ok,schemeBrBG:()=>y_,schemeBuGn:()=>D_,schemeBuPu:()=>N_,schemeCategory10:()=>o_,schemeDark2:()=>s_,schemeGnBu:()=>q_,schemeGreens:()=>sk,schemeGreys:()=>hk,schemeObservable10:()=>l_,schemeOrRd:()=>R_,schemeOranges:()=>gk,schemePRGn:()=>x_,schemePaired:()=>h_,schemePastel1:()=>c_,schemePastel2:()=>u_,schemePiYG:()=>__,schemePuBu:()=>U_,schemePuBuGn:()=>W_,schemePuOr:()=>w_,schemePuRd:()=>G_,schemePurples:()=>uk,schemeRdBu:()=>S_,schemeRdGy:()=>B_,schemeRdPu:()=>X_,schemeRdYlBu:()=>L_,schemeRdYlGn:()=>A_,schemeReds:()=>fk,schemeSet1:()=>d_,schemeSet2:()=>f_,schemeSet3:()=>p_,schemeSpectral:()=>$_,schemeTableau10:()=>g_,schemeYlGn:()=>J_,schemeYlGnBu:()=>Q_,schemeYlOrBr:()=>ek,schemeYlOrRd:()=>ik,select:()=>Ir,selectAll:()=>Pk,selection:()=>Dr,selector:()=>ve,selectorAll:()=>Be,shuffle:()=>qt,shuffler:()=>zt,some:()=>Yt,sort:()=>Q,stack:()=>eS,stackOffsetDiverging:()=>iS,stackOffsetExpand:()=>rS,stackOffsetNone:()=>Qv,stackOffsetSilhouette:()=>nS,stackOffsetWiggle:()=>oS,stackOrderAppearance:()=>aS,stackOrderAscending:()=>lS,stackOrderDescending:()=>cS,stackOrderInsideOut:()=>uS,stackOrderNone:()=>Kv,stackOrderReverse:()=>dS,stratify:()=>Qg,style:()=>tr,subset:()=>ie,sum:()=>Rt,superset:()=>ee,svg:()=>ph,symbol:()=>lv,symbolAsterisk:()=>Iw,symbolCircle:()=>Nw,symbolCross:()=>Pw,symbolDiamond:()=>Rw,symbolDiamond2:()=>jw,symbolPlus:()=>Ww,symbolSquare:()=>Hw,symbolSquare2:()=>Uw,symbolStar:()=>Xw,symbolTimes:()=>ov,symbolTriangle:()=>Qw,symbolTriangle2:()=>Jw,symbolWye:()=>nv,symbolX:()=>ov,symbols:()=>av,symbolsFill:()=>av,symbolsStroke:()=>sv,text:()=>ih,thresholdFreedmanDiaconis:()=>vt,thresholdScott:()=>St,thresholdSturges:()=>dt,tickFormat:()=>ky,tickIncrement:()=>ht,tickStep:()=>ct,ticks:()=>lt,timeDay:()=>yb,timeDays:()=>bb,timeFormat:()=>yx,timeFormatDefaultLocale:()=>PC,timeFormatLocale:()=>gx,timeFriday:()=>Lb,timeFridays:()=>Ib,timeHour:()=>fb,timeHours:()=>pb,timeInterval:()=>nb,timeMillisecond:()=>ob,timeMilliseconds:()=>ab,timeMinute:()=>hb,timeMinutes:()=>cb,timeMonday:()=>Sb,timeMondays:()=>Eb,timeMonth:()=>Jb,timeMonths:()=>tx,timeParse:()=>bx,timeSaturday:()=>Fb,timeSaturdays:()=>Nb,timeSecond:()=>sb,timeSeconds:()=>lb,timeSunday:()=>vb,timeSundays:()=>Ab,timeThursday:()=>Mb,timeThursdays:()=>Db,timeTickInterval:()=>ux,timeTicks:()=>cx,timeTuesday:()=>Tb,timeTuesdays:()=>$b,timeWednesday:()=>Bb,timeWednesdays:()=>Ob,timeWeek:()=>vb,timeWeeks:()=>Ab,timeYear:()=>ix,timeYears:()=>nx,timeout:()=>pn,timer:()=>hn,timerFlush:()=>cn,transition:()=>Xn,transpose:()=>jt,tree:()=>am,treemap:()=>um,treemapBinary:()=>dm,treemapDice:()=>Hg,treemapResquarify:()=>pm,treemapSlice:()=>sm,treemapSliceDice:()=>fm,treemapSquarify:()=>cm,tsv:()=>sh,tsvFormat:()=>ll,tsvFormatBody:()=>hl,tsvFormatRow:()=>ul,tsvFormatRows:()=>cl,tsvFormatValue:()=>dl,tsvParse:()=>al,tsvParseRows:()=>sl,union:()=>ne,unixDay:()=>_b,unixDays:()=>kb,utcDay:()=>xb,utcDays:()=>Cb,utcFormat:()=>xx,utcFriday:()=>Hb,utcFridays:()=>Qb,utcHour:()=>gb,utcHours:()=>mb,utcMillisecond:()=>ob,utcMilliseconds:()=>ab,utcMinute:()=>ub,utcMinutes:()=>db,utcMonday:()=>zb,utcMondays:()=>Gb,utcMonth:()=>ex,utcMonths:()=>rx,utcParse:()=>Cx,utcSaturday:()=>Ub,utcSaturdays:()=>Kb,utcSecond:()=>sb,utcSeconds:()=>lb,utcSunday:()=>qb,utcSundays:()=>Yb,utcThursday:()=>Wb,utcThursdays:()=>Zb,utcTickInterval:()=>hx,utcTicks:()=>lx,utcTuesday:()=>Rb,utcTuesdays:()=>Vb,utcWednesday:()=>jb,utcWednesdays:()=>Xb,utcWeek:()=>qb,utcWeeks:()=>Yb,utcYear:()=>ox,utcYears:()=>ax,variance:()=>T,window:()=>Ze,xml:()=>dh,zip:()=>Ht,zoom:()=>ES,zoomIdentity:()=>kS,zoomTransform:()=>wS}),r.r(e);const l=o(i),h=l.right,c=l.left,u=o(s).center,d=h;function f(t,e){if(!((e=+e)>=0))throw new RangeError("invalid r");let r=t.length;if(!((r=Math.floor(r))>=0))throw new RangeError("invalid length");if(!r||!e)return t;const i=x(e),n=t.slice();return i(t,n,0,r,1),i(n,t,0,r,1),i(t,n,0,r,1),t}const p=m(x),g=m(function(t){const e=x(t);return(t,r,i,n,o)=>{e(t,r,0+(i<<=2),0+(n<<=2),o<<=2),e(t,r,i+1,n+1,o),e(t,r,i+2,n+2,o),e(t,r,i+3,n+3,o)}});function m(t){return function(e,r,i=r){if(!((r=+r)>=0))throw new RangeError("invalid rx");if(!((i=+i)>=0))throw new RangeError("invalid ry");let{data:n,width:o,height:a}=e;if(!((o=Math.floor(o))>=0))throw new RangeError("invalid width");if(!((a=Math.floor(void 0!==a?a:n.length/o))>=0))throw new RangeError("invalid height");if(!o||!a||!r&&!i)return e;const s=r&&t(r),l=i&&t(i),h=n.slice();return s&&l?(y(s,h,n,o,a),y(s,n,h,o,a),y(s,h,n,o,a),b(l,n,h,o,a),b(l,h,n,o,a),b(l,n,h,o,a)):s?(y(s,n,h,o,a),y(s,h,n,o,a),y(s,n,h,o,a)):l&&(b(l,n,h,o,a),b(l,h,n,o,a),b(l,n,h,o,a)),e}}function y(t,e,r,i,n){for(let o=0,a=i*n;o<a;)t(e,r,o,o+=i,1)}function b(t,e,r,i,n){for(let o=0,a=i*n;o<i;++o)t(e,r,o,o+a,i)}function x(t){const e=Math.floor(t);if(e===t)return function(t){const e=2*t+1;return(r,i,n,o,a)=>{if(!((o-=a)>=n))return;let s=t*i[n];const l=a*t;for(let t=n,e=n+l;t<e;t+=a)s+=i[Math.min(o,t)];for(let t=n,h=o;t<=h;t+=a)s+=i[Math.min(o,t+l)],r[t]=s/e,s-=i[Math.max(n,t-l)]}}(t);const r=t-e,i=2*t+1;return(t,n,o,a,s)=>{if(!((a-=s)>=o))return;let l=e*n[o];const h=s*e,c=h+s;for(let t=o,e=o+h;t<e;t+=s)l+=n[Math.min(a,t)];for(let e=o,u=a;e<=u;e+=s)l+=n[Math.min(a,e+h)],t[e]=(l+r*(n[Math.max(o,e-c)]+n[Math.min(a,e+c)]))/i,l-=n[Math.max(o,e-h)]}}function C(t,e){let r=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&++r;else{let i=-1;for(let n of t)null!=(n=e(n,++i,t))&&(n=+n)>=n&&++r}return r}function _(t){return 0|t.length}function k(t){return!(t>0)}function w(t){return"object"!=typeof t||"length"in t?t:Array.from(t)}function v(...t){const e="function"==typeof t[t.length-1]&&function(t){return e=>t(...e)}(t.pop()),r=(t=t.map(w)).map(_),i=t.length-1,n=new Array(i+1).fill(0),o=[];if(i<0||r.some(k))return o;for(;;){o.push(n.map((e,r)=>t[r][e]));let a=i;for(;++n[a]===r[a];){if(0===a)return e?o.map(e):o;n[a--]=0}}}function S(t,e){var r=0,i=0;return Float64Array.from(t,void 0===e?t=>r+=+t||0:n=>r+=+e(n,i++,t)||0)}function T(t,e){let r,i=0,n=0,o=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(r=e-n,n+=r/++i,o+=r*(e-n));else{let a=-1;for(let s of t)null!=(s=e(s,++a,t))&&(s=+s)>=s&&(r=s-n,n+=r/++i,o+=r*(s-n))}if(i>1)return o/(i-1)}function B(t,e){const r=T(t,e);return r?Math.sqrt(r):r}function M(t,e){let r,i;if(void 0===e)for(const e of t)null!=e&&(void 0===r?e>=e&&(r=i=e):(r>e&&(r=e),i<e&&(i=e)));else{let n=-1;for(let o of t)null!=(o=e(o,++n,t))&&(void 0===r?o>=o&&(r=i=o):(r>o&&(r=o),i<o&&(i=o)))}return[r,i]}class L{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){const e=this._partials;let r=0;for(let i=0;i<this._n&&i<32;i++){const n=e[i],o=t+n,a=Math.abs(t)<Math.abs(n)?t-(o-n):n-(o-t);a&&(e[r++]=a),t=o}return e[r]=t,this._n=r+1,this}valueOf(){const t=this._partials;let e,r,i,n=this._n,o=0;if(n>0){for(o=t[--n];n>0&&(e=o,r=t[--n],o=e+r,i=r-(o-e),!i););n>0&&(i<0&&t[n-1]<0||i>0&&t[n-1]>0)&&(r=2*i,e=o+r,r==e-o&&(o=e))}return o}}function F(t,e){const r=new L;if(void 0===e)for(let e of t)(e=+e)&&r.add(e);else{let i=-1;for(let n of t)(n=+e(n,++i,t))&&r.add(n)}return+r}function A(t,e){const r=new L;let i=-1;return Float64Array.from(t,void 0===e?t=>r.add(+t||0):n=>r.add(+e(n,++i,t)||0))}class E extends Map{constructor(t,e=N){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,r]of t)this.set(e,r)}get(t){return super.get(O(this,t))}has(t){return super.has(O(this,t))}set(t,e){return super.set(D(this,t),e)}delete(t){return super.delete(I(this,t))}}class $ extends Set{constructor(t,e=N){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const e of t)this.add(e)}has(t){return super.has(O(this,t))}add(t){return super.add(D(this,t))}delete(t){return super.delete(I(this,t))}}function O({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):r}function D({_intern:t,_key:e},r){const i=e(r);return t.has(i)?t.get(i):(t.set(i,r),r)}function I({_intern:t,_key:e},r){const i=e(r);return t.has(i)&&(r=t.get(i),t.delete(i)),r}function N(t){return null!==t&&"object"==typeof t?t.valueOf():t}function P(t){return t}function q(t,...e){return X(t,P,P,e)}function z(t,...e){return X(t,Array.from,P,e)}function R(t,e){for(let r=1,i=e.length;r<i;++r)t=t.flatMap(t=>t.pop().map(([e,r])=>[...t,e,r]));return t}function j(t,...e){return R(z(t,...e),e)}function W(t,e,...r){return R(U(t,e,...r),r)}function H(t,e,...r){return X(t,P,e,r)}function U(t,e,...r){return X(t,Array.from,e,r)}function Y(t,...e){return X(t,P,V,e)}function G(t,...e){return X(t,Array.from,V,e)}function V(t){if(1!==t.length)throw new Error("duplicate key");return t[0]}function X(t,e,r,i){return function t(n,o){if(o>=i.length)return r(n);const a=new E,s=i[o++];let l=-1;for(const t of n){const e=s(t,++l,n),r=a.get(e);r?r.push(t):a.set(e,[t])}for(const[e,r]of a)a.set(e,t(r,o));return e(a)}(t,0)}function Z(t,e){return Array.from(e,e=>t[e])}function Q(t,...e){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");t=Array.from(t);let[r]=e;if(r&&2!==r.length||e.length>1){const i=Uint32Array.from(t,(t,e)=>e);return e.length>1?(e=e.map(e=>t.map(e)),i.sort((t,r)=>{for(const i of e){const e=J(i[t],i[r]);if(e)return e}})):(r=t.map(r),i.sort((t,e)=>J(r[t],r[e]))),Z(t,i)}return t.sort(K(r))}function K(t=i){if(t===i)return J;if("function"!=typeof t)throw new TypeError("compare is not a function");return(e,r)=>{const i=t(e,r);return i||0===i?i:(0===t(r,r))-(0===t(e,e))}}function J(t,e){return(null==t||!(t>=t))-(null==e||!(e>=e))||(t<e?-1:t>e?1:0)}function tt(t,e,r){return(2!==e.length?Q(H(t,e,r),([t,e],[r,n])=>i(e,n)||i(t,r)):Q(q(t,r),([t,r],[n,o])=>e(r,o)||i(t,n))).map(([t])=>t)}var et=Array.prototype,rt=et.slice;function it(t){return()=>t}et.map;const nt=Math.sqrt(50),ot=Math.sqrt(10),at=Math.sqrt(2);function st(t,e,r){const i=(e-t)/Math.max(0,r),n=Math.floor(Math.log10(i)),o=i/Math.pow(10,n),a=o>=nt?10:o>=ot?5:o>=at?2:1;let s,l,h;return n<0?(h=Math.pow(10,-n)/a,s=Math.round(t*h),l=Math.round(e*h),s/h<t&&++s,l/h>e&&--l,h=-h):(h=Math.pow(10,n)*a,s=Math.round(t/h),l=Math.round(e/h),s*h<t&&++s,l*h>e&&--l),l<s&&.5<=r&&r<2?st(t,e,2*r):[s,l,h]}function lt(t,e,r){if(!((r=+r)>0))return[];if((t=+t)===(e=+e))return[t];const i=e<t,[n,o,a]=i?st(e,t,r):st(t,e,r);if(!(o>=n))return[];const s=o-n+1,l=new Array(s);if(i)if(a<0)for(let t=0;t<s;++t)l[t]=(o-t)/-a;else for(let t=0;t<s;++t)l[t]=(o-t)*a;else if(a<0)for(let t=0;t<s;++t)l[t]=(n+t)/-a;else for(let t=0;t<s;++t)l[t]=(n+t)*a;return l}function ht(t,e,r){return st(t=+t,e=+e,r=+r)[2]}function ct(t,e,r){r=+r;const i=(e=+e)<(t=+t),n=i?ht(e,t,r):ht(t,e,r);return(i?-1:1)*(n<0?1/-n:n)}function ut(t,e,r){let i;for(;;){const n=ht(t,e,r);if(n===i||0===n||!isFinite(n))return[t,e];n>0?(t=Math.floor(t/n)*n,e=Math.ceil(e/n)*n):n<0&&(t=Math.ceil(t*n)/n,e=Math.floor(e*n)/n),i=n}}function dt(t){return Math.max(1,Math.ceil(Math.log(C(t))/Math.LN2)+1)}function ft(){var t=P,e=M,r=dt;function i(i){Array.isArray(i)||(i=Array.from(i));var n,o,a,s=i.length,l=new Array(s);for(n=0;n<s;++n)l[n]=t(i[n],n,i);var h=e(l),c=h[0],u=h[1],f=r(l,c,u);if(!Array.isArray(f)){const t=u,r=+f;if(e===M&&([c,u]=ut(c,u,r)),(f=lt(c,u,r))[0]<=c&&(a=ht(c,u,r)),f[f.length-1]>=u)if(t>=u&&e===M){const t=ht(c,u,r);isFinite(t)&&(t>0?u=(Math.floor(u/t)+1)*t:t<0&&(u=(Math.ceil(u*-t)+1)/-t))}else f.pop()}for(var p=f.length,g=0,m=p;f[g]<=c;)++g;for(;f[m-1]>u;)--m;(g||m<p)&&(f=f.slice(g,m),p=m-g);var y,b=new Array(p+1);for(n=0;n<=p;++n)(y=b[n]=[]).x0=n>0?f[n-1]:c,y.x1=n<p?f[n]:u;if(isFinite(a)){if(a>0)for(n=0;n<s;++n)null!=(o=l[n])&&c<=o&&o<=u&&b[Math.min(p,Math.floor((o-c)/a))].push(i[n]);else if(a<0)for(n=0;n<s;++n)if(null!=(o=l[n])&&c<=o&&o<=u){const t=Math.floor((c-o)*a);b[Math.min(p,t+(f[t]<=o))].push(i[n])}}else for(n=0;n<s;++n)null!=(o=l[n])&&c<=o&&o<=u&&b[d(f,o,0,p)].push(i[n]);return b}return i.value=function(e){return arguments.length?(t="function"==typeof e?e:it(e),i):t},i.domain=function(t){return arguments.length?(e="function"==typeof t?t:it([t[0],t[1]]),i):e},i.thresholds=function(t){return arguments.length?(r="function"==typeof t?t:it(Array.isArray(t)?rt.call(t):t),i):r},i}function pt(t,e){let r;if(void 0===e)for(const e of t)null!=e&&(r<e||void 0===r&&e>=e)&&(r=e);else{let i=-1;for(let n of t)null!=(n=e(n,++i,t))&&(r<n||void 0===r&&n>=n)&&(r=n)}return r}function gt(t,e){let r,i=-1,n=-1;if(void 0===e)for(const e of t)++n,null!=e&&(r<e||void 0===r&&e>=e)&&(r=e,i=n);else for(let o of t)null!=(o=e(o,++n,t))&&(r<o||void 0===r&&o>=o)&&(r=o,i=n);return i}function mt(t,e){let r;if(void 0===e)for(const e of t)null!=e&&(r>e||void 0===r&&e>=e)&&(r=e);else{let i=-1;for(let n of t)null!=(n=e(n,++i,t))&&(r>n||void 0===r&&n>=n)&&(r=n)}return r}function yt(t,e){let r,i=-1,n=-1;if(void 0===e)for(const e of t)++n,null!=e&&(r>e||void 0===r&&e>=e)&&(r=e,i=n);else for(let o of t)null!=(o=e(o,++n,t))&&(r>o||void 0===r&&o>=o)&&(r=o,i=n);return i}function bt(t,e,r=0,i=1/0,n){if(e=Math.floor(e),r=Math.floor(Math.max(0,r)),i=Math.floor(Math.min(t.length-1,i)),!(r<=e&&e<=i))return t;for(n=void 0===n?J:K(n);i>r;){if(i-r>600){const o=i-r+1,a=e-r+1,s=Math.log(o),l=.5*Math.exp(2*s/3),h=.5*Math.sqrt(s*l*(o-l)/o)*(a-o/2<0?-1:1);bt(t,e,Math.max(r,Math.floor(e-a*l/o+h)),Math.min(i,Math.floor(e+(o-a)*l/o+h)),n)}const o=t[e];let a=r,s=i;for(xt(t,r,e),n(t[i],o)>0&&xt(t,r,i);a<s;){for(xt(t,a,s),++a,--s;n(t[a],o)<0;)++a;for(;n(t[s],o)>0;)--s}0===n(t[r],o)?xt(t,r,s):(++s,xt(t,s,i)),s<=e&&(r=s+1),e<=s&&(i=s-1)}return t}function xt(t,e,r){const i=t[e];t[e]=t[r],t[r]=i}function Ct(t,e=i){let r,n=!1;if(1===e.length){let o;for(const a of t){const t=e(a);(n?i(t,o)>0:0===i(t,t))&&(r=a,o=t,n=!0)}}else for(const i of t)(n?e(i,r)>0:0===e(i,i))&&(r=i,n=!0);return r}function _t(t,e,r){if(t=Float64Array.from(function*(t,e){if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(yield e);else{let r=-1;for(let i of t)null!=(i=e(i,++r,t))&&(i=+i)>=i&&(yield i)}}(t,r)),(i=t.length)&&!isNaN(e=+e)){if(e<=0||i<2)return mt(t);if(e>=1)return pt(t);var i,n=(i-1)*e,o=Math.floor(n),a=pt(bt(t,o).subarray(0,o+1));return a+(mt(t.subarray(o+1))-a)*(n-o)}}function kt(t,e,r=s){if((i=t.length)&&!isNaN(e=+e)){if(e<=0||i<2)return+r(t[0],0,t);if(e>=1)return+r(t[i-1],i-1,t);var i,n=(i-1)*e,o=Math.floor(n),a=+r(t[o],o,t);return a+(+r(t[o+1],o+1,t)-a)*(n-o)}}function wt(t,e,r=s){if(!isNaN(e=+e)){if(i=Float64Array.from(t,(e,i)=>s(r(t[i],i,t))),e<=0)return yt(i);if(e>=1)return gt(i);var i,n=Uint32Array.from(t,(t,e)=>e),o=i.length-1,a=Math.floor(o*e);return bt(n,a,0,o,(t,e)=>J(i[t],i[e])),(a=Ct(n.subarray(0,a+1),t=>i[t]))>=0?a:-1}}function vt(t,e,r){const i=C(t),n=_t(t,.75)-_t(t,.25);return i&&n?Math.ceil((r-e)/(2*n*Math.pow(i,-1/3))):1}function St(t,e,r){const i=C(t),n=B(t);return i&&n?Math.ceil((r-e)*Math.cbrt(i)/(3.49*n)):1}function Tt(t,e){let r=0,i=0;if(void 0===e)for(let e of t)null!=e&&(e=+e)>=e&&(++r,i+=e);else{let n=-1;for(let o of t)null!=(o=e(o,++n,t))&&(o=+o)>=o&&(++r,i+=o)}if(r)return i/r}function Bt(t,e){return _t(t,.5,e)}function Mt(t,e){return wt(t,.5,e)}function Lt(t){return Array.from(function*(t){for(const e of t)yield*e}(t))}function Ft(t,e){const r=new E;if(void 0===e)for(let e of t)null!=e&&e>=e&&r.set(e,(r.get(e)||0)+1);else{let i=-1;for(let n of t)null!=(n=e(n,++i,t))&&n>=n&&r.set(n,(r.get(n)||0)+1)}let i,n=0;for(const[t,e]of r)e>n&&(n=e,i=t);return i}function At(t,e=Et){const r=[];let i,n=!1;for(const o of t)n&&r.push(e(i,o)),i=o,n=!0;return r}function Et(t,e){return[t,e]}function $t(t,e,r){t=+t,e=+e,r=(n=arguments.length)<2?(e=t,t=0,1):n<3?1:+r;for(var i=-1,n=0|Math.max(0,Math.ceil((e-t)/r)),o=new Array(n);++i<n;)o[i]=t+i*r;return o}function Ot(t,e=i){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");let r=Array.from(t);const n=new Float64Array(r.length);2!==e.length&&(r=r.map(e),e=i);const o=(t,i)=>e(r[t],r[i]);let a,s;return(t=Uint32Array.from(r,(t,e)=>e)).sort(e===i?(t,e)=>J(r[t],r[e]):K(o)),t.forEach((t,e)=>{const r=o(t,void 0===a?t:a);r>=0?((void 0===a||r>0)&&(a=t,s=e),n[t]=s):n[t]=NaN}),n}function Dt(t,e=i){let r,n=!1;if(1===e.length){let o;for(const a of t){const t=e(a);(n?i(t,o)<0:0===i(t,t))&&(r=a,o=t,n=!0)}}else for(const i of t)(n?e(i,r)<0:0===e(i,i))&&(r=i,n=!0);return r}function It(t,e=i){if(1===e.length)return yt(t,e);let r,n=-1,o=-1;for(const i of t)++o,(n<0?0===e(i,i):e(i,r)<0)&&(r=i,n=o);return n}function Nt(t,e=i){if(1===e.length)return gt(t,e);let r,n=-1,o=-1;for(const i of t)++o,(n<0?0===e(i,i):e(i,r)>0)&&(r=i,n=o);return n}function Pt(t,e){const r=It(t,e);return r<0?void 0:r}const qt=zt(Math.random);function zt(t){return function(e,r=0,i=e.length){let n=i-(r=+r);for(;n;){const i=t()*n--|0,o=e[n+r];e[n+r]=e[i+r],e[i+r]=o}return e}}function Rt(t,e){let r=0;if(void 0===e)for(let e of t)(e=+e)&&(r+=e);else{let i=-1;for(let n of t)(n=+e(n,++i,t))&&(r+=n)}return r}function jt(t){if(!(n=t.length))return[];for(var e=-1,r=mt(t,Wt),i=new Array(r);++e<r;)for(var n,o=-1,a=i[e]=new Array(n);++o<n;)a[o]=t[o][e];return i}function Wt(t){return t.length}function Ht(){return jt(arguments)}function Ut(t,e){if("function"!=typeof e)throw new TypeError("test is not a function");let r=-1;for(const i of t)if(!e(i,++r,t))return!1;return!0}function Yt(t,e){if("function"!=typeof e)throw new TypeError("test is not a function");let r=-1;for(const i of t)if(e(i,++r,t))return!0;return!1}function Gt(t,e){if("function"!=typeof e)throw new TypeError("test is not a function");const r=[];let i=-1;for(const n of t)e(n,++i,t)&&r.push(n);return r}function Vt(t,e){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");if("function"!=typeof e)throw new TypeError("mapper is not a function");return Array.from(t,(r,i)=>e(r,i,t))}function Xt(t,e,r){if("function"!=typeof e)throw new TypeError("reducer is not a function");const i=t[Symbol.iterator]();let n,o,a=-1;if(arguments.length<3){if(({done:n,value:r}=i.next()),n)return;++a}for(;({done:n,value:o}=i.next()),!n;)r=e(r,o,++a,t);return r}function Zt(t){if("function"!=typeof t[Symbol.iterator])throw new TypeError("values is not iterable");return Array.from(t).reverse()}function Qt(t,...e){t=new $(t);for(const r of e)for(const e of r)t.delete(e);return t}function Kt(t,e){const r=e[Symbol.iterator](),i=new $;for(const e of t){if(i.has(e))return!1;let t,n;for(;({value:t,done:n}=r.next())&&!n;){if(Object.is(e,t))return!1;i.add(t)}}return!0}function Jt(t,...e){t=new $(t),e=e.map(te);t:for(const r of t)for(const i of e)if(!i.has(r)){t.delete(r);continue t}return t}function te(t){return t instanceof $?t:new $(t)}function ee(t,e){const r=t[Symbol.iterator](),i=new Set;for(const t of e){const e=re(t);if(i.has(e))continue;let n,o;for(;({value:n,done:o}=r.next());){if(o)return!1;const t=re(n);if(i.add(t),Object.is(e,t))break}}return!0}function re(t){return null!==t&&"object"==typeof t?t.valueOf():t}function ie(t,e){return ee(e,t)}function ne(...t){const e=new $;for(const r of t)for(const t of r)e.add(t);return e}function oe(t){return t}var ae=1e-6;function se(t){return"translate("+t+",0)"}function le(t){return"translate(0,"+t+")"}function he(t){return e=>+t(e)}function ce(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function ue(){return!this.__axis}function de(t,e){var r=[],i=null,n=null,o=6,a=6,s=3,l="undefined"!=typeof window&&window.devicePixelRatio>1?0:.5,h=1===t||4===t?-1:1,c=4===t||2===t?"x":"y",u=1===t||3===t?se:le;function d(d){var f=null==i?e.ticks?e.ticks.apply(e,r):e.domain():i,p=null==n?e.tickFormat?e.tickFormat.apply(e,r):oe:n,g=Math.max(o,0)+s,m=e.range(),y=+m[0]+l,b=+m[m.length-1]+l,x=(e.bandwidth?ce:he)(e.copy(),l),C=d.selection?d.selection():d,_=C.selectAll(".domain").data([null]),k=C.selectAll(".tick").data(f,e).order(),w=k.exit(),v=k.enter().append("g").attr("class","tick"),S=k.select("line"),T=k.select("text");_=_.merge(_.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),k=k.merge(v),S=S.merge(v.append("line").attr("stroke","currentColor").attr(c+"2",h*o)),T=T.merge(v.append("text").attr("fill","currentColor").attr(c,h*g).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),d!==C&&(_=_.transition(d),k=k.transition(d),S=S.transition(d),T=T.transition(d),w=w.transition(d).attr("opacity",ae).attr("transform",function(t){return isFinite(t=x(t))?u(t+l):this.getAttribute("transform")}),v.attr("opacity",ae).attr("transform",function(t){var e=this.parentNode.__axis;return u((e&&isFinite(e=e(t))?e:x(t))+l)})),w.remove(),_.attr("d",4===t||2===t?a?"M"+h*a+","+y+"H"+l+"V"+b+"H"+h*a:"M"+l+","+y+"V"+b:a?"M"+y+","+h*a+"V"+l+"H"+b+"V"+h*a:"M"+y+","+l+"H"+b),k.attr("opacity",1).attr("transform",function(t){return u(x(t)+l)}),S.attr(c+"2",h*o),T.attr(c,h*g).text(p),C.filter(ue).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),C.each(function(){this.__axis=x})}return d.scale=function(t){return arguments.length?(e=t,d):e},d.ticks=function(){return r=Array.from(arguments),d},d.tickArguments=function(t){return arguments.length?(r=null==t?[]:Array.from(t),d):r.slice()},d.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),d):i&&i.slice()},d.tickFormat=function(t){return arguments.length?(n=t,d):n},d.tickSize=function(t){return arguments.length?(o=a=+t,d):o},d.tickSizeInner=function(t){return arguments.length?(o=+t,d):o},d.tickSizeOuter=function(t){return arguments.length?(a=+t,d):a},d.tickPadding=function(t){return arguments.length?(s=+t,d):s},d.offset=function(t){return arguments.length?(l=+t,d):l},d}function fe(t){return de(1,t)}function pe(t){return de(2,t)}function ge(t){return de(3,t)}function me(t){return de(4,t)}var ye={value:()=>{}};function be(){for(var t,e=0,r=arguments.length,i={};e<r;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw new Error("illegal type: "+t);i[t]=[]}return new xe(i)}function xe(t){this._=t}function Ce(t,e){for(var r,i=0,n=t.length;i<n;++i)if((r=t[i]).name===e)return r.value}function _e(t,e,r){for(var i=0,n=t.length;i<n;++i)if(t[i].name===e){t[i]=ye,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=r&&t.push({name:e,value:r}),t}xe.prototype=be.prototype={constructor:xe,on:function(t,e){var r,i,n=this._,o=(i=n,(t+"").trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");if(r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),t&&!i.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:e}})),a=-1,s=o.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<s;)if(r=(t=o[a]).type)n[r]=_e(n[r],t.name,e);else if(null==e)for(r in n)n[r]=_e(n[r],t.name,null);return this}for(;++a<s;)if((r=(t=o[a]).type)&&(r=Ce(n[r],t.name)))return r},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new xe(t)},call:function(t,e){if((r=arguments.length-2)>0)for(var r,i,n=new Array(r),o=0;o<r;++o)n[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(o=0,r=(i=this._[t]).length;o<r;++o)i[o].value.apply(e,n)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var i=this._[t],n=0,o=i.length;n<o;++n)i[n].value.apply(e,r)}};const ke=be;function we(){}function ve(t){return null==t?we:function(){return this.querySelector(t)}}function Se(t){return null==t?[]:Array.isArray(t)?t:Array.from(t)}function Te(){return[]}function Be(t){return null==t?Te:function(){return this.querySelectorAll(t)}}function Me(t){return function(){return this.matches(t)}}function Le(t){return function(e){return e.matches(t)}}var Fe=Array.prototype.find;function Ae(){return this.firstElementChild}var Ee=Array.prototype.filter;function $e(){return Array.from(this.children)}function Oe(t){return new Array(t.length)}function De(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function Ie(t,e,r,i,n,o){for(var a,s=0,l=e.length,h=o.length;s<h;++s)(a=e[s])?(a.__data__=o[s],i[s]=a):r[s]=new De(t,o[s]);for(;s<l;++s)(a=e[s])&&(n[s]=a)}function Ne(t,e,r,i,n,o,a){var s,l,h,c=new Map,u=e.length,d=o.length,f=new Array(u);for(s=0;s<u;++s)(l=e[s])&&(f[s]=h=a.call(l,l.__data__,s,e)+"",c.has(h)?n[s]=l:c.set(h,l));for(s=0;s<d;++s)h=a.call(t,o[s],s,o)+"",(l=c.get(h))?(i[s]=l,l.__data__=o[s],c.delete(h)):r[s]=new De(t,o[s]);for(s=0;s<u;++s)(l=e[s])&&c.get(f[s])===l&&(n[s]=l)}function Pe(t){return t.__data__}function qe(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function ze(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}De.prototype={constructor:De,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)}};var Re="http://www.w3.org/1999/xhtml";const je={svg:"http://www.w3.org/2000/svg",xhtml:Re,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function We(t){var e=t+="",r=e.indexOf(":");return r>=0&&"xmlns"!==(e=t.slice(0,r))&&(t=t.slice(r+1)),je.hasOwnProperty(e)?{space:je[e],local:t}:t}function He(t){return function(){this.removeAttribute(t)}}function Ue(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ye(t,e){return function(){this.setAttribute(t,e)}}function Ge(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function Ve(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttribute(t):this.setAttribute(t,r)}}function Xe(t,e){return function(){var r=e.apply(this,arguments);null==r?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function Ze(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function Qe(t){return function(){this.style.removeProperty(t)}}function Ke(t,e,r){return function(){this.style.setProperty(t,e,r)}}function Je(t,e,r){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,r)}}function tr(t,e){return t.style.getPropertyValue(e)||Ze(t).getComputedStyle(t,null).getPropertyValue(e)}function er(t){return function(){delete this[t]}}function rr(t,e){return function(){this[t]=e}}function ir(t,e){return function(){var r=e.apply(this,arguments);null==r?delete this[t]:this[t]=r}}function nr(t){return t.trim().split(/^|\s+/)}function or(t){return t.classList||new ar(t)}function ar(t){this._node=t,this._names=nr(t.getAttribute("class")||"")}function sr(t,e){for(var r=or(t),i=-1,n=e.length;++i<n;)r.add(e[i])}function lr(t,e){for(var r=or(t),i=-1,n=e.length;++i<n;)r.remove(e[i])}function hr(t){return function(){sr(this,t)}}function cr(t){return function(){lr(this,t)}}function ur(t,e){return function(){(e.apply(this,arguments)?sr:lr)(this,t)}}function dr(){this.textContent=""}function fr(t){return function(){this.textContent=t}}function pr(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function gr(){this.innerHTML=""}function mr(t){return function(){this.innerHTML=t}}function yr(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function br(){this.nextSibling&&this.parentNode.appendChild(this)}function xr(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function Cr(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===Re&&e.documentElement.namespaceURI===Re?e.createElement(t):e.createElementNS(r,t)}}function _r(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function kr(t){var e=We(t);return(e.local?_r:Cr)(e)}function wr(){return null}function vr(){var t=this.parentNode;t&&t.removeChild(this)}function Sr(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Tr(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function Br(t){return function(){var e=this.__on;if(e){for(var r,i=0,n=-1,o=e.length;i<o;++i)r=e[i],t.type&&r.type!==t.type||r.name!==t.name?e[++n]=r:this.removeEventListener(r.type,r.listener,r.options);++n?e.length=n:delete this.__on}}}function Mr(t,e,r){return function(){var i,n=this.__on,o=function(t){return function(e){t.call(this,e,this.__data__)}}(e);if(n)for(var a=0,s=n.length;a<s;++a)if((i=n[a]).type===t.type&&i.name===t.name)return this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=r),void(i.value=e);this.addEventListener(t.type,o,r),i={type:t.type,name:t.name,value:e,listener:o,options:r},n?n.push(i):this.__on=[i]}}function Lr(t,e,r){var i=Ze(t),n=i.CustomEvent;"function"==typeof n?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 Fr(t,e){return function(){return Lr(this,t,e)}}function Ar(t,e){return function(){return Lr(this,t,e.apply(this,arguments))}}ar.prototype={add:function(t){this._names.indexOf(t)<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}};var Er=[null];function $r(t,e){this._groups=t,this._parents=e}function Or(){return new $r([[document.documentElement]],Er)}$r.prototype=Or.prototype={constructor:$r,select:function(t){"function"!=typeof t&&(t=ve(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var o,a,s=e[n],l=s.length,h=i[n]=new Array(l),c=0;c<l;++c)(o=s[c])&&(a=t.call(o,o.__data__,c,s))&&("__data__"in o&&(a.__data__=o.__data__),h[c]=a);return new $r(i,this._parents)},selectAll:function(t){t="function"==typeof t?function(t){return function(){return Se(t.apply(this,arguments))}}(t):Be(t);for(var e=this._groups,r=e.length,i=[],n=[],o=0;o<r;++o)for(var a,s=e[o],l=s.length,h=0;h<l;++h)(a=s[h])&&(i.push(t.call(a,a.__data__,h,s)),n.push(a));return new $r(i,n)},selectChild:function(t){return this.select(null==t?Ae:function(t){return function(){return Fe.call(this.children,t)}}("function"==typeof t?t:Le(t)))},selectChildren:function(t){return this.selectAll(null==t?$e:function(t){return function(){return Ee.call(this.children,t)}}("function"==typeof t?t:Le(t)))},filter:function(t){"function"!=typeof t&&(t=Me(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var o,a=e[n],s=a.length,l=i[n]=[],h=0;h<s;++h)(o=a[h])&&t.call(o,o.__data__,h,a)&&l.push(o);return new $r(i,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,Pe);var r,i=e?Ne:Ie,n=this._parents,o=this._groups;"function"!=typeof t&&(r=t,t=function(){return r});for(var a=o.length,s=new Array(a),l=new Array(a),h=new Array(a),c=0;c<a;++c){var u=n[c],d=o[c],f=d.length,p=qe(t.call(u,u&&u.__data__,c,n)),g=p.length,m=l[c]=new Array(g),y=s[c]=new Array(g);i(u,d,m,y,h[c]=new Array(f),p,e);for(var b,x,C=0,_=0;C<g;++C)if(b=m[C]){for(C>=_&&(_=C+1);!(x=y[_])&&++_<g;);b._next=x||null}}return(s=new $r(s,n))._enter=l,s._exit=h,s},enter:function(){return new $r(this._enter||this._groups.map(Oe),this._parents)},exit:function(){return new $r(this._exit||this._groups.map(Oe),this._parents)},join:function(t,e,r){var i=this.enter(),n=this,o=this.exit();return"function"==typeof t?(i=t(i))&&(i=i.selection()):i=i.append(t+""),null!=e&&(n=e(n))&&(n=n.selection()),null==r?o.remove():r(o),i&&n?i.merge(n).order():n},merge:function(t){for(var e=t.selection?t.selection():t,r=this._groups,i=e._groups,n=r.length,o=i.length,a=Math.min(n,o),s=new Array(n),l=0;l<a;++l)for(var h,c=r[l],u=i[l],d=c.length,f=s[l]=new Array(d),p=0;p<d;++p)(h=c[p]||u[p])&&(f[p]=h);for(;l<n;++l)s[l]=r[l];return new $r(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var i,n=t[e],o=n.length-1,a=n[o];--o>=0;)(i=n[o])&&(a&&4^i.compareDocumentPosition(a)&&a.parentNode.insertBefore(i,a),a=i);return this},sort:function(t){function e(e,r){return e&&r?t(e.__data__,r.__data__):!e-!r}t||(t=ze);for(var r=this._groups,i=r.length,n=new Array(i),o=0;o<i;++o){for(var a,s=r[o],l=s.length,h=n[o]=new Array(l),c=0;c<l;++c)(a=s[c])&&(h[c]=a);h.sort(e)}return new $r(n,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i=t[e],n=0,o=i.length;n<o;++n){var a=i[n];if(a)return a}return null},size:function(){let t=0;for(const e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,r=0,i=e.length;r<i;++r)for(var n,o=e[r],a=0,s=o.length;a<s;++a)(n=o[a])&&t.call(n,n.__data__,a,o);return this},attr:function(t,e){var r=We(t);if(arguments.length<2){var i=this.node();return r.local?i.getAttributeNS(r.space,r.local):i.getAttribute(r)}return this.each((null==e?r.local?Ue:He:"function"==typeof e?r.local?Xe:Ve:r.local?Ge:Ye)(r,e))},style:function(t,e,r){return arguments.length>1?this.each((null==e?Qe:"function"==typeof e?Je:Ke)(t,e,null==r?"":r)):tr(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?er:"function"==typeof e?ir:rr)(t,e)):this.node()[t]},classed:function(t,e){var r=nr(t+"");if(arguments.length<2){for(var i=or(this.node()),n=-1,o=r.length;++n<o;)if(!i.contains(r[n]))return!1;return!0}return this.each(("function"==typeof e?ur:e?hr:cr)(r,e))},text:function(t){return arguments.length?this.each(null==t?dr:("function"==typeof t?pr:fr)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?gr:("function"==typeof t?yr:mr)(t)):this.node().innerHTML},raise:function(){return this.each(br)},lower:function(){return this.each(xr)},append:function(t){var e="function"==typeof t?t:kr(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})},insert:function(t,e){var r="function"==typeof t?t:kr(t),i=null==e?wr:"function"==typeof e?e:ve(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),i.apply(this,arguments)||null)})},remove:function(){return this.each(vr)},clone:function(t){return this.select(t?Tr:Sr)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,r){var i,n,o=function(t){return t.trim().split(/^|\s+/).map(function(t){var e="",r=t.indexOf(".");return r>=0&&(e=t.slice(r+1),t=t.slice(0,r)),{type:t,name:e}})}(t+""),a=o.length;if(!(arguments.length<2)){for(s=e?Mr:Br,i=0;i<a;++i)this.each(s(o[i],e,r));return this}var s=this.node().__on;if(s)for(var l,h=0,c=s.length;h<c;++h)for(i=0,l=s[h];i<a;++i)if((n=o[i]).type===l.type&&n.name===l.name)return l.value},dispatch:function(t,e){return this.each(("function"==typeof e?Ar:Fr)(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var i,n=t[e],o=0,a=n.length;o<a;++o)(i=n[o])&&(yield i)}};const Dr=Or;function Ir(t){return"string"==typeof t?new $r([[document.querySelector(t)]],[document.documentElement]):new $r([[t]],Er)}const Nr={passive:!1},Pr={capture:!0,passive:!1};function qr(t){t.stopImmediatePropagation()}function zr(t){t.preventDefault(),t.stopImmediatePropagation()}function Rr(t){var e=t.document.documentElement,r=Ir(t).on("dragstart.drag",zr,Pr);"onselectstart"in e?r.on("selectstart.drag",zr,Pr):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function jr(t,e){var r=t.document.documentElement,i=Ir(t).on("dragstart.drag",null);e&&(i.on("click.drag",zr,Pr),setTimeout(function(){i.on("click.drag",null)},0)),"onselectstart"in r?i.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}function Wr(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function Hr(t,e){var r=Object.create(t.prototype);for(var i in e)r[i]=e[i];return r}function Ur(){}var Yr=.7,Gr=1/Yr,Vr="\\s*([+-]?\\d+)\\s*",Xr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",Zr="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Qr=/^#([0-9a-f]{3,8})$/,Kr=new RegExp(`^rgb\\(${Vr},${Vr},${Vr}\\)$`),Jr=new RegExp(`^rgb\\(${Zr},${Zr},${Zr}\\)$`),ti=new RegExp(`^rgba\\(${Vr},${Vr},${Vr},${Xr}\\)$`),ei=new RegExp(`^rgba\\(${Zr},${Zr},${Zr},${Xr}\\)$`),ri=new RegExp(`^hsl\\(${Xr},${Zr},${Zr}\\)$`),ii=new RegExp(`^hsla\\(${Xr},${Zr},${Zr},${Xr}\\)$`),ni={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};function oi(){return this.rgb().formatHex()}function ai(){return this.rgb().formatRgb()}function si(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=Qr.exec(t))?(r=e[1].length,e=parseInt(e[1],16),6===r?li(e):3===r?new di(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===r?hi(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===r?hi(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=Kr.exec(t))?new di(e[1],e[2],e[3],1):(e=Jr.exec(t))?new di(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=ti.exec(t))?hi(e[1],e[2],e[3],e[4]):(e=ei.exec(t))?hi(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=ri.exec(t))?bi(e[1],e[2]/100,e[3]/100,1):(e=ii.exec(t))?bi(e[1],e[2]/100,e[3]/100,e[4]):ni.hasOwnProperty(t)?li(ni[t]):"transparent"===t?new di(NaN,NaN,NaN,0):null}function li(t){return new di(t>>16&255,t>>8&255,255&t,1)}function hi(t,e,r,i){return i<=0&&(t=e=r=NaN),new di(t,e,r,i)}function ci(t){return t instanceof Ur||(t=si(t)),t?new di((t=t.rgb()).r,t.g,t.b,t.opacity):new di}function ui(t,e,r,i){return 1===arguments.length?ci(t):new di(t,e,r,null==i?1:i)}function di(t,e,r,i){this.r=+t,this.g=+e,this.b=+r,this.opacity=+i}function fi(){return`#${yi(this.r)}${yi(this.g)}${yi(this.b)}`}function pi(){const t=gi(this.opacity);return`${1===t?"rgb(":"rgba("}${mi(this.r)}, ${mi(this.g)}, ${mi(this.b)}${1===t?")":`, ${t})`}`}function gi(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function mi(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function yi(t){return((t=mi(t))<16?"0":"")+t.toString(16)}function bi(t,e,r,i){return i<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new _i(t,e,r,i)}function xi(t){if(t instanceof _i)return new _i(t.h,t.s,t.l,t.opacity);if(t instanceof Ur||(t=si(t)),!t)return new _i;if(t instanceof _i)return t;var e=(t=t.rgb()).r/255,r=t.g/255,i=t.b/255,n=Math.min(e,r,i),o=Math.max(e,r,i),a=NaN,s=o-n,l=(o+n)/2;return s?(a=e===o?(r-i)/s+6*(r<i):r===o?(i-e)/s+2:(e-r)/s+4,s/=l<.5?o+n:2-o-n,a*=60):s=l>0&&l<1?0:a,new _i(a,s,l,t.opacity)}function Ci(t,e,r,i){return 1===arguments.length?xi(t):new _i(t,e,r,null==i?1:i)}function _i(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}function ki(t){return(t=(t||0)%360)<0?t+360:t}function wi(t){return Math.max(0,Math.min(1,t||0))}function vi(t,e,r){return 255*(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)}function Si(t,e,r,i,n){var o=t*t,a=o*t;return((1-3*t+3*o-a)*e+(4-6*o+3*a)*r+(1+3*t+3*o-3*a)*i+a*n)/6}function Ti(t){var e=t.length-1;return function(r){var i=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),n=t[i],o=t[i+1],a=i>0?t[i-1]:2*n-o,s=i<e-1?t[i+2]:2*o-n;return Si((r-i/e)*e,a,n,o,s)}}function Bi(t){var e=t.length;return function(r){var i=Math.floor(((r%=1)<0?++r:r)*e),n=t[(i+e-1)%e],o=t[i%e],a=t[(i+1)%e],s=t[(i+2)%e];return Si((r-i/e)*e,n,o,a,s)}}Wr(Ur,si,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:oi,formatHex:oi,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return xi(this).formatHsl()},formatRgb:ai,toString:ai}),Wr(di,ui,Hr(Ur,{brighter(t){return t=null==t?Gr:Math.pow(Gr,t),new di(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?Yr:Math.pow(Yr,t),new di(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new di(mi(this.r),mi(this.g),mi(this.b),gi(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:fi,formatHex:fi,formatHex8:function(){return`#${yi(this.r)}${yi(this.g)}${yi(this.b)}${yi(255*(isNaN(this.opacity)?1:this.opacity))}`},formatRgb:pi,toString:pi})),Wr(_i,Ci,Hr(Ur,{brighter(t){return t=null==t?Gr:Math.pow(Gr,t),new _i(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Yr:Math.pow(Yr,t),new _i(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,i=r+(r<.5?r:1-r)*e,n=2*r-i;return new di(vi(t>=240?t-240:t+120,n,i),vi(t,n,i),vi(t<120?t+240:t-120,n,i),this.opacity)},clamp(){return new _i(ki(this.h),wi(this.s),wi(this.l),gi(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=gi(this.opacity);return`${1===t?"hsl(":"hsla("}${ki(this.h)}, ${100*wi(this.s)}%, ${100*wi(this.l)}%${1===t?")":`, ${t})`}`}}));const Mi=t=>()=>t;function Li(t,e){return function(r){return t+r*e}}function Fi(t,e){var r=e-t;return r?Li(t,r>180||r<-180?r-360*Math.round(r/360):r):Mi(isNaN(t)?e:t)}function Ai(t,e){var r=e-t;return r?Li(t,r):Mi(isNaN(t)?e:t)}const Ei=function t(e){var r=function(t){return 1===(t=+t)?Ai:function(e,r){return r-e?function(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)}}(e,r,t):Mi(isNaN(e)?r:e)}}(e);function i(t,e){var i=r((t=ui(t)).r,(e=ui(e)).r),n=r(t.g,e.g),o=r(t.b,e.b),a=Ai(t.opacity,e.opacity);return function(e){return t.r=i(e),t.g=n(e),t.b=o(e),t.opacity=a(e),t+""}}return i.gamma=t,i}(1);function $i(t){return function(e){var r,i,n=e.length,o=new Array(n),a=new Array(n),s=new Array(n);for(r=0;r<n;++r)i=ui(e[r]),o[r]=i.r||0,a[r]=i.g||0,s[r]=i.b||0;return o=t(o),a=t(a),s=t(s),i.opacity=1,function(t){return i.r=o(t),i.g=a(t),i.b=s(t),i+""}}}var Oi=$i(Ti),Di=$i(Bi);function Ii(t,e){e||(e=[]);var r,i=t?Math.min(e.length,t.length):0,n=e.slice();return function(o){for(r=0;r<i;++r)n[r]=t[r]*(1-o)+e[r]*o;return n}}function Ni(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function Pi(t,e){return(Ni(e)?Ii:qi)(t,e)}function qi(t,e){var r,i=e?e.length:0,n=t?Math.min(i,t.length):0,o=new Array(n),a=new Array(i);for(r=0;r<n;++r)o[r]=Yi(t[r],e[r]);for(;r<i;++r)a[r]=e[r];return function(t){for(r=0;r<n;++r)a[r]=o[r](t);return a}}function zi(t,e){var r=new Date;return t=+t,e=+e,function(i){return r.setTime(t*(1-i)+e*i),r}}function Ri(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function ji(t,e){var r,i={},n={};for(r in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)r in t?i[r]=Yi(t[r],e[r]):n[r]=e[r];return function(t){for(r in i)n[r]=i[r](t);return n}}var Wi=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,Hi=new RegExp(Wi.source,"g");function Ui(t,e){var r,i,n,o=Wi.lastIndex=Hi.lastIndex=0,a=-1,s=[],l=[];for(t+="",e+="";(r=Wi.exec(t))&&(i=Hi.exec(e));)(n=i.index)>o&&(n=e.slice(o,n),s[a]?s[a]+=n:s[++a]=n),(r=r[0])===(i=i[0])?s[a]?s[a]+=i:s[++a]=i:(s[++a]=null,l.push({i:a,x:Ri(r,i)})),o=Hi.lastIndex;return o<e.length&&(n=e.slice(o),s[a]?s[a]+=n:s[++a]=n),s.length<2?l[0]?function(t){return function(e){return t(e)+""}}(l[0].x):function(t){return function(){return t}}(e):(e=l.length,function(t){for(var r,i=0;i<e;++i)s[(r=l[i]).i]=r.x(t);return s.join("")})}function Yi(t,e){var r,i=typeof e;return null==e||"boolean"===i?Mi(e):("number"===i?Ri:"string"===i?(r=si(e))?(e=r,Ei):Ui:e instanceof si?Ei:e instanceof Date?zi:Ni(e)?Ii:Array.isArray(e)?qi:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?ji:Ri)(t,e)}function Gi(t){let e;for(;e=t.sourceEvent;)t=e;return t}function Vi(t,e){if(t=Gi(t),void 0===e&&(e=t.currentTarget),e){var r=e.ownerSVGElement||e;if(r.createSVGPoint){var i=r.createSVGPoint();return i.x=t.clientX,i.y=t.clientY,[(i=i.matrixTransform(e.getScreenCTM().inverse())).x,i.y]}if(e.getBoundingClientRect){var n=e.getBoundingClientRect();return[t.clientX-n.left-e.clientLeft,t.clientY-n.top-e.clientTop]}}return[t.pageX,t.pageY]}var Xi,Zi,Qi=0,Ki=0,Ji=0,tn=0,en=0,rn=0,nn="object"==typeof performance&&performance.now?performance:Date,on="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function an(){return en||(on(sn),en=nn.now()+rn)}function sn(){en=0}function ln(){this._call=this._time=this._next=null}function hn(t,e,r){var i=new ln;return i.restart(t,e,r),i}function cn(){an(),++Qi;for(var t,e=Xi;e;)(t=en-e._time)>=0&&e._call.call(void 0,t),e=e._next;--Qi}function un(){en=(tn=nn.now())+rn,Qi=Ki=0;try{cn()}finally{Qi=0,function(){for(var t,e,r=Xi,i=1/0;r;)r._call?(i>r._time&&(i=r._time),t=r,r=r._next):(e=r._next,r._next=null,r=t?t._next=e:Xi=e);Zi=t,fn(i)}(),en=0}}function dn(){var t=nn.now(),e=t-tn;e>1e3&&(rn-=e,tn=t)}function fn(t){Qi||(Ki&&(Ki=clearTimeout(Ki)),t-en>24?(t<1/0&&(Ki=setTimeout(un,t-nn.now()-rn)),Ji&&(Ji=clearInterval(Ji))):(Ji||(tn=nn.now(),Ji=setInterval(dn,1e3)),Qi=1,on(un)))}function pn(t,e,r){var i=new ln;return e=null==e?0:+e,i.restart(r=>{i.stop(),t(r+e)},e,r),i}ln.prototype=hn.prototype={constructor:ln,restart:function(t,e,r){if("function"!=typeof t)throw new TypeError("callback is not a function");r=(null==r?an():+r)+(null==e?0:+e),this._next||Zi===this||(Zi?Zi._next=this:Xi=this,Zi=this),this._call=t,this._time=r,fn()},stop:function(){this._call&&(this._call=null,this._time=1/0,fn())}};var gn=ke("start","end","cancel","interrupt"),mn=[];function yn(t,e,r,i,n,o){var a=t.__transition;if(a){if(r in a)return}else t.__transition={};!function(t,e,r){var i,n=t.__transition;function o(l){var h,c,u,d;if(1!==r.state)return s();for(h in n)if((d=n[h]).name===r.name){if(3===d.state)return pn(o);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete n[h]):+h<e&&(d.state=6,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete n[h])}if(pn(function(){3===r.state&&(r.state=4,r.timer.restart(a,r.delay,r.time),a(l))}),r.state=2,r.on.call("start",t,t.__data__,r.index,r.group),2===r.state){for(r.state=3,i=new Array(u=r.tween.length),h=0,c=-1;h<u;++h)(d=r.tween[h].value.call(t,t.__data__,r.index,r.group))&&(i[++c]=d);i.length=c+1}}function a(e){for(var n=e<r.duration?r.ease.call(null,e/r.duration):(r.timer.restart(s),r.state=5,1),o=-1,a=i.length;++o<a;)i[o].call(t,n);5===r.state&&(r.on.call("end",t,t.__data__,r.index,r.group),s())}function s(){for(var i in r.state=6,r.timer.stop(),delete n[e],n)return;delete t.__transition}n[e]=r,r.timer=hn(function(t){r.state=1,r.timer.restart(o,r.delay,r.time),r.delay<=t&&o(t-r.delay)},0,r.time)}(t,r,{name:e,index:i,group:n,on:gn,tween:mn,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function bn(t,e){var r=Cn(t,e);if(r.state>0)throw new Error("too late; already scheduled");return r}function xn(t,e){var r=Cn(t,e);if(r.state>3)throw new Error("too late; already running");return r}function Cn(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function _n(t,e){var r,i,n,o=t.__transition,a=!0;if(o){for(n in e=null==e?null:e+"",o)(r=o[n]).name===e?(i=r.state>2&&r.state<5,r.state=6,r.timer.stop(),r.on.call(i?"interrupt":"cancel",t,t.__data__,r.index,r.group),delete o[n]):a=!1;a&&delete t.__transition}}var kn,wn=180/Math.PI,vn={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Sn(t,e,r,i,n,o){var a,s,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*r+e*i)&&(r-=t*l,i-=e*l),(s=Math.sqrt(r*r+i*i))&&(r/=s,i/=s,l/=s),t*i<e*r&&(t=-t,e=-e,l=-l,a=-a),{translateX:n,translateY:o,rotate:Math.atan2(e,t)*wn,skewX:Math.atan(l)*wn,scaleX:a,scaleY:s}}function Tn(t,e,r,i){function n(t){return t.length?t.pop()+" ":""}return function(o,a){var s=[],l=[];return o=t(o),a=t(a),function(t,i,n,o,a,s){if(t!==n||i!==o){var l=a.push("translate(",null,e,null,r);s.push({i:l-4,x:Ri(t,n)},{i:l-2,x:Ri(i,o)})}else(n||o)&&a.push("translate("+n+e+o+r)}(o.translateX,o.translateY,a.translateX,a.translateY,s,l),function(t,e,r,o){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),o.push({i:r.push(n(r)+"rotate(",null,i)-2,x:Ri(t,e)})):e&&r.push(n(r)+"rotate("+e+i)}(o.rotate,a.rotate,s,l),function(t,e,r,o){t!==e?o.push({i:r.push(n(r)+"skewX(",null,i)-2,x:Ri(t,e)}):e&&r.push(n(r)+"skewX("+e+i)}(o.skewX,a.skewX,s,l),function(t,e,r,i,o,a){if(t!==r||e!==i){var s=o.push(n(o)+"scale(",null,",",null,")");a.push({i:s-4,x:Ri(t,r)},{i:s-2,x:Ri(e,i)})}else 1===r&&1===i||o.push(n(o)+"scale("+r+","+i+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,s,l),o=a=null,function(t){for(var e,r=-1,i=l.length;++r<i;)s[(e=l[r]).i]=e.x(t);return s.join("")}}}var Bn=Tn(function(t){const e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?vn:Sn(e.a,e.b,e.c,e.d,e.e,e.f)},"px, ","px)","deg)"),Mn=Tn(function(t){return null==t?vn:(kn||(kn=document.createElementNS("http://www.w3.org/2000/svg","g")),kn.setAttribute("transform",t),(t=kn.transform.baseVal.consolidate())?Sn((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):vn)},", ",")",")");function Ln(t,e){var r,i;return function(){var n=xn(this,t),o=n.tween;if(o!==r)for(var a=0,s=(i=r=o).length;a<s;++a)if(i[a].name===e){(i=i.slice()).splice(a,1);break}n.tween=i}}function Fn(t,e,r){var i,n;if("function"!=typeof r)throw new Error;return function(){var o=xn(this,t),a=o.tween;if(a!==i){n=(i=a).slice();for(var s={name:e,value:r},l=0,h=n.length;l<h;++l)if(n[l].name===e){n[l]=s;break}l===h&&n.push(s)}o.tween=n}}function An(t,e,r){var i=t._id;return t.each(function(){var t=xn(this,i);(t.value||(t.value={}))[e]=r.apply(this,arguments)}),function(t){return Cn(t,i).value[e]}}function En(t,e){var r;return("number"==typeof e?Ri:e instanceof si?Ei:(r=si(e))?(e=r,Ei):Ui)(t,e)}function $n(t){return function(){this.removeAttribute(t)}}function On(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Dn(t,e,r){var i,n,o=r+"";return function(){var a=this.getAttribute(t);return a===o?null:a===i?n:n=e(i=a,r)}}function In(t,e,r){var i,n,o=r+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===i?n:n=e(i=a,r)}}function Nn(t,e,r){var i,n,o;return function(){var a,s,l=r(this);if(null!=l)return(a=this.getAttribute(t))===(s=l+"")?null:a===i&&s===n?o:(n=s,o=e(i=a,l));this.removeAttribute(t)}}function Pn(t,e,r){var i,n,o;return function(){var a,s,l=r(this);if(null!=l)return(a=this.getAttributeNS(t.space,t.local))===(s=l+"")?null:a===i&&s===n?o:(n=s,o=e(i=a,l));this.removeAttributeNS(t.space,t.local)}}function qn(t,e){var r,i;function n(){var n=e.apply(this,arguments);return n!==i&&(r=(i=n)&&function(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}(t,n)),r}return n._value=e,n}function zn(t,e){var r,i;function n(){var n=e.apply(this,arguments);return n!==i&&(r=(i=n)&&function(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}(t,n)),r}return n._value=e,n}function Rn(t,e){return function(){bn(this,t).delay=+e.apply(this,arguments)}}function jn(t,e){return e=+e,function(){bn(this,t).delay=e}}function Wn(t,e){return function(){xn(this,t).duration=+e.apply(this,arguments)}}function Hn(t,e){return e=+e,function(){xn(this,t).duration=e}}var Un=Dr.prototype.constructor;function Yn(t){return function(){this.style.removeProperty(t)}}var Gn=0;function Vn(t,e,r,i){this._groups=t,this._parents=e,this._name=r,this._id=i}function Xn(t){return Dr().transition(t)}function Zn(){return++Gn}var Qn=Dr.prototype;function Kn(t){return t*t*t}function Jn(t){return--t*t*t+1}function to(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}Vn.prototype=Xn.prototype={constructor:Vn,select:function(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=ve(t));for(var i=this._groups,n=i.length,o=new Array(n),a=0;a<n;++a)for(var s,l,h=i[a],c=h.length,u=o[a]=new Array(c),d=0;d<c;++d)(s=h[d])&&(l=t.call(s,s.__data__,d,h))&&("__data__"in s&&(l.__data__=s.__data__),u[d]=l,yn(u[d],e,r,d,u,Cn(s,r)));return new Vn(o,this._parents,e,r)},selectAll:function(t){var e=this._name,r=this._id;"function"!=typeof t&&(t=Be(t));for(var i=this._groups,n=i.length,o=[],a=[],s=0;s<n;++s)for(var l,h=i[s],c=h.length,u=0;u<c;++u)if(l=h[u]){for(var d,f=t.call(l,l.__data__,u,h),p=Cn(l,r),g=0,m=f.length;g<m;++g)(d=f[g])&&yn(d,e,r,g,f,p);o.push(f),a.push(l)}return new Vn(o,a,e,r)},selectChild:Qn.selectChild,selectChildren:Qn.selectChildren,filter:function(t){"function"!=typeof t&&(t=Me(t));for(var e=this._groups,r=e.length,i=new Array(r),n=0;n<r;++n)for(var o,a=e[n],s=a.length,l=i[n]=[],h=0;h<s;++h)(o=a[h])&&t.call(o,o.__data__,h,a)&&l.push(o);return new Vn(i,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,i=e.length,n=r.length,o=Math.min(i,n),a=new Array(i),s=0;s<o;++s)for(var l,h=e[s],c=r[s],u=h.length,d=a[s]=new Array(u),f=0;f<u;++f)(l=h[f]||c[f])&&(d[f]=l);for(;s<i;++s)a[s]=e[s];return new Vn(a,this._parents,this._name,this._id)},selection:function(){return new Un(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,r=Zn(),i=this._groups,n=i.length,o=0;o<n;++o)for(var a,s=i[o],l=s.length,h=0;h<l;++h)if(a=s[h]){var c=Cn(a,e);yn(a,t,r,h,s,{time:c.time+c.delay+c.duration,delay:0,duration:c.duration,ease:c.ease})}return new Vn(i,this._parents,t,r)},call:Qn.call,nodes:Qn.nodes,node:Qn.node,size:Qn.size,empty:Qn.empty,each:Qn.each,on:function(t,e){var r=this._id;return arguments.length<2?Cn(this.node(),r).on.on(t):this.each(function(t,e,r){var i,n,o=function(t){return(t+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})}(e)?bn:xn;return function(){var a=o(this,t),s=a.on;s!==i&&(n=(i=s).copy()).on(e,r),a.on=n}}(r,t,e))},attr:function(t,e){var r=We(t),i="transform"===r?Mn:En;return this.attrTween(t,"function"==typeof e?(r.local?Pn:Nn)(r,i,An(this,"attr."+t,e)):null==e?(r.local?On:$n)(r):(r.local?In:Dn)(r,i,e))},attrTween:function(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;var i=We(t);return this.tween(r,(i.local?qn:zn)(i,e))},style:function(t,e,r){var i="transform"==(t+="")?Bn:En;return null==e?this.styleTween(t,function(t,e){var r,i,n;return function(){var o=tr(this,t),a=(this.style.removeProperty(t),tr(this,t));return o===a?null:o===r&&a===i?n:n=e(r=o,i=a)}}(t,i)).on("end.style."+t,Yn(t)):"function"==typeof e?this.styleTween(t,function(t,e,r){var i,n,o;return function(){var a=tr(this,t),s=r(this),l=s+"";return null==s&&(this.style.removeProperty(t),l=s=tr(this,t)),a===l?null:a===i&&l===n?o:(n=l,o=e(i=a,s))}}(t,i,An(this,"style."+t,e))).each(function(t,e){var r,i,n,o,a="style."+e,s="end."+a;return function(){var l=xn(this,t),h=l.on,c=null==l.value[a]?o||(o=Yn(e)):void 0;h===r&&n===c||(i=(r=h).copy()).on(s,n=c),l.on=i}}(this._id,t)):this.styleTween(t,function(t,e,r){var i,n,o=r+"";return function(){var a=tr(this,t);return a===o?null:a===i?n:n=e(i=a,r)}}(t,i,e),r).on("end.style."+t,null)},styleTween:function(t,e,r){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw new Error;return this.tween(i,function(t,e,r){var i,n;function o(){var o=e.apply(this,arguments);return o!==n&&(i=(n=o)&&function(t,e,r){return function(i){this.style.setProperty(t,e.call(this,i),r)}}(t,o,r)),i}return o._value=e,o}(t,e,null==r?"":r))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(An(this,"text",t)):function(t){return function(){this.textContent=t}}(null==t?"":t+""))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw new Error;return this.tween(e,function(t){var e,r;function i(){var i=t.apply(this,arguments);return i!==r&&(e=(r=i)&&function(t){return function(e){this.textContent=t.call(this,e)}}(i)),e}return i._value=t,i}(t))},remove:function(){return this.on("end.remove",function(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}(this._id))},tween:function(t,e){var r=this._id;if(t+="",arguments.length<2){for(var i,n=Cn(this.node(),r).tween,o=0,a=n.length;o<a;++o)if((i=n[o]).name===t)return i.value;return null}return this.each((null==e?Ln:Fn)(r,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Rn:jn)(e,t)):Cn(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Wn:Hn)(e,t)):Cn(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw new Error;return function(){xn(this,t).ease=e}}(e,t)):Cn(this.node(),e).ease},easeVarying:function(t){if("function"!=typeof t)throw new Error;return this.each(function(t,e){return function(){var r=e.apply(this,arguments);if("function"!=typeof r)throw new Error;xn(this,t).ease=r}}(this._id,t))},end:function(){var t,e,r=this,i=r._id,n=r.size();return new Promise(function(o,a){var s={value:a},l={value:function(){0===--n&&o()}};r.each(function(){var r=xn(this,i),n=r.on;n!==t&&((e=(t=n).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),r.on=e}),0===n&&o()})},[Symbol.iterator]:Qn[Symbol.iterator]};var eo={time:null,delay:0,duration:250,ease:to};function ro(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}Dr.prototype.interrupt=function(t){return this.each(function(){_n(this,t)})},Dr.prototype.transition=function(t){var e,r;t instanceof Vn?(e=t._id,t=t._name):(e=Zn(),(r=eo).time=an(),t=null==t?null:t+"");for(var i=this._groups,n=i.length,o=0;o<n;++o)for(var a,s=i[o],l=s.length,h=0;h<l;++h)(a=s[h])&&yn(a,t,e,h,s,r||ro(a,e));return new Vn(i,this._parents,t,e)};var io=[null];function no(t,e){var r,i,n=t.__transition;if(n)for(i in e=null==e?null:e+"",n)if((r=n[i]).state>1&&r.name===e)return new Vn([[t]],io,e,+i);return null}const oo=t=>()=>t;function ao(t,{sourceEvent:e,target:r,selection:i,mode:n,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},selection:{value:i,enumerable:!0,configurable:!0},mode:{value:n,enumerable:!0,configurable:!0},_:{value:o}})}function so(t){t.preventDefault(),t.stopImmediatePropagation()}var lo={name:"drag"},ho={name:"space"},co={name:"handle"},uo={name:"center"};const{abs:fo,max:po,min:go}=Math;function mo(t){return[+t[0],+t[1]]}function yo(t){return[mo(t[0]),mo(t[1])]}var bo={name:"x",handles:["w","e"].map(To),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},xo={name:"y",handles:["n","s"].map(To),input:function(t,e){return null==t?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},Co={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(To),input:function(t){return null==t?null:yo(t)},output:function(t){return t}},_o={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},ko={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},wo={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},vo={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},So={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function To(t){return{type:t}}function Bo(t){return!t.ctrlKey&&!t.button}function Mo(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function Lo(){return navigator.maxTouchPoints||"ontouchstart"in this}function Fo(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function Ao(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function Eo(){return Do(bo)}function $o(){return Do(xo)}function Oo(){return Do(Co)}function Do(t){var e,r=Mo,i=Bo,n=Lo,o=!0,a=ke("start","brush","end"),s=6;function l(e){var r=e.property("__brush",g).selectAll(".overlay").data([To("overlay")]);r.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",_o.overlay).merge(r).each(function(){var t=Fo(this).extent;Ir(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])}),e.selectAll(".selection").data([To("selection")]).enter().append("rect").attr("class","selection").attr("cursor",_o.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var i=e.selectAll(".handle").data(t.handles,function(t){return t.type});i.exit().remove(),i.enter().append("rect").attr("class",function(t){return"handle handle--"+t.type}).attr("cursor",function(t){return _o[t.type]}),e.each(h).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",d).filter(n).on("touchstart.brush",d).on("touchmove.brush",f).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function h(){var t=Ir(this),e=Fo(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",function(t){return"e"===t.type[t.type.length-1]?e[1][0]-s/2:e[0][0]-s/2}).attr("y",function(t){return"s"===t.type[0]?e[1][1]-s/2:e[0][1]-s/2}).attr("width",function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+s:s}).attr("height",function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+s:s})):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function c(t,e,r){var i=t.__brush.emitter;return!i||r&&i.clean?new u(t,e,r):i}function u(t,e,r){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=r}function d(r){if((!e||r.touches)&&i.apply(this,arguments)){var n,a,s,l,u,d,f,p,g,m,y,b=this,x=r.target.__data__.type,C="selection"===(o&&r.metaKey?x="overlay":x)?lo:o&&r.altKey?uo:co,_=t===xo?null:vo[x],k=t===bo?null:So[x],w=Fo(b),v=w.extent,S=w.selection,T=v[0][0],B=v[0][1],M=v[1][0],L=v[1][1],F=0,A=0,E=_&&k&&o&&r.shiftKey,$=Array.from(r.touches||[r],t=>{const e=t.identifier;return(t=Vi(t,b)).point0=t.slice(),t.identifier=e,t});_n(b);var O=c(b,arguments,!0).beforestart();if("overlay"===x){S&&(g=!0);const e=[$[0],$[1]||$[0]];w.selection=S=[[n=t===xo?T:go(e[0][0],e[1][0]),s=t===bo?B:go(e[0][1],e[1][1])],[u=t===xo?M:po(e[0][0],e[1][0]),f=t===bo?L:po(e[0][1],e[1][1])]],$.length>1&&q(r)}else n=S[0][0],s=S[0][1],u=S[1][0],f=S[1][1];a=n,l=s,d=u,p=f;var D=Ir(b).attr("pointer-events","none"),I=D.selectAll(".overlay").attr("cursor",_o[x]);if(r.touches)O.moved=P,O.ended=z;else{var N=Ir(r.view).on("mousemove.brush",P,!0).on("mouseup.brush",z,!0);o&&N.on("keydown.brush",function(t){switch(t.keyCode){case 16:E=_&&k;break;case 18:C===co&&(_&&(u=d-F*_,n=a+F*_),k&&(f=p-A*k,s=l+A*k),C=uo,q(t));break;case 32:C!==co&&C!==uo||(_<0?u=d-F:_>0&&(n=a-F),k<0?f=p-A:k>0&&(s=l-A),C=ho,I.attr("cursor",_o.selection),q(t));break;default:return}so(t)},!0).on("keyup.brush",function(t){switch(t.keyCode){case 16:E&&(m=y=E=!1,q(t));break;case 18:C===uo&&(_<0?u=d:_>0&&(n=a),k<0?f=p:k>0&&(s=l),C=co,q(t));break;case 32:C===ho&&(t.altKey?(_&&(u=d-F*_,n=a+F*_),k&&(f=p-A*k,s=l+A*k),C=uo):(_<0?u=d:_>0&&(n=a),k<0?f=p:k>0&&(s=l),C=co),I.attr("cursor",_o[x]),q(t));break;default:return}so(t)},!0),Rr(r.view)}h.call(b),O.start(r,C.name)}function P(t){for(const e of t.changedTouches||[t])for(const t of $)t.identifier===e.identifier&&(t.cur=Vi(e,b));if(E&&!m&&!y&&1===$.length){const t=$[0];fo(t.cur[0]-t[0])>fo(t.cur[1]-t[1])?y=!0:m=!0}for(const t of $)t.cur&&(t[0]=t.cur[0],t[1]=t.cur[1]);g=!0,so(t),q(t)}function q(t){const e=$[0],r=e.point0;var i;switch(F=e[0]-r[0],A=e[1]-r[1],C){case ho:case lo:_&&(F=po(T-n,go(M-u,F)),a=n+F,d=u+F),k&&(A=po(B-s,go(L-f,A)),l=s+A,p=f+A);break;case co:$[1]?(_&&(a=po(T,go(M,$[0][0])),d=po(T,go(M,$[1][0])),_=1),k&&(l=po(B,go(L,$[0][1])),p=po(B,go(L,$[1][1])),k=1)):(_<0?(F=po(T-n,go(M-n,F)),a=n+F,d=u):_>0&&(F=po(T-u,go(M-u,F)),a=n,d=u+F),k<0?(A=po(B-s,go(L-s,A)),l=s+A,p=f):k>0&&(A=po(B-f,go(L-f,A)),l=s,p=f+A));break;case uo:_&&(a=po(T,go(M,n-F*_)),d=po(T,go(M,u+F*_))),k&&(l=po(B,go(L,s-A*k)),p=po(B,go(L,f+A*k)))}d<a&&(_*=-1,i=n,n=u,u=i,i=a,a=d,d=i,x in ko&&I.attr("cursor",_o[x=ko[x]])),p<l&&(k*=-1,i=s,s=f,f=i,i=l,l=p,p=i,x in wo&&I.attr("cursor",_o[x=wo[x]])),w.selection&&(S=w.selection),m&&(a=S[0][0],d=S[1][0]),y&&(l=S[0][1],p=S[1][1]),S[0][0]===a&&S[0][1]===l&&S[1][0]===d&&S[1][1]===p||(w.selection=[[a,l],[d,p]],h.call(b),O.brush(t,C.name))}function z(t){if(function(t){t.stopImmediatePropagation()}(t),t.touches){if(t.touches.length)return;e&&clearTimeout(e),e=setTimeout(function(){e=null},500)}else jr(t.view,g),N.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);D.attr("pointer-events","all"),I.attr("cursor",_o.overlay),w.selection&&(S=w.selection),function(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}(S)&&(w.selection=null,h.call(b)),O.end(t,C.name)}}function f(t){c(this,arguments).moved(t)}function p(t){c(this,arguments).ended(t)}function g(){var e=this.__brush||{selection:null};return e.extent=yo(r.apply(this,arguments)),e.dim=t,e}return l.move=function(e,r,i){e.tween?e.on("start.brush",function(t){c(this,arguments).beforestart().start(t)}).on("interrupt.brush end.brush",function(t){c(this,arguments).end(t)}).tween("brush",function(){var e=this,i=e.__brush,n=c(e,arguments),o=i.selection,a=t.input("function"==typeof r?r.apply(this,arguments):r,i.extent),s=Yi(o,a);function l(t){i.selection=1===t&&null===a?null:s(t),h.call(e),n.brush()}return null!==o&&null!==a?l:l(1)}):e.each(function(){var e=this,n=arguments,o=e.__brush,a=t.input("function"==typeof r?r.apply(e,n):r,o.extent),s=c(e,n).beforestart();_n(e),o.selection=null===a?null:a,h.call(e),s.start(i).brush(i).end(i)})},l.clear=function(t,e){l.move(t,null,e)},u.prototype={beforestart:function(){return 1===++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(t,e){return this.starting?(this.starting=!1,this.emit("start",t,e)):this.emit("brush",t),this},brush:function(t,e){return this.emit("brush",t,e),this},end:function(t,e){return 0===--this.active&&(delete this.state.emitter,this.emit("end",t,e)),this},emit:function(e,r,i){var n=Ir(this.that).datum();a.call(e,this.that,new ao(e,{sourceEvent:r,target:l,selection:t.output(this.state.selection),mode:i,dispatch:a}),n)}},l.extent=function(t){return arguments.length?(r="function"==typeof t?t:oo(yo(t)),l):r},l.filter=function(t){return arguments.length?(i="function"==typeof t?t:oo(!!t),l):i},l.touchable=function(t){return arguments.length?(n="function"==typeof t?t:oo(!!t),l):n},l.handleSize=function(t){return arguments.length?(s=+t,l):s},l.keyModifiers=function(t){return arguments.length?(o=!!t,l):o},l.on=function(){var t=a.on.apply(a,arguments);return t===a?l:t},l}var Io=Math.abs,No=Math.cos,Po=Math.sin,qo=Math.PI,zo=qo/2,Ro=2*qo,jo=Math.max,Wo=1e-12;function Ho(t,e){return Array.from({length:e-t},(e,r)=>t+r)}function Uo(){return Vo(!1,!1)}function Yo(){return Vo(!1,!0)}function Go(){return Vo(!0,!1)}function Vo(t,e){var r=0,i=null,n=null,o=null;function a(a){var s,l=a.length,h=new Array(l),c=Ho(0,l),u=new Array(l*l),d=new Array(l),f=0;a=Float64Array.from({length:l*l},e?(t,e)=>a[e%l][e/l|0]:(t,e)=>a[e/l|0][e%l]);for(let e=0;e<l;++e){let r=0;for(let i=0;i<l;++i)r+=a[e*l+i]+t*a[i*l+e];f+=h[e]=r}s=(f=jo(0,Ro-r*l)/f)?r:Ro/l;{let e=0;i&&c.sort((t,e)=>i(h[t],h[e]));for(const r of c){const i=e;if(t){const t=Ho(1+~l,l).filter(t=>t<0?a[~t*l+r]:a[r*l+t]);n&&t.sort((t,e)=>n(t<0?-a[~t*l+r]:a[r*l+t],e<0?-a[~e*l+r]:a[r*l+e]));for(const i of t)i<0?(u[~i*l+r]||(u[~i*l+r]={source:null,target:null})).target={index:r,startAngle:e,endAngle:e+=a[~i*l+r]*f,value:a[~i*l+r]}:(u[r*l+i]||(u[r*l+i]={source:null,target:null})).source={index:r,startAngle:e,endAngle:e+=a[r*l+i]*f,value:a[r*l+i]};d[r]={index:r,startAngle:i,endAngle:e,value:h[r]}}else{const t=Ho(0,l).filter(t=>a[r*l+t]||a[t*l+r]);n&&t.sort((t,e)=>n(a[r*l+t],a[r*l+e]));for(const i of t){let t;if(r<i?(t=u[r*l+i]||(u[r*l+i]={source:null,target:null}),t.source={index:r,startAngle:e,endAngle:e+=a[r*l+i]*f,value:a[r*l+i]}):(t=u[i*l+r]||(u[i*l+r]={source:null,target:null}),t.target={index:r,startAngle:e,endAngle:e+=a[r*l+i]*f,value:a[r*l+i]},r===i&&(t.source=t.target)),t.source&&t.target&&t.source.value<t.target.value){const e=t.source;t.source=t.target,t.target=e}}d[r]={index:r,startAngle:i,endAngle:e,value:h[r]}}e+=s}}return(u=Object.values(u)).groups=d,o?u.sort(o):u}return a.padAngle=function(t){return arguments.length?(r=jo(0,t),a):r},a.sortGroups=function(t){return arguments.length?(i=t,a):i},a.sortSubgroups=function(t){return arguments.length?(n=t,a):n},a.sortChords=function(t){return arguments.length?(null==t?o=null:(e=t,o=function(t,r){return e(t.source.value+t.target.value,r.source.value+r.target.value)})._=t,a):o&&o._;var e},a}const Xo=Math.PI,Zo=2*Xo,Qo=1e-6,Ko=Zo-Qo;function Jo(t){this._+=t[0];for(let e=1,r=t.length;e<r;++e)this._+=arguments[e]+t[e]}class ta{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?Jo:function(t){let e=Math.floor(t);if(!(e>=0))throw new Error(`invalid digits: ${t}`);if(e>15)return Jo;const r=10**e;return function(t){this._+=t[0];for(let e=1,i=t.length;e<i;++e)this._+=Math.round(arguments[e]*r)/r+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,r,i){this._append`Q${+t},${+e},${this._x1=+r},${this._y1=+i}`}bezierCurveTo(t,e,r,i,n,o){this._append`C${+t},${+e},${+r},${+i},${this._x1=+n},${this._y1=+o}`}arcTo(t,e,r,i,n){if(t=+t,e=+e,r=+r,i=+i,(n=+n)<0)throw new Error(`negative radius: ${n}`);let o=this._x1,a=this._y1,s=r-t,l=i-e,h=o-t,c=a-e,u=h*h+c*c;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(u>Qo)if(Math.abs(c*s-l*h)>Qo&&n){let d=r-o,f=i-a,p=s*s+l*l,g=d*d+f*f,m=Math.sqrt(p),y=Math.sqrt(u),b=n*Math.tan((Xo-Math.acos((p+u-g)/(2*m*y)))/2),x=b/y,C=b/m;Math.abs(x-1)>Qo&&this._append`L${t+x*h},${e+x*c}`,this._append`A${n},${n},0,0,${+(c*d>h*f)},${this._x1=t+C*s},${this._y1=e+C*l}`}else this._append`L${this._x1=t},${this._y1=e}`}arc(t,e,r,i,n,o){if(t=+t,e=+e,o=!!o,(r=+r)<0)throw new Error(`negative radius: ${r}`);let a=r*Math.cos(i),s=r*Math.sin(i),l=t+a,h=e+s,c=1^o,u=o?i-n:n-i;null===this._x1?this._append`M${l},${h}`:(Math.abs(this._x1-l)>Qo||Math.abs(this._y1-h)>Qo)&&this._append`L${l},${h}`,r&&(u<0&&(u=u%Zo+Zo),u>Ko?this._append`A${r},${r},0,1,${c},${t-a},${e-s}A${r},${r},0,1,${c},${this._x1=l},${this._y1=h}`:u>Qo&&this._append`A${r},${r},0,${+(u>=Xo)},${c},${this._x1=t+r*Math.cos(n)},${this._y1=e+r*Math.sin(n)}`)}rect(t,e,r,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${r=+r}v${+i}h${-r}Z`}toString(){return this._}}function ea(){return new ta}function ra(t=3){return new ta(+t)}ea.prototype=ta.prototype;var ia=Array.prototype.slice;function na(t){return function(){return t}}function oa(t){return t.source}function aa(t){return t.target}function sa(t){return t.radius}function la(t){return t.startAngle}function ha(t){return t.endAngle}function ca(){return 0}function ua(){return 10}function da(t){var e=oa,r=aa,i=sa,n=sa,o=la,a=ha,s=ca,l=null;function h(){var h,c=e.apply(this,arguments),u=r.apply(this,arguments),d=s.apply(this,arguments)/2,f=ia.call(arguments),p=+i.apply(this,(f[0]=c,f)),g=o.apply(this,f)-zo,m=a.apply(this,f)-zo,y=+n.apply(this,(f[0]=u,f)),b=o.apply(this,f)-zo,x=a.apply(this,f)-zo;if(l||(l=h=ea()),d>Wo&&(Io(m-g)>2*d+Wo?m>g?(g+=d,m-=d):(g-=d,m+=d):g=m=(g+m)/2,Io(x-b)>2*d+Wo?x>b?(b+=d,x-=d):(b-=d,x+=d):b=x=(b+x)/2),l.moveTo(p*No(g),p*Po(g)),l.arc(0,0,p,g,m),g!==b||m!==x)if(t){var C=y-+t.apply(this,arguments),_=(b+x)/2;l.quadraticCurveTo(0,0,C*No(b),C*Po(b)),l.lineTo(y*No(_),y*Po(_)),l.lineTo(C*No(x),C*Po(x))}else l.quadraticCurveTo(0,0,y*No(b),y*Po(b)),l.arc(0,0,y,b,x);if(l.quadraticCurveTo(0,0,p*No(g),p*Po(g)),l.closePath(),h)return l=null,h+""||null}return t&&(h.headRadius=function(e){return arguments.length?(t="function"==typeof e?e:na(+e),h):t}),h.radius=function(t){return arguments.length?(i=n="function"==typeof t?t:na(+t),h):i},h.sourceRadius=function(t){return arguments.length?(i="function"==typeof t?t:na(+t),h):i},h.targetRadius=function(t){return arguments.length?(n="function"==typeof t?t:na(+t),h):n},h.startAngle=function(t){return arguments.length?(o="function"==typeof t?t:na(+t),h):o},h.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:na(+t),h):a},h.padAngle=function(t){return arguments.length?(s="function"==typeof t?t:na(+t),h):s},h.source=function(t){return arguments.length?(e=t,h):e},h.target=function(t){return arguments.length?(r=t,h):r},h.context=function(t){return arguments.length?(l=null==t?null:t,h):l},h}function fa(){return da()}function pa(){return da(ua)}const ga=Math.PI/180,ma=180/Math.PI,ya=.96422,ba=.82521,xa=4/29,Ca=6/29,_a=3*Ca*Ca,ka=Ca*Ca*Ca;function wa(t){if(t instanceof Ta)return new Ta(t.l,t.a,t.b,t.opacity);if(t instanceof Oa)return Da(t);t instanceof di||(t=ci(t));var e,r,i=Fa(t.r),n=Fa(t.g),o=Fa(t.b),a=Ba((.2225045*i+.7168786*n+.0606169*o)/1);return i===n&&n===o?e=r=a:(e=Ba((.4360747*i+.3850649*n+.1430804*o)/ya),r=Ba((.0139322*i+.0971045*n+.7141733*o)/ba)),new Ta(116*a-16,500*(e-a),200*(a-r),t.opacity)}function va(t,e){return new Ta(t,0,0,null==e?1:e)}function Sa(t,e,r,i){return 1===arguments.length?wa(t):new Ta(t,e,r,null==i?1:i)}function Ta(t,e,r,i){this.l=+t,this.a=+e,this.b=+r,this.opacity=+i}function Ba(t){return t>ka?Math.pow(t,1/3):t/_a+xa}function Ma(t){return t>Ca?t*t*t:_a*(t-xa)}function La(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function Fa(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function Aa(t){if(t instanceof Oa)return new Oa(t.h,t.c,t.l,t.opacity);if(t instanceof Ta||(t=wa(t)),0===t.a&&0===t.b)return new Oa(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*ma;return new Oa(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function Ea(t,e,r,i){return 1===arguments.length?Aa(t):new Oa(r,e,t,null==i?1:i)}function $a(t,e,r,i){return 1===arguments.length?Aa(t):new Oa(t,e,r,null==i?1:i)}function Oa(t,e,r,i){this.h=+t,this.c=+e,this.l=+r,this.opacity=+i}function Da(t){if(isNaN(t.h))return new Ta(t.l,0,0,t.opacity);var e=t.h*ga;return new Ta(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Wr(Ta,Sa,Hr(Ur,{brighter(t){return new Ta(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker(t){return new Ta(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,r=isNaN(this.b)?t:t-this.b/200;return new di(La(3.1338561*(e=ya*Ma(e))-1.6168667*(t=1*Ma(t))-.4906146*(r=ba*Ma(r))),La(-.9787684*e+1.9161415*t+.033454*r),La(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}})),Wr(Oa,$a,Hr(Ur,{brighter(t){return new Oa(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker(t){return new Oa(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb(){return Da(this).rgb()}}));var Ia=-.14861,Na=1.78277,Pa=-.29227,qa=-.90649,za=1.97294,Ra=za*qa,ja=za*Na,Wa=Na*Pa-qa*Ia;function Ha(t,e,r,i){return 1===arguments.length?function(t){if(t instanceof Ua)return new Ua(t.h,t.s,t.l,t.opacity);t instanceof di||(t=ci(t));var e=t.r/255,r=t.g/255,i=t.b/255,n=(Wa*i+Ra*e-ja*r)/(Wa+Ra-ja),o=i-n,a=(za*(r-n)-Pa*o)/qa,s=Math.sqrt(a*a+o*o)/(za*n*(1-n)),l=s?Math.atan2(a,o)*ma-120:NaN;return new Ua(l<0?l+360:l,s,n,t.opacity)}(t):new Ua(t,e,r,null==i?1:i)}function Ua(t,e,r,i){this.h=+t,this.s=+e,this.l=+r,this.opacity=+i}Wr(Ua,Ha,Hr(Ur,{brighter(t){return t=null==t?Gr:Math.pow(Gr,t),new Ua(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?Yr:Math.pow(Yr,t),new Ua(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*ga,e=+this.l,r=isNaN(this.s)?0:this.s*e*(1-e),i=Math.cos(t),n=Math.sin(t);return new di(255*(e+r*(Ia*i+Na*n)),255*(e+r*(Pa*i+qa*n)),255*(e+r*(za*i)),this.opacity)}}));var Ya=Array.prototype.slice;function Ga(t,e){return t-e}const Va=t=>()=>t;function Xa(t,e){for(var r,i=-1,n=e.length;++i<n;)if(r=Za(t,e[i]))return r;return 0}function Za(t,e){for(var r=e[0],i=e[1],n=-1,o=0,a=t.length,s=a-1;o<a;s=o++){var l=t[o],h=l[0],c=l[1],u=t[s],d=u[0],f=u[1];if(Qa(l,u,e))return 0;c>i!=f>i&&r<(d-h)*(i-c)/(f-c)+h&&(n=-n)}return n}function Qa(t,e,r){var i,n,o,a;return function(t,e,r){return(e[0]-t[0])*(r[1]-t[1])===(r[0]-t[0])*(e[1]-t[1])}(t,e,r)&&(n=t[i=+(t[0]===e[0])],o=r[i],a=e[i],n<=o&&o<=a||a<=o&&o<=n)}function Ka(){}var Ja=[[],[[[1,1.5],[.5,1]]],[[[1.5,1],[1,1.5]]],[[[1.5,1],[.5,1]]],[[[1,.5],[1.5,1]]],[[[1,1.5],[.5,1]],[[1,.5],[1.5,1]]],[[[1,.5],[1,1.5]]],[[[1,.5],[.5,1]]],[[[.5,1],[1,.5]]],[[[1,1.5],[1,.5]]],[[[.5,1],[1,.5]],[[1.5,1],[1,1.5]]],[[[1.5,1],[1,.5]]],[[[.5,1],[1.5,1]]],[[[1,1.5],[1.5,1]]],[[[.5,1],[1,1.5]]],[]];function ts(){var t=1,e=1,r=dt,i=s;function n(t){var e=r(t);if(Array.isArray(e))e=e.slice().sort(Ga);else{const r=M(t,es);for(e=lt(...ut(r[0],r[1],e),e);e[e.length-1]>=r[1];)e.pop();for(;e[1]<r[0];)e.shift()}return e.map(e=>o(t,e))}function o(r,n){const o=null==n?NaN:+n;if(isNaN(o))throw new Error(`invalid value: ${n}`);var s=[],l=[];return function(r,i,n){var o,s,l,h,c,u,d=new Array,f=new Array;for(o=s=-1,h=rs(r[0],i),Ja[h<<1].forEach(p);++o<t-1;)l=h,h=rs(r[o+1],i),Ja[l|h<<1].forEach(p);for(Ja[0|h].forEach(p);++s<e-1;){for(o=-1,h=rs(r[s*t+t],i),c=rs(r[s*t],i),Ja[h<<1|c<<2].forEach(p);++o<t-1;)l=h,h=rs(r[s*t+t+o+1],i),u=c,c=rs(r[s*t+o+1],i),Ja[l|h<<1|c<<2|u<<3].forEach(p);Ja[h|c<<3].forEach(p)}for(o=-1,c=r[s*t]>=i,Ja[c<<2].forEach(p);++o<t-1;)u=c,c=rs(r[s*t+o+1],i),Ja[c<<2|u<<3].forEach(p);function p(t){var e,r,i=[t[0][0]+o,t[0][1]+s],l=[t[1][0]+o,t[1][1]+s],h=a(i),c=a(l);(e=f[h])?(r=d[c])?(delete f[e.end],delete d[r.start],e===r?(e.ring.push(l),n(e.ring)):d[e.start]=f[r.end]={start:e.start,end:r.end,ring:e.ring.concat(r.ring)}):(delete f[e.end],e.ring.push(l),f[e.end=c]=e):(e=d[c])?(r=f[h])?(delete d[e.start],delete f[r.end],e===r?(e.ring.push(l),n(e.ring)):d[r.start]=f[e.end]={start:r.start,end:e.end,ring:r.ring.concat(e.ring)}):(delete d[e.start],e.ring.unshift(i),d[e.start=h]=e):d[h]=f[c]={start:h,end:c,ring:[i,l]}}Ja[c<<3].forEach(p)}(r,o,function(t){i(t,r,o),function(t){for(var e=0,r=t.length,i=t[r-1][1]*t[0][0]-t[r-1][0]*t[0][1];++e<r;)i+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return i}(t)>0?s.push([t]):l.push(t)}),l.forEach(function(t){for(var e,r=0,i=s.length;r<i;++r)if(-1!==Xa((e=s[r])[0],t))return void e.push(t)}),{type:"MultiPolygon",value:n,coordinates:s}}function a(e){return 2*e[0]+e[1]*(t+1)*4}function s(r,i,n){r.forEach(function(r){var o=r[0],a=r[1],s=0|o,l=0|a,h=is(i[l*t+s]);o>0&&o<t&&s===o&&(r[0]=ns(o,is(i[l*t+s-1]),h,n)),a>0&&a<e&&l===a&&(r[1]=ns(a,is(i[(l-1)*t+s]),h,n))})}return n.contour=o,n.size=function(r){if(!arguments.length)return[t,e];var i=Math.floor(r[0]),o=Math.floor(r[1]);if(!(i>=0&&o>=0))throw new Error("invalid size");return t=i,e=o,n},n.thresholds=function(t){return arguments.length?(r="function"==typeof t?t:Array.isArray(t)?Va(Ya.call(t)):Va(t),n):r},n.smooth=function(t){return arguments.length?(i=t?s:Ka,n):i===s},n}function es(t){return isFinite(t)?t:NaN}function rs(t,e){return null!=t&&+t>=e}function is(t){return null==t||isNaN(t=+t)?-1/0:t}function ns(t,e,r,i){const n=i-e,o=r-e,a=isFinite(n)||isFinite(o)?n/o:Math.sign(n)/Math.sign(o);return isNaN(a)?t:t+a-.5}function os(t){return t[0]}function as(t){return t[1]}function ss(){return 1}function ls(){var t=os,e=as,r=ss,i=960,n=500,o=20,a=2,s=3*o,l=i+2*s>>a,h=n+2*s>>a,c=Va(20);function u(i){var n=new Float32Array(l*h),c=Math.pow(2,-a),u=-1;for(const o of i){var d=(t(o,++u,i)+s)*c,f=(e(o,u,i)+s)*c,g=+r(o,u,i);if(g&&d>=0&&d<l&&f>=0&&f<h){var m=Math.floor(d),y=Math.floor(f),b=d-m-.5,x=f-y-.5;n[m+y*l]+=(1-b)*(1-x)*g,n[m+1+y*l]+=b*(1-x)*g,n[m+1+(y+1)*l]+=b*x*g,n[m+(y+1)*l]+=(1-b)*x*g}}return p({data:n,width:l,height:h},o*c),n}function d(t){var e=u(t),r=c(e),i=Math.pow(2,2*a);return Array.isArray(r)||(r=lt(Number.MIN_VALUE,pt(e)/i,r)),ts().size([l,h]).thresholds(r.map(t=>t*i))(e).map((t,e)=>(t.value=+r[e],f(t)))}function f(t){return t.coordinates.forEach(g),t}function g(t){t.forEach(m)}function m(t){t.forEach(y)}function y(t){t[0]=t[0]*Math.pow(2,a)-s,t[1]=t[1]*Math.pow(2,a)-s}function b(){return l=i+2*(s=3*o)>>a,h=n+2*s>>a,d}return d.contours=function(t){var e=u(t),r=ts().size([l,h]),i=Math.pow(2,2*a),n=t=>{t=+t;var n=f(r.contour(e,t*i));return n.value=t,n};return Object.defineProperty(n,"max",{get:()=>pt(e)/i}),n},d.x=function(e){return arguments.length?(t="function"==typeof e?e:Va(+e),d):t},d.y=function(t){return arguments.length?(e="function"==typeof t?t:Va(+t),d):e},d.weight=function(t){return arguments.length?(r="function"==typeof t?t:Va(+t),d):r},d.size=function(t){if(!arguments.length)return[i,n];var e=+t[0],r=+t[1];if(!(e>=0&&r>=0))throw new Error("invalid size");return i=e,n=r,b()},d.cellSize=function(t){if(!arguments.length)return 1<<a;if(!((t=+t)>=1))throw new Error("invalid cell size");return a=Math.floor(Math.log(t)/Math.LN2),b()},d.thresholds=function(t){return arguments.length?(c="function"==typeof t?t:Array.isArray(t)?Va(Ya.call(t)):Va(t),d):c},d.bandwidth=function(t){if(!arguments.length)return Math.sqrt(o*(o+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return o=(Math.sqrt(4*t*t+1)-1)/2,b()},d}const hs=134217729;function cs(t,e,r,i,n){let o,a,s,l,h=e[0],c=i[0],u=0,d=0;c>h==c>-h?(o=h,h=e[++u]):(o=c,c=i[++d]);let f=0;if(u<t&&d<r)for(c>h==c>-h?(a=h+o,s=o-(a-h),h=e[++u]):(a=c+o,s=o-(a-c),c=i[++d]),o=a,0!==s&&(n[f++]=s);u<t&&d<r;)c>h==c>-h?(a=o+h,l=a-o,s=o-(a-l)+(h-l),h=e[++u]):(a=o+c,l=a-o,s=o-(a-l)+(c-l),c=i[++d]),o=a,0!==s&&(n[f++]=s);for(;u<t;)a=o+h,l=a-o,s=o-(a-l)+(h-l),h=e[++u],o=a,0!==s&&(n[f++]=s);for(;d<r;)a=o+c,l=a-o,s=o-(a-l)+(c-l),c=i[++d],o=a,0!==s&&(n[f++]=s);return 0===o&&0!==f||(n[f++]=o),f}function us(t){return new Float64Array(t)}const ds=us(4),fs=us(8),ps=us(12),gs=us(16),ms=us(4);function ys(t,e,r,i,n,o){const a=(e-o)*(r-n),s=(t-n)*(i-o),l=a-s,h=Math.abs(a+s);return Math.abs(l)>=33306690738754716e-32*h?l:-function(t,e,r,i,n,o,a){let s,l,h,c,u,d,f,p,g,m,y,b,x,C,_,k,w,v;const S=t-n,T=r-n,B=e-o,M=i-o;C=S*M,d=hs*S,f=d-(d-S),p=S-f,d=hs*M,g=d-(d-M),m=M-g,_=p*m-(C-f*g-p*g-f*m),k=B*T,d=hs*B,f=d-(d-B),p=B-f,d=hs*T,g=d-(d-T),m=T-g,w=p*m-(k-f*g-p*g-f*m),y=_-w,u=_-y,ds[0]=_-(y+u)+(u-w),b=C+y,u=b-C,x=C-(b-u)+(y-u),y=x-k,u=x-y,ds[1]=x-(y+u)+(u-k),v=b+y,u=v-b,ds[2]=b-(v-u)+(y-u),ds[3]=v;let L=function(t,e){let r=e[0];for(let i=1;i<t;i++)r+=e[i];return r}(4,ds),F=22204460492503146e-32*a;if(L>=F||-L>=F)return L;if(u=t-S,s=t-(S+u)+(u-n),u=r-T,h=r-(T+u)+(u-n),u=e-B,l=e-(B+u)+(u-o),u=i-M,c=i-(M+u)+(u-o),0===s&&0===l&&0===h&&0===c)return L;if(F=11093356479670487e-47*a+33306690738754706e-32*Math.abs(L),L+=S*c+M*s-(B*h+T*l),L>=F||-L>=F)return L;C=s*M,d=hs*s,f=d-(d-s),p=s-f,d=hs*M,g=d-(d-M),m=M-g,_=p*m-(C-f*g-p*g-f*m),k=l*T,d=hs*l,f=d-(d-l),p=l-f,d=hs*T,g=d-(d-T),m=T-g,w=p*m-(k-f*g-p*g-f*m),y=_-w,u=_-y,ms[0]=_-(y+u)+(u-w),b=C+y,u=b-C,x=C-(b-u)+(y-u),y=x-k,u=x-y,ms[1]=x-(y+u)+(u-k),v=b+y,u=v-b,ms[2]=b-(v-u)+(y-u),ms[3]=v;const A=cs(4,ds,4,ms,fs);C=S*c,d=hs*S,f=d-(d-S),p=S-f,d=hs*c,g=d-(d-c),m=c-g,_=p*m-(C-f*g-p*g-f*m),k=B*h,d=hs*B,f=d-(d-B),p=B-f,d=hs*h,g=d-(d-h),m=h-g,w=p*m-(k-f*g-p*g-f*m),y=_-w,u=_-y,ms[0]=_-(y+u)+(u-w),b=C+y,u=b-C,x=C-(b-u)+(y-u),y=x-k,u=x-y,ms[1]=x-(y+u)+(u-k),v=b+y,u=v-b,ms[2]=b-(v-u)+(y-u),ms[3]=v;const E=cs(A,fs,4,ms,ps);C=s*c,d=hs*s,f=d-(d-s),p=s-f,d=hs*c,g=d-(d-c),m=c-g,_=p*m-(C-f*g-p*g-f*m),k=l*h,d=hs*l,f=d-(d-l),p=l-f,d=hs*h,g=d-(d-h),m=h-g,w=p*m-(k-f*g-p*g-f*m),y=_-w,u=_-y,ms[0]=_-(y+u)+(u-w),b=C+y,u=b-C,x=C-(b-u)+(y-u),y=x-k,u=x-y,ms[1]=x-(y+u)+(u-k),v=b+y,u=v-b,ms[2]=b-(v-u)+(y-u),ms[3]=v;const $=cs(E,ps,4,ms,gs);return gs[$-1]}(t,e,r,i,n,o,h)}us(4),us(4),us(4),us(4),us(4),us(4),us(4),us(4),us(4),us(8),us(8),us(8),us(4),us(8),us(8),us(8),us(12),us(192),us(192),us(4),us(4),us(4),us(4),us(4),us(4),us(4),us(4),us(8),us(8),us(8),us(8),us(8),us(8),us(8),us(8),us(8),us(4),us(4),us(4),us(8),us(16),us(16),us(16),us(32),us(32),us(48),us(64),us(1152),us(1152),us(4),us(4),us(4),us(4),us(4),us(4),us(4),us(4),us(4),us(4),us(24),us(24),us(24),us(24),us(24),us(24),us(24),us(24),us(24),us(24),us(1152),us(1152),us(1152),us(1152),us(1152),us(2304),us(2304),us(3456),us(5760),us(8),us(8),us(8),us(16),us(24),us(48),us(48),us(96),us(192),us(384),us(384),us(384),us(768),us(96),us(96),us(96),us(1152);const bs=Math.pow(2,-52),xs=new Uint32Array(512);class Cs{static from(t,e=Ts,r=Bs){const i=t.length,n=new Float64Array(2*i);for(let o=0;o<i;o++){const i=t[o];n[2*o]=e(i),n[2*o+1]=r(i)}return new Cs(n)}constructor(t){const e=t.length>>1;if(e>0&&"number"!=typeof t[0])throw new Error("Expected coords to contain numbers.");this.coords=t;const r=Math.max(2*e-5,0);this._triangles=new Uint32Array(3*r),this._halfedges=new Int32Array(3*r),this._hashSize=Math.ceil(Math.sqrt(e)),this._hullPrev=new Uint32Array(e),this._hullNext=new Uint32Array(e),this._hullTri=new Uint32Array(e),this._hullHash=new Int32Array(this._hashSize),this._ids=new Uint32Array(e),this._dists=new Float64Array(e),this.update()}update(){const{coords:t,_hullPrev:e,_hullNext:r,_hullTri:i,_hullHash:n}=this,o=t.length>>1;let a=1/0,s=1/0,l=-1/0,h=-1/0;for(let e=0;e<o;e++){const r=t[2*e],i=t[2*e+1];r<a&&(a=r),i<s&&(s=i),r>l&&(l=r),i>h&&(h=i),this._ids[e]=e}const c=(a+l)/2,u=(s+h)/2;let d,f,p;for(let e=0,r=1/0;e<o;e++){const i=_s(c,u,t[2*e],t[2*e+1]);i<r&&(d=e,r=i)}const g=t[2*d],m=t[2*d+1];for(let e=0,r=1/0;e<o;e++){if(e===d)continue;const i=_s(g,m,t[2*e],t[2*e+1]);i<r&&i>0&&(f=e,r=i)}let y=t[2*f],b=t[2*f+1],x=1/0;for(let e=0;e<o;e++){if(e===d||e===f)continue;const r=ws(g,m,y,b,t[2*e],t[2*e+1]);r<x&&(p=e,x=r)}let C=t[2*p],_=t[2*p+1];if(x===1/0){for(let e=0;e<o;e++)this._dists[e]=t[2*e]-t[0]||t[2*e+1]-t[1];vs(this._ids,this._dists,0,o-1);const e=new Uint32Array(o);let r=0;for(let t=0,i=-1/0;t<o;t++){const n=this._ids[t],o=this._dists[n];o>i&&(e[r++]=n,i=o)}return this.hull=e.subarray(0,r),this.triangles=new Uint32Array(0),void(this.halfedges=new Uint32Array(0))}if(ys(g,m,y,b,C,_)<0){const t=f,e=y,r=b;f=p,y=C,b=_,p=t,C=e,_=r}const k=function(t,e,r,i,n,o){const a=r-t,s=i-e,l=n-t,h=o-e,c=a*a+s*s,u=l*l+h*h,d=.5/(a*h-s*l);return{x:t+(h*c-s*u)*d,y:e+(a*u-l*c)*d}}(g,m,y,b,C,_);this._cx=k.x,this._cy=k.y;for(let e=0;e<o;e++)this._dists[e]=_s(t[2*e],t[2*e+1],k.x,k.y);vs(this._ids,this._dists,0,o-1),this._hullStart=d;let w=3;r[d]=e[p]=f,r[f]=e[d]=p,r[p]=e[f]=d,i[d]=0,i[f]=1,i[p]=2,n.fill(-1),n[this._hashKey(g,m)]=d,n[this._hashKey(y,b)]=f,n[this._hashKey(C,_)]=p,this.trianglesLen=0,this._addTriangle(d,f,p,-1,-1,-1);for(let o,a,s=0;s<this._ids.length;s++){const l=this._ids[s],h=t[2*l],c=t[2*l+1];if(s>0&&Math.abs(h-o)<=bs&&Math.abs(c-a)<=bs)continue;if(o=h,a=c,l===d||l===f||l===p)continue;let u=0;for(let t=0,e=this._hashKey(h,c);t<this._hashSize&&(u=n[(e+t)%this._hashSize],-1===u||u===r[u]);t++);u=e[u];let g,m=u;for(;g=r[m],ys(h,c,t[2*m],t[2*m+1],t[2*g],t[2*g+1])>=0;)if(m=g,m===u){m=-1;break}if(-1===m)continue;let y=this._addTriangle(m,l,r[m],-1,-1,i[m]);i[l]=this._legalize(y+2),i[m]=y,w++;let b=r[m];for(;g=r[b],ys(h,c,t[2*b],t[2*b+1],t[2*g],t[2*g+1])<0;)y=this._addTriangle(b,l,g,i[l],-1,i[b]),i[l]=this._legalize(y+2),r[b]=b,w--,b=g;if(m===u)for(;g=e[m],ys(h,c,t[2*g],t[2*g+1],t[2*m],t[2*m+1])<0;)y=this._addTriangle(g,l,m,-1,i[m],i[g]),this._legalize(y+2),i[g]=y,r[m]=m,w--,m=g;this._hullStart=e[l]=m,r[m]=e[b]=l,r[l]=b,n[this._hashKey(h,c)]=l,n[this._hashKey(t[2*m],t[2*m+1])]=m}this.hull=new Uint32Array(w);for(let t=0,e=this._hullStart;t<w;t++)this.hull[t]=e,e=r[e];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(t,e){return Math.floor(function(t,e){const r=t/(Math.abs(t)+Math.abs(e));return(e>0?3-r:1+r)/4}(t-this._cx,e-this._cy)*this._hashSize)%this._hashSize}_legalize(t){const{_triangles:e,_halfedges:r,coords:i}=this;let n=0,o=0;for(;;){const a=r[t],s=t-t%3;if(o=s+(t+2)%3,-1===a){if(0===n)break;t=xs[--n];continue}const l=a-a%3,h=s+(t+1)%3,c=l+(a+2)%3,u=e[o],d=e[t],f=e[h],p=e[c];if(ks(i[2*u],i[2*u+1],i[2*d],i[2*d+1],i[2*f],i[2*f+1],i[2*p],i[2*p+1])){e[t]=p,e[a]=u;const i=r[c];if(-1===i){let e=this._hullStart;do{if(this._hullTri[e]===c){this._hullTri[e]=t;break}e=this._hullPrev[e]}while(e!==this._hullStart)}this._link(t,i),this._link(a,r[o]),this._link(o,c);const s=l+(a+1)%3;n<xs.length&&(xs[n++]=s)}else{if(0===n)break;t=xs[--n]}}return o}_link(t,e){this._halfedges[t]=e,-1!==e&&(this._halfedges[e]=t)}_addTriangle(t,e,r,i,n,o){const a=this.trianglesLen;return this._triangles[a]=t,this._triangles[a+1]=e,this._triangles[a+2]=r,this._link(a,i),this._link(a+1,n),this._link(a+2,o),this.trianglesLen+=3,a}}function _s(t,e,r,i){const n=t-r,o=e-i;return n*n+o*o}function ks(t,e,r,i,n,o,a,s){const l=t-a,h=e-s,c=r-a,u=i-s,d=n-a,f=o-s,p=c*c+u*u,g=d*d+f*f;return l*(u*g-p*f)-h*(c*g-p*d)+(l*l+h*h)*(c*f-u*d)<0}function ws(t,e,r,i,n,o){const a=r-t,s=i-e,l=n-t,h=o-e,c=a*a+s*s,u=l*l+h*h,d=.5/(a*h-s*l),f=(h*c-s*u)*d,p=(a*u-l*c)*d;return f*f+p*p}function vs(t,e,r,i){if(i-r<=20)for(let n=r+1;n<=i;n++){const i=t[n],o=e[i];let a=n-1;for(;a>=r&&e[t[a]]>o;)t[a+1]=t[a--];t[a+1]=i}else{let n=r+1,o=i;Ss(t,r+i>>1,n),e[t[r]]>e[t[i]]&&Ss(t,r,i),e[t[n]]>e[t[i]]&&Ss(t,n,i),e[t[r]]>e[t[n]]&&Ss(t,r,n);const a=t[n],s=e[a];for(;;){do{n++}while(e[t[n]]<s);do{o--}while(e[t[o]]>s);if(o<n)break;Ss(t,n,o)}t[r+1]=t[o],t[o]=a,i-n+1>=o-r?(vs(t,e,n,i),vs(t,e,r,o-1)):(vs(t,e,r,o-1),vs(t,e,n,i))}}function Ss(t,e,r){const i=t[e];t[e]=t[r],t[r]=i}function Ts(t){return t[0]}function Bs(t){return t[1]}const Ms=1e-6;class Ls{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(t,e){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(t,e){this._+=`L${this._x1=+t},${this._y1=+e}`}arc(t,e,r){const i=(t=+t)+(r=+r),n=e=+e;if(r<0)throw new Error("negative radius");null===this._x1?this._+=`M${i},${n}`:(Math.abs(this._x1-i)>Ms||Math.abs(this._y1-n)>Ms)&&(this._+="L"+i+","+n),r&&(this._+=`A${r},${r},0,1,1,${t-r},${e}A${r},${r},0,1,1,${this._x1=i},${this._y1=n}`)}rect(t,e,r,i){this._+=`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${+r}v${+i}h${-r}Z`}value(){return this._||null}}class Fs{constructor(){this._=[]}moveTo(t,e){this._.push([t,e])}closePath(){this._.push(this._[0].slice())}lineTo(t,e){this._.push([t,e])}value(){return this._.length?this._:null}}class As{constructor(t,[e,r,i,n]=[0,0,960,500]){if(!((i=+i)>=(e=+e)&&(n=+n)>=(r=+r)))throw new Error("invalid bounds");this.delaunay=t,this._circumcenters=new Float64Array(2*t.points.length),this.vectors=new Float64Array(2*t.points.length),this.xmax=i,this.xmin=e,this.ymax=n,this.ymin=r,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:t,hull:e,triangles:r},vectors:i}=this;let n,o;const a=this.circumcenters=this._circumcenters.subarray(0,r.length/3*2);for(let i,s,l=0,h=0,c=r.length;l<c;l+=3,h+=2){const c=2*r[l],u=2*r[l+1],d=2*r[l+2],f=t[c],p=t[c+1],g=t[u],m=t[u+1],y=t[d],b=t[d+1],x=g-f,C=m-p,_=y-f,k=b-p,w=2*(x*k-C*_);if(Math.abs(w)<1e-9){if(void 0===n){n=o=0;for(const r of e)n+=t[2*r],o+=t[2*r+1];n/=e.length,o/=e.length}const r=1e9*Math.sign((n-f)*k-(o-p)*_);i=(f+y)/2-r*k,s=(p+b)/2+r*_}else{const t=1/w,e=x*x+C*C,r=_*_+k*k;i=f+(k*e-C*r)*t,s=p+(x*r-_*e)*t}a[h]=i,a[h+1]=s}let s,l,h,c=e[e.length-1],u=4*c,d=t[2*c],f=t[2*c+1];i.fill(0);for(let r=0;r<e.length;++r)c=e[r],s=u,l=d,h=f,u=4*c,d=t[2*c],f=t[2*c+1],i[s+2]=i[u]=h-f,i[s+3]=i[u+1]=d-l}render(t){const e=null==t?t=new Ls:void 0,{delaunay:{halfedges:r,inedges:i,hull:n},circumcenters:o,vectors:a}=this;if(n.length<=1)return null;for(let e=0,i=r.length;e<i;++e){const i=r[e];if(i<e)continue;const n=2*Math.floor(e/3),a=2*Math.floor(i/3),s=o[n],l=o[n+1],h=o[a],c=o[a+1];this._renderSegment(s,l,h,c,t)}let s,l=n[n.length-1];for(let e=0;e<n.length;++e){s=l,l=n[e];const r=2*Math.floor(i[l]/3),h=o[r],c=o[r+1],u=4*s,d=this._project(h,c,a[u+2],a[u+3]);d&&this._renderSegment(h,c,d[0],d[1],t)}return e&&e.value()}renderBounds(t){const e=null==t?t=new Ls:void 0;return t.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),e&&e.value()}renderCell(t,e){const r=null==e?e=new Ls:void 0,i=this._clip(t);if(null===i||!i.length)return;e.moveTo(i[0],i[1]);let n=i.length;for(;i[0]===i[n-2]&&i[1]===i[n-1]&&n>1;)n-=2;for(let t=2;t<n;t+=2)i[t]===i[t-2]&&i[t+1]===i[t-1]||e.lineTo(i[t],i[t+1]);return e.closePath(),r&&r.value()}*cellPolygons(){const{delaunay:{points:t}}=this;for(let e=0,r=t.length/2;e<r;++e){const t=this.cellPolygon(e);t&&(t.index=e,yield t)}}cellPolygon(t){const e=new Fs;return this.renderCell(t,e),e.value()}_renderSegment(t,e,r,i,n){let o;const a=this._regioncode(t,e),s=this._regioncode(r,i);0===a&&0===s?(n.moveTo(t,e),n.lineTo(r,i)):(o=this._clipSegment(t,e,r,i,a,s))&&(n.moveTo(o[0],o[1]),n.lineTo(o[2],o[3]))}contains(t,e,r){return(e=+e)==e&&(r=+r)==r&&this.delaunay._step(t,e,r)===t}*neighbors(t){const e=this._clip(t);if(e)for(const r of this.delaunay.neighbors(t)){const t=this._clip(r);if(t)t:for(let i=0,n=e.length;i<n;i+=2)for(let o=0,a=t.length;o<a;o+=2)if(e[i]===t[o]&&e[i+1]===t[o+1]&&e[(i+2)%n]===t[(o+a-2)%a]&&e[(i+3)%n]===t[(o+a-1)%a]){yield r;break t}}}_cell(t){const{circumcenters:e,delaunay:{inedges:r,halfedges:i,triangles:n}}=this,o=r[t];if(-1===o)return null;const a=[];let s=o;do{const r=Math.floor(s/3);if(a.push(e[2*r],e[2*r+1]),s=s%3==2?s-2:s+1,n[s]!==t)break;s=i[s]}while(s!==o&&-1!==s);return a}_clip(t){if(0===t&&1===this.delaunay.hull.length)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const e=this._cell(t);if(null===e)return null;const{vectors:r}=this,i=4*t;return this._simplify(r[i]||r[i+1]?this._clipInfinite(t,e,r[i],r[i+1],r[i+2],r[i+3]):this._clipFinite(t,e))}_clipFinite(t,e){const r=e.length;let i,n,o,a,s=null,l=e[r-2],h=e[r-1],c=this._regioncode(l,h),u=0;for(let d=0;d<r;d+=2)if(i=l,n=h,l=e[d],h=e[d+1],o=c,c=this._regioncode(l,h),0===o&&0===c)a=u,u=0,s?s.push(l,h):s=[l,h];else{let e,r,d,f,p;if(0===o){if(null===(e=this._clipSegment(i,n,l,h,o,c)))continue;[r,d,f,p]=e}else{if(null===(e=this._clipSegment(l,h,i,n,c,o)))continue;[f,p,r,d]=e,a=u,u=this._edgecode(r,d),a&&u&&this._edge(t,a,u,s,s.length),s?s.push(r,d):s=[r,d]}a=u,u=this._edgecode(f,p),a&&u&&this._edge(t,a,u,s,s.length),s?s.push(f,p):s=[f,p]}if(s)a=u,u=this._edgecode(s[0],s[1]),a&&u&&this._edge(t,a,u,s,s.length);else if(this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2))return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];return s}_clipSegment(t,e,r,i,n,o){const a=n<o;for(a&&([t,e,r,i,n,o]=[r,i,t,e,o,n]);;){if(0===n&&0===o)return a?[r,i,t,e]:[t,e,r,i];if(n&o)return null;let s,l,h=n||o;8&h?(s=t+(r-t)*(this.ymax-e)/(i-e),l=this.ymax):4&h?(s=t+(r-t)*(this.ymin-e)/(i-e),l=this.ymin):2&h?(l=e+(i-e)*(this.xmax-t)/(r-t),s=this.xmax):(l=e+(i-e)*(this.xmin-t)/(r-t),s=this.xmin),n?(t=s,e=l,n=this._regioncode(t,e)):(r=s,i=l,o=this._regioncode(r,i))}}_clipInfinite(t,e,r,i,n,o){let a,s=Array.from(e);if((a=this._project(s[0],s[1],r,i))&&s.unshift(a[0],a[1]),(a=this._project(s[s.length-2],s[s.length-1],n,o))&&s.push(a[0],a[1]),s=this._clipFinite(t,s))for(let e,r=0,i=s.length,n=this._edgecode(s[i-2],s[i-1]);r<i;r+=2)e=n,n=this._edgecode(s[r],s[r+1]),e&&n&&(r=this._edge(t,e,n,s,r),i=s.length);else this.contains(t,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(s=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return s}_edge(t,e,r,i,n){for(;e!==r;){let r,o;switch(e){case 5:e=4;continue;case 4:e=6,r=this.xmax,o=this.ymin;break;case 6:e=2;continue;case 2:e=10,r=this.xmax,o=this.ymax;break;case 10:e=8;continue;case 8:e=9,r=this.xmin,o=this.ymax;break;case 9:e=1;continue;case 1:e=5,r=this.xmin,o=this.ymin}i[n]===r&&i[n+1]===o||!this.contains(t,r,o)||(i.splice(n,0,r,o),n+=2)}return n}_project(t,e,r,i){let n,o,a,s=1/0;if(i<0){if(e<=this.ymin)return null;(n=(this.ymin-e)/i)<s&&(a=this.ymin,o=t+(s=n)*r)}else if(i>0){if(e>=this.ymax)return null;(n=(this.ymax-e)/i)<s&&(a=this.ymax,o=t+(s=n)*r)}if(r>0){if(t>=this.xmax)return null;(n=(this.xmax-t)/r)<s&&(o=this.xmax,a=e+(s=n)*i)}else if(r<0){if(t<=this.xmin)return null;(n=(this.xmin-t)/r)<s&&(o=this.xmin,a=e+(s=n)*i)}return[o,a]}_edgecode(t,e){return(t===this.xmin?1:t===this.xmax?2:0)|(e===this.ymin?4:e===this.ymax?8:0)}_regioncode(t,e){return(t<this.xmin?1:t>this.xmax?2:0)|(e<this.ymin?4:e>this.ymax?8:0)}_simplify(t){if(t&&t.length>4){for(let e=0;e<t.length;e+=2){const r=(e+2)%t.length,i=(e+4)%t.length;(t[e]===t[r]&&t[r]===t[i]||t[e+1]===t[r+1]&&t[r+1]===t[i+1])&&(t.splice(r,2),e-=2)}t.length||(t=null)}return t}}const Es=2*Math.PI,$s=Math.pow;function Os(t){return t[0]}function Ds(t){return t[1]}function Is(t,e,r){return[t+Math.sin(t+e)*r,e+Math.cos(t-e)*r]}class Ns{static from(t,e=Os,r=Ds,i){return new Ns("length"in t?function(t,e,r,i){const n=t.length,o=new Float64Array(2*n);for(let a=0;a<n;++a){const n=t[a];o[2*a]=e.call(i,n,a,t),o[2*a+1]=r.call(i,n,a,t)}return o}(t,e,r,i):Float64Array.from(function*(t,e,r,i){let n=0;for(const o of t)yield e.call(i,o,n,t),yield r.call(i,o,n,t),++n}(t,e,r,i)))}constructor(t){this._delaunator=new Cs(t),this.inedges=new Int32Array(t.length/2),this._hullIndex=new Int32Array(t.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const t=this._delaunator,e=this.points;if(t.hull&&t.hull.length>2&&function(t){const{triangles:e,coords:r}=t;for(let t=0;t<e.length;t+=3){const i=2*e[t],n=2*e[t+1],o=2*e[t+2];if((r[o]-r[i])*(r[n+1]-r[i+1])-(r[n]-r[i])*(r[o+1]-r[i+1])>1e-10)return!1}return!0}(t)){this.collinear=Int32Array.from({length:e.length/2},(t,e)=>e).sort((t,r)=>e[2*t]-e[2*r]||e[2*t+1]-e[2*r+1]);const t=this.collinear[0],r=this.collinear[this.collinear.length-1],i=[e[2*t],e[2*t+1],e[2*r],e[2*r+1]],n=1e-8*Math.hypot(i[3]-i[1],i[2]-i[0]);for(let t=0,r=e.length/2;t<r;++t){const r=Is(e[2*t],e[2*t+1],n);e[2*t]=r[0],e[2*t+1]=r[1]}this._delaunator=new Cs(e)}else delete this.collinear;const r=this.halfedges=this._delaunator.halfedges,i=this.hull=this._delaunator.hull,n=this.triangles=this._delaunator.triangles,o=this.inedges.fill(-1),a=this._hullIndex.fill(-1);for(let t=0,e=r.length;t<e;++t){const e=n[t%3==2?t-2:t+1];-1!==r[t]&&-1!==o[e]||(o[e]=t)}for(let t=0,e=i.length;t<e;++t)a[i[t]]=t;i.length<=2&&i.length>0&&(this.triangles=new Int32Array(3).fill(-1),this.halfedges=new Int32Array(3).fill(-1),this.triangles[0]=i[0],o[i[0]]=1,2===i.length&&(o[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(t){return new As(this,t)}*neighbors(t){const{inedges:e,hull:r,_hullIndex:i,halfedges:n,triangles:o,collinear:a}=this;if(a){const e=a.indexOf(t);return e>0&&(yield a[e-1]),void(e<a.length-1&&(yield a[e+1]))}const s=e[t];if(-1===s)return;let l=s,h=-1;do{if(yield h=o[l],l=l%3==2?l-2:l+1,o[l]!==t)return;if(l=n[l],-1===l){const e=r[(i[t]+1)%r.length];return void(e!==h&&(yield e))}}while(l!==s)}find(t,e,r=0){if((t=+t)!=t||(e=+e)!=e)return-1;const i=r;let n;for(;(n=this._step(r,t,e))>=0&&n!==r&&n!==i;)r=n;return n}_step(t,e,r){const{inedges:i,hull:n,_hullIndex:o,halfedges:a,triangles:s,points:l}=this;if(-1===i[t]||!l.length)return(t+1)%(l.length>>1);let h=t,c=$s(e-l[2*t],2)+$s(r-l[2*t+1],2);const u=i[t];let d=u;do{let i=s[d];const u=$s(e-l[2*i],2)+$s(r-l[2*i+1],2);if(u<c&&(c=u,h=i),d=d%3==2?d-2:d+1,s[d]!==t)break;if(d=a[d],-1===d){if(d=n[(o[t]+1)%n.length],d!==i&&$s(e-l[2*d],2)+$s(r-l[2*d+1],2)<c)return d;break}}while(d!==u);return h}render(t){const e=null==t?t=new Ls:void 0,{points:r,halfedges:i,triangles:n}=this;for(let e=0,o=i.length;e<o;++e){const o=i[e];if(o<e)continue;const a=2*n[e],s=2*n[o];t.moveTo(r[a],r[a+1]),t.lineTo(r[s],r[s+1])}return this.renderHull(t),e&&e.value()}renderPoints(t,e){void 0!==e||t&&"function"==typeof t.moveTo||(e=t,t=null),e=null==e?2:+e;const r=null==t?t=new Ls:void 0,{points:i}=this;for(let r=0,n=i.length;r<n;r+=2){const n=i[r],o=i[r+1];t.moveTo(n+e,o),t.arc(n,o,e,0,Es)}return r&&r.value()}renderHull(t){const e=null==t?t=new Ls:void 0,{hull:r,points:i}=this,n=2*r[0],o=r.length;t.moveTo(i[n],i[n+1]);for(let e=1;e<o;++e){const n=2*r[e];t.lineTo(i[n],i[n+1])}return t.closePath(),e&&e.value()}hullPolygon(){const t=new Fs;return this.renderHull(t),t.value()}renderTriangle(t,e){const r=null==e?e=new Ls:void 0,{points:i,triangles:n}=this,o=2*n[t*=3],a=2*n[t+1],s=2*n[t+2];return e.moveTo(i[o],i[o+1]),e.lineTo(i[a],i[a+1]),e.lineTo(i[s],i[s+1]),e.closePath(),r&&r.value()}*trianglePolygons(){const{triangles:t}=this;for(let e=0,r=t.length/3;e<r;++e)yield this.trianglePolygon(e)}trianglePolygon(t){const e=new Fs;return this.renderTriangle(t,e),e.value()}}const Ps=t=>()=>t;function qs(t,{sourceEvent:e,subject:r,target:i,identifier:n,active:o,x:a,y:s,dx:l,dy:h,dispatch:c}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},subject:{value:r,enumerable:!0,configurable:!0},target:{value:i,enumerable:!0,configurable:!0},identifier:{value:n,enumerable:!0,configurable:!0},active:{value:o,enumerable:!0,configurable:!0},x:{value:a,enumerable:!0,configurable:!0},y:{value:s,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:h,enumerable:!0,configurable:!0},_:{value:c}})}function zs(t){return!t.ctrlKey&&!t.button}function Rs(){return this.parentNode}function js(t,e){return null==e?{x:t.x,y:t.y}:e}function Ws(){return navigator.maxTouchPoints||"ontouchstart"in this}function Hs(){var t,e,r,i,n=zs,o=Rs,a=js,s=Ws,l={},h=ke("start","drag","end"),c=0,u=0;function d(t){t.on("mousedown.drag",f).filter(s).on("touchstart.drag",m).on("touchmove.drag",y,Nr).on("touchend.drag touchcancel.drag",b).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function f(a,s){if(!i&&n.call(this,a,s)){var l=x(this,o.call(this,a,s),a,s,"mouse");l&&(Ir(a.view).on("mousemove.drag",p,Pr).on("mouseup.drag",g,Pr),Rr(a.view),qr(a),r=!1,t=a.clientX,e=a.clientY,l("start",a))}}function p(i){if(zr(i),!r){var n=i.clientX-t,o=i.clientY-e;r=n*n+o*o>u}l.mouse("drag",i)}function g(t){Ir(t.view).on("mousemove.drag mouseup.drag",null),jr(t.view,r),zr(t),l.mouse("end",t)}function m(t,e){if(n.call(this,t,e)){var r,i,a=t.changedTouches,s=o.call(this,t,e),l=a.length;for(r=0;r<l;++r)(i=x(this,s,t,e,a[r].identifier,a[r]))&&(qr(t),i("start",t,a[r]))}}function y(t){var e,r,i=t.changedTouches,n=i.length;for(e=0;e<n;++e)(r=l[i[e].identifier])&&(zr(t),r("drag",t,i[e]))}function b(t){var e,r,n=t.changedTouches,o=n.length;for(i&&clearTimeout(i),i=setTimeout(function(){i=null},500),e=0;e<o;++e)(r=l[n[e].identifier])&&(qr(t),r("end",t,n[e]))}function x(t,e,r,i,n,o){var s,u,f,p=h.copy(),g=Vi(o||r,e);if(null!=(f=a.call(t,new qs("beforestart",{sourceEvent:r,target:d,identifier:n,active:c,x:g[0],y:g[1],dx:0,dy:0,dispatch:p}),i)))return s=f.x-g[0]||0,u=f.y-g[1]||0,function r(o,a,h){var m,y=g;switch(o){case"start":l[n]=r,m=c++;break;case"end":delete l[n],--c;case"drag":g=Vi(h||a,e),m=c}p.call(o,t,new qs(o,{sourceEvent:a,subject:f,target:d,identifier:n,active:m,x:g[0]+s,y:g[1]+u,dx:g[0]-y[0],dy:g[1]-y[1],dispatch:p}),i)}}return d.filter=function(t){return arguments.length?(n="function"==typeof t?t:Ps(!!t),d):n},d.container=function(t){return arguments.length?(o="function"==typeof t?t:Ps(t),d):o},d.subject=function(t){return arguments.length?(a="function"==typeof t?t:Ps(t),d):a},d.touchable=function(t){return arguments.length?(s="function"==typeof t?t:Ps(!!t),d):s},d.on=function(){var t=h.on.apply(h,arguments);return t===h?d:t},d.clickDistance=function(t){return arguments.length?(u=(t=+t)*t,d):Math.sqrt(u)},d}qs.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Us={},Ys={};function Gs(t){return new Function("d","return {"+t.map(function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'}).join(",")+"}")}function Vs(t){var e=Object.create(null),r=[];return t.forEach(function(t){for(var i in t)i in e||r.push(e[i]=i)}),r}function Xs(t,e){var r=t+"",i=r.length;return i<e?new Array(e-i+1).join(0)+r:r}function Zs(t){var e=new RegExp('["'+t+"\n\r]"),r=t.charCodeAt(0);function i(t,e){var i,n=[],o=t.length,a=0,s=0,l=o<=0,h=!1;function c(){if(l)return Ys;if(h)return h=!1,Us;var e,i,n=a;if(34===t.charCodeAt(n)){for(;a++<o&&34!==t.charCodeAt(a)||34===t.charCodeAt(++a););return(e=a)>=o?l=!0:10===(i=t.charCodeAt(a++))?h=!0:13===i&&(h=!0,10===t.charCodeAt(a)&&++a),t.slice(n+1,e-1).replace(/""/g,'"')}for(;a<o;){if(10===(i=t.charCodeAt(e=a++)))h=!0;else if(13===i)h=!0,10===t.charCodeAt(a)&&++a;else if(i!==r)continue;return t.slice(n,e)}return l=!0,t.slice(n,o)}for(10===t.charCodeAt(o-1)&&--o,13===t.charCodeAt(o-1)&&--o;(i=c())!==Ys;){for(var u=[];i!==Us&&i!==Ys;)u.push(i),i=c();e&&null==(u=e(u,s++))||n.push(u)}return n}function n(e,r){return e.map(function(e){return r.map(function(t){return a(e[t])}).join(t)})}function o(e){return e.map(a).join(t)}function a(t){return null==t?"":t instanceof Date?function(t){var e,r=t.getUTCHours(),i=t.getUTCMinutes(),n=t.getUTCSeconds(),o=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+Xs(-e,6):e>9999?"+"+Xs(e,6):Xs(e,4))+"-"+Xs(t.getUTCMonth()+1,2)+"-"+Xs(t.getUTCDate(),2)+(o?"T"+Xs(r,2)+":"+Xs(i,2)+":"+Xs(n,2)+"."+Xs(o,3)+"Z":n?"T"+Xs(r,2)+":"+Xs(i,2)+":"+Xs(n,2)+"Z":i||r?"T"+Xs(r,2)+":"+Xs(i,2)+"Z":"")}(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var r,n,o=i(t,function(t,i){if(r)return r(t,i-1);n=t,r=e?function(t,e){var r=Gs(t);return function(i,n){return e(r(i),n,t)}}(t,e):Gs(t)});return o.columns=n||[],o},parseRows:i,format:function(e,r){return null==r&&(r=Vs(e)),[r.map(a).join(t)].concat(n(e,r)).join("\n")},formatBody:function(t,e){return null==e&&(e=Vs(t)),n(t,e).join("\n")},formatRows:function(t){return t.map(o).join("\n")},formatRow:o,formatValue:a}}var Qs=Zs(","),Ks=Qs.parse,Js=Qs.parseRows,tl=Qs.format,el=Qs.formatBody,rl=Qs.formatRows,il=Qs.formatRow,nl=Qs.formatValue,ol=Zs("\t"),al=ol.parse,sl=ol.parseRows,ll=ol.format,hl=ol.formatBody,cl=ol.formatRows,ul=ol.formatRow,dl=ol.formatValue;function fl(t){for(var e in t){var r,i,n=t[e].trim();if(n)if("true"===n)n=!0;else if("false"===n)n=!1;else if("NaN"===n)n=NaN;else if(isNaN(r=+n)){if(!(i=n.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;pl&&i[4]&&!i[7]&&(n=n.replace(/-/g,"/").replace(/T/," ")),n=new Date(n)}else n=r;else n=null;t[e]=n}return t}const pl=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours(),gl=t=>+t;function ml(t){return t*t}function yl(t){return t*(2-t)}function bl(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}var xl=function t(e){function r(t){return Math.pow(t,e)}return e=+e,r.exponent=t,r}(3),Cl=function t(e){function r(t){return 1-Math.pow(1-t,e)}return e=+e,r.exponent=t,r}(3),_l=function t(e){function r(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,r.exponent=t,r}(3),kl=Math.PI,wl=kl/2;function vl(t){return 1===+t?1:1-Math.cos(t*wl)}function Sl(t){return Math.sin(t*wl)}function Tl(t){return(1-Math.cos(kl*t))/2}function Bl(t){return 1.0009775171065494*(Math.pow(2,-10*t)-.0009765625)}function Ml(t){return Bl(1-+t)}function Ll(t){return 1-Bl(t)}function Fl(t){return((t*=2)<=1?Bl(1-t):2-Bl(t-1))/2}function Al(t){return 1-Math.sqrt(1-t*t)}function El(t){return Math.sqrt(1- --t*t)}function $l(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var Ol=4/11,Dl=6/11,Il=8/11,Nl=9/11,Pl=10/11,ql=21/22,zl=7.5625;function Rl(t){return 1-jl(1-t)}function jl(t){return(t=+t)<Ol?zl*t*t:t<Il?zl*(t-=Dl)*t+.75:t<Pl?zl*(t-=Nl)*t+.9375:zl*(t-=ql)*t+.984375}function Wl(t){return((t*=2)<=1?1-jl(1-t):jl(t-1)+1)/2}var Hl=1.70158,Ul=function t(e){function r(t){return(t=+t)*t*(e*(t-1)+t)}return e=+e,r.overshoot=t,r}(Hl),Yl=function t(e){function r(t){return--t*t*((t+1)*e+t)+1}return e=+e,r.overshoot=t,r}(Hl),Gl=function t(e){function r(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,r.overshoot=t,r}(Hl),Vl=2*Math.PI,Xl=function t(e,r){var i=Math.asin(1/(e=Math.max(1,e)))*(r/=Vl);function n(t){return e*Bl(- --t)*Math.sin((i-t)/r)}return n.amplitude=function(e){return t(e,r*Vl)},n.period=function(r){return t(e,r)},n}(1,.3),Zl=function t(e,r){var i=Math.asin(1/(e=Math.max(1,e)))*(r/=Vl);function n(t){return 1-e*Bl(t=+t)*Math.sin((t+i)/r)}return n.amplitude=function(e){return t(e,r*Vl)},n.period=function(r){return t(e,r)},n}(1,.3),Ql=function t(e,r){var i=Math.asin(1/(e=Math.max(1,e)))*(r/=Vl);function n(t){return((t=2*t-1)<0?e*Bl(-t)*Math.sin((i-t)/r):2-e*Bl(t)*Math.sin((i+t)/r))/2}return n.amplitude=function(e){return t(e,r*Vl)},n.period=function(r){return t(e,r)},n}(1,.3);function Kl(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function Jl(t,e){return fetch(t,e).then(Kl)}function th(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function eh(t,e){return fetch(t,e).then(th)}function rh(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function ih(t,e){return fetch(t,e).then(rh)}function nh(t){return function(e,r,i){return 2===arguments.length&&"function"==typeof r&&(i=r,r=void 0),ih(e,r).then(function(e){return t(e,i)})}}function oh(t,e,r,i){3===arguments.length&&"function"==typeof r&&(i=r,r=void 0);var n=Zs(t);return ih(e,r).then(function(t){return n.parse(t,i)})}var ah=nh(Ks),sh=nh(al);function lh(t,e){return new Promise(function(r,i){var n=new Image;for(var o in e)n[o]=e[o];n.onerror=i,n.onload=function(){r(n)},n.src=t})}function hh(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(204!==t.status&&205!==t.status)return t.json()}function ch(t,e){return fetch(t,e).then(hh)}function uh(t){return(e,r)=>ih(e,r).then(e=>(new DOMParser).parseFromString(e,t))}const dh=uh("application/xml");var fh=uh("text/html"),ph=uh("image/svg+xml");function gh(t,e){var r,i=1;function n(){var n,o,a=r.length,s=0,l=0;for(n=0;n<a;++n)s+=(o=r[n]).x,l+=o.y;for(s=(s/a-t)*i,l=(l/a-e)*i,n=0;n<a;++n)(o=r[n]).x-=s,o.y-=l}return null==t&&(t=0),null==e&&(e=0),n.initialize=function(t){r=t},n.x=function(e){return arguments.length?(t=+e,n):t},n.y=function(t){return arguments.length?(e=+t,n):e},n.strength=function(t){return arguments.length?(i=+t,n):i},n}function mh(t,e,r,i){if(isNaN(e)||isNaN(r))return t;var n,o,a,s,l,h,c,u,d,f=t._root,p={data:i},g=t._x0,m=t._y0,y=t._x1,b=t._y1;if(!f)return t._root=p,t;for(;f.length;)if((h=e>=(o=(g+y)/2))?g=o:y=o,(c=r>=(a=(m+b)/2))?m=a:b=a,n=f,!(f=f[u=c<<1|h]))return n[u]=p,t;if(s=+t._x.call(null,f.data),l=+t._y.call(null,f.data),e===s&&r===l)return p.next=f,n?n[u]=p:t._root=p,t;do{n=n?n[u]=new Array(4):t._root=new Array(4),(h=e>=(o=(g+y)/2))?g=o:y=o,(c=r>=(a=(m+b)/2))?m=a:b=a}while((u=c<<1|h)==(d=(l>=a)<<1|s>=o));return n[d]=f,n[u]=p,t}function yh(t,e,r,i,n){this.node=t,this.x0=e,this.y0=r,this.x1=i,this.y1=n}function bh(t){return t[0]}function xh(t){return t[1]}function Ch(t,e,r){var i=new _h(null==e?bh:e,null==r?xh:r,NaN,NaN,NaN,NaN);return null==t?i:i.addAll(t)}function _h(t,e,r,i,n,o){this._x=t,this._y=e,this._x0=r,this._y0=i,this._x1=n,this._y1=o,this._root=void 0}function kh(t){for(var e={data:t.data},r=e;t=t.next;)r=r.next={data:t.data};return e}var wh=Ch.prototype=_h.prototype;function vh(t){return function(){return t}}function Sh(t){return 1e-6*(t()-.5)}function Th(t){return t.x+t.vx}function Bh(t){return t.y+t.vy}function Mh(t){var e,r,i,n=1,o=1;function a(){for(var t,a,l,h,c,u,d,f=e.length,p=0;p<o;++p)for(a=Ch(e,Th,Bh).visitAfter(s),t=0;t<f;++t)l=e[t],u=r[l.index],d=u*u,h=l.x+l.vx,c=l.y+l.vy,a.visit(g);function g(t,e,r,o,a){var s=t.data,f=t.r,p=u+f;if(!s)return e>h+p||o<h-p||r>c+p||a<c-p;if(s.index>l.index){var g=h-s.x-s.vx,m=c-s.y-s.vy,y=g*g+m*m;y<p*p&&(0===g&&(y+=(g=Sh(i))*g),0===m&&(y+=(m=Sh(i))*m),y=(p-(y=Math.sqrt(y)))/y*n,l.vx+=(g*=y)*(p=(f*=f)/(d+f)),l.vy+=(m*=y)*p,s.vx-=g*(p=1-p),s.vy-=m*p)}}}function s(t){if(t.data)return t.r=r[t.data.index];for(var e=t.r=0;e<4;++e)t[e]&&t[e].r>t.r&&(t.r=t[e].r)}function l(){if(e){var i,n,o=e.length;for(r=new Array(o),i=0;i<o;++i)n=e[i],r[n.index]=+t(n,i,e)}}return"function"!=typeof t&&(t=vh(null==t?1:+t)),a.initialize=function(t,r){e=t,i=r,l()},a.iterations=function(t){return arguments.length?(o=+t,a):o},a.strength=function(t){return arguments.length?(n=+t,a):n},a.radius=function(e){return arguments.length?(t="function"==typeof e?e:vh(+e),l(),a):t},a}function Lh(t){return t.index}function Fh(t,e){var r=t.get(e);if(!r)throw new Error("node not found: "+e);return r}function Ah(t){var e,r,i,n,o,a,s=Lh,l=function(t){return 1/Math.min(n[t.source.index],n[t.target.index])},h=vh(30),c=1;function u(i){for(var n=0,s=t.length;n<c;++n)for(var l,h,u,d,f,p,g,m=0;m<s;++m)h=(l=t[m]).source,d=(u=l.target).x+u.vx-h.x-h.vx||Sh(a),f=u.y+u.vy-h.y-h.vy||Sh(a),d*=p=((p=Math.sqrt(d*d+f*f))-r[m])/p*i*e[m],f*=p,u.vx-=d*(g=o[m]),u.vy-=f*g,h.vx+=d*(g=1-g),h.vy+=f*g}function d(){if(i){var a,l,h=i.length,c=t.length,u=new Map(i.map((t,e)=>[s(t,e,i),t]));for(a=0,n=new Array(h);a<c;++a)(l=t[a]).index=a,"object"!=typeof l.source&&(l.source=Fh(u,l.source)),"object"!=typeof l.target&&(l.target=Fh(u,l.target)),n[l.source.index]=(n[l.source.index]||0)+1,n[l.target.index]=(n[l.target.index]||0)+1;for(a=0,o=new Array(c);a<c;++a)l=t[a],o[a]=n[l.source.index]/(n[l.source.index]+n[l.target.index]);e=new Array(c),f(),r=new Array(c),p()}}function f(){if(i)for(var r=0,n=t.length;r<n;++r)e[r]=+l(t[r],r,t)}function p(){if(i)for(var e=0,n=t.length;e<n;++e)r[e]=+h(t[e],e,t)}return null==t&&(t=[]),u.initialize=function(t,e){i=t,a=e,d()},u.links=function(e){return arguments.length?(t=e,d(),u):t},u.id=function(t){return arguments.length?(s=t,u):s},u.iterations=function(t){return arguments.length?(c=+t,u):c},u.strength=function(t){return arguments.length?(l="function"==typeof t?t:vh(+t),f(),u):l},u.distance=function(t){return arguments.length?(h="function"==typeof t?t:vh(+t),p(),u):h},u}wh.copy=function(){var t,e,r=new _h(this._x,this._y,this._x0,this._y0,this._x1,this._y1),i=this._root;if(!i)return r;if(!i.length)return r._root=kh(i),r;for(t=[{source:i,target:r._root=new Array(4)}];i=t.pop();)for(var n=0;n<4;++n)(e=i.source[n])&&(e.length?t.push({source:e,target:i.target[n]=new Array(4)}):i.target[n]=kh(e));return r},wh.add=function(t){const e=+this._x.call(null,t),r=+this._y.call(null,t);return mh(this.cover(e,r),e,r,t)},wh.addAll=function(t){var e,r,i,n,o=t.length,a=new Array(o),s=new Array(o),l=1/0,h=1/0,c=-1/0,u=-1/0;for(r=0;r<o;++r)isNaN(i=+this._x.call(null,e=t[r]))||isNaN(n=+this._y.call(null,e))||(a[r]=i,s[r]=n,i<l&&(l=i),i>c&&(c=i),n<h&&(h=n),n>u&&(u=n));if(l>c||h>u)return this;for(this.cover(l,h).cover(c,u),r=0;r<o;++r)mh(this,a[r],s[r],t[r]);return this},wh.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var r=this._x0,i=this._y0,n=this._x1,o=this._y1;if(isNaN(r))n=(r=Math.floor(t))+1,o=(i=Math.floor(e))+1;else{for(var a,s,l=n-r||1,h=this._root;r>t||t>=n||i>e||e>=o;)switch(s=(e<i)<<1|t<r,(a=new Array(4))[s]=h,h=a,l*=2,s){case 0:n=r+l,o=i+l;break;case 1:r=n-l,o=i+l;break;case 2:n=r+l,i=o-l;break;case 3:r=n-l,i=o-l}this._root&&this._root.length&&(this._root=h)}return this._x0=r,this._y0=i,this._x1=n,this._y1=o,this},wh.data=function(){var t=[];return this.visit(function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)}),t},wh.extent=function(t){return arguments.length?this.cover(+t[0][0],+t[0][1]).cover(+t[1][0],+t[1][1]):isNaN(this._x0)?void 0:[[this._x0,this._y0],[this._x1,this._y1]]},wh.find=function(t,e,r){var i,n,o,a,s,l,h,c=this._x0,u=this._y0,d=this._x1,f=this._y1,p=[],g=this._root;for(g&&p.push(new yh(g,c,u,d,f)),null==r?r=1/0:(c=t-r,u=e-r,d=t+r,f=e+r,r*=r);l=p.pop();)if(!(!(g=l.node)||(n=l.x0)>d||(o=l.y0)>f||(a=l.x1)<c||(s=l.y1)<u))if(g.length){var m=(n+a)/2,y=(o+s)/2;p.push(new yh(g[3],m,y,a,s),new yh(g[2],n,y,m,s),new yh(g[1],m,o,a,y),new yh(g[0],n,o,m,y)),(h=(e>=y)<<1|t>=m)&&(l=p[p.length-1],p[p.length-1]=p[p.length-1-h],p[p.length-1-h]=l)}else{var b=t-+this._x.call(null,g.data),x=e-+this._y.call(null,g.data),C=b*b+x*x;if(C<r){var _=Math.sqrt(r=C);c=t-_,u=e-_,d=t+_,f=e+_,i=g.data}}return i},wh.remove=function(t){if(isNaN(o=+this._x.call(null,t))||isNaN(a=+this._y.call(null,t)))return this;var e,r,i,n,o,a,s,l,h,c,u,d,f=this._root,p=this._x0,g=this._y0,m=this._x1,y=this._y1;if(!f)return this;if(f.length)for(;;){if((h=o>=(s=(p+m)/2))?p=s:m=s,(c=a>=(l=(g+y)/2))?g=l:y=l,e=f,!(f=f[u=c<<1|h]))return this;if(!f.length)break;(e[u+1&3]||e[u+2&3]||e[u+3&3])&&(r=e,d=u)}for(;f.data!==t;)if(i=f,!(f=f.next))return this;return(n=f.next)&&delete f.next,i?(n?i.next=n:delete i.next,this):e?(n?e[u]=n:delete e[u],(f=e[0]||e[1]||e[2]||e[3])&&f===(e[3]||e[2]||e[1]||e[0])&&!f.length&&(r?r[d]=f:this._root=f),this):(this._root=n,this)},wh.removeAll=function(t){for(var e=0,r=t.length;e<r;++e)this.remove(t[e]);return this},wh.root=function(){return this._root},wh.size=function(){var t=0;return this.visit(function(e){if(!e.length)do{++t}while(e=e.next)}),t},wh.visit=function(t){var e,r,i,n,o,a,s=[],l=this._root;for(l&&s.push(new yh(l,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(l=e.node,i=e.x0,n=e.y0,o=e.x1,a=e.y1)&&l.length){var h=(i+o)/2,c=(n+a)/2;(r=l[3])&&s.push(new yh(r,h,c,o,a)),(r=l[2])&&s.push(new yh(r,i,c,h,a)),(r=l[1])&&s.push(new yh(r,h,n,o,c)),(r=l[0])&&s.push(new yh(r,i,n,h,c))}return this},wh.visitAfter=function(t){var e,r=[],i=[];for(this._root&&r.push(new yh(this._root,this._x0,this._y0,this._x1,this._y1));e=r.pop();){var n=e.node;if(n.length){var o,a=e.x0,s=e.y0,l=e.x1,h=e.y1,c=(a+l)/2,u=(s+h)/2;(o=n[0])&&r.push(new yh(o,a,s,c,u)),(o=n[1])&&r.push(new yh(o,c,s,l,u)),(o=n[2])&&r.push(new yh(o,a,u,c,h)),(o=n[3])&&r.push(new yh(o,c,u,l,h))}i.push(e)}for(;e=i.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},wh.x=function(t){return arguments.length?(this._x=t,this):this._x},wh.y=function(t){return arguments.length?(this._y=t,this):this._y};const Eh=4294967296;function $h(t){return t.x}function Oh(t){return t.y}var Dh=Math.PI*(3-Math.sqrt(5));function Ih(t){var e,r=1,i=.001,n=1-Math.pow(i,1/300),o=0,a=.6,s=new Map,l=hn(u),h=ke("tick","end"),c=function(){let t=1;return()=>(t=(1664525*t+1013904223)%Eh)/Eh}();function u(){d(),h.call("tick",e),r<i&&(l.stop(),h.call("end",e))}function d(i){var l,h,c=t.length;void 0===i&&(i=1);for(var u=0;u<i;++u)for(r+=(o-r)*n,s.forEach(function(t){t(r)}),l=0;l<c;++l)null==(h=t[l]).fx?h.x+=h.vx*=a:(h.x=h.fx,h.vx=0),null==h.fy?h.y+=h.vy*=a:(h.y=h.fy,h.vy=0);return e}function f(){for(var e,r=0,i=t.length;r<i;++r){if((e=t[r]).index=r,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var n=10*Math.sqrt(.5+r),o=r*Dh;e.x=n*Math.cos(o),e.y=n*Math.sin(o)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function p(e){return e.initialize&&e.initialize(t,c),e}return null==t&&(t=[]),f(),e={tick:d,restart:function(){return l.restart(u),e},stop:function(){return l.stop(),e},nodes:function(r){return arguments.length?(t=r,f(),s.forEach(p),e):t},alpha:function(t){return arguments.length?(r=+t,e):r},alphaMin:function(t){return arguments.length?(i=+t,e):i},alphaDecay:function(t){return arguments.length?(n=+t,e):+n},alphaTarget:function(t){return arguments.length?(o=+t,e):o},velocityDecay:function(t){return arguments.length?(a=1-t,e):1-a},randomSource:function(t){return arguments.length?(c=t,s.forEach(p),e):c},force:function(t,r){return arguments.length>1?(null==r?s.delete(t):s.set(t,p(r)),e):s.get(t)},find:function(e,r,i){var n,o,a,s,l,h=0,c=t.length;for(null==i?i=1/0:i*=i,h=0;h<c;++h)(a=(n=e-(s=t[h]).x)*n+(o=r-s.y)*o)<i&&(l=s,i=a);return l},on:function(t,r){return arguments.length>1?(h.on(t,r),e):h.on(t)}}}function Nh(){var t,e,r,i,n,o=vh(-30),a=1,s=1/0,l=.81;function h(r){var n,o=t.length,a=Ch(t,$h,Oh).visitAfter(u);for(i=r,n=0;n<o;++n)e=t[n],a.visit(d)}function c(){if(t){var e,r,i=t.length;for(n=new Array(i),e=0;e<i;++e)r=t[e],n[r.index]=+o(r,e,t)}}function u(t){var e,r,i,o,a,s=0,l=0;if(t.length){for(i=o=a=0;a<4;++a)(e=t[a])&&(r=Math.abs(e.value))&&(s+=e.value,l+=r,i+=r*e.x,o+=r*e.y);t.x=i/l,t.y=o/l}else{(e=t).x=e.data.x,e.y=e.data.y;do{s+=n[e.data.index]}while(e=e.next)}t.value=s}function d(t,o,h,c){if(!t.value)return!0;var u=t.x-e.x,d=t.y-e.y,f=c-o,p=u*u+d*d;if(f*f/l<p)return p<s&&(0===u&&(p+=(u=Sh(r))*u),0===d&&(p+=(d=Sh(r))*d),p<a&&(p=Math.sqrt(a*p)),e.vx+=u*t.value*i/p,e.vy+=d*t.value*i/p),!0;if(!(t.length||p>=s)){(t.data!==e||t.next)&&(0===u&&(p+=(u=Sh(r))*u),0===d&&(p+=(d=Sh(r))*d),p<a&&(p=Math.sqrt(a*p)));do{t.data!==e&&(f=n[t.data.index]*i/p,e.vx+=u*f,e.vy+=d*f)}while(t=t.next)}}return h.initialize=function(e,i){t=e,r=i,c()},h.strength=function(t){return arguments.length?(o="function"==typeof t?t:vh(+t),c(),h):o},h.distanceMin=function(t){return arguments.length?(a=t*t,h):Math.sqrt(a)},h.distanceMax=function(t){return arguments.length?(s=t*t,h):Math.sqrt(s)},h.theta=function(t){return arguments.length?(l=t*t,h):Math.sqrt(l)},h}function Ph(t,e,r){var i,n,o,a=vh(.1);function s(t){for(var a=0,s=i.length;a<s;++a){var l=i[a],h=l.x-e||1e-6,c=l.y-r||1e-6,u=Math.sqrt(h*h+c*c),d=(o[a]-u)*n[a]*t/u;l.vx+=h*d,l.vy+=c*d}}function l(){if(i){var e,r=i.length;for(n=new Array(r),o=new Array(r),e=0;e<r;++e)o[e]=+t(i[e],e,i),n[e]=isNaN(o[e])?0:+a(i[e],e,i)}}return"function"!=typeof t&&(t=vh(+t)),null==e&&(e=0),null==r&&(r=0),s.initialize=function(t){i=t,l()},s.strength=function(t){return arguments.length?(a="function"==typeof t?t:vh(+t),l(),s):a},s.radius=function(e){return arguments.length?(t="function"==typeof e?e:vh(+e),l(),s):t},s.x=function(t){return arguments.length?(e=+t,s):e},s.y=function(t){return arguments.length?(r=+t,s):r},s}function qh(t){var e,r,i,n=vh(.1);function o(t){for(var n,o=0,a=e.length;o<a;++o)(n=e[o]).vx+=(i[o]-n.x)*r[o]*t}function a(){if(e){var o,a=e.length;for(r=new Array(a),i=new Array(a),o=0;o<a;++o)r[o]=isNaN(i[o]=+t(e[o],o,e))?0:+n(e[o],o,e)}}return"function"!=typeof t&&(t=vh(null==t?0:+t)),o.initialize=function(t){e=t,a()},o.strength=function(t){return arguments.length?(n="function"==typeof t?t:vh(+t),a(),o):n},o.x=function(e){return arguments.length?(t="function"==typeof e?e:vh(+e),a(),o):t},o}function zh(t){var e,r,i,n=vh(.1);function o(t){for(var n,o=0,a=e.length;o<a;++o)(n=e[o]).vy+=(i[o]-n.y)*r[o]*t}function a(){if(e){var o,a=e.length;for(r=new Array(a),i=new Array(a),o=0;o<a;++o)r[o]=isNaN(i[o]=+t(e[o],o,e))?0:+n(e[o],o,e)}}return"function"!=typeof t&&(t=vh(null==t?0:+t)),o.initialize=function(t){e=t,a()},o.strength=function(t){return arguments.length?(n="function"==typeof t?t:vh(+t),a(),o):n},o.y=function(e){return arguments.length?(t="function"==typeof e?e:vh(+e),a(),o):t},o}function Rh(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 jh(t){return(t=Rh(Math.abs(t)))?t[1]:NaN}var Wh,Hh=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Uh(t){if(!(e=Hh.exec(t)))throw new Error("invalid format: "+t);var e;return new Yh({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function Yh(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function Gh(t,e){var r=Rh(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")}Uh.prototype=Yh.prototype,Yh.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};const Vh={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},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)=>Gh(100*t,e),r:Gh,s:function(t,e){var r=Rh(t,e);if(!r)return t+"";var i=r[0],n=r[1],o=n-(Wh=3*Math.max(-8,Math.min(8,Math.floor(n/3))))+1,a=i.length;return o===a?i:o>a?i+new Array(o-a+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+new Array(1-o).join("0")+Rh(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Xh(t){return t}var Zh,Qh,Kh,Jh=Array.prototype.map,tc=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"];function ec(t){var e,r,i=void 0===t.grouping||void 0===t.thousands?Xh:(e=Jh.call(t.grouping,Number),r=t.thousands+"",function(t,i){for(var n=t.length,o=[],a=0,s=e[0],l=0;n>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),o.push(t.substring(n-=s,n+s)),!((l+=s+1)>i));)s=e[a=(a+1)%e.length];return o.reverse().join(r)}),n=void 0===t.currency?"":t.currency[0]+"",o=void 0===t.currency?"":t.currency[1]+"",a=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Xh:function(t){return function(e){return e.replace(/[0-9]/g,function(e){return t[+e]})}}(Jh.call(t.numerals,String)),l=void 0===t.percent?"%":t.percent+"",h=void 0===t.minus?"−":t.minus+"",c=void 0===t.nan?"NaN":t.nan+"";function u(t){var e=(t=Uh(t)).fill,r=t.align,u=t.sign,d=t.symbol,f=t.zero,p=t.width,g=t.comma,m=t.precision,y=t.trim,b=t.type;"n"===b?(g=!0,b="g"):Vh[b]||(void 0===m&&(m=12),y=!0,b="g"),(f||"0"===e&&"="===r)&&(f=!0,e="0",r="=");var x="$"===d?n:"#"===d&&/[boxX]/.test(b)?"0"+b.toLowerCase():"",C="$"===d?o:/[%p]/.test(b)?l:"",_=Vh[b],k=/[defgprs%]/.test(b);function w(t){var n,o,l,d=x,w=C;if("c"===b)w=_(t)+w,t="";else{var v=(t=+t)<0||1/t<0;if(t=isNaN(t)?c:_(Math.abs(t),m),y&&(t=function(t){t:for(var e,r=t.length,i=1,n=-1;i<r;++i)switch(t[i]){case".":n=e=i;break;case"0":0===n&&(n=i),e=i;break;default:if(!+t[i])break t;n>0&&(n=0)}return n>0?t.slice(0,n)+t.slice(e+1):t}(t)),v&&0===+t&&"+"!==u&&(v=!1),d=(v?"("===u?u:h:"-"===u||"("===u?"":u)+d,w=("s"===b?tc[8+Wh/3]:"")+w+(v&&"("===u?")":""),k)for(n=-1,o=t.length;++n<o;)if(48>(l=t.charCodeAt(n))||l>57){w=(46===l?a+t.slice(n+1):t.slice(n))+w,t=t.slice(0,n);break}}g&&!f&&(t=i(t,1/0));var S=d.length+t.length+w.length,T=S<p?new Array(p-S+1).join(e):"";switch(g&&f&&(t=i(T+t,T.length?p-w.length:1/0),T=""),r){case"<":t=d+t+w+T;break;case"=":t=d+T+t+w;break;case"^":t=T.slice(0,S=T.length>>1)+d+t+w+T.slice(S);break;default:t=T+d+t+w}return s(t)}return m=void 0===m?6:/[gprs]/.test(b)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),w.toString=function(){return t+""},w}return{format:u,formatPrefix:function(t,e){var r=u(((t=Uh(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(jh(e)/3))),n=Math.pow(10,-i),o=tc[8+i/3];return function(t){return r(n*t)+o}}}}function rc(t){return Zh=ec(t),Qh=Zh.format,Kh=Zh.formatPrefix,Zh}function ic(t){return Math.max(0,-jh(Math.abs(t)))}function nc(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(jh(e)/3)))-jh(Math.abs(t)))}function oc(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,jh(e)-jh(t))+1}rc({thousands:",",grouping:[3],currency:["$",""]});var ac=1e-6,sc=1e-12,lc=Math.PI,hc=lc/2,cc=lc/4,uc=2*lc,dc=180/lc,fc=lc/180,pc=Math.abs,gc=Math.atan,mc=Math.atan2,yc=Math.cos,bc=Math.ceil,xc=Math.exp,Cc=(Math.floor,Math.hypot),_c=Math.log,kc=Math.pow,wc=Math.sin,vc=Math.sign||function(t){return t>0?1:t<0?-1:0},Sc=Math.sqrt,Tc=Math.tan;function Bc(t){return t>1?0:t<-1?lc:Math.acos(t)}function Mc(t){return t>1?hc:t<-1?-hc:Math.asin(t)}function Lc(t){return(t=wc(t/2))*t}function Fc(){}function Ac(t,e){t&&$c.hasOwnProperty(t.type)&&$c[t.type](t,e)}var Ec={Feature:function(t,e){Ac(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,i=-1,n=r.length;++i<n;)Ac(r[i].geometry,e)}},$c={Sphere:function(t,e){e.sphere()},Point:function(t,e){t=t.coordinates,e.point(t[0],t[1],t[2])},MultiPoint:function(t,e){for(var r=t.coordinates,i=-1,n=r.length;++i<n;)t=r[i],e.point(t[0],t[1],t[2])},LineString:function(t,e){Oc(t.coordinates,e,0)},MultiLineString:function(t,e){for(var r=t.coordinates,i=-1,n=r.length;++i<n;)Oc(r[i],e,0)},Polygon:function(t,e){Dc(t.coordinates,e)},MultiPolygon:function(t,e){for(var r=t.coordinates,i=-1,n=r.length;++i<n;)Dc(r[i],e)},GeometryCollection:function(t,e){for(var r=t.geometries,i=-1,n=r.length;++i<n;)Ac(r[i],e)}};function Oc(t,e,r){var i,n=-1,o=t.length-r;for(e.lineStart();++n<o;)i=t[n],e.point(i[0],i[1],i[2]);e.lineEnd()}function Dc(t,e){var r=-1,i=t.length;for(e.polygonStart();++r<i;)Oc(t[r],e,1);e.polygonEnd()}function Ic(t,e){t&&Ec.hasOwnProperty(t.type)?Ec[t.type](t,e):Ac(t,e)}var Nc,Pc,qc,zc,Rc,jc,Wc,Hc,Uc,Yc,Gc,Vc,Xc,Zc,Qc,Kc,Jc=new L,tu=new L,eu={point:Fc,lineStart:Fc,lineEnd:Fc,polygonStart:function(){Jc=new L,eu.lineStart=ru,eu.lineEnd=iu},polygonEnd:function(){var t=+Jc;tu.add(t<0?uc+t:t),this.lineStart=this.lineEnd=this.point=Fc},sphere:function(){tu.add(uc)}};function ru(){eu.point=nu}function iu(){ou(Nc,Pc)}function nu(t,e){eu.point=ou,Nc=t,Pc=e,qc=t*=fc,zc=yc(e=(e*=fc)/2+cc),Rc=wc(e)}function ou(t,e){var r=(t*=fc)-qc,i=r>=0?1:-1,n=i*r,o=yc(e=(e*=fc)/2+cc),a=wc(e),s=Rc*a,l=zc*o+s*yc(n),h=s*i*wc(n);Jc.add(mc(h,l)),qc=t,zc=o,Rc=a}function au(t){return tu=new L,Ic(t,eu),2*tu}function su(t){return[mc(t[1],t[0]),Mc(t[2])]}function lu(t){var e=t[0],r=t[1],i=yc(r);return[i*yc(e),i*wc(e),wc(r)]}function hu(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function cu(t,e){return[t[1]*e[2]-t[2]*e[1],t[2]*e[0]-t[0]*e[2],t[0]*e[1]-t[1]*e[0]]}function uu(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function du(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function fu(t){var e=Sc(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var pu,gu,mu,yu,bu,xu,Cu,_u,ku,wu,vu,Su,Tu,Bu,Mu,Lu,Fu={point:Au,lineStart:$u,lineEnd:Ou,polygonStart:function(){Fu.point=Du,Fu.lineStart=Iu,Fu.lineEnd=Nu,Zc=new L,eu.polygonStart()},polygonEnd:function(){eu.polygonEnd(),Fu.point=Au,Fu.lineStart=$u,Fu.lineEnd=Ou,Jc<0?(jc=-(Hc=180),Wc=-(Uc=90)):Zc>ac?Uc=90:Zc<-1e-6&&(Wc=-90),Kc[0]=jc,Kc[1]=Hc},sphere:function(){jc=-(Hc=180),Wc=-(Uc=90)}};function Au(t,e){Qc.push(Kc=[jc=t,Hc=t]),e<Wc&&(Wc=e),e>Uc&&(Uc=e)}function Eu(t,e){var r=lu([t*fc,e*fc]);if(Xc){var i=cu(Xc,r),n=cu([i[1],-i[0],0],i);fu(n),n=su(n);var o,a=t-Yc,s=a>0?1:-1,l=n[0]*dc*s,h=pc(a)>180;h^(s*Yc<l&&l<s*t)?(o=n[1]*dc)>Uc&&(Uc=o):h^(s*Yc<(l=(l+360)%360-180)&&l<s*t)?(o=-n[1]*dc)<Wc&&(Wc=o):(e<Wc&&(Wc=e),e>Uc&&(Uc=e)),h?t<Yc?Pu(jc,t)>Pu(jc,Hc)&&(Hc=t):Pu(t,Hc)>Pu(jc,Hc)&&(jc=t):Hc>=jc?(t<jc&&(jc=t),t>Hc&&(Hc=t)):t>Yc?Pu(jc,t)>Pu(jc,Hc)&&(Hc=t):Pu(t,Hc)>Pu(jc,Hc)&&(jc=t)}else Qc.push(Kc=[jc=t,Hc=t]);e<Wc&&(Wc=e),e>Uc&&(Uc=e),Xc=r,Yc=t}function $u(){Fu.point=Eu}function Ou(){Kc[0]=jc,Kc[1]=Hc,Fu.point=Au,Xc=null}function Du(t,e){if(Xc){var r=t-Yc;Zc.add(pc(r)>180?r+(r>0?360:-360):r)}else Gc=t,Vc=e;eu.point(t,e),Eu(t,e)}function Iu(){eu.lineStart()}function Nu(){Du(Gc,Vc),eu.lineEnd(),pc(Zc)>ac&&(jc=-(Hc=180)),Kc[0]=jc,Kc[1]=Hc,Xc=null}function Pu(t,e){return(e-=t)<0?e+360:e}function qu(t,e){return t[0]-e[0]}function zu(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function Ru(t){var e,r,i,n,o,a,s;if(Uc=Hc=-(jc=Wc=1/0),Qc=[],Ic(t,Fu),r=Qc.length){for(Qc.sort(qu),e=1,o=[i=Qc[0]];e<r;++e)zu(i,(n=Qc[e])[0])||zu(i,n[1])?(Pu(i[0],n[1])>Pu(i[0],i[1])&&(i[1]=n[1]),Pu(n[0],i[1])>Pu(i[0],i[1])&&(i[0]=n[0])):o.push(i=n);for(a=-1/0,e=0,i=o[r=o.length-1];e<=r;i=n,++e)n=o[e],(s=Pu(i[1],n[0]))>a&&(a=s,jc=n[0],Hc=i[1])}return Qc=Kc=null,jc===1/0||Wc===1/0?[[NaN,NaN],[NaN,NaN]]:[[jc,Wc],[Hc,Uc]]}var ju={sphere:Fc,point:Wu,lineStart:Uu,lineEnd:Vu,polygonStart:function(){ju.lineStart=Xu,ju.lineEnd=Zu},polygonEnd:function(){ju.lineStart=Uu,ju.lineEnd=Vu}};function Wu(t,e){t*=fc;var r=yc(e*=fc);Hu(r*yc(t),r*wc(t),wc(e))}function Hu(t,e,r){++pu,mu+=(t-mu)/pu,yu+=(e-yu)/pu,bu+=(r-bu)/pu}function Uu(){ju.point=Yu}function Yu(t,e){t*=fc;var r=yc(e*=fc);Bu=r*yc(t),Mu=r*wc(t),Lu=wc(e),ju.point=Gu,Hu(Bu,Mu,Lu)}function Gu(t,e){t*=fc;var r=yc(e*=fc),i=r*yc(t),n=r*wc(t),o=wc(e),a=mc(Sc((a=Mu*o-Lu*n)*a+(a=Lu*i-Bu*o)*a+(a=Bu*n-Mu*i)*a),Bu*i+Mu*n+Lu*o);gu+=a,xu+=a*(Bu+(Bu=i)),Cu+=a*(Mu+(Mu=n)),_u+=a*(Lu+(Lu=o)),Hu(Bu,Mu,Lu)}function Vu(){ju.point=Wu}function Xu(){ju.point=Qu}function Zu(){Ku(Su,Tu),ju.point=Wu}function Qu(t,e){Su=t,Tu=e,t*=fc,e*=fc,ju.point=Ku;var r=yc(e);Bu=r*yc(t),Mu=r*wc(t),Lu=wc(e),Hu(Bu,Mu,Lu)}function Ku(t,e){t*=fc;var r=yc(e*=fc),i=r*yc(t),n=r*wc(t),o=wc(e),a=Mu*o-Lu*n,s=Lu*i-Bu*o,l=Bu*n-Mu*i,h=Cc(a,s,l),c=Mc(h),u=h&&-c/h;ku.add(u*a),wu.add(u*s),vu.add(u*l),gu+=c,xu+=c*(Bu+(Bu=i)),Cu+=c*(Mu+(Mu=n)),_u+=c*(Lu+(Lu=o)),Hu(Bu,Mu,Lu)}function Ju(t){pu=gu=mu=yu=bu=xu=Cu=_u=0,ku=new L,wu=new L,vu=new L,Ic(t,ju);var e=+ku,r=+wu,i=+vu,n=Cc(e,r,i);return n<sc&&(e=xu,r=Cu,i=_u,gu<ac&&(e=mu,r=yu,i=bu),(n=Cc(e,r,i))<sc)?[NaN,NaN]:[mc(r,e)*dc,Mc(i/n)*dc]}function td(t){return function(){return t}}function ed(t,e){function r(r,i){return r=t(r,i),e(r[0],r[1])}return t.invert&&e.invert&&(r.invert=function(r,i){return(r=e.invert(r,i))&&t.invert(r[0],r[1])}),r}function rd(t,e){return pc(t)>lc&&(t-=Math.round(t/uc)*uc),[t,e]}function id(t,e,r){return(t%=uc)?e||r?ed(od(t),ad(e,r)):od(t):e||r?ad(e,r):rd}function nd(t){return function(e,r){return pc(e+=t)>lc&&(e-=Math.round(e/uc)*uc),[e,r]}}function od(t){var e=nd(t);return e.invert=nd(-t),e}function ad(t,e){var r=yc(t),i=wc(t),n=yc(e),o=wc(e);function a(t,e){var a=yc(e),s=yc(t)*a,l=wc(t)*a,h=wc(e),c=h*r+s*i;return[mc(l*n-c*o,s*r-h*i),Mc(c*n+l*o)]}return a.invert=function(t,e){var a=yc(e),s=yc(t)*a,l=wc(t)*a,h=wc(e),c=h*n-l*o;return[mc(l*n+h*o,s*r+c*i),Mc(c*r-s*i)]},a}function sd(t){function e(e){return(e=t(e[0]*fc,e[1]*fc))[0]*=dc,e[1]*=dc,e}return t=id(t[0]*fc,t[1]*fc,t.length>2?t[2]*fc:0),e.invert=function(e){return(e=t.invert(e[0]*fc,e[1]*fc))[0]*=dc,e[1]*=dc,e},e}function ld(t,e,r,i,n,o){if(r){var a=yc(e),s=wc(e),l=i*r;null==n?(n=e+i*uc,o=e-l/2):(n=hd(a,n),o=hd(a,o),(i>0?n<o:n>o)&&(n+=i*uc));for(var h,c=n;i>0?c>o:c<o;c-=l)h=su([a,-s*yc(c),-s*wc(c)]),t.point(h[0],h[1])}}function hd(t,e){(e=lu(e))[0]-=t,fu(e);var r=Bc(-e[1]);return((-e[2]<0?-r:r)+uc-ac)%uc}function cd(){var t,e,r=td([0,0]),i=td(90),n=td(2),o={point:function(r,i){t.push(r=e(r,i)),r[0]*=dc,r[1]*=dc}};function a(){var a=r.apply(this,arguments),s=i.apply(this,arguments)*fc,l=n.apply(this,arguments)*fc;return t=[],e=id(-a[0]*fc,-a[1]*fc,0).invert,ld(o,s,l,1),a={type:"Polygon",coordinates:[t]},t=e=null,a}return a.center=function(t){return arguments.length?(r="function"==typeof t?t:td([+t[0],+t[1]]),a):r},a.radius=function(t){return arguments.length?(i="function"==typeof t?t:td(+t),a):i},a.precision=function(t){return arguments.length?(n="function"==typeof t?t:td(+t),a):n},a}function ud(){var t,e=[];return{point:function(e,r,i){t.push([e,r,i])},lineStart:function(){e.push(t=[])},lineEnd:Fc,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var r=e;return e=[],t=null,r}}}function dd(t,e){return pc(t[0]-e[0])<ac&&pc(t[1]-e[1])<ac}function fd(t,e,r,i){this.x=t,this.z=e,this.o=r,this.e=i,this.v=!1,this.n=this.p=null}function pd(t,e,r,i,n){var o,a,s=[],l=[];if(t.forEach(function(t){if(!((e=t.length-1)<=0)){var e,r,i=t[0],a=t[e];if(dd(i,a)){if(!i[2]&&!a[2]){for(n.lineStart(),o=0;o<e;++o)n.point((i=t[o])[0],i[1]);return void n.lineEnd()}a[0]+=2e-6}s.push(r=new fd(i,t,null,!0)),l.push(r.o=new fd(i,null,r,!1)),s.push(r=new fd(a,t,null,!1)),l.push(r.o=new fd(a,null,r,!0))}}),s.length){for(l.sort(e),gd(s),gd(l),o=0,a=l.length;o<a;++o)l[o].e=r=!r;for(var h,c,u=s[0];;){for(var d=u,f=!0;d.v;)if((d=d.n)===u)return;h=d.z,n.lineStart();do{if(d.v=d.o.v=!0,d.e){if(f)for(o=0,a=h.length;o<a;++o)n.point((c=h[o])[0],c[1]);else i(d.x,d.n.x,1,n);d=d.n}else{if(f)for(h=d.p.z,o=h.length-1;o>=0;--o)n.point((c=h[o])[0],c[1]);else i(d.x,d.p.x,-1,n);d=d.p}h=(d=d.o).z,f=!f}while(!d.v);n.lineEnd()}}}function gd(t){if(e=t.length){for(var e,r,i=0,n=t[0];++i<e;)n.n=r=t[i],r.p=n,n=r;n.n=r=t[0],r.p=n}}function md(t){return pc(t[0])<=lc?t[0]:vc(t[0])*((pc(t[0])+lc)%uc-lc)}function yd(t,e){var r=md(e),i=e[1],n=wc(i),o=[wc(r),-yc(r),0],a=0,s=0,l=new L;1===n?i=hc+ac:-1===n&&(i=-hc-ac);for(var h=0,c=t.length;h<c;++h)if(d=(u=t[h]).length)for(var u,d,f=u[d-1],p=md(f),g=f[1]/2+cc,m=wc(g),y=yc(g),b=0;b<d;++b,p=C,m=k,y=w,f=x){var x=u[b],C=md(x),_=x[1]/2+cc,k=wc(_),w=yc(_),v=C-p,S=v>=0?1:-1,T=S*v,B=T>lc,M=m*k;if(l.add(mc(M*S*wc(T),y*w+M*yc(T))),a+=B?v+S*uc:v,B^p>=r^C>=r){var F=cu(lu(f),lu(x));fu(F);var A=cu(o,F);fu(A);var E=(B^v>=0?-1:1)*Mc(A[2]);(i>E||i===E&&(F[0]||F[1]))&&(s+=B^v>=0?1:-1)}}return(a<-1e-6||a<ac&&l<-1e-12)^1&s}function bd(t,e,r,i){return function(n){var o,a,s,l=e(n),h=ud(),c=e(h),u=!1,d={point:f,lineStart:g,lineEnd:m,polygonStart:function(){d.point=y,d.lineStart=b,d.lineEnd=x,a=[],o=[]},polygonEnd:function(){d.point=f,d.lineStart=g,d.lineEnd=m,a=Lt(a);var t=yd(o,i);a.length?(u||(n.polygonStart(),u=!0),pd(a,Cd,t,r,n)):t&&(u||(n.polygonStart(),u=!0),n.lineStart(),r(null,null,1,n),n.lineEnd()),u&&(n.polygonEnd(),u=!1),a=o=null},sphere:function(){n.polygonStart(),n.lineStart(),r(null,null,1,n),n.lineEnd(),n.polygonEnd()}};function f(e,r){t(e,r)&&n.point(e,r)}function p(t,e){l.point(t,e)}function g(){d.point=p,l.lineStart()}function m(){d.point=f,l.lineEnd()}function y(t,e){s.push([t,e]),c.point(t,e)}function b(){c.lineStart(),s=[]}function x(){y(s[0][0],s[0][1]),c.lineEnd();var t,e,r,i,l=c.clean(),d=h.result(),f=d.length;if(s.pop(),o.push(s),s=null,f)if(1&l){if((e=(r=d[0]).length-1)>0){for(u||(n.polygonStart(),u=!0),n.lineStart(),t=0;t<e;++t)n.point((i=r[t])[0],i[1]);n.lineEnd()}}else f>1&&2&l&&d.push(d.pop().concat(d.shift())),a.push(d.filter(xd))}return d}}function xd(t){return t.length>1}function Cd(t,e){return((t=t.x)[0]<0?t[1]-hc-ac:hc-t[1])-((e=e.x)[0]<0?e[1]-hc-ac:hc-e[1])}rd.invert=rd;const _d=bd(function(){return!0},function(t){var e,r=NaN,i=NaN,n=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(o,a){var s=o>0?lc:-lc,l=pc(o-r);pc(l-lc)<ac?(t.point(r,i=(i+a)/2>0?hc:-hc),t.point(n,i),t.lineEnd(),t.lineStart(),t.point(s,i),t.point(o,i),e=0):n!==s&&l>=lc&&(pc(r-n)<ac&&(r-=n*ac),pc(o-s)<ac&&(o-=s*ac),i=function(t,e,r,i){var n,o,a=wc(t-r);return pc(a)>ac?gc((wc(e)*(o=yc(i))*wc(r)-wc(i)*(n=yc(e))*wc(t))/(n*o*a)):(e+i)/2}(r,i,o,a),t.point(n,i),t.lineEnd(),t.lineStart(),t.point(s,i),e=0),t.point(r=o,i=a),n=s},lineEnd:function(){t.lineEnd(),r=i=NaN},clean:function(){return 2-e}}},function(t,e,r,i){var n;if(null==t)n=r*hc,i.point(-lc,n),i.point(0,n),i.point(lc,n),i.point(lc,0),i.point(lc,-n),i.point(0,-n),i.point(-lc,-n),i.point(-lc,0),i.point(-lc,n);else if(pc(t[0]-e[0])>ac){var o=t[0]<e[0]?lc:-lc;n=r*o/2,i.point(-o,n),i.point(0,n),i.point(o,n)}else i.point(e[0],e[1])},[-lc,-hc]);function kd(t){var e=yc(t),r=2*fc,i=e>0,n=pc(e)>ac;function o(t,r){return yc(t)*yc(r)>e}function a(t,r,i){var n=[1,0,0],o=cu(lu(t),lu(r)),a=hu(o,o),s=o[0],l=a-s*s;if(!l)return!i&&t;var h=e*a/l,c=-e*s/l,u=cu(n,o),d=du(n,h);uu(d,du(o,c));var f=u,p=hu(d,f),g=hu(f,f),m=p*p-g*(hu(d,d)-1);if(!(m<0)){var y=Sc(m),b=du(f,(-p-y)/g);if(uu(b,d),b=su(b),!i)return b;var x,C=t[0],_=r[0],k=t[1],w=r[1];_<C&&(x=C,C=_,_=x);var v=_-C,S=pc(v-lc)<ac;if(!S&&w<k&&(x=k,k=w,w=x),S||v<ac?S?k+w>0^b[1]<(pc(b[0]-C)<ac?k:w):k<=b[1]&&b[1]<=w:v>lc^(C<=b[0]&&b[0]<=_)){var T=du(f,(-p+y)/g);return uu(T,d),[b,su(T)]}}}function s(e,r){var n=i?t:lc-t,o=0;return e<-n?o|=1:e>n&&(o|=2),r<-n?o|=4:r>n&&(o|=8),o}return bd(o,function(t){var e,r,l,h,c;return{lineStart:function(){h=l=!1,c=1},point:function(u,d){var f,p=[u,d],g=o(u,d),m=i?g?0:s(u,d):g?s(u+(u<0?lc:-lc),d):0;if(!e&&(h=l=g)&&t.lineStart(),g!==l&&(!(f=a(e,p))||dd(e,f)||dd(p,f))&&(p[2]=1),g!==l)c=0,g?(t.lineStart(),f=a(p,e),t.point(f[0],f[1])):(f=a(e,p),t.point(f[0],f[1],2),t.lineEnd()),e=f;else if(n&&e&&i^g){var y;m&r||!(y=a(p,e,!0))||(c=0,i?(t.lineStart(),t.point(y[0][0],y[0][1]),t.point(y[1][0],y[1][1]),t.lineEnd()):(t.point(y[1][0],y[1][1]),t.lineEnd(),t.lineStart(),t.point(y[0][0],y[0][1],3)))}!g||e&&dd(e,p)||t.point(p[0],p[1]),e=p,l=g,r=m},lineEnd:function(){l&&t.lineEnd(),e=null},clean:function(){return c|(h&&l)<<1}}},function(e,i,n,o){ld(o,t,r,n,e,i)},i?[0,-t]:[-lc,t-lc])}var wd,vd,Sd,Td,Bd=1e9,Md=-Bd;function Ld(t,e,r,i){function n(n,o){return t<=n&&n<=r&&e<=o&&o<=i}function o(n,o,s,h){var c=0,u=0;if(null==n||(c=a(n,s))!==(u=a(o,s))||l(n,o)<0^s>0)do{h.point(0===c||3===c?t:r,c>1?i:e)}while((c=(c+s+4)%4)!==u);else h.point(o[0],o[1])}function a(i,n){return pc(i[0]-t)<ac?n>0?0:3:pc(i[0]-r)<ac?n>0?2:1:pc(i[1]-e)<ac?n>0?1:0:n>0?3:2}function s(t,e){return l(t.x,e.x)}function l(t,e){var r=a(t,1),i=a(e,1);return r!==i?r-i:0===r?e[1]-t[1]:1===r?t[0]-e[0]:2===r?t[1]-e[1]:e[0]-t[0]}return function(a){var l,h,c,u,d,f,p,g,m,y,b,x=a,C=ud(),_={point:k,lineStart:function(){_.point=w,h&&h.push(c=[]),y=!0,m=!1,p=g=NaN},lineEnd:function(){l&&(w(u,d),f&&m&&C.rejoin(),l.push(C.result())),_.point=k,m&&x.lineEnd()},polygonStart:function(){x=C,l=[],h=[],b=!0},polygonEnd:function(){var e=function(){for(var e=0,r=0,n=h.length;r<n;++r)for(var o,a,s=h[r],l=1,c=s.length,u=s[0],d=u[0],f=u[1];l<c;++l)o=d,a=f,d=(u=s[l])[0],f=u[1],a<=i?f>i&&(d-o)*(i-a)>(f-a)*(t-o)&&++e:f<=i&&(d-o)*(i-a)<(f-a)*(t-o)&&--e;return e}(),r=b&&e,n=(l=Lt(l)).length;(r||n)&&(a.polygonStart(),r&&(a.lineStart(),o(null,null,1,a),a.lineEnd()),n&&pd(l,s,e,o,a),a.polygonEnd()),x=a,l=h=c=null}};function k(t,e){n(t,e)&&x.point(t,e)}function w(o,a){var s=n(o,a);if(h&&c.push([o,a]),y)u=o,d=a,f=s,y=!1,s&&(x.lineStart(),x.point(o,a));else if(s&&m)x.point(o,a);else{var l=[p=Math.max(Md,Math.min(Bd,p)),g=Math.max(Md,Math.min(Bd,g))],C=[o=Math.max(Md,Math.min(Bd,o)),a=Math.max(Md,Math.min(Bd,a))];!function(t,e,r,i,n,o){var a,s=t[0],l=t[1],h=0,c=1,u=e[0]-s,d=e[1]-l;if(a=r-s,u||!(a>0)){if(a/=u,u<0){if(a<h)return;a<c&&(c=a)}else if(u>0){if(a>c)return;a>h&&(h=a)}if(a=n-s,u||!(a<0)){if(a/=u,u<0){if(a>c)return;a>h&&(h=a)}else if(u>0){if(a<h)return;a<c&&(c=a)}if(a=i-l,d||!(a>0)){if(a/=d,d<0){if(a<h)return;a<c&&(c=a)}else if(d>0){if(a>c)return;a>h&&(h=a)}if(a=o-l,d||!(a<0)){if(a/=d,d<0){if(a>c)return;a>h&&(h=a)}else if(d>0){if(a<h)return;a<c&&(c=a)}return h>0&&(t[0]=s+h*u,t[1]=l+h*d),c<1&&(e[0]=s+c*u,e[1]=l+c*d),!0}}}}}(l,C,t,e,r,i)?s&&(x.lineStart(),x.point(o,a),b=!1):(m||(x.lineStart(),x.point(l[0],l[1])),x.point(C[0],C[1]),s||x.lineEnd(),b=!1)}p=o,g=a,m=s}return _}}function Fd(){var t,e,r,i=0,n=0,o=960,a=500;return r={stream:function(r){return t&&e===r?t:t=Ld(i,n,o,a)(e=r)},extent:function(s){return arguments.length?(i=+s[0][0],n=+s[0][1],o=+s[1][0],a=+s[1][1],t=e=null,r):[[i,n],[o,a]]}}}var Ad={sphere:Fc,point:Fc,lineStart:function(){Ad.point=$d,Ad.lineEnd=Ed},lineEnd:Fc,polygonStart:Fc,polygonEnd:Fc};function Ed(){Ad.point=Ad.lineEnd=Fc}function $d(t,e){vd=t*=fc,Sd=wc(e*=fc),Td=yc(e),Ad.point=Od}function Od(t,e){t*=fc;var r=wc(e*=fc),i=yc(e),n=pc(t-vd),o=yc(n),a=i*wc(n),s=Td*r-Sd*i*o,l=Sd*r+Td*i*o;wd.add(mc(Sc(a*a+s*s),l)),vd=t,Sd=r,Td=i}function Dd(t){return wd=new L,Ic(t,Ad),+wd}var Id=[null,null],Nd={type:"LineString",coordinates:Id};function Pd(t,e){return Id[0]=t,Id[1]=e,Dd(Nd)}var qd={Feature:function(t,e){return Rd(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,i=-1,n=r.length;++i<n;)if(Rd(r[i].geometry,e))return!0;return!1}},zd={Sphere:function(){return!0},Point:function(t,e){return jd(t.coordinates,e)},MultiPoint:function(t,e){for(var r=t.coordinates,i=-1,n=r.length;++i<n;)if(jd(r[i],e))return!0;return!1},LineString:function(t,e){return Wd(t.coordinates,e)},MultiLineString:function(t,e){for(var r=t.coordinates,i=-1,n=r.length;++i<n;)if(Wd(r[i],e))return!0;return!1},Polygon:function(t,e){return Hd(t.coordinates,e)},MultiPolygon:function(t,e){for(var r=t.coordinates,i=-1,n=r.length;++i<n;)if(Hd(r[i],e))return!0;return!1},GeometryCollection:function(t,e){for(var r=t.geometries,i=-1,n=r.length;++i<n;)if(Rd(r[i],e))return!0;return!1}};function Rd(t,e){return!(!t||!zd.hasOwnProperty(t.type))&&zd[t.type](t,e)}function jd(t,e){return 0===Pd(t,e)}function Wd(t,e){for(var r,i,n,o=0,a=t.length;o<a;o++){if(0===(i=Pd(t[o],e)))return!0;if(o>0&&(n=Pd(t[o],t[o-1]))>0&&r<=n&&i<=n&&(r+i-n)*(1-Math.pow((r-i)/n,2))<sc*n)return!0;r=i}return!1}function Hd(t,e){return!!yd(t.map(Ud),Yd(e))}function Ud(t){return(t=t.map(Yd)).pop(),t}function Yd(t){return[t[0]*fc,t[1]*fc]}function Gd(t,e){return(t&&qd.hasOwnProperty(t.type)?qd[t.type]:Rd)(t,e)}function Vd(t,e,r){var i=$t(t,e-ac,r).concat(e);return function(t){return i.map(function(e){return[t,e]})}}function Xd(t,e,r){var i=$t(t,e-ac,r).concat(e);return function(t){return i.map(function(e){return[e,t]})}}function Zd(){var t,e,r,i,n,o,a,s,l,h,c,u,d=10,f=d,p=90,g=360,m=2.5;function y(){return{type:"MultiLineString",coordinates:b()}}function b(){return $t(bc(i/p)*p,r,p).map(c).concat($t(bc(s/g)*g,a,g).map(u)).concat($t(bc(e/d)*d,t,d).filter(function(t){return pc(t%p)>ac}).map(l)).concat($t(bc(o/f)*f,n,f).filter(function(t){return pc(t%g)>ac}).map(h))}return y.lines=function(){return b().map(function(t){return{type:"LineString",coordinates:t}})},y.outline=function(){return{type:"Polygon",coordinates:[c(i).concat(u(a).slice(1),c(r).reverse().slice(1),u(s).reverse().slice(1))]}},y.extent=function(t){return arguments.length?y.extentMajor(t).extentMinor(t):y.extentMinor()},y.extentMajor=function(t){return arguments.length?(i=+t[0][0],r=+t[1][0],s=+t[0][1],a=+t[1][1],i>r&&(t=i,i=r,r=t),s>a&&(t=s,s=a,a=t),y.precision(m)):[[i,s],[r,a]]},y.extentMinor=function(r){return arguments.length?(e=+r[0][0],t=+r[1][0],o=+r[0][1],n=+r[1][1],e>t&&(r=e,e=t,t=r),o>n&&(r=o,o=n,n=r),y.precision(m)):[[e,o],[t,n]]},y.step=function(t){return arguments.length?y.stepMajor(t).stepMinor(t):y.stepMinor()},y.stepMajor=function(t){return arguments.length?(p=+t[0],g=+t[1],y):[p,g]},y.stepMinor=function(t){return arguments.length?(d=+t[0],f=+t[1],y):[d,f]},y.precision=function(d){return arguments.length?(m=+d,l=Vd(o,n,90),h=Xd(e,t,m),c=Vd(s,a,90),u=Xd(i,r,m),y):m},y.extentMajor([[-180,-89.999999],[180,89.999999]]).extentMinor([[-180,-80.000001],[180,80.000001]])}function Qd(){return Zd()()}function Kd(t,e){var r=t[0]*fc,i=t[1]*fc,n=e[0]*fc,o=e[1]*fc,a=yc(i),s=wc(i),l=yc(o),h=wc(o),c=a*yc(r),u=a*wc(r),d=l*yc(n),f=l*wc(n),p=2*Mc(Sc(Lc(o-i)+a*l*Lc(n-r))),g=wc(p),m=p?function(t){var e=wc(t*=p)/g,r=wc(p-t)/g,i=r*c+e*d,n=r*u+e*f,o=r*s+e*h;return[mc(n,i)*dc,mc(o,Sc(i*i+n*n))*dc]}:function(){return[r*dc,i*dc]};return m.distance=p,m}const Jd=t=>t;var tf,ef,rf,nf,of=new L,af=new L,sf={point:Fc,lineStart:Fc,lineEnd:Fc,polygonStart:function(){sf.lineStart=lf,sf.lineEnd=uf},polygonEnd:function(){sf.lineStart=sf.lineEnd=sf.point=Fc,of.add(pc(af)),af=new L},result:function(){var t=of/2;return of=new L,t}};function lf(){sf.point=hf}function hf(t,e){sf.point=cf,tf=rf=t,ef=nf=e}function cf(t,e){af.add(nf*t-rf*e),rf=t,nf=e}function uf(){cf(tf,ef)}const df=sf;var ff=1/0,pf=ff,gf=-ff,mf=gf,yf={point:function(t,e){t<ff&&(ff=t),t>gf&&(gf=t),e<pf&&(pf=e),e>mf&&(mf=e)},lineStart:Fc,lineEnd:Fc,polygonStart:Fc,polygonEnd:Fc,result:function(){var t=[[ff,pf],[gf,mf]];return gf=mf=-(pf=ff=1/0),t}};const bf=yf;var xf,Cf,_f,kf,wf=0,vf=0,Sf=0,Tf=0,Bf=0,Mf=0,Lf=0,Ff=0,Af=0,Ef={point:$f,lineStart:Of,lineEnd:Nf,polygonStart:function(){Ef.lineStart=Pf,Ef.lineEnd=qf},polygonEnd:function(){Ef.point=$f,Ef.lineStart=Of,Ef.lineEnd=Nf},result:function(){var t=Af?[Lf/Af,Ff/Af]:Mf?[Tf/Mf,Bf/Mf]:Sf?[wf/Sf,vf/Sf]:[NaN,NaN];return wf=vf=Sf=Tf=Bf=Mf=Lf=Ff=Af=0,t}};function $f(t,e){wf+=t,vf+=e,++Sf}function Of(){Ef.point=Df}function Df(t,e){Ef.point=If,$f(_f=t,kf=e)}function If(t,e){var r=t-_f,i=e-kf,n=Sc(r*r+i*i);Tf+=n*(_f+t)/2,Bf+=n*(kf+e)/2,Mf+=n,$f(_f=t,kf=e)}function Nf(){Ef.point=$f}function Pf(){Ef.point=zf}function qf(){Rf(xf,Cf)}function zf(t,e){Ef.point=Rf,$f(xf=_f=t,Cf=kf=e)}function Rf(t,e){var r=t-_f,i=e-kf,n=Sc(r*r+i*i);Tf+=n*(_f+t)/2,Bf+=n*(kf+e)/2,Mf+=n,Lf+=(n=kf*t-_f*e)*(_f+t),Ff+=n*(kf+e),Af+=3*n,$f(_f=t,kf=e)}const jf=Ef;function Wf(t){this._context=t}Wf.prototype={_radius:4.5,pointRadius:function(t){return this._radius=t,this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._context.closePath(),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._context.moveTo(t,e),this._point=1;break;case 1:this._context.lineTo(t,e);break;default:this._context.moveTo(t+this._radius,e),this._context.arc(t,e,this._radius,0,uc)}},result:Fc};var Hf,Uf,Yf,Gf,Vf,Xf=new L,Zf={point:Fc,lineStart:function(){Zf.point=Qf},lineEnd:function(){Hf&&Kf(Uf,Yf),Zf.point=Fc},polygonStart:function(){Hf=!0},polygonEnd:function(){Hf=null},result:function(){var t=+Xf;return Xf=new L,t}};function Qf(t,e){Zf.point=Kf,Uf=Gf=t,Yf=Vf=e}function Kf(t,e){Gf-=t,Vf-=e,Xf.add(Sc(Gf*Gf+Vf*Vf)),Gf=t,Vf=e}const Jf=Zf;let tp,ep,rp,ip;class np{constructor(t){this._append=null==t?op:function(t){const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);if(e>15)return op;if(e!==tp){const t=10**e;tp=e,ep=function(e){let r=1;this._+=e[0];for(const i=e.length;r<i;++r)this._+=Math.round(arguments[r]*t)/t+e[r]}}return ep}(t),this._radius=4.5,this._=""}pointRadius(t){return this._radius=+t,this}polygonStart(){this._line=0}polygonEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){0===this._line&&(this._+="Z"),this._point=NaN}point(t,e){switch(this._point){case 0:this._append`M${t},${e}`,this._point=1;break;case 1:this._append`L${t},${e}`;break;default:if(this._append`M${t},${e}`,this._radius!==rp||this._append!==ep){const t=this._radius,e=this._;this._="",this._append`m0,${t}a${t},${t} 0 1,1 0,${-2*t}a${t},${t} 0 1,1 0,${2*t}z`,rp=t,ep=this._append,ip=this._,this._=e}this._+=ip}}result(){const t=this._;return this._="",t.length?t:null}}function op(t){let e=1;this._+=t[0];for(const r=t.length;e<r;++e)this._+=arguments[e]+t[e]}function ap(t,e){let r,i,n=3,o=4.5;function a(t){return t&&("function"==typeof o&&i.pointRadius(+o.apply(this,arguments)),Ic(t,r(i))),i.result()}return a.area=function(t){return Ic(t,r(df)),df.result()},a.measure=function(t){return Ic(t,r(Jf)),Jf.result()},a.bounds=function(t){return Ic(t,r(bf)),bf.result()},a.centroid=function(t){return Ic(t,r(jf)),jf.result()},a.projection=function(e){return arguments.length?(r=null==e?(t=null,Jd):(t=e).stream,a):t},a.context=function(t){return arguments.length?(i=null==t?(e=null,new np(n)):new Wf(e=t),"function"!=typeof o&&i.pointRadius(o),a):e},a.pointRadius=function(t){return arguments.length?(o="function"==typeof t?t:(i.pointRadius(+t),+t),a):o},a.digits=function(t){if(!arguments.length)return n;if(null==t)n=null;else{const e=Math.floor(t);if(!(e>=0))throw new RangeError(`invalid digits: ${t}`);n=e}return null===e&&(i=new np(n)),a},a.projection(t).digits(n).context(e)}function sp(t){return{stream:lp(t)}}function lp(t){return function(e){var r=new hp;for(var i in t)r[i]=t[i];return r.stream=e,r}}function hp(){}function cp(t,e,r){var i=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=i&&t.clipExtent(null),Ic(r,t.stream(bf)),e(bf.result()),null!=i&&t.clipExtent(i),t}function up(t,e,r){return cp(t,function(r){var i=e[1][0]-e[0][0],n=e[1][1]-e[0][1],o=Math.min(i/(r[1][0]-r[0][0]),n/(r[1][1]-r[0][1])),a=+e[0][0]+(i-o*(r[1][0]+r[0][0]))/2,s=+e[0][1]+(n-o*(r[1][1]+r[0][1]))/2;t.scale(150*o).translate([a,s])},r)}function dp(t,e,r){return up(t,[[0,0],e],r)}function fp(t,e,r){return cp(t,function(r){var i=+e,n=i/(r[1][0]-r[0][0]),o=(i-n*(r[1][0]+r[0][0]))/2,a=-n*r[0][1];t.scale(150*n).translate([o,a])},r)}function pp(t,e,r){return cp(t,function(r){var i=+e,n=i/(r[1][1]-r[0][1]),o=-n*r[0][0],a=(i-n*(r[1][1]+r[0][1]))/2;t.scale(150*n).translate([o,a])},r)}hp.prototype={constructor:hp,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}};var gp=yc(30*fc);function mp(t,e){return+e?function(t,e){function r(i,n,o,a,s,l,h,c,u,d,f,p,g,m){var y=h-i,b=c-n,x=y*y+b*b;if(x>4*e&&g--){var C=a+d,_=s+f,k=l+p,w=Sc(C*C+_*_+k*k),v=Mc(k/=w),S=pc(pc(k)-1)<ac||pc(o-u)<ac?(o+u)/2:mc(_,C),T=t(S,v),B=T[0],M=T[1],L=B-i,F=M-n,A=b*L-y*F;(A*A/x>e||pc((y*L+b*F)/x-.5)>.3||a*d+s*f+l*p<gp)&&(r(i,n,o,a,s,l,B,M,S,C/=w,_/=w,k,g,m),m.point(B,M),r(B,M,S,C,_,k,h,c,u,d,f,p,g,m))}}return function(e){var i,n,o,a,s,l,h,c,u,d,f,p,g={point:m,lineStart:y,lineEnd:x,polygonStart:function(){e.polygonStart(),g.lineStart=C},polygonEnd:function(){e.polygonEnd(),g.lineStart=y}};function m(r,i){r=t(r,i),e.point(r[0],r[1])}function y(){c=NaN,g.point=b,e.lineStart()}function b(i,n){var o=lu([i,n]),a=t(i,n);r(c,u,h,d,f,p,c=a[0],u=a[1],h=i,d=o[0],f=o[1],p=o[2],16,e),e.point(c,u)}function x(){g.point=m,e.lineEnd()}function C(){y(),g.point=_,g.lineEnd=k}function _(t,e){b(i=t,e),n=c,o=u,a=d,s=f,l=p,g.point=b}function k(){r(c,u,h,d,f,p,n,o,i,a,s,l,16,e),g.lineEnd=x,x()}return g}}(t,e):function(t){return lp({point:function(e,r){e=t(e,r),this.stream.point(e[0],e[1])}})}(t)}var yp=lp({point:function(t,e){this.stream.point(t*fc,e*fc)}});function bp(t,e,r,i,n,o){if(!o)return function(t,e,r,i,n){function o(o,a){return[e+t*(o*=i),r-t*(a*=n)]}return o.invert=function(o,a){return[(o-e)/t*i,(r-a)/t*n]},o}(t,e,r,i,n);var a=yc(o),s=wc(o),l=a*t,h=s*t,c=a/t,u=s/t,d=(s*r-a*e)/t,f=(s*e+a*r)/t;function p(t,o){return[l*(t*=i)-h*(o*=n)+e,r-h*t-l*o]}return p.invert=function(t,e){return[i*(c*t-u*e+d),n*(f-u*t-c*e)]},p}function xp(t){return Cp(function(){return t})()}function Cp(t){var e,r,i,n,o,a,s,l,h,c,u=150,d=480,f=250,p=0,g=0,m=0,y=0,b=0,x=0,C=1,_=1,k=null,w=_d,v=null,S=Jd,T=.5;function B(t){return l(t[0]*fc,t[1]*fc)}function M(t){return(t=l.invert(t[0],t[1]))&&[t[0]*dc,t[1]*dc]}function L(){var t=bp(u,0,0,C,_,x).apply(null,e(p,g)),i=bp(u,d-t[0],f-t[1],C,_,x);return r=id(m,y,b),s=ed(e,i),l=ed(r,s),a=mp(s,T),F()}function F(){return h=c=null,B}return B.stream=function(t){return h&&c===t?h:h=yp(function(t){return lp({point:function(e,r){var i=t(e,r);return this.stream.point(i[0],i[1])}})}(r)(w(a(S(c=t)))))},B.preclip=function(t){return arguments.length?(w=t,k=void 0,F()):w},B.postclip=function(t){return arguments.length?(S=t,v=i=n=o=null,F()):S},B.clipAngle=function(t){return arguments.length?(w=+t?kd(k=t*fc):(k=null,_d),F()):k*dc},B.clipExtent=function(t){return arguments.length?(S=null==t?(v=i=n=o=null,Jd):Ld(v=+t[0][0],i=+t[0][1],n=+t[1][0],o=+t[1][1]),F()):null==v?null:[[v,i],[n,o]]},B.scale=function(t){return arguments.length?(u=+t,L()):u},B.translate=function(t){return arguments.length?(d=+t[0],f=+t[1],L()):[d,f]},B.center=function(t){return arguments.length?(p=t[0]%360*fc,g=t[1]%360*fc,L()):[p*dc,g*dc]},B.rotate=function(t){return arguments.length?(m=t[0]%360*fc,y=t[1]%360*fc,b=t.length>2?t[2]%360*fc:0,L()):[m*dc,y*dc,b*dc]},B.angle=function(t){return arguments.length?(x=t%360*fc,L()):x*dc},B.reflectX=function(t){return arguments.length?(C=t?-1:1,L()):C<0},B.reflectY=function(t){return arguments.length?(_=t?-1:1,L()):_<0},B.precision=function(t){return arguments.length?(a=mp(s,T=t*t),F()):Sc(T)},B.fitExtent=function(t,e){return up(B,t,e)},B.fitSize=function(t,e){return dp(B,t,e)},B.fitWidth=function(t,e){return fp(B,t,e)},B.fitHeight=function(t,e){return pp(B,t,e)},function(){return e=t.apply(this,arguments),B.invert=e.invert&&M,L()}}function _p(t){var e=0,r=lc/3,i=Cp(t),n=i(e,r);return n.parallels=function(t){return arguments.length?i(e=t[0]*fc,r=t[1]*fc):[e*dc,r*dc]},n}function kp(t,e){var r=wc(t),i=(r+wc(e))/2;if(pc(i)<ac)return function(t){var e=yc(t);function r(t,r){return[t*e,wc(r)/e]}return r.invert=function(t,r){return[t/e,Mc(r*e)]},r}(t);var n=1+r*(2*i-r),o=Sc(n)/i;function a(t,e){var r=Sc(n-2*i*wc(e))/i;return[r*wc(t*=i),o-r*yc(t)]}return a.invert=function(t,e){var r=o-e,a=mc(t,pc(r))*vc(r);return r*i<0&&(a-=lc*vc(t)*vc(r)),[a/i,Mc((n-(t*t+r*r)*i*i)/(2*i))]},a}function wp(){return _p(kp).scale(155.424).center([0,33.6442])}function vp(){return wp().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function Sp(){var t,e,r,i,n,o,a=vp(),s=wp().rotate([154,0]).center([-2,58.5]).parallels([55,65]),l=wp().rotate([157,0]).center([-3,19.9]).parallels([8,18]),h={point:function(t,e){o=[t,e]}};function c(t){var e=t[0],a=t[1];return o=null,r.point(e,a),o||(i.point(e,a),o)||(n.point(e,a),o)}function u(){return t=e=null,c}return c.invert=function(t){var e=a.scale(),r=a.translate(),i=(t[0]-r[0])/e,n=(t[1]-r[1])/e;return(n>=.12&&n<.234&&i>=-.425&&i<-.214?s:n>=.166&&n<.234&&i>=-.214&&i<-.115?l:a).invert(t)},c.stream=function(r){return t&&e===r?t:(i=[a.stream(e=r),s.stream(r),l.stream(r)],n=i.length,t={point:function(t,e){for(var r=-1;++r<n;)i[r].point(t,e)},sphere:function(){for(var t=-1;++t<n;)i[t].sphere()},lineStart:function(){for(var t=-1;++t<n;)i[t].lineStart()},lineEnd:function(){for(var t=-1;++t<n;)i[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<n;)i[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<n;)i[t].polygonEnd()}});var i,n},c.precision=function(t){return arguments.length?(a.precision(t),s.precision(t),l.precision(t),u()):a.precision()},c.scale=function(t){return arguments.length?(a.scale(t),s.scale(.35*t),l.scale(t),c.translate(a.translate())):a.scale()},c.translate=function(t){if(!arguments.length)return a.translate();var e=a.scale(),o=+t[0],c=+t[1];return r=a.translate(t).clipExtent([[o-.455*e,c-.238*e],[o+.455*e,c+.238*e]]).stream(h),i=s.translate([o-.307*e,c+.201*e]).clipExtent([[o-.425*e+ac,c+.12*e+ac],[o-.214*e-ac,c+.234*e-ac]]).stream(h),n=l.translate([o-.205*e,c+.212*e]).clipExtent([[o-.214*e+ac,c+.166*e+ac],[o-.115*e-ac,c+.234*e-ac]]).stream(h),u()},c.fitExtent=function(t,e){return up(c,t,e)},c.fitSize=function(t,e){return dp(c,t,e)},c.fitWidth=function(t,e){return fp(c,t,e)},c.fitHeight=function(t,e){return pp(c,t,e)},c.scale(1070)}function Tp(t){return function(e,r){var i=yc(e),n=yc(r),o=t(i*n);return o===1/0?[2,0]:[o*n*wc(e),o*wc(r)]}}function Bp(t){return function(e,r){var i=Sc(e*e+r*r),n=t(i),o=wc(n),a=yc(n);return[mc(e*o,i*a),Mc(i&&r*o/i)]}}var Mp=Tp(function(t){return Sc(2/(1+t))});function Lp(){return xp(Mp).scale(124.75).clipAngle(179.999)}Mp.invert=Bp(function(t){return 2*Mc(t/2)});var Fp=Tp(function(t){return(t=Bc(t))&&t/wc(t)});function Ap(){return xp(Fp).scale(79.4188).clipAngle(179.999)}function Ep(t,e){return[t,_c(Tc((hc+e)/2))]}function $p(){return Op(Ep).scale(961/uc)}function Op(t){var e,r,i,n=xp(t),o=n.center,a=n.scale,s=n.translate,l=n.clipExtent,h=null;function c(){var o=lc*a(),s=n(sd(n.rotate()).invert([0,0]));return l(null==h?[[s[0]-o,s[1]-o],[s[0]+o,s[1]+o]]:t===Ep?[[Math.max(s[0]-o,h),e],[Math.min(s[0]+o,r),i]]:[[h,Math.max(s[1]-o,e)],[r,Math.min(s[1]+o,i)]])}return n.scale=function(t){return arguments.length?(a(t),c()):a()},n.translate=function(t){return arguments.length?(s(t),c()):s()},n.center=function(t){return arguments.length?(o(t),c()):o()},n.clipExtent=function(t){return arguments.length?(null==t?h=e=r=i=null:(h=+t[0][0],e=+t[0][1],r=+t[1][0],i=+t[1][1]),c()):null==h?null:[[h,e],[r,i]]},c()}function Dp(t){return Tc((hc+t)/2)}function Ip(t,e){var r=yc(t),i=t===e?wc(t):_c(r/yc(e))/_c(Dp(e)/Dp(t)),n=r*kc(Dp(t),i)/i;if(!i)return Ep;function o(t,e){n>0?e<-hc+ac&&(e=-hc+ac):e>hc-ac&&(e=hc-ac);var r=n/kc(Dp(e),i);return[r*wc(i*t),n-r*yc(i*t)]}return o.invert=function(t,e){var r=n-e,o=vc(i)*Sc(t*t+r*r),a=mc(t,pc(r))*vc(r);return r*i<0&&(a-=lc*vc(t)*vc(r)),[a/i,2*gc(kc(n/o,1/i))-hc]},o}function Np(){return _p(Ip).scale(109.5).parallels([30,30])}function Pp(t,e){return[t,e]}function qp(){return xp(Pp).scale(152.63)}function zp(t,e){var r=yc(t),i=t===e?wc(t):(r-yc(e))/(e-t),n=r/i+t;if(pc(i)<ac)return Pp;function o(t,e){var r=n-e,o=i*t;return[r*wc(o),n-r*yc(o)]}return o.invert=function(t,e){var r=n-e,o=mc(t,pc(r))*vc(r);return r*i<0&&(o-=lc*vc(t)*vc(r)),[o/i,n-vc(i)*Sc(t*t+r*r)]},o}function Rp(){return _p(zp).scale(131.154).center([0,13.9389])}Fp.invert=Bp(function(t){return t}),Ep.invert=function(t,e){return[t,2*gc(xc(e))-hc]},Pp.invert=Pp;var jp=1.340264,Wp=-.081106,Hp=893e-6,Up=.003796,Yp=Sc(3)/2;function Gp(t,e){var r=Mc(Yp*wc(e)),i=r*r,n=i*i*i;return[t*yc(r)/(Yp*(jp+3*Wp*i+n*(7*Hp+9*Up*i))),r*(jp+Wp*i+n*(Hp+Up*i))]}function Vp(){return xp(Gp).scale(177.158)}function Xp(t,e){var r=yc(e),i=yc(t)*r;return[r*wc(t)/i,wc(e)/i]}function Zp(){return xp(Xp).scale(144.049).clipAngle(60)}function Qp(){var t,e,r,i,n,o,a,s=1,l=0,h=0,c=1,u=1,d=0,f=null,p=1,g=1,m=lp({point:function(t,e){var r=x([t,e]);this.stream.point(r[0],r[1])}}),y=Jd;function b(){return p=s*c,g=s*u,o=a=null,x}function x(r){var i=r[0]*p,n=r[1]*g;if(d){var o=n*t-i*e;i=i*t+n*e,n=o}return[i+l,n+h]}return x.invert=function(r){var i=r[0]-l,n=r[1]-h;if(d){var o=n*t+i*e;i=i*t-n*e,n=o}return[i/p,n/g]},x.stream=function(t){return o&&a===t?o:o=m(y(a=t))},x.postclip=function(t){return arguments.length?(y=t,f=r=i=n=null,b()):y},x.clipExtent=function(t){return arguments.length?(y=null==t?(f=r=i=n=null,Jd):Ld(f=+t[0][0],r=+t[0][1],i=+t[1][0],n=+t[1][1]),b()):null==f?null:[[f,r],[i,n]]},x.scale=function(t){return arguments.length?(s=+t,b()):s},x.translate=function(t){return arguments.length?(l=+t[0],h=+t[1],b()):[l,h]},x.angle=function(r){return arguments.length?(e=wc(d=r%360*fc),t=yc(d),b()):d*dc},x.reflectX=function(t){return arguments.length?(c=t?-1:1,b()):c<0},x.reflectY=function(t){return arguments.length?(u=t?-1:1,b()):u<0},x.fitExtent=function(t,e){return up(x,t,e)},x.fitSize=function(t,e){return dp(x,t,e)},x.fitWidth=function(t,e){return fp(x,t,e)},x.fitHeight=function(t,e){return pp(x,t,e)},x}function Kp(t,e){var r=e*e,i=r*r;return[t*(.8707-.131979*r+i*(i*(.003971*r-.001529*i)-.013791)),e*(1.007226+r*(.015085+i*(.028874*r-.044475-.005916*i)))]}function Jp(){return xp(Kp).scale(175.295)}function tg(t,e){return[yc(e)*wc(t),wc(e)]}function eg(){return xp(tg).scale(249.5).clipAngle(90.000001)}function rg(t,e){var r=yc(e),i=1+yc(t)*r;return[r*wc(t)/i,wc(e)/i]}function ig(){return xp(rg).scale(250).clipAngle(142)}function ng(t,e){return[_c(Tc((hc+e)/2)),-t]}function og(){var t=Op(ng),e=t.center,r=t.rotate;return t.center=function(t){return arguments.length?e([-t[1],t[0]]):[(t=e())[1],-t[0]]},t.rotate=function(t){return arguments.length?r([t[0],t[1],t.length>2?t[2]+90:90]):[(t=r())[0],t[1],t[2]-90]},r([0,0,90]).scale(159.155)}function ag(t,e){return t.parent===e.parent?1:2}function sg(t,e){return t+e.x}function lg(t,e){return Math.max(t,e.y)}function hg(){var t=ag,e=1,r=1,i=!1;function n(n){var o,a=0;n.eachAfter(function(e){var r=e.children;r?(e.x=function(t){return t.reduce(sg,0)/t.length}(r),e.y=function(t){return 1+t.reduce(lg,0)}(r)):(e.x=o?a+=t(e,o):0,e.y=0,o=e)});var s=function(t){for(var e;e=t.children;)t=e[0];return t}(n),l=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(n),h=s.x-t(s,l)/2,c=l.x+t(l,s)/2;return n.eachAfter(i?function(t){t.x=(t.x-n.x)*e,t.y=(n.y-t.y)*r}:function(t){t.x=(t.x-h)/(c-h)*e,t.y=(1-(n.y?t.y/n.y:1))*r})}return n.separation=function(e){return arguments.length?(t=e,n):t},n.size=function(t){return arguments.length?(i=!1,e=+t[0],r=+t[1],n):i?null:[e,r]},n.nodeSize=function(t){return arguments.length?(i=!0,e=+t[0],r=+t[1],n):i?[e,r]:null},n}function cg(t){var e=0,r=t.children,i=r&&r.length;if(i)for(;--i>=0;)e+=r[i].value;else e=1;t.value=e}function ug(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=fg)):void 0===e&&(e=dg);for(var r,i,n,o,a,s=new mg(t),l=[s];r=l.pop();)if((n=e(r.data))&&(a=(n=Array.from(n)).length))for(r.children=n,o=a-1;o>=0;--o)l.push(i=n[o]=new mg(n[o])),i.parent=r,i.depth=r.depth+1;return s.eachBefore(gg)}function dg(t){return t.children}function fg(t){return Array.isArray(t)?t[1]:null}function pg(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function gg(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function mg(t){this.data=t,this.depth=this.height=0,this.parent=null}function yg(t){return null==t?null:bg(t)}function bg(t){if("function"!=typeof t)throw new Error;return t}function xg(){return 0}function Cg(t){return function(){return t}}Gp.invert=function(t,e){for(var r,i=e,n=i*i,o=n*n*n,a=0;a<12&&(o=(n=(i-=r=(i*(jp+Wp*n+o*(Hp+Up*n))-e)/(jp+3*Wp*n+o*(7*Hp+9*Up*n)))*i)*n*n,!(pc(r)<sc));++a);return[Yp*t*(jp+3*Wp*n+o*(7*Hp+9*Up*n))/yc(i),Mc(wc(i)/Yp)]},Xp.invert=Bp(gc),Kp.invert=function(t,e){var r,i=e,n=25;do{var o=i*i,a=o*o;i-=r=(i*(1.007226+o*(.015085+a*(.028874*o-.044475-.005916*a)))-e)/(1.007226+o*(.045255+a*(.259866*o-.311325-.005916*11*a)))}while(pc(r)>ac&&--n>0);return[t/(.8707+(o=i*i)*(o*(o*o*o*(.003971-.001529*o)-.013791)-.131979)),i]},tg.invert=Bp(Mc),rg.invert=Bp(function(t){return 2*gc(t)}),ng.invert=function(t,e){return[-e,2*gc(xc(t))-hc]},mg.prototype=ug.prototype={constructor:mg,count:function(){return this.eachAfter(cg)},each:function(t,e){let r=-1;for(const i of this)t.call(e,i,++r,this);return this},eachAfter:function(t,e){for(var r,i,n,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),r=o.children)for(i=0,n=r.length;i<n;++i)a.push(r[i]);for(;o=s.pop();)t.call(e,o,++l,this);return this},eachBefore:function(t,e){for(var r,i,n=this,o=[n],a=-1;n=o.pop();)if(t.call(e,n,++a,this),r=n.children)for(i=r.length-1;i>=0;--i)o.push(r[i]);return this},find:function(t,e){let r=-1;for(const i of this)if(t.call(e,i,++r,this))return i},sum:function(t){return this.eachAfter(function(e){for(var r=+t(e.data)||0,i=e.children,n=i&&i.length;--n>=0;)r+=i[n].value;e.value=r})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,r=function(t,e){if(t===e)return t;var r=t.ancestors(),i=e.ancestors(),n=null;for(t=r.pop(),e=i.pop();t===e;)n=t,t=r.pop(),e=i.pop();return n}(e,t),i=[e];e!==r;)e=e.parent,i.push(e);for(var n=i.length;t!==r;)i.splice(n,0,t),t=t.parent;return i},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(r){r!==t&&e.push({source:r.parent,target:r})}),e},copy:function(){return ug(this).eachBefore(pg)},[Symbol.iterator]:function*(){var t,e,r,i,n=this,o=[n];do{for(t=o.reverse(),o=[];n=t.pop();)if(yield n,e=n.children)for(r=0,i=e.length;r<i;++r)o.push(e[r])}while(o.length)}};const _g=4294967296;function kg(){let t=1;return()=>(t=(1664525*t+1013904223)%_g)/_g}function wg(t){return vg(t,kg())}function vg(t,e){for(var r,i,n=0,o=(t=function(t,e){let r,i,n=t.length;for(;n;)i=e()*n--|0,r=t[n],t[n]=t[i],t[i]=r;return t}(Array.from(t),e)).length,a=[];n<o;)r=t[n],i&&Bg(i,r)?++n:(i=Lg(a=Sg(a,r)),n=0);return i}function Sg(t,e){var r,i;if(Mg(e,t))return[e];for(r=0;r<t.length;++r)if(Tg(e,t[r])&&Mg(Fg(t[r],e),t))return[t[r],e];for(r=0;r<t.length-1;++r)for(i=r+1;i<t.length;++i)if(Tg(Fg(t[r],t[i]),e)&&Tg(Fg(t[r],e),t[i])&&Tg(Fg(t[i],e),t[r])&&Mg(Ag(t[r],t[i],e),t))return[t[r],t[i],e];throw new Error}function Tg(t,e){var r=t.r-e.r,i=e.x-t.x,n=e.y-t.y;return r<0||r*r<i*i+n*n}function Bg(t,e){var r=t.r-e.r+1e-9*Math.max(t.r,e.r,1),i=e.x-t.x,n=e.y-t.y;return r>0&&r*r>i*i+n*n}function Mg(t,e){for(var r=0;r<e.length;++r)if(!Bg(t,e[r]))return!1;return!0}function Lg(t){switch(t.length){case 1:return{x:(e=t[0]).x,y:e.y,r:e.r};case 2:return Fg(t[0],t[1]);case 3:return Ag(t[0],t[1],t[2])}var e}function Fg(t,e){var r=t.x,i=t.y,n=t.r,o=e.x,a=e.y,s=e.r,l=o-r,h=a-i,c=s-n,u=Math.sqrt(l*l+h*h);return{x:(r+o+l/u*c)/2,y:(i+a+h/u*c)/2,r:(u+n+s)/2}}function Ag(t,e,r){var i=t.x,n=t.y,o=t.r,a=e.x,s=e.y,l=e.r,h=r.x,c=r.y,u=r.r,d=i-a,f=i-h,p=n-s,g=n-c,m=l-o,y=u-o,b=i*i+n*n-o*o,x=b-a*a-s*s+l*l,C=b-h*h-c*c+u*u,_=f*p-d*g,k=(p*C-g*x)/(2*_)-i,w=(g*m-p*y)/_,v=(f*x-d*C)/(2*_)-n,S=(d*y-f*m)/_,T=w*w+S*S-1,B=2*(o+k*w+v*S),M=k*k+v*v-o*o,L=-(Math.abs(T)>1e-6?(B+Math.sqrt(B*B-4*T*M))/(2*T):M/B);return{x:i+k+w*L,y:n+v+S*L,r:L}}function Eg(t,e,r){var i,n,o,a,s=t.x-e.x,l=t.y-e.y,h=s*s+l*l;h?(n=e.r+r.r,n*=n,a=t.r+r.r,n>(a*=a)?(i=(h+a-n)/(2*h),o=Math.sqrt(Math.max(0,a/h-i*i)),r.x=t.x-i*s-o*l,r.y=t.y-i*l+o*s):(i=(h+n-a)/(2*h),o=Math.sqrt(Math.max(0,n/h-i*i)),r.x=e.x+i*s-o*l,r.y=e.y+i*l+o*s)):(r.x=e.x+r.r,r.y=e.y)}function $g(t,e){var r=t.r+e.r-1e-6,i=e.x-t.x,n=e.y-t.y;return r>0&&r*r>i*i+n*n}function Og(t){var e=t._,r=t.next._,i=e.r+r.r,n=(e.x*r.r+r.x*e.r)/i,o=(e.y*r.r+r.y*e.r)/i;return n*n+o*o}function Dg(t){this._=t,this.next=null,this.previous=null}function Ig(t,e){if(!(a=(r=t,t="object"==typeof r&&"length"in r?r:Array.from(r)).length))return 0;var r,i,n,o,a,s,l,h,c,u,d,f;if((i=t[0]).x=0,i.y=0,!(a>1))return i.r;if(n=t[1],i.x=-n.r,n.x=i.r,n.y=0,!(a>2))return i.r+n.r;Eg(n,i,o=t[2]),i=new Dg(i),n=new Dg(n),o=new Dg(o),i.next=o.previous=n,n.next=i.previous=o,o.next=n.previous=i;t:for(h=3;h<a;++h){Eg(i._,n._,o=t[h]),o=new Dg(o),c=n.next,u=i.previous,d=n._.r,f=i._.r;do{if(d<=f){if($g(c._,o._)){n=c,i.next=n,n.previous=i,--h;continue t}d+=c._.r,c=c.next}else{if($g(u._,o._)){(i=u).next=n,n.previous=i,--h;continue t}f+=u._.r,u=u.previous}}while(c!==u.next);for(o.previous=i,o.next=n,i.next=n.previous=n=o,s=Og(i);(o=o.next)!==n;)(l=Og(o))<s&&(i=o,s=l);n=i.next}for(i=[n._],o=n;(o=o.next)!==n;)i.push(o._);for(o=vg(i,e),h=0;h<a;++h)(i=t[h]).x-=o.x,i.y-=o.y;return o.r}function Ng(t){return Ig(t,kg()),t}function Pg(t){return Math.sqrt(t.value)}function qg(){var t=null,e=1,r=1,i=xg;function n(n){const o=kg();return n.x=e/2,n.y=r/2,t?n.eachBefore(zg(t)).eachAfter(Rg(i,.5,o)).eachBefore(jg(1)):n.eachBefore(zg(Pg)).eachAfter(Rg(xg,1,o)).eachAfter(Rg(i,n.r/Math.min(e,r),o)).eachBefore(jg(Math.min(e,r)/(2*n.r))),n}return n.radius=function(e){return arguments.length?(t=yg(e),n):t},n.size=function(t){return arguments.length?(e=+t[0],r=+t[1],n):[e,r]},n.padding=function(t){return arguments.length?(i="function"==typeof t?t:Cg(+t),n):i},n}function zg(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function Rg(t,e,r){return function(i){if(n=i.children){var n,o,a,s=n.length,l=t(i)*e||0;if(l)for(o=0;o<s;++o)n[o].r+=l;if(a=Ig(n,r),l)for(o=0;o<s;++o)n[o].r-=l;i.r=a+l}}}function jg(t){return function(e){var r=e.parent;e.r*=t,r&&(e.x=r.x+t*e.x,e.y=r.y+t*e.y)}}function Wg(t){t.x0=Math.round(t.x0),t.y0=Math.round(t.y0),t.x1=Math.round(t.x1),t.y1=Math.round(t.y1)}function Hg(t,e,r,i,n){for(var o,a=t.children,s=-1,l=a.length,h=t.value&&(i-e)/t.value;++s<l;)(o=a[s]).y0=r,o.y1=n,o.x0=e,o.x1=e+=o.value*h}function Ug(){var t=1,e=1,r=0,i=!1;function n(n){var o=n.height+1;return n.x0=n.y0=r,n.x1=t,n.y1=e/o,n.eachBefore(function(t,e){return function(i){i.children&&Hg(i,i.x0,t*(i.depth+1)/e,i.x1,t*(i.depth+2)/e);var n=i.x0,o=i.y0,a=i.x1-r,s=i.y1-r;a<n&&(n=a=(n+a)/2),s<o&&(o=s=(o+s)/2),i.x0=n,i.y0=o,i.x1=a,i.y1=s}}(e,o)),i&&n.eachBefore(Wg),n}return n.round=function(t){return arguments.length?(i=!!t,n):i},n.size=function(r){return arguments.length?(t=+r[0],e=+r[1],n):[t,e]},n.padding=function(t){return arguments.length?(r=+t,n):r},n}var Yg={depth:-1},Gg={},Vg={};function Xg(t){return t.id}function Zg(t){return t.parentId}function Qg(){var t,e=Xg,r=Zg;function i(i){var n,o,a,s,l,h,c,u,d=Array.from(i),f=e,p=r,g=new Map;if(null!=t){const e=d.map((e,r)=>function(t){let e=(t=`${t}`).length;return Jg(t,e-1)&&!Jg(t,e-2)&&(t=t.slice(0,-1)),"/"===t[0]?t:`/${t}`}(t(e,r,i))),r=e.map(Kg),n=new Set(e).add("");for(const t of r)n.has(t)||(n.add(t),e.push(t),r.push(Kg(t)),d.push(Vg));f=(t,r)=>e[r],p=(t,e)=>r[e]}for(a=0,n=d.length;a<n;++a)o=d[a],h=d[a]=new mg(o),null!=(c=f(o,a,i))&&(c+="")&&(u=h.id=c,g.set(u,g.has(u)?Gg:h)),null!=(c=p(o,a,i))&&(c+="")&&(h.parent=c);for(a=0;a<n;++a)if(c=(h=d[a]).parent){if(!(l=g.get(c)))throw new Error("missing: "+c);if(l===Gg)throw new Error("ambiguous: "+c);l.children?l.children.push(h):l.children=[h],h.parent=l}else{if(s)throw new Error("multiple roots");s=h}if(!s)throw new Error("no root");if(null!=t){for(;s.data===Vg&&1===s.children.length;)s=s.children[0],--n;for(let t=d.length-1;t>=0&&(h=d[t]).data===Vg;--t)h.data=null}if(s.parent=Yg,s.eachBefore(function(t){t.depth=t.parent.depth+1,--n}).eachBefore(gg),s.parent=null,n>0)throw new Error("cycle");return s}return i.id=function(t){return arguments.length?(e=yg(t),i):e},i.parentId=function(t){return arguments.length?(r=yg(t),i):r},i.path=function(e){return arguments.length?(t=yg(e),i):t},i}function Kg(t){let e=t.length;if(e<2)return"";for(;--e>1&&!Jg(t,e););return t.slice(0,e)}function Jg(t,e){if("/"===t[e]){let r=0;for(;e>0&&"\\"===t[--e];)++r;if(!(1&r))return!0}return!1}function tm(t,e){return t.parent===e.parent?1:2}function em(t){var e=t.children;return e?e[0]:t.t}function rm(t){var e=t.children;return e?e[e.length-1]:t.t}function im(t,e,r){var i=r/(e.i-t.i);e.c-=i,e.s+=r,t.c+=i,e.z+=r,e.m+=r}function nm(t,e,r){return t.a.parent===e.parent?t.a:r}function om(t,e){this._=t,this.parent=null,this.children=null,this.A=null,this.a=this,this.z=0,this.m=0,this.c=0,this.s=0,this.t=null,this.i=e}function am(){var t=tm,e=1,r=1,i=null;function n(n){var l=function(t){for(var e,r,i,n,o,a=new om(t,0),s=[a];e=s.pop();)if(i=e._.children)for(e.children=new Array(o=i.length),n=o-1;n>=0;--n)s.push(r=e.children[n]=new om(i[n],n)),r.parent=e;return(a.parent=new om(null,0)).children=[a],a}(n);if(l.eachAfter(o),l.parent.m=-l.z,l.eachBefore(a),i)n.eachBefore(s);else{var h=n,c=n,u=n;n.eachBefore(function(t){t.x<h.x&&(h=t),t.x>c.x&&(c=t),t.depth>u.depth&&(u=t)});var d=h===c?1:t(h,c)/2,f=d-h.x,p=e/(c.x+d+f),g=r/(u.depth||1);n.eachBefore(function(t){t.x=(t.x+f)*p,t.y=t.depth*g})}return n}function o(e){var r=e.children,i=e.parent.children,n=e.i?i[e.i-1]:null;if(r){!function(t){for(var e,r=0,i=0,n=t.children,o=n.length;--o>=0;)(e=n[o]).z+=r,e.m+=r,r+=e.s+(i+=e.c)}(e);var o=(r[0].z+r[r.length-1].z)/2;n?(e.z=n.z+t(e._,n._),e.m=e.z-o):e.z=o}else n&&(e.z=n.z+t(e._,n._));e.parent.A=function(e,r,i){if(r){for(var n,o=e,a=e,s=r,l=o.parent.children[0],h=o.m,c=a.m,u=s.m,d=l.m;s=rm(s),o=em(o),s&&o;)l=em(l),(a=rm(a)).a=e,(n=s.z+u-o.z-h+t(s._,o._))>0&&(im(nm(s,e,i),e,n),h+=n,c+=n),u+=s.m,h+=o.m,d+=l.m,c+=a.m;s&&!rm(a)&&(a.t=s,a.m+=u-c),o&&!em(l)&&(l.t=o,l.m+=h-d,i=e)}return i}(e,n,e.parent.A||i[0])}function a(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*r}return n.separation=function(e){return arguments.length?(t=e,n):t},n.size=function(t){return arguments.length?(i=!1,e=+t[0],r=+t[1],n):i?null:[e,r]},n.nodeSize=function(t){return arguments.length?(i=!0,e=+t[0],r=+t[1],n):i?[e,r]:null},n}function sm(t,e,r,i,n){for(var o,a=t.children,s=-1,l=a.length,h=t.value&&(n-r)/t.value;++s<l;)(o=a[s]).x0=e,o.x1=i,o.y0=r,o.y1=r+=o.value*h}om.prototype=Object.create(mg.prototype);var lm=(1+Math.sqrt(5))/2;function hm(t,e,r,i,n,o){for(var a,s,l,h,c,u,d,f,p,g,m,y=[],b=e.children,x=0,C=0,_=b.length,k=e.value;x<_;){l=n-r,h=o-i;do{c=b[C++].value}while(!c&&C<_);for(u=d=c,m=c*c*(g=Math.max(h/l,l/h)/(k*t)),p=Math.max(d/m,m/u);C<_;++C){if(c+=s=b[C].value,s<u&&(u=s),s>d&&(d=s),m=c*c*g,(f=Math.max(d/m,m/u))>p){c-=s;break}p=f}y.push(a={value:c,dice:l<h,children:b.slice(x,C)}),a.dice?Hg(a,r,i,n,k?i+=h*c/k:o):sm(a,r,i,k?r+=l*c/k:n,o),k-=c,x=C}return y}const cm=function t(e){function r(t,r,i,n,o){hm(e,t,r,i,n,o)}return r.ratio=function(e){return t((e=+e)>1?e:1)},r}(lm);function um(){var t=cm,e=!1,r=1,i=1,n=[0],o=xg,a=xg,s=xg,l=xg,h=xg;function c(t){return t.x0=t.y0=0,t.x1=r,t.y1=i,t.eachBefore(u),n=[0],e&&t.eachBefore(Wg),t}function u(e){var r=n[e.depth],i=e.x0+r,c=e.y0+r,u=e.x1-r,d=e.y1-r;u<i&&(i=u=(i+u)/2),d<c&&(c=d=(c+d)/2),e.x0=i,e.y0=c,e.x1=u,e.y1=d,e.children&&(r=n[e.depth+1]=o(e)/2,i+=h(e)-r,c+=a(e)-r,(u-=s(e)-r)<i&&(i=u=(i+u)/2),(d-=l(e)-r)<c&&(c=d=(c+d)/2),t(e,i,c,u,d))}return c.round=function(t){return arguments.length?(e=!!t,c):e},c.size=function(t){return arguments.length?(r=+t[0],i=+t[1],c):[r,i]},c.tile=function(e){return arguments.length?(t=bg(e),c):t},c.padding=function(t){return arguments.length?c.paddingInner(t).paddingOuter(t):c.paddingInner()},c.paddingInner=function(t){return arguments.length?(o="function"==typeof t?t:Cg(+t),c):o},c.paddingOuter=function(t){return arguments.length?c.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):c.paddingTop()},c.paddingTop=function(t){return arguments.length?(a="function"==typeof t?t:Cg(+t),c):a},c.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:Cg(+t),c):s},c.paddingBottom=function(t){return arguments.length?(l="function"==typeof t?t:Cg(+t),c):l},c.paddingLeft=function(t){return arguments.length?(h="function"==typeof t?t:Cg(+t),c):h},c}function dm(t,e,r,i,n){var o,a,s=t.children,l=s.length,h=new Array(l+1);for(h[0]=a=o=0;o<l;++o)h[o+1]=a+=s[o].value;!function t(e,r,i,n,o,a,l){if(e>=r-1){var c=s[e];return c.x0=n,c.y0=o,c.x1=a,void(c.y1=l)}for(var u=h[e],d=i/2+u,f=e+1,p=r-1;f<p;){var g=f+p>>>1;h[g]<d?f=g+1:p=g}d-h[f-1]<h[f]-d&&e+1<f&&--f;var m=h[f]-u,y=i-m;if(a-n>l-o){var b=i?(n*y+a*m)/i:a;t(e,f,m,n,o,b,l),t(f,r,y,b,o,a,l)}else{var x=i?(o*y+l*m)/i:l;t(e,f,m,n,o,a,x),t(f,r,y,n,x,a,l)}}(0,l,t.value,e,r,i,n)}function fm(t,e,r,i,n){(1&t.depth?sm:Hg)(t,e,r,i,n)}const pm=function t(e){function r(t,r,i,n,o){if((a=t._squarify)&&a.ratio===e)for(var a,s,l,h,c,u=-1,d=a.length,f=t.value;++u<d;){for(l=(s=a[u]).children,h=s.value=0,c=l.length;h<c;++h)s.value+=l[h].value;s.dice?Hg(s,r,i,n,f?i+=(o-i)*s.value/f:o):sm(s,r,i,f?r+=(n-r)*s.value/f:n,o),f-=s.value}else t._squarify=a=hm(e,t,r,i,n,o),a.ratio=e}return r.ratio=function(e){return t((e=+e)>1?e:1)},r}(lm);function gm(t){var e=t.length;return function(r){return t[Math.max(0,Math.min(e-1,Math.floor(r*e)))]}}function mm(t,e){var r=Fi(+t,+e);return function(t){var e=r(t);return e-360*Math.floor(e/360)}}function ym(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}function bm(t){return((t=Math.exp(t))+1/t)/2}const xm=function t(e,r,i){function n(t,n){var o,a,s=t[0],l=t[1],h=t[2],c=n[0],u=n[1],d=n[2],f=c-s,p=u-l,g=f*f+p*p;if(g<1e-12)a=Math.log(d/h)/e,o=function(t){return[s+t*f,l+t*p,h*Math.exp(e*t*a)]};else{var m=Math.sqrt(g),y=(d*d-h*h+i*g)/(2*h*r*m),b=(d*d-h*h-i*g)/(2*d*r*m),x=Math.log(Math.sqrt(y*y+1)-y),C=Math.log(Math.sqrt(b*b+1)-b);a=(C-x)/e,o=function(t){var i,n=t*a,o=bm(x),c=h/(r*m)*(o*(i=e*n+x,((i=Math.exp(2*i))-1)/(i+1))-function(t){return((t=Math.exp(t))-1/t)/2}(x));return[s+c*f,l+c*p,h*o/bm(e*n+x)]}}return o.duration=1e3*a*e/Math.SQRT2,o}return n.rho=function(e){var r=Math.max(.001,+e),i=r*r;return t(r,i,i*i)},n}(Math.SQRT2,2,4);function Cm(t){return function(e,r){var i=t((e=Ci(e)).h,(r=Ci(r)).h),n=Ai(e.s,r.s),o=Ai(e.l,r.l),a=Ai(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=n(t),e.l=o(t),e.opacity=a(t),e+""}}}const _m=Cm(Fi);var km=Cm(Ai);function wm(t,e){var r=Ai((t=Sa(t)).l,(e=Sa(e)).l),i=Ai(t.a,e.a),n=Ai(t.b,e.b),o=Ai(t.opacity,e.opacity);return function(e){return t.l=r(e),t.a=i(e),t.b=n(e),t.opacity=o(e),t+""}}function vm(t){return function(e,r){var i=t((e=$a(e)).h,(r=$a(r)).h),n=Ai(e.c,r.c),o=Ai(e.l,r.l),a=Ai(e.opacity,r.opacity);return function(t){return e.h=i(t),e.c=n(t),e.l=o(t),e.opacity=a(t),e+""}}}const Sm=vm(Fi);var Tm=vm(Ai);function Bm(t){return function e(r){function i(e,i){var n=t((e=Ha(e)).h,(i=Ha(i)).h),o=Ai(e.s,i.s),a=Ai(e.l,i.l),s=Ai(e.opacity,i.opacity);return function(t){return e.h=n(t),e.s=o(t),e.l=a(Math.pow(t,r)),e.opacity=s(t),e+""}}return r=+r,i.gamma=e,i}(1)}const Mm=Bm(Fi);var Lm=Bm(Ai);function Fm(t,e){void 0===e&&(e=t,t=Yi);for(var r=0,i=e.length-1,n=e[0],o=new Array(i<0?0:i);r<i;)o[r]=t(n,n=e[++r]);return function(t){var e=Math.max(0,Math.min(i-1,Math.floor(t*=i)));return o[e](t-e)}}function Am(t,e){for(var r=new Array(e),i=0;i<e;++i)r[i]=t(i/(e-1));return r}function Em(t){for(var e,r=-1,i=t.length,n=t[i-1],o=0;++r<i;)e=n,n=t[r],o+=e[1]*n[0]-e[0]*n[1];return o/2}function $m(t){for(var e,r,i=-1,n=t.length,o=0,a=0,s=t[n-1],l=0;++i<n;)e=s,s=t[i],l+=r=e[0]*s[1]-s[0]*e[1],o+=(e[0]+s[0])*r,a+=(e[1]+s[1])*r;return[o/(l*=3),a/l]}function Om(t,e,r){return(e[0]-t[0])*(r[1]-t[1])-(e[1]-t[1])*(r[0]-t[0])}function Dm(t,e){return t[0]-e[0]||t[1]-e[1]}function Im(t){const e=t.length,r=[0,1];let i,n=2;for(i=2;i<e;++i){for(;n>1&&Om(t[r[n-2]],t[r[n-1]],t[i])<=0;)--n;r[n++]=i}return r.slice(0,n)}function Nm(t){if((r=t.length)<3)return null;var e,r,i=new Array(r),n=new Array(r);for(e=0;e<r;++e)i[e]=[+t[e][0],+t[e][1],e];for(i.sort(Dm),e=0;e<r;++e)n[e]=[i[e][0],-i[e][1]];var o=Im(i),a=Im(n),s=a[0]===o[0],l=a[a.length-1]===o[o.length-1],h=[];for(e=o.length-1;e>=0;--e)h.push(t[i[o[e]][2]]);for(e=+s;e<a.length-l;++e)h.push(t[i[a[e]][2]]);return h}function Pm(t,e){for(var r,i,n=t.length,o=t[n-1],a=e[0],s=e[1],l=o[0],h=o[1],c=!1,u=0;u<n;++u)r=(o=t[u])[0],(i=o[1])>s!=h>s&&a<(l-r)*(s-i)/(h-i)+r&&(c=!c),l=r,h=i;return c}function qm(t){for(var e,r,i=-1,n=t.length,o=t[n-1],a=o[0],s=o[1],l=0;++i<n;)e=a,r=s,e-=a=(o=t[i])[0],r-=s=o[1],l+=Math.hypot(e,r);return l}const zm=Math.random,Rm=function t(e){function r(t,r){return t=null==t?0:+t,r=null==r?1:+r,1===arguments.length?(r=t,t=0):r-=t,function(){return e()*r+t}}return r.source=t,r}(zm),jm=function t(e){function r(t,r){return arguments.length<2&&(r=t,t=0),t=Math.floor(t),r=Math.floor(r)-t,function(){return Math.floor(e()*r+t)}}return r.source=t,r}(zm),Wm=function t(e){function r(t,r){var i,n;return t=null==t?0:+t,r=null==r?1:+r,function(){var o;if(null!=i)o=i,i=null;else do{i=2*e()-1,o=2*e()-1,n=i*i+o*o}while(!n||n>1);return t+r*o*Math.sqrt(-2*Math.log(n)/n)}}return r.source=t,r}(zm),Hm=function t(e){var r=Wm.source(e);function i(){var t=r.apply(this,arguments);return function(){return Math.exp(t())}}return i.source=t,i}(zm),Um=function t(e){function r(t){return(t=+t)<=0?()=>0:function(){for(var r=0,i=t;i>1;--i)r+=e();return r+i*e()}}return r.source=t,r}(zm),Ym=function t(e){var r=Um.source(e);function i(t){if(0===(t=+t))return e;var i=r(t);return function(){return i()/t}}return i.source=t,i}(zm),Gm=function t(e){function r(t){return function(){return-Math.log1p(-e())/t}}return r.source=t,r}(zm),Vm=function t(e){function r(t){if((t=+t)<0)throw new RangeError("invalid alpha");return t=1/-t,function(){return Math.pow(1-e(),t)}}return r.source=t,r}(zm),Xm=function t(e){function r(t){if((t=+t)<0||t>1)throw new RangeError("invalid p");return function(){return Math.floor(e()+t)}}return r.source=t,r}(zm),Zm=function t(e){function r(t){if((t=+t)<0||t>1)throw new RangeError("invalid p");return 0===t?()=>1/0:1===t?()=>1:(t=Math.log1p(-t),function(){return 1+Math.floor(Math.log1p(-e())/t)})}return r.source=t,r}(zm),Qm=function t(e){var r=Wm.source(e)();function i(t,i){if((t=+t)<0)throw new RangeError("invalid k");if(0===t)return()=>0;if(i=null==i?1:+i,1===t)return()=>-Math.log1p(-e())*i;var n=(t<1?t+1:t)-1/3,o=1/(3*Math.sqrt(n)),a=t<1?()=>Math.pow(e(),1/t):()=>1;return function(){do{do{var t=r(),s=1+o*t}while(s<=0);s*=s*s;var l=1-e()}while(l>=1-.0331*t*t*t*t&&Math.log(l)>=.5*t*t+n*(1-s+Math.log(s)));return n*s*a()*i}}return i.source=t,i}(zm),Km=function t(e){var r=Qm.source(e);function i(t,e){var i=r(t),n=r(e);return function(){var t=i();return 0===t?0:t/(t+n())}}return i.source=t,i}(zm),Jm=function t(e){var r=Zm.source(e),i=Km.source(e);function n(t,e){return t=+t,(e=+e)>=1?()=>t:e<=0?()=>0:function(){for(var n=0,o=t,a=e;o*a>16&&o*(1-a)>16;){var s=Math.floor((o+1)*a),l=i(s,o-s+1)();l<=a?(n+=s,o-=s,a=(a-l)/(1-l)):(o=s-1,a/=l)}for(var h=a<.5,c=r(h?a:1-a),u=c(),d=0;u<=o;++d)u+=c();return n+(h?d:o-d)}}return n.source=t,n}(zm),ty=function t(e){function r(t,r,i){var n;return 0===(t=+t)?n=t=>-Math.log(t):(t=1/t,n=e=>Math.pow(e,t)),r=null==r?0:+r,i=null==i?1:+i,function(){return r+i*n(-Math.log1p(-e()))}}return r.source=t,r}(zm),ey=function t(e){function r(t,r){return t=null==t?0:+t,r=null==r?1:+r,function(){return t+r*Math.tan(Math.PI*e())}}return r.source=t,r}(zm),ry=function t(e){function r(t,r){return t=null==t?0:+t,r=null==r?1:+r,function(){var i=e();return t+r*Math.log(i/(1-i))}}return r.source=t,r}(zm),iy=function t(e){var r=Qm.source(e),i=Jm.source(e);function n(t){return function(){for(var n=0,o=t;o>16;){var a=Math.floor(.875*o),s=r(a)();if(s>o)return n+i(a-1,o/s)();n+=a,o-=s}for(var l=-Math.log1p(-e()),h=0;l<=o;++h)l-=Math.log1p(-e());return n+h}}return n.source=t,n}(zm),ny=1/4294967296;function oy(t=Math.random()){let e=0|(0<=t&&t<1?t/ny:Math.abs(t));return()=>(e=1664525*e+1013904223|0,ny*(e>>>0))}function ay(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function sy(t,e){switch(arguments.length){case 0:break;case 1:"function"==typeof t?this.interpolator(t):this.range(t);break;default:this.domain(t),"function"==typeof e?this.interpolator(e):this.range(e)}return this}const ly=Symbol("implicit");function hy(){var t=new E,e=[],r=[],i=ly;function n(n){let o=t.get(n);if(void 0===o){if(i!==ly)return i;t.set(n,o=e.push(n)-1)}return r[o%r.length]}return n.domain=function(r){if(!arguments.length)return e.slice();e=[],t=new E;for(const i of r)t.has(i)||t.set(i,e.push(i)-1);return n},n.range=function(t){return arguments.length?(r=Array.from(t),n):r.slice()},n.unknown=function(t){return arguments.length?(i=t,n):i},n.copy=function(){return hy(e,r).unknown(i)},ay.apply(n,arguments),n}function cy(){var t,e,r=hy().unknown(void 0),i=r.domain,n=r.range,o=0,a=1,s=!1,l=0,h=0,c=.5;function u(){var r=i().length,u=a<o,d=u?a:o,f=u?o:a;t=(f-d)/Math.max(1,r-l+2*h),s&&(t=Math.floor(t)),d+=(f-d-t*(r-l))*c,e=t*(1-l),s&&(d=Math.round(d),e=Math.round(e));var p=$t(r).map(function(e){return d+t*e});return n(u?p.reverse():p)}return delete r.unknown,r.domain=function(t){return arguments.length?(i(t),u()):i()},r.range=function(t){return arguments.length?([o,a]=t,o=+o,a=+a,u()):[o,a]},r.rangeRound=function(t){return[o,a]=t,o=+o,a=+a,s=!0,u()},r.bandwidth=function(){return e},r.step=function(){return t},r.round=function(t){return arguments.length?(s=!!t,u()):s},r.padding=function(t){return arguments.length?(l=Math.min(1,h=+t),u()):l},r.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),u()):l},r.paddingOuter=function(t){return arguments.length?(h=+t,u()):h},r.align=function(t){return arguments.length?(c=Math.max(0,Math.min(1,t)),u()):c},r.copy=function(){return cy(i(),[o,a]).round(s).paddingInner(l).paddingOuter(h).align(c)},ay.apply(u(),arguments)}function uy(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return uy(e())},t}function dy(){return uy(cy.apply(null,arguments).paddingInner(1))}function fy(t){return+t}var py=[0,1];function gy(t){return t}function my(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:(r=isNaN(e)?NaN:.5,function(){return r});var r}function yy(t,e,r){var i=t[0],n=t[1],o=e[0],a=e[1];return n<i?(i=my(n,i),o=r(a,o)):(i=my(i,n),o=r(o,a)),function(t){return o(i(t))}}function by(t,e,r){var i=Math.min(t.length,e.length)-1,n=new Array(i),o=new Array(i),a=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<i;)n[a]=my(t[a],t[a+1]),o[a]=r(e[a],e[a+1]);return function(e){var r=d(t,e,1,i)-1;return o[r](n[r](e))}}function xy(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function Cy(){var t,e,r,i,n,o,a=py,s=py,l=Yi,h=gy;function c(){var t,e,r,l=Math.min(a.length,s.length);return h!==gy&&(t=a[0],e=a[l-1],t>e&&(r=t,t=e,e=r),h=function(r){return Math.max(t,Math.min(e,r))}),i=l>2?by:yy,n=o=null,u}function u(e){return null==e||isNaN(e=+e)?r:(n||(n=i(a.map(t),s,l)))(t(h(e)))}return u.invert=function(r){return h(e((o||(o=i(s,a.map(t),Ri)))(r)))},u.domain=function(t){return arguments.length?(a=Array.from(t,fy),c()):a.slice()},u.range=function(t){return arguments.length?(s=Array.from(t),c()):s.slice()},u.rangeRound=function(t){return s=Array.from(t),l=ym,c()},u.clamp=function(t){return arguments.length?(h=!!t||gy,c()):h!==gy},u.interpolate=function(t){return arguments.length?(l=t,c()):l},u.unknown=function(t){return arguments.length?(r=t,u):r},function(r,i){return t=r,e=i,c()}}function _y(){return Cy()(gy,gy)}function ky(t,e,r,i){var n,o=ct(t,e,r);switch((i=Uh(null==i?",f":i)).type){case"s":var a=Math.max(Math.abs(t),Math.abs(e));return null!=i.precision||isNaN(n=nc(o,a))||(i.precision=n),Kh(i,a);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(n=oc(o,Math.max(Math.abs(t),Math.abs(e))))||(i.precision=n-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(n=ic(o))||(i.precision=n-2*("%"===i.type))}return Qh(i)}function wy(t){var e=t.domain;return t.ticks=function(t){var r=e();return lt(r[0],r[r.length-1],null==t?10:t)},t.tickFormat=function(t,r){var i=e();return ky(i[0],i[i.length-1],null==t?10:t,r)},t.nice=function(r){null==r&&(r=10);var i,n,o=e(),a=0,s=o.length-1,l=o[a],h=o[s],c=10;for(h<l&&(n=l,l=h,h=n,n=a,a=s,s=n);c-- >0;){if((n=ht(l,h,r))===i)return o[a]=l,o[s]=h,e(o);if(n>0)l=Math.floor(l/n)*n,h=Math.ceil(h/n)*n;else{if(!(n<0))break;l=Math.ceil(l*n)/n,h=Math.floor(h*n)/n}i=n}return t},t}function vy(){var t=_y();return t.copy=function(){return xy(t,vy())},ay.apply(t,arguments),wy(t)}function Sy(t){var e;function r(t){return null==t||isNaN(t=+t)?e:t}return r.invert=r,r.domain=r.range=function(e){return arguments.length?(t=Array.from(e,fy),r):t.slice()},r.unknown=function(t){return arguments.length?(e=t,r):e},r.copy=function(){return Sy(t).unknown(e)},t=arguments.length?Array.from(t,fy):[0,1],wy(r)}function Ty(t,e){var r,i=0,n=(t=t.slice()).length-1,o=t[i],a=t[n];return a<o&&(r=i,i=n,n=r,r=o,o=a,a=r),t[i]=e.floor(o),t[n]=e.ceil(a),t}function By(t){return Math.log(t)}function My(t){return Math.exp(t)}function Ly(t){return-Math.log(-t)}function Fy(t){return-Math.exp(-t)}function Ay(t){return isFinite(t)?+("1e"+t):t<0?0:t}function Ey(t){return(e,r)=>-t(-e,r)}function $y(t){const e=t(By,My),r=e.domain;let i,n,o=10;function a(){return i=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}(o),n=function(t){return 10===t?Ay:t===Math.E?Math.exp:e=>Math.pow(t,e)}(o),r()[0]<0?(i=Ey(i),n=Ey(n),t(Ly,Fy)):t(By,My),e}return e.base=function(t){return arguments.length?(o=+t,a()):o},e.domain=function(t){return arguments.length?(r(t),a()):r()},e.ticks=t=>{const e=r();let a=e[0],s=e[e.length-1];const l=s<a;l&&([a,s]=[s,a]);let h,c,u=i(a),d=i(s);const f=null==t?10:+t;let p=[];if(!(o%1)&&d-u<f){if(u=Math.floor(u),d=Math.ceil(d),a>0){for(;u<=d;++u)for(h=1;h<o;++h)if(c=u<0?h/n(-u):h*n(u),!(c<a)){if(c>s)break;p.push(c)}}else for(;u<=d;++u)for(h=o-1;h>=1;--h)if(c=u>0?h/n(-u):h*n(u),!(c<a)){if(c>s)break;p.push(c)}2*p.length<f&&(p=lt(a,s,f))}else p=lt(u,d,Math.min(d-u,f)).map(n);return l?p.reverse():p},e.tickFormat=(t,r)=>{if(null==t&&(t=10),null==r&&(r=10===o?"s":","),"function"!=typeof r&&(o%1||null!=(r=Uh(r)).precision||(r.trim=!0),r=Qh(r)),t===1/0)return r;const a=Math.max(1,o*t/e.ticks().length);return t=>{let e=t/n(Math.round(i(t)));return e*o<o-.5&&(e*=o),e<=a?r(t):""}},e.nice=()=>r(Ty(r(),{floor:t=>n(Math.floor(i(t))),ceil:t=>n(Math.ceil(i(t)))})),e}function Oy(){const t=$y(Cy()).domain([1,10]);return t.copy=()=>xy(t,Oy()).base(t.base()),ay.apply(t,arguments),t}function Dy(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Iy(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function Ny(t){var e=1,r=t(Dy(e),Iy(e));return r.constant=function(r){return arguments.length?t(Dy(e=+r),Iy(e)):e},wy(r)}function Py(){var t=Ny(Cy());return t.copy=function(){return xy(t,Py()).constant(t.constant())},ay.apply(t,arguments)}function qy(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function zy(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Ry(t){return t<0?-t*t:t*t}function jy(t){var e=t(gy,gy),r=1;return e.exponent=function(e){return arguments.length?1===(r=+e)?t(gy,gy):.5===r?t(zy,Ry):t(qy(r),qy(1/r)):r},wy(e)}function Wy(){var t=jy(Cy());return t.copy=function(){return xy(t,Wy()).exponent(t.exponent())},ay.apply(t,arguments),t}function Hy(){return Wy.apply(null,arguments).exponent(.5)}function Uy(t){return Math.sign(t)*t*t}function Yy(){var t,e=_y(),r=[0,1],i=!1;function n(r){var n=function(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}(e(r));return isNaN(n)?t:i?Math.round(n):n}return n.invert=function(t){return e.invert(Uy(t))},n.domain=function(t){return arguments.length?(e.domain(t),n):e.domain()},n.range=function(t){return arguments.length?(e.range((r=Array.from(t,fy)).map(Uy)),n):r.slice()},n.rangeRound=function(t){return n.range(t).round(!0)},n.round=function(t){return arguments.length?(i=!!t,n):i},n.clamp=function(t){return arguments.length?(e.clamp(t),n):e.clamp()},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return Yy(e.domain(),r).round(i).clamp(e.clamp()).unknown(t)},ay.apply(n,arguments),wy(n)}function Gy(){var t,e=[],r=[],n=[];function o(){var t=0,i=Math.max(1,r.length);for(n=new Array(i-1);++t<i;)n[t-1]=kt(e,t/i);return a}function a(e){return null==e||isNaN(e=+e)?t:r[d(n,e)]}return a.invertExtent=function(t){var i=r.indexOf(t);return i<0?[NaN,NaN]:[i>0?n[i-1]:e[0],i<n.length?n[i]:e[e.length-1]]},a.domain=function(t){if(!arguments.length)return e.slice();e=[];for(let r of t)null==r||isNaN(r=+r)||e.push(r);return e.sort(i),o()},a.range=function(t){return arguments.length?(r=Array.from(t),o()):r.slice()},a.unknown=function(e){return arguments.length?(t=e,a):t},a.quantiles=function(){return n.slice()},a.copy=function(){return Gy().domain(e).range(r).unknown(t)},ay.apply(a,arguments)}function Vy(){var t,e=0,r=1,i=1,n=[.5],o=[0,1];function a(e){return null!=e&&e<=e?o[d(n,e,0,i)]:t}function s(){var t=-1;for(n=new Array(i);++t<i;)n[t]=((t+1)*r-(t-i)*e)/(i+1);return a}return a.domain=function(t){return arguments.length?([e,r]=t,e=+e,r=+r,s()):[e,r]},a.range=function(t){return arguments.length?(i=(o=Array.from(t)).length-1,s()):o.slice()},a.invertExtent=function(t){var a=o.indexOf(t);return a<0?[NaN,NaN]:a<1?[e,n[0]]:a>=i?[n[i-1],r]:[n[a-1],n[a]]},a.unknown=function(e){return arguments.length?(t=e,a):a},a.thresholds=function(){return n.slice()},a.copy=function(){return Vy().domain([e,r]).range(o).unknown(t)},ay.apply(wy(a),arguments)}function Xy(){var t,e=[.5],r=[0,1],i=1;function n(n){return null!=n&&n<=n?r[d(e,n,0,i)]:t}return n.domain=function(t){return arguments.length?(e=Array.from(t),i=Math.min(e.length,r.length-1),n):e.slice()},n.range=function(t){return arguments.length?(r=Array.from(t),i=Math.min(e.length,r.length-1),n):r.slice()},n.invertExtent=function(t){var i=r.indexOf(t);return[e[i-1],e[i]]},n.unknown=function(e){return arguments.length?(t=e,n):t},n.copy=function(){return Xy().domain(e).range(r).unknown(t)},ay.apply(n,arguments)}const Zy=1e3,Qy=6e4,Ky=36e5,Jy=864e5,tb=6048e5,eb=31536e6,rb=new Date,ib=new Date;function nb(t,e,r,i){function n(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return n.floor=e=>(t(e=new Date(+e)),e),n.ceil=r=>(t(r=new Date(r-1)),e(r,1),t(r),r),n.round=t=>{const e=n(t),r=n.ceil(t);return t-e<r-t?e:r},n.offset=(t,r)=>(e(t=new Date(+t),null==r?1:Math.floor(r)),t),n.range=(r,i,o)=>{const a=[];if(r=n.ceil(r),o=null==o?1:Math.floor(o),!(r<i&&o>0))return a;let s;do{a.push(s=new Date(+r)),e(r,o),t(r)}while(s<r&&r<i);return a},n.filter=r=>nb(e=>{if(e>=e)for(;t(e),!r(e);)e.setTime(e-1)},(t,i)=>{if(t>=t)if(i<0)for(;++i<=0;)for(;e(t,-1),!r(t););else for(;--i>=0;)for(;e(t,1),!r(t););}),r&&(n.count=(e,i)=>(rb.setTime(+e),ib.setTime(+i),t(rb),t(ib),Math.floor(r(rb,ib))),n.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?n.filter(i?e=>i(e)%t===0:e=>n.count(0,e)%t===0):n:null)),n}const ob=nb(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);ob.every=t=>(t=Math.floor(t),isFinite(t)&&t>0?t>1?nb(e=>{e.setTime(Math.floor(e/t)*t)},(e,r)=>{e.setTime(+e+r*t)},(e,r)=>(r-e)/t):ob:null);const ab=ob.range,sb=nb(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+e*Zy)},(t,e)=>(e-t)/Zy,t=>t.getUTCSeconds()),lb=sb.range,hb=nb(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Zy)},(t,e)=>{t.setTime(+t+e*Qy)},(t,e)=>(e-t)/Qy,t=>t.getMinutes()),cb=hb.range,ub=nb(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+e*Qy)},(t,e)=>(e-t)/Qy,t=>t.getUTCMinutes()),db=ub.range,fb=nb(t=>{t.setTime(t-t.getMilliseconds()-t.getSeconds()*Zy-t.getMinutes()*Qy)},(t,e)=>{t.setTime(+t+e*Ky)},(t,e)=>(e-t)/Ky,t=>t.getHours()),pb=fb.range,gb=nb(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+e*Ky)},(t,e)=>(e-t)/Ky,t=>t.getUTCHours()),mb=gb.range,yb=nb(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Qy)/Jy,t=>t.getDate()-1),bb=yb.range,xb=nb(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Jy,t=>t.getUTCDate()-1),Cb=xb.range,_b=nb(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/Jy,t=>Math.floor(t/Jy)),kb=_b.range;function wb(t){return nb(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(t,e)=>{t.setDate(t.getDate()+7*e)},(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Qy)/tb)}const vb=wb(0),Sb=wb(1),Tb=wb(2),Bb=wb(3),Mb=wb(4),Lb=wb(5),Fb=wb(6),Ab=vb.range,Eb=Sb.range,$b=Tb.range,Ob=Bb.range,Db=Mb.range,Ib=Lb.range,Nb=Fb.range;function Pb(t){return nb(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)},(t,e)=>(e-t)/tb)}const qb=Pb(0),zb=Pb(1),Rb=Pb(2),jb=Pb(3),Wb=Pb(4),Hb=Pb(5),Ub=Pb(6),Yb=qb.range,Gb=zb.range,Vb=Rb.range,Xb=jb.range,Zb=Wb.range,Qb=Hb.range,Kb=Ub.range,Jb=nb(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear()),t=>t.getMonth()),tx=Jb.range,ex=nb(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear()),t=>t.getUTCMonth()),rx=ex.range,ix=nb(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());ix.every=t=>isFinite(t=Math.floor(t))&&t>0?nb(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)}):null;const nx=ix.range,ox=nb(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());ox.every=t=>isFinite(t=Math.floor(t))&&t>0?nb(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)}):null;const ax=ox.range;function sx(t,e,r,i,n,a){const s=[[sb,1,Zy],[sb,5,5e3],[sb,15,15e3],[sb,30,3e4],[a,1,Qy],[a,5,3e5],[a,15,9e5],[a,30,18e5],[n,1,Ky],[n,3,108e5],[n,6,216e5],[n,12,432e5],[i,1,Jy],[i,2,1728e5],[r,1,tb],[e,1,2592e6],[e,3,7776e6],[t,1,eb]];function l(e,r,i){const n=Math.abs(r-e)/i,a=o(([,,t])=>t).right(s,n);if(a===s.length)return t.every(ct(e/eb,r/eb,i));if(0===a)return ob.every(Math.max(ct(e,r,i),1));const[l,h]=s[n/s[a-1][2]<s[a][2]/n?a-1:a];return l.every(h)}return[function(t,e,r){const i=e<t;i&&([t,e]=[e,t]);const n=r&&"function"==typeof r.range?r:l(t,e,r),o=n?n.range(t,+e+1):[];return i?o.reverse():o},l]}const[lx,hx]=sx(ox,ex,qb,_b,gb,ub),[cx,ux]=sx(ix,Jb,vb,yb,fb,hb);function dx(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 fx(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 px(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function gx(t){var e=t.dateTime,r=t.date,i=t.time,n=t.periods,o=t.days,a=t.shortDays,s=t.months,l=t.shortMonths,h=Bx(n),c=Mx(n),u=Bx(o),d=Mx(o),f=Bx(a),p=Mx(a),g=Bx(s),m=Mx(s),y=Bx(l),b=Mx(l),x={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:Xx,e:Xx,f:tC,g:uC,G:fC,H:Zx,I:Qx,j:Kx,L:Jx,m:eC,M:rC,p:function(t){return n[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:IC,s:NC,S:iC,u:nC,U:oC,V:sC,w:lC,W:hC,x:null,X:null,y:cC,Y:dC,Z:pC,"%":DC},C={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:gC,e:gC,f:CC,g:AC,G:$C,H:mC,I:yC,j:bC,L:xC,m:_C,M:kC,p:function(t){return n[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:IC,s:NC,S:wC,u:vC,U:SC,V:BC,w:MC,W:LC,x:null,X:null,y:FC,Y:EC,Z:OC,"%":DC},_={a:function(t,e,r){var i=f.exec(e.slice(r));return i?(t.w=p.get(i[0].toLowerCase()),r+i[0].length):-1},A:function(t,e,r){var i=u.exec(e.slice(r));return i?(t.w=d.get(i[0].toLowerCase()),r+i[0].length):-1},b:function(t,e,r){var i=y.exec(e.slice(r));return i?(t.m=b.get(i[0].toLowerCase()),r+i[0].length):-1},B:function(t,e,r){var i=g.exec(e.slice(r));return i?(t.m=m.get(i[0].toLowerCase()),r+i[0].length):-1},c:function(t,r,i){return v(t,e,r,i)},d:qx,e:qx,f:Ux,g:Dx,G:Ox,H:Rx,I:Rx,j:zx,L:Hx,m:Px,M:jx,p:function(t,e,r){var i=h.exec(e.slice(r));return i?(t.p=c.get(i[0].toLowerCase()),r+i[0].length):-1},q:Nx,Q:Gx,s:Vx,S:Wx,u:Fx,U:Ax,V:Ex,w:Lx,W:$x,x:function(t,e,i){return v(t,r,e,i)},X:function(t,e,r){return v(t,i,e,r)},y:Dx,Y:Ox,Z:Ix,"%":Yx};function k(t,e){return function(r){var i,n,o,a=[],s=-1,l=0,h=t.length;for(r instanceof Date||(r=new Date(+r));++s<h;)37===t.charCodeAt(s)&&(a.push(t.slice(l,s)),null!=(n=_x[i=t.charAt(++s)])?i=t.charAt(++s):n="e"===i?" ":"0",(o=e[i])&&(i=o(r,n)),a.push(i),l=s+1);return a.push(t.slice(l,s)),a.join("")}}function w(t,e){return function(r){var i,n,o=px(1900,void 0,1);if(v(o,t,r+="",0)!=r.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(e&&!("Z"in o)&&(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(n=(i=fx(px(o.y,0,1))).getUTCDay(),i=n>4||0===n?zb.ceil(i):zb(i),i=xb.offset(i,7*(o.V-1)),o.y=i.getUTCFullYear(),o.m=i.getUTCMonth(),o.d=i.getUTCDate()+(o.w+6)%7):(n=(i=dx(px(o.y,0,1))).getDay(),i=n>4||0===n?Sb.ceil(i):Sb(i),i=yb.offset(i,7*(o.V-1)),o.y=i.getFullYear(),o.m=i.getMonth(),o.d=i.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:"W"in o?1:0),n="Z"in o?fx(px(o.y,0,1)).getUTCDay():dx(px(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(n+5)%7:o.w+7*o.U-(n+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,fx(o)):dx(o)}}function v(t,e,r,i){for(var n,o,a=0,s=e.length,l=r.length;a<s;){if(i>=l)return-1;if(37===(n=e.charCodeAt(a++))){if(n=e.charAt(a++),!(o=_[n in _x?e.charAt(a++):n])||(i=o(t,r,i))<0)return-1}else if(n!=r.charCodeAt(i++))return-1}return i}return x.x=k(r,x),x.X=k(i,x),x.c=k(e,x),C.x=k(r,C),C.X=k(i,C),C.c=k(e,C),{format:function(t){var e=k(t+="",x);return e.toString=function(){return t},e},parse:function(t){var e=w(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=k(t+="",C);return e.toString=function(){return t},e},utcParse:function(t){var e=w(t+="",!0);return e.toString=function(){return t},e}}}var mx,yx,bx,xx,Cx,_x={"-":"",_:" ",0:"0"},kx=/^\s*\d+/,wx=/^%/,vx=/[\\^$*+?|[\]().{}]/g;function Sx(t,e,r){var i=t<0?"-":"",n=(i?-t:t)+"",o=n.length;return i+(o<r?new Array(r-o+1).join(e)+n:n)}function Tx(t){return t.replace(vx,"\\$&")}function Bx(t){return new RegExp("^(?:"+t.map(Tx).join("|")+")","i")}function Mx(t){return new Map(t.map((t,e)=>[t.toLowerCase(),e]))}function Lx(t,e,r){var i=kx.exec(e.slice(r,r+1));return i?(t.w=+i[0],r+i[0].length):-1}function Fx(t,e,r){var i=kx.exec(e.slice(r,r+1));return i?(t.u=+i[0],r+i[0].length):-1}function Ax(t,e,r){var i=kx.exec(e.slice(r,r+2));return i?(t.U=+i[0],r+i[0].length):-1}function Ex(t,e,r){var i=kx.exec(e.slice(r,r+2));return i?(t.V=+i[0],r+i[0].length):-1}function $x(t,e,r){var i=kx.exec(e.slice(r,r+2));return i?(t.W=+i[0],r+i[0].length):-1}function Ox(t,e,r){var i=kx.exec(e.slice(r,r+4));return i?(t.y=+i[0],r+i[0].length):-1}function Dx(t,e,r){var i=kx.exec(e.slice(r,r+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),r+i[0].length):-1}function Ix(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 Nx(t,e,r){var i=kx.exec(e.slice(r,r+1));return i?(t.q=3*i[0]-3,r+i[0].length):-1}function Px(t,e,r){var i=kx.exec(e.slice(r,r+2));return i?(t.m=i[0]-1,r+i[0].length):-1}function qx(t,e,r){var i=kx.exec(e.slice(r,r+2));return i?(t.d=+i[0],r+i[0].length):-1}function zx(t,e,r){var i=kx.exec(e.slice(r,r+3));return i?(t.m=0,t.d=+i[0],r+i[0].length):-1}function Rx(t,e,r){var i=kx.exec(e.slice(r,r+2));return i?(t.H=+i[0],r+i[0].length):-1}function jx(t,e,r){var i=kx.exec(e.slice(r,r+2));return i?(t.M=+i[0],r+i[0].length):-1}function Wx(t,e,r){var i=kx.exec(e.slice(r,r+2));return i?(t.S=+i[0],r+i[0].length):-1}function Hx(t,e,r){var i=kx.exec(e.slice(r,r+3));return i?(t.L=+i[0],r+i[0].length):-1}function Ux(t,e,r){var i=kx.exec(e.slice(r,r+6));return i?(t.L=Math.floor(i[0]/1e3),r+i[0].length):-1}function Yx(t,e,r){var i=wx.exec(e.slice(r,r+1));return i?r+i[0].length:-1}function Gx(t,e,r){var i=kx.exec(e.slice(r));return i?(t.Q=+i[0],r+i[0].length):-1}function Vx(t,e,r){var i=kx.exec(e.slice(r));return i?(t.s=+i[0],r+i[0].length):-1}function Xx(t,e){return Sx(t.getDate(),e,2)}function Zx(t,e){return Sx(t.getHours(),e,2)}function Qx(t,e){return Sx(t.getHours()%12||12,e,2)}function Kx(t,e){return Sx(1+yb.count(ix(t),t),e,3)}function Jx(t,e){return Sx(t.getMilliseconds(),e,3)}function tC(t,e){return Jx(t,e)+"000"}function eC(t,e){return Sx(t.getMonth()+1,e,2)}function rC(t,e){return Sx(t.getMinutes(),e,2)}function iC(t,e){return Sx(t.getSeconds(),e,2)}function nC(t){var e=t.getDay();return 0===e?7:e}function oC(t,e){return Sx(vb.count(ix(t)-1,t),e,2)}function aC(t){var e=t.getDay();return e>=4||0===e?Mb(t):Mb.ceil(t)}function sC(t,e){return t=aC(t),Sx(Mb.count(ix(t),t)+(4===ix(t).getDay()),e,2)}function lC(t){return t.getDay()}function hC(t,e){return Sx(Sb.count(ix(t)-1,t),e,2)}function cC(t,e){return Sx(t.getFullYear()%100,e,2)}function uC(t,e){return Sx((t=aC(t)).getFullYear()%100,e,2)}function dC(t,e){return Sx(t.getFullYear()%1e4,e,4)}function fC(t,e){var r=t.getDay();return Sx((t=r>=4||0===r?Mb(t):Mb.ceil(t)).getFullYear()%1e4,e,4)}function pC(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Sx(e/60|0,"0",2)+Sx(e%60,"0",2)}function gC(t,e){return Sx(t.getUTCDate(),e,2)}function mC(t,e){return Sx(t.getUTCHours(),e,2)}function yC(t,e){return Sx(t.getUTCHours()%12||12,e,2)}function bC(t,e){return Sx(1+xb.count(ox(t),t),e,3)}function xC(t,e){return Sx(t.getUTCMilliseconds(),e,3)}function CC(t,e){return xC(t,e)+"000"}function _C(t,e){return Sx(t.getUTCMonth()+1,e,2)}function kC(t,e){return Sx(t.getUTCMinutes(),e,2)}function wC(t,e){return Sx(t.getUTCSeconds(),e,2)}function vC(t){var e=t.getUTCDay();return 0===e?7:e}function SC(t,e){return Sx(qb.count(ox(t)-1,t),e,2)}function TC(t){var e=t.getUTCDay();return e>=4||0===e?Wb(t):Wb.ceil(t)}function BC(t,e){return t=TC(t),Sx(Wb.count(ox(t),t)+(4===ox(t).getUTCDay()),e,2)}function MC(t){return t.getUTCDay()}function LC(t,e){return Sx(zb.count(ox(t)-1,t),e,2)}function FC(t,e){return Sx(t.getUTCFullYear()%100,e,2)}function AC(t,e){return Sx((t=TC(t)).getUTCFullYear()%100,e,2)}function EC(t,e){return Sx(t.getUTCFullYear()%1e4,e,4)}function $C(t,e){var r=t.getUTCDay();return Sx((t=r>=4||0===r?Wb(t):Wb.ceil(t)).getUTCFullYear()%1e4,e,4)}function OC(){return"+0000"}function DC(){return"%"}function IC(t){return+t}function NC(t){return Math.floor(+t/1e3)}function PC(t){return mx=gx(t),yx=mx.format,bx=mx.parse,xx=mx.utcFormat,Cx=mx.utcParse,mx}function qC(t){return new Date(t)}function zC(t){return t instanceof Date?+t:+new Date(+t)}function RC(t,e,r,i,n,o,a,s,l,h){var c=_y(),u=c.invert,d=c.domain,f=h(".%L"),p=h(":%S"),g=h("%I:%M"),m=h("%I %p"),y=h("%a %d"),b=h("%b %d"),x=h("%B"),C=h("%Y");function _(t){return(l(t)<t?f:s(t)<t?p:a(t)<t?g:o(t)<t?m:i(t)<t?n(t)<t?y:b:r(t)<t?x:C)(t)}return c.invert=function(t){return new Date(u(t))},c.domain=function(t){return arguments.length?d(Array.from(t,zC)):d().map(qC)},c.ticks=function(e){var r=d();return t(r[0],r[r.length-1],null==e?10:e)},c.tickFormat=function(t,e){return null==e?_:h(e)},c.nice=function(t){var r=d();return t&&"function"==typeof t.range||(t=e(r[0],r[r.length-1],null==t?10:t)),t?d(Ty(r,t)):c},c.copy=function(){return xy(c,RC(t,e,r,i,n,o,a,s,l,h))},c}function jC(){return ay.apply(RC(cx,ux,ix,Jb,vb,yb,fb,hb,sb,yx).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function WC(){return ay.apply(RC(lx,hx,ox,ex,qb,xb,gb,ub,sb,xx).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function HC(){var t,e,r,i,n,o=0,a=1,s=gy,l=!1;function h(e){return null==e||isNaN(e=+e)?n:s(0===r?.5:(e=(i(e)-t)*r,l?Math.max(0,Math.min(1,e)):e))}function c(t){return function(e){var r,i;return arguments.length?([r,i]=e,s=t(r,i),h):[s(0),s(1)]}}return h.domain=function(n){return arguments.length?([o,a]=n,t=i(o=+o),e=i(a=+a),r=t===e?0:1/(e-t),h):[o,a]},h.clamp=function(t){return arguments.length?(l=!!t,h):l},h.interpolator=function(t){return arguments.length?(s=t,h):s},h.range=c(Yi),h.rangeRound=c(ym),h.unknown=function(t){return arguments.length?(n=t,h):n},function(n){return i=n,t=n(o),e=n(a),r=t===e?0:1/(e-t),h}}function UC(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function YC(){var t=wy(HC()(gy));return t.copy=function(){return UC(t,YC())},sy.apply(t,arguments)}function GC(){var t=$y(HC()).domain([1,10]);return t.copy=function(){return UC(t,GC()).base(t.base())},sy.apply(t,arguments)}function VC(){var t=Ny(HC());return t.copy=function(){return UC(t,VC()).constant(t.constant())},sy.apply(t,arguments)}function XC(){var t=jy(HC());return t.copy=function(){return UC(t,XC()).exponent(t.exponent())},sy.apply(t,arguments)}function ZC(){return XC.apply(null,arguments).exponent(.5)}function QC(){var t=[],e=gy;function r(r){if(null!=r&&!isNaN(r=+r))return e((d(t,r,1)-1)/(t.length-1))}return r.domain=function(e){if(!arguments.length)return t.slice();t=[];for(let r of e)null==r||isNaN(r=+r)||t.push(r);return t.sort(i),r},r.interpolator=function(t){return arguments.length?(e=t,r):e},r.range=function(){return t.map((r,i)=>e(i/(t.length-1)))},r.quantiles=function(e){return Array.from({length:e+1},(r,i)=>_t(t,i/e))},r.copy=function(){return QC(e).domain(t)},sy.apply(r,arguments)}function KC(){var t,e,r,i,n,o,a,s=0,l=.5,h=1,c=1,u=gy,d=!1;function f(t){return isNaN(t=+t)?a:(t=.5+((t=+o(t))-e)*(c*t<c*e?i:n),u(d?Math.max(0,Math.min(1,t)):t))}function p(t){return function(e){var r,i,n;return arguments.length?([r,i,n]=e,u=Fm(t,[r,i,n]),f):[u(0),u(.5),u(1)]}}return f.domain=function(a){return arguments.length?([s,l,h]=a,t=o(s=+s),e=o(l=+l),r=o(h=+h),i=t===e?0:.5/(e-t),n=e===r?0:.5/(r-e),c=e<t?-1:1,f):[s,l,h]},f.clamp=function(t){return arguments.length?(d=!!t,f):d},f.interpolator=function(t){return arguments.length?(u=t,f):u},f.range=p(Yi),f.rangeRound=p(ym),f.unknown=function(t){return arguments.length?(a=t,f):a},function(a){return o=a,t=a(s),e=a(l),r=a(h),i=t===e?0:.5/(e-t),n=e===r?0:.5/(r-e),c=e<t?-1:1,f}}function JC(){var t=wy(KC()(gy));return t.copy=function(){return UC(t,JC())},sy.apply(t,arguments)}function t_(){var t=$y(KC()).domain([.1,1,10]);return t.copy=function(){return UC(t,t_()).base(t.base())},sy.apply(t,arguments)}function e_(){var t=Ny(KC());return t.copy=function(){return UC(t,e_()).constant(t.constant())},sy.apply(t,arguments)}function r_(){var t=jy(KC());return t.copy=function(){return UC(t,r_()).exponent(t.exponent())},sy.apply(t,arguments)}function i_(){return r_.apply(null,arguments).exponent(.5)}function n_(t){for(var e=t.length/6|0,r=new Array(e),i=0;i<e;)r[i]="#"+t.slice(6*i,6*++i);return r}PC({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"]});const o_=n_("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),a_=n_("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),s_=n_("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),l_=n_("4269d0efb118ff725c6cc5b03ca951ff8ab7a463f297bbf59c6b4e9498a0"),h_=n_("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),c_=n_("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),u_=n_("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),d_=n_("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),f_=n_("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),p_=n_("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),g_=n_("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),m_=t=>Oi(t[t.length-1]);var y_=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(n_);const b_=m_(y_);var x_=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(n_);const C_=m_(x_);var __=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(n_);const k_=m_(__);var w_=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(n_);const v_=m_(w_);var S_=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(n_);const T_=m_(S_);var B_=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(n_);const M_=m_(B_);var L_=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(n_);const F_=m_(L_);var A_=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(n_);const E_=m_(A_);var $_=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(n_);const O_=m_($_);var D_=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(n_);const I_=m_(D_);var N_=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(n_);const P_=m_(N_);var q_=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(n_);const z_=m_(q_);var R_=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(n_);const j_=m_(R_);var W_=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(n_);const H_=m_(W_);var U_=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(n_);const Y_=m_(U_);var G_=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(n_);const V_=m_(G_);var X_=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(n_);const Z_=m_(X_);var Q_=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(n_);const K_=m_(Q_);var J_=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(n_);const tk=m_(J_);var ek=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(n_);const rk=m_(ek);var ik=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(n_);const nk=m_(ik);var ok=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(n_);const ak=m_(ok);var sk=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(n_);const lk=m_(sk);var hk=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(n_);const ck=m_(hk);var uk=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(n_);const dk=m_(uk);var fk=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(n_);const pk=m_(fk);var gk=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(n_);const mk=m_(gk);function yk(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(-4.54-t*(35.34-t*(2381.73-t*(6402.7-t*(7024.72-2710.57*t)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-67.37*t)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-2475.67*t)))))))+")"}const bk=Lm(Ha(300,.5,0),Ha(-240,.5,1));var xk=Lm(Ha(-100,.75,.35),Ha(80,1.5,.8)),Ck=Lm(Ha(260,.75,.35),Ha(80,1.5,.8)),_k=Ha();function kk(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return _k.h=360*t-100,_k.s=1.5-1.5*e,_k.l=.8-.9*e,_k+""}var wk=ui(),vk=Math.PI/3,Sk=2*Math.PI/3;function Tk(t){var e;return t=(.5-t)*Math.PI,wk.r=255*(e=Math.sin(t))*e,wk.g=255*(e=Math.sin(t+vk))*e,wk.b=255*(e=Math.sin(t+Sk))*e,wk+""}function Bk(t){return t=Math.max(0,Math.min(1,t)),"rgb("+Math.max(0,Math.min(255,Math.round(34.61+t*(1172.33-t*(10793.56-t*(33300.12-t*(38394.49-14825.05*t)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+707.56*t)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-6838.66*t)))))))+")"}function Mk(t){var e=t.length;return function(r){return t[Math.max(0,Math.min(e-1,Math.floor(r*e)))]}}const Lk=Mk(n_("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var Fk=Mk(n_("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),Ak=Mk(n_("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),Ek=Mk(n_("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function $k(t){return Ir(kr(t).call(document.documentElement))}var Ok=0;function Dk(){return new Ik}function Ik(){this._="@"+(++Ok).toString(36)}function Nk(t,e){return t.target&&(t=Gi(t),void 0===e&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,t=>Vi(t,e))}function Pk(t){return"string"==typeof t?new $r([document.querySelectorAll(t)],[document.documentElement]):new $r([Se(t)],Er)}function qk(t){return function(){return t}}Ik.prototype=Dk.prototype={constructor:Ik,get:function(t){for(var e=this._;!(e in t);)if(!(t=t.parentNode))return;return t[e]},set:function(t,e){return t[this._]=e},remove:function(t){return this._ in t&&delete t[this._]},toString:function(){return this._}};const zk=Math.abs,Rk=Math.atan2,jk=Math.cos,Wk=Math.max,Hk=Math.min,Uk=Math.sin,Yk=Math.sqrt,Gk=1e-12,Vk=Math.PI,Xk=Vk/2,Zk=2*Vk;function Qk(t){return t>=1?Xk:t<=-1?-Xk:Math.asin(t)}function Kk(t){let e=3;return t.digits=function(r){if(!arguments.length)return e;if(null==r)e=null;else{const t=Math.floor(r);if(!(t>=0))throw new RangeError(`invalid digits: ${r}`);e=t}return t},()=>new ta(e)}function Jk(t){return t.innerRadius}function tw(t){return t.outerRadius}function ew(t){return t.startAngle}function rw(t){return t.endAngle}function iw(t){return t&&t.padAngle}function nw(t,e,r,i,n,o,a){var s=t-r,l=e-i,h=(a?o:-o)/Yk(s*s+l*l),c=h*l,u=-h*s,d=t+c,f=e+u,p=r+c,g=i+u,m=(d+p)/2,y=(f+g)/2,b=p-d,x=g-f,C=b*b+x*x,_=n-o,k=d*g-p*f,w=(x<0?-1:1)*Yk(Wk(0,_*_*C-k*k)),v=(k*x-b*w)/C,S=(-k*b-x*w)/C,T=(k*x+b*w)/C,B=(-k*b+x*w)/C,M=v-m,L=S-y,F=T-m,A=B-y;return M*M+L*L>F*F+A*A&&(v=T,S=B),{cx:v,cy:S,x01:-c,y01:-u,x11:v*(n/_-1),y11:S*(n/_-1)}}function ow(){var t=Jk,e=tw,r=qk(0),i=null,n=ew,o=rw,a=iw,s=null,l=Kk(h);function h(){var h,c,u,d=+t.apply(this,arguments),f=+e.apply(this,arguments),p=n.apply(this,arguments)-Xk,g=o.apply(this,arguments)-Xk,m=zk(g-p),y=g>p;if(s||(s=h=l()),f<d&&(c=f,f=d,d=c),f>Gk)if(m>Zk-Gk)s.moveTo(f*jk(p),f*Uk(p)),s.arc(0,0,f,p,g,!y),d>Gk&&(s.moveTo(d*jk(g),d*Uk(g)),s.arc(0,0,d,g,p,y));else{var b,x,C=p,_=g,k=p,w=g,v=m,S=m,T=a.apply(this,arguments)/2,B=T>Gk&&(i?+i.apply(this,arguments):Yk(d*d+f*f)),M=Hk(zk(f-d)/2,+r.apply(this,arguments)),L=M,F=M;if(B>Gk){var A=Qk(B/d*Uk(T)),E=Qk(B/f*Uk(T));(v-=2*A)>Gk?(k+=A*=y?1:-1,w-=A):(v=0,k=w=(p+g)/2),(S-=2*E)>Gk?(C+=E*=y?1:-1,_-=E):(S=0,C=_=(p+g)/2)}var $=f*jk(C),O=f*Uk(C),D=d*jk(w),I=d*Uk(w);if(M>Gk){var N,P=f*jk(_),q=f*Uk(_),z=d*jk(k),R=d*Uk(k);if(m<Vk)if(N=function(t,e,r,i,n,o,a,s){var l=r-t,h=i-e,c=a-n,u=s-o,d=u*l-c*h;if(!(d*d<Gk))return[t+(d=(c*(e-o)-u*(t-n))/d)*l,e+d*h]}($,O,z,R,P,q,D,I)){var j=$-N[0],W=O-N[1],H=P-N[0],U=q-N[1],Y=1/Uk(((u=(j*H+W*U)/(Yk(j*j+W*W)*Yk(H*H+U*U)))>1?0:u<-1?Vk:Math.acos(u))/2),G=Yk(N[0]*N[0]+N[1]*N[1]);L=Hk(M,(d-G)/(Y-1)),F=Hk(M,(f-G)/(Y+1))}else L=F=0}S>Gk?F>Gk?(b=nw(z,R,$,O,f,F,y),x=nw(P,q,D,I,f,F,y),s.moveTo(b.cx+b.x01,b.cy+b.y01),F<M?s.arc(b.cx,b.cy,F,Rk(b.y01,b.x01),Rk(x.y01,x.x01),!y):(s.arc(b.cx,b.cy,F,Rk(b.y01,b.x01),Rk(b.y11,b.x11),!y),s.arc(0,0,f,Rk(b.cy+b.y11,b.cx+b.x11),Rk(x.cy+x.y11,x.cx+x.x11),!y),s.arc(x.cx,x.cy,F,Rk(x.y11,x.x11),Rk(x.y01,x.x01),!y))):(s.moveTo($,O),s.arc(0,0,f,C,_,!y)):s.moveTo($,O),d>Gk&&v>Gk?L>Gk?(b=nw(D,I,P,q,d,-L,y),x=nw($,O,z,R,d,-L,y),s.lineTo(b.cx+b.x01,b.cy+b.y01),L<M?s.arc(b.cx,b.cy,L,Rk(b.y01,b.x01),Rk(x.y01,x.x01),!y):(s.arc(b.cx,b.cy,L,Rk(b.y01,b.x01),Rk(b.y11,b.x11),!y),s.arc(0,0,d,Rk(b.cy+b.y11,b.cx+b.x11),Rk(x.cy+x.y11,x.cx+x.x11),y),s.arc(x.cx,x.cy,L,Rk(x.y11,x.x11),Rk(x.y01,x.x01),!y))):s.arc(0,0,d,w,k,y):s.lineTo(D,I)}else s.moveTo(0,0);if(s.closePath(),h)return s=null,h+""||null}return h.centroid=function(){var r=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,i=(+n.apply(this,arguments)+ +o.apply(this,arguments))/2-Vk/2;return[jk(i)*r,Uk(i)*r]},h.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:qk(+e),h):t},h.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:qk(+t),h):e},h.cornerRadius=function(t){return arguments.length?(r="function"==typeof t?t:qk(+t),h):r},h.padRadius=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:qk(+t),h):i},h.startAngle=function(t){return arguments.length?(n="function"==typeof t?t:qk(+t),h):n},h.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:qk(+t),h):o},h.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:qk(+t),h):a},h.context=function(t){return arguments.length?(s=null==t?null:t,h):s},h}var aw=Array.prototype.slice;function sw(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}function lw(t){this._context=t}function hw(t){return new lw(t)}function cw(t){return t[0]}function uw(t){return t[1]}function dw(t,e){var r=qk(!0),i=null,n=hw,o=null,a=Kk(s);function s(s){var l,h,c,u=(s=sw(s)).length,d=!1;for(null==i&&(o=n(c=a())),l=0;l<=u;++l)!(l<u&&r(h=s[l],l,s))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+t(h,l,s),+e(h,l,s));if(c)return o=null,c+""||null}return t="function"==typeof t?t:void 0===t?cw:qk(t),e="function"==typeof e?e:void 0===e?uw:qk(e),s.x=function(e){return arguments.length?(t="function"==typeof e?e:qk(+e),s):t},s.y=function(t){return arguments.length?(e="function"==typeof t?t:qk(+t),s):e},s.defined=function(t){return arguments.length?(r="function"==typeof t?t:qk(!!t),s):r},s.curve=function(t){return arguments.length?(n=t,null!=i&&(o=n(i)),s):n},s.context=function(t){return arguments.length?(null==t?i=o=null:o=n(i=t),s):i},s}function fw(t,e,r){var i=null,n=qk(!0),o=null,a=hw,s=null,l=Kk(h);function h(h){var c,u,d,f,p,g=(h=sw(h)).length,m=!1,y=new Array(g),b=new Array(g);for(null==o&&(s=a(p=l())),c=0;c<=g;++c){if(!(c<g&&n(f=h[c],c,h))===m)if(m=!m)u=c,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),d=c-1;d>=u;--d)s.point(y[d],b[d]);s.lineEnd(),s.areaEnd()}m&&(y[c]=+t(f,c,h),b[c]=+e(f,c,h),s.point(i?+i(f,c,h):y[c],r?+r(f,c,h):b[c]))}if(p)return s=null,p+""||null}function c(){return dw().defined(n).curve(a).context(o)}return t="function"==typeof t?t:void 0===t?cw:qk(+t),e="function"==typeof e?e:qk(void 0===e?0:+e),r="function"==typeof r?r:void 0===r?uw:qk(+r),h.x=function(e){return arguments.length?(t="function"==typeof e?e:qk(+e),i=null,h):t},h.x0=function(e){return arguments.length?(t="function"==typeof e?e:qk(+e),h):t},h.x1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:qk(+t),h):i},h.y=function(t){return arguments.length?(e="function"==typeof t?t:qk(+t),r=null,h):e},h.y0=function(t){return arguments.length?(e="function"==typeof t?t:qk(+t),h):e},h.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:qk(+t),h):r},h.lineX0=h.lineY0=function(){return c().x(t).y(e)},h.lineY1=function(){return c().x(t).y(r)},h.lineX1=function(){return c().x(i).y(e)},h.defined=function(t){return arguments.length?(n="function"==typeof t?t:qk(!!t),h):n},h.curve=function(t){return arguments.length?(a=t,null!=o&&(s=a(o)),h):a},h.context=function(t){return arguments.length?(null==t?o=s=null:s=a(o=t),h):o},h}function pw(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function gw(t){return t}function mw(){var t=gw,e=pw,r=null,i=qk(0),n=qk(Zk),o=qk(0);function a(a){var s,l,h,c,u,d=(a=sw(a)).length,f=0,p=new Array(d),g=new Array(d),m=+i.apply(this,arguments),y=Math.min(Zk,Math.max(-Zk,n.apply(this,arguments)-m)),b=Math.min(Math.abs(y)/d,o.apply(this,arguments)),x=b*(y<0?-1:1);for(s=0;s<d;++s)(u=g[p[s]=s]=+t(a[s],s,a))>0&&(f+=u);for(null!=e?p.sort(function(t,r){return e(g[t],g[r])}):null!=r&&p.sort(function(t,e){return r(a[t],a[e])}),s=0,h=f?(y-d*x)/f:0;s<d;++s,m=c)l=p[s],c=m+((u=g[l])>0?u*h:0)+x,g[l]={data:a[l],index:s,value:u,startAngle:m,endAngle:c,padAngle:b};return g}return a.value=function(e){return arguments.length?(t="function"==typeof e?e:qk(+e),a):t},a.sortValues=function(t){return arguments.length?(e=t,r=null,a):e},a.sort=function(t){return arguments.length?(r=t,e=null,a):r},a.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:qk(+t),a):i},a.endAngle=function(t){return arguments.length?(n="function"==typeof t?t:qk(+t),a):n},a.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:qk(+t),a):o},a}lw.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&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)}}};var yw=xw(hw);function bw(t){this._curve=t}function xw(t){function e(e){return new bw(t(e))}return e._curve=t,e}function Cw(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(t){return arguments.length?e(xw(t)):e()._curve},t}function _w(){return Cw(dw().curve(yw))}function kw(){var t=fw().curve(yw),e=t.curve,r=t.lineX0,i=t.lineX1,n=t.lineY0,o=t.lineY1;return t.angle=t.x,delete t.x,t.startAngle=t.x0,delete t.x0,t.endAngle=t.x1,delete t.x1,t.radius=t.y,delete t.y,t.innerRadius=t.y0,delete t.y0,t.outerRadius=t.y1,delete t.y1,t.lineStartAngle=function(){return Cw(r())},delete t.lineX0,t.lineEndAngle=function(){return Cw(i())},delete t.lineX1,t.lineInnerRadius=function(){return Cw(n())},delete t.lineY0,t.lineOuterRadius=function(){return Cw(o())},delete t.lineY1,t.curve=function(t){return arguments.length?e(xw(t)):e()._curve},t}function ww(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}bw.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),e*-Math.cos(t))}};class vw{constructor(t,e){this._context=t,this._x=e}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line}point(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._x?this._context.bezierCurveTo(this._x0=(this._x0+t)/2,this._y0,this._x0,e,t,e):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+e)/2,t,this._y0,t,e)}this._x0=t,this._y0=e}}class Sw{constructor(t){this._context=t}lineStart(){this._point=0}lineEnd(){}point(t,e){if(t=+t,e=+e,0===this._point)this._point=1;else{const r=ww(this._x0,this._y0),i=ww(this._x0,this._y0=(this._y0+e)/2),n=ww(t,this._y0),o=ww(t,e);this._context.moveTo(...r),this._context.bezierCurveTo(...i,...n,...o)}this._x0=t,this._y0=e}}function Tw(t){return new vw(t,!0)}function Bw(t){return new vw(t,!1)}function Mw(t){return new Sw(t)}function Lw(t){return t.source}function Fw(t){return t.target}function Aw(t){let e=Lw,r=Fw,i=cw,n=uw,o=null,a=null,s=Kk(l);function l(){let l;const h=aw.call(arguments),c=e.apply(this,h),u=r.apply(this,h);if(null==o&&(a=t(l=s())),a.lineStart(),h[0]=c,a.point(+i.apply(this,h),+n.apply(this,h)),h[0]=u,a.point(+i.apply(this,h),+n.apply(this,h)),a.lineEnd(),l)return a=null,l+""||null}return l.source=function(t){return arguments.length?(e=t,l):e},l.target=function(t){return arguments.length?(r=t,l):r},l.x=function(t){return arguments.length?(i="function"==typeof t?t:qk(+t),l):i},l.y=function(t){return arguments.length?(n="function"==typeof t?t:qk(+t),l):n},l.context=function(e){return arguments.length?(null==e?o=a=null:a=t(o=e),l):o},l}function Ew(){return Aw(Tw)}function $w(){return Aw(Bw)}function Ow(){const t=Aw(Mw);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const Dw=Yk(3),Iw={draw(t,e){const r=.59436*Yk(e+Hk(e/28,.75)),i=r/2,n=i*Dw;t.moveTo(0,r),t.lineTo(0,-r),t.moveTo(-n,-i),t.lineTo(n,i),t.moveTo(-n,i),t.lineTo(n,-i)}},Nw={draw(t,e){const r=Yk(e/Vk);t.moveTo(r,0),t.arc(0,0,r,0,Zk)}},Pw={draw(t,e){const r=Yk(e/5)/2;t.moveTo(-3*r,-r),t.lineTo(-r,-r),t.lineTo(-r,-3*r),t.lineTo(r,-3*r),t.lineTo(r,-r),t.lineTo(3*r,-r),t.lineTo(3*r,r),t.lineTo(r,r),t.lineTo(r,3*r),t.lineTo(-r,3*r),t.lineTo(-r,r),t.lineTo(-3*r,r),t.closePath()}},qw=Yk(1/3),zw=2*qw,Rw={draw(t,e){const r=Yk(e/zw),i=r*qw;t.moveTo(0,-r),t.lineTo(i,0),t.lineTo(0,r),t.lineTo(-i,0),t.closePath()}},jw={draw(t,e){const r=.62625*Yk(e);t.moveTo(0,-r),t.lineTo(r,0),t.lineTo(0,r),t.lineTo(-r,0),t.closePath()}},Ww={draw(t,e){const r=.87559*Yk(e-Hk(e/7,2));t.moveTo(-r,0),t.lineTo(r,0),t.moveTo(0,r),t.lineTo(0,-r)}},Hw={draw(t,e){const r=Yk(e),i=-r/2;t.rect(i,i,r,r)}},Uw={draw(t,e){const r=.4431*Yk(e);t.moveTo(r,r),t.lineTo(r,-r),t.lineTo(-r,-r),t.lineTo(-r,r),t.closePath()}},Yw=Uk(Vk/10)/Uk(7*Vk/10),Gw=Uk(Zk/10)*Yw,Vw=-jk(Zk/10)*Yw,Xw={draw(t,e){const r=Yk(.8908130915292852*e),i=Gw*r,n=Vw*r;t.moveTo(0,-r),t.lineTo(i,n);for(let e=1;e<5;++e){const o=Zk*e/5,a=jk(o),s=Uk(o);t.lineTo(s*r,-a*r),t.lineTo(a*i-s*n,s*i+a*n)}t.closePath()}},Zw=Yk(3),Qw={draw(t,e){const r=-Yk(e/(3*Zw));t.moveTo(0,2*r),t.lineTo(-Zw*r,-r),t.lineTo(Zw*r,-r),t.closePath()}},Kw=Yk(3),Jw={draw(t,e){const r=.6824*Yk(e),i=r/2,n=r*Kw/2;t.moveTo(0,-r),t.lineTo(n,i),t.lineTo(-n,i),t.closePath()}},tv=-.5,ev=Yk(3)/2,rv=1/Yk(12),iv=3*(rv/2+1),nv={draw(t,e){const r=Yk(e/iv),i=r/2,n=r*rv,o=i,a=r*rv+r,s=-o,l=a;t.moveTo(i,n),t.lineTo(o,a),t.lineTo(s,l),t.lineTo(tv*i-ev*n,ev*i+tv*n),t.lineTo(tv*o-ev*a,ev*o+tv*a),t.lineTo(tv*s-ev*l,ev*s+tv*l),t.lineTo(tv*i+ev*n,tv*n-ev*i),t.lineTo(tv*o+ev*a,tv*a-ev*o),t.lineTo(tv*s+ev*l,tv*l-ev*s),t.closePath()}},ov={draw(t,e){const r=.6189*Yk(e-Hk(e/6,1.7));t.moveTo(-r,-r),t.lineTo(r,r),t.moveTo(-r,r),t.lineTo(r,-r)}},av=[Nw,Pw,Rw,Hw,Xw,Qw,nv],sv=[Nw,Ww,ov,Jw,Iw,Uw,jw];function lv(t,e){let r=null,i=Kk(n);function n(){let n;if(r||(r=n=i()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),n)return r=null,n+""||null}return t="function"==typeof t?t:qk(t||Nw),e="function"==typeof e?e:qk(void 0===e?64:+e),n.type=function(e){return arguments.length?(t="function"==typeof e?e:qk(e),n):t},n.size=function(t){return arguments.length?(e="function"==typeof t?t:qk(+t),n):e},n.context=function(t){return arguments.length?(r=null==t?null:t,n):r},n}function hv(){}function cv(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 uv(t){this._context=t}function dv(t){return new uv(t)}function fv(t){this._context=t}function pv(t){return new fv(t)}function gv(t){this._context=t}function mv(t){return new gv(t)}function yv(t,e){this._basis=new uv(t),this._beta=e}uv.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:cv(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},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:cv(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},fv.prototype={areaStart:hv,areaEnd:hv,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)}},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:cv(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},gv.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||0!==this._line&&3===this._point)&&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:cv(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},yv.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,r=t.length-1;if(r>0)for(var i,n=t[0],o=e[0],a=t[r]-n,s=e[r]-o,l=-1;++l<=r;)i=l/r,this._basis.point(this._beta*t[l]+(1-this._beta)*(n+i*a),this._beta*e[l]+(1-this._beta)*(o+i*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const bv=function t(e){function r(t){return 1===e?new uv(t):new yv(t,e)}return r.beta=function(e){return t(+e)},r}(.85);function xv(t,e,r){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-r),t._x2,t._y2)}function Cv(t,e){this._context=t,this._k=(1-e)/6}Cv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:xv(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&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,this._x1=t,this._y1=e;break;case 2:this._point=3;default:xv(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const _v=function t(e){function r(t){return new Cv(t,e)}return r.tension=function(e){return t(+e)},r}(0);function kv(t,e){this._context=t,this._k=(1-e)/6}kv.prototype={areaStart:hv,areaEnd:hv,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:xv(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const wv=function t(e){function r(t){return new kv(t,e)}return r.tension=function(e){return t(+e)},r}(0);function vv(t,e){this._context=t,this._k=(1-e)/6}vv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&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,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:xv(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Sv=function t(e){function r(t){return new vv(t,e)}return r.tension=function(e){return t(+e)},r}(0);function Tv(t,e,r){var i=t._x1,n=t._y1,o=t._x2,a=t._y2;if(t._l01_a>Gk){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,n=(n*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Gk){var h=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,c=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*h+t._x1*t._l23_2a-e*t._l12_2a)/c,a=(a*h+t._y1*t._l23_2a-r*t._l12_2a)/c}t._context.bezierCurveTo(i,n,o,a,t._x2,t._y2)}function Bv(t,e){this._context=t,this._alpha=e}Bv.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Tv(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Mv=function t(e){function r(t){return e?new Bv(t,e):new Cv(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Lv(t,e){this._context=t,this._alpha=e}Lv.prototype={areaStart:hv,areaEnd:hv,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Tv(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Fv=function t(e){function r(t){return e?new Lv(t,e):new kv(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function Av(t,e){this._context=t,this._alpha=e}Av.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Tv(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const Ev=function t(e){function r(t){return e?new Av(t,e):new vv(t,0)}return r.alpha=function(e){return t(+e)},r}(.5);function $v(t){this._context=t}function Ov(t){return new $v(t)}function Dv(t){return t<0?-1:1}function Iv(t,e,r){var i=t._x1-t._x0,n=e-t._x1,o=(t._y1-t._y0)/(i||n<0&&-0),a=(r-t._y1)/(n||i<0&&-0),s=(o*n+a*i)/(i+n);return(Dv(o)+Dv(a))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs(s))||0}function Nv(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function Pv(t,e,r){var i=t._x0,n=t._y0,o=t._x1,a=t._y1,s=(o-i)/3;t._context.bezierCurveTo(i+s,n+s*e,o-s,a-s*r,o,a)}function qv(t){this._context=t}function zv(t){this._context=new Rv(t)}function Rv(t){this._context=t}function jv(t){return new qv(t)}function Wv(t){return new zv(t)}function Hv(t){this._context=t}function Uv(t){var e,r,i=t.length-1,n=new Array(i),o=new Array(i),a=new Array(i);for(n[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<i-1;++e)n[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(n[i-1]=2,o[i-1]=7,a[i-1]=8*t[i-1]+t[i],e=1;e<i;++e)r=n[e]/o[e-1],o[e]-=r,a[e]-=r*a[e-1];for(n[i-1]=a[i-1]/o[i-1],e=i-2;e>=0;--e)n[e]=(a[e]-n[e+1])/o[e];for(o[i-1]=(t[i]+n[i-1])/2,e=0;e<i-1;++e)o[e]=2*t[e+1]-n[e+1];return[n,o]}function Yv(t){return new Hv(t)}function Gv(t,e){this._context=t,this._t=e}function Vv(t){return new Gv(t,.5)}function Xv(t){return new Gv(t,0)}function Zv(t){return new Gv(t,1)}function Qv(t,e){if((n=t.length)>1)for(var r,i,n,o=1,a=t[e[0]],s=a.length;o<n;++o)for(i=a,a=t[e[o]],r=0;r<s;++r)a[r][1]+=a[r][0]=isNaN(i[r][1])?i[r][0]:i[r][1]}function Kv(t){for(var e=t.length,r=new Array(e);--e>=0;)r[e]=e;return r}function Jv(t,e){return t[e]}function tS(t){const e=[];return e.key=t,e}function eS(){var t=qk([]),e=Kv,r=Qv,i=Jv;function n(n){var o,a,s=Array.from(t.apply(this,arguments),tS),l=s.length,h=-1;for(const t of n)for(o=0,++h;o<l;++o)(s[o][h]=[0,+i(t,s[o].key,h,n)]).data=t;for(o=0,a=sw(e(s));o<l;++o)s[a[o]].index=o;return r(s,a),s}return n.keys=function(e){return arguments.length?(t="function"==typeof e?e:qk(Array.from(e)),n):t},n.value=function(t){return arguments.length?(i="function"==typeof t?t:qk(+t),n):i},n.order=function(t){return arguments.length?(e=null==t?Kv:"function"==typeof t?t:qk(Array.from(t)),n):e},n.offset=function(t){return arguments.length?(r=null==t?Qv:t,n):r},n}function rS(t,e){if((i=t.length)>0){for(var r,i,n,o=0,a=t[0].length;o<a;++o){for(n=r=0;r<i;++r)n+=t[r][o][1]||0;if(n)for(r=0;r<i;++r)t[r][o][1]/=n}Qv(t,e)}}function iS(t,e){if((s=t.length)>0)for(var r,i,n,o,a,s,l=0,h=t[e[0]].length;l<h;++l)for(o=a=0,r=0;r<s;++r)(n=(i=t[e[r]][l])[1]-i[0])>0?(i[0]=o,i[1]=o+=n):n<0?(i[1]=a,i[0]=a+=n):(i[0]=0,i[1]=n)}function nS(t,e){if((r=t.length)>0){for(var r,i=0,n=t[e[0]],o=n.length;i<o;++i){for(var a=0,s=0;a<r;++a)s+=t[a][i][1]||0;n[i][1]+=n[i][0]=-s/2}Qv(t,e)}}function oS(t,e){if((n=t.length)>0&&(i=(r=t[e[0]]).length)>0){for(var r,i,n,o=0,a=1;a<i;++a){for(var s=0,l=0,h=0;s<n;++s){for(var c=t[e[s]],u=c[a][1]||0,d=(u-(c[a-1][1]||0))/2,f=0;f<s;++f){var p=t[e[f]];d+=(p[a][1]||0)-(p[a-1][1]||0)}l+=u,h+=d*u}r[a-1][1]+=r[a-1][0]=o,l&&(o-=h/l)}r[a-1][1]+=r[a-1][0]=o,Qv(t,e)}}function aS(t){var e=t.map(sS);return Kv(t).sort(function(t,r){return e[t]-e[r]})}function sS(t){for(var e,r=-1,i=0,n=t.length,o=-1/0;++r<n;)(e=+t[r][1])>o&&(o=e,i=r);return i}function lS(t){var e=t.map(hS);return Kv(t).sort(function(t,r){return e[t]-e[r]})}function hS(t){for(var e,r=0,i=-1,n=t.length;++i<n;)(e=+t[i][1])&&(r+=e);return r}function cS(t){return lS(t).reverse()}function uS(t){var e,r,i=t.length,n=t.map(hS),o=aS(t),a=0,s=0,l=[],h=[];for(e=0;e<i;++e)r=o[e],a<s?(a+=n[r],l.push(r)):(s+=n[r],h.push(r));return h.reverse().concat(l)}function dS(t){return Kv(t).reverse()}$v.prototype={areaStart:hv,areaEnd:hv,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))}},qv.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:Pv(this,this._t0,Nv(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(e=+e,(t=+t)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,Pv(this,Nv(this,r=Iv(this,t,e)),r);break;default:Pv(this,this._t0,r=Iv(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}},(zv.prototype=Object.create(qv.prototype)).point=function(t,e){qv.prototype.point.call(this,e,t)},Rv.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,o){this._context.bezierCurveTo(e,t,i,r,o,n)}},Hv.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]),2===r)this._context.lineTo(t[1],e[1]);else for(var i=Uv(t),n=Uv(e),o=0,a=1;a<r;++o,++a)this._context.bezierCurveTo(i[0][o],n[0][o],i[1][o],n[1][o],t[a],e[a]);(this._line||0!==this._line&&1===r)&&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)}},Gv.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&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&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)}}this._x=t,this._y=e}};var fS="%Y-%m-%dT%H:%M:%S.%LZ",pS=Date.prototype.toISOString?function(t){return t.toISOString()}:xx(fS);const gS=pS;var mS=+new Date("2000-01-01T00:00:00.000Z")?function(t){var e=new Date(t);return isNaN(e)?null:e}:Cx(fS);const yS=mS;function bS(t,e,r){var i=new ln,n=e;return null==e?(i.restart(t,e,r),i):(i._restart=i.restart,i.restart=function(t,e,r){e=+e,r=null==r?an():+r,i._restart(function o(a){a+=n,i._restart(o,n+=e,r),t(a)},e,r)},i.restart(t,e,r),i)}const xS=t=>()=>t;function CS(t,{sourceEvent:e,target:r,transform:i,dispatch:n}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:r,enumerable:!0,configurable:!0},transform:{value:i,enumerable:!0,configurable:!0},_:{value:n}})}function _S(t,e,r){this.k=t,this.x=e,this.y=r}_S.prototype={constructor:_S,scale:function(t){return 1===t?this:new _S(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new _S(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+")"}};var kS=new _S(1,0,0);function wS(t){for(;!t.__zoom;)if(!(t=t.parentNode))return kS;return t.__zoom}function vS(t){t.stopImmediatePropagation()}function SS(t){t.preventDefault(),t.stopImmediatePropagation()}function TS(t){return!(t.ctrlKey&&"wheel"!==t.type||t.button)}function BS(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t).hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]:[[0,0],[t.clientWidth,t.clientHeight]]}function MS(){return this.__zoom||kS}function LS(t){return-t.deltaY*(1===t.deltaMode?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function FS(){return navigator.maxTouchPoints||"ontouchstart"in this}function AS(t,e,r){var i=t.invertX(e[0][0])-r[0][0],n=t.invertX(e[1][0])-r[1][0],o=t.invertY(e[0][1])-r[0][1],a=t.invertY(e[1][1])-r[1][1];return t.translate(n>i?(i+n)/2:Math.min(0,i)||Math.max(0,n),a>o?(o+a)/2:Math.min(0,o)||Math.max(0,a))}function ES(){var t,e,r,i=TS,n=BS,o=AS,a=LS,s=FS,l=[0,1/0],h=[[-1/0,-1/0],[1/0,1/0]],c=250,u=xm,d=ke("start","zoom","end"),f=0,p=10;function g(t){t.property("__zoom",MS).on("wheel.zoom",k,{passive:!1}).on("mousedown.zoom",w).on("dblclick.zoom",v).filter(s).on("touchstart.zoom",S).on("touchmove.zoom",T).on("touchend.zoom touchcancel.zoom",B).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function m(t,e){return(e=Math.max(l[0],Math.min(l[1],e)))===t.k?t:new _S(e,t.x,t.y)}function y(t,e,r){var i=e[0]-r[0]*t.k,n=e[1]-r[1]*t.k;return i===t.x&&n===t.y?t:new _S(t.k,i,n)}function b(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function x(t,e,r,i){t.on("start.zoom",function(){C(this,arguments).event(i).start()}).on("interrupt.zoom end.zoom",function(){C(this,arguments).event(i).end()}).tween("zoom",function(){var t=this,o=arguments,a=C(t,o).event(i),s=n.apply(t,o),l=null==r?b(s):"function"==typeof r?r.apply(t,o):r,h=Math.max(s[1][0]-s[0][0],s[1][1]-s[0][1]),c=t.__zoom,d="function"==typeof e?e.apply(t,o):e,f=u(c.invert(l).concat(h/c.k),d.invert(l).concat(h/d.k));return function(t){if(1===t)t=d;else{var e=f(t),r=h/e[2];t=new _S(r,l[0]-e[0]*r,l[1]-e[1]*r)}a.zoom(null,t)}})}function C(t,e,r){return!r&&t.__zooming||new _(t,e)}function _(t,e){this.that=t,this.args=e,this.active=0,this.sourceEvent=null,this.extent=n.apply(t,e),this.taps=0}function k(t,...e){if(i.apply(this,arguments)){var r=C(this,e).event(t),n=this.__zoom,s=Math.max(l[0],Math.min(l[1],n.k*Math.pow(2,a.apply(this,arguments)))),c=Vi(t);if(r.wheel)r.mouse[0][0]===c[0]&&r.mouse[0][1]===c[1]||(r.mouse[1]=n.invert(r.mouse[0]=c)),clearTimeout(r.wheel);else{if(n.k===s)return;r.mouse=[c,n.invert(c)],_n(this),r.start()}SS(t),r.wheel=setTimeout(function(){r.wheel=null,r.end()},150),r.zoom("mouse",o(y(m(n,s),r.mouse[0],r.mouse[1]),r.extent,h))}}function w(t,...e){if(!r&&i.apply(this,arguments)){var n=t.currentTarget,a=C(this,e,!0).event(t),s=Ir(t.view).on("mousemove.zoom",function(t){if(SS(t),!a.moved){var e=t.clientX-c,r=t.clientY-u;a.moved=e*e+r*r>f}a.event(t).zoom("mouse",o(y(a.that.__zoom,a.mouse[0]=Vi(t,n),a.mouse[1]),a.extent,h))},!0).on("mouseup.zoom",function(t){s.on("mousemove.zoom mouseup.zoom",null),jr(t.view,a.moved),SS(t),a.event(t).end()},!0),l=Vi(t,n),c=t.clientX,u=t.clientY;Rr(t.view),vS(t),a.mouse=[l,this.__zoom.invert(l)],_n(this),a.start()}}function v(t,...e){if(i.apply(this,arguments)){var r=this.__zoom,a=Vi(t.changedTouches?t.changedTouches[0]:t,this),s=r.invert(a),l=r.k*(t.shiftKey?.5:2),u=o(y(m(r,l),a,s),n.apply(this,e),h);SS(t),c>0?Ir(this).transition().duration(c).call(x,u,a,t):Ir(this).call(g.transform,u,a,t)}}function S(r,...n){if(i.apply(this,arguments)){var o,a,s,l,h=r.touches,c=h.length,u=C(this,n,r.changedTouches.length===c).event(r);for(vS(r),a=0;a<c;++a)l=[l=Vi(s=h[a],this),this.__zoom.invert(l),s.identifier],u.touch0?u.touch1||u.touch0[2]===l[2]||(u.touch1=l,u.taps=0):(u.touch0=l,o=!0,u.taps=1+!!t);t&&(t=clearTimeout(t)),o&&(u.taps<2&&(e=l[0],t=setTimeout(function(){t=null},500)),_n(this),u.start())}}function T(t,...e){if(this.__zooming){var r,i,n,a,s=C(this,e).event(t),l=t.changedTouches,c=l.length;for(SS(t),r=0;r<c;++r)n=Vi(i=l[r],this),s.touch0&&s.touch0[2]===i.identifier?s.touch0[0]=n:s.touch1&&s.touch1[2]===i.identifier&&(s.touch1[0]=n);if(i=s.that.__zoom,s.touch1){var u=s.touch0[0],d=s.touch0[1],f=s.touch1[0],p=s.touch1[1],g=(g=f[0]-u[0])*g+(g=f[1]-u[1])*g,b=(b=p[0]-d[0])*b+(b=p[1]-d[1])*b;i=m(i,Math.sqrt(g/b)),n=[(u[0]+f[0])/2,(u[1]+f[1])/2],a=[(d[0]+p[0])/2,(d[1]+p[1])/2]}else{if(!s.touch0)return;n=s.touch0[0],a=s.touch0[1]}s.zoom("touch",o(y(i,n,a),s.extent,h))}}function B(t,...i){if(this.__zooming){var n,o,a=C(this,i).event(t),s=t.changedTouches,l=s.length;for(vS(t),r&&clearTimeout(r),r=setTimeout(function(){r=null},500),n=0;n<l;++n)o=s[n],a.touch0&&a.touch0[2]===o.identifier?delete a.touch0:a.touch1&&a.touch1[2]===o.identifier&&delete a.touch1;if(a.touch1&&!a.touch0&&(a.touch0=a.touch1,delete a.touch1),a.touch0)a.touch0[1]=this.__zoom.invert(a.touch0[0]);else if(a.end(),2===a.taps&&(o=Vi(o,this),Math.hypot(e[0]-o[0],e[1]-o[1])<p)){var h=Ir(this).on("dblclick.zoom");h&&h.apply(this,arguments)}}}return g.transform=function(t,e,r,i){var n=t.selection?t.selection():t;n.property("__zoom",MS),t!==n?x(t,e,r,i):n.interrupt().each(function(){C(this,arguments).event(i).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()})},g.scaleBy=function(t,e,r,i){g.scaleTo(t,function(){return this.__zoom.k*("function"==typeof e?e.apply(this,arguments):e)},r,i)},g.scaleTo=function(t,e,r,i){g.transform(t,function(){var t=n.apply(this,arguments),i=this.__zoom,a=null==r?b(t):"function"==typeof r?r.apply(this,arguments):r,s=i.invert(a),l="function"==typeof e?e.apply(this,arguments):e;return o(y(m(i,l),a,s),t,h)},r,i)},g.translateBy=function(t,e,r,i){g.transform(t,function(){return o(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof r?r.apply(this,arguments):r),n.apply(this,arguments),h)},null,i)},g.translateTo=function(t,e,r,i,a){g.transform(t,function(){var t=n.apply(this,arguments),a=this.__zoom,s=null==i?b(t):"function"==typeof i?i.apply(this,arguments):i;return o(kS.translate(s[0],s[1]).scale(a.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof r?-r.apply(this,arguments):-r),t,h)},i,a)},_.prototype={event:function(t){return t&&(this.sourceEvent=t),this},start:function(){return 1===++this.active&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(t,e){return this.mouse&&"mouse"!==t&&(this.mouse[1]=e.invert(this.mouse[0])),this.touch0&&"touch"!==t&&(this.touch0[1]=e.invert(this.touch0[0])),this.touch1&&"touch"!==t&&(this.touch1[1]=e.invert(this.touch1[0])),this.that.__zoom=e,this.emit("zoom"),this},end:function(){return 0===--this.active&&(delete this.that.__zooming,this.emit("end")),this},emit:function(t){var e=Ir(this.that).datum();d.call(t,this.that,new CS(t,{sourceEvent:this.sourceEvent,target:g,type:t,transform:this.that.__zoom,dispatch:d}),e)}},g.wheelDelta=function(t){return arguments.length?(a="function"==typeof t?t:xS(+t),g):a},g.filter=function(t){return arguments.length?(i="function"==typeof t?t:xS(!!t),g):i},g.touchable=function(t){return arguments.length?(s="function"==typeof t?t:xS(!!t),g):s},g.extent=function(t){return arguments.length?(n="function"==typeof t?t:xS([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),g):n},g.scaleExtent=function(t){return arguments.length?(l[0]=+t[0],l[1]=+t[1],g):[l[0],l[1]]},g.translateExtent=function(t){return arguments.length?(h[0][0]=+t[0][0],h[1][0]=+t[1][0],h[0][1]=+t[0][1],h[1][1]=+t[1][1],g):[[h[0][0],h[0][1]],[h[1][0],h[1][1]]]},g.constrain=function(t){return arguments.length?(o=t,g):o},g.duration=function(t){return arguments.length?(c=+t,g):c},g.interpolate=function(t){return arguments.length?(u=t,g):u},g.on=function(){var t=d.on.apply(d,arguments);return t===d?g:t},g.clickDistance=function(t){return arguments.length?(f=(t=+t)*t,g):Math.sqrt(f)},g.tapDistance=function(t){return arguments.length?(p=+t,g):p},g}wS.prototype=_S.prototype},3384(t,e,r){r.d(e,{Graph:()=>I}),r.r(e);var i=r(47845),n=r(50405),o=r(7817),a=r(51568),s=r(68282),l=r(97342),h=r(88748),c=r(96956),u=r(31475),d=r(34517),f=r(71140),p=r(92888),g=Object.prototype.hasOwnProperty;const m=function(t){if(null==t)return!0;if((0,u.default)(t)&&((0,c.default)(t)||"string"==typeof t||"function"==typeof t.splice||(0,d.default)(t)||(0,p.default)(t)||(0,h.default)(t)))return!t.length;var e=(0,l.default)(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if((0,f.default)(t))return!(0,s.default)(t).length;for(var r in t)if(g.call(t,r))return!1;return!0};var y=r(28539),b=r(34501),x=r(91130),C=r(50695),_=r(25567),k=r(47216);const w=function(t){return t!=t},v=function(t,e){return!(null==t||!t.length)&&function(t,e,r){return e==e?function(t,e,r){for(var i=r-1,n=t.length;++i<n;)if(t[i]===e)return i;return-1}(t,e,r):(0,k.default)(t,w,r)}(t,e,0)>-1},S=function(t,e,r){for(var i=-1,n=null==t?0:t.length;++i<n;)if(r(e,t[i]))return!0;return!1};var T=r(62026),B=r(28574);var M=r(39922),L=B.default&&1/(0,M.default)(new B.default([,-0]))[1]==1/0?function(t){return new B.default(t)}:function(){};const F=L;var A=r(40376);const E=(0,C.default)(function(t){return function(t,e,r){var i=-1,n=v,o=t.length,a=!0,s=[],l=s;if(r)a=!1,n=S;else if(o>=200){var h=e?null:F(t);if(h)return(0,M.default)(h);a=!1,n=T.default,l=new _.default}else l=e?[]:s;t:for(;++i<o;){var c=t[i],u=e?e(c):c;if(c=r||0!==c?c:0,a&&u==u){for(var d=l.length;d--;)if(l[d]===u)continue t;e&&l.push(u),s.push(c)}else n(l,u,r)||(l!==s&&l.push(u),s.push(c))}return s}((0,x.default)(t,1,A.default,!0))});var $=r(12643),O=r(11815),D="\0";class I{constructor(t={}){this._isDirected=!Object.prototype.hasOwnProperty.call(t,"directed")||t.directed,this._isMultigraph=!!Object.prototype.hasOwnProperty.call(t,"multigraph")&&t.multigraph,this._isCompound=!!Object.prototype.hasOwnProperty.call(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=i.default(void 0),this._defaultEdgeLabelFn=i.default(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[D]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}isDirected(){return this._isDirected}isMultigraph(){return this._isMultigraph}isCompound(){return this._isCompound}setGraph(t){return this._label=t,this}graph(){return this._label}setDefaultNodeLabel(t){return n.default(t)||(t=i.default(t)),this._defaultNodeLabelFn=t,this}nodeCount(){return this._nodeCount}nodes(){return o.default(this._nodes)}sources(){var t=this;return a.default(this.nodes(),function(e){return m(t._in[e])})}sinks(){var t=this;return a.default(this.nodes(),function(e){return m(t._out[e])})}setNodes(t,e){var r=arguments,i=this;return y.default(t,function(t){r.length>1?i.setNode(t,e):i.setNode(t)}),this}setNode(t,e){return Object.prototype.hasOwnProperty.call(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=e),this):(this._nodes[t]=arguments.length>1?e:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=D,this._children[t]={},this._children[D][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)}node(t){return this._nodes[t]}hasNode(t){return Object.prototype.hasOwnProperty.call(this._nodes,t)}removeNode(t){if(Object.prototype.hasOwnProperty.call(this._nodes,t)){var e=t=>this.removeEdge(this._edgeObjs[t]);delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],y.default(this.children(t),t=>{this.setParent(t)}),delete this._children[t]),y.default(o.default(this._in[t]),e),delete this._in[t],delete this._preds[t],y.default(o.default(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this}setParent(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(b.default(e))e=D;else{for(var r=e+="";!b.default(r);r=this.parent(r))if(r===t)throw new Error("Setting "+e+" as parent of "+t+" would create a cycle");this.setNode(e)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=e,this._children[e][t]=!0,this}_removeFromParentsChildList(t){delete this._children[this._parent[t]][t]}parent(t){if(this._isCompound){var e=this._parent[t];if(e!==D)return e}}children(t){if(b.default(t)&&(t=D),this._isCompound){var e=this._children[t];if(e)return o.default(e)}else{if(t===D)return this.nodes();if(this.hasNode(t))return[]}}predecessors(t){var e=this._preds[t];if(e)return o.default(e)}successors(t){var e=this._sucs[t];if(e)return o.default(e)}neighbors(t){var e=this.predecessors(t);if(e)return E(e,this.successors(t))}isLeaf(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length}filterNodes(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var r=this;y.default(this._nodes,function(r,i){t(i)&&e.setNode(i,r)}),y.default(this._edgeObjs,function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,r.edge(t))});var i={};function n(t){var o=r.parent(t);return void 0===o||e.hasNode(o)?(i[t]=o,o):o in i?i[o]:n(o)}return this._isCompound&&y.default(e.nodes(),function(t){e.setParent(t,n(t))}),e}setDefaultEdgeLabel(t){return n.default(t)||(t=i.default(t)),this._defaultEdgeLabelFn=t,this}edgeCount(){return this._edgeCount}edges(){return $.default(this._edgeObjs)}setPath(t,e){var r=this,i=arguments;return O.default(t,function(t,n){return i.length>1?r.setEdge(t,n,e):r.setEdge(t,n),n}),this}setEdge(){var t,e,r,i,n=!1,o=arguments[0];"object"==typeof o&&null!==o&&"v"in o?(t=o.v,e=o.w,r=o.name,2===arguments.length&&(i=arguments[1],n=!0)):(t=o,e=arguments[1],r=arguments[3],arguments.length>2&&(i=arguments[2],n=!0)),t=""+t,e=""+e,b.default(r)||(r=""+r);var a=q(this._isDirected,t,e,r);if(Object.prototype.hasOwnProperty.call(this._edgeLabels,a))return n&&(this._edgeLabels[a]=i),this;if(!b.default(r)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[a]=n?i:this._defaultEdgeLabelFn(t,e,r);var s=function(t,e,r,i){var n=""+e,o=""+r;if(!t&&n>o){var a=n;n=o,o=a}var s={v:n,w:o};return i&&(s.name=i),s}(this._isDirected,t,e,r);return t=s.v,e=s.w,Object.freeze(s),this._edgeObjs[a]=s,N(this._preds[e],t),N(this._sucs[t],e),this._in[e][a]=s,this._out[t][a]=s,this._edgeCount++,this}edge(t,e,r){var i=1===arguments.length?z(this._isDirected,arguments[0]):q(this._isDirected,t,e,r);return this._edgeLabels[i]}hasEdge(t,e,r){var i=1===arguments.length?z(this._isDirected,arguments[0]):q(this._isDirected,t,e,r);return Object.prototype.hasOwnProperty.call(this._edgeLabels,i)}removeEdge(t,e,r){var i=1===arguments.length?z(this._isDirected,arguments[0]):q(this._isDirected,t,e,r),n=this._edgeObjs[i];return n&&(t=n.v,e=n.w,delete this._edgeLabels[i],delete this._edgeObjs[i],P(this._preds[e],t),P(this._sucs[t],e),delete this._in[e][i],delete this._out[t][i],this._edgeCount--),this}inEdges(t,e){var r=this._in[t];if(r){var i=$.default(r);return e?a.default(i,function(t){return t.v===e}):i}}outEdges(t,e){var r=this._out[t];if(r){var i=$.default(r);return e?a.default(i,function(t){return t.w===e}):i}}nodeEdges(t,e){var r=this.inEdges(t,e);if(r)return r.concat(this.outEdges(t,e))}}function N(t,e){t[e]?t[e]++:t[e]=1}function P(t,e){--t[e]||delete t[e]}function q(t,e,r,i){var n=""+e,o=""+r;if(!t&&n>o){var a=n;n=o,o=a}return n+""+o+""+(b.default(i)?"\0":i)}function z(t,e){return q(t,e.v,e.w,e.name)}I.prototype._nodeCount=0,I.prototype._edgeCount=0},58558(t,e,r){r.r(e),r.d(e,{Graph:()=>i.Graph,version:()=>n});var i=r(3384);const n="2.1.9-pre"},97519(t,e,r){function i(t,e){this.v=t,this.k=e}function n(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function o(t,e){return function(t){if(Array.isArray(t))return t}(t)||function(t,e){var r=null==t?null:"undefined"!=typeof Symbol&&t[Symbol.iterator]||t["@@iterator"];if(null!=r){var i,n,o,a,s=[],l=!0,h=!1;try{if(o=(r=r.call(t)).next,0===e){if(Object(r)!==r)return;l=!1}else for(;!(l=(i=o.call(r)).done)&&(s.push(i.value),s.length!==e);l=!0);}catch(t){h=!0,n=t}finally{try{if(!l&&null!=r.return&&(a=r.return(),Object(a)!==a))return}finally{if(h)throw n}}return s}}(t,e)||function(t,e){if(t){if("string"==typeof t)return n(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?n(t,e):void 0}}(t,e)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function a(t){var e,r;function n(e,r){try{var a=t[e](r),s=a.value,l=s instanceof i;Promise.resolve(l?s.v:s).then(function(r){if(l){var i="return"===e&&s.k?e:"next";if(!s.k||r.done)return n(i,r);r=t[i](r).value}o(!!a.done,r)},function(t){n("throw",t)})}catch(t){o(2,t)}}function o(t,i){2===t?e.reject(i):e.resolve({value:i,done:t}),(e=e.next)?n(e.key,e.arg):r=null}this._invoke=function(t,i){return new Promise(function(o,a){var s={key:t,arg:i,resolve:o,reject:a,next:null};r?r=r.next=s:(e=r=s,n(t,i))})},"function"!=typeof t.return&&(this.return=void 0)}r.r(e),r.d(e,{default:()=>_t}),a.prototype["function"==typeof Symbol&&Symbol.asyncIterator||"@@asyncIterator"]=function(){return this},a.prototype.next=function(t){return this._invoke("next",t)},a.prototype.throw=function(t){return this._invoke("throw",t)},a.prototype.return=function(t){return this._invoke("return",t)};const s=Object.entries,l=Object.setPrototypeOf,h=Object.isFrozen,c=Object.getPrototypeOf,u=Object.getOwnPropertyDescriptor;let d=Object.freeze,f=Object.seal,p=Object.create,g="undefined"!=typeof Reflect&&Reflect,m=g.apply,y=g.construct;d||(d=function(t){return t}),f||(f=function(t){return t}),m||(m=function(t,e){for(var r=arguments.length,i=new Array(r>2?r-2:0),n=2;n<r;n++)i[n-2]=arguments[n];return t.apply(e,i)}),y||(y=function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),i=1;i<e;i++)r[i-1]=arguments[i];return new t(...r)});const b=q(Array.prototype.forEach);Array.prototype.indexOf;const x=q(Array.prototype.lastIndexOf),C=q(Array.prototype.pop),_=q(Array.prototype.push);Array.prototype.slice;const k=q(Array.prototype.splice),w=Array.isArray,v=q(String.prototype.toLowerCase),S=q(String.prototype.toString),T=q(String.prototype.match),B=q(String.prototype.replace),M=q(String.prototype.indexOf),L=q(String.prototype.trim),F=q(Number.prototype.toString),A=q(Boolean.prototype.toString),E="undefined"==typeof BigInt?null:q(BigInt.prototype.toString),$="undefined"==typeof Symbol?null:q(Symbol.prototype.toString),O=q(Object.prototype.hasOwnProperty),D=q(Object.prototype.toString),I=q(RegExp.prototype.test),N=(P=TypeError,function(){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];return y(P,e)});var P;function q(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var r=arguments.length,i=new Array(r>1?r-1:0),n=1;n<r;n++)i[n-1]=arguments[n];return m(t,e,i)}}function z(t,e){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:v;if(l&&l(t,null),!w(e))return t;let i=e.length;for(;i--;){let n=e[i];if("string"==typeof n){const t=r(n);t!==n&&(h(e)||(e[i]=t),n=t)}t[n]=!0}return t}function R(t){for(let e=0;e<t.length;e++)O(t,e)||(t[e]=null);return t}function j(t){const e=p(null);for(const i of s(t)){var r=o(i,2);const n=r[0],a=r[1];O(t,n)&&(w(a)?e[n]=R(a):a&&"object"==typeof a&&a.constructor===Object?e[n]=j(a):e[n]=a)}return e}function W(t,e){for(;null!==t;){const r=u(t,e);if(r){if(r.get)return q(r.get);if("function"==typeof r.value)return q(r.value)}t=c(t)}return function(){return null}}const H=d(["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","search","section","select","shadow","slot","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"]),U=d(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","enterkeyhint","exportparts","filter","font","g","glyph","glyphref","hkern","image","inputmode","line","lineargradient","marker","mask","metadata","mpath","part","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Y=d(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),G=d(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),V=d(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),X=d(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Z=d(["#text"]),Q=d(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","command","commandfor","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","exportparts","face","for","headers","height","hidden","high","href","hreflang","id","inert","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","part","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","slot","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns"]),K=d(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dominant-baseline","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","mask-type","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","pointer-events","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-orientation","text-rendering","textlength","type","u1","u2","unicode","values","vector-effect","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"]),J=d(["accent","accentunder","align","bevelled","close","columnalign","columnlines","columnspacing","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lquote","lspace","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"]),tt=d(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),et=f(/{{[\w\W]*|^[\w\W]*}}/g),rt=f(/<%[\w\W]*|^[\w\W]*%>/g),it=f(/\${[\w\W]*/g),nt=f(/^data-[\-\w.\u00B7-\uFFFF]+$/),ot=f(/^aria-[\-\w]+$/),at=f(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),st=f(/^(?:\w+script|data):/i),lt=f(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),ht=f(/^html$/i),ct=f(/^[a-z][.\w]*(-[.\w]+)+$/i),ut=f(/<[/\w!]/g),dt=f(/<[/\w]/g),ft=f(/<\/no(script|embed|frames)/i),pt=f(/\/>/i),gt=["style","script","xmp","iframe","noembed","noframes","plaintext","noscript"],mt=d(z({},gt)),yt=function(){const t={};return b(gt,e=>{t[e]=f(new RegExp("</"+e+"(?=[\\t\\n\\f\\r />])","i"))}),d(t)}(),bt=function(){return"undefined"==typeof window?null:window},xt=function(t,e,r,i){return O(t,e)&&w(t[e])?z(i.base?j(i.base):{},t[e],i.transform):r},Ct=function(t,e,r){const i=O(t,e)?t[e]:void 0;return i&&"object"==typeof i?j(i):r()};var _t=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:bt();const r=e=>t(e);if(r.version="3.4.16",r.removed=[],!e||!e.document||9!==e.document.nodeType||!e.Element)return r.isSupported=!1,r;let i=e.document;const n=i,o=n.currentScript;e.DocumentFragment;const a=e.HTMLTemplateElement,l=e.Node,h=e.Element,c=e.NodeFilter;void 0===e.NamedNodeMap&&(e.NamedNodeMap||e.MozNamedAttrMap),e.HTMLFormElement;const u=e.DOMParser,g=e.trustedTypes,m=h.prototype,y=W(m,"cloneNode"),P=W(m,"remove"),q=W(m,"removeAttributeNode"),R=W(m,"nextSibling"),gt=W(m,"childNodes"),_t=W(m,"parentNode"),kt=W(m,"shadowRoot"),wt=W(m,"attributes"),vt=l&&l.prototype?W(l.prototype,"nodeType"):null,St=l&&l.prototype?W(l.prototype,"nodeName"):null,Tt=l&&l.prototype?W(l.prototype,"ownerDocument"):null,Bt=function(t){return vt?vt(t):t.nodeType},Mt=function(t){return St?St(t):t.nodeName};if("function"==typeof a){const t=i.createElement("template");t.content&&t.content.ownerDocument&&(i=t.content.ownerDocument)}let Lt,Ft,At="",Et=!1,$t=0;const Ot=function(){if($t>0)throw N('A configured TRUSTED_TYPES_POLICY callback (createHTML or createScriptURL) must not call DOMPurify.sanitize, as that causes infinite recursion. Do not pass a policy whose callbacks wrap DOMPurify as TRUSTED_TYPES_POLICY; see the "DOMPurify and Trusted Types" section of the README.')},Dt=function(t){Ot(),$t++;try{return Lt.createHTML(t)}finally{$t--}},It=i,Nt=It.implementation,Pt=It.createNodeIterator,qt=It.createDocumentFragment,zt=It.getElementsByTagName,Rt=n.importNode;let jt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]};r.isSupported="function"==typeof s&&"function"==typeof _t&&Nt&&void 0!==Nt.createHTMLDocument;const Wt=et,Ht=rt,Ut=it,Yt=nt,Gt=ot,Vt=st,Xt=lt,Zt=ct;let Qt=at,Kt=null;const Jt=z({},[...H,...U,...Y,...V,...Z]);let te=null;const ee=z({},[...Q,...K,...J,...tt]);let re=Object.seal(p(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}})),ie=null,ne=null;const oe=Object.seal(p(null,{tagCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeCheck:{writable:!0,configurable:!1,enumerable:!0,value:null}}));let ae=!0,se=!0,le=!1,he=!0,ce=!1,ue=!0,de=!1,fe=!1,pe=null,ge=null,me=!1,ye=!1,be=!1,xe=!1,Ce=!0,_e=!1;const ke="user-content-";let we=!0,ve=!1,Se={},Te=null;const Be=z({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","selectedcontent","style","svg","template","thead","title","video","xmp"]);let Me=null;const Le=z({},["audio","video","img","source","image","track"]);let Fe=null;const Ae=z({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),Ee="http://www.w3.org/1998/Math/MathML",$e="http://www.w3.org/2000/svg",Oe="http://www.w3.org/1999/xhtml";let De=Oe,Ie=!1,Ne=null;const Pe=z({},[Ee,$e,Oe],S),qe=d(["mi","mo","mn","ms","mtext"]);let ze=z({},qe);const Re=d(["annotation-xml"]);let je=z({},Re);const We=z({},["title","style","font","a","script"]);let He=null;const Ue=["application/xhtml+xml","text/html"];let Ye=null,Ge=null;const Ve=i.createElement("form"),Xe=function(t){return t instanceof RegExp||t instanceof Function},Ze=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(Ge&&Ge===t)return;t&&"object"==typeof t||(t={}),t=j(t),He=-1===Ue.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE,Ye="application/xhtml+xml"===He?S:v,Kt=xt(t,"ALLOWED_TAGS",Jt,{transform:Ye}),te=xt(t,"ALLOWED_ATTR",ee,{transform:Ye}),Ne=xt(t,"ALLOWED_NAMESPACES",Pe,{transform:S}),Fe=xt(t,"ADD_URI_SAFE_ATTR",Ae,{transform:Ye,base:Ae}),Me=xt(t,"ADD_DATA_URI_TAGS",Le,{transform:Ye,base:Le}),Te=xt(t,"FORBID_CONTENTS",Be,{transform:Ye}),ie=xt(t,"FORBID_TAGS",j({}),{transform:Ye}),ne=xt(t,"FORBID_ATTR",j({}),{transform:Ye}),Se=!!O(t,"USE_PROFILES")&&(t.USE_PROFILES&&"object"==typeof t.USE_PROFILES?j(t.USE_PROFILES):t.USE_PROFILES),ae=!1!==t.ALLOW_ARIA_ATTR,se=!1!==t.ALLOW_DATA_ATTR,le=t.ALLOW_UNKNOWN_PROTOCOLS||!1,he=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,ce=t.SAFE_FOR_TEMPLATES||!1,ue=!1!==t.SAFE_FOR_XML,de=t.WHOLE_DOCUMENT||!1,ye=t.RETURN_DOM||!1,be=t.RETURN_DOM_FRAGMENT||!1,xe=t.RETURN_TRUSTED_TYPE||!1,me=t.FORCE_BODY||!1,Ce=!1!==t.SANITIZE_DOM,_e=t.SANITIZE_NAMED_PROPS||!1,we=!1!==t.KEEP_CONTENT,ve=t.IN_PLACE||!1,Qt=function(t){try{return I(t,""),!0}catch(t){return!1}}(t.ALLOWED_URI_REGEXP)?t.ALLOWED_URI_REGEXP:at,De="string"==typeof t.NAMESPACE?t.NAMESPACE:Oe,ze=Ct(t,"MATHML_TEXT_INTEGRATION_POINTS",()=>z({},qe)),je=Ct(t,"HTML_INTEGRATION_POINTS",()=>z({},Re));const e=Ct(t,"CUSTOM_ELEMENT_HANDLING",()=>p(null));if(re=p(null),O(e,"tagNameCheck")&&Xe(e.tagNameCheck)&&(re.tagNameCheck=e.tagNameCheck),O(e,"attributeNameCheck")&&Xe(e.attributeNameCheck)&&(re.attributeNameCheck=e.attributeNameCheck),O(e,"allowCustomizedBuiltInElements")&&"boolean"==typeof e.allowCustomizedBuiltInElements&&(re.allowCustomizedBuiltInElements=e.allowCustomizedBuiltInElements),f(re),ce&&(se=!1),be&&(ye=!0),Se&&(Kt=z({},Z),te=p(null),!0===Se.html&&(z(Kt,H),z(te,Q)),!0===Se.svg&&(z(Kt,U),z(te,K),z(te,tt)),!0===Se.svgFilters&&(z(Kt,Y),z(te,K),z(te,tt)),!0===Se.mathMl&&(z(Kt,V),z(te,J),z(te,tt))),oe.tagCheck=null,oe.attributeCheck=null,O(t,"ADD_TAGS")&&("function"==typeof t.ADD_TAGS?oe.tagCheck=t.ADD_TAGS:w(t.ADD_TAGS)&&(Kt===Jt&&(Kt=j(Kt)),z(Kt,t.ADD_TAGS,Ye))),O(t,"ADD_ATTR")&&("function"==typeof t.ADD_ATTR?oe.attributeCheck=t.ADD_ATTR:w(t.ADD_ATTR)&&(te===ee&&(te=j(te)),z(te,t.ADD_ATTR,Ye))),O(t,"ADD_FORBID_CONTENTS")&&w(t.ADD_FORBID_CONTENTS)&&(Te===Be&&(Te=j(Te)),z(Te,t.ADD_FORBID_CONTENTS,Ye)),we&&(Kt["#text"]=!0),de&&z(Kt,["html","head","body"]),Kt.table&&(z(Kt,["tbody"]),delete ie.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw N('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw N('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');const e=Lt;Lt=t.TRUSTED_TYPES_POLICY;try{At=Dt("")}catch(t){throw Lt=e,t}}else null===t.TRUSTED_TYPES_POLICY?(Lt=void 0,At=""):(void 0===Lt&&(Et||(Ft=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let r=null;const i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(r=e.getAttribute(i));const n="dompurify"+(r?"#"+r:"");try{return t.createPolicy(n,{createHTML:t=>t,createScriptURL:t=>t})}catch(t){return console.warn("TrustedTypes policy "+n+" could not be created."),null}}(g,o),Et=!0),Lt=Ft),Lt&&"string"==typeof At&&(At=Dt("")));d&&d(t),Ge=t},Qe=z({},[...U,...Y,...G]),Ke=z({},[...V,...X]),Je=function(t){_(r.removed,{element:t});try{_t(t).removeChild(t)}catch(e){if(P(t),!_t(t))throw N("a node selected for removal could not be detached from its tree and cannot be safely returned; refusing to sanitize in place")}},tr=function(t,e,r){try{q(t,e)}catch(e){try{t.removeAttribute(r)}catch(t){}}},er=function(t){nr(t);const e=gt(t);if(e){const t=[];b(e,e=>{_(t,e)}),b(t,t=>{try{P(t)}catch(t){}})}const r=wt(t);if(r)for(let e=r.length-1;e>=0;--e){const i=r[e],n=i&&i.name;"string"==typeof n&&tr(t,i,n)}},rr=function(t,e,i){if(!i)try{i=e.getAttributeNode(t)}catch(t){i=null}_(r.removed,{attribute:i||null,from:e});try{i?q(e,i):e.removeAttribute(t)}catch(r){try{e.removeAttribute(t)}catch(t){}}if("is"===t)if(ye||be)try{Je(e)}catch(t){}else try{e.setAttribute(t,"")}catch(t){}},ir=function(t){const e=wt(t);if(e)for(let r=e.length-1;r>=0;--r){const i=e[r],n=i&&i.name;"string"!=typeof n||te[Ye(n)]||tr(t,i,n)}},nr=function(t){const e=[t];for(;e.length>0;){const t=e.pop();1===Bt(t)&&ir(t);const r=gt(t);if(r)for(let t=r.length-1;t>=0;--t)e.push(r[t])}},or=function(t,e){return!!ue&&("patchsrc"===t||"for"===t&&"label"!==e&&"output"!==e)},ar=function(t){let e=null,r=null;if(me)t="<remove></remove>"+t;else{const e=T(t,/^[\r\n\t ]+/);r=e&&e[0]}"application/xhtml+xml"===He&&De===Oe&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");const n=Lt?Dt(t):t;if(De===Oe)try{e=(new u).parseFromString(n,He)}catch(t){}if(!e||!e.documentElement){e=Nt.createDocument(De,"template",null);try{e.documentElement.innerHTML=Ie?At:n}catch(t){}}const o=e.body||e.documentElement;return t&&r&&o.insertBefore(i.createTextNode(r),o.childNodes[0]||null),De===Oe?zt.call(e,de?"html":"body")[0]:de?e.documentElement:o},sr=function(t){const e=Tt?Tt(t):t.ownerDocument;return Pt.call(e||t,t,c.SHOW_ELEMENT|c.SHOW_COMMENT|c.SHOW_TEXT|c.SHOW_PROCESSING_INSTRUCTION|c.SHOW_CDATA_SECTION,null)},lr=function(t){return t=B(t,Wt," "),t=B(t,Ht," "),B(t,Ut," ")},hr=function(t){var e;t.normalize();const r=Tt?Tt(t):t.ownerDocument,i=Pt.call(r||t,t,c.SHOW_TEXT|c.SHOW_COMMENT|c.SHOW_CDATA_SECTION|c.SHOW_PROCESSING_INSTRUCTION,null);let n=i.nextNode();for(;n;)n.data=lr(n.data),n=i.nextNode();const o=null===(e=t.querySelectorAll)||void 0===e?void 0:e.call(t,"template");o&&b(o,t=>{ur(t.content)&&hr(t.content)})},cr=function(t){const e=St?St(t):null;return"string"==typeof e&&"form"===Ye(e)&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||t.attributes!==wt(t)||"function"!=typeof t.removeAttribute||"function"!=typeof t.removeAttributeNode||"function"!=typeof t.getAttributeNode||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes||t.nodeType!==vt(t)||t.childNodes!==gt(t))},ur=function(t){if(!vt||"object"!=typeof t||null===t)return!1;try{return 11===vt(t)}catch(t){return!1}},dr=function(t){if(!vt||"object"!=typeof t||null===t)return!1;try{return"number"==typeof vt(t)}catch(t){return!1}};function fr(t,e,i){0!==t.length&&b(t,t=>{t.call(r,e,i,Ge)})}const pr=function(t,e){if(t instanceof RegExp)return I(t,e);if(t instanceof Function){for(var r=arguments.length,i=new Array(r>2?r-2:0),n=2;n<r;n++)i[n-2]=arguments[n];return Boolean(t(e,...i))}return!1},gr=function(t,e,r,i){return 0===t.length?e:e===r||e===i?j(e):e},mr=function(t,e){return t!==e&&null===_t(t)&&(ve&&nr(t),!0)},yr=function(t,e){if(fr(jt.beforeSanitizeElements,t,null),mr(t,e))return!0;if(cr(t))return Je(t),!0;const i=Ye(Mt(t));if(Kt=gr(jt.uponSanitizeElement,Kt,Jt,pe),fr(jt.uponSanitizeElement,t,{tagName:i,allowedTags:Kt}),mr(t,e))return!0;if(function(t,e){return!!(ue&&t.hasChildNodes()&&!dr(t.firstElementChild)&&I(ut,t.textContent)&&I(ut,t.innerHTML))||!!(ue&&t.namespaceURI===Oe&&mt[e]&&(dr(t.firstElementChild)||"string"==typeof t.textContent&&I(yt[e],t.textContent)))||7===t.nodeType||!(!ue||8!==t.nodeType||!I(dt,t.data))}(t,i))return Je(t),!0;if(ie[i]||!(oe.tagCheck instanceof Function&&oe.tagCheck(i))&&!Kt[i]){const r=function(t,e,r){if(!ie[e]&&Cr(e)&&pr(re.tagNameCheck,e))return!1;if(we&&!Te[e]){const e=_t(t),i=gt(t);if(i&&e)for(let n=i.length-1;n>=0;--n){const o=t===r?y(i[n],!0):i[n];e.insertBefore(o,R(t))}}return Je(t),!0}(t,i,e);return!(!1!==r||(fr(jt.afterSanitizeElements,t,null),!mr(t,e)))||r}if(1===Bt(t)&&!function(t){let e=_t(t);e&&e.tagName||(e={namespaceURI:De,tagName:"template"});const r=v(t.tagName),i=v(e.tagName);return!!Ne[t.namespaceURI]&&(t.namespaceURI===$e?function(t,e,r){return e.namespaceURI===Oe?"svg"===t:e.namespaceURI===Ee?"svg"===t&&("annotation-xml"===r||ze[r]):Boolean(Qe[t])}(r,e,i):t.namespaceURI===Ee?function(t,e,r){return e.namespaceURI===Oe?"math"===t:e.namespaceURI===$e?"math"===t&&je[r]:Boolean(Ke[t])}(r,e,i):t.namespaceURI===Oe?function(t,e,r){return!(e.namespaceURI===$e&&!je[r])&&!(e.namespaceURI===Ee&&!ze[r])&&!Ke[t]&&(We[t]||!Qe[t])}(r,e,i):!("application/xhtml+xml"!==He||!Ne[t.namespaceURI]))}(t))return Je(t),!0;if(("noscript"===i||"noembed"===i||"noframes"===i)&&I(ft,t.innerHTML))return Je(t),!0;if(ce&&3===t.nodeType){const e=lr(t.textContent);t.textContent!==e&&(_(r.removed,{element:t.cloneNode()}),t.textContent=e)}return fr(jt.afterSanitizeElements,t,null),mr(t,e)},br=function(t,e,r){if(ne[e])return!1;if(or(e,t))return!1;if(Ce&&("id"===e||"name"===e)&&(r in i||r in Ve))return!1;const n=te[e]||oe.attributeCheck instanceof Function&&oe.attributeCheck(e,t);return!(!se||!I(Yt,e))||!(!ae||!I(Gt,e))||(n?!(!Fe[e]&&!I(Qt,B(r,Xt,""))&&("src"!==e&&"xlink:href"!==e&&"href"!==e||"script"===t||0!==M(r,"data:")||!Me[t])&&(!le||I(Vt,B(r,Xt,"")))&&r):Cr(t)&&pr(re.tagNameCheck,t)&&pr(re.attributeNameCheck,e,t)||"is"===e&&re.allowCustomizedBuiltInElements&&pr(re.tagNameCheck,r))},xr=z({},["annotation-xml","color-profile","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","missing-glyph"]),Cr=function(t){return!xr[v(t)]&&I(Zt,t)},_r=function(t,e,r,i){if(Lt&&"object"==typeof g&&"function"==typeof g.getAttributeType&&!r)switch(g.getAttributeType(t,e)){case"TrustedHTML":return Dt(i);case"TrustedScriptURL":return function(t){Ot(),$t++;try{return Lt.createScriptURL(t)}finally{$t--}}(i)}return i},kr=function(t,e,r,i){try{return r?t.setAttributeNS(r,e,i):t.setAttribute(e,i),!cr(t)||(Je(t),!1)}catch(r){return rr(e,t),!1}},wr=function(t,e){if(fr(jt.beforeSanitizeAttributes,t,null),mr(t,e))return;const i=t.attributes;if(!i||cr(t))return;te=gr(jt.uponSanitizeAttribute,te,ee,ge);const n={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:te,forceKeepAttr:void 0};let o=i.length;const a=Ye(t.nodeName);for(;o--;){const e=i[o],s=e.name,l=e.namespaceURI,h=e.value,c=Ye(s),u=h;let d="value"===s?u:L(u),f=!1;n.attrName=c,n.attrValue=d,n.keepAttr=!0,n.forceKeepAttr=void 0,fr(jt.uponSanitizeAttribute,t,n),d=n.attrValue,!_e||"id"!==c&&"name"!==c||0===M(d,ke)||(rr(s,t,e),d=ke+d,f=!0),ue&&I(/((--!?|])>)|<\/(style|script|title|xmp|textarea|noscript|iframe|noembed|noframes)/i,d)||"attributename"===c&&T(d,"href")?rr(s,t,e):n.forceKeepAttr||(!n.keepAttr||!he&&I(pt,d)?rr(s,t,e):(ce&&(d=lr(d)),br(a,c,d)?(d=_r(a,c,l,d),d!==u&&kr(t,s,l,d)&&f&&C(r.removed)):rr(s,t,e)))}fr(jt.afterSanitizeAttributes,t,null),mr(t,e)},vr=function(t){let e=null;const r=sr(t);for(fr(jt.beforeSanitizeShadowDOM,t,null);e=r.nextNode();)if(fr(jt.uponSanitizeShadowNode,e,null),yr(e,t),wr(e,t),ur(e.content)&&vr(e.content),1===Bt(e)){const t=kt(e);ur(t)&&(Sr(t),vr(t))}fr(jt.afterSanitizeShadowDOM,t,null)},Sr=function(t){const e=[{node:t,shadow:null}];for(;e.length>0;){const t=e.pop();if(t.shadow){vr(t.shadow);continue}const r=t.node,i=1===Bt(r),n=gt(r);if(n)for(let t=n.length-1;t>=0;--t)e.push({node:n[t],shadow:null});if(i){const t=St?St(r):null;if("string"==typeof t&&"template"===Ye(t)){const t=r.content;ur(t)&&e.push({node:t,shadow:null})}}if(i){const t=kt(r);ur(t)&&e.push({node:null,shadow:t},{node:t,shadow:null})}}};return r.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,o=null,a=null,s=null;if(Ie=!t,Ie&&(t="\x3c!--\x3e"),"string"!=typeof t&&!dr(t)&&"string"!=typeof(t=function(t){switch(typeof t){case"string":return t;case"number":return F(t);case"boolean":return A(t);case"bigint":return E?E(t):"0";case"symbol":return $?$(t):"Symbol()";case"undefined":default:return D(t);case"function":case"object":{if(null===t)return D(t);const e=t,r=W(e,"toString");if("function"==typeof r){const t=r(e);return"string"==typeof t?t:D(t)}return D(t)}}}(t)))throw N("dirty is not a string, aborting");if(!r.isSupported)return t;fe?(Kt=pe,te=ge):Ze(e),(jt.uponSanitizeElement.length>0||jt.uponSanitizeAttribute.length>0)&&(Kt=j(Kt)),jt.uponSanitizeAttribute.length>0&&(te=j(te)),r.removed=[];const l=ve&&"string"!=typeof t&&dr(t);if(l){!function(t){if(!ue)return;const e=[t];for(;e.length>0;){const t=e.pop(),r=Bt(t);if(7===r||8===r&&I(dt,t.data)){try{P(t)}catch(t){}continue}if(1===r){const e=t,r=Ye(Mt(t));try{e.hasAttribute&&e.hasAttribute("patchsrc")&&e.removeAttribute("patchsrc"),e.hasAttribute&&e.hasAttribute("for")&&or("for",r)&&e.removeAttribute("for")}catch(t){}}const i=gt(t);if(i)for(let t=i.length-1;t>=0;--t)e.push(i[t])}}(t);const e=Mt(t);if("string"==typeof e){const r=Ye(e);if(!Kt[r]||ie[r])throw er(t),N("root node is forbidden and cannot be sanitized in-place")}if(cr(t))throw er(t),N("root node is clobbered and cannot be sanitized in-place");try{Sr(t)}catch(e){throw er(t),e}}else if(dr(t))i=ar("\x3c!----\x3e"),o=i.ownerDocument.importNode(t,!0),1===o.nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?i=o:i.appendChild(o),Sr(i);else{if(!ye&&!ce&&!de&&-1===t.indexOf("<"))return Lt&&xe?Dt(t):t;if(i=ar(t),!i)return ye?null:xe?At:""}i&&me&&Je(i.firstChild);const h=l?t:i;try{const t=sr(h);for(;a=t.nextNode();)yr(a,h),wr(a,h),ur(a.content)&&vr(a.content)}catch(e){throw l&&(er(t),b(r.removed,t=>{t.element&&nr(t.element)})),e}if(l){let e=!1;if(b(r.removed,r=>{r.element&&(r.element===t&&(e=!0),nr(r.element))}),e)throw N("a node selected for removal could not be safely returned; refusing to sanitize in place");return ce&&hr(t),t}if(ye){if(ce&&hr(i),be)for(s=qt.call(i.ownerDocument);i.firstChild;)s.appendChild(i.firstChild);else s=i;return(te.shadowroot||te.shadowrootmode)&&(s=Rt.call(n,s,!0)),s}let c=de?i.outerHTML:i.innerHTML;return de&&Kt["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&I(ht,i.ownerDocument.doctype.name)&&(c="<!DOCTYPE "+i.ownerDocument.doctype.name+">\n"+c),ce&&(c=lr(c)),Lt&&xe?Dt(c):c},r.setConfig=function(){Ze(arguments.length>0&&void 0!==arguments[0]?arguments[0]:{}),fe=!0,pe=Kt,ge=te},r.clearConfig=function(){Ge=null,fe=!1,pe=null,ge=null,Lt=Ft,At=""},r.isValidAttribute=function(t,e,r){Ge||Ze({});const i=Ye(t),n=Ye(e);return br(i,n,r)},r.addHook=function(t,e){"function"==typeof e&&O(jt,t)&&_(jt[t],e)},r.removeHook=function(t,e){if(O(jt,t)){if(void 0!==e){const r=x(jt[t],e);return-1===r?void 0:k(jt[t],r,1)[0]}return C(jt[t])}},r.removeHooks=function(t){O(jt,t)&&(jt[t]=[])},r.removeAllHooks=function(){jt={afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}},r}()},8850(t,e,r){function i(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":Object.prototype.toString.call(t)}r.r(e),r.d(e,{getTag:()=>i})},87125(t,e,r){r.r(e),r.d(e,{argumentsTag:()=>s,arrayBufferTag:()=>p,arrayTag:()=>d,bigInt64ArrayTag:()=>T,bigUint64ArrayTag:()=>k,booleanTag:()=>a,dataViewTag:()=>y,dateTag:()=>h,errorTag:()=>m,float32ArrayTag:()=>B,float64ArrayTag:()=>M,functionTag:()=>f,int16ArrayTag:()=>v,int32ArrayTag:()=>S,int8ArrayTag:()=>w,mapTag:()=>c,numberTag:()=>o,objectTag:()=>g,regexpTag:()=>i,setTag:()=>u,stringTag:()=>n,symbolTag:()=>l,uint16ArrayTag:()=>C,uint32ArrayTag:()=>_,uint8ArrayTag:()=>b,uint8ClampedArrayTag:()=>x});const i="[object RegExp]",n="[object String]",o="[object Number]",a="[object Boolean]",s="[object Arguments]",l="[object Symbol]",h="[object Date]",c="[object Map]",u="[object Set]",d="[object Array]",f="[object Function]",p="[object ArrayBuffer]",g="[object Object]",m="[object Error]",y="[object DataView]",b="[object Uint8Array]",x="[object Uint8ClampedArray]",C="[object Uint16Array]",_="[object Uint32Array]",k="[object BigUint64Array]",w="[object Int8Array]",v="[object Int16Array]",S="[object Int32Array]",T="[object BigInt64Array]",B="[object Float32Array]",M="[object Float64Array]"},30197(t,e,r){r.r(e),r.d(e,{isArguments:()=>n});var i=r(8850);function n(t){return null!==t&&"object"==typeof t&&"[object Arguments]"===(0,i.getTag)(t)}},8081(t,e,r){function i(t){return null!=t&&"function"!=typeof t&&function(t){return Number.isSafeInteger(t)&&t>=0}(t.length)}r.d(e,{isArrayLike:()=>i}),r.r(e)},76076(t,e,r){r.r(e),r.d(e,{isTypedArray:()=>n});var i=r(56813);function n(t){return(0,i.isTypedArray)(t)}},721(t,e,r){r.d(e,{isBuffer:()=>n}),r.r(e);const i="object"==typeof globalThis&&globalThis||"object"==typeof window&&window||"object"==typeof self&&self||"object"==typeof r.g&&r.g||function(){return this}();function n(t){return void 0!==i.Buffer&&i.Buffer.isBuffer(t)}},35349(t,e,r){function i(t){return null==t||"object"!=typeof t&&"function"!=typeof t}r.r(e),r.d(e,{isPrimitive:()=>i})},56813(t,e,r){function i(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}r.r(e),r.d(e,{isTypedArray:()=>i})},63545(t,e,r){r.d(e,{default:()=>a}),r.r(e);var i=r(45718),n=r(64607);const o=class{constructor(){this.type=n.TYPE.ALL}get(){return this.type}set(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t}reset(){this.type=n.TYPE.ALL}is(t){return this.type===t}},a=new class{constructor(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new o}set(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=n.TYPE.ALL,this}_ensureHSL(){const t=this.data,{h:e,s:r,l:n}=t;void 0===e&&(t.h=i.default.channel.rgb2hsl(t,"h")),void 0===r&&(t.s=i.default.channel.rgb2hsl(t,"s")),void 0===n&&(t.l=i.default.channel.rgb2hsl(t,"l"))}_ensureRGB(){const t=this.data,{r:e,g:r,b:n}=t;void 0===e&&(t.r=i.default.channel.hsl2rgb(t,"r")),void 0===r&&(t.g=i.default.channel.hsl2rgb(t,"g")),void 0===n&&(t.b=i.default.channel.hsl2rgb(t,"b"))}get r(){const t=this.data,e=t.r;return this.type.is(n.TYPE.HSL)||void 0===e?(this._ensureHSL(),i.default.channel.hsl2rgb(t,"r")):e}get g(){const t=this.data,e=t.g;return this.type.is(n.TYPE.HSL)||void 0===e?(this._ensureHSL(),i.default.channel.hsl2rgb(t,"g")):e}get b(){const t=this.data,e=t.b;return this.type.is(n.TYPE.HSL)||void 0===e?(this._ensureHSL(),i.default.channel.hsl2rgb(t,"b")):e}get h(){const t=this.data,e=t.h;return this.type.is(n.TYPE.RGB)||void 0===e?(this._ensureRGB(),i.default.channel.rgb2hsl(t,"h")):e}get s(){const t=this.data,e=t.s;return this.type.is(n.TYPE.RGB)||void 0===e?(this._ensureRGB(),i.default.channel.rgb2hsl(t,"s")):e}get l(){const t=this.data,e=t.l;return this.type.is(n.TYPE.RGB)||void 0===e?(this._ensureRGB(),i.default.channel.rgb2hsl(t,"l")):e}get a(){return this.data.a}set r(t){this.type.set(n.TYPE.RGB),this.changed=!0,this.data.r=t}set g(t){this.type.set(n.TYPE.RGB),this.changed=!0,this.data.g=t}set b(t){this.type.set(n.TYPE.RGB),this.changed=!0,this.data.b=t}set h(t){this.type.set(n.TYPE.HSL),this.changed=!0,this.data.h=t}set s(t){this.type.set(n.TYPE.HSL),this.changed=!0,this.data.s=t}set l(t){this.type.set(n.TYPE.HSL),this.changed=!0,this.data.l=t}set a(t){this.changed=!0,this.data.a=t}}({r:0,g:0,b:0,a:0},"transparent")},11028(t,e,r){r.d(e,{default:()=>g}),r.r(e);var i=r(63545),n=r(64607);const o={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(35!==t.charCodeAt(0))return;const e=t.match(o.re);if(!e)return;const r=e[1],n=parseInt(r,16),a=r.length,s=a%4==0,l=a>4,h=l?1:17,c=l?8:4,u=s?0:-1,d=l?255:15;return i.default.set({r:(n>>c*(u+3)&d)*h,g:(n>>c*(u+2)&d)*h,b:(n>>c*(u+1)&d)*h,a:s?(n&d)*h/255:1},t)},stringify:t=>{const{r:e,g:r,b:i,a:o}=t;return o<1?`#${n.DEC2HEX[Math.round(e)]}${n.DEC2HEX[Math.round(r)]}${n.DEC2HEX[Math.round(i)]}${n.DEC2HEX[Math.round(255*o)]}`:`#${n.DEC2HEX[Math.round(e)]}${n.DEC2HEX[Math.round(r)]}${n.DEC2HEX[Math.round(i)]}`}},a=o;var s=r(45718);const l={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(l.hueRe);if(e){const[,t,r]=e;switch(r){case"grad":return s.default.channel.clamp.h(.9*parseFloat(t));case"rad":return s.default.channel.clamp.h(180*parseFloat(t)/Math.PI);case"turn":return s.default.channel.clamp.h(360*parseFloat(t))}}return s.default.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(104!==e&&72!==e)return;const r=t.match(l.re);if(!r)return;const[,n,o,a,h,c]=r;return i.default.set({h:l._hue2deg(n),s:s.default.channel.clamp.s(parseFloat(o)),l:s.default.channel.clamp.l(parseFloat(a)),a:h?s.default.channel.clamp.a(c?parseFloat(h)/100:parseFloat(h)):1},t)},stringify:t=>{const{h:e,s:r,l:i,a:n}=t;return n<1?`hsla(${s.default.lang.round(e)}, ${s.default.lang.round(r)}%, ${s.default.lang.round(i)}%, ${n})`:`hsl(${s.default.lang.round(e)}, ${s.default.lang.round(r)}%, ${s.default.lang.round(i)}%)`}},h=l,c={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=c.colors[t];if(e)return a.parse(e)},stringify:t=>{const e=a.stringify(t);for(const t in c.colors)if(c.colors[t]===e)return t}},u=c,d={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(114!==e&&82!==e)return;const r=t.match(d.re);if(!r)return;const[,n,o,a,l,h,c,u,f]=r;return i.default.set({r:s.default.channel.clamp.r(o?2.55*parseFloat(n):parseFloat(n)),g:s.default.channel.clamp.g(l?2.55*parseFloat(a):parseFloat(a)),b:s.default.channel.clamp.b(c?2.55*parseFloat(h):parseFloat(h)),a:u?s.default.channel.clamp.a(f?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{const{r:e,g:r,b:i,a:n}=t;return n<1?`rgba(${s.default.lang.round(e)}, ${s.default.lang.round(r)}, ${s.default.lang.round(i)}, ${s.default.lang.round(n)})`:`rgb(${s.default.lang.round(e)}, ${s.default.lang.round(r)}, ${s.default.lang.round(i)})`}},f=d,p={format:{keyword:c,hex:a,rgb:d,rgba:d,hsl:l,hsla:l},parse:t=>{if("string"!=typeof t)return t;const e=a.parse(t)||f.parse(t)||h.parse(t)||u.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(n.TYPE.HSL)||void 0===t.data.r?h.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?f.stringify(t):a.stringify(t)},g=p},64607(t,e,r){r.r(e),r.d(e,{DEC2HEX:()=>n,TYPE:()=>o});var i=r(45718);const n={};for(let t=0;t<=255;t++)n[t]=i.default.unit.dec2hex(t);const o={ALL:0,RGB:1,HSL:2}},85944(t,e,r){r.r(e),r.d(e,{default:()=>o});var i=r(45718),n=r(11028);const o=(t,e,r)=>{const o=n.default.parse(t),a=o[e],s=i.default.channel.clamp[e](a+r);return a!==s&&(o[e]=s),n.default.stringify(o)}},36135(t,e,r){r.r(e),r.d(e,{default:()=>o});var i=r(45718),n=r(11028);const o=(t,e)=>{const r=n.default.parse(t);for(const t in e)r[t]=i.default.channel.clamp[t](e[t]);return n.default.stringify(r)}},87708(t,e,r){r.r(e),r.d(e,{default:()=>n});var i=r(85944);const n=(t,e)=>(0,i.default)(t,"l",-e)},1942(t,e,r){r.d(e,{default:()=>a}),r.r(e);var i=r(45718),n=r(11028);const o=t=>(t=>{const{r:e,g:r,b:o}=n.default.parse(t),a=.2126*i.default.channel.toLinear(e)+.7152*i.default.channel.toLinear(r)+.0722*i.default.channel.toLinear(o);return i.default.lang.round(a)})(t)>=.5,a=t=>!o(t)},47964(t,e,r){r.r(e),r.d(e,{default:()=>n});var i=r(85944);const n=(t,e)=>(0,i.default)(t,"l",e)},62209(t,e,r){r.r(e),r.d(e,{default:()=>s});var i=r(45718),n=r(63545),o=r(11028),a=r(36135);const s=(t,e,r=0,s=1)=>{if("number"!=typeof t)return(0,a.default)(t,{a:e});const l=n.default.set({r:i.default.channel.clamp.r(t),g:i.default.channel.clamp.g(e),b:i.default.channel.clamp.b(r),a:i.default.channel.clamp.a(s)});return o.default.stringify(l)}},45718(t,e,r){r.d(e,{default:()=>n}),r.r(e);const i={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+6*(e-t)*r:r<.5?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},n)=>{if(!e)return 2.55*r;t/=360,e/=100;const o=(r/=100)<.5?r*(1+e):r+e-r*e,a=2*r-o;switch(n){case"r":return 255*i.hue2rgb(a,o,t+1/3);case"g":return 255*i.hue2rgb(a,o,t);case"b":return 255*i.hue2rgb(a,o,t-1/3)}},rgb2hsl:({r:t,g:e,b:r},i)=>{t/=255,e/=255,r/=255;const n=Math.max(t,e,r),o=Math.min(t,e,r),a=(n+o)/2;if("l"===i)return 100*a;if(n===o)return 0;const s=n-o;if("s"===i)return 100*(a>.5?s/(2-n-o):s/(n+o));switch(n){case t:return 60*((e-r)/s+(e<r?6:0));case e:return 60*((r-t)/s+2);case r:return 60*((t-e)/s+4);default:return-1}}},n={channel:i,lang:{clamp:(t,e,r)=>e>r?Math.min(e,Math.max(r,t)):Math.min(r,Math.max(e,t)),round:t=>Math.round(1e10*t)/1e10},unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}}},6096(t,e,r){r.d(e,{default:()=>s}),r.r(e);var i=r(26979);const n=function(t,e){for(var r=t.length;r--;)if((0,i.default)(t[r][0],e))return r;return-1};var o=Array.prototype.splice;function a(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}a.prototype.clear=function(){this.__data__=[],this.size=0},a.prototype.delete=function(t){var e=this.__data__,r=n(e,t);return!(r<0||(r==e.length-1?e.pop():o.call(e,r,1),--this.size,0))},a.prototype.get=function(t){var e=this.__data__,r=n(e,t);return r<0?void 0:e[r][1]},a.prototype.has=function(t){return n(this.__data__,t)>-1},a.prototype.set=function(t,e){var r=this.__data__,i=n(r,t);return i<0?(++this.size,r.push([t,e])):r[i][1]=e,this};const s=a},25436(t,e,r){r.r(e),r.d(e,{default:()=>o});var i=r(50123),n=r(39600);const o=(0,i.default)(n.default,"Map")},13269(t,e,r){r.d(e,{default:()=>d}),r.r(e);const i=(0,r(50123).default)(Object,"create");var n=Object.prototype.hasOwnProperty;var o=Object.prototype.hasOwnProperty;function a(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}a.prototype.clear=function(){this.__data__=i?i(null):{},this.size=0},a.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e},a.prototype.get=function(t){var e=this.__data__;if(i){var r=e[t];return"__lodash_hash_undefined__"===r?void 0:r}return n.call(e,t)?e[t]:void 0},a.prototype.has=function(t){var e=this.__data__;return i?void 0!==e[t]:o.call(e,t)},a.prototype.set=function(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=i&&void 0===e?"__lodash_hash_undefined__":e,this};const s=a;var l=r(6096),h=r(25436);const c=function(t,e){var r,i,n=t.__data__;return("string"==(i=typeof(r=e))||"number"==i||"symbol"==i||"boolean"==i?"__proto__"!==r:null===r)?n["string"==typeof e?"string":"hash"]:n.map};function u(t){var e=-1,r=null==t?0:t.length;for(this.clear();++e<r;){var i=t[e];this.set(i[0],i[1])}}u.prototype.clear=function(){this.size=0,this.__data__={hash:new s,map:new(h.default||l.default),string:new s}},u.prototype.delete=function(t){var e=c(this,t).delete(t);return this.size-=e?1:0,e},u.prototype.get=function(t){return c(this,t).get(t)},u.prototype.has=function(t){return c(this,t).has(t)},u.prototype.set=function(t,e){var r=c(this,t),i=r.size;return r.set(t,e),this.size+=r.size==i?0:1,this};const d=u},28574(t,e,r){r.r(e),r.d(e,{default:()=>o});var i=r(50123),n=r(39600);const o=(0,i.default)(n.default,"Set")},25567(t,e,r){r.d(e,{default:()=>o}),r.r(e);var i=r(13269);function n(t){var e=-1,r=null==t?0:t.length;for(this.__data__=new i.default;++e<r;)this.add(t[e])}n.prototype.add=n.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},n.prototype.has=function(t){return this.__data__.has(t)};const o=n},36781(t,e,r){r.d(e,{default:()=>s}),r.r(e);var i=r(6096);var n=r(25436),o=r(13269);function a(t){var e=this.__data__=new i.default(t);this.size=e.size}a.prototype.clear=function(){this.__data__=new i.default,this.size=0},a.prototype.delete=function(t){var e=this.__data__,r=e.delete(t);return this.size=e.size,r},a.prototype.get=function(t){return this.__data__.get(t)},a.prototype.has=function(t){return this.__data__.has(t)},a.prototype.set=function(t,e){var r=this.__data__;if(r instanceof i.default){var a=r.__data__;if(!n.default||a.length<199)return a.push([t,e]),this.size=++r.size,this;r=this.__data__=new o.default(a)}return r.set(t,e),this.size=r.size,this};const s=a},83516(t,e,r){r.r(e),r.d(e,{default:()=>i});const i=r(39600).default.Symbol},97913(t,e,r){r.r(e),r.d(e,{default:()=>i});const i=r(39600).default.Uint8Array},87201(t,e,r){r.r(e),r.d(e,{default:()=>i});const i=function(t,e){for(var r=-1,i=null==t?0:t.length;++r<i&&!1!==e(t[r],r,t););return t}},56097(t,e,r){r.r(e),r.d(e,{default:()=>i});const i=function(t,e){for(var r=-1,i=null==t?0:t.length,n=0,o=[];++r<i;){var a=t[r];e(a,r,t)&&(o[n++]=a)}return o}},77252(t,e,r){r.d(e,{default:()=>h}),r.r(e);var i=r(88748),n=r(96956),o=r(34517),a=r(85378),s=r(92888),l=Object.prototype.hasOwnProperty;const h=function(t,e){var r=(0,n.default)(t),h=!r&&(0,i.default)(t),c=!r&&!h&&(0,o.default)(t),u=!r&&!h&&!c&&(0,s.default)(t),d=r||h||c||u,f=d?function(t,e){for(var r=-1,i=Array(t);++r<t;)i[r]=e(r);return i}(t.length,String):[],p=f.length;for(var g in t)!e&&!l.call(t,g)||d&&("length"==g||c&&("offset"==g||"parent"==g)||u&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||(0,a.default)(g,p))||f.push(g);return f}},65133(t,e,r){r.r(e),r.d(e,{default:()=>i});const i=function(t,e){for(var r=-1,i=null==t?0:t.length,n=Array(i);++r<i;)n[r]=e(t[r],r,t);return n}},53271(t,e,r){r.r(e),r.d(e,{default:()=>i});const i=function(t,e){for(var r=-1,i=e.length,n=t.length;++r<i;)t[n+r]=e[r];return t}},1987(t,e,r){r.d(e,{default:()=>o}),r.r(e);var i=r(19328),n=r(31475);const o=(a=i.default,function(t,e){if(null==t)return t;if(!(0,n.default)(t))return a(t,e);for(var r=t.length,i=-1,o=Object(t);++i<r&&!1!==e(o[i],i,o););return t});var a},47216(t,e,r){r.r(e),r.d(e,{default:()=>i});const i=function(t,e,r,i){for(var n=t.length,o=r+(i?1:-1);i?o--:++o<n;)if(e(t[o],o,t))return o;return-1}},91130(t,e,r){r.d(e,{default:()=>h}),r.r(e);var i=r(53271),n=r(83516),o=r(88748),a=r(96956),s=n.default?n.default.isConcatSpreadable:void 0;const l=function(t){return(0,a.default)(t)||(0,o.default)(t)||!!(s&&t&&t[s])},h=function t(e,r,n,o,a){var s=-1,h=e.length;for(n||(n=l),a||(a=[]);++s<h;){var c=e[s];r>0&&n(c)?r>1?t(c,r-1,n,o,a):(0,i.default)(a,c):o||(a[a.length]=c)}return a}},22857(t,e,r){r.d(e,{default:()=>i}),r.r(e);const i=function(t,e,r){for(var i=-1,n=Object(t),o=r(t),a=o.length;a--;){var s=o[++i];if(!1===e(n[s],s,n))break}return t}},19328(t,e,r){r.r(e),r.d(e,{default:()=>o});var i=r(22857),n=r(7817);const o=function(t,e){return t&&(0,i.default)(t,e,n.default)}},55841(t,e,r){r.r(e),r.d(e,{default:()=>o});var i=r(29333),n=r(9322);const o=function(t,e){for(var r=0,o=(e=(0,i.default)(e,t)).length;null!=t&&r<o;)t=t[(0,n.default)(e[r++])];return r&&r==o?t:void 0}},64494(t,e,r){r.r(e),r.d(e,{default:()=>o});var i=r(53271),n=r(96956);const o=function(t,e,r){var o=e(t);return(0,n.default)(t)?o:(0,i.default)(o,r(t))}},4044(t,e,r){r.d(e,{default:()=>c}),r.r(e);var i=r(83516),n=Object.prototype,o=n.hasOwnProperty,a=n.toString,s=i.default?i.default.toStringTag:void 0;var l=Object.prototype.toString;var h=i.default?i.default.toStringTag:void 0;const c=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":h&&h in Object(t)?function(t){var e=o.call(t,s),r=t[s];try{t[s]=void 0;var i=!0}catch(t){}var n=a.call(t);return i&&(e?t[s]=r:delete t[s]),n}(t):function(t){return l.call(t)}(t)}},72814(t,e,r){r.d(e,{default:()=>R}),r.r(e);var i=r(36781),n=r(25567);const o=function(t,e){for(var r=-1,i=null==t?0:t.length;++r<i;)if(e(t[r],r,t))return!0;return!1};var a=r(62026);const s=function(t,e,r,i,s,l){var h=1&r,c=t.length,u=e.length;if(c!=u&&!(h&&u>c))return!1;var d=l.get(t),f=l.get(e);if(d&&f)return d==e&&f==t;var p=-1,g=!0,m=2&r?new n.default:void 0;for(l.set(t,e),l.set(e,t);++p<c;){var y=t[p],b=e[p];if(i)var x=h?i(b,y,p,e,t,l):i(y,b,p,t,e,l);if(void 0!==x){if(x)continue;g=!1;break}if(m){if(!o(e,function(t,e){if(!(0,a.default)(m,e)&&(y===t||s(y,t,r,i,l)))return m.push(e)})){g=!1;break}}else if(y!==b&&!s(y,b,r,i,l)){g=!1;break}}return l.delete(t),l.delete(e),g};var l=r(83516),h=r(97913),c=r(26979);const u=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t,i){r[++e]=[i,t]}),r};var d=r(39922),f=l.default?l.default.prototype:void 0,p=f?f.valueOf:void 0;var g=r(2475),m=Object.prototype.hasOwnProperty;var y=r(97342),b=r(96956),x=r(34517),C=r(92888),_="[object Arguments]",k="[object Array]",w="[object Object]",v=Object.prototype.hasOwnProperty;const S=function(t,e,r,n,o,a){var l=(0,b.default)(t),f=(0,b.default)(e),S=l?k:(0,y.default)(t),T=f?k:(0,y.default)(e),B=(S=S==_?w:S)==w,M=(T=T==_?w:T)==w,L=S==T;if(L&&(0,x.default)(t)){if(!(0,x.default)(e))return!1;l=!0,B=!1}if(L&&!B)return a||(a=new i.default),l||(0,C.default)(t)?s(t,e,r,n,o,a):function(t,e,r,i,n,o,a){switch(r){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)return!1;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new h.default(t),new h.default(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return(0,c.default)(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var l=u;case"[object Set]":var f=1&i;if(l||(l=d.default),t.size!=e.size&&!f)return!1;var g=a.get(t);if(g)return g==e;i|=2,a.set(t,e);var m=s(l(t),l(e),i,n,o,a);return a.delete(t),m;case"[object Symbol]":if(p)return p.call(t)==p.call(e)}return!1}(t,e,S,r,n,o,a);if(!(1&r)){var F=B&&v.call(t,"__wrapped__"),A=M&&v.call(e,"__wrapped__");if(F||A){var E=F?t.value():t,$=A?e.value():e;return a||(a=new i.default),o(E,$,r,n,a)}}return!!L&&(a||(a=new i.default),function(t,e,r,i,n,o){var a=1&r,s=(0,g.default)(t),l=s.length;if(l!=(0,g.default)(e).length&&!a)return!1;for(var h=l;h--;){var c=s[h];if(!(a?c in e:m.call(e,c)))return!1}var u=o.get(t),d=o.get(e);if(u&&d)return u==e&&d==t;var f=!0;o.set(t,e),o.set(e,t);for(var p=a;++h<l;){var y=t[c=s[h]],b=e[c];if(i)var x=a?i(b,y,c,e,t,o):i(y,b,c,t,e,o);if(!(void 0===x?y===b||n(y,b,r,i,o):x)){f=!1;break}p||(p="constructor"==c)}if(f&&!p){var C=t.constructor,_=e.constructor;C==_||!("constructor"in t)||!("constructor"in e)||"function"==typeof C&&C instanceof C&&"function"==typeof _&&_ instanceof _||(f=!1)}return o.delete(t),o.delete(e),f}(t,e,r,n,o,a))};var T=r(47313);const B=function t(e,r,i,n,o){return e===r||(null==e||null==r||!(0,T.default)(e)&&!(0,T.default)(r)?e!=e&&r!=r:S(e,r,i,n,t,o))};var M=r(97942);const L=function(t){return t==t&&!(0,M.default)(t)};var F=r(7817);const A=function(t,e){return function(r){return null!=r&&r[t]===e&&(void 0!==e||t in Object(r))}},E=function(t){var e=function(t){for(var e=(0,F.default)(t),r=e.length;r--;){var i=e[r],n=t[i];e[r]=[i,n,L(n)]}return e}(t);return 1==e.length&&e[0][2]?A(e[0][0],e[0][1]):function(r){return r===t||function(t,e,r,n){var o=r.length,a=o,s=!n;if(null==t)return!a;for(t=Object(t);o--;){var l=r[o];if(s&&l[2]?l[1]!==t[l[0]]:!(l[0]in t))return!1}for(;++o<a;){var h=(l=r[o])[0],c=t[h],u=l[1];if(s&&l[2]){if(void 0===c&&!(h in t))return!1}else{var d=new i.default;if(n)var f=n(c,u,h,t,e,d);if(!(void 0===f?B(u,c,3,n,d):f))return!1}}return!0}(r,t,e)}};var $=r(55841);var O=r(3759),D=r(1677),I=r(9322);const N=function(t,e){return(0,D.default)(t)&&L(e)?A((0,I.default)(t),e):function(r){var i=function(t,e,r){var i=null==t?void 0:(0,$.default)(t,e);return void 0===i?r:i}(r,t);return void 0===i&&i===e?(0,O.default)(r,t):B(e,i,3)}};var P=r(14151),q=r(56132);const z=function(t){return(0,D.default)(t)?(0,q.default)((0,I.default)(t)):function(t){return function(e){return(0,$.default)(e,t)}}(t)},R=function(t){return"function"==typeof t?t:null==t?P.default:"object"==typeof t?(0,b.default)(t)?N(t[0],t[1]):E(t):z(t)}},68282(t,e,r){r.d(e,{default:()=>a}),r.r(e);var i=r(71140);const n=(0,r(67244).default)(Object.keys,Object);var o=Object.prototype.hasOwnProperty;const a=function(t){if(!(0,i.default)(t))return n(t);var e=[];for(var r in Object(t))o.call(t,r)&&"constructor"!=r&&e.push(r);return e}},56132(t,e,r){r.r(e),r.d(e,{default:()=>i});const i=function(t){return function(e){return null==e?void 0:e[t]}}},50695(t,e,r){r.r(e),r.d(e,{default:()=>a});var i=r(14151),n=r(16264),o=r(97649);const a=function(t,e){return(0,o.default)((0,n.default)(t,e,i.default),t+"")}},58126(t,e,r){r.r(e),r.d(e,{default:()=>i});const i=function(t){return function(e){return t(e)}}},62026(t,e,r){r.r(e),r.d(e,{default:()=>i});const i=function(t,e){return t.has(e)}},20319(t,e,r){r.r(e),r.d(e,{default:()=>n});var i=r(14151);const n=function(t){return"function"==typeof t?t:i.default}},29333(t,e,r){r.d(e,{default:()=>f}),r.r(e);var i=r(96956),n=r(1677),o=r(13269);function a(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var r=function(){var i=arguments,n=e?e.apply(this,i):i[0],o=r.cache;if(o.has(n))return o.get(n);var a=t.apply(this,i);return r.cache=o.set(n,a)||o,a};return r.cache=new(a.Cache||o.default),r}a.Cache=o.default;var s=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,l=/\\(\\)?/g;const h=(c=a(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(s,function(t,r,i,n){e.push(i?n.replace(l,"$1"):r||t)}),e},function(t){return 500===u.size&&u.clear(),t}),u=c.cache,c);var c,u,d=r(93081);const f=function(t,e){return(0,i.default)(t)?t:(0,n.default)(t,e)?[t]:h((0,d.default)(t))}},61758(t,e,r){r.r(e),r.d(e,{default:()=>n});var i=r(50123);const n=function(){try{var t=(0,i.default)(Object,"defineProperty");return t({},"",{}),t}catch(t){}}()},36713(t,e,r){r.r(e),r.d(e,{default:()=>i});const i="object"==typeof r.g&&r.g&&r.g.Object===Object&&r.g},2475(t,e,r){r.r(e),r.d(e,{default:()=>a});var i=r(64494),n=r(15165),o=r(7817);const a=function(t){return(0,i.default)(t,o.default,n.default)}},50123(t,e,r){r.d(e,{default:()=>m}),r.r(e);var i=r(50405);const n=r(39600).default["__core-js_shared__"];var o,a=(o=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||""))?"Symbol(src)_1."+o:"";var s=r(97942),l=r(1548),h=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,d=c.toString,f=u.hasOwnProperty,p=RegExp("^"+d.call(f).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");const g=function(t){return!(!(0,s.default)(t)||(e=t,a&&a in e))&&((0,i.default)(t)?p:h).test((0,l.default)(t));var e},m=function(t,e){var r=function(t,e){return null==t?void 0:t[e]}(t,e);return g(r)?r:void 0}},15165(t,e,r){r.r(e),r.d(e,{default:()=>s});var i=r(56097),n=r(11276),o=Object.prototype.propertyIsEnumerable,a=Object.getOwnPropertySymbols;const s=a?function(t){return null==t?[]:(t=Object(t),(0,i.default)(a(t),function(e){return o.call(t,e)}))}:n.default},97342(t,e,r){r.d(e,{default:()=>w}),r.r(e);var i=r(50123),n=r(39600);const o=(0,i.default)(n.default,"DataView");var a=r(25436);const s=(0,i.default)(n.default,"Promise");var l=r(28574);const h=(0,i.default)(n.default,"WeakMap");var c=r(4044),u=r(1548),d="[object Map]",f="[object Promise]",p="[object Set]",g="[object WeakMap]",m="[object DataView]",y=(0,u.default)(o),b=(0,u.default)(a.default),x=(0,u.default)(s),C=(0,u.default)(l.default),_=(0,u.default)(h),k=c.default;(o&&k(new o(new ArrayBuffer(1)))!=m||a.default&&k(new a.default)!=d||s&&k(s.resolve())!=f||l.default&&k(new l.default)!=p||h&&k(new h)!=g)&&(k=function(t){var e=(0,c.default)(t),r="[object Object]"==e?t.constructor:void 0,i=r?(0,u.default)(r):"";if(i)switch(i){case y:return m;case b:return d;case x:return f;case C:return p;case _:return g}return e});const w=k},23017(t,e,r){r.r(e),r.d(e,{default:()=>h});var i=r(29333),n=r(88748),o=r(96956),a=r(85378),s=r(47893),l=r(9322);const h=function(t,e,r){for(var h=-1,c=(e=(0,i.default)(e,t)).length,u=!1;++h<c;){var d=(0,l.default)(e[h]);if(!(u=null!=t&&r(t,d)))break;t=t[d]}return u||++h!=c?u:!!(c=null==t?0:t.length)&&(0,s.default)(c)&&(0,a.default)(d,c)&&((0,o.default)(t)||(0,n.default)(t))}},85378(t,e,r){r.r(e),r.d(e,{default:()=>n});var i=/^(?:0|[1-9]\d*)$/;const n=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&i.test(t))&&t>-1&&t%1==0&&t<e}},1677(t,e,r){r.r(e),r.d(e,{default:()=>s});var i=r(96956),n=r(84089),o=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,a=/^\w*$/;const s=function(t,e){if((0,i.default)(t))return!1;var r=typeof t;return!("number"!=r&&"symbol"!=r&&"boolean"!=r&&null!=t&&!(0,n.default)(t))||a.test(t)||!o.test(t)||null!=e&&t in Object(e)}},71140(t,e,r){r.r(e),r.d(e,{default:()=>n});var i=Object.prototype;const n=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||i)}},10248(t,e,r){r.r(e),r.d(e,{default:()=>s});var i=r(36713),n="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=n&&"object"==typeof module&&module&&!module.nodeType&&module,a=o&&o.exports===n&&i.default.process;const s=function(){try{return o&&o.require&&o.require("util").types||a&&a.binding&&a.binding("util")}catch(t){}}()},67244(t,e,r){r.r(e),r.d(e,{default:()=>i});const i=function(t,e){return function(r){return t(e(r))}}},16264(t,e,r){r.d(e,{default:()=>n}),r.r(e);var i=Math.max;const n=function(t,e,r){return e=i(void 0===e?t.length-1:e,0),function(){for(var n=arguments,o=-1,a=i(n.length-e,0),s=Array(a);++o<a;)s[o]=n[e+o];o=-1;for(var l=Array(e+1);++o<e;)l[o]=n[o];return l[e]=r(s),function(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)}(t,this,l)}}},39600(t,e,r){r.r(e),r.d(e,{default:()=>o});var i=r(36713),n="object"==typeof self&&self&&self.Object===Object&&self;const o=i.default||n||Function("return this")()},39922(t,e,r){r.r(e),r.d(e,{default:()=>i});const i=function(t){var e=-1,r=Array(t.size);return t.forEach(function(t){r[++e]=t}),r}},97649(t,e,r){r.d(e,{default:()=>l}),r.r(e);var i=r(47845),n=r(61758),o=r(14151);const a=n.default?function(t,e){return(0,n.default)(t,"toString",{configurable:!0,enumerable:!1,value:(0,i.default)(e),writable:!0})}:o.default;var s=Date.now;const l=(h=a,c=0,u=0,function(){var t=s(),e=16-(t-u);if(u=t,e>0){if(++c>=800)return arguments[0]}else c=0;return h.apply(void 0,arguments)});var h,c,u},9322(t,e,r){r.r(e),r.d(e,{default:()=>n});var i=r(84089);const n=function(t){if("string"==typeof t||(0,i.default)(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},1548(t,e,r){r.r(e),r.d(e,{default:()=>n});var i=Function.prototype.toString;const n=function(t){if(null!=t){try{return i.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},47845(t,e,r){r.r(e),r.d(e,{default:()=>i});const i=function(t){return function(){return t}}},26979(t,e,r){r.r(e),r.d(e,{default:()=>i});const i=function(t,e){return t===e||t!=t&&e!=e}},51568(t,e,r){r.d(e,{default:()=>l}),r.r(e);var i=r(56097),n=r(1987);const o=function(t,e){var r=[];return(0,n.default)(t,function(t,i,n){e(t,i,n)&&r.push(t)}),r};var a=r(72814),s=r(96956);const l=function(t,e){return((0,s.default)(t)?i.default:o)(t,(0,a.default)(e,3))}},28539(t,e,r){r.r(e),r.d(e,{default:()=>s});var i=r(87201),n=r(1987),o=r(20319),a=r(96956);const s=function(t,e){return((0,a.default)(t)?i.default:n.default)(t,(0,o.default)(e))}},3759(t,e,r){r.d(e,{default:()=>o}),r.r(e);const i=function(t,e){return null!=t&&e in Object(t)};var n=r(23017);const o=function(t,e){return null!=t&&(0,n.default)(t,e,i)}},14151(t,e,r){r.r(e),r.d(e,{default:()=>i});const i=function(t){return t}},88748(t,e,r){r.d(e,{default:()=>c}),r.r(e);var i=r(4044),n=r(47313);const o=function(t){return(0,n.default)(t)&&"[object Arguments]"==(0,i.default)(t)};var a=Object.prototype,s=a.hasOwnProperty,l=a.propertyIsEnumerable,h=o(function(){return arguments}())?o:function(t){return(0,n.default)(t)&&s.call(t,"callee")&&!l.call(t,"callee")};const c=h},96956(t,e,r){r.r(e),r.d(e,{default:()=>i});const i=Array.isArray},31475(t,e,r){r.r(e),r.d(e,{default:()=>o});var i=r(50405),n=r(47893);const o=function(t){return null!=t&&(0,n.default)(t.length)&&!(0,i.default)(t)}},40376(t,e,r){r.r(e),r.d(e,{default:()=>o});var i=r(31475),n=r(47313);const o=function(t){return(0,n.default)(t)&&(0,i.default)(t)}},34517(t,e,r){r.d(e,{default:()=>s}),r.r(e);var i=r(39600);var n="object"==typeof exports&&exports&&!exports.nodeType&&exports,o=n&&"object"==typeof module&&module&&!module.nodeType&&module,a=o&&o.exports===n?i.default.Buffer:void 0;const s=(a?a.isBuffer:void 0)||function(){return!1}},50405(t,e,r){r.r(e),r.d(e,{default:()=>o});var i=r(4044),n=r(97942);const o=function(t){if(!(0,n.default)(t))return!1;var e=(0,i.default)(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},47893(t,e,r){r.r(e),r.d(e,{default:()=>i});const i=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},97942(t,e,r){r.r(e),r.d(e,{default:()=>i});const i=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},47313(t,e,r){r.r(e),r.d(e,{default:()=>i});const i=function(t){return null!=t&&"object"==typeof t}},84089(t,e,r){r.r(e),r.d(e,{default:()=>o});var i=r(4044),n=r(47313);const o=function(t){return"symbol"==typeof t||(0,n.default)(t)&&"[object Symbol]"==(0,i.default)(t)}},92888(t,e,r){r.d(e,{default:()=>c}),r.r(e);var i=r(4044),n=r(47893),o=r(47313),a={};a["[object Float32Array]"]=a["[object Float64Array]"]=a["[object Int8Array]"]=a["[object Int16Array]"]=a["[object Int32Array]"]=a["[object Uint8Array]"]=a["[object Uint8ClampedArray]"]=a["[object Uint16Array]"]=a["[object Uint32Array]"]=!0,a["[object Arguments]"]=a["[object Array]"]=a["[object ArrayBuffer]"]=a["[object Boolean]"]=a["[object DataView]"]=a["[object Date]"]=a["[object Error]"]=a["[object Function]"]=a["[object Map]"]=a["[object Number]"]=a["[object Object]"]=a["[object RegExp]"]=a["[object Set]"]=a["[object String]"]=a["[object WeakMap]"]=!1;var s=r(58126),l=r(10248),h=l.default&&l.default.isTypedArray;const c=h?(0,s.default)(h):function(t){return(0,o.default)(t)&&(0,n.default)(t.length)&&!!a[(0,i.default)(t)]}},34501(t,e,r){r.r(e),r.d(e,{default:()=>i});const i=function(t){return void 0===t}},7817(t,e,r){r.r(e),r.d(e,{default:()=>a});var i=r(77252),n=r(68282),o=r(31475);const a=function(t){return(0,o.default)(t)?(0,i.default)(t):(0,n.default)(t)}},11815(t,e,r){r.d(e,{default:()=>l}),r.r(e);const i=function(t,e,r,i){var n=-1,o=null==t?0:t.length;for(i&&o&&(r=t[++n]);++n<o;)r=e(r,t[n],n,t);return r};var n=r(1987),o=r(72814);const a=function(t,e,r,i,n){return n(t,function(t,n,o){r=i?(i=!1,t):e(r,t,n,o)}),r};var s=r(96956);const l=function(t,e,r){var l=(0,s.default)(t)?i:a,h=arguments.length<3;return l(t,(0,o.default)(e,4),r,h,n.default)}},11276(t,e,r){r.r(e),r.d(e,{default:()=>i});const i=function(){return[]}},93081(t,e,r){r.d(e,{default:()=>c}),r.r(e);var i=r(83516),n=r(65133),o=r(96956),a=r(84089),s=i.default?i.default.prototype:void 0,l=s?s.toString:void 0;const h=function t(e){if("string"==typeof e)return e;if((0,o.default)(e))return(0,n.default)(e,t)+"";if((0,a.default)(e))return l?l.call(e):"";var r=e+"";return"0"==r&&1/e==-1/0?"-0":r},c=function(t){return null==t?"":h(t)}},12643(t,e,r){r.d(e,{default:()=>o}),r.r(e);var i=r(65133);var n=r(7817);const o=function(t){return null==t?[]:function(t,e){return(0,i.default)(e,function(e){return t[e]})}(t,(0,n.default)(t))}},70848(t,e,r){r.d(e,{ZERO_WIDTH_SPACE:()=>B,calculateTextDimensions:()=>rt,calculateTextHeight:()=>J,calculateTextWidth:()=>tt,cleanAndMerge:()=>lt,decodeEntities:()=>ut,encodeEntities:()=>ct,generateId:()=>Y,getEdgeId:()=>dt,getStylesFromArray:()=>H,handleUndefinedAttr:()=>ft,interpolateToCurve:()=>O,isDetailedError:()=>ot,parseFontSize:()=>st,random:()=>V,removeDirectives:()=>E,utils_default:()=>ht,wrapLabel:()=>Q}),r.r(e);var i=r(39989),n=r(27166),o=r(79456),a=r(8041),s=r(79806);function l(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");const r=function(...i){const n=e?e.apply(this,i):i[0],o=r.cache;if(o.has(n))return o.get(n);const a=t.apply(this,i);return r.cache=o.set(n,a)||o,a};return r.cache=new(l.Cache||Map),r}function h(){}l.Cache=Map;var c=r(35349),u=r(56813);function d(t){return Object.getOwnPropertySymbols(t).filter(e=>Object.prototype.propertyIsEnumerable.call(t,e))}var f=r(721);function p(t){return"__proto__"===t}function g(t){if("object"!=typeof t)return!1;if(null==t)return!1;if(null===Object.getPrototypeOf(t))return!0;if("[object Object]"!==Object.prototype.toString.call(t)){const e=t[Symbol.toStringTag];return null!=e&&!!Object.getOwnPropertyDescriptor(t,Symbol.toStringTag)?.writable&&t.toString()===`[object ${e}]`}let e=t;for(;null!==Object.getPrototypeOf(e);)e=Object.getPrototypeOf(e);return Object.getPrototypeOf(t)===e}var m=r(8850),y=r(87125);function b(t,e,r,i=new Map,n=void 0){const o=n?.(t,e,r,i);if(void 0!==o)return o;if((0,c.isPrimitive)(t))return t;if(i.has(t))return i.get(t);if(Array.isArray(t)){const e=new Array(t.length);i.set(t,e);for(let o=0;o<t.length;o++)e[o]=b(t[o],o,r,i,n);return Object.hasOwn(t,"index")&&(e.index=t.index),Object.hasOwn(t,"input")&&(e.input=t.input),e}if(t instanceof Date)return new Date(t.getTime());if(t instanceof RegExp){const e=new RegExp(t.source,t.flags);return e.lastIndex=t.lastIndex,e}if(t instanceof Map){const e=new Map;i.set(t,e);for(const[o,a]of t)e.set(o,b(a,o,r,i,n));return e}if(t instanceof Set){const e=new Set;i.set(t,e);for(const o of t)e.add(b(o,void 0,r,i,n));return e}if((0,f.isBuffer)(t))return t.subarray();if((0,u.isTypedArray)(t)){const e=new(Object.getPrototypeOf(t).constructor)(t.length);i.set(t,e);for(let o=0;o<t.length;o++)e[o]=b(t[o],o,r,i,n);return e}if(t instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);if(t instanceof DataView){const e=new DataView(t.buffer.slice(0),t.byteOffset,t.byteLength);return i.set(t,e),x(e,t,r,i,n),e}if("undefined"!=typeof File&&t instanceof File){const e=new File([t],t.name,{type:t.type});return i.set(t,e),x(e,t,r,i,n),e}if("undefined"!=typeof Blob&&t instanceof Blob){const e=new Blob([t],{type:t.type});return i.set(t,e),x(e,t,r,i,n),e}if(t instanceof Error){const e=structuredClone(t);return i.set(t,e),e.message=t.message,e.name=t.name,e.stack=t.stack,e.cause=t.cause,e.constructor=t.constructor,x(e,t,r,i,n),e}if(t instanceof Boolean){const e=new Boolean(t.valueOf());return i.set(t,e),x(e,t,r,i,n),e}if(t instanceof Number){const e=new Number(t.valueOf());return i.set(t,e),x(e,t,r,i,n),e}if(t instanceof String){const e=new String(t.valueOf());return i.set(t,e),x(e,t,r,i,n),e}if("object"==typeof t&&function(t){switch((0,m.getTag)(t)){case y.argumentsTag:case y.arrayTag:case y.arrayBufferTag:case y.dataViewTag:case y.booleanTag:case y.dateTag:case y.float32ArrayTag:case y.float64ArrayTag:case y.int8ArrayTag:case y.int16ArrayTag:case y.int32ArrayTag:case y.mapTag:case y.numberTag:case y.objectTag:case y.regexpTag:case y.setTag:case y.stringTag:case y.symbolTag:case y.uint8ArrayTag:case y.uint8ClampedArrayTag:case y.uint16ArrayTag:case y.uint32ArrayTag:return!0;default:return!1}}(t)){const e=Object.create(Object.getPrototypeOf(t));return i.set(t,e),x(e,t,r,i,n),e}return t}function x(t,e,r=t,i,n){const o=[...Object.keys(e),...d(e)];for(let a=0;a<o.length;a++){const s=o[a],l=Object.getOwnPropertyDescriptor(t,s);(null==l||l.writable)&&(t[s]=b(e[s],s,r,i,n))}}function C(t){return function(t,e){return function(t,e){return b(t,void 0,t,new Map,e)}(t,(r,i,n,o)=>{const a=e?.(r,i,n,o);if(void 0!==a)return a;if("object"==typeof t){if("[object Object]"===(0,m.getTag)(t)&&"function"!=typeof t.constructor){const e={};return o.set(t,e),x(e,t,n,o),e}switch(Object.prototype.toString.call(t)){case y.numberTag:case y.stringTag:case y.booleanTag:{const e=new t.constructor(t?.valueOf());return x(e,t),e}case y.argumentsTag:{const e={};return x(e,t),e.length=t.length,e[Symbol.iterator]=t[Symbol.iterator],e}default:return}}})}(t)}var _=r(30197);function k(t){return"object"==typeof t&&null!==t}var w=r(8081);function v(t){return k(t)&&(0,w.isArrayLike)(t)}var S=r(76076);function T(t,e,r,i){if((0,c.isPrimitive)(t)&&(t=Object(t)),null==e||"object"!=typeof e)return t;if(i.has(e))return function(t){if((0,c.isPrimitive)(t))return t;if(Array.isArray(t)||(0,u.isTypedArray)(t)||t instanceof ArrayBuffer||"undefined"!=typeof SharedArrayBuffer&&t instanceof SharedArrayBuffer)return t.slice(0);const e=Object.getPrototypeOf(t);if(null==e)return Object.assign(Object.create(e),t);const r=e.constructor;if(t instanceof Date||t instanceof Map||t instanceof Set)return new r(t);if(t instanceof RegExp){const e=new r(t);return e.lastIndex=t.lastIndex,e}if(t instanceof DataView)return new r(t.buffer.slice(0));if(t instanceof Error){let e;return e=t instanceof AggregateError?new r(t.errors,t.message,{cause:t.cause}):new r(t.message,{cause:t.cause}),e.stack=t.stack,Object.assign(e,t),e}return"undefined"!=typeof File&&t instanceof File?new r([t],t.name,{type:t.type,lastModified:t.lastModified}):"object"==typeof t?Object.assign(Object.create(e),t):t}(i.get(e));if(i.set(e,t),Array.isArray(e)){e=e.slice();for(let t=0;t<e.length;t++)e[t]=e[t]??void 0}const n=[...Object.keys(e),...d(e)];for(let o=0;o<n.length;o++){const a=n[o];if(p(a))continue;let s=e[a],l=t[a];if((0,_.isArguments)(s)&&(s={...s}),(0,_.isArguments)(l)&&(l={...l}),(0,f.isBuffer)(s)&&(s=C(s)),Array.isArray(s))if(Array.isArray(l)){const t=[],e=Reflect.ownKeys(l);for(let r=0;r<e.length;r++){const i=e[r];t[i]=l[i]}l=t}else if(v(l)){const t=[];for(let e=0;e<l.length;e++)t[e]=l[e];l=t}else l=[];const h=r(l,s,a,t,e,i);void 0!==h?t[a]=h:Array.isArray(s)||k(l)&&k(s)&&(g(l)||g(s)||(0,S.isTypedArray)(l)||(0,S.isTypedArray)(s))?t[a]=T(l,s,r,i):null==l&&g(s)?t[a]=T({},s,r,i):null==l&&(0,S.isTypedArray)(s)?t[a]=C(s):void 0!==l&&void 0===s||(t[a]=s)}return t}var B="",M={curveBasis:s.curveBasis,curveBasisClosed:s.curveBasisClosed,curveBasisOpen:s.curveBasisOpen,curveBumpX:s.curveBumpX,curveBumpY:s.curveBumpY,curveBundle:s.curveBundle,curveCardinalClosed:s.curveCardinalClosed,curveCardinalOpen:s.curveCardinalOpen,curveCardinal:s.curveCardinal,curveCatmullRomClosed:s.curveCatmullRomClosed,curveCatmullRomOpen:s.curveCatmullRomOpen,curveCatmullRom:s.curveCatmullRom,curveLinear:s.curveLinear,curveLinearClosed:s.curveLinearClosed,curveMonotoneX:s.curveMonotoneX,curveMonotoneY:s.curveMonotoneY,curveNatural:s.curveNatural,curveStep:s.curveStep,curveStepAfter:s.curveStepAfter,curveStepBefore:s.curveStepBefore},L=/\s*(?:(\w+)(?=:):|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,F=(0,o.__name)(function(t,e){const r=A(t,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(r)){const t=r.map(t=>t.args);(0,i.sanitizeDirective)(t),n=(0,i.assignWithDepth_default)(n,[...t])}else n=r.args;if(!n)return;let o=(0,i.detectType)(t,e);const a="config";return void 0!==n[a]&&("flowchart-v2"===o&&(o="flowchart"),n[o]=n[a],delete n[a]),n},"detectInit"),A=(0,o.__name)(function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${L.source})(?=[}][%]{2}).*\n`,"ig");let o;t=t.trim().replace(r,"").replace(/'/gm,'"'),n.log.debug(`Detecting diagram directive${null!==e?" type:"+e:""} based on the text:${t}`);const a=[];for(;null!==(o=i.directiveRegex.exec(t));)if(o.index===i.directiveRegex.lastIndex&&i.directiveRegex.lastIndex++,o&&!e||e&&o[1]?.match(e)||e&&o[2]?.match(e)){const t=o[1]?o[1]:o[2],e=o[3]?o[3].trim():o[4]?JSON.parse(o[4].trim()):null;a.push({type:t,args:e})}return 0===a.length?{type:t,args:null}:1===a.length?a[0]:a}catch(r){return n.log.error(`ERROR: ${r.message} - Unable to parse directive type: '${e}' based on the text: '${t}'`),{type:void 0,args:null}}},"detectDirective"),E=(0,o.__name)(function(t){return t.replace(i.directiveRegex,"")},"removeDirectives"),$=(0,o.__name)(function(t,e){for(const[r,i]of e.entries())if(i.match(t))return r;return-1},"isSubstringInArray");function O(t,e){if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return M[r]??e}function D(t,e){const r=t.trim();if(r)return"loose"!==e.securityLevel?(0,a.sanitizeUrl)(r):r}(0,o.__name)(O,"interpolateToCurve"),(0,o.__name)(D,"formatUrl");var I=(0,o.__name)((t,...e)=>{const r=t.split("."),i=r.length-1,o=r[i];let a=window;for(let e=0;e<i;e++)if(a=a[r[e]],!a)return void n.log.error(`Function name: ${t} not found in window`);a[o](...e)},"runFunc");function N(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0}function P(t){let e,r=0;return t.forEach(t=>{r+=N(t,e),e=t}),R(t,r/2)}function q(t){return 1===t.length?t[0]:P(t)}(0,o.__name)(N,"distance"),(0,o.__name)(P,"traverseEdge"),(0,o.__name)(q,"calcLabelPosition");var z=(0,o.__name)((t,e=2)=>{const r=Math.pow(10,e);return Math.round(t*r)/r},"roundNumber"),R=(0,o.__name)((t,e)=>{let r,i=e;for(const e of t){if(r){const t=N(e,r);if(0===t)return r;if(t<i)i-=t;else{const n=i/t;if(n<=0)return r;if(n>=1)return{x:e.x,y:e.y};if(n>0&&n<1)return{x:z((1-n)*r.x+n*e.x,5),y:z((1-n)*r.y+n*e.y,5)}}}r=e}throw new Error("Could not find a suitable point for the given distance")},"calculatePoint"),j=(0,o.__name)((t,e,r)=>{n.log.info(`our points ${JSON.stringify(e)}`),e[0]!==r&&(e=e.reverse());const i=R(e,25),o=t?10:5,a=Math.atan2(e[0].y-i.y,e[0].x-i.x),s={x:0,y:0};return s.x=Math.sin(a)*o+(e[0].x+i.x)/2,s.y=-Math.cos(a)*o+(e[0].y+i.y)/2,s},"calcCardinalityPosition");function W(t,e,r){const i=structuredClone(r);n.log.info("our points",i),"start_left"!==e&&"start_right"!==e&&i.reverse();const o=R(i,25+t),a=10+.5*t,s=Math.atan2(i[0].y-o.y,i[0].x-o.x),l={x:0,y:0};return"start_left"===e?(l.x=Math.sin(s+Math.PI)*a+(i[0].x+o.x)/2,l.y=-Math.cos(s+Math.PI)*a+(i[0].y+o.y)/2):"end_right"===e?(l.x=Math.sin(s-Math.PI)*a+(i[0].x+o.x)/2-5,l.y=-Math.cos(s-Math.PI)*a+(i[0].y+o.y)/2-5):"end_left"===e?(l.x=Math.sin(s)*a+(i[0].x+o.x)/2-5,l.y=-Math.cos(s)*a+(i[0].y+o.y)/2-5):(l.x=Math.sin(s)*a+(i[0].x+o.x)/2,l.y=-Math.cos(s)*a+(i[0].y+o.y)/2),l}function H(t){let e="",r="";for(const i of t)void 0!==i&&(i.startsWith("color:")||i.startsWith("text-align:")?r=r+i+";":e=e+i+";");return{style:e,labelStyle:r}}(0,o.__name)(W,"calcTerminalLabelPosition"),(0,o.__name)(H,"getStylesFromArray");var U=0,Y=(0,o.__name)(()=>(U++,"id-"+Math.random().toString(36).substr(2,12)+"-"+U),"generateId");function G(t){let e="";for(let r=0;r<t;r++)e+="0123456789abcdef".charAt(Math.floor(16*Math.random()));return e}(0,o.__name)(G,"makeRandomHex");var V=(0,o.__name)(t=>G(t.length),"random"),X=(0,o.__name)(function(){return{x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0,text:""}},"getTextObj"),Z=(0,o.__name)(function(t,e){const r=e.text.replace(i.common_default.lineBreakRegex," "),[,n]=st(e.fontSize),o=t.append("text");o.attr("x",e.x),o.attr("y",e.y),o.style("text-anchor",e.anchor),o.style("font-family",e.fontFamily),o.style("font-size",n),o.style("font-weight",e.fontWeight),o.attr("fill",e.fill),void 0!==e.class&&o.attr("class",e.class);const a=o.append("tspan");return a.attr("x",e.x+2*e.textMargin),a.attr("fill",e.fill),a.text(r),o},"drawSimpleText"),Q=l((t,e,r)=>{if(!t)return t;if(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),i.common_default.lineBreakRegex.test(t))return t;const n=t.split(" ").filter(Boolean),o=[];let a="";return n.forEach((t,i)=>{const s=tt(`${t} `,r),l=tt(a,r);if(s>e){const{hyphenatedStrings:i,remainingWord:n}=K(t,e,"-",r);o.push(a,...i),a=n}else l+s>=e?(o.push(a),a=t):a=[a,t].filter(Boolean).join(" ");i+1===n.length&&o.push(a)}),o.filter(t=>""!==t).join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),K=l((t,e,r="-",i)=>{i=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},i);const n=[...t],o=[];let a="";return n.forEach((t,s)=>{const l=`${a}${t}`;if(tt(l,i)>=e){const t=s+1,e=n.length===t,i=`${l}${r}`;o.push(e?l:i),a=""}else a=l}),{hyphenatedStrings:o,remainingWord:a}},(t,e,r="-",i)=>`${t}${e}${r}${i.fontSize}${i.fontWeight}${i.fontFamily}`);function J(t,e){return rt(t,e).height}function tt(t,e){return rt(t,e).width}(0,o.__name)(J,"calculateTextHeight"),(0,o.__name)(tt,"calculateTextWidth");var et,rt=l((t,e)=>{const{fontSize:r=12,fontFamily:n="Arial",fontWeight:o=400}=e;if(!t)return{width:0,height:0};const[,a]=st(r),l=["sans-serif",n],h=t.split(i.common_default.lineBreakRegex),c=[],u=(0,s.select)("body");if(!u.remove)return{width:0,height:0,lineHeight:0};const d=u.append("svg");for(const t of l){let e=0;const r={width:0,height:0,lineHeight:0};for(const i of h){const n=X();n.text=i||B;const s=Z(d,n).style("font-size",a).style("font-weight",o).style("font-family",t),l=(s._groups||s)[0][0].getBBox();if(0===l.width&&0===l.height)throw new Error("svg element not in render tree");r.width=Math.round(Math.max(r.width,l.width)),e=Math.round(l.height),r.height+=e,r.lineHeight=Math.round(Math.max(r.lineHeight,e))}c.push(r)}return d.remove(),c[isNaN(c[1].height)||isNaN(c[1].width)||isNaN(c[1].lineHeight)||c[0].height>c[1].height&&c[0].width>c[1].width&&c[0].lineHeight>c[1].lineHeight?0:1]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),it=class{constructor(t=!1,e){this.count=0,this.count=e?e.length:0,this.next=t?()=>this.count++:()=>Date.now()}static{(0,o.__name)(this,"InitIDGenerator")}},nt=(0,o.__name)(function(t){return et=et||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),et.innerHTML=t,unescape(et.textContent)},"entityDecode");function ot(t){return"str"in t}(0,o.__name)(ot,"isDetailedError");var at=(0,o.__name)((t,e,r,i)=>{if(!i)return;const n=t.node()?.getBBox();n&&t.append("text").text(i).attr("text-anchor","middle").attr("x",n.x+n.width/2).attr("y",-r).attr("class",e)},"insertTitle"),st=(0,o.__name)(t=>{if("number"==typeof t)return[t,t+"px"];const e=parseInt(t??"",10);return Number.isNaN(e)?[void 0,void 0]:t===String(e)?[e,t+"px"]:[e,t]},"parseFontSize");function lt(t,e){return function(t,...e){return function(t,...e){const r=e.slice(0,-1),i=e[e.length-1];let n=t;for(let t=0;t<r.length;t++)n=T(n,r[t],i,new Map);return n}(t,...e,h)}({},t,e)}(0,o.__name)(lt,"cleanAndMerge");var ht={assignWithDepth:i.assignWithDepth_default,wrapLabel:Q,calculateTextHeight:J,calculateTextWidth:tt,calculateTextDimensions:rt,cleanAndMerge:lt,detectInit:F,detectDirective:A,isSubstringInArray:$,interpolateToCurve:O,calcLabelPosition:q,calcCardinalityPosition:j,calcTerminalLabelPosition:W,formatUrl:D,getStylesFromArray:H,generateId:Y,random:V,runFunc:I,entityDecode:nt,insertTitle:at,isLabelCoordinateInPath:pt,parseFontSize:st,InitIDGenerator:it},ct=(0,o.__name)(function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(t){return t.substring(0,t.length-1)}),e=e.replace(/#\w+;/g,function(t){const e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"}),e},"encodeEntities"),ut=(0,o.__name)(function(t){return t.replace(/fl°°/g,"&#").replace(/fl°/g,"&").replace(/¶ß/g,";")},"decodeEntities"),dt=(0,o.__name)((t,e,{counter:r=0,prefix:i,suffix:n},o)=>o||`${i?`${i}_`:""}${t}_${e}_${r}${n?`_${n}`:""}`,"getEdgeId");function ft(t){return t??null}function pt(t,e){const r=Math.round(t.x),i=Math.round(t.y),n=e.replace(/(\d+\.\d+)/g,t=>Math.round(parseFloat(t)).toString());return n.includes(r.toString())||n.includes(i.toString())}(0,o.__name)(ft,"handleUndefinedAttr"),(0,o.__name)(pt,"isLabelCoordinateInPath")},67594(t,e,r){r.r(e),r.d(e,{getRegisteredLayoutAlgorithm:()=>g,registerLayoutLoaders:()=>f,render:()=>p});var i=r(75972),n=r(41298),o=r(6342),a=r(51752),s=r(70848),l=r(39989),h=r(27166),c=r(79456),u={common:l.common_default,getConfig:l.getConfig,insertCluster:i.insertCluster,insertEdge:n.insertEdge,insertEdgeLabel:n.insertEdgeLabel,insertMarkers:n.markers_default,insertNode:o.insertNode,interpolateToCurve:s.interpolateToCurve,labelHelper:a.labelHelper,log:h.log,positionEdgeLabel:n.positionEdgeLabel},d={},f=(0,c.__name)(t=>{for(const e of t)d[e.name]=e},"registerLayoutLoaders");(0,c.__name)(()=>{f([{name:"dagre",loader:(0,c.__name)(async()=>await Promise.all([r.e(1514),r.e(27)]).then(r.bind(r,90027)),"loader")},{name:"swimlane",loader:(0,c.__name)(async()=>await r.e(6869).then(r.bind(r,86869)),"loader")},{name:"cose-bilkent",loader:(0,c.__name)(async()=>await Promise.all([r.e(8936),r.e(9937)]).then(r.bind(r,59937)),"loader")}])},"registerDefaultLayoutLoaders")();var p=(0,c.__name)(async(t,e)=>{if(!(t.layoutAlgorithm in d))throw new Error(`Unknown layout algorithm: ${t.layoutAlgorithm}`);if(t.diagramId)for(const e of t.nodes){const r=e.domId||e.id;e.domId=`${t.diagramId}-${r}`}const r=d[t.layoutAlgorithm],i=await r.loader(),{theme:n,themeVariables:o}=t.config,{useGradient:a,gradientStart:s,gradientStop:l}=o,h=e.attr("id");if(e.append("defs").append("filter").attr("id",`${h}-drop-shadow`).attr("height","130%").attr("width","130%").append("feDropShadow").attr("dx","4").attr("dy","4").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",n?.includes("dark")?"#FFFFFF":"#000000"),e.append("defs").append("filter").attr("id",`${h}-drop-shadow-small`).attr("height","150%").attr("width","150%").append("feDropShadow").attr("dx","2").attr("dy","2").attr("stdDeviation",0).attr("flood-opacity","0.06").attr("flood-color",n?.includes("dark")?"#FFFFFF":"#000000"),a){const t=e.append("linearGradient").attr("id",e.attr("id")+"-gradient").attr("gradientUnits","objectBoundingBox").attr("x1","0%").attr("y1","0%").attr("x2","100%").attr("y2","0%");t.append("svg:stop").attr("offset","0%").attr("stop-color",s).attr("stop-opacity",1),t.append("svg:stop").attr("offset","100%").attr("stop-color",l).attr("stop-opacity",1)}return i.render(t,e,u,{algorithm:r.algorithm})},"render"),g=(0,c.__name)((t="",{fallback:e="dagre"}={})=>{if(t in d)return t;if(e in d)return h.log.warn(`Layout algorithm ${t} is not registered. Using ${e} as fallback.`),e;throw new Error(`Both layout algorithms ${t} and ${e} are not registered.`)},"getRegisteredLayoutAlgorithm")},64342(t,e,r){r.r(e),r.d(e,{selectSvgElement:()=>a});var i=r(39989),n=r(79456),o=r(79806),a=(0,n.__name)(t=>{const{securityLevel:e}=(0,i.getConfig2)();let r=(0,o.select)("body");if("sandbox"===e){const e=(0,o.select)(`#i${t}`),i=e.node()?.contentDocument??document;r=(0,o.select)(i.body)}return r.select(`#${t}`)},"selectSvgElement")},79528(t,e,r){r.r(e),r.d(e,{adjustClustersAndEdges:()=>B,clearLayoutRenderState:()=>O,clusterDb:()=>m,createCommonLayoutRenderer:()=>$,createLayoutElementGroups:()=>d,defaultMeasureLayout:()=>D,findNonClusterChild:()=>S,insertMeasuredNode:()=>p,paintLayoutData:()=>I,sortNodesByHierarchy:()=>F});var i=r(75972),n=r(41298),o=r(6342),a=r(51752),s=r(70848),l=r(39989),h=r(27166),c=r(79456),u=r(58558);function d(t,{edgePathsClass:e="edges edgePath"}={}){const r=t.insert("g").attr("class","root");return{clusters:r.insert("g").attr("class","clusters"),edgePaths:r.insert("g").attr("class",e),edgeLabels:r.insert("g").attr("class","edgeLabels"),nodes:r.insert("g").attr("class","nodes"),rootGroups:r}}async function f(t,e){if(e.label){const{shapeSvg:r,bbox:i}=await(0,a.labelHelper)(t,e);e.labelBBox={width:i.width,height:i.height},r.remove()}else e.labelBBox={width:0,height:0}}async function p(t,e,r){const i=await(0,o.insertNode)(t,e,r),n=i.node()?.getBBox()??{width:0,height:0};return e.width=n.width,e.height=n.height,i}async function g(t,e){const i=new u.Graph({multigraph:!0,compound:!0}),o=[...e.edges],a=(0,l.getConfig2)(),s=d(t),{edgeLabels:h,nodes:c}=s,g=new Map,m=null!=t.node();await Promise.all(e.nodes.map(async t=>{if(t.isGroup)m&&await f(c,t),i.setNode(t.id,{...t});else{if(m){const e=await p(c,t,{config:a,dir:t.dir});g.set(t.id,e)}i.setNode(t.id,{...t})}}));for(const t of o)m&&(0,n.hasEdgeLabel)(t)&&await(0,n.insertEdgeLabel)(h,t),i.setEdge(t.start,t.end,{...t},t.id),e.edges.some(e=>e.id===t.id)||e.edges.push(t);if(globalThis.mermaidCaptureSizes){const{captureNodeSizes:i}=await r.e(930).then(r.bind(r,10930));i(t,e)}return{graph:i,groups:s,nodeElements:g}}(0,c.__name)(d,"createLayoutElementGroups"),(0,c.__name)(f,"measureGroupLabel"),(0,c.__name)(p,"insertMeasuredNode"),(0,c.__name)(g,"createGraphWithElements");var m=new Map,y=new Map,b=new Map,x=(0,c.__name)(()=>{y.clear(),b.clear(),m.clear()},"clear"),C=(0,c.__name)((t,e)=>{const r=y.get(e)||[];return h.log.trace("In isDescendant",e," ",t," = ",r.includes(t)),r.includes(t)},"isDescendant"),_=(0,c.__name)((t,e)=>{const r=y.get(e)||[];return h.log.info("Descendants of ",e," is ",r),h.log.info("Edge is ",t),t.v!==e&&t.w!==e&&(r?r.includes(t.v)||C(t.v,e)||C(t.w,e)||r.includes(t.w):(h.log.debug("Tilt, ",e,",not in descendants"),!1))},"edgeInCluster"),k=(0,c.__name)((t,e,r,i)=>{h.log.debug("Copying children of ",t,"root",i,"data",e.node(t),i);const n=e.children(t)||[];t!==i&&n.push(t),h.log.debug("Copying (nodes) clusterId",t,"nodes",n),n.forEach(n=>{if(e.children(n).length>0)k(n,e,r,i);else{const o=e.node(n);h.log.info("cp ",n," to ",i," with parent ",t),r.setNode(n,o),i!==e.parent(n)&&(h.log.debug("Setting parent",n,e.parent(n)),r.setParent(n,e.parent(n))),t!==i&&n!==t?(h.log.debug("Setting parent",n,t),r.setParent(n,t)):(h.log.info("In copy ",t,"root",i,"data",e.node(t),i),h.log.debug("Not Setting parent for node=",n,"cluster!==rootId",t!==i,"node!==clusterId",n!==t));const a=e.edges(n);h.log.debug("Copying Edges",a),a.forEach(n=>{h.log.info("Edge",n);const o=e.edge(n.v,n.w,n.name);h.log.info("Edge data",o,i);try{_(n,i)?(h.log.info("Copying as ",n.v,n.w,o,n.name),r.setEdge(n.v,n.w,o,n.name),h.log.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):h.log.info("Skipping copy of edge ",n.v,"--\x3e",n.w," rootId: ",i," clusterId:",t)}catch(t){h.log.error(t)}})}h.log.debug("Removing node",n),e.removeNode(n)})},"copy"),w=(0,c.__name)((t,e)=>{const r=e.children(t);let i=[...r];for(const n of r)b.set(n,t),i=[...i,...w(n,e)];return i},"extractDescendants"),v=(0,c.__name)((t,e,r)=>{const i=t.edges().filter(t=>t.v===e||t.w===e),n=t.edges().filter(t=>t.v===r||t.w===r),o=i.map(t=>({v:t.v===e?r:t.v,w:t.w===e?e:t.w})),a=n.map(t=>({v:t.v,w:t.w}));return o.filter(t=>a.some(e=>t.v===e.v&&t.w===e.w))},"findCommonEdges"),S=(0,c.__name)((t,e,r)=>{const i=e.children(t);if(h.log.trace("Searching children of id ",t,i),i.length<1)return t;let n;for(const t of i){const i=S(t,e,r),o=v(e,r,i);if(i){if(!(o.length>0))return i;n=i}}return n},"findNonClusterChild"),T=(0,c.__name)(t=>m.has(t)&&m.get(t).externalConnections&&m.has(t)?m.get(t).id:t,"getAnchorId"),B=(0,c.__name)((t,e)=>{if(!t||e>10)h.log.debug("Opting out, no graph ");else{h.log.debug("Opting in, graph "),t.nodes().forEach(function(e){t.children(e).length>0&&(h.log.debug("Cluster identified",e," Replacement id in edges: ",S(e,t,e)),y.set(e,w(e,t)),m.set(e,{id:S(e,t,e),clusterData:t.node(e)}))}),t.nodes().forEach(function(e){const r=t.children(e),i=t.edges();r.length>0?(h.log.debug("Cluster identified",e,y),i.forEach(t=>{C(t.v,e)^C(t.w,e)&&(h.log.debug("Edge: ",t," leaves cluster ",e),h.log.debug("Descendants of XXX ",e,": ",y.get(e)),m.get(e).externalConnections=!0)})):h.log.debug("Not a cluster ",e,y)});for(let e of m.keys()){const r=m.get(e).id,i=t.parent(r);i!==e&&m.has(i)&&!m.get(i).externalConnections&&(m.get(e).id=i);const n=t.edges().some(t=>t.v===e);if(r&&m.get(e)?.externalConnections&&n&&A(t,r,e)){const i=E(t,e,t.parent(r));i&&(m.get(e).id=i)}}t.edges().forEach(function(e){const r=t.edge(e);h.log.debug("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),h.log.debug("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t.edge(e)));let i=e.v,n=e.w;if(h.log.debug("Fix XXX",m,"ids:",e.v,e.w,"Translating: ",m.get(e.v)," --- ",m.get(e.w)),m.get(e.v)||m.get(e.w)){if(h.log.debug("Fixing and trying - removing XXX",e.v,e.w,e.name),i=T(e.v),n=T(e.w),t.removeEdge(e.v,e.w,e.name),i!==e.v){const n=t.parent(i);m.get(n).externalConnections=!0,r.fromCluster=e.v}if(n!==e.w){const i=t.parent(n);m.get(i).externalConnections=!0,r.toCluster=e.w}h.log.debug("Fix Replacing with XXX",i,n,e.name),t.setEdge(i,n,r,e.name)}}),M(t,0),h.log.trace(m)}},"adjustClustersAndEdges"),M=(0,c.__name)((t,e)=>{if(e>10)return void h.log.error("Bailing out");let r=t.nodes(),i=!1;for(const e of r){const r=t.children(e);i=i||r.length>0}if(i){h.log.debug("Nodes = ",r,e);for(const i of r)if(h.log.debug("Extracting node",i,m,m.has(i)&&!m.get(i).externalConnections,!t.parent(i),t.node(i),t.children("D")," Depth ",e),m.has(i))if(!m.get(i).externalConnections&&t.children(i)&&t.children(i).length>0){h.log.debug("Cluster without external connections, without a parent and with children",i,e);let r="TB"===t.graph().rankdir?"LR":"TB";m.get(i)?.clusterData?.dir&&(r=m.get(i).clusterData.dir,h.log.debug("Fixing dir",m.get(i).clusterData.dir,r));const n=new u.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});k(i,t,n,i),t.setNode(i,{clusterNode:!0,id:i,clusterData:m.get(i).clusterData,label:m.get(i).label,graph:n})}else h.log.debug("Cluster ** ",i," **not meeting the criteria !externalConnections:",!m.get(i).externalConnections," no parent: ",!t.parent(i)," children ",t.children(i)&&t.children(i).length>0,t.children("D"),e),h.log.debug(m);else h.log.debug("Not a cluster",i,e);r=t.nodes(),h.log.debug("New list of nodes",r);for(const i of r){const r=t.node(i);h.log.debug(" Now next level",i,r),r?.clusterNode&&M(r.graph,e+1)}}else h.log.debug("Done, no node has children",t.nodes())},"extractor"),L=(0,c.__name)((t,e)=>{if(0===e.length)return[];let r=Object.assign([],e);return e.forEach(e=>{const i=t.children(e),n=L(t,i);r=[...r,...n]}),r},"sorter"),F=(0,c.__name)(t=>L(t,t.children()),"sortNodesByHierarchy"),A=(0,c.__name)((t,e,r)=>{let i=t.parent(e);for(;i&&i!==r;){const e=m.get(i);if(e&&!e.externalConnections)return!0;i=t.parent(i)}return!1},"isNodeInExtractableCluster"),E=(0,c.__name)((t,e,r)=>{const i=t.children(e)??[];for(const n of i){if(n===r||C(n,r))continue;const i=S(n,t,e);if(i&&!A(t,i,e))return i}return null},"findSafeAnchorNode");function $({prepareLayout:t,measureLayout:e,runLayoutCore:r,paintLayout:i,afterPaint:o,paintOptions:a}){const s=e??D;return(0,c.__name)(async function(e,l,h,c){const u=l.select("g");(0,n.markers_default)(u,e.markers,e.type,e.diagramId),O();const d={element:u,helpers:h,options:c};d.preparedLayout=await(t?.(e,d));const f=await s(e,d),p=await r(e,d),g={...d,measure:f};i?await i(e,g,p):await I(e,g,a),await(o?.(e,g,p))},"render")}function O(){(0,o.clear)(),(0,n.clear)(),(0,i.clear)(),x()}async function D(t,{element:e}){return await g(e,t)}async function I(t,e,r={}){const{measure:i}=e,{groups:n}=i;for(const i of r.getNodes?.(t,e)??t.nodes)r.skipNode?.(i,e)||await N(n,i,e,r);const o=q(t.nodes);for(const i of t.edges)z(i,r)||await R(n,i,o,t,r,e)}async function N(t,e,r,n){e.clusterNode?(0,o.positionNode)(e):P(e,r,n)?await(0,i.insertCluster)(t.clusters,e):(0,o.positionNode)(e)}function P(t,e,r){return!0===t.isGroup&&(r.isCluster?.(t,e)??!0)}function q(t){const e=new Map;for(const r of t)r?.id&&e.set(r.id,r);return e}function z(t,e){return t.isLayoutOnly||Boolean(e.skipEdge?.(t))}async function R(t,e,r,i,o,a){const s=(0,n.insertEdge)(t.edgePaths,{...e},o.clusterDb??new Map,i.type,j(e.start,e,r,a,o),j(e.end,e,r,a,o),i.diagramId,W(e,o));(0,n.hasEdgeLabel)(e)&&(n.edgeLabels.has(e.id)||await(0,n.insertEdgeLabel)(t.edgeLabels,e),H(e,s))}function j(t,e,r,i,n){return n.getEdgeNode?.(t,e,i)??(t?r.get(t)??{}:{})}function W(t,e){return"function"==typeof e.skipIntersect?e.skipIntersect(t):e.skipIntersect??!1}function H(t,e){const r=e?.updatedPath??e?.originalPath,i=(0,l.getConfig)(),{subGraphTitleTotalMargin:a}=(0,o.getSubGraphTitleMargins)({flowchart:i.flowchart??{}});if(t.label){const i=n.edgeLabels.get(t.id);let o=t.x,l=t.y;if(r){const i=s.utils_default.calcLabelPosition(r);h.log.debug("Moving label "+t.label+" from (",o,",",l,") to (",i.x,",",i.y,") abc88"),e?.updatedPath&&(o=i.x,l=i.y)}i.attr("transform",`translate(${o}, ${l+a/2})`)}if(t?.startLabelLeft){const e=n.terminalLabels.get(t.id).startLeft;let i=t?.x,o=t?.y;if(r){const e=s.utils_default.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.startLabelRight){const e=n.terminalLabels.get(t.id).startRight;let i=t.x,o=t.y;if(r){const e=s.utils_default.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.endLabelLeft){const e=n.terminalLabels.get(t.id).endLeft;let i=t.x,o=t.y;if(r){const e=s.utils_default.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}if(t.endLabelRight){const e=n.terminalLabels.get(t.id).endRight;let i=t.x,o=t.y;if(r){const e=s.utils_default.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);i=e.x,o=e.y}e.attr("transform",`translate(${i}, ${o})`)}}(0,c.__name)($,"createCommonLayoutRenderer"),(0,c.__name)(O,"clearLayoutRenderState"),(0,c.__name)(D,"defaultMeasureLayout"),(0,c.__name)(I,"paintLayoutData"),(0,c.__name)(N,"paintLayoutNode"),(0,c.__name)(P,"shouldPaintAsCluster"),(0,c.__name)(q,"buildNodeLookup"),(0,c.__name)(z,"shouldSkipPaintEdge"),(0,c.__name)(R,"paintLayoutEdge"),(0,c.__name)(j,"getRenderedNode"),(0,c.__name)(W,"shouldSkipIntersect"),(0,c.__name)(H,"positionRenderedEdgeLabel")},39989(t,e,r){r.d(e,{UnknownDiagramError:()=>_t,addDirective:()=>ct,assignWithDepth_default:()=>m,calculateMathMLDimensions:()=>Xt,clear:()=>fe,commonDb_exports:()=>le,common_default:()=>Kt,configureSvgSize:()=>ee,cssStyleSheetToString:()=>ne,defaultConfig:()=>Q,defaultConfig2:()=>ve,defaultConfig_default:()=>Y,detectType:()=>wt,detectors:()=>kt,directiveRegex:()=>xt,evaluate:()=>K,frontMatterRegex:()=>bt,getAccDescription:()=>ye,getAccTitle:()=>ge,getConfig:()=>lt,getConfig2:()=>ke,getDiagram:()=>Fe,getDiagramLoader:()=>Tt,getDiagramTitle:()=>xe,getEffectiveHtmlLabels:()=>yt,getSiteConfig:()=>at,getThemeVariables:()=>S,getUrl:()=>qt,getUserDefinedConfig:()=>mt,hasKatex:()=>Vt,lineBreakRegex:()=>Bt,parseGenericTypes:()=>jt,registerDiagram:()=>Le,registerLazyLoadedDiagrams:()=>vt,renderKatexSanitized:()=>Qt,reset:()=>ut,sanitizeCss:()=>Z,sanitizeDirective:()=>X,sanitizeText:()=>$t,sanitizeText2:()=>Se,saveConfigFromInitialize:()=>nt,setAccDescription:()=>me,setAccTitle:()=>pe,setConfig:()=>st,setConfig2:()=>we,setDiagramTitle:()=>be,setSiteConfig:()=>it,setupGraphViewbox:()=>re,setupGraphViewbox2:()=>Te,styles_default:()=>se,themes_default:()=>R,updateSiteConfig:()=>ot}),r.r(e);var i=r(27166),n=r(79456),o=r(11028),a=r(36135);const s=(t,e)=>{const r=o.default.parse(t),i={};for(const t in e)e[t]&&(i[t]=r[t]+e[t]);return(0,a.default)(t,i)};var l=r(62209);const h=(t,e=100)=>{const r=o.default.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,((t,e,r=50)=>{const{r:i,g:n,b:a,a:s}=o.default.parse(t),{r:h,g:c,b:u,a:d}=o.default.parse(e),f=r/100,p=2*f-1,g=s-d,m=((p*g===-1?p:(p+g)/(1+p*g))+1)/2,y=1-m,b=i*m+h*y,x=n*m+c*y,C=a*m+u*y,_=s*f+d*(1-f);return(0,l.default)(b,x,C,_)})(r,t,e)};var c,u=r(87708),d=r(47964),f=r(1942),p=r(97519),g=(0,n.__name)((t,e,{depth:r=2}={})=>{const i={depth:r};if(Array.isArray(e)&&!Array.isArray(t))return e.forEach(e=>g(t,e,i)),t;if(Array.isArray(e)&&Array.isArray(t))return e.forEach(e=>{t.includes(e)||t.push(e)}),t;if(null==t||r<=0)return null!=t&&"object"==typeof t&&"object"==typeof e?Object.assign(t,e):e;if(null!=e&&"object"==typeof t&&"object"==typeof e){const i=t;Object.entries(e).forEach(([e,n])=>{if("object"==typeof n){if(null===n)return;Object.hasOwn(t,e)||Object.defineProperty(t,e,{value:void 0,writable:!0,enumerable:!0,configurable:!0}),void 0===i[e]&&(i[e]=Array.isArray(n)?[]:{}),"object"==typeof i[e]&&(i[e]=g(i[e],n,{depth:r-1}))}else"object"!=typeof i[e]&&(Object.hasOwn(t,e)?i[e]=n:Object.defineProperty(t,e,{value:n,writable:!0,enumerable:!0,configurable:!0}))})}return t},"assignWithDepth"),m=g,y="#ffffff",b="#f2f2f2",x=(0,n.__name)((t,e)=>s(t,e?{s:-40,l:10}:{s:-40,l:-10}),"mkBorder"),C=class{static{(0,n.__name)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.useGradient=!0,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||s(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||s(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||x(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||x(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||x(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||x(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||h(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||h(this.tertiaryColor),this.lineColor=this.lineColor||h(this.background),this.arrowheadColor=this.arrowheadColor||h(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,u.default)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.default)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||h(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||(0,d.default)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||"navy",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.darkMode?(this.rowOdd=this.rowOdd||(0,u.default)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,u.default)(this.mainBkg,10)):(this.rowOdd=this.rowOdd||(0,d.default)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||(0,d.default)(this.mainBkg,5)),this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.default)(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.default)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||h(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,d.default)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.default)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||s(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||s(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||s(this.primaryColor,{h:64}),this.fillType3=this.fillType3||s(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||s(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||s(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||s(this.primaryColor,{h:128}),this.fillType7=this.fillType7||s(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||s(this.primaryColor,{l:-10}),this.pie5=this.pie5||s(this.secondaryColor,{l:-10}),this.pie6=this.pie6||s(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||s(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||s(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||s(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||s(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||s(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||s(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??s(this.primaryColor,{l:-30}),this.venn2=this.venn2??s(this.secondaryColor,{l:-30}),this.venn3=this.venn3??s(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??s(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??s(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??s(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??s(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??s(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.archEdgeColor=this.archEdgeColor||"#777",this.archEdgeArrowColor=this.archEdgeArrowColor||"#777",this.archEdgeWidth=this.archEdgeWidth||"3",this.archGroupBorderColor=this.archGroupBorderColor||"#000",this.archGroupBorderWidth=this.archGroupBorderWidth||"2px",this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||s(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||s(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||s(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||s(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||s(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||s(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.default)(this.quadrant1Fill)?(0,d.default)(this.quadrant1Fill):(0,u.default)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,u.default)(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||s(this.primaryColor,{h:-30}),this.git4=this.git4||s(this.primaryColor,{h:-60}),this.git5=this.git5||s(this.primaryColor,{h:-90}),this.git6=this.git6||s(this.primaryColor,{h:60}),this.git7=this.git7||s(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,d.default)(this.git0,25),this.git1=(0,d.default)(this.git1,25),this.git2=(0,d.default)(this.git2,25),this.git3=(0,d.default)(this.git3,25),this.git4=(0,d.default)(this.git4,25),this.git5=(0,d.default)(this.git5,25),this.git6=(0,d.default)(this.git6,25),this.git7=(0,d.default)(this.git7,25)):(this.git0=(0,u.default)(this.git0,25),this.git1=(0,u.default)(this.git1,25),this.git2=(0,u.default)(this.git2,25),this.git3=(0,u.default)(this.git3,25),this.git4=(0,u.default)(this.git4,25),this.git5=(0,u.default)(this.git5,25),this.git6=(0,u.default)(this.git6,25),this.git7=(0,u.default)(this.git7,25)),this.gitInv0=this.gitInv0||h(this.git0),this.gitInv1=this.gitInv1||h(this.git1),this.gitInv2=this.gitInv2||h(this.git2),this.gitInv3=this.gitInv3||h(this.git3),this.gitInv4=this.gitInv4||h(this.git4),this.gitInv5=this.gitInv5||h(this.git5),this.gitInv6=this.gitInv6||h(this.git6),this.gitInv7=this.gitInv7||h(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||y,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||b,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},_=(0,n.__name)(t=>{const e=new C;return e.calculate(t),e},"getThemeVariables"),k=class{static{(0,n.__name)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,d.default)(this.primaryColor,16),this.tertiaryColor=s(this.primaryColor,{h:-160}),this.primaryBorderColor=h(this.background),this.secondaryBorderColor=x(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=x(this.tertiaryColor,this.darkMode),this.primaryTextColor=h(this.primaryColor),this.secondaryTextColor=h(this.secondaryColor),this.tertiaryTextColor=h(this.tertiaryColor),this.lineColor=h(this.background),this.textColor=h(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,d.default)(h("#323D47"),10),this.lineColor="calculated",this.border1="#ccc",this.border2=(0,l.default)(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.clusterBkg="#302F3D",this.sectionBkgColor=(0,u.default)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.excludeBkgColor=(0,u.default)(this.sectionBkgColor,10),this.taskBorderColor=(0,l.default)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=(0,l.default)(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd=this.rowOdd||(0,d.default)(this.mainBkg,5)||"#ffffff",this.rowEven=this.rowEven||(0,u.default)(this.mainBkg,10),this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal"}updateColors(){this.secondBkg=(0,d.default)(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=(0,d.default)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.actorBorder,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.background,this.taskBkgColor=(0,d.default)(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=h(this.doneTaskBkgColor),this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=s(this.primaryColor,{h:64}),this.fillType3=s(this.secondaryColor,{h:64}),this.fillType4=s(this.primaryColor,{h:-64}),this.fillType5=s(this.secondaryColor,{h:-64}),this.fillType6=s(this.primaryColor,{h:128}),this.fillType7=s(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||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||h(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScalePeer"+t]=this["cScalePeer"+t]||(0,d.default)(this["cScale"+t],10);for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||s(this.mainBkg,{h:30,s:-30,l:-(4*t-10)}),this["surfacePeer"+t]=this["surfacePeer"+t]||s(this.mainBkg,{h:30,s:-30,l:-(4*t-7)});this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.mainContrastColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.mainContrastColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??(0,d.default)(this["cScale"+t],30);this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#FF6B6B",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#1B5E20",complicatedBg:this.cynefin?.complicatedBg||"#0D47A1",chaoticBg:this.cynefin?.chaoticBg||"#BF360C",clearBg:this.cynefin?.clearBg||"#F57F17",confusionBg:this.cynefin?.confusionBg||"#4A148C",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||s(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||s(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||s(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||s(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||s(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||s(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.default)(this.quadrant1Fill)?(0,d.default)(this.quadrant1Fill):(0,u.default)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#3498db,#2ecc71,#e74c3c,#f1c40f,#bdc3c7,#ffffff,#34495e,#9b59b6,#1abc9c,#e67e22"},this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.background},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#ff6b6b",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.mainBkg,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.mainBkg},this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,u.default)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=(0,d.default)(this.secondaryColor,20),this.git1=(0,d.default)(this.pie2||this.secondaryColor,20),this.git2=(0,d.default)(this.pie3||this.tertiaryColor,20),this.git3=(0,d.default)(this.pie4||s(this.primaryColor,{h:-30}),20),this.git4=(0,d.default)(this.pie5||s(this.primaryColor,{h:-60}),20),this.git5=(0,d.default)(this.pie6||s(this.primaryColor,{h:-90}),10),this.git6=(0,d.default)(this.pie7||s(this.primaryColor,{h:60}),10),this.git7=(0,d.default)(this.pie8||s(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||h(this.git0),this.gitInv1=this.gitInv1||h(this.git1),this.gitInv2=this.gitInv2||h(this.git2),this.gitInv3=this.gitInv3||h(this.git3),this.gitInv4=this.gitInv4||h(this.git4),this.gitInv5=this.gitInv5||h(this.git5),this.gitInv6=this.gitInv6||h(this.git6),this.gitInv7=this.gitInv7||h(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||h(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||h(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.emUiFill=this.emUiFill||"#2d2d2d",this.emUiStroke=this.emUiStroke||"#555",this.emProcessorFill=this.emProcessorFill||(0,d.default)("#5a3d5c",10),this.emProcessorStroke=this.emProcessorStroke||"#8a6d8c",this.emReadModelFill=this.emReadModelFill||(0,d.default)("#3d5a2d",10),this.emReadModelStroke=this.emReadModelStroke||"#6d8c5c",this.emCommandFill=this.emCommandFill||(0,d.default)("#2d3d5a",10),this.emCommandStroke=this.emCommandStroke||"#5c6d8c",this.emEventFill=this.emEventFill||(0,d.default)("#5a452d",10),this.emEventStroke=this.emEventStroke||"#8c755c",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||(0,d.default)(this.background,5),this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||(0,d.default)(this.background,12),this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||(0,d.default)(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||(0,d.default)(this.background,2),this.nodeBorder=this.nodeBorder||"#999"}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},w=(0,n.__name)(t=>{const e=new k;return e.calculate(t),e},"getThemeVariables"),v=class{static{(0,n.__name)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=s(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=s(this.primaryColor,{h:-160}),this.primaryBorderColor=x(this.primaryColor,this.darkMode),this.secondaryBorderColor=x(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=x(this.tertiaryColor,this.darkMode),this.primaryTextColor=h(this.primaryColor),this.secondaryTextColor=h(this.secondaryColor),this.tertiaryTextColor=h(this.tertiaryColor),this.lineColor=h(this.background),this.textColor=h(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.primaryBorderColor=x(this.primaryColor,this.darkMode),this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="rgba(232,232,232, 0.8)",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.clusterBkg="#FBFBFF",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.sectionBkgColor=(0,l.default)(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="navy",this.noteFontWeight=this.noteFontWeight||"normal",this.fontWeight=this.fontWeight||"normal",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.rowOdd="calculated",this.rowEven="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!1,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow(1px 2px 2px rgba(185, 185, 185, 1))",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,u.default)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,u.default)(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.default)(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.default)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||s(this["cScale"+t],{h:180});for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||s(this.mainBkg,{h:30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||s(this.mainBkg,{h:30,l:-(7+5*t)});if(this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,"calculated"!==this.labelTextColor){this.cScaleLabel0=this.cScaleLabel0||h(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||h(this.labelTextColor);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||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=this.border1,this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||(0,d.default)(this.primaryColor,75)||"#ffffff",this.rowEven=this.rowEven||(0,d.default)(this.primaryColor,1),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=s(this.primaryColor,{h:64}),this.fillType3=s(this.secondaryColor,{h:64}),this.fillType4=s(this.primaryColor,{h:-64}),this.fillType5=s(this.secondaryColor,{h:-64}),this.fillType6=s(this.primaryColor,{h:128}),this.fillType7=s(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||s(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||s(this.primaryColor,{l:-10}),this.pie5=this.pie5||s(this.secondaryColor,{l:-30}),this.pie6=this.pie6||s(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||s(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||s(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||s(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||s(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||s(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||s(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??s(this.primaryColor,{l:-30}),this.venn2=this.venn2??s(this.secondaryColor,{l:-30}),this.venn3=this.venn3??s(this.tertiaryColor,{l:-40}),this.venn4=this.venn4??s(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??s(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??s(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??s(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??s(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||s(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||s(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||s(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||s(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||s(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||s(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.default)(this.quadrant1Fill)?(0,d.default)(this.quadrant1Fill):(0,u.default)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#ECECFF,#8493A6,#FFC3A0,#DCDDE1,#B8E994,#D1A36F,#C3CDE6,#FFB6C1,#496078,#F8F3E3"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||s(this.primaryColor,{h:-30}),this.git4=this.git4||s(this.primaryColor,{h:-60}),this.git5=this.git5||s(this.primaryColor,{h:-90}),this.git6=this.git6||s(this.primaryColor,{h:60}),this.git7=this.git7||s(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,d.default)(this.git0,25),this.git1=(0,d.default)(this.git1,25),this.git2=(0,d.default)(this.git2,25),this.git3=(0,d.default)(this.git3,25),this.git4=(0,d.default)(this.git4,25),this.git5=(0,d.default)(this.git5,25),this.git6=(0,d.default)(this.git6,25),this.git7=(0,d.default)(this.git7,25)):(this.git0=(0,u.default)(this.git0,25),this.git1=(0,u.default)(this.git1,25),this.git2=(0,u.default)(this.git2,25),this.git3=(0,u.default)(this.git3,25),this.git4=(0,u.default)(this.git4,25),this.git5=(0,u.default)(this.git5,25),this.git6=(0,u.default)(this.git6,25),this.git7=(0,u.default)(this.git7,25)),this.gitInv0=this.gitInv0||(0,u.default)(h(this.git0),25),this.gitInv1=this.gitInv1||h(this.git1),this.gitInv2=this.gitInv2||h(this.git2),this.gitInv3=this.gitInv3||h(this.git3),this.gitInv4=this.gitInv4||h(this.git4),this.gitInv5=this.gitInv5||h(this.git5),this.gitInv6=this.gitInv6||h(this.git6),this.gitInv7=this.gitInv7||h(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||h(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||h(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||y,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||b}calculate(t){if(Object.keys(this).forEach(t=>{"calculated"===this[t]&&(this[t]=void 0)}),"object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},S=(0,n.__name)(t=>{const e=new v;return e.calculate(t),e},"getThemeVariables"),T=class{static{(0,n.__name)(this,"Theme")}constructor(){this.background="#f4f4f4",this.primaryColor="#cde498",this.secondaryColor="#cdffb2",this.background="white",this.mainBkg="#cde498",this.secondBkg="#cdffb2",this.lineColor="green",this.border1="#13540c",this.border2="#6eaa49",this.arrowheadColor="green",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.tertiaryColor=(0,d.default)("#cde498",10),this.primaryBorderColor=x(this.primaryColor,this.darkMode),this.secondaryBorderColor=x(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=x(this.tertiaryColor,this.darkMode),this.primaryTextColor=h(this.primaryColor),this.secondaryTextColor=h(this.secondaryColor),this.tertiaryTextColor=h(this.primaryColor),this.lineColor=h(this.background),this.textColor=h(this.background),this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="calculated",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.vertLineColor="#00BFFF",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.5))"}updateColors(){this.actorBorder=(0,u.default)(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330}),this.cScalePeer1=this.cScalePeer1||(0,u.default)(this.secondaryColor,45),this.cScalePeer2=this.cScalePeer2||(0,u.default)(this.tertiaryColor,40);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.default)(this["cScale"+t],10),this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.default)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||s(this["cScale"+t],{h:180});this.scaleLabelColor="calculated"!==this.scaleLabelColor&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||s(this.mainBkg,{h:30,s:-30,l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||s(this.mainBkg,{h:30,s:-30,l:-(8+5*t)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.rowOdd=this.rowOdd||(0,d.default)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||(0,d.default)(this.mainBkg,20),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=s(this.primaryColor,{h:64}),this.fillType3=s(this.secondaryColor,{h:64}),this.fillType4=s(this.primaryColor,{h:-64}),this.fillType5=s(this.secondaryColor,{h:-64}),this.fillType6=s(this.primaryColor,{h:128}),this.fillType7=s(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||s(this.primaryColor,{l:-30}),this.pie5=this.pie5||s(this.secondaryColor,{l:-30}),this.pie6=this.pie6||s(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||s(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||s(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||s(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||s(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||s(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||s(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.venn1=this.venn1??s(this.primaryColor,{l:-30}),this.venn2=this.venn2??s(this.secondaryColor,{l:-30}),this.venn3=this.venn3??s(this.tertiaryColor,{l:-30}),this.venn4=this.venn4??s(this.primaryColor,{h:60,l:-30}),this.venn5=this.venn5??s(this.primaryColor,{h:-60,l:-30}),this.venn6=this.venn6??s(this.secondaryColor,{h:60,l:-30}),this.venn7=this.venn7??s(this.primaryColor,{h:120,l:-30}),this.venn8=this.venn8??s(this.secondaryColor,{h:120,l:-30}),this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B4513",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#C8E6C9",complicatedBg:this.cynefin?.complicatedBg||"#DCEDC8",chaoticBg:this.cynefin?.chaoticBg||"#FFE0B2",clearBg:this.cynefin?.clearBg||"#FFF9C4",confusionBg:this.cynefin?.confusionBg||"#D7CCC8",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||s(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||s(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||s(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||s(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||s(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||s(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.default)(this.quadrant1Fill)?(0,d.default)(this.quadrant1Fill):(0,u.default)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.packet={startByteColor:this.primaryTextColor,endByteColor:this.primaryTextColor,labelColor:this.primaryTextColor,titleColor:this.primaryTextColor,blockStrokeColor:this.primaryTextColor,blockFillColor:this.mainBkg},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#CDE498,#FF6B6B,#A0D2DB,#D7BDE2,#F0F0F0,#FFC3A0,#7FD8BE,#FF9A8B,#FAF3E0,#FFF176"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||s(this.primaryColor,{h:-30}),this.git4=this.git4||s(this.primaryColor,{h:-60}),this.git5=this.git5||s(this.primaryColor,{h:-90}),this.git6=this.git6||s(this.primaryColor,{h:60}),this.git7=this.git7||s(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,d.default)(this.git0,25),this.git1=(0,d.default)(this.git1,25),this.git2=(0,d.default)(this.git2,25),this.git3=(0,d.default)(this.git3,25),this.git4=(0,d.default)(this.git4,25),this.git5=(0,d.default)(this.git5,25),this.git6=(0,d.default)(this.git6,25),this.git7=(0,d.default)(this.git7,25)):(this.git0=(0,u.default)(this.git0,25),this.git1=(0,u.default)(this.git1,25),this.git2=(0,u.default)(this.git2,25),this.git3=(0,u.default)(this.git3,25),this.git4=(0,u.default)(this.git4,25),this.git5=(0,u.default)(this.git5,25),this.git6=(0,u.default)(this.git6,25),this.git7=(0,u.default)(this.git7,25)),this.gitInv0=this.gitInv0||h(this.git0),this.gitInv1=this.gitInv1||h(this.git1),this.gitInv2=this.gitInv2||h(this.git2),this.gitInv3=this.gitInv3||h(this.git3),this.gitInv4=this.gitInv4||h(this.git4),this.gitInv5=this.gitInv5||h(this.git5),this.gitInv6=this.gitInv6||h(this.git6),this.gitInv7=this.gitInv7||h(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||h(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||h(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||y,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||b}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},B=(0,n.__name)(t=>{const e=new T;return e.calculate(t),e},"getThemeVariables"),M=class{static{(0,n.__name)(this,"Theme")}constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=(0,d.default)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=s(this.primaryColor,{h:-160}),this.primaryBorderColor=x(this.primaryColor,this.darkMode),this.secondaryBorderColor=x(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=x(this.tertiaryColor,this.darkMode),this.primaryTextColor=h(this.primaryColor),this.secondaryTextColor=h(this.secondaryColor),this.tertiaryTextColor=h(this.tertiaryColor),this.lineColor=h(this.background),this.textColor=h(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.radius=5,this.strokeWidth=1,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor=this.actorBorder,this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.vertLineColor="calculated",this.personBorder=this.primaryBorderColor,this.personBkg=this.mainBkg,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal",this.rowOdd=this.rowOdd||(0,d.default)(this.mainBkg,75)||"#ffffff",this.rowEven=this.rowEven||"#f4f4f4",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.useGradient=!0,this.gradientStart=this.primaryBorderColor,this.gradientStop=this.secondaryBorderColor,this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,1))"}updateColors(){this.secondBkg=(0,d.default)(this.contrast,55),this.border2=this.contrast,this.actorBorder=(0,d.default)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.actorBorder,this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||h(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,d.default)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.default)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||s(this.mainBkg,{l:-(5+5*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||s(this.mainBkg,{l:-(8+5*t)});this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.sectionBkgColor=(0,d.default)(this.contrast,30),this.sectionBkgColor2=(0,d.default)(this.contrast,30),this.taskBorderColor=(0,u.default)(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=(0,d.default)(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=(0,u.default)(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.vertLineColor=this.critBkgColor,this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=s(this.primaryColor,{h:64}),this.fillType3=s(this.secondaryColor,{h:64}),this.fillType4=s(this.primaryColor,{h:-64}),this.fillType5=s(this.secondaryColor,{h:-64}),this.fillType6=s(this.primaryColor,{h:128}),this.fillType7=s(this.secondaryColor,{h:128});for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["pie"+t]=this["cScale"+t];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7";for(let t=0;t<8;t++)this["venn"+(t+1)]=this["venn"+(t+1)]??this["cScale"+t];this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.cynefin={domainFontSize:this.cynefin?.domainFontSize||16,itemFontSize:this.cynefin?.itemFontSize||12,boundaryColor:this.cynefin?.boundaryColor||this.lineColor,boundaryWidth:this.cynefin?.boundaryWidth||2,cliffColor:this.cynefin?.cliffColor||"#8B0000",cliffWidth:this.cynefin?.cliffWidth||4,arrowColor:this.cynefin?.arrowColor||this.lineColor,arrowWidth:this.cynefin?.arrowWidth||2,complexBg:this.cynefin?.complexBg||"#E8F5E9",complicatedBg:this.cynefin?.complicatedBg||"#E3F2FD",chaoticBg:this.cynefin?.chaoticBg||"#FBE9E7",clearBg:this.cynefin?.clearBg||"#FFF8E1",confusionBg:this.cynefin?.confusionBg||"#F3E5F5",textColor:this.cynefin?.textColor||this.textColor,labelColor:this.cynefin?.labelColor||this.primaryTextColor},this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||s(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||s(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||s(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||s(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||s(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||s(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.default)(this.quadrant1Fill)?(0,d.default)(this.quadrant1Fill):(0,u.default)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,dataLabelColor:this.xyChart?.dataLabelColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#EEE,#6BB8E4,#8ACB88,#C7ACD6,#E8DCC2,#FFB2A8,#FFF380,#7E8D91,#FFD8B1,#FAF3E0"},this.radar={axisColor:this.radar?.axisColor||this.lineColor,axisStrokeWidth:this.radar?.axisStrokeWidth||2,axisLabelFontSize:this.radar?.axisLabelFontSize||12,curveOpacity:this.radar?.curveOpacity||.5,curveStrokeWidth:this.radar?.curveStrokeWidth||2,graticuleColor:this.radar?.graticuleColor||"#DEDEDE",graticuleStrokeWidth:this.radar?.graticuleStrokeWidth||1,graticuleOpacity:this.radar?.graticuleOpacity||.3,legendBoxSize:this.radar?.legendBoxSize||12,legendFontSize:this.radar?.legendFontSize||12},this.wardleyEvolutionColor=this.wardleyEvolutionColor||"#dc3545",this.wardley={backgroundColor:this.wardley?.backgroundColor||this.background,axisColor:this.wardley?.axisColor||this.lineColor,axisTextColor:this.wardley?.axisTextColor||this.primaryTextColor,gridColor:this.wardley?.gridColor||this.gridColor,componentFill:this.wardley?.componentFill||this.background,componentStroke:this.wardley?.componentStroke||this.lineColor,componentLabelColor:this.wardley?.componentLabelColor||this.primaryTextColor,linkStroke:this.wardley?.linkStroke||this.lineColor,evolutionStroke:this.wardley?.evolutionStroke||this.wardleyEvolutionColor,annotationStroke:this.wardley?.annotationStroke||this.lineColor,annotationTextColor:this.wardley?.annotationTextColor||this.primaryTextColor,annotationFill:this.wardley?.annotationFill||this.background},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=(0,u.default)(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||s(this.primaryColor,{h:-30}),this.git4=this.pie5||s(this.primaryColor,{h:-60}),this.git5=this.pie6||s(this.primaryColor,{h:-90}),this.git6=this.pie7||s(this.primaryColor,{h:60}),this.git7=this.pie8||s(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||h(this.git0),this.gitInv1=this.gitInv1||h(this.git1),this.gitInv2=this.gitInv2||h(this.git2),this.gitInv3=this.gitInv3||h(this.git3),this.gitInv4=this.gitInv4||h(this.git4),this.gitInv5=this.gitInv5||h(this.git5),this.gitInv6=this.gitInv6||h(this.git6),this.gitInv7=this.gitInv7||h(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.emUiFill=this.emUiFill||"white",this.emUiStroke=this.emUiStroke||"#dbdada",this.emProcessorFill=this.emProcessorFill||"#edb3f6",this.emProcessorStroke=this.emProcessorStroke||"#b88cbf",this.emReadModelFill=this.emReadModelFill||"#d3f1a2",this.emReadModelStroke=this.emReadModelStroke||"#a3b732",this.emCommandFill=this.emCommandFill||"#bcd6fe",this.emCommandStroke=this.emCommandStroke||"#679ac3",this.emEventFill=this.emEventFill||"#ffb778",this.emEventStroke=this.emEventStroke||"#c19a0f",this.emSwimlaneBackgroundOdd=this.emSwimlaneBackgroundOdd||"rgb(250,250,250)",this.emSwimlaneBackgroundStroke=this.emSwimlaneBackgroundStroke||"rgb(240,240,240)",this.emArrowhead=this.emArrowhead||this.lineColor,this.emRelationStroke=this.emRelationStroke||this.lineColor,this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||y,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||b}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},L=(0,n.__name)(t=>{const e=new M;return e.calculate(t),e},"getThemeVariables"),F=class{static{(0,n.__name)(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=2,this.primaryBorderColor=x(this.primaryColor,this.darkMode),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.nodeBorder="#000000",this.stateBorder="#000000",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 0px 1px 2px rgba(0, 0, 0, 0.25));",this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||s(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||s(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||x(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||x(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||x(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||x(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||h(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||h(this.tertiaryColor),this.lineColor=this.lineColor||h(this.background),this.arrowheadColor=this.arrowheadColor||h(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,u.default)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.default)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||h(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",e="#E9E9F1",r=s(t,{h:180,l:5});if(this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,d.default)(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||t,this.cScale1=this.cScale1||e,this.cScale2=this.cScale2||r,this.cScale3=this.cScale3||s(t,{h:30}),this.cScale4=this.cScale4||s(t,{h:60}),this.cScale5=this.cScale5||s(t,{h:90}),this.cScale6=this.cScale6||s(t,{h:120}),this.cScale7=this.cScale7||s(t,{h:150}),this.cScale8=this.cScale8||s(t,{h:210,l:150}),this.cScale9=this.cScale9||s(t,{h:270}),this.cScale10=this.cScale10||s(t,{h:300}),this.cScale11=this.cScale11||s(t,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.default)(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.default)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||h(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,d.default)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.default)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||s(this.mainBkg,{h:180,s:-15,l:i*(5+3*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||s(this.mainBkg,{h:180,s:-15,l:i*(8+3*t)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||s(t,{h:64}),this.fillType3=this.fillType3||s(e,{h:64}),this.fillType4=this.fillType4||s(t,{h:-64}),this.fillType5=this.fillType5||s(e,{h:-64}),this.fillType6=this.fillType6||s(t,{h:128}),this.fillType7=this.fillType7||s(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||s(t,{l:-10}),this.pie5=this.pie5||s(e,{l:-10}),this.pie6=this.pie6||s(r,{l:-10}),this.pie7=this.pie7||s(t,{h:60,l:-10}),this.pie8=this.pie8||s(t,{h:-60,l:-10}),this.pie9=this.pie9||s(t,{h:120,l:0}),this.pie10=this.pie10||s(t,{h:60,l:-20}),this.pie11=this.pie11||s(t,{h:-60,l:-20}),this.pie12=this.pie12||s(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||s(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||s(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||s(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||s(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||s(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||s(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.default)(this.quadrant1Fill)?(0,d.default)(this.quadrant1Fill):(0,u.default)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,u.default)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||e,this.git2=this.git2||r,this.git3=this.git3||s(t,{h:-30}),this.git4=this.git4||s(t,{h:-60}),this.git5=this.git5||s(t,{h:-90}),this.git6=this.git6||s(t,{h:60}),this.git7=this.git7||s(t,{h:120}),this.darkMode?(this.git0=(0,d.default)(this.git0,25),this.git1=(0,d.default)(this.git1,25),this.git2=(0,d.default)(this.git2,25),this.git3=(0,d.default)(this.git3,25),this.git4=(0,d.default)(this.git4,25),this.git5=(0,d.default)(this.git5,25),this.git6=(0,d.default)(this.git6,25),this.git7=(0,d.default)(this.git7,25)):(this.git0=(0,u.default)(this.git0,25),this.git1=(0,u.default)(this.git1,25),this.git2=(0,u.default)(this.git2,25),this.git3=(0,u.default)(this.git3,25),this.git4=(0,u.default)(this.git4,25),this.git5=(0,u.default)(this.git5,25),this.git6=(0,u.default)(this.git6,25),this.git7=(0,u.default)(this.git7,25)),this.gitInv0=this.gitInv0||h(this.git0),this.gitInv1=this.gitInv1||h(this.git1),this.gitInv2=this.gitInv2||h(this.git2),this.gitInv3=this.gitInv3||h(this.git3),this.gitInv4=this.gitInv4||h(this.git4),this.gitInv5=this.gitInv5||h(this.git5),this.gitInv6=this.gitInv6||h(this.git6),this.gitInv7=this.gitInv7||h(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||y,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||b}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},A=(0,n.__name)(t=>{const e=new F;return e.calculate(t),e},"getThemeVariables"),E=class{static{(0,n.__name)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,d.default)(this.primaryColor,16),this.tertiaryColor=s(this.primaryColor,{h:-160}),this.primaryBorderColor=h(this.background),this.secondaryBorderColor=x(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=x(this.tertiaryColor,this.darkMode),this.primaryTextColor=h(this.primaryColor),this.secondaryTextColor=h(this.secondaryColor),this.tertiaryTextColor=h(this.tertiaryColor),this.mainBkg="#2a2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,d.default)(h("#323D47"),10),this.border1="#ccc",this.border2=(0,l.default)(255,255,255,.25),this.arrowheadColor=h(this.background),this.fontFamily="arial, sans-serif",this.fontSize="14px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=3,this.strokeWidth=1,this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily="arial, sans-serif",this.fontSize="14px",this.useGradient=!0,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="drop-shadow( 1px 2px 2px rgba(185,185,185,0.2))",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.noteFontWeight="normal",this.fontWeight="normal"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||s(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||s(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||x(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||x(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||x(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||x(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||h(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||h(this.tertiaryColor),this.lineColor=this.lineColor||h(this.background),this.arrowheadColor=this.arrowheadColor||h(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,u.default)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.default)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||h(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||(0,d.default)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.default)(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.default)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||h(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,d.default)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.default)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||s(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||s(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||s(this.primaryColor,{h:64}),this.fillType3=this.fillType3||s(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||s(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||s(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||s(this.primaryColor,{h:128}),this.fillType7=this.fillType7||s(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||s(this.primaryColor,{l:-10}),this.pie5=this.pie5||s(this.secondaryColor,{l:-10}),this.pie6=this.pie6||s(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||s(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||s(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||s(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||s(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||s(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||s(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||s(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||s(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||s(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||s(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||s(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||s(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.default)(this.quadrant1Fill)?(0,d.default)(this.quadrant1Fill):(0,u.default)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,u.default)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||"#0b0000",this.git1=this.git1||"#4d1037",this.git2=this.git2||"#3f5258",this.git3=this.git3||"#4f2f1b",this.git4=this.git4||"#6e0a0a",this.git5=this.git5||"#3b0048",this.git6=this.git6||"#995a01",this.git7=this.git7||"#154706",this.gitDarkMode=!0,this.gitDarkMode?(this.git0=(0,d.default)(this.git0,25),this.git1=(0,d.default)(this.git1,25),this.git2=(0,d.default)(this.git2,25),this.git3=(0,d.default)(this.git3,25),this.git4=(0,d.default)(this.git4,25),this.git5=(0,d.default)(this.git5,25),this.git6=(0,d.default)(this.git6,25),this.git7=(0,d.default)(this.git7,25)):(this.git0=(0,u.default)(this.git0,25),this.git1=(0,u.default)(this.git1,25),this.git2=(0,u.default)(this.git2,25),this.git3=(0,u.default)(this.git3,25),this.git4=(0,u.default)(this.git4,25),this.git5=(0,u.default)(this.git5,25),this.git6=(0,u.default)(this.git6,25),this.git7=(0,u.default)(this.git7,25)),this.gitInv0=this.gitInv0||h(this.git0),this.gitInv1=this.gitInv1||h(this.git1),this.gitInv2=this.gitInv2||h(this.git2),this.gitInv3=this.gitInv3||h(this.git3),this.gitInv4=this.gitInv4||h(this.git4),this.gitInv5=this.gitInv5||h(this.git5),this.gitInv6=this.gitInv6||h(this.git6),this.gitInv7=this.gitInv7||h(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||y,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||b}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},$=(0,n.__name)(t=>{const e=new E;return e.calculate(t),e},"getThemeVariables"),O=class{static{(0,n.__name)(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=x("#28253D",this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.clusterBkg="#F9F9FB",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||s(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||s(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||x(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||x(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||x(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||x(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#FEF9C3",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||h(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||h(this.tertiaryColor),this.lineColor=this.lineColor||h(this.background),this.arrowheadColor=this.arrowheadColor||h(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,u.default)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.noteFontWeight=600,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.default)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||h(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",e="#E9E9F1",r=s(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,d.default)(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.compositeTitleBackground="#F9F9FB",this.altBackground="#F9F9FB",this.stateEdgeLabelBackground="#FFFFFF",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=this.mainBkg;if(this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.default)(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.default)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||h(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,d.default)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.default)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||s(this.mainBkg,{h:180,s:-15,l:i*(5+3*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||s(this.mainBkg,{h:180,s:-15,l:i*(8+3*t)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||s(t,{h:64}),this.fillType3=this.fillType3||s(e,{h:64}),this.fillType4=this.fillType4||s(t,{h:-64}),this.fillType5=this.fillType5||s(e,{h:-64}),this.fillType6=this.fillType6||s(t,{h:128}),this.fillType7=this.fillType7||s(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||s(t,{l:-10}),this.pie5=this.pie5||s(e,{l:-10}),this.pie6=this.pie6||s(r,{l:-10}),this.pie7=this.pie7||s(t,{h:60,l:-10}),this.pie8=this.pie8||s(t,{h:-60,l:-10}),this.pie9=this.pie9||s(t,{h:120,l:0}),this.pie10=this.pie10||s(t,{h:60,l:-20}),this.pie11=this.pie11||s(t,{h:-60,l:-20}),this.pie12=this.pie12||s(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||s(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||s(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||s(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||s(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||s(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||s(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.default)(this.quadrant1Fill)?(0,d.default)(this.quadrant1Fill):(0,u.default)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,u.default)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#FFFFFF",this.git0=this.git0||t,this.git1=this.git1||e,this.git2=this.git2||r,this.git3=this.git3||s(t,{h:-30}),this.git4=this.git4||s(t,{h:-60}),this.git5=this.git5||s(t,{h:-90}),this.git6=this.git6||s(t,{h:60}),this.git7=this.git7||s(t,{h:120}),this.darkMode?(this.git0=(0,d.default)(this.git0,25),this.git1=(0,d.default)(this.git1,25),this.git2=(0,d.default)(this.git2,25),this.git3=(0,d.default)(this.git3,25),this.git4=(0,d.default)(this.git4,25),this.git5=(0,d.default)(this.git5,25),this.git6=(0,d.default)(this.git6,25),this.git7=(0,d.default)(this.git7,25)):(this.git0=(0,u.default)(this.git0,25),this.git1=(0,u.default)(this.git1,25),this.git2=(0,u.default)(this.git2,25),this.git3=(0,u.default)(this.git3,25),this.git4=(0,u.default)(this.git4,25),this.git5=(0,u.default)(this.git5,25),this.git6=(0,u.default)(this.git6,25),this.git7=(0,u.default)(this.git7,25)),this.gitInv0=this.gitInv0||h(this.git0),this.gitInv1=this.gitInv1||h(this.git1),this.gitInv2=this.gitInv2||h(this.git2),this.gitInv3=this.gitInv3||h(this.git3),this.gitInv4=this.gitInv4||h(this.git4),this.gitInv5=this.gitInv5||h(this.git5),this.gitInv6=this.gitInv6||h(this.git6),this.gitInv7=this.gitInv7||h(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||y,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||b}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},D=(0,n.__name)(t=>{const e=new O;return e.calculate(t),e},"getThemeVariables"),I=class{static{(0,n.__name)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,d.default)(this.primaryColor,16),this.tertiaryColor=s(this.primaryColor,{h:-160}),this.primaryBorderColor=h(this.background),this.secondaryBorderColor=x(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=x(this.tertiaryColor,this.darkMode),this.primaryTextColor=h(this.primaryColor),this.secondaryTextColor=h(this.secondaryColor),this.tertiaryTextColor=h(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,d.default)(h("#323D47"),10),this.border1="#ccc",this.border2=(0,l.default)(255,255,255,.25),this.arrowheadColor=h(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.filterColor="#FFFFFF"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||s(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||s(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||x(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||x(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||x(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||x(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||h(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||h(this.tertiaryColor),this.lineColor=this.lineColor||h(this.background),this.arrowheadColor=this.arrowheadColor||h(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,u.default)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.default)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||h(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,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||(0,d.default)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.compositeBackground="#16141F",this.altBackground="#16141F",this.compositeTitleBackground="#16141F",this.stateEdgeLabelBackground="#16141F",this.fontWeight=600,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||s(this.primaryColor,{h:30}),this.cScale4=this.cScale4||s(this.primaryColor,{h:60}),this.cScale5=this.cScale5||s(this.primaryColor,{h:90}),this.cScale6=this.cScale6||s(this.primaryColor,{h:120}),this.cScale7=this.cScale7||s(this.primaryColor,{h:150}),this.cScale8=this.cScale8||s(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||s(this.primaryColor,{h:270}),this.cScale10=this.cScale10||s(this.primaryColor,{h:300}),this.cScale11=this.cScale11||s(this.primaryColor,{h:330}),this.darkMode)for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.default)(this["cScale"+t],75);else for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScale"+t]=(0,u.default)(this["cScale"+t],25);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||h(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,d.default)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.default)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||s(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||s(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||s(this.primaryColor,{h:64}),this.fillType3=this.fillType3||s(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||s(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||s(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||s(this.primaryColor,{h:128}),this.fillType7=this.fillType7||s(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||s(this.primaryColor,{l:-10}),this.pie5=this.pie5||s(this.secondaryColor,{l:-10}),this.pie6=this.pie6||s(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||s(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||s(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||s(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||s(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||s(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||s(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||s(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||s(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||s(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||s(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||s(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||s(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.default)(this.quadrant1Fill)?(0,d.default)(this.quadrant1Fill):(0,u.default)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,u.default)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.requirementEdgeLabelBackground="#16141F",this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||s(this.primaryColor,{h:-30}),this.git4=this.git4||s(this.primaryColor,{h:-60}),this.git5=this.git5||s(this.primaryColor,{h:-90}),this.git6=this.git6||s(this.primaryColor,{h:60}),this.git7=this.git7||s(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,d.default)(this.git0,25),this.git1=(0,d.default)(this.git1,25),this.git2=(0,d.default)(this.git2,25),this.git3=(0,d.default)(this.git3,25),this.git4=(0,d.default)(this.git4,25),this.git5=(0,d.default)(this.git5,25),this.git6=(0,d.default)(this.git6,25),this.git7=(0,d.default)(this.git7,25)):(this.git0=(0,u.default)(this.git0,25),this.git1=(0,u.default)(this.git1,25),this.git2=(0,u.default)(this.git2,25),this.git3=(0,u.default)(this.git3,25),this.git4=(0,u.default)(this.git4,25),this.git5=(0,u.default)(this.git5,25),this.git6=(0,u.default)(this.git6,25),this.git7=(0,u.default)(this.git7,25)),this.gitInv0=this.gitInv0||h(this.git0),this.gitInv1=this.gitInv1||h(this.git1),this.gitInv2=this.gitInv2||h(this.git2),this.gitInv3=this.gitInv3||h(this.git3),this.gitInv4=this.gitInv4||h(this.git4),this.gitInv5=this.gitInv5||h(this.git5),this.gitInv6=this.gitInv6||h(this.git6),this.gitInv7=this.gitInv7||h(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||y,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||b}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},N=(0,n.__name)(t=>{const e=new I;return e.calculate(t),e},"getThemeVariables"),P=class{static{(0,n.__name)(this,"Theme")}constructor(){this.background="#ffffff",this.primaryColor="#cccccc",this.mainBkg="#ffffff",this.noteBkgColor="#fff5ad",this.noteTextColor="#28253D",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.primaryBorderColor=x(this.primaryColor,this.darkMode),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#28253D",this.stateBorder="#28253D",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.tertiaryColor="#ffffff",this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.actorBorder="#28253D",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=["#FDF4FF","#F0FDFA","#FFF7ED","#ECFEFF","#F0FDF4","#F5F3FF","#FEF2F2","#FEFCE8","#EEF2FF","#F7FEE7","#F0F9FF","#FFF1F2"],this.filterColor="#000000"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#28253D"),this.secondaryColor=this.secondaryColor||s(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||s(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||x(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||x(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||x(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||x(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#28253D",this.secondaryTextColor=this.secondaryTextColor||h(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||h(this.tertiaryColor),this.lineColor=this.lineColor||h(this.background),this.arrowheadColor=this.arrowheadColor||h(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,u.default)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.default)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||h(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor;const t="#ECECFE",e="#E9E9F1",r=s(t,{h:180,l:5});this.sectionBkgColor=this.sectionBkgColor||r,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||e,this.sectionBkgColor2=this.sectionBkgColor2||t,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||t,this.activeTaskBorderColor=this.activeTaskBorderColor||t,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,d.default)(t,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||h(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,d.default)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.default)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=this["cScaleLabel"+t]||this.scaleLabelColor;const i=this.darkMode?-4:-1;for(let t=0;t<5;t++)this["surface"+t]=this["surface"+t]||s(this.mainBkg,{h:180,s:-15,l:i*(5+3*t)}),this["surfacePeer"+t]=this["surfacePeer"+t]||s(this.mainBkg,{h:180,s:-15,l:i*(8+3*t)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||t,this.fillType1=this.fillType1||e,this.fillType2=this.fillType2||s(t,{h:64}),this.fillType3=this.fillType3||s(e,{h:64}),this.fillType4=this.fillType4||s(t,{h:-64}),this.fillType5=this.fillType5||s(e,{h:-64}),this.fillType6=this.fillType6||s(t,{h:128}),this.fillType7=this.fillType7||s(e,{h:128}),this.pie1=this.pie1||t,this.pie2=this.pie2||e,this.pie3=this.pie3||r,this.pie4=this.pie4||s(t,{l:-10}),this.pie5=this.pie5||s(e,{l:-10}),this.pie6=this.pie6||s(r,{l:-10}),this.pie7=this.pie7||s(t,{h:60,l:-10}),this.pie8=this.pie8||s(t,{h:-60,l:-10}),this.pie9=this.pie9||s(t,{h:120,l:0}),this.pie10=this.pie10||s(t,{h:60,l:-20}),this.pie11=this.pie11||s(t,{h:-60,l:-20}),this.pie12=this.pie12||s(t,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||t,this.quadrant2Fill=this.quadrant2Fill||s(t,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||s(t,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||s(t,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||s(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||s(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||s(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.default)(this.quadrant1Fill)?(0,d.default)(this.quadrant1Fill):(0,u.default)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||t,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,u.default)(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||t,this.git1=this.git1||e,this.git2=this.git2||r,this.git3=this.git3||s(t,{h:-30}),this.git4=this.git4||s(t,{h:-60}),this.git5=this.git5||s(t,{h:-90}),this.git6=this.git6||s(t,{h:60}),this.git7=this.git7||s(t,{h:120}),this.darkMode?(this.git0=(0,d.default)(this.git0,25),this.git1=(0,d.default)(this.git1,25),this.git2=(0,d.default)(this.git2,25),this.git3=(0,d.default)(this.git3,25),this.git4=(0,d.default)(this.git4,25),this.git5=(0,d.default)(this.git5,25),this.git6=(0,d.default)(this.git6,25),this.git7=(0,d.default)(this.git7,25)):(this.git0=(0,u.default)(this.git0,25),this.git1=(0,u.default)(this.git1,25),this.git2=(0,u.default)(this.git2,25),this.git3=(0,u.default)(this.git3,25),this.git4=(0,u.default)(this.git4,25),this.git5=(0,u.default)(this.git5,25),this.git6=(0,u.default)(this.git6,25),this.git7=(0,u.default)(this.git7,25)),this.gitInv0=this.gitInv0||h(this.git0),this.gitInv1=this.gitInv1||h(this.git1),this.gitInv2=this.gitInv2||h(this.git2),this.gitInv3=this.gitInv3||h(this.git3),this.gitInv4=this.gitInv4||h(this.git4),this.gitInv5=this.gitInv5||h(this.git5),this.gitInv6=this.gitInv6||h(this.git6),this.gitInv7=this.gitInv7||h(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.fontWeight=600,this.erEdgeLabelBackground="#FFFFFF",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||y,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||b}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},q=(0,n.__name)(t=>{const e=new P;return e.calculate(t),e},"getThemeVariables"),z=class{static{(0,n.__name)(this,"Theme")}constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=(0,d.default)(this.primaryColor,16),this.tertiaryColor=s(this.primaryColor,{h:-160}),this.primaryBorderColor=h(this.background),this.secondaryBorderColor=x(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=x(this.tertiaryColor,this.darkMode),this.primaryTextColor=h(this.primaryColor),this.secondaryTextColor=h(this.secondaryColor),this.tertiaryTextColor=h(this.tertiaryColor),this.mainBkg="#111113",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=(0,d.default)(h("#323D47"),10),this.border1="#ccc",this.border2=(0,l.default)(255,255,255,.25),this.arrowheadColor=h(this.background),this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.labelBackground="#111113",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.radius=12,this.strokeWidth=2,this.noteBkgColor=this.noteBkgColor??"#FEF9C3",this.noteTextColor=this.noteTextColor??"#28253D",this.THEME_COLOR_LIMIT=12,this.fontFamily='"Recursive Variable", arial, sans-serif',this.fontSize="14px",this.nodeBorder="#FFFFFF",this.stateBorder="#FFFFFF",this.useGradient=!1,this.gradientStart="#0042eb",this.gradientStop="#eb0042",this.dropShadow="url(#drop-shadow)",this.nodeShadow=!0,this.archEdgeColor="calculated",this.archEdgeArrowColor="calculated",this.archEdgeWidth="3",this.archGroupBorderColor=this.primaryBorderColor,this.archGroupBorderWidth="2px",this.clusterBkg="#1E1A2E",this.clusterBorder="#BDBCCC",this.noteBorderColor="#FACC15",this.noteFontWeight=600,this.borderColorArray=["#E879F9","#2DD4BF","#FB923C","#22D3EE","#4ADE80","#A78BFA","#F87171","#FACC15","#818CF8","#A3E635 ","#38BDF8","#FB7185"],this.bkgColorArray=[],this.filterColor="#FFFFFF"}updateColors(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#FFFFFF"),this.secondaryColor=this.secondaryColor||s(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||s(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||x(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||x(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||x(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||x(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#FFFFFF",this.secondaryTextColor=this.secondaryTextColor||h(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||h(this.tertiaryColor),this.lineColor=this.lineColor||h(this.background),this.arrowheadColor=this.arrowheadColor||h(this.background),this.textColor=this.textColor||this.primaryTextColor,this.border2=this.border2||this.tertiaryBorderColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.border1,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?(0,u.default)(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder="#FFFFFF",this.signalColor="#FFFFFF",this.labelBoxBorderColor="#BDBCCC",this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||this.actorBorder,this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||(0,u.default)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||h(this.lineColor),this.rectBkgColor=this.rectBkgColor||this.tertiaryColor,this.rootLabelColor="#FFFFFF",this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||(0,d.default)(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.vertLineColor=this.vertLineColor||this.primaryBorderColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.archEdgeColor=this.lineColor,this.archEdgeArrowColor=this.lineColor,this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||"#f4a8ff",this.cScale1=this.cScale1||"#46ecd5",this.cScale2=this.cScale2||"#ffb86a",this.cScale3=this.cScale3||"#dab2ff",this.cScale4=this.cScale4||"#7bf1a8",this.cScale5=this.cScale5||"#c4b4ff",this.cScale6=this.cScale6||"#ffa2a2",this.cScale7=this.cScale7||"#ffdf20",this.cScale8=this.cScale8||"#a3b3ff",this.cScale9=this.cScale9||"#bbf451",this.cScale10=this.cScale10||"#74d4ff",this.cScale11=this.cScale11||"#ffa1ad";for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleInv"+t]=this["cScaleInv"+t]||h(this["cScale"+t]);for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this.darkMode?this["cScalePeer"+t]=this["cScalePeer"+t]||(0,d.default)(this["cScale"+t],10):this["cScalePeer"+t]=this["cScalePeer"+t]||(0,u.default)(this["cScale"+t],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let t=0;t<this.THEME_COLOR_LIMIT;t++)this["cScaleLabel"+t]=(0,u.default)(this["cScale"+t],75);const t=this.darkMode?-4:-1;for(let e=0;e<5;e++)this["surface"+e]=this["surface"+e]||s(this.mainBkg,{h:180,s:-15,l:t*(5+3*e)}),this["surfacePeer"+e]=this["surfacePeer"+e]||s(this.mainBkg,{h:180,s:-15,l:t*(8+3*e)});this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||s(this.primaryColor,{h:64}),this.fillType3=this.fillType3||s(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||s(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||s(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||s(this.primaryColor,{h:128}),this.fillType7=this.fillType7||s(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||s(this.primaryColor,{l:-10}),this.pie5=this.pie5||s(this.secondaryColor,{l:-10}),this.pie6=this.pie6||s(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||s(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||s(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||s(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||s(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||s(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||s(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOuterStrokeWidth=this.pieOuterStrokeWidth||"2px",this.pieOuterStrokeColor=this.pieOuterStrokeColor||"black",this.pieOpacity=this.pieOpacity||"0.7",this.vennTitleTextColor=this.vennTitleTextColor??this.titleColor,this.vennSetTextColor=this.vennSetTextColor??this.textColor,this.quadrant1Fill=this.quadrant1Fill||this.primaryColor,this.quadrant2Fill=this.quadrant2Fill||s(this.primaryColor,{r:5,g:5,b:5}),this.quadrant3Fill=this.quadrant3Fill||s(this.primaryColor,{r:10,g:10,b:10}),this.quadrant4Fill=this.quadrant4Fill||s(this.primaryColor,{r:15,g:15,b:15}),this.quadrant1TextFill=this.quadrant1TextFill||this.primaryTextColor,this.quadrant2TextFill=this.quadrant2TextFill||s(this.primaryTextColor,{r:-5,g:-5,b:-5}),this.quadrant3TextFill=this.quadrant3TextFill||s(this.primaryTextColor,{r:-10,g:-10,b:-10}),this.quadrant4TextFill=this.quadrant4TextFill||s(this.primaryTextColor,{r:-15,g:-15,b:-15}),this.quadrantPointFill=this.quadrantPointFill||(0,f.default)(this.quadrant1Fill)?(0,d.default)(this.quadrant1Fill):(0,u.default)(this.quadrant1Fill),this.quadrantPointTextFill=this.quadrantPointTextFill||this.primaryTextColor,this.quadrantXAxisTextFill=this.quadrantXAxisTextFill||this.primaryTextColor,this.quadrantYAxisTextFill=this.quadrantYAxisTextFill||this.primaryTextColor,this.quadrantInternalBorderStrokeFill=this.quadrantInternalBorderStrokeFill||this.primaryBorderColor,this.quadrantExternalBorderStrokeFill=this.quadrantExternalBorderStrokeFill||this.primaryBorderColor,this.quadrantTitleFill=this.quadrantTitleFill||this.primaryTextColor,this.xyChart={backgroundColor:this.xyChart?.backgroundColor||this.background,titleColor:this.xyChart?.titleColor||this.primaryTextColor,legendTextColor:this.xyChart?.legendTextColor||this.primaryTextColor,xAxisTitleColor:this.xyChart?.xAxisTitleColor||this.primaryTextColor,xAxisLabelColor:this.xyChart?.xAxisLabelColor||this.primaryTextColor,xAxisTickColor:this.xyChart?.xAxisTickColor||this.primaryTextColor,xAxisLineColor:this.xyChart?.xAxisLineColor||this.primaryTextColor,yAxisTitleColor:this.xyChart?.yAxisTitleColor||this.primaryTextColor,yAxisLabelColor:this.xyChart?.yAxisLabelColor||this.primaryTextColor,yAxisTickColor:this.xyChart?.yAxisTickColor||this.primaryTextColor,yAxisLineColor:this.xyChart?.yAxisLineColor||this.primaryTextColor,plotColorPalette:this.xyChart?.plotColorPalette||"#FFF4DD,#FFD8B1,#FFA07A,#ECEFF1,#D6DBDF,#C3E0A8,#FFB6A4,#FFD74D,#738FA7,#FFFFF0"},this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||"1",this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?(0,u.default)(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||s(this.primaryColor,{h:-30}),this.git4=this.git4||s(this.primaryColor,{h:-60}),this.git5=this.git5||s(this.primaryColor,{h:-90}),this.git6=this.git6||s(this.primaryColor,{h:60}),this.git7=this.git7||s(this.primaryColor,{h:120}),this.darkMode?(this.git0=(0,d.default)(this.git0,25),this.git1=(0,d.default)(this.git1,25),this.git2=(0,d.default)(this.git2,25),this.git3=(0,d.default)(this.git3,25),this.git4=(0,d.default)(this.git4,25),this.git5=(0,d.default)(this.git5,25),this.git6=(0,d.default)(this.git6,25),this.git7=(0,d.default)(this.git7,25)):(this.git0=(0,u.default)(this.git0,25),this.git1=(0,u.default)(this.git1,25),this.git2=(0,u.default)(this.git2,25),this.git3=(0,u.default)(this.git3,25),this.git4=(0,u.default)(this.git4,25),this.git5=(0,u.default)(this.git5,25),this.git6=(0,u.default)(this.git6,25),this.git7=(0,u.default)(this.git7,25)),this.gitInv0=this.gitInv0||h(this.git0),this.gitInv1=this.gitInv1||h(this.git1),this.gitInv2=this.gitInv2||h(this.git2),this.gitInv3=this.gitInv3||h(this.git3),this.gitInv4=this.gitInv4||h(this.git4),this.gitInv5=this.gitInv5||h(this.git5),this.gitInv6=this.gitInv6||h(this.git6),this.gitInv7=this.gitInv7||h(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.commitLineColor=this.commitLineColor??"#BDBCCC",this.fontWeight=600,this.erEdgeLabelBackground="#16141F",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||y,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||b}calculate(t){if("object"!=typeof t)return void this.updateColors();const e=Object.keys(t);e.forEach(e=>{this[e]=t[e]}),this.updateColors(),e.forEach(e=>{this[e]=t[e]})}},R={base:{getThemeVariables:_},dark:{getThemeVariables:w},default:{getThemeVariables:S},forest:{getThemeVariables:B},neutral:{getThemeVariables:L},neo:{getThemeVariables:A},"neo-dark":{getThemeVariables:$},redux:{getThemeVariables:D},"redux-dark":{getThemeVariables:N},"redux-color":{getThemeVariables:q},"redux-dark-color":{getThemeVariables:(0,n.__name)(t=>{const e=new z;return e.calculate(t),e},"getThemeVariables")}},j={flowchart:{useMaxWidth:!0,titleTopMargin:25,subGraphTitleMargin:{top:0,bottom:0},diagramPadding:8,htmlLabels:null,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,defaultRenderer:"dagre-wrapper",wrappingWidth:200,inheritDir:!1},swimlane:{useMaxWidth:!0,lineHops:"arc",ignoreCrossLaneEdges:!0,optimizeRanksByCrossings:!0,automaticLaneOrdering:!1},sequence:{useMaxWidth:!0,hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20},gantt:{useMaxWidth:!0,titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",topAxis:!1,displayMode:"",weekday:"sunday"},journey:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,maxLabelWidth:360,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],titleColor:"",titleFontFamily:'"trebuchet ms", verdana, arial, sans-serif',titleFontSize:"4ex"},class:{useMaxWidth:!0,titleTopMargin:25,arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,defaultRenderer:"dagre-wrapper",htmlLabels:!1,hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},state:{useMaxWidth:!0,titleTopMargin:25,dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,defaultRenderer:"dagre-wrapper"},er:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,nodeSpacing:140,rankSpacing:80,stroke:"gray",fill:"honeydew",fontSize:12},pie:{useMaxWidth:!0,textPosition:.75,donutHole:0,legendPosition:"right",highlightSlice:""},quadrantChart:{useMaxWidth:!0,chartWidth:500,chartHeight:500,titleFontSize:20,titlePadding:10,quadrantPadding:5,xAxisLabelPadding:5,yAxisLabelPadding:5,xAxisLabelFontSize:16,yAxisLabelFontSize:16,quadrantLabelFontSize:16,quadrantTextTopPadding:5,pointTextPadding:5,pointLabelFontSize:12,pointRadius:5,xAxisPosition:"top",yAxisPosition:"left",quadrantInternalBorderStrokeWidth:1,quadrantExternalBorderStrokeWidth:2},xyChart:{useMaxWidth:!0,width:700,height:500,titleFontSize:20,titlePadding:10,showDataLabel:!1,showDataLabelOutsideBar:!1,showTitle:!0,showLegend:!0,legendFontSize:14,legendPadding:10,xAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},yAxis:{$ref:"#/$defs/XYChartAxisConfig",showLabel:!0,labelFontSize:14,labelPadding:5,showTitle:!0,titleFontSize:16,titlePadding:5,showTick:!0,tickLength:5,tickWidth:2,showAxisLine:!0,axisLineWidth:2,labelRotation:0},chartOrientation:"vertical",plotReservedSpacePercent:50},requirement:{useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200,layoutAlgorithm:"cose-bilkent"},ishikawa:{useMaxWidth:!0,diagramPadding:20},kanban:{useMaxWidth:!0,padding:8,sectionWidth:200,ticketBaseUrl:""},timeline:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"],disableMulticolor:!1},gitGraph:{useMaxWidth:!0,titleTopMargin:25,diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0,parallelCommits:!1,arrowMarkerAbsolute:!1},c4:{useMaxWidth:!0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},sankey:{useMaxWidth:!0,width:600,height:400,linkColor:"gradient",nodeAlignment:"justify",showValues:!0,prefix:"",suffix:"",nodeWidth:10,nodePadding:12,labelStyle:"legacy"},block:{useMaxWidth:!0,padding:8},packet:{useMaxWidth:!0,rowHeight:32,bitWidth:32,bitsPerRow:32,showBits:!0,paddingX:5,paddingY:5},treeView:{useMaxWidth:!0,rowIndent:10,paddingX:5,paddingY:5,lineThickness:1,showIcons:!1,defaultIconPack:"",filenameIcons:{},extensionIcons:{}},architecture:{useMaxWidth:!0,padding:40,iconSize:80,fontSize:16,randomize:!1,nodeSeparation:75,idealEdgeLengthMultiplier:1.5,edgeElasticity:.45,numIter:2500,seed:1},eventmodeling:{useMaxWidth:!0,padding:30,rowHeight:32},radar:{useMaxWidth:!0,width:600,height:600,marginTop:50,marginRight:50,marginBottom:50,marginLeft:50,axisScaleFactor:1,axisLabelFactor:1.05,curveTension:.17},venn:{useMaxWidth:!0,width:800,height:450,padding:8,useDebugLayout:!1},cynefin:{useMaxWidth:!0,width:800,height:600,padding:40,showDomainDescriptions:!0,boundaryAmplitude:8,seed:0},theme:"default",look:"classic",handDrawnSeed:0,layout:"dagre",maxTextSize:5e4,maxEdges:500,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize","suppressErrorRendering","maxEdges"],legacyMathML:!1,forceLegacyMathML:!1,deterministicIds:!1,fontSize:16,markdownAutoWrap:!0,suppressErrorRendering:!1},W={...j,deterministicIDSeed:void 0,elk:{mergeEdges:!1,nodePlacementStrategy:"BRANDES_KOEPF",nodePlacementAlignment:"NONE",forceNodeModelOrder:!1,considerModelOrder:"NODES_AND_EDGES",keepEntryNodeOnTop:!1},themeCSS:void 0,themeVariables:R.default.getThemeVariables(),sequence:{...j.sequence,messageFont:(0,n.__name)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont"),noteFont:(0,n.__name)(function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},"noteFont"),actorFont:(0,n.__name)(function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}},"actorFont")},class:{defaultRenderer:"dagre-wrapper",hideEmptyMembersBox:!1,hierarchicalNamespaces:!0},gantt:{...j.gantt,tickInterval:void 0,useWidth:void 0},c4:{...j.c4,useWidth:void 0,personFont:(0,n.__name)(function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},"personFont"),flowchart:{...j.flowchart,inheritDir:!1},external_personFont:(0,n.__name)(function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},"external_personFont"),systemFont:(0,n.__name)(function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},"systemFont"),external_systemFont:(0,n.__name)(function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},"external_systemFont"),system_dbFont:(0,n.__name)(function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},"system_dbFont"),external_system_dbFont:(0,n.__name)(function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},"external_system_dbFont"),system_queueFont:(0,n.__name)(function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},"system_queueFont"),external_system_queueFont:(0,n.__name)(function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},"external_system_queueFont"),containerFont:(0,n.__name)(function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},"containerFont"),external_containerFont:(0,n.__name)(function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},"external_containerFont"),container_dbFont:(0,n.__name)(function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},"container_dbFont"),external_container_dbFont:(0,n.__name)(function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},"external_container_dbFont"),container_queueFont:(0,n.__name)(function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},"container_queueFont"),external_container_queueFont:(0,n.__name)(function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},"external_container_queueFont"),componentFont:(0,n.__name)(function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},"componentFont"),external_componentFont:(0,n.__name)(function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},"external_componentFont"),component_dbFont:(0,n.__name)(function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},"component_dbFont"),external_component_dbFont:(0,n.__name)(function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},"external_component_dbFont"),component_queueFont:(0,n.__name)(function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},"component_queueFont"),external_component_queueFont:(0,n.__name)(function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},"external_component_queueFont"),boundaryFont:(0,n.__name)(function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},"boundaryFont"),messageFont:(0,n.__name)(function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},"messageFont")},pie:{...j.pie,useWidth:984},xyChart:{...j.xyChart,useWidth:void 0},requirement:{...j.requirement,useWidth:void 0},packet:{...j.packet},eventmodeling:{...j.eventmodeling},treeView:{...j.treeView,useWidth:void 0},radar:{...j.radar},railroad:{...j.railroad,fontSize:void 0,fontFamily:void 0,terminalFill:void 0,terminalStroke:void 0,terminalTextColor:void 0,nonTerminalFill:void 0,nonTerminalStroke:void 0,nonTerminalTextColor:void 0,lineColor:void 0,markerFill:void 0,commentFill:void 0,commentStroke:void 0,commentTextColor:void 0,specialFill:void 0,specialStroke:void 0,ruleNameColor:void 0},ishikawa:{...j.ishikawa},sankey:{...j.sankey,nodeColors:void 0},treemap:{useMaxWidth:!0,padding:10,diagramPadding:8,showValues:!0,nodeWidth:100,nodeHeight:40,borderWidth:1,valueFontSize:12,labelFontSize:14,valueFormat:","},venn:{...j.venn},cynefin:{...j.cynefin}},H=(0,n.__name)((t,e="")=>Object.keys(t).reduce((r,i)=>Array.isArray(t[i])?r:"object"==typeof t[i]&&null!==t[i]?[...r,e+i,...H(t[i],"")]:[...r,e+i],[]),"keyify"),U=new Set(H(W,"")),Y=W,G={nodeColors:/^#[\da-f]{3,8}$|^rgb\([\d\s%,.]+\)$|^hsl\([\d\s%,.]+\)$|^[a-z]+$/i,filenameIcons:/^[\w-]+(?::[\w-]+)?$/,extensionIcons:/^[\w-]+(?::[\w-]+)?$/},V=(0,n.__name)((t,e)=>{for(const r of Object.keys(t)){const n=t[r];(r.startsWith("__")||r.includes("proto")||r.includes("constr")||"string"!=typeof n||!e.test(n))&&(i.log.debug("sanitize deleting dictionary entry:",r,n),delete t[r])}},"sanitizeDictionaryConfig"),X=(0,n.__name)(t=>{if(i.log.debug("sanitizeDirective called with",t),"object"==typeof t&&null!=t)if(Array.isArray(t))t.forEach(t=>X(t));else{for(const e of Object.keys(t)){if(i.log.debug("Checking key",e),e.startsWith("__")||e.includes("proto")||e.includes("constr")||!U.has(e)||null==t[e]){i.log.debug("sanitize deleting key: ",e),delete t[e];continue}if("object"==typeof t[e]){const r=G[e];r?V(t[e],r):(i.log.debug("sanitizing object",e),X(t[e]));continue}const r=["themeCSS","fontFamily","altFontFamily"];for(const n of r)e.includes(n)&&(i.log.debug("sanitizing css option",e),t[e]=Z(t[e]))}if(t.themeVariables)for(const e of Object.keys(t.themeVariables)){const r=t.themeVariables[e];r?.match&&!r.match(/^[\d "#%(),.;A-Za-z]+$/)&&(t.themeVariables[e]="")}i.log.debug("After sanitization",t)}},"sanitizeDirective"),Z=(0,n.__name)(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},"sanitizeCss"),Q=Object.freeze(Y),K=(0,n.__name)(t=>!1!==t&&!["false","null","0"].includes(String(t).trim().toLowerCase()),"evaluate"),J=m({},Q),tt=[],et=m({},Q),rt=(0,n.__name)((t,e)=>{let r=m({},t),i={};for(const t of e)ht(t),i=m(i,t);if(r=m(r,i),i.theme&&i.theme in R){const t=m({},c),e=m(t.themeVariables||{},i.themeVariables);r.theme&&r.theme in R&&(r.themeVariables=R[r.theme].getThemeVariables(e))}return gt(et=r),et},"updateCurrentConfig"),it=(0,n.__name)(t=>(J=m({},Q),J=m(J,t),t.theme&&R[t.theme]&&(J.themeVariables=R[t.theme].getThemeVariables(t.themeVariables)),rt(J,tt),J),"setSiteConfig"),nt=(0,n.__name)(t=>{c=m({},t)},"saveConfigFromInitialize"),ot=(0,n.__name)(t=>(J=m(J,t),rt(J,tt),J),"updateSiteConfig"),at=(0,n.__name)(()=>m({},J),"getSiteConfig"),st=(0,n.__name)(t=>(rt(et,[t]),lt()),"setConfig"),lt=(0,n.__name)(()=>m({},et),"getConfig"),ht=(0,n.__name)(t=>{t&&(["secure",...J.secure??[]].forEach(e=>{Object.hasOwn(t,e)&&(i.log.debug(`Denied attempt to modify a secure key ${e}`,t[e]),delete t[e])}),Object.keys(t).forEach(e=>{e.startsWith("__")&&delete t[e]}),Object.keys(t).forEach(e=>{"string"==typeof t[e]&&(t[e].includes("<")||t[e].includes(">")||t[e].includes("url(data:"))&&delete t[e],"object"==typeof t[e]&&ht(t[e])}))},"sanitize"),ct=(0,n.__name)(t=>{X(t),t.fontFamily&&!t.themeVariables?.fontFamily&&(t.themeVariables={...t.themeVariables,fontFamily:t.fontFamily}),tt.push(t),rt(J,tt)},"addDirective"),ut=(0,n.__name)((t=J)=>{rt(t,tt=[])},"reset"),dt={LAZY_LOAD_DEPRECATED:"The configuration options lazyLoadedDiagrams and loadExternalDiagramsAtStartup are deprecated. Please use registerExternalDiagrams instead.",FLOWCHART_HTML_LABELS_DEPRECATED:"flowchart.htmlLabels is deprecated. Please use global htmlLabels instead."},ft={},pt=(0,n.__name)(t=>{ft[t]||(i.log.warn(dt[t]),ft[t]=!0)},"issueWarning"),gt=(0,n.__name)(t=>{t&&(t.lazyLoadedDiagrams||t.loadExternalDiagramsAtStartup)&&pt("LAZY_LOAD_DEPRECATED")},"checkConfig"),mt=(0,n.__name)(()=>{let t={};c&&(t=m(t,c));for(const e of tt)t=m(t,e);return t},"getUserDefinedConfig"),yt=(0,n.__name)(t=>(null!=t.flowchart?.htmlLabels&&pt("FLOWCHART_HTML_LABELS_DEPRECATED"),K(t.htmlLabels??t.flowchart?.htmlLabels??!0)),"getEffectiveHtmlLabels"),bt=/^([^\S\n\r]*)-{3}\s*[\n\r](.*?)[\n\r]\1-{3}\s*[\n\r]+/s,xt=/%{2}{\s*(?:(\w+)\s*:|(\w+))\s*(?:(\w+)|((?:(?!}%{2}).|\r?\n)*))?\s*(?:}%{2})?/gi,Ct=/\s*%%.*\n/gm,_t=class extends Error{static{(0,n.__name)(this,"UnknownDiagramError")}constructor(t){super(t),this.name="UnknownDiagramError"}},kt={},wt=(0,n.__name)(function(t,e){t=t.replace(bt,"").replace(xt,"").replace(Ct,"\n");for(const[r,{detector:i}]of Object.entries(kt))if(i(t,e))return r;throw new _t(`No diagram type detected matching given configuration for text: ${t}`)},"detectType"),vt=(0,n.__name)((...t)=>{for(const{id:e,detector:r,loader:i}of t)St(e,r,i)},"registerLazyLoadedDiagrams"),St=(0,n.__name)((t,e,r)=>{kt[t]&&i.log.warn(`Detector with key ${t} already exists. Overwriting.`),kt[t]={detector:e,loader:r},i.log.debug(`Detector with key ${t} added${r?" with loader":""}`)},"addDetector"),Tt=(0,n.__name)(t=>kt[t].loader,"getDiagramLoader"),Bt=/<br\s*\/?>/gi,Mt=(0,n.__name)(t=>t?Pt(t).replace(/\\n/g,"#br#").split("#br#"):[""],"getRows"),Lt=(()=>{let t=!1;return()=>{t||(Ft(),t=!0)}})();function Ft(){const t="data-temp-href-target";p.default.addHook("beforeSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute("target")&&e.setAttribute(t,e.getAttribute("target")??"")}),p.default.addHook("afterSanitizeAttributes",e=>{"A"===e.tagName&&e.hasAttribute(t)&&(e.setAttribute("target",e.getAttribute(t)??""),e.removeAttribute(t),"_blank"===e.getAttribute("target")&&e.setAttribute("rel","noopener"))})}(0,n.__name)(Ft,"setupDompurifyHooks");var At=(0,n.__name)(t=>(Lt(),p.default.sanitize(t)),"removeScript"),Et=(0,n.__name)((t,e)=>{if(yt(e)){const r=e.securityLevel;"antiscript"===r||"strict"===r||"sandbox"===r?t=At(t):"loose"!==r&&(t=(t=(t=Pt(t)).replace(/</g,"<").replace(/>/g,">")).replace(/=/g,"="),t=Nt(t))}return t},"sanitizeMore"),$t=(0,n.__name)((t,e)=>t?t=e.dompurifyConfig?p.default.sanitize(Et(t,e),e.dompurifyConfig).toString():p.default.sanitize(Et(t,e),{FORBID_TAGS:["style"]}).toString():t,"sanitizeText"),Ot=(0,n.__name)((t,e)=>"string"==typeof t?$t(t,e):t.flat().map(t=>$t(t,e)),"sanitizeTextOrArray"),Dt=(0,n.__name)(t=>Bt.test(t),"hasBreaks"),It=(0,n.__name)(t=>t.split(Bt),"splitBreaks"),Nt=(0,n.__name)(t=>t.replace(/#br#/g,"<br/>"),"placeholderToBreak"),Pt=(0,n.__name)(t=>t.replace(Bt,"#br#"),"breakToPlaceholder"),qt=(0,n.__name)(t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=CSS.escape(e)),e},"getUrl"),zt=(0,n.__name)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.max(...e)},"getMax"),Rt=(0,n.__name)(function(...t){const e=t.filter(t=>!isNaN(t));return Math.min(...e)},"getMin"),jt=(0,n.__name)(function(t){const e=t.split(/(,)/),r=[];for(let t=0;t<e.length;t++){let i=e[t];if(","===i&&t>0&&t+1<e.length){const n=e[t-1],o=e[t+1];Ht(n,o)&&(i=n+","+o,t++,r.pop())}r.push(Ut(i))}return r.join("")},"parseGenericTypes"),Wt=(0,n.__name)((t,e)=>Math.max(0,t.split(e).length-1),"countOccurrence"),Ht=(0,n.__name)((t,e)=>{const r=Wt(t,"~"),i=Wt(e,"~");return 1===r&&1===i},"shouldCombineSets"),Ut=(0,n.__name)(t=>{const e=Wt(t,"~");let r=!1;if(e<=1)return t;e%2!=0&&t.startsWith("~")&&(t=t.substring(1),r=!0);const i=[...t];let n=i.indexOf("~"),o=i.lastIndexOf("~");for(;-1!==n&&-1!==o&&n!==o;)i[n]="<",i[o]=">",n=i.indexOf("~"),o=i.lastIndexOf("~");return r&&i.unshift("~"),i.join("")},"processSet"),Yt=(0,n.__name)(()=>void 0!==window.MathMLElement,"isMathMLSupported"),Gt=/\$\$(.*?)\$\$/g,Vt=(0,n.__name)(t=>(t.match(Gt)?.length??0)>0,"hasKatex"),Xt=(0,n.__name)(async(t,e)=>{const r=document.createElement("div");r.innerHTML=await Qt(t,e),r.id="katex-temp",r.style.visibility="hidden",r.style.position="absolute",r.style.top="0";const i=document.querySelector("body");i?.insertAdjacentElement("beforeend",r);const n={width:r.clientWidth,height:r.clientHeight};return r.remove(),n},"calculateMathMLDimensions"),Zt=(0,n.__name)(async(t,e)=>{if(!Vt(t))return t;if(!(Yt()||e.legacyMathML||e.forceLegacyMathML))return t.replace(Gt,"MathML is unsupported in this environment.");{const{default:i}=await r.e(9263).then(r.bind(r,9263)),n=e.forceLegacyMathML||!Yt()&&e.legacyMathML?"htmlAndMathml":"mathml";return t.split(Bt).map(t=>Vt(t)?`<div style="display: flex; align-items: center; justify-content: center; white-space: nowrap;">${t}</div>`:`<div>${t}</div>`).join("").replace(Gt,(t,e)=>i.renderToString(e,{throwOnError:!0,displayMode:!0,output:n}).replace(/\n/g," ").replace(/<annotation.*<\/annotation>/g,""))}},"renderKatexUnsanitized"),Qt=(0,n.__name)(async(t,e)=>$t(await Zt(t,e),e),"renderKatexSanitized"),Kt={getRows:Mt,sanitizeText:$t,sanitizeTextOrArray:Ot,hasBreaks:Dt,splitBreaks:It,lineBreakRegex:Bt,removeScript:At,getUrl:qt,evaluate:K,getMax:zt,getMin:Rt},Jt=(0,n.__name)(function(t,e){for(let r of e)t.attr(r[0],r[1])},"d3Attrs"),te=(0,n.__name)(function(t,e,r){let i=new Map;return r?(i.set("width","100%"),i.set("style",`max-width: ${e}px;`)):(i.set("height",t),i.set("width",e)),i},"calculateSvgSizeAttrs"),ee=(0,n.__name)(function(t,e,r,i){const n=te(e,r,i);Jt(t,n)},"configureSvgSize"),re=(0,n.__name)(function(t,e,r,n){const o=e.node().getBBox(),a=o.width,s=o.height;i.log.info(`SVG bounds: ${a}x${s}`,o);let l=0,h=0;i.log.info(`Graph bounds: ${l}x${h}`,t),l=a+2*r,h=s+2*r,i.log.info(`Calculated bounds: ${l}x${h}`),ee(e,h,l,n);const c=`${o.x-r} ${o.y-r} ${o.width+2*r} ${o.height+2*r}`;e.attr("viewBox",c)},"setupGraphViewbox"),ie={};function ne(t){return[...t.cssRules].map(t=>t.cssText).join("\n")}(0,n.__name)(ne,"cssStyleSheetToString");var oe=(0,n.__name)((t,e,r,n)=>{let o="";return t in ie&&ie[t]?o=ie[t]({...r,svgId:n}):i.log.warn(`No theme found for ${t}`),`& {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n fill: ${r.textColor}\n }\n @keyframes edge-animation-frame {\n from {\n stroke-dashoffset: 0;\n }\n }\n @keyframes dash {\n to {\n stroke-dashoffset: 0;\n }\n }\n & .edge-animation-slow {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 50s linear infinite;\n stroke-linecap: round;\n }\n & .edge-animation-fast {\n stroke-dasharray: 9,5 !important;\n stroke-dashoffset: 900;\n animation: dash 20s linear infinite;\n stroke-linecap: round;\n }\n /* Classes common for multiple diagrams */\n\n & .error-icon {\n fill: ${r.errorBkgColor};\n }\n & .error-text {\n fill: ${r.errorTextColor};\n stroke: ${r.errorTextColor};\n }\n\n & .edge-thickness-normal {\n stroke-width: ${r.strokeWidth??1}px;\n }\n & .edge-thickness-thick {\n stroke-width: 3.5px\n }\n & .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n & .edge-thickness-invisible {\n stroke-width: 0;\n fill: none;\n }\n & .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n & .marker {\n fill: ${r.lineColor};\n stroke: ${r.lineColor};\n }\n & .marker.cross {\n stroke: ${r.lineColor};\n }\n\n & svg {\n font-family: ${r.fontFamily};\n font-size: ${r.fontSize};\n }\n & p {\n margin: 0\n }\n\n ${o}\n .node .neo-node {\n stroke: ${r.nodeBorder};\n }\n\n [data-look="neo"].node rect, [data-look="neo"].cluster rect, [data-look="neo"].node polygon {\n stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};\n }\n [data-look="neo"].swimlane.cluster rect {\n filter: none;\n }\n\n\n [data-look="neo"].node path {\n stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};\n stroke-width: ${r.strokeWidth??1}px;\n }\n\n [data-look="neo"].node .outer-path {\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].node .neo-line path {\n stroke: ${r.nodeBorder};\n filter: none;\n }\n\n [data-look="neo"].node circle{\n stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].node circle .state-start{\n fill: #000000;\n }\n\n [data-look="neo"].icon-shape .icon {\n fill: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};\n }\n\n [data-look="neo"].icon-shape .icon-neo path {\n stroke: ${r.useGradient?"url("+n+"-gradient)":r.nodeBorder};\n filter: ${r.dropShadow?r.dropShadow.replace("url(#drop-shadow)",`url(${n}-drop-shadow)`):"none"};\n }\n\n ${e}\n`},"getStyles"),ae=(0,n.__name)((t,e)=>{void 0!==e&&(ie[t]=e)},"addStylesForDiagram"),se=oe,le={};(0,n.__export)(le,{clear:()=>fe,getAccDescription:()=>ye,getAccTitle:()=>ge,getDiagramTitle:()=>xe,setAccDescription:()=>me,setAccTitle:()=>pe,setDiagramTitle:()=>be});var he="",ce="",ue="",de=(0,n.__name)(t=>$t(t,lt()),"sanitizeText"),fe=(0,n.__name)(()=>{he="",ue="",ce=""},"clear"),pe=(0,n.__name)(t=>{he=de(t).replace(/^\s+/g,"")},"setAccTitle"),ge=(0,n.__name)(()=>he,"getAccTitle"),me=(0,n.__name)(t=>{ue=de(t).replace(/\n\s+/g,"\n")},"setAccDescription"),ye=(0,n.__name)(()=>ue,"getAccDescription"),be=(0,n.__name)(t=>{ce=de(t)},"setDiagramTitle"),xe=(0,n.__name)(()=>ce,"getDiagramTitle"),Ce=i.log,_e=i.setLogLevel,ke=lt,we=st,ve=Q,Se=(0,n.__name)(t=>$t(t,ke()),"sanitizeText"),Te=re,Be=(0,n.__name)(()=>le,"getCommonDb"),Me={},Le=(0,n.__name)((t,e,r)=>{Me[t]&&Ce.warn(`Diagram with id ${t} already registered. Overwriting.`),Me[t]=e,r&&St(t,r),ae(t,e.styles),e.injectUtils?.(Ce,_e,ke,Se,Te,Be(),()=>{})},"registerDiagram"),Fe=(0,n.__name)(t=>{if(t in Me)return Me[t];throw new Ae(t)},"getDiagram"),Ae=class extends Error{static{(0,n.__name)(this,"DiagramNotFoundError")}constructor(t){super(`Diagram ${t} not found.`)}}},77948(t,e,r){r.d(e,{computeDimensionOfText:()=>Ht,createText:()=>Xt,fastdom_default:()=>Lt}),r.r(e);var i=r(56350),n=r(70848),o=r(39989),a=r(27166),s=r(79456),l=r(47510),h=r(93945),c=r(79806);var u={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};function d(t){u=t}var f={exec:()=>null};function p(t,e=""){let r="string"==typeof t?t:t.source,i={replace:(t,e)=>{let n="string"==typeof e?e:e.source;return n=n.replace(m.caret,"$1"),r=r.replace(t,n),i},getRegex:()=>new RegExp(r,e)};return i}var g=(()=>{try{return!!new RegExp("(?<=1)(?<!1)")}catch{return!1}})(),m={codeRemoveIndent:/^(?: {1,4}| {0,3}\t)/gm,outputLinkReplace:/\\([\[\]])/g,indentCodeCompensation:/^(\s+)(?:```)/,beginningSpace:/^\s+/,endingHash:/#$/,startingSpaceChar:/^ /,endingSpaceChar:/ $/,nonSpaceChar:/[^ ]/,newLineCharGlobal:/\n/g,tabCharGlobal:/\t/g,multipleSpaceGlobal:/\s+/g,blankLine:/^[ \t]*$/,doubleBlankLine:/\n[ \t]*\n[ \t]*$/,blockquoteStart:/^ {0,3}>/,blockquoteSetextReplace:/\n {0,3}((?:=+|-+) *)(?=\n|$)/g,blockquoteSetextReplace2:/^ {0,3}>[ \t]?/gm,listReplaceTabs:/^\t+/,listReplaceNesting:/^ {1,4}(?=( {4})*[^ ])/g,listIsTask:/^\[[ xX]\] /,listReplaceTask:/^\[[ xX]\] +/,anyLine:/\n.*\n/,hrefBrackets:/^<(.*)>$/,tableDelimiter:/[:|]/,tableAlignChars:/^\||\| *$/g,tableRowBlankLine:/\n[ \t]*$/,tableAlignRight:/^ *-+: *$/,tableAlignCenter:/^ *:-+: *$/,tableAlignLeft:/^ *:-+ *$/,startATag:/^<a /i,endATag:/^<\/a>/i,startPreScriptTag:/^<(pre|code|kbd|script)(\s|>)/i,endPreScriptTag:/^<\/(pre|code|kbd|script)(\s|>)/i,startAngleBracket:/^</,endAngleBracket:/>$/,pedanticHrefTitle:/^([^'"]*[^\s])\s+(['"])(.*)\2/,unicodeAlphaNumeric:/[\p{L}\p{N}]/u,escapeTest:/[&<>"']/,escapeReplace:/[&<>"']/g,escapeTestNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/,escapeReplaceNoEncode:/[<>"']|&(?!(#\d{1,7}|#[Xx][a-fA-F0-9]{1,6}|\w+);)/g,unescapeTest:/&(#(?:\d+)|(?:#x[0-9A-Fa-f]+)|(?:\w+));?/gi,caret:/(^|[^\[])\^/g,percentDecode:/%25/g,findPipe:/\|/g,splitPipe:/ \|/,slashPipe:/\\\|/g,carriageReturn:/\r\n|\r/g,spaceLine:/^ +$/gm,notSpaceStart:/^\S*/,endingNewline:/\n$/,listItemRegex:t=>new RegExp(`^( {0,3}${t})((?:[\t ][^\\n]*)?(?:\\n|$))`),nextBulletRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:[*+-]|\\d{1,9}[.)])((?:[ \t][^\\n]*)?(?:\\n|$))`),hrRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}((?:- *){3,}|(?:_ *){3,}|(?:\\* *){3,})(?:\\n+|$)`),fencesBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}(?:\`\`\`|~~~)`),headingBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}#`),htmlBeginRegex:t=>new RegExp(`^ {0,${Math.min(3,t-1)}}<(?:[a-z].*>|!--)`,"i")},y=/^ {0,3}((?:-[\t ]*){3,}|(?:_[ \t]*){3,}|(?:\*[ \t]*){3,})(?:\n+|$)/,b=/(?:[*+-]|\d{1,9}[.)])/,x=/^(?!bull |blockCode|fences|blockquote|heading|html|table)((?:.|\n(?!\s*?\n|bull |blockCode|fences|blockquote|heading|html|table))+?)\n {0,3}(=+|-+) *(?:\n+|$)/,C=p(x).replace(/bull/g,b).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/\|table/g,"").getRegex(),_=p(x).replace(/bull/g,b).replace(/blockCode/g,/(?: {4}| {0,3}\t)/).replace(/fences/g,/ {0,3}(?:`{3,}|~{3,})/).replace(/blockquote/g,/ {0,3}>/).replace(/heading/g,/ {0,3}#{1,6}/).replace(/html/g,/ {0,3}<[^\n>]+>\n/).replace(/table/g,/ {0,3}\|?(?:[:\- ]*\|)+[\:\- ]*\n/).getRegex(),k=/^([^\n]+(?:\n(?!hr|heading|lheading|blockquote|fences|list|html|table| +\n)[^\n]+)*)/,w=/(?!\s*\])(?:\\[\s\S]|[^\[\]\\])+/,v=p(/^ {0,3}\[(label)\]: *(?:\n[ \t]*)?([^<\s][^\s]*|<.*?>)(?:(?: +(?:\n[ \t]*)?| *\n[ \t]*)(title))? *(?:\n+|$)/).replace("label",w).replace("title",/(?:"(?:\\"?|[^"\\])*"|'[^'\n]*(?:\n[^'\n]+)*\n?'|\([^()]*\))/).getRegex(),S=p(/^( {0,3}bull)([ \t][^\n]+?)?(?:\n|$)/).replace(/bull/g,b).getRegex(),T="address|article|aside|base|basefont|blockquote|body|caption|center|col|colgroup|dd|details|dialog|dir|div|dl|dt|fieldset|figcaption|figure|footer|form|frame|frameset|h[1-6]|head|header|hr|html|iframe|legend|li|link|main|menu|menuitem|meta|nav|noframes|ol|optgroup|option|p|param|search|section|summary|table|tbody|td|tfoot|th|thead|title|tr|track|ul",B=/<!--(?:-?>|[\s\S]*?(?:-->|$))/,M=p("^ {0,3}(?:<(script|pre|style|textarea)[\\s>][\\s\\S]*?(?:</\\1>[^\\n]*\\n+|$)|comment[^\\n]*(\\n+|$)|<\\?[\\s\\S]*?(?:\\?>\\n*|$)|<![A-Z][\\s\\S]*?(?:>\\n*|$)|<!\\[CDATA\\[[\\s\\S]*?(?:\\]\\]>\\n*|$)|</?(tag)(?: +|\\n|/?>)[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|<(?!script|pre|style|textarea)([a-z][\\w-]*)(?:attribute)*? */?>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$)|</(?!script|pre|style|textarea)[a-z][\\w-]*\\s*>(?=[ \\t]*(?:\\n|$))[\\s\\S]*?(?:(?:\\n[ \t]*)+\\n|$))","i").replace("comment",B).replace("tag",T).replace("attribute",/ +[a-zA-Z:_][\w.:-]*(?: *= *"[^"\n]*"| *= *'[^'\n]*'| *= *[^\s"'=<>`]+)?/).getRegex(),L=p(k).replace("hr",y).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("|table","").replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",T).getRegex(),F={blockquote:p(/^( {0,3}> ?(paragraph|[^\n]*)(?:\n|$))+/).replace("paragraph",L).getRegex(),code:/^((?: {4}| {0,3}\t)[^\n]+(?:\n(?:[ \t]*(?:\n|$))*)?)+/,def:v,fences:/^ {0,3}(`{3,}(?=[^`\n]*(?:\n|$))|~{3,})([^\n]*)(?:\n|$)(?:|([\s\S]*?)(?:\n|$))(?: {0,3}\1[~`]* *(?=\n|$)|$)/,heading:/^ {0,3}(#{1,6})(?=\s|$)(.*)(?:\n+|$)/,hr:y,html:M,lheading:C,list:S,newline:/^(?:[ \t]*(?:\n|$))+/,paragraph:L,table:f,text:/^[^\n]+/},A=p("^ *([^\\n ].*)\\n {0,3}((?:\\| *)?:?-+:? *(?:\\| *:?-+:? *)*(?:\\| *)?)(?:\\n((?:(?! *\\n|hr|heading|blockquote|code|fences|list|html).*(?:\\n|$))*)\\n*|$)").replace("hr",y).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("blockquote"," {0,3}>").replace("code","(?: {4}| {0,3}\t)[^\\n]").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",T).getRegex(),E={...F,lheading:_,table:A,paragraph:p(k).replace("hr",y).replace("heading"," {0,3}#{1,6}(?:\\s|$)").replace("|lheading","").replace("table",A).replace("blockquote"," {0,3}>").replace("fences"," {0,3}(?:`{3,}(?=[^`\\n]*\\n)|~{3,})[^\\n]*\\n").replace("list"," {0,3}(?:[*+-]|1[.)]) ").replace("html","</?(?:tag)(?: +|\\n|/?>)|<(?:script|pre|style|textarea|!--)").replace("tag",T).getRegex()},$={...F,html:p("^ *(?:comment *(?:\\n|\\s*$)|<(tag)[\\s\\S]+?</\\1> *(?:\\n{2,}|\\s*$)|<tag(?:\"[^\"]*\"|'[^']*'|\\s[^'\"/>\\s]*)*?/?> *(?:\\n{2,}|\\s*$))").replace("comment",B).replace(/tag/g,"(?!(?:a|em|strong|small|s|cite|q|dfn|abbr|data|time|code|var|samp|kbd|sub|sup|i|b|u|mark|ruby|rt|rp|bdi|bdo|span|br|wbr|ins|del|img)\\b)\\w+(?!:|[^\\w\\s@]*@)\\b").getRegex(),def:/^ *\[([^\]]+)\]: *<?([^\s>]+)>?(?: +(["(][^\n]+[")]))? *(?:\n+|$)/,heading:/^(#{1,6})(.*)(?:\n+|$)/,fences:f,lheading:/^(.+?)\n {0,3}(=+|-+) *(?:\n+|$)/,paragraph:p(k).replace("hr",y).replace("heading"," *#{1,6} *[^\n]").replace("lheading",C).replace("|table","").replace("blockquote"," {0,3}>").replace("|fences","").replace("|list","").replace("|html","").replace("|tag","").getRegex()},O=/^( {2,}|\\)\n(?!\s*$)/,D=/[\p{P}\p{S}]/u,I=/[\s\p{P}\p{S}]/u,N=/[^\s\p{P}\p{S}]/u,P=p(/^((?![*_])punctSpace)/,"u").replace(/punctSpace/g,I).getRegex(),q=/(?!~)[\p{P}\p{S}]/u,z=p(/link|precode-code|html/,"g").replace("link",/\[(?:[^\[\]`]|(?<a>`+)[^`]+\k<a>(?!`))*?\]\((?:\\[\s\S]|[^\\\(\)]|\((?:\\[\s\S]|[^\\\(\)])*\))*\)/).replace("precode-",g?"(?<!`)()":"(^^|[^`])").replace("code",/(?<b>`+)[^`]+\k<b>(?!`)/).replace("html",/<(?! )[^<>]*?>/).getRegex(),R=/^(?:\*+(?:((?!\*)punct)|[^\s*]))|^_+(?:((?!_)punct)|([^\s_]))/,j=p(R,"u").replace(/punct/g,D).getRegex(),W=p(R,"u").replace(/punct/g,q).getRegex(),H="^[^_*]*?__[^_*]*?\\*[^_*]*?(?=__)|[^*]+(?=[^*])|(?!\\*)punct(\\*+)(?=[\\s]|$)|notPunctSpace(\\*+)(?!\\*)(?=punctSpace|$)|(?!\\*)punctSpace(\\*+)(?=notPunctSpace)|[\\s](\\*+)(?!\\*)(?=punct)|(?!\\*)punct(\\*+)(?!\\*)(?=punct)|notPunctSpace(\\*+)(?=notPunctSpace)",U=p(H,"gu").replace(/notPunctSpace/g,N).replace(/punctSpace/g,I).replace(/punct/g,D).getRegex(),Y=p(H,"gu").replace(/notPunctSpace/g,/(?:[^\s\p{P}\p{S}]|~)/u).replace(/punctSpace/g,/(?!~)[\s\p{P}\p{S}]/u).replace(/punct/g,q).getRegex(),G=p("^[^_*]*?\\*\\*[^_*]*?_[^_*]*?(?=\\*\\*)|[^_]+(?=[^_])|(?!_)punct(_+)(?=[\\s]|$)|notPunctSpace(_+)(?!_)(?=punctSpace|$)|(?!_)punctSpace(_+)(?=notPunctSpace)|[\\s](_+)(?!_)(?=punct)|(?!_)punct(_+)(?!_)(?=punct)","gu").replace(/notPunctSpace/g,N).replace(/punctSpace/g,I).replace(/punct/g,D).getRegex(),V=p(/\\(punct)/,"gu").replace(/punct/g,D).getRegex(),X=p(/^<(scheme:[^\s\x00-\x1f<>]*|email)>/).replace("scheme",/[a-zA-Z][a-zA-Z0-9+.-]{1,31}/).replace("email",/[a-zA-Z0-9.!#$%&'*+/=?^_`{|}~-]+(@)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)+(?![-_])/).getRegex(),Z=p(B).replace("(?:--\x3e|$)","--\x3e").getRegex(),Q=p("^comment|^</[a-zA-Z][\\w:-]*\\s*>|^<[a-zA-Z][\\w-]*(?:attribute)*?\\s*/?>|^<\\?[\\s\\S]*?\\?>|^<![a-zA-Z]+\\s[\\s\\S]*?>|^<!\\[CDATA\\[[\\s\\S]*?\\]\\]>").replace("comment",Z).replace("attribute",/\s+[a-zA-Z:_][\w.:-]*(?:\s*=\s*"[^"]*"|\s*=\s*'[^']*'|\s*=\s*[^\s"'=<>`]+)?/).getRegex(),K=/(?:\[(?:\\[\s\S]|[^\[\]\\])*\]|\\[\s\S]|`+[^`]*?`+(?!`)|[^\[\]\\`])*?/,J=p(/^!?\[(label)\]\(\s*(href)(?:(?:[ \t]*(?:\n[ \t]*)?)(title))?\s*\)/).replace("label",K).replace("href",/<(?:\\.|[^\n<>\\])+>|[^ \t\n\x00-\x1f]*/).replace("title",/"(?:\\"?|[^"\\])*"|'(?:\\'?|[^'\\])*'|\((?:\\\)?|[^)\\])*\)/).getRegex(),tt=p(/^!?\[(label)\]\[(ref)\]/).replace("label",K).replace("ref",w).getRegex(),et=p(/^!?\[(ref)\](?:\[\])?/).replace("ref",w).getRegex(),rt=/[hH][tT][tT][pP][sS]?|[fF][tT][pP]/,it={_backpedal:f,anyPunctuation:V,autolink:X,blockSkip:z,br:O,code:/^(`+)([^`]|[^`][\s\S]*?[^`])\1(?!`)/,del:f,emStrongLDelim:j,emStrongRDelimAst:U,emStrongRDelimUnd:G,escape:/^\\([!"#$%&'()*+,\-./:;<=>?@\[\]\\^_`{|}~])/,link:J,nolink:et,punctuation:P,reflink:tt,reflinkSearch:p("reflink|nolink(?!\\()","g").replace("reflink",tt).replace("nolink",et).getRegex(),tag:Q,text:/^(`+|[^`])(?:(?= {2,}\n)|[\s\S]*?(?:(?=[\\<!\[`*_]|\b_|$)|[^ ](?= {2,}\n)))/,url:f},nt={...it,link:p(/^!?\[(label)\]\((.*?)\)/).replace("label",K).getRegex(),reflink:p(/^!?\[(label)\]\s*\[([^\]]*)\]/).replace("label",K).getRegex()},ot={...it,emStrongRDelimAst:Y,emStrongLDelim:W,url:p(/^((?:protocol):\/\/|www\.)(?:[a-zA-Z0-9\-]+\.?)+[^\s<]*|^email/).replace("protocol",rt).replace("email",/[A-Za-z0-9._+-]+(@)[a-zA-Z0-9-_]+(?:\.[a-zA-Z0-9-_]*[a-zA-Z0-9])+(?![-_])/).getRegex(),_backpedal:/(?:[^?!.,:;*_'"~()&]+|\([^)]*\)|&(?![a-zA-Z0-9]+;$)|[?!.,:;*_'"~)]+(?!$))+/,del:/^(~~?)(?=[^\s~])((?:\\[\s\S]|[^\\])*?(?:\\[\s\S]|[^\s~\\]))\1(?=[^~]|$)/,text:p(/^([`~]+|[^`~])(?:(?= {2,}\n)|(?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)|[\s\S]*?(?:(?=[\\<!\[`*~_]|\b_|protocol:\/\/|www\.|$)|[^ ](?= {2,}\n)|[^a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-](?=[a-zA-Z0-9.!#$%&'*+\/=?_`{\|}~-]+@)))/).replace("protocol",rt).getRegex()},at={...ot,br:p(O).replace("{2,}","*").getRegex(),text:p(ot.text).replace("\\b_","\\b_| {2,}\\n").replace(/\{2,\}/g,"*").getRegex()},st={normal:F,gfm:E,pedantic:$},lt={normal:it,gfm:ot,breaks:at,pedantic:nt},ht={"&":"&","<":"<",">":">",'"':""","'":"'"},ct=t=>ht[t];function ut(t,e){if(e){if(m.escapeTest.test(t))return t.replace(m.escapeReplace,ct)}else if(m.escapeTestNoEncode.test(t))return t.replace(m.escapeReplaceNoEncode,ct);return t}function dt(t){try{t=encodeURI(t).replace(m.percentDecode,"%")}catch{return null}return t}function ft(t,e){let r=t.replace(m.findPipe,(t,e,r)=>{let i=!1,n=e;for(;--n>=0&&"\\"===r[n];)i=!i;return i?"|":" |"}).split(m.splitPipe),i=0;if(r[0].trim()||r.shift(),r.length>0&&!r.at(-1)?.trim()&&r.pop(),e)if(r.length>e)r.splice(e);else for(;r.length<e;)r.push("");for(;i<r.length;i++)r[i]=r[i].trim().replace(m.slashPipe,"|");return r}function pt(t,e,r){let i=t.length;if(0===i)return"";let n=0;for(;n<i;){let o=t.charAt(i-n-1);if(o!==e||r){if(o===e||!r)break;n++}else n++}return t.slice(0,i-n)}function gt(t,e,r,i,n){let o=e.href,a=e.title||null,s=t[1].replace(n.other.outputLinkReplace,"$1");i.state.inLink=!0;let l={type:"!"===t[0].charAt(0)?"image":"link",raw:r,href:o,title:a,text:s,tokens:i.inlineTokens(s)};return i.state.inLink=!1,l}var mt=class{options;rules;lexer;constructor(t){this.options=t||u}space(t){let e=this.rules.block.newline.exec(t);if(e&&e[0].length>0)return{type:"space",raw:e[0]}}code(t){let e=this.rules.block.code.exec(t);if(e){let t=e[0].replace(this.rules.other.codeRemoveIndent,"");return{type:"code",raw:e[0],codeBlockStyle:"indented",text:this.options.pedantic?t:pt(t,"\n")}}}fences(t){let e=this.rules.block.fences.exec(t);if(e){let t=e[0],r=function(t,e,r){let i=t.match(r.other.indentCodeCompensation);if(null===i)return e;let n=i[1];return e.split("\n").map(t=>{let e=t.match(r.other.beginningSpace);if(null===e)return t;let[i]=e;return i.length>=n.length?t.slice(n.length):t}).join("\n")}(t,e[3]||"",this.rules);return{type:"code",raw:t,lang:e[2]?e[2].trim().replace(this.rules.inline.anyPunctuation,"$1"):e[2],text:r}}}heading(t){let e=this.rules.block.heading.exec(t);if(e){let t=e[2].trim();if(this.rules.other.endingHash.test(t)){let e=pt(t,"#");(this.options.pedantic||!e||this.rules.other.endingSpaceChar.test(e))&&(t=e.trim())}return{type:"heading",raw:e[0],depth:e[1].length,text:t,tokens:this.lexer.inline(t)}}}hr(t){let e=this.rules.block.hr.exec(t);if(e)return{type:"hr",raw:pt(e[0],"\n")}}blockquote(t){let e=this.rules.block.blockquote.exec(t);if(e){let t=pt(e[0],"\n").split("\n"),r="",i="",n=[];for(;t.length>0;){let e,o=!1,a=[];for(e=0;e<t.length;e++)if(this.rules.other.blockquoteStart.test(t[e]))a.push(t[e]),o=!0;else{if(o)break;a.push(t[e])}t=t.slice(e);let s=a.join("\n"),l=s.replace(this.rules.other.blockquoteSetextReplace,"\n $1").replace(this.rules.other.blockquoteSetextReplace2,"");r=r?`${r}\n${s}`:s,i=i?`${i}\n${l}`:l;let h=this.lexer.state.top;if(this.lexer.state.top=!0,this.lexer.blockTokens(l,n,!0),this.lexer.state.top=h,0===t.length)break;let c=n.at(-1);if("code"===c?.type)break;if("blockquote"===c?.type){let e=c,o=e.raw+"\n"+t.join("\n"),a=this.blockquote(o);n[n.length-1]=a,r=r.substring(0,r.length-e.raw.length)+a.raw,i=i.substring(0,i.length-e.text.length)+a.text;break}if("list"===c?.type){let e=c,o=e.raw+"\n"+t.join("\n"),a=this.list(o);n[n.length-1]=a,r=r.substring(0,r.length-c.raw.length)+a.raw,i=i.substring(0,i.length-e.raw.length)+a.raw,t=o.substring(n.at(-1).raw.length).split("\n");continue}}return{type:"blockquote",raw:r,tokens:n,text:i}}}list(t){let e=this.rules.block.list.exec(t);if(e){let r=e[1].trim(),i=r.length>1,n={type:"list",raw:"",ordered:i,start:i?+r.slice(0,-1):"",loose:!1,items:[]};r=i?`\\d{1,9}\\${r.slice(-1)}`:`\\${r}`,this.options.pedantic&&(r=i?r:"[*+-]");let o=this.rules.other.listItemRegex(r),a=!1;for(;t;){let r=!1,i="",s="";if(!(e=o.exec(t))||this.rules.block.hr.test(t))break;i=e[0],t=t.substring(i.length);let l=e[2].split("\n",1)[0].replace(this.rules.other.listReplaceTabs,t=>" ".repeat(3*t.length)),h=t.split("\n",1)[0],c=!l.trim(),u=0;if(this.options.pedantic?(u=2,s=l.trimStart()):c?u=e[1].length+1:(u=e[2].search(this.rules.other.nonSpaceChar),u=u>4?1:u,s=l.slice(u),u+=e[1].length),c&&this.rules.other.blankLine.test(h)&&(i+=h+"\n",t=t.substring(h.length+1),r=!0),!r){let e=this.rules.other.nextBulletRegex(u),r=this.rules.other.hrRegex(u),n=this.rules.other.fencesBeginRegex(u),o=this.rules.other.headingBeginRegex(u),a=this.rules.other.htmlBeginRegex(u);for(;t;){let d,f=t.split("\n",1)[0];if(h=f,this.options.pedantic?(h=h.replace(this.rules.other.listReplaceNesting," "),d=h):d=h.replace(this.rules.other.tabCharGlobal," "),n.test(h)||o.test(h)||a.test(h)||e.test(h)||r.test(h))break;if(d.search(this.rules.other.nonSpaceChar)>=u||!h.trim())s+="\n"+d.slice(u);else{if(c||l.replace(this.rules.other.tabCharGlobal," ").search(this.rules.other.nonSpaceChar)>=4||n.test(l)||o.test(l)||r.test(l))break;s+="\n"+h}!c&&!h.trim()&&(c=!0),i+=f+"\n",t=t.substring(f.length+1),l=d.slice(u)}}n.loose||(a?n.loose=!0:this.rules.other.doubleBlankLine.test(i)&&(a=!0));let d,f=null;this.options.gfm&&(f=this.rules.other.listIsTask.exec(s),f&&(d="[ ] "!==f[0],s=s.replace(this.rules.other.listReplaceTask,""))),n.items.push({type:"list_item",raw:i,task:!!f,checked:d,loose:!1,text:s,tokens:[]}),n.raw+=i}let s=n.items.at(-1);if(!s)return;s.raw=s.raw.trimEnd(),s.text=s.text.trimEnd(),n.raw=n.raw.trimEnd();for(let t=0;t<n.items.length;t++)if(this.lexer.state.top=!1,n.items[t].tokens=this.lexer.blockTokens(n.items[t].text,[]),!n.loose){let e=n.items[t].tokens.filter(t=>"space"===t.type),r=e.length>0&&e.some(t=>this.rules.other.anyLine.test(t.raw));n.loose=r}if(n.loose)for(let t=0;t<n.items.length;t++)n.items[t].loose=!0;return n}}html(t){let e=this.rules.block.html.exec(t);if(e)return{type:"html",block:!0,raw:e[0],pre:"pre"===e[1]||"script"===e[1]||"style"===e[1],text:e[0]}}def(t){let e=this.rules.block.def.exec(t);if(e){let t=e[1].toLowerCase().replace(this.rules.other.multipleSpaceGlobal," "),r=e[2]?e[2].replace(this.rules.other.hrefBrackets,"$1").replace(this.rules.inline.anyPunctuation,"$1"):"",i=e[3]?e[3].substring(1,e[3].length-1).replace(this.rules.inline.anyPunctuation,"$1"):e[3];return{type:"def",tag:t,raw:e[0],href:r,title:i}}}table(t){let e=this.rules.block.table.exec(t);if(!e||!this.rules.other.tableDelimiter.test(e[2]))return;let r=ft(e[1]),i=e[2].replace(this.rules.other.tableAlignChars,"").split("|"),n=e[3]?.trim()?e[3].replace(this.rules.other.tableRowBlankLine,"").split("\n"):[],o={type:"table",raw:e[0],header:[],align:[],rows:[]};if(r.length===i.length){for(let t of i)this.rules.other.tableAlignRight.test(t)?o.align.push("right"):this.rules.other.tableAlignCenter.test(t)?o.align.push("center"):this.rules.other.tableAlignLeft.test(t)?o.align.push("left"):o.align.push(null);for(let t=0;t<r.length;t++)o.header.push({text:r[t],tokens:this.lexer.inline(r[t]),header:!0,align:o.align[t]});for(let t of n)o.rows.push(ft(t,o.header.length).map((t,e)=>({text:t,tokens:this.lexer.inline(t),header:!1,align:o.align[e]})));return o}}lheading(t){let e=this.rules.block.lheading.exec(t);if(e)return{type:"heading",raw:e[0],depth:"="===e[2].charAt(0)?1:2,text:e[1],tokens:this.lexer.inline(e[1])}}paragraph(t){let e=this.rules.block.paragraph.exec(t);if(e){let t="\n"===e[1].charAt(e[1].length-1)?e[1].slice(0,-1):e[1];return{type:"paragraph",raw:e[0],text:t,tokens:this.lexer.inline(t)}}}text(t){let e=this.rules.block.text.exec(t);if(e)return{type:"text",raw:e[0],text:e[0],tokens:this.lexer.inline(e[0])}}escape(t){let e=this.rules.inline.escape.exec(t);if(e)return{type:"escape",raw:e[0],text:e[1]}}tag(t){let e=this.rules.inline.tag.exec(t);if(e)return!this.lexer.state.inLink&&this.rules.other.startATag.test(e[0])?this.lexer.state.inLink=!0:this.lexer.state.inLink&&this.rules.other.endATag.test(e[0])&&(this.lexer.state.inLink=!1),!this.lexer.state.inRawBlock&&this.rules.other.startPreScriptTag.test(e[0])?this.lexer.state.inRawBlock=!0:this.lexer.state.inRawBlock&&this.rules.other.endPreScriptTag.test(e[0])&&(this.lexer.state.inRawBlock=!1),{type:"html",raw:e[0],inLink:this.lexer.state.inLink,inRawBlock:this.lexer.state.inRawBlock,block:!1,text:e[0]}}link(t){let e=this.rules.inline.link.exec(t);if(e){let t=e[2].trim();if(!this.options.pedantic&&this.rules.other.startAngleBracket.test(t)){if(!this.rules.other.endAngleBracket.test(t))return;let e=pt(t.slice(0,-1),"\\");if((t.length-e.length)%2==0)return}else{let t=function(t,e){if(-1===t.indexOf(e[1]))return-1;let r=0;for(let i=0;i<t.length;i++)if("\\"===t[i])i++;else if(t[i]===e[0])r++;else if(t[i]===e[1]&&(r--,r<0))return i;return r>0?-2:-1}(e[2],"()");if(-2===t)return;if(t>-1){let r=(0===e[0].indexOf("!")?5:4)+e[1].length+t;e[2]=e[2].substring(0,t),e[0]=e[0].substring(0,r).trim(),e[3]=""}}let r=e[2],i="";if(this.options.pedantic){let t=this.rules.other.pedanticHrefTitle.exec(r);t&&(r=t[1],i=t[3])}else i=e[3]?e[3].slice(1,-1):"";return r=r.trim(),this.rules.other.startAngleBracket.test(r)&&(r=this.options.pedantic&&!this.rules.other.endAngleBracket.test(t)?r.slice(1):r.slice(1,-1)),gt(e,{href:r&&r.replace(this.rules.inline.anyPunctuation,"$1"),title:i&&i.replace(this.rules.inline.anyPunctuation,"$1")},e[0],this.lexer,this.rules)}}reflink(t,e){let r;if((r=this.rules.inline.reflink.exec(t))||(r=this.rules.inline.nolink.exec(t))){let t=e[(r[2]||r[1]).replace(this.rules.other.multipleSpaceGlobal," ").toLowerCase()];if(!t){let t=r[0].charAt(0);return{type:"text",raw:t,text:t}}return gt(r,t,r[0],this.lexer,this.rules)}}emStrong(t,e,r=""){let i=this.rules.inline.emStrongLDelim.exec(t);if(!(!i||i[3]&&r.match(this.rules.other.unicodeAlphaNumeric))&&(!i[1]&&!i[2]||!r||this.rules.inline.punctuation.exec(r))){let r,n,o=[...i[0]].length-1,a=o,s=0,l="*"===i[0][0]?this.rules.inline.emStrongRDelimAst:this.rules.inline.emStrongRDelimUnd;for(l.lastIndex=0,e=e.slice(-1*t.length+o);null!=(i=l.exec(e));){if(r=i[1]||i[2]||i[3]||i[4]||i[5]||i[6],!r)continue;if(n=[...r].length,i[3]||i[4]){a+=n;continue}if((i[5]||i[6])&&o%3&&!((o+n)%3)){s+=n;continue}if(a-=n,a>0)continue;n=Math.min(n,n+a+s);let e=[...i[0]][0].length,l=t.slice(0,o+i.index+e+n);if(Math.min(o,n)%2){let t=l.slice(1,-1);return{type:"em",raw:l,text:t,tokens:this.lexer.inlineTokens(t)}}let h=l.slice(2,-2);return{type:"strong",raw:l,text:h,tokens:this.lexer.inlineTokens(h)}}}}codespan(t){let e=this.rules.inline.code.exec(t);if(e){let t=e[2].replace(this.rules.other.newLineCharGlobal," "),r=this.rules.other.nonSpaceChar.test(t),i=this.rules.other.startingSpaceChar.test(t)&&this.rules.other.endingSpaceChar.test(t);return r&&i&&(t=t.substring(1,t.length-1)),{type:"codespan",raw:e[0],text:t}}}br(t){let e=this.rules.inline.br.exec(t);if(e)return{type:"br",raw:e[0]}}del(t){let e=this.rules.inline.del.exec(t);if(e)return{type:"del",raw:e[0],text:e[2],tokens:this.lexer.inlineTokens(e[2])}}autolink(t){let e=this.rules.inline.autolink.exec(t);if(e){let t,r;return"@"===e[2]?(t=e[1],r="mailto:"+t):(t=e[1],r=t),{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}url(t){let e;if(e=this.rules.inline.url.exec(t)){let t,r;if("@"===e[2])t=e[0],r="mailto:"+t;else{let i;do{i=e[0],e[0]=this.rules.inline._backpedal.exec(e[0])?.[0]??""}while(i!==e[0]);t=e[0],r="www."===e[1]?"http://"+e[0]:e[0]}return{type:"link",raw:e[0],text:t,href:r,tokens:[{type:"text",raw:t,text:t}]}}}inlineText(t){let e=this.rules.inline.text.exec(t);if(e){let t=this.lexer.state.inRawBlock;return{type:"text",raw:e[0],text:e[0],escaped:t}}}},yt=class t{tokens;options;state;tokenizer;inlineQueue;constructor(t){this.tokens=[],this.tokens.links=Object.create(null),this.options=t||u,this.options.tokenizer=this.options.tokenizer||new mt,this.tokenizer=this.options.tokenizer,this.tokenizer.options=this.options,this.tokenizer.lexer=this,this.inlineQueue=[],this.state={inLink:!1,inRawBlock:!1,top:!0};let e={other:m,block:st.normal,inline:lt.normal};this.options.pedantic?(e.block=st.pedantic,e.inline=lt.pedantic):this.options.gfm&&(e.block=st.gfm,this.options.breaks?e.inline=lt.breaks:e.inline=lt.gfm),this.tokenizer.rules=e}static get rules(){return{block:st,inline:lt}}static lex(e,r){return new t(r).lex(e)}static lexInline(e,r){return new t(r).inlineTokens(e)}lex(t){t=t.replace(m.carriageReturn,"\n"),this.blockTokens(t,this.tokens);for(let t=0;t<this.inlineQueue.length;t++){let e=this.inlineQueue[t];this.inlineTokens(e.src,e.tokens)}return this.inlineQueue=[],this.tokens}blockTokens(t,e=[],r=!1){for(this.options.pedantic&&(t=t.replace(m.tabCharGlobal," ").replace(m.spaceLine,""));t;){let i;if(this.options.extensions?.block?.some(r=>!!(i=r.call({lexer:this},t,e))&&(t=t.substring(i.raw.length),e.push(i),!0)))continue;if(i=this.tokenizer.space(t)){t=t.substring(i.raw.length);let r=e.at(-1);1===i.raw.length&&void 0!==r?r.raw+="\n":e.push(i);continue}if(i=this.tokenizer.code(t)){t=t.substring(i.raw.length);let r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.text,this.inlineQueue.at(-1).src=r.text):e.push(i);continue}if(i=this.tokenizer.fences(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.heading(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.hr(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.blockquote(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.list(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.html(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.def(t)){t=t.substring(i.raw.length);let r=e.at(-1);"paragraph"===r?.type||"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.raw,this.inlineQueue.at(-1).src=r.text):this.tokens.links[i.tag]||(this.tokens.links[i.tag]={href:i.href,title:i.title},e.push(i));continue}if(i=this.tokenizer.table(t)){t=t.substring(i.raw.length),e.push(i);continue}if(i=this.tokenizer.lheading(t)){t=t.substring(i.raw.length),e.push(i);continue}let n=t;if(this.options.extensions?.startBlock){let e,r=1/0,i=t.slice(1);this.options.extensions.startBlock.forEach(t=>{e=t.call({lexer:this},i),"number"==typeof e&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(n=t.substring(0,r+1))}if(this.state.top&&(i=this.tokenizer.paragraph(n))){let o=e.at(-1);r&&"paragraph"===o?.type?(o.raw+=(o.raw.endsWith("\n")?"":"\n")+i.raw,o.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=o.text):e.push(i),r=n.length!==t.length,t=t.substring(i.raw.length);continue}if(i=this.tokenizer.text(t)){t=t.substring(i.raw.length);let r=e.at(-1);"text"===r?.type?(r.raw+=(r.raw.endsWith("\n")?"":"\n")+i.raw,r.text+="\n"+i.text,this.inlineQueue.pop(),this.inlineQueue.at(-1).src=r.text):e.push(i);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return this.state.top=!0,e}inline(t,e=[]){return this.inlineQueue.push({src:t,tokens:e}),e}inlineTokens(t,e=[]){let r,i=t,n=null;if(this.tokens.links){let t=Object.keys(this.tokens.links);if(t.length>0)for(;null!=(n=this.tokenizer.rules.inline.reflinkSearch.exec(i));)t.includes(n[0].slice(n[0].lastIndexOf("[")+1,-1))&&(i=i.slice(0,n.index)+"["+"a".repeat(n[0].length-2)+"]"+i.slice(this.tokenizer.rules.inline.reflinkSearch.lastIndex))}for(;null!=(n=this.tokenizer.rules.inline.anyPunctuation.exec(i));)i=i.slice(0,n.index)+"++"+i.slice(this.tokenizer.rules.inline.anyPunctuation.lastIndex);for(;null!=(n=this.tokenizer.rules.inline.blockSkip.exec(i));)r=n[2]?n[2].length:0,i=i.slice(0,n.index+r)+"["+"a".repeat(n[0].length-r-2)+"]"+i.slice(this.tokenizer.rules.inline.blockSkip.lastIndex);i=this.options.hooks?.emStrongMask?.call({lexer:this},i)??i;let o=!1,a="";for(;t;){let r;if(o||(a=""),o=!1,this.options.extensions?.inline?.some(i=>!!(r=i.call({lexer:this},t,e))&&(t=t.substring(r.raw.length),e.push(r),!0)))continue;if(r=this.tokenizer.escape(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.tag(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.link(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.reflink(t,this.tokens.links)){t=t.substring(r.raw.length);let i=e.at(-1);"text"===r.type&&"text"===i?.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(r=this.tokenizer.emStrong(t,i,a)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.codespan(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.br(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.del(t)){t=t.substring(r.raw.length),e.push(r);continue}if(r=this.tokenizer.autolink(t)){t=t.substring(r.raw.length),e.push(r);continue}if(!this.state.inLink&&(r=this.tokenizer.url(t))){t=t.substring(r.raw.length),e.push(r);continue}let n=t;if(this.options.extensions?.startInline){let e,r=1/0,i=t.slice(1);this.options.extensions.startInline.forEach(t=>{e=t.call({lexer:this},i),"number"==typeof e&&e>=0&&(r=Math.min(r,e))}),r<1/0&&r>=0&&(n=t.substring(0,r+1))}if(r=this.tokenizer.inlineText(n)){t=t.substring(r.raw.length),"_"!==r.raw.slice(-1)&&(a=r.raw.slice(-1)),o=!0;let i=e.at(-1);"text"===i?.type?(i.raw+=r.raw,i.text+=r.text):e.push(r);continue}if(t){let e="Infinite loop on byte: "+t.charCodeAt(0);if(this.options.silent){console.error(e);break}throw new Error(e)}}return e}},bt=class{options;parser;constructor(t){this.options=t||u}space(t){return""}code({text:t,lang:e,escaped:r}){let i=(e||"").match(m.notSpaceStart)?.[0],n=t.replace(m.endingNewline,"")+"\n";return i?'<pre><code class="language-'+ut(i)+'">'+(r?n:ut(n,!0))+"</code></pre>\n":"<pre><code>"+(r?n:ut(n,!0))+"</code></pre>\n"}blockquote({tokens:t}){return`<blockquote>\n${this.parser.parse(t)}</blockquote>\n`}html({text:t}){return t}def(t){return""}heading({tokens:t,depth:e}){return`<h${e}>${this.parser.parseInline(t)}</h${e}>\n`}hr(t){return"<hr>\n"}list(t){let e=t.ordered,r=t.start,i="";for(let e=0;e<t.items.length;e++){let r=t.items[e];i+=this.listitem(r)}let n=e?"ol":"ul";return"<"+n+(e&&1!==r?' start="'+r+'"':"")+">\n"+i+"</"+n+">\n"}listitem(t){let e="";if(t.task){let r=this.checkbox({checked:!!t.checked});t.loose?"paragraph"===t.tokens[0]?.type?(t.tokens[0].text=r+" "+t.tokens[0].text,t.tokens[0].tokens&&t.tokens[0].tokens.length>0&&"text"===t.tokens[0].tokens[0].type&&(t.tokens[0].tokens[0].text=r+" "+ut(t.tokens[0].tokens[0].text),t.tokens[0].tokens[0].escaped=!0)):t.tokens.unshift({type:"text",raw:r+" ",text:r+" ",escaped:!0}):e+=r+" "}return e+=this.parser.parse(t.tokens,!!t.loose),`<li>${e}</li>\n`}checkbox({checked:t}){return"<input "+(t?'checked="" ':"")+'disabled="" type="checkbox">'}paragraph({tokens:t}){return`<p>${this.parser.parseInline(t)}</p>\n`}table(t){let e="",r="";for(let e=0;e<t.header.length;e++)r+=this.tablecell(t.header[e]);e+=this.tablerow({text:r});let i="";for(let e=0;e<t.rows.length;e++){let n=t.rows[e];r="";for(let t=0;t<n.length;t++)r+=this.tablecell(n[t]);i+=this.tablerow({text:r})}return i&&(i=`<tbody>${i}</tbody>`),"<table>\n<thead>\n"+e+"</thead>\n"+i+"</table>\n"}tablerow({text:t}){return`<tr>\n${t}</tr>\n`}tablecell(t){let e=this.parser.parseInline(t.tokens),r=t.header?"th":"td";return(t.align?`<${r} align="${t.align}">`:`<${r}>`)+e+`</${r}>\n`}strong({tokens:t}){return`<strong>${this.parser.parseInline(t)}</strong>`}em({tokens:t}){return`<em>${this.parser.parseInline(t)}</em>`}codespan({text:t}){return`<code>${ut(t,!0)}</code>`}br(t){return"<br>"}del({tokens:t}){return`<del>${this.parser.parseInline(t)}</del>`}link({href:t,title:e,tokens:r}){let i=this.parser.parseInline(r),n=dt(t);if(null===n)return i;let o='<a href="'+(t=n)+'"';return e&&(o+=' title="'+ut(e)+'"'),o+=">"+i+"</a>",o}image({href:t,title:e,text:r,tokens:i}){i&&(r=this.parser.parseInline(i,this.parser.textRenderer));let n=dt(t);if(null===n)return ut(r);let o=`<img src="${t=n}" alt="${r}"`;return e&&(o+=` title="${ut(e)}"`),o+=">",o}text(t){return"tokens"in t&&t.tokens?this.parser.parseInline(t.tokens):"escaped"in t&&t.escaped?t.text:ut(t.text)}},xt=class{strong({text:t}){return t}em({text:t}){return t}codespan({text:t}){return t}del({text:t}){return t}html({text:t}){return t}text({text:t}){return t}link({text:t}){return""+t}image({text:t}){return""+t}br(){return""}},Ct=class t{options;renderer;textRenderer;constructor(t){this.options=t||u,this.options.renderer=this.options.renderer||new bt,this.renderer=this.options.renderer,this.renderer.options=this.options,this.renderer.parser=this,this.textRenderer=new xt}static parse(e,r){return new t(r).parse(e)}static parseInline(e,r){return new t(r).parseInline(e)}parse(t,e=!0){let r="";for(let i=0;i<t.length;i++){let n=t[i];if(this.options.extensions?.renderers?.[n.type]){let t=n,e=this.options.extensions.renderers[t.type].call({parser:this},t);if(!1!==e||!["space","hr","heading","code","table","blockquote","list","html","def","paragraph","text"].includes(t.type)){r+=e||"";continue}}let o=n;switch(o.type){case"space":r+=this.renderer.space(o);continue;case"hr":r+=this.renderer.hr(o);continue;case"heading":r+=this.renderer.heading(o);continue;case"code":r+=this.renderer.code(o);continue;case"table":r+=this.renderer.table(o);continue;case"blockquote":r+=this.renderer.blockquote(o);continue;case"list":r+=this.renderer.list(o);continue;case"html":r+=this.renderer.html(o);continue;case"def":r+=this.renderer.def(o);continue;case"paragraph":r+=this.renderer.paragraph(o);continue;case"text":{let n=o,a=this.renderer.text(n);for(;i+1<t.length&&"text"===t[i+1].type;)n=t[++i],a+="\n"+this.renderer.text(n);r+=e?this.renderer.paragraph({type:"paragraph",raw:a,text:a,tokens:[{type:"text",raw:a,text:a,escaped:!0}]}):a;continue}default:{let t='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}parseInline(t,e=this.renderer){let r="";for(let i=0;i<t.length;i++){let n=t[i];if(this.options.extensions?.renderers?.[n.type]){let t=this.options.extensions.renderers[n.type].call({parser:this},n);if(!1!==t||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(n.type)){r+=t||"";continue}}let o=n;switch(o.type){case"escape":case"text":r+=e.text(o);break;case"html":r+=e.html(o);break;case"link":r+=e.link(o);break;case"image":r+=e.image(o);break;case"strong":r+=e.strong(o);break;case"em":r+=e.em(o);break;case"codespan":r+=e.codespan(o);break;case"br":r+=e.br(o);break;case"del":r+=e.del(o);break;default:{let t='Token with "'+o.type+'" type was not found.';if(this.options.silent)return console.error(t),"";throw new Error(t)}}}return r}},_t=class{options;block;constructor(t){this.options=t||u}static passThroughHooks=new Set(["preprocess","postprocess","processAllTokens","emStrongMask"]);static passThroughHooksRespectAsync=new Set(["preprocess","postprocess","processAllTokens"]);preprocess(t){return t}postprocess(t){return t}processAllTokens(t){return t}emStrongMask(t){return t}provideLexer(){return this.block?yt.lex:yt.lexInline}provideParser(){return this.block?Ct.parse:Ct.parseInline}},kt=new class{defaults={async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null};options=this.setOptions;parse=this.parseMarkdown(!0);parseInline=this.parseMarkdown(!1);Parser=Ct;Renderer=bt;TextRenderer=xt;Lexer=yt;Tokenizer=mt;Hooks=_t;constructor(...t){this.use(...t)}walkTokens(t,e){let r=[];for(let i of t)switch(r=r.concat(e.call(this,i)),i.type){case"table":{let t=i;for(let i of t.header)r=r.concat(this.walkTokens(i.tokens,e));for(let i of t.rows)for(let t of i)r=r.concat(this.walkTokens(t.tokens,e));break}case"list":{let t=i;r=r.concat(this.walkTokens(t.items,e));break}default:{let t=i;this.defaults.extensions?.childTokens?.[t.type]?this.defaults.extensions.childTokens[t.type].forEach(i=>{let n=t[i].flat(1/0);r=r.concat(this.walkTokens(n,e))}):t.tokens&&(r=r.concat(this.walkTokens(t.tokens,e)))}}return r}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(t=>{let r={...t};if(r.async=this.defaults.async||r.async||!1,t.extensions&&(t.extensions.forEach(t=>{if(!t.name)throw new Error("extension name required");if("renderer"in t){let r=e.renderers[t.name];e.renderers[t.name]=r?function(...e){let i=t.renderer.apply(this,e);return!1===i&&(i=r.apply(this,e)),i}:t.renderer}if("tokenizer"in t){if(!t.level||"block"!==t.level&&"inline"!==t.level)throw new Error("extension level must be 'block' or 'inline'");let r=e[t.level];r?r.unshift(t.tokenizer):e[t.level]=[t.tokenizer],t.start&&("block"===t.level?e.startBlock?e.startBlock.push(t.start):e.startBlock=[t.start]:"inline"===t.level&&(e.startInline?e.startInline.push(t.start):e.startInline=[t.start]))}"childTokens"in t&&t.childTokens&&(e.childTokens[t.name]=t.childTokens)}),r.extensions=e),t.renderer){let e=this.defaults.renderer||new bt(this.defaults);for(let r in t.renderer){if(!(r in e))throw new Error(`renderer '${r}' does not exist`);if(["options","parser"].includes(r))continue;let i=r,n=t.renderer[i],o=e[i];e[i]=(...t)=>{let r=n.apply(e,t);return!1===r&&(r=o.apply(e,t)),r||""}}r.renderer=e}if(t.tokenizer){let e=this.defaults.tokenizer||new mt(this.defaults);for(let r in t.tokenizer){if(!(r in e))throw new Error(`tokenizer '${r}' does not exist`);if(["options","rules","lexer"].includes(r))continue;let i=r,n=t.tokenizer[i],o=e[i];e[i]=(...t)=>{let r=n.apply(e,t);return!1===r&&(r=o.apply(e,t)),r}}r.tokenizer=e}if(t.hooks){let e=this.defaults.hooks||new _t;for(let r in t.hooks){if(!(r in e))throw new Error(`hook '${r}' does not exist`);if(["options","block"].includes(r))continue;let i=r,n=t.hooks[i],o=e[i];_t.passThroughHooks.has(r)?e[i]=t=>{if(this.defaults.async&&_t.passThroughHooksRespectAsync.has(r))return(async()=>{let r=await n.call(e,t);return o.call(e,r)})();let i=n.call(e,t);return o.call(e,i)}:e[i]=(...t)=>{if(this.defaults.async)return(async()=>{let r=await n.apply(e,t);return!1===r&&(r=await o.apply(e,t)),r})();let r=n.apply(e,t);return!1===r&&(r=o.apply(e,t)),r}}r.hooks=e}if(t.walkTokens){let e=this.defaults.walkTokens,i=t.walkTokens;r.walkTokens=function(t){let r=[];return r.push(i.call(this,t)),e&&(r=r.concat(e.call(this,t))),r}}this.defaults={...this.defaults,...r}}),this}setOptions(t){return this.defaults={...this.defaults,...t},this}lexer(t,e){return yt.lex(t,e??this.defaults)}parser(t,e){return Ct.parse(t,e??this.defaults)}parseMarkdown(t){return(e,r)=>{let i={...r},n={...this.defaults,...i},o=this.onError(!!n.silent,!!n.async);if(!0===this.defaults.async&&!1===i.async)return o(new Error("marked(): The async option was set to true by an extension. Remove async: false from the parse options object to return a Promise."));if(typeof e>"u"||null===e)return o(new Error("marked(): input parameter is undefined or null"));if("string"!=typeof e)return o(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(e)+", string expected"));if(n.hooks&&(n.hooks.options=n,n.hooks.block=t),n.async)return(async()=>{let r=n.hooks?await n.hooks.preprocess(e):e,i=await(n.hooks?await n.hooks.provideLexer():t?yt.lex:yt.lexInline)(r,n),o=n.hooks?await n.hooks.processAllTokens(i):i;n.walkTokens&&await Promise.all(this.walkTokens(o,n.walkTokens));let a=await(n.hooks?await n.hooks.provideParser():t?Ct.parse:Ct.parseInline)(o,n);return n.hooks?await n.hooks.postprocess(a):a})().catch(o);try{n.hooks&&(e=n.hooks.preprocess(e));let r=(n.hooks?n.hooks.provideLexer():t?yt.lex:yt.lexInline)(e,n);n.hooks&&(r=n.hooks.processAllTokens(r)),n.walkTokens&&this.walkTokens(r,n.walkTokens);let i=(n.hooks?n.hooks.provideParser():t?Ct.parse:Ct.parseInline)(r,n);return n.hooks&&(i=n.hooks.postprocess(i)),i}catch(t){return o(t)}}}onError(t,e){return r=>{if(r.message+="\nPlease report this to https://github.com/markedjs/marked.",t){let t="<p>An error occurred:</p><pre>"+ut(r.message+"",!0)+"</pre>";return e?Promise.resolve(t):t}if(e)return Promise.reject(r);throw r}}};function wt(t,e){return kt.parse(t,e)}wt.options=wt.setOptions=function(t){return kt.setOptions(t),wt.defaults=kt.defaults,d(wt.defaults),wt},wt.getDefaults=function(){return{async:!1,breaks:!1,extensions:null,gfm:!0,hooks:null,pedantic:!1,renderer:null,silent:!1,tokenizer:null,walkTokens:null}},wt.defaults=u,wt.use=function(...t){return kt.use(...t),wt.defaults=kt.defaults,d(wt.defaults),wt},wt.walkTokens=function(t,e){return kt.walkTokens(t,e)},wt.parseInline=kt.parseInline,wt.Parser=Ct,wt.parser=Ct.parse,wt.Renderer=bt,wt.TextRenderer=xt,wt.Lexer=yt,wt.lexer=yt.lex,wt.Tokenizer=mt,wt.Hooks=_t,wt.parse=wt,wt.options,wt.setOptions,wt.use,wt.walkTokens,wt.parseInline,Ct.parse,yt.lex;var vt=r(8968),St="undefined"!=typeof performance&&"function"==typeof performance.now,Tt=(0,s.__name)(()=>St?performance.now():0,"now"),Bt="🧜 ",Mt={parse:"tertiary",prepare:"secondary",measure:"primary",layout:"primary-dark",layoutCore:"error",draw:"primary-light",paint:"secondary-dark",serialize:"tertiary-dark",render:"primary-light"};(class{constructor(){this.enabled=!1,this.autoPrint=!0,this.records=[],this.maxRecords=200,this.roots=[],this.stack=[],this.buckets={}}static{(0,s.__name)(this,"Profiler")}enable(){return this.enabled=!0,this}disable(){return this.enabled=!1,this}start(t){this.enabled&&(this.roots=[],this.stack=[],this.buckets={},this.begin(t))}tickSync(t,e){if(!this.enabled)return e();const r=Tt();try{return e()}finally{this.buckets[t]=(this.buckets[t]??0)+(Tt()-r)}}async tick(t,e){if(!this.enabled)return e();const r=Tt();try{return await e()}finally{this.buckets[t]=(this.buckets[t]??0)+(Tt()-r)}}stop(){if(!this.enabled)return;for(;this.stack.length>0;)this.end();const t=this.roots.at(-1),e=this.runLabel??t?.name;return t&&(this.records.push({label:e??t.name,tree:t,buckets:{...this.buckets}}),this.records.length>this.maxRecords&&this.records.splice(0,this.records.length-this.maxRecords),this.autoPrint&&this.printSummary(t,e)),this.runLabel=void 0,t}begin(t){if(!this.enabled)return;const e={name:t,start:Tt(),duration:-1,children:[]},r=this.stack.at(-1);if(r?r.children.push(e):this.roots.push(e),this.stack.push(e),St&&"function"==typeof performance.mark)try{performance.mark(`${Bt}${t} ▶`)}catch{}}end(){if(!this.enabled)return;const t=this.stack.pop();if(!t)return;const e=Tt();if(t.duration=e-t.start,St&&"function"==typeof performance.measure)try{performance.measure(`${Bt}${t.name}`,{start:t.start,end:e,detail:{devtools:{dataType:"track-entry",track:"Mermaid render",trackGroup:"Mermaid",color:Mt[t.name]??"primary",tooltipText:`${t.name} — ${t.duration.toFixed(1)} ms`}}})}catch{}}async span(t,e){if(!this.enabled)return e();this.begin(t);try{return await e()}finally{this.end()}}report(){return this.records.at(-1)?.tree??this.roots.at(-1)}clear(){this.records.length=0,this.roots=[],this.stack=[],this.runLabel=void 0}reset(){this.roots=[],this.stack=[]}printSummary(t=this.report(),e){if(!t)return;const r=t.duration,i=e&&e!==t.name?`${t.name} [${e}]`:t.name,n=["ms % phase"],o=(0,s.__name)((t,e)=>{const i=" ".repeat(e),a=t.duration.toFixed(1).padStart(8),s=r>0?`${(t.duration/r*100).toFixed(0).padStart(3)}%`:" -";n.push(`${a} ${s} ${i}${t.name}`);for(const r of t.children)o(r,e+1);if(t.children.length>0){const e=t.children.reduce((t,e)=>t+e.duration,0),r=t.duration-e;if(r>.5){const t=r.toFixed(1).padStart(8);n.push(`${t} ${i} (self)`)}}},"walk");o(t,0);const a=Object.keys(this.buckets);if(a.length>0){n.push("—— buckets (summed) ——");for(const t of a)n.push(`${this.buckets[t].toFixed(1).padStart(8)} ${t}`)}console.log(`${Bt}mermaid render profile · ${i}\n${n.join("\n")}`)}}),globalThis.injected??={includeLargeFeatures:!0,profiling:!1,version:"0.0.0"};var Lt=l.extend({raf(t){"function"==typeof queueMicrotask?queueMicrotask(t):setTimeout(t,0)}}).extend(h);function Ft(t,{markdownAutoWrap:e}){const r=t.replace(/<br\/>/g,"\n").replace(/\n{2,}/g,"\n");return(0,vt.dedent)(r)}function At(t){return t.split(/\\n|\n|<br\s*\/?>/gi).map(t=>t.trim().match(/<[^>]+>|[^\s<>]+/g)?.map(t=>({content:t,type:"normal"}))??[])}function Et(t,e={}){const r=Ft(t,e),i=wt.lexer(r),n=[[]];let o=0;function a(t,e="normal"){"text"===t.type?t.text.split("\n").forEach((t,r)=>{0!==r&&(o++,n.push([])),t.split(" ").forEach(t=>{(t=t.replace(/'/g,"'"))&&n[o].push({content:t,type:e})})}):"strong"===t.type||"em"===t.type?t.tokens.forEach(e=>{a(e,t.type)}):"html"===t.type&&n[o].push({content:t.text,type:"normal"})}return(0,s.__name)(a,"processNode"),i.forEach(t=>{"paragraph"===t.type?t.tokens?.forEach(t=>{a(t)}):"html"===t.type?n[o].push({content:t.text,type:"normal"}):n[o].push({content:t.raw,type:"normal"})}),n}function $t(t){return t?`<p>${t.replace(/\\n|\n/g,"<br />")}</p>`:""}function Ot(t,{markdownAutoWrap:e}={}){const r=wt.lexer(t);function i(t){return"text"===t.type?!1===e?t.text.replace(/\n */g,"<br/>").replace(/ /g," "):t.text.replace(/\n */g,"<br/>"):"strong"===t.type?`<strong>${t.tokens?.map(i).join("")}</strong>`:"em"===t.type?`<em>${t.tokens?.map(i).join("")}</em>`:"paragraph"===t.type?`<p>${t.tokens?.map(i).join("")}</p>`:"space"===t.type?"":"html"===t.type?`${t.text}`:"escape"===t.type?t.text:(a.log.warn(`Unsupported markdown: ${t.type}`),t.raw)}return(0,s.__name)(i,"output"),r.map(i).join("")}function Dt(t){return Intl.Segmenter?[...(new Intl.Segmenter).segment(t)].map(t=>t.segment):[...t]}function It(t,e){return Nt(t,[],Dt(e.content),e.type)}function Nt(t,e,r,i){if(0===r.length)return[{content:e.join(""),type:i},{content:"",type:i}];const[n,...o]=r,a=[...e,n];return t([{content:a.join(""),type:i}])?Nt(t,a,o,i):(0===e.length&&n&&(e.push(n),r.shift()),[{content:e.join(""),type:i},{content:r.join(""),type:i}])}function Pt(t,e){if(t.some(({content:t})=>t.includes("\n")))throw new Error("splitLineToFitWidth does not support newlines in the line");return qt(t,e)}function qt(t,e,r=[],i=[]){if(0===t.length)return i.length>0&&r.push(i),r.length>0?r:[];let n="";" "===t[0].content&&(n=" ",t.shift());const o=t.shift()??{content:" ",type:"normal"},a=[...i];if(""!==n&&a.push({content:n,type:"normal"}),a.push(o),e(a))return qt(t,e,r,a);if(i.length>0)r.push(i),t.unshift(o);else if(o.content){const[i,n]=It(e,o);r.push([i]),n.content&&t.unshift(n)}return qt(t,e,r)}function zt(t,e){e&&t.attr("style",e)}async function Rt(t,e,r,i,n=!1,a=(0,o.getConfig)()){const s=t.append("foreignObject");s.attr("width",`${Math.min(10*r,16384)}px`),s.attr("height",`${Math.min(10*r,16384)}px`);const l=s.append("xhtml:div"),h=(0,o.hasKatex)(e.label)?await(0,o.renderKatexSanitized)(e.label.replace(o.common_default.lineBreakRegex,"\n"),a):(0,o.sanitizeText)(e.label,a),c=e.isNode?"nodeLabel":"edgeLabel",u=l.append("span");return u.html(h),zt(u,e.labelStyle),u.attr("class",`${c} ${i}`),zt(l,e.labelStyle),l.style("display","table-cell"),l.style("white-space","nowrap"),l.style("line-height","1.5"),r!==Number.POSITIVE_INFINITY&&(l.style("max-width",r+"px"),l.style("text-align","center")),l.attr("xmlns","http://www.w3.org/1999/xhtml"),n&&l.attr("class","labelBkg"),(await Lt.measure(()=>l.node().getBoundingClientRect())).width===r&&(l.style("display","table"),l.style("white-space","break-spaces"),l.style("width",r+"px")),s.node()}function jt(t,e,r,i=!1){const n=t.append("tspan").attr("class","text-outer-tspan").attr("x",0).attr("y",e*r-.1+"em").attr("dy",r+"em");return i&&n.attr("text-anchor","middle"),n}function Wt(t,e,r){const i=t.append("text"),n=jt(i,1,e);Gt(n,r);const o=n.node().getComputedTextLength();return i.remove(),o}function Ht(t,e,r){const i=t.append("text"),n=jt(i,1,e);Gt(n,[{content:r,type:"normal"}]);const o=n.node()?.getBoundingClientRect();return o&&i.remove(),o}function Ut(t,e,r,i=!1,n=!1){const o=e.append("g"),a=o.insert("rect").attr("class","background").attr("style","stroke: none"),l=o.append("text").attr("y","-10.1");n&&l.attr("text-anchor","middle");let h=0;for(const e of r){const r=(0,s.__name)(e=>Wt(o,1.1,e)<=t,"checkWidth"),i=r(e)?[e]:Pt(e,r);for(const t of i)Gt(jt(l,h,1.1,n),t),h++}if(i){const t=l.node().getBBox(),e=2;return a.attr("x",t.x-e).attr("y",t.y-e).attr("width",t.width+2*e).attr("height",t.height+2*e),o.node()}return l.node()}function Yt(t){return t.replace(/&(amp|lt|gt);/g,(t,e)=>{switch(e){case"amp":return"&";case"lt":return"<";case"gt":return">";default:return t}})}function Gt(t,e){t.text(""),e.forEach((e,r)=>{const i=t.append("tspan").attr("font-style","em"===e.type?"italic":"normal").attr("class","text-inner-tspan").attr("font-weight","strong"===e.type?"bold":"normal");0===r?i.text(Yt(e.content)):i.text(" "+Yt(e.content))})}async function Vt(t,e={}){const r=[];t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,(t,n,a)=>(r.push((async()=>{const r=`${n}:${a}`;return await(0,i.isIconAvailable)(r)?await(0,i.getIconSVG)(r,void 0,{class:"label-icon"}):`<i class='${(0,o.sanitizeText)(t,e).replace(":"," ")}'></i>`})()),t));const n=await Promise.all(r);return t.replace(/(fa[bklrs]?):fa-([\w-]+)/g,()=>n.shift()??"")}(0,s.__name)(Ft,"preprocessMarkdown"),(0,s.__name)(At,"nonMarkdownToLines"),(0,s.__name)(Et,"markdownToLines"),(0,s.__name)($t,"nonMarkdownToHTML"),(0,s.__name)(Ot,"markdownToHTML"),(0,s.__name)(Dt,"splitTextToChars"),(0,s.__name)(It,"splitWordToFitWidth"),(0,s.__name)(Nt,"splitWordToFitWidthRecursion"),(0,s.__name)(Pt,"splitLineToFitWidth"),(0,s.__name)(qt,"splitLineToFitWidthRecursion"),(0,s.__name)(zt,"applyStyle"),(0,s.__name)(Rt,"addHtmlSpan"),(0,s.__name)(jt,"createTspan"),(0,s.__name)(Wt,"computeWidthOfText"),(0,s.__name)(Ht,"computeDimensionOfText"),(0,s.__name)(Ut,"createFormattedText"),(0,s.__name)(Yt,"decodeHTMLEntities"),(0,s.__name)(Gt,"updateTextContentAndStyles"),(0,s.__name)(Vt,"replaceIconSubstring");var Xt=(0,s.__name)(async(t,e="",{style:r="",isTitle:i=!1,classes:s="",useHtmlLabels:l=!0,markdown:h=!0,isNode:u=!0,width:d=200,addSvgBackground:f=!1}={},p)=>{if(a.log.debug("XYZ createText",e,r,i,s,l,u,"addSvgBackground: ",f),l){const i=h?Ot(e,p):$t(e),a=await Vt((0,n.decodeEntities)(i),p),l=e.replace(/\\\\/g,"\\"),c={isNode:u,label:(0,o.hasKatex)(e)?l:a,labelStyle:r.replace("fill:","color:")};return await Rt(t,c,d,s,f,p)}{const o=(0,n.decodeEntities)(e.replace(/<br\s*\/?>/g,"<br/>")),a=Ut(d,t,h?Et(o.replace("<br>","<br/>"),p):At(o),!!e&&f,!u);if(u){/stroke:/.exec(r)&&(r=r.replace("stroke:","lineColor:"));const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,c.select)(a).attr("style",t)}else{const t=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/background:/g,"fill:");(0,c.select)(a).select("rect").attr("style",t.replace(/background:/g,"fill:"));const e=r.replace(/stroke:[^;]+;?/g,"").replace(/stroke-width:[^;]+;?/g,"").replace(/fill:[^;]+;?/g,"").replace(/color:/g,"fill:");(0,c.select)(a).select("text").attr("style",e)}return i?(0,c.select)(a).selectAll("tspan.text-outer-tspan").classed("title-row",!0):(0,c.select)(a).selectAll("tspan.text-outer-tspan").classed("row",!0),a}},"createText")},75972(t,e,r){r.r(e),r.d(e,{clear:()=>C,insertCluster:()=>x});var i=r(6342),n=r(51752),o=r(48550),a=r(77948),s=r(39989),l=r(27166),h=r(79456),c=r(79806),u=r(7083),d=(0,h.__name)(async(t,e)=>{const r=(0,s.getConfig2)(),{themeVariables:i,handDrawnSeed:h}=r,{clusterBkg:d,clusterBorder:f}=i,p=f,{labelStyles:g,nodeStyles:m,borderStyles:y,backgroundStyles:b}=(0,o.styles2String)(e),x=t.insert("g").attr("class","cluster swimlane "+(e.cssClasses||"")).attr("id",e.id).attr("data-id",e.id).attr("data-et","cluster").attr("data-look",e.look),C=(0,s.evaluate)(r.flowchart.htmlLabels),_="LR"===e.direction,k=x.insert("g").attr("class","cluster-label swimlane-label"),w=await(0,a.createText)(k,e.label,{style:e.labelStyle,useHtmlLabels:C,isNode:!0,width:e.width});let v=w.getBBox();if(C){const t=w.children[0],e=(0,c.select)(w);v=t.getBoundingClientRect(),e.attr("width",v.width),e.attr("height",v.height)}const S=e.padding??0,T=e.width<=v.width+S?v.width+S:e.width;e.width<=v.width+S?e.diff=(T-e.width)/2-S:e.diff=-S;const B=e.height,M=e.y-B/2,L=e.y+B/2,F=e.x-T/2,A=void 0!==e.swimlaneContentTop?e.swimlaneContentTop:M+B/3,E=_?4:0,$=v.height+2*E;let O,D;if(_){const t=Math.max($,v.height+2*E),r=F+t,i=Math.max(0,T-t);if("handDrawn"===e.look){const n=u.default.svg(x),a=(0,o.userNodeOverrides)(e,{roughness:.7,fill:d,stroke:p,fillWeight:3,seed:h}),s=(0,o.userNodeOverrides)(e,{roughness:.7,fill:"none",stroke:p,seed:h}),l=n.rectangle(F,M,t,B,a);O=x.insert(()=>l,":first-child");const c=n.rectangle(r,M,i,B,s);D=x.insert(()=>c,":first-child"),O.select("path:nth-child(2)").attr("style",y.join(";")),O.select("path").attr("style",b.join(";").replace("fill","stroke"))}else O=x.insert("rect",":first-child"),D=x.insert("rect",":first-child"),O.attr("class","swimlane-title").attr("style",m).attr("x",F).attr("y",M).attr("width",t).attr("height",B).attr("fill",d).attr("stroke",p),D.attr("class","swimlane-body").attr("style",m).attr("x",r).attr("y",M).attr("width",i).attr("height",B).attr("fill","none").attr("stroke",p);const n=F+t/2,a=e.y;k.attr("transform",`translate(${n}, ${a}) rotate(-90) translate(${-v.width/2}, ${-v.height/2})`)}else{const t=Math.max(0,A-M),r=Math.min($,t),i=M+r,n=Math.max(0,L-i),a=e.x-T/2;if("handDrawn"===e.look){const t=u.default.svg(x),s=(0,o.userNodeOverrides)(e,{roughness:.7,fill:d,stroke:p,fillWeight:3,seed:h}),l=(0,o.userNodeOverrides)(e,{roughness:.7,fill:"none",stroke:p,seed:h}),c=t.rectangle(a,M,T,r,s);O=x.insert(()=>c,":first-child");const f=t.rectangle(a,i,T,n,l);D=x.insert(()=>f,":first-child"),O.select("path:nth-child(2)").attr("style",y.join(";")),O.select("path").attr("style",b.join(";").replace("fill","stroke"))}else O=x.insert("rect",":first-child"),D=x.insert("rect",":first-child"),O.attr("class","swimlane-title").attr("style",m).attr("x",a).attr("y",M).attr("width",T).attr("height",r).attr("fill",d).attr("stroke",p),D.attr("class","swimlane-body").attr("style",m).attr("x",a).attr("y",i).attr("width",T).attr("height",n).attr("fill","none").attr("stroke",p);const s=e.x-v.width/2,l=M+(r-v.height)/2;k.attr("transform",`translate(${s}, ${l})`)}if(l.log.trace("Swimlane data ",e,JSON.stringify(e)),g){const t=k.select("span");t&&t.attr("style",g)}return e.offsetX=0,e.width=T,e.height=B,e.offsetY=v.height-S/2,e.intersect=function(t){return(0,n.intersect_rect_default)(e,t)},{cluster:x,labelBBox:v}},"swimlane"),f=(0,h.__name)(async(t,e)=>{l.log.info("Creating subgraph rect for ",e.id,e);const r=(0,s.getConfig2)(),{themeVariables:h,handDrawnSeed:d}=r,{clusterBkg:f,clusterBorder:p}=h,{labelStyles:g,nodeStyles:m,borderStyles:y,backgroundStyles:b}=(0,o.styles2String)(e),x=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),C=(0,s.getEffectiveHtmlLabels)(r),_=x.insert("g").attr("class","cluster-label ");let k;k="markdown"===e.labelType?await(0,a.createText)(_,e.label,{style:e.labelStyle,useHtmlLabels:C,isNode:!0,width:e.width}):await(0,n.createLabel_default)(_,e.label,e.labelStyle||"",!1,!0);let w=k.getBBox();if((0,s.getEffectiveHtmlLabels)(r)){const t=k.children[0],e=(0,c.select)(k);w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}const v=e.width<=w.width+e.padding?w.width+e.padding:e.width;e.width<=w.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;const S=e.height,T=e.x-v/2,B=e.y-S/2;let M;if(l.log.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=u.default.svg(x),r=(0,o.userNodeOverrides)(e,{roughness:.7,fill:f,stroke:p,fillWeight:3,seed:d}),i=t.path((0,n.createRoundedRectPathD)(T,B,v,S,0),r);M=x.insert(()=>(l.log.debug("Rough node insert CXC",i),i),":first-child"),M.select("path:nth-child(2)").attr("style",y.join(";")),M.select("path").attr("style",b.join(";").replace("fill","stroke"))}else M=x.insert("rect",":first-child"),M.attr("style",m).attr("rx",e.rx).attr("ry",e.ry).attr("x",T).attr("y",B).attr("width",v).attr("height",S);const{subGraphTitleTopMargin:L}=(0,i.getSubGraphTitleMargins)(r);if(_.attr("transform",`translate(${e.x-w.width/2}, ${e.y-e.height/2+L})`),g){const t=_.select("span");t&&t.attr("style",g)}const F=M.node().getBBox();return e.offsetX=0,e.width=F.width,e.height=F.height,e.offsetY=w.height-e.padding/2,e.intersect=function(t){return(0,n.intersect_rect_default)(e,t)},{cluster:x,labelBBox:w}},"rect"),p=(0,h.__name)((t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.domId),i=r.insert("rect",":first-child"),o=0*e.padding,a=o/2;i.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+o).attr("height",e.height+o).attr("fill","none");const s=i.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(t){return(0,n.intersect_rect_default)(e,t)},{cluster:r,labelBBox:{width:0,height:0}}},"noteGroup"),g=(0,h.__name)(async(t,e)=>{const r=(0,s.getConfig2)(),{themeVariables:i,handDrawnSeed:o}=r,{altBackground:a,compositeBackground:l,compositeTitleBackground:h,nodeBorder:d}=i,f=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-id",e.id).attr("data-look",e.look),p=f.insert("g",":first-child"),g=f.insert("g").attr("class","cluster-label");let m=f.append("rect");const y=await(0,n.createLabel_default)(g,e.label,e.labelStyle,void 0,!0);let b=y.getBBox();if((0,s.getEffectiveHtmlLabels)(r)){const t=y.children[0],e=(0,c.select)(y);b=t.getBoundingClientRect(),e.attr("width",b.width),e.attr("height",b.height)}const x=0*e.padding,C=x/2,_=(e.width<=b.width+e.padding?b.width+e.padding:e.width)+x;e.width<=b.width+e.padding?e.diff=(_-e.width)/2-e.padding:e.diff=-e.padding;const k=e.height+x,w=e.height+x-b.height-6,v=e.x-_/2,S=e.y-k/2;e.width=_;const T=e.y-e.height/2-C+b.height+2;let B;if("handDrawn"===e.look){const t=e.cssClasses.includes("statediagram-cluster-alt"),r=u.default.svg(f),i=e.rx||e.ry?r.path((0,n.createRoundedRectPathD)(v,S,_,k,10),{roughness:.7,fill:h,fillStyle:"solid",stroke:d,seed:o}):r.rectangle(v,S,_,k,{seed:o});B=f.insert(()=>i,":first-child");const s=r.rectangle(v,T,_,w,{fill:t?a:l,fillStyle:t?"hachure":"solid",stroke:d,seed:o});B=f.insert(()=>i,":first-child"),m=f.insert(()=>s)}else{B=p.insert("rect",":first-child");const t="outer";B.attr("class",t).attr("x",v).attr("y",S).attr("width",_).attr("height",k).attr("data-look",e.look),m.attr("class","inner").attr("x",v).attr("y",T).attr("width",_).attr("height",w)}g.attr("transform",`translate(${e.x-b.width/2}, ${S+1-((0,s.getEffectiveHtmlLabels)(r)?0:3)})`);const M=B.node().getBBox();return e.height=M.height,e.offsetX=0,e.offsetY=b.height-e.padding/2,e.labelBBox=b,e.intersect=function(t){return(0,n.intersect_rect_default)(e,t)},{cluster:f,labelBBox:b}},"roundedWithTitle"),m=(0,h.__name)(async(t,e)=>{l.log.info("Creating subgraph rect for ",e.id,e);const r=(0,s.getConfig2)(),{themeVariables:h,handDrawnSeed:d}=r,{clusterBkg:f,clusterBorder:p}=h,{labelStyles:g,nodeStyles:m,borderStyles:y,backgroundStyles:b}=(0,o.styles2String)(e),x=t.insert("g").attr("class","cluster "+e.cssClasses).attr("id",e.domId).attr("data-look",e.look),C=(0,s.getEffectiveHtmlLabels)(r),_=x.insert("g").attr("class","cluster-label "),k=await(0,a.createText)(_,e.label,{style:e.labelStyle,useHtmlLabels:C,isNode:!0,width:e.width});let w=k.getBBox();if((0,s.getEffectiveHtmlLabels)(r)){const t=k.children[0],e=(0,c.select)(k);w=t.getBoundingClientRect(),e.attr("width",w.width),e.attr("height",w.height)}const v=e.width<=w.width+e.padding?w.width+e.padding:e.width;e.width<=w.width+e.padding?e.diff=(v-e.width)/2-e.padding:e.diff=-e.padding;const S=e.height,T=e.x-v/2,B=e.y-S/2;let M;if(l.log.trace("Data ",e,JSON.stringify(e)),"handDrawn"===e.look){const t=u.default.svg(x),r=(0,o.userNodeOverrides)(e,{roughness:.7,fill:f,stroke:p,fillWeight:4,seed:d}),i=t.path((0,n.createRoundedRectPathD)(T,B,v,S,e.rx),r);M=x.insert(()=>(l.log.debug("Rough node insert CXC",i),i),":first-child"),M.select("path:nth-child(2)").attr("style",y.join(";")),M.select("path").attr("style",b.join(";").replace("fill","stroke"))}else M=x.insert("rect",":first-child"),M.attr("style",m).attr("rx",e.rx).attr("ry",e.ry).attr("x",T).attr("y",B).attr("width",v).attr("height",S);const{subGraphTitleTopMargin:L}=(0,i.getSubGraphTitleMargins)(r);if(_.attr("transform",`translate(${e.x-w.width/2}, ${e.y-e.height/2+L})`),g){const t=_.select("span");t&&t.attr("style",g)}const F=M.node().getBBox();return e.offsetX=0,e.width=F.width,e.height=F.height,e.offsetY=w.height-e.padding/2,e.intersect=function(t){return(0,n.intersect_rect_default)(e,t)},{cluster:x,labelBBox:w}},"kanbanSection"),y={rect:f,squareRect:f,roundedWithTitle:g,noteGroup:p,divider:(0,h.__name)((t,e)=>{const r=(0,s.getConfig2)(),{themeVariables:i,handDrawnSeed:o}=r,{nodeBorder:a}=i,l=t.insert("g").attr("class",e.cssClasses).attr("id",e.domId).attr("data-look",e.look),h=l.insert("g",":first-child"),c=0*e.padding,d=e.width+c;e.diff=-e.padding;const f=e.height+c,p=e.x-d/2,g=e.y-f/2;let m;if(e.width=d,"handDrawn"===e.look){const t=u.default.svg(l).rectangle(p,g,d,f,{fill:"lightgrey",roughness:.5,strokeLineDash:[5],stroke:a,seed:o});m=l.insert(()=>t,":first-child")}else{m=h.insert("rect",":first-child");let t="outer";e.look,t="divider",m.attr("class",t).attr("x",p).attr("y",g).attr("width",d).attr("height",f).attr("data-look",e.look)}const y=m.node().getBBox();return e.height=y.height,e.offsetX=0,e.offsetY=0,e.intersect=function(t){return(0,n.intersect_rect_default)(e,t)},{cluster:l,labelBBox:{}}},"divider"),kanbanSection:m,swimlane:d},b=new Map,x=(0,h.__name)(async(t,e)=>{const r=e.shape||"rect",i=await y[r](t,e);return b.set(e.id,i),i},"insertCluster"),C=(0,h.__name)(()=>{b=new Map},"clear")},84666(t,e,r){r.r(e),r.d(e,{JSON_SCHEMA:()=>Ft,load:()=>$t});var i=r(79456);function n(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}(0,i.__name)(n,"getDefaultExportFromCjs");var o,a,s,l,h,c,u,d,f,p,g,m,y,b,x,C,_,k,w,v,S,T,B,M,L,F,A,E,$,O,D,I,N,P,q,z,R,j,W,H,U,Y,G,V,X={},Z={},Q={};function K(){if(o)return Q;function t(t){return null==t}function e(t){return"object"==typeof t&&null!==t}function r(e){return Array.isArray(e)?e:t(e)?[]:[e]}function n(t,e){if(e){const r=Object.keys(e);for(let i=0,n=r.length;i<n;i+=1){const n=r[i];t[n]=e[n]}}return t}function a(t,e){let r="";for(let i=0;i<e;i+=1)r+=t;return r}function s(t){return 0===t&&Number.NEGATIVE_INFINITY===1/t}return o=1,(0,i.__name)(t,"isNothing"),(0,i.__name)(e,"isObject"),(0,i.__name)(r,"toArray"),(0,i.__name)(n,"extend"),(0,i.__name)(a,"repeat"),(0,i.__name)(s,"isNegativeZero"),Q.isNothing=t,Q.isObject=e,Q.toArray=r,Q.repeat=a,Q.isNegativeZero=s,Q.extend=n,Q}function J(){if(s)return a;function t(t,e){let r="";const 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+="\n\n"+t.mark.snippet),i+" "+r):i}function e(e,r){Error.call(this),this.name="YAMLException",this.reason=e,this.mark=r,this.message=t(this,!1),Error.captureStackTrace?Error.captureStackTrace(this,this.constructor):this.stack=(new Error).stack||""}return s=1,(0,i.__name)(t,"formatError"),(0,i.__name)(e,"YAMLException2"),e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e.prototype.toString=(0,i.__name)(function(e){return this.name+": "+t(this,e)},"toString"),a=e}function tt(){if(h)return l;h=1;const t=K();function e(t,e,r,i,n){let o="",a="";const s=Math.floor(n/2)-1;return i-e>s&&(o=" ... ",e=i-s+o.length),r-i>s&&(a=" ...",r=i+s-a.length),{str:o+t.slice(e,r).replace(/\t/g,"→")+a,pos:i-e+o.length}}function r(e,r){return t.repeat(" ",r-e.length)+e}function n(i,n){if(n=Object.create(n||null),!i.buffer)return null;n.maxLength||(n.maxLength=79),"number"!=typeof n.indent&&(n.indent=1),"number"!=typeof n.linesBefore&&(n.linesBefore=3),"number"!=typeof n.linesAfter&&(n.linesAfter=2);const o=/\r?\n|\r|\0/g,a=[0],s=[];let l,h=-1;for(;l=o.exec(i.buffer);)s.push(l.index),a.push(l.index+l[0].length),i.position<=l.index&&h<0&&(h=a.length-2);h<0&&(h=a.length-1);let c="";const u=Math.min(i.line+n.linesAfter,s.length).toString().length,d=n.maxLength-(n.indent+u+3);for(let o=1;o<=n.linesBefore&&!(h-o<0);o++){const l=e(i.buffer,a[h-o],s[h-o],i.position-(a[h]-a[h-o]),d);c=t.repeat(" ",n.indent)+r((i.line-o+1).toString(),u)+" | "+l.str+"\n"+c}const f=e(i.buffer,a[h],s[h],i.position,d);c+=t.repeat(" ",n.indent)+r((i.line+1).toString(),u)+" | "+f.str+"\n",c+=t.repeat("-",n.indent+u+3+f.pos)+"^\n";for(let o=1;o<=n.linesAfter&&!(h+o>=s.length);o++){const l=e(i.buffer,a[h+o],s[h+o],i.position-(a[h]-a[h+o]),d);c+=t.repeat(" ",n.indent)+r((i.line+o+1).toString(),u)+" | "+l.str+"\n"}return c.replace(/\n$/,"")}return(0,i.__name)(e,"getLine"),(0,i.__name)(r,"padStart"),(0,i.__name)(n,"makeSnippet"),l=n}function et(){if(u)return c;u=1;const t=J(),e=["kind","multi","resolve","construct","instanceOf","predicate","represent","representName","defaultStyle","styleAliases"],r=["scalar","sequence","mapping"];function n(t){const e={};return null!==t&&Object.keys(t).forEach(function(r){t[r].forEach(function(t){e[String(t)]=r})}),e}function o(i,o){if(o=o||{},Object.keys(o).forEach(function(r){if(-1===e.indexOf(r))throw new t('Unknown option "'+r+'" is met in definition of "'+i+'" YAML type.')}),this.options=o,this.tag=i,this.kind=o.kind||null,this.resolve=o.resolve||function(){return!0},this.construct=o.construct||function(t){return t},this.instanceOf=o.instanceOf||null,this.predicate=o.predicate||null,this.represent=o.represent||null,this.representName=o.representName||null,this.defaultStyle=o.defaultStyle||null,this.multi=o.multi||!1,this.styleAliases=n(o.styleAliases||null),-1===r.indexOf(this.kind))throw new t('Unknown kind "'+this.kind+'" is specified for "'+i+'" YAML type.')}return(0,i.__name)(n,"compileStyleAliases"),(0,i.__name)(o,"Type2"),c=o}function rt(){if(f)return d;f=1;const t=J(),e=et();function r(t,e){const r=[];return t[e].forEach(function(t){let e=r.length;r.forEach(function(r,i){r.tag===t.tag&&r.kind===t.kind&&r.multi===t.multi&&(e=i)}),r[e]=t}),r}function n(){const t={scalar:{},sequence:{},mapping:{},fallback:{},multi:{scalar:[],sequence:[],mapping:[],fallback:[]}};function e(e){e.multi?(t.multi[e.kind].push(e),t.multi.fallback.push(e)):t[e.kind][e.tag]=t.fallback[e.tag]=e}(0,i.__name)(e,"collectType");for(let t=0,r=arguments.length;t<r;t+=1)arguments[t].forEach(e);return t}function o(t){return this.extend(t)}return(0,i.__name)(r,"compileList"),(0,i.__name)(n,"compileMap"),(0,i.__name)(o,"Schema2"),o.prototype.extend=(0,i.__name)(function(i){let a=[],s=[];if(i instanceof e)s.push(i);else if(Array.isArray(i))s=s.concat(i);else{if(!i||!Array.isArray(i.implicit)&&!Array.isArray(i.explicit))throw new t("Schema.extend argument should be a Type, [ Type ], or a schema definition ({ implicit: [...], explicit: [...] })");i.implicit&&(a=a.concat(i.implicit)),i.explicit&&(s=s.concat(i.explicit))}a.forEach(function(r){if(!(r instanceof e))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.");if(r.loadKind&&"scalar"!==r.loadKind)throw new t("There is a non-scalar type in the implicit list of a schema. Implicit resolving of such types is not supported.");if(r.multi)throw new t("There is a multi type in the implicit list of a schema. Multi tags can only be listed as explicit.")}),s.forEach(function(r){if(!(r instanceof e))throw new t("Specified list of YAML types (or a single Type object) contains a non-Type object.")});const l=Object.create(o.prototype);return l.implicit=(this.implicit||[]).concat(a),l.explicit=(this.explicit||[]).concat(s),l.compiledImplicit=r(l,"implicit"),l.compiledExplicit=r(l,"explicit"),l.compiledTypeMap=n(l.compiledImplicit,l.compiledExplicit),l},"extend"),d=o}function it(){if(g)return p;g=1;const t=et();return p=new t("tag:yaml.org,2002:str",{kind:"scalar",construct:(0,i.__name)(function(t){return null!==t?t:""},"construct")})}function nt(){if(y)return m;y=1;const t=et();return m=new t("tag:yaml.org,2002:seq",{kind:"sequence",construct:(0,i.__name)(function(t){return null!==t?t:[]},"construct")})}function ot(){if(x)return b;x=1;const t=et();return b=new t("tag:yaml.org,2002:map",{kind:"mapping",construct:(0,i.__name)(function(t){return null!==t?t:{}},"construct")})}function at(){if(_)return C;_=1;const t=rt();return C=new t({explicit:[it(),nt(),ot()]})}function st(){if(w)return k;w=1;const t=et();function e(t){if(null===t)return!0;const e=t.length;return 1===e&&"~"===t||4===e&&("null"===t||"Null"===t||"NULL"===t)}function r(){return null}function n(t){return null===t}return(0,i.__name)(e,"resolveYamlNull"),(0,i.__name)(r,"constructYamlNull"),(0,i.__name)(n,"isNull"),k=new t("tag:yaml.org,2002:null",{kind:"scalar",resolve:e,construct:r,predicate:n,represent:{canonical:(0,i.__name)(function(){return"~"},"canonical"),lowercase:(0,i.__name)(function(){return"null"},"lowercase"),uppercase:(0,i.__name)(function(){return"NULL"},"uppercase"),camelcase:(0,i.__name)(function(){return"Null"},"camelcase"),empty:(0,i.__name)(function(){return""},"empty")},defaultStyle:"lowercase"})}function lt(){if(S)return v;S=1;const t=et();function e(t){if(null===t)return!1;const e=t.length;return 4===e&&("true"===t||"True"===t||"TRUE"===t)||5===e&&("false"===t||"False"===t||"FALSE"===t)}function r(t){return"true"===t||"True"===t||"TRUE"===t}function n(t){return"[object Boolean]"===Object.prototype.toString.call(t)}return(0,i.__name)(e,"resolveYamlBoolean"),(0,i.__name)(r,"constructYamlBoolean"),(0,i.__name)(n,"isBoolean"),v=new t("tag:yaml.org,2002:bool",{kind:"scalar",resolve:e,construct:r,predicate:n,represent:{lowercase:(0,i.__name)(function(t){return t?"true":"false"},"lowercase"),uppercase:(0,i.__name)(function(t){return t?"TRUE":"FALSE"},"uppercase"),camelcase:(0,i.__name)(function(t){return t?"True":"False"},"camelcase")},defaultStyle:"lowercase"})}function ht(){if(B)return T;B=1;const t=K(),e=et();function r(t){return t>=48&&t<=57||t>=65&&t<=70||t>=97&&t<=102}function n(t){return t>=48&&t<=55}function o(t){return t>=48&&t<=57}function a(t){if(null===t)return!1;const e=t.length;let i=0,a=!1;if(!e)return!1;let l=t[i];if("-"!==l&&"+"!==l||(l=t[++i]),"0"===l){if(i+1===e)return!0;if(l=t[++i],"b"===l){for(i++;i<e;i++){if(l=t[i],"0"!==l&&"1"!==l)return!1;a=!0}return a&&isFinite(s(t))}if("x"===l){for(i++;i<e;i++){if(!r(t.charCodeAt(i)))return!1;a=!0}return a&&isFinite(s(t))}if("o"===l){for(i++;i<e;i++){if(!n(t.charCodeAt(i)))return!1;a=!0}return a&&isFinite(s(t))}}for(;i<e;i++){if(!o(t.charCodeAt(i)))return!1;a=!0}return!!a&&isFinite(s(t))}function s(t){let e=t,r=1,i=e[0];if("-"!==i&&"+"!==i||("-"===i&&(r=-1),e=e.slice(1),i=e[0]),"0"===e)return 0;if("0"===i){if("b"===e[1])return r*parseInt(e.slice(2),2);if("x"===e[1])return r*parseInt(e.slice(2),16);if("o"===e[1])return r*parseInt(e.slice(2),8)}return r*parseInt(e,10)}function l(t){return s(t)}function h(e){return"[object Number]"===Object.prototype.toString.call(e)&&e%1==0&&!t.isNegativeZero(e)}return(0,i.__name)(r,"isHexCode"),(0,i.__name)(n,"isOctCode"),(0,i.__name)(o,"isDecCode"),(0,i.__name)(a,"resolveYamlInteger"),(0,i.__name)(s,"parseYamlInteger"),(0,i.__name)(l,"constructYamlInteger"),(0,i.__name)(h,"isInteger"),T=new e("tag:yaml.org,2002:int",{kind:"scalar",resolve:a,construct:l,predicate:h,represent:{binary:(0,i.__name)(function(t){return t>=0?"0b"+t.toString(2):"-0b"+t.toString(2).slice(1)},"binary"),octal:(0,i.__name)(function(t){return t>=0?"0o"+t.toString(8):"-0o"+t.toString(8).slice(1)},"octal"),decimal:(0,i.__name)(function(t){return t.toString(10)},"decimal"),hexadecimal:(0,i.__name)(function(t){return t>=0?"0x"+t.toString(16).toUpperCase():"-0x"+t.toString(16).toUpperCase().slice(1)},"hexadecimal")},defaultStyle:"decimal",styleAliases:{binary:[2,"bin"],octal:[8,"oct"],decimal:[10,"dec"],hexadecimal:[16,"hex"]}})}function ct(){if(L)return M;L=1;const t=K(),e=et(),r=new RegExp("^(?:[-+]?(?:[0-9]+)(?:\\.[0-9]*)?(?:[eE][-+]?[0-9]+)?|\\.[0-9]+(?:[eE][-+]?[0-9]+)?|[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$"),n=new RegExp("^(?:[-+]?\\.(?:inf|Inf|INF)|\\.(?:nan|NaN|NAN))$");function o(t){return null!==t&&!!r.test(t)&&(!!isFinite(parseFloat(t,10))||n.test(t))}function a(t){let e=t.toLowerCase();const r="-"===e[0]?-1:1;return"+-".indexOf(e[0])>=0&&(e=e.slice(1)),".inf"===e?1===r?Number.POSITIVE_INFINITY:Number.NEGATIVE_INFINITY:".nan"===e?NaN:r*parseFloat(e,10)}(0,i.__name)(o,"resolveYamlFloat"),(0,i.__name)(a,"constructYamlFloat");const s=/^[-+]?[0-9]+e/;function l(e,r){if(isNaN(e))switch(r){case"lowercase":return".nan";case"uppercase":return".NAN";case"camelcase":return".NaN"}else if(Number.POSITIVE_INFINITY===e)switch(r){case"lowercase":return".inf";case"uppercase":return".INF";case"camelcase":return".Inf"}else if(Number.NEGATIVE_INFINITY===e)switch(r){case"lowercase":return"-.inf";case"uppercase":return"-.INF";case"camelcase":return"-.Inf"}else if(t.isNegativeZero(e))return"-0.0";const i=e.toString(10);return s.test(i)?i.replace("e",".e"):i}function h(e){return"[object Number]"===Object.prototype.toString.call(e)&&(e%1!=0||t.isNegativeZero(e))}return(0,i.__name)(l,"representYamlFloat"),(0,i.__name)(h,"isFloat"),M=new e("tag:yaml.org,2002:float",{kind:"scalar",resolve:o,construct:a,predicate:h,represent:l,defaultStyle:"lowercase"})}function ut(){return A?F:(A=1,F=at().extend({implicit:[st(),lt(),ht(),ct()]}))}function dt(){return $?E:($=1,E=ut())}function ft(){if(D)return O;D=1;const t=et(),e=new RegExp("^([0-9][0-9][0-9][0-9])-([0-9][0-9])-([0-9][0-9])$"),r=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 n(t){return null!==t&&(null!==e.exec(t)||null!==r.exec(t))}function o(t){let i=0,n=null,o=e.exec(t);if(null===o&&(o=r.exec(t)),null===o)throw new Error("Date resolve error");const a=+o[1],s=+o[2]-1,l=+o[3];if(!o[4])return new Date(Date.UTC(a,s,l));const h=+o[4],c=+o[5],u=+o[6];if(o[7]){for(i=o[7].slice(0,3);i.length<3;)i+="0";i=+i}o[9]&&(n=6e4*(60*+o[10]+ +(o[11]||0)),"-"===o[9]&&(n=-n));const d=new Date(Date.UTC(a,s,l,h,c,u,i));return n&&d.setTime(d.getTime()-n),d}function a(t){return t.toISOString()}return(0,i.__name)(n,"resolveYamlTimestamp"),(0,i.__name)(o,"constructYamlTimestamp"),(0,i.__name)(a,"representYamlTimestamp"),O=new t("tag:yaml.org,2002:timestamp",{kind:"scalar",resolve:n,construct:o,instanceOf:Date,represent:a})}function pt(){if(N)return I;N=1;const t=et();function e(t){return"<<"===t||null===t}return(0,i.__name)(e,"resolveYamlMerge"),I=new t("tag:yaml.org,2002:merge",{kind:"scalar",resolve:e})}function gt(){if(q)return P;q=1;const t=et(),e="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=\n\r";function r(t){if(null===t)return!1;let r=0;const i=t.length,n=e;for(let e=0;e<i;e++){const i=n.indexOf(t.charAt(e));if(!(i>64)){if(i<0)return!1;r+=6}}return r%8==0}function n(t){const r=t.replace(/[\r\n=]/g,""),i=r.length,n=e;let o=0;const a=[];for(let t=0;t<i;t++)t%4==0&&t&&(a.push(o>>16&255),a.push(o>>8&255),a.push(255&o)),o=o<<6|n.indexOf(r.charAt(t));const s=i%4*6;return 0===s?(a.push(o>>16&255),a.push(o>>8&255),a.push(255&o)):18===s?(a.push(o>>10&255),a.push(o>>2&255)):12===s&&a.push(o>>4&255),new Uint8Array(a)}function o(t){let r="",i=0;const n=t.length,o=e;for(let e=0;e<n;e++)e%3==0&&e&&(r+=o[i>>18&63],r+=o[i>>12&63],r+=o[i>>6&63],r+=o[63&i]),i=(i<<8)+t[e];const a=n%3;return 0===a?(r+=o[i>>18&63],r+=o[i>>12&63],r+=o[i>>6&63],r+=o[63&i]):2===a?(r+=o[i>>10&63],r+=o[i>>4&63],r+=o[i<<2&63],r+=o[64]):1===a&&(r+=o[i>>2&63],r+=o[i<<4&63],r+=o[64],r+=o[64]),r}function a(t){return"[object Uint8Array]"===Object.prototype.toString.call(t)}return(0,i.__name)(r,"resolveYamlBinary"),(0,i.__name)(n,"constructYamlBinary"),(0,i.__name)(o,"representYamlBinary"),(0,i.__name)(a,"isBinary"),P=new t("tag:yaml.org,2002:binary",{kind:"scalar",resolve:r,construct:n,predicate:a,represent:o})}function mt(){if(R)return z;R=1;const t=et(),e=Object.prototype.hasOwnProperty,r=Object.prototype.toString;function n(t){if(null===t)return!0;const i=[],n=t;for(let t=0,o=n.length;t<o;t+=1){const o=n[t];let a,s=!1;if("[object Object]"!==r.call(o))return!1;for(a in o)if(e.call(o,a)){if(s)return!1;s=!0}if(!s)return!1;if(-1!==i.indexOf(a))return!1;i.push(a)}return!0}function o(t){return null!==t?t:[]}return(0,i.__name)(n,"resolveYamlOmap"),(0,i.__name)(o,"constructYamlOmap"),z=new t("tag:yaml.org,2002:omap",{kind:"sequence",resolve:n,construct:o})}function yt(){if(W)return j;W=1;const t=et(),e=Object.prototype.toString;function r(t){if(null===t)return!0;const r=t,i=new Array(r.length);for(let t=0,n=r.length;t<n;t+=1){const n=r[t];if("[object Object]"!==e.call(n))return!1;const o=Object.keys(n);if(1!==o.length)return!1;i[t]=[o[0],n[o[0]]]}return!0}function n(t){if(null===t)return[];const e=t,r=new Array(e.length);for(let t=0,i=e.length;t<i;t+=1){const i=e[t],n=Object.keys(i);r[t]=[n[0],i[n[0]]]}return r}return(0,i.__name)(r,"resolveYamlPairs"),(0,i.__name)(n,"constructYamlPairs"),j=new t("tag:yaml.org,2002:pairs",{kind:"sequence",resolve:r,construct:n})}function bt(){if(U)return H;U=1;const t=et(),e=Object.prototype.hasOwnProperty;function r(t){if(null===t)return!0;const r=t;for(const t in r)if(e.call(r,t)&&null!==r[t])return!1;return!0}function n(t){return null!==t?t:{}}return(0,i.__name)(r,"resolveYamlSet"),(0,i.__name)(n,"constructYamlSet"),H=new t("tag:yaml.org,2002:set",{kind:"mapping",resolve:r,construct:n})}function xt(){return G?Y:(G=1,Y=dt().extend({implicit:[ft(),pt()],explicit:[gt(),mt(),yt(),bt()]}))}function Ct(){if(V)return Z;V=1;const t=K(),e=J(),r=tt(),n=xt(),o=Object.prototype.hasOwnProperty,a=/[\x00-\x08\x0B\x0C\x0E-\x1F\x7F-\x84\x86-\x9F\uFFFE\uFFFF]|[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF]/,s=/[\x85\u2028\u2029]/,l=/[,\[\]{}]/,h=/^(?:!|!!|![0-9A-Za-z-]+!)$/,c=/^(?:!|[^,\[\]{}])(?:%[0-9a-f]{2}|[0-9a-z\-#;/?:@&=+$,_.!~*'()\[\]])*$/i;function u(t){return Object.prototype.toString.call(t)}function d(t){return 10===t||13===t}function f(t){return 9===t||32===t}function p(t){return 9===t||32===t||10===t||13===t}function g(t){return 44===t||91===t||93===t||123===t||125===t}function m(t){if(t>=48&&t<=57)return t-48;const e=32|t;return e>=97&&e<=102?e-97+10:-1}function y(t){return 120===t?2:117===t?4:85===t?8:0}function b(t){return t>=48&&t<=57?t-48:-1}function x(t){switch(t){case 48:return"\0";case 97:return"";case 98:return"\b";case 116:case 9:return"\t";case 110:return"\n";case 118:return"\v";case 102:return"\f";case 114:return"\r";case 101:return"";case 32:return" ";case 34:return'"';case 47:return"/";case 92:return"\\";case 78:return"
";case 95:return" ";case 76:return"\u2028";case 80:return"\u2029";default:return""}}function C(t){return t<=65535?String.fromCharCode(t):String.fromCharCode(55296+(t-65536>>10),56320+(t-65536&1023))}function _(t,e,r){"__proto__"===e?Object.defineProperty(t,e,{configurable:!0,enumerable:!0,writable:!0,value:r}):t[e]=r}(0,i.__name)(u,"_class"),(0,i.__name)(d,"isEol"),(0,i.__name)(f,"isWhiteSpace"),(0,i.__name)(p,"isWsOrEol"),(0,i.__name)(g,"isFlowIndicator"),(0,i.__name)(m,"fromHexCode"),(0,i.__name)(y,"escapedHexLen"),(0,i.__name)(b,"fromDecimalCode"),(0,i.__name)(x,"simpleEscapeSequence"),(0,i.__name)(C,"charFromCodepoint"),(0,i.__name)(_,"setProperty");const k=new Array(256),w=new Array(256);for(let t=0;t<256;t++)k[t]=x(t)?1:0,w[t]=x(t);function v(t,e){this.input=t,this.filename=e.filename||null,this.schema=e.schema||n,this.onWarning=e.onWarning||null,this.legacy=e.legacy||!1,this.json=e.json||!1,this.listener=e.listener||null,this.maxDepth="number"==typeof e.maxDepth?e.maxDepth:100,this.maxTotalMergeKeys="number"==typeof e.maxTotalMergeKeys?e.maxTotalMergeKeys:1e4,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.depth=0,this.totalMergeKeys=0,this.firstTabInLine=-1,this.documents=[],this.anchorMapTransactions=[]}function S(t,i){const n={name:t.filename,buffer:t.input.slice(0,-1),position:t.position,line:t.line,column:t.position-t.lineStart};return n.snippet=r(n),new e(i,n)}function T(t,e){throw S(t,e)}function B(t,e){t.onWarning&&t.onWarning.call(null,S(t,e))}function M(t,e,r){const i=t.anchorMapTransactions;if(0!==i.length){const r=i[i.length-1];o.call(r,e)||(r[e]={existed:o.call(t.anchorMap,e),value:t.anchorMap[e]})}t.anchorMap[e]=r}function L(t){t.anchorMapTransactions.push(Object.create(null))}function F(t){const e=t.anchorMapTransactions.pop(),r=t.anchorMapTransactions;if(0===r.length)return;const i=r[r.length-1],n=Object.keys(e);for(let t=0,r=n.length;t<r;t+=1){const r=n[t];o.call(i,r)||(i[r]=e[r])}}function A(t){const e=t.anchorMapTransactions.pop(),r=Object.keys(e);for(let i=r.length-1;i>=0;i-=1){const n=e[r[i]];n.existed?t.anchorMap[r[i]]=n.value:delete t.anchorMap[r[i]]}}function E(t){return{position:t.position,line:t.line,lineStart:t.lineStart,lineIndent:t.lineIndent,firstTabInLine:t.firstTabInLine,tag:t.tag,anchor:t.anchor,kind:t.kind,result:t.result}}function $(t,e){t.position=e.position,t.line=e.line,t.lineStart=e.lineStart,t.lineIndent=e.lineIndent,t.firstTabInLine=e.firstTabInLine,t.tag=e.tag,t.anchor=e.anchor,t.kind=e.kind,t.result=e.result}(0,i.__name)(v,"State"),(0,i.__name)(S,"generateError"),(0,i.__name)(T,"throwError"),(0,i.__name)(B,"throwWarning"),(0,i.__name)(M,"storeAnchor"),(0,i.__name)(L,"beginAnchorTransaction"),(0,i.__name)(F,"commitAnchorTransaction"),(0,i.__name)(A,"rollbackAnchorTransaction"),(0,i.__name)(E,"snapshotState"),(0,i.__name)($,"restoreState");const O={YAML:(0,i.__name)(function(t,e,r){null!==t.version&&T(t,"duplication of %YAML directive"),1!==r.length&&T(t,"YAML directive accepts exactly one argument");const i=/^([0-9]+)\.([0-9]+)$/.exec(r[0]);null===i&&T(t,"ill-formed argument of the YAML directive");const n=parseInt(i[1],10),o=parseInt(i[2],10);1!==n&&T(t,"unacceptable YAML version of the document"),t.version=r[0],t.checkLineBreaks=o<2,1!==o&&2!==o&&B(t,"unsupported YAML version of the document")},"handleYamlDirective"),TAG:(0,i.__name)(function(t,e,r){let i;2!==r.length&&T(t,"TAG directive accepts exactly two arguments");const n=r[0];i=r[1],h.test(n)||T(t,"ill-formed tag handle (first argument) of the TAG directive"),o.call(t.tagMap,n)&&T(t,'there is a previously declared suffix for "'+n+'" tag handle'),c.test(i)||T(t,"ill-formed tag prefix (second argument) of the TAG directive");try{i=decodeURIComponent(i)}catch(e){T(t,"tag prefix is malformed: "+i)}t.tagMap[n]=i},"handleTagDirective")};function D(t,e,r,i){if(e<r){const n=t.input.slice(e,r);if(i)for(let e=0,r=n.length;e<r;e+=1){const r=n.charCodeAt(e);9===r||r>=32&&r<=1114111||T(t,"expected valid JSON character")}else a.test(n)&&T(t,"the stream contains non-printable characters");t.result+=n}}function I(e,r,i,n){t.isObject(i)||T(e,"cannot merge mappings; the provided source object is unacceptable");const a=Object.keys(i);for(let t=0,s=a.length;t<s;t+=1){const s=a[t];-1!==e.maxTotalMergeKeys&&++e.totalMergeKeys>e.maxTotalMergeKeys&&T(e,"merge keys exceeded maxTotalMergeKeys ("+e.maxTotalMergeKeys+")"),o.call(r,s)||(_(r,s,i[s]),n[s]=!0)}}function N(t,e,r,i,n,a,s,l,h){if(Array.isArray(n))for(let e=0,r=(n=Array.prototype.slice.call(n)).length;e<r;e+=1)Array.isArray(n[e])&&T(t,"nested arrays are not supported inside keys"),"object"==typeof n&&"[object Object]"===u(n[e])&&(n[e]="[object Object]");if("object"==typeof n&&"[object Object]"===u(n)&&(n="[object Object]"),n=String(n),null===e&&(e={}),"tag:yaml.org,2002:merge"===i)if(Array.isArray(a))for(let i=0,n=a.length;i<n;i+=1)I(t,e,a[i],r);else I(t,e,a,r);else t.json||o.call(r,n)||!o.call(e,n)||(t.line=s||t.line,t.lineStart=l||t.lineStart,t.position=h||t.position,T(t,"duplicated mapping key")),_(e,n,a),delete r[n];return e}function P(t){const e=t.input.charCodeAt(t.position);10===e?t.position++:13===e?(t.position++,10===t.input.charCodeAt(t.position)&&t.position++):T(t,"a line break is expected"),t.line+=1,t.lineStart=t.position,t.firstTabInLine=-1}function q(t,e,r){let i=0,n=t.input.charCodeAt(t.position);for(;0!==n;){for(;f(n);)9===n&&-1===t.firstTabInLine&&(t.firstTabInLine=t.position),n=t.input.charCodeAt(++t.position);if(e&&35===n)do{n=t.input.charCodeAt(++t.position)}while(10!==n&&13!==n&&0!==n);if(!d(n))break;for(P(t),n=t.input.charCodeAt(t.position),i++,t.lineIndent=0;32===n;)t.lineIndent++,n=t.input.charCodeAt(++t.position)}return-1!==r&&0!==i&&t.lineIndent<r&&B(t,"deficient indentation"),i}function z(t){let e=t.position,r=t.input.charCodeAt(e);return!(45!==r&&46!==r||r!==t.input.charCodeAt(e+1)||r!==t.input.charCodeAt(e+2)||(e+=3,r=t.input.charCodeAt(e),0!==r&&!p(r)))}function R(e,r){1===r?e.result+=" ":r>1&&(e.result+=t.repeat("\n",r-1))}function j(t,e,r){let i,n,o,a,s,l;const h=t.kind,c=t.result;let u=t.input.charCodeAt(t.position);if(p(u)||g(u)||35===u||38===u||42===u||33===u||124===u||62===u||39===u||34===u||37===u||64===u||96===u)return!1;if(63===u||45===u){const e=t.input.charCodeAt(t.position+1);if(p(e)||r&&g(e))return!1}for(t.kind="scalar",t.result="",i=n=t.position,o=!1;0!==u;){if(58===u){const e=t.input.charCodeAt(t.position+1);if(p(e)||r&&g(e))break}else if(35===u){if(p(t.input.charCodeAt(t.position-1)))break}else{if(t.position===t.lineStart&&z(t)||r&&g(u))break;if(d(u)){if(a=t.line,s=t.lineStart,l=t.lineIndent,q(t,!1,-1),t.lineIndent>=e){o=!0,u=t.input.charCodeAt(t.position);continue}t.position=n,t.line=a,t.lineStart=s,t.lineIndent=l;break}}o&&(D(t,i,n,!1),R(t,t.line-a),i=n=t.position,o=!1),f(u)||(n=t.position+1),u=t.input.charCodeAt(++t.position)}return D(t,i,n,!1),!!t.result||(t.kind=h,t.result=c,!1)}function W(t,e){let r,i,n=t.input.charCodeAt(t.position);if(39!==n)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(n=t.input.charCodeAt(t.position));)if(39===n){if(D(t,r,t.position,!0),n=t.input.charCodeAt(++t.position),39!==n)return!0;r=t.position,t.position++,i=t.position}else d(n)?(D(t,r,i,!0),R(t,q(t,!1,e)),r=i=t.position):t.position===t.lineStart&&z(t)?T(t,"unexpected end of the document within a single quoted scalar"):(t.position++,f(n)||(i=t.position));T(t,"unexpected end of the stream within a single quoted scalar")}function H(t,e){let r,i,n,o=t.input.charCodeAt(t.position);if(34!==o)return!1;for(t.kind="scalar",t.result="",t.position++,r=i=t.position;0!==(o=t.input.charCodeAt(t.position));){if(34===o)return D(t,r,t.position,!0),t.position++,!0;if(92===o){if(D(t,r,t.position,!0),o=t.input.charCodeAt(++t.position),d(o))q(t,!1,e);else if(o<256&&k[o])t.result+=w[o],t.position++;else if((n=y(o))>0){let e=n,r=0;for(;e>0;e--)o=t.input.charCodeAt(++t.position),(n=m(o))>=0?r=(r<<4)+n:T(t,"expected hexadecimal character");t.result+=C(r),t.position++}else T(t,"unknown escape sequence");r=i=t.position}else d(o)?(D(t,r,i,!0),R(t,q(t,!1,e)),r=i=t.position):t.position===t.lineStart&&z(t)?T(t,"unexpected end of the document within a double quoted scalar"):(t.position++,f(o)||(i=t.position))}T(t,"unexpected end of the stream within a double quoted scalar")}function U(t,e){let r,i,n,o=!0;const a=t.tag;let s;const l=t.anchor;let h,c,u,d;const f=Object.create(null);let g,m,y,b=t.input.charCodeAt(t.position);if(91===b)h=93,d=!1,s=[];else{if(123!==b)return!1;h=125,d=!0,s={}}for(null!==t.anchor&&M(t,t.anchor,s),b=t.input.charCodeAt(++t.position);0!==b;){if(q(t,!0,e),b=t.input.charCodeAt(t.position),b===h)return t.position++,t.tag=a,t.anchor=l,t.kind=d?"mapping":"sequence",t.result=s,!0;o?44===b&&T(t,"expected the node content, but found ','"):T(t,"missed comma between flow collection entries"),m=g=y=null,c=u=!1,63===b&&p(t.input.charCodeAt(t.position+1))&&(c=u=!0,t.position++,q(t,!0,e)),r=t.line,i=t.lineStart,n=t.position,nt(t,e,1,!1,!0),m=t.tag,g=t.result,q(t,!0,e),b=t.input.charCodeAt(t.position),!u&&t.line!==r||58!==b||(c=!0,b=t.input.charCodeAt(++t.position),q(t,!0,e),nt(t,e,1,!1,!0),y=t.result),d?N(t,s,f,m,g,y,r,i,n):c?s.push(N(t,null,f,m,g,y,r,i,n)):s.push(g),q(t,!0,e),b=t.input.charCodeAt(t.position),44===b?(o=!0,b=t.input.charCodeAt(++t.position)):o=!1}T(t,"unexpected end of the stream within a flow collection")}function Y(e,r){let i,n,o=1,a=!1,s=!1,l=r,h=0,c=!1,u=e.input.charCodeAt(e.position);if(124===u)i=!1;else{if(62!==u)return!1;i=!0}for(e.kind="scalar",e.result="";0!==u;)if(u=e.input.charCodeAt(++e.position),43===u||45===u)1===o?o=43===u?3:2:T(e,"repeat of a chomping mode identifier");else{if(!((n=b(u))>=0))break;0===n?T(e,"bad explicit indentation width of a block scalar; it cannot be less than one"):s?T(e,"repeat of an indentation width identifier"):(l=r+n-1,s=!0)}if(f(u)){do{u=e.input.charCodeAt(++e.position)}while(f(u));if(35===u)do{u=e.input.charCodeAt(++e.position)}while(!d(u)&&0!==u)}for(;0!==u;){for(P(e),e.lineIndent=0,u=e.input.charCodeAt(e.position);(!s||e.lineIndent<l)&&32===u;)e.lineIndent++,u=e.input.charCodeAt(++e.position);if(!s&&e.lineIndent>l&&(l=e.lineIndent),d(u)){h++;continue}if(s||0!==l||T(e,"missing indentation for block scalar"),e.lineIndent<l){3===o?e.result+=t.repeat("\n",a?1+h:h):1===o&&a&&(e.result+="\n");break}i?f(u)?(c=!0,e.result+=t.repeat("\n",a?1+h:h)):c?(c=!1,e.result+=t.repeat("\n",h+1)):0===h?a&&(e.result+=" "):e.result+=t.repeat("\n",h):e.result+=t.repeat("\n",a?1+h:h),a=!0,s=!0,h=0;const r=e.position;for(;!d(u)&&0!==u;)u=e.input.charCodeAt(++e.position);D(e,r,e.position,!1)}return!0}function G(t,e){const r=t.tag,i=t.anchor,n=[];let o=!1;if(-1!==t.firstTabInLine)return!1;null!==t.anchor&&M(t,t.anchor,n);let a=t.input.charCodeAt(t.position);for(;0!==a&&(-1!==t.firstTabInLine&&(t.position=t.firstTabInLine,T(t,"tab characters must not be used in indentation")),45===a)&&p(t.input.charCodeAt(t.position+1));){if(o=!0,t.position++,q(t,!0,-1)&&t.lineIndent<=e){n.push(null),a=t.input.charCodeAt(t.position);continue}const r=t.line;if(nt(t,e,3,!1,!0),n.push(t.result),q(t,!0,-1),a=t.input.charCodeAt(t.position),(t.line===r||t.lineIndent>e)&&0!==a)T(t,"bad indentation of a sequence entry");else if(t.lineIndent<e)break}return!!o&&(t.tag=r,t.anchor=i,t.kind="sequence",t.result=n,!0)}function X(t,e,r){let i,n,o,a;const s=t.tag,l=t.anchor,h={},c=Object.create(null);let u=null,d=null,g=null,m=!1,y=!1;if(-1!==t.firstTabInLine)return!1;null!==t.anchor&&M(t,t.anchor,h);let b=t.input.charCodeAt(t.position);for(;0!==b;){m||-1===t.firstTabInLine||(t.position=t.firstTabInLine,T(t,"tab characters must not be used in indentation"));const x=t.input.charCodeAt(t.position+1),C=t.line;if(63!==b&&58!==b||!p(x)){if(n=t.line,o=t.lineStart,a=t.position,!nt(t,r,2,!1,!0))break;if(t.line===C){for(b=t.input.charCodeAt(t.position);f(b);)b=t.input.charCodeAt(++t.position);if(58===b)b=t.input.charCodeAt(++t.position),p(b)||T(t,"a whitespace character is expected after the key-value separator within a block mapping"),m&&(N(t,h,c,u,d,null,n,o,a),u=d=g=null),y=!0,m=!1,i=!1,u=t.tag,d=t.result;else{if(!y)return t.tag=s,t.anchor=l,!0;T(t,"can not read an implicit mapping pair; a colon is missed")}}else{if(!y)return t.tag=s,t.anchor=l,!0;T(t,"can not read a block mapping entry; a multiline key may not be an implicit key")}}else 63===b?(m&&(N(t,h,c,u,d,null,n,o,a),u=d=g=null),y=!0,m=!0,i=!0):m?(m=!1,i=!0):T(t,"incomplete explicit mapping pair; a key node is missed; or followed by a non-tabulated empty line"),t.position+=1,b=x;if((t.line===C||t.lineIndent>e)&&(m&&(n=t.line,o=t.lineStart,a=t.position),nt(t,e,4,!0,i)&&(m?d=t.result:g=t.result),m||(N(t,h,c,u,d,g,n,o,a),u=d=g=null),q(t,!0,-1),b=t.input.charCodeAt(t.position)),(t.line===C||t.lineIndent>e)&&0!==b)T(t,"bad indentation of a mapping entry");else if(t.lineIndent<e)break}return m&&N(t,h,c,u,d,null,n,o,a),y&&(t.tag=s,t.anchor=l,t.kind="mapping",t.result=h),y}function Q(t){let e,r,i=!1,n=!1,a=t.input.charCodeAt(t.position);if(33!==a)return!1;null!==t.tag&&T(t,"duplication of a tag property"),a=t.input.charCodeAt(++t.position),60===a?(i=!0,a=t.input.charCodeAt(++t.position)):33===a?(n=!0,e="!!",a=t.input.charCodeAt(++t.position)):e="!";let s=t.position;if(i){do{a=t.input.charCodeAt(++t.position)}while(0!==a&&62!==a);t.position<t.length?(r=t.input.slice(s,t.position),a=t.input.charCodeAt(++t.position)):T(t,"unexpected end of the stream within a verbatim tag")}else{for(;0!==a&&!p(a);)33===a&&(n?T(t,"tag suffix cannot contain exclamation marks"):(e=t.input.slice(s-1,t.position+1),h.test(e)||T(t,"named tag handle cannot contain such characters"),n=!0,s=t.position+1)),a=t.input.charCodeAt(++t.position);r=t.input.slice(s,t.position),l.test(r)&&T(t,"tag suffix cannot contain flow indicator characters")}r&&!c.test(r)&&T(t,"tag name cannot contain such characters: "+r);try{r=decodeURIComponent(r)}catch(e){T(t,"tag name is malformed: "+r)}return i?t.tag=r:o.call(t.tagMap,e)?t.tag=t.tagMap[e]+r:"!"===e?t.tag="!"+r:"!!"===e?t.tag="tag:yaml.org,2002:"+r:T(t,'undeclared tag handle "'+e+'"'),!0}function et(t){let e=t.input.charCodeAt(t.position);if(38!==e)return!1;null!==t.anchor&&T(t,"duplication of an anchor property"),e=t.input.charCodeAt(++t.position);const r=t.position;for(;0!==e&&!p(e)&&!g(e);)e=t.input.charCodeAt(++t.position);return t.position===r&&T(t,"name of an anchor node must contain at least one character"),t.anchor=t.input.slice(r,t.position),!0}function rt(t){let e=t.input.charCodeAt(t.position);if(42!==e)return!1;e=t.input.charCodeAt(++t.position);const r=t.position;for(;0!==e&&!p(e)&&!g(e);)e=t.input.charCodeAt(++t.position);t.position===r&&T(t,"name of an alias node must contain at least one character");const i=t.input.slice(r,t.position);return o.call(t.anchorMap,i)||T(t,'unidentified alias "'+i+'"'),t.result=t.anchorMap[i],q(t,!0,-1),!0}function it(t,e,r,i){const n=E(t);return L(t),$(t,e),t.tag=null,t.anchor=null,t.kind=null,t.result=null,X(t,r,i)&&"mapping"===t.kind?(F(t),!0):(A(t),$(t,n),!1)}function nt(t,e,r,i,n){let a,s,l,h,c,u=1,d=!1,f=!1,p=null;t.depth>=t.maxDepth&&T(t,"nesting exceeded maxDepth ("+t.maxDepth+")"),t.depth+=1,null!==t.listener&&t.listener("open",t),t.tag=null,t.anchor=null,t.kind=null,t.result=null;const g=a=s=4===r||3===r;if(i&&q(t,!0,-1)&&(d=!0,t.lineIndent>e?u=1:t.lineIndent===e?u=0:t.lineIndent<e&&(u=-1)),1===u)for(;;){const r=t.input.charCodeAt(t.position),i=E(t);if(d&&(33===r&&null!==t.tag||38===r&&null!==t.anchor))break;if(!Q(t)&&!et(t))break;null===p&&(p=i),q(t,!0,-1)?(d=!0,s=g,t.lineIndent>e?u=1:t.lineIndent===e?u=0:t.lineIndent<e&&(u=-1)):s=!1}if(s&&(s=d||n),1===u||4===r)if(h=1===r||2===r?e:e+1,c=t.position-t.lineStart,1===u)if(s&&(G(t,c)||X(t,c,h))||U(t,h))f=!0;else{const e=t.input.charCodeAt(t.position);null!==p&&g&&!s&&124!==e&&62!==e&&it(t,p,p.position-p.lineStart,h)||a&&Y(t,h)||W(t,h)||H(t,h)?f=!0:rt(t)?(f=!0,null===t.tag&&null===t.anchor||T(t,"alias node should not have any properties")):j(t,h,1===r)&&(f=!0,null===t.tag&&(t.tag="?")),null!==t.anchor&&M(t,t.anchor,t.result)}else 0===u&&(f=s&&G(t,c));if(null===t.tag)null!==t.anchor&&M(t,t.anchor,t.result);else if("?"===t.tag){null!==t.result&&"scalar"!==t.kind&&T(t,'unacceptable node kind for !<?> tag; it should be "scalar", not "'+t.kind+'"');for(let e=0,r=t.implicitTypes.length;e<r;e+=1)if(l=t.implicitTypes[e],l.resolve(t.result)){t.result=l.construct(t.result),t.tag=l.tag,null!==t.anchor&&M(t,t.anchor,t.result);break}}else if("!"!==t.tag){if(o.call(t.typeMap[t.kind||"fallback"],t.tag))l=t.typeMap[t.kind||"fallback"][t.tag];else{l=null;const e=t.typeMap.multi[t.kind||"fallback"];for(let r=0,i=e.length;r<i;r+=1)if(t.tag.slice(0,e[r].tag.length)===e[r].tag){l=e[r];break}}l||T(t,"unknown tag !<"+t.tag+">"),null!==t.result&&l.kind!==t.kind&&T(t,"unacceptable node kind for !<"+t.tag+'> tag; it should be "'+l.kind+'", not "'+t.kind+'"'),l.resolve(t.result,t.tag)?(t.result=l.construct(t.result,t.tag),null!==t.anchor&&M(t,t.anchor,t.result)):T(t,"cannot resolve a node with !<"+t.tag+"> explicit tag")}return null!==t.listener&&t.listener("close",t),t.depth-=1,null!==t.tag||null!==t.anchor||f}function ot(t){const e=t.position;let r,i=!1;for(t.version=null,t.checkLineBreaks=t.legacy,t.tagMap=Object.create(null),t.anchorMap=Object.create(null);0!==(r=t.input.charCodeAt(t.position))&&(q(t,!0,-1),r=t.input.charCodeAt(t.position),!(t.lineIndent>0||37!==r));){i=!0,r=t.input.charCodeAt(++t.position);let e=t.position;for(;0!==r&&!p(r);)r=t.input.charCodeAt(++t.position);const n=t.input.slice(e,t.position),a=[];for(n.length<1&&T(t,"directive name must not be less than one character in length");0!==r;){for(;f(r);)r=t.input.charCodeAt(++t.position);if(35===r){do{r=t.input.charCodeAt(++t.position)}while(0!==r&&!d(r));break}if(d(r))break;for(e=t.position;0!==r&&!p(r);)r=t.input.charCodeAt(++t.position);a.push(t.input.slice(e,t.position))}0!==r&&P(t),o.call(O,n)?O[n](t,n,a):B(t,'unknown document directive "'+n+'"')}q(t,!0,-1),0===t.lineIndent&&45===t.input.charCodeAt(t.position)&&45===t.input.charCodeAt(t.position+1)&&45===t.input.charCodeAt(t.position+2)?(t.position+=3,q(t,!0,-1)):i&&T(t,"directives end mark is expected"),nt(t,t.lineIndent-1,4,!1,!0),q(t,!0,-1),t.checkLineBreaks&&s.test(t.input.slice(e,t.position))&&B(t,"non-ASCII line breaks are interpreted as content"),t.documents.push(t.result),t.position===t.lineStart&&z(t)?46===t.input.charCodeAt(t.position)&&(t.position+=3,q(t,!0,-1)):t.position<t.length-1&&T(t,"end of the stream or a document separator is expected")}function at(t,e){e=e||{},0!==(t=String(t)).length&&(10!==t.charCodeAt(t.length-1)&&13!==t.charCodeAt(t.length-1)&&(t+="\n"),65279===t.charCodeAt(0)&&(t=t.slice(1)));const r=new v(t,e),i=t.indexOf("\0");for(-1!==i&&(r.position=i,T(r,"null byte is not allowed in input")),r.input+="\0";32===r.input.charCodeAt(r.position);)r.lineIndent+=1,r.position+=1;for(;r.position<r.length-1;)ot(r);return r.documents}function st(t,e,r){null!==e&&"object"==typeof e&&void 0===r&&(r=e,e=null);const i=at(t,r);if("function"!=typeof e)return i;for(let t=0,r=i.length;t<r;t+=1)e(i[t])}function lt(t,r){const i=at(t,r);if(0!==i.length){if(1===i.length)return i[0];throw new e("expected a single document in the stream, but found more")}}return(0,i.__name)(D,"captureSegment"),(0,i.__name)(I,"mergeMappings"),(0,i.__name)(N,"storeMappingPair"),(0,i.__name)(P,"readLineBreak"),(0,i.__name)(q,"skipSeparationSpace"),(0,i.__name)(z,"testDocumentSeparator"),(0,i.__name)(R,"writeFoldedLines"),(0,i.__name)(j,"readPlainScalar"),(0,i.__name)(W,"readSingleQuotedScalar"),(0,i.__name)(H,"readDoubleQuotedScalar"),(0,i.__name)(U,"readFlowCollection"),(0,i.__name)(Y,"readBlockScalar"),(0,i.__name)(G,"readBlockSequence"),(0,i.__name)(X,"readBlockMapping"),(0,i.__name)(Q,"readTagProperty"),(0,i.__name)(et,"readAnchorProperty"),(0,i.__name)(rt,"readAlias"),(0,i.__name)(it,"tryReadBlockMappingFromProperty"),(0,i.__name)(nt,"composeNode"),(0,i.__name)(ot,"readDocument"),(0,i.__name)(at,"loadDocuments"),(0,i.__name)(st,"loadAll2"),(0,i.__name)(lt,"load2"),Z.loadAll=st,Z.load=lt,Z}(0,i.__name)(K,"requireCommon"),(0,i.__name)(J,"requireException"),(0,i.__name)(tt,"requireSnippet"),(0,i.__name)(et,"requireType"),(0,i.__name)(rt,"requireSchema"),(0,i.__name)(it,"requireStr"),(0,i.__name)(nt,"requireSeq"),(0,i.__name)(ot,"requireMap"),(0,i.__name)(at,"requireFailsafe"),(0,i.__name)(st,"require_null"),(0,i.__name)(lt,"requireBool"),(0,i.__name)(ht,"requireInt"),(0,i.__name)(ct,"requireFloat"),(0,i.__name)(ut,"requireJson"),(0,i.__name)(dt,"requireCore"),(0,i.__name)(ft,"requireTimestamp"),(0,i.__name)(pt,"requireMerge"),(0,i.__name)(gt,"requireBinary"),(0,i.__name)(mt,"requireOmap"),(0,i.__name)(yt,"requirePairs"),(0,i.__name)(bt,"requireSet"),(0,i.__name)(xt,"require_default"),(0,i.__name)(Ct,"requireLoader");var _t,kt,wt={};function vt(){if(_t)return wt;_t=1;const t=K(),e=J(),r=xt(),n=Object.prototype.toString,o=Object.prototype.hasOwnProperty,a=65279,s={0:"\\0",7:"\\a",8:"\\b",9:"\\t",10:"\\n",11:"\\v",12:"\\f",13:"\\r",27:"\\e",34:'\\"',92:"\\\\",133:"\\N",160:"\\_",8232:"\\L",8233:"\\P"},l=["y","Y","yes","Yes","YES","on","On","ON","n","N","no","No","NO","off","Off","OFF"],h=/^[-+]?[0-9_]+(?::[0-9_]+)+(?:\.[0-9_]*)?$/;function c(t,e){if(null===e)return{};const r={},i=Object.keys(e);for(let n=0,a=i.length;n<a;n+=1){let a=i[n],s=String(e[a]);"!!"===a.slice(0,2)&&(a="tag:yaml.org,2002:"+a.slice(2));const l=t.compiledTypeMap.fallback[a];l&&o.call(l.styleAliases,s)&&(s=l.styleAliases[s]),r[a]=s}return r}function u(r){let i,n;const o=r.toString(16).toUpperCase();if(r<=255)i="x",n=2;else if(r<=65535)i="u",n=4;else{if(!(r<=4294967295))throw new e("code point within a string may not be greater than 0xFFFFFFFF");i="U",n=8}return"\\"+i+t.repeat("0",n-o.length)+o}function d(e){this.schema=e.schema||r,this.indent=Math.max(1,e.indent||2),this.noArrayIndent=e.noArrayIndent||!1,this.skipInvalid=e.skipInvalid||!1,this.flowLevel=t.isNothing(e.flowLevel)?-1:e.flowLevel,this.styleMap=c(this.schema,e.styles||null),this.sortKeys=e.sortKeys||!1,this.lineWidth=e.lineWidth||80,this.noRefs=e.noRefs||!1,this.noCompatMode=e.noCompatMode||!1,this.condenseFlow=e.condenseFlow||!1,this.quotingType='"'===e.quotingType?2:1,this.forceQuotes=e.forceQuotes||!1,this.replacer="function"==typeof e.replacer?e.replacer:null,this.implicitTypes=this.schema.compiledImplicit,this.explicitTypes=this.schema.compiledExplicit,this.tag=null,this.result="",this.duplicates=[],this.usedDuplicates=null}function f(e,r){const i=t.repeat(" ",r);let n=0,o="";const a=e.length;for(;n<a;){let t;const r=e.indexOf("\n",n);-1===r?(t=e.slice(n),n=a):(t=e.slice(n,r+1),n=r+1),t.length&&"\n"!==t&&(o+=i),o+=t}return o}function p(e,r){return"\n"+t.repeat(" ",e.indent*r)}function g(t,e){for(let r=0,i=t.implicitTypes.length;r<i;r+=1)if(t.implicitTypes[r].resolve(e))return!0;return!1}function m(t){return 32===t||9===t}function y(t){return t>=32&&t<=126||t>=161&&t<=55295&&8232!==t&&8233!==t||t>=57344&&t<=65533&&t!==a||t>=65536&&t<=1114111}function b(t){return y(t)&&t!==a&&13!==t&&10!==t}function x(t,e,r){const i=b(t),n=i&&!m(t);return(r?i:i&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t)&&35!==t&&!(58===e&&!n)||b(e)&&!m(e)&&35===t||58===e&&n}function C(t){return y(t)&&t!==a&&!m(t)&&45!==t&&63!==t&&58!==t&&44!==t&&91!==t&&93!==t&&123!==t&&125!==t&&35!==t&&38!==t&&42!==t&&33!==t&&124!==t&&61!==t&&62!==t&&39!==t&&34!==t&&37!==t&&64!==t&&96!==t}function _(t){return!m(t)&&58!==t}function k(t,e){const r=t.charCodeAt(e);let i;return r>=55296&&r<=56319&&e+1<t.length&&(i=t.charCodeAt(e+1),i>=56320&&i<=57343)?1024*(r-55296)+i-56320+65536:r}function w(t){return/^\n* /.test(t)}function v(t,e,r,i,n,o,a,s){let l,h=0,c=null,u=!1,d=!1;const f=-1!==i;let p=-1,g=C(k(t,0))&&_(k(t,t.length-1));if(e||a)for(l=0;l<t.length;h>=65536?l+=2:l++){if(h=k(t,l),!y(h))return 5;g=g&&x(h,c,s),c=h}else{for(l=0;l<t.length;h>=65536?l+=2:l++){if(h=k(t,l),10===h)u=!0,f&&(d=d||l-p-1>i&&" "!==t[p+1],p=l);else if(!y(h))return 5;g=g&&x(h,c,s),c=h}d=d||f&&l-p-1>i&&" "!==t[p+1]}return u||d?r>9&&w(t)?5:a?2===o?5:2:d?4:3:!g||a||n(t)?2===o?5:2:1}function S(t,r,n,o,a){t.dump=function(){if(0===r.length)return 2===t.quotingType?'""':"''";if(!t.noCompatMode&&(-1!==l.indexOf(r)||h.test(r)))return 2===t.quotingType?'"'+r+'"':"'"+r+"'";const s=t.indent*Math.max(1,n),c=-1===t.lineWidth?-1:Math.max(Math.min(t.lineWidth,40),t.lineWidth-s),u=o||t.flowLevel>-1&&n>=t.flowLevel;function d(e){return g(t,e)}switch((0,i.__name)(d,"testAmbiguity"),v(r,u,t.indent,c,d,t.quotingType,t.forceQuotes&&!o,a)){case 1:return r;case 2:return"'"+r.replace(/'/g,"''")+"'";case 3:return"|"+T(r,t.indent)+B(f(r,s));case 4:return">"+T(r,t.indent)+B(f(M(r,c),s));case 5:return'"'+F(r)+'"';default:throw new e("impossible error: invalid scalar style")}}()}function T(t,e){const r=w(t)?String(e):"",i="\n"===t[t.length-1];return r+(!i||"\n"!==t[t.length-2]&&"\n"!==t?i?"":"-":"+")+"\n"}function B(t){return"\n"===t[t.length-1]?t.slice(0,-1):t}function M(t,e){const r=/(\n+)([^\n]*)/g;let i,n,o=function(){let i=t.indexOf("\n");return i=-1!==i?i:t.length,r.lastIndex=i,L(t.slice(0,i),e)}(),a="\n"===t[0]||" "===t[0];for(;n=r.exec(t);){const t=n[1],r=n[2];i=" "===r[0],o+=t+(a||i||""===r?"":"\n")+L(r,e),a=i}return o}function L(t,e){if(""===t||" "===t[0])return t;const r=/ [^ ]/g;let i,n,o=0,a=0,s=0,l="";for(;i=r.exec(t);)s=i.index,s-o>e&&(n=a>o?a:s,l+="\n"+t.slice(o,n),o=n+1),a=s;return l+="\n",t.length-o>e&&a>o?l+=t.slice(o,a)+"\n"+t.slice(a+1):l+=t.slice(o),l.slice(1)}function F(t){let e="",r=0;for(let i=0;i<t.length;r>=65536?i+=2:i++){r=k(t,i);const n=s[r];!n&&y(r)?(e+=t[i],r>=65536&&(e+=t[i+1])):e+=n||u(r)}return e}function A(t,e,r){let i="";const n=t.tag;for(let n=0,o=r.length;n<o;n+=1){let o=r[n];t.replacer&&(o=t.replacer.call(r,String(n),o)),(I(t,e,o,!1,!1)||void 0===o&&I(t,e,null,!1,!1))&&(""!==i&&(i+=","+(t.condenseFlow?"":" ")),i+=t.dump)}t.tag=n,t.dump="["+i+"]"}function E(t,e,r,i){let n="";const o=t.tag;for(let o=0,a=r.length;o<a;o+=1){let a=r[o];t.replacer&&(a=t.replacer.call(r,String(o),a)),(I(t,e+1,a,!0,!0,!1,!0)||void 0===a&&I(t,e+1,null,!0,!0,!1,!0))&&(i&&""===n||(n+=p(t,e)),t.dump&&10===t.dump.charCodeAt(0)?n+="-":n+="- ",n+=t.dump)}t.tag=o,t.dump=n||"[]"}function $(t,e,r){let i="";const n=t.tag,o=Object.keys(r);for(let n=0,a=o.length;n<a;n+=1){let a="";""!==i&&(a+=", "),t.condenseFlow&&(a+='"');const s=o[n];let l=r[s];t.replacer&&(l=t.replacer.call(r,s,l)),I(t,e,s,!1,!1)&&(t.dump.length>1024&&(a+="? "),a+=t.dump+(t.condenseFlow?'"':"")+":"+(t.condenseFlow?"":" "),I(t,e,l,!1,!1)&&(a+=t.dump,i+=a))}t.tag=n,t.dump="{"+i+"}"}function O(t,r,i,n){let o="";const a=t.tag,s=Object.keys(i);if(!0===t.sortKeys)s.sort();else if("function"==typeof t.sortKeys)s.sort(t.sortKeys);else if(t.sortKeys)throw new e("sortKeys must be a boolean or a function");for(let e=0,a=s.length;e<a;e+=1){let a="";n&&""===o||(a+=p(t,r));const l=s[e];let h=i[l];if(t.replacer&&(h=t.replacer.call(i,l,h)),!I(t,r+1,l,!0,!0,!0))continue;const c=null!==t.tag&&"?"!==t.tag||t.dump&&t.dump.length>1024;c&&(t.dump&&10===t.dump.charCodeAt(0)?a+="?":a+="? "),a+=t.dump,c&&(a+=p(t,r)),I(t,r+1,h,!0,c)&&(t.dump&&10===t.dump.charCodeAt(0)?a+=":":a+=": ",a+=t.dump,o+=a)}t.tag=a,t.dump=o||"{}"}function D(t,r,i){const a=i?t.explicitTypes:t.implicitTypes;for(let s=0,l=a.length;s<l;s+=1){const l=a[s];if((l.instanceOf||l.predicate)&&(!l.instanceOf||"object"==typeof r&&r instanceof l.instanceOf)&&(!l.predicate||l.predicate(r))){if(i?l.multi&&l.representName?t.tag=l.representName(r):t.tag=l.tag:t.tag="?",l.represent){const i=t.styleMap[l.tag]||l.defaultStyle;let a;if("[object Function]"===n.call(l.represent))a=l.represent(r,i);else{if(!o.call(l.represent,i))throw new e("!<"+l.tag+'> tag resolver accepts not "'+i+'" style');a=l.represent[i](r,i)}t.dump=a}return!0}}return!1}function I(t,r,i,o,a,s,l){t.tag=null,t.dump=i,D(t,i,!1)||D(t,i,!0);const h=n.call(t.dump),c=o;o&&(o=t.flowLevel<0||t.flowLevel>r);const u="[object Object]"===h||"[object Array]"===h;let d,f;if(u&&(d=t.duplicates.indexOf(i),f=-1!==d),(null!==t.tag&&"?"!==t.tag||f||2!==t.indent&&r>0)&&(a=!1),f&&t.usedDuplicates[d])t.dump="*ref_"+d;else{if(u&&f&&!t.usedDuplicates[d]&&(t.usedDuplicates[d]=!0),"[object Object]"===h)o&&0!==Object.keys(t.dump).length?(O(t,r,t.dump,a),f&&(t.dump="&ref_"+d+t.dump)):($(t,r,t.dump),f&&(t.dump="&ref_"+d+" "+t.dump));else if("[object Array]"===h)o&&0!==t.dump.length?(t.noArrayIndent&&!l&&r>0?E(t,r-1,t.dump,a):E(t,r,t.dump,a),f&&(t.dump="&ref_"+d+t.dump)):(A(t,r,t.dump),f&&(t.dump="&ref_"+d+" "+t.dump));else{if("[object String]"!==h){if("[object Undefined]"===h)return!1;if(t.skipInvalid)return!1;throw new e("unacceptable kind of an object to dump "+h)}"?"!==t.tag&&S(t,t.dump,r,s,c)}if(null!==t.tag&&"?"!==t.tag){let e=encodeURI("!"===t.tag[0]?t.tag.slice(1):t.tag).replace(/!/g,"%21");e="!"===t.tag[0]?"!"+e:"tag:yaml.org,2002:"===e.slice(0,18)?"!!"+e.slice(18):"!<"+e+">",t.dump=e+" "+t.dump}}return!0}function N(t,e){const r=[],i=[];P(t,r,i);const n=i.length;for(let t=0;t<n;t+=1)e.duplicates.push(r[i[t]]);e.usedDuplicates=new Array(n)}function P(t,e,r){if(null!==t&&"object"==typeof t){const i=e.indexOf(t);if(-1!==i)-1===r.indexOf(i)&&r.push(i);else if(e.push(t),Array.isArray(t))for(let i=0,n=t.length;i<n;i+=1)P(t[i],e,r);else{const i=Object.keys(t);for(let n=0,o=i.length;n<o;n+=1)P(t[i[n]],e,r)}}}function q(t,e){const r=new d(e=e||{});r.noRefs||N(t,r);let i=t;return r.replacer&&(i=r.replacer.call({"":i},"",i)),I(r,0,i,!0,!0)?r.dump+"\n":""}return(0,i.__name)(c,"compileStyleMap"),(0,i.__name)(u,"encodeHex"),(0,i.__name)(d,"State"),(0,i.__name)(f,"indentString"),(0,i.__name)(p,"generateNextLine"),(0,i.__name)(g,"testImplicitResolving"),(0,i.__name)(m,"isWhitespace"),(0,i.__name)(y,"isPrintable"),(0,i.__name)(b,"isNsCharOrWhitespace"),(0,i.__name)(x,"isPlainSafe"),(0,i.__name)(C,"isPlainSafeFirst"),(0,i.__name)(_,"isPlainSafeLast"),(0,i.__name)(k,"codePointAt"),(0,i.__name)(w,"needIndentIndicator"),(0,i.__name)(v,"chooseScalarStyle"),(0,i.__name)(S,"writeScalar"),(0,i.__name)(T,"blockHeader"),(0,i.__name)(B,"dropEndingNewline"),(0,i.__name)(M,"foldString"),(0,i.__name)(L,"foldLine"),(0,i.__name)(F,"escapeString"),(0,i.__name)(A,"writeFlowSequence"),(0,i.__name)(E,"writeBlockSequence"),(0,i.__name)($,"writeFlowMapping"),(0,i.__name)(O,"writeBlockMapping"),(0,i.__name)(D,"detectType"),(0,i.__name)(I,"writeNode"),(0,i.__name)(N,"getDuplicateReferences"),(0,i.__name)(P,"inspectNode"),(0,i.__name)(q,"dump2"),wt.dump=q,wt}function St(){if(kt)return X;kt=1;const t=Ct(),e=vt();function r(t,e){return function(){throw new Error("Function yaml."+t+" is removed in js-yaml 4. Use yaml."+e+" instead, which is now safe by default.")}}return(0,i.__name)(r,"renamed"),X.Type=et(),X.Schema=rt(),X.FAILSAFE_SCHEMA=at(),X.JSON_SCHEMA=ut(),X.CORE_SCHEMA=dt(),X.DEFAULT_SCHEMA=xt(),X.load=t.load,X.loadAll=t.loadAll,X.dump=e.dump,X.YAMLException=J(),X.types={binary:gt(),float:ct(),map:ot(),null:st(),pairs:yt(),set:bt(),timestamp:ft(),bool:lt(),int:ht(),merge:pt(),omap:mt(),seq:nt(),str:it()},X.safeLoad=r("safeLoad","load"),X.safeLoadAll=r("safeLoadAll","loadAll"),X.safeDump=r("safeDump","dump"),X}(0,i.__name)(vt,"requireDumper"),(0,i.__name)(St,"requireJsYaml");var Tt=n(St()),{Type:Bt,Schema:Mt,FAILSAFE_SCHEMA:Lt,JSON_SCHEMA:Ft,CORE_SCHEMA:At,DEFAULT_SCHEMA:Et,load:$t,loadAll:Ot,dump:Dt,YAMLException:It,types:Nt,safeLoad:Pt,safeLoadAll:qt,safeDump:zt}=Tt},6342(t,e,r){r.r(e),r.d(e,{clear:()=>u,getSubGraphTitleMargins:()=>s,insertNode:()=>h,positionNode:()=>d,setNodeElem:()=>c});var i=r(51752),n=r(70848),o=r(27166),a=r(79456),s=(0,a.__name)(({flowchart:t})=>{const e=t?.subGraphTitleMargin?.top??0,r=t?.subGraphTitleMargin?.bottom??0;return{subGraphTitleTopMargin:e,subGraphTitleBottomMargin:r,subGraphTitleTotalMargin:e+r}},"getSubGraphTitleMargins"),l=new Map;async function h(t,e,r){let o,a;"rect"===e.shape&&(e.rx&&e.ry?e.shape="roundedRect":e.shape="squareRect");const s=e.shape?i.shapes[e.shape]:void 0;if(!s)throw new Error(`No such shape: ${e.shape}. Please check your syntax.`);if(e.link){let i;"sandbox"===r.config.securityLevel?i="_top":e.linkTarget&&(i=e.linkTarget||"_blank"),o=t.insert("svg:a").attr("xlink:href",e.link).attr("target",i??null),a=await s(o,e,r)}else a=await s(t,e,r),o=a;return o.attr("data-look",(0,n.handleUndefinedAttr)(e.look)),e.tooltip&&a.attr("title",e.tooltip),l.set(e.id,o),e.haveCallback&&o.attr("class",o.attr("class")+" clickable"),o}(0,a.__name)(h,"insertNode");var c=(0,a.__name)((t,e)=>{l.set(e.id,t)},"setNodeElem"),u=(0,a.__name)(()=>{l.clear()},"clear"),d=(0,a.__name)(t=>{const e=l.get(t.id);o.log.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+r-t.width/2)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),r},"positionNode")},48550(t,e,r){r.r(e),r.d(e,{compileStyles:()=>s,isLabelStyle:()=>h,solidStateFill:()=>o,styles2String:()=>c,userNodeOverrides:()=>u});var i=r(39989),n=r(79456),o=(0,n.__name)(t=>{const{handDrawnSeed:e}=(0,i.getConfig2)();return{fill:t,hachureAngle:120,hachureGap:4,fillWeight:2,roughness:.7,stroke:t,seed:e}},"solidStateFill"),a=(0,n.__name)(t=>Array.isArray(t)?t:t?t.split(";").map(t=>t.trim()).filter(Boolean):[],"normalizeStyleList"),s=(0,n.__name)(t=>{const e=l([...t.cssCompiledStyles||[],...t.cssStyles||[],...a(t.labelStyle)]);return{stylesMap:e,stylesArray:[...e]}},"compileStyles"),l=(0,n.__name)(t=>{const e=new Map;return t.forEach(t=>{const[r,i]=t.split(":");e.set(r.trim(),i?.trim())}),e},"styles2Map"),h=(0,n.__name)(t=>"color"===t||"font-size"===t||"font-family"===t||"font-weight"===t||"font-style"===t||"text-decoration"===t||"text-align"===t||"text-transform"===t||"line-height"===t||"letter-spacing"===t||"word-spacing"===t||"text-shadow"===t||"text-overflow"===t||"white-space"===t||"word-wrap"===t||"word-break"===t||"overflow-wrap"===t||"hyphens"===t,"isLabelStyle"),c=(0,n.__name)(t=>{const{stylesArray:e}=s(t),r=[],i=[],n=[],o=[];return e.forEach(t=>{const e=t[0];h(e)?r.push(t.join(":")+" !important"):(i.push(t.join(":")+" !important"),e.includes("stroke")&&n.push(t.join(":")+" !important"),"fill"===e&&o.push(t.join(":")+" !important"))}),{labelStyles:r.join(";"),nodeStyles:i.join(";"),stylesArray:e,borderStyles:n,backgroundStyles:o}},"styles2String"),u=(0,n.__name)((t,e)=>{const{themeVariables:r,handDrawnSeed:n}=(0,i.getConfig2)(),{nodeBorder:o,mainBkg:a}=r,{stylesMap:l}=s(t);return Object.assign({roughness:.7,fill:l.get("fill")||a,fillStyle:"hachure",fillWeight:4,hachureGap:5.2,stroke:l.get("stroke")||o,seed:n,strokeWidth:l.get("stroke-width")?.replace("px","")||1.3,fillLineDash:[0,0],strokeLineDash:d(l.get("stroke-dasharray"))},e)},"userNodeOverrides"),d=(0,n.__name)(t=>{if(!t)return[0,0];const e=t.trim().split(/\s+/).map(Number);if(1===e.length){const t=isNaN(e[0])?0:e[0];return[t,t]}return[isNaN(e[0])?0:e[0],isNaN(e[1])?0:e[1]]},"getStrokeDashArray")},56350(t,e,r){r.d(e,{getIconSVG:()=>T,isIconAvailable:()=>S,registerIconPacks:()=>w,unknownIcon:()=>C}),r.r(e);var i=r(39989),n=r(27166),o=r(79456);const a=(t,e)=>!!t&&!(!(e&&""===t.prefix||t.prefix)||!t.name),s=Object.freeze({left:0,top:0,width:16,height:16}),l=Object.freeze({rotate:0,vFlip:!1,hFlip:!1}),h=Object.freeze({...s,...l}),c=Object.freeze({...h,body:"",hidden:!1});function u(t,e){const r=function(t,e){const r={};!t.hFlip!=!e.hFlip&&(r.hFlip=!0),!t.vFlip!=!e.vFlip&&(r.vFlip=!0);const i=((t.rotate||0)+(e.rotate||0))%4;return i&&(r.rotate=i),r}(t,e);for(const i in c)i in l?i in t&&!(i in r)&&(r[i]=l[i]):i in e?r[i]=e[i]:i in t&&(r[i]=t[i]);return r}function d(t,e,r){const i=t.icons,n=t.aliases||Object.create(null);let o={};function a(t){o=u(i[t]||n[t],o)}return a(e),r.forEach(a),u(t,o)}const f=Object.freeze({width:null,height:null}),p=Object.freeze({...f,...l}),g=/(-?[0-9.]*[0-9]+[0-9.]*)/g,m=/^-?[0-9.]*[0-9]+[0-9.]*$/g;function y(t,e,r){if(1===e)return t;if(r=r||100,"number"==typeof t)return Math.ceil(t*e*r)/r;if("string"!=typeof t)return t;const i=t.split(g);if(null===i||!i.length)return t;const n=[];let o=i.shift(),a=m.test(o);for(;;){if(a){const t=parseFloat(o);isNaN(t)?n.push(o):n.push(Math.ceil(t*e*r)/r)}else n.push(o);if(o=i.shift(),void 0===o)return n.join("");a=!a}}const b=/\sid="(\S+)"/g,x=new Map;var C={body:'<g><rect width="80" height="80" style="fill: #087ebf; stroke-width: 0px;"/><text transform="translate(21.16 64.67)" style="fill: #fff; font-family: ArialMT, Arial; font-size: 67.75px;"><tspan x="0" y="0">?</tspan></text></g>',height:80,width:80},_=new Map,k=new Map,w=(0,o.__name)(t=>{for(const e of t){if(!e.name)throw new Error('Invalid icon loader. Must have a "name" property with non-empty string value.');if(n.log.debug("Registering icon pack:",e.name),"loader"in e)k.set(e.name,e.loader);else{if(!("icons"in e))throw n.log.error("Invalid icon loader:",e),new Error('Invalid icon loader. Must have either "icons" or "loader" property.');_.set(e.name,e.icons)}}},"registerIconPacks"),v=(0,o.__name)(async(t,e)=>{const r=((t,e,r,i="")=>{const n=t.split(":");if("@"===t.slice(0,1)){if(n.length<2||n.length>3)return null;i=n.shift().slice(1)}if(n.length>3||!n.length)return null;if(n.length>1){const t=n.pop(),r=n.pop(),o={provider:n.length>0?n[0]:i,prefix:r,name:t};return e&&!a(o)?null:o}const o=n[0],s=o.split("-");if(s.length>1){const t={provider:i,prefix:s.shift(),name:s.join("-")};return e&&!a(t)?null:t}if(r&&""===i){const t={provider:i,prefix:"",name:o};return e&&!a(t,r)?null:t}return null})(t,!0,void 0!==e);if(!r)throw new Error(`Invalid icon name: ${t}`);const i=r.prefix||e;if(!i)throw new Error(`Icon name must contain a prefix: ${t}`);let o=_.get(i);if(!o){const t=k.get(i);if(!t)throw new Error(`Icon set not found: ${r.prefix}`);try{o={...await t(),prefix:i},_.set(i,o)}catch(t){throw n.log.error(t),new Error(`Failed to load icon set: ${r.prefix}`)}}const s=function(t,e){if(t.icons[e])return d(t,e,[]);const r=function(t,e){const r=t.icons,i=t.aliases||Object.create(null),n=Object.create(null);return(e||Object.keys(r).concat(Object.keys(i))).forEach(function t(e){if(r[e])return n[e]=[];if(!(e in n)){n[e]=null;const r=i[e]&&i[e].parent,o=r&&t(r);o&&(n[e]=[r].concat(o))}return n[e]}),n}(t,[e])[e];return r?d(t,e,r):null}(o,r.name);if(!s)throw new Error(`Icon not found: ${t}`);return s},"getRegisteredIconData"),S=(0,o.__name)(async t=>{try{return await v(t),!0}catch{return!1}},"isIconAvailable"),T=(0,o.__name)(async(t,e,r)=>{let o;try{o=await v(t,e?.fallbackPrefix)}catch(t){n.log.error(t),o=C}const a=function(t,e){const r={...h,...t},i={...p,...e},n={left:r.left,top:r.top,width:r.width,height:r.height};let o=r.body;[r,i].forEach(t=>{const e=[],r=t.hFlip,i=t.vFlip;let a,s=t.rotate;switch(r?i?s+=2:(e.push("translate("+(n.width+n.left).toString()+" "+(0-n.top).toString()+")"),e.push("scale(-1 1)"),n.top=n.left=0):i&&(e.push("translate("+(0-n.left).toString()+" "+(n.height+n.top).toString()+")"),e.push("scale(1 -1)"),n.top=n.left=0),s<0&&(s-=4*Math.floor(s/4)),s%=4,s){case 1:a=n.height/2+n.top,e.unshift("rotate(90 "+a.toString()+" "+a.toString()+")");break;case 2:e.unshift("rotate(180 "+(n.width/2+n.left).toString()+" "+(n.height/2+n.top).toString()+")");break;case 3:a=n.width/2+n.left,e.unshift("rotate(-90 "+a.toString()+" "+a.toString()+")")}s%2==1&&(n.left!==n.top&&(a=n.left,n.left=n.top,n.top=a),n.width!==n.height&&(a=n.width,n.width=n.height,n.height=a)),e.length&&(o=function(t,e){const r=function(t,e="defs"){let r="";const i=t.indexOf("<"+e);for(;i>=0;){const n=t.indexOf(">",i),o=t.indexOf("</"+e);if(-1===n||-1===o)break;const a=t.indexOf(">",o);if(-1===a)break;r+=t.slice(n+1,o).trim(),t=t.slice(0,i).trim()+t.slice(a+1)}return{defs:r,content:t}}(t);return i=r.defs,n=e+r.content+"</g>",i?"<defs>"+i+"</defs>"+n:n;var i,n}(o,'<g transform="'+e.join(" ")+'">'))});const a=i.width,s=i.height,l=n.width,c=n.height;let u,d;null===a?(d=null===s?"1em":"auto"===s?c:s,u=y(d,l/c)):(u="auto"===a?l:a,d=null===s?y(u,c/l):"auto"===s?c:s);const f={},g=(t,e)=>{(t=>"unset"===t||"undefined"===t||"none"===t)(e)||(f[t]=e.toString())};g("width",u),g("height",d);const m=[n.left,n.top,l,c];return f.viewBox=m.join(" "),{attributes:f,viewBox:m,body:o}}(o,e),s=function(t,e){let r=-1===t.indexOf("xlink:")?"":' xmlns:xlink="http://www.w3.org/1999/xlink"';for(const t in e)r+=" "+t+'="'+e[t]+'"';return'<svg xmlns="http://www.w3.org/2000/svg"'+r+">"+t+"</svg>"}(function(t){const e=[];let r;for(;r=b.exec(t);)e.push(r[1]);if(!e.length)return t;const i="suffix"+(16777216*Math.random()|Date.now()).toString(16);return e.forEach(e=>{const r=function(t){t=t.replace(/[0-9]+$/,"")||"a";const e=x.get(t)||0;return x.set(t,e+1),e?`${t}${e}`:t}(e),n=e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");t=t.replace(new RegExp('([#;"])('+n+')([")]|\\.[a-z])',"g"),"$1"+r+i+"$3")}),t=t.replace(new RegExp(i,"g"),"")}(a.body),{...a.attributes,...r});return(0,i.sanitizeText)(s,(0,i.getConfig)())},"getIconSVG")},41298(t,e,r){r.r(e),r.d(e,{clear:()=>T,edgeLabels:()=>v,hasEdgeLabel:()=>B,insertEdge:()=>z,insertEdgeLabel:()=>L,markerOffsets:()=>p,markers_default:()=>dt,positionEdgeLabel:()=>A,terminalLabels:()=>S});var i=r(6342),n=r(51752),o=r(48550),a=r(77948),s=r(70848),l=r(39989),h=r(27166),c=r(79456),u=r(79806),d=r(7083),f=(0,c.__name)((t,e)=>{if(e)return"translate("+-t.width/2+", "+-t.height/2+")";const r=t.x??0,i=t.y??0;return"translate("+-(r+t.width/2)+", "+-(i+t.height/2)+")"},"computeLabelTransform"),p={aggregation:17.25,extension:17.25,composition:17.25,dependency:6,lollipop:13.5,arrow_point:4,arrow_barb:0,arrow_barb_neo:5.5},g={arrow_point:4,arrow_cross:12.5,arrow_circle:12.5};function m(t,e){if(void 0===t||void 0===e)return{angle:0,deltaX:0,deltaY:0};t=y(t),e=y(e);const[r,i]=[t.x,t.y],[n,o]=[e.x,e.y],a=n-r,s=o-i;return{angle:Math.atan(s/a),deltaX:a,deltaY:s}}(0,c.__name)(m,"calculateDeltaAndAngle");var y=(0,c.__name)(t=>Array.isArray(t)?{x:t[0],y:t[1]}:t,"pointTransformer"),b=(0,c.__name)(t=>({x:(0,c.__name)(function(e,r,i){let n=0;const o=y(i[0]).x<y(i[i.length-1]).x?"left":"right";if(0===r&&Object.hasOwn(p,t.arrowTypeStart)){const{angle:e,deltaX:r}=m(i[0],i[1]);n=p[t.arrowTypeStart]*Math.cos(e)*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(p,t.arrowTypeEnd)){const{angle:e,deltaX:r}=m(i[i.length-1],i[i.length-2]);n=p[t.arrowTypeEnd]*Math.cos(e)*(r>=0?1:-1)}const a=Math.abs(y(e).x-y(i[i.length-1]).x),s=Math.abs(y(e).y-y(i[i.length-1]).y),l=Math.abs(y(e).x-y(i[0]).x),h=Math.abs(y(e).y-y(i[0]).y),c=p[t.arrowTypeStart],u=p[t.arrowTypeEnd];if(a<u&&a>0&&s<u){let t=u+1-a;t*="right"===o?-1:1,n-=t}if(l<c&&l>0&&h<c){let t=c+1-l;t*="right"===o?-1:1,n+=t}return y(e).x+n},"x"),y:(0,c.__name)(function(e,r,i){let n=0;const o=y(i[0]).y<y(i[i.length-1]).y?"down":"up";if(0===r&&Object.hasOwn(p,t.arrowTypeStart)){const{angle:e,deltaY:r}=m(i[0],i[1]);n=p[t.arrowTypeStart]*Math.abs(Math.sin(e))*(r>=0?1:-1)}else if(r===i.length-1&&Object.hasOwn(p,t.arrowTypeEnd)){const{angle:e,deltaY:r}=m(i[i.length-1],i[i.length-2]);n=p[t.arrowTypeEnd]*Math.abs(Math.sin(e))*(r>=0?1:-1)}const a=Math.abs(y(e).y-y(i[i.length-1]).y),s=Math.abs(y(e).x-y(i[i.length-1]).x),l=Math.abs(y(e).y-y(i[0]).y),h=Math.abs(y(e).x-y(i[0]).x),c=p[t.arrowTypeStart],u=p[t.arrowTypeEnd];if(a<u&&a>0&&s<u){let t=u+1-a;t*="up"===o?-1:1,n-=t}if(l<c&&l>0&&h<c){let t=c+1-l;t*="up"===o?-1:1,n+=t}return y(e).y+n},"y")}),"getLineFunctionsWithOffset"),x=(0,c.__name)((t,e,r,i,n,o=!1,a)=>{e.arrowTypeStart&&k(t,"start",e.arrowTypeStart,r,i,n,o,a),e.arrowTypeEnd&&k(t,"end",e.arrowTypeEnd,r,i,n,o,a)},"addEdgeMarkers"),C={arrow_cross:{type:"cross",fill:!1},arrow_point:{type:"point",fill:!0},arrow_barb:{type:"barb",fill:!0},arrow_barb_neo:{type:"barb",fill:!0},arrow_circle:{type:"circle",fill:!1},aggregation:{type:"aggregation",fill:!1},extension:{type:"extension",fill:!1},composition:{type:"composition",fill:!0},dependency:{type:"dependency",fill:!0},lollipop:{type:"lollipop",fill:!1},only_one:{type:"onlyOne",fill:!1},zero_or_one:{type:"zeroOrOne",fill:!1},one_or_more:{type:"oneOrMore",fill:!1},zero_or_more:{type:"zeroOrMore",fill:!1},requirement_arrow:{type:"requirement_arrow",fill:!1},requirement_contains:{type:"requirement_contains",fill:!1}},_=["cross","point","circle","lollipop","aggregation","extension","composition","dependency","barb"],k=(0,c.__name)((t,e,r,i,n,o,a=!1,s)=>{if(!r||"none"===r)return;const l=C[r],c=l&&_.includes(l.type);if(!l)return void h.log.warn(`Unknown arrow type: ${r}`);const u=`${n}_${o}-${l.type}${"start"===e?"Start":"End"}${a&&c?"-margin":""}`;if(s&&""!==s.trim()){const r=`${u}_${s.replace(/[^\dA-Za-z]/g,"_")}`;if(!document.getElementById(r)){const t=document.getElementById(u);if(t){const e=t.cloneNode(!0);e.id=r,e.querySelectorAll("path, circle, line").forEach(t=>{t.setAttribute("stroke",s),l.fill&&t.setAttribute("fill",s)}),t.parentNode?.appendChild(e)}}t.attr(`marker-${e}`,`url(${i}#${r})`)}else t.attr(`marker-${e}`,`url(${i}#${u})`)},"addEdgeMarker"),w=(0,c.__name)(t=>"string"==typeof t?t:(0,l.getConfig2)()?.flowchart?.curve,"resolveEdgeCurveType"),v=new Map,S=new Map,T=(0,c.__name)(()=>{v.clear(),S.clear()},"clear"),B=(0,c.__name)(t=>Boolean(t.label||t.startLabelLeft||t.startLabelRight||t.endLabelLeft||t.endLabelRight),"hasEdgeLabel"),M=(0,c.__name)(t=>t?"string"==typeof t?t:t.reduce((t,e)=>t+";"+e,""):"","getLabelStyles"),L=(0,c.__name)(async(t,e)=>{const r=(0,l.getConfig2)();let i=(0,l.getEffectiveHtmlLabels)(r);const{labelStyles:s}=(0,o.styles2String)(e);e.labelStyle=s;const c=t.insert("g").attr("class","edgeLabel"),d=c.insert("g").attr("class","label").attr("data-id",e.id),p="markdown"===e.labelType,g=await(0,a.createText)(t,e.label,{style:M(e.labelStyle),useHtmlLabels:i,addSvgBackground:!0,isNode:!1,markdown:p,width:void 0},r);let m,y,b;if(d.node().appendChild(g),h.log.info("abc82",e,e.labelType),i){const t=g.children[0],e=(0,u.select)(g);m=await a.fastdom_default.measure(()=>t.getBoundingClientRect()),y=m,e.attr("width",m.width),e.attr("height",m.height)}else{const t=(0,u.select)(g).select("text").node();await a.fastdom_default.measure(()=>{m=g.getBBox(),y=t&&"function"==typeof t.getBBox?t.getBBox():m})}if(d.attr("transform",f(y,i)),v.set(e.id,c),e.width=m.width,e.height=m.height,e.startLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),a=await(0,n.createLabel_default)(o,e.startLabelLeft,M(e.labelStyle)||"",!1,!1);b=a;let s=a.getBBox();if(i){const t=a.children[0],e=(0,u.select)(a);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}o.attr("transform",f(s,i)),S.get(e.id)||S.set(e.id,{}),S.get(e.id).startLeft=r,F(b,e.startLabelLeft)}if(e.startLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),a=await(0,n.createLabel_default)(o,e.startLabelRight,M(e.labelStyle)||"",!1,!1);b=a;let s=a.getBBox();if(i){const t=a.children[0],e=(0,u.select)(a);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}o.attr("transform",f(s,i)),S.get(e.id)||S.set(e.id,{}),S.get(e.id).startRight=r,F(b,e.startLabelRight)}if(e.endLabelLeft){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),a=await(0,n.createLabel_default)(r,e.endLabelLeft,M(e.labelStyle)||"",!1,!1);b=a;let s=a.getBBox();if(i){const t=a.children[0],e=(0,u.select)(a);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}o.attr("transform",f(s,i)),S.get(e.id)||S.set(e.id,{}),S.get(e.id).endLeft=r,F(b,e.endLabelLeft)}if(e.endLabelRight){const r=t.insert("g").attr("class","edgeTerminals"),o=r.insert("g").attr("class","inner"),a=await(0,n.createLabel_default)(r,e.endLabelRight,M(e.labelStyle)||"",!1,!1);b=a;let s=a.getBBox();if(i){const t=a.children[0],e=(0,u.select)(a);s=t.getBoundingClientRect(),e.attr("width",s.width),e.attr("height",s.height)}o.attr("transform",f(s,i)),S.get(e.id)||S.set(e.id,{}),S.get(e.id).endRight=r,F(b,e.endLabelRight)}return g},"insertEdgeLabel");function F(t,e){(0,l.getEffectiveHtmlLabels)((0,l.getConfig2)())&&t&&(t.style.width=9*e.length+"px",t.style.height="12px")}(0,c.__name)(F,"setTerminalWidth");var A=(0,c.__name)((t,e)=>{h.log.debug("Moving label abc88 ",t.id,t.label,v.get(t.id),e);let r=e.updatedPath?e.updatedPath:e.originalPath;const n=(0,l.getConfig2)(),{subGraphTitleTotalMargin:o}=(0,i.getSubGraphTitleMargins)(n);if(t.label){const i=v.get(t.id);let n=t.x,a=t.y;if(r){const i=s.utils_default.calcLabelPosition(r);h.log.debug("Moving label "+t.label+" from (",n,",",a,") to (",i.x,",",i.y,") abc88"),e.updatedPath&&(n=i.x,a=i.y)}i.attr("transform",`translate(${n}, ${a+o/2})`)}if(t.startLabelLeft){const e=S.get(t.id).startLeft;let i=t.x,n=t.y;if(r){const e=s.utils_default.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}if(t.startLabelRight){const e=S.get(t.id).startRight;let i=t.x,n=t.y;if(r){const e=s.utils_default.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}if(t.endLabelLeft){const e=S.get(t.id).endLeft;let i=t.x,n=t.y;if(r){const e=s.utils_default.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}if(t.endLabelRight){const e=S.get(t.id).endRight;let i=t.x,n=t.y;if(r){const e=s.utils_default.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);i=e.x,n=e.y}e.attr("transform",`translate(${i}, ${n})`)}},"positionEdgeLabel"),E=(0,c.__name)((t,e)=>{if(!t?.isLabelEdge||!t?.id?.endsWith("-to-label")||!Array.isArray(e))return e;if(2!==e.length)return e;const[r,i]=e,n=Math.abs(i.x-r.x),o=Math.abs(i.y-r.y);return n<.001||o<.001?e:o>=n?[r,{x:r.x,y:i.y},i]:[r,{x:i.x,y:r.y},i]},"orthogonalizeToLabelClippedPoints"),$=(0,c.__name)((t,e)=>{const r=t.x,i=t.y,n=Math.abs(e.x-r),o=Math.abs(e.y-i),a=t.width/2,s=t.height/2;return n>=a||o>=s},"outsideNode"),O=(0,c.__name)((t,e,r)=>{h.log.debug(`intersection calc abc89:\n outsidePoint: ${JSON.stringify(e)}\n insidePoint : ${JSON.stringify(r)}\n node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const i=t.x,n=t.y,o=Math.abs(i-r.x),a=t.width/2;let s=r.x<e.x?a-o:a+o;const l=t.height/2,c=Math.abs(e.y-r.y),u=Math.abs(e.x-r.x);if(Math.abs(n-e.y)*a>Math.abs(i-e.x)*l){let t=r.y<e.y?e.y-l-n:n-l-e.y;s=u*t/c;const i={x:r.x<e.x?r.x+s:r.x-u+s,y:r.y<e.y?r.y+c-t:r.y-c+t};return 0===s&&(i.x=e.x,i.y=e.y),0===u&&(i.x=e.x),0===c&&(i.y=e.y),h.log.debug(`abc89 top/bottom calc, Q ${c}, q ${t}, R ${u}, r ${s}`,i),i}{s=r.x<e.x?e.x-a-i:i-a-e.x;let t=c*s/u,n=r.x<e.x?r.x+u-s:r.x-u+s,o=r.y<e.y?r.y+t:r.y-t;return h.log.debug(`sides calc abc89, Q ${c}, q ${t}, R ${u}, r ${s}`,{_x:n,_y:o}),0===s&&(n=e.x,o=e.y),0===u&&(n=e.x),0===c&&(o=e.y),{x:n,y:o}}},"intersection"),D=(0,c.__name)((t,e)=>{h.log.warn("abc88 cutPathAtIntersect",t,e);let r=[],i=t[0],n=!1;return t.forEach(t=>{if(h.log.info("abc88 checking point",t,e),$(e,t)||n)h.log.warn("abc88 outside",t,i),i=t,n||r.push(t);else{const o=O(e,i,t);h.log.debug("abc88 inside",t,i,o),h.log.debug("abc88 intersection",o,e);let a=!1;r.forEach(t=>{a=a||t.x===o.x&&t.y===o.y}),r.some(t=>t.x===o.x&&t.y===o.y)?h.log.warn("abc88 no intersect",o,r):r.push(o),n=!0}}),h.log.debug("returning points",r),r},"cutPathAtIntersect");function I(t){const e=[],r=[];for(let i=1;i<t.length-1;i++){const n=t[i-1],o=t[i],a=t[i+1];(n.x===o.x&&o.y===a.y&&Math.abs(o.x-a.x)>5&&Math.abs(o.y-n.y)>5||n.y===o.y&&o.x===a.x&&Math.abs(o.x-n.x)>5&&Math.abs(o.y-a.y)>5)&&(e.push(o),r.push(i))}return{cornerPoints:e,cornerPointPositions:r}}(0,c.__name)(I,"extractCornerPoints");var N=(0,c.__name)(function(t,e,r){const i=e.x-t.x,n=e.y-t.y,o=r/Math.sqrt(i*i+n*n);return{x:e.x-o*i,y:e.y-o*n}},"findAdjacentPoint"),P=(0,c.__name)(function(t){const{cornerPointPositions:e}=I(t),r=[];for(let i=0;i<t.length;i++)if(e.includes(i)){const e=t[i-1],n=t[i+1],o=t[i],a=N(e,o,5),s=N(n,o,5),l=s.x-a.x,c=s.y-a.y;r.push(a);const u=2*Math.sqrt(2);let d={x:o.x,y:o.y};if(Math.abs(n.x-e.x)>10&&Math.abs(n.y-e.y)>=10){h.log.debug("Corner point fixing",Math.abs(n.x-e.x),Math.abs(n.y-e.y));const t=5;d=o.x===a.x?{x:l<0?a.x-t+u:a.x+t-u,y:c<0?a.y-u:a.y+u}:{x:l<0?a.x-u:a.x+u,y:c<0?a.y-t+u:a.y+t-u}}else h.log.debug("Corner point skipping fixing",Math.abs(n.x-e.x),Math.abs(n.y-e.y));r.push(d,s)}else r.push(t[i]);return r},"fixCorners"),q=(0,c.__name)((t,e,r)=>{const i=t-e-r,n=Math.floor(i/4),o=Number.isFinite(n)?Math.max(0,n):0;return`0 ${e} ${Array(o).fill("2 2").join(" ")} ${r}`},"generateDashArray"),z=(0,c.__name)(function(t,e,r,i,n,a,c,f=!1){if(!c)throw new Error(`insertEdge: missing diagramId for edge "${e.id}" — edge IDs require a diagram prefix for uniqueness`);const{handDrawnSeed:p,layout:m}=(0,l.getConfig2)();let y=e.points,C=!1;const _=n;var k=a;const v=[];for(const t in e.cssCompiledStyles)(0,o.isLabelStyle)(t)||v.push(e.cssCompiledStyles[t]);if("swimlane"===m){if(k.intersect&&_.intersect&&Array.isArray(y)&&y.length>=2)if(2===y.length)y=[_.intersect(y[0]),k.intersect(y[1])];else{const t=y.slice(1,-1),e=t[0],r=t[t.length-1],i=.5,n=Math.abs(y[y.length-1].x-r.x)<i&&Math.abs(y[y.length-1].y-r.y)<i,o=_.intersect(e),a=n?r:k.intersect(r),s=Math.abs(a.x-r.x)<i&&Math.abs(a.y-r.y)<i?[]:[a];y=[...Math.abs(o.x-e.x)<i&&Math.abs(o.y-e.y)<i?[]:[o],...t,...s]}y=E(e,y)}else k.intersect&&_.intersect&&!f&&(y=y.slice(1,e.points.length-1),y.unshift(_.intersect(y[0])),y.push(k.intersect(y[y.length-1])));const S=btoa(JSON.stringify(y));e.toCluster&&(h.log.info("to cluster abc88",r.get(e.toCluster)),y=D(e.points,r.get(e.toCluster).node),C=!0),e.fromCluster&&(h.log.debug("from cluster abc88",r.get(e.fromCluster),JSON.stringify(y,null,2)),y=D(y.reverse(),r.get(e.fromCluster).node).reverse(),C=!0);let T=y.filter(t=>!Number.isNaN(t.y));const B=w(e.curve);"rounded"!==B&&(T=P(T));let M=u.curveLinear;switch(B){case"linear":case"rounded":M=u.curveLinear;break;case"basis":default:M=u.curveBasis;break;case"cardinal":M=u.curveCardinal;break;case"bumpX":M=u.curveBumpX;break;case"bumpY":M=u.curveBumpY;break;case"catmullRom":M=u.curveCatmullRom;break;case"monotoneX":M=u.curveMonotoneX;break;case"monotoneY":M=u.curveMonotoneY;break;case"natural":M=u.curveNatural;break;case"step":M=u.curveStep;break;case"stepAfter":M=u.curveStepAfter;break;case"stepBefore":M=u.curveStepBefore}const{x:L,y:F}=b(e),A=(0,u.line)().x(L).y(F).curve(M);let $,O;switch(e.thickness){case"normal":default:$="edge-thickness-normal";break;case"thick":$="edge-thickness-thick";break;case"invisible":$="edge-thickness-invisible"}switch(e.pattern){case"solid":default:$+=" edge-pattern-solid";break;case"dotted":$+=" edge-pattern-dotted";break;case"dashed":$+=" edge-pattern-dashed"}let I="rounded"===B?R(W(T,e),5):A(T);const N=Array.isArray(e.style)?e.style:[e.style];let z=N.find(t=>t?.startsWith("stroke:")),j="";e.animate&&(j="edge-animation-fast"),e.animation&&(j="edge-animation-"+e.animation);let H=!1;if("handDrawn"===e.look){const r=d.default.svg(t);Object.assign([],T);const i=r.path(I,{roughness:.3,seed:p});$+=" transition",O=(0,u.select)(i).select("path").attr("id",`${c}-${e.id}`).attr("class"," "+$+(e.classes?" "+e.classes:"")+(j?" "+j:"")).attr("style",N?N.reduce((t,e)=>t+";"+e,""):"");let n=O.attr("d");O.attr("d",n),t.node().appendChild(O.node())}else{const r=v.join(";"),i=N?N.reduce((t,e)=>t+e+";",""):"",n=(r?r+";"+i+";":i)+";"+(N?N.reduce((t,e)=>t+";"+e,""):"");O=t.append("path").attr("d",I).attr("id",`${c}-${e.id}`).attr("class"," "+$+(e.classes?" "+e.classes:"")+(j?" "+j:"")).attr("style",n),z=n.match(/stroke:([^;]+)/)?.[1],H=!0===e.animate||!!e.animation||r.includes("animation");const o=O.node(),a="function"==typeof o.getTotalLength?o.getTotalLength():0,s=g[e.arrowTypeStart]||0,l=g[e.arrowTypeEnd]||0;if("neo"===e.look&&!H){const t=`stroke-dasharray: ${"dotted"===e.pattern||"dashed"===e.pattern?q(a,s,l):`0 ${s} ${a-s-l} ${l}`}; stroke-dashoffset: 0;`;O.attr("style",t+O.attr("style"))}}O.attr("data-edge",!0),O.attr("data-et","edge"),O.attr("data-id",e.id),O.attr("data-points",S),O.attr("data-look",(0,s.handleUndefinedAttr)(e.look)),e.showPoints&&T.forEach(e=>{t.append("circle").style("stroke","red").style("fill","red").attr("r",1).attr("cx",e.x).attr("cy",e.y)});let U="";((0,l.getConfig2)().flowchart.arrowMarkerAbsolute||(0,l.getConfig2)().state.arrowMarkerAbsolute)&&(U=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,U=U.replace(/\(/g,"\\(").replace(/\)/g,"\\)")),h.log.info("arrowTypeStart",e.arrowTypeStart),h.log.info("arrowTypeEnd",e.arrowTypeEnd),x(O,e,U,c,i,!H&&"neo"===e?.look,z);const Y=y[Math.floor(y.length/2)];s.utils_default.isLabelCoordinateInPath(Y,O.attr("d"))||(C=!0);let G={};return C&&(G.updatedPath=y),G.originalPath=e.points,G},"insertEdge");function R(t,e){if(t.length<2)return"";let r="";const i=t.length,n=1e-5;for(let o=0;o<i;o++){const a=t[o],s=t[o-1],l=t[o+1];if(0===o)r+=`M${a.x},${a.y}`;else if(o===i-1)r+=`L${a.x},${a.y}`;else{const t=a.x-s.x,i=a.y-s.y,o=l.x-a.x,h=l.y-a.y,c=Math.hypot(t,i),u=Math.hypot(o,h);if(c<n||u<n){r+=`L${a.x},${a.y}`;continue}const d=t/c,f=i/c,p=o/u,g=h/u,m=d*p+f*g,y=Math.max(-1,Math.min(1,m)),b=Math.acos(y);if(b<n||Math.abs(Math.PI-b)<n){r+=`L${a.x},${a.y}`;continue}const x=Math.min(e/Math.sin(b/2),c/2,u/2),C=a.x-d*x,_=a.y-f*x,k=a.x+p*x,w=a.y+g*x;r+=`L${C},${_}`,r+=`Q${a.x},${a.y} ${k},${w}`}}return r}function j(t,e){if(!t||!e)return{angle:0,deltaX:0,deltaY:0};const r=e.x-t.x,i=e.y-t.y;return{angle:Math.atan2(i,r),deltaX:r,deltaY:i}}function W(t,e){const r=t.map(t=>({...t}));if(t.length>=2&&p[e.arrowTypeStart]){const i=p[e.arrowTypeStart],n=t[0],o=t[1],{angle:a}=j(n,o),s=i*Math.cos(a),l=i*Math.sin(a);r[0].x=n.x+s,r[0].y=n.y+l}const i=t.length;if(i>=2&&p[e.arrowTypeEnd]){const n=p[e.arrowTypeEnd],o=t[i-1],a=t[i-2],{angle:s}=j(a,o),l=n*Math.cos(s),h=n*Math.sin(s);r[i-1].x=o.x-l,r[i-1].y=o.y-h}return r}(0,c.__name)(R,"generateRoundedPath"),(0,c.__name)(j,"calculateDeltaAndAngle"),(0,c.__name)(W,"applyMarkerOffsetsToPoints");var H=(0,c.__name)((t,e,r,i)=>{e.forEach(e=>{ut[e](t,r,i)})},"insertMarkers"),U=(0,c.__name)((t,e,r)=>{h.log.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionStart").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),t.append("marker").attr("id",r+"_"+e+"-extensionStart-margin").attr("class","marker extension "+e).attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,7 18,13 18,1").style("stroke-width",2).style("stroke-dasharray","0"),t.append("defs").append("marker").attr("id",r+"_"+e+"-extensionEnd-margin").attr("class","marker extension "+e).attr("refX",9).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("viewBox","0 0 20 14").append("polygon").attr("points","10,1 10,13 18,7").style("stroke-width",2).style("stroke-dasharray","0")},"extension"),Y=(0,c.__name)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart").attr("class","marker composition "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionStart-margin").attr("class","marker composition "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("viewBox","0 0 15 15").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-compositionEnd-margin").attr("class","marker composition "+e).attr("refX",3.5).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"composition"),G=(0,c.__name)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",18).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationStart-margin").attr("class","marker aggregation "+e).attr("refX",15).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-aggregationEnd-margin").attr("class","marker aggregation "+e).attr("refX",1).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",2).attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},"aggregation"),V=(0,c.__name)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",6).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",13).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyStart-margin").attr("class","marker dependency "+e).attr("refX",4).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-dependencyEnd-margin").attr("class","marker dependency "+e).attr("refX",16).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").style("stroke-width",0).attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},"dependency"),X=(0,c.__name)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopStart-margin").attr("class","marker lollipop "+e).attr("refX",13).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2),t.append("defs").append("marker").attr("id",r+"_"+e+"-lollipopEnd-margin").attr("class","marker lollipop "+e).attr("refX",1).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("circle").attr("fill","transparent").attr("cx",7).attr("cy",7).attr("r",6).attr("stroke-width",2)},"lollipop"),Z=(0,c.__name)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",4.5).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",8).attr("markerHeight",8).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",11.5).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",10.5).attr("markerHeight",14).attr("orient","auto").append("path").attr("d","M 0 0 L 11.5 7 L 0 14 z").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-pointStart-margin").attr("class","marker "+e).attr("viewBox","0 0 11.5 14").attr("refX",1).attr("refY",7).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11.5).attr("markerHeight",14).attr("orient","auto").append("polygon").attr("points","0,7 11.5,14 11.5,0").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"point"),Q=(0,c.__name)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleEnd-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refY",5).attr("refX",12.25).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-circleStart-margin").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-2).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",14).attr("markerHeight",14).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",0).style("stroke-dasharray","1,0")},"circle"),K=(0,c.__name)((t,e,r)=>{t.append("marker").attr("id",r+"_"+e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",r+"_"+e+"-crossEnd-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",17.7).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5),t.append("marker").attr("id",r+"_"+e+"-crossStart-margin").attr("class","marker cross "+e).attr("viewBox","0 0 15 15").attr("refX",-3.5).attr("refY",7.5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 1,1 L 14,14 M 1,14 L 14,1").attr("class","arrowMarkerPath").style("stroke-width",2.5).style("stroke-dasharray","1,0")},"cross"),J=(0,c.__name)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},"barb"),tt=(0,c.__name)((t,e,r)=>{const i=(0,l.getConfig)(),{themeVariables:n}=i,{transitionColor:o}=n;t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z"),t.append("defs").append("marker").attr("id",r+"_"+e+"-barbEnd-margin").attr("refX",17).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M 19,7 L11,14 L13,7 L11,0 Z").attr("fill",`${o}`)},"barbNeo"),et=(0,c.__name)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("d","M3,0 L3,18 M9,0 L9,18")},"only_one"),rt=(0,c.__name)((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),i.append("path").attr("d","M9,0 L9,18");const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("d","M21,0 L21,18")},"zero_or_one"),it=(0,c.__name)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18")},"one_or_more"),nt=(0,c.__name)((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");i.append("circle").attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),i.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18");const n=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto");n.append("circle").attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},"zero_or_more"),ot=(0,c.__name)((t,e,r)=>{const i=(0,l.getConfig)(),{themeVariables:n}=i,{strokeWidth:o}=n;t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneStart").attr("class","marker onlyOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M9,0 L9,18 M15,0 L15,18").attr("stroke-width",`${o}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-onlyOneEnd").attr("class","marker onlyOne "+e).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M3,0 L3,18 M9,0 L9,18").attr("stroke-width",`${o}`)},"only_one_neo"),at=(0,c.__name)((t,e,r)=>{const i=(0,l.getConfig)(),{themeVariables:n}=i,{strokeWidth:o,mainBkg:a}=n,s=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneStart").attr("class","marker zeroOrOne "+e).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto").attr("markerUnits","userSpaceOnUse");s.append("circle").attr("fill",a??"white").attr("cx",21).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),s.append("path").attr("d","M9,0 L9,18").attr("stroke-width",`${o}`);const h=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrOneEnd").attr("class","marker zeroOrOne "+e).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("markerUnits","userSpaceOnUse").attr("orient","auto");h.append("circle").attr("fill",a??"white").attr("cx",9).attr("cy",9).attr("stroke-width",`${o}`).attr("r",6),h.append("path").attr("d","M21,0 L21,18").attr("stroke-width",`${o}`)},"zero_or_one_neo"),st=(0,c.__name)((t,e,r)=>{const i=(0,l.getConfig)(),{themeVariables:n}=i,{strokeWidth:o}=n;t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreStart").attr("class","marker oneOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("path").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27").attr("stroke-width",`${o}`),t.append("defs").append("marker").attr("id",r+"_"+e+"-oneOrMoreEnd").attr("class","marker oneOrMore "+e).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto").append("path").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18").attr("stroke-width",`${o}`)},"one_or_more_neo"),lt=(0,c.__name)((t,e,r)=>{const i=(0,l.getConfig)(),{themeVariables:n}=i,{strokeWidth:o,mainBkg:a}=n,s=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreStart").attr("class","marker zeroOrMore "+e).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("markerUnits","userSpaceOnUse").attr("orient","auto");s.append("circle").attr("fill",a??"white").attr("cx",45.5).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),s.append("path").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18").attr("stroke-width",`${o}`);const h=t.append("defs").append("marker").attr("id",r+"_"+e+"-zeroOrMoreEnd").attr("class","marker zeroOrMore "+e).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto").attr("markerUnits","userSpaceOnUse");h.append("circle").attr("fill",a??"white").attr("cx",11).attr("cy",18).attr("r",6).attr("stroke-width",`${o}`),h.append("path").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18").attr("stroke-width",`${o}`)},"zero_or_more_neo"),ht=(0,c.__name)((t,e,r)=>{t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20")},"requirement_arrow"),ct=(0,c.__name)((t,e,r)=>{const i=(0,l.getConfig)(),{themeVariables:n}=i,{strokeWidth:o}=n;t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_arrowEnd").attr("refX",20).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").attr("stroke-width",`${o}`).attr("viewBox","0 0 25 20").append("path").attr("d","M0,0\n L20,10\n M20,10\n L0,20").attr("stroke-linejoin","miter")},"requirement_arrow_neo"),ut={extension:U,composition:Y,aggregation:G,dependency:V,lollipop:X,point:Z,circle:Q,cross:K,barb:J,barbNeo:tt,only_one:et,zero_or_one:rt,one_or_more:it,zero_or_more:nt,only_one_neo:ot,zero_or_one_neo:at,one_or_more_neo:st,zero_or_more_neo:lt,requirement_arrow:ht,requirement_contains:(0,c.__name)((t,e,r)=>{const i=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").append("g");i.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),i.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),i.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10)},"requirement_contains"),requirement_arrow_neo:ct,requirement_contains_neo:(0,c.__name)((t,e,r)=>{const i=(0,l.getConfig)(),{themeVariables:n}=i,{strokeWidth:o}=n,a=t.append("defs").append("marker").attr("id",r+"_"+e+"-requirement_containsStart").attr("refX",0).attr("refY",10).attr("markerWidth",20).attr("markerHeight",20).attr("orient","auto").attr("markerUnits","userSpaceOnUse").append("g");a.append("circle").attr("cx",10).attr("cy",10).attr("r",9).attr("fill","none"),a.append("line").attr("x1",1).attr("x2",19).attr("y1",10).attr("y2",10),a.append("line").attr("y1",1).attr("y2",19).attr("x1",10).attr("x2",10),a.selectAll("*").attr("stroke-width",`${o}`)},"requirement_contains_neo")},dt=H},51752(t,e,r){r.r(e),r.d(e,{createLabel_default:()=>S,createRoundedRectPathD:()=>v,intersect_rect_default:()=>w,isValidShape:()=>Pe,labelHelper:()=>g,shapes:()=>Ne,updateNodeBounds:()=>y});var i=r(48550),n=r(77948),o=r(56350),a=r(70848),s=r(39989),l=r(27166),h=r(79456),c=r(79806),u=r(7083);async function d(t){const e=t.getElementsByTagName("img");if(!e||0===e.length)return;const r=!f(t);await Promise.all([...e].map(t=>new Promise(e=>{function i(){if(t.style.display="flex",t.style.flexDirection="column",r){const e=(0,s.getConfig2)().fontSize?(0,s.getConfig2)().fontSize:window.getComputedStyle(document.body).fontSize,r=5,[i=s.defaultConfig_default.fontSize]=(0,a.parseFontSize)(e),n=i*r+"px";t.style.minWidth=n,t.style.maxWidth=n}else t.style.width="100%";e(t)}(0,h.__name)(i,"setupImage"),setTimeout(()=>{t.complete&&i()}),t.addEventListener("error",i),t.addEventListener("load",i)})))}function f(t){return 3===t.nodeType?""!==t.textContent?.trim():1===t.nodeType&&("img"!==t.tagName.toLowerCase()&&[...t.childNodes].some(f))}(0,h.__name)(d,"configureLabelImages"),(0,h.__name)(f,"hasTextBesidesImages");var p=(0,h.__name)(async(t,e,r)=>{const i=(0,s.getConfig2)(),o=t.insert("g").attr("class",r??"node default").attr("id",e.domId||e.id),l=o.insert("g").attr("class","label").attr("style",(0,a.handleUndefinedAttr)(e.labelStyle)),h=[{text:"string"==typeof e.label?e.label:e.label?.[0]??"",cssClass:"c4-name"},{text:e.stereotype,cssClass:"c4-type"},...(e.description??[]).map(t=>({text:t,cssClass:"c4-descr"}))].filter(t=>t.text),u=e.width?Math.max(e.width-2*(e.padding??0),32):(0,s.getConfig2)().flowchart?.wrappingWidth??200,d=i.wrap?u:Number.POSITIVE_INFINITY,f=await Promise.all(h.map(async t=>{const r=l.append("g").attr("class",t.cssClass),o=await(0,n.createText)(r,(0,s.sanitizeText)((0,a.decodeEntities)(t.text??""),i),{useHtmlLabels:!1,markdown:!1,isNode:!0,width:d,style:e.labelStyle},i);return(0,c.select)(o).selectAll("tspan.text-outer-tspan").attr("text-anchor","middle"),(0,c.select)(o).selectAll("tspan.text-inner-tspan").attr("font-weight",null).attr("font-style",null),{el:r,box:r.node().getBBox()}})),p=Math.max(...f.map(({box:t})=>t.width),0);let g=0;for(const{el:t,box:e}of f)t.attr("transform",`translate(${p/2-e.x-e.width/2}, ${g-e.y})`),g+=e.height+3;const m=f.length>0?g-3:0;return l.insert("rect",":first-child"),l.attr("transform",`translate(${-p/2}, ${-m/2})`),{shapeSvg:o,bbox:l.node().getBBox(),halfPadding:(e.padding??0)/2,label:l}},"c4LabelHelper"),g=(0,h.__name)(async(t,e,r)=>{if(void 0!==e.stereotype)return p(t,e,r);let i;const o=e.useHtmlLabels||(0,s.evaluate)((0,s.getConfig2)()?.htmlLabels);i=r||"node default";const l=t.insert("g").attr("class",i).attr("id",e.domId||e.id),h=l.insert("g").attr("class","label").attr("style",(0,a.handleUndefinedAttr)(e.labelStyle));let u;u=void 0===e.label?"":"string"==typeof e.label?e.label:e.label[0];const f=!!e.icon||!!e.img,g="markdown"===e.labelType,m=await(0,n.createText)(h,(0,s.sanitizeText)((0,a.decodeEntities)(u),(0,s.getConfig2)()),{useHtmlLabels:o,width:e.width||e.wrappingWidth||(0,s.getConfig2)().flowchart?.wrappingWidth,classes:g?"markdown-node-label":"",style:e.labelStyle,addSvgBackground:f,markdown:g},(0,s.getConfig2)()),y=(e?.padding??0)/2;let b;if(o){const t=m.children[0],e=(0,c.select)(m);await d(t),b=await n.fastdom_default.measure(()=>t.getBoundingClientRect()),e.attr("width",b.width),e.attr("height",b.height)}else b=await n.fastdom_default.measure(()=>m.getBBox());return o?h.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"):h.attr("transform","translate(0, "+-b.height/2+")"),e.centerLabel&&h.attr("transform","translate("+-b.width/2+", "+-b.height/2+")"),h.insert("rect",":first-child"),{shapeSvg:l,bbox:b,halfPadding:y,label:h}},"labelHelper"),m=(0,h.__name)(async(t,e,r)=>{const i=r.useHtmlLabels??(0,s.getEffectiveHtmlLabels)((0,s.getConfig2)()),o=t.insert("g").attr("class","label").attr("style",r.labelStyle||""),l=await(0,n.createText)(o,(0,s.sanitizeText)((0,a.decodeEntities)(e),(0,s.getConfig2)()),{useHtmlLabels:i,width:r.width||(0,s.getConfig2)()?.flowchart?.wrappingWidth,style:r.labelStyle,addSvgBackground:!!r.icon||!!r.img}),h=r.padding/2;let u;if((0,s.getEffectiveHtmlLabels)((0,s.getConfig2)())){const t=l.children[0],e=(0,c.select)(l);u=await n.fastdom_default.measure(()=>t.getBoundingClientRect()),e.attr("width",u.width),e.attr("height",u.height)}else u=await n.fastdom_default.measure(()=>l.getBBox());return i?o.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"):o.attr("transform","translate(0, "+-u.height/2+")"),r.centerLabel&&o.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),o.insert("rect",":first-child"),{shapeSvg:t,bbox:u,halfPadding:h,label:o}},"insertLabel"),y=(0,h.__name)((t,e,r)=>{if(r)return t.width=r.width,void(t.height=r.height);const i=e.node().getBBox();t.width=i.width,t.height=i.height},"updateNodeBounds"),b=(0,h.__name)((t,e)=>("handDrawn"===t.look?"rough-node":"node")+" "+t.cssClasses+" "+(e||""),"getNodeClasses");function x(t){const e=t.map((t,e)=>`${0===e?"M":"L"}${t.x},${t.y}`);return e.push("Z"),e.join(" ")}function C(t,e,r,i,n,o){const a=[],s=r-t,l=i-e,h=s/o,c=2*Math.PI/h,u=e+l/2;for(let e=0;e<=50;e++){const r=t+e/50*s,i=u+n*Math.sin(c*(r-t));a.push({x:r,y:i})}return a}function _(t,e,r,i,n,o){const a=[],s=n*Math.PI/180,l=(o*Math.PI/180-s)/(i-1);for(let n=0;n<i;n++){const i=s+n*l,o=t+r*Math.cos(i),h=e+r*Math.sin(i);a.push({x:-o,y:-h})}return a}function k(t){const e=Array.from(t.childNodes).filter(t=>"path"===t.tagName),r=document.createElementNS("http://www.w3.org/2000/svg","path"),i=e.map(t=>t.getAttribute("d")).filter(t=>null!==t).join(" ");r.setAttribute("d",i);const n=e.find(t=>"none"!==t.getAttribute("fill")),o=e.find(t=>"none"!==t.getAttribute("stroke")),a=(0,h.__name)((t,e)=>t?.getAttribute(e)??void 0,"getAttr");if(n){const t={fill:a(n,"fill"),"fill-opacity":a(n,"fill-opacity")??"1"};Object.entries(t).forEach(([t,e])=>{e&&r.setAttribute(t,e)})}if(o){const t={stroke:a(o,"stroke"),"stroke-width":a(o,"stroke-width")??"1","stroke-opacity":a(o,"stroke-opacity")??"1"};Object.entries(t).forEach(([t,e])=>{e&&r.setAttribute(t,e)})}const s=document.createElementNS("http://www.w3.org/2000/svg","g");return s.appendChild(r),s}(0,h.__name)(x,"createPathFromPoints"),(0,h.__name)(C,"generateFullSineWavePoints"),(0,h.__name)(_,"generateCirclePoints"),(0,h.__name)(k,"mergePaths");var w=(0,h.__name)((t,e)=>{var r,i,n=t.x,o=t.y,a=e.x-n,s=e.y-o,l=t.width/2,h=t.height/2;return Math.abs(s)*l>Math.abs(a)*h?(s<0&&(h=-h),r=0===s?0:h*a/s,i=h):(a<0&&(l=-l),r=l,i=0===a?0:l*s/a),{x:n+r,y:o+i}},"intersectRect"),v=(0,h.__name)((t,e,r,i,n)=>["M",t+n,e,"H",t+r-n,"A",n,n,0,0,1,t+r,e+n,"V",e+i-n,"A",n,n,0,0,1,t+r-n,e+i,"H",t+n,"A",n,n,0,0,1,t,e+i-n,"V",e+n,"A",n,n,0,0,1,t+n,e,"Z"].join(" "),"createRoundedRectPathD"),S=(0,h.__name)(async(t,e,r,i=!1,o=!1)=>{let a=e||"";"object"==typeof a&&(a=a[0]);const l=(0,s.getConfig2)(),h=(0,s.getEffectiveHtmlLabels)(l);return await(0,n.createText)(t,a,{style:r,isTitle:i,useHtmlLabels:h,markdown:!1,isNode:o,width:Number.POSITIVE_INFINITY},l)},"createLabel");function T(t,e){return t.intersect(e)}(0,h.__name)(T,"intersectNode");var B=T;function M(t,e,r,i){var n=t.x,o=t.y,a=n-i.x,s=o-i.y,l=Math.sqrt(e*e*s*s+r*r*a*a),h=Math.abs(e*r*a/l);i.x<n&&(h=-h);var c=Math.abs(e*r*s/l);return i.y<o&&(c=-c),{x:n+h,y:o+c}}(0,h.__name)(M,"intersectEllipse");var L=M;function F(t,e,r){return L(t,e,e,r)}(0,h.__name)(F,"intersectCircle");var A=F;function E(t,e,r,i){{const n=e.y-t.y,o=t.x-e.x,a=e.x*t.y-t.x*e.y,s=n*r.x+o*r.y+a,l=n*i.x+o*i.y+a,h=1e-6;if(0!==s&&0!==l&&$(s,l))return;const c=i.y-r.y,u=r.x-i.x,d=i.x*r.y-r.x*i.y,f=c*t.x+u*t.y+d,p=c*e.x+u*e.y+d;if(Math.abs(f)<h&&Math.abs(p)<h&&$(f,p))return;const g=n*u-c*o;if(0===g)return;const m=Math.abs(g/2);let y=o*d-u*a;const b=y<0?(y-m)/g:(y+m)/g;return y=c*a-n*d,{x:b,y:y<0?(y-m)/g:(y+m)/g}}}function $(t,e){return t*e>0}(0,h.__name)(E,"intersectLine"),(0,h.__name)($,"sameSign");var O=E;function D(t,e,r){let i=t.x,n=t.y,o=[],a=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach(function(t){a=Math.min(a,t.x),s=Math.min(s,t.y)}):(a=Math.min(a,e.x),s=Math.min(s,e.y));let l=i-t.width/2-a,h=n-t.height/2-s;for(let i=0;i<e.length;i++){let n=e[i],a=e[i<e.length-1?i+1:0],s=O(t,r,{x:l+n.x,y:h+n.y},{x:l+a.x,y:h+a.y});s&&o.push(s)}return o.length?(o.length>1&&o.sort(function(t,e){let i=t.x-r.x,n=t.y-r.y,o=Math.sqrt(i*i+n*n),a=e.x-r.x,s=e.y-r.y,l=Math.sqrt(a*a+s*s);return o<l?-1:o===l?0:1}),o[0]):t}(0,h.__name)(D,"intersectPolygon");var I={node:B,circle:A,ellipse:L,polygon:D,rect:w};function N(t,e){const{labelStyles:r}=(0,i.styles2String)(e);e.labelStyle=r;const n=b(e);let o=n;n||(o="anchor");const s=t.insert("g").attr("class",o).attr("id",e.domId||e.id),{cssStyles:h}=e,c=u.default.svg(s),d=(0,i.userNodeOverrides)(e,{fill:"black",stroke:"none",fillStyle:"solid"});"handDrawn"!==e.look&&(d.roughness=0);const f=c.circle(0,0,2,d),p=s.insert(()=>f,":first-child");return p.attr("class","anchor").attr("style",(0,a.handleUndefinedAttr)(h)),y(e,p),e.intersect=function(t){return l.log.info("Circle intersect",e,1,t),I.circle(e,1,t)},s}function P(t,e,r,i,n,o,a){const s=(t+r)/2,l=(e+i)/2,h=Math.atan2(i-e,r-t),c=(r-t)/2/n,u=(i-e)/2/o,d=Math.sqrt(c**2+u**2);if(d>1)throw new Error("The given radii are too small to create an arc between the points.");const f=Math.sqrt(1-d**2),p=s+f*o*Math.sin(h)*(a?-1:1),g=l-f*n*Math.cos(h)*(a?-1:1),m=Math.atan2((e-g)/o,(t-p)/n);let y=Math.atan2((i-g)/o,(r-p)/n)-m;a&&y<0&&(y+=2*Math.PI),!a&&y>0&&(y-=2*Math.PI);const b=[];for(let t=0;t<20;t++){const e=m+t/19*y,r=p+n*Math.cos(e),i=g+o*Math.sin(e);b.push({x:r,y:i})}return b}function q(t,e,r){const[i,n]=[e,r].sort((t,e)=>e-t);return n*(1-Math.sqrt(1-(t/i/2)**2))}async function z(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o,l=(0,h.__name)(t=>t+s,"calcTotalHeight"),c=(0,h.__name)(t=>{const e=t/2;return[e/(2.5+t/50),e]},"calcEllipseRadius"),{shapeSvg:d,bbox:f}=await g(t,e,b(e)),p=l(e?.height?e?.height:f.height),[m,C]=c(p),_=q(p,m,C),k=(e?.width?e?.width:f.width)+2*a+_-_,w=p,{cssStyles:v}=e,S=[{x:k/2,y:-w/2},{x:-k/2,y:-w/2},...P(-k/2,-w/2,-k/2,w/2,m,C,!1),{x:k/2,y:w/2},...P(k/2,w/2,k/2,-w/2,m,C,!0)],T=u.default.svg(d),B=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");const M=x(S),L=T.path(M,B),F=d.insert(()=>L,":first-child");return F.attr("class","basic label-container outer-path"),v&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",v),n&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",n),F.attr("transform",`translate(${m/2}, 0)`),y(e,F),e.intersect=function(t){return I.polygon(e,S,t)},d}async function R(t,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:o}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,label:l}=await g(t,e,b(e)),c=r?.nodeBorder??r?.lineColor??"currentColor",d=e.padding??12,f=Math.max(s.width+2*d,e.width??0,80),p=Math.max(Math.min(.08*f,12),5),m=Math.max(s.height+2*d+p,e.height??0),x=-m/2+p,C=m/2,_=.72*f,k=[`M${-f/2},${x}`,`L${-_/2},${C}`,`A${_/2},${p} 0 0 0 ${_/2},${C}`,`L${f/2},${x}`,`A${f/2},${p} 0 0 0 ${-f/2},${x}`,"Z"].join(" "),{cssStyles:w}=e,v=a.insert("g",":first-child").attr("class","basic label-container");if("handDrawn"===e.look){const t=u.default.svg(a).path(k,(0,i.userNodeOverrides)(e,{}));v.node()?.appendChild(t),w&&v.attr("style",w)}else v.append("path").attr("d",k).attr("style",o);v.append("ellipse").attr("cx",0).attr("cy",x).attr("rx",f/2).attr("ry",p).attr("style",`fill:none;stroke:${c};stroke-width:1px`),y(e,v);const S=x+(C-x)/2;l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${S-s.height/2-(s.y-(s.top??0))})`);const T=(0,h.__name)((t,e,r)=>Array.from({length:13},(i,n)=>{const o=Math.PI-n*Math.PI/12;return{x:t*Math.cos(o),y:e+r*p*Math.sin(o)}}),"arc"),B=[...T(f/2,x,-1),...T(_/2,C,1).reverse()];return e.intersect=function(t){return I.polygon(e,B,t)},a}async function j(t,e){const{themeVariables:r}=(0,s.getConfig2)(),n=r.clusterBkg,o=r.clusterBorder,{nodeStyles:l}=(0,i.styles2String)(e),{shapeSvg:h,bbox:c}=await g(t,e,b(e)),d=e.padding??8,f=c.height,p=Math.max(c.width+2*d,80,e?.width??0),m=Math.max(f+8+20+2*d,e?.height??0),x=-p/2,C=-m/2,_=h.select(".label");let k;if(_&&(e.useHtmlLabels??(0,s.getEffectiveHtmlLabels)((0,s.getConfig2)())?_.attr("transform",`translate(${-c.width/2}, ${-c.height/2-14})`):_.attr("transform",`translate(0, ${-c.height/2-14})`)),"handDrawn"===e.look){const t=u.default.svg(h),r=(0,i.userNodeOverrides)(e,{fill:n,stroke:o,fillStyle:"solid"}),s=t.path(v(x,C,p,m,8),r);k=h.insert(()=>s,":first-child"),k.attr("class","basic label-container collapsed-group").attr("style",(0,a.handleUndefinedAttr)(e.cssStyles))}else k=h.insert("rect",":first-child"),k.attr("class","basic label-container collapsed-group").attr("style",l).attr("rx",8).attr("ry",8).attr("x",x).attr("y",C).attr("width",p).attr("height",m).attr("fill",n).attr("stroke",o);const w=C+d+f+8;h.append("line").attr("class","collapsed-separator").attr("x1",x+8).attr("y1",w).attr("x2",x+p-8).attr("y2",w).attr("stroke",o).attr("stroke-dasharray","3, 3");const S=w+10;for(let t=-1;t<=1;t++)h.append("circle").attr("class","collapsed-indicator").attr("cx",10*t).attr("cy",S).attr("r",2.5).attr("fill",o);return y(e,k),e.calcIntersect=function(t,e){return I.rect(t,e)},e.intersect=function(t){return I.rect(e,t)},h}function W(t,e,r,i){return t.insert("polygon",":first-child").attr("points",i.map(function(t){return t.x+","+t.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}(0,h.__name)(N,"anchor"),(0,h.__name)(P,"generateArcPoints"),(0,h.__name)(q,"calculateArcSagitta"),(0,h.__name)(z,"bowTieRect"),(0,h.__name)(R,"bucket"),(0,h.__name)(j,"collapsedGroup"),(0,h.__name)(W,"insertPolygonShape");var H=["right","left","up","down"],U="point",Y=(0,h.__name)(t=>{const e=new Set;for(const r of t)switch(r){case"x":e.add("right"),e.add("left");break;case"y":e.add("up"),e.add("down");break;default:e.add(r)}return e},"expandAndDeduplicateDirections"),G=(0,h.__name)(t=>H.filter(e=>t.has(e)).join("|")||U,"getDirectionKey"),V={"right|left|up|down":(0,h.__name)(({height:t,midpoint:e,padding:r,width:i})=>[{x:0,y:0},{x:e,y:0},{x:i/2,y:2*r},{x:i-e,y:0},{x:i,y:0},{x:i,y:-t/3},{x:i+2*r,y:-t/2},{x:i,y:-2*t/3},{x:i,y:-t},{x:i-e,y:-t},{x:i/2,y:-t-2*r},{x:e,y:-t},{x:0,y:-t},{x:0,y:-2*t/3},{x:-2*r,y:-t/2},{x:0,y:-t/3}],"right|left|up|down"),"right|left|up":(0,h.__name)(({height:t,midpoint:e,width:r})=>[{x:e,y:0},{x:r-e,y:0},{x:r,y:-t/2},{x:r-e,y:-t},{x:e,y:-t},{x:0,y:-t/2}],"right|left|up"),"right|left|down":(0,h.__name)(({height:t,midpoint:e,width:r})=>[{x:0,y:0},{x:e,y:-t},{x:r-e,y:-t},{x:r,y:0}],"right|left|down"),"right|up|down":(0,h.__name)(({height:t,midpoint:e,width:r})=>[{x:0,y:0},{x:r,y:-e},{x:r,y:-t+e},{x:0,y:-t}],"right|up|down"),"left|up|down":(0,h.__name)(({height:t,midpoint:e,width:r})=>[{x:r,y:0},{x:0,y:-e},{x:0,y:-t+e},{x:r,y:-t}],"left|up|down"),"right|left":(0,h.__name)(({height:t,midpoint:e,padding:r,width:i})=>[{x:e,y:0},{x:e,y:-r},{x:i-e,y:-r},{x:i-e,y:0},{x:i,y:-t/2},{x:i-e,y:-t},{x:i-e,y:-t+r},{x:e,y:-t+r},{x:e,y:-t},{x:0,y:-t/2}],"right|left"),"up|down":(0,h.__name)(({height:t,midpoint:e,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:e,y:-r},{x:e,y:-t+r},{x:0,y:-t+r},{x:i/2,y:-t},{x:i,y:-t+r},{x:i-e,y:-t+r},{x:i-e,y:-r},{x:i,y:-r}],"up|down"),"right|up":(0,h.__name)(({height:t,midpoint:e,width:r})=>[{x:0,y:0},{x:r,y:-e},{x:0,y:-t}],"right|up"),"right|down":(0,h.__name)(({height:t,width:e})=>[{x:0,y:0},{x:e,y:0},{x:0,y:-t}],"right|down"),"left|up":(0,h.__name)(({height:t,midpoint:e,width:r})=>[{x:r,y:0},{x:0,y:-e},{x:r,y:-t}],"left|up"),"left|down":(0,h.__name)(({height:t,width:e})=>[{x:e,y:0},{x:0,y:0},{x:e,y:-t}],"left|down"),right:(0,h.__name)(({height:t,midpoint:e,padding:r,width:i})=>[{x:e,y:-r},{x:e,y:-r},{x:i-e,y:-r},{x:i-e,y:0},{x:i,y:-t/2},{x:i-e,y:-t},{x:i-e,y:-t+r},{x:e,y:-t+r},{x:e,y:-t+r}],"right"),left:(0,h.__name)(({height:t,midpoint:e,padding:r,width:i})=>[{x:e,y:0},{x:e,y:-r},{x:i-e,y:-r},{x:i-e,y:-t+r},{x:e,y:-t+r},{x:e,y:-t},{x:0,y:-t/2}],"left"),up:(0,h.__name)(({height:t,midpoint:e,padding:r,width:i})=>[{x:e,y:-r},{x:e,y:-t+r},{x:0,y:-t+r},{x:i/2,y:-t},{x:i,y:-t+r},{x:i-e,y:-t+r},{x:i-e,y:-r}],"up"),down:(0,h.__name)(({height:t,midpoint:e,padding:r,width:i})=>[{x:i/2,y:0},{x:0,y:-r},{x:e,y:-r},{x:e,y:-t+r},{x:i-e,y:-t+r},{x:i-e,y:-r},{x:i,y:-r}],"down"),[U]:()=>[{x:0,y:0}]},X=(0,h.__name)((t,e,r,i)=>{const n=Y(t),o=(r.padding??0)/2,a=e.height+4*o,s=a/2,l=i??e.width+2*s+2*o,h=G(n);return(V[h]??V[U])({height:a,midpoint:s,padding:o,width:l})},"getArrowPoints");async function Z(t,e){const r=e,{shapeSvg:i,bbox:n}=await g(t,r,b(r)),o=r.padding??0,a=n.height+2*o,s=a/2,l=n.width+2*s+o,h=r.width??0,c=r.positioned&&(r.widthInColumns??1)>1&&h>l?h:l,u=X(r.directions??[],n,r,c),d=W(i,c,a,u);return d.attr("style",r.style??null),y(r,d),r.intersect=function(t){return I.polygon(r,u,t)},i}async function Q(t,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:o}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,label:l}=await g(t,e,b(e)),h=r?.nodeBorder??r?.lineColor??"currentColor",c=e.padding??12,d=Math.max(s.width+2*c,e.width??0,90),f=Math.max(s.height+2*c+18,e.height??0),p=-f/2,{cssStyles:m}=e,x=a.insert("g",":first-child").attr("class","basic label-container");if("handDrawn"===e.look){const t=u.default.svg(a).path(v(-d/2,p,d,f,12),(0,i.userNodeOverrides)(e,{}));x.node()?.appendChild(t),m&&x.attr("style",m)}else x.append("rect").attr("x",-d/2).attr("y",p).attr("width",d).attr("height",f).attr("rx",12).attr("ry",12).attr("style",o);x.append("line").attr("x1",-d/2).attr("y1",p+18).attr("x2",d/2).attr("y2",p+18).attr("style",`stroke:${h};stroke-width:1px`);for(let t=0;t<3;t++)x.append("circle").attr("cx",-d/2+12+9*t).attr("cy",p+9).attr("r",2.5).attr("style",`fill:${h};stroke:none`);x.append("rect").attr("class","browser-address-bar").attr("x",-d/2+44).attr("y",p+4).attr("width",Math.max(d-56,10)).attr("height",10).attr("rx",3).attr("ry",3).attr("style",`fill:none;stroke:${h};stroke-width:1px;opacity:0.6`),y(e,x);const C=p+18+(f-18)/2;return l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${C-s.height/2-(s.y-(s.top??0))})`),e.intersect=function(t){return I.rect(e,t)},a}async function K(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?28:o,s="neo"===e.look?24:o,{shapeSvg:l,bbox:h}=await g(t,e,b(e)),c=(e?.width??h.width)+("neo"===e.look?2*a:a+12),d=(e?.height??h.height)+("neo"===e.look?2*s:s),f=-d,p=[{x:12,y:f},{x:c,y:f},{x:c,y:0},{x:0,y:0},{x:0,y:f+12},{x:12,y:f}];let m;const{cssStyles:C}=e;if("handDrawn"===e.look){const t=u.default.svg(l),r=(0,i.userNodeOverrides)(e,{}),n=x(p),o=t.path(n,r);m=l.insert(()=>o,":first-child").attr("transform",`translate(${-c/2}, ${d/2})`),C&&m.attr("style",C)}else m=W(l,c,d,p);return n&&m.attr("style",n),y(e,m),e.intersect=function(t){return I.polygon(e,p,t)},l}function J(t,e){const{nodeStyles:r}=(0,i.styles2String)(e);e.label="";const n=t.insert("g").attr("class",b(e)).attr("id",e.domId??e.id),{cssStyles:o}=e,a=Math.max(28,e.width??0),s=[{x:0,y:a/2},{x:a/2,y:0},{x:0,y:-a/2},{x:-a/2,y:0}],l=u.default.svg(n),h=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(h.roughness=0,h.fillStyle="solid");const c=x(s),d=l.path(c,h),f=n.insert(()=>d,":first-child");return o&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",o),r&&"handDrawn"!==e.look&&f.selectAll("path").attr("style",r),e.width=28,e.height=28,e.intersect=function(t){return I.polygon(e,s,t)},n}async function tt(t,e,r){const{labelStyles:n,nodeStyles:o}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:s,bbox:h,halfPadding:c}=await g(t,e,b(e)),d=r?.padding??c,f="neo"===e.look?h.width/2+32:h.width/2+d;let p;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=u.default.svg(s),r=(0,i.userNodeOverrides)(e,{}),n=t.circle(0,0,2*f,r);p=s.insert(()=>n,":first-child"),p.attr("class","basic label-container").attr("style",(0,a.handleUndefinedAttr)(m))}else p=s.insert("circle",":first-child").attr("class","basic label-container").attr("style",o).attr("r",f).attr("cx",0).attr("cy",0);return y(e,p),e.calcIntersect=function(t,e){const r=t.width/2;return I.circle(t,r,e)},e.intersect=function(t){return l.log.info("Circle intersect",e,f,t),I.circle(e,f,t)},s}async function et(t,e){const r=e,i=["node",r.cssClasses,r.class].filter(Boolean).join(" "),{shapeSvg:n,bbox:o,halfPadding:a}=await g(t,r,i),s=n.insert("rect",":first-child"),l=r.padding??0,h=r.positioned?r.width??0:o.width+l,c=r.positioned?r.height??0:o.height+l,u=r.positioned?-h/2:-o.width/2-a,d=r.positioned?-c/2:-o.height/2-a;return s.attr("class","basic cluster composite label-container").attr("style",r.style??null).attr("rx",r.rx??null).attr("ry",r.ry??null).attr("x",u).attr("y",d).attr("width",h).attr("height",c),y(r,s),r.intersect=function(t){return I.rect(r,t)},n}async function rt(t,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:o}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:a,bbox:s,label:l}=await g(t,e,b(e)),h=r?.nodeBorder??r?.lineColor??"currentColor",c=e.padding??12,d=Math.max(s.width+2*c,e.width??0,90),f=Math.max(s.height+2*c+20,e.height??0),p=-f/2,{cssStyles:m}=e,x=a.insert("g",":first-child").attr("class","basic label-container");if("handDrawn"===e.look){const t=u.default.svg(a).path(v(-d/2,p,d,f,12),(0,i.userNodeOverrides)(e,{}));x.node()?.appendChild(t),m&&x.attr("style",m)}else x.append("rect").attr("x",-d/2).attr("y",p).attr("width",d).attr("height",f).attr("rx",12).attr("ry",12).attr("style",o);x.append("text").attr("x",-d/2+12).attr("y",p+16).attr("class","console-glyph").attr("style",`font-family:monospace;font-weight:bold;font-size:14px;fill:${h}`).text(">_"),y(e,x);const C=p+20+(f-20)/2;return l.attr("transform",`translate(${-s.width/2-(s.x-(s.left??0))}, ${C-s.height/2-(s.y-(s.top??0))})`),e.intersect=function(t){return I.rect(e,t)},a}function it(t){const e=Math.cos(Math.PI/4),r=Math.sin(Math.PI/4),i=2*t;return`M ${-i/2*e},${i/2*r} L ${i/2*e},${-i/2*r}\n M ${i/2*e},${i/2*r} L ${-i/2*e},${-i/2*r}`}function nt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r,e.label="";const o=t.insert("g").attr("class",b(e)).attr("id",e.domId??e.id),a=Math.max(30,e?.width??0),{cssStyles:s}=e,h=u.default.svg(o),c=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(c.roughness=0,c.fillStyle="solid");const d=h.circle(0,0,2*a,c),f=it(a),p=h.path(f,c),g=o.insert(()=>d,":first-child");return g.insert(()=>p),g.attr("class","outer-path"),s&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",s),n&&"handDrawn"!==e.look&&g.selectAll("path").attr("style",n),y(e,g),e.intersect=function(t){return l.log.info("crossedCircle intersect",e,{radius:a,point:t}),I.circle(e,a,t)},o}function ot(t,e,r,i=100,n=0,o=180){const a=[],s=n*Math.PI/180,l=(o*Math.PI/180-s)/(i-1);for(let n=0;n<i;n++){const i=s+n*l,o=t+r*Math.cos(i),h=e+r*Math.sin(i);a.push({x:-o,y:-h})}return a}async function at(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,label:s}=await g(t,e,b(e)),l="neo"===e.look?18:e.padding??0,h="neo"===e.look?12:e.padding??0,c=a.width+l,d=a.height+h,f=Math.max(5,.1*d),{cssStyles:p}=e,m=[...ot(c/2,-d/2,f,30,-90,0),{x:-c/2-f,y:f},...ot(c/2+2*f,-f,f,20,-180,-270),...ot(c/2+2*f,f,f,20,-90,-180),{x:-c/2-f,y:-d/2},...ot(c/2,d/2,f,20,0,90)],C=[{x:c/2,y:-d/2-f},{x:-c/2,y:-d/2-f},...ot(c/2,-d/2,f,20,-90,0),{x:-c/2-f,y:-f},...ot(c/2+.1*c,-f,f,20,-180,-270),...ot(c/2+.1*c,f,f,20,-90,-180),{x:-c/2-f,y:d/2},...ot(c/2,d/2,f,20,0,90),{x:-c/2,y:d/2+f},{x:c/2,y:d/2+f}],_=u.default.svg(o),k=(0,i.userNodeOverrides)(e,{fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=x(m).replace("Z",""),v=_.path(w,k),S=x(C),T=_.path(S,{...k}),B=o.insert("g",":first-child");return B.insert(()=>T,":first-child").attr("stroke-opacity",0),B.insert(()=>v,":first-child"),B.attr("class","text"),p&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",p),n&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",n),B.attr("transform",`translate(${f}, 0)`),s.attr("transform",`translate(${-c/2+f-(a.x-(a.left??0))},${-d/2+(e.padding??0)/2-(a.y-(a.top??0))})`),y(e,B),e.intersect=function(t){return I.polygon(e,C,t)},o}function st(t,e,r,i=100,n=0,o=180){const a=[],s=n*Math.PI/180,l=(o*Math.PI/180-s)/(i-1);for(let n=0;n<i;n++){const i=s+n*l,o=t+r*Math.cos(i),h=e+r*Math.sin(i);a.push({x:o,y:h})}return a}async function lt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,label:s}=await g(t,e,b(e)),l="neo"===e.look?18:e.padding??0,h="neo"===e.look?12:e.padding??0,c=a.width+("neo"===e.look?2*l:l),d=a.height+("neo"===e.look?2*h:h),f=Math.max(5,.1*d),{cssStyles:p}=e,m=[...st(c/2,-d/2,f,20,-90,0),{x:c/2+f,y:-f},...st(c/2+2*f,-f,f,20,-180,-270),...st(c/2+2*f,f,f,20,-90,-180),{x:c/2+f,y:d/2},...st(c/2,d/2,f,20,0,90)],C=[{x:-c/2,y:-d/2-f},{x:c/2,y:-d/2-f},...st(c/2,-d/2,f,20,-90,0),{x:c/2+f,y:-f},...st(c/2+2*f,-f,f,20,-180,-270),...st(c/2+2*f,f,f,20,-90,-180),{x:c/2+f,y:d/2},...st(c/2,d/2,f,20,0,90),{x:c/2,y:d/2+f},{x:-c/2,y:d/2+f}],_=u.default.svg(o),k=(0,i.userNodeOverrides)(e,{fill:"none"});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=x(m).replace("Z",""),v=_.path(w,k),S=x(C),T=_.path(S,{...k}),B=o.insert("g",":first-child");return B.insert(()=>T,":first-child").attr("stroke-opacity",0),B.insert(()=>v,":first-child"),B.attr("class","text"),p&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",p),n&&"handDrawn"!==e.look&&B.selectAll("path").attr("style",n),B.attr("transform",`translate(${-f}, 0)`),s.attr("transform",`translate(${-c/2+(e.padding??0)/2-(a.x-(a.left??0))},${-d/2+(e.padding??0)/2-(a.y-(a.top??0))})`),y(e,B),e.intersect=function(t){return I.polygon(e,C,t)},o}function ht(t,e,r,i=100,n=0,o=180){const a=[],s=n*Math.PI/180,l=(o*Math.PI/180-s)/(i-1);for(let n=0;n<i;n++){const i=s+n*l,o=t+r*Math.cos(i),h=e+r*Math.sin(i);a.push({x:-o,y:-h})}return a}async function ct(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,label:s}=await g(t,e,b(e)),l="neo"===e.look?18:e.padding??0,h="neo"===e.look?12:e.padding??0,c=a.width+("neo"===e.look?2*l:l),d=a.height+("neo"===e.look?2*h:h),f=Math.max(5,.1*d),{cssStyles:p}=e,m=[...ht(c/2,-d/2,f,30,-90,0),{x:-c/2-f,y:f},...ht(c/2+2*f,-f,f,20,-180,-270),...ht(c/2+2*f,f,f,20,-90,-180),{x:-c/2-f,y:-d/2},...ht(c/2,d/2,f,20,0,90)],C=[...ht(-c/2+f+f/2,-d/2,f,20,-90,-180),{x:c/2-f/2,y:f},...ht(-c/2-f/2,-f,f,20,0,90),...ht(-c/2-f/2,f,f,20,-90,0),{x:c/2-f/2,y:-f},...ht(-c/2+f+f/2,d/2,f,30,-180,-270)],_=[{x:c/2,y:-d/2-f},{x:-c/2,y:-d/2-f},...ht(c/2,-d/2,f,20,-90,0),{x:-c/2-f,y:-f},...ht(c/2+2*f,-f,f,20,-180,-270),...ht(c/2+2*f,f,f,20,-90,-180),{x:-c/2-f,y:d/2},...ht(c/2,d/2,f,20,0,90),{x:-c/2,y:d/2+f},{x:c/2-f-f/2,y:d/2+f},...ht(-c/2+f+f/2,-d/2,f,20,-90,-180),{x:c/2-f/2,y:f},...ht(-c/2-f/2,-f,f,20,0,90),...ht(-c/2-f/2,f,f,20,-90,0),{x:c/2-f/2,y:-f},...ht(-c/2+f+f/2,d/2,f,30,-180,-270)],k=u.default.svg(o),w=(0,i.userNodeOverrides)(e,{fill:"none"});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const v=x(m).replace("Z",""),S=k.path(v,w),T=x(C).replace("Z",""),B=k.path(T,w),M=x(_),L=k.path(M,{...w}),F=o.insert("g",":first-child");return F.insert(()=>L,":first-child").attr("stroke-opacity",0),F.insert(()=>S,":first-child"),F.insert(()=>B,":first-child"),F.attr("class","text"),p&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",p),n&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",n),F.attr("transform",`translate(${f-f/4}, 0)`),s.attr("transform",`translate(${-c/2+(e.padding??0)/2-(a.x-(a.left??0))},${-d/2+(e.padding??0)/2-(a.y-(a.top??0))})`),y(e,F),e.intersect=function(t){return I.polygon(e,_,t)},o}async function ut(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o,{shapeSvg:l,bbox:h}=await g(t,e,b(e)),c=Math.max(20,1.25*(h.width+2*a),e?.width??0),d=Math.max(5,h.height+2*s,e?.height??0),f=d/2,{cssStyles:p}=e,m=u.default.svg(l),C=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const k=c-f,w=d/4,v=[{x:k,y:0},{x:w,y:0},{x:0,y:d/2},{x:w,y:d},{x:k,y:d},..._(-k,-d/2,f,50,270,90)],S=x(v),T=m.path(S,C),B=l.insert(()=>T,":first-child");return B.attr("class","basic label-container outer-path"),p&&"handDrawn"!==e.look&&B.selectChildren("path").attr("style",p),n&&"handDrawn"!==e.look&&B.selectChildren("path").attr("style",n),B.attr("transform",`translate(${-c/2}, ${-d/2})`),y(e,B),e.intersect=function(t){return I.polygon(e,v,t)},l}async function dt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,label:s}=await g(t,e,b(e)),l=e.padding??20,h=Math.max(a.width+2*l,e.width??0,100),c=Math.min(Math.max(.23*h,16),56),d=.27*c,f=Math.max(a.height+2*l,e.height?e.height-(2*c-d):0),p=Math.min(.177*h,.45*f),m=f+2*c-d,x=-m/2,C=x+2*c-d,k=o.insert("g",":first-child").attr("class","basic label-container"),{cssStyles:w}=e;if("handDrawn"===e.look){const t=u.default.svg(o),r=(0,i.userNodeOverrides)(e,{}),n=t.path(v(-h/2,C,h,f,p),r),a=t.circle(0,x+c,2*c,r);k.insert(()=>a,":first-child"),k.insert(()=>n,":first-child"),w&&k.attr("style",w)}else k.append("rect").attr("x",-h/2).attr("y",C).attr("width",h).attr("height",f).attr("rx",p).attr("ry",p).attr("style",n),k.append("circle").attr("cx",0).attr("cy",x+c).attr("r",c).attr("style",n);y(e,k);const S=C+f/2;s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${S-a.height/2-(a.y-(a.top??0))})`);const T=x+c,B=180*Math.asin(Math.min(1,(C-T)/c))/Math.PI,M=[..._(0,-T,c,24,180+B,-B),..._(-(-h/2+p),-(C+p),p,12,90,0),..._(-(-h/2+p),-(m/2-p),p,12,360,270),..._(-(h/2-p),-(m/2-p),p,12,270,180),..._(-(h/2-p),-(C+p),p,12,180,90)];return e.intersect=function(t){return I.polygon(e,M,t)},o}(0,h.__name)(Z,"block_arrow"),(0,h.__name)(Q,"browser"),(0,h.__name)(K,"card"),(0,h.__name)(J,"choice"),(0,h.__name)(tt,"circle"),(0,h.__name)(et,"composite"),(0,h.__name)(rt,"consoleWindow"),(0,h.__name)(it,"createLine"),(0,h.__name)(nt,"crossedCircle"),(0,h.__name)(ot,"generateCirclePoints"),(0,h.__name)(at,"curlyBraceLeft"),(0,h.__name)(st,"generateCirclePoints"),(0,h.__name)(lt,"curlyBraceRight"),(0,h.__name)(ht,"generateCirclePoints"),(0,h.__name)(ct,"curlyBraces"),(0,h.__name)(ut,"curvedTrapezoid"),(0,h.__name)(dt,"person");var ft=(0,h.__name)((t,e,r,i,n,o)=>[`M${t},${e+o}`,`a${n},${o} 0,0,0 ${r},0`,`a${n},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${o} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createCylinderPathD"),pt=(0,h.__name)((t,e,r,i,n,o)=>[`M${t},${e+o}`,`M${t+r},${e+o}`,`a${n},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${o} 0,0,0 ${r},0`,"l0,"+-i].join(" "),"createOuterCylinderPathD"),gt=(0,h.__name)((t,e,r,i,n,o)=>[`M${t-r/2},${-i/2}`,`a${n},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function mt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const o=e.padding??0,s="neo"===e.look?24:o,l="neo"===e.look?24:o,h=e.width??0;if(e.width&&(e.width=e.width-l,e.width<8&&(e.width=8)),e.height){const t=h/2/(2.5+h/50);e.height=e.height-s-3*t,e.height<8&&(e.height=8)}const{shapeSvg:c,bbox:d,label:f}=await g(t,e,b(e)),p=Math.max(e.width??0,d.width)+l,m=p/2,x=m/(2.5+p/50),C=Math.max(e.height??0,d.height)+s+x;let _;const{cssStyles:k}=e;if("handDrawn"===e.look){const t=u.default.svg(c),r=pt(0,0,p,C,m,x),n=gt(0,x,p,C,m,x),o=(0,i.userNodeOverrides)(e,{}),a=t.path(r,o),s=t.path(n,(0,i.userNodeOverrides)(e,{fill:"none"}));_=c.insert(()=>s,":first-child"),_=c.insert(()=>a,":first-child"),_.attr("class","basic label-container"),k&&_.attr("style",k)}else{const t=ft(0,0,p,C,m,x);_=c.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,a.handleUndefinedAttr)(k)).attr("style",n)}return _.attr("label-offset-y",x),_.attr("transform",`translate(${-p/2}, ${-(C/2+x)})`),y(e,_),f.attr("transform",`translate(${-d.width/2-(d.x-(d.left??0))}, ${-d.height/2+(e.padding??0)/1.5-(d.y-(d.top??0))})`),e.intersect=function(t){const r=I.rect(e,t),i=r.x-(e.x??0);if(0!=m&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-x)){let n=x*x*(1-i*i/(m*m));n>0&&(n=Math.sqrt(n)),n=x-n,t.y-(e.y??0)>0&&(n=-n),r.y+=n}return r},c}async function yt(t,e,r){const{labelStyles:n,nodeStyles:o}=(0,i.styles2String)(e);e.labelStyle=n;const{shapeSvg:s,bbox:l}=await g(t,e,b(e)),h=Math.max(l.width+2*r.labelPaddingX,e?.width||0),c=Math.max(l.height+2*r.labelPaddingY,e?.height||0),d=-h/2,f=-c/2;let p,{rx:m,ry:x}=e;const{cssStyles:C}=e;if(r?.rx&&r.ry&&(m=r.rx,x=r.ry),"handDrawn"===e.look){const t=u.default.svg(s),r=(0,i.userNodeOverrides)(e,{}),n=m||x?t.path(v(d,f,h,c,m||0),r):t.rectangle(d,f,h,c,r);p=s.insert(()=>n,":first-child"),p.attr("class","basic label-container").attr("style",(0,a.handleUndefinedAttr)(C))}else p=s.insert("rect",":first-child"),p.attr("class","basic label-container").attr("style",o).attr("rx",(0,a.handleUndefinedAttr)(m)).attr("ry",(0,a.handleUndefinedAttr)(x)).attr("x",d).attr("y",f).attr("width",h).attr("height",c);return y(e,p,"handDrawn"===e.look?void 0:{width:h,height:c}),e.calcIntersect=function(t,e){return I.rect(t,e)},e.intersect=function(t){return I.rect(e,t)},s}async function bt(t,e){const{cssClasses:r,labelPaddingX:n,labelPaddingY:o,padding:a,width:s,height:l}=e,h={rx:0,ry:0,classes:r??"",labelPaddingX:n??2*(a??0),labelPaddingY:o??a??0},c=await yt(t,e,h);if("handDrawn"===e.look){const t=u.default.svg(c),r=(0,i.userNodeOverrides)(e,{}),n=c.select(".basic.label-container > path:nth-child(2)"),o=n.node();if(!o)return c;let a=null;return o instanceof SVGGraphicsElement?(a=o.getBBox(),c.insert(()=>t.line(a.x,a.y,a.x+a.width,a.y,r),".basic.label-container g.label"),c.insert(()=>t.line(a.x,a.y+a.height,a.x+a.width,a.y+a.height,r),".basic.label-container g.label"),n.remove(),c):c}const d=c.select(".basic.label-container"),f=(Number(d.attr("width"))||s)??0,p=(Number(d.attr("height"))||l)??0;return f>0&&p>0&&d.attr("stroke-dasharray",`${f} ${p}`),c}async function xt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const o="neo"===e.look?16:e.padding??0,a="neo"===e.look?16:e.padding??0,{shapeSvg:s,bbox:l,label:h}=await g(t,e,b(e)),c=l.width+o,d=l.height+a,f=.2*d,p=-c/2,m=-d/2-f/2,{cssStyles:x}=e,C=u.default.svg(s),_=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const k=[{x:p,y:m+f},{x:-p,y:m+f},{x:-p,y:-m},{x:p,y:-m},{x:p,y:m},{x:-p,y:m},{x:-p,y:m+f}],w=C.polygon(k.map(t=>[t.x,t.y]),_),v=s.insert(()=>w,":first-child");return v.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",x),n&&"handDrawn"!==e.look&&v.selectAll("path").attr("style",n),h.attr("transform",`translate(${p+(e.padding??0)/2-(l.x-(l.left??0))}, ${m+f+(e.padding??0)/2-(l.y-(l.top??0))})`),y(e,v),e.intersect=function(t){return I.rect(e,t)},s}async function Ct(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e),o="neo"===e.look?12:5;e.labelStyle=r;const s=e.padding??0,h="neo"===e.look?16:s,{shapeSvg:c,bbox:d}=await g(t,e,b(e)),f=(e?.width?e?.width/2:d.width/2)+(h??0),p=f-o;let m;const{cssStyles:x}=e;if("handDrawn"===e.look){const t=u.default.svg(c),r=(0,i.userNodeOverrides)(e,{roughness:.2,strokeWidth:2.5}),n=(0,i.userNodeOverrides)(e,{roughness:.2,strokeWidth:1.5}),o=t.circle(0,0,2*f,r),s=t.circle(0,0,2*p,n);m=c.insert("g",":first-child"),m.attr("class",(0,a.handleUndefinedAttr)(e.cssClasses)).attr("style",(0,a.handleUndefinedAttr)(x)),m.node()?.appendChild(o),m.node()?.appendChild(s)}else{m=c.insert("g",":first-child");const t=m.insert("circle",":first-child"),e=m.insert("circle");m.attr("class","basic label-container").attr("style",n),t.attr("class","outer-circle").attr("style",n).attr("r",f).attr("cx",0).attr("cy",0),e.attr("class","inner-circle").attr("style",n).attr("r",p).attr("cx",0).attr("cy",0)}return y(e,m),e.intersect=function(t){return l.log.info("DoubleCircle intersect",e,f,t),I.circle(e,f,t)},c}function _t(t,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:o}=(0,i.styles2String)(e);e.label="",e.labelStyle=n;const a=t.insert("g").attr("class",b(e)).attr("id",e.domId??e.id),{cssStyles:s}=e,h=u.default.svg(a),{nodeBorder:c}=r,d=(0,i.userNodeOverrides)(e,{fillStyle:"solid"});"handDrawn"!==e.look&&(d.roughness=0);const f=h.circle(0,0,14,d),p=a.insert(()=>f,":first-child");return p.selectAll("path").attr("style",`fill: ${c} !important;`),s&&s.length>0&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",s),o&&"handDrawn"!==e.look&&p.selectAll("path").attr("style",o),y(e,p),e.intersect=function(t){return l.log.info("filledCircle intersect",e,{radius:7,point:t}),I.circle(e,7,t)},a}async function kt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?2*o:o;(e.width||e.height)&&(e.height=e?.height??0,e.height<10&&(e.height=10),e.width=(e?.width??0)-a-a/2,e.width<10&&(e.width=10));const{shapeSvg:s,bbox:h,label:c}=await g(t,e,b(e)),d=(e?.width?e?.width:h.width)+(a??0),f=e?.height?e?.height:d+h.height,p=[{x:0,y:-f},{x:f,y:-f},{x:f/2,y:0}],{cssStyles:m}=e,C=u.default.svg(s),_=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const k=x(p),w=C.path(k,_),v=s.insert(()=>w,":first-child").attr("transform",`translate(${-f/2}, ${f/2})`).attr("class","outer-path");return m&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",m),n&&"handDrawn"!==e.look&&v.selectChildren("path").attr("style",n),e.width=d,e.height=f,y(e,v),c.attr("transform",`translate(${-h.width/2-(h.x-(h.left??0))}, ${-f/2+(e.padding??0)/2+(h.y-(h.top??0))})`),e.intersect=function(t){return l.log.info("Triangle intersect",e,p,t),I.polygon(e,p,t)},s}async function wt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,label:s}=await g(t,e,b(e)),l=e.padding??12,h=Math.max(a.width+2*l,e.width??0,90),c=a.height+2*l,d=Math.max(Math.min(.16*c,14),8),f=Math.max(c+d,e.height??0),p=f-d,m=Math.max(.38*h,28),x=-f/2,C=[{x:-h/2,y:x},{x:-h/2+m,y:x},{x:-h/2+m,y:x+d},{x:h/2,y:x+d},{x:h/2,y:f/2},{x:-h/2,y:f/2}],_=[`M${C[0].x},${C[0].y}`,...C.slice(1).map(t=>`L${t.x},${t.y}`),"Z"].join(" "),{cssStyles:k}=e;let w;if("handDrawn"===e.look){const t=u.default.svg(o).path(_,(0,i.userNodeOverrides)(e,{}));w=o.insert(()=>t,":first-child").attr("class","basic label-container"),k&&w.attr("style",k)}else w=o.insert("path",":first-child").attr("d",_).attr("class","basic label-container").attr("style",n);"handDrawn"===e.look?y(e,w):y(e,w,{width:h,height:f});const v=x+d+p/2;return s.attr("transform",`translate(${-a.width/2-(a.x-(a.left??0))}, ${v-a.height/2-(a.y-(a.top??0))})`),e.intersect=function(t){return I.polygon(e,C,t)},o}function vt(t,e,{dir:r,config:{state:n,themeVariables:o}}){const{nodeStyles:a}=(0,i.styles2String)(e);e.label="";const s=t.insert("g").attr("class",b(e)).attr("id",e.domId??e.id),{cssStyles:l}=e;let h=Math.max(70,e?.width??0),c=Math.max(10,e?.height??0);"LR"===r&&(h=Math.max(10,e?.width??0),c=Math.max(70,e?.height??0));const d=-1*h/2,f=-1*c/2,p=u.default.svg(s),g=(0,i.userNodeOverrides)(e,{stroke:o.lineColor,fill:o.lineColor});"handDrawn"!==e.look&&(g.roughness=0,g.fillStyle="solid");const m=p.rectangle(d,f,h,c,g),x=s.insert(()=>m,":first-child");l&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",l),a&&"handDrawn"!==e.look&&x.selectAll("path").attr("style",a),y(e,x);const C=n?.padding??0;return e.width&&e.height&&(e.width+=C/2||0,e.height+=C/2||0),e.intersect=function(t){return I.rect(e,t)},s}async function St(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const o="neo"===e.look?16:e.padding??0,a="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.height=(e?.height??0)-2*a,e.height<10&&(e.height=10),e.width=(e?.width??0)-2*o,e.width<15&&(e.width=15));const{shapeSvg:s,bbox:h}=await g(t,e,b(e)),c=(e?.width?e?.width:Math.max(15,h.width))+2*o,d=(e?.height?e?.height:Math.max(10,h.height))+2*a,f=d/2,{cssStyles:p}=e,m=u.default.svg(s),C=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const k=[{x:-c/2,y:-d/2},{x:c/2-f,y:-d/2},..._(-c/2+f,0,f,50,90,270),{x:c/2-f,y:d/2},{x:-c/2,y:d/2}],w=x(k),v=m.path(w,C),S=s.insert(()=>v,":first-child");return S.attr("class","basic label-container outer-path"),p&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",p),n&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",n),y(e,S),e.intersect=function(t){return l.log.info("Pill intersect",e,{radius:f,point:t}),I.polygon(e,k,t)},s}(0,h.__name)(mt,"cylinder"),(0,h.__name)(yt,"drawRect"),(0,h.__name)(bt,"datastore"),(0,h.__name)(xt,"dividedRectangle"),(0,h.__name)(Ct,"doublecircle"),(0,h.__name)(_t,"filledCircle"),(0,h.__name)(kt,"flippedTriangle"),(0,h.__name)(wt,"folder"),(0,h.__name)(vt,"forkJoin"),(0,h.__name)(St,"halfRoundedRectangle");var Tt=(0,h.__name)((t,e,r,i,n)=>[`M${t+n},${e}`,`L${t+r-n},${e}`,`L${t+r},${e-i/2}`,`L${t+r-n},${e-i}`,`L${t+n},${e-i}`,`L${t},${e-i/2}`,"Z"].join(" "),"createHexagonPathD");async function Bt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e),o="neo"===e.look?3.5:4;e.labelStyle=r;const a=e.padding??0,s="neo"===e.look?70:a,l="neo"===e.look?32:a;if(e.width||e.height){const t=(e.height??0)/o;e.width=(e?.width??0)-2*t-l,e.height=(e.height??0)-s}const{shapeSvg:h,bbox:c}=await g(t,e,b(e)),d=(e?.height?e?.height:c.height)+s,f=d/o,p=(e?.width?e?.width:c.width)+2*f+l,m=[{x:f,y:0},{x:p-f,y:0},{x:p,y:-d/2},{x:p-f,y:-d},{x:f,y:-d},{x:0,y:-d/2}];let x;const{cssStyles:C}=e;if("handDrawn"===e.look){const t=u.default.svg(h),r=(0,i.userNodeOverrides)(e,{}),n=Tt(0,0,p,d,f),o=t.path(n,r);x=h.insert(()=>o,":first-child").attr("transform",`translate(${-p/2}, ${d/2})`),C&&x.attr("style",C)}else x=W(h,p,d,m);return n&&x.attr("style",n),e.width=p,e.height=d,y(e,x),e.intersect=function(t){return I.polygon(e,m,t)},h}async function Mt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.label="",e.labelStyle=r;const{shapeSvg:o}=await g(t,e,b(e)),a=Math.max(30,e?.width??0),s=Math.max(30,e?.height??0),{cssStyles:h}=e,c=u.default.svg(o),d=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(d.roughness=0,d.fillStyle="solid");const f=[{x:0,y:0},{x:a,y:0},{x:0,y:s},{x:a,y:s}],p=x(f),m=c.path(p,d),C=o.insert(()=>m,":first-child");return C.attr("class","basic label-container outer-path"),h&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",h),n&&"handDrawn"!==e.look&&C.selectChildren("path").attr("style",n),C.attr("transform",`translate(${-a/2}, ${-s/2})`),y(e,C),e.intersect=function(t){return l.log.info("Pill intersect",e,{points:f}),I.polygon(e,f,t)},o}async function Lt(t,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:a}=(0,i.styles2String)(e);e.labelStyle=a;const s=e.assetHeight??48,h=e.assetWidth??48,c=Math.max(s,h),d=n?.wrappingWidth;e.width=Math.max(c,d??0);const{shapeSvg:f,bbox:p,label:m}=await g(t,e,"icon-shape default"),b="t"===e.pos,x=c,C=c,{nodeBorder:_}=r,{stylesMap:k}=(0,i.compileStyles)(e),w=-C/2,v=-x/2,S=e.label?8:0,T=u.default.svg(f),B=(0,i.userNodeOverrides)(e,{stroke:"none",fill:"none"});"handDrawn"!==e.look&&(B.roughness=0,B.fillStyle="solid");const M=T.rectangle(w,v,C,x,B),L=Math.max(C,p.width),F=x+p.height+S,A=T.rectangle(-L/2,-F/2,L,F,{...B,fill:"transparent",stroke:"none"}),E=f.insert(()=>M,":first-child"),$=f.insert(()=>A);if(e.icon){const t=f.append("g");t.html(`<g>${await(0,o.getIconSVG)(e.icon,{height:c,width:c,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,n=r.height,a=r.x,s=r.y;t.attr("transform",`translate(${-i/2-a},${b?p.height/2+S/2-n/2-s:-p.height/2-S/2-n/2-s})`),t.attr("style",`color: ${k.get("stroke")??_};`)}return m.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${b?-F/2:F/2-p.height})`),E.attr("transform",`translate(0,${b?p.height/2+S/2:-p.height/2-S/2})`),y(e,$),e.intersect=function(t){if(l.log.info("iconSquare intersect",e,t),!e.label)return I.rect(e,t);const r=e.x??0,i=e.y??0,n=e.height??0;let o=[];return o=b?[{x:r-p.width/2,y:i-n/2},{x:r+p.width/2,y:i-n/2},{x:r+p.width/2,y:i-n/2+p.height+S},{x:r+C/2,y:i-n/2+p.height+S},{x:r+C/2,y:i+n/2},{x:r-C/2,y:i+n/2},{x:r-C/2,y:i-n/2+p.height+S},{x:r-p.width/2,y:i-n/2+p.height+S}]:[{x:r-C/2,y:i-n/2},{x:r+C/2,y:i-n/2},{x:r+C/2,y:i-n/2+x},{x:r+p.width/2,y:i-n/2+x},{x:r+p.width/2/2,y:i+n/2},{x:r-p.width/2,y:i+n/2},{x:r-p.width/2,y:i-n/2+x},{x:r-C/2,y:i-n/2+x}],I.polygon(e,o,t)},f}async function Ft(t,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:a}=(0,i.styles2String)(e);e.labelStyle=a;const s=e.assetHeight??48,h=e.assetWidth??48,c=Math.max(s,h),d=n?.wrappingWidth;e.width=Math.max(c,d??0);const{shapeSvg:f,bbox:p,label:m}=await g(t,e,"icon-shape default"),b=e.label?8:0,x="t"===e.pos,{nodeBorder:C,mainBkg:_}=r,{stylesMap:k}=(0,i.compileStyles)(e),w=u.default.svg(f),v=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");const S=k.get("fill");v.stroke=S??_;const T=f.append("g");e.icon&&T.html(`<g>${await(0,o.getIconSVG)(e.icon,{height:c,width:c,fallbackPrefix:""})}</g>`);const B=T.node().getBBox(),M=B.width,L=B.height,F=B.x,A=B.y,E=Math.max(M,L)*Math.SQRT2+40,$=w.circle(0,0,E,v),O=Math.max(E,p.width),D=E+p.height+b,N=w.rectangle(-O/2,-D/2,O,D,{...v,fill:"transparent",stroke:"none"}),P=f.insert(()=>$,":first-child"),q=f.insert(()=>N);return T.attr("transform",`translate(${-M/2-F},${x?p.height/2+b/2-L/2-A:-p.height/2-b/2-L/2-A})`),T.attr("style",`color: ${k.get("stroke")??C};`),m.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${x?-D/2:D/2-p.height})`),P.attr("transform",`translate(0,${x?p.height/2+b/2:-p.height/2-b/2})`),y(e,q),e.intersect=function(t){return l.log.info("iconSquare intersect",e,t),I.rect(e,t)},f}async function At(t,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:a}=(0,i.styles2String)(e);e.labelStyle=a;const s=e.assetHeight??48,h=e.assetWidth??48,c=Math.max(s,h),d=n?.wrappingWidth;e.width=Math.max(c,d??0);const{shapeSvg:f,bbox:p,halfPadding:m,label:b}=await g(t,e,"icon-shape default"),x="t"===e.pos,C=c+2*m,_=c+2*m,{nodeBorder:k,mainBkg:w}=r,{stylesMap:S}=(0,i.compileStyles)(e),T=-_/2,B=-C/2,M=e.label?8:0,L=u.default.svg(f),F=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(F.roughness=0,F.fillStyle="solid");const A=S.get("fill");F.stroke=A??w;const E=L.path(v(T,B,_,C,5),F),$=Math.max(_,p.width),O=C+p.height+M,D=L.rectangle(-$/2,-O/2,$,O,{...F,fill:"transparent",stroke:"none"}),N=f.insert(()=>E,":first-child").attr("class","icon-shape2"),P=f.insert(()=>D);if(e.icon){const t=f.append("g");t.html(`<g>${await(0,o.getIconSVG)(e.icon,{height:c,width:c,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,n=r.height,a=r.x,s=r.y;t.attr("transform",`translate(${-i/2-a},${x?p.height/2+M/2-n/2-s:-p.height/2-M/2-n/2-s})`),t.attr("style",`color: ${S.get("stroke")??k};`)}return b.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${x?-O/2:O/2-p.height})`),N.attr("transform",`translate(0,${x?p.height/2+M/2:-p.height/2-M/2})`),y(e,P),e.intersect=function(t){if(l.log.info("iconSquare intersect",e,t),!e.label)return I.rect(e,t);const r=e.x??0,i=e.y??0,n=e.height??0;let o=[];return o=x?[{x:r-p.width/2,y:i-n/2},{x:r+p.width/2,y:i-n/2},{x:r+p.width/2,y:i-n/2+p.height+M},{x:r+_/2,y:i-n/2+p.height+M},{x:r+_/2,y:i+n/2},{x:r-_/2,y:i+n/2},{x:r-_/2,y:i-n/2+p.height+M},{x:r-p.width/2,y:i-n/2+p.height+M}]:[{x:r-_/2,y:i-n/2},{x:r+_/2,y:i-n/2},{x:r+_/2,y:i-n/2+C},{x:r+p.width/2,y:i-n/2+C},{x:r+p.width/2/2,y:i+n/2},{x:r-p.width/2,y:i+n/2},{x:r-p.width/2,y:i-n/2+C},{x:r-_/2,y:i-n/2+C}],I.polygon(e,o,t)},f}async function Et(t,e,{config:{themeVariables:r,flowchart:n}}){const{labelStyles:a}=(0,i.styles2String)(e);e.labelStyle=a;const s=e.assetHeight??48,h=e.assetWidth??48,c=Math.max(s,h),d=n?.wrappingWidth;e.width=Math.max(c,d??0);const{shapeSvg:f,bbox:p,halfPadding:m,label:b}=await g(t,e,"icon-shape default"),x="t"===e.pos,C=c+2*m,_=c+2*m,{nodeBorder:k,mainBkg:w}=r,{stylesMap:S}=(0,i.compileStyles)(e),T=-_/2,B=-C/2,M=e.label?8:0,L=u.default.svg(f),F=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(F.roughness=0,F.fillStyle="solid");const A=S.get("fill");F.stroke=A??w;const E=L.path(v(T,B,_,C,.1),F),$=Math.max(_,p.width),O=C+p.height+M,D=L.rectangle(-$/2,-O/2,$,O,{...F,fill:"transparent",stroke:"none"}),N=f.insert(()=>E,":first-child"),P=f.insert(()=>D);if(e.icon){const t=f.append("g");t.html(`<g>${await(0,o.getIconSVG)(e.icon,{height:c,width:c,fallbackPrefix:""})}</g>`);const r=t.node().getBBox(),i=r.width,n=r.height,a=r.x,s=r.y;t.attr("transform",`translate(${-i/2-a},${x?p.height/2+M/2-n/2-s:-p.height/2-M/2-n/2-s})`),t.attr("style",`color: ${S.get("stroke")??k};`)}return b.attr("transform",`translate(${-p.width/2-(p.x-(p.left??0))},${x?-O/2:O/2-p.height})`),N.attr("transform",`translate(0,${x?p.height/2+M/2:-p.height/2-M/2})`),y(e,P),e.intersect=function(t){if(l.log.info("iconSquare intersect",e,t),!e.label)return I.rect(e,t);const r=e.x??0,i=e.y??0,n=e.height??0;let o=[];return o=x?[{x:r-p.width/2,y:i-n/2},{x:r+p.width/2,y:i-n/2},{x:r+p.width/2,y:i-n/2+p.height+M},{x:r+_/2,y:i-n/2+p.height+M},{x:r+_/2,y:i+n/2},{x:r-_/2,y:i+n/2},{x:r-_/2,y:i-n/2+p.height+M},{x:r-p.width/2,y:i-n/2+p.height+M}]:[{x:r-_/2,y:i-n/2},{x:r+_/2,y:i-n/2},{x:r+_/2,y:i-n/2+C},{x:r+p.width/2,y:i-n/2+C},{x:r+p.width/2/2,y:i+n/2},{x:r-p.width/2,y:i+n/2},{x:r-p.width/2,y:i-n/2+C},{x:r-_/2,y:i-n/2+C}],I.polygon(e,o,t)},f}async function $t(t,e,{config:{flowchart:r}}){const n=new Image;n.src=e?.img??"",await n.decode();const o=Number(n.naturalWidth.toString().replace("px","")),a=Number(n.naturalHeight.toString().replace("px",""));e.imageAspectRatio=o/a;const{labelStyles:s}=(0,i.styles2String)(e);e.labelStyle=s;const h=r?.wrappingWidth;e.defaultWidth=r?.wrappingWidth;const c=Math.max(e.label?h??0:0,e?.assetWidth??o),d="on"===e.constraint&&e?.assetHeight?e.assetHeight*e.imageAspectRatio:c,f="on"===e.constraint?d/e.imageAspectRatio:e?.assetHeight??a;e.width=Math.max(d,h??0);const{shapeSvg:p,bbox:m,label:b}=await g(t,e,"image-shape default"),x="t"===e.pos,C=-d/2,_=-f/2,k=e.label?8:0,w=u.default.svg(p),v=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");const S=w.rectangle(C,_,d,f,v),T=Math.max(d,m.width),B=f+m.height+k,M=w.rectangle(-T/2,-B/2,T,B,{...v,fill:"none",stroke:"none"}),L=p.insert(()=>S,":first-child"),F=p.insert(()=>M);if(e.img){const t=p.append("image");t.attr("href",e.img),t.attr("width",d),t.attr("height",f),t.attr("preserveAspectRatio","none"),t.attr("transform",`translate(${-d/2},${x?B/2-f:-B/2})`)}return b.attr("transform",`translate(${-m.width/2-(m.x-(m.left??0))},${x?-f/2-m.height/2-k/2:f/2-m.height/2+k/2})`),L.attr("transform",`translate(0,${x?m.height/2+k/2:-m.height/2-k/2})`),y(e,F),e.intersect=function(t){if(l.log.info("iconSquare intersect",e,t),!e.label)return I.rect(e,t);const r=e.x??0,i=e.y??0,n=e.height??0;let o=[];return o=x?[{x:r-m.width/2,y:i-n/2},{x:r+m.width/2,y:i-n/2},{x:r+m.width/2,y:i-n/2+m.height+k},{x:r+d/2,y:i-n/2+m.height+k},{x:r+d/2,y:i+n/2},{x:r-d/2,y:i+n/2},{x:r-d/2,y:i-n/2+m.height+k},{x:r-m.width/2,y:i-n/2+m.height+k}]:[{x:r-d/2,y:i-n/2},{x:r+d/2,y:i-n/2},{x:r+d/2,y:i-n/2+f},{x:r+m.width/2,y:i-n/2+f},{x:r+m.width/2/2,y:i+n/2},{x:r-m.width/2,y:i+n/2},{x:r-m.width/2,y:i-n/2+f},{x:r-d/2,y:i-n/2+f}],I.polygon(e,o,t)},p}async function Ot(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const o=e.padding??0,a=o,s="neo"===e.look?2*o:o,{shapeSvg:l,bbox:h}=await g(t,e,b(e)),c=Math.max(h.height+2*a,e.height??0),d=Math.max(h.width+2*s,(e.width??0)-c),f=[{x:0,y:0},{x:d,y:0},{x:d+3*c/6,y:-c},{x:-3*c/6,y:-c}];let p;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=u.default.svg(l),r=(0,i.userNodeOverrides)(e,{}),n=x(f),o=t.path(n,r);p=l.insert(()=>o,":first-child").attr("transform",`translate(${-d/2}, ${c/2})`),m&&p.attr("style",m)}else p=W(l,d,c,f);return n&&p.attr("style",n),e.width=d,e.height=c,y(e,p),e.intersect=function(t){return I.polygon(e,f,t)},l}async function Dt(t,e){const{shapeSvg:r,bbox:i,label:n}=await g(t,e,"label"),o=r.insert("rect",":first-child");return o.attr("width",.1).attr("height",.1),r.attr("class","label edgeLabel"),n.attr("transform",`translate(${-i.width/2-(i.x-(i.left??0))}, ${-i.height/2-(i.y-(i.top??0))})`),y(e,o),e.intersect=function(t){return I.rect(e,t)},r}async function It(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const o=e.padding??0,a=o,s="neo"===e.look?2*o:o,{shapeSvg:l,bbox:h}=await g(t,e,b(e)),c=Math.max(h.height+a,e.height??0),d=Math.max(h.width+s,(e.width??0)-c),f=[{x:0,y:0},{x:d+3*c/6,y:0},{x:d,y:-c},{x:-3*c/6,y:-c}];let p;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=u.default.svg(l),r=(0,i.userNodeOverrides)(e,{}),n=x(f),o=t.path(n,r);p=l.insert(()=>o,":first-child").attr("transform",`translate(${-d/2}, ${c/2})`),m&&p.attr("style",m)}else p=W(l,d,c,f);return n&&p.attr("style",n),e.width=d,e.height=c,y(e,p),e.intersect=function(t){return I.polygon(e,f,t)},l}async function Nt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const o=e.padding??0,a=o,s="neo"===e.look?2*o:o,{shapeSvg:l,bbox:h}=await g(t,e,b(e)),c=Math.max(h.height+a,e.height??0),d=Math.max(h.width+s,(e.width??0)-c),f=[{x:-3*c/6,y:0},{x:d,y:0},{x:d+3*c/6,y:-c},{x:0,y:-c}];let p;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=u.default.svg(l),r=(0,i.userNodeOverrides)(e,{}),n=x(f),o=t.path(n,r);p=l.insert(()=>o,":first-child").attr("transform",`translate(${-d/2}, ${c/2})`),m&&p.attr("style",m)}else p=W(l,d,c,f);return n&&p.attr("style",n),e.width=d,e.height=c,y(e,p),e.intersect=function(t){return I.polygon(e,f,t)},l}function Pt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.label="",e.labelStyle=r;const o=t.insert("g").attr("class",b(e)).attr("id",e.domId??e.id),{cssStyles:a}=e,s=Math.max(35,e?.width??0),h=Math.max(35,e?.height??0),c=[{x:s,y:0},{x:0,y:h+3.5},{x:s-14,y:h+3.5},{x:0,y:2*h},{x:s,y:h-3.5},{x:14,y:h-3.5}],d=u.default.svg(o),f=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(f.roughness=0,f.fillStyle="solid");const p=x(c),g=d.path(p,f),m=o.insert(()=>g,":first-child");return m.attr("class","outer-path"),a&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",a),n&&"handDrawn"!==e.look&&m.selectAll("path").attr("style",n),m.attr("transform",`translate(-${s/2},${-h})`),y(e,m),e.intersect=function(t){return l.log.info("lightningBolt intersect",e,t),I.polygon(e,c,t)},o}(0,h.__name)(Bt,"hexagon"),(0,h.__name)(Mt,"hourglass"),(0,h.__name)(Lt,"icon"),(0,h.__name)(Ft,"iconCircle"),(0,h.__name)(At,"iconRounded"),(0,h.__name)(Et,"iconSquare"),(0,h.__name)($t,"imageSquare"),(0,h.__name)(Ot,"inv_trapezoid"),(0,h.__name)(Dt,"labelRect"),(0,h.__name)(It,"lean_left"),(0,h.__name)(Nt,"lean_right"),(0,h.__name)(Pt,"lightningBolt");var qt=(0,h.__name)((t,e,r,i,n,o,a)=>[`M${t},${e+o}`,`a${n},${o} 0,0,0 ${r},0`,`a${n},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${o} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+o+a}`,`a${n},${o} 0,0,0 ${r},0`].join(" "),"createCylinderPathD"),zt=(0,h.__name)((t,e,r,i,n,o,a)=>[`M${t},${e+o}`,`M${t+r},${e+o}`,`a${n},${o} 0,0,0 ${-r},0`,`l0,${i}`,`a${n},${o} 0,0,0 ${r},0`,"l0,"+-i,`M${t},${e+o+a}`,`a${n},${o} 0,0,0 ${r},0`].join(" "),"createOuterCylinderPathD"),Rt=(0,h.__name)((t,e,r,i,n,o)=>[`M${t-r/2},${-i/2}`,`a${n},${o} 0,0,0 ${r},0`].join(" "),"createInnerCylinderPathD");async function jt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const o=e.padding??0,s="neo"===e.look?16:o,l="neo"===e.look?24:o;if(e.width||e.height){const t=e.width??0;e.width=(e.width??0)-s,e.width<10&&(e.width=10);const r=t/2/(2.5+t/50);e.height=(e.height??0)-l-3*r,e.height<10&&(e.height=10)}const{shapeSvg:h,bbox:c,label:d}=await g(t,e,b(e)),f=(e?.width?e?.width:c.width)+2*s,p=f/2,m=p/(2.5+f/50),x=(e?.height?e?.height:c.height)+m+2*l,C=.1*x;let _;const{cssStyles:k}=e;if("handDrawn"===e.look){const t=u.default.svg(h),r=zt(0,0,f,x,p,m,C),n=Rt(0,m,f,x,p,m),o=(0,i.userNodeOverrides)(e,{}),a=t.path(r,o),s=t.path(n,o);h.insert(()=>s,":first-child").attr("class","line"),_=h.insert(()=>a,":first-child"),_.attr("class","basic label-container"),k&&_.attr("style",k)}else{const t=qt(0,0,f,x,p,m,C);_=h.insert("path",":first-child").attr("d",t).attr("class","basic label-container outer-path").attr("style",(0,a.handleUndefinedAttr)(k)).attr("style",n)}return _.attr("label-offset-y",m),_.attr("transform",`translate(${-f/2}, ${-(x/2+m)})`),y(e,_),d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))}, ${-c.height/2+m-(c.y-(c.top??0))})`),e.intersect=function(t){const r=I.rect(e,t),i=r.x-(e.x??0);if(0!=p&&(Math.abs(i)<(e.width??0)/2||Math.abs(i)==(e.width??0)/2&&Math.abs(r.y-(e.y??0))>(e.height??0)/2-m)){let n=m*m*(1-i*i/(p*p));n>0&&(n=Math.sqrt(n)),n=m-n,t.y-(e.y??0)>0&&(n=-n),r.y+=n}return r},h}async function Wt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o;if(e.width||e.height){const t=e.width;e.width=10*(t??0)/11-2*a,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10)}const{shapeSvg:l,bbox:h,label:c}=await g(t,e,b(e)),d=(e?.width?e?.width:h.width)+2*(a??0),f=(e?.height?e?.height:h.height)+2*(s??0),p="neo"===e.look?f/4:f/8,m=f+p,{cssStyles:x}=e,_=u.default.svg(l),k=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=[{x:-d/2-d/2*.1,y:-m/2},{x:-d/2-d/2*.1,y:m/2},...C(-d/2-d/2*.1,m/2,d/2+d/2*.1,m/2,p,.8),{x:d/2+d/2*.1,y:-m/2},{x:-d/2-d/2*.1,y:-m/2},{x:-d/2,y:-m/2},{x:-d/2,y:m/2*1.1},{x:-d/2,y:-m/2}],v=_.polygon(w.map(t=>[t.x,t.y]),k),S=l.insert(()=>v,":first-child");return S.attr("class","basic label-container outer-path"),x&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",x),n&&"handDrawn"!==e.look&&S.selectAll("path").attr("style",n),S.attr("transform",`translate(0,${-p/2})`),c.attr("transform",`translate(${-d/2+(e.padding??0)+d/2*.1/2-(h.x-(h.left??0))},${-f/2+(e.padding??0)-p/2-(h.y-(h.top??0))})`),y(e,S),e.intersect=function(t){return I.polygon(e,w,t)},l}async function Ht(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o,l="neo"===e.look?10:5;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*a-2*l,10),e.height=Math.max((e?.height??0)-2*s-2*l,10));const{shapeSvg:h,bbox:c,label:d}=await g(t,e,b(e)),f=(e?.width?e?.width:c.width)+2*a+2*l-2*l,p=(e?.height?e?.height:c.height)+2*s+2*l-2*l,m=-f/2,C=-p/2,{cssStyles:_}=e,w=u.default.svg(h),v=(0,i.userNodeOverrides)(e,{}),S=[{x:m-l,y:C+l},{x:m-l,y:C+p+l},{x:m+f-l,y:C+p+l},{x:m+f-l,y:C+p},{x:m+f,y:C+p},{x:m+f,y:C+p-l},{x:m+f+l,y:C+p-l},{x:m+f+l,y:C-l},{x:m+l,y:C-l},{x:m+l,y:C},{x:m,y:C},{x:m,y:C+l}],T=[{x:m,y:C+l},{x:m+f-l,y:C+l},{x:m+f-l,y:C+p},{x:m+f,y:C+p},{x:m+f,y:C},{x:m,y:C}];"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");const B=x(S);let M=w.path(B,v);const L=x(T);let F=w.path(L,v);"handDrawn"!==e.look&&(M=k(M),F=k(F));const A=h.insert("g",":first-child");return A.insert(()=>M),A.insert(()=>F),A.attr("class","basic label-container outer-path"),_&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",_),n&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",n),d.attr("transform",`translate(${-c.width/2-l-(c.x-(c.left??0))}, ${-c.height/2+l-(c.y-(c.top??0))})`),y(e,A),e.intersect=function(t){return I.polygon(e,S,t)},h}async function Ut(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,label:s}=await g(t,e,b(e)),l=e.padding??0,h="neo"===e.look?16:l,c="neo"===e.look?12:l;let d=!0;(e.width||e.height)&&(d=!1,e.width=(e?.width??0)-2*h,e.height=(e?.height??0)-3*c);const f=Math.max(a.width,e?.width??0)+2*h,p=Math.max(a.height,e?.height??0)+3*c,m="neo"===e.look?p/4:p/8,_=p+(d?m/2:-m/2),k=-f/2,w=-_/2,v=10,{cssStyles:S}=e,T=C(k-v,w+_+v,k+f-v,w+_+v,m,.8),B=T?.[T.length-1],M=[{x:k-v,y:w+v},{x:k-v,y:w+_+v},...T,{x:k+f-v,y:B.y-v},{x:k+f,y:B.y-v},{x:k+f,y:B.y-20},{x:k+f+v,y:B.y-20},{x:k+f+v,y:w-v},{x:k+v,y:w-v},{x:k+v,y:w},{x:k,y:w},{x:k,y:w+v}],L=[{x:k,y:w+v},{x:k+f-v,y:w+v},{x:k+f-v,y:B.y-v},{x:k+f,y:B.y-v},{x:k+f,y:w},{x:k,y:w}],F=u.default.svg(o),A=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(A.roughness=0,A.fillStyle="solid");const E=x(M),$=F.path(E,A),O=x(L),D=F.path(O,A),N=o.insert(()=>$,":first-child");return N.insert(()=>D),N.attr("class","basic label-container outer-path"),S&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",S),n&&"handDrawn"!==e.look&&N.selectAll("path").attr("style",n),N.attr("transform",`translate(0,${-m/2})`),s.attr("transform",`translate(${-a.width/2-v-(a.x-(a.left??0))}, ${-a.height/2+v-m/2-(a.y-(a.top??0))})`),y(e,N),e.intersect=function(t){return I.polygon(e,M,t)},o}async function Yt(t,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:o}=(0,i.styles2String)(e);e.labelStyle=n,e.useHtmlLabels||(0,s.getEffectiveHtmlLabels)((0,s.getConfig)())||(e.centerLabel=!0);const{shapeSvg:a,bbox:l,label:h}=await g(t,e,b(e)),c=Math.max(l.width+2*(e.padding??0),e?.width??0),d=Math.max(l.height+2*(e.padding??0),e?.height??0),f=-c/2,p=-d/2,{cssStyles:m}=e,x=u.default.svg(a),C=(0,i.userNodeOverrides)(e,{fill:r.noteBkgColor,stroke:r.noteBorderColor});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const _=x.rectangle(f,p,c,d,C),k=a.insert(()=>_,":first-child");return k.attr("class","basic label-container outer-path"),h.attr("class","label noteLabel"),m&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",m),o&&"handDrawn"!==e.look&&k.selectAll("path").attr("style",o),h.attr("transform",`translate(${-l.width/2-(l.x-(l.left??0))}, ${-l.height/2-(l.y-(l.top??0))})`),y(e,k),e.intersect=function(t){return I.rect(e,t)},a}(0,h.__name)(jt,"linedCylinder"),(0,h.__name)(Wt,"linedWaveEdgedRect"),(0,h.__name)(Ht,"multiRect"),(0,h.__name)(Ut,"multiWaveEdgedRectangle"),(0,h.__name)(Yt,"note");var Gt=(0,h.__name)((t,e,r)=>[`M${t+r/2},${e}`,`L${t+r},${e-r/2}`,`L${t+r/2},${e-r}`,`L${t},${e-r/2}`,"Z"].join(" "),"createDecisionBoxPathD");async function Vt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const{shapeSvg:o,bbox:a}=await g(t,e,b(e)),s=a.width+(e.padding??0)+(a.height+(e.padding??0)),l=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];let h;const{cssStyles:c}=e;if("handDrawn"===e.look){const t=u.default.svg(o),r=(0,i.userNodeOverrides)(e,{}),n=Gt(0,0,s),a=t.path(n,r);h=o.insert(()=>a,":first-child").attr("transform",`translate(${-s/2+.5}, ${s/2})`),c&&h.attr("style",c)}else h=W(o,s,s,l),h.attr("transform",`translate(${-s/2+.5}, ${s/2})`);return n&&h.attr("style",n),y(e,h),e.calcIntersect=function(t,e){const r=t.width,i=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],n=I.polygon(t,i,e);return{x:n.x-.5,y:n.y-.5}},e.intersect=function(t){return this.calcIntersect(e,t)},o}async function Xt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?21:o??0,s="neo"===e.look?12:o??0,{shapeSvg:l,bbox:h,label:c}=await g(t,e,b(e)),d=h.width+("neo"===e.look?2*a:a),f=Math.max(h.height+("neo"===e.look?2*s:s),e.height??0),p=f/4,m=-Math.max(d,(e.width??0)-p)/2,C=-f/2,_=C/2,k=[{x:m+_,y:C},{x:m,y:0},{x:m+_,y:-C},{x:-m,y:-C},{x:-m,y:C}],{cssStyles:w}=e,v=u.default.svg(l),S=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(S.roughness=0,S.fillStyle="solid");const T=x(k),B=v.path(T,S),M=l.insert(()=>B,":first-child");return M.attr("class","basic label-container outer-path"),w&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",w),n&&"handDrawn"!==e.look&&M.selectAll("path").attr("style",n),M.attr("transform",`translate(${-_/2},0)`),c.attr("transform",`translate(${-_/2-h.width/2-(h.x-(h.left??0))}, ${-h.height/2-(h.y-(h.top??0))})`),y(e,M),e.intersect=function(t){return I.polygon(e,k,t)},l}async function Zt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);let o;e.labelStyle=r,o=e.cssClasses?"node "+e.cssClasses:"node default";const a=t.insert("g").attr("class",o).attr("id",e.domId||e.id),h=a.insert("g"),d=a.insert("g").attr("class","label").attr("style",n),f=e.description,p=e.label,g=await S(d,p,e.labelStyle,!0,!0);let m={width:0,height:0};if((0,s.getEffectiveHtmlLabels)((0,s.getConfig2)())){const t=g.children[0],e=(0,c.select)(g);m=t.getBoundingClientRect(),e.attr("width",m.width),e.attr("height",m.height)}l.log.info("Text 2",f);const b=f||[],x=g.getBBox(),C=await S(d,Array.isArray(b)?b.join("<br/>"):b,e.labelStyle,!0,!0),_=C.children[0],k=(0,c.select)(C);m=_.getBoundingClientRect(),k.attr("width",m.width),k.attr("height",m.height);const w=(e.padding||0)/2;(0,c.select)(C).attr("transform","translate( "+(m.width>x.width?0:(x.width-m.width)/2)+", "+(x.height+w+5)+")"),(0,c.select)(g).attr("transform","translate( "+(m.width<x.width?0:-(x.width-m.width)/2)+", 0)"),m=d.node().getBBox(),d.attr("transform","translate("+-m.width/2+", "+(-m.height/2-w+3)+")");const T=m.width+(e.padding||0),B=m.height+(e.padding||0),M=-m.width/2-w,L=-m.height/2-w;let F,A;if("handDrawn"===e.look){const t=u.default.svg(a),r=(0,i.userNodeOverrides)(e,{}),n=t.path(v(M,L,T,B,e.rx||0),r),o=t.line(-m.width/2-w,-m.height/2-w+x.height+w,m.width/2+w,-m.height/2-w+x.height+w,r);A=a.insert(()=>(l.log.debug("Rough node insert CXC",n),o),":first-child"),F=a.insert(()=>(l.log.debug("Rough node insert CXC",n),n),":first-child")}else F=h.insert("rect",":first-child"),A=h.insert("line"),F.attr("class","outer title-state").attr("style",n).attr("x",-m.width/2-w).attr("y",-m.height/2-w).attr("width",m.width+(e.padding||0)).attr("height",m.height+(e.padding||0)),A.attr("class","divider").attr("x1",-m.width/2-w).attr("x2",m.width/2+w).attr("y1",-m.height/2-w+x.height+w).attr("y2",-m.height/2-w+x.height+w);return y(e,F),e.intersect=function(t){return I.rect(e,t)},a}async function Qt(t,e,{config:{themeVariables:r}}){const i=r?.radius??5;return yt(t,e,{rx:i,ry:i,classes:"",labelPaddingX:1*(e?.padding??0),labelPaddingY:1*(e?.padding??0)})}async function Kt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const o="neo"===e.look?16:e.padding??0,s="neo"===e.look?12:e.padding??0,{shapeSvg:l,bbox:h,label:c}=await g(t,e,b(e)),d=(e?.width??h.width)+2*o+("neo"===e.look?8:16),f=(e?.height??h.height)+2*s,p=d-8,m=f,x=8-d/2,C=-f/2,{cssStyles:_}=e,k=u.default.svg(l),w=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const v=[{x,y:C},{x:x+p,y:C},{x:x+p,y:C+m},{x:x-8,y:C+m},{x:x-8,y:C},{x,y:C},{x,y:C+m}],S=k.polygon(v.map(t=>[t.x,t.y]),w),T=l.insert(()=>S,":first-child");return T.attr("class","basic label-container outer-path").attr("style",(0,a.handleUndefinedAttr)(_)),n&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",n),_&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",n),c.attr("transform",`translate(${4-h.width/2-(h.x-(h.left??0))}, ${-h.height/2-(h.y-(h.top??0))})`),y(e,T),e.intersect=function(t){return I.rect(e,t)},l}async function Jt(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*a,10),e.height=Math.max((e?.height??0)/1.5-2*s,10));const{shapeSvg:l,bbox:h,label:c}=await g(t,e,b(e)),d=(e?.width?e?.width:h.width)+2*a,f=1.5*((e?.height?e?.height:h.height)+2*s)/1.5,p=-d/2,m=-f/2,{cssStyles:C}=e,_=u.default.svg(l),k=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=[{x:p,y:m},{x:p,y:m+f},{x:p+d,y:m+f},{x:p+d,y:m-f/2}],v=x(w),S=_.path(v,k),T=l.insert(()=>S,":first-child");return T.attr("class","basic label-container outer-path"),C&&"handDrawn"!==e.look&&T.selectChildren("path").attr("style",C),n&&"handDrawn"!==e.look&&T.selectChildren("path").attr("style",n),T.attr("transform",`translate(0, ${f/4})`),c.attr("transform",`translate(${-d/2+(e.padding??0)-(h.x-(h.left??0))}, ${-f/4+(e.padding??0)-(h.y-(h.top??0))})`),y(e,T),e.intersect=function(t){return I.polygon(e,w,t)},l}async function te(t,e){const r=e.padding??0,i="neo"===e.look?16:2*r,n="neo"===e.look?12:r;return yt(t,e,{rx:0,ry:0,classes:"",labelPaddingX:e.labelPaddingX??i,labelPaddingY:n})}async function ee(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?20:o,s="neo"===e.look?12:o,{shapeSvg:l,bbox:h}=await g(t,e,b(e)),c=h.height+("neo"===e.look?2*s:s),d=h.width+c/4+("neo"===e.look?2*a:a),f=c/2,{cssStyles:p}=e,m=u.default.svg(l),C=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(C.roughness=0,C.fillStyle="solid");const k=[{x:-d/2+f,y:-c/2},{x:d/2-f,y:-c/2},..._(-d/2+f,0,f,50,90,270),{x:d/2-f,y:c/2},..._(d/2-f,0,f,50,270,450)],w=x(k),v=m.path(w,C),S=l.insert(()=>v,":first-child");return S.attr("class","basic label-container outer-path"),p&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",p),n&&"handDrawn"!==e.look&&S.selectChildren("path").attr("style",n),y(e,S),e.intersect=function(t){return I.polygon(e,k,t)},l}async function re(t,e){return yt(t,e,{rx:"neo"===e.look?3:5,ry:"neo"===e.look?3:5,classes:"flowchart-node"})}function ie(t,e,{config:{themeVariables:r}}){const{labelStyles:n,nodeStyles:o}=(0,i.styles2String)(e);e.labelStyle=n;const{cssStyles:a}=e,{lineColor:s,stateBorder:l,nodeBorder:h,nodeShadow:c}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const d=t.insert("g").attr("class","node default").attr("id",e.domId??e.id),f=u.default.svg(d),p=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(p.roughness=0,p.fillStyle="solid");const g=f.circle(0,0,e.width,{...p,stroke:s,strokeWidth:2}),m=l??h,b=5*(e.width??0)/14,x=f.circle(0,0,b,{...p,fill:m,stroke:m,strokeWidth:2,fillStyle:"solid"}),C=d.insert(()=>g,":first-child");if(C.insert(()=>x),"handDrawn"!==e.look&&C.attr("class","outer-path"),a&&C.selectAll("path").attr("style",a),o&&C.selectAll("path").attr("style",o),e.width<25&&c&&"handDrawn"!==e.look){const e=t.node()?.ownerSVGElement?.id??"",r=e?`${e}-drop-shadow-small`:"drop-shadow-small";C.attr("style",`filter:url(#${r})`)}return y(e,C),e.intersect=function(t){return I.circle(e,(e.width??0)/2,t)},d}function ne(t,e,{config:{themeVariables:r}}){const{lineColor:n,nodeShadow:o}=r;(e.width||e.height)&&((e.width??0)<14&&(e.width=14),(e.height??0)<14&&(e.height=14)),e.width||(e.width=14),e.height||(e.height=14);const a=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let s;if("handDrawn"===e.look){const t=u.default.svg(a).circle(0,0,e.width,(0,i.solidStateFill)(n));s=a.insert(()=>t),s.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14)}else s=a.insert("circle",":first-child"),s.attr("class","state-start").attr("r",(e.width??7)/2).attr("width",e.width??14).attr("height",e.height??14);if(e.width<25&&o&&"handDrawn"!==e.look){const e=t.node()?.ownerSVGElement?.id??"",r=e?`${e}-drop-shadow-small`:"drop-shadow-small";s.attr("style",`filter:url(#${r})`)}return y(e,s),e.intersect=function(t){return I.circle(e,(e.width??7)/2,t)},a}async function oe(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const o=e?.padding??8,s="neo"===e.look?28:o,l="neo"===e.look?12:o,{shapeSvg:h,bbox:c}=await g(t,e,b(e)),d=Math.max(c.width+16+s,e.width??0),f=Math.max(c.height+l,e.height??0),p=d-16,m=f,x=-d/2,C=-f/2,_=[{x:0,y:0},{x:p,y:0},{x:p,y:-m},{x:0,y:-m},{x:0,y:0},{x:-8,y:0},{x:p+8,y:0},{x:p+8,y:-m},{x:-8,y:-m},{x:-8,y:0}];if("handDrawn"===e.look){const t=u.default.svg(h),r=(0,i.userNodeOverrides)(e,{}),n=t.rectangle(x,C,p+16,m,r),o=t.line(x+8,C,x+8,C+m,r),s=t.line(x+8+p,C,x+8+p,C+m,r);h.insert(()=>o,":first-child"),h.insert(()=>s,":first-child");const l=h.insert(()=>n,":first-child"),{cssStyles:c}=e;l.attr("class","basic label-container").attr("style",(0,a.handleUndefinedAttr)(c)),y(e,l)}else{const t=W(h,p,m,_);n&&t.attr("style",n),y(e,t)}return e.intersect=function(t){return I.polygon(e,_,t)},h}async function ae(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o;(e.width||e.height)&&(e.height=Math.max((e?.height??0)-2*s,10),e.width=Math.max((e?.width??0)-2*a-.2*(e.height+2*s),10));const{shapeSvg:l,bbox:h}=await g(t,e,b(e)),c=(e?.height?e?.height:h.height)+2*s,d=.2*c,f=.2*c,p=(e?.width?e?.width:h.width)+2*a+d-d,m=c,C=-p/2,_=-m/2,{cssStyles:k}=e,w=u.default.svg(l),v=(0,i.userNodeOverrides)(e,{}),S=[{x:C-d/2,y:_},{x:C+p+d/2,y:_},{x:C+p+d/2,y:_+m},{x:C-d/2,y:_+m}],T=[{x:C+p-d/2,y:_+m},{x:C+p+d/2,y:_+m},{x:C+p+d/2,y:_+m-f}];"handDrawn"!==e.look&&(v.roughness=0,v.fillStyle="solid");const B=x(S),M=w.path(B,v),L=x(T),F=w.path(L,{...v,fillStyle:"solid"}),A=l.insert(()=>F,":first-child");return A.insert(()=>M,":first-child"),A.attr("class","basic label-container outer-path"),k&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",k),n&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",n),y(e,A),e.intersect=function(t){return I.polygon(e,S,t)},l}async function se(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,label:s}=await g(t,e,b(e)),l=Math.max(a.width+2*(e.padding??0),e?.width??0),h=Math.max(a.height+2*(e.padding??0),e?.height??0),c=h/8,d=.2*l,f=.2*h,p=h+c,{cssStyles:m}=e,_=u.default.svg(o),k=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=[{x:-l/2-l/2*.1,y:p/2},...C(-l/2-l/2*.1,p/2,l/2+l/2*.1,p/2,c,.8),{x:l/2+l/2*.1,y:-p/2},{x:-l/2-l/2*.1,y:-p/2}],v=-l/2+l/2*.1,S=-p/2-.4*f,T=[{x:v+l-d,y:1.3*(S+h)},{x:v+l,y:S+h-f},{x:v+l,y:.9*(S+h)},...C(v+l,1.25*(S+h),v+l-d,1.3*(S+h),.02*-h,.5)],B=x(w),M=_.path(B,k),L=x(T),F=_.path(L,{...k,fillStyle:"solid"}),A=o.insert(()=>F,":first-child");return A.insert(()=>M,":first-child"),A.attr("class","basic label-container outer-path"),m&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",m),n&&"handDrawn"!==e.look&&A.selectAll("path").attr("style",n),A.attr("transform",`translate(0,${-c/2})`),s.attr("transform",`translate(${-l/2+(e.padding??0)-(a.x-(a.left??0))},${-h/2+(e.padding??0)-c/2-(a.y-(a.top??0))})`),y(e,A),e.intersect=function(t){return I.polygon(e,w,t)},o}async function le(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const{shapeSvg:o,bbox:a}=await g(t,e,b(e)),s=Math.max(a.width+(e.padding??0),e?.width||0),l=Math.max(a.height+(e.padding??0),e?.height||0),h=-s/2,c=-l/2,u=o.insert("rect",":first-child");return u.attr("class","text").attr("style",n).attr("rx",0).attr("ry",0).attr("x",h).attr("y",c).attr("width",s).attr("height",l),y(e,u),e.intersect=function(t){return I.rect(e,t)},o}(0,h.__name)(Vt,"question"),(0,h.__name)(Xt,"rect_left_inv_arrow"),(0,h.__name)(Zt,"rectWithTitle"),(0,h.__name)(Qt,"roundedRect"),(0,h.__name)(Kt,"shadedProcess"),(0,h.__name)(Jt,"slopedRect"),(0,h.__name)(te,"squareRect"),(0,h.__name)(ee,"stadium"),(0,h.__name)(re,"state"),(0,h.__name)(ie,"stateEnd"),(0,h.__name)(ne,"stateStart"),(0,h.__name)(oe,"subroutine"),(0,h.__name)(ae,"taggedRect"),(0,h.__name)(se,"taggedWaveEdgedRectangle"),(0,h.__name)(le,"text");var he=(0,h.__name)((t,e,r,i,n,o)=>`M${t},${e}\n a${n},${o} 0,0,1 0,${-i}\n l${r},0\n a${n},${o} 0,0,1 0,${i}\n M${r},${-i}\n a${n},${o} 0,0,0 0,${i}\n l${-r},0`,"createCylinderPathD"),ce=(0,h.__name)((t,e,r,i,n,o)=>[`M${t},${e}`,`M${t+r},${e}`,`a${n},${o} 0,0,0 0,${-i}`,`l${-r},0`,`a${n},${o} 0,0,0 0,${i}`,`l${r},0`].join(" "),"createOuterCylinderPathD"),ue=(0,h.__name)((t,e,r,i,n,o)=>[`M${t+r/2},${-i/2}`,`a${n},${o} 0,0,0 0,${i}`].join(" "),"createInnerCylinderPathD");async function de(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const o=e.padding??0,s="neo"===e.look?12:o/2,l=e.height??0;if(e.height&&(e.height=e.height-s,e.height<5&&(e.height=5)),e.width){const t=l/2/(2.5+l/50);e.width=e.width-s-3*t,e.width<10&&(e.width=10)}const{shapeSvg:h,bbox:c,label:d}=await g(t,e,b(e)),f=Math.max(e.height??0,c.height)+s,p=f/2,m=p/(2.5+f/50),x=Math.max(e.width??0,c.width)+m+s,{cssStyles:C}=e;let _;if("handDrawn"===e.look){const t=u.default.svg(h),r=ce(0,0,x,f,m,p),n=ue(0,0,x,f,m,p),o=t.path(r,(0,i.userNodeOverrides)(e,{})),a=t.path(n,(0,i.userNodeOverrides)(e,{fill:"none"}));_=h.insert(()=>a,":first-child"),_=h.insert(()=>o,":first-child"),_.attr("class","basic label-container"),C&&_.attr("style",C)}else{const t=he(0,0,x,f,m,p);_=h.insert("path",":first-child").attr("d",t).attr("class","basic label-container").attr("style",(0,a.handleUndefinedAttr)(C)).attr("style",n),_.attr("class","basic label-container outer-path"),C&&_.selectAll("path").attr("style",C),n&&_.selectAll("path").attr("style",n)}return _.attr("label-offset-x",m),_.attr("transform",`translate(${-x/2}, ${f/2} )`),d.attr("transform",`translate(${-c.width/2-m-(c.x-(c.left??0))}, ${-c.height/2-(c.y-(c.top??0))})`),y(e,_),e.intersect=function(t){const r=I.rect(e,t),i=r.y-(e.y??0);if(0!=p&&(Math.abs(i)<(e.height??0)/2||Math.abs(i)==(e.height??0)/2&&Math.abs(r.x-(e.x??0))>(e.width??0)/2-m)){let n=m*m*(1-i*i/(p*p));0!=n&&(n=Math.sqrt(Math.abs(n))),n=m-n,t.x-(e.x??0)>0&&(n=-n),r.x+=n}return r},h}async function fe(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const o=e.padding??0,a=(e.look,o),s="neo"===e.look?2*o:o,{shapeSvg:l,bbox:h}=await g(t,e,b(e)),c=Math.max(h.height+a,e.height??0),d=Math.max(h.width+s,(e.width??0)-c),f=[{x:-3*c/6,y:0},{x:d+3*c/6,y:0},{x:d,y:-c},{x:0,y:-c}];let p;const{cssStyles:m}=e;if("handDrawn"===e.look){const t=u.default.svg(l),r=(0,i.userNodeOverrides)(e,{}),n=x(f),o=t.path(n,r);p=l.insert(()=>o,":first-child").attr("transform",`translate(${-d/2}, ${c/2})`),m&&p.attr("style",m)}else p=W(l,d,c,f);return n&&p.attr("style",n),e.width=d,e.height=c,y(e,p),e.intersect=function(t){return I.polygon(e,f,t)},l}async function pe(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o;(e.width||e.height)&&(e.height=(e.height??0)-2*s,e.height<5&&(e.height=5),e.width=(e.width??0)-2*a,e.width<15&&(e.width=15));const{shapeSvg:l,bbox:h}=await g(t,e,b(e)),c=(e?.width?e?.width:h.width)+2*a,d=(e?.height?e?.height:h.height)+2*s,{cssStyles:f}=e,p=u.default.svg(l),m=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(m.roughness=0,m.fillStyle="solid");const C=[{x:-c/2*.8,y:-d/2},{x:c/2*.8,y:-d/2},{x:c/2,y:-d/2*.6},{x:c/2,y:d/2},{x:-c/2,y:d/2},{x:-c/2,y:-d/2*.6}],_=x(C),k=p.path(_,m),w=l.insert(()=>k,":first-child");return w.attr("class","basic label-container outer-path"),f&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",f),n&&"handDrawn"!==e.look&&w.selectChildren("path").attr("style",n),y(e,w),e.intersect=function(t){return I.polygon(e,C,t)},l}async function ge(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?2*o:o;(e.width||e.height)&&(e.width=((e?.width??0)-a)/2,e.width<10&&(e.width=10),e.height=e?.height??0,e.height<10&&(e.height=10));const{shapeSvg:h,bbox:c,label:d}=await g(t,e,b(e)),f=(0,s.evaluate)((0,s.getConfig2)().flowchart?.htmlLabels),p=(e?.width?e?.width:c.width)+a,m=e?.height?e?.height:p+c.height,C=[{x:0,y:0},{x:m,y:0},{x:m/2,y:-m}],{cssStyles:_}=e,k=u.default.svg(h),w=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(w.roughness=0,w.fillStyle="solid");const v=x(C),S=k.path(v,w),T=h.insert(()=>S,":first-child").attr("transform",`translate(${-m/2}, ${m/2})`).attr("class","outer-path");return _&&"handDrawn"!==e.look&&T.selectChildren("path").attr("style",_),n&&"handDrawn"!==e.look&&T.selectChildren("path").attr("style",n),e.width=p,e.height=m,y(e,T),d.attr("transform",`translate(${-c.width/2-(c.x-(c.left??0))}, ${m/2-(c.height+(e.padding??0)/(f?2:1)-(c.y-(c.top??0)))})`),e.intersect=function(t){return l.log.info("Triangle intersect",e,C,t),I.polygon(e,C,t)},h}async function me(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?12:o;let l=!0;(e.width||e.height)&&(l=!1,e.width=(e?.width??0)-2*a,e.width<10&&(e.width=10),e.height=(e?.height??0)-2*s,e.height<10&&(e.height=10));const{shapeSvg:h,bbox:c,label:d}=await g(t,e,b(e)),f=(e?.width?e?.width:c.width)+2*(a??0),p=(e?.height?e?.height:c.height)+2*(s??0),m="neo"===e.look?p/4:p/8,_=p+(l?m:-m),{cssStyles:k}=e,w=14-f,v=w>0?w/2:0,S=u.default.svg(h),T=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(T.roughness=0,T.fillStyle="solid");const B=[{x:-f/2-v,y:_/2},...C(-f/2-v,_/2,f/2+v,_/2,m,.8),{x:f/2+v,y:-_/2},{x:-f/2-v,y:-_/2}],M=x(B),L=S.path(M,T),F=h.insert(()=>L,":first-child");return F.attr("class","basic label-container outer-path"),k&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",k),n&&"handDrawn"!==e.look&&F.selectAll("path").attr("style",n),F.attr("transform",`translate(0,${-m/2})`),d.attr("transform",`translate(${-f/2+(e.padding??0)-(c.x-(c.left??0))},${-p/2+(e.padding??0)-m-(c.y-(c.top??0))})`),y(e,F),e.intersect=function(t){return I.polygon(e,B,t)},h}async function ye(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const o=e.padding??0,a="neo"===e.look?16:o,s="neo"===e.look?20:o;if(e.width||e.height){e.width=e?.width??0,e.width<20&&(e.width=20),e.height=e?.height??0,e.height<10&&(e.height=10);const t=Math.min(.2*e.height,e.height/4);e.height=Math.ceil(e.height-s-t*(20/9)),e.width=e.width-2*a}const{shapeSvg:l,bbox:h}=await g(t,e,b(e)),c=(e?.width?e?.width:h.width)+2*a,d=(e?.height?e?.height:h.height)+s,f=d/8,p=d+2*f,{cssStyles:m}=e,_=u.default.svg(l),k=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const w=[{x:-c/2,y:p/2},...C(-c/2,p/2,c/2,p/2,f,1),{x:c/2,y:-p/2},...C(c/2,-p/2,-c/2,-p/2,f,-1)],v=x(w),S=_.path(v,k),T=l.insert(()=>S,":first-child");return T.attr("class","basic label-container"),m&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",m),n&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",n),y(e,T),e.intersect=function(t){return I.polygon(e,w,t)},l}(0,h.__name)(de,"tiltedCylinder"),(0,h.__name)(fe,"trapezoid"),(0,h.__name)(pe,"trapezoidalPentagon"),(0,h.__name)(ge,"triangle"),(0,h.__name)(me,"waveEdgedRectangle"),(0,h.__name)(ye,"waveRectangle");var be=10;async function xe(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const o="neo"===e.look?16:e.padding??0,a="neo"===e.look?12:e.padding??0;(e.width||e.height)&&(e.width=Math.max((e?.width??0)-2*o-be,10),e.height=Math.max((e?.height??0)-2*a-be,10));const{shapeSvg:s,bbox:l,label:h}=await g(t,e,b(e)),c=(e?.width?e?.width:l.width)+2*o+be,d=(e?.height?e?.height:l.height)+2*a+be,f=c-be,p=d-be,m=-f/2,x=-p/2,{cssStyles:C}=e,_=u.default.svg(s),k=(0,i.userNodeOverrides)(e,{}),w=[{x:m-be,y:x-be},{x:m-be,y:x+p},{x:m+f,y:x+p},{x:m+f,y:x-be}],v=`M${m-be},${x-be} L${m+f},${x-be} L${m+f},${x+p} L${m-be},${x+p} L${m-be},${x-be}\n M${m-be},${x} L${m+f},${x}\n M${m},${x-be} L${m},${x+p}`;"handDrawn"!==e.look&&(k.roughness=0,k.fillStyle="solid");const S=_.path(v,k),T=s.insert(()=>S,":first-child");return T.attr("transform","translate(5, 5)"),T.attr("class","basic label-container outer-path"),C&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",C),n&&"handDrawn"!==e.look&&T.selectAll("path").attr("style",n),h.attr("transform",`translate(${-l.width/2+5-(l.x-(l.left??0))}, ${-l.height/2+5-(l.y-(l.top??0))})`),y(e,T),e.intersect=function(t){return I.polygon(e,w,t)},s}(0,h.__name)(xe,"windowPane");var Ce=new Set(["redux-color","redux-dark-color"]),_e=new Set(["redux","redux-dark","redux-color","redux-dark-color"]);async function ke(t,e){const r=e;r.alias&&(e.label=r.alias);const{theme:n,themeVariables:o}=(0,s.getConfig)(),{rowEven:l,rowOdd:h,nodeBorder:d,borderColorArray:f}=o;if("handDrawn"===e.look){const{themeVariables:r}=(0,s.getConfig)(),{background:i}=r,n={...e,id:e.id+"-background",domId:(e.domId||e.id)+"-background",look:"default",cssStyles:["stroke: none",`fill: ${i}`]};await ke(t,n)}const p=(0,s.getConfig)();e.useHtmlLabels=p.htmlLabels;let g=p.er?.diagramPadding??10,m=p.er?.entityPadding??6;const{cssStyles:x}=e,{labelStyles:C,nodeStyles:_}=(0,i.styles2String)(e);if(0===r.attributes.length&&e.label){const i={rx:0,ry:0,labelPaddingX:g,labelPaddingY:1.5*g,classes:""};(0,a.calculateTextWidth)(e.label,p)+2*i.labelPaddingX<p.er.minEntityWidth&&(e.width=p.er.minEntityWidth);const o=await yt(t,e,i);if(null!=n&&Ce.has(n)){const t=r.colorIndex??0;o.attr("data-color-id","color-"+t%f.length)}if(!(0,s.evaluate)(p.htmlLabels)){const t=o.select("text"),e=t.node()?.getBBox();t.attr("transform",`translate(${-e.width/2}, 0)`)}return o}p.htmlLabels||(g*=1.25,m*=1.25);let k=b(e);k||(k="node default");const w=t.insert("g").attr("class",k).attr("id",e.domId||e.id),v=await we(w,e.label??"",p,0,0,["name"],C);v.height+=m;let S=0;const T=[],B=[];let M=0,L=0,F=0,A=0,E=!0,$=!0;for(const t of r.attributes){const e=await we(w,t.type,p,0,S,["attribute-type"],C);M=Math.max(M,e.width+g);const r=await we(w,t.name,p,0,S,["attribute-name"],C);L=Math.max(L,r.width+g);const i=await we(w,t.keys.join(),p,0,S,["attribute-keys"],C);F=Math.max(F,i.width+g);const n=await we(w,t.comment,p,0,S,["attribute-comment"],C);A=Math.max(A,n.width+g);const o=Math.max(e.height,r.height,i.height,n.height)+m;B.push({yOffset:S,rowHeight:o}),S+=o}let O=4;F<=g&&(E=!1,F=0,O--),A<=g&&($=!1,A=0,O--);const D=w.node().getBBox();if(v.width+2*g-(M+L+F+A)>0){const t=v.width+2*g-(M+L+F+A);M+=t/O,L+=t/O,F>0&&(F+=t/O),A>0&&(A+=t/O)}const N=M+L+F+A,P=u.default.svg(w),q=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(q.roughness=0,q.fillStyle="solid");let z=0;B.length>0&&(z=B.reduce((t,e)=>t+(e?.rowHeight??0),0));const R=Math.max(D.width+2*g,e?.width||0,N),j=Math.max((z??0)+v.height,e?.height||0),W=-R/2,H=-j/2;if(w.selectAll("g:not(:first-child)").each((t,e,r)=>{const i=(0,c.select)(r[e]),n=i.attr("transform");let o=0,a=0;if(n){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n);t&&(o=parseFloat(t[1]),a=parseFloat(t[2]),i.attr("class").includes("attribute-name")?o+=M:i.attr("class").includes("attribute-keys")?o+=M+L:i.attr("class").includes("attribute-comment")&&(o+=M+L+F))}i.attr("transform",`translate(${W+g/2+o}, ${a+H+v.height+m/2})`)}),w.select(".name").attr("transform","translate("+-v.width/2+", "+(H+m/2)+")"),null!=n&&Ce.has(n)){const t=r.colorIndex??0;w.attr("data-color-id","color-"+t%f.length)}const U=P.rectangle(W,H,R,j,q),Y=w.insert(()=>U,":first-child").attr("class","outer-path").attr("style",x.join(""));T.push(0);for(const[t,e]of B.entries()){const r=(t+1)%2==0&&0!==e.yOffset,i=P.rectangle(W,v.height+H+e?.yOffset,R,e?.rowHeight,{...q,fill:r?l:h,stroke:d});w.insert(()=>i,"g.label").attr("style",x.join("")).attr("class","row-rect-"+(r?"even":"odd"))}const G=1e-4;let V=ve(W,v.height+H,R+W,v.height+H,G),X=P.polygon(V.map(t=>[t.x,t.y]),q);if(w.insert(()=>X).attr("class","divider"),V=ve(M+W,v.height+H,M+W,j+H,G),X=P.polygon(V.map(t=>[t.x,t.y]),q),w.insert(()=>X).attr("class","divider"),E){const t=M+L+W;V=ve(t,v.height+H,t,j+H,G),X=P.polygon(V.map(t=>[t.x,t.y]),q),w.insert(()=>X).attr("class","divider")}if($){const t=M+L+F+W;V=ve(t,v.height+H,t,j+H,G),X=P.polygon(V.map(t=>[t.x,t.y]),q),w.insert(()=>X).attr("class","divider")}for(const t of T){const e=v.height+H+t;V=ve(W,e,R+W,e,G),X=P.polygon(V.map(t=>[t.x,t.y]),q),w.insert(()=>X).attr("class","divider")}if(y(e,Y),_&&"handDrawn"!==e.look)if(null!=n&&_e.has(n))w.selectAll("path").attr("style",_);else{const t=_.split(";"),e=t?.filter(t=>t.includes("stroke"))?.map(t=>`${t}`).join("; ");w.selectAll("path").attr("style",e??""),w.selectAll(".row-rect-even path").attr("style",_)}return e.intersect=function(t){return I.rect(e,t)},w}async function we(t,e,r,i=0,o=0,l=[],h=""){const u=t.insert("g").attr("class",`label ${l.join(" ")}`).attr("transform",`translate(${i}, ${o})`).attr("style",h);e!==(0,s.parseGenericTypes)(e)&&(e=(e=(0,s.parseGenericTypes)(e)).replaceAll("<","<").replaceAll(">",">"));const d=u.node().appendChild(await(0,n.createText)(u,e,{width:(0,a.calculateTextWidth)(e,r)+100,style:h,useHtmlLabels:r.htmlLabels},r));if(e.includes("<")||e.includes(">")){let t=d.children[0];for(t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">");t.childNodes[0];)t=t.childNodes[0],t.textContent=t.textContent.replaceAll("<","<").replaceAll(">",">")}let f=d.getBBox();if((0,s.evaluate)(r.htmlLabels)){const t=d.children[0];t.style.textAlign="start";const e=(0,c.select)(d);f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}return f}function ve(t,e,r,i,n){return t===r?[{x:t-n/2,y:e},{x:t+n/2,y:e},{x:r+n/2,y:i},{x:r-n/2,y:i}]:[{x:t,y:e-n/2},{x:t,y:e+n/2},{x:r,y:i+n/2},{x:r,y:i-n/2}]}async function Se(t,e,r,i,n=r.class.padding??12){const o=i?0:3,a=t.insert("g").attr("class",b(e)).attr("id",e.domId||e.id);let s=null,l=null,h=null,c=null,u=0,d=0,f=0;if(s=a.insert("g").attr("class","annotation-group text"),e.annotations.length>0){const t=e.annotations[0];await Te(s,{text:`«${t}»`},0),u=s.node().getBBox().height}l=a.insert("g").attr("class","label-group text"),await Te(l,e,0,["font-weight: bolder"]);const p=l.node().getBBox();d=p.height,h=a.insert("g").attr("class","members-group text");let g=0;for(const t of e.members)g+=await Te(h,t,g,[t.parseClassifier()])+o;f=h.node().getBBox().height,f<=0&&(f=n/2),c=a.insert("g").attr("class","methods-group text");let m=0;for(const t of e.methods)m+=await Te(c,t,m,[t.parseClassifier()])+o;let y=a.node().getBBox();if(null!==s){const t=s.node().getBBox();s.attr("transform",`translate(${-t.width/2})`)}return l.attr("transform",`translate(${-p.width/2}, ${u})`),y=a.node().getBBox(),h.attr("transform",`translate(0, ${u+d+2*n})`),y=a.node().getBBox(),c.attr("transform",`translate(0, ${u+d+(f?f+4*n:2*n)})`),y=a.node().getBBox(),{shapeSvg:a,bbox:y}}async function Te(t,e,r,i=[]){const o=t.insert("g").attr("class","label").attr("style",i.join("; ")),l=(0,s.getConfig)();let h="useHtmlLabels"in e?e.useHtmlLabels:(0,s.evaluate)(l.htmlLabels)??!0,u="";u="text"in e?e.text:e.label,!h&&u.startsWith("\\")&&(u=u.substring(1)),(0,s.hasKatex)(u)&&(h=!0);const f=await(0,n.createText)(o,(0,s.sanitizeText2)((0,a.decodeEntities)(u)),{width:(0,a.calculateTextWidth)(u,l)+50,classes:"markdown-node-label",useHtmlLabels:h},l);let p,g=1;if(h){const t=f.children[0],e=(0,c.select)(f);g=t.innerHTML.split("<br>").length,t.innerHTML.includes("</math>")&&(g+=t.innerHTML.split("<mrow>").length-1),await d(t),p=t.getBoundingClientRect(),e.attr("width",p.width),e.attr("height",p.height)}else{i.includes("font-weight: bolder")&&(0,c.select)(f).selectAll("tspan").attr("font-weight",""),g=f.children.length;const t=f.children[0];(""===f.textContent||f.textContent.includes(">"))&&(t.textContent=u[0]+u.substring(1).replaceAll(">",">").replaceAll("<","<").trim()," "===u[1]&&(t.textContent=t.textContent[0]+" "+t.textContent.substring(1))),"undefined"===t.textContent&&(t.textContent=""),p=f.getBBox()}return o.attr("transform","translate(0,"+(-p.height/(2*g)+r)+")"),p.height}async function Be(t,e){const r=(0,s.getConfig2)(),{themeVariables:n}=r,{useGradient:o}=n,a=r.class.padding??12,l=a,h=e.useHtmlLabels??(0,s.evaluate)(r.htmlLabels)??!0,d=e;d.annotations=d.annotations??[],d.members=d.members??[],d.methods=d.methods??[];const{shapeSvg:f,bbox:p}=await Se(t,e,r,h,l),{labelStyles:g,nodeStyles:m}=(0,i.styles2String)(e);e.labelStyle=g,e.cssStyles=d.styles||"";const b=d.styles?.join(";")||m||"";e.cssStyles||(e.cssStyles=b.replaceAll("!important","").split(";"));const x=0===d.members.length&&0===d.methods.length&&!r.class?.hideEmptyMembersBox,C=u.default.svg(f),_=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(_.roughness=0,_.fillStyle="solid");const k=Math.max(e.width??0,p.width);let w=Math.max(e.height??0,p.height);const v=(e.height??0)>p.height;0===d.members.length&&0===d.methods.length?w+=l:d.members.length>0&&0===d.methods.length&&(w+=2*l);const S=-k/2,T=-w/2;let B=x?2*a:0===d.members.length&&0===d.methods.length?-a:0;v&&(B=2*a);const M=C.rectangle(S-a,T-a-(x?a:0===d.members.length&&0===d.methods.length?-a/2:0),k+2*a,w+2*a+B,_),L=f.insert(()=>M,":first-child");L.attr("class","basic label-container outer-path");const F=L.node().getBBox(),A=f.select(".annotation-group").node().getBBox().height-(x?a/2:0)||0,E=f.select(".label-group").node().getBBox().height-(x?a/2:0)||0,$=f.select(".members-group").node().getBBox().height-(x?a/2:0)||0,O=(A+E+T+a-(T-a-(x?a:0===d.members.length&&0===d.methods.length?-a/2:0)))/2;if(f.selectAll(".text").each((t,e,i)=>{const n=(0,c.select)(i[e]),o=n.attr("transform");let s=0;if(o){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(o);t&&(s=parseFloat(t[2]))}let u=s+T+a-(x?a:0===d.members.length&&0===d.methods.length?-a/2:0);if(n.attr("class").includes("methods-group")){const t=Math.max($,l/2);u=v?Math.max(O,A+E+t+T+2*l+a)+2*l:A+E+t+T+4*l+a}0===d.members.length&&0===d.methods.length&&r.class?.hideEmptyMembersBox&&(u=d.annotations.length>0?s-l:s),h||(u-=4);let p=S;(n.attr("class").includes("label-group")||n.attr("class").includes("annotation-group"))&&(p=-n.node()?.getBBox().width/2||0,f.selectAll("text").each(function(t,e,r){"middle"===window.getComputedStyle(r[e]).textAnchor&&(p=0)})),n.attr("transform",`translate(${p}, ${u})`)}),d.members.length>0||d.methods.length>0||x){const t=A+E+T+a,r=C.line(F.x,t,F.x+F.width,t+.001,_);f.insert(()=>r).attr("class","divider"+("neo"!==e.look||o?"":" neo-line")).attr("style",b)}if(x||d.members.length>0||d.methods.length>0){const t=A+E+$+T+2*l+a,r=C.line(F.x,v?Math.max(O,t):t,F.x+F.width,(v?Math.max(O,t):t)+.001,_);f.insert(()=>r).attr("class","divider"+("neo"!==e.look||o?"":" neo-line")).attr("style",b)}if("handDrawn"!==d.look&&f.selectAll("path").attr("style",b),L.select(":nth-child(2)").attr("style",b),f.selectAll(".divider").select("path").attr("style",b),e.labelStyle?f.selectAll("span").attr("style",e.labelStyle):f.selectAll("span").attr("style",b),!h){const t=RegExp(/color\s*:\s*([^;]*)/),e=t.exec(b);if(e){const t=e[0].replace("color","fill");f.selectAll("tspan").attr("style",t)}else if(g){const e=t.exec(g);if(e){const t=e[0].replace("color","fill");f.selectAll("tspan").attr("style",t)}}}return y(e,L),e.intersect=function(t){return I.rect(e,t)},f}async function Me(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const o=e,a=e,l="verifyMethod"in e,h=b(e),d=(0,s.getConfig2)(),{themeVariables:f}=d,{borderColorArray:p,requirementEdgeLabelBackground:g}=f,m="elk"===d.layout?"start":"center",x=t.insert("g").attr("class",h).attr("id",e.domId??e.id);let C;C=l?await Le(x,`<<${o.type}>>`,0,e.labelStyle):await Le(x,"<<Element>>",0,e.labelStyle);let _=C;const k=await Le(x,o.name,_,e.labelStyle+"; font-weight: bold;");_+=k+20,l?(_+=await Le(x,o.requirementId?`ID: ${o.requirementId}`:"",_,e.labelStyle,m),_+=await Le(x,o.text?`Text: ${o.text}`:"",_,e.labelStyle,m),_+=await Le(x,o.risk?`Risk: ${o.risk}`:"",_,e.labelStyle,m),await Le(x,o.verifyMethod?`Verification: ${o.verifyMethod}`:"",_,e.labelStyle,m)):(_+=await Le(x,a.type?`Type: ${a.type}`:"",_,e.labelStyle,m),await Le(x,a.docRef?`Doc Ref: ${a.docRef}`:"",_,e.labelStyle,m));const w=(x.node()?.getBBox().width??200)+20,v=(x.node()?.getBBox().height??200)+20,S=-w/2,T=-v/2,B=u.default.svg(x),M=(0,i.userNodeOverrides)(e,{});"handDrawn"!==e.look&&(M.roughness=0,M.fillStyle="solid");const L=B.rectangle(S,T,w,v,M),F=x.insert(()=>L,":first-child");if(F.attr("class","basic label-container outer-path").attr("style",n),p?.length){const t=e.colorIndex??0;x.attr("data-color-id","color-"+t%p.length)}if(x.selectAll(".label").each((t,e,r)=>{const i=(0,c.select)(r[e]),n=i.attr("transform");let o=0,a=0;if(n){const t=RegExp(/translate\(([^,]+),([^)]+)\)/).exec(n);t&&(o=parseFloat(t[1]),a=parseFloat(t[2]))}const s=a-v/2;let l=S+10;0!==e&&1!==e||(l=o),i.attr("transform",`translate(${l}, ${s+20})`)}),_>C+k+20){const t=T+C+k+20;let r;if("neo"===e.look){const e=.001,i=[[S,t],[S+w,t],[S+w,t+e],[S,t+e]];r=B.polygon(i,M)}else r=B.line(S,t,S+w,t,M);x.insert(()=>r).attr("class","divider")}return y(e,F),e.intersect=function(t){return I.rect(e,t)},n&&"handDrawn"!==e.look&&(g||p?.length)&&x.selectAll("path").attr("style",n),x}async function Le(t,e,r,i="",o="center"){if(""===e)return 0;const l=t.insert("g").attr("class","label").attr("style",i),h=(0,s.getConfig2)(),u=h.htmlLabels??!0,d=await(0,n.createText)(l,(0,s.sanitizeText2)((0,a.decodeEntities)(e)),{width:(0,a.calculateTextWidth)(e,h)+50,classes:"markdown-node-label",useHtmlLabels:u,style:i},h);let f;if(u){const t=d.children[0],e=(0,c.select)(d);"start"===o&&(0,c.select)(t).style("text-align","left"),f=t.getBoundingClientRect(),e.attr("width",f.width),e.attr("height",f.height)}else{const t=d.children[0];for(const e of t.children)i&&e.setAttribute("style",i);if("start"===o){t.setAttribute("text-anchor","start");for(const e of t.children)e.setAttribute("text-anchor","start")}f=d.getBBox(),f.height+=6}return l.attr("transform",`translate(${-f.width/2},${-f.height/2+r})`),f.height}(0,h.__name)(ke,"erBox"),(0,h.__name)(we,"addText"),(0,h.__name)(ve,"lineToPolygon"),(0,h.__name)(Se,"textHelper"),(0,h.__name)(Te,"addText"),(0,h.__name)(Be,"classBox"),(0,h.__name)(Me,"requirementBox"),(0,h.__name)(Le,"addText");var Fe=(0,h.__name)(t=>{switch(t){case"Very High":return"red";case"High":return"orange";case"Medium":return null;case"Low":return"blue";case"Very Low":return"lightblue"}},"colorFromPriority");async function Ae(t,e,{config:r}){const{labelStyles:n,nodeStyles:o}=(0,i.styles2String)(e);e.labelStyle=n||"";const a=e.width;e.width=(e.width??200)-10;const{shapeSvg:s,bbox:l,label:h}=await g(t,e,b(e)),c=e.padding||10;let d,f="";"ticket"in e&&e.ticket&&r?.kanban?.ticketBaseUrl&&(f=r?.kanban?.ticketBaseUrl.replace("#TICKET#",e.ticket),d=s.insert("svg:a",":first-child").attr("class","kanban-ticket-link").attr("xlink:href",f).attr("target","_blank"));const p={useHtmlLabels:e.useHtmlLabels,labelStyle:e.labelStyle||"",width:e.width,img:e.img,padding:e.padding||8,centerLabel:!1};let x,C;({label:x,bbox:C}=d?await m(d,"ticket"in e&&e.ticket||"",p):await m(s,"ticket"in e&&e.ticket||"",p));const{label:_,bbox:k}=await m(s,"assigned"in e&&e.assigned||"",p);e.width=a;const w=e?.width||0,S=Math.max(C.height,k.height)/2,T=Math.max(l.height+20,e?.height||0)+S,B=-w/2,M=-T/2;let L;h.attr("transform","translate("+(c-w/2)+", "+(-S-l.height/2)+")"),x.attr("transform","translate("+(c-w/2)+", "+(-S+l.height/2)+")"),_.attr("transform","translate("+(c+w/2-k.width-20)+", "+(-S+l.height/2)+")");const{rx:F,ry:A}=e,{cssStyles:E}=e;if("handDrawn"===e.look){const t=u.default.svg(s),r=(0,i.userNodeOverrides)(e,{}),n=F||A?t.path(v(B,M,w,T,F||0),r):t.rectangle(B,M,w,T,r);L=s.insert(()=>n,":first-child"),L.attr("class","basic label-container").attr("style",E||null)}else{L=s.insert("rect",":first-child"),L.attr("class","basic label-container __APA__").attr("style",o).attr("rx",F??5).attr("ry",A??5).attr("x",B).attr("y",M).attr("width",w).attr("height",T);const t="priority"in e&&e.priority;if(t){const e=s.append("line"),r=B+2,i=M+Math.floor((F??0)/2),n=M+T-Math.floor((F??0)/2);e.attr("x1",r).attr("y1",i).attr("x2",r).attr("y2",n).attr("stroke-width","4").attr("stroke",Fe(t))}}return y(e,L),e.height=T,e.intersect=function(t){return I.rect(e,t)},s}async function Ee(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const{shapeSvg:o,bbox:s,halfPadding:h,label:c}=await g(t,e,b(e)),d=s.width+10*h,f=s.height+8*h,p=.15*d,{cssStyles:m}=e,x=s.width+20,C=s.height+20,_=Math.max(d,x),k=Math.max(f,C);let w;c.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`);const v=`M0 0 \n a${p},${p} 1 0,0 ${.25*_},${-1*k*.1}\n a${p},${p} 1 0,0 ${.25*_},0\n a${p},${p} 1 0,0 ${.25*_},0\n a${p},${p} 1 0,0 ${.25*_},${.1*k}\n\n a${p},${p} 1 0,0 ${.15*_},${.33*k}\n a${.8*p},${.8*p} 1 0,0 0,${.34*k}\n a${p},${p} 1 0,0 ${-1*_*.15},${.33*k}\n\n a${p},${p} 1 0,0 ${-1*_*.25},${.15*k}\n a${p},${p} 1 0,0 ${-1*_*.25},0\n a${p},${p} 1 0,0 ${-1*_*.25},0\n a${p},${p} 1 0,0 ${-1*_*.25},${-1*k*.15}\n\n a${p},${p} 1 0,0 ${-1*_*.1},${-1*k*.33}\n a${.8*p},${.8*p} 1 0,0 0,${-1*k*.34}\n a${p},${p} 1 0,0 ${.1*_},${-1*k*.33}\n H0 V0 Z`;if("handDrawn"===e.look){const t=u.default.svg(o),r=(0,i.userNodeOverrides)(e,{}),n=t.path(v,r);w=o.insert(()=>n,":first-child"),w.attr("class","basic label-container").attr("style",(0,a.handleUndefinedAttr)(m))}else w=o.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",v);return w.attr("transform",`translate(${-_/2}, ${-k/2})`),y(e,w),e.calcIntersect=function(t,e){return I.rect(t,e)},e.intersect=function(t){return l.log.info("Bang intersect",e,t),I.rect(e,t)},o}async function $e(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const{shapeSvg:o,bbox:s,halfPadding:h,label:c}=await g(t,e,b(e)),d=s.width+2*h,f=s.height+2*h,p=.15*d,m=.25*d,x=.35*d,C=.2*d,{cssStyles:_}=e;let k;const w=`M0 0 \n a${p},${p} 0 0,1 ${.25*d},${-1*d*.1}\n a${x},${x} 1 0,1 ${.4*d},${-1*d*.1}\n a${m},${m} 1 0,1 ${.35*d},${.2*d}\n\n a${p},${p} 1 0,1 ${.15*d},${.35*f}\n a${C},${C} 1 0,1 ${-1*d*.15},${.65*f}\n\n a${m},${p} 1 0,1 ${-1*d*.25},${.15*d}\n a${x},${x} 1 0,1 ${-1*d*.5},0\n a${p},${p} 1 0,1 ${-1*d*.25},${-1*d*.15}\n\n a${p},${p} 1 0,1 ${-1*d*.1},${-1*f*.35}\n a${C},${C} 1 0,1 ${.1*d},${-1*f*.65}\n H0 V0 Z`;if("handDrawn"===e.look){const t=u.default.svg(o),r=(0,i.userNodeOverrides)(e,{}),n=t.path(w,r);k=o.insert(()=>n,":first-child"),k.attr("class","basic label-container").attr("style",(0,a.handleUndefinedAttr)(_))}else k=o.insert("path",":first-child").attr("class","basic label-container").attr("style",n).attr("d",w);return c.attr("transform",`translate(${-s.width/2}, ${-s.height/2})`),k.attr("transform",`translate(${-d/2}, ${-f/2})`),y(e,k),e.calcIntersect=function(t,e){return I.rect(t,e)},e.intersect=function(t){return l.log.info("Cloud intersect",e,t),I.rect(e,t)},o}async function Oe(t,e){const{labelStyles:r,nodeStyles:n}=(0,i.styles2String)(e);e.labelStyle=r;const{shapeSvg:o,bbox:a,halfPadding:s,label:l}=await g(t,e,b(e)),h=a.width+8*s,c=a.height+2*s,u="neo"===e.look?`\n M${-h/2} ${c/2-5}\n v${10-c}\n q0,-5 5,-5\n h${h-10}\n q5,0 5,5\n v${c-5}\n H${-h/2}\n Z\n `:`\n M${-h/2} ${c/2-5}\n v${10-c}\n q0,-5 5,-5\n h${h-10}\n q5,0 5,5\n v${c-10}\n q0,5 -5,5\n h${-(h-10)}\n q-5,0 -5,-5\n Z\n `;if(!e.domId)throw new Error(`defaultMindmapNode: node "${e.id}" is missing a domId — was render.ts domId prefixing skipped?`);const d=o.append("path").attr("id",e.domId).attr("class","node-bkg node-"+e.type).attr("style",n).attr("d",u);return o.append("line").attr("class","node-line-").attr("x1",-h/2).attr("y1",c/2).attr("x2",h/2).attr("y2",c/2),l.attr("transform",`translate(${-a.width/2}, ${-a.height/2})`),o.append(()=>l.node()),y(e,d),e.calcIntersect=function(t,e){return I.rect(t,e)},e.intersect=function(t){return I.rect(e,t)},o}async function De(t,e){return tt(t,e,{padding:e.padding??0})}(0,h.__name)(Ae,"kanbanItem"),(0,h.__name)(Ee,"bang"),(0,h.__name)($e,"cloud"),(0,h.__name)(Oe,"defaultMindmapNode"),(0,h.__name)(De,"mindmapCircle");var Ie=[{semanticName:"Process",name:"Rectangle",shortName:"rect",description:"Standard process shape",aliases:["proc","process","rectangle"],internalAliases:["squareRect"],handler:te},{semanticName:"Event",name:"Rounded Rectangle",shortName:"rounded",description:"Represents an event",aliases:["event"],internalAliases:["roundedRect"],handler:Qt},{semanticName:"Terminal Point",name:"Stadium",shortName:"stadium",description:"Terminal point",aliases:["terminal","pill"],handler:ee},{semanticName:"Subprocess",name:"Framed Rectangle",shortName:"fr-rect",description:"Subprocess",aliases:["subprocess","subproc","framed-rectangle","subroutine"],handler:oe},{semanticName:"Database",name:"Cylinder",shortName:"cyl",description:"Database storage",aliases:["db","database","cylinder"],handler:mt},{semanticName:"Data Store",name:"Data Store",shortName:"datastore",description:"Data flow diagram data store",aliases:["data-store"],handler:bt},{semanticName:"Folder",name:"Folder",shortName:"folder",description:"Folder or directory",aliases:["directory"],handler:wt},{semanticName:"Bucket",name:"Bucket",shortName:"bucket",description:"Object storage bucket",handler:R},{semanticName:"Console",name:"Console (terminal window)",shortName:"console",description:"Terminal or console window",handler:rt},{semanticName:"Browser",name:"Browser",shortName:"browser",description:"Browser window",handler:Q},{semanticName:"Person",name:"Person",shortName:"person",description:"Person (circular head above a rounded body)",handler:dt},{semanticName:"Start",name:"Circle",shortName:"circle",description:"Starting point",aliases:["circ"],handler:tt},{semanticName:"Bang",name:"Bang",shortName:"bang",description:"Bang",aliases:["bang"],handler:Ee},{semanticName:"Cloud",name:"Cloud",shortName:"cloud",description:"cloud",aliases:["cloud"],handler:$e},{semanticName:"Decision",name:"Diamond",shortName:"diam",description:"Decision-making step",aliases:["decision","diamond","question"],handler:Vt},{semanticName:"Prepare Conditional",name:"Hexagon",shortName:"hex",description:"Preparation or condition step",aliases:["hexagon","prepare"],handler:Bt},{semanticName:"Data Input/Output",name:"Lean Right",shortName:"lean-r",description:"Represents input or output",aliases:["lean-right","in-out"],internalAliases:["lean_right"],handler:Nt},{semanticName:"Data Input/Output",name:"Lean Left",shortName:"lean-l",description:"Represents output or input",aliases:["lean-left","out-in"],internalAliases:["lean_left"],handler:It},{semanticName:"Priority Action",name:"Trapezoid Base Bottom",shortName:"trap-b",description:"Priority action",aliases:["priority","trapezoid-bottom","trapezoid"],handler:fe},{semanticName:"Manual Operation",name:"Trapezoid Base Top",shortName:"trap-t",description:"Represents a manual task",aliases:["manual","trapezoid-top","inv-trapezoid"],internalAliases:["inv_trapezoid"],handler:Ot},{semanticName:"Stop",name:"Double Circle",shortName:"dbl-circ",description:"Represents a stop point",aliases:["double-circle"],internalAliases:["doublecircle"],handler:Ct},{semanticName:"Text Block",name:"Text Block",shortName:"text",description:"Text block",handler:le},{semanticName:"Card",name:"Notched Rectangle",shortName:"notch-rect",description:"Represents a card",aliases:["card","notched-rectangle"],handler:K},{semanticName:"Lined/Shaded Process",name:"Lined Rectangle",shortName:"lin-rect",description:"Lined process shape",aliases:["lined-rectangle","lined-process","lin-proc","shaded-process"],handler:Kt},{semanticName:"Start",name:"Small Circle",shortName:"sm-circ",description:"Small starting point",aliases:["start","small-circle"],internalAliases:["stateStart"],handler:ne},{semanticName:"Stop",name:"Framed Circle",shortName:"fr-circ",description:"Stop point",aliases:["stop","framed-circle"],internalAliases:["stateEnd"],handler:ie},{semanticName:"Fork/Join",name:"Filled Rectangle",shortName:"fork",description:"Fork or join in process flow",aliases:["join"],internalAliases:["forkJoin"],handler:vt},{semanticName:"Collate",name:"Hourglass",shortName:"hourglass",description:"Represents a collate operation",aliases:["hourglass","collate"],handler:Mt},{semanticName:"Comment",name:"Curly Brace",shortName:"brace",description:"Adds a comment",aliases:["comment","brace-l"],handler:at},{semanticName:"Comment Right",name:"Curly Brace",shortName:"brace-r",description:"Adds a comment",handler:lt},{semanticName:"Comment with braces on both sides",name:"Curly Braces",shortName:"braces",description:"Adds a comment",handler:ct},{semanticName:"Com Link",name:"Lightning Bolt",shortName:"bolt",description:"Communication link",aliases:["com-link","lightning-bolt"],handler:Pt},{semanticName:"Document",name:"Document",shortName:"doc",description:"Represents a document",aliases:["doc","document"],handler:me},{semanticName:"Delay",name:"Half-Rounded Rectangle",shortName:"delay",description:"Represents a delay",aliases:["half-rounded-rectangle"],handler:St},{semanticName:"Direct Access Storage",name:"Horizontal Cylinder",shortName:"h-cyl",description:"Direct access storage",aliases:["das","horizontal-cylinder"],handler:de},{semanticName:"Disk Storage",name:"Lined Cylinder",shortName:"lin-cyl",description:"Disk storage",aliases:["disk","lined-cylinder"],handler:jt},{semanticName:"Display",name:"Curved Trapezoid",shortName:"curv-trap",description:"Represents a display",aliases:["curved-trapezoid","display"],handler:ut},{semanticName:"Divided Process",name:"Divided Rectangle",shortName:"div-rect",description:"Divided process shape",aliases:["div-proc","divided-rectangle","divided-process"],handler:xt},{semanticName:"Extract",name:"Triangle",shortName:"tri",description:"Extraction process",aliases:["extract","triangle"],handler:ge},{semanticName:"Internal Storage",name:"Window Pane",shortName:"win-pane",description:"Internal storage",aliases:["internal-storage","window-pane"],handler:xe},{semanticName:"Junction",name:"Filled Circle",shortName:"f-circ",description:"Junction point",aliases:["junction","filled-circle"],handler:_t},{semanticName:"Loop Limit",name:"Trapezoidal Pentagon",shortName:"notch-pent",description:"Loop limit step",aliases:["loop-limit","notched-pentagon"],handler:pe},{semanticName:"Manual File",name:"Flipped Triangle",shortName:"flip-tri",description:"Manual file operation",aliases:["manual-file","flipped-triangle"],handler:kt},{semanticName:"Manual Input",name:"Sloped Rectangle",shortName:"sl-rect",description:"Manual input step",aliases:["manual-input","sloped-rectangle"],handler:Jt},{semanticName:"Multi-Document",name:"Stacked Document",shortName:"docs",description:"Multiple documents",aliases:["documents","st-doc","stacked-document"],handler:Ut},{semanticName:"Multi-Process",name:"Stacked Rectangle",shortName:"st-rect",description:"Multiple processes",aliases:["procs","processes","stacked-rectangle"],handler:Ht},{semanticName:"Stored Data",name:"Bow Tie Rectangle",shortName:"bow-rect",description:"Stored data",aliases:["stored-data","bow-tie-rectangle"],handler:z},{semanticName:"Summary",name:"Crossed Circle",shortName:"cross-circ",description:"Summary",aliases:["summary","crossed-circle"],handler:nt},{semanticName:"Tagged Document",name:"Tagged Document",shortName:"tag-doc",description:"Tagged document",aliases:["tag-doc","tagged-document"],handler:se},{semanticName:"Tagged Process",name:"Tagged Rectangle",shortName:"tag-rect",description:"Tagged process",aliases:["tagged-rectangle","tag-proc","tagged-process"],handler:ae},{semanticName:"Paper Tape",name:"Flag",shortName:"flag",description:"Paper tape",aliases:["paper-tape"],handler:ye},{semanticName:"Odd",name:"Odd",shortName:"odd",description:"Odd shape",internalAliases:["rect_left_inv_arrow"],handler:Xt},{semanticName:"Lined Document",name:"Lined Document",shortName:"lin-doc",description:"Lined document",aliases:["lined-document"],handler:Wt}],Ne=(0,h.__name)(()=>{const t={state:re,choice:J,note:Yt,composite:et,rectWithTitle:Zt,labelRect:Dt,block_arrow:Z,collapsedGroup:j,iconSquare:Et,iconCircle:Ft,icon:Lt,iconRounded:At,imageSquare:$t,anchor:N,kanbanItem:Ae,mindmapCircle:De,defaultMindmapNode:Oe,classBox:Be,erBox:ke,requirementBox:Me},e=[...Object.entries(t),...Ie.flatMap(t=>[t.shortName,..."aliases"in t?t.aliases:[],..."internalAliases"in t?t.internalAliases:[]].map(e=>[e,t.handler]))];return Object.fromEntries(e)},"generateShapeMap")();function Pe(t){return t in Ne}(0,h.__name)(Pe,"isValidShape")},27166(t,e,r){r.r(e),r.d(e,{log:()=>a,setLogLevel:()=>s});var i=r(79456),n=r(23464),o={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},a={trace:(0,i.__name)((...t)=>{},"trace"),debug:(0,i.__name)((...t)=>{},"debug"),info:(0,i.__name)((...t)=>{},"info"),warn:(0,i.__name)((...t)=>{},"warn"),error:(0,i.__name)((...t)=>{},"error"),fatal:(0,i.__name)((...t)=>{},"fatal")},s=(0,i.__name)(function(t="fatal"){let e=o.fatal;"string"==typeof t?t.toLowerCase()in o&&(e=o[t]):"number"==typeof t&&(e=t),a.trace=()=>{},a.debug=()=>{},a.info=()=>{},a.warn=()=>{},a.error=()=>{},a.fatal=()=>{},e<=o.fatal&&(a.fatal=console.error?console.error.bind(console,l("FATAL"),"color: orange"):console.log.bind(console,"[35m",l("FATAL"))),e<=o.error&&(a.error=console.error?console.error.bind(console,l("ERROR"),"color: orange"):console.log.bind(console,"[31m",l("ERROR"))),e<=o.warn&&(a.warn=console.warn?console.warn.bind(console,l("WARN"),"color: orange"):console.log.bind(console,"[33m",l("WARN"))),e<=o.info&&(a.info=console.info?console.info.bind(console,l("INFO"),"color: lightblue"):console.log.bind(console,"[34m",l("INFO"))),e<=o.debug&&(a.debug=console.debug?console.debug.bind(console,l("DEBUG"),"color: lightgreen"):console.log.bind(console,"[32m",l("DEBUG"))),e<=o.trace&&(a.trace=console.debug?console.debug.bind(console,l("TRACE"),"color: lightgreen"):console.log.bind(console,"[32m",l("TRACE")))},"setLogLevel"),l=(0,i.__name)(t=>`%c${n().format("ss.SSS")} : ${t} : `,"format")},79456(t,e,r){r.r(e),r.d(e,{__export:()=>o,__name:()=>n});var i=Object.defineProperty,n=(t,e)=>i(t,"name",{value:e,configurable:!0}),o=(t,e)=>{for(var r in e)i(t,r,{get:e[r],enumerable:!0})}},94636(t,e,r){r.d(e,{clearLayoutRenderState:()=>n.clearLayoutRenderState,createCommonLayoutRenderer:()=>n.createCommonLayoutRenderer,default:()=>wr,defaultMeasureLayout:()=>n.defaultMeasureLayout,paintLayoutData:()=>n.paintLayoutData}),r.r(e);var i=r(64342),n=r(79528),o=r(84666),a=r(67594),s=(r(75972),r(41298),r(6342),r(51752),r(48550),r(77948),r(56350)),l=r(70848),h=r(39989),c=r(27166),u=r(79456),d=r(8968),f=r(79806),p="comm",g="rule",m="decl",y="@keyframes",b="@layer",x=Math.abs,C=String.fromCharCode;function _(t){return t.trim()}function k(t,e,r){return t.replace(e,r)}function w(t,e,r){return t.indexOf(e,r)}function v(t,e){return 0|t.charCodeAt(e)}function S(t,e,r){return t.slice(e,r)}function T(t){return t.length}function B(t){return t.length}function M(t,e){return e.push(t),t}function L(t,e){for(var r="",i=0;i<t.length;i++)r+=e(t[i],i,t,e)||"";return r}function F(t,e,r,i){switch(t.type){case b:if(t.children.length)break;case"@import":case"@namespace":case m:return t.return=t.return||t.value;case p:return"";case y:return t.return=t.value+"{"+L(t.children,i)+"}";case g:if(!T(t.value=t.props.join(",")))return""}return T(r=L(t.children,i))?t.return=t.value+"{"+r+"}":""}Object.assign;var A=1,E=1,$=0,O=0,D=0,I="";function N(t,e,r,i,n,o,a,s){return{value:t,root:e,parent:r,type:i,props:n,children:o,line:A,column:E,length:a,return:"",siblings:s}}function P(){return D=O>0?v(I,--O):0,E--,10===D&&(E=1,A--),D}function q(){return D=O<$?v(I,O++):0,E++,10===D&&(E=1,A++),D}function z(){return v(I,O)}function R(){return O}function j(t,e){return S(I,t,e)}function W(t){switch(t){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function H(t){return _(j(O-1,G(91===t?t+2:40===t?t+1:t)))}function U(t){for(;(D=z())&&D<33;)q();return W(t)>2||W(D)>3?"":" "}function Y(t,e){for(;--e&&q()&&!(D<48||D>102||D>57&&D<65||D>70&&D<97););return j(t,R()+(e<6&&32==z()&&32==q()))}function G(t){for(;q();)switch(D){case t:return O;case 34:case 39:34!==t&&39!==t&&G(D);break;case 40:41===t&&G(t);break;case 92:q()}return O}function V(t,e){for(;q()&&t+D!==57&&(t+D!==84||47!==z()););return"/*"+j(e,O-1)+"*"+C(47===t?t:q())}function X(t){for(;!W(z());)q();return j(t,O)}function Z(t){return function(t){return I="",t}(Q("",null,null,null,[""],t=function(t){return A=E=1,$=T(I=t),O=0,[]}(t),0,[0],t))}function Q(t,e,r,i,n,o,a,s,l){for(var h=0,c=0,u=a,d=0,f=0,p=0,g=1,m=1,y=1,b=0,_="",B=n,L=o,F=i,A=_;m;)switch(p=b,b=q()){case 40:if(108!=p&&58==v(A,u-1)){-1!=w(A+=k(H(b),"&","&\f"),"&\f",x(h?s[h-1]:0))&&(y=-1);break}case 34:case 39:case 91:A+=H(b);break;case 9:case 10:case 13:case 32:A+=U(p);break;case 92:A+=Y(R()-1,7);continue;case 47:switch(z()){case 42:case 47:M(J(V(q(),R()),e,r,l),l),5!=W(p||1)&&5!=W(z()||1)||!T(A)||" "===S(A,-1,void 0)||(A+=" ");break;default:A+="/"}break;case 123*g:s[h++]=T(A)*y;case 125*g:case 59:case 0:switch(b){case 0:case 125:m=0;case 59+c:-1==y&&(A=k(A,/\f/g,"")),f>0&&(T(A)-u||0===g&&47===p)&&M(f>32?tt(A+";",i,r,u-1,l):tt(k(A," ","")+";",i,r,u-2,l),l);break;case 59:A+=";";default:if(M(F=K(A,e,r,h,c,n,s,_,B=[],L=[],u,o),o),123===b)if(0===c)Q(A,e,F,F,B,o,u,s,L);else{switch(d){case 99:if(110===v(A,3))break;case 108:if(97===v(A,2))break;default:c=0;case 100:case 109:case 115:}c?Q(t,F,F,i&&M(K(t,F,F,0,0,n,s,_,n,B=[],u,L),L),n,L,u,s,i?B:L):Q(A,F,F,F,[""],L,0,s,L)}}h=c=f=0,g=y=1,_=A="",u=a;break;case 58:u=1+T(A),f=p;default:if(g<1)if(123==b)--g;else if(125==b&&0==g++&&125==P())continue;switch(A+=C(b),b*g){case 38:y=c>0?1:(A+="\f",-1);break;case 44:s[h++]=(T(A)-1)*y,y=1;break;case 64:45===z()&&(A+=H(q())),d=z(),c=u=T(_=A+=X(R())),b++;break;case 45:45===p&&2==T(A)&&(g=0)}}return o}function K(t,e,r,i,n,o,a,s,l,h,c,u){for(var d=n-1,f=0===n?o:[""],p=B(f),m=0,y=0,b=0;m<i;++m)for(var C=0,w=S(t,d+1,d=x(y=a[m])),v=t;C<p;++C)(v=_(y>0?f[C]+" "+w:k(w,/&\f/g,f[C])))&&(l[b++]=v);return N(t,e,r,0===n?g:s,l,h,c,u)}function J(t,e,r,i){return N(t,e,r,p,C(D),S(t,2,-2),0,i)}function tt(t,e,r,i,n){return N(t,e,r,m,S(t,0,i),S(t,i+1,-1),i,n)}var et=r(97519),rt=r(721),it=r(8081),nt=r(30197),ot=r(76076);function at(t){if(null==t)return!0;if((0,it.isArrayLike)(t))return!!("function"==typeof t.splice||"string"==typeof t||(0,rt.isBuffer)(t)||(0,ot.isTypedArray)(t)||(0,nt.isArguments)(t))&&0===t.length;if("object"==typeof t||"function"==typeof t){if(t instanceof Map||t instanceof Set)return 0===t.size;const e=Object.keys(t);return function(t){const e=t?.constructor;return t===("function"==typeof e?e.prototype:Object.prototype)}(t)?0===e.filter(t=>"constructor"!==t).length:0===e.length}return!0}var st={id:"c4",detector:(0,u.__name)(t=>/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await r.e(8189).then(r.bind(r,38189));return{id:"c4",diagram:t}},"loader")},lt="flowchart",ht={id:lt,detector:(0,u.__name)((t,e)=>"dagre-wrapper"!==e?.flowchart?.defaultRenderer&&"elk"!==e?.flowchart?.defaultRenderer&&/^\s*graph/.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await Promise.all([r.e(7701),r.e(5959)]).then(r.bind(r,25959));return{id:lt,diagram:t}},"loader")},ct="flowchart-v2",ut={id:ct,detector:(0,u.__name)((t,e)=>"dagre-d3"!==e?.flowchart?.defaultRenderer&&("elk"===e?.flowchart?.defaultRenderer&&(e.layout="elk"),!(!/^\s*graph/.test(t)||"dagre-wrapper"!==e?.flowchart?.defaultRenderer)||/^\s*flowchart/.test(t)),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await Promise.all([r.e(7701),r.e(5959)]).then(r.bind(r,25959));return{id:ct,diagram:t}},"loader")},dt="swimlane",ft={id:dt,detector:(0,u.__name)(t=>/^\s*swimlane-beta\b/.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await Promise.all([r.e(7701),r.e(2818)]).then(r.bind(r,82818));return{id:dt,diagram:t}},"loader")},pt={id:"er",detector:(0,u.__name)(t=>/^\s*erDiagram/.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await r.e(9046).then(r.bind(r,69046));return{id:"er",diagram:t}},"loader")},gt="gitGraph",mt={id:gt,detector:(0,u.__name)(t=>/^\s*gitGraph/.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await Promise.all([r.e(3744),r.e(3126)]).then(r.bind(r,63126));return{id:gt,diagram:t}},"loader")},yt="gantt",bt={id:yt,detector:(0,u.__name)(t=>/^\s*gantt/.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await r.e(1047).then(r.bind(r,91047));return{id:yt,diagram:t}},"loader")},xt="info",Ct={id:xt,detector:(0,u.__name)(t=>/^\s*info/.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await Promise.all([r.e(3744),r.e(2658)]).then(r.bind(r,32658));return{id:xt,diagram:t}},"loader")},_t={id:"pie",detector:(0,u.__name)(t=>/^\s*pie/.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await Promise.all([r.e(3744),r.e(1839)]).then(r.bind(r,11839));return{id:"pie",diagram:t}},"loader")},kt="quadrantChart",wt={id:kt,detector:(0,u.__name)(t=>/^\s*quadrantChart/.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await r.e(4029).then(r.bind(r,94029));return{id:kt,diagram:t}},"loader")},vt="xychart",St={id:vt,detector:(0,u.__name)(t=>/^\s*xychart(-beta)?/.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await r.e(6276).then(r.bind(r,76276));return{id:vt,diagram:t}},"loader")},Tt="requirement",Bt={id:Tt,detector:(0,u.__name)(t=>/^\s*requirement(Diagram)?/.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await r.e(6566).then(r.bind(r,76566));return{id:Tt,diagram:t}},"loader")},Mt="sequence",Lt={id:Mt,detector:(0,u.__name)(t=>/^\s*sequenceDiagram/.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await r.e(5797).then(r.bind(r,18178));return{id:Mt,diagram:t}},"loader")},Ft="class",At={id:Ft,detector:(0,u.__name)((t,e)=>"dagre-wrapper"!==e?.class?.defaultRenderer&&/^\s*classDiagram/.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await Promise.all([r.e(7843),r.e(3504)]).then(r.bind(r,73504));return{id:Ft,diagram:t}},"loader")},Et="classDiagram",$t={id:Et,detector:(0,u.__name)((t,e)=>!(!/^\s*classDiagram/.test(t)||"dagre-wrapper"!==e?.class?.defaultRenderer)||/^\s*classDiagram-v2/.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await Promise.all([r.e(7843),r.e(2073)]).then(r.bind(r,2073));return{id:Et,diagram:t}},"loader")},Ot="state",Dt={id:Ot,detector:(0,u.__name)((t,e)=>"dagre-wrapper"!==e?.state?.defaultRenderer&&/^\s*stateDiagram/.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await Promise.all([r.e(1514),r.e(4229),r.e(3770)]).then(r.bind(r,23770));return{id:Ot,diagram:t}},"loader")},It="stateDiagram",Nt={id:It,detector:(0,u.__name)((t,e)=>!!/^\s*stateDiagram-v2/.test(t)||!(!/^\s*stateDiagram/.test(t)||"dagre-wrapper"!==e?.state?.defaultRenderer),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await Promise.all([r.e(4229),r.e(9491)]).then(r.bind(r,29491));return{id:It,diagram:t}},"loader")},Pt="journey",qt={id:Pt,detector:(0,u.__name)(t=>/^\s*journey/.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await r.e(6368).then(r.bind(r,16368));return{id:Pt,diagram:t}},"loader")},zt={draw:(0,u.__name)((t,e,r)=>{c.log.debug("rendering svg for syntax error\n");const n=(0,i.selectSvgElement)(e),o=n.append("g");n.attr("viewBox","0 0 2412 512"),(0,h.configureSvgSize)(n,100,512,!0),o.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"),o.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"),o.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"),o.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"),o.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"),o.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"),o.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in text"),o.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text(`mermaid version ${r}`)},"draw")},Rt=zt,jt={db:{},renderer:zt,parser:{parse:(0,u.__name)(()=>{},"parse")}},Wt="flowchart-elk",Ht={id:Wt,detector:(0,u.__name)((t,e={})=>!!(/^\s*flowchart-elk/.test(t)||/^\s*(flowchart|graph)/.test(t)&&"elk"===e?.flowchart?.defaultRenderer)&&(e.layout="elk",!0),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await Promise.all([r.e(7701),r.e(5959)]).then(r.bind(r,25959));return{id:Wt,diagram:t}},"loader")},Ut="timeline",Yt={id:Ut,detector:(0,u.__name)(t=>/^\s*timeline/.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await r.e(7394).then(r.bind(r,67394));return{id:Ut,diagram:t}},"loader")},Gt="mindmap",Vt={id:Gt,detector:(0,u.__name)(t=>/^\s*mindmap/.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await r.e(9533).then(r.bind(r,69533));return{id:Gt,diagram:t}},"loader")},Xt="kanban",Zt={id:Xt,detector:(0,u.__name)(t=>/^\s*kanban/.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await r.e(2216).then(r.bind(r,12216));return{id:Xt,diagram:t}},"loader")},Qt="sankey",Kt={id:Qt,detector:(0,u.__name)(t=>/^\s*sankey(-beta)?/.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await r.e(4937).then(r.bind(r,4937));return{id:Qt,diagram:t}},"loader")},Jt="packet",te={id:Jt,detector:(0,u.__name)(t=>/^\s*packet(-beta)?/.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await Promise.all([r.e(3744),r.e(710)]).then(r.bind(r,80710));return{id:Jt,diagram:t}},"loader")},ee="radar",re={id:ee,detector:(0,u.__name)(t=>/^\s*radar-beta/.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await Promise.all([r.e(3744),r.e(6900)]).then(r.bind(r,96900));return{id:ee,diagram:t}},"loader")},ie="block",ne={id:ie,detector:(0,u.__name)(t=>/^\s*block(-beta)?/.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await r.e(7054).then(r.bind(r,77054));return{id:ie,diagram:t}},"loader")},oe="treeView",ae={id:oe,detector:(0,u.__name)(t=>/^\s*treeView-beta/.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await Promise.all([r.e(3744),r.e(7108)]).then(r.bind(r,57108));return{id:oe,diagram:t}},"loader")},se="architecture",le={id:se,detector:(0,u.__name)(t=>/^\s*architecture/.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await Promise.all([r.e(3744),r.e(8936),r.e(3007)]).then(r.bind(r,63007));return{id:se,diagram:t}},"loader")},he="eventmodeling",ce={id:he,detector:(0,u.__name)(t=>/^\s*eventmodeling/.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await Promise.all([r.e(3744),r.e(1037)]).then(r.bind(r,21037));return{id:he,diagram:t}},"loader")},ue="ishikawa",de={id:ue,detector:(0,u.__name)(t=>/^\s*ishikawa(-beta)?\b/i.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await r.e(2712).then(r.bind(r,92712));return{id:ue,diagram:t}},"loader")},fe="venn",pe={id:fe,detector:(0,u.__name)(t=>/^\s*venn-beta/.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await r.e(2107).then(r.bind(r,62107));return{id:fe,diagram:t}},"loader")},ge="treemap",me={id:ge,detector:(0,u.__name)(t=>/^\s*treemap/.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await Promise.all([r.e(3744),r.e(4310)]).then(r.bind(r,4310));return{id:ge,diagram:t}},"loader")},ye="wardley",be={id:ye,detector:(0,u.__name)(t=>/^\s*wardley-beta/i.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await Promise.all([r.e(3744),r.e(7418)]).then(r.bind(r,57418));return{id:ye,diagram:t}},"loader")},xe="cynefin",Ce={id:xe,detector:(0,u.__name)(t=>/^\s*cynefin-beta(?:[\s:]|$)/.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await Promise.all([r.e(3744),r.e(3072)]).then(r.bind(r,13072));return{id:xe,diagram:t}},"loader")},_e="railroad",ke={id:_e,detector:(0,u.__name)(t=>/^\s*railroad-beta/i.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await Promise.all([r.e(3744),r.e(7592),r.e(8323)]).then(r.bind(r,68323));return{id:_e,diagram:t}},"loader")},we="railroadEbnf",ve={id:we,detector:(0,u.__name)(t=>/^\s*railroad-ebnf-beta/i.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await Promise.all([r.e(3744),r.e(7592),r.e(8941)]).then(r.bind(r,68941));return{id:we,diagram:t}},"loader")},Se="railroadAbnf",Te={id:Se,detector:(0,u.__name)(t=>/^\s*railroad-abnf-beta/i.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await Promise.all([r.e(3744),r.e(7592),r.e(8403)]).then(r.bind(r,48403));return{id:Se,diagram:t}},"loader")},Be="railroadPeg",Me={id:Be,detector:(0,u.__name)(t=>/^\s*railroad-peg-beta/i.test(t),"detector"),loader:(0,u.__name)(async()=>{const{diagram:t}=await Promise.all([r.e(3744),r.e(7592),r.e(4159)]).then(r.bind(r,4159));return{id:Be,diagram:t}},"loader")},Le=!1,Fe=(0,u.__name)(()=>{Le||(Le=!0,(0,h.registerDiagram)("error",jt,t=>"error"===t.toLowerCase().trim()),(0,h.registerDiagram)("---",{db:{clear:(0,u.__name)(()=>{},"clear")},styles:{},renderer:{draw:(0,u.__name)(()=>{},"draw")},parser:{parse:(0,u.__name)(()=>{throw new Error("Diagrams beginning with --- are not valid. If you were trying to use a YAML front-matter, please ensure that you've correctly opened and closed the YAML front-matter with un-indented `---` blocks")},"parse")},init:(0,u.__name)(()=>null,"init")},t=>t.toLowerCase().trimStart().startsWith("---")),(0,h.registerLazyLoadedDiagrams)(Ht,Vt,le),(0,h.registerLazyLoadedDiagrams)(st,Zt,$t,At,pt,bt,Ct,_t,Bt,Lt,ft,ut,ht,Yt,mt,Nt,Dt,qt,wt,Kt,te,St,ne,ce,ae,re,de,me,ke,ve,Te,Me,pe,be,Ce))},"addDiagrams"),Ae=(0,u.__name)(async()=>{c.log.debug("Loading registered diagrams");const t=(await Promise.allSettled(Object.entries(h.detectors).map(async([t,{detector:e,loader:r}])=>{if(r)try{(0,h.getDiagram)(t)}catch{try{const{diagram:t,id:i}=await r();(0,h.registerDiagram)(i,t,e)}catch(e){throw c.log.error(`Failed to load external diagram with key ${t}. Removing from detectors.`),delete h.detectors[t],e}}}))).filter(t=>"rejected"===t.status);if(t.length>0){c.log.error(`Failed to load ${t.length} external diagrams`);for(const e of t)c.log.error(e);throw new Error(`Failed to load ${t.length} external diagrams`)}},"loadRegisteredDiagrams");function Ee(t,e){t.attr("role","graphics-document document"),""!==e&&t.attr("aria-roledescription",e)}function $e(t,e,r,i){if(void 0!==t.insert){if(r){const e=`chart-desc-${i}`;t.attr("aria-describedby",e),t.insert("desc",":first-child").attr("id",e).text(r)}if(e){const r=`chart-title-${i}`;t.attr("aria-labelledby",r),t.insert("title",":first-child").attr("id",r).text(e)}}}(0,u.__name)(Ee,"setA11yDiagramInfo"),(0,u.__name)($e,"addSVGa11yTitleDescription");var Oe=class t{constructor(t,e,r,i,n){this.type=t,this.text=e,this.db=r,this.parser=i,this.renderer=n}static{(0,u.__name)(this,"Diagram")}static async fromText(e,r={}){const i=(0,h.getConfig)(),n=(0,h.detectType)(e,i);e=(0,l.encodeEntities)(e)+"\n";try{(0,h.getDiagram)(n)}catch{const t=(0,h.getDiagramLoader)(n);if(!t)throw new h.UnknownDiagramError(`Diagram ${n} not found.`);const{id:e,diagram:r}=await t();(0,h.registerDiagram)(e,r)}const{db:o,parser:a,renderer:s,init:c}=(0,h.getDiagram)(n);return a.parser&&(a.parser.yy=o),o.clear?.(),c?.(i),r.title&&o.setDiagramTitle?.(r.title),await a.parse(e),new t(n,e,o,a,s)}async render(t,e){await this.renderer.draw(this.text,t,e,this)}getParser(){return this.parser}getType(){return this.type}},De=[],Ie=(0,u.__name)(()=>{De.forEach(t=>{t()}),De=[]},"attachFunctions"),Ne=(0,u.__name)(t=>t.replace(/^\s*%%(?!{)[^\n]+\n?/gm,"").trimStart(),"cleanupComments");function Pe(t){const e=t.match(h.frontMatterRegex);if(!e)return{text:t,metadata:{}};const r=e[1],i=r?e[2].split("\n").map(t=>t.startsWith(r)?t.slice(r.length):t).join("\n"):e[2];let n=(0,o.load)(i,{schema:o.JSON_SCHEMA})??{};n="object"!=typeof n||Array.isArray(n)?{}:n;const a={};return n.displayMode&&(a.displayMode=n.displayMode.toString()),n.title&&(a.title=n.title.toString()),n.config&&(a.config=n.config),{text:t.slice(e[0].length),metadata:a}}(0,u.__name)(Pe,"extractFrontMatter");var qe=(0,u.__name)(t=>t.replace(/\r\n?/g,"\n").replace(/<(\w+)([^>]*)>/g,(t,e,r)=>"<"+e+r.replace(/="([^"]*)"/g,"='$1'")+">"),"cleanupText"),ze=(0,u.__name)(t=>{const{text:e,metadata:r}=Pe(t),{displayMode:i,title:n,config:o={}}=r;return i&&(o.gantt||(o.gantt={}),o.gantt.displayMode=i),{title:n,config:o,text:e}},"processFrontmatter"),Re=(0,u.__name)(t=>{const e=l.utils_default.detectInit(t)??{},r=l.utils_default.detectDirective(t,"wrap");return Array.isArray(r)?e.wrap=r.some(({type:t})=>"wrap"===t):"wrap"===r?.type&&(e.wrap=!0),{text:(0,l.removeDirectives)(t),directive:e}},"processDirectives");function je(t){const e=qe(t),r=ze(e),i=Re(r.text),n=(0,l.cleanAndMerge)(r.config,i.directive);return{code:t=Ne(i.text),title:r.title,config:n}}function We(t){const e=(new TextEncoder).encode(t),r=Array.from(e,t=>String.fromCodePoint(t)).join("");return btoa(r)}(0,u.__name)(je,"preprocessDiagram"),(0,u.__name)(We,"toBase64");var He=["foreignobject"],Ue=["dominant-baseline"];function Ye(t){const e=je(t);return(0,h.reset)(),(0,h.addDirective)(e.config??{}),e}async function Ge(t,e){Fe();try{const{code:e,config:r}=Ye(t);return{diagramType:(await or(e)).type,config:r}}catch(t){if(e?.suppressErrors)return!1;throw t}}(0,u.__name)(Ye,"processAndSetConfigs"),(0,u.__name)(Ge,"parse");var Ve=(0,u.__name)((t,e,r=[])=>`.${t} ${e} ${(0,h.sanitizeCss)(`{ ${r.join(" !important; ")} !important; }`)}`,"cssImportantStyles"),Xe=(0,u.__name)((t,e=new Map)=>{const r=new CSSStyleSheet;if(void 0!==t.fontFamily&&r.insertRule(`:root { --mermaid-font-family: ${t.fontFamily}}`,r.cssRules.length),void 0!==t.altFontFamily&&r.insertRule(`:root { --mermaid-alt-font-family: ${t.altFontFamily}}`,r.cssRules.length),e instanceof Map){const i=(0,h.getEffectiveHtmlLabels)(t)?["> *","span"]:["rect","polygon","ellipse","circle","path"];e.forEach(t=>{at(t.styles)||i.forEach(e=>{r.insertRule(Ve(t.id,e,t.styles),r.cssRules.length)}),at(t.textStyles)||r.insertRule(Ve(t.id,"tspan",(t?.textStyles||[]).map(t=>t.replace("color","fill"))),r.cssRules.length)})}let i="";if(void 0!==t.themeCSS)if("function"==typeof r.replaceSync){const e=new CSSStyleSheet;e.replaceSync(t.themeCSS),i=(0,h.cssStyleSheetToString)(e)+"\n"}else i+=`${t.themeCSS}\n`;return i+(0,h.cssStyleSheetToString)(r)},"createCssStyles"),Ze=(0,u.__name)((t,e)=>{return L(Z(`${t}{${e}}`),(i=B(r=[(0,u.__name)(function(e,r,i,n){if("rule"===e.type&&Array.isArray(e.props)){if(e.parent&&e.parent.type===y)return;e.props=e.props.map(r=>r===t&&Array.isArray(e.children)&&e.children.every(t=>"decl"===t.type&&new Set(["font-family","font-size","fill"]).has(t.props))?r:!r.startsWith(`${t} `)&&!r.startsWith(`${t}>`)||r.startsWith(`${t} ||`)?`${t} ${r}`:r)}else e.type.startsWith("@")&&(["@media","@supports",b,"@scope","@container","@starting-style",y].includes(e.type)||(c.log.warn(`Removing unsupported at-rule ${e.type} from CSS`),e.type=p))},"addNamespace"),F]),function(t,e,n,o){for(var a="",s=0;s<i;s++)a+=r[s](t,e,n,o)||"";return a}));var r,i},"compileCSS"),Qe=(0,u.__name)((t,e,r,i)=>{const n=Xe(t,r),o=(0,h.styles_default)(e,n,{...t.themeVariables,theme:t.theme,look:t.look},i);return Ze(i,o)},"createUserStyles"),Ke=(0,u.__name)((t="",e,r)=>{let i=t;return r||e||(i=i.replace(/marker-end="url\([\d+./:=?A-Za-z-]*?#/g,'marker-end="url(#')),i=(0,l.decodeEntities)(i),i=i.replace(/<br>/g,"<br/>"),i},"cleanUpSvgCode"),Je=(0,u.__name)((t="",e)=>`<iframe style="width:100%;height:${e?.viewBox?.baseVal?.height?e.viewBox.baseVal.height+"px":"100%"};border:0;margin:0;" src="data:text/html;charset=UTF-8;base64,${We(`<body style="margin:0">${t}</body>`)}" sandbox="allow-top-navigation-by-user-activation allow-popups">\n The "iframe" tag is not supported by your browser.\n</iframe>`,"putIntoIFrame"),tr=(0,u.__name)((t,e,r,i,n)=>{const o=t.append("div");o.attr("id",r),i&&o.attr("style",i);const a=o.append("svg").attr("id",e).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg");return n&&a.attr("xmlns:xlink",n),a.append("g"),t},"appendDivSvgG");function er(t,e){return t.append("iframe").attr("id",e).attr("style","width: 100%; height: 100%;").attr("sandbox","")}(0,u.__name)(er,"sandboxedIframe");var rr=(0,u.__name)((t,e,r,i)=>{t.getElementById(e)?.remove(),t.getElementById(r)?.remove(),t.getElementById(i)?.remove()},"removeExistingElements"),ir=(0,u.__name)(async function(t,e,r){Fe();const i=Ye(e);e=i.code;const n=(0,h.getConfig)();c.log.debug(n),e.length>(n?.maxTextSize??5e4)&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");const o=`#${t}`,a="i"+t,s="#"+a,l="d"+t,d="#"+l,p=(0,u.__name)(()=>{const t=m?s:d,e=(0,f.select)(t).node();e&&"remove"in e&&e.remove()},"removeTempElements");let g=(0,f.select)(document.body);const m="sandbox"===n.securityLevel,y="loose"===n.securityLevel,b=n.fontFamily;if(void 0!==r){if(r&&(r.innerHTML=""),m){const t=er((0,f.select)(r),a);g=(0,f.select)(t.nodes()[0].contentDocument.body),g.node().style.margin="0"}else g=(0,f.select)(r);tr(g,t,l,`font-family: ${b}`,"http://www.w3.org/1999/xlink")}else{if(rr(document,t,l,a),m){const t=er((0,f.select)(document.body),a);g=(0,f.select)(t.nodes()[0].contentDocument.body),g.node().style.margin="0"}else g=(0,f.select)("body");tr(g,t,l)}let x,C;try{x=await Oe.fromText(e,{title:i.title})}catch(t){if(n.suppressErrorRendering)throw p(),t;x=await Oe.fromText("error"),C=t}const _=g.select(d).node(),k=x.type,w=_.firstChild,v=w.firstChild,S=x.renderer.getClasses?.(e,x),T=Qe(n,k,S,o),B=document.createElement("style");B.innerHTML=T,w.insertBefore(B,v);try{await x.renderer.draw(e,t,"11.17.0",x)}catch(r){throw n.suppressErrorRendering?p():Rt.draw(e,t,"11.17.0"),r}const M=g.select(`${d} svg`),L=x.db.getAccTitle?.(),F=x.db.getAccDescription?.();ar(k,M,L,F);const A=(0,u.__name)(()=>{g.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let e=g.select(d).node().innerHTML;if(c.log.debug("config.arrowMarkerAbsolute",n.arrowMarkerAbsolute),e=Ke(e,m,(0,h.evaluate)(n.arrowMarkerAbsolute)),m){const t=g.select(d+" svg").node();e=Je(e,t)}else y||(e=et.default.sanitize(e,{ADD_TAGS:He,ADD_ATTR:Ue,HTML_INTEGRATION_POINTS:{foreignobject:!0}}));return Ie(),e},"serializeSvg")();if(C)throw C;return p(),{diagramType:k,svg:A,bindFunctions:x.db.bindFunctions}},"render");function nr(t={}){const e=(0,h.assignWithDepth_default)({},t);e?.fontFamily&&!e.themeVariables?.fontFamily&&(e.themeVariables||(e.themeVariables={}),e.themeVariables.fontFamily=e.fontFamily),(0,h.saveConfigFromInitialize)(e),e?.theme&&e.theme in h.themes_default?e.themeVariables=h.themes_default[e.theme].getThemeVariables(e.themeVariables):e&&(e.themeVariables=h.themes_default.default.getThemeVariables(e.themeVariables));const r="object"==typeof e?(0,h.setSiteConfig)(e):(0,h.getSiteConfig)();(0,c.setLogLevel)(r.logLevel),Fe()}(0,u.__name)(nr,"initialize");var or=(0,u.__name)((t,e={})=>{const{code:r}=je(t);return Oe.fromText(r,e)},"getDiagramFromText");function ar(t,e,r,i){Ee(e,t),$e(e,r,i,e.attr("id"))}(0,u.__name)(ar,"addA11yInfo");var sr=Object.freeze({render:ir,parse:Ge,getDiagramFromText:or,initialize:nr,getConfig:h.getConfig,setConfig:h.setConfig,getSiteConfig:h.getSiteConfig,updateSiteConfig:h.updateSiteConfig,reset:(0,u.__name)(()=>{(0,h.reset)()},"reset"),globalReset:(0,u.__name)(()=>{(0,h.reset)(h.defaultConfig)},"globalReset"),defaultConfig:h.defaultConfig});(0,c.setLogLevel)((0,h.getConfig)().logLevel),(0,h.reset)((0,h.getConfig)());var lr=(0,u.__name)((t,e,r)=>{c.log.warn(t),(0,l.isDetailedError)(t)?(r&&r(t.str,t.hash),e.push({...t,message:t.str,error:t})):(r&&r(t),t instanceof Error&&e.push({str:t.message,message:t.message,hash:t.name,error:t}))},"handleError"),hr=(0,u.__name)(async function(t={querySelector:".mermaid"}){try{await cr(t)}catch(e){if((0,l.isDetailedError)(e)&&c.log.error(e.str),kr.parseError&&kr.parseError(e),!t.suppressErrors)throw c.log.error("Use the suppressErrors option to suppress these errors"),e}},"run"),cr=(0,u.__name)(async function({postRenderCallback:t,querySelector:e,nodes:r}={querySelector:".mermaid"}){const i=sr.getConfig();let n;if(c.log.debug((t?"":"No ")+"Callback function found"),r)n=r;else{if(!e)throw new Error("Nodes and querySelector are both undefined");n=document.querySelectorAll(e)}c.log.debug(`Found ${n.length} diagrams`),void 0!==i?.startOnLoad&&(c.log.debug("Start On Load: "+i?.startOnLoad),sr.updateSiteConfig({startOnLoad:i?.startOnLoad}));const o=new l.utils_default.InitIDGenerator(i.deterministicIds,i.deterministicIDSeed);let a;const s=[];for(const e of Array.from(n)){if(c.log.info("Rendering diagram: "+e.id),e.getAttribute("data-processed"))continue;e.setAttribute("data-processed","true");const r=`mermaid-${o.next()}`;a=e.innerHTML,a=(0,d.dedent)(l.utils_default.entityDecode(a)).trim().replace(/<br\s*\/?>/gi,"<br/>");const i=l.utils_default.detectInit(a);i&&c.log.debug("Detected early reinit: ",i);try{const{svg:i,bindFunctions:n}=await Cr(r,a,e);e.innerHTML=i,t&&await t(r),n&&n(e)}catch(t){lr(t,s,kr.parseError)}}if(s.length>0)throw s[0]},"runThrowsErrors"),ur=(0,u.__name)(function(t){sr.initialize(t)},"initialize"),dr=(0,u.__name)(async function(t,e,r){c.log.warn("mermaid.init is deprecated. Please use run instead."),t&&ur(t);const i={postRenderCallback:r,querySelector:".mermaid"};"string"==typeof e?i.querySelector=e:e&&(e instanceof HTMLElement?i.nodes=[e]:i.nodes=e),await hr(i)},"init"),fr=(0,u.__name)(async(t,{lazyLoad:e=!0}={})=>{Fe(),(0,h.registerLazyLoadedDiagrams)(...t),!1===e&&await Ae()},"registerExternalDiagrams"),pr=(0,u.__name)(function(){if(kr.startOnLoad){const{startOnLoad:t}=sr.getConfig();t&&kr.run().catch(t=>c.log.error("Mermaid failed to initialize",t))}},"contentLoaded");"undefined"!=typeof document&&window.addEventListener("load",pr,!1);var gr=(0,u.__name)(function(t){kr.parseError=t},"setParseErrorHandler"),mr=[],yr=!1,br=(0,u.__name)(async()=>{if(!yr){for(yr=!0;mr.length>0;){const t=mr.shift();if(t)try{await t()}catch(t){c.log.error("Error executing queue",t)}}yr=!1}},"executeQueue"),xr=(0,u.__name)(async(t,e)=>new Promise((r,i)=>{const n=(0,u.__name)(()=>new Promise((n,o)=>{sr.parse(t,e).then(t=>{n(t),r(t)},t=>{c.log.error("Error parsing",t),kr.parseError?.(t),o(t),i(t)})}),"performCall");mr.push(n),br().catch(i)}),"parse"),Cr=(0,u.__name)((t,e,r)=>new Promise((i,n)=>{const o=(0,u.__name)(()=>new Promise((o,a)=>{sr.render(t,e,r).then(t=>{o(t),i(t)},t=>{c.log.error("Error parsing",t),kr.parseError?.(t),a(t),n(t)})}),"performCall");mr.push(o),br().catch(n)}),"render"),_r=(0,u.__name)(()=>Object.keys(h.detectors).map(t=>({id:t})),"getRegisteredDiagramsMetadata"),kr={startOnLoad:!0,mermaidAPI:sr,parse:xr,render:Cr,init:dr,run:hr,registerExternalDiagrams:fr,registerLayoutLoaders:a.registerLayoutLoaders,initialize:ur,parseError:void 0,contentLoaded:pr,setParseErrorHandler:gr,detectType:h.detectType,registerIconPacks:s.registerIconPacks,getRegisteredDiagramsMetadata:_r},wr=kr}};
//# sourceMappingURL=4636.js.map