Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/alex-shpak/hugo-book.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Shpak <alex-shpak@users.noreply.github.com>2022-11-03 02:28:15 +0300
committerAlex Shpak <alex-shpak@users.noreply.github.com>2022-11-03 02:28:15 +0300
commit3d2bfec18602fe0ceff28e68b7738446f21958c2 (patch)
tree602c0c27d457d9f19de8bb5cc078f933565606a5
parent412f14076251640eeae34aa63c321e3632f98dfa (diff)
#445, Upgrade mermaid to 9.2.0
-rw-r--r--static/mermaid.min.js1272
1 files changed, 1260 insertions, 12 deletions
diff --git a/static/mermaid.min.js b/static/mermaid.min.js
index dac1869..7f1691b 100644
--- a/static/mermaid.min.js
+++ b/static/mermaid.min.js
@@ -1,5 +1,1185 @@
-!function(t,e){"object"==typeof exports&&"object"==typeof module?module.exports=e():"function"==typeof define&&define.amd?define([],e):"object"==typeof exports?exports.mermaid=e():t.mermaid=e()}("undefined"!=typeof self?self:this,(function(){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=383)}([function(t,e,n){"use strict";n.r(e);var r=function(t,e){return t<e?-1:t>e?1:t>=e?0:NaN},i=function(t){var e;return 1===t.length&&(e=t,t=function(t,n){return r(e(t),n)}),{left:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)<0?r=a+1:i=a}return r},right:function(e,n,r,i){for(null==r&&(r=0),null==i&&(i=e.length);r<i;){var a=r+i>>>1;t(e[a],n)>0?i=a:r=a+1}return r}}};var a=i(r),o=a.right,s=a.left,c=o,u=function(t,e){null==e&&(e=l);for(var n=0,r=t.length-1,i=t[0],a=new Array(r<0?0:r);n<r;)a[n]=e(i,i=t[++n]);return a};function l(t,e){return[t,e]}var h=function(t,e,n){var r,i,a,o,s=t.length,c=e.length,u=new Array(s*c);for(null==n&&(n=l),r=a=0;r<s;++r)for(o=t[r],i=0;i<c;++i,++a)u[a]=n(o,e[i]);return u},f=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},d=function(t){return null===t?NaN:+t},p=function(t,e){var n,r,i=t.length,a=0,o=-1,s=0,c=0;if(null==e)for(;++o<i;)isNaN(n=d(t[o]))||(c+=(r=n-s)*(n-(s+=r/++a)));else for(;++o<i;)isNaN(n=d(e(t[o],o,t)))||(c+=(r=n-s)*(n-(s+=r/++a)));if(a>1)return c/(a-1)},g=function(t,e){var n=p(t,e);return n?Math.sqrt(n):n},y=function(t,e){var n,r,i,a=t.length,o=-1;if(null==e){for(;++o<a;)if(null!=(n=t[o])&&n>=n)for(r=i=n;++o<a;)null!=(n=t[o])&&(r>n&&(r=n),i<n&&(i=n))}else for(;++o<a;)if(null!=(n=e(t[o],o,t))&&n>=n)for(r=i=n;++o<a;)null!=(n=e(t[o],o,t))&&(r>n&&(r=n),i<n&&(i=n));return[r,i]},v=Array.prototype,m=v.slice,b=v.map,x=function(t){return function(){return t}},_=function(t){return t},k=function(t,e,n){t=+t,e=+e,n=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+n;for(var r=-1,i=0|Math.max(0,Math.ceil((e-t)/n)),a=new Array(i);++r<i;)a[r]=t+r*n;return a},w=Math.sqrt(50),E=Math.sqrt(10),T=Math.sqrt(2),C=function(t,e,n){var r,i,a,o,s=-1;if(n=+n,(t=+t)===(e=+e)&&n>0)return[t];if((r=e<t)&&(i=t,t=e,e=i),0===(o=A(t,e,n))||!isFinite(o))return[];if(o>0)for(t=Math.ceil(t/o),e=Math.floor(e/o),a=new Array(i=Math.ceil(e-t+1));++s<i;)a[s]=(t+s)*o;else for(t=Math.floor(t*o),e=Math.ceil(e*o),a=new Array(i=Math.ceil(t-e+1));++s<i;)a[s]=(t-s)/o;return r&&a.reverse(),a};function A(t,e,n){var r=(e-t)/Math.max(0,n),i=Math.floor(Math.log(r)/Math.LN10),a=r/Math.pow(10,i);return i>=0?(a>=w?10:a>=E?5:a>=T?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=w?10:a>=E?5:a>=T?2:1)}function S(t,e,n){var r=Math.abs(e-t)/Math.max(0,n),i=Math.pow(10,Math.floor(Math.log(r)/Math.LN10)),a=r/i;return a>=w?i*=10:a>=E?i*=5:a>=T&&(i*=2),e<t?-i:i}var M=function(t){return Math.ceil(Math.log(t.length)/Math.LN2)+1},O=function(){var t=_,e=y,n=M;function r(r){var i,a,o=r.length,s=new Array(o);for(i=0;i<o;++i)s[i]=t(r[i],i,r);var u=e(s),l=u[0],h=u[1],f=n(s,l,h);Array.isArray(f)||(f=S(l,h,f),f=k(Math.ceil(l/f)*f,h,f));for(var d=f.length;f[0]<=l;)f.shift(),--d;for(;f[d-1]>h;)f.pop(),--d;var p,g=new Array(d+1);for(i=0;i<=d;++i)(p=g[i]=[]).x0=i>0?f[i-1]:l,p.x1=i<d?f[i]:h;for(i=0;i<o;++i)l<=(a=s[i])&&a<=h&&g[c(f,a,0,d)].push(r[i]);return g}return r.value=function(e){return arguments.length?(t="function"==typeof e?e:x(e),r):t},r.domain=function(t){return arguments.length?(e="function"==typeof t?t:x([t[0],t[1]]),r):e},r.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?x(m.call(t)):x(t),r):n},r},D=function(t,e,n){if(null==n&&(n=d),r=t.length){if((e=+e)<=0||r<2)return+n(t[0],0,t);if(e>=1)return+n(t[r-1],r-1,t);var r,i=(r-1)*e,a=Math.floor(i),o=+n(t[a],a,t);return o+(+n(t[a+1],a+1,t)-o)*(i-a)}},N=function(t,e,n){return t=b.call(t,d).sort(r),Math.ceil((n-e)/(2*(D(t,.75)-D(t,.25))*Math.pow(t.length,-1/3)))},B=function(t,e,n){return Math.ceil((n-e)/(3.5*g(t)*Math.pow(t.length,-1/3)))},L=function(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&n>r&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&n>r&&(r=n);return r},F=function(t,e){var n,r=t.length,i=r,a=-1,o=0;if(null==e)for(;++a<r;)isNaN(n=d(t[a]))?--i:o+=n;else for(;++a<r;)isNaN(n=d(e(t[a],a,t)))?--i:o+=n;if(i)return o/i},P=function(t,e){var n,i=t.length,a=-1,o=[];if(null==e)for(;++a<i;)isNaN(n=d(t[a]))||o.push(n);else for(;++a<i;)isNaN(n=d(e(t[a],a,t)))||o.push(n);return D(o.sort(r),.5)},I=function(t){for(var e,n,r,i=t.length,a=-1,o=0;++a<i;)o+=t[a].length;for(n=new Array(o);--i>=0;)for(e=(r=t[i]).length;--e>=0;)n[--o]=r[e];return n},j=function(t,e){var n,r,i=t.length,a=-1;if(null==e){for(;++a<i;)if(null!=(n=t[a])&&n>=n)for(r=n;++a<i;)null!=(n=t[a])&&r>n&&(r=n)}else for(;++a<i;)if(null!=(n=e(t[a],a,t))&&n>=n)for(r=n;++a<i;)null!=(n=e(t[a],a,t))&&r>n&&(r=n);return r},R=function(t,e){for(var n=e.length,r=new Array(n);n--;)r[n]=t[e[n]];return r},Y=function(t,e){if(n=t.length){var n,i,a=0,o=0,s=t[o];for(null==e&&(e=r);++a<n;)(e(i=t[a],s)<0||0!==e(s,s))&&(s=i,o=a);return 0===e(s,s)?o:void 0}},z=function(t,e,n){for(var r,i,a=(null==n?t.length:n)-(e=null==e?0:+e);a;)i=Math.random()*a--|0,r=t[a+e],t[a+e]=t[i+e],t[i+e]=r;return t},U=function(t,e){var n,r=t.length,i=-1,a=0;if(null==e)for(;++i<r;)(n=+t[i])&&(a+=n);else for(;++i<r;)(n=+e(t[i],i,t))&&(a+=n);return a},$=function(t){if(!(i=t.length))return[];for(var e=-1,n=j(t,W),r=new Array(n);++e<n;)for(var i,a=-1,o=r[e]=new Array(i);++a<i;)o[a]=t[a][e];return r};function W(t){return t.length}var V=function(){return $(arguments)},H=Array.prototype.slice,G=function(t){return t};function q(t){return"translate("+(t+.5)+",0)"}function X(t){return"translate(0,"+(t+.5)+")"}function Z(t){return function(e){return+t(e)}}function J(t){var e=Math.max(0,t.bandwidth()-1)/2;return t.round()&&(e=Math.round(e)),function(n){return+t(n)+e}}function Q(){return!this.__axis}function K(t,e){var n=[],r=null,i=null,a=6,o=6,s=3,c=1===t||4===t?-1:1,u=4===t||2===t?"x":"y",l=1===t||3===t?q:X;function h(h){var f=null==r?e.ticks?e.ticks.apply(e,n):e.domain():r,d=null==i?e.tickFormat?e.tickFormat.apply(e,n):G:i,p=Math.max(a,0)+s,g=e.range(),y=+g[0]+.5,v=+g[g.length-1]+.5,m=(e.bandwidth?J:Z)(e.copy()),b=h.selection?h.selection():h,x=b.selectAll(".domain").data([null]),_=b.selectAll(".tick").data(f,e).order(),k=_.exit(),w=_.enter().append("g").attr("class","tick"),E=_.select("line"),T=_.select("text");x=x.merge(x.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),_=_.merge(w),E=E.merge(w.append("line").attr("stroke","currentColor").attr(u+"2",c*a)),T=T.merge(w.append("text").attr("fill","currentColor").attr(u,c*p).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),h!==b&&(x=x.transition(h),_=_.transition(h),E=E.transition(h),T=T.transition(h),k=k.transition(h).attr("opacity",1e-6).attr("transform",(function(t){return isFinite(t=m(t))?l(t):this.getAttribute("transform")})),w.attr("opacity",1e-6).attr("transform",(function(t){var e=this.parentNode.__axis;return l(e&&isFinite(e=e(t))?e:m(t))}))),k.remove(),x.attr("d",4===t||2==t?o?"M"+c*o+","+y+"H0.5V"+v+"H"+c*o:"M0.5,"+y+"V"+v:o?"M"+y+","+c*o+"V0.5H"+v+"V"+c*o:"M"+y+",0.5H"+v),_.attr("opacity",1).attr("transform",(function(t){return l(m(t))})),E.attr(u+"2",c*a),T.attr(u,c*p).text(d),b.filter(Q).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),b.each((function(){this.__axis=m}))}return h.scale=function(t){return arguments.length?(e=t,h):e},h.ticks=function(){return n=H.call(arguments),h},h.tickArguments=function(t){return arguments.length?(n=null==t?[]:H.call(t),h):n.slice()},h.tickValues=function(t){return arguments.length?(r=null==t?null:H.call(t),h):r&&r.slice()},h.tickFormat=function(t){return arguments.length?(i=t,h):i},h.tickSize=function(t){return arguments.length?(a=o=+t,h):a},h.tickSizeInner=function(t){return arguments.length?(a=+t,h):a},h.tickSizeOuter=function(t){return arguments.length?(o=+t,h):o},h.tickPadding=function(t){return arguments.length?(s=+t,h):s},h}function tt(t){return K(1,t)}function et(t){return K(2,t)}function nt(t){return K(3,t)}function rt(t){return K(4,t)}var it={value:function(){}};function at(){for(var t,e=0,n=arguments.length,r={};e<n;++e){if(!(t=arguments[e]+"")||t in r||/[\s.]/.test(t))throw new Error("illegal type: "+t);r[t]=[]}return new ot(r)}function ot(t){this._=t}function st(t,e){return t.trim().split(/^|\s+/).map((function(t){var n="",r=t.indexOf(".");if(r>=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}}))}function ct(t,e){for(var n,r=0,i=t.length;r<i;++r)if((n=t[r]).name===e)return n.value}function ut(t,e,n){for(var r=0,i=t.length;r<i;++r)if(t[r].name===e){t[r]=it,t=t.slice(0,r).concat(t.slice(r+1));break}return null!=n&&t.push({name:e,value:n}),t}ot.prototype=at.prototype={constructor:ot,on:function(t,e){var n,r=this._,i=st(t+"",r),a=-1,o=i.length;if(!(arguments.length<2)){if(null!=e&&"function"!=typeof e)throw new Error("invalid callback: "+e);for(;++a<o;)if(n=(t=i[a]).type)r[n]=ut(r[n],t.name,e);else if(null==e)for(n in r)r[n]=ut(r[n],t.name,null);return this}for(;++a<o;)if((n=(t=i[a]).type)&&(n=ct(r[n],t.name)))return n},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new ot(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,r,i=new Array(n),a=0;a<n;++a)i[a]=arguments[a+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=0,n=(r=this._[t]).length;a<n;++a)r[a].value.apply(e,i)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var r=this._[t],i=0,a=r.length;i<a;++i)r[i].value.apply(e,n)}};var lt=at;function ht(){}var ft=function(t){return null==t?ht:function(){return this.querySelector(t)}};function dt(){return[]}var pt=function(t){return null==t?dt:function(){return this.querySelectorAll(t)}},gt=function(t){return function(){return this.matches(t)}},yt=function(t){return new Array(t.length)};function vt(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}vt.prototype={constructor:vt,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function mt(t,e,n,r,i,a){for(var o,s=0,c=e.length,u=a.length;s<u;++s)(o=e[s])?(o.__data__=a[s],r[s]=o):n[s]=new vt(t,a[s]);for(;s<c;++s)(o=e[s])&&(i[s]=o)}function bt(t,e,n,r,i,a,o){var s,c,u,l={},h=e.length,f=a.length,d=new Array(h);for(s=0;s<h;++s)(c=e[s])&&(d[s]=u="$"+o.call(c,c.__data__,s,e),u in l?i[s]=c:l[u]=c);for(s=0;s<f;++s)(c=l[u="$"+o.call(t,a[s],s,a)])?(r[s]=c,c.__data__=a[s],l[u]=null):n[s]=new vt(t,a[s]);for(s=0;s<h;++s)(c=e[s])&&l[d[s]]===c&&(i[s]=c)}function xt(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}var _t="http://www.w3.org/1999/xhtml",kt={svg:"http://www.w3.org/2000/svg",xhtml:_t,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"},wt=function(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),kt.hasOwnProperty(e)?{space:kt[e],local:t}:t};function Et(t){return function(){this.removeAttribute(t)}}function Tt(t){return function(){this.removeAttributeNS(t.space,t.local)}}function Ct(t,e){return function(){this.setAttribute(t,e)}}function At(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function St(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}function Mt(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}var Ot=function(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView};function Dt(t){return function(){this.style.removeProperty(t)}}function Nt(t,e,n){return function(){this.style.setProperty(t,e,n)}}function Bt(t,e,n){return function(){var r=e.apply(this,arguments);null==r?this.style.removeProperty(t):this.style.setProperty(t,r,n)}}function Lt(t,e){return t.style.getPropertyValue(e)||Ot(t).getComputedStyle(t,null).getPropertyValue(e)}function Ft(t){return function(){delete this[t]}}function Pt(t,e){return function(){this[t]=e}}function It(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}function jt(t){return t.trim().split(/^|\s+/)}function Rt(t){return t.classList||new Yt(t)}function Yt(t){this._node=t,this._names=jt(t.getAttribute("class")||"")}function zt(t,e){for(var n=Rt(t),r=-1,i=e.length;++r<i;)n.add(e[r])}function Ut(t,e){for(var n=Rt(t),r=-1,i=e.length;++r<i;)n.remove(e[r])}function $t(t){return function(){zt(this,t)}}function Wt(t){return function(){Ut(this,t)}}function Vt(t,e){return function(){(e.apply(this,arguments)?zt:Ut)(this,t)}}Yt.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}};function Ht(){this.textContent=""}function Gt(t){return function(){this.textContent=t}}function qt(t){return function(){var e=t.apply(this,arguments);this.textContent=null==e?"":e}}function Xt(){this.innerHTML=""}function Zt(t){return function(){this.innerHTML=t}}function Jt(t){return function(){var e=t.apply(this,arguments);this.innerHTML=null==e?"":e}}function Qt(){this.nextSibling&&this.parentNode.appendChild(this)}function Kt(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function te(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===_t&&e.documentElement.namespaceURI===_t?e.createElement(t):e.createElementNS(n,t)}}function ee(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}var ne=function(t){var e=wt(t);return(e.local?ee:te)(e)};function re(){return null}function ie(){var t=this.parentNode;t&&t.removeChild(this)}function ae(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function oe(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}var se={},ce=null;"undefined"!=typeof document&&("onmouseenter"in document.documentElement||(se={mouseenter:"mouseover",mouseleave:"mouseout"}));function ue(t,e,n){return t=le(t,e,n),function(e){var n=e.relatedTarget;n&&(n===this||8&n.compareDocumentPosition(this))||t.call(this,e)}}function le(t,e,n){return function(r){var i=ce;ce=r;try{t.call(this,this.__data__,e,n)}finally{ce=i}}}function he(t){return t.trim().split(/^|\s+/).map((function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}))}function fe(t){return function(){var e=this.__on;if(e){for(var n,r=0,i=-1,a=e.length;r<a;++r)n=e[r],t.type&&n.type!==t.type||n.name!==t.name?e[++i]=n:this.removeEventListener(n.type,n.listener,n.capture);++i?e.length=i:delete this.__on}}}function de(t,e,n){var r=se.hasOwnProperty(t.type)?ue:le;return function(i,a,o){var s,c=this.__on,u=r(e,a,o);if(c)for(var l=0,h=c.length;l<h;++l)if((s=c[l]).type===t.type&&s.name===t.name)return this.removeEventListener(s.type,s.listener,s.capture),this.addEventListener(s.type,s.listener=u,s.capture=n),void(s.value=e);this.addEventListener(t.type,u,n),s={type:t.type,name:t.name,value:e,listener:u,capture:n},c?c.push(s):this.__on=[s]}}function pe(t,e,n,r){var i=ce;t.sourceEvent=ce,ce=t;try{return e.apply(n,r)}finally{ce=i}}function ge(t,e,n){var r=Ot(t),i=r.CustomEvent;"function"==typeof i?i=new i(e,n):(i=r.document.createEvent("Event"),n?(i.initEvent(e,n.bubbles,n.cancelable),i.detail=n.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function ye(t,e){return function(){return ge(this,t,e)}}function ve(t,e){return function(){return ge(this,t,e.apply(this,arguments))}}var me=[null];function be(t,e){this._groups=t,this._parents=e}function xe(){return new be([[document.documentElement]],me)}be.prototype=xe.prototype={constructor:be,select:function(t){"function"!=typeof t&&(t=ft(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o,s=e[i],c=s.length,u=r[i]=new Array(c),l=0;l<c;++l)(a=s[l])&&(o=t.call(a,a.__data__,l,s))&&("__data__"in a&&(o.__data__=a.__data__),u[l]=o);return new be(r,this._parents)},selectAll:function(t){"function"!=typeof t&&(t=pt(t));for(var e=this._groups,n=e.length,r=[],i=[],a=0;a<n;++a)for(var o,s=e[a],c=s.length,u=0;u<c;++u)(o=s[u])&&(r.push(t.call(o,o.__data__,u,s)),i.push(o));return new be(r,i)},filter:function(t){"function"!=typeof t&&(t=gt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new be(r,this._parents)},data:function(t,e){if(!t)return p=new Array(this.size()),l=-1,this.each((function(t){p[++l]=t})),p;var n,r=e?bt:mt,i=this._parents,a=this._groups;"function"!=typeof t&&(n=t,t=function(){return n});for(var o=a.length,s=new Array(o),c=new Array(o),u=new Array(o),l=0;l<o;++l){var h=i[l],f=a[l],d=f.length,p=t.call(h,h&&h.__data__,l,i),g=p.length,y=c[l]=new Array(g),v=s[l]=new Array(g);r(h,f,y,v,u[l]=new Array(d),p,e);for(var m,b,x=0,_=0;x<g;++x)if(m=y[x]){for(x>=_&&(_=x+1);!(b=v[_])&&++_<g;);m._next=b||null}}return(s=new be(s,i))._enter=c,s._exit=u,s},enter:function(){return new be(this._enter||this._groups.map(yt),this._parents)},exit:function(){return new be(this._exit||this._groups.map(yt),this._parents)},join:function(t,e,n){var r=this.enter(),i=this,a=this.exit();return r="function"==typeof t?t(r):r.append(t+""),null!=e&&(i=e(i)),null==n?a.remove():n(a),r&&i?r.merge(i).order():i},merge:function(t){for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c,u=e[s],l=n[s],h=u.length,f=o[s]=new Array(h),d=0;d<h;++d)(c=u[d]||l[d])&&(f[d]=c);for(;s<r;++s)o[s]=e[s];return new be(o,this._parents)},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var r,i=t[e],a=i.length-1,o=i[a];--a>=0;)(r=i[a])&&(o&&4^r.compareDocumentPosition(o)&&o.parentNode.insertBefore(r,o),o=r);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=xt);for(var n=this._groups,r=n.length,i=new Array(r),a=0;a<r;++a){for(var o,s=n[a],c=s.length,u=i[a]=new Array(c),l=0;l<c;++l)(o=s[l])&&(u[l]=o);u.sort(e)}return new be(i,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){var t=new Array(this.size()),e=-1;return this.each((function(){t[++e]=this})),t},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var r=t[e],i=0,a=r.length;i<a;++i){var o=r[i];if(o)return o}return null},size:function(){var t=0;return this.each((function(){++t})),t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,r=e.length;n<r;++n)for(var i,a=e[n],o=0,s=a.length;o<s;++o)(i=a[o])&&t.call(i,i.__data__,o,a);return this},attr:function(t,e){var n=wt(t);if(arguments.length<2){var r=this.node();return n.local?r.getAttributeNS(n.space,n.local):r.getAttribute(n)}return this.each((null==e?n.local?Tt:Et:"function"==typeof e?n.local?Mt:St:n.local?At:Ct)(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?Dt:"function"==typeof e?Bt:Nt)(t,e,null==n?"":n)):Lt(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?Ft:"function"==typeof e?It:Pt)(t,e)):this.node()[t]},classed:function(t,e){var n=jt(t+"");if(arguments.length<2){for(var r=Rt(this.node()),i=-1,a=n.length;++i<a;)if(!r.contains(n[i]))return!1;return!0}return this.each(("function"==typeof e?Vt:e?$t:Wt)(n,e))},text:function(t){return arguments.length?this.each(null==t?Ht:("function"==typeof t?qt:Gt)(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?Xt:("function"==typeof t?Jt:Zt)(t)):this.node().innerHTML},raise:function(){return this.each(Qt)},lower:function(){return this.each(Kt)},append:function(t){var e="function"==typeof t?t:ne(t);return this.select((function(){return this.appendChild(e.apply(this,arguments))}))},insert:function(t,e){var n="function"==typeof t?t:ne(t),r=null==e?re:"function"==typeof e?e:ft(e);return this.select((function(){return this.insertBefore(n.apply(this,arguments),r.apply(this,arguments)||null)}))},remove:function(){return this.each(ie)},clone:function(t){return this.select(t?oe:ae)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var r,i,a=he(t+""),o=a.length;if(!(arguments.length<2)){for(s=e?de:fe,null==n&&(n=!1),r=0;r<o;++r)this.each(s(a[r],e,n));return this}var s=this.node().__on;if(s)for(var c,u=0,l=s.length;u<l;++u)for(r=0,c=s[u];r<o;++r)if((i=a[r]).type===c.type&&i.name===c.name)return c.value},dispatch:function(t,e){return this.each(("function"==typeof e?ve:ye)(t,e))}};var _e=xe,ke=function(t){return"string"==typeof t?new be([[document.querySelector(t)]],[document.documentElement]):new be([[t]],me)};function we(){ce.stopImmediatePropagation()}var Ee=function(){ce.preventDefault(),ce.stopImmediatePropagation()},Te=function(t){var e=t.document.documentElement,n=ke(t).on("dragstart.drag",Ee,!0);"onselectstart"in e?n.on("selectstart.drag",Ee,!0):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")};function Ce(t,e){var n=t.document.documentElement,r=ke(t).on("dragstart.drag",null);e&&(r.on("click.drag",Ee,!0),setTimeout((function(){r.on("click.drag",null)}),0)),"onselectstart"in n?r.on("selectstart.drag",null):(n.style.MozUserSelect=n.__noselect,delete n.__noselect)}var Ae=function(t,e,n){t.prototype=e.prototype=n,n.constructor=t};function Se(t,e){var n=Object.create(t.prototype);for(var r in e)n[r]=e[r];return n}function Me(){}var Oe="\\s*([+-]?\\d+)\\s*",De="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)\\s*",Ne="\\s*([+-]?\\d*\\.?\\d+(?:[eE][+-]?\\d+)?)%\\s*",Be=/^#([0-9a-f]{3,8})$/,Le=new RegExp("^rgb\\("+[Oe,Oe,Oe]+"\\)$"),Fe=new RegExp("^rgb\\("+[Ne,Ne,Ne]+"\\)$"),Pe=new RegExp("^rgba\\("+[Oe,Oe,Oe,De]+"\\)$"),Ie=new RegExp("^rgba\\("+[Ne,Ne,Ne,De]+"\\)$"),je=new RegExp("^hsl\\("+[De,Ne,Ne]+"\\)$"),Re=new RegExp("^hsla\\("+[De,Ne,Ne,De]+"\\)$"),Ye={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 ze(){return this.rgb().formatHex()}function Ue(){return this.rgb().formatRgb()}function $e(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=Be.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?We(e):3===n?new qe(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?new qe(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?new qe(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=Le.exec(t))?new qe(e[1],e[2],e[3],1):(e=Fe.exec(t))?new qe(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=Pe.exec(t))?Ve(e[1],e[2],e[3],e[4]):(e=Ie.exec(t))?Ve(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=je.exec(t))?Qe(e[1],e[2]/100,e[3]/100,1):(e=Re.exec(t))?Qe(e[1],e[2]/100,e[3]/100,e[4]):Ye.hasOwnProperty(t)?We(Ye[t]):"transparent"===t?new qe(NaN,NaN,NaN,0):null}function We(t){return new qe(t>>16&255,t>>8&255,255&t,1)}function Ve(t,e,n,r){return r<=0&&(t=e=n=NaN),new qe(t,e,n,r)}function He(t){return t instanceof Me||(t=$e(t)),t?new qe((t=t.rgb()).r,t.g,t.b,t.opacity):new qe}function Ge(t,e,n,r){return 1===arguments.length?He(t):new qe(t,e,n,null==r?1:r)}function qe(t,e,n,r){this.r=+t,this.g=+e,this.b=+n,this.opacity=+r}function Xe(){return"#"+Je(this.r)+Je(this.g)+Je(this.b)}function Ze(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(1===t?")":", "+t+")")}function Je(t){return((t=Math.max(0,Math.min(255,Math.round(t)||0)))<16?"0":"")+t.toString(16)}function Qe(t,e,n,r){return r<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new en(t,e,n,r)}function Ke(t){if(t instanceof en)return new en(t.h,t.s,t.l,t.opacity);if(t instanceof Me||(t=$e(t)),!t)return new en;if(t instanceof en)return t;var e=(t=t.rgb()).r/255,n=t.g/255,r=t.b/255,i=Math.min(e,n,r),a=Math.max(e,n,r),o=NaN,s=a-i,c=(a+i)/2;return s?(o=e===a?(n-r)/s+6*(n<r):n===a?(r-e)/s+2:(e-n)/s+4,s/=c<.5?a+i:2-a-i,o*=60):s=c>0&&c<1?0:o,new en(o,s,c,t.opacity)}function tn(t,e,n,r){return 1===arguments.length?Ke(t):new en(t,e,n,null==r?1:r)}function en(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}function nn(t,e,n){return 255*(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)}function rn(t,e,n,r,i){var a=t*t,o=a*t;return((1-3*t+3*a-o)*e+(4-6*a+3*o)*n+(1+3*t+3*a-3*o)*r+o*i)/6}Ae(Me,$e,{copy:function(t){return Object.assign(new this.constructor,this,t)},displayable:function(){return this.rgb().displayable()},hex:ze,formatHex:ze,formatHsl:function(){return Ke(this).formatHsl()},formatRgb:Ue,toString:Ue}),Ae(qe,Ge,Se(Me,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new qe(this.r*t,this.g*t,this.b*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new qe(this.r*t,this.g*t,this.b*t,this.opacity)},rgb:function(){return this},displayable:function(){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:Xe,formatHex:Xe,formatRgb:Ze,toString:Ze})),Ae(en,tn,Se(Me,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new en(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new en(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=this.h%360+360*(this.h<0),e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,r=n+(n<.5?n:1-n)*e,i=2*n-r;return new qe(nn(t>=240?t-240:t+120,i,r),nn(t,i,r),nn(t<120?t+240:t-120,i,r),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var t=this.opacity;return(1===(t=isNaN(t)?1:Math.max(0,Math.min(1,t)))?"hsl(":"hsla(")+(this.h||0)+", "+100*(this.s||0)+"%, "+100*(this.l||0)+"%"+(1===t?")":", "+t+")")}}));var an=function(t){var e=t.length-1;return function(n){var r=n<=0?n=0:n>=1?(n=1,e-1):Math.floor(n*e),i=t[r],a=t[r+1],o=r>0?t[r-1]:2*i-a,s=r<e-1?t[r+2]:2*a-i;return rn((n-r/e)*e,o,i,a,s)}},on=function(t){var e=t.length;return function(n){var r=Math.floor(((n%=1)<0?++n:n)*e),i=t[(r+e-1)%e],a=t[r%e],o=t[(r+1)%e],s=t[(r+2)%e];return rn((n-r/e)*e,i,a,o,s)}},sn=function(t){return function(){return t}};function cn(t,e){return function(n){return t+n*e}}function un(t,e){var n=e-t;return n?cn(t,n>180||n<-180?n-360*Math.round(n/360):n):sn(isNaN(t)?e:t)}function ln(t){return 1==(t=+t)?hn:function(e,n){return n-e?function(t,e,n){return t=Math.pow(t,n),e=Math.pow(e,n)-t,n=1/n,function(r){return Math.pow(t+r*e,n)}}(e,n,t):sn(isNaN(e)?n:e)}}function hn(t,e){var n=e-t;return n?cn(t,n):sn(isNaN(t)?e:t)}var fn=function t(e){var n=ln(e);function r(t,e){var r=n((t=Ge(t)).r,(e=Ge(e)).r),i=n(t.g,e.g),a=n(t.b,e.b),o=hn(t.opacity,e.opacity);return function(e){return t.r=r(e),t.g=i(e),t.b=a(e),t.opacity=o(e),t+""}}return r.gamma=t,r}(1);function dn(t){return function(e){var n,r,i=e.length,a=new Array(i),o=new Array(i),s=new Array(i);for(n=0;n<i;++n)r=Ge(e[n]),a[n]=r.r||0,o[n]=r.g||0,s[n]=r.b||0;return a=t(a),o=t(o),s=t(s),r.opacity=1,function(t){return r.r=a(t),r.g=o(t),r.b=s(t),r+""}}}var pn=dn(an),gn=dn(on),yn=function(t,e){e||(e=[]);var n,r=t?Math.min(e.length,t.length):0,i=e.slice();return function(a){for(n=0;n<r;++n)i[n]=t[n]*(1-a)+e[n]*a;return i}};function vn(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}var mn=function(t,e){return(vn(e)?yn:bn)(t,e)};function bn(t,e){var n,r=e?e.length:0,i=t?Math.min(r,t.length):0,a=new Array(i),o=new Array(r);for(n=0;n<i;++n)a[n]=Sn(t[n],e[n]);for(;n<r;++n)o[n]=e[n];return function(t){for(n=0;n<i;++n)o[n]=a[n](t);return o}}var xn=function(t,e){var n=new Date;return t=+t,e=+e,function(r){return n.setTime(t*(1-r)+e*r),n}},_n=function(t,e){return t=+t,e=+e,function(n){return t*(1-n)+e*n}},kn=function(t,e){var n,r={},i={};for(n in null!==t&&"object"==typeof t||(t={}),null!==e&&"object"==typeof e||(e={}),e)n in t?r[n]=Sn(t[n],e[n]):i[n]=e[n];return function(t){for(n in r)i[n]=r[n](t);return i}},wn=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,En=new RegExp(wn.source,"g");var Tn,Cn,An=function(t,e){var n,r,i,a=wn.lastIndex=En.lastIndex=0,o=-1,s=[],c=[];for(t+="",e+="";(n=wn.exec(t))&&(r=En.exec(e));)(i=r.index)>a&&(i=e.slice(a,i),s[o]?s[o]+=i:s[++o]=i),(n=n[0])===(r=r[0])?s[o]?s[o]+=r:s[++o]=r:(s[++o]=null,c.push({i:o,x:_n(n,r)})),a=En.lastIndex;return a<e.length&&(i=e.slice(a),s[o]?s[o]+=i:s[++o]=i),s.length<2?c[0]?function(t){return function(e){return t(e)+""}}(c[0].x):function(t){return function(){return t}}(e):(e=c.length,function(t){for(var n,r=0;r<e;++r)s[(n=c[r]).i]=n.x(t);return s.join("")})},Sn=function(t,e){var n,r=typeof e;return null==e||"boolean"===r?sn(e):("number"===r?_n:"string"===r?(n=$e(e))?(e=n,fn):An:e instanceof $e?fn:e instanceof Date?xn:vn(e)?yn:Array.isArray(e)?bn:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?kn:_n)(t,e)},Mn=function(){for(var t,e=ce;t=e.sourceEvent;)e=t;return e},On=function(t,e){var n=t.ownerSVGElement||t;if(n.createSVGPoint){var r=n.createSVGPoint();return r.x=e.clientX,r.y=e.clientY,[(r=r.matrixTransform(t.getScreenCTM().inverse())).x,r.y]}var i=t.getBoundingClientRect();return[e.clientX-i.left-t.clientLeft,e.clientY-i.top-t.clientTop]},Dn=function(t,e,n){arguments.length<3&&(n=e,e=Mn().changedTouches);for(var r,i=0,a=e?e.length:0;i<a;++i)if((r=e[i]).identifier===n)return On(t,r);return null},Nn=function(t){var e=Mn();return e.changedTouches&&(e=e.changedTouches[0]),On(t,e)},Bn=0,Ln=0,Fn=0,Pn=0,In=0,jn=0,Rn="object"==typeof performance&&performance.now?performance:Date,Yn="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function zn(){return In||(Yn(Un),In=Rn.now()+jn)}function Un(){In=0}function $n(){this._call=this._time=this._next=null}function Wn(t,e,n){var r=new $n;return r.restart(t,e,n),r}function Vn(){zn(),++Bn;for(var t,e=Tn;e;)(t=In-e._time)>=0&&e._call.call(null,t),e=e._next;--Bn}function Hn(){In=(Pn=Rn.now())+jn,Bn=Ln=0;try{Vn()}finally{Bn=0,function(){var t,e,n=Tn,r=1/0;for(;n;)n._call?(r>n._time&&(r=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:Tn=e);Cn=t,qn(r)}(),In=0}}function Gn(){var t=Rn.now(),e=t-Pn;e>1e3&&(jn-=e,Pn=t)}function qn(t){Bn||(Ln&&(Ln=clearTimeout(Ln)),t-In>24?(t<1/0&&(Ln=setTimeout(Hn,t-Rn.now()-jn)),Fn&&(Fn=clearInterval(Fn))):(Fn||(Pn=Rn.now(),Fn=setInterval(Gn,1e3)),Bn=1,Yn(Hn)))}$n.prototype=Wn.prototype={constructor:$n,restart:function(t,e,n){if("function"!=typeof t)throw new TypeError("callback is not a function");n=(null==n?zn():+n)+(null==e?0:+e),this._next||Cn===this||(Cn?Cn._next=this:Tn=this,Cn=this),this._call=t,this._time=n,qn()},stop:function(){this._call&&(this._call=null,this._time=1/0,qn())}};var Xn=function(t,e,n){var r=new $n;return e=null==e?0:+e,r.restart((function(n){r.stop(),t(n+e)}),e,n),r},Zn=lt("start","end","cancel","interrupt"),Jn=[],Qn=function(t,e,n,r,i,a){var o=t.__transition;if(o){if(n in o)return}else t.__transition={};!function(t,e,n){var r,i=t.__transition;function a(c){var u,l,h,f;if(1!==n.state)return s();for(u in i)if((f=i[u]).name===n.name){if(3===f.state)return Xn(a);4===f.state?(f.state=6,f.timer.stop(),f.on.call("interrupt",t,t.__data__,f.index,f.group),delete i[u]):+u<e&&(f.state=6,f.timer.stop(),f.on.call("cancel",t,t.__data__,f.index,f.group),delete i[u])}if(Xn((function(){3===n.state&&(n.state=4,n.timer.restart(o,n.delay,n.time),o(c))})),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,r=new Array(h=n.tween.length),u=0,l=-1;u<h;++u)(f=n.tween[u].value.call(t,t.__data__,n.index,n.group))&&(r[++l]=f);r.length=l+1}}function o(e){for(var i=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),a=-1,o=r.length;++a<o;)r[a].call(t,i);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var r in n.state=6,n.timer.stop(),delete i[e],i)return;delete t.__transition}i[e]=n,n.timer=Wn((function(t){n.state=1,n.timer.restart(a,n.delay,n.time),n.delay<=t&&a(t-n.delay)}),0,n.time)}(t,n,{name:e,index:r,group:i,on:Zn,tween:Jn,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:0})};function Kn(t,e){var n=er(t,e);if(n.state>0)throw new Error("too late; already scheduled");return n}function tr(t,e){var n=er(t,e);if(n.state>3)throw new Error("too late; already running");return n}function er(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw new Error("transition not found");return n}var nr,rr,ir,ar,or=function(t,e){var n,r,i,a=t.__transition,o=!0;if(a){for(i in e=null==e?null:e+"",a)(n=a[i]).name===e?(r=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(r?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete a[i]):o=!1;o&&delete t.__transition}},sr=180/Math.PI,cr={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1},ur=function(t,e,n,r,i,a){var o,s,c;return(o=Math.sqrt(t*t+e*e))&&(t/=o,e/=o),(c=t*n+e*r)&&(n-=t*c,r-=e*c),(s=Math.sqrt(n*n+r*r))&&(n/=s,r/=s,c/=s),t*r<e*n&&(t=-t,e=-e,c=-c,o=-o),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*sr,skewX:Math.atan(c)*sr,scaleX:o,scaleY:s}};function lr(t,e,n,r){function i(t){return t.length?t.pop()+" ":""}return function(a,o){var s=[],c=[];return a=t(a),o=t(o),function(t,r,i,a,o,s){if(t!==i||r!==a){var c=o.push("translate(",null,e,null,n);s.push({i:c-4,x:_n(t,i)},{i:c-2,x:_n(r,a)})}else(i||a)&&o.push("translate("+i+e+a+n)}(a.translateX,a.translateY,o.translateX,o.translateY,s,c),function(t,e,n,a){t!==e?(t-e>180?e+=360:e-t>180&&(t+=360),a.push({i:n.push(i(n)+"rotate(",null,r)-2,x:_n(t,e)})):e&&n.push(i(n)+"rotate("+e+r)}(a.rotate,o.rotate,s,c),function(t,e,n,a){t!==e?a.push({i:n.push(i(n)+"skewX(",null,r)-2,x:_n(t,e)}):e&&n.push(i(n)+"skewX("+e+r)}(a.skewX,o.skewX,s,c),function(t,e,n,r,a,o){if(t!==n||e!==r){var s=a.push(i(a)+"scale(",null,",",null,")");o.push({i:s-4,x:_n(t,n)},{i:s-2,x:_n(e,r)})}else 1===n&&1===r||a.push(i(a)+"scale("+n+","+r+")")}(a.scaleX,a.scaleY,o.scaleX,o.scaleY,s,c),a=o=null,function(t){for(var e,n=-1,r=c.length;++n<r;)s[(e=c[n]).i]=e.x(t);return s.join("")}}}var hr=lr((function(t){return"none"===t?cr:(nr||(nr=document.createElement("DIV"),rr=document.documentElement,ir=document.defaultView),nr.style.transform=t,t=ir.getComputedStyle(rr.appendChild(nr),null).getPropertyValue("transform"),rr.removeChild(nr),t=t.slice(7,-1).split(","),ur(+t[0],+t[1],+t[2],+t[3],+t[4],+t[5]))}),"px, ","px)","deg)"),fr=lr((function(t){return null==t?cr:(ar||(ar=document.createElementNS("http://www.w3.org/2000/svg","g")),ar.setAttribute("transform",t),(t=ar.transform.baseVal.consolidate())?(t=t.matrix,ur(t.a,t.b,t.c,t.d,t.e,t.f)):cr)}),", ",")",")");function dr(t,e){var n,r;return function(){var i=tr(this,t),a=i.tween;if(a!==n)for(var o=0,s=(r=n=a).length;o<s;++o)if(r[o].name===e){(r=r.slice()).splice(o,1);break}i.tween=r}}function pr(t,e,n){var r,i;if("function"!=typeof n)throw new Error;return function(){var a=tr(this,t),o=a.tween;if(o!==r){i=(r=o).slice();for(var s={name:e,value:n},c=0,u=i.length;c<u;++c)if(i[c].name===e){i[c]=s;break}c===u&&i.push(s)}a.tween=i}}function gr(t,e,n){var r=t._id;return t.each((function(){var t=tr(this,r);(t.value||(t.value={}))[e]=n.apply(this,arguments)})),function(t){return er(t,r).value[e]}}var yr=function(t,e){var n;return("number"==typeof e?_n:e instanceof $e?fn:(n=$e(e))?(e=n,fn):An)(t,e)};function vr(t){return function(){this.removeAttribute(t)}}function mr(t){return function(){this.removeAttributeNS(t.space,t.local)}}function br(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttribute(t);return o===a?null:o===r?i:i=e(r=o,n)}}function xr(t,e,n){var r,i,a=n+"";return function(){var o=this.getAttributeNS(t.space,t.local);return o===a?null:o===r?i:i=e(r=o,n)}}function _r(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttribute(t))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttribute(t)}}function kr(t,e,n){var r,i,a;return function(){var o,s,c=n(this);if(null!=c)return(o=this.getAttributeNS(t.space,t.local))===(s=c+"")?null:o===r&&s===i?a:(i=s,a=e(r=o,c));this.removeAttributeNS(t.space,t.local)}}function wr(t,e){return function(n){this.setAttribute(t,e.call(this,n))}}function Er(t,e){return function(n){this.setAttributeNS(t.space,t.local,e.call(this,n))}}function Tr(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&Er(t,i)),n}return i._value=e,i}function Cr(t,e){var n,r;function i(){var i=e.apply(this,arguments);return i!==r&&(n=(r=i)&&wr(t,i)),n}return i._value=e,i}function Ar(t,e){return function(){Kn(this,t).delay=+e.apply(this,arguments)}}function Sr(t,e){return e=+e,function(){Kn(this,t).delay=e}}function Mr(t,e){return function(){tr(this,t).duration=+e.apply(this,arguments)}}function Or(t,e){return e=+e,function(){tr(this,t).duration=e}}function Dr(t,e){if("function"!=typeof e)throw new Error;return function(){tr(this,t).ease=e}}function Nr(t,e,n){var r,i,a=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)?Kn:tr;return function(){var o=a(this,t),s=o.on;s!==r&&(i=(r=s).copy()).on(e,n),o.on=i}}var Br=_e.prototype.constructor;function Lr(t){return function(){this.style.removeProperty(t)}}function Fr(t,e,n){return function(r){this.style.setProperty(t,e.call(this,r),n)}}function Pr(t,e,n){var r,i;function a(){var a=e.apply(this,arguments);return a!==i&&(r=(i=a)&&Fr(t,a,n)),r}return a._value=e,a}function Ir(t){return function(e){this.textContent=t.call(this,e)}}function jr(t){var e,n;function r(){var r=t.apply(this,arguments);return r!==n&&(e=(n=r)&&Ir(r)),e}return r._value=t,r}var Rr=0;function Yr(t,e,n,r){this._groups=t,this._parents=e,this._name=n,this._id=r}function zr(t){return _e().transition(t)}function Ur(){return++Rr}var $r=_e.prototype;function Wr(t){return t*t*t}function Vr(t){return--t*t*t+1}function Hr(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}Yr.prototype=zr.prototype={constructor:Yr,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=ft(t));for(var r=this._groups,i=r.length,a=new Array(i),o=0;o<i;++o)for(var s,c,u=r[o],l=u.length,h=a[o]=new Array(l),f=0;f<l;++f)(s=u[f])&&(c=t.call(s,s.__data__,f,u))&&("__data__"in s&&(c.__data__=s.__data__),h[f]=c,Qn(h[f],e,n,f,h,er(s,n)));return new Yr(a,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=pt(t));for(var r=this._groups,i=r.length,a=[],o=[],s=0;s<i;++s)for(var c,u=r[s],l=u.length,h=0;h<l;++h)if(c=u[h]){for(var f,d=t.call(c,c.__data__,h,u),p=er(c,n),g=0,y=d.length;g<y;++g)(f=d[g])&&Qn(f,e,n,g,d,p);a.push(d),o.push(c)}return new Yr(a,o,e,n)},filter:function(t){"function"!=typeof t&&(t=gt(t));for(var e=this._groups,n=e.length,r=new Array(n),i=0;i<n;++i)for(var a,o=e[i],s=o.length,c=r[i]=[],u=0;u<s;++u)(a=o[u])&&t.call(a,a.__data__,u,o)&&c.push(a);return new Yr(r,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,n=t._groups,r=e.length,i=n.length,a=Math.min(r,i),o=new Array(r),s=0;s<a;++s)for(var c,u=e[s],l=n[s],h=u.length,f=o[s]=new Array(h),d=0;d<h;++d)(c=u[d]||l[d])&&(f[d]=c);for(;s<r;++s)o[s]=e[s];return new Yr(o,this._parents,this._name,this._id)},selection:function(){return new Br(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=Ur(),r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)if(o=s[u]){var l=er(o,e);Qn(o,t,n,u,s,{time:l.time+l.delay+l.duration,delay:0,duration:l.duration,ease:l.ease})}return new Yr(r,this._parents,t,n)},call:$r.call,nodes:$r.nodes,node:$r.node,size:$r.size,empty:$r.empty,each:$r.each,on:function(t,e){var n=this._id;return arguments.length<2?er(this.node(),n).on.on(t):this.each(Nr(n,t,e))},attr:function(t,e){var n=wt(t),r="transform"===n?fr:yr;return this.attrTween(t,"function"==typeof e?(n.local?kr:_r)(n,r,gr(this,"attr."+t,e)):null==e?(n.local?mr:vr)(n):(n.local?xr:br)(n,r,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw new Error;var r=wt(t);return this.tween(n,(r.local?Tr:Cr)(r,e))},style:function(t,e,n){var r="transform"==(t+="")?hr:yr;return null==e?this.styleTween(t,function(t,e){var n,r,i;return function(){var a=Lt(this,t),o=(this.style.removeProperty(t),Lt(this,t));return a===o?null:a===n&&o===r?i:i=e(n=a,r=o)}}(t,r)).on("end.style."+t,Lr(t)):"function"==typeof e?this.styleTween(t,function(t,e,n){var r,i,a;return function(){var o=Lt(this,t),s=n(this),c=s+"";return null==s&&(this.style.removeProperty(t),c=s=Lt(this,t)),o===c?null:o===r&&c===i?a:(i=c,a=e(r=o,s))}}(t,r,gr(this,"style."+t,e))).each(function(t,e){var n,r,i,a,o="style."+e,s="end."+o;return function(){var c=tr(this,t),u=c.on,l=null==c.value[o]?a||(a=Lr(e)):void 0;u===n&&i===l||(r=(n=u).copy()).on(s,i=l),c.on=r}}(this._id,t)):this.styleTween(t,function(t,e,n){var r,i,a=n+"";return function(){var o=Lt(this,t);return o===a?null:o===r?i:i=e(r=o,n)}}(t,r,e),n).on("end.style."+t,null)},styleTween:function(t,e,n){var r="style."+(t+="");if(arguments.length<2)return(r=this.tween(r))&&r._value;if(null==e)return this.tween(r,null);if("function"!=typeof e)throw new Error;return this.tween(r,Pr(t,e,null==n?"":n))},text:function(t){return this.tween("text","function"==typeof t?function(t){return function(){var e=t(this);this.textContent=null==e?"":e}}(gr(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,jr(t))},remove:function(){return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}));var t},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var r,i=er(this.node(),n).tween,a=0,o=i.length;a<o;++a)if((r=i[a]).name===t)return r.value;return null}return this.each((null==e?dr:pr)(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Ar:Sr)(e,t)):er(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?Mr:Or)(e,t)):er(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(Dr(e,t)):er(this.node(),e).ease},end:function(){var t,e,n=this,r=n._id,i=n.size();return new Promise((function(a,o){var s={value:o},c={value:function(){0==--i&&a()}};n.each((function(){var n=tr(this,r),i=n.on;i!==t&&((e=(t=i).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(c)),n.on=e}))}))}};var Gr={time:null,delay:0,duration:250,ease:Hr};function qr(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))return Gr.time=zn(),Gr;return n}_e.prototype.interrupt=function(t){return this.each((function(){or(this,t)}))},_e.prototype.transition=function(t){var e,n;t instanceof Yr?(e=t._id,t=t._name):(e=Ur(),(n=Gr).time=zn(),t=null==t?null:t+"");for(var r=this._groups,i=r.length,a=0;a<i;++a)for(var o,s=r[a],c=s.length,u=0;u<c;++u)(o=s[u])&&Qn(o,t,e,u,s,n||qr(o,e));return new Yr(r,this._parents,t,e)};var Xr=[null],Zr=function(t,e){var n,r,i=t.__transition;if(i)for(r in e=null==e?null:e+"",i)if((n=i[r]).state>1&&n.name===e)return new Yr([[t]],Xr,e,+r);return null},Jr=function(t){return function(){return t}},Qr=function(t,e,n){this.target=t,this.type=e,this.selection=n};function Kr(){ce.stopImmediatePropagation()}var ti=function(){ce.preventDefault(),ce.stopImmediatePropagation()},ei={name:"drag"},ni={name:"space"},ri={name:"handle"},ii={name:"center"};function ai(t){return[+t[0],+t[1]]}function oi(t){return[ai(t[0]),ai(t[1])]}function si(t){return function(e){return Dn(e,ce.touches,t)}}var ci={name:"x",handles:["w","e"].map(yi),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]]}},ui={name:"y",handles:["n","s"].map(yi),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]]}},li={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(yi),input:function(t){return null==t?null:oi(t)},output:function(t){return t}},hi={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"},fi={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},di={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},pi={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},gi={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function yi(t){return{type:t}}function vi(){return!ce.ctrlKey&&!ce.button}function mi(){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 bi(){return navigator.maxTouchPoints||"ontouchstart"in this}function xi(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function _i(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function ki(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function wi(){return Ci(ci)}function Ei(){return Ci(ui)}var Ti=function(){return Ci(li)};function Ci(t){var e,n=mi,r=vi,i=bi,a=!0,o=lt("start","brush","end"),s=6;function c(e){var n=e.property("__brush",g).selectAll(".overlay").data([yi("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",hi.overlay).merge(n).each((function(){var t=xi(this).extent;ke(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([yi("selection")]).enter().append("rect").attr("class","selection").attr("cursor",hi.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var r=e.selectAll(".handle").data(t.handles,(function(t){return t.type}));r.exit().remove(),r.enter().append("rect").attr("class",(function(t){return"handle handle--"+t.type})).attr("cursor",(function(t){return hi[t.type]})),e.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(i).on("touchstart.brush",f).on("touchmove.brush",d).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function u(){var t=ke(this),e=xi(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 l(t,e,n){return!n&&t.__brush.emitter||new h(t,e)}function h(t,e){this.that=t,this.args=e,this.state=t.__brush,this.active=0}function f(){if((!e||ce.touches)&&r.apply(this,arguments)){var n,i,o,s,c,h,f,d,p,g,y,v=this,m=ce.target.__data__.type,b="selection"===(a&&ce.metaKey?m="overlay":m)?ei:a&&ce.altKey?ii:ri,x=t===ui?null:pi[m],_=t===ci?null:gi[m],k=xi(v),w=k.extent,E=k.selection,T=w[0][0],C=w[0][1],A=w[1][0],S=w[1][1],M=0,O=0,D=x&&_&&a&&ce.shiftKey,N=ce.touches?si(ce.changedTouches[0].identifier):Nn,B=N(v),L=B,F=l(v,arguments,!0).beforestart();"overlay"===m?(E&&(p=!0),k.selection=E=[[n=t===ui?T:B[0],o=t===ci?C:B[1]],[c=t===ui?A:n,f=t===ci?S:o]]):(n=E[0][0],o=E[0][1],c=E[1][0],f=E[1][1]),i=n,s=o,h=c,d=f;var P=ke(v).attr("pointer-events","none"),I=P.selectAll(".overlay").attr("cursor",hi[m]);if(ce.touches)F.moved=R,F.ended=z;else{var j=ke(ce.view).on("mousemove.brush",R,!0).on("mouseup.brush",z,!0);a&&j.on("keydown.brush",U,!0).on("keyup.brush",$,!0),Te(ce.view)}Kr(),or(v),u.call(v),F.start()}function R(){var t=N(v);!D||g||y||(Math.abs(t[0]-L[0])>Math.abs(t[1]-L[1])?y=!0:g=!0),L=t,p=!0,ti(),Y()}function Y(){var t;switch(M=L[0]-B[0],O=L[1]-B[1],b){case ni:case ei:x&&(M=Math.max(T-n,Math.min(A-c,M)),i=n+M,h=c+M),_&&(O=Math.max(C-o,Math.min(S-f,O)),s=o+O,d=f+O);break;case ri:x<0?(M=Math.max(T-n,Math.min(A-n,M)),i=n+M,h=c):x>0&&(M=Math.max(T-c,Math.min(A-c,M)),i=n,h=c+M),_<0?(O=Math.max(C-o,Math.min(S-o,O)),s=o+O,d=f):_>0&&(O=Math.max(C-f,Math.min(S-f,O)),s=o,d=f+O);break;case ii:x&&(i=Math.max(T,Math.min(A,n-M*x)),h=Math.max(T,Math.min(A,c+M*x))),_&&(s=Math.max(C,Math.min(S,o-O*_)),d=Math.max(C,Math.min(S,f+O*_)))}h<i&&(x*=-1,t=n,n=c,c=t,t=i,i=h,h=t,m in fi&&I.attr("cursor",hi[m=fi[m]])),d<s&&(_*=-1,t=o,o=f,f=t,t=s,s=d,d=t,m in di&&I.attr("cursor",hi[m=di[m]])),k.selection&&(E=k.selection),g&&(i=E[0][0],h=E[1][0]),y&&(s=E[0][1],d=E[1][1]),E[0][0]===i&&E[0][1]===s&&E[1][0]===h&&E[1][1]===d||(k.selection=[[i,s],[h,d]],u.call(v),F.brush())}function z(){if(Kr(),ce.touches){if(ce.touches.length)return;e&&clearTimeout(e),e=setTimeout((function(){e=null}),500)}else Ce(ce.view,p),j.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);P.attr("pointer-events","all"),I.attr("cursor",hi.overlay),k.selection&&(E=k.selection),_i(E)&&(k.selection=null,u.call(v)),F.end()}function U(){switch(ce.keyCode){case 16:D=x&&_;break;case 18:b===ri&&(x&&(c=h-M*x,n=i+M*x),_&&(f=d-O*_,o=s+O*_),b=ii,Y());break;case 32:b!==ri&&b!==ii||(x<0?c=h-M:x>0&&(n=i-M),_<0?f=d-O:_>0&&(o=s-O),b=ni,I.attr("cursor",hi.selection),Y());break;default:return}ti()}function $(){switch(ce.keyCode){case 16:D&&(g=y=D=!1,Y());break;case 18:b===ii&&(x<0?c=h:x>0&&(n=i),_<0?f=d:_>0&&(o=s),b=ri,Y());break;case 32:b===ni&&(ce.altKey?(x&&(c=h-M*x,n=i+M*x),_&&(f=d-O*_,o=s+O*_),b=ii):(x<0?c=h:x>0&&(n=i),_<0?f=d:_>0&&(o=s),b=ri),I.attr("cursor",hi[m]),Y());break;default:return}ti()}}function d(){l(this,arguments).moved()}function p(){l(this,arguments).ended()}function g(){var e=this.__brush||{selection:null};return e.extent=oi(n.apply(this,arguments)),e.dim=t,e}return c.move=function(e,n){e.selection?e.on("start.brush",(function(){l(this,arguments).beforestart().start()})).on("interrupt.brush end.brush",(function(){l(this,arguments).end()})).tween("brush",(function(){var e=this,r=e.__brush,i=l(e,arguments),a=r.selection,o=t.input("function"==typeof n?n.apply(this,arguments):n,r.extent),s=Sn(a,o);function c(t){r.selection=1===t&&null===o?null:s(t),u.call(e),i.brush()}return null!==a&&null!==o?c:c(1)})):e.each((function(){var e=this,r=arguments,i=e.__brush,a=t.input("function"==typeof n?n.apply(e,r):n,i.extent),o=l(e,r).beforestart();or(e),i.selection=null===a?null:a,u.call(e),o.start().brush().end()}))},c.clear=function(t){c.move(t,null)},h.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(){return this.starting?(this.starting=!1,this.emit("start")):this.emit("brush"),this},brush:function(){return this.emit("brush"),this},end:function(){return 0==--this.active&&(delete this.state.emitter,this.emit("end")),this},emit:function(e){pe(new Qr(c,e,t.output(this.state.selection)),o.apply,o,[e,this.that,this.args])}},c.extent=function(t){return arguments.length?(n="function"==typeof t?t:Jr(oi(t)),c):n},c.filter=function(t){return arguments.length?(r="function"==typeof t?t:Jr(!!t),c):r},c.touchable=function(t){return arguments.length?(i="function"==typeof t?t:Jr(!!t),c):i},c.handleSize=function(t){return arguments.length?(s=+t,c):s},c.keyModifiers=function(t){return arguments.length?(a=!!t,c):a},c.on=function(){var t=o.on.apply(o,arguments);return t===o?c:t},c}var Ai=Math.cos,Si=Math.sin,Mi=Math.PI,Oi=Mi/2,Di=2*Mi,Ni=Math.max;function Bi(t){return function(e,n){return t(e.source.value+e.target.value,n.source.value+n.target.value)}}var Li=function(){var t=0,e=null,n=null,r=null;function i(i){var a,o,s,c,u,l,h=i.length,f=[],d=k(h),p=[],g=[],y=g.groups=new Array(h),v=new Array(h*h);for(a=0,u=-1;++u<h;){for(o=0,l=-1;++l<h;)o+=i[u][l];f.push(o),p.push(k(h)),a+=o}for(e&&d.sort((function(t,n){return e(f[t],f[n])})),n&&p.forEach((function(t,e){t.sort((function(t,r){return n(i[e][t],i[e][r])}))})),c=(a=Ni(0,Di-t*h)/a)?t:Di/h,o=0,u=-1;++u<h;){for(s=o,l=-1;++l<h;){var m=d[u],b=p[m][l],x=i[m][b],_=o,w=o+=x*a;v[b*h+m]={index:m,subindex:b,startAngle:_,endAngle:w,value:x}}y[m]={index:m,startAngle:s,endAngle:o,value:f[m]},o+=c}for(u=-1;++u<h;)for(l=u-1;++l<h;){var E=v[l*h+u],T=v[u*h+l];(E.value||T.value)&&g.push(E.value<T.value?{source:T,target:E}:{source:E,target:T})}return r?g.sort(r):g}return i.padAngle=function(e){return arguments.length?(t=Ni(0,e),i):t},i.sortGroups=function(t){return arguments.length?(e=t,i):e},i.sortSubgroups=function(t){return arguments.length?(n=t,i):n},i.sortChords=function(t){return arguments.length?(null==t?r=null:(r=Bi(t))._=t,i):r&&r._},i},Fi=Array.prototype.slice,Pi=function(t){return function(){return t}},Ii=Math.PI,ji=2*Ii,Ri=ji-1e-6;function Yi(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function zi(){return new Yi}Yi.prototype=zi.prototype={constructor:Yi,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,r){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+r)},bezierCurveTo:function(t,e,n,r,i,a){this._+="C"+ +t+","+ +e+","+ +n+","+ +r+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,n,r,i){t=+t,e=+e,n=+n,r=+r,i=+i;var a=this._x1,o=this._y1,s=n-t,c=r-e,u=a-t,l=o-e,h=u*u+l*l;if(i<0)throw new Error("negative radius: "+i);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(l*s-c*u)>1e-6&&i){var f=n-a,d=r-o,p=s*s+c*c,g=f*f+d*d,y=Math.sqrt(p),v=Math.sqrt(h),m=i*Math.tan((Ii-Math.acos((p+h-g)/(2*y*v)))/2),b=m/v,x=m/y;Math.abs(b-1)>1e-6&&(this._+="L"+(t+b*u)+","+(e+b*l)),this._+="A"+i+","+i+",0,0,"+ +(l*f>u*d)+","+(this._x1=t+x*s)+","+(this._y1=e+x*c)}else this._+="L"+(this._x1=t)+","+(this._y1=e);else;},arc:function(t,e,n,r,i,a){t=+t,e=+e,a=!!a;var o=(n=+n)*Math.cos(r),s=n*Math.sin(r),c=t+o,u=e+s,l=1^a,h=a?r-i:i-r;if(n<0)throw new Error("negative radius: "+n);null===this._x1?this._+="M"+c+","+u:(Math.abs(this._x1-c)>1e-6||Math.abs(this._y1-u)>1e-6)&&(this._+="L"+c+","+u),n&&(h<0&&(h=h%ji+ji),h>Ri?this._+="A"+n+","+n+",0,1,"+l+","+(t-o)+","+(e-s)+"A"+n+","+n+",0,1,"+l+","+(this._x1=c)+","+(this._y1=u):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=Ii)+","+l+","+(this._x1=t+n*Math.cos(i))+","+(this._y1=e+n*Math.sin(i))))},rect:function(t,e,n,r){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +r+"h"+-n+"Z"},toString:function(){return this._}};var Ui=zi;function $i(t){return t.source}function Wi(t){return t.target}function Vi(t){return t.radius}function Hi(t){return t.startAngle}function Gi(t){return t.endAngle}var qi=function(){var t=$i,e=Wi,n=Vi,r=Hi,i=Gi,a=null;function o(){var o,s=Fi.call(arguments),c=t.apply(this,s),u=e.apply(this,s),l=+n.apply(this,(s[0]=c,s)),h=r.apply(this,s)-Oi,f=i.apply(this,s)-Oi,d=l*Ai(h),p=l*Si(h),g=+n.apply(this,(s[0]=u,s)),y=r.apply(this,s)-Oi,v=i.apply(this,s)-Oi;if(a||(a=o=Ui()),a.moveTo(d,p),a.arc(0,0,l,h,f),h===y&&f===v||(a.quadraticCurveTo(0,0,g*Ai(y),g*Si(y)),a.arc(0,0,g,y,v)),a.quadraticCurveTo(0,0,d,p),a.closePath(),o)return a=null,o+""||null}return o.radius=function(t){return arguments.length?(n="function"==typeof t?t:Pi(+t),o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:Pi(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:Pi(+t),o):i},o.source=function(e){return arguments.length?(t=e,o):t},o.target=function(t){return arguments.length?(e=t,o):e},o.context=function(t){return arguments.length?(a=null==t?null:t,o):a},o};function Xi(){}function Zi(t,e){var n=new Xi;if(t instanceof Xi)t.each((function(t,e){n.set(e,t)}));else if(Array.isArray(t)){var r,i=-1,a=t.length;if(null==e)for(;++i<a;)n.set(i,t[i]);else for(;++i<a;)n.set(e(r=t[i],i,t),r)}else if(t)for(var o in t)n.set(o,t[o]);return n}Xi.prototype=Zi.prototype={constructor:Xi,has:function(t){return"$"+t in this},get:function(t){return this["$"+t]},set:function(t,e){return this["$"+t]=e,this},remove:function(t){var e="$"+t;return e in this&&delete this[e]},clear:function(){for(var t in this)"$"===t[0]&&delete this[t]},keys:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(e.slice(1));return t},values:function(){var t=[];for(var e in this)"$"===e[0]&&t.push(this[e]);return t},entries:function(){var t=[];for(var e in this)"$"===e[0]&&t.push({key:e.slice(1),value:this[e]});return t},size:function(){var t=0;for(var e in this)"$"===e[0]&&++t;return t},empty:function(){for(var t in this)if("$"===t[0])return!1;return!0},each:function(t){for(var e in this)"$"===e[0]&&t(this[e],e.slice(1),this)}};var Ji=Zi,Qi=function(){var t,e,n,r=[],i=[];function a(n,i,o,s){if(i>=r.length)return null!=t&&n.sort(t),null!=e?e(n):n;for(var c,u,l,h=-1,f=n.length,d=r[i++],p=Ji(),g=o();++h<f;)(l=p.get(c=d(u=n[h])+""))?l.push(u):p.set(c,[u]);return p.each((function(t,e){s(g,e,a(t,i,o,s))})),g}return n={object:function(t){return a(t,0,Ki,ta)},map:function(t){return a(t,0,ea,na)},entries:function(t){return function t(n,a){if(++a>r.length)return n;var o,s=i[a-1];return null!=e&&a>=r.length?o=n.entries():(o=[],n.each((function(e,n){o.push({key:n,values:t(e,a)})}))),null!=s?o.sort((function(t,e){return s(t.key,e.key)})):o}(a(t,0,ea,na),0)},key:function(t){return r.push(t),n},sortKeys:function(t){return i[r.length-1]=t,n},sortValues:function(e){return t=e,n},rollup:function(t){return e=t,n}}};function Ki(){return{}}function ta(t,e,n){t[e]=n}function ea(){return Ji()}function na(t,e,n){t.set(e,n)}function ra(){}var ia=Ji.prototype;function aa(t,e){var n=new ra;if(t instanceof ra)t.each((function(t){n.add(t)}));else if(t){var r=-1,i=t.length;if(null==e)for(;++r<i;)n.add(t[r]);else for(;++r<i;)n.add(e(t[r],r,t))}return n}ra.prototype=aa.prototype={constructor:ra,has:ia.has,add:function(t){return this["$"+(t+="")]=t,this},remove:ia.remove,clear:ia.clear,values:ia.keys,size:ia.size,empty:ia.empty,each:ia.each};var oa=aa,sa=function(t){var e=[];for(var n in t)e.push(n);return e},ca=function(t){var e=[];for(var n in t)e.push(t[n]);return e},ua=function(t){var e=[];for(var n in t)e.push({key:n,value:t[n]});return e},la=Math.PI/180,ha=180/Math.PI;function fa(t){if(t instanceof ga)return new ga(t.l,t.a,t.b,t.opacity);if(t instanceof wa)return Ea(t);t instanceof qe||(t=He(t));var e,n,r=ba(t.r),i=ba(t.g),a=ba(t.b),o=ya((.2225045*r+.7168786*i+.0606169*a)/1);return r===i&&i===a?e=n=o:(e=ya((.4360747*r+.3850649*i+.1430804*a)/.96422),n=ya((.0139322*r+.0971045*i+.7141733*a)/.82521)),new ga(116*o-16,500*(e-o),200*(o-n),t.opacity)}function da(t,e){return new ga(t,0,0,null==e?1:e)}function pa(t,e,n,r){return 1===arguments.length?fa(t):new ga(t,e,n,null==r?1:r)}function ga(t,e,n,r){this.l=+t,this.a=+e,this.b=+n,this.opacity=+r}function ya(t){return t>6/29*(6/29)*(6/29)?Math.pow(t,1/3):t/(6/29*3*(6/29))+4/29}function va(t){return t>6/29?t*t*t:6/29*3*(6/29)*(t-4/29)}function ma(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ba(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function xa(t){if(t instanceof wa)return new wa(t.h,t.c,t.l,t.opacity);if(t instanceof ga||(t=fa(t)),0===t.a&&0===t.b)return new wa(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*ha;return new wa(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function _a(t,e,n,r){return 1===arguments.length?xa(t):new wa(n,e,t,null==r?1:r)}function ka(t,e,n,r){return 1===arguments.length?xa(t):new wa(t,e,n,null==r?1:r)}function wa(t,e,n,r){this.h=+t,this.c=+e,this.l=+n,this.opacity=+r}function Ea(t){if(isNaN(t.h))return new ga(t.l,0,0,t.opacity);var e=t.h*la;return new ga(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}Ae(ga,pa,Se(Me,{brighter:function(t){return new ga(this.l+18*(null==t?1:t),this.a,this.b,this.opacity)},darker:function(t){return new ga(this.l-18*(null==t?1:t),this.a,this.b,this.opacity)},rgb:function(){var t=(this.l+16)/116,e=isNaN(this.a)?t:t+this.a/500,n=isNaN(this.b)?t:t-this.b/200;return new qe(ma(3.1338561*(e=.96422*va(e))-1.6168667*(t=1*va(t))-.4906146*(n=.82521*va(n))),ma(-.9787684*e+1.9161415*t+.033454*n),ma(.0719453*e-.2289914*t+1.4052427*n),this.opacity)}})),Ae(wa,ka,Se(Me,{brighter:function(t){return new wa(this.h,this.c,this.l+18*(null==t?1:t),this.opacity)},darker:function(t){return new wa(this.h,this.c,this.l-18*(null==t?1:t),this.opacity)},rgb:function(){return Ea(this).rgb()}}));var Ta=-.29227,Ca=-1.7884503806,Aa=3.5172982438,Sa=-.6557636667999999;function Ma(t){if(t instanceof Da)return new Da(t.h,t.s,t.l,t.opacity);t instanceof qe||(t=He(t));var e=t.r/255,n=t.g/255,r=t.b/255,i=(Sa*r+Ca*e-Aa*n)/(Sa+Ca-Aa),a=r-i,o=(1.97294*(n-i)-Ta*a)/-.90649,s=Math.sqrt(o*o+a*a)/(1.97294*i*(1-i)),c=s?Math.atan2(o,a)*ha-120:NaN;return new Da(c<0?c+360:c,s,i,t.opacity)}function Oa(t,e,n,r){return 1===arguments.length?Ma(t):new Da(t,e,n,null==r?1:r)}function Da(t,e,n,r){this.h=+t,this.s=+e,this.l=+n,this.opacity=+r}Ae(Da,Oa,Se(Me,{brighter:function(t){return t=null==t?1/.7:Math.pow(1/.7,t),new Da(this.h,this.s,this.l*t,this.opacity)},darker:function(t){return t=null==t?.7:Math.pow(.7,t),new Da(this.h,this.s,this.l*t,this.opacity)},rgb:function(){var t=isNaN(this.h)?0:(this.h+120)*la,e=+this.l,n=isNaN(this.s)?0:this.s*e*(1-e),r=Math.cos(t),i=Math.sin(t);return new qe(255*(e+n*(-.14861*r+1.78277*i)),255*(e+n*(Ta*r+-.90649*i)),255*(e+n*(1.97294*r)),this.opacity)}}));var Na=Array.prototype.slice,Ba=function(t,e){return t-e},La=function(t){return function(){return t}},Fa=function(t,e){for(var n,r=-1,i=e.length;++r<i;)if(n=Pa(t,e[r]))return n;return 0};function Pa(t,e){for(var n=e[0],r=e[1],i=-1,a=0,o=t.length,s=o-1;a<o;s=a++){var c=t[a],u=c[0],l=c[1],h=t[s],f=h[0],d=h[1];if(Ia(c,h,e))return 0;l>r!=d>r&&n<(f-u)*(r-l)/(d-l)+u&&(i=-i)}return i}function Ia(t,e,n){var r,i,a,o;return function(t,e,n){return(e[0]-t[0])*(n[1]-t[1])==(n[0]-t[0])*(e[1]-t[1])}(t,e,n)&&(i=t[r=+(t[0]===e[0])],a=n[r],o=e[r],i<=a&&a<=o||o<=a&&a<=i)}var ja=function(){},Ra=[[],[[[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]]],[]],Ya=function(){var t=1,e=1,n=M,r=s;function i(t){var e=n(t);if(Array.isArray(e))e=e.slice().sort(Ba);else{var r=y(t),i=r[0],o=r[1];e=S(i,o,e),e=k(Math.floor(i/e)*e,Math.floor(o/e)*e,e)}return e.map((function(e){return a(t,e)}))}function a(n,i){var a=[],s=[];return function(n,r,i){var a,s,c,u,l,h,f=new Array,d=new Array;a=s=-1,u=n[0]>=r,Ra[u<<1].forEach(p);for(;++a<t-1;)c=u,u=n[a+1]>=r,Ra[c|u<<1].forEach(p);Ra[u<<0].forEach(p);for(;++s<e-1;){for(a=-1,u=n[s*t+t]>=r,l=n[s*t]>=r,Ra[u<<1|l<<2].forEach(p);++a<t-1;)c=u,u=n[s*t+t+a+1]>=r,h=l,l=n[s*t+a+1]>=r,Ra[c|u<<1|l<<2|h<<3].forEach(p);Ra[u|l<<3].forEach(p)}a=-1,l=n[s*t]>=r,Ra[l<<2].forEach(p);for(;++a<t-1;)h=l,l=n[s*t+a+1]>=r,Ra[l<<2|h<<3].forEach(p);function p(t){var e,n,r=[t[0][0]+a,t[0][1]+s],c=[t[1][0]+a,t[1][1]+s],u=o(r),l=o(c);(e=d[u])?(n=f[l])?(delete d[e.end],delete f[n.start],e===n?(e.ring.push(c),i(e.ring)):f[e.start]=d[n.end]={start:e.start,end:n.end,ring:e.ring.concat(n.ring)}):(delete d[e.end],e.ring.push(c),d[e.end=l]=e):(e=f[l])?(n=d[u])?(delete f[e.start],delete d[n.end],e===n?(e.ring.push(c),i(e.ring)):f[n.start]=d[e.end]={start:n.start,end:e.end,ring:n.ring.concat(e.ring)}):(delete f[e.start],e.ring.unshift(r),f[e.start=u]=e):f[u]=d[l]={start:u,end:l,ring:[r,c]}}Ra[l<<3].forEach(p)}(n,i,(function(t){r(t,n,i),function(t){for(var e=0,n=t.length,r=t[n-1][1]*t[0][0]-t[n-1][0]*t[0][1];++e<n;)r+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return r}(t)>0?a.push([t]):s.push(t)})),s.forEach((function(t){for(var e,n=0,r=a.length;n<r;++n)if(-1!==Fa((e=a[n])[0],t))return void e.push(t)})),{type:"MultiPolygon",value:i,coordinates:a}}function o(e){return 2*e[0]+e[1]*(t+1)*4}function s(n,r,i){n.forEach((function(n){var a,o=n[0],s=n[1],c=0|o,u=0|s,l=r[u*t+c];o>0&&o<t&&c===o&&(a=r[u*t+c-1],n[0]=o+(i-a)/(l-a)-.5),s>0&&s<e&&u===s&&(a=r[(u-1)*t+c],n[1]=s+(i-a)/(l-a)-.5)}))}return i.contour=a,i.size=function(n){if(!arguments.length)return[t,e];var r=Math.ceil(n[0]),a=Math.ceil(n[1]);if(!(r>0&&a>0))throw new Error("invalid size");return t=r,e=a,i},i.thresholds=function(t){return arguments.length?(n="function"==typeof t?t:Array.isArray(t)?La(Na.call(t)):La(t),i):n},i.smooth=function(t){return arguments.length?(r=t?s:ja,i):r===s},i};function za(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o<i;++o)for(var s=0,c=0;s<r+n;++s)s<r&&(c+=t.data[s+o*r]),s>=n&&(s>=a&&(c-=t.data[s-a+o*r]),e.data[s-n+o*r]=c/Math.min(s+1,r-1+a-s,a))}function Ua(t,e,n){for(var r=t.width,i=t.height,a=1+(n<<1),o=0;o<r;++o)for(var s=0,c=0;s<i+n;++s)s<i&&(c+=t.data[o+s*r]),s>=n&&(s>=a&&(c-=t.data[o+(s-a)*r]),e.data[o+(s-n)*r]=c/Math.min(s+1,i-1+a-s,a))}function $a(t){return t[0]}function Wa(t){return t[1]}function Va(){return 1}var Ha=function(){var t=$a,e=Wa,n=Va,r=960,i=500,a=20,o=2,s=3*a,c=r+2*s>>o,u=i+2*s>>o,l=La(20);function h(r){var i=new Float32Array(c*u),h=new Float32Array(c*u);r.forEach((function(r,a,l){var h=+t(r,a,l)+s>>o,f=+e(r,a,l)+s>>o,d=+n(r,a,l);h>=0&&h<c&&f>=0&&f<u&&(i[h+f*c]+=d)})),za({width:c,height:u,data:i},{width:c,height:u,data:h},a>>o),Ua({width:c,height:u,data:h},{width:c,height:u,data:i},a>>o),za({width:c,height:u,data:i},{width:c,height:u,data:h},a>>o),Ua({width:c,height:u,data:h},{width:c,height:u,data:i},a>>o),za({width:c,height:u,data:i},{width:c,height:u,data:h},a>>o),Ua({width:c,height:u,data:h},{width:c,height:u,data:i},a>>o);var d=l(i);if(!Array.isArray(d)){var p=L(i);d=S(0,p,d),(d=k(0,Math.floor(p/d)*d,d)).shift()}return Ya().thresholds(d).size([c,u])(i).map(f)}function f(t){return t.value*=Math.pow(2,-2*o),t.coordinates.forEach(d),t}function d(t){t.forEach(p)}function p(t){t.forEach(g)}function g(t){t[0]=t[0]*Math.pow(2,o)-s,t[1]=t[1]*Math.pow(2,o)-s}function y(){return c=r+2*(s=3*a)>>o,u=i+2*s>>o,h}return h.x=function(e){return arguments.length?(t="function"==typeof e?e:La(+e),h):t},h.y=function(t){return arguments.length?(e="function"==typeof t?t:La(+t),h):e},h.weight=function(t){return arguments.length?(n="function"==typeof t?t:La(+t),h):n},h.size=function(t){if(!arguments.length)return[r,i];var e=Math.ceil(t[0]),n=Math.ceil(t[1]);if(!(e>=0||e>=0))throw new Error("invalid size");return r=e,i=n,y()},h.cellSize=function(t){if(!arguments.length)return 1<<o;if(!((t=+t)>=1))throw new Error("invalid cell size");return o=Math.floor(Math.log(t)/Math.LN2),y()},h.thresholds=function(t){return arguments.length?(l="function"==typeof t?t:Array.isArray(t)?La(Na.call(t)):La(t),h):l},h.bandwidth=function(t){if(!arguments.length)return Math.sqrt(a*(a+1));if(!((t=+t)>=0))throw new Error("invalid bandwidth");return a=Math.round((Math.sqrt(4*t*t+1)-1)/2),y()},h},Ga=function(t){return function(){return t}};function qa(t,e,n,r,i,a,o,s,c,u){this.target=t,this.type=e,this.subject=n,this.identifier=r,this.active=i,this.x=a,this.y=o,this.dx=s,this.dy=c,this._=u}function Xa(){return!ce.ctrlKey&&!ce.button}function Za(){return this.parentNode}function Ja(t){return null==t?{x:ce.x,y:ce.y}:t}function Qa(){return navigator.maxTouchPoints||"ontouchstart"in this}qa.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};var Ka=function(){var t,e,n,r,i=Xa,a=Za,o=Ja,s=Qa,c={},u=lt("start","drag","end"),l=0,h=0;function f(t){t.on("mousedown.drag",d).filter(s).on("touchstart.drag",y).on("touchmove.drag",v).on("touchend.drag touchcancel.drag",m).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function d(){if(!r&&i.apply(this,arguments)){var o=b("mouse",a.apply(this,arguments),Nn,this,arguments);o&&(ke(ce.view).on("mousemove.drag",p,!0).on("mouseup.drag",g,!0),Te(ce.view),we(),n=!1,t=ce.clientX,e=ce.clientY,o("start"))}}function p(){if(Ee(),!n){var r=ce.clientX-t,i=ce.clientY-e;n=r*r+i*i>h}c.mouse("drag")}function g(){ke(ce.view).on("mousemove.drag mouseup.drag",null),Ce(ce.view,n),Ee(),c.mouse("end")}function y(){if(i.apply(this,arguments)){var t,e,n=ce.changedTouches,r=a.apply(this,arguments),o=n.length;for(t=0;t<o;++t)(e=b(n[t].identifier,r,Dn,this,arguments))&&(we(),e("start"))}}function v(){var t,e,n=ce.changedTouches,r=n.length;for(t=0;t<r;++t)(e=c[n[t].identifier])&&(Ee(),e("drag"))}function m(){var t,e,n=ce.changedTouches,i=n.length;for(r&&clearTimeout(r),r=setTimeout((function(){r=null}),500),t=0;t<i;++t)(e=c[n[t].identifier])&&(we(),e("end"))}function b(t,e,n,r,i){var a,s,h,d=n(e,t),p=u.copy();if(pe(new qa(f,"beforestart",a,t,l,d[0],d[1],0,0,p),(function(){return null!=(ce.subject=a=o.apply(r,i))&&(s=a.x-d[0]||0,h=a.y-d[1]||0,!0)})))return function o(u){var g,y=d;switch(u){case"start":c[t]=o,g=l++;break;case"end":delete c[t],--l;case"drag":d=n(e,t),g=l}pe(new qa(f,u,a,t,g,d[0]+s,d[1]+h,d[0]-y[0],d[1]-y[1],p),p.apply,p,[u,r,i])}}return f.filter=function(t){return arguments.length?(i="function"==typeof t?t:Ga(!!t),f):i},f.container=function(t){return arguments.length?(a="function"==typeof t?t:Ga(t),f):a},f.subject=function(t){return arguments.length?(o="function"==typeof t?t:Ga(t),f):o},f.touchable=function(t){return arguments.length?(s="function"==typeof t?t:Ga(!!t),f):s},f.on=function(){var t=u.on.apply(u,arguments);return t===u?f:t},f.clickDistance=function(t){return arguments.length?(h=(t=+t)*t,f):Math.sqrt(h)},f},to={},eo={};function no(t){return new Function("d","return {"+t.map((function(t,e){return JSON.stringify(t)+": d["+e+'] || ""'})).join(",")+"}")}function ro(t){var e=Object.create(null),n=[];return t.forEach((function(t){for(var r in t)r in e||n.push(e[r]=r)})),n}function io(t,e){var n=t+"",r=n.length;return r<e?new Array(e-r+1).join(0)+n:n}function ao(t){var e,n=t.getUTCHours(),r=t.getUTCMinutes(),i=t.getUTCSeconds(),a=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":((e=t.getUTCFullYear())<0?"-"+io(-e,6):e>9999?"+"+io(e,6):io(e,4))+"-"+io(t.getUTCMonth()+1,2)+"-"+io(t.getUTCDate(),2)+(a?"T"+io(n,2)+":"+io(r,2)+":"+io(i,2)+"."+io(a,3)+"Z":i?"T"+io(n,2)+":"+io(r,2)+":"+io(i,2)+"Z":r||n?"T"+io(n,2)+":"+io(r,2)+"Z":"")}var oo=function(t){var e=new RegExp('["'+t+"\n\r]"),n=t.charCodeAt(0);function r(t,e){var r,i=[],a=t.length,o=0,s=0,c=a<=0,u=!1;function l(){if(c)return eo;if(u)return u=!1,to;var e,r,i=o;if(34===t.charCodeAt(i)){for(;o++<a&&34!==t.charCodeAt(o)||34===t.charCodeAt(++o););return(e=o)>=a?c=!0:10===(r=t.charCodeAt(o++))?u=!0:13===r&&(u=!0,10===t.charCodeAt(o)&&++o),t.slice(i+1,e-1).replace(/""/g,'"')}for(;o<a;){if(10===(r=t.charCodeAt(e=o++)))u=!0;else if(13===r)u=!0,10===t.charCodeAt(o)&&++o;else if(r!==n)continue;return t.slice(i,e)}return c=!0,t.slice(i,a)}for(10===t.charCodeAt(a-1)&&--a,13===t.charCodeAt(a-1)&&--a;(r=l())!==eo;){for(var h=[];r!==to&&r!==eo;)h.push(r),r=l();e&&null==(h=e(h,s++))||i.push(h)}return i}function i(e,n){return e.map((function(e){return n.map((function(t){return o(e[t])})).join(t)}))}function a(e){return e.map(o).join(t)}function o(t){return null==t?"":t instanceof Date?ao(t):e.test(t+="")?'"'+t.replace(/"/g,'""')+'"':t}return{parse:function(t,e){var n,i,a=r(t,(function(t,r){if(n)return n(t,r-1);i=t,n=e?function(t,e){var n=no(t);return function(r,i){return e(n(r),i,t)}}(t,e):no(t)}));return a.columns=i||[],a},parseRows:r,format:function(e,n){return null==n&&(n=ro(e)),[n.map(o).join(t)].concat(i(e,n)).join("\n")},formatBody:function(t,e){return null==e&&(e=ro(t)),i(t,e).join("\n")},formatRows:function(t){return t.map(a).join("\n")},formatRow:a,formatValue:o}},so=oo(","),co=so.parse,uo=so.parseRows,lo=so.format,ho=so.formatBody,fo=so.formatRows,po=so.formatRow,go=so.formatValue,yo=oo("\t"),vo=yo.parse,mo=yo.parseRows,bo=yo.format,xo=yo.formatBody,_o=yo.formatRows,ko=yo.formatRow,wo=yo.formatValue;function Eo(t){for(var e in t){var n,r,i=t[e].trim();if(i)if("true"===i)i=!0;else if("false"===i)i=!1;else if("NaN"===i)i=NaN;else if(isNaN(n=+i)){if(!(r=i.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/)))continue;To&&r[4]&&!r[7]&&(i=i.replace(/-/g,"/").replace(/T/," ")),i=new Date(i)}else i=n;else i=null;t[e]=i}return t}var To=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function Co(t){return+t}function Ao(t){return t*t}function So(t){return t*(2-t)}function Mo(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}var Oo=function t(e){function n(t){return Math.pow(t,e)}return e=+e,n.exponent=t,n}(3),Do=function t(e){function n(t){return 1-Math.pow(1-t,e)}return e=+e,n.exponent=t,n}(3),No=function t(e){function n(t){return((t*=2)<=1?Math.pow(t,e):2-Math.pow(2-t,e))/2}return e=+e,n.exponent=t,n}(3),Bo=Math.PI,Lo=Bo/2;function Fo(t){return 1-Math.cos(t*Lo)}function Po(t){return Math.sin(t*Lo)}function Io(t){return(1-Math.cos(Bo*t))/2}function jo(t){return Math.pow(2,10*t-10)}function Ro(t){return 1-Math.pow(2,-10*t)}function Yo(t){return((t*=2)<=1?Math.pow(2,10*t-10):2-Math.pow(2,10-10*t))/2}function zo(t){return 1-Math.sqrt(1-t*t)}function Uo(t){return Math.sqrt(1- --t*t)}function $o(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}function Wo(t){return 1-Vo(1-t)}function Vo(t){return(t=+t)<4/11?7.5625*t*t:t<8/11?7.5625*(t-=6/11)*t+.75:t<10/11?7.5625*(t-=9/11)*t+.9375:7.5625*(t-=21/22)*t+63/64}function Ho(t){return((t*=2)<=1?1-Vo(1-t):Vo(t-1)+1)/2}var Go=function t(e){function n(t){return t*t*((e+1)*t-e)}return e=+e,n.overshoot=t,n}(1.70158),qo=function t(e){function n(t){return--t*t*((e+1)*t+e)+1}return e=+e,n.overshoot=t,n}(1.70158),Xo=function t(e){function n(t){return((t*=2)<1?t*t*((e+1)*t-e):(t-=2)*t*((e+1)*t+e)+2)/2}return e=+e,n.overshoot=t,n}(1.70158),Zo=2*Math.PI,Jo=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Zo);function i(t){return e*Math.pow(2,10*--t)*Math.sin((r-t)/n)}return i.amplitude=function(e){return t(e,n*Zo)},i.period=function(n){return t(e,n)},i}(1,.3),Qo=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Zo);function i(t){return 1-e*Math.pow(2,-10*(t=+t))*Math.sin((t+r)/n)}return i.amplitude=function(e){return t(e,n*Zo)},i.period=function(n){return t(e,n)},i}(1,.3),Ko=function t(e,n){var r=Math.asin(1/(e=Math.max(1,e)))*(n/=Zo);function i(t){return((t=2*t-1)<0?e*Math.pow(2,10*t)*Math.sin((r-t)/n):2-e*Math.pow(2,-10*t)*Math.sin((r+t)/n))/2}return i.amplitude=function(e){return t(e,n*Zo)},i.period=function(n){return t(e,n)},i}(1,.3);function ts(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}var es=function(t,e){return fetch(t,e).then(ts)};function ns(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}var rs=function(t,e){return fetch(t,e).then(ns)};function is(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}var as=function(t,e){return fetch(t,e).then(is)};function os(t){return function(e,n,r){return 2===arguments.length&&"function"==typeof n&&(r=n,n=void 0),as(e,n).then((function(e){return t(e,r)}))}}function ss(t,e,n,r){3===arguments.length&&"function"==typeof n&&(r=n,n=void 0);var i=oo(t);return as(e,n).then((function(t){return i.parse(t,r)}))}var cs=os(co),us=os(vo),ls=function(t,e){return new Promise((function(n,r){var i=new Image;for(var a in e)i[a]=e[a];i.onerror=r,i.onload=function(){n(i)},i.src=t}))};function hs(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.json()}var fs=function(t,e){return fetch(t,e).then(hs)};function ds(t){return function(e,n){return as(e,n).then((function(e){return(new DOMParser).parseFromString(e,t)}))}}var ps=ds("application/xml"),gs=ds("text/html"),ys=ds("image/svg+xml"),vs=function(t,e){var n;function r(){var r,i,a=n.length,o=0,s=0;for(r=0;r<a;++r)o+=(i=n[r]).x,s+=i.y;for(o=o/a-t,s=s/a-e,r=0;r<a;++r)(i=n[r]).x-=o,i.y-=s}return null==t&&(t=0),null==e&&(e=0),r.initialize=function(t){n=t},r.x=function(e){return arguments.length?(t=+e,r):t},r.y=function(t){return arguments.length?(e=+t,r):e},r},ms=function(t){return function(){return t}},bs=function(){return 1e-6*(Math.random()-.5)};function xs(t,e,n,r){if(isNaN(e)||isNaN(n))return t;var i,a,o,s,c,u,l,h,f,d=t._root,p={data:r},g=t._x0,y=t._y0,v=t._x1,m=t._y1;if(!d)return t._root=p,t;for(;d.length;)if((u=e>=(a=(g+v)/2))?g=a:v=a,(l=n>=(o=(y+m)/2))?y=o:m=o,i=d,!(d=d[h=l<<1|u]))return i[h]=p,t;if(s=+t._x.call(null,d.data),c=+t._y.call(null,d.data),e===s&&n===c)return p.next=d,i?i[h]=p:t._root=p,t;do{i=i?i[h]=new Array(4):t._root=new Array(4),(u=e>=(a=(g+v)/2))?g=a:v=a,(l=n>=(o=(y+m)/2))?y=o:m=o}while((h=l<<1|u)==(f=(c>=o)<<1|s>=a));return i[f]=d,i[h]=p,t}var _s=function(t,e,n,r,i){this.node=t,this.x0=e,this.y0=n,this.x1=r,this.y1=i};function ks(t){return t[0]}function ws(t){return t[1]}function Es(t,e,n){var r=new Ts(null==e?ks:e,null==n?ws:n,NaN,NaN,NaN,NaN);return null==t?r:r.addAll(t)}function Ts(t,e,n,r,i,a){this._x=t,this._y=e,this._x0=n,this._y0=r,this._x1=i,this._y1=a,this._root=void 0}function Cs(t){for(var e={data:t.data},n=e;t=t.next;)n=n.next={data:t.data};return e}var As=Es.prototype=Ts.prototype;function Ss(t){return t.x+t.vx}function Ms(t){return t.y+t.vy}As.copy=function(){var t,e,n=new Ts(this._x,this._y,this._x0,this._y0,this._x1,this._y1),r=this._root;if(!r)return n;if(!r.length)return n._root=Cs(r),n;for(t=[{source:r,target:n._root=new Array(4)}];r=t.pop();)for(var i=0;i<4;++i)(e=r.source[i])&&(e.length?t.push({source:e,target:r.target[i]=new Array(4)}):r.target[i]=Cs(e));return n},As.add=function(t){var e=+this._x.call(null,t),n=+this._y.call(null,t);return xs(this.cover(e,n),e,n,t)},As.addAll=function(t){var e,n,r,i,a=t.length,o=new Array(a),s=new Array(a),c=1/0,u=1/0,l=-1/0,h=-1/0;for(n=0;n<a;++n)isNaN(r=+this._x.call(null,e=t[n]))||isNaN(i=+this._y.call(null,e))||(o[n]=r,s[n]=i,r<c&&(c=r),r>l&&(l=r),i<u&&(u=i),i>h&&(h=i));if(c>l||u>h)return this;for(this.cover(c,u).cover(l,h),n=0;n<a;++n)xs(this,o[n],s[n],t[n]);return this},As.cover=function(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var n=this._x0,r=this._y0,i=this._x1,a=this._y1;if(isNaN(n))i=(n=Math.floor(t))+1,a=(r=Math.floor(e))+1;else{for(var o,s,c=i-n,u=this._root;n>t||t>=i||r>e||e>=a;)switch(s=(e<r)<<1|t<n,(o=new Array(4))[s]=u,u=o,c*=2,s){case 0:i=n+c,a=r+c;break;case 1:n=i-c,a=r+c;break;case 2:i=n+c,r=a-c;break;case 3:n=i-c,r=a-c}this._root&&this._root.length&&(this._root=u)}return this._x0=n,this._y0=r,this._x1=i,this._y1=a,this},As.data=function(){var t=[];return this.visit((function(e){if(!e.length)do{t.push(e.data)}while(e=e.next)})),t},As.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]]},As.find=function(t,e,n){var r,i,a,o,s,c,u,l=this._x0,h=this._y0,f=this._x1,d=this._y1,p=[],g=this._root;for(g&&p.push(new _s(g,l,h,f,d)),null==n?n=1/0:(l=t-n,h=e-n,f=t+n,d=e+n,n*=n);c=p.pop();)if(!(!(g=c.node)||(i=c.x0)>f||(a=c.y0)>d||(o=c.x1)<l||(s=c.y1)<h))if(g.length){var y=(i+o)/2,v=(a+s)/2;p.push(new _s(g[3],y,v,o,s),new _s(g[2],i,v,y,s),new _s(g[1],y,a,o,v),new _s(g[0],i,a,y,v)),(u=(e>=v)<<1|t>=y)&&(c=p[p.length-1],p[p.length-1]=p[p.length-1-u],p[p.length-1-u]=c)}else{var m=t-+this._x.call(null,g.data),b=e-+this._y.call(null,g.data),x=m*m+b*b;if(x<n){var _=Math.sqrt(n=x);l=t-_,h=e-_,f=t+_,d=e+_,r=g.data}}return r},As.remove=function(t){if(isNaN(a=+this._x.call(null,t))||isNaN(o=+this._y.call(null,t)))return this;var e,n,r,i,a,o,s,c,u,l,h,f,d=this._root,p=this._x0,g=this._y0,y=this._x1,v=this._y1;if(!d)return this;if(d.length)for(;;){if((u=a>=(s=(p+y)/2))?p=s:y=s,(l=o>=(c=(g+v)/2))?g=c:v=c,e=d,!(d=d[h=l<<1|u]))return this;if(!d.length)break;(e[h+1&3]||e[h+2&3]||e[h+3&3])&&(n=e,f=h)}for(;d.data!==t;)if(r=d,!(d=d.next))return this;return(i=d.next)&&delete d.next,r?(i?r.next=i:delete r.next,this):e?(i?e[h]=i:delete e[h],(d=e[0]||e[1]||e[2]||e[3])&&d===(e[3]||e[2]||e[1]||e[0])&&!d.length&&(n?n[f]=d:this._root=d),this):(this._root=i,this)},As.removeAll=function(t){for(var e=0,n=t.length;e<n;++e)this.remove(t[e]);return this},As.root=function(){return this._root},As.size=function(){var t=0;return this.visit((function(e){if(!e.length)do{++t}while(e=e.next)})),t},As.visit=function(t){var e,n,r,i,a,o,s=[],c=this._root;for(c&&s.push(new _s(c,this._x0,this._y0,this._x1,this._y1));e=s.pop();)if(!t(c=e.node,r=e.x0,i=e.y0,a=e.x1,o=e.y1)&&c.length){var u=(r+a)/2,l=(i+o)/2;(n=c[3])&&s.push(new _s(n,u,l,a,o)),(n=c[2])&&s.push(new _s(n,r,l,u,o)),(n=c[1])&&s.push(new _s(n,u,i,a,l)),(n=c[0])&&s.push(new _s(n,r,i,u,l))}return this},As.visitAfter=function(t){var e,n=[],r=[];for(this._root&&n.push(new _s(this._root,this._x0,this._y0,this._x1,this._y1));e=n.pop();){var i=e.node;if(i.length){var a,o=e.x0,s=e.y0,c=e.x1,u=e.y1,l=(o+c)/2,h=(s+u)/2;(a=i[0])&&n.push(new _s(a,o,s,l,h)),(a=i[1])&&n.push(new _s(a,l,s,c,h)),(a=i[2])&&n.push(new _s(a,o,h,l,u)),(a=i[3])&&n.push(new _s(a,l,h,c,u))}r.push(e)}for(;e=r.pop();)t(e.node,e.x0,e.y0,e.x1,e.y1);return this},As.x=function(t){return arguments.length?(this._x=t,this):this._x},As.y=function(t){return arguments.length?(this._y=t,this):this._y};var Os=function(t){var e,n,r=1,i=1;function a(){for(var t,a,s,c,u,l,h,f=e.length,d=0;d<i;++d)for(a=Es(e,Ss,Ms).visitAfter(o),t=0;t<f;++t)s=e[t],l=n[s.index],h=l*l,c=s.x+s.vx,u=s.y+s.vy,a.visit(p);function p(t,e,n,i,a){var o=t.data,f=t.r,d=l+f;if(!o)return e>c+d||i<c-d||n>u+d||a<u-d;if(o.index>s.index){var p=c-o.x-o.vx,g=u-o.y-o.vy,y=p*p+g*g;y<d*d&&(0===p&&(y+=(p=bs())*p),0===g&&(y+=(g=bs())*g),y=(d-(y=Math.sqrt(y)))/y*r,s.vx+=(p*=y)*(d=(f*=f)/(h+f)),s.vy+=(g*=y)*d,o.vx-=p*(d=1-d),o.vy-=g*d)}}}function o(t){if(t.data)return t.r=n[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 s(){if(e){var r,i,a=e.length;for(n=new Array(a),r=0;r<a;++r)i=e[r],n[i.index]=+t(i,r,e)}}return"function"!=typeof t&&(t=ms(null==t?1:+t)),a.initialize=function(t){e=t,s()},a.iterations=function(t){return arguments.length?(i=+t,a):i},a.strength=function(t){return arguments.length?(r=+t,a):r},a.radius=function(e){return arguments.length?(t="function"==typeof e?e:ms(+e),s(),a):t},a};function Ds(t){return t.index}function Ns(t,e){var n=t.get(e);if(!n)throw new Error("missing: "+e);return n}var Bs=function(t){var e,n,r,i,a,o=Ds,s=function(t){return 1/Math.min(i[t.source.index],i[t.target.index])},c=ms(30),u=1;function l(r){for(var i=0,o=t.length;i<u;++i)for(var s,c,l,h,f,d,p,g=0;g<o;++g)c=(s=t[g]).source,h=(l=s.target).x+l.vx-c.x-c.vx||bs(),f=l.y+l.vy-c.y-c.vy||bs(),h*=d=((d=Math.sqrt(h*h+f*f))-n[g])/d*r*e[g],f*=d,l.vx-=h*(p=a[g]),l.vy-=f*p,c.vx+=h*(p=1-p),c.vy+=f*p}function h(){if(r){var s,c,u=r.length,l=t.length,h=Ji(r,o);for(s=0,i=new Array(u);s<l;++s)(c=t[s]).index=s,"object"!=typeof c.source&&(c.source=Ns(h,c.source)),"object"!=typeof c.target&&(c.target=Ns(h,c.target)),i[c.source.index]=(i[c.source.index]||0)+1,i[c.target.index]=(i[c.target.index]||0)+1;for(s=0,a=new Array(l);s<l;++s)c=t[s],a[s]=i[c.source.index]/(i[c.source.index]+i[c.target.index]);e=new Array(l),f(),n=new Array(l),d()}}function f(){if(r)for(var n=0,i=t.length;n<i;++n)e[n]=+s(t[n],n,t)}function d(){if(r)for(var e=0,i=t.length;e<i;++e)n[e]=+c(t[e],e,t)}return null==t&&(t=[]),l.initialize=function(t){r=t,h()},l.links=function(e){return arguments.length?(t=e,h(),l):t},l.id=function(t){return arguments.length?(o=t,l):o},l.iterations=function(t){return arguments.length?(u=+t,l):u},l.strength=function(t){return arguments.length?(s="function"==typeof t?t:ms(+t),f(),l):s},l.distance=function(t){return arguments.length?(c="function"==typeof t?t:ms(+t),d(),l):c},l};function Ls(t){return t.x}function Fs(t){return t.y}var Ps=Math.PI*(3-Math.sqrt(5)),Is=function(t){var e,n=1,r=.001,i=1-Math.pow(r,1/300),a=0,o=.6,s=Ji(),c=Wn(l),u=lt("tick","end");function l(){h(),u.call("tick",e),n<r&&(c.stop(),u.call("end",e))}function h(r){var c,u,l=t.length;void 0===r&&(r=1);for(var h=0;h<r;++h)for(n+=(a-n)*i,s.each((function(t){t(n)})),c=0;c<l;++c)null==(u=t[c]).fx?u.x+=u.vx*=o:(u.x=u.fx,u.vx=0),null==u.fy?u.y+=u.vy*=o:(u.y=u.fy,u.vy=0);return e}function f(){for(var e,n=0,r=t.length;n<r;++n){if((e=t[n]).index=n,null!=e.fx&&(e.x=e.fx),null!=e.fy&&(e.y=e.fy),isNaN(e.x)||isNaN(e.y)){var i=10*Math.sqrt(n),a=n*Ps;e.x=i*Math.cos(a),e.y=i*Math.sin(a)}(isNaN(e.vx)||isNaN(e.vy))&&(e.vx=e.vy=0)}}function d(e){return e.initialize&&e.initialize(t),e}return null==t&&(t=[]),f(),e={tick:h,restart:function(){return c.restart(l),e},stop:function(){return c.stop(),e},nodes:function(n){return arguments.length?(t=n,f(),s.each(d),e):t},alpha:function(t){return arguments.length?(n=+t,e):n},alphaMin:function(t){return arguments.length?(r=+t,e):r},alphaDecay:function(t){return arguments.length?(i=+t,e):+i},alphaTarget:function(t){return arguments.length?(a=+t,e):a},velocityDecay:function(t){return arguments.length?(o=1-t,e):1-o},force:function(t,n){return arguments.length>1?(null==n?s.remove(t):s.set(t,d(n)),e):s.get(t)},find:function(e,n,r){var i,a,o,s,c,u=0,l=t.length;for(null==r?r=1/0:r*=r,u=0;u<l;++u)(o=(i=e-(s=t[u]).x)*i+(a=n-s.y)*a)<r&&(c=s,r=o);return c},on:function(t,n){return arguments.length>1?(u.on(t,n),e):u.on(t)}}},js=function(){var t,e,n,r,i=ms(-30),a=1,o=1/0,s=.81;function c(r){var i,a=t.length,o=Es(t,Ls,Fs).visitAfter(l);for(n=r,i=0;i<a;++i)e=t[i],o.visit(h)}function u(){if(t){var e,n,a=t.length;for(r=new Array(a),e=0;e<a;++e)n=t[e],r[n.index]=+i(n,e,t)}}function l(t){var e,n,i,a,o,s=0,c=0;if(t.length){for(i=a=o=0;o<4;++o)(e=t[o])&&(n=Math.abs(e.value))&&(s+=e.value,c+=n,i+=n*e.x,a+=n*e.y);t.x=i/c,t.y=a/c}else{(e=t).x=e.data.x,e.y=e.data.y;do{s+=r[e.data.index]}while(e=e.next)}t.value=s}function h(t,i,c,u){if(!t.value)return!0;var l=t.x-e.x,h=t.y-e.y,f=u-i,d=l*l+h*h;if(f*f/s<d)return d<o&&(0===l&&(d+=(l=bs())*l),0===h&&(d+=(h=bs())*h),d<a&&(d=Math.sqrt(a*d)),e.vx+=l*t.value*n/d,e.vy+=h*t.value*n/d),!0;if(!(t.length||d>=o)){(t.data!==e||t.next)&&(0===l&&(d+=(l=bs())*l),0===h&&(d+=(h=bs())*h),d<a&&(d=Math.sqrt(a*d)));do{t.data!==e&&(f=r[t.data.index]*n/d,e.vx+=l*f,e.vy+=h*f)}while(t=t.next)}}return c.initialize=function(e){t=e,u()},c.strength=function(t){return arguments.length?(i="function"==typeof t?t:ms(+t),u(),c):i},c.distanceMin=function(t){return arguments.length?(a=t*t,c):Math.sqrt(a)},c.distanceMax=function(t){return arguments.length?(o=t*t,c):Math.sqrt(o)},c.theta=function(t){return arguments.length?(s=t*t,c):Math.sqrt(s)},c},Rs=function(t,e,n){var r,i,a,o=ms(.1);function s(t){for(var o=0,s=r.length;o<s;++o){var c=r[o],u=c.x-e||1e-6,l=c.y-n||1e-6,h=Math.sqrt(u*u+l*l),f=(a[o]-h)*i[o]*t/h;c.vx+=u*f,c.vy+=l*f}}function c(){if(r){var e,n=r.length;for(i=new Array(n),a=new Array(n),e=0;e<n;++e)a[e]=+t(r[e],e,r),i[e]=isNaN(a[e])?0:+o(r[e],e,r)}}return"function"!=typeof t&&(t=ms(+t)),null==e&&(e=0),null==n&&(n=0),s.initialize=function(t){r=t,c()},s.strength=function(t){return arguments.length?(o="function"==typeof t?t:ms(+t),c(),s):o},s.radius=function(e){return arguments.length?(t="function"==typeof e?e:ms(+e),c(),s):t},s.x=function(t){return arguments.length?(e=+t,s):e},s.y=function(t){return arguments.length?(n=+t,s):n},s},Ys=function(t){var e,n,r,i=ms(.1);function a(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vx+=(r[a]-i.x)*n[a]*t}function o(){if(e){var a,o=e.length;for(n=new Array(o),r=new Array(o),a=0;a<o;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return"function"!=typeof t&&(t=ms(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:ms(+t),o(),a):i},a.x=function(e){return arguments.length?(t="function"==typeof e?e:ms(+e),o(),a):t},a},zs=function(t){var e,n,r,i=ms(.1);function a(t){for(var i,a=0,o=e.length;a<o;++a)(i=e[a]).vy+=(r[a]-i.y)*n[a]*t}function o(){if(e){var a,o=e.length;for(n=new Array(o),r=new Array(o),a=0;a<o;++a)n[a]=isNaN(r[a]=+t(e[a],a,e))?0:+i(e[a],a,e)}}return"function"!=typeof t&&(t=ms(null==t?0:+t)),a.initialize=function(t){e=t,o()},a.strength=function(t){return arguments.length?(i="function"==typeof t?t:ms(+t),o(),a):i},a.y=function(e){return arguments.length?(t="function"==typeof e?e:ms(+e),o(),a):t},a},Us=function(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,r=t.slice(0,n);return[r.length>1?r[0]+r.slice(2):r,+t.slice(n+1)]},$s=function(t){return(t=Us(Math.abs(t)))?t[1]:NaN},Ws=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Vs(t){if(!(e=Ws.exec(t)))throw new Error("invalid format: "+t);var e;return new Hs({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 Hs(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+""}Vs.prototype=Hs.prototype,Hs.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};var Gs,qs,Xs,Zs,Js=function(t,e){var n=Us(t,e);if(!n)return t+"";var r=n[0],i=n[1];return i<0?"0."+new Array(-i).join("0")+r:r.length>i+1?r.slice(0,i+1)+"."+r.slice(i+1):r+new Array(i-r.length+2).join("0")},Qs={"%":function(t,e){return(100*t).toFixed(e)},b:function(t){return Math.round(t).toString(2)},c:function(t){return t+""},d:function(t){return Math.round(t).toString(10)},e:function(t,e){return t.toExponential(e)},f:function(t,e){return t.toFixed(e)},g:function(t,e){return t.toPrecision(e)},o:function(t){return Math.round(t).toString(8)},p:function(t,e){return Js(100*t,e)},r:Js,s:function(t,e){var n=Us(t,e);if(!n)return t+"";var r=n[0],i=n[1],a=i-(Gs=3*Math.max(-8,Math.min(8,Math.floor(i/3))))+1,o=r.length;return a===o?r:a>o?r+new Array(a-o+1).join("0"):a>0?r.slice(0,a)+"."+r.slice(a):"0."+new Array(1-a).join("0")+Us(t,Math.max(0,e+a-1))[0]},X:function(t){return Math.round(t).toString(16).toUpperCase()},x:function(t){return Math.round(t).toString(16)}},Ks=function(t){return t},tc=Array.prototype.map,ec=["y","z","a","f","p","n","µ","m","","k","M","G","T","P","E","Z","Y"],nc=function(t){var e,n,r=void 0===t.grouping||void 0===t.thousands?Ks:(e=tc.call(t.grouping,Number),n=t.thousands+"",function(t,r){for(var i=t.length,a=[],o=0,s=e[0],c=0;i>0&&s>0&&(c+s+1>r&&(s=Math.max(1,r-c)),a.push(t.substring(i-=s,i+s)),!((c+=s+1)>r));)s=e[o=(o+1)%e.length];return a.reverse().join(n)}),i=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",o=void 0===t.decimal?".":t.decimal+"",s=void 0===t.numerals?Ks:function(t){return function(e){return e.replace(/[0-9]/g,(function(e){return t[+e]}))}}(tc.call(t.numerals,String)),c=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"-":t.minus+"",l=void 0===t.nan?"NaN":t.nan+"";function h(t){var e=(t=Vs(t)).fill,n=t.align,h=t.sign,f=t.symbol,d=t.zero,p=t.width,g=t.comma,y=t.precision,v=t.trim,m=t.type;"n"===m?(g=!0,m="g"):Qs[m]||(void 0===y&&(y=12),v=!0,m="g"),(d||"0"===e&&"="===n)&&(d=!0,e="0",n="=");var b="$"===f?i:"#"===f&&/[boxX]/.test(m)?"0"+m.toLowerCase():"",x="$"===f?a:/[%p]/.test(m)?c:"",_=Qs[m],k=/[defgprs%]/.test(m);function w(t){var i,a,c,f=b,w=x;if("c"===m)w=_(t)+w,t="";else{var E=(t=+t)<0;if(t=isNaN(t)?l:_(Math.abs(t),y),v&&(t=function(t){t:for(var e,n=t.length,r=1,i=-1;r<n;++r)switch(t[r]){case".":i=e=r;break;case"0":0===i&&(i=r),e=r;break;default:if(!+t[r])break t;i>0&&(i=0)}return i>0?t.slice(0,i)+t.slice(e+1):t}(t)),E&&0==+t&&(E=!1),f=(E?"("===h?h:u:"-"===h||"("===h?"":h)+f,w=("s"===m?ec[8+Gs/3]:"")+w+(E&&"("===h?")":""),k)for(i=-1,a=t.length;++i<a;)if(48>(c=t.charCodeAt(i))||c>57){w=(46===c?o+t.slice(i+1):t.slice(i))+w,t=t.slice(0,i);break}}g&&!d&&(t=r(t,1/0));var T=f.length+t.length+w.length,C=T<p?new Array(p-T+1).join(e):"";switch(g&&d&&(t=r(C+t,C.length?p-w.length:1/0),C=""),n){case"<":t=f+t+w+C;break;case"=":t=f+C+t+w;break;case"^":t=C.slice(0,T=C.length>>1)+f+t+w+C.slice(T);break;default:t=C+f+t+w}return s(t)}return y=void 0===y?6:/[gprs]/.test(m)?Math.max(1,Math.min(21,y)):Math.max(0,Math.min(20,y)),w.toString=function(){return t+""},w}return{format:h,formatPrefix:function(t,e){var n=h(((t=Vs(t)).type="f",t)),r=3*Math.max(-8,Math.min(8,Math.floor($s(e)/3))),i=Math.pow(10,-r),a=ec[8+r/3];return function(t){return n(i*t)+a}}}};function rc(t){return qs=nc(t),Xs=qs.format,Zs=qs.formatPrefix,qs}rc({decimal:".",thousands:",",grouping:[3],currency:["$",""],minus:"-"});var ic=function(t){return Math.max(0,-$s(Math.abs(t)))},ac=function(t,e){return Math.max(0,3*Math.max(-8,Math.min(8,Math.floor($s(e)/3)))-$s(Math.abs(t)))},oc=function(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,$s(e)-$s(t))+1},sc=function(){return new cc};function cc(){this.reset()}cc.prototype={constructor:cc,reset:function(){this.s=this.t=0},add:function(t){lc(uc,t,this.t),lc(this,uc.s,this.s),this.s?this.t+=uc.t:this.s=uc.t},valueOf:function(){return this.s}};var uc=new cc;function lc(t,e,n){var r=t.s=e+n,i=r-e,a=r-i;t.t=e-a+(n-i)}var hc=Math.PI,fc=hc/2,dc=hc/4,pc=2*hc,gc=180/hc,yc=hc/180,vc=Math.abs,mc=Math.atan,bc=Math.atan2,xc=Math.cos,_c=Math.ceil,kc=Math.exp,wc=(Math.floor,Math.log),Ec=Math.pow,Tc=Math.sin,Cc=Math.sign||function(t){return t>0?1:t<0?-1:0},Ac=Math.sqrt,Sc=Math.tan;function Mc(t){return t>1?0:t<-1?hc:Math.acos(t)}function Oc(t){return t>1?fc:t<-1?-fc:Math.asin(t)}function Dc(t){return(t=Tc(t/2))*t}function Nc(){}function Bc(t,e){t&&Fc.hasOwnProperty(t.type)&&Fc[t.type](t,e)}var Lc={Feature:function(t,e){Bc(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)Bc(n[r].geometry,e)}},Fc={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 n=t.coordinates,r=-1,i=n.length;++r<i;)t=n[r],e.point(t[0],t[1],t[2])},LineString:function(t,e){Pc(t.coordinates,e,0)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Pc(n[r],e,0)},Polygon:function(t,e){Ic(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)Ic(n[r],e)},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)Bc(n[r],e)}};function Pc(t,e,n){var r,i=-1,a=t.length-n;for(e.lineStart();++i<a;)r=t[i],e.point(r[0],r[1],r[2]);e.lineEnd()}function Ic(t,e){var n=-1,r=t.length;for(e.polygonStart();++n<r;)Pc(t[n],e,1);e.polygonEnd()}var jc,Rc,Yc,zc,Uc,$c=function(t,e){t&&Lc.hasOwnProperty(t.type)?Lc[t.type](t,e):Bc(t,e)},Wc=sc(),Vc=sc(),Hc={point:Nc,lineStart:Nc,lineEnd:Nc,polygonStart:function(){Wc.reset(),Hc.lineStart=Gc,Hc.lineEnd=qc},polygonEnd:function(){var t=+Wc;Vc.add(t<0?pc+t:t),this.lineStart=this.lineEnd=this.point=Nc},sphere:function(){Vc.add(pc)}};function Gc(){Hc.point=Xc}function qc(){Zc(jc,Rc)}function Xc(t,e){Hc.point=Zc,jc=t,Rc=e,Yc=t*=yc,zc=xc(e=(e*=yc)/2+dc),Uc=Tc(e)}function Zc(t,e){var n=(t*=yc)-Yc,r=n>=0?1:-1,i=r*n,a=xc(e=(e*=yc)/2+dc),o=Tc(e),s=Uc*o,c=zc*a+s*xc(i),u=s*r*Tc(i);Wc.add(bc(u,c)),Yc=t,zc=a,Uc=o}var Jc=function(t){return Vc.reset(),$c(t,Hc),2*Vc};function Qc(t){return[bc(t[1],t[0]),Oc(t[2])]}function Kc(t){var e=t[0],n=t[1],r=xc(n);return[r*xc(e),r*Tc(e),Tc(n)]}function tu(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function eu(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 nu(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function ru(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function iu(t){var e=Ac(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var au,ou,su,cu,uu,lu,hu,fu,du,pu,gu=sc(),yu={point:vu,lineStart:bu,lineEnd:xu,polygonStart:function(){yu.point=_u,yu.lineStart=ku,yu.lineEnd=wu,gu.reset(),Hc.polygonStart()},polygonEnd:function(){Hc.polygonEnd(),yu.point=vu,yu.lineStart=bu,yu.lineEnd=xu,Wc<0?(au=-(su=180),ou=-(cu=90)):gu>1e-6?cu=90:gu<-1e-6&&(ou=-90),pu[0]=au,pu[1]=su},sphere:function(){au=-(su=180),ou=-(cu=90)}};function vu(t,e){du.push(pu=[au=t,su=t]),e<ou&&(ou=e),e>cu&&(cu=e)}function mu(t,e){var n=Kc([t*yc,e*yc]);if(fu){var r=eu(fu,n),i=eu([r[1],-r[0],0],r);iu(i),i=Qc(i);var a,o=t-uu,s=o>0?1:-1,c=i[0]*gc*s,u=vc(o)>180;u^(s*uu<c&&c<s*t)?(a=i[1]*gc)>cu&&(cu=a):u^(s*uu<(c=(c+360)%360-180)&&c<s*t)?(a=-i[1]*gc)<ou&&(ou=a):(e<ou&&(ou=e),e>cu&&(cu=e)),u?t<uu?Eu(au,t)>Eu(au,su)&&(su=t):Eu(t,su)>Eu(au,su)&&(au=t):su>=au?(t<au&&(au=t),t>su&&(su=t)):t>uu?Eu(au,t)>Eu(au,su)&&(su=t):Eu(t,su)>Eu(au,su)&&(au=t)}else du.push(pu=[au=t,su=t]);e<ou&&(ou=e),e>cu&&(cu=e),fu=n,uu=t}function bu(){yu.point=mu}function xu(){pu[0]=au,pu[1]=su,yu.point=vu,fu=null}function _u(t,e){if(fu){var n=t-uu;gu.add(vc(n)>180?n+(n>0?360:-360):n)}else lu=t,hu=e;Hc.point(t,e),mu(t,e)}function ku(){Hc.lineStart()}function wu(){_u(lu,hu),Hc.lineEnd(),vc(gu)>1e-6&&(au=-(su=180)),pu[0]=au,pu[1]=su,fu=null}function Eu(t,e){return(e-=t)<0?e+360:e}function Tu(t,e){return t[0]-e[0]}function Cu(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}var Au,Su,Mu,Ou,Du,Nu,Bu,Lu,Fu,Pu,Iu,ju,Ru,Yu,zu,Uu,$u=function(t){var e,n,r,i,a,o,s;if(cu=su=-(au=ou=1/0),du=[],$c(t,yu),n=du.length){for(du.sort(Tu),e=1,a=[r=du[0]];e<n;++e)Cu(r,(i=du[e])[0])||Cu(r,i[1])?(Eu(r[0],i[1])>Eu(r[0],r[1])&&(r[1]=i[1]),Eu(i[0],r[1])>Eu(r[0],r[1])&&(r[0]=i[0])):a.push(r=i);for(o=-1/0,e=0,r=a[n=a.length-1];e<=n;r=i,++e)i=a[e],(s=Eu(r[1],i[0]))>o&&(o=s,au=i[0],su=r[1])}return du=pu=null,au===1/0||ou===1/0?[[NaN,NaN],[NaN,NaN]]:[[au,ou],[su,cu]]},Wu={sphere:Nc,point:Vu,lineStart:Gu,lineEnd:Zu,polygonStart:function(){Wu.lineStart=Ju,Wu.lineEnd=Qu},polygonEnd:function(){Wu.lineStart=Gu,Wu.lineEnd=Zu}};function Vu(t,e){t*=yc;var n=xc(e*=yc);Hu(n*xc(t),n*Tc(t),Tc(e))}function Hu(t,e,n){++Au,Mu+=(t-Mu)/Au,Ou+=(e-Ou)/Au,Du+=(n-Du)/Au}function Gu(){Wu.point=qu}function qu(t,e){t*=yc;var n=xc(e*=yc);Yu=n*xc(t),zu=n*Tc(t),Uu=Tc(e),Wu.point=Xu,Hu(Yu,zu,Uu)}function Xu(t,e){t*=yc;var n=xc(e*=yc),r=n*xc(t),i=n*Tc(t),a=Tc(e),o=bc(Ac((o=zu*a-Uu*i)*o+(o=Uu*r-Yu*a)*o+(o=Yu*i-zu*r)*o),Yu*r+zu*i+Uu*a);Su+=o,Nu+=o*(Yu+(Yu=r)),Bu+=o*(zu+(zu=i)),Lu+=o*(Uu+(Uu=a)),Hu(Yu,zu,Uu)}function Zu(){Wu.point=Vu}function Ju(){Wu.point=Ku}function Qu(){tl(ju,Ru),Wu.point=Vu}function Ku(t,e){ju=t,Ru=e,t*=yc,e*=yc,Wu.point=tl;var n=xc(e);Yu=n*xc(t),zu=n*Tc(t),Uu=Tc(e),Hu(Yu,zu,Uu)}function tl(t,e){t*=yc;var n=xc(e*=yc),r=n*xc(t),i=n*Tc(t),a=Tc(e),o=zu*a-Uu*i,s=Uu*r-Yu*a,c=Yu*i-zu*r,u=Ac(o*o+s*s+c*c),l=Oc(u),h=u&&-l/u;Fu+=h*o,Pu+=h*s,Iu+=h*c,Su+=l,Nu+=l*(Yu+(Yu=r)),Bu+=l*(zu+(zu=i)),Lu+=l*(Uu+(Uu=a)),Hu(Yu,zu,Uu)}var el=function(t){Au=Su=Mu=Ou=Du=Nu=Bu=Lu=Fu=Pu=Iu=0,$c(t,Wu);var e=Fu,n=Pu,r=Iu,i=e*e+n*n+r*r;return i<1e-12&&(e=Nu,n=Bu,r=Lu,Su<1e-6&&(e=Mu,n=Ou,r=Du),(i=e*e+n*n+r*r)<1e-12)?[NaN,NaN]:[bc(n,e)*gc,Oc(r/Ac(i))*gc]},nl=function(t){return function(){return t}},rl=function(t,e){function n(n,r){return n=t(n,r),e(n[0],n[1])}return t.invert&&e.invert&&(n.invert=function(n,r){return(n=e.invert(n,r))&&t.invert(n[0],n[1])}),n};function il(t,e){return[vc(t)>hc?t+Math.round(-t/pc)*pc:t,e]}function al(t,e,n){return(t%=pc)?e||n?rl(sl(t),cl(e,n)):sl(t):e||n?cl(e,n):il}function ol(t){return function(e,n){return[(e+=t)>hc?e-pc:e<-hc?e+pc:e,n]}}function sl(t){var e=ol(t);return e.invert=ol(-t),e}function cl(t,e){var n=xc(t),r=Tc(t),i=xc(e),a=Tc(e);function o(t,e){var o=xc(e),s=xc(t)*o,c=Tc(t)*o,u=Tc(e),l=u*n+s*r;return[bc(c*i-l*a,s*n-u*r),Oc(l*i+c*a)]}return o.invert=function(t,e){var o=xc(e),s=xc(t)*o,c=Tc(t)*o,u=Tc(e),l=u*i-c*a;return[bc(c*i+u*a,s*n+l*r),Oc(l*n-s*r)]},o}il.invert=il;var ul=function(t){function e(e){return(e=t(e[0]*yc,e[1]*yc))[0]*=gc,e[1]*=gc,e}return t=al(t[0]*yc,t[1]*yc,t.length>2?t[2]*yc:0),e.invert=function(e){return(e=t.invert(e[0]*yc,e[1]*yc))[0]*=gc,e[1]*=gc,e},e};function ll(t,e,n,r,i,a){if(n){var o=xc(e),s=Tc(e),c=r*n;null==i?(i=e+r*pc,a=e-c/2):(i=hl(o,i),a=hl(o,a),(r>0?i<a:i>a)&&(i+=r*pc));for(var u,l=i;r>0?l>a:l<a;l-=c)u=Qc([o,-s*xc(l),-s*Tc(l)]),t.point(u[0],u[1])}}function hl(t,e){(e=Kc(e))[0]-=t,iu(e);var n=Mc(-e[1]);return((-e[2]<0?-n:n)+pc-1e-6)%pc}var fl=function(){var t,e,n=nl([0,0]),r=nl(90),i=nl(6),a={point:function(n,r){t.push(n=e(n,r)),n[0]*=gc,n[1]*=gc}};function o(){var o=n.apply(this,arguments),s=r.apply(this,arguments)*yc,c=i.apply(this,arguments)*yc;return t=[],e=al(-o[0]*yc,-o[1]*yc,0).invert,ll(a,s,c,1),o={type:"Polygon",coordinates:[t]},t=e=null,o}return o.center=function(t){return arguments.length?(n="function"==typeof t?t:nl([+t[0],+t[1]]),o):n},o.radius=function(t){return arguments.length?(r="function"==typeof t?t:nl(+t),o):r},o.precision=function(t){return arguments.length?(i="function"==typeof t?t:nl(+t),o):i},o},dl=function(){var t,e=[];return{point:function(e,n){t.push([e,n])},lineStart:function(){e.push(t=[])},lineEnd:Nc,rejoin:function(){e.length>1&&e.push(e.pop().concat(e.shift()))},result:function(){var n=e;return e=[],t=null,n}}},pl=function(t,e){return vc(t[0]-e[0])<1e-6&&vc(t[1]-e[1])<1e-6};function gl(t,e,n,r){this.x=t,this.z=e,this.o=n,this.e=r,this.v=!1,this.n=this.p=null}var yl=function(t,e,n,r,i){var a,o,s=[],c=[];if(t.forEach((function(t){if(!((e=t.length-1)<=0)){var e,n,r=t[0],o=t[e];if(pl(r,o)){for(i.lineStart(),a=0;a<e;++a)i.point((r=t[a])[0],r[1]);i.lineEnd()}else s.push(n=new gl(r,t,null,!0)),c.push(n.o=new gl(r,null,n,!1)),s.push(n=new gl(o,t,null,!1)),c.push(n.o=new gl(o,null,n,!0))}})),s.length){for(c.sort(e),vl(s),vl(c),a=0,o=c.length;a<o;++a)c[a].e=n=!n;for(var u,l,h=s[0];;){for(var f=h,d=!0;f.v;)if((f=f.n)===h)return;u=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(d)for(a=0,o=u.length;a<o;++a)i.point((l=u[a])[0],l[1]);else r(f.x,f.n.x,1,i);f=f.n}else{if(d)for(u=f.p.z,a=u.length-1;a>=0;--a)i.point((l=u[a])[0],l[1]);else r(f.x,f.p.x,-1,i);f=f.p}u=(f=f.o).z,d=!d}while(!f.v);i.lineEnd()}}};function vl(t){if(e=t.length){for(var e,n,r=0,i=t[0];++r<e;)i.n=n=t[r],n.p=i,i=n;i.n=n=t[0],n.p=i}}var ml=sc();function bl(t){return vc(t[0])<=hc?t[0]:Cc(t[0])*((vc(t[0])+hc)%pc-hc)}var xl=function(t,e){var n=bl(e),r=e[1],i=Tc(r),a=[Tc(n),-xc(n),0],o=0,s=0;ml.reset(),1===i?r=fc+1e-6:-1===i&&(r=-fc-1e-6);for(var c=0,u=t.length;c<u;++c)if(h=(l=t[c]).length)for(var l,h,f=l[h-1],d=bl(f),p=f[1]/2+dc,g=Tc(p),y=xc(p),v=0;v<h;++v,d=b,g=_,y=k,f=m){var m=l[v],b=bl(m),x=m[1]/2+dc,_=Tc(x),k=xc(x),w=b-d,E=w>=0?1:-1,T=E*w,C=T>hc,A=g*_;if(ml.add(bc(A*E*Tc(T),y*k+A*xc(T))),o+=C?w+E*pc:w,C^d>=n^b>=n){var S=eu(Kc(f),Kc(m));iu(S);var M=eu(a,S);iu(M);var O=(C^w>=0?-1:1)*Oc(M[2]);(r>O||r===O&&(S[0]||S[1]))&&(s+=C^w>=0?1:-1)}}return(o<-1e-6||o<1e-6&&ml<-1e-6)^1&s},_l=function(t,e,n,r){return function(i){var a,o,s,c=e(i),u=dl(),l=e(u),h=!1,f={point:d,lineStart:g,lineEnd:y,polygonStart:function(){f.point=v,f.lineStart=m,f.lineEnd=b,o=[],a=[]},polygonEnd:function(){f.point=d,f.lineStart=g,f.lineEnd=y,o=I(o);var t=xl(a,r);o.length?(h||(i.polygonStart(),h=!0),yl(o,wl,t,n,i)):t&&(h||(i.polygonStart(),h=!0),i.lineStart(),n(null,null,1,i),i.lineEnd()),h&&(i.polygonEnd(),h=!1),o=a=null},sphere:function(){i.polygonStart(),i.lineStart(),n(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function d(e,n){t(e,n)&&i.point(e,n)}function p(t,e){c.point(t,e)}function g(){f.point=p,c.lineStart()}function y(){f.point=d,c.lineEnd()}function v(t,e){s.push([t,e]),l.point(t,e)}function m(){l.lineStart(),s=[]}function b(){v(s[0][0],s[0][1]),l.lineEnd();var t,e,n,r,c=l.clean(),f=u.result(),d=f.length;if(s.pop(),a.push(s),s=null,d)if(1&c){if((e=(n=f[0]).length-1)>0){for(h||(i.polygonStart(),h=!0),i.lineStart(),t=0;t<e;++t)i.point((r=n[t])[0],r[1]);i.lineEnd()}}else d>1&&2&c&&f.push(f.pop().concat(f.shift())),o.push(f.filter(kl))}return f}};function kl(t){return t.length>1}function wl(t,e){return((t=t.x)[0]<0?t[1]-fc-1e-6:fc-t[1])-((e=e.x)[0]<0?e[1]-fc-1e-6:fc-e[1])}var El=_l((function(){return!0}),(function(t){var e,n=NaN,r=NaN,i=NaN;return{lineStart:function(){t.lineStart(),e=1},point:function(a,o){var s=a>0?hc:-hc,c=vc(a-n);vc(c-hc)<1e-6?(t.point(n,r=(r+o)/2>0?fc:-fc),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),t.point(a,r),e=0):i!==s&&c>=hc&&(vc(n-i)<1e-6&&(n-=1e-6*i),vc(a-s)<1e-6&&(a-=1e-6*s),r=function(t,e,n,r){var i,a,o=Tc(t-n);return vc(o)>1e-6?mc((Tc(e)*(a=xc(r))*Tc(n)-Tc(r)*(i=xc(e))*Tc(t))/(i*a*o)):(e+r)/2}(n,r,a,o),t.point(i,r),t.lineEnd(),t.lineStart(),t.point(s,r),e=0),t.point(n=a,r=o),i=s},lineEnd:function(){t.lineEnd(),n=r=NaN},clean:function(){return 2-e}}}),(function(t,e,n,r){var i;if(null==t)i=n*fc,r.point(-hc,i),r.point(0,i),r.point(hc,i),r.point(hc,0),r.point(hc,-i),r.point(0,-i),r.point(-hc,-i),r.point(-hc,0),r.point(-hc,i);else if(vc(t[0]-e[0])>1e-6){var a=t[0]<e[0]?hc:-hc;i=n*a/2,r.point(-a,i),r.point(0,i),r.point(a,i)}else r.point(e[0],e[1])}),[-hc,-fc]);var Tl=function(t){var e=xc(t),n=6*yc,r=e>0,i=vc(e)>1e-6;function a(t,n){return xc(t)*xc(n)>e}function o(t,n,r){var i=[1,0,0],a=eu(Kc(t),Kc(n)),o=tu(a,a),s=a[0],c=o-s*s;if(!c)return!r&&t;var u=e*o/c,l=-e*s/c,h=eu(i,a),f=ru(i,u);nu(f,ru(a,l));var d=h,p=tu(f,d),g=tu(d,d),y=p*p-g*(tu(f,f)-1);if(!(y<0)){var v=Ac(y),m=ru(d,(-p-v)/g);if(nu(m,f),m=Qc(m),!r)return m;var b,x=t[0],_=n[0],k=t[1],w=n[1];_<x&&(b=x,x=_,_=b);var E=_-x,T=vc(E-hc)<1e-6;if(!T&&w<k&&(b=k,k=w,w=b),T||E<1e-6?T?k+w>0^m[1]<(vc(m[0]-x)<1e-6?k:w):k<=m[1]&&m[1]<=w:E>hc^(x<=m[0]&&m[0]<=_)){var C=ru(d,(-p+v)/g);return nu(C,f),[m,Qc(C)]}}}function s(e,n){var i=r?t:hc-t,a=0;return e<-i?a|=1:e>i&&(a|=2),n<-i?a|=4:n>i&&(a|=8),a}return _l(a,(function(t){var e,n,c,u,l;return{lineStart:function(){u=c=!1,l=1},point:function(h,f){var d,p=[h,f],g=a(h,f),y=r?g?0:s(h,f):g?s(h+(h<0?hc:-hc),f):0;if(!e&&(u=c=g)&&t.lineStart(),g!==c&&(!(d=o(e,p))||pl(e,d)||pl(p,d))&&(p[0]+=1e-6,p[1]+=1e-6,g=a(p[0],p[1])),g!==c)l=0,g?(t.lineStart(),d=o(p,e),t.point(d[0],d[1])):(d=o(e,p),t.point(d[0],d[1]),t.lineEnd()),e=d;else if(i&&e&&r^g){var v;y&n||!(v=o(p,e,!0))||(l=0,r?(t.lineStart(),t.point(v[0][0],v[0][1]),t.point(v[1][0],v[1][1]),t.lineEnd()):(t.point(v[1][0],v[1][1]),t.lineEnd(),t.lineStart(),t.point(v[0][0],v[0][1])))}!g||e&&pl(e,p)||t.point(p[0],p[1]),e=p,c=g,n=y},lineEnd:function(){c&&t.lineEnd(),e=null},clean:function(){return l|(u&&c)<<1}}}),(function(e,r,i,a){ll(a,t,n,i,e,r)}),r?[0,-t]:[-hc,t-hc])};function Cl(t,e,n,r){function i(i,a){return t<=i&&i<=n&&e<=a&&a<=r}function a(i,a,s,u){var l=0,h=0;if(null==i||(l=o(i,s))!==(h=o(a,s))||c(i,a)<0^s>0)do{u.point(0===l||3===l?t:n,l>1?r:e)}while((l=(l+s+4)%4)!==h);else u.point(a[0],a[1])}function o(r,i){return vc(r[0]-t)<1e-6?i>0?0:3:vc(r[0]-n)<1e-6?i>0?2:1:vc(r[1]-e)<1e-6?i>0?1:0:i>0?3:2}function s(t,e){return c(t.x,e.x)}function c(t,e){var n=o(t,1),r=o(e,1);return n!==r?n-r:0===n?e[1]-t[1]:1===n?t[0]-e[0]:2===n?t[1]-e[1]:e[0]-t[0]}return function(o){var c,u,l,h,f,d,p,g,y,v,m,b=o,x=dl(),_={point:k,lineStart:function(){_.point=w,u&&u.push(l=[]);v=!0,y=!1,p=g=NaN},lineEnd:function(){c&&(w(h,f),d&&y&&x.rejoin(),c.push(x.result()));_.point=k,y&&b.lineEnd()},polygonStart:function(){b=x,c=[],u=[],m=!0},polygonEnd:function(){var e=function(){for(var e=0,n=0,i=u.length;n<i;++n)for(var a,o,s=u[n],c=1,l=s.length,h=s[0],f=h[0],d=h[1];c<l;++c)a=f,o=d,h=s[c],f=h[0],d=h[1],o<=r?d>r&&(f-a)*(r-o)>(d-o)*(t-a)&&++e:d<=r&&(f-a)*(r-o)<(d-o)*(t-a)&&--e;return e}(),n=m&&e,i=(c=I(c)).length;(n||i)&&(o.polygonStart(),n&&(o.lineStart(),a(null,null,1,o),o.lineEnd()),i&&yl(c,s,e,a,o),o.polygonEnd());b=o,c=u=l=null}};function k(t,e){i(t,e)&&b.point(t,e)}function w(a,o){var s=i(a,o);if(u&&l.push([a,o]),v)h=a,f=o,d=s,v=!1,s&&(b.lineStart(),b.point(a,o));else if(s&&y)b.point(a,o);else{var c=[p=Math.max(-1e9,Math.min(1e9,p)),g=Math.max(-1e9,Math.min(1e9,g))],x=[a=Math.max(-1e9,Math.min(1e9,a)),o=Math.max(-1e9,Math.min(1e9,o))];!function(t,e,n,r,i,a){var o,s=t[0],c=t[1],u=0,l=1,h=e[0]-s,f=e[1]-c;if(o=n-s,h||!(o>0)){if(o/=h,h<0){if(o<u)return;o<l&&(l=o)}else if(h>0){if(o>l)return;o>u&&(u=o)}if(o=i-s,h||!(o<0)){if(o/=h,h<0){if(o>l)return;o>u&&(u=o)}else if(h>0){if(o<u)return;o<l&&(l=o)}if(o=r-c,f||!(o>0)){if(o/=f,f<0){if(o<u)return;o<l&&(l=o)}else if(f>0){if(o>l)return;o>u&&(u=o)}if(o=a-c,f||!(o<0)){if(o/=f,f<0){if(o>l)return;o>u&&(u=o)}else if(f>0){if(o<u)return;o<l&&(l=o)}return u>0&&(t[0]=s+u*h,t[1]=c+u*f),l<1&&(e[0]=s+l*h,e[1]=c+l*f),!0}}}}}(c,x,t,e,n,r)?s&&(b.lineStart(),b.point(a,o),m=!1):(y||(b.lineStart(),b.point(c[0],c[1])),b.point(x[0],x[1]),s||b.lineEnd(),m=!1)}p=a,g=o,y=s}return _}}var Al,Sl,Ml,Ol=function(){var t,e,n,r=0,i=0,a=960,o=500;return n={stream:function(n){return t&&e===n?t:t=Cl(r,i,a,o)(e=n)},extent:function(s){return arguments.length?(r=+s[0][0],i=+s[0][1],a=+s[1][0],o=+s[1][1],t=e=null,n):[[r,i],[a,o]]}}},Dl=sc(),Nl={sphere:Nc,point:Nc,lineStart:function(){Nl.point=Ll,Nl.lineEnd=Bl},lineEnd:Nc,polygonStart:Nc,polygonEnd:Nc};function Bl(){Nl.point=Nl.lineEnd=Nc}function Ll(t,e){Al=t*=yc,Sl=Tc(e*=yc),Ml=xc(e),Nl.point=Fl}function Fl(t,e){t*=yc;var n=Tc(e*=yc),r=xc(e),i=vc(t-Al),a=xc(i),o=r*Tc(i),s=Ml*n-Sl*r*a,c=Sl*n+Ml*r*a;Dl.add(bc(Ac(o*o+s*s),c)),Al=t,Sl=n,Ml=r}var Pl=function(t){return Dl.reset(),$c(t,Nl),+Dl},Il=[null,null],jl={type:"LineString",coordinates:Il},Rl=function(t,e){return Il[0]=t,Il[1]=e,Pl(jl)},Yl={Feature:function(t,e){return Ul(t.geometry,e)},FeatureCollection:function(t,e){for(var n=t.features,r=-1,i=n.length;++r<i;)if(Ul(n[r].geometry,e))return!0;return!1}},zl={Sphere:function(){return!0},Point:function(t,e){return $l(t.coordinates,e)},MultiPoint:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if($l(n[r],e))return!0;return!1},LineString:function(t,e){return Wl(t.coordinates,e)},MultiLineString:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Wl(n[r],e))return!0;return!1},Polygon:function(t,e){return Vl(t.coordinates,e)},MultiPolygon:function(t,e){for(var n=t.coordinates,r=-1,i=n.length;++r<i;)if(Vl(n[r],e))return!0;return!1},GeometryCollection:function(t,e){for(var n=t.geometries,r=-1,i=n.length;++r<i;)if(Ul(n[r],e))return!0;return!1}};function Ul(t,e){return!(!t||!zl.hasOwnProperty(t.type))&&zl[t.type](t,e)}function $l(t,e){return 0===Rl(t,e)}function Wl(t,e){for(var n,r,i,a=0,o=t.length;a<o;a++){if(0===(r=Rl(t[a],e)))return!0;if(a>0&&(i=Rl(t[a],t[a-1]))>0&&n<=i&&r<=i&&(n+r-i)*(1-Math.pow((n-r)/i,2))<1e-12*i)return!0;n=r}return!1}function Vl(t,e){return!!xl(t.map(Hl),Gl(e))}function Hl(t){return(t=t.map(Gl)).pop(),t}function Gl(t){return[t[0]*yc,t[1]*yc]}var ql=function(t,e){return(t&&Yl.hasOwnProperty(t.type)?Yl[t.type]:Ul)(t,e)};function Xl(t,e,n){var r=k(t,e-1e-6,n).concat(e);return function(t){return r.map((function(e){return[t,e]}))}}function Zl(t,e,n){var r=k(t,e-1e-6,n).concat(e);return function(t){return r.map((function(e){return[e,t]}))}}function Jl(){var t,e,n,r,i,a,o,s,c,u,l,h,f=10,d=f,p=90,g=360,y=2.5;function v(){return{type:"MultiLineString",coordinates:m()}}function m(){return k(_c(r/p)*p,n,p).map(l).concat(k(_c(s/g)*g,o,g).map(h)).concat(k(_c(e/f)*f,t,f).filter((function(t){return vc(t%p)>1e-6})).map(c)).concat(k(_c(a/d)*d,i,d).filter((function(t){return vc(t%g)>1e-6})).map(u))}return v.lines=function(){return m().map((function(t){return{type:"LineString",coordinates:t}}))},v.outline=function(){return{type:"Polygon",coordinates:[l(r).concat(h(o).slice(1),l(n).reverse().slice(1),h(s).reverse().slice(1))]}},v.extent=function(t){return arguments.length?v.extentMajor(t).extentMinor(t):v.extentMinor()},v.extentMajor=function(t){return arguments.length?(r=+t[0][0],n=+t[1][0],s=+t[0][1],o=+t[1][1],r>n&&(t=r,r=n,n=t),s>o&&(t=s,s=o,o=t),v.precision(y)):[[r,s],[n,o]]},v.extentMinor=function(n){return arguments.length?(e=+n[0][0],t=+n[1][0],a=+n[0][1],i=+n[1][1],e>t&&(n=e,e=t,t=n),a>i&&(n=a,a=i,i=n),v.precision(y)):[[e,a],[t,i]]},v.step=function(t){return arguments.length?v.stepMajor(t).stepMinor(t):v.stepMinor()},v.stepMajor=function(t){return arguments.length?(p=+t[0],g=+t[1],v):[p,g]},v.stepMinor=function(t){return arguments.length?(f=+t[0],d=+t[1],v):[f,d]},v.precision=function(f){return arguments.length?(y=+f,c=Xl(a,i,90),u=Zl(e,t,y),l=Xl(s,o,90),h=Zl(r,n,y),v):y},v.extentMajor([[-180,1e-6-90],[180,90-1e-6]]).extentMinor([[-180,-80-1e-6],[180,80+1e-6]])}function Ql(){return Jl()()}var Kl,th,eh,nh,rh=function(t,e){var n=t[0]*yc,r=t[1]*yc,i=e[0]*yc,a=e[1]*yc,o=xc(r),s=Tc(r),c=xc(a),u=Tc(a),l=o*xc(n),h=o*Tc(n),f=c*xc(i),d=c*Tc(i),p=2*Oc(Ac(Dc(a-r)+o*c*Dc(i-n))),g=Tc(p),y=p?function(t){var e=Tc(t*=p)/g,n=Tc(p-t)/g,r=n*l+e*f,i=n*h+e*d,a=n*s+e*u;return[bc(i,r)*gc,bc(a,Ac(r*r+i*i))*gc]}:function(){return[n*gc,r*gc]};return y.distance=p,y},ih=function(t){return t},ah=sc(),oh=sc(),sh={point:Nc,lineStart:Nc,lineEnd:Nc,polygonStart:function(){sh.lineStart=ch,sh.lineEnd=hh},polygonEnd:function(){sh.lineStart=sh.lineEnd=sh.point=Nc,ah.add(vc(oh)),oh.reset()},result:function(){var t=ah/2;return ah.reset(),t}};function ch(){sh.point=uh}function uh(t,e){sh.point=lh,Kl=eh=t,th=nh=e}function lh(t,e){oh.add(nh*t-eh*e),eh=t,nh=e}function hh(){lh(Kl,th)}var fh=sh,dh=1/0,ph=dh,gh=-dh,yh=gh;var vh,mh,bh,xh,_h={point:function(t,e){t<dh&&(dh=t);t>gh&&(gh=t);e<ph&&(ph=e);e>yh&&(yh=e)},lineStart:Nc,lineEnd:Nc,polygonStart:Nc,polygonEnd:Nc,result:function(){var t=[[dh,ph],[gh,yh]];return gh=yh=-(ph=dh=1/0),t}},kh=0,wh=0,Eh=0,Th=0,Ch=0,Ah=0,Sh=0,Mh=0,Oh=0,Dh={point:Nh,lineStart:Bh,lineEnd:Ph,polygonStart:function(){Dh.lineStart=Ih,Dh.lineEnd=jh},polygonEnd:function(){Dh.point=Nh,Dh.lineStart=Bh,Dh.lineEnd=Ph},result:function(){var t=Oh?[Sh/Oh,Mh/Oh]:Ah?[Th/Ah,Ch/Ah]:Eh?[kh/Eh,wh/Eh]:[NaN,NaN];return kh=wh=Eh=Th=Ch=Ah=Sh=Mh=Oh=0,t}};function Nh(t,e){kh+=t,wh+=e,++Eh}function Bh(){Dh.point=Lh}function Lh(t,e){Dh.point=Fh,Nh(bh=t,xh=e)}function Fh(t,e){var n=t-bh,r=e-xh,i=Ac(n*n+r*r);Th+=i*(bh+t)/2,Ch+=i*(xh+e)/2,Ah+=i,Nh(bh=t,xh=e)}function Ph(){Dh.point=Nh}function Ih(){Dh.point=Rh}function jh(){Yh(vh,mh)}function Rh(t,e){Dh.point=Yh,Nh(vh=bh=t,mh=xh=e)}function Yh(t,e){var n=t-bh,r=e-xh,i=Ac(n*n+r*r);Th+=i*(bh+t)/2,Ch+=i*(xh+e)/2,Ah+=i,Sh+=(i=xh*t-bh*e)*(bh+t),Mh+=i*(xh+e),Oh+=3*i,Nh(bh=t,xh=e)}var zh=Dh;function Uh(t){this._context=t}Uh.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,pc)}},result:Nc};var $h,Wh,Vh,Hh,Gh,qh=sc(),Xh={point:Nc,lineStart:function(){Xh.point=Zh},lineEnd:function(){$h&&Jh(Wh,Vh),Xh.point=Nc},polygonStart:function(){$h=!0},polygonEnd:function(){$h=null},result:function(){var t=+qh;return qh.reset(),t}};function Zh(t,e){Xh.point=Jh,Wh=Hh=t,Vh=Gh=e}function Jh(t,e){Hh-=t,Gh-=e,qh.add(Ac(Hh*Hh+Gh*Gh)),Hh=t,Gh=e}var Qh=Xh;function Kh(){this._string=[]}function tf(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}Kh.prototype={_radius:4.5,_circle:tf(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){0===this._line&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:this._string.push("M",t,",",e),this._point=1;break;case 1:this._string.push("L",t,",",e);break;default:null==this._circle&&(this._circle=tf(this._radius)),this._string.push("M",t,",",e,this._circle)}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}return null}};var ef=function(t,e){var n,r,i=4.5;function a(t){return t&&("function"==typeof i&&r.pointRadius(+i.apply(this,arguments)),$c(t,n(r))),r.result()}return a.area=function(t){return $c(t,n(fh)),fh.result()},a.measure=function(t){return $c(t,n(Qh)),Qh.result()},a.bounds=function(t){return $c(t,n(_h)),_h.result()},a.centroid=function(t){return $c(t,n(zh)),zh.result()},a.projection=function(e){return arguments.length?(n=null==e?(t=null,ih):(t=e).stream,a):t},a.context=function(t){return arguments.length?(r=null==t?(e=null,new Kh):new Uh(e=t),"function"!=typeof i&&r.pointRadius(i),a):e},a.pointRadius=function(t){return arguments.length?(i="function"==typeof t?t:(r.pointRadius(+t),+t),a):i},a.projection(t).context(e)},nf=function(t){return{stream:rf(t)}};function rf(t){return function(e){var n=new af;for(var r in t)n[r]=t[r];return n.stream=e,n}}function af(){}function of(t,e,n){var r=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),null!=r&&t.clipExtent(null),$c(n,t.stream(_h)),e(_h.result()),null!=r&&t.clipExtent(r),t}function sf(t,e,n){return of(t,(function(n){var r=e[1][0]-e[0][0],i=e[1][1]-e[0][1],a=Math.min(r/(n[1][0]-n[0][0]),i/(n[1][1]-n[0][1])),o=+e[0][0]+(r-a*(n[1][0]+n[0][0]))/2,s=+e[0][1]+(i-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([o,s])}),n)}function cf(t,e,n){return sf(t,[[0,0],e],n)}function uf(t,e,n){return of(t,(function(n){var r=+e,i=r/(n[1][0]-n[0][0]),a=(r-i*(n[1][0]+n[0][0]))/2,o=-i*n[0][1];t.scale(150*i).translate([a,o])}),n)}function lf(t,e,n){return of(t,(function(n){var r=+e,i=r/(n[1][1]-n[0][1]),a=-i*n[0][0],o=(r-i*(n[1][1]+n[0][1]))/2;t.scale(150*i).translate([a,o])}),n)}af.prototype={constructor:af,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 hf=xc(30*yc),ff=function(t,e){return+e?function(t,e){function n(r,i,a,o,s,c,u,l,h,f,d,p,g,y){var v=u-r,m=l-i,b=v*v+m*m;if(b>4*e&&g--){var x=o+f,_=s+d,k=c+p,w=Ac(x*x+_*_+k*k),E=Oc(k/=w),T=vc(vc(k)-1)<1e-6||vc(a-h)<1e-6?(a+h)/2:bc(_,x),C=t(T,E),A=C[0],S=C[1],M=A-r,O=S-i,D=m*M-v*O;(D*D/b>e||vc((v*M+m*O)/b-.5)>.3||o*f+s*d+c*p<hf)&&(n(r,i,a,o,s,c,A,S,T,x/=w,_/=w,k,g,y),y.point(A,S),n(A,S,T,x,_,k,u,l,h,f,d,p,g,y))}}return function(e){var r,i,a,o,s,c,u,l,h,f,d,p,g={point:y,lineStart:v,lineEnd:b,polygonStart:function(){e.polygonStart(),g.lineStart=x},polygonEnd:function(){e.polygonEnd(),g.lineStart=v}};function y(n,r){n=t(n,r),e.point(n[0],n[1])}function v(){l=NaN,g.point=m,e.lineStart()}function m(r,i){var a=Kc([r,i]),o=t(r,i);n(l,h,u,f,d,p,l=o[0],h=o[1],u=r,f=a[0],d=a[1],p=a[2],16,e),e.point(l,h)}function b(){g.point=y,e.lineEnd()}function x(){v(),g.point=_,g.lineEnd=k}function _(t,e){m(r=t,e),i=l,a=h,o=f,s=d,c=p,g.point=m}function k(){n(l,h,u,f,d,p,i,a,r,o,s,c,16,e),g.lineEnd=b,b()}return g}}(t,e):function(t){return rf({point:function(e,n){e=t(e,n),this.stream.point(e[0],e[1])}})}(t)};var df=rf({point:function(t,e){this.stream.point(t*yc,e*yc)}});function pf(t,e,n){function r(r,i){return[e+t*r,n-t*i]}return r.invert=function(r,i){return[(r-e)/t,(n-i)/t]},r}function gf(t,e,n,r){var i=xc(r),a=Tc(r),o=i*t,s=a*t,c=i/t,u=a/t,l=(a*n-i*e)/t,h=(a*e+i*n)/t;function f(t,r){return[o*t-s*r+e,n-s*t-o*r]}return f.invert=function(t,e){return[c*t-u*e+l,h-u*t-c*e]},f}function yf(t){return vf((function(){return t}))()}function vf(t){var e,n,r,i,a,o,s,c,u,l,h=150,f=480,d=250,p=0,g=0,y=0,v=0,m=0,b=0,x=null,_=El,k=null,w=ih,E=.5;function T(t){return c(t[0]*yc,t[1]*yc)}function C(t){return(t=c.invert(t[0],t[1]))&&[t[0]*gc,t[1]*gc]}function A(){var t=gf(h,0,0,b).apply(null,e(p,g)),r=(b?gf:pf)(h,f-t[0],d-t[1],b);return n=al(y,v,m),s=rl(e,r),c=rl(n,s),o=ff(s,E),S()}function S(){return u=l=null,T}return T.stream=function(t){return u&&l===t?u:u=df(function(t){return rf({point:function(e,n){var r=t(e,n);return this.stream.point(r[0],r[1])}})}(n)(_(o(w(l=t)))))},T.preclip=function(t){return arguments.length?(_=t,x=void 0,S()):_},T.postclip=function(t){return arguments.length?(w=t,k=r=i=a=null,S()):w},T.clipAngle=function(t){return arguments.length?(_=+t?Tl(x=t*yc):(x=null,El),S()):x*gc},T.clipExtent=function(t){return arguments.length?(w=null==t?(k=r=i=a=null,ih):Cl(k=+t[0][0],r=+t[0][1],i=+t[1][0],a=+t[1][1]),S()):null==k?null:[[k,r],[i,a]]},T.scale=function(t){return arguments.length?(h=+t,A()):h},T.translate=function(t){return arguments.length?(f=+t[0],d=+t[1],A()):[f,d]},T.center=function(t){return arguments.length?(p=t[0]%360*yc,g=t[1]%360*yc,A()):[p*gc,g*gc]},T.rotate=function(t){return arguments.length?(y=t[0]%360*yc,v=t[1]%360*yc,m=t.length>2?t[2]%360*yc:0,A()):[y*gc,v*gc,m*gc]},T.angle=function(t){return arguments.length?(b=t%360*yc,A()):b*gc},T.precision=function(t){return arguments.length?(o=ff(s,E=t*t),S()):Ac(E)},T.fitExtent=function(t,e){return sf(T,t,e)},T.fitSize=function(t,e){return cf(T,t,e)},T.fitWidth=function(t,e){return uf(T,t,e)},T.fitHeight=function(t,e){return lf(T,t,e)},function(){return e=t.apply(this,arguments),T.invert=e.invert&&C,A()}}function mf(t){var e=0,n=hc/3,r=vf(t),i=r(e,n);return i.parallels=function(t){return arguments.length?r(e=t[0]*yc,n=t[1]*yc):[e*gc,n*gc]},i}function bf(t,e){var n=Tc(t),r=(n+Tc(e))/2;if(vc(r)<1e-6)return function(t){var e=xc(t);function n(t,n){return[t*e,Tc(n)/e]}return n.invert=function(t,n){return[t/e,Oc(n*e)]},n}(t);var i=1+n*(2*r-n),a=Ac(i)/r;function o(t,e){var n=Ac(i-2*r*Tc(e))/r;return[n*Tc(t*=r),a-n*xc(t)]}return o.invert=function(t,e){var n=a-e;return[bc(t,vc(n))/r*Cc(n),Oc((i-(t*t+n*n)*r*r)/(2*r))]},o}var xf=function(){return mf(bf).scale(155.424).center([0,33.6442])},_f=function(){return xf().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])};var kf=function(){var t,e,n,r,i,a,o=_f(),s=xf().rotate([154,0]).center([-2,58.5]).parallels([55,65]),c=xf().rotate([157,0]).center([-3,19.9]).parallels([8,18]),u={point:function(t,e){a=[t,e]}};function l(t){var e=t[0],o=t[1];return a=null,n.point(e,o),a||(r.point(e,o),a)||(i.point(e,o),a)}function h(){return t=e=null,l}return l.invert=function(t){var e=o.scale(),n=o.translate(),r=(t[0]-n[0])/e,i=(t[1]-n[1])/e;return(i>=.12&&i<.234&&r>=-.425&&r<-.214?s:i>=.166&&i<.234&&r>=-.214&&r<-.115?c:o).invert(t)},l.stream=function(n){return t&&e===n?t:(r=[o.stream(e=n),s.stream(n),c.stream(n)],i=r.length,t={point:function(t,e){for(var n=-1;++n<i;)r[n].point(t,e)},sphere:function(){for(var t=-1;++t<i;)r[t].sphere()},lineStart:function(){for(var t=-1;++t<i;)r[t].lineStart()},lineEnd:function(){for(var t=-1;++t<i;)r[t].lineEnd()},polygonStart:function(){for(var t=-1;++t<i;)r[t].polygonStart()},polygonEnd:function(){for(var t=-1;++t<i;)r[t].polygonEnd()}});var r,i},l.precision=function(t){return arguments.length?(o.precision(t),s.precision(t),c.precision(t),h()):o.precision()},l.scale=function(t){return arguments.length?(o.scale(t),s.scale(.35*t),c.scale(t),l.translate(o.translate())):o.scale()},l.translate=function(t){if(!arguments.length)return o.translate();var e=o.scale(),a=+t[0],l=+t[1];return n=o.translate(t).clipExtent([[a-.455*e,l-.238*e],[a+.455*e,l+.238*e]]).stream(u),r=s.translate([a-.307*e,l+.201*e]).clipExtent([[a-.425*e+1e-6,l+.12*e+1e-6],[a-.214*e-1e-6,l+.234*e-1e-6]]).stream(u),i=c.translate([a-.205*e,l+.212*e]).clipExtent([[a-.214*e+1e-6,l+.166*e+1e-6],[a-.115*e-1e-6,l+.234*e-1e-6]]).stream(u),h()},l.fitExtent=function(t,e){return sf(l,t,e)},l.fitSize=function(t,e){return cf(l,t,e)},l.fitWidth=function(t,e){return uf(l,t,e)},l.fitHeight=function(t,e){return lf(l,t,e)},l.scale(1070)};function wf(t){return function(e,n){var r=xc(e),i=xc(n),a=t(r*i);return[a*i*Tc(e),a*Tc(n)]}}function Ef(t){return function(e,n){var r=Ac(e*e+n*n),i=t(r),a=Tc(i),o=xc(i);return[bc(e*a,r*o),Oc(r&&n*a/r)]}}var Tf=wf((function(t){return Ac(2/(1+t))}));Tf.invert=Ef((function(t){return 2*Oc(t/2)}));var Cf=function(){return yf(Tf).scale(124.75).clipAngle(179.999)},Af=wf((function(t){return(t=Mc(t))&&t/Tc(t)}));Af.invert=Ef((function(t){return t}));var Sf=function(){return yf(Af).scale(79.4188).clipAngle(179.999)};function Mf(t,e){return[t,wc(Sc((fc+e)/2))]}Mf.invert=function(t,e){return[t,2*mc(kc(e))-fc]};var Of=function(){return Df(Mf).scale(961/pc)};function Df(t){var e,n,r,i=yf(t),a=i.center,o=i.scale,s=i.translate,c=i.clipExtent,u=null;function l(){var a=hc*o(),s=i(ul(i.rotate()).invert([0,0]));return c(null==u?[[s[0]-a,s[1]-a],[s[0]+a,s[1]+a]]:t===Mf?[[Math.max(s[0]-a,u),e],[Math.min(s[0]+a,n),r]]:[[u,Math.max(s[1]-a,e)],[n,Math.min(s[1]+a,r)]])}return i.scale=function(t){return arguments.length?(o(t),l()):o()},i.translate=function(t){return arguments.length?(s(t),l()):s()},i.center=function(t){return arguments.length?(a(t),l()):a()},i.clipExtent=function(t){return arguments.length?(null==t?u=e=n=r=null:(u=+t[0][0],e=+t[0][1],n=+t[1][0],r=+t[1][1]),l()):null==u?null:[[u,e],[n,r]]},l()}function Nf(t){return Sc((fc+t)/2)}function Bf(t,e){var n=xc(t),r=t===e?Tc(t):wc(n/xc(e))/wc(Nf(e)/Nf(t)),i=n*Ec(Nf(t),r)/r;if(!r)return Mf;function a(t,e){i>0?e<1e-6-fc&&(e=1e-6-fc):e>fc-1e-6&&(e=fc-1e-6);var n=i/Ec(Nf(e),r);return[n*Tc(r*t),i-n*xc(r*t)]}return a.invert=function(t,e){var n=i-e,a=Cc(r)*Ac(t*t+n*n);return[bc(t,vc(n))/r*Cc(n),2*mc(Ec(i/a,1/r))-fc]},a}var Lf=function(){return mf(Bf).scale(109.5).parallels([30,30])};function Ff(t,e){return[t,e]}Ff.invert=Ff;var Pf=function(){return yf(Ff).scale(152.63)};function If(t,e){var n=xc(t),r=t===e?Tc(t):(n-xc(e))/(e-t),i=n/r+t;if(vc(r)<1e-6)return Ff;function a(t,e){var n=i-e,a=r*t;return[n*Tc(a),i-n*xc(a)]}return a.invert=function(t,e){var n=i-e;return[bc(t,vc(n))/r*Cc(n),i-Cc(r)*Ac(t*t+n*n)]},a}var jf=function(){return mf(If).scale(131.154).center([0,13.9389])},Rf=1.340264,Yf=-.081106,zf=893e-6,Uf=.003796,$f=Ac(3)/2;function Wf(t,e){var n=Oc($f*Tc(e)),r=n*n,i=r*r*r;return[t*xc(n)/($f*(Rf+3*Yf*r+i*(7*zf+9*Uf*r))),n*(Rf+Yf*r+i*(zf+Uf*r))]}Wf.invert=function(t,e){for(var n,r=e,i=r*r,a=i*i*i,o=0;o<12&&(a=(i=(r-=n=(r*(Rf+Yf*i+a*(zf+Uf*i))-e)/(Rf+3*Yf*i+a*(7*zf+9*Uf*i)))*r)*i*i,!(vc(n)<1e-12));++o);return[$f*t*(Rf+3*Yf*i+a*(7*zf+9*Uf*i))/xc(r),Oc(Tc(r)/$f)]};var Vf=function(){return yf(Wf).scale(177.158)};function Hf(t,e){var n=xc(e),r=xc(t)*n;return[n*Tc(t)/r,Tc(e)/r]}Hf.invert=Ef(mc);var Gf=function(){return yf(Hf).scale(144.049).clipAngle(60)};function qf(t,e,n,r){return 1===t&&1===e&&0===n&&0===r?ih:rf({point:function(i,a){this.stream.point(i*t+n,a*e+r)}})}var Xf=function(){var t,e,n,r,i,a,o=1,s=0,c=0,u=1,l=1,h=ih,f=null,d=ih;function p(){return r=i=null,a}return a={stream:function(t){return r&&i===t?r:r=h(d(i=t))},postclip:function(r){return arguments.length?(d=r,f=t=e=n=null,p()):d},clipExtent:function(r){return arguments.length?(d=null==r?(f=t=e=n=null,ih):Cl(f=+r[0][0],t=+r[0][1],e=+r[1][0],n=+r[1][1]),p()):null==f?null:[[f,t],[e,n]]},scale:function(t){return arguments.length?(h=qf((o=+t)*u,o*l,s,c),p()):o},translate:function(t){return arguments.length?(h=qf(o*u,o*l,s=+t[0],c=+t[1]),p()):[s,c]},reflectX:function(t){return arguments.length?(h=qf(o*(u=t?-1:1),o*l,s,c),p()):u<0},reflectY:function(t){return arguments.length?(h=qf(o*u,o*(l=t?-1:1),s,c),p()):l<0},fitExtent:function(t,e){return sf(a,t,e)},fitSize:function(t,e){return cf(a,t,e)},fitWidth:function(t,e){return uf(a,t,e)},fitHeight:function(t,e){return lf(a,t,e)}}};function Zf(t,e){var n=e*e,r=n*n;return[t*(.8707-.131979*n+r*(r*(.003971*n-.001529*r)-.013791)),e*(1.007226+n*(.015085+r*(.028874*n-.044475-.005916*r)))]}Zf.invert=function(t,e){var n,r=e,i=25;do{var a=r*r,o=a*a;r-=n=(r*(1.007226+a*(.015085+o*(.028874*a-.044475-.005916*o)))-e)/(1.007226+a*(.045255+o*(.259866*a-.311325-.005916*11*o)))}while(vc(n)>1e-6&&--i>0);return[t/(.8707+(a=r*r)*(a*(a*a*a*(.003971-.001529*a)-.013791)-.131979)),r]};var Jf=function(){return yf(Zf).scale(175.295)};function Qf(t,e){return[xc(e)*Tc(t),Tc(e)]}Qf.invert=Ef(Oc);var Kf=function(){return yf(Qf).scale(249.5).clipAngle(90+1e-6)};function td(t,e){var n=xc(e),r=1+xc(t)*n;return[n*Tc(t)/r,Tc(e)/r]}td.invert=Ef((function(t){return 2*mc(t)}));var ed=function(){return yf(td).scale(250).clipAngle(142)};function nd(t,e){return[wc(Sc((fc+e)/2)),-t]}nd.invert=function(t,e){return[-e,2*mc(kc(t))-fc]};var rd=function(){var t=Df(nd),e=t.center,n=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?n([t[0],t[1],t.length>2?t[2]+90:90]):[(t=n())[0],t[1],t[2]-90]},n([0,0,90]).scale(159.155)};function id(t,e){return t.parent===e.parent?1:2}function ad(t,e){return t+e.x}function od(t,e){return Math.max(t,e.y)}var sd=function(){var t=id,e=1,n=1,r=!1;function i(i){var a,o=0;i.eachAfter((function(e){var n=e.children;n?(e.x=function(t){return t.reduce(ad,0)/t.length}(n),e.y=function(t){return 1+t.reduce(od,0)}(n)):(e.x=a?o+=t(e,a):0,e.y=0,a=e)}));var s=function(t){for(var e;e=t.children;)t=e[0];return t}(i),c=function(t){for(var e;e=t.children;)t=e[e.length-1];return t}(i),u=s.x-t(s,c)/2,l=c.x+t(c,s)/2;return i.eachAfter(r?function(t){t.x=(t.x-i.x)*e,t.y=(i.y-t.y)*n}:function(t){t.x=(t.x-u)/(l-u)*e,t.y=(1-(i.y?t.y/i.y:1))*n})}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i};function cd(t){var e=0,n=t.children,r=n&&n.length;if(r)for(;--r>=0;)e+=n[r].value;else e=1;t.value=e}function ud(t,e){var n,r,i,a,o,s=new dd(t),c=+t.value&&(s.value=t.value),u=[s];for(null==e&&(e=ld);n=u.pop();)if(c&&(n.value=+n.data.value),(i=e(n.data))&&(o=i.length))for(n.children=new Array(o),a=o-1;a>=0;--a)u.push(r=n.children[a]=new dd(i[a])),r.parent=n,r.depth=n.depth+1;return s.eachBefore(fd)}function ld(t){return t.children}function hd(t){t.data=t.data.data}function fd(t){var e=0;do{t.height=e}while((t=t.parent)&&t.height<++e)}function dd(t){this.data=t,this.depth=this.height=0,this.parent=null}dd.prototype=ud.prototype={constructor:dd,count:function(){return this.eachAfter(cd)},each:function(t){var e,n,r,i,a=this,o=[a];do{for(e=o.reverse(),o=[];a=e.pop();)if(t(a),n=a.children)for(r=0,i=n.length;r<i;++r)o.push(n[r])}while(o.length);return this},eachAfter:function(t){for(var e,n,r,i=this,a=[i],o=[];i=a.pop();)if(o.push(i),e=i.children)for(n=0,r=e.length;n<r;++n)a.push(e[n]);for(;i=o.pop();)t(i);return this},eachBefore:function(t){for(var e,n,r=this,i=[r];r=i.pop();)if(t(r),e=r.children)for(n=e.length-1;n>=0;--n)i.push(e[n]);return this},sum:function(t){return this.eachAfter((function(e){for(var n=+t(e.data)||0,r=e.children,i=r&&r.length;--i>=0;)n+=r[i].value;e.value=n}))},sort:function(t){return this.eachBefore((function(e){e.children&&e.children.sort(t)}))},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),r=e.ancestors(),i=null;t=n.pop(),e=r.pop();for(;t===e;)i=t,t=n.pop(),e=r.pop();return i}(e,t),r=[e];e!==n;)e=e.parent,r.push(e);for(var i=r.length;t!==n;)r.splice(i,0,t),t=t.parent;return r},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){var t=[];return this.each((function(e){t.push(e)})),t},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(n){n!==t&&e.push({source:n.parent,target:n})})),e},copy:function(){return ud(this).eachBefore(hd)}};var pd=Array.prototype.slice;var gd=function(t){for(var e,n,r=0,i=(t=function(t){for(var e,n,r=t.length;r;)n=Math.random()*r--|0,e=t[r],t[r]=t[n],t[n]=e;return t}(pd.call(t))).length,a=[];r<i;)e=t[r],n&&md(n,e)?++r:(n=xd(a=yd(a,e)),r=0);return n};function yd(t,e){var n,r;if(bd(e,t))return[e];for(n=0;n<t.length;++n)if(vd(e,t[n])&&bd(_d(t[n],e),t))return[t[n],e];for(n=0;n<t.length-1;++n)for(r=n+1;r<t.length;++r)if(vd(_d(t[n],t[r]),e)&&vd(_d(t[n],e),t[r])&&vd(_d(t[r],e),t[n])&&bd(kd(t[n],t[r],e),t))return[t[n],t[r],e];throw new Error}function vd(t,e){var n=t.r-e.r,r=e.x-t.x,i=e.y-t.y;return n<0||n*n<r*r+i*i}function md(t,e){var n=t.r-e.r+1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function bd(t,e){for(var n=0;n<e.length;++n)if(!md(t,e[n]))return!1;return!0}function xd(t){switch(t.length){case 1:return{x:(e=t[0]).x,y:e.y,r:e.r};case 2:return _d(t[0],t[1]);case 3:return kd(t[0],t[1],t[2])}var e}function _d(t,e){var n=t.x,r=t.y,i=t.r,a=e.x,o=e.y,s=e.r,c=a-n,u=o-r,l=s-i,h=Math.sqrt(c*c+u*u);return{x:(n+a+c/h*l)/2,y:(r+o+u/h*l)/2,r:(h+i+s)/2}}function kd(t,e,n){var r=t.x,i=t.y,a=t.r,o=e.x,s=e.y,c=e.r,u=n.x,l=n.y,h=n.r,f=r-o,d=r-u,p=i-s,g=i-l,y=c-a,v=h-a,m=r*r+i*i-a*a,b=m-o*o-s*s+c*c,x=m-u*u-l*l+h*h,_=d*p-f*g,k=(p*x-g*b)/(2*_)-r,w=(g*y-p*v)/_,E=(d*b-f*x)/(2*_)-i,T=(f*v-d*y)/_,C=w*w+T*T-1,A=2*(a+k*w+E*T),S=k*k+E*E-a*a,M=-(C?(A+Math.sqrt(A*A-4*C*S))/(2*C):S/A);return{x:r+k+w*M,y:i+E+T*M,r:M}}function wd(t,e,n){var r,i,a,o,s=t.x-e.x,c=t.y-e.y,u=s*s+c*c;u?(i=e.r+n.r,i*=i,o=t.r+n.r,i>(o*=o)?(r=(u+o-i)/(2*u),a=Math.sqrt(Math.max(0,o/u-r*r)),n.x=t.x-r*s-a*c,n.y=t.y-r*c+a*s):(r=(u+i-o)/(2*u),a=Math.sqrt(Math.max(0,i/u-r*r)),n.x=e.x+r*s-a*c,n.y=e.y+r*c+a*s)):(n.x=e.x+n.r,n.y=e.y)}function Ed(t,e){var n=t.r+e.r-1e-6,r=e.x-t.x,i=e.y-t.y;return n>0&&n*n>r*r+i*i}function Td(t){var e=t._,n=t.next._,r=e.r+n.r,i=(e.x*n.r+n.x*e.r)/r,a=(e.y*n.r+n.y*e.r)/r;return i*i+a*a}function Cd(t){this._=t,this.next=null,this.previous=null}function Ad(t){if(!(i=t.length))return 0;var e,n,r,i,a,o,s,c,u,l,h;if((e=t[0]).x=0,e.y=0,!(i>1))return e.r;if(n=t[1],e.x=-n.r,n.x=e.r,n.y=0,!(i>2))return e.r+n.r;wd(n,e,r=t[2]),e=new Cd(e),n=new Cd(n),r=new Cd(r),e.next=r.previous=n,n.next=e.previous=r,r.next=n.previous=e;t:for(s=3;s<i;++s){wd(e._,n._,r=t[s]),r=new Cd(r),c=n.next,u=e.previous,l=n._.r,h=e._.r;do{if(l<=h){if(Ed(c._,r._)){n=c,e.next=n,n.previous=e,--s;continue t}l+=c._.r,c=c.next}else{if(Ed(u._,r._)){(e=u).next=n,n.previous=e,--s;continue t}h+=u._.r,u=u.previous}}while(c!==u.next);for(r.previous=e,r.next=n,e.next=n.previous=n=r,a=Td(e);(r=r.next)!==n;)(o=Td(r))<a&&(e=r,a=o);n=e.next}for(e=[n._],r=n;(r=r.next)!==n;)e.push(r._);for(r=gd(e),s=0;s<i;++s)(e=t[s]).x-=r.x,e.y-=r.y;return r.r}var Sd=function(t){return Ad(t),t};function Md(t){return null==t?null:Od(t)}function Od(t){if("function"!=typeof t)throw new Error;return t}function Dd(){return 0}var Nd=function(t){return function(){return t}};function Bd(t){return Math.sqrt(t.value)}var Ld=function(){var t=null,e=1,n=1,r=Dd;function i(i){return i.x=e/2,i.y=n/2,t?i.eachBefore(Fd(t)).eachAfter(Pd(r,.5)).eachBefore(Id(1)):i.eachBefore(Fd(Bd)).eachAfter(Pd(Dd,1)).eachAfter(Pd(r,i.r/Math.min(e,n))).eachBefore(Id(Math.min(e,n)/(2*i.r))),i}return i.radius=function(e){return arguments.length?(t=Md(e),i):t},i.size=function(t){return arguments.length?(e=+t[0],n=+t[1],i):[e,n]},i.padding=function(t){return arguments.length?(r="function"==typeof t?t:Nd(+t),i):r},i};function Fd(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function Pd(t,e){return function(n){if(r=n.children){var r,i,a,o=r.length,s=t(n)*e||0;if(s)for(i=0;i<o;++i)r[i].r+=s;if(a=Ad(r),s)for(i=0;i<o;++i)r[i].r-=s;n.r=a+s}}}function Id(t){return function(e){var n=e.parent;e.r*=t,n&&(e.x=n.x+t*e.x,e.y=n.y+t*e.y)}}var jd=function(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)},Rd=function(t,e,n,r,i){for(var a,o=t.children,s=-1,c=o.length,u=t.value&&(r-e)/t.value;++s<c;)(a=o[s]).y0=n,a.y1=i,a.x0=e,a.x1=e+=a.value*u},Yd=function(){var t=1,e=1,n=0,r=!1;function i(i){var a=i.height+1;return i.x0=i.y0=n,i.x1=t,i.y1=e/a,i.eachBefore(function(t,e){return function(r){r.children&&Rd(r,r.x0,t*(r.depth+1)/e,r.x1,t*(r.depth+2)/e);var i=r.x0,a=r.y0,o=r.x1-n,s=r.y1-n;o<i&&(i=o=(i+o)/2),s<a&&(a=s=(a+s)/2),r.x0=i,r.y0=a,r.x1=o,r.y1=s}}(e,a)),r&&i.eachBefore(jd),i}return i.round=function(t){return arguments.length?(r=!!t,i):r},i.size=function(n){return arguments.length?(t=+n[0],e=+n[1],i):[t,e]},i.padding=function(t){return arguments.length?(n=+t,i):n},i},zd={depth:-1},Ud={};function $d(t){return t.id}function Wd(t){return t.parentId}var Vd=function(){var t=$d,e=Wd;function n(n){var r,i,a,o,s,c,u,l=n.length,h=new Array(l),f={};for(i=0;i<l;++i)r=n[i],s=h[i]=new dd(r),null!=(c=t(r,i,n))&&(c+="")&&(f[u="$"+(s.id=c)]=u in f?Ud:s);for(i=0;i<l;++i)if(s=h[i],null!=(c=e(n[i],i,n))&&(c+="")){if(!(o=f["$"+c]))throw new Error("missing: "+c);if(o===Ud)throw new Error("ambiguous: "+c);o.children?o.children.push(s):o.children=[s],s.parent=o}else{if(a)throw new Error("multiple roots");a=s}if(!a)throw new Error("no root");if(a.parent=zd,a.eachBefore((function(t){t.depth=t.parent.depth+1,--l})).eachBefore(fd),a.parent=null,l>0)throw new Error("cycle");return a}return n.id=function(e){return arguments.length?(t=Od(e),n):t},n.parentId=function(t){return arguments.length?(e=Od(t),n):e},n};function Hd(t,e){return t.parent===e.parent?1:2}function Gd(t){var e=t.children;return e?e[0]:t.t}function qd(t){var e=t.children;return e?e[e.length-1]:t.t}function Xd(t,e,n){var r=n/(e.i-t.i);e.c-=r,e.s+=n,t.c+=r,e.z+=n,e.m+=n}function Zd(t,e,n){return t.a.parent===e.parent?t.a:n}function Jd(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}Jd.prototype=Object.create(dd.prototype);var Qd=function(){var t=Hd,e=1,n=1,r=null;function i(i){var c=function(t){for(var e,n,r,i,a,o=new Jd(t,0),s=[o];e=s.pop();)if(r=e._.children)for(e.children=new Array(a=r.length),i=a-1;i>=0;--i)s.push(n=e.children[i]=new Jd(r[i],i)),n.parent=e;return(o.parent=new Jd(null,0)).children=[o],o}(i);if(c.eachAfter(a),c.parent.m=-c.z,c.eachBefore(o),r)i.eachBefore(s);else{var u=i,l=i,h=i;i.eachBefore((function(t){t.x<u.x&&(u=t),t.x>l.x&&(l=t),t.depth>h.depth&&(h=t)}));var f=u===l?1:t(u,l)/2,d=f-u.x,p=e/(l.x+f+d),g=n/(h.depth||1);i.eachBefore((function(t){t.x=(t.x+d)*p,t.y=t.depth*g}))}return i}function a(e){var n=e.children,r=e.parent.children,i=e.i?r[e.i-1]:null;if(n){!function(t){for(var e,n=0,r=0,i=t.children,a=i.length;--a>=0;)(e=i[a]).z+=n,e.m+=n,n+=e.s+(r+=e.c)}(e);var a=(n[0].z+n[n.length-1].z)/2;i?(e.z=i.z+t(e._,i._),e.m=e.z-a):e.z=a}else i&&(e.z=i.z+t(e._,i._));e.parent.A=function(e,n,r){if(n){for(var i,a=e,o=e,s=n,c=a.parent.children[0],u=a.m,l=o.m,h=s.m,f=c.m;s=qd(s),a=Gd(a),s&&a;)c=Gd(c),(o=qd(o)).a=e,(i=s.z+h-a.z-u+t(s._,a._))>0&&(Xd(Zd(s,e,r),e,i),u+=i,l+=i),h+=s.m,u+=a.m,f+=c.m,l+=o.m;s&&!qd(o)&&(o.t=s,o.m+=h-l),a&&!Gd(c)&&(c.t=a,c.m+=u-f,r=e)}return r}(e,i,e.parent.A||r[0])}function o(t){t._.x=t.z+t.parent.m,t.m+=t.parent.m}function s(t){t.x*=e,t.y=t.depth*n}return i.separation=function(e){return arguments.length?(t=e,i):t},i.size=function(t){return arguments.length?(r=!1,e=+t[0],n=+t[1],i):r?null:[e,n]},i.nodeSize=function(t){return arguments.length?(r=!0,e=+t[0],n=+t[1],i):r?[e,n]:null},i},Kd=function(t,e,n,r,i){for(var a,o=t.children,s=-1,c=o.length,u=t.value&&(i-n)/t.value;++s<c;)(a=o[s]).x0=e,a.x1=r,a.y0=n,a.y1=n+=a.value*u},tp=(1+Math.sqrt(5))/2;function ep(t,e,n,r,i,a){for(var o,s,c,u,l,h,f,d,p,g,y,v=[],m=e.children,b=0,x=0,_=m.length,k=e.value;b<_;){c=i-n,u=a-r;do{l=m[x++].value}while(!l&&x<_);for(h=f=l,y=l*l*(g=Math.max(u/c,c/u)/(k*t)),p=Math.max(f/y,y/h);x<_;++x){if(l+=s=m[x].value,s<h&&(h=s),s>f&&(f=s),y=l*l*g,(d=Math.max(f/y,y/h))>p){l-=s;break}p=d}v.push(o={value:l,dice:c<u,children:m.slice(b,x)}),o.dice?Rd(o,n,r,i,k?r+=u*l/k:a):Kd(o,n,r,k?n+=c*l/k:i,a),k-=l,b=x}return v}var np=function t(e){function n(t,n,r,i,a){ep(e,t,n,r,i,a)}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(tp),rp=function(){var t=np,e=!1,n=1,r=1,i=[0],a=Dd,o=Dd,s=Dd,c=Dd,u=Dd;function l(t){return t.x0=t.y0=0,t.x1=n,t.y1=r,t.eachBefore(h),i=[0],e&&t.eachBefore(jd),t}function h(e){var n=i[e.depth],r=e.x0+n,l=e.y0+n,h=e.x1-n,f=e.y1-n;h<r&&(r=h=(r+h)/2),f<l&&(l=f=(l+f)/2),e.x0=r,e.y0=l,e.x1=h,e.y1=f,e.children&&(n=i[e.depth+1]=a(e)/2,r+=u(e)-n,l+=o(e)-n,(h-=s(e)-n)<r&&(r=h=(r+h)/2),(f-=c(e)-n)<l&&(l=f=(l+f)/2),t(e,r,l,h,f))}return l.round=function(t){return arguments.length?(e=!!t,l):e},l.size=function(t){return arguments.length?(n=+t[0],r=+t[1],l):[n,r]},l.tile=function(e){return arguments.length?(t=Od(e),l):t},l.padding=function(t){return arguments.length?l.paddingInner(t).paddingOuter(t):l.paddingInner()},l.paddingInner=function(t){return arguments.length?(a="function"==typeof t?t:Nd(+t),l):a},l.paddingOuter=function(t){return arguments.length?l.paddingTop(t).paddingRight(t).paddingBottom(t).paddingLeft(t):l.paddingTop()},l.paddingTop=function(t){return arguments.length?(o="function"==typeof t?t:Nd(+t),l):o},l.paddingRight=function(t){return arguments.length?(s="function"==typeof t?t:Nd(+t),l):s},l.paddingBottom=function(t){return arguments.length?(c="function"==typeof t?t:Nd(+t),l):c},l.paddingLeft=function(t){return arguments.length?(u="function"==typeof t?t:Nd(+t),l):u},l},ip=function(t,e,n,r,i){var a,o,s=t.children,c=s.length,u=new Array(c+1);for(u[0]=o=a=0;a<c;++a)u[a+1]=o+=s[a].value;!function t(e,n,r,i,a,o,c){if(e>=n-1){var l=s[e];return l.x0=i,l.y0=a,l.x1=o,void(l.y1=c)}var h=u[e],f=r/2+h,d=e+1,p=n-1;for(;d<p;){var g=d+p>>>1;u[g]<f?d=g+1:p=g}f-u[d-1]<u[d]-f&&e+1<d&&--d;var y=u[d]-h,v=r-y;if(o-i>c-a){var m=(i*v+o*y)/r;t(e,d,y,i,a,m,c),t(d,n,v,m,a,o,c)}else{var b=(a*v+c*y)/r;t(e,d,y,i,a,o,b),t(d,n,v,i,b,o,c)}}(0,c,t.value,e,n,r,i)},ap=function(t,e,n,r,i){(1&t.depth?Kd:Rd)(t,e,n,r,i)},op=function t(e){function n(t,n,r,i,a){if((o=t._squarify)&&o.ratio===e)for(var o,s,c,u,l,h=-1,f=o.length,d=t.value;++h<f;){for(c=(s=o[h]).children,u=s.value=0,l=c.length;u<l;++u)s.value+=c[u].value;s.dice?Rd(s,n,r,i,r+=(a-r)*s.value/d):Kd(s,n,r,n+=(i-n)*s.value/d,a),d-=s.value}else t._squarify=o=ep(e,t,n,r,i,a),o.ratio=e}return n.ratio=function(e){return t((e=+e)>1?e:1)},n}(tp),sp=function(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}},cp=function(t,e){var n=un(+t,+e);return function(t){var e=n(t);return e-360*Math.floor(e/360)}},up=function(t,e){return t=+t,e=+e,function(n){return Math.round(t*(1-n)+e*n)}},lp=Math.SQRT2;function hp(t){return((t=Math.exp(t))+1/t)/2}var fp=function(t,e){var n,r,i=t[0],a=t[1],o=t[2],s=e[0],c=e[1],u=e[2],l=s-i,h=c-a,f=l*l+h*h;if(f<1e-12)r=Math.log(u/o)/lp,n=function(t){return[i+t*l,a+t*h,o*Math.exp(lp*t*r)]};else{var d=Math.sqrt(f),p=(u*u-o*o+4*f)/(2*o*2*d),g=(u*u-o*o-4*f)/(2*u*2*d),y=Math.log(Math.sqrt(p*p+1)-p),v=Math.log(Math.sqrt(g*g+1)-g);r=(v-y)/lp,n=function(t){var e,n=t*r,s=hp(y),c=o/(2*d)*(s*(e=lp*n+y,((e=Math.exp(2*e))-1)/(e+1))-function(t){return((t=Math.exp(t))-1/t)/2}(y));return[i+c*l,a+c*h,o*s/hp(lp*n+y)]}}return n.duration=1e3*r,n};function dp(t){return function(e,n){var r=t((e=tn(e)).h,(n=tn(n)).h),i=hn(e.s,n.s),a=hn(e.l,n.l),o=hn(e.opacity,n.opacity);return function(t){return e.h=r(t),e.s=i(t),e.l=a(t),e.opacity=o(t),e+""}}}var pp=dp(un),gp=dp(hn);function yp(t,e){var n=hn((t=pa(t)).l,(e=pa(e)).l),r=hn(t.a,e.a),i=hn(t.b,e.b),a=hn(t.opacity,e.opacity);return function(e){return t.l=n(e),t.a=r(e),t.b=i(e),t.opacity=a(e),t+""}}function vp(t){return function(e,n){var r=t((e=ka(e)).h,(n=ka(n)).h),i=hn(e.c,n.c),a=hn(e.l,n.l),o=hn(e.opacity,n.opacity);return function(t){return e.h=r(t),e.c=i(t),e.l=a(t),e.opacity=o(t),e+""}}}var mp=vp(un),bp=vp(hn);function xp(t){return function e(n){function r(e,r){var i=t((e=Oa(e)).h,(r=Oa(r)).h),a=hn(e.s,r.s),o=hn(e.l,r.l),s=hn(e.opacity,r.opacity);return function(t){return e.h=i(t),e.s=a(t),e.l=o(Math.pow(t,n)),e.opacity=s(t),e+""}}return n=+n,r.gamma=e,r}(1)}var _p=xp(un),kp=xp(hn);function wp(t,e){for(var n=0,r=e.length-1,i=e[0],a=new Array(r<0?0:r);n<r;)a[n]=t(i,i=e[++n]);return function(t){var e=Math.max(0,Math.min(r-1,Math.floor(t*=r)));return a[e](t-e)}}var Ep=function(t,e){for(var n=new Array(e),r=0;r<e;++r)n[r]=t(r/(e-1));return n},Tp=function(t){for(var e,n=-1,r=t.length,i=t[r-1],a=0;++n<r;)e=i,i=t[n],a+=e[1]*i[0]-e[0]*i[1];return a/2},Cp=function(t){for(var e,n,r=-1,i=t.length,a=0,o=0,s=t[i-1],c=0;++r<i;)e=s,s=t[r],c+=n=e[0]*s[1]-s[0]*e[1],a+=(e[0]+s[0])*n,o+=(e[1]+s[1])*n;return[a/(c*=3),o/c]};function Ap(t,e){return t[0]-e[0]||t[1]-e[1]}function Sp(t){for(var e,n,r,i=t.length,a=[0,1],o=2,s=2;s<i;++s){for(;o>1&&(e=t[a[o-2]],n=t[a[o-1]],r=t[s],(n[0]-e[0])*(r[1]-e[1])-(n[1]-e[1])*(r[0]-e[0])<=0);)--o;a[o++]=s}return a.slice(0,o)}var Mp=function(t){if((n=t.length)<3)return null;var e,n,r=new Array(n),i=new Array(n);for(e=0;e<n;++e)r[e]=[+t[e][0],+t[e][1],e];for(r.sort(Ap),e=0;e<n;++e)i[e]=[r[e][0],-r[e][1]];var a=Sp(r),o=Sp(i),s=o[0]===a[0],c=o[o.length-1]===a[a.length-1],u=[];for(e=a.length-1;e>=0;--e)u.push(t[r[a[e]][2]]);for(e=+s;e<o.length-c;++e)u.push(t[r[o[e]][2]]);return u},Op=function(t,e){for(var n,r,i=t.length,a=t[i-1],o=e[0],s=e[1],c=a[0],u=a[1],l=!1,h=0;h<i;++h)n=(a=t[h])[0],(r=a[1])>s!=u>s&&o<(c-n)*(s-r)/(u-r)+n&&(l=!l),c=n,u=r;return l},Dp=function(t){for(var e,n,r=-1,i=t.length,a=t[i-1],o=a[0],s=a[1],c=0;++r<i;)e=o,n=s,e-=o=(a=t[r])[0],n-=s=a[1],c+=Math.sqrt(e*e+n*n);return c},Np=function(){return Math.random()},Bp=function t(e){function n(t,n){return t=null==t?0:+t,n=null==n?1:+n,1===arguments.length?(n=t,t=0):n-=t,function(){return e()*n+t}}return n.source=t,n}(Np),Lp=function t(e){function n(t,n){var r,i;return t=null==t?0:+t,n=null==n?1:+n,function(){var a;if(null!=r)a=r,r=null;else do{r=2*e()-1,a=2*e()-1,i=r*r+a*a}while(!i||i>1);return t+n*a*Math.sqrt(-2*Math.log(i)/i)}}return n.source=t,n}(Np),Fp=function t(e){function n(){var t=Lp.source(e).apply(this,arguments);return function(){return Math.exp(t())}}return n.source=t,n}(Np),Pp=function t(e){function n(t){return function(){for(var n=0,r=0;r<t;++r)n+=e();return n}}return n.source=t,n}(Np),Ip=function t(e){function n(t){var n=Pp.source(e)(t);return function(){return n()/t}}return n.source=t,n}(Np),jp=function t(e){function n(t){return function(){return-Math.log(1-e())/t}}return n.source=t,n}(Np);function Rp(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}function Yp(t,e){switch(arguments.length){case 0:break;case 1:this.interpolator(t);break;default:this.interpolator(e).domain(t)}return this}var zp=Array.prototype,Up=zp.map,$p=zp.slice,Wp={name:"implicit"};function Vp(){var t=Ji(),e=[],n=[],r=Wp;function i(i){var a=i+"",o=t.get(a);if(!o){if(r!==Wp)return r;t.set(a,o=e.push(i))}return n[(o-1)%n.length]}return i.domain=function(n){if(!arguments.length)return e.slice();e=[],t=Ji();for(var r,a,o=-1,s=n.length;++o<s;)t.has(a=(r=n[o])+"")||t.set(a,e.push(r));return i},i.range=function(t){return arguments.length?(n=$p.call(t),i):n.slice()},i.unknown=function(t){return arguments.length?(r=t,i):r},i.copy=function(){return Vp(e,n).unknown(r)},Rp.apply(i,arguments),i}function Hp(){var t,e,n=Vp().unknown(void 0),r=n.domain,i=n.range,a=[0,1],o=!1,s=0,c=0,u=.5;function l(){var n=r().length,l=a[1]<a[0],h=a[l-0],f=a[1-l];t=(f-h)/Math.max(1,n-s+2*c),o&&(t=Math.floor(t)),h+=(f-h-t*(n-s))*u,e=t*(1-s),o&&(h=Math.round(h),e=Math.round(e));var d=k(n).map((function(e){return h+t*e}));return i(l?d.reverse():d)}return delete n.unknown,n.domain=function(t){return arguments.length?(r(t),l()):r()},n.range=function(t){return arguments.length?(a=[+t[0],+t[1]],l()):a.slice()},n.rangeRound=function(t){return a=[+t[0],+t[1]],o=!0,l()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(o=!!t,l()):o},n.padding=function(t){return arguments.length?(s=Math.min(1,c=+t),l()):s},n.paddingInner=function(t){return arguments.length?(s=Math.min(1,t),l()):s},n.paddingOuter=function(t){return arguments.length?(c=+t,l()):c},n.align=function(t){return arguments.length?(u=Math.max(0,Math.min(1,t)),l()):u},n.copy=function(){return Hp(r(),a).round(o).paddingInner(s).paddingOuter(c).align(u)},Rp.apply(l(),arguments)}function Gp(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Gp(e())},t}function qp(){return Gp(Hp.apply(null,arguments).paddingInner(1))}var Xp=function(t){return+t},Zp=[0,1];function Jp(t){return t}function Qp(t,e){return(e-=t=+t)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n});var n}function Kp(t){var e,n=t[0],r=t[t.length-1];return n>r&&(e=n,n=r,r=e),function(t){return Math.max(n,Math.min(r,t))}}function tg(t,e,n){var r=t[0],i=t[1],a=e[0],o=e[1];return i<r?(r=Qp(i,r),a=n(o,a)):(r=Qp(r,i),a=n(a,o)),function(t){return a(r(t))}}function eg(t,e,n){var r=Math.min(t.length,e.length)-1,i=new Array(r),a=new Array(r),o=-1;for(t[r]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++o<r;)i[o]=Qp(t[o],t[o+1]),a[o]=n(e[o],e[o+1]);return function(e){var n=c(t,e,1,r)-1;return a[n](i[n](e))}}function ng(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function rg(){var t,e,n,r,i,a,o=Zp,s=Zp,c=Sn,u=Jp;function l(){return r=Math.min(o.length,s.length)>2?eg:tg,i=a=null,h}function h(e){return isNaN(e=+e)?n:(i||(i=r(o.map(t),s,c)))(t(u(e)))}return h.invert=function(n){return u(e((a||(a=r(s,o.map(t),_n)))(n)))},h.domain=function(t){return arguments.length?(o=Up.call(t,Xp),u===Jp||(u=Kp(o)),l()):o.slice()},h.range=function(t){return arguments.length?(s=$p.call(t),l()):s.slice()},h.rangeRound=function(t){return s=$p.call(t),c=up,l()},h.clamp=function(t){return arguments.length?(u=t?Kp(o):Jp,h):u!==Jp},h.interpolate=function(t){return arguments.length?(c=t,l()):c},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,r){return t=n,e=r,l()}}function ig(t,e){return rg()(t,e)}var ag=function(t,e,n,r){var i,a=S(t,e,n);switch((r=Vs(null==r?",f":r)).type){case"s":var o=Math.max(Math.abs(t),Math.abs(e));return null!=r.precision||isNaN(i=ac(a,o))||(r.precision=i),Zs(r,o);case"":case"e":case"g":case"p":case"r":null!=r.precision||isNaN(i=oc(a,Math.max(Math.abs(t),Math.abs(e))))||(r.precision=i-("e"===r.type));break;case"f":case"%":null!=r.precision||isNaN(i=ic(a))||(r.precision=i-2*("%"===r.type))}return Xs(r)};function og(t){var e=t.domain;return t.ticks=function(t){var n=e();return C(n[0],n[n.length-1],null==t?10:t)},t.tickFormat=function(t,n){var r=e();return ag(r[0],r[r.length-1],null==t?10:t,n)},t.nice=function(n){null==n&&(n=10);var r,i=e(),a=0,o=i.length-1,s=i[a],c=i[o];return c<s&&(r=s,s=c,c=r,r=a,a=o,o=r),(r=A(s,c,n))>0?r=A(s=Math.floor(s/r)*r,c=Math.ceil(c/r)*r,n):r<0&&(r=A(s=Math.ceil(s*r)/r,c=Math.floor(c*r)/r,n)),r>0?(i[a]=Math.floor(s/r)*r,i[o]=Math.ceil(c/r)*r,e(i)):r<0&&(i[a]=Math.ceil(s*r)/r,i[o]=Math.floor(c*r)/r,e(i)),t},t}function sg(){var t=ig(Jp,Jp);return t.copy=function(){return ng(t,sg())},Rp.apply(t,arguments),og(t)}function cg(t){var e;function n(t){return isNaN(t=+t)?e:t}return n.invert=n,n.domain=n.range=function(e){return arguments.length?(t=Up.call(e,Xp),n):t.slice()},n.unknown=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return cg(t).unknown(e)},t=arguments.length?Up.call(t,Xp):[0,1],og(n)}var ug=function(t,e){var n,r=0,i=(t=t.slice()).length-1,a=t[r],o=t[i];return o<a&&(n=r,r=i,i=n,n=a,a=o,o=n),t[r]=e.floor(a),t[i]=e.ceil(o),t};function lg(t){return Math.log(t)}function hg(t){return Math.exp(t)}function fg(t){return-Math.log(-t)}function dg(t){return-Math.exp(-t)}function pg(t){return isFinite(t)?+("1e"+t):t<0?0:t}function gg(t){return function(e){return-t(-e)}}function yg(t){var e,n,r=t(lg,hg),i=r.domain,a=10;function o(){return e=function(t){return t===Math.E?Math.log:10===t&&Math.log10||2===t&&Math.log2||(t=Math.log(t),function(e){return Math.log(e)/t})}(a),n=function(t){return 10===t?pg:t===Math.E?Math.exp:function(e){return Math.pow(t,e)}}(a),i()[0]<0?(e=gg(e),n=gg(n),t(fg,dg)):t(lg,hg),r}return r.base=function(t){return arguments.length?(a=+t,o()):a},r.domain=function(t){return arguments.length?(i(t),o()):i()},r.ticks=function(t){var r,o=i(),s=o[0],c=o[o.length-1];(r=c<s)&&(f=s,s=c,c=f);var u,l,h,f=e(s),d=e(c),p=null==t?10:+t,g=[];if(!(a%1)&&d-f<p){if(f=Math.round(f)-1,d=Math.round(d)+1,s>0){for(;f<d;++f)for(l=1,u=n(f);l<a;++l)if(!((h=u*l)<s)){if(h>c)break;g.push(h)}}else for(;f<d;++f)for(l=a-1,u=n(f);l>=1;--l)if(!((h=u*l)<s)){if(h>c)break;g.push(h)}}else g=C(f,d,Math.min(d-f,p)).map(n);return r?g.reverse():g},r.tickFormat=function(t,i){if(null==i&&(i=10===a?".0e":","),"function"!=typeof i&&(i=Xs(i)),t===1/0)return i;null==t&&(t=10);var o=Math.max(1,a*t/r.ticks().length);return function(t){var r=t/n(Math.round(e(t)));return r*a<a-.5&&(r*=a),r<=o?i(t):""}},r.nice=function(){return i(ug(i(),{floor:function(t){return n(Math.floor(e(t)))},ceil:function(t){return n(Math.ceil(e(t)))}}))},r}function vg(){var t=yg(rg()).domain([1,10]);return t.copy=function(){return ng(t,vg()).base(t.base())},Rp.apply(t,arguments),t}function mg(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function bg(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function xg(t){var e=1,n=t(mg(e),bg(e));return n.constant=function(n){return arguments.length?t(mg(e=+n),bg(e)):e},og(n)}function _g(){var t=xg(rg());return t.copy=function(){return ng(t,_g()).constant(t.constant())},Rp.apply(t,arguments)}function kg(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function wg(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Eg(t){return t<0?-t*t:t*t}function Tg(t){var e=t(Jp,Jp),n=1;function r(){return 1===n?t(Jp,Jp):.5===n?t(wg,Eg):t(kg(n),kg(1/n))}return e.exponent=function(t){return arguments.length?(n=+t,r()):n},og(e)}function Cg(){var t=Tg(rg());return t.copy=function(){return ng(t,Cg()).exponent(t.exponent())},Rp.apply(t,arguments),t}function Ag(){return Cg.apply(null,arguments).exponent(.5)}function Sg(){var t,e=[],n=[],i=[];function a(){var t=0,r=Math.max(1,n.length);for(i=new Array(r-1);++t<r;)i[t-1]=D(e,t/r);return o}function o(e){return isNaN(e=+e)?t:n[c(i,e)]}return o.invertExtent=function(t){var r=n.indexOf(t);return r<0?[NaN,NaN]:[r>0?i[r-1]:e[0],r<i.length?i[r]:e[e.length-1]]},o.domain=function(t){if(!arguments.length)return e.slice();e=[];for(var n,i=0,o=t.length;i<o;++i)null==(n=t[i])||isNaN(n=+n)||e.push(n);return e.sort(r),a()},o.range=function(t){return arguments.length?(n=$p.call(t),a()):n.slice()},o.unknown=function(e){return arguments.length?(t=e,o):t},o.quantiles=function(){return i.slice()},o.copy=function(){return Sg().domain(e).range(n).unknown(t)},Rp.apply(o,arguments)}function Mg(){var t,e=0,n=1,r=1,i=[.5],a=[0,1];function o(e){return e<=e?a[c(i,e,0,r)]:t}function s(){var t=-1;for(i=new Array(r);++t<r;)i[t]=((t+1)*n-(t-r)*e)/(r+1);return o}return o.domain=function(t){return arguments.length?(e=+t[0],n=+t[1],s()):[e,n]},o.range=function(t){return arguments.length?(r=(a=$p.call(t)).length-1,s()):a.slice()},o.invertExtent=function(t){var o=a.indexOf(t);return o<0?[NaN,NaN]:o<1?[e,i[0]]:o>=r?[i[r-1],n]:[i[o-1],i[o]]},o.unknown=function(e){return arguments.length?(t=e,o):o},o.thresholds=function(){return i.slice()},o.copy=function(){return Mg().domain([e,n]).range(a).unknown(t)},Rp.apply(og(o),arguments)}function Og(){var t,e=[.5],n=[0,1],r=1;function i(i){return i<=i?n[c(e,i,0,r)]:t}return i.domain=function(t){return arguments.length?(e=$p.call(t),r=Math.min(e.length,n.length-1),i):e.slice()},i.range=function(t){return arguments.length?(n=$p.call(t),r=Math.min(e.length,n.length-1),i):n.slice()},i.invertExtent=function(t){var r=n.indexOf(t);return[e[r-1],e[r]]},i.unknown=function(e){return arguments.length?(t=e,i):t},i.copy=function(){return Og().domain(e).range(n).unknown(t)},Rp.apply(i,arguments)}var Dg=new Date,Ng=new Date;function Bg(t,e,n,r){function i(e){return t(e=0===arguments.length?new Date:new Date(+e)),e}return i.floor=function(e){return t(e=new Date(+e)),e},i.ceil=function(n){return t(n=new Date(n-1)),e(n,1),t(n),n},i.round=function(t){var e=i(t),n=i.ceil(t);return t-e<n-t?e:n},i.offset=function(t,n){return e(t=new Date(+t),null==n?1:Math.floor(n)),t},i.range=function(n,r,a){var o,s=[];if(n=i.ceil(n),a=null==a?1:Math.floor(a),!(n<r&&a>0))return s;do{s.push(o=new Date(+n)),e(n,a),t(n)}while(o<n&&n<r);return s},i.filter=function(n){return Bg((function(e){if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)}),(function(t,r){if(t>=t)if(r<0)for(;++r<=0;)for(;e(t,-1),!n(t););else for(;--r>=0;)for(;e(t,1),!n(t););}))},n&&(i.count=function(e,r){return Dg.setTime(+e),Ng.setTime(+r),t(Dg),t(Ng),Math.floor(n(Dg,Ng))},i.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?i.filter(r?function(e){return r(e)%t==0}:function(e){return i.count(0,e)%t==0}):i:null}),i}var Lg=Bg((function(t){t.setMonth(0,1),t.setHours(0,0,0,0)}),(function(t,e){t.setFullYear(t.getFullYear()+e)}),(function(t,e){return e.getFullYear()-t.getFullYear()}),(function(t){return t.getFullYear()}));Lg.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Bg((function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)}),(function(e,n){e.setFullYear(e.getFullYear()+n*t)})):null};var Fg=Lg,Pg=Lg.range,Ig=Bg((function(t){t.setDate(1),t.setHours(0,0,0,0)}),(function(t,e){t.setMonth(t.getMonth()+e)}),(function(t,e){return e.getMonth()-t.getMonth()+12*(e.getFullYear()-t.getFullYear())}),(function(t){return t.getMonth()})),jg=Ig,Rg=Ig.range;function Yg(t){return Bg((function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+7*e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/6048e5}))}var zg=Yg(0),Ug=Yg(1),$g=Yg(2),Wg=Yg(3),Vg=Yg(4),Hg=Yg(5),Gg=Yg(6),qg=zg.range,Xg=Ug.range,Zg=$g.range,Jg=Wg.range,Qg=Vg.range,Kg=Hg.range,ty=Gg.range,ey=Bg((function(t){t.setHours(0,0,0,0)}),(function(t,e){t.setDate(t.getDate()+e)}),(function(t,e){return(e-t-6e4*(e.getTimezoneOffset()-t.getTimezoneOffset()))/864e5}),(function(t){return t.getDate()-1})),ny=ey,ry=ey.range,iy=Bg((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getHours()})),ay=iy,oy=iy.range,sy=Bg((function(t){t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getMinutes()})),cy=sy,uy=sy.range,ly=Bg((function(t){t.setTime(t-t.getMilliseconds())}),(function(t,e){t.setTime(+t+1e3*e)}),(function(t,e){return(e-t)/1e3}),(function(t){return t.getUTCSeconds()})),hy=ly,fy=ly.range,dy=Bg((function(){}),(function(t,e){t.setTime(+t+e)}),(function(t,e){return e-t}));dy.every=function(t){return t=Math.floor(t),isFinite(t)&&t>0?t>1?Bg((function(e){e.setTime(Math.floor(e/t)*t)}),(function(e,n){e.setTime(+e+n*t)}),(function(e,n){return(n-e)/t})):dy:null};var py=dy,gy=dy.range;function yy(t){return Bg((function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+7*e)}),(function(t,e){return(e-t)/6048e5}))}var vy=yy(0),my=yy(1),by=yy(2),xy=yy(3),_y=yy(4),ky=yy(5),wy=yy(6),Ey=vy.range,Ty=my.range,Cy=by.range,Ay=xy.range,Sy=_y.range,My=ky.range,Oy=wy.range,Dy=Bg((function(t){t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCDate(t.getUTCDate()+e)}),(function(t,e){return(e-t)/864e5}),(function(t){return t.getUTCDate()-1})),Ny=Dy,By=Dy.range,Ly=Bg((function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)}),(function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()}),(function(t){return t.getUTCFullYear()}));Ly.every=function(t){return isFinite(t=Math.floor(t))&&t>0?Bg((function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)}),(function(e,n){e.setUTCFullYear(e.getUTCFullYear()+n*t)})):null};var Fy=Ly,Py=Ly.range;function Iy(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 jy(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 Ry(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}function Yy(t){var e=t.dateTime,n=t.date,r=t.time,i=t.periods,a=t.days,o=t.shortDays,s=t.months,c=t.shortMonths,u=Qy(i),l=Ky(i),h=Qy(a),f=Ky(a),d=Qy(o),p=Ky(o),g=Qy(s),y=Ky(s),v=Qy(c),m=Ky(c),b={a:function(t){return o[t.getDay()]},A:function(t){return a[t.getDay()]},b:function(t){return c[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:xv,e:xv,f:Tv,H:_v,I:kv,j:wv,L:Ev,m:Cv,M:Av,p:function(t){return i[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:em,s:nm,S:Sv,u:Mv,U:Ov,V:Dv,w:Nv,W:Bv,x:null,X:null,y:Lv,Y:Fv,Z:Pv,"%":tm},x={a:function(t){return o[t.getUTCDay()]},A:function(t){return a[t.getUTCDay()]},b:function(t){return c[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:Iv,e:Iv,f:Uv,H:jv,I:Rv,j:Yv,L:zv,m:$v,M:Wv,p:function(t){return i[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:em,s:nm,S:Vv,u:Hv,U:Gv,V:qv,w:Xv,W:Zv,x:null,X:null,y:Jv,Y:Qv,Z:Kv,"%":tm},_={a:function(t,e,n){var r=d.exec(e.slice(n));return r?(t.w=p[r[0].toLowerCase()],n+r[0].length):-1},A:function(t,e,n){var r=h.exec(e.slice(n));return r?(t.w=f[r[0].toLowerCase()],n+r[0].length):-1},b:function(t,e,n){var r=v.exec(e.slice(n));return r?(t.m=m[r[0].toLowerCase()],n+r[0].length):-1},B:function(t,e,n){var r=g.exec(e.slice(n));return r?(t.m=y[r[0].toLowerCase()],n+r[0].length):-1},c:function(t,n,r){return E(t,e,n,r)},d:lv,e:lv,f:yv,H:fv,I:fv,j:hv,L:gv,m:uv,M:dv,p:function(t,e,n){var r=u.exec(e.slice(n));return r?(t.p=l[r[0].toLowerCase()],n+r[0].length):-1},q:cv,Q:mv,s:bv,S:pv,u:ev,U:nv,V:rv,w:tv,W:iv,x:function(t,e,r){return E(t,n,e,r)},X:function(t,e,n){return E(t,r,e,n)},y:ov,Y:av,Z:sv,"%":vv};function k(t,e){return function(n){var r,i,a,o=[],s=-1,c=0,u=t.length;for(n instanceof Date||(n=new Date(+n));++s<u;)37===t.charCodeAt(s)&&(o.push(t.slice(c,s)),null!=(i=Hy[r=t.charAt(++s)])?r=t.charAt(++s):i="e"===r?" ":"0",(a=e[r])&&(r=a(n,i)),o.push(r),c=s+1);return o.push(t.slice(c,s)),o.join("")}}function w(t,e){return function(n){var r,i,a=Ry(1900,void 0,1);if(E(a,t,n+="",0)!=n.length)return null;if("Q"in a)return new Date(a.Q);if("s"in a)return new Date(1e3*a.s+("L"in a?a.L:0));if(!e||"Z"in a||(a.Z=0),"p"in a&&(a.H=a.H%12+12*a.p),void 0===a.m&&(a.m="q"in a?a.q:0),"V"in a){if(a.V<1||a.V>53)return null;"w"in a||(a.w=1),"Z"in a?(i=(r=jy(Ry(a.y,0,1))).getUTCDay(),r=i>4||0===i?my.ceil(r):my(r),r=Ny.offset(r,7*(a.V-1)),a.y=r.getUTCFullYear(),a.m=r.getUTCMonth(),a.d=r.getUTCDate()+(a.w+6)%7):(i=(r=Iy(Ry(a.y,0,1))).getDay(),r=i>4||0===i?Ug.ceil(r):Ug(r),r=ny.offset(r,7*(a.V-1)),a.y=r.getFullYear(),a.m=r.getMonth(),a.d=r.getDate()+(a.w+6)%7)}else("W"in a||"U"in a)&&("w"in a||(a.w="u"in a?a.u%7:"W"in a?1:0),i="Z"in a?jy(Ry(a.y,0,1)).getUTCDay():Iy(Ry(a.y,0,1)).getDay(),a.m=0,a.d="W"in a?(a.w+6)%7+7*a.W-(i+5)%7:a.w+7*a.U-(i+6)%7);return"Z"in a?(a.H+=a.Z/100|0,a.M+=a.Z%100,jy(a)):Iy(a)}}function E(t,e,n,r){for(var i,a,o=0,s=e.length,c=n.length;o<s;){if(r>=c)return-1;if(37===(i=e.charCodeAt(o++))){if(i=e.charAt(o++),!(a=_[i in Hy?e.charAt(o++):i])||(r=a(t,n,r))<0)return-1}else if(i!=n.charCodeAt(r++))return-1}return r}return(b.x=k(n,b),b.X=k(r,b),b.c=k(e,b),x.x=k(n,x),x.X=k(r,x),x.c=k(e,x),{format:function(t){var e=k(t+="",b);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+="",x);return e.toString=function(){return t},e},utcParse:function(t){var e=w(t+="",!0);return e.toString=function(){return t},e}})}var zy,Uy,$y,Wy,Vy,Hy={"-":"",_:" ",0:"0"},Gy=/^\s*\d+/,qy=/^%/,Xy=/[\\^$*+?|[\]().{}]/g;function Zy(t,e,n){var r=t<0?"-":"",i=(r?-t:t)+"",a=i.length;return r+(a<n?new Array(n-a+1).join(e)+i:i)}function Jy(t){return t.replace(Xy,"\\$&")}function Qy(t){return new RegExp("^(?:"+t.map(Jy).join("|")+")","i")}function Ky(t){for(var e={},n=-1,r=t.length;++n<r;)e[t[n].toLowerCase()]=n;return e}function tv(t,e,n){var r=Gy.exec(e.slice(n,n+1));return r?(t.w=+r[0],n+r[0].length):-1}function ev(t,e,n){var r=Gy.exec(e.slice(n,n+1));return r?(t.u=+r[0],n+r[0].length):-1}function nv(t,e,n){var r=Gy.exec(e.slice(n,n+2));return r?(t.U=+r[0],n+r[0].length):-1}function rv(t,e,n){var r=Gy.exec(e.slice(n,n+2));return r?(t.V=+r[0],n+r[0].length):-1}function iv(t,e,n){var r=Gy.exec(e.slice(n,n+2));return r?(t.W=+r[0],n+r[0].length):-1}function av(t,e,n){var r=Gy.exec(e.slice(n,n+4));return r?(t.y=+r[0],n+r[0].length):-1}function ov(t,e,n){var r=Gy.exec(e.slice(n,n+2));return r?(t.y=+r[0]+(+r[0]>68?1900:2e3),n+r[0].length):-1}function sv(t,e,n){var r=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return r?(t.Z=r[1]?0:-(r[2]+(r[3]||"00")),n+r[0].length):-1}function cv(t,e,n){var r=Gy.exec(e.slice(n,n+1));return r?(t.q=3*r[0]-3,n+r[0].length):-1}function uv(t,e,n){var r=Gy.exec(e.slice(n,n+2));return r?(t.m=r[0]-1,n+r[0].length):-1}function lv(t,e,n){var r=Gy.exec(e.slice(n,n+2));return r?(t.d=+r[0],n+r[0].length):-1}function hv(t,e,n){var r=Gy.exec(e.slice(n,n+3));return r?(t.m=0,t.d=+r[0],n+r[0].length):-1}function fv(t,e,n){var r=Gy.exec(e.slice(n,n+2));return r?(t.H=+r[0],n+r[0].length):-1}function dv(t,e,n){var r=Gy.exec(e.slice(n,n+2));return r?(t.M=+r[0],n+r[0].length):-1}function pv(t,e,n){var r=Gy.exec(e.slice(n,n+2));return r?(t.S=+r[0],n+r[0].length):-1}function gv(t,e,n){var r=Gy.exec(e.slice(n,n+3));return r?(t.L=+r[0],n+r[0].length):-1}function yv(t,e,n){var r=Gy.exec(e.slice(n,n+6));return r?(t.L=Math.floor(r[0]/1e3),n+r[0].length):-1}function vv(t,e,n){var r=qy.exec(e.slice(n,n+1));return r?n+r[0].length:-1}function mv(t,e,n){var r=Gy.exec(e.slice(n));return r?(t.Q=+r[0],n+r[0].length):-1}function bv(t,e,n){var r=Gy.exec(e.slice(n));return r?(t.s=+r[0],n+r[0].length):-1}function xv(t,e){return Zy(t.getDate(),e,2)}function _v(t,e){return Zy(t.getHours(),e,2)}function kv(t,e){return Zy(t.getHours()%12||12,e,2)}function wv(t,e){return Zy(1+ny.count(Fg(t),t),e,3)}function Ev(t,e){return Zy(t.getMilliseconds(),e,3)}function Tv(t,e){return Ev(t,e)+"000"}function Cv(t,e){return Zy(t.getMonth()+1,e,2)}function Av(t,e){return Zy(t.getMinutes(),e,2)}function Sv(t,e){return Zy(t.getSeconds(),e,2)}function Mv(t){var e=t.getDay();return 0===e?7:e}function Ov(t,e){return Zy(zg.count(Fg(t)-1,t),e,2)}function Dv(t,e){var n=t.getDay();return t=n>=4||0===n?Vg(t):Vg.ceil(t),Zy(Vg.count(Fg(t),t)+(4===Fg(t).getDay()),e,2)}function Nv(t){return t.getDay()}function Bv(t,e){return Zy(Ug.count(Fg(t)-1,t),e,2)}function Lv(t,e){return Zy(t.getFullYear()%100,e,2)}function Fv(t,e){return Zy(t.getFullYear()%1e4,e,4)}function Pv(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Zy(e/60|0,"0",2)+Zy(e%60,"0",2)}function Iv(t,e){return Zy(t.getUTCDate(),e,2)}function jv(t,e){return Zy(t.getUTCHours(),e,2)}function Rv(t,e){return Zy(t.getUTCHours()%12||12,e,2)}function Yv(t,e){return Zy(1+Ny.count(Fy(t),t),e,3)}function zv(t,e){return Zy(t.getUTCMilliseconds(),e,3)}function Uv(t,e){return zv(t,e)+"000"}function $v(t,e){return Zy(t.getUTCMonth()+1,e,2)}function Wv(t,e){return Zy(t.getUTCMinutes(),e,2)}function Vv(t,e){return Zy(t.getUTCSeconds(),e,2)}function Hv(t){var e=t.getUTCDay();return 0===e?7:e}function Gv(t,e){return Zy(vy.count(Fy(t)-1,t),e,2)}function qv(t,e){var n=t.getUTCDay();return t=n>=4||0===n?_y(t):_y.ceil(t),Zy(_y.count(Fy(t),t)+(4===Fy(t).getUTCDay()),e,2)}function Xv(t){return t.getUTCDay()}function Zv(t,e){return Zy(my.count(Fy(t)-1,t),e,2)}function Jv(t,e){return Zy(t.getUTCFullYear()%100,e,2)}function Qv(t,e){return Zy(t.getUTCFullYear()%1e4,e,4)}function Kv(){return"+0000"}function tm(){return"%"}function em(t){return+t}function nm(t){return Math.floor(+t/1e3)}function rm(t){return zy=Yy(t),Uy=zy.format,$y=zy.parse,Wy=zy.utcFormat,Vy=zy.utcParse,zy}rm({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function im(t){return new Date(t)}function am(t){return t instanceof Date?+t:+new Date(+t)}function om(t,e,n,r,a,o,s,c,u){var l=ig(Jp,Jp),h=l.invert,f=l.domain,d=u(".%L"),p=u(":%S"),g=u("%I:%M"),y=u("%I %p"),v=u("%a %d"),m=u("%b %d"),b=u("%B"),x=u("%Y"),_=[[s,1,1e3],[s,5,5e3],[s,15,15e3],[s,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[a,1,36e5],[a,3,108e5],[a,6,216e5],[a,12,432e5],[r,1,864e5],[r,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function k(i){return(s(i)<i?d:o(i)<i?p:a(i)<i?g:r(i)<i?y:e(i)<i?n(i)<i?v:m:t(i)<i?b:x)(i)}function w(e,n,r,a){if(null==e&&(e=10),"number"==typeof e){var o=Math.abs(r-n)/e,s=i((function(t){return t[2]})).right(_,o);s===_.length?(a=S(n/31536e6,r/31536e6,e),e=t):s?(a=(s=_[o/_[s-1][2]<_[s][2]/o?s-1:s])[1],e=s[0]):(a=Math.max(S(n,r,e),1),e=c)}return null==a?e:e.every(a)}return l.invert=function(t){return new Date(h(t))},l.domain=function(t){return arguments.length?f(Up.call(t,am)):f().map(im)},l.ticks=function(t,e){var n,r=f(),i=r[0],a=r[r.length-1],o=a<i;return o&&(n=i,i=a,a=n),n=(n=w(t,i,a,e))?n.range(i,a+1):[],o?n.reverse():n},l.tickFormat=function(t,e){return null==e?k:u(e)},l.nice=function(t,e){var n=f();return(t=w(t,n[0],n[n.length-1],e))?f(ug(n,t)):l},l.copy=function(){return ng(l,om(t,e,n,r,a,o,s,c,u))},l}var sm=function(){return Rp.apply(om(Fg,jg,zg,ny,ay,cy,hy,py,Uy).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)},cm=Bg((function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)}),(function(t,e){t.setUTCMonth(t.getUTCMonth()+e)}),(function(t,e){return e.getUTCMonth()-t.getUTCMonth()+12*(e.getUTCFullYear()-t.getUTCFullYear())}),(function(t){return t.getUTCMonth()})),um=cm,lm=cm.range,hm=Bg((function(t){t.setUTCMinutes(0,0,0)}),(function(t,e){t.setTime(+t+36e5*e)}),(function(t,e){return(e-t)/36e5}),(function(t){return t.getUTCHours()})),fm=hm,dm=hm.range,pm=Bg((function(t){t.setUTCSeconds(0,0)}),(function(t,e){t.setTime(+t+6e4*e)}),(function(t,e){return(e-t)/6e4}),(function(t){return t.getUTCMinutes()})),gm=pm,ym=pm.range,vm=function(){return Rp.apply(om(Fy,um,vy,Ny,fm,gm,hy,py,Wy).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)};function mm(){var t,e,n,r,i,a=0,o=1,s=Jp,c=!1;function u(e){return isNaN(e=+e)?i:s(0===n?.5:(e=(r(e)-t)*n,c?Math.max(0,Math.min(1,e)):e))}return u.domain=function(i){return arguments.length?(t=r(a=+i[0]),e=r(o=+i[1]),n=t===e?0:1/(e-t),u):[a,o]},u.clamp=function(t){return arguments.length?(c=!!t,u):c},u.interpolator=function(t){return arguments.length?(s=t,u):s},u.unknown=function(t){return arguments.length?(i=t,u):i},function(i){return r=i,t=i(a),e=i(o),n=t===e?0:1/(e-t),u}}function bm(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function xm(){var t=og(mm()(Jp));return t.copy=function(){return bm(t,xm())},Yp.apply(t,arguments)}function _m(){var t=yg(mm()).domain([1,10]);return t.copy=function(){return bm(t,_m()).base(t.base())},Yp.apply(t,arguments)}function km(){var t=xg(mm());return t.copy=function(){return bm(t,km()).constant(t.constant())},Yp.apply(t,arguments)}function wm(){var t=Tg(mm());return t.copy=function(){return bm(t,wm()).exponent(t.exponent())},Yp.apply(t,arguments)}function Em(){return wm.apply(null,arguments).exponent(.5)}function Tm(){var t=[],e=Jp;function n(n){if(!isNaN(n=+n))return e((c(t,n)-1)/(t.length-1))}return n.domain=function(e){if(!arguments.length)return t.slice();t=[];for(var i,a=0,o=e.length;a<o;++a)null==(i=e[a])||isNaN(i=+i)||t.push(i);return t.sort(r),n},n.interpolator=function(t){return arguments.length?(e=t,n):e},n.copy=function(){return Tm(e).domain(t)},Yp.apply(n,arguments)}function Cm(){var t,e,n,r,i,a,o,s=0,c=.5,u=1,l=Jp,h=!1;function f(t){return isNaN(t=+t)?o:(t=.5+((t=+a(t))-e)*(t<e?r:i),l(h?Math.max(0,Math.min(1,t)):t))}return f.domain=function(o){return arguments.length?(t=a(s=+o[0]),e=a(c=+o[1]),n=a(u=+o[2]),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),f):[s,c,u]},f.clamp=function(t){return arguments.length?(h=!!t,f):h},f.interpolator=function(t){return arguments.length?(l=t,f):l},f.unknown=function(t){return arguments.length?(o=t,f):o},function(o){return a=o,t=o(s),e=o(c),n=o(u),r=t===e?0:.5/(e-t),i=e===n?0:.5/(n-e),f}}function Am(){var t=og(Cm()(Jp));return t.copy=function(){return bm(t,Am())},Yp.apply(t,arguments)}function Sm(){var t=yg(Cm()).domain([.1,1,10]);return t.copy=function(){return bm(t,Sm()).base(t.base())},Yp.apply(t,arguments)}function Mm(){var t=xg(Cm());return t.copy=function(){return bm(t,Mm()).constant(t.constant())},Yp.apply(t,arguments)}function Om(){var t=Tg(Cm());return t.copy=function(){return bm(t,Om()).exponent(t.exponent())},Yp.apply(t,arguments)}function Dm(){return Om.apply(null,arguments).exponent(.5)}var Nm=function(t){for(var e=t.length/6|0,n=new Array(e),r=0;r<e;)n[r]="#"+t.slice(6*r,6*++r);return n},Bm=Nm("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),Lm=Nm("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),Fm=Nm("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),Pm=Nm("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),Im=Nm("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),jm=Nm("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),Rm=Nm("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),Ym=Nm("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),zm=Nm("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),Um=Nm("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),$m=function(t){return pn(t[t.length-1])},Wm=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(Nm),Vm=$m(Wm),Hm=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(Nm),Gm=$m(Hm),qm=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(Nm),Xm=$m(qm),Zm=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(Nm),Jm=$m(Zm),Qm=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(Nm),Km=$m(Qm),tb=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(Nm),eb=$m(tb),nb=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(Nm),rb=$m(nb),ib=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(Nm),ab=$m(ib),ob=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(Nm),sb=$m(ob),cb=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(Nm),ub=$m(cb),lb=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(Nm),hb=$m(lb),fb=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(Nm),db=$m(fb),pb=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(Nm),gb=$m(pb),yb=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(Nm),vb=$m(yb),mb=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(Nm),bb=$m(mb),xb=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(Nm),_b=$m(xb),kb=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(Nm),wb=$m(kb),Eb=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(Nm),Tb=$m(Eb),Cb=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(Nm),Ab=$m(Cb),Sb=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(Nm),Mb=$m(Sb),Ob=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(Nm),Db=$m(Ob),Nb=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(Nm),Bb=$m(Nb),Lb=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(Nm),Fb=$m(Lb),Pb=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(Nm),Ib=$m(Pb),jb=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(Nm),Rb=$m(jb),Yb=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(Nm),zb=$m(Yb),Ub=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(Nm),$b=$m(Ub),Wb=function(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)))))))+")"},Vb=kp(Oa(300,.5,0),Oa(-240,.5,1)),Hb=kp(Oa(-100,.75,.35),Oa(80,1.5,.8)),Gb=kp(Oa(260,.75,.35),Oa(80,1.5,.8)),qb=Oa(),Xb=function(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return qb.h=360*t-100,qb.s=1.5-1.5*e,qb.l=.8-.9*e,qb+""},Zb=Ge(),Jb=Math.PI/3,Qb=2*Math.PI/3,Kb=function(t){var e;return t=(.5-t)*Math.PI,Zb.r=255*(e=Math.sin(t))*e,Zb.g=255*(e=Math.sin(t+Jb))*e,Zb.b=255*(e=Math.sin(t+Qb))*e,Zb+""},tx=function(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 ex(t){var e=t.length;return function(n){return t[Math.max(0,Math.min(e-1,Math.floor(n*e)))]}}var nx=ex(Nm("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725")),rx=ex(Nm("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),ix=ex(Nm("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),ax=ex(Nm("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921")),ox=function(t){return ke(ne(t).call(document.documentElement))},sx=0;function cx(){return new ux}function ux(){this._="@"+(++sx).toString(36)}ux.prototype=cx.prototype={constructor:ux,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._}};var lx=function(t){return"string"==typeof t?new be([document.querySelectorAll(t)],[document.documentElement]):new be([null==t?[]:t],me)},hx=function(t,e){null==e&&(e=Mn().touches);for(var n=0,r=e?e.length:0,i=new Array(r);n<r;++n)i[n]=On(t,e[n]);return i},fx=function(t){return function(){return t}},dx=Math.abs,px=Math.atan2,gx=Math.cos,yx=Math.max,vx=Math.min,mx=Math.sin,bx=Math.sqrt,xx=Math.PI,_x=xx/2,kx=2*xx;function wx(t){return t>1?0:t<-1?xx:Math.acos(t)}function Ex(t){return t>=1?_x:t<=-1?-_x:Math.asin(t)}function Tx(t){return t.innerRadius}function Cx(t){return t.outerRadius}function Ax(t){return t.startAngle}function Sx(t){return t.endAngle}function Mx(t){return t&&t.padAngle}function Ox(t,e,n,r,i,a,o,s){var c=n-t,u=r-e,l=o-i,h=s-a,f=h*c-l*u;if(!(f*f<1e-12))return[t+(f=(l*(e-a)-h*(t-i))/f)*c,e+f*u]}function Dx(t,e,n,r,i,a,o){var s=t-n,c=e-r,u=(o?a:-a)/bx(s*s+c*c),l=u*c,h=-u*s,f=t+l,d=e+h,p=n+l,g=r+h,y=(f+p)/2,v=(d+g)/2,m=p-f,b=g-d,x=m*m+b*b,_=i-a,k=f*g-p*d,w=(b<0?-1:1)*bx(yx(0,_*_*x-k*k)),E=(k*b-m*w)/x,T=(-k*m-b*w)/x,C=(k*b+m*w)/x,A=(-k*m+b*w)/x,S=E-y,M=T-v,O=C-y,D=A-v;return S*S+M*M>O*O+D*D&&(E=C,T=A),{cx:E,cy:T,x01:-l,y01:-h,x11:E*(i/_-1),y11:T*(i/_-1)}}var Nx=function(){var t=Tx,e=Cx,n=fx(0),r=null,i=Ax,a=Sx,o=Mx,s=null;function c(){var c,u,l=+t.apply(this,arguments),h=+e.apply(this,arguments),f=i.apply(this,arguments)-_x,d=a.apply(this,arguments)-_x,p=dx(d-f),g=d>f;if(s||(s=c=Ui()),h<l&&(u=h,h=l,l=u),h>1e-12)if(p>kx-1e-12)s.moveTo(h*gx(f),h*mx(f)),s.arc(0,0,h,f,d,!g),l>1e-12&&(s.moveTo(l*gx(d),l*mx(d)),s.arc(0,0,l,d,f,g));else{var y,v,m=f,b=d,x=f,_=d,k=p,w=p,E=o.apply(this,arguments)/2,T=E>1e-12&&(r?+r.apply(this,arguments):bx(l*l+h*h)),C=vx(dx(h-l)/2,+n.apply(this,arguments)),A=C,S=C;if(T>1e-12){var M=Ex(T/l*mx(E)),O=Ex(T/h*mx(E));(k-=2*M)>1e-12?(x+=M*=g?1:-1,_-=M):(k=0,x=_=(f+d)/2),(w-=2*O)>1e-12?(m+=O*=g?1:-1,b-=O):(w=0,m=b=(f+d)/2)}var D=h*gx(m),N=h*mx(m),B=l*gx(_),L=l*mx(_);if(C>1e-12){var F,P=h*gx(b),I=h*mx(b),j=l*gx(x),R=l*mx(x);if(p<xx&&(F=Ox(D,N,j,R,P,I,B,L))){var Y=D-F[0],z=N-F[1],U=P-F[0],$=I-F[1],W=1/mx(wx((Y*U+z*$)/(bx(Y*Y+z*z)*bx(U*U+$*$)))/2),V=bx(F[0]*F[0]+F[1]*F[1]);A=vx(C,(l-V)/(W-1)),S=vx(C,(h-V)/(W+1))}}w>1e-12?S>1e-12?(y=Dx(j,R,D,N,h,S,g),v=Dx(P,I,B,L,h,S,g),s.moveTo(y.cx+y.x01,y.cy+y.y01),S<C?s.arc(y.cx,y.cy,S,px(y.y01,y.x01),px(v.y01,v.x01),!g):(s.arc(y.cx,y.cy,S,px(y.y01,y.x01),px(y.y11,y.x11),!g),s.arc(0,0,h,px(y.cy+y.y11,y.cx+y.x11),px(v.cy+v.y11,v.cx+v.x11),!g),s.arc(v.cx,v.cy,S,px(v.y11,v.x11),px(v.y01,v.x01),!g))):(s.moveTo(D,N),s.arc(0,0,h,m,b,!g)):s.moveTo(D,N),l>1e-12&&k>1e-12?A>1e-12?(y=Dx(B,L,P,I,l,-A,g),v=Dx(D,N,j,R,l,-A,g),s.lineTo(y.cx+y.x01,y.cy+y.y01),A<C?s.arc(y.cx,y.cy,A,px(y.y01,y.x01),px(v.y01,v.x01),!g):(s.arc(y.cx,y.cy,A,px(y.y01,y.x01),px(y.y11,y.x11),!g),s.arc(0,0,l,px(y.cy+y.y11,y.cx+y.x11),px(v.cy+v.y11,v.cx+v.x11),g),s.arc(v.cx,v.cy,A,px(v.y11,v.x11),px(v.y01,v.x01),!g))):s.arc(0,0,l,_,x,g):s.lineTo(B,L)}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+""||null}return c.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,r=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-xx/2;return[gx(r)*n,mx(r)*n]},c.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:fx(+e),c):t},c.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:fx(+t),c):e},c.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:fx(+t),c):n},c.padRadius=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:fx(+t),c):r},c.startAngle=function(t){return arguments.length?(i="function"==typeof t?t:fx(+t),c):i},c.endAngle=function(t){return arguments.length?(a="function"==typeof t?t:fx(+t),c):a},c.padAngle=function(t){return arguments.length?(o="function"==typeof t?t:fx(+t),c):o},c.context=function(t){return arguments.length?(s=null==t?null:t,c):s},c};function Bx(t){this._context=t}Bx.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 Lx=function(t){return new Bx(t)};function Fx(t){return t[0]}function Px(t){return t[1]}var Ix=function(){var t=Fx,e=Px,n=fx(!0),r=null,i=Lx,a=null;function o(o){var s,c,u,l=o.length,h=!1;for(null==r&&(a=i(u=Ui())),s=0;s<=l;++s)!(s<l&&n(c=o[s],s,o))===h&&((h=!h)?a.lineStart():a.lineEnd()),h&&a.point(+t(c,s,o),+e(c,s,o));if(u)return a=null,u+""||null}return o.x=function(e){return arguments.length?(t="function"==typeof e?e:fx(+e),o):t},o.y=function(t){return arguments.length?(e="function"==typeof t?t:fx(+t),o):e},o.defined=function(t){return arguments.length?(n="function"==typeof t?t:fx(!!t),o):n},o.curve=function(t){return arguments.length?(i=t,null!=r&&(a=i(r)),o):i},o.context=function(t){return arguments.length?(null==t?r=a=null:a=i(r=t),o):r},o},jx=function(){var t=Fx,e=null,n=fx(0),r=Px,i=fx(!0),a=null,o=Lx,s=null;function c(c){var u,l,h,f,d,p=c.length,g=!1,y=new Array(p),v=new Array(p);for(null==a&&(s=o(d=Ui())),u=0;u<=p;++u){if(!(u<p&&i(f=c[u],u,c))===g)if(g=!g)l=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),h=u-1;h>=l;--h)s.point(y[h],v[h]);s.lineEnd(),s.areaEnd()}g&&(y[u]=+t(f,u,c),v[u]=+n(f,u,c),s.point(e?+e(f,u,c):y[u],r?+r(f,u,c):v[u]))}if(d)return s=null,d+""||null}function u(){return Ix().defined(i).curve(o).context(a)}return c.x=function(n){return arguments.length?(t="function"==typeof n?n:fx(+n),e=null,c):t},c.x0=function(e){return arguments.length?(t="function"==typeof e?e:fx(+e),c):t},c.x1=function(t){return arguments.length?(e=null==t?null:"function"==typeof t?t:fx(+t),c):e},c.y=function(t){return arguments.length?(n="function"==typeof t?t:fx(+t),r=null,c):n},c.y0=function(t){return arguments.length?(n="function"==typeof t?t:fx(+t),c):n},c.y1=function(t){return arguments.length?(r=null==t?null:"function"==typeof t?t:fx(+t),c):r},c.lineX0=c.lineY0=function(){return u().x(t).y(n)},c.lineY1=function(){return u().x(t).y(r)},c.lineX1=function(){return u().x(e).y(n)},c.defined=function(t){return arguments.length?(i="function"==typeof t?t:fx(!!t),c):i},c.curve=function(t){return arguments.length?(o=t,null!=a&&(s=o(a)),c):o},c.context=function(t){return arguments.length?(null==t?a=s=null:s=o(a=t),c):a},c},Rx=function(t,e){return e<t?-1:e>t?1:e>=t?0:NaN},Yx=function(t){return t},zx=function(){var t=Yx,e=Rx,n=null,r=fx(0),i=fx(kx),a=fx(0);function o(o){var s,c,u,l,h,f=o.length,d=0,p=new Array(f),g=new Array(f),y=+r.apply(this,arguments),v=Math.min(kx,Math.max(-kx,i.apply(this,arguments)-y)),m=Math.min(Math.abs(v)/f,a.apply(this,arguments)),b=m*(v<0?-1:1);for(s=0;s<f;++s)(h=g[p[s]=s]=+t(o[s],s,o))>0&&(d+=h);for(null!=e?p.sort((function(t,n){return e(g[t],g[n])})):null!=n&&p.sort((function(t,e){return n(o[t],o[e])})),s=0,u=d?(v-f*b)/d:0;s<f;++s,y=l)c=p[s],l=y+((h=g[c])>0?h*u:0)+b,g[c]={data:o[c],index:s,value:h,startAngle:y,endAngle:l,padAngle:m};return g}return o.value=function(e){return arguments.length?(t="function"==typeof e?e:fx(+e),o):t},o.sortValues=function(t){return arguments.length?(e=t,n=null,o):e},o.sort=function(t){return arguments.length?(n=t,e=null,o):n},o.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:fx(+t),o):r},o.endAngle=function(t){return arguments.length?(i="function"==typeof t?t:fx(+t),o):i},o.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:fx(+t),o):a},o},Ux=Wx(Lx);function $x(t){this._curve=t}function Wx(t){function e(e){return new $x(t(e))}return e._curve=t,e}function Vx(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(Wx(t)):e()._curve},t}$x.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))}};var Hx=function(){return Vx(Ix().curve(Ux))},Gx=function(){var t=jx().curve(Ux),e=t.curve,n=t.lineX0,r=t.lineX1,i=t.lineY0,a=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 Vx(n())},delete t.lineX0,t.lineEndAngle=function(){return Vx(r())},delete t.lineX1,t.lineInnerRadius=function(){return Vx(i())},delete t.lineY0,t.lineOuterRadius=function(){return Vx(a())},delete t.lineY1,t.curve=function(t){return arguments.length?e(Wx(t)):e()._curve},t},qx=function(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]},Xx=Array.prototype.slice;function Zx(t){return t.source}function Jx(t){return t.target}function Qx(t){var e=Zx,n=Jx,r=Fx,i=Px,a=null;function o(){var o,s=Xx.call(arguments),c=e.apply(this,s),u=n.apply(this,s);if(a||(a=o=Ui()),t(a,+r.apply(this,(s[0]=c,s)),+i.apply(this,s),+r.apply(this,(s[0]=u,s)),+i.apply(this,s)),o)return a=null,o+""||null}return o.source=function(t){return arguments.length?(e=t,o):e},o.target=function(t){return arguments.length?(n=t,o):n},o.x=function(t){return arguments.length?(r="function"==typeof t?t:fx(+t),o):r},o.y=function(t){return arguments.length?(i="function"==typeof t?t:fx(+t),o):i},o.context=function(t){return arguments.length?(a=null==t?null:t,o):a},o}function Kx(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e=(e+r)/2,n,e,i,r,i)}function t_(t,e,n,r,i){t.moveTo(e,n),t.bezierCurveTo(e,n=(n+i)/2,r,n,r,i)}function e_(t,e,n,r,i){var a=qx(e,n),o=qx(e,n=(n+i)/2),s=qx(r,n),c=qx(r,i);t.moveTo(a[0],a[1]),t.bezierCurveTo(o[0],o[1],s[0],s[1],c[0],c[1])}function n_(){return Qx(Kx)}function r_(){return Qx(t_)}function i_(){var t=Qx(e_);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}var a_={draw:function(t,e){var n=Math.sqrt(e/xx);t.moveTo(n,0),t.arc(0,0,n,0,kx)}},o_={draw:function(t,e){var n=Math.sqrt(e/5)/2;t.moveTo(-3*n,-n),t.lineTo(-n,-n),t.lineTo(-n,-3*n),t.lineTo(n,-3*n),t.lineTo(n,-n),t.lineTo(3*n,-n),t.lineTo(3*n,n),t.lineTo(n,n),t.lineTo(n,3*n),t.lineTo(-n,3*n),t.lineTo(-n,n),t.lineTo(-3*n,n),t.closePath()}},s_=Math.sqrt(1/3),c_=2*s_,u_={draw:function(t,e){var n=Math.sqrt(e/c_),r=n*s_;t.moveTo(0,-n),t.lineTo(r,0),t.lineTo(0,n),t.lineTo(-r,0),t.closePath()}},l_=Math.sin(xx/10)/Math.sin(7*xx/10),h_=Math.sin(kx/10)*l_,f_=-Math.cos(kx/10)*l_,d_={draw:function(t,e){var n=Math.sqrt(.8908130915292852*e),r=h_*n,i=f_*n;t.moveTo(0,-n),t.lineTo(r,i);for(var a=1;a<5;++a){var o=kx*a/5,s=Math.cos(o),c=Math.sin(o);t.lineTo(c*n,-s*n),t.lineTo(s*r-c*i,c*r+s*i)}t.closePath()}},p_={draw:function(t,e){var n=Math.sqrt(e),r=-n/2;t.rect(r,r,n,n)}},g_=Math.sqrt(3),y_={draw:function(t,e){var n=-Math.sqrt(e/(3*g_));t.moveTo(0,2*n),t.lineTo(-g_*n,-n),t.lineTo(g_*n,-n),t.closePath()}},v_=Math.sqrt(3)/2,m_=1/Math.sqrt(12),b_=3*(m_/2+1),x_={draw:function(t,e){var n=Math.sqrt(e/b_),r=n/2,i=n*m_,a=r,o=n*m_+n,s=-a,c=o;t.moveTo(r,i),t.lineTo(a,o),t.lineTo(s,c),t.lineTo(-.5*r-v_*i,v_*r+-.5*i),t.lineTo(-.5*a-v_*o,v_*a+-.5*o),t.lineTo(-.5*s-v_*c,v_*s+-.5*c),t.lineTo(-.5*r+v_*i,-.5*i-v_*r),t.lineTo(-.5*a+v_*o,-.5*o-v_*a),t.lineTo(-.5*s+v_*c,-.5*c-v_*s),t.closePath()}},__=[a_,o_,u_,p_,d_,y_,x_],k_=function(){var t=fx(a_),e=fx(64),n=null;function r(){var r;if(n||(n=r=Ui()),t.apply(this,arguments).draw(n,+e.apply(this,arguments)),r)return n=null,r+""||null}return r.type=function(e){return arguments.length?(t="function"==typeof e?e:fx(e),r):t},r.size=function(t){return arguments.length?(e="function"==typeof t?t:fx(+t),r):e},r.context=function(t){return arguments.length?(n=null==t?null:t,r):n},r},w_=function(){};function E_(t,e,n){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+n)/6)}function T_(t){this._context=t}T_.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:E_(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:E_(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var C_=function(t){return new T_(t)};function A_(t){this._context=t}A_.prototype={areaStart:w_,areaEnd:w_,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:E_(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var S_=function(t){return new A_(t)};function M_(t){this._context=t}M_.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 n=(this._x0+4*this._x1+t)/6,r=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,r):this._context.moveTo(n,r);break;case 3:this._point=4;default:E_(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};var O_=function(t){return new M_(t)};function D_(t,e){this._basis=new T_(t),this._beta=e}D_.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var r,i=t[0],a=e[0],o=t[n]-i,s=e[n]-a,c=-1;++c<=n;)r=c/n,this._basis.point(this._beta*t[c]+(1-this._beta)*(i+r*o),this._beta*e[c]+(1-this._beta)*(a+r*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};var N_=function t(e){function n(t){return 1===e?new T_(t):new D_(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function B_(t,e,n){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-n),t._x2,t._y2)}function L_(t,e){this._context=t,this._k=(1-e)/6}L_.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:B_(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:B_(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}};var F_=function t(e){function n(t){return new L_(t,e)}return n.tension=function(e){return t(+e)},n}(0);function P_(t,e){this._context=t,this._k=(1-e)/6}P_.prototype={areaStart:w_,areaEnd:w_,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:B_(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}};var I_=function t(e){function n(t){return new P_(t,e)}return n.tension=function(e){return t(+e)},n}(0);function j_(t,e){this._context=t,this._k=(1-e)/6}j_.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:B_(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}};var R_=function t(e){function n(t){return new j_(t,e)}return n.tension=function(e){return t(+e)},n}(0);function Y_(t,e,n){var r=t._x1,i=t._y1,a=t._x2,o=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,c=3*t._l01_a*(t._l01_a+t._l12_a);r=(r*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/c,i=(i*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/c}if(t._l23_a>1e-12){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,l=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*u+t._x1*t._l23_2a-e*t._l12_2a)/l,o=(o*u+t._y1*t._l23_2a-n*t._l12_2a)/l}t._context.bezierCurveTo(r,i,a,o,t._x2,t._y2)}function z_(t,e){this._context=t,this._alpha=e}z_.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 n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,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:Y_(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}};var U_=function t(e){function n(t){return e?new z_(t,e):new L_(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function $_(t,e){this._context=t,this._alpha=e}$_.prototype={areaStart:w_,areaEnd:w_,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 n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,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:Y_(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}};var W_=function t(e){function n(t){return e?new $_(t,e):new P_(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function V_(t,e){this._context=t,this._alpha=e}V_.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 n=this._x2-t,r=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+r*r,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:Y_(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}};var H_=function t(e){function n(t){return e?new V_(t,e):new j_(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function G_(t){this._context=t}G_.prototype={areaStart:w_,areaEnd:w_,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))}};var q_=function(t){return new G_(t)};function X_(t){return t<0?-1:1}function Z_(t,e,n){var r=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(r||i<0&&-0),o=(n-t._y1)/(i||r<0&&-0),s=(a*i+o*r)/(r+i);return(X_(a)+X_(o))*Math.min(Math.abs(a),Math.abs(o),.5*Math.abs(s))||0}function J_(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function Q_(t,e,n){var r=t._x0,i=t._y0,a=t._x1,o=t._y1,s=(a-r)/3;t._context.bezierCurveTo(r+s,i+s*e,a-s,o-s*n,a,o)}function K_(t){this._context=t}function tk(t){this._context=new ek(t)}function ek(t){this._context=t}function nk(t){return new K_(t)}function rk(t){return new tk(t)}function ik(t){this._context=t}function ak(t){var e,n,r=t.length-1,i=new Array(r),a=new Array(r),o=new Array(r);for(i[0]=0,a[0]=2,o[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,o[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,o[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,o[e]-=n*o[e-1];for(i[r-1]=o[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(o[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}K_.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:Q_(this,this._t0,J_(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=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,Q_(this,J_(this,n=Z_(this,t,e)),n);break;default:Q_(this,this._t0,n=Z_(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(tk.prototype=Object.create(K_.prototype)).point=function(t,e){K_.prototype.point.call(this,e,t)},ek.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,n,r,i,a){this._context.bezierCurveTo(e,t,r,n,a,i)}},ik.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,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var r=ak(t),i=ak(e),a=0,o=1;o<n;++a,++o)this._context.bezierCurveTo(r[0][a],i[0][a],r[1][a],i[1][a],t[o],e[o]);(this._line||0!==this._line&&1===n)&&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)}};var ok=function(t){return new ik(t)};function sk(t,e){this._context=t,this._t=e}sk.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 n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};var ck=function(t){return new sk(t,.5)};function uk(t){return new sk(t,0)}function lk(t){return new sk(t,1)}var hk=function(t,e){if((i=t.length)>1)for(var n,r,i,a=1,o=t[e[0]],s=o.length;a<i;++a)for(r=o,o=t[e[a]],n=0;n<s;++n)o[n][1]+=o[n][0]=isNaN(r[n][1])?r[n][0]:r[n][1]},fk=function(t){for(var e=t.length,n=new Array(e);--e>=0;)n[e]=e;return n};function dk(t,e){return t[e]}var pk=function(){var t=fx([]),e=fk,n=hk,r=dk;function i(i){var a,o,s=t.apply(this,arguments),c=i.length,u=s.length,l=new Array(u);for(a=0;a<u;++a){for(var h,f=s[a],d=l[a]=new Array(c),p=0;p<c;++p)d[p]=h=[0,+r(i[p],f,p,i)],h.data=i[p];d.key=f}for(a=0,o=e(l);a<u;++a)l[o[a]].index=a;return n(l,o),l}return i.keys=function(e){return arguments.length?(t="function"==typeof e?e:fx(Xx.call(e)),i):t},i.value=function(t){return arguments.length?(r="function"==typeof t?t:fx(+t),i):r},i.order=function(t){return arguments.length?(e=null==t?fk:"function"==typeof t?t:fx(Xx.call(t)),i):e},i.offset=function(t){return arguments.length?(n=null==t?hk:t,i):n},i},gk=function(t,e){if((r=t.length)>0){for(var n,r,i,a=0,o=t[0].length;a<o;++a){for(i=n=0;n<r;++n)i+=t[n][a][1]||0;if(i)for(n=0;n<r;++n)t[n][a][1]/=i}hk(t,e)}},yk=function(t,e){if((s=t.length)>0)for(var n,r,i,a,o,s,c=0,u=t[e[0]].length;c<u;++c)for(a=o=0,n=0;n<s;++n)(i=(r=t[e[n]][c])[1]-r[0])>0?(r[0]=a,r[1]=a+=i):i<0?(r[1]=o,r[0]=o+=i):(r[0]=0,r[1]=i)},vk=function(t,e){if((n=t.length)>0){for(var n,r=0,i=t[e[0]],a=i.length;r<a;++r){for(var o=0,s=0;o<n;++o)s+=t[o][r][1]||0;i[r][1]+=i[r][0]=-s/2}hk(t,e)}},mk=function(t,e){if((i=t.length)>0&&(r=(n=t[e[0]]).length)>0){for(var n,r,i,a=0,o=1;o<r;++o){for(var s=0,c=0,u=0;s<i;++s){for(var l=t[e[s]],h=l[o][1]||0,f=(h-(l[o-1][1]||0))/2,d=0;d<s;++d){var p=t[e[d]];f+=(p[o][1]||0)-(p[o-1][1]||0)}c+=h,u+=f*h}n[o-1][1]+=n[o-1][0]=a,c&&(a-=u/c)}n[o-1][1]+=n[o-1][0]=a,hk(t,e)}},bk=function(t){var e=t.map(xk);return fk(t).sort((function(t,n){return e[t]-e[n]}))};function xk(t){for(var e,n=-1,r=0,i=t.length,a=-1/0;++n<i;)(e=+t[n][1])>a&&(a=e,r=n);return r}var _k=function(t){var e=t.map(kk);return fk(t).sort((function(t,n){return e[t]-e[n]}))};function kk(t){for(var e,n=0,r=-1,i=t.length;++r<i;)(e=+t[r][1])&&(n+=e);return n}var wk=function(t){return _k(t).reverse()},Ek=function(t){var e,n,r=t.length,i=t.map(kk),a=bk(t),o=0,s=0,c=[],u=[];for(e=0;e<r;++e)n=a[e],o<s?(o+=i[n],c.push(n)):(s+=i[n],u.push(n));return u.reverse().concat(c)},Tk=function(t){return fk(t).reverse()};var Ck=Date.prototype.toISOString?function(t){return t.toISOString()}:Wy("%Y-%m-%dT%H:%M:%S.%LZ");var Ak=+new Date("2000-01-01T00:00:00.000Z")?function(t){var e=new Date(t);return isNaN(e)?null:e}:Vy("%Y-%m-%dT%H:%M:%S.%LZ"),Sk=function(t,e,n){var r=new $n,i=e;return null==e?(r.restart(t,e,n),r):(e=+e,n=null==n?zn():+n,r.restart((function a(o){o+=i,r.restart(a,i+=e,n),t(o)}),e,n),r)},Mk=function(t){return function(){return t}};function Ok(t){return t[0]}function Dk(t){return t[1]}function Nk(){this._=null}function Bk(t){t.U=t.C=t.L=t.R=t.P=t.N=null}function Lk(t,e){var n=e,r=e.R,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.R=r.L,n.R&&(n.R.U=n),r.L=n}function Fk(t,e){var n=e,r=e.L,i=n.U;i?i.L===n?i.L=r:i.R=r:t._=r,r.U=i,n.U=r,n.L=r.R,n.L&&(n.L.U=n),r.R=n}function Pk(t){for(;t.L;)t=t.L;return t}Nk.prototype={constructor:Nk,insert:function(t,e){var n,r,i;if(t){if(e.P=t,e.N=t.N,t.N&&(t.N.P=e),t.N=e,t.R){for(t=t.R;t.L;)t=t.L;t.L=e}else t.R=e;n=t}else this._?(t=Pk(this._),e.P=null,e.N=t,t.P=t.L=e,n=t):(e.P=e.N=null,this._=e,n=null);for(e.L=e.R=null,e.U=n,e.C=!0,t=e;n&&n.C;)n===(r=n.U).L?(i=r.R)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.R&&(Lk(this,n),n=(t=n).U),n.C=!1,r.C=!0,Fk(this,r)):(i=r.L)&&i.C?(n.C=i.C=!1,r.C=!0,t=r):(t===n.L&&(Fk(this,n),n=(t=n).U),n.C=!1,r.C=!0,Lk(this,r)),n=t.U;this._.C=!1},remove:function(t){t.N&&(t.N.P=t.P),t.P&&(t.P.N=t.N),t.N=t.P=null;var e,n,r,i=t.U,a=t.L,o=t.R;if(n=a?o?Pk(o):a:o,i?i.L===t?i.L=n:i.R=n:this._=n,a&&o?(r=n.C,n.C=t.C,n.L=a,a.U=n,n!==o?(i=n.U,n.U=t.U,t=n.R,i.L=t,n.R=o,o.U=n):(n.U=i,i=n,t=n.R)):(r=t.C,t=n),t&&(t.U=i),!r)if(t&&t.C)t.C=!1;else{do{if(t===this._)break;if(t===i.L){if((e=i.R).C&&(e.C=!1,i.C=!0,Lk(this,i),e=i.R),e.L&&e.L.C||e.R&&e.R.C){e.R&&e.R.C||(e.L.C=!1,e.C=!0,Fk(this,e),e=i.R),e.C=i.C,i.C=e.R.C=!1,Lk(this,i),t=this._;break}}else if((e=i.L).C&&(e.C=!1,i.C=!0,Fk(this,i),e=i.L),e.L&&e.L.C||e.R&&e.R.C){e.L&&e.L.C||(e.R.C=!1,e.C=!0,Lk(this,e),e=i.L),e.C=i.C,i.C=e.L.C=!1,Fk(this,i),t=this._;break}e.C=!0,t=i,i=i.U}while(!t.C);t&&(t.C=!1)}}};var Ik=Nk;function jk(t,e,n,r){var i=[null,null],a=cw.push(i)-1;return i.left=t,i.right=e,n&&Yk(i,t,e,n),r&&Yk(i,e,t,r),ow[t.index].halfedges.push(a),ow[e.index].halfedges.push(a),i}function Rk(t,e,n){var r=[e,n];return r.left=t,r}function Yk(t,e,n,r){t[0]||t[1]?t.left===n?t[1]=r:t[0]=r:(t[0]=r,t.left=e,t.right=n)}function zk(t,e,n,r,i){var a,o=t[0],s=t[1],c=o[0],u=o[1],l=0,h=1,f=s[0]-c,d=s[1]-u;if(a=e-c,f||!(a>0)){if(a/=f,f<0){if(a<l)return;a<h&&(h=a)}else if(f>0){if(a>h)return;a>l&&(l=a)}if(a=r-c,f||!(a<0)){if(a/=f,f<0){if(a>h)return;a>l&&(l=a)}else if(f>0){if(a<l)return;a<h&&(h=a)}if(a=n-u,d||!(a>0)){if(a/=d,d<0){if(a<l)return;a<h&&(h=a)}else if(d>0){if(a>h)return;a>l&&(l=a)}if(a=i-u,d||!(a<0)){if(a/=d,d<0){if(a>h)return;a>l&&(l=a)}else if(d>0){if(a<l)return;a<h&&(h=a)}return!(l>0||h<1)||(l>0&&(t[0]=[c+l*f,u+l*d]),h<1&&(t[1]=[c+h*f,u+h*d]),!0)}}}}}function Uk(t,e,n,r,i){var a=t[1];if(a)return!0;var o,s,c=t[0],u=t.left,l=t.right,h=u[0],f=u[1],d=l[0],p=l[1],g=(h+d)/2,y=(f+p)/2;if(p===f){if(g<e||g>=r)return;if(h>d){if(c){if(c[1]>=i)return}else c=[g,n];a=[g,i]}else{if(c){if(c[1]<n)return}else c=[g,i];a=[g,n]}}else if(s=y-(o=(h-d)/(p-f))*g,o<-1||o>1)if(h>d){if(c){if(c[1]>=i)return}else c=[(n-s)/o,n];a=[(i-s)/o,i]}else{if(c){if(c[1]<n)return}else c=[(i-s)/o,i];a=[(n-s)/o,n]}else if(f<p){if(c){if(c[0]>=r)return}else c=[e,o*e+s];a=[r,o*r+s]}else{if(c){if(c[0]<e)return}else c=[r,o*r+s];a=[e,o*e+s]}return t[0]=c,t[1]=a,!0}function $k(t,e){var n=t.site,r=e.left,i=e.right;return n===i&&(i=r,r=n),i?Math.atan2(i[1]-r[1],i[0]-r[0]):(n===r?(r=e[1],i=e[0]):(r=e[0],i=e[1]),Math.atan2(r[0]-i[0],i[1]-r[1]))}function Wk(t,e){return e[+(e.left!==t.site)]}function Vk(t,e){return e[+(e.left===t.site)]}var Hk,Gk=[];function qk(){Bk(this),this.x=this.y=this.arc=this.site=this.cy=null}function Xk(t){var e=t.P,n=t.N;if(e&&n){var r=e.site,i=t.site,a=n.site;if(r!==a){var o=i[0],s=i[1],c=r[0]-o,u=r[1]-s,l=a[0]-o,h=a[1]-s,f=2*(c*h-u*l);if(!(f>=-lw)){var d=c*c+u*u,p=l*l+h*h,g=(h*d-u*p)/f,y=(c*p-l*d)/f,v=Gk.pop()||new qk;v.arc=t,v.site=i,v.x=g+o,v.y=(v.cy=y+s)+Math.sqrt(g*g+y*y),t.circle=v;for(var m=null,b=sw._;b;)if(v.y<b.y||v.y===b.y&&v.x<=b.x){if(!b.L){m=b.P;break}b=b.L}else{if(!b.R){m=b;break}b=b.R}sw.insert(m,v),m||(Hk=v)}}}}function Zk(t){var e=t.circle;e&&(e.P||(Hk=e.N),sw.remove(e),Gk.push(e),Bk(e),t.circle=null)}var Jk=[];function Qk(){Bk(this),this.edge=this.site=this.circle=null}function Kk(t){var e=Jk.pop()||new Qk;return e.site=t,e}function tw(t){Zk(t),aw.remove(t),Jk.push(t),Bk(t)}function ew(t){var e=t.circle,n=e.x,r=e.cy,i=[n,r],a=t.P,o=t.N,s=[t];tw(t);for(var c=a;c.circle&&Math.abs(n-c.circle.x)<uw&&Math.abs(r-c.circle.cy)<uw;)a=c.P,s.unshift(c),tw(c),c=a;s.unshift(c),Zk(c);for(var u=o;u.circle&&Math.abs(n-u.circle.x)<uw&&Math.abs(r-u.circle.cy)<uw;)o=u.N,s.push(u),tw(u),u=o;s.push(u),Zk(u);var l,h=s.length;for(l=1;l<h;++l)u=s[l],c=s[l-1],Yk(u.edge,c.site,u.site,i);c=s[0],(u=s[h-1]).edge=jk(c.site,u.site,null,i),Xk(c),Xk(u)}function nw(t){for(var e,n,r,i,a=t[0],o=t[1],s=aw._;s;)if((r=rw(s,o)-a)>uw)s=s.L;else{if(!((i=a-iw(s,o))>uw)){r>-uw?(e=s.P,n=s):i>-uw?(e=s,n=s.N):e=n=s;break}if(!s.R){e=s;break}s=s.R}!function(t){ow[t.index]={site:t,halfedges:[]}}(t);var c=Kk(t);if(aw.insert(e,c),e||n){if(e===n)return Zk(e),n=Kk(e.site),aw.insert(c,n),c.edge=n.edge=jk(e.site,c.site),Xk(e),void Xk(n);if(n){Zk(e),Zk(n);var u=e.site,l=u[0],h=u[1],f=t[0]-l,d=t[1]-h,p=n.site,g=p[0]-l,y=p[1]-h,v=2*(f*y-d*g),m=f*f+d*d,b=g*g+y*y,x=[(y*m-d*b)/v+l,(f*b-g*m)/v+h];Yk(n.edge,u,p,x),c.edge=jk(u,t,null,x),n.edge=jk(t,p,null,x),Xk(e),Xk(n)}else c.edge=jk(e.site,c.site)}}function rw(t,e){var n=t.site,r=n[0],i=n[1],a=i-e;if(!a)return r;var o=t.P;if(!o)return-1/0;var s=(n=o.site)[0],c=n[1],u=c-e;if(!u)return s;var l=s-r,h=1/a-1/u,f=l/u;return h?(-f+Math.sqrt(f*f-2*h*(l*l/(-2*u)-c+u/2+i-a/2)))/h+r:(r+s)/2}function iw(t,e){var n=t.N;if(n)return rw(n,e);var r=t.site;return r[1]===e?r[0]:1/0}var aw,ow,sw,cw,uw=1e-6,lw=1e-12;function hw(t,e){return e[1]-t[1]||e[0]-t[0]}function fw(t,e){var n,r,i,a=t.sort(hw).pop();for(cw=[],ow=new Array(t.length),aw=new Ik,sw=new Ik;;)if(i=Hk,a&&(!i||a[1]<i.y||a[1]===i.y&&a[0]<i.x))a[0]===n&&a[1]===r||(nw(a),n=a[0],r=a[1]),a=t.pop();else{if(!i)break;ew(i.arc)}if(function(){for(var t,e,n,r,i=0,a=ow.length;i<a;++i)if((t=ow[i])&&(r=(e=t.halfedges).length)){var o=new Array(r),s=new Array(r);for(n=0;n<r;++n)o[n]=n,s[n]=$k(t,cw[e[n]]);for(o.sort((function(t,e){return s[e]-s[t]})),n=0;n<r;++n)s[n]=e[o[n]];for(n=0;n<r;++n)e[n]=s[n]}}(),e){var o=+e[0][0],s=+e[0][1],c=+e[1][0],u=+e[1][1];!function(t,e,n,r){for(var i,a=cw.length;a--;)Uk(i=cw[a],t,e,n,r)&&zk(i,t,e,n,r)&&(Math.abs(i[0][0]-i[1][0])>uw||Math.abs(i[0][1]-i[1][1])>uw)||delete cw[a]}(o,s,c,u),function(t,e,n,r){var i,a,o,s,c,u,l,h,f,d,p,g,y=ow.length,v=!0;for(i=0;i<y;++i)if(a=ow[i]){for(o=a.site,s=(c=a.halfedges).length;s--;)cw[c[s]]||c.splice(s,1);for(s=0,u=c.length;s<u;)p=(d=Vk(a,cw[c[s]]))[0],g=d[1],h=(l=Wk(a,cw[c[++s%u]]))[0],f=l[1],(Math.abs(p-h)>uw||Math.abs(g-f)>uw)&&(c.splice(s,0,cw.push(Rk(o,d,Math.abs(p-t)<uw&&r-g>uw?[t,Math.abs(h-t)<uw?f:r]:Math.abs(g-r)<uw&&n-p>uw?[Math.abs(f-r)<uw?h:n,r]:Math.abs(p-n)<uw&&g-e>uw?[n,Math.abs(h-n)<uw?f:e]:Math.abs(g-e)<uw&&p-t>uw?[Math.abs(f-e)<uw?h:t,e]:null))-1),++u);u&&(v=!1)}if(v){var m,b,x,_=1/0;for(i=0,v=null;i<y;++i)(a=ow[i])&&(x=(m=(o=a.site)[0]-t)*m+(b=o[1]-e)*b)<_&&(_=x,v=a);if(v){var k=[t,e],w=[t,r],E=[n,r],T=[n,e];v.halfedges.push(cw.push(Rk(o=v.site,k,w))-1,cw.push(Rk(o,w,E))-1,cw.push(Rk(o,E,T))-1,cw.push(Rk(o,T,k))-1)}}for(i=0;i<y;++i)(a=ow[i])&&(a.halfedges.length||delete ow[i])}(o,s,c,u)}this.edges=cw,this.cells=ow,aw=sw=cw=ow=null}fw.prototype={constructor:fw,polygons:function(){var t=this.edges;return this.cells.map((function(e){var n=e.halfedges.map((function(n){return Wk(e,t[n])}));return n.data=e.site.data,n}))},triangles:function(){var t=[],e=this.edges;return this.cells.forEach((function(n,r){if(a=(i=n.halfedges).length)for(var i,a,o,s,c,u,l=n.site,h=-1,f=e[i[a-1]],d=f.left===l?f.right:f.left;++h<a;)o=d,d=(f=e[i[h]]).left===l?f.right:f.left,o&&d&&r<o.index&&r<d.index&&(c=o,u=d,((s=l)[0]-u[0])*(c[1]-s[1])-(s[0]-c[0])*(u[1]-s[1])<0)&&t.push([l.data,o.data,d.data])})),t},links:function(){return this.edges.filter((function(t){return t.right})).map((function(t){return{source:t.left.data,target:t.right.data}}))},find:function(t,e,n){for(var r,i,a=this,o=a._found||0,s=a.cells.length;!(i=a.cells[o]);)if(++o>=s)return null;var c=t-i.site[0],u=e-i.site[1],l=c*c+u*u;do{i=a.cells[r=o],o=null,i.halfedges.forEach((function(n){var r=a.edges[n],s=r.left;if(s!==i.site&&s||(s=r.right)){var c=t-s[0],u=e-s[1],h=c*c+u*u;h<l&&(l=h,o=s.index)}}))}while(null!==o);return a._found=r,null==n||l<=n*n?i.site:null}};var dw=function(){var t=Ok,e=Dk,n=null;function r(r){return new fw(r.map((function(n,i){var a=[Math.round(t(n,i,r)/uw)*uw,Math.round(e(n,i,r)/uw)*uw];return a.index=i,a.data=n,a})),n)}return r.polygons=function(t){return r(t).polygons()},r.links=function(t){return r(t).links()},r.triangles=function(t){return r(t).triangles()},r.x=function(e){return arguments.length?(t="function"==typeof e?e:Mk(+e),r):t},r.y=function(t){return arguments.length?(e="function"==typeof t?t:Mk(+t),r):e},r.extent=function(t){return arguments.length?(n=null==t?null:[[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]],r):n&&[[n[0][0],n[0][1]],[n[1][0],n[1][1]]]},r.size=function(t){return arguments.length?(n=null==t?null:[[0,0],[+t[0],+t[1]]],r):n&&[n[1][0]-n[0][0],n[1][1]-n[0][1]]},r},pw=function(t){return function(){return t}};function gw(t,e,n){this.target=t,this.type=e,this.transform=n}function yw(t,e,n){this.k=t,this.x=e,this.y=n}yw.prototype={constructor:yw,scale:function(t){return 1===t?this:new yw(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new yw(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 vw=new yw(1,0,0);function mw(t){for(;!t.__zoom;)if(!(t=t.parentNode))return vw;return t.__zoom}function bw(){ce.stopImmediatePropagation()}mw.prototype=yw.prototype;var xw=function(){ce.preventDefault(),ce.stopImmediatePropagation()};function _w(){return!ce.ctrlKey&&!ce.button}function kw(){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 ww(){return this.__zoom||vw}function Ew(){return-ce.deltaY*(1===ce.deltaMode?.05:ce.deltaMode?1:.002)}function Tw(){return navigator.maxTouchPoints||"ontouchstart"in this}function Cw(t,e,n){var r=t.invertX(e[0][0])-n[0][0],i=t.invertX(e[1][0])-n[1][0],a=t.invertY(e[0][1])-n[0][1],o=t.invertY(e[1][1])-n[1][1];return t.translate(i>r?(r+i)/2:Math.min(0,r)||Math.max(0,i),o>a?(a+o)/2:Math.min(0,a)||Math.max(0,o))}var Aw=function(){var t,e,n=_w,r=kw,i=Cw,a=Ew,o=Tw,s=[0,1/0],c=[[-1/0,-1/0],[1/0,1/0]],u=250,l=fp,h=lt("start","zoom","end"),f=0;function d(t){t.property("__zoom",ww).on("wheel.zoom",x).on("mousedown.zoom",_).on("dblclick.zoom",k).filter(o).on("touchstart.zoom",w).on("touchmove.zoom",E).on("touchend.zoom touchcancel.zoom",T).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(t,e){return(e=Math.max(s[0],Math.min(s[1],e)))===t.k?t:new yw(e,t.x,t.y)}function g(t,e,n){var r=e[0]-n[0]*t.k,i=e[1]-n[1]*t.k;return r===t.x&&i===t.y?t:new yw(t.k,r,i)}function y(t){return[(+t[0][0]+ +t[1][0])/2,(+t[0][1]+ +t[1][1])/2]}function v(t,e,n){t.on("start.zoom",(function(){m(this,arguments).start()})).on("interrupt.zoom end.zoom",(function(){m(this,arguments).end()})).tween("zoom",(function(){var t=this,i=arguments,a=m(t,i),o=r.apply(t,i),s=null==n?y(o):"function"==typeof n?n.apply(t,i):n,c=Math.max(o[1][0]-o[0][0],o[1][1]-o[0][1]),u=t.__zoom,h="function"==typeof e?e.apply(t,i):e,f=l(u.invert(s).concat(c/u.k),h.invert(s).concat(c/h.k));return function(t){if(1===t)t=h;else{var e=f(t),n=c/e[2];t=new yw(n,s[0]-e[0]*n,s[1]-e[1]*n)}a.zoom(null,t)}}))}function m(t,e,n){return!n&&t.__zooming||new b(t,e)}function b(t,e){this.that=t,this.args=e,this.active=0,this.extent=r.apply(t,e),this.taps=0}function x(){if(n.apply(this,arguments)){var t=m(this,arguments),e=this.__zoom,r=Math.max(s[0],Math.min(s[1],e.k*Math.pow(2,a.apply(this,arguments)))),o=Nn(this);if(t.wheel)t.mouse[0][0]===o[0]&&t.mouse[0][1]===o[1]||(t.mouse[1]=e.invert(t.mouse[0]=o)),clearTimeout(t.wheel);else{if(e.k===r)return;t.mouse=[o,e.invert(o)],or(this),t.start()}xw(),t.wheel=setTimeout(u,150),t.zoom("mouse",i(g(p(e,r),t.mouse[0],t.mouse[1]),t.extent,c))}function u(){t.wheel=null,t.end()}}function _(){if(!e&&n.apply(this,arguments)){var t=m(this,arguments,!0),r=ke(ce.view).on("mousemove.zoom",u,!0).on("mouseup.zoom",l,!0),a=Nn(this),o=ce.clientX,s=ce.clientY;Te(ce.view),bw(),t.mouse=[a,this.__zoom.invert(a)],or(this),t.start()}function u(){if(xw(),!t.moved){var e=ce.clientX-o,n=ce.clientY-s;t.moved=e*e+n*n>f}t.zoom("mouse",i(g(t.that.__zoom,t.mouse[0]=Nn(t.that),t.mouse[1]),t.extent,c))}function l(){r.on("mousemove.zoom mouseup.zoom",null),Ce(ce.view,t.moved),xw(),t.end()}}function k(){if(n.apply(this,arguments)){var t=this.__zoom,e=Nn(this),a=t.invert(e),o=t.k*(ce.shiftKey?.5:2),s=i(g(p(t,o),e,a),r.apply(this,arguments),c);xw(),u>0?ke(this).transition().duration(u).call(v,s,e):ke(this).call(d.transform,s)}}function w(){if(n.apply(this,arguments)){var e,r,i,a,o=ce.touches,s=o.length,c=m(this,arguments,ce.changedTouches.length===s);for(bw(),r=0;r<s;++r)i=o[r],a=[a=Dn(this,o,i.identifier),this.__zoom.invert(a),i.identifier],c.touch0?c.touch1||c.touch0[2]===a[2]||(c.touch1=a,c.taps=0):(c.touch0=a,e=!0,c.taps=1+!!t);t&&(t=clearTimeout(t)),e&&(c.taps<2&&(t=setTimeout((function(){t=null}),500)),or(this),c.start())}}function E(){if(this.__zooming){var e,n,r,a,o=m(this,arguments),s=ce.changedTouches,u=s.length;for(xw(),t&&(t=clearTimeout(t)),o.taps=0,e=0;e<u;++e)n=s[e],r=Dn(this,s,n.identifier),o.touch0&&o.touch0[2]===n.identifier?o.touch0[0]=r:o.touch1&&o.touch1[2]===n.identifier&&(o.touch1[0]=r);if(n=o.that.__zoom,o.touch1){var l=o.touch0[0],h=o.touch0[1],f=o.touch1[0],d=o.touch1[1],y=(y=f[0]-l[0])*y+(y=f[1]-l[1])*y,v=(v=d[0]-h[0])*v+(v=d[1]-h[1])*v;n=p(n,Math.sqrt(y/v)),r=[(l[0]+f[0])/2,(l[1]+f[1])/2],a=[(h[0]+d[0])/2,(h[1]+d[1])/2]}else{if(!o.touch0)return;r=o.touch0[0],a=o.touch0[1]}o.zoom("touch",i(g(n,r,a),o.extent,c))}}function T(){if(this.__zooming){var t,n,r=m(this,arguments),i=ce.changedTouches,a=i.length;for(bw(),e&&clearTimeout(e),e=setTimeout((function(){e=null}),500),t=0;t<a;++t)n=i[t],r.touch0&&r.touch0[2]===n.identifier?delete r.touch0:r.touch1&&r.touch1[2]===n.identifier&&delete r.touch1;if(r.touch1&&!r.touch0&&(r.touch0=r.touch1,delete r.touch1),r.touch0)r.touch0[1]=this.__zoom.invert(r.touch0[0]);else if(r.end(),2===r.taps){var o=ke(this).on("dblclick.zoom");o&&o.apply(this,arguments)}}}return d.transform=function(t,e,n){var r=t.selection?t.selection():t;r.property("__zoom",ww),t!==r?v(t,e,n):r.interrupt().each((function(){m(this,arguments).start().zoom(null,"function"==typeof e?e.apply(this,arguments):e).end()}))},d.scaleBy=function(t,e,n){d.scaleTo(t,(function(){var t=this.__zoom.k,n="function"==typeof e?e.apply(this,arguments):e;return t*n}),n)},d.scaleTo=function(t,e,n){d.transform(t,(function(){var t=r.apply(this,arguments),a=this.__zoom,o=null==n?y(t):"function"==typeof n?n.apply(this,arguments):n,s=a.invert(o),u="function"==typeof e?e.apply(this,arguments):e;return i(g(p(a,u),o,s),t,c)}),n)},d.translateBy=function(t,e,n){d.transform(t,(function(){return i(this.__zoom.translate("function"==typeof e?e.apply(this,arguments):e,"function"==typeof n?n.apply(this,arguments):n),r.apply(this,arguments),c)}))},d.translateTo=function(t,e,n,a){d.transform(t,(function(){var t=r.apply(this,arguments),o=this.__zoom,s=null==a?y(t):"function"==typeof a?a.apply(this,arguments):a;return i(vw.translate(s[0],s[1]).scale(o.k).translate("function"==typeof e?-e.apply(this,arguments):-e,"function"==typeof n?-n.apply(this,arguments):-n),t,c)}),a)},b.prototype={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){pe(new gw(d,t,this.that.__zoom),h.apply,h,[t,this.that,this.args])}},d.wheelDelta=function(t){return arguments.length?(a="function"==typeof t?t:pw(+t),d):a},d.filter=function(t){return arguments.length?(n="function"==typeof t?t:pw(!!t),d):n},d.touchable=function(t){return arguments.length?(o="function"==typeof t?t:pw(!!t),d):o},d.extent=function(t){return arguments.length?(r="function"==typeof t?t:pw([[+t[0][0],+t[0][1]],[+t[1][0],+t[1][1]]]),d):r},d.scaleExtent=function(t){return arguments.length?(s[0]=+t[0],s[1]=+t[1],d):[s[0],s[1]]},d.translateExtent=function(t){return arguments.length?(c[0][0]=+t[0][0],c[1][0]=+t[1][0],c[0][1]=+t[0][1],c[1][1]=+t[1][1],d):[[c[0][0],c[0][1]],[c[1][0],c[1][1]]]},d.constrain=function(t){return arguments.length?(i=t,d):i},d.duration=function(t){return arguments.length?(u=+t,d):u},d.interpolate=function(t){return arguments.length?(l=t,d):l},d.on=function(){var t=h.on.apply(h,arguments);return t===h?d:t},d.clickDistance=function(t){return arguments.length?(f=(t=+t)*t,d):Math.sqrt(f)},d};n.d(e,"version",(function(){return"5.15.0"})),n.d(e,"bisect",(function(){return c})),n.d(e,"bisectRight",(function(){return o})),n.d(e,"bisectLeft",(function(){return s})),n.d(e,"ascending",(function(){return r})),n.d(e,"bisector",(function(){return i})),n.d(e,"cross",(function(){return h})),n.d(e,"descending",(function(){return f})),n.d(e,"deviation",(function(){return g})),n.d(e,"extent",(function(){return y})),n.d(e,"histogram",(function(){return O})),n.d(e,"thresholdFreedmanDiaconis",(function(){return N})),n.d(e,"thresholdScott",(function(){return B})),n.d(e,"thresholdSturges",(function(){return M})),n.d(e,"max",(function(){return L})),n.d(e,"mean",(function(){return F})),n.d(e,"median",(function(){return P})),n.d(e,"merge",(function(){return I})),n.d(e,"min",(function(){return j})),n.d(e,"pairs",(function(){return u})),n.d(e,"permute",(function(){return R})),n.d(e,"quantile",(function(){return D})),n.d(e,"range",(function(){return k})),n.d(e,"scan",(function(){return Y})),n.d(e,"shuffle",(function(){return z})),n.d(e,"sum",(function(){return U})),n.d(e,"ticks",(function(){return C})),n.d(e,"tickIncrement",(function(){return A})),n.d(e,"tickStep",(function(){return S})),n.d(e,"transpose",(function(){return $})),n.d(e,"variance",(function(){return p})),n.d(e,"zip",(function(){return V})),n.d(e,"axisTop",(function(){return tt})),n.d(e,"axisRight",(function(){return et})),n.d(e,"axisBottom",(function(){return nt})),n.d(e,"axisLeft",(function(){return rt})),n.d(e,"brush",(function(){return Ti})),n.d(e,"brushX",(function(){return wi})),n.d(e,"brushY",(function(){return Ei})),n.d(e,"brushSelection",(function(){return ki})),n.d(e,"chord",(function(){return Li})),n.d(e,"ribbon",(function(){return qi})),n.d(e,"nest",(function(){return Qi})),n.d(e,"set",(function(){return oa})),n.d(e,"map",(function(){return Ji})),n.d(e,"keys",(function(){return sa})),n.d(e,"values",(function(){return ca})),n.d(e,"entries",(function(){return ua})),n.d(e,"color",(function(){return $e})),n.d(e,"rgb",(function(){return Ge})),n.d(e,"hsl",(function(){return tn})),n.d(e,"lab",(function(){return pa})),n.d(e,"hcl",(function(){return ka})),n.d(e,"lch",(function(){return _a})),n.d(e,"gray",(function(){return da})),n.d(e,"cubehelix",(function(){return Oa})),n.d(e,"contours",(function(){return Ya})),n.d(e,"contourDensity",(function(){return Ha})),n.d(e,"dispatch",(function(){return lt})),n.d(e,"drag",(function(){return Ka})),n.d(e,"dragDisable",(function(){return Te})),n.d(e,"dragEnable",(function(){return Ce})),n.d(e,"dsvFormat",(function(){return oo})),n.d(e,"csvParse",(function(){return co})),n.d(e,"csvParseRows",(function(){return uo})),n.d(e,"csvFormat",(function(){return lo})),n.d(e,"csvFormatBody",(function(){return ho})),n.d(e,"csvFormatRows",(function(){return fo})),n.d(e,"csvFormatRow",(function(){return po})),n.d(e,"csvFormatValue",(function(){return go})),n.d(e,"tsvParse",(function(){return vo})),n.d(e,"tsvParseRows",(function(){return mo})),n.d(e,"tsvFormat",(function(){return bo})),n.d(e,"tsvFormatBody",(function(){return xo})),n.d(e,"tsvFormatRows",(function(){return _o})),n.d(e,"tsvFormatRow",(function(){return ko})),n.d(e,"tsvFormatValue",(function(){return wo})),n.d(e,"autoType",(function(){return Eo})),n.d(e,"easeLinear",(function(){return Co})),n.d(e,"easeQuad",(function(){return Mo})),n.d(e,"easeQuadIn",(function(){return Ao})),n.d(e,"easeQuadOut",(function(){return So})),n.d(e,"easeQuadInOut",(function(){return Mo})),n.d(e,"easeCubic",(function(){return Hr})),n.d(e,"easeCubicIn",(function(){return Wr})),n.d(e,"easeCubicOut",(function(){return Vr})),n.d(e,"easeCubicInOut",(function(){return Hr})),n.d(e,"easePoly",(function(){return No})),n.d(e,"easePolyIn",(function(){return Oo})),n.d(e,"easePolyOut",(function(){return Do})),n.d(e,"easePolyInOut",(function(){return No})),n.d(e,"easeSin",(function(){return Io})),n.d(e,"easeSinIn",(function(){return Fo})),n.d(e,"easeSinOut",(function(){return Po})),n.d(e,"easeSinInOut",(function(){return Io})),n.d(e,"easeExp",(function(){return Yo})),n.d(e,"easeExpIn",(function(){return jo})),n.d(e,"easeExpOut",(function(){return Ro})),n.d(e,"easeExpInOut",(function(){return Yo})),n.d(e,"easeCircle",(function(){return $o})),n.d(e,"easeCircleIn",(function(){return zo})),n.d(e,"easeCircleOut",(function(){return Uo})),n.d(e,"easeCircleInOut",(function(){return $o})),n.d(e,"easeBounce",(function(){return Vo})),n.d(e,"easeBounceIn",(function(){return Wo})),n.d(e,"easeBounceOut",(function(){return Vo})),n.d(e,"easeBounceInOut",(function(){return Ho})),n.d(e,"easeBack",(function(){return Xo})),n.d(e,"easeBackIn",(function(){return Go})),n.d(e,"easeBackOut",(function(){return qo})),n.d(e,"easeBackInOut",(function(){return Xo})),n.d(e,"easeElastic",(function(){return Qo})),n.d(e,"easeElasticIn",(function(){return Jo})),n.d(e,"easeElasticOut",(function(){return Qo})),n.d(e,"easeElasticInOut",(function(){return Ko})),n.d(e,"blob",(function(){return es})),n.d(e,"buffer",(function(){return rs})),n.d(e,"dsv",(function(){return ss})),n.d(e,"csv",(function(){return cs})),n.d(e,"tsv",(function(){return us})),n.d(e,"image",(function(){return ls})),n.d(e,"json",(function(){return fs})),n.d(e,"text",(function(){return as})),n.d(e,"xml",(function(){return ps})),n.d(e,"html",(function(){return gs})),n.d(e,"svg",(function(){return ys})),n.d(e,"forceCenter",(function(){return vs})),n.d(e,"forceCollide",(function(){return Os})),n.d(e,"forceLink",(function(){return Bs})),n.d(e,"forceManyBody",(function(){return js})),n.d(e,"forceRadial",(function(){return Rs})),n.d(e,"forceSimulation",(function(){return Is})),n.d(e,"forceX",(function(){return Ys})),n.d(e,"forceY",(function(){return zs})),n.d(e,"formatDefaultLocale",(function(){return rc})),n.d(e,"format",(function(){return Xs})),n.d(e,"formatPrefix",(function(){return Zs})),n.d(e,"formatLocale",(function(){return nc})),n.d(e,"formatSpecifier",(function(){return Vs})),n.d(e,"FormatSpecifier",(function(){return Hs})),n.d(e,"precisionFixed",(function(){return ic})),n.d(e,"precisionPrefix",(function(){return ac})),n.d(e,"precisionRound",(function(){return oc})),n.d(e,"geoArea",(function(){return Jc})),n.d(e,"geoBounds",(function(){return $u})),n.d(e,"geoCentroid",(function(){return el})),n.d(e,"geoCircle",(function(){return fl})),n.d(e,"geoClipAntimeridian",(function(){return El})),n.d(e,"geoClipCircle",(function(){return Tl})),n.d(e,"geoClipExtent",(function(){return Ol})),n.d(e,"geoClipRectangle",(function(){return Cl})),n.d(e,"geoContains",(function(){return ql})),n.d(e,"geoDistance",(function(){return Rl})),n.d(e,"geoGraticule",(function(){return Jl})),n.d(e,"geoGraticule10",(function(){return Ql})),n.d(e,"geoInterpolate",(function(){return rh})),n.d(e,"geoLength",(function(){return Pl})),n.d(e,"geoPath",(function(){return ef})),n.d(e,"geoAlbers",(function(){return _f})),n.d(e,"geoAlbersUsa",(function(){return kf})),n.d(e,"geoAzimuthalEqualArea",(function(){return Cf})),n.d(e,"geoAzimuthalEqualAreaRaw",(function(){return Tf})),n.d(e,"geoAzimuthalEquidistant",(function(){return Sf})),n.d(e,"geoAzimuthalEquidistantRaw",(function(){return Af})),n.d(e,"geoConicConformal",(function(){return Lf})),n.d(e,"geoConicConformalRaw",(function(){return Bf})),n.d(e,"geoConicEqualArea",(function(){return xf})),n.d(e,"geoConicEqualAreaRaw",(function(){return bf})),n.d(e,"geoConicEquidistant",(function(){return jf})),n.d(e,"geoConicEquidistantRaw",(function(){return If})),n.d(e,"geoEqualEarth",(function(){return Vf})),n.d(e,"geoEqualEarthRaw",(function(){return Wf})),n.d(e,"geoEquirectangular",(function(){return Pf})),n.d(e,"geoEquirectangularRaw",(function(){return Ff})),n.d(e,"geoGnomonic",(function(){return Gf})),n.d(e,"geoGnomonicRaw",(function(){return Hf})),n.d(e,"geoIdentity",(function(){return Xf})),n.d(e,"geoProjection",(function(){return yf})),n.d(e,"geoProjectionMutator",(function(){return vf})),n.d(e,"geoMercator",(function(){return Of})),n.d(e,"geoMercatorRaw",(function(){return Mf})),n.d(e,"geoNaturalEarth1",(function(){return Jf})),n.d(e,"geoNaturalEarth1Raw",(function(){return Zf})),n.d(e,"geoOrthographic",(function(){return Kf})),n.d(e,"geoOrthographicRaw",(function(){return Qf})),n.d(e,"geoStereographic",(function(){return ed})),n.d(e,"geoStereographicRaw",(function(){return td})),n.d(e,"geoTransverseMercator",(function(){return rd})),n.d(e,"geoTransverseMercatorRaw",(function(){return nd})),n.d(e,"geoRotation",(function(){return ul})),n.d(e,"geoStream",(function(){return $c})),n.d(e,"geoTransform",(function(){return nf})),n.d(e,"cluster",(function(){return sd})),n.d(e,"hierarchy",(function(){return ud})),n.d(e,"pack",(function(){return Ld})),n.d(e,"packSiblings",(function(){return Sd})),n.d(e,"packEnclose",(function(){return gd})),n.d(e,"partition",(function(){return Yd})),n.d(e,"stratify",(function(){return Vd})),n.d(e,"tree",(function(){return Qd})),n.d(e,"treemap",(function(){return rp})),n.d(e,"treemapBinary",(function(){return ip})),n.d(e,"treemapDice",(function(){return Rd})),n.d(e,"treemapSlice",(function(){return Kd})),n.d(e,"treemapSliceDice",(function(){return ap})),n.d(e,"treemapSquarify",(function(){return np})),n.d(e,"treemapResquarify",(function(){return op})),n.d(e,"interpolate",(function(){return Sn})),n.d(e,"interpolateArray",(function(){return mn})),n.d(e,"interpolateBasis",(function(){return an})),n.d(e,"interpolateBasisClosed",(function(){return on})),n.d(e,"interpolateDate",(function(){return xn})),n.d(e,"interpolateDiscrete",(function(){return sp})),n.d(e,"interpolateHue",(function(){return cp})),n.d(e,"interpolateNumber",(function(){return _n})),n.d(e,"interpolateNumberArray",(function(){return yn})),n.d(e,"interpolateObject",(function(){return kn})),n.d(e,"interpolateRound",(function(){return up})),n.d(e,"interpolateString",(function(){return An})),n.d(e,"interpolateTransformCss",(function(){return hr})),n.d(e,"interpolateTransformSvg",(function(){return fr})),n.d(e,"interpolateZoom",(function(){return fp})),n.d(e,"interpolateRgb",(function(){return fn})),n.d(e,"interpolateRgbBasis",(function(){return pn})),n.d(e,"interpolateRgbBasisClosed",(function(){return gn})),n.d(e,"interpolateHsl",(function(){return pp})),n.d(e,"interpolateHslLong",(function(){return gp})),n.d(e,"interpolateLab",(function(){return yp})),n.d(e,"interpolateHcl",(function(){return mp})),n.d(e,"interpolateHclLong",(function(){return bp})),n.d(e,"interpolateCubehelix",(function(){return _p})),n.d(e,"interpolateCubehelixLong",(function(){return kp})),n.d(e,"piecewise",(function(){return wp})),n.d(e,"quantize",(function(){return Ep})),n.d(e,"path",(function(){return Ui})),n.d(e,"polygonArea",(function(){return Tp})),n.d(e,"polygonCentroid",(function(){return Cp})),n.d(e,"polygonHull",(function(){return Mp})),n.d(e,"polygonContains",(function(){return Op})),n.d(e,"polygonLength",(function(){return Dp})),n.d(e,"quadtree",(function(){return Es})),n.d(e,"randomUniform",(function(){return Bp})),n.d(e,"randomNormal",(function(){return Lp})),n.d(e,"randomLogNormal",(function(){return Fp})),n.d(e,"randomBates",(function(){return Ip})),n.d(e,"randomIrwinHall",(function(){return Pp})),n.d(e,"randomExponential",(function(){return jp})),n.d(e,"scaleBand",(function(){return Hp})),n.d(e,"scalePoint",(function(){return qp})),n.d(e,"scaleIdentity",(function(){return cg})),n.d(e,"scaleLinear",(function(){return sg})),n.d(e,"scaleLog",(function(){return vg})),n.d(e,"scaleSymlog",(function(){return _g})),n.d(e,"scaleOrdinal",(function(){return Vp})),n.d(e,"scaleImplicit",(function(){return Wp})),n.d(e,"scalePow",(function(){return Cg})),n.d(e,"scaleSqrt",(function(){return Ag})),n.d(e,"scaleQuantile",(function(){return Sg})),n.d(e,"scaleQuantize",(function(){return Mg})),n.d(e,"scaleThreshold",(function(){return Og})),n.d(e,"scaleTime",(function(){return sm})),n.d(e,"scaleUtc",(function(){return vm})),n.d(e,"scaleSequential",(function(){return xm})),n.d(e,"scaleSequentialLog",(function(){return _m})),n.d(e,"scaleSequentialPow",(function(){return wm})),n.d(e,"scaleSequentialSqrt",(function(){return Em})),n.d(e,"scaleSequentialSymlog",(function(){return km})),n.d(e,"scaleSequentialQuantile",(function(){return Tm})),n.d(e,"scaleDiverging",(function(){return Am})),n.d(e,"scaleDivergingLog",(function(){return Sm})),n.d(e,"scaleDivergingPow",(function(){return Om})),n.d(e,"scaleDivergingSqrt",(function(){return Dm})),n.d(e,"scaleDivergingSymlog",(function(){return Mm})),n.d(e,"tickFormat",(function(){return ag})),n.d(e,"schemeCategory10",(function(){return Bm})),n.d(e,"schemeAccent",(function(){return Lm})),n.d(e,"schemeDark2",(function(){return Fm})),n.d(e,"schemePaired",(function(){return Pm})),n.d(e,"schemePastel1",(function(){return Im})),n.d(e,"schemePastel2",(function(){return jm})),n.d(e,"schemeSet1",(function(){return Rm})),n.d(e,"schemeSet2",(function(){return Ym})),n.d(e,"schemeSet3",(function(){return zm})),n.d(e,"schemeTableau10",(function(){return Um})),n.d(e,"interpolateBrBG",(function(){return Vm})),n.d(e,"schemeBrBG",(function(){return Wm})),n.d(e,"interpolatePRGn",(function(){return Gm})),n.d(e,"schemePRGn",(function(){return Hm})),n.d(e,"interpolatePiYG",(function(){return Xm})),n.d(e,"schemePiYG",(function(){return qm})),n.d(e,"interpolatePuOr",(function(){return Jm})),n.d(e,"schemePuOr",(function(){return Zm})),n.d(e,"interpolateRdBu",(function(){return Km})),n.d(e,"schemeRdBu",(function(){return Qm})),n.d(e,"interpolateRdGy",(function(){return eb})),n.d(e,"schemeRdGy",(function(){return tb})),n.d(e,"interpolateRdYlBu",(function(){return rb})),n.d(e,"schemeRdYlBu",(function(){return nb})),n.d(e,"interpolateRdYlGn",(function(){return ab})),n.d(e,"schemeRdYlGn",(function(){return ib})),n.d(e,"interpolateSpectral",(function(){return sb})),n.d(e,"schemeSpectral",(function(){return ob})),n.d(e,"interpolateBuGn",(function(){return ub})),n.d(e,"schemeBuGn",(function(){return cb})),n.d(e,"interpolateBuPu",(function(){return hb})),n.d(e,"schemeBuPu",(function(){return lb})),n.d(e,"interpolateGnBu",(function(){return db})),n.d(e,"schemeGnBu",(function(){return fb})),n.d(e,"interpolateOrRd",(function(){return gb})),n.d(e,"schemeOrRd",(function(){return pb})),n.d(e,"interpolatePuBuGn",(function(){return vb})),n.d(e,"schemePuBuGn",(function(){return yb})),n.d(e,"interpolatePuBu",(function(){return bb})),n.d(e,"schemePuBu",(function(){return mb})),n.d(e,"interpolatePuRd",(function(){return _b})),n.d(e,"schemePuRd",(function(){return xb})),n.d(e,"interpolateRdPu",(function(){return wb})),n.d(e,"schemeRdPu",(function(){return kb})),n.d(e,"interpolateYlGnBu",(function(){return Tb})),n.d(e,"schemeYlGnBu",(function(){return Eb})),n.d(e,"interpolateYlGn",(function(){return Ab})),n.d(e,"schemeYlGn",(function(){return Cb})),n.d(e,"interpolateYlOrBr",(function(){return Mb})),n.d(e,"schemeYlOrBr",(function(){return Sb})),n.d(e,"interpolateYlOrRd",(function(){return Db})),n.d(e,"schemeYlOrRd",(function(){return Ob})),n.d(e,"interpolateBlues",(function(){return Bb})),n.d(e,"schemeBlues",(function(){return Nb})),n.d(e,"interpolateGreens",(function(){return Fb})),n.d(e,"schemeGreens",(function(){return Lb})),n.d(e,"interpolateGreys",(function(){return Ib})),n.d(e,"schemeGreys",(function(){return Pb})),n.d(e,"interpolatePurples",(function(){return Rb})),n.d(e,"schemePurples",(function(){return jb})),n.d(e,"interpolateReds",(function(){return zb})),n.d(e,"schemeReds",(function(){return Yb})),n.d(e,"interpolateOranges",(function(){return $b})),n.d(e,"schemeOranges",(function(){return Ub})),n.d(e,"interpolateCividis",(function(){return Wb})),n.d(e,"interpolateCubehelixDefault",(function(){return Vb})),n.d(e,"interpolateRainbow",(function(){return Xb})),n.d(e,"interpolateWarm",(function(){return Hb})),n.d(e,"interpolateCool",(function(){return Gb})),n.d(e,"interpolateSinebow",(function(){return Kb})),n.d(e,"interpolateTurbo",(function(){return tx})),n.d(e,"interpolateViridis",(function(){return nx})),n.d(e,"interpolateMagma",(function(){return rx})),n.d(e,"interpolateInferno",(function(){return ix})),n.d(e,"interpolatePlasma",(function(){return ax})),n.d(e,"create",(function(){return ox})),n.d(e,"creator",(function(){return ne})),n.d(e,"local",(function(){return cx})),n.d(e,"matcher",(function(){return gt})),n.d(e,"mouse",(function(){return Nn})),n.d(e,"namespace",(function(){return wt})),n.d(e,"namespaces",(function(){return kt})),n.d(e,"clientPoint",(function(){return On})),n.d(e,"select",(function(){return ke})),n.d(e,"selectAll",(function(){return lx})),n.d(e,"selection",(function(){return _e})),n.d(e,"selector",(function(){return ft})),n.d(e,"selectorAll",(function(){return pt})),n.d(e,"style",(function(){return Lt})),n.d(e,"touch",(function(){return Dn})),n.d(e,"touches",(function(){return hx})),n.d(e,"window",(function(){return Ot})),n.d(e,"event",(function(){return ce})),n.d(e,"customEvent",(function(){return pe})),n.d(e,"arc",(function(){return Nx})),n.d(e,"area",(function(){return jx})),n.d(e,"line",(function(){return Ix})),n.d(e,"pie",(function(){return zx})),n.d(e,"areaRadial",(function(){return Gx})),n.d(e,"radialArea",(function(){return Gx})),n.d(e,"lineRadial",(function(){return Hx})),n.d(e,"radialLine",(function(){return Hx})),n.d(e,"pointRadial",(function(){return qx})),n.d(e,"linkHorizontal",(function(){return n_})),n.d(e,"linkVertical",(function(){return r_})),n.d(e,"linkRadial",(function(){return i_})),n.d(e,"symbol",(function(){return k_})),n.d(e,"symbols",(function(){return __})),n.d(e,"symbolCircle",(function(){return a_})),n.d(e,"symbolCross",(function(){return o_})),n.d(e,"symbolDiamond",(function(){return u_})),n.d(e,"symbolSquare",(function(){return p_})),n.d(e,"symbolStar",(function(){return d_})),n.d(e,"symbolTriangle",(function(){return y_})),n.d(e,"symbolWye",(function(){return x_})),n.d(e,"curveBasisClosed",(function(){return S_})),n.d(e,"curveBasisOpen",(function(){return O_})),n.d(e,"curveBasis",(function(){return C_})),n.d(e,"curveBundle",(function(){return N_})),n.d(e,"curveCardinalClosed",(function(){return I_})),n.d(e,"curveCardinalOpen",(function(){return R_})),n.d(e,"curveCardinal",(function(){return F_})),n.d(e,"curveCatmullRomClosed",(function(){return W_})),n.d(e,"curveCatmullRomOpen",(function(){return H_})),n.d(e,"curveCatmullRom",(function(){return U_})),n.d(e,"curveLinearClosed",(function(){return q_})),n.d(e,"curveLinear",(function(){return Lx})),n.d(e,"curveMonotoneX",(function(){return nk})),n.d(e,"curveMonotoneY",(function(){return rk})),n.d(e,"curveNatural",(function(){return ok})),n.d(e,"curveStep",(function(){return ck})),n.d(e,"curveStepAfter",(function(){return lk})),n.d(e,"curveStepBefore",(function(){return uk})),n.d(e,"stack",(function(){return pk})),n.d(e,"stackOffsetExpand",(function(){return gk})),n.d(e,"stackOffsetDiverging",(function(){return yk})),n.d(e,"stackOffsetNone",(function(){return hk})),n.d(e,"stackOffsetSilhouette",(function(){return vk})),n.d(e,"stackOffsetWiggle",(function(){return mk})),n.d(e,"stackOrderAppearance",(function(){return bk})),n.d(e,"stackOrderAscending",(function(){return _k})),n.d(e,"stackOrderDescending",(function(){return wk})),n.d(e,"stackOrderInsideOut",(function(){return Ek})),n.d(e,"stackOrderNone",(function(){return fk})),n.d(e,"stackOrderReverse",(function(){return Tk})),n.d(e,"timeInterval",(function(){return Bg})),n.d(e,"timeMillisecond",(function(){return py})),n.d(e,"timeMilliseconds",(function(){return gy})),n.d(e,"utcMillisecond",(function(){return py})),n.d(e,"utcMilliseconds",(function(){return gy})),n.d(e,"timeSecond",(function(){return hy})),n.d(e,"timeSeconds",(function(){return fy})),n.d(e,"utcSecond",(function(){return hy})),n.d(e,"utcSeconds",(function(){return fy})),n.d(e,"timeMinute",(function(){return cy})),n.d(e,"timeMinutes",(function(){return uy})),n.d(e,"timeHour",(function(){return ay})),n.d(e,"timeHours",(function(){return oy})),n.d(e,"timeDay",(function(){return ny})),n.d(e,"timeDays",(function(){return ry})),n.d(e,"timeWeek",(function(){return zg})),n.d(e,"timeWeeks",(function(){return qg})),n.d(e,"timeSunday",(function(){return zg})),n.d(e,"timeSundays",(function(){return qg})),n.d(e,"timeMonday",(function(){return Ug})),n.d(e,"timeMondays",(function(){return Xg})),n.d(e,"timeTuesday",(function(){return $g})),n.d(e,"timeTuesdays",(function(){return Zg})),n.d(e,"timeWednesday",(function(){return Wg})),n.d(e,"timeWednesdays",(function(){return Jg})),n.d(e,"timeThursday",(function(){return Vg})),n.d(e,"timeThursdays",(function(){return Qg})),n.d(e,"timeFriday",(function(){return Hg})),n.d(e,"timeFridays",(function(){return Kg})),n.d(e,"timeSaturday",(function(){return Gg})),n.d(e,"timeSaturdays",(function(){return ty})),n.d(e,"timeMonth",(function(){return jg})),n.d(e,"timeMonths",(function(){return Rg})),n.d(e,"timeYear",(function(){return Fg})),n.d(e,"timeYears",(function(){return Pg})),n.d(e,"utcMinute",(function(){return gm})),n.d(e,"utcMinutes",(function(){return ym})),n.d(e,"utcHour",(function(){return fm})),n.d(e,"utcHours",(function(){return dm})),n.d(e,"utcDay",(function(){return Ny})),n.d(e,"utcDays",(function(){return By})),n.d(e,"utcWeek",(function(){return vy})),n.d(e,"utcWeeks",(function(){return Ey})),n.d(e,"utcSunday",(function(){return vy})),n.d(e,"utcSundays",(function(){return Ey})),n.d(e,"utcMonday",(function(){return my})),n.d(e,"utcMondays",(function(){return Ty})),n.d(e,"utcTuesday",(function(){return by})),n.d(e,"utcTuesdays",(function(){return Cy})),n.d(e,"utcWednesday",(function(){return xy})),n.d(e,"utcWednesdays",(function(){return Ay})),n.d(e,"utcThursday",(function(){return _y})),n.d(e,"utcThursdays",(function(){return Sy})),n.d(e,"utcFriday",(function(){return ky})),n.d(e,"utcFridays",(function(){return My})),n.d(e,"utcSaturday",(function(){return wy})),n.d(e,"utcSaturdays",(function(){return Oy})),n.d(e,"utcMonth",(function(){return um})),n.d(e,"utcMonths",(function(){return lm})),n.d(e,"utcYear",(function(){return Fy})),n.d(e,"utcYears",(function(){return Py})),n.d(e,"timeFormatDefaultLocale",(function(){return rm})),n.d(e,"timeFormat",(function(){return Uy})),n.d(e,"timeParse",(function(){return $y})),n.d(e,"utcFormat",(function(){return Wy})),n.d(e,"utcParse",(function(){return Vy})),n.d(e,"timeFormatLocale",(function(){return Yy})),n.d(e,"isoFormat",(function(){return Ck})),n.d(e,"isoParse",(function(){return Ak})),n.d(e,"now",(function(){return zn})),n.d(e,"timer",(function(){return Wn})),n.d(e,"timerFlush",(function(){return Vn})),n.d(e,"timeout",(function(){return Xn})),n.d(e,"interval",(function(){return Sk})),n.d(e,"transition",(function(){return zr})),n.d(e,"active",(function(){return Zr})),n.d(e,"interrupt",(function(){return or})),n.d(e,"voronoi",(function(){return dw})),n.d(e,"zoom",(function(){return Aw})),n.d(e,"zoomTransform",(function(){return mw})),n.d(e,"zoomIdentity",(function(){return vw}))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),function(t){for(var n in t)e.hasOwnProperty(n)||(e[n]=t[n])}(n(172))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,3],r=[1,5],i=[1,7],a=[2,5],o=[1,15],s=[1,17],c=[1,18],u=[1,20],l=[1,21],h=[1,22],f=[1,24],d=[1,25],p=[1,26],g=[1,27],y=[1,28],v=[1,29],m=[1,32],b=[1,33],x=[1,36],_=[1,4,5,16,21,22,23,25,27,28,29,30,31,33,35,36,37,48,56],k=[1,44],w=[4,5,16,21,22,23,25,27,28,29,30,31,33,37,48,56],E=[4,5,16,21,22,23,25,27,28,29,30,31,33,36,37,48,56],T=[4,5,16,21,22,23,25,27,28,29,30,31,33,35,37,48,56],C=[46,47,48],A=[1,4,5,7,16,21,22,23,25,27,28,29,30,31,33,35,36,37,48,56],S={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,openDirective:11,typeDirective:12,closeDirective:13,":":14,argDirective:15,participant:16,actor:17,AS:18,restOfLine:19,signal:20,autonumber:21,activate:22,deactivate:23,note_statement:24,title:25,text2:26,loop:27,end:28,rect:29,opt:30,alt:31,else_sections:32,par:33,par_sections:34,and:35,else:36,note:37,placement:38,over:39,actor_pair:40,spaceList:41,",":42,left_of:43,right_of:44,signaltype:45,"+":46,"-":47,ACTOR:48,SOLID_OPEN_ARROW:49,DOTTED_OPEN_ARROW:50,SOLID_ARROW:51,DOTTED_ARROW:52,SOLID_CROSS:53,DOTTED_CROSS:54,TXT:55,open_directive:56,type_directive:57,arg_directive:58,close_directive:59,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",14:":",16:"participant",18:"AS",19:"restOfLine",21:"autonumber",22:"activate",23:"deactivate",25:"title",27:"loop",28:"end",29:"rect",30:"opt",31:"alt",33:"par",35:"and",36:"else",37:"note",39:"over",42:",",43:"left_of",44:"right_of",46:"+",47:"-",48:"ACTOR",49:"SOLID_OPEN_ARROW",50:"DOTTED_OPEN_ARROW",51:"SOLID_ARROW",52:"DOTTED_ARROW",53:"SOLID_CROSS",54:"DOTTED_CROSS",55:"TXT",56:"open_directive",57:"type_directive",58:"arg_directive",59:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[6,4],[6,6],[10,5],[10,3],[10,2],[10,1],[10,3],[10,3],[10,2],[10,3],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[34,1],[34,4],[32,1],[32,4],[24,4],[24,4],[41,2],[41,1],[40,3],[40,1],[38,1],[38,1],[20,5],[20,5],[20,4],[17,1],[45,1],[45,1],[45,1],[45,1],[45,1],[45,1],[26,1],[11,1],[12,1],[15,1],[13,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:return r.apply(a[s]),a[s];case 5:this.$=[];break;case 6:a[s-1].push(a[s]),this.$=a[s-1];break;case 7:case 8:this.$=a[s];break;case 9:this.$=[];break;case 12:a[s-3].description=r.parseMessage(a[s-1]),this.$=a[s-3];break;case 13:this.$=a[s-1];break;case 15:r.enableSequenceNumbers();break;case 16:this.$={type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1]};break;case 17:this.$={type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:a[s-1]};break;case 19:this.$=[{type:"setTitle",text:a[s-1]}];break;case 20:a[s-1].unshift({type:"loopStart",loopText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.LOOP_START}),a[s-1].push({type:"loopEnd",loopText:a[s-2],signalType:r.LINETYPE.LOOP_END}),this.$=a[s-1];break;case 21:a[s-1].unshift({type:"rectStart",color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_START}),a[s-1].push({type:"rectEnd",color:r.parseMessage(a[s-2]),signalType:r.LINETYPE.RECT_END}),this.$=a[s-1];break;case 22:a[s-1].unshift({type:"optStart",optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_START}),a[s-1].push({type:"optEnd",optText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.OPT_END}),this.$=a[s-1];break;case 23:a[s-1].unshift({type:"altStart",altText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.ALT_START}),a[s-1].push({type:"altEnd",signalType:r.LINETYPE.ALT_END}),this.$=a[s-1];break;case 24:a[s-1].unshift({type:"parStart",parText:r.parseMessage(a[s-2]),signalType:r.LINETYPE.PAR_START}),a[s-1].push({type:"parEnd",signalType:r.LINETYPE.PAR_END}),this.$=a[s-1];break;case 27:this.$=a[s-3].concat([{type:"and",parText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.PAR_AND},a[s]]);break;case 29:this.$=a[s-3].concat([{type:"else",altText:r.parseMessage(a[s-1]),signalType:r.LINETYPE.ALT_ELSE},a[s]]);break;case 30:this.$=[a[s-1],{type:"addNote",placement:a[s-2],actor:a[s-1].actor,text:a[s]}];break;case 31:a[s-2]=[].concat(a[s-1],a[s-1]).slice(0,2),a[s-2][0]=a[s-2][0].actor,a[s-2][1]=a[s-2][1].actor,this.$=[a[s-1],{type:"addNote",placement:r.PLACEMENT.OVER,actor:a[s-2].slice(0,2),text:a[s]}];break;case 34:this.$=[a[s-2],a[s]];break;case 35:this.$=a[s];break;case 36:this.$=r.PLACEMENT.LEFTOF;break;case 37:this.$=r.PLACEMENT.RIGHTOF;break;case 38:this.$=[a[s-4],a[s-1],{type:"addMessage",from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:"activeStart",signalType:r.LINETYPE.ACTIVE_START,actor:a[s-1]}];break;case 39:this.$=[a[s-4],a[s-1],{type:"addMessage",from:a[s-4].actor,to:a[s-1].actor,signalType:a[s-3],msg:a[s]},{type:"activeEnd",signalType:r.LINETYPE.ACTIVE_END,actor:a[s-4]}];break;case 40:this.$=[a[s-3],a[s-1],{type:"addMessage",from:a[s-3].actor,to:a[s-1].actor,signalType:a[s-2],msg:a[s]}];break;case 41:this.$={type:"addActor",actor:a[s]};break;case 42:this.$=r.LINETYPE.SOLID_OPEN;break;case 43:this.$=r.LINETYPE.DOTTED_OPEN;break;case 44:this.$=r.LINETYPE.SOLID;break;case 45:this.$=r.LINETYPE.DOTTED;break;case 46:this.$=r.LINETYPE.SOLID_CROSS;break;case 47:this.$=r.LINETYPE.DOTTED_CROSS;break;case 48:this.$=r.parseMessage(a[s].trim().substring(1));break;case 49:r.parseDirective("%%{","open_directive");break;case 50:r.parseDirective(a[s],"type_directive");break;case 51:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 52:r.parseDirective("}%%","close_directive","sequence")}},table:[{3:1,4:e,5:n,6:4,7:r,11:6,56:i},{1:[3]},{3:8,4:e,5:n,6:4,7:r,11:6,56:i},{3:9,4:e,5:n,6:4,7:r,11:6,56:i},{3:10,4:e,5:n,6:4,7:r,11:6,56:i},t([1,4,5,16,21,22,23,25,27,29,30,31,33,37,48,56],a,{8:11}),{12:12,57:[1,13]},{57:[2,49]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:u,22:l,23:h,24:23,25:f,27:d,29:p,30:g,31:y,33:v,37:m,48:b,56:i},{13:34,14:[1,35],59:x},t([14,59],[2,50]),t(_,[2,6]),{6:30,10:37,11:6,16:c,17:31,20:19,21:u,22:l,23:h,24:23,25:f,27:d,29:p,30:g,31:y,33:v,37:m,48:b,56:i},t(_,[2,8]),t(_,[2,9]),{17:38,48:b},{5:[1,39]},t(_,[2,15]),{17:40,48:b},{17:41,48:b},{5:[1,42]},{26:43,55:k},{19:[1,45]},{19:[1,46]},{19:[1,47]},{19:[1,48]},{19:[1,49]},t(_,[2,25]),{45:50,49:[1,51],50:[1,52],51:[1,53],52:[1,54],53:[1,55],54:[1,56]},{38:57,39:[1,58],43:[1,59],44:[1,60]},t([5,18,42,49,50,51,52,53,54,55],[2,41]),{5:[1,61]},{15:62,58:[1,63]},{5:[2,52]},t(_,[2,7]),{5:[1,65],18:[1,64]},t(_,[2,14]),{5:[1,66]},{5:[1,67]},t(_,[2,18]),{5:[1,68]},{5:[2,48]},t(w,a,{8:69}),t(w,a,{8:70}),t(w,a,{8:71}),t(E,a,{32:72,8:73}),t(T,a,{34:74,8:75}),{17:78,46:[1,76],47:[1,77],48:b},t(C,[2,42]),t(C,[2,43]),t(C,[2,44]),t(C,[2,45]),t(C,[2,46]),t(C,[2,47]),{17:79,48:b},{17:81,40:80,48:b},{48:[2,36]},{48:[2,37]},t(A,[2,10]),{13:82,59:x},{59:[2,51]},{19:[1,83]},t(_,[2,13]),t(_,[2,16]),t(_,[2,17]),t(_,[2,19]),{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:u,22:l,23:h,24:23,25:f,27:d,28:[1,84],29:p,30:g,31:y,33:v,37:m,48:b,56:i},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:u,22:l,23:h,24:23,25:f,27:d,28:[1,85],29:p,30:g,31:y,33:v,37:m,48:b,56:i},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:u,22:l,23:h,24:23,25:f,27:d,28:[1,86],29:p,30:g,31:y,33:v,37:m,48:b,56:i},{28:[1,87]},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:u,22:l,23:h,24:23,25:f,27:d,28:[2,28],29:p,30:g,31:y,33:v,36:[1,88],37:m,48:b,56:i},{28:[1,89]},{4:o,5:s,6:30,9:14,10:16,11:6,16:c,17:31,20:19,21:u,22:l,23:h,24:23,25:f,27:d,28:[2,26],29:p,30:g,31:y,33:v,35:[1,90],37:m,48:b,56:i},{17:91,48:b},{17:92,48:b},{26:93,55:k},{26:94,55:k},{26:95,55:k},{42:[1,96],55:[2,35]},{5:[1,97]},{5:[1,98]},t(_,[2,20]),t(_,[2,21]),t(_,[2,22]),t(_,[2,23]),{19:[1,99]},t(_,[2,24]),{19:[1,100]},{26:101,55:k},{26:102,55:k},{5:[2,40]},{5:[2,30]},{5:[2,31]},{17:103,48:b},t(A,[2,11]),t(_,[2,12]),t(E,a,{8:73,32:104}),t(T,a,{8:75,34:105}),{5:[2,38]},{5:[2,39]},{55:[2,34]},{28:[2,29]},{28:[2,27]}],defaultActions:{7:[2,49],8:[2,1],9:[2,2],10:[2,3],36:[2,52],44:[2,48],59:[2,36],60:[2,37],63:[2,51],93:[2,40],94:[2,30],95:[2,31],101:[2,38],102:[2,39],103:[2,34],104:[2,29],105:[2,27]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,A,S,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in S=[],o[k])this.terminals_[T]&&T>h&&S.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:S})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,g.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0}},M={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),56;case 1:return this.begin("type_directive"),57;case 2:return this.popState(),this.begin("arg_directive"),14;case 3:return this.popState(),this.popState(),59;case 4:return 58;case 5:return 5;case 6:case 7:case 8:case 9:case 10:break;case 11:return this.begin("ID"),16;case 12:return e.yytext=e.yytext.trim(),this.begin("ALIAS"),48;case 13:return this.popState(),this.popState(),this.begin("LINE"),18;case 14:return this.popState(),this.popState(),5;case 15:return this.begin("LINE"),27;case 16:return this.begin("LINE"),29;case 17:return this.begin("LINE"),30;case 18:return this.begin("LINE"),31;case 19:return this.begin("LINE"),36;case 20:return this.begin("LINE"),33;case 21:return this.begin("LINE"),35;case 22:return this.popState(),19;case 23:return 28;case 24:return 43;case 25:return 44;case 26:return 39;case 27:return 37;case 28:return this.begin("ID"),22;case 29:return this.begin("ID"),23;case 30:return 25;case 31:return 7;case 32:return 21;case 33:return 42;case 34:return 5;case 35:return e.yytext=e.yytext.trim(),48;case 36:return 51;case 37:return 52;case 38:return 49;case 39:return 50;case 40:return 53;case 41:return 54;case 42:return 55;case 43:return 46;case 44:return 47;case 45:return 5;case 46:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:participant\b)/i,/^(?:[^\->:\n,;]+?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:and\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\b)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+((?!(-x|--x))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1,8],inclusive:!1},type_directive:{rules:[2,3,8],inclusive:!1},arg_directive:{rules:[3,4,8],inclusive:!1},ID:{rules:[7,8,12],inclusive:!1},ALIAS:{rules:[7,8,13,14],inclusive:!1},LINE:{rules:[7,8,22],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,15,16,17,18,19,20,21,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46],inclusive:!0}}};function O(){this.yy={}}return S.lexer=M,O.prototype=S,S.Parser=O,new O}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(19).readFileSync(n(20).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(14),n(7)(t))},function(t,e,n){var r=n(198);t.exports={Graph:r.Graph,json:n(301),alg:n(302),version:r.version}},function(t,e,n){var r;try{r={cloneDeep:n(313),constant:n(86),defaults:n(154),each:n(87),filter:n(128),find:n(314),flatten:n(156),forEach:n(126),forIn:n(319),has:n(93),isUndefined:n(139),last:n(320),map:n(140),mapValues:n(321),max:n(322),merge:n(324),min:n(329),minBy:n(330),now:n(331),pick:n(161),range:n(162),reduce:n(142),sortBy:n(338),uniqueId:n(163),values:n(147),zipObject:n(343)}}catch(t){}r||(r=window._),t.exports=r},function(t,e){var n=Array.isArray;t.exports=n},function(t,e,n){
-/**
+(function(jr,wn){typeof exports=="object"&&typeof module<"u"?module.exports=wn():typeof define=="function"&&define.amd?define(wn):(jr=typeof globalThis<"u"?globalThis:jr||self,jr.mermaid=wn())})(this,function(){"use strict";var Nst=Object.defineProperty;var Bst=(jr,wn,fn)=>wn in jr?Nst(jr,wn,{enumerable:!0,configurable:!0,writable:!0,value:fn}):jr[wn]=fn;var vl=(jr,wn,fn)=>(Bst(jr,typeof wn!="symbol"?wn+"":wn,fn),fn);var jr=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof global<"u"?global:typeof self<"u"?self:{};function wn(t){var e=t.default;if(typeof e=="function"){var r=function(){return e.apply(this,arguments)};r.prototype=e.prototype}else r={};return Object.defineProperty(r,"__esModule",{value:!0}),Object.keys(t).forEach(function(n){var i=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(r,n,i.get?i:{enumerable:!0,get:function(){return t[n]}})}),r}function fn(t){throw new Error('Could not dynamically require "'+t+'". Please configure the dynamicRequireTargets or/and ignoreDynamicRequires option of @rollup/plugin-commonjs appropriately for this require call to work.')}var b_={exports:{}};(function(t,e){(function(r,n){t.exports=n()})(jr,function(){var r;function n(){return r.apply(null,arguments)}function i(g){return g instanceof Array||Object.prototype.toString.call(g)==="[object Array]"}function a(g){return g!=null&&Object.prototype.toString.call(g)==="[object Object]"}function s(g,E){return Object.prototype.hasOwnProperty.call(g,E)}function o(g){if(Object.getOwnPropertyNames)return Object.getOwnPropertyNames(g).length===0;for(var E in g)if(s(g,E))return;return 1}function l(g){return g===void 0}function u(g){return typeof g=="number"||Object.prototype.toString.call(g)==="[object Number]"}function h(g){return g instanceof Date||Object.prototype.toString.call(g)==="[object Date]"}function d(g,E){for(var I=[],O=g.length,G=0;G<O;++G)I.push(E(g[G],G));return I}function f(g,E){for(var I in E)s(E,I)&&(g[I]=E[I]);return s(E,"toString")&&(g.toString=E.toString),s(E,"valueOf")&&(g.valueOf=E.valueOf),g}function p(g,E,I,O){return Dr(g,E,I,O,!0).utc()}function m(g){return g._pf==null&&(g._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidEra:null,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],era:null,meridiem:null,rfc2822:!1,weekdayMismatch:!1}),g._pf}function _(g){if(g._isValid==null){var E=m(g),I=b.call(E.parsedDateParts,function(O){return O!=null}),I=!isNaN(g._d.getTime())&&E.overflow<0&&!E.empty&&!E.invalidEra&&!E.invalidMonth&&!E.invalidWeekday&&!E.weekdayMismatch&&!E.nullInput&&!E.invalidFormat&&!E.userInvalidated&&(!E.meridiem||E.meridiem&&I);if(g._strict&&(I=I&&E.charsLeftOver===0&&E.unusedTokens.length===0&&E.bigHour===void 0),Object.isFrozen!=null&&Object.isFrozen(g))return I;g._isValid=I}return g._isValid}function y(g){var E=p(NaN);return g!=null?f(m(E),g):m(E).userInvalidated=!0,E}var b=Array.prototype.some||function(g){for(var E=Object(this),I=E.length>>>0,O=0;O<I;O++)if(O in E&&g.call(this,E[O],O,E))return!0;return!1},x=n.momentProperties=[],k=!1;function T(g,E){var I,O,G,ht=x.length;if(l(E._isAMomentObject)||(g._isAMomentObject=E._isAMomentObject),l(E._i)||(g._i=E._i),l(E._f)||(g._f=E._f),l(E._l)||(g._l=E._l),l(E._strict)||(g._strict=E._strict),l(E._tzm)||(g._tzm=E._tzm),l(E._isUTC)||(g._isUTC=E._isUTC),l(E._offset)||(g._offset=E._offset),l(E._pf)||(g._pf=m(E)),l(E._locale)||(g._locale=E._locale),0<ht)for(I=0;I<ht;I++)l(G=E[O=x[I]])||(g[O]=G);return g}function C(g){T(this,g),this._d=new Date(g._d!=null?g._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),k===!1&&(k=!0,n.updateOffset(this),k=!1)}function M(g){return g instanceof C||g!=null&&g._isAMomentObject!=null}function S(g){n.suppressDeprecationWarnings===!1&&typeof console<"u"&&console.warn&&console.warn("Deprecation warning: "+g)}function R(g,E){var I=!0;return f(function(){if(n.deprecationHandler!=null&&n.deprecationHandler(null,g),I){for(var O,G,ht=[],xt=arguments.length,Mt=0;Mt<xt;Mt++){if(O="",typeof arguments[Mt]=="object"){for(G in O+=`
+[`+Mt+"] ",arguments[0])s(arguments[0],G)&&(O+=G+": "+arguments[0][G]+", ");O=O.slice(0,-2)}else O=arguments[Mt];ht.push(O)}S(g+`
+Arguments: `+Array.prototype.slice.call(ht).join("")+`
+`+new Error().stack),I=!1}return E.apply(this,arguments)},E)}var A={};function L(g,E){n.deprecationHandler!=null&&n.deprecationHandler(g,E),A[g]||(S(E),A[g]=!0)}function v(g){return typeof Function<"u"&&g instanceof Function||Object.prototype.toString.call(g)==="[object Function]"}function B(g,E){var I,O=f({},g);for(I in E)s(E,I)&&(a(g[I])&&a(E[I])?(O[I]={},f(O[I],g[I]),f(O[I],E[I])):E[I]!=null?O[I]=E[I]:delete O[I]);for(I in g)s(g,I)&&!s(E,I)&&a(g[I])&&(O[I]=f({},O[I]));return O}function w(g){g!=null&&this.set(g)}n.suppressDeprecationWarnings=!1,n.deprecationHandler=null;var D=Object.keys||function(g){var E,I=[];for(E in g)s(g,E)&&I.push(E);return I};function N(g,E,I){var O=""+Math.abs(g);return(0<=g?I?"+":"":"-")+Math.pow(10,Math.max(0,E-O.length)).toString().substr(1)+O}var z=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|N{1,5}|YYYYYY|YYYYY|YYYY|YY|y{2,4}|yo?|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,X=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,ct={},J={};function Y(g,E,I,O){var G=typeof O=="string"?function(){return this[O]()}:O;g&&(J[g]=G),E&&(J[E[0]]=function(){return N(G.apply(this,arguments),E[1],E[2])}),I&&(J[I]=function(){return this.localeData().ordinal(G.apply(this,arguments),g)})}function $(g,E){return g.isValid()?(E=lt(E,g.localeData()),ct[E]=ct[E]||function(I){for(var O,G=I.match(z),ht=0,xt=G.length;ht<xt;ht++)J[G[ht]]?G[ht]=J[G[ht]]:G[ht]=(O=G[ht]).match(/\[[\s\S]/)?O.replace(/^\[|\]$/g,""):O.replace(/\\/g,"");return function(Mt){for(var Vt="",Ot=0;Ot<xt;Ot++)Vt+=v(G[Ot])?G[Ot].call(Mt,I):G[Ot];return Vt}}(E),ct[E](g)):g.localeData().invalidDate()}function lt(g,E){var I=5;function O(G){return E.longDateFormat(G)||G}for(X.lastIndex=0;0<=I&&X.test(g);)g=g.replace(X,O),X.lastIndex=0,--I;return g}var ut={};function W(g,E){var I=g.toLowerCase();ut[I]=ut[I+"s"]=ut[E]=g}function tt(g){return typeof g=="string"?ut[g]||ut[g.toLowerCase()]:void 0}function K(g){var E,I,O={};for(I in g)s(g,I)&&(E=tt(I))&&(O[E]=g[I]);return O}var it={};function Z(g,E){it[g]=E}function V(g){return g%4==0&&g%100!=0||g%400==0}function Q(g){return g<0?Math.ceil(g)||0:Math.floor(g)}function q(E){var E=+E,I=0;return I=E!=0&&isFinite(E)?Q(E):I}function U(g,E){return function(I){return I!=null?(j(this,g,I),n.updateOffset(this,E),this):F(this,g)}}function F(g,E){return g.isValid()?g._d["get"+(g._isUTC?"UTC":"")+E]():NaN}function j(g,E,I){g.isValid()&&!isNaN(I)&&(E==="FullYear"&&V(g.year())&&g.month()===1&&g.date()===29?(I=q(I),g._d["set"+(g._isUTC?"UTC":"")+E](I,g.month(),yt(I,g.month()))):g._d["set"+(g._isUTC?"UTC":"")+E](I))}var P=/\d/,fe=/\d\d/,et=/\d{3}/,to=/\d{4}/,os=/[+-]?\d{6}/,at=/\d\d?/,It=/\d\d\d\d?/,Lt=/\d\d\d\d\d\d?/,Rt=/\d{1,3}/,ls=/\d{1,4}/,ss=/[+-]?\d{1,6}/,Ct=/\d+/,pt=/[+-]?\d+/,mt=/Z|[+-]\d\d:?\d\d/gi,vt=/Z|[+-]\d\d(?::?\d\d)?/gi,Tt=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i;function ft(g,E,I){Gt[g]=v(E)?E:function(O,G){return O&&I?I:E}}function le(g,E){return s(Gt,g)?Gt[g](E._strict,E._locale):new RegExp(Dt(g.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,function(I,O,G,ht,xt){return O||G||ht||xt})))}function Dt(g){return g.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var Gt={},$t={};function Qt(g,E){var I,O,G=E;for(typeof g=="string"&&(g=[g]),u(E)&&(G=function(ht,xt){xt[E]=q(ht)}),O=g.length,I=0;I<O;I++)$t[g[I]]=G}function we(g,E){Qt(g,function(I,O,G,ht){G._w=G._w||{},E(I,G._w,G,ht)})}var jt,Ft=0,zt=1,wt=2,bt=3,Et=4,kt=5,Ut=6,gt=7,he=8;function yt(g,E){if(isNaN(g)||isNaN(E))return NaN;var I=(E%(I=12)+I)%I;return g+=(E-I)/12,I==1?V(g)?29:28:31-I%7%2}jt=Array.prototype.indexOf||function(g){for(var E=0;E<this.length;++E)if(this[E]===g)return E;return-1},Y("M",["MM",2],"Mo",function(){return this.month()+1}),Y("MMM",0,0,function(g){return this.localeData().monthsShort(this,g)}),Y("MMMM",0,0,function(g){return this.localeData().months(this,g)}),W("month","M"),Z("month",8),ft("M",at),ft("MM",at,fe),ft("MMM",function(g,E){return E.monthsShortRegex(g)}),ft("MMMM",function(g,E){return E.monthsRegex(g)}),Qt(["M","MM"],function(g,E){E[zt]=q(g)-1}),Qt(["MMM","MMMM"],function(g,E,I,O){O=I._locale.monthsParse(g,O,I._strict),O!=null?E[zt]=O:m(I).invalidMonth=g});var ne="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),ve="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_"),ye=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,be=Tt,Te=Tt;function Wt(g,E){var I;if(g.isValid()){if(typeof E=="string"){if(/^\d+$/.test(E))E=q(E);else if(!u(E=g.localeData().monthsParse(E)))return}I=Math.min(g.date(),yt(g.year(),E)),g._d["set"+(g._isUTC?"UTC":"")+"Month"](E,I)}}function se(g){return g!=null?(Wt(this,g),n.updateOffset(this,!0),this):F(this,"Month")}function me(){function g(xt,Mt){return Mt.length-xt.length}for(var E,I=[],O=[],G=[],ht=0;ht<12;ht++)E=p([2e3,ht]),I.push(this.monthsShort(E,"")),O.push(this.months(E,"")),G.push(this.months(E,"")),G.push(this.monthsShort(E,""));for(I.sort(g),O.sort(g),G.sort(g),ht=0;ht<12;ht++)I[ht]=Dt(I[ht]),O[ht]=Dt(O[ht]);for(ht=0;ht<24;ht++)G[ht]=Dt(G[ht]);this._monthsRegex=new RegExp("^("+G.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+O.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+I.join("|")+")","i")}function ue(g){return V(g)?366:365}Y("Y",0,0,function(){var g=this.year();return g<=9999?N(g,4):"+"+g}),Y(0,["YY",2],0,function(){return this.year()%100}),Y(0,["YYYY",4],0,"year"),Y(0,["YYYYY",5],0,"year"),Y(0,["YYYYYY",6,!0],0,"year"),W("year","y"),Z("year",1),ft("Y",pt),ft("YY",at,fe),ft("YYYY",ls,to),ft("YYYYY",ss,os),ft("YYYYYY",ss,os),Qt(["YYYYY","YYYYYY"],Ft),Qt("YYYY",function(g,E){E[Ft]=g.length===2?n.parseTwoDigitYear(g):q(g)}),Qt("YY",function(g,E){E[Ft]=n.parseTwoDigitYear(g)}),Qt("Y",function(g,E){E[Ft]=parseInt(g,10)}),n.parseTwoDigitYear=function(g){return q(g)+(68<q(g)?1900:2e3)};var N0=U("FullYear",!0);function _a(g,E,I,O,G,ht,xt){var Mt;return g<100&&0<=g?(Mt=new Date(g+400,E,I,O,G,ht,xt),isFinite(Mt.getFullYear())&&Mt.setFullYear(g)):Mt=new Date(g,E,I,O,G,ht,xt),Mt}function Hr(g){var E;return g<100&&0<=g?((E=Array.prototype.slice.call(arguments))[0]=g+400,E=new Date(Date.UTC.apply(null,E)),isFinite(E.getUTCFullYear())&&E.setUTCFullYear(g)):E=new Date(Date.UTC.apply(null,arguments)),E}function Ie(g,E,I){return I=7+E-I,I-(7+Hr(g,0,I).getUTCDay()-E)%7-1}function oe(g,xt,Mt,O,G){var ht,xt=1+7*(xt-1)+(7+Mt-O)%7+Ie(g,O,G),Mt=xt<=0?ue(ht=g-1)+xt:xt>ue(g)?(ht=g+1,xt-ue(g)):(ht=g,xt);return{year:ht,dayOfYear:Mt}}function Ke(g,E,I){var O,G,ht=Ie(g.year(),E,I),ht=Math.floor((g.dayOfYear()-ht-1)/7)+1;return ht<1?O=ht+wr(G=g.year()-1,E,I):ht>wr(g.year(),E,I)?(O=ht-wr(g.year(),E,I),G=g.year()+1):(G=g.year(),O=ht),{week:O,year:G}}function wr(g,G,I){var O=Ie(g,G,I),G=Ie(g+1,G,I);return(ue(g)-O+G)/7}Y("w",["ww",2],"wo","week"),Y("W",["WW",2],"Wo","isoWeek"),W("week","w"),W("isoWeek","W"),Z("week",5),Z("isoWeek",5),ft("w",at),ft("ww",at,fe),ft("W",at),ft("WW",at,fe),we(["w","ww","W","WW"],function(g,E,I,O){E[O.substr(0,1)]=q(g)});function je(g,E){return g.slice(E,7).concat(g.slice(0,E))}Y("d",0,"do","day"),Y("dd",0,0,function(g){return this.localeData().weekdaysMin(this,g)}),Y("ddd",0,0,function(g){return this.localeData().weekdaysShort(this,g)}),Y("dddd",0,0,function(g){return this.localeData().weekdays(this,g)}),Y("e",0,0,"weekday"),Y("E",0,0,"isoWeekday"),W("day","d"),W("weekday","e"),W("isoWeekday","E"),Z("day",11),Z("weekday",11),Z("isoWeekday",11),ft("d",at),ft("e",at),ft("E",at),ft("dd",function(g,E){return E.weekdaysMinRegex(g)}),ft("ddd",function(g,E){return E.weekdaysShortRegex(g)}),ft("dddd",function(g,E){return E.weekdaysRegex(g)}),we(["dd","ddd","dddd"],function(g,E,I,O){O=I._locale.weekdaysParse(g,O,I._strict),O!=null?E.d=O:m(I).invalidWeekday=g}),we(["d","e","E"],function(g,E,I,O){E[O]=q(g)});var Ze="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),qt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),st="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),At=Tt,Nt=Tt,Jt=Tt;function ze(){function g(Ot,de){return de.length-Ot.length}for(var E,I,O,G=[],ht=[],xt=[],Mt=[],Vt=0;Vt<7;Vt++)O=p([2e3,1]).day(Vt),E=Dt(this.weekdaysMin(O,"")),I=Dt(this.weekdaysShort(O,"")),O=Dt(this.weekdays(O,"")),G.push(E),ht.push(I),xt.push(O),Mt.push(E),Mt.push(I),Mt.push(O);G.sort(g),ht.sort(g),xt.sort(g),Mt.sort(g),this._weekdaysRegex=new RegExp("^("+Mt.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+xt.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+ht.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+G.join("|")+")","i")}function Pe(){return this.hours()%12||12}function qe(g,E){Y(g,0,0,function(){return this.localeData().meridiem(this.hours(),this.minutes(),E)})}function Tr(g,E){return E._meridiemParse}Y("H",["HH",2],0,"hour"),Y("h",["hh",2],0,Pe),Y("k",["kk",2],0,function(){return this.hours()||24}),Y("hmm",0,0,function(){return""+Pe.apply(this)+N(this.minutes(),2)}),Y("hmmss",0,0,function(){return""+Pe.apply(this)+N(this.minutes(),2)+N(this.seconds(),2)}),Y("Hmm",0,0,function(){return""+this.hours()+N(this.minutes(),2)}),Y("Hmmss",0,0,function(){return""+this.hours()+N(this.minutes(),2)+N(this.seconds(),2)}),qe("a",!0),qe("A",!1),W("hour","h"),Z("hour",13),ft("a",Tr),ft("A",Tr),ft("H",at),ft("h",at),ft("k",at),ft("HH",at,fe),ft("hh",at,fe),ft("kk",at,fe),ft("hmm",It),ft("hmmss",Lt),ft("Hmm",It),ft("Hmmss",Lt),Qt(["H","HH"],bt),Qt(["k","kk"],function(g,E,I){g=q(g),E[bt]=g===24?0:g}),Qt(["a","A"],function(g,E,I){I._isPm=I._locale.isPM(g),I._meridiem=g}),Qt(["h","hh"],function(g,E,I){E[bt]=q(g),m(I).bigHour=!0}),Qt("hmm",function(g,E,I){var O=g.length-2;E[bt]=q(g.substr(0,O)),E[Et]=q(g.substr(O)),m(I).bigHour=!0}),Qt("hmmss",function(g,E,I){var O=g.length-4,G=g.length-2;E[bt]=q(g.substr(0,O)),E[Et]=q(g.substr(O,2)),E[kt]=q(g.substr(G)),m(I).bigHour=!0}),Qt("Hmm",function(g,E,I){var O=g.length-2;E[bt]=q(g.substr(0,O)),E[Et]=q(g.substr(O))}),Qt("Hmmss",function(g,E,I){var O=g.length-4,G=g.length-2;E[bt]=q(g.substr(0,O)),E[Et]=q(g.substr(O,2)),E[kt]=q(g.substr(G))}),Tt=U("Hours",!0);var Ve,va={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",w:"a week",ww:"%d weeks",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:ne,monthsShort:ve,week:{dow:0,doy:6},weekdays:Ze,weekdaysMin:st,weekdaysShort:qt,meridiemParse:/[ap]\.?m?\.?/i},Ce={},Wi={};function E0(g){return g&&g.toLowerCase().replace("_","-")}function bu(g){for(var E,I,O,G,ht=0;ht<g.length;){for(E=(G=E0(g[ht]).split("-")).length,I=(I=E0(g[ht+1]))?I.split("-"):null;0<E;){if(O=Ln(G.slice(0,E).join("-")))return O;if(I&&I.length>=E&&function(xt,Mt){for(var Vt=Math.min(xt.length,Mt.length),Ot=0;Ot<Vt;Ot+=1)if(xt[Ot]!==Mt[Ot])return Ot;return Vt}(G,I)>=E-1)break;E--}ht++}return Ve}function Ln(g){var E;if(Ce[g]===void 0&&!0&&t&&t.exports&&g.match("^[^/\\\\]*$")!=null)try{E=Ve._abbr,fn("./locale/"+g),Xt(E)}catch{Ce[g]=null}return Ce[g]}function Xt(g,E){return g&&((E=l(E)?ce(g):ee(g,E))?Ve=E:typeof console<"u"&&console.warn&&console.warn("Locale "+g+" not found. Did you forget to load it?")),Ve._abbr}function ee(g,E){if(E===null)return delete Ce[g],null;var I,O=va;if(E.abbr=g,Ce[g]!=null)L("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),O=Ce[g]._config;else if(E.parentLocale!=null)if(Ce[E.parentLocale]!=null)O=Ce[E.parentLocale]._config;else{if((I=Ln(E.parentLocale))==null)return Wi[E.parentLocale]||(Wi[E.parentLocale]=[]),Wi[E.parentLocale].push({name:g,config:E}),null;O=I._config}return Ce[g]=new w(B(O,E)),Wi[g]&&Wi[g].forEach(function(G){ee(G.name,G.config)}),Xt(g),Ce[g]}function ce(g){var E;if(!(g=g&&g._locale&&g._locale._abbr?g._locale._abbr:g))return Ve;if(!i(g)){if(E=Ln(g))return E;g=[g]}return bu(g)}function Pt(g){var E=g._a;return E&&m(g).overflow===-2&&(E=E[zt]<0||11<E[zt]?zt:E[wt]<1||E[wt]>yt(E[Ft],E[zt])?wt:E[bt]<0||24<E[bt]||E[bt]===24&&(E[Et]!==0||E[kt]!==0||E[Ut]!==0)?bt:E[Et]<0||59<E[Et]?Et:E[kt]<0||59<E[kt]?kt:E[Ut]<0||999<E[Ut]?Ut:-1,m(g)._overflowDayOfYear&&(E<Ft||wt<E)&&(E=wt),m(g)._overflowWeeks&&E===-1&&(E=gt),m(g)._overflowWeekday&&E===-1&&(E=he),m(g).overflow=E),g}var $e=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,rt=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d|))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([+-]\d\d(?::?\d\d)?|\s*Z)?)?$/,Ks=/Z|[+-]\d\d(?::?\d\d)?/,ot=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/],["YYYYMM",/\d{6}/,!1],["YYYY",/\d{4}/,!1]],Gr=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],C0=/^\/?Date\((-?\d+)/i,u_=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,S0={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function A0(g){var E,I,O,G,ht,xt,Vt=g._i,Mt=$e.exec(Vt)||rt.exec(Vt),Vt=ot.length,Ot=Gr.length;if(Mt){for(m(g).iso=!0,E=0,I=Vt;E<I;E++)if(ot[E][1].exec(Mt[1])){G=ot[E][0],O=ot[E][2]!==!1;break}if(G==null)g._isValid=!1;else{if(Mt[3]){for(E=0,I=Ot;E<I;E++)if(Gr[E][1].exec(Mt[3])){ht=(Mt[2]||" ")+Gr[E][0];break}if(ht==null)return void(g._isValid=!1)}if(O||ht==null){if(Mt[4]){if(!Ks.exec(Mt[4]))return void(g._isValid=!1);xt="Z"}g._f=G+(ht||"")+(xt||""),_u(g)}else g._isValid=!1}}else g._isValid=!1}function mr(g,E,I,O,G,ht){return g=[function(xt){xt=parseInt(xt,10);{if(xt<=49)return 2e3+xt;if(xt<=999)return 1900+xt}return xt}(g),ve.indexOf(E),parseInt(I,10),parseInt(O,10),parseInt(G,10)],ht&&g.push(parseInt(ht,10)),g}function Hi(g){var E,I,O,G,ht=u_.exec(g._i.replace(/\([^()]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));ht?(E=mr(ht[4],ht[3],ht[2],ht[5],ht[6],ht[7]),I=ht[1],O=E,G=g,I&&qt.indexOf(I)!==new Date(O[0],O[1],O[2]).getDay()?(m(G).weekdayMismatch=!0,G._isValid=!1):(g._a=E,g._tzm=(I=ht[8],O=ht[9],G=ht[10],I?S0[I]:O?0:60*(((I=parseInt(G,10))-(O=I%100))/100)+O),g._d=Hr.apply(null,g._a),g._d.setUTCMinutes(g._d.getUTCMinutes()-g._tzm),m(g).rfc2822=!0)):g._isValid=!1}function Gi(g,E,I){return g!=null?g:E!=null?E:I}function Zs(g){var E,I,O,G,ht,xt,Mt,Vt,Ot,de,ie,er=[];if(!g._d){for(O=g,G=new Date(n.now()),I=O._useUTC?[G.getUTCFullYear(),G.getUTCMonth(),G.getUTCDate()]:[G.getFullYear(),G.getMonth(),G.getDate()],g._w&&g._a[wt]==null&&g._a[zt]==null&&((G=(O=g)._w).GG!=null||G.W!=null||G.E!=null?(Vt=1,Ot=4,ht=Gi(G.GG,O._a[Ft],Ke(De(),1,4).year),xt=Gi(G.W,1),((Mt=Gi(G.E,1))<1||7<Mt)&&(de=!0)):(Vt=O._locale._week.dow,Ot=O._locale._week.doy,ie=Ke(De(),Vt,Ot),ht=Gi(G.gg,O._a[Ft],ie.year),xt=Gi(G.w,ie.week),G.d!=null?((Mt=G.d)<0||6<Mt)&&(de=!0):G.e!=null?(Mt=G.e+Vt,(G.e<0||6<G.e)&&(de=!0)):Mt=Vt),xt<1||xt>wr(ht,Vt,Ot)?m(O)._overflowWeeks=!0:de!=null?m(O)._overflowWeekday=!0:(ie=oe(ht,xt,Mt,Vt,Ot),O._a[Ft]=ie.year,O._dayOfYear=ie.dayOfYear)),g._dayOfYear!=null&&(G=Gi(g._a[Ft],I[Ft]),(g._dayOfYear>ue(G)||g._dayOfYear===0)&&(m(g)._overflowDayOfYear=!0),de=Hr(G,0,g._dayOfYear),g._a[zt]=de.getUTCMonth(),g._a[wt]=de.getUTCDate()),E=0;E<3&&g._a[E]==null;++E)g._a[E]=er[E]=I[E];for(;E<7;E++)g._a[E]=er[E]=g._a[E]==null?E===2?1:0:g._a[E];g._a[bt]===24&&g._a[Et]===0&&g._a[kt]===0&&g._a[Ut]===0&&(g._nextDay=!0,g._a[bt]=0),g._d=(g._useUTC?Hr:_a).apply(null,er),ht=g._useUTC?g._d.getUTCDay():g._d.getDay(),g._tzm!=null&&g._d.setUTCMinutes(g._d.getUTCMinutes()-g._tzm),g._nextDay&&(g._a[bt]=24),g._w&&g._w.d!==void 0&&g._w.d!==ht&&(m(g).weekdayMismatch=!0)}}function _u(g){if(g._f===n.ISO_8601)A0(g);else if(g._f===n.RFC_2822)Hi(g);else{g._a=[],m(g).empty=!0;for(var E,I,O,G,ht,xt=""+g._i,Mt=xt.length,Vt=0,Ot=lt(g._f,g._locale).match(z)||[],de=Ot.length,ie=0;ie<de;ie++)I=Ot[ie],(E=(xt.match(le(I,g))||[])[0])&&(0<(O=xt.substr(0,xt.indexOf(E))).length&&m(g).unusedInput.push(O),xt=xt.slice(xt.indexOf(E)+E.length),Vt+=E.length),J[I]?(E?m(g).empty=!1:m(g).unusedTokens.push(I),O=I,ht=g,(G=E)!=null&&s($t,O)&&$t[O](G,ht._a,ht,O)):g._strict&&!E&&m(g).unusedTokens.push(I);m(g).charsLeftOver=Mt-Vt,0<xt.length&&m(g).unusedInput.push(xt),g._a[bt]<=12&&m(g).bigHour===!0&&0<g._a[bt]&&(m(g).bigHour=void 0),m(g).parsedDateParts=g._a.slice(0),m(g).meridiem=g._meridiem,g._a[bt]=function(er,br,xi){return xi==null?br:er.meridiemHour!=null?er.meridiemHour(br,xi):er.isPM!=null?((er=er.isPM(xi))&&br<12&&(br+=12),br=er||br!==12?br:0):br}(g._locale,g._a[bt],g._meridiem),(Mt=m(g).era)!==null&&(g._a[Ft]=g._locale.erasConvertYear(Mt,g._a[Ft])),Zs(g),Pt(g)}}function M0(g){var E,I,O,G=g._i,ht=g._f;return g._locale=g._locale||ce(g._l),G===null||ht===void 0&&G===""?y({nullInput:!0}):(typeof G=="string"&&(g._i=G=g._locale.preparse(G)),M(G)?new C(Pt(G)):(h(G)?g._d=G:i(ht)?function(xt){var Mt,Vt,Ot,de,ie,er,br=!1,xi=xt._f.length;if(xi===0)return m(xt).invalidFormat=!0,xt._d=new Date(NaN);for(de=0;de<xi;de++)ie=0,er=!1,Mt=T({},xt),xt._useUTC!=null&&(Mt._useUTC=xt._useUTC),Mt._f=xt._f[de],_u(Mt),_(Mt)&&(er=!0),ie=(ie+=m(Mt).charsLeftOver)+10*m(Mt).unusedTokens.length,m(Mt).score=ie,br?ie<Ot&&(Ot=ie,Vt=Mt):(Ot==null||ie<Ot||er)&&(Ot=ie,Vt=Mt,er&&(br=!0));f(xt,Vt||Mt)}(g):ht?_u(g):l(ht=(G=g)._i)?G._d=new Date(n.now()):h(ht)?G._d=new Date(ht.valueOf()):typeof ht=="string"?(I=G,(E=C0.exec(I._i))!==null?I._d=new Date(+E[1]):(A0(I),I._isValid===!1&&(delete I._isValid,Hi(I),I._isValid===!1&&(delete I._isValid,I._strict?I._isValid=!1:n.createFromInputFallback(I))))):i(ht)?(G._a=d(ht.slice(0),function(xt){return parseInt(xt,10)}),Zs(G)):a(ht)?(E=G)._d||(O=(I=K(E._i)).day===void 0?I.date:I.day,E._a=d([I.year,I.month,O,I.hour,I.minute,I.second,I.millisecond],function(xt){return xt&&parseInt(xt,10)}),Zs(E)):u(ht)?G._d=new Date(ht):n.createFromInputFallback(G),_(g)||(g._d=null),g))}function Dr(g,E,I,O,G){var ht={};return E!==!0&&E!==!1||(O=E,E=void 0),I!==!0&&I!==!1||(O=I,I=void 0),(a(g)&&o(g)||i(g)&&g.length===0)&&(g=void 0),ht._isAMomentObject=!0,ht._useUTC=ht._isUTC=G,ht._l=I,ht._i=g,ht._f=E,ht._strict=O,(G=new C(Pt(M0(G=ht))))._nextDay&&(G.add(1,"d"),G._nextDay=void 0),G}function De(g,E,I,O){return Dr(g,E,I,O,!1)}n.createFromInputFallback=R("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",function(g){g._d=new Date(g._i+(g._useUTC?" UTC":""))}),n.ISO_8601=function(){},n.RFC_2822=function(){},It=R("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var g=De.apply(null,arguments);return this.isValid()&&g.isValid()?g<this?this:g:y()}),Lt=R("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",function(){var g=De.apply(null,arguments);return this.isValid()&&g.isValid()?this<g?this:g:y()});function hn(g,E){var I,O;if(!(E=E.length===1&&i(E[0])?E[0]:E).length)return De();for(I=E[0],O=1;O<E.length;++O)E[O].isValid()&&!E[O][g](I)||(I=E[O]);return I}var xa=["year","quarter","month","week","day","hour","minute","second","millisecond"];function _i(E){var E=K(E),I=E.year||0,O=E.quarter||0,G=E.month||0,ht=E.week||E.isoWeek||0,xt=E.day||0,Mt=E.hour||0,Vt=E.minute||0,Ot=E.second||0,de=E.millisecond||0;this._isValid=function(ie){var er,br,xi=!1,m_=xa.length;for(er in ie)if(s(ie,er)&&(jt.call(xa,er)===-1||ie[er]!=null&&isNaN(ie[er])))return!1;for(br=0;br<m_;++br)if(ie[xa[br]]){if(xi)return!1;parseFloat(ie[xa[br]])!==q(ie[xa[br]])&&(xi=!0)}return!0}(E),this._milliseconds=+de+1e3*Ot+6e4*Vt+1e3*Mt*60*60,this._days=+xt+7*ht,this._months=+G+3*O+12*I,this._data={},this._locale=ce(),this._bubble()}function ka(g){return g instanceof _i}function Rn(g){return g<0?-1*Math.round(-1*g):Math.round(g)}function vu(g,E){Y(g,0,0,function(){var I=this.utcOffset(),O="+";return I<0&&(I=-I,O="-"),O+N(~~(I/60),2)+E+N(~~I%60,2)})}vu("Z",":"),vu("ZZ",""),ft("Z",vt),ft("ZZ",vt),Qt(["Z","ZZ"],function(g,E,I){I._useUTC=!0,I._tzm=Qs(vt,g)});var yl=/([\+\-]|\d\d)/gi;function Qs(g,I){var I=(I||"").match(g);return I===null?null:(I=60*(g=((I[I.length-1]||[])+"").match(yl)||["-",0,0])[1]+q(g[2]))===0?0:g[0]==="+"?I:-I}function In(g,E){var I;return E._isUTC?(E=E.clone(),I=(M(g)||h(g)?g:De(g)).valueOf()-E.valueOf(),E._d.setTime(E._d.valueOf()+I),n.updateOffset(E,!1),E):De(g).local()}function h_(g){return-Math.round(g._d.getTimezoneOffset())}function eR(){return!!this.isValid()&&this._isUTC&&this._offset===0}n.updateOffset=function(){};var Est=/^(-|\+)?(?:(\d*)[. ])?(\d+):(\d+)(?::(\d+)(\.\d*)?)?$/,Cst=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function vi(g,E){var I,O=g,G=null;return ka(g)?O={ms:g._milliseconds,d:g._days,M:g._months}:u(g)||!isNaN(+g)?(O={},E?O[E]=+g:O.milliseconds=+g):(G=Est.exec(g))?(I=G[1]==="-"?-1:1,O={y:0,d:q(G[wt])*I,h:q(G[bt])*I,m:q(G[Et])*I,s:q(G[kt])*I,ms:q(Rn(1e3*G[Ut]))*I}):(G=Cst.exec(g))?(I=G[1]==="-"?-1:1,O={y:Js(G[2],I),M:Js(G[3],I),w:Js(G[4],I),d:Js(G[5],I),h:Js(G[6],I),m:Js(G[7],I),s:Js(G[8],I)}):O==null?O={}:typeof O=="object"&&("from"in O||"to"in O)&&(E=function(ht,xt){var Mt;return!ht.isValid()||!xt.isValid()?{milliseconds:0,months:0}:(xt=In(xt,ht),ht.isBefore(xt)?Mt=rR(ht,xt):((Mt=rR(xt,ht)).milliseconds=-Mt.milliseconds,Mt.months=-Mt.months),Mt)}(De(O.from),De(O.to)),(O={}).ms=E.milliseconds,O.M=E.months),G=new _i(O),ka(g)&&s(g,"_locale")&&(G._locale=g._locale),ka(g)&&s(g,"_isValid")&&(G._isValid=g._isValid),G}function Js(g,E){return g=g&&parseFloat(g.replace(",",".")),(isNaN(g)?0:g)*E}function rR(g,E){var I={};return I.months=E.month()-g.month()+12*(E.year()-g.year()),g.clone().add(I.months,"M").isAfter(E)&&--I.months,I.milliseconds=+E-+g.clone().add(I.months,"M"),I}function nR(g,E){return function(I,O){var G;return O===null||isNaN(+O)||(L(E,"moment()."+E+"(period, number) is deprecated. Please use moment()."+E+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),G=I,I=O,O=G),iR(this,vi(I,O),g),this}}function iR(g,xt,I,O){var G=xt._milliseconds,ht=Rn(xt._days),xt=Rn(xt._months);g.isValid()&&(O=O==null||O,xt&&Wt(g,F(g,"Month")+xt*I),ht&&j(g,"Date",F(g,"Date")+ht*I),G&&g._d.setTime(g._d.valueOf()+G*I),O&&n.updateOffset(g,ht||xt))}vi.fn=_i.prototype,vi.invalid=function(){return vi(NaN)},ne=nR(1,"add"),Ze=nR(-1,"subtract");function aR(g){return typeof g=="string"||g instanceof String}function Sst(g){return M(g)||h(g)||aR(g)||u(g)||function(E){var I=i(E),O=!1;return I&&(O=E.filter(function(G){return!u(G)&&aR(E)}).length===0),I&&O}(g)||function(E){var I,O,G=a(E)&&!o(E),ht=!1,xt=["years","year","y","months","month","M","days","day","d","dates","date","D","hours","hour","h","minutes","minute","m","seconds","second","s","milliseconds","millisecond","ms"],Mt=xt.length;for(I=0;I<Mt;I+=1)O=xt[I],ht=ht||s(E,O);return G&&ht}(g)||g==null}function L0(g,G){if(g.date()<G.date())return-L0(G,g);var I=12*(G.year()-g.year())+(G.month()-g.month()),O=g.clone().add(I,"months"),G=G-O<0?(G-O)/(O-g.clone().add(I-1,"months")):(G-O)/(g.clone().add(1+I,"months")-O);return-(I+G)||0}function sR(g){return g===void 0?this._locale._abbr:((g=ce(g))!=null&&(this._locale=g),this)}n.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",n.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]",st=R("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",function(g){return g===void 0?this.localeData():this.locale(g)});function oR(){return this._locale}var lR=126227808e5;function ml(g,E){return(g%E+E)%E}function cR(g,E,I){return g<100&&0<=g?new Date(g+400,E,I)-lR:new Date(g,E,I).valueOf()}function uR(g,E,I){return g<100&&0<=g?Date.UTC(g+400,E,I)-lR:Date.UTC(g,E,I)}function f_(g,E){return E.erasAbbrRegex(g)}function d_(){for(var g=[],E=[],I=[],O=[],G=this.eras(),ht=0,xt=G.length;ht<xt;++ht)E.push(Dt(G[ht].name)),g.push(Dt(G[ht].abbr)),I.push(Dt(G[ht].narrow)),O.push(Dt(G[ht].name)),O.push(Dt(G[ht].abbr)),O.push(Dt(G[ht].narrow));this._erasRegex=new RegExp("^("+O.join("|")+")","i"),this._erasNameRegex=new RegExp("^("+E.join("|")+")","i"),this._erasAbbrRegex=new RegExp("^("+g.join("|")+")","i"),this._erasNarrowRegex=new RegExp("^("+I.join("|")+")","i")}function R0(g,E){Y(0,[g,g.length],0,E)}function hR(g,E,I,O,G){var ht;return g==null?Ke(this,O,G).year:(ht=wr(g,O,G),function(xt,Mt,Vt,Ot,de){return xt=oe(xt,Mt,Vt,Ot,de),Mt=Hr(xt.year,0,xt.dayOfYear),this.year(Mt.getUTCFullYear()),this.month(Mt.getUTCMonth()),this.date(Mt.getUTCDate()),this}.call(this,g,E=ht<E?ht:E,I,O,G))}Y("N",0,0,"eraAbbr"),Y("NN",0,0,"eraAbbr"),Y("NNN",0,0,"eraAbbr"),Y("NNNN",0,0,"eraName"),Y("NNNNN",0,0,"eraNarrow"),Y("y",["y",1],"yo","eraYear"),Y("y",["yy",2],0,"eraYear"),Y("y",["yyy",3],0,"eraYear"),Y("y",["yyyy",4],0,"eraYear"),ft("N",f_),ft("NN",f_),ft("NNN",f_),ft("NNNN",function(g,E){return E.erasNameRegex(g)}),ft("NNNNN",function(g,E){return E.erasNarrowRegex(g)}),Qt(["N","NN","NNN","NNNN","NNNNN"],function(g,E,I,O){O=I._locale.erasParse(g,O,I._strict),O?m(I).era=O:m(I).invalidEra=g}),ft("y",Ct),ft("yy",Ct),ft("yyy",Ct),ft("yyyy",Ct),ft("yo",function(g,E){return E._eraYearOrdinalRegex||Ct}),Qt(["y","yy","yyy","yyyy"],Ft),Qt(["yo"],function(g,E,I,O){var G;I._locale._eraYearOrdinalRegex&&(G=g.match(I._locale._eraYearOrdinalRegex)),I._locale.eraYearOrdinalParse?E[Ft]=I._locale.eraYearOrdinalParse(g,G):E[Ft]=parseInt(g,10)}),Y(0,["gg",2],0,function(){return this.weekYear()%100}),Y(0,["GG",2],0,function(){return this.isoWeekYear()%100}),R0("gggg","weekYear"),R0("ggggg","weekYear"),R0("GGGG","isoWeekYear"),R0("GGGGG","isoWeekYear"),W("weekYear","gg"),W("isoWeekYear","GG"),Z("weekYear",1),Z("isoWeekYear",1),ft("G",pt),ft("g",pt),ft("GG",at,fe),ft("gg",at,fe),ft("GGGG",ls,to),ft("gggg",ls,to),ft("GGGGG",ss,os),ft("ggggg",ss,os),we(["gggg","ggggg","GGGG","GGGGG"],function(g,E,I,O){E[O.substr(0,2)]=q(g)}),we(["gg","GG"],function(g,E,I,O){E[O]=n.parseTwoDigitYear(g)}),Y("Q",0,"Qo","quarter"),W("quarter","Q"),Z("quarter",7),ft("Q",P),Qt("Q",function(g,E){E[zt]=3*(q(g)-1)}),Y("D",["DD",2],"Do","date"),W("date","D"),Z("date",9),ft("D",at),ft("DD",at,fe),ft("Do",function(g,E){return g?E._dayOfMonthOrdinalParse||E._ordinalParse:E._dayOfMonthOrdinalParseLenient}),Qt(["D","DD"],wt),Qt("Do",function(g,E){E[wt]=q(g.match(at)[0])}),ls=U("Date",!0),Y("DDD",["DDDD",3],"DDDo","dayOfYear"),W("dayOfYear","DDD"),Z("dayOfYear",4),ft("DDD",Rt),ft("DDDD",et),Qt(["DDD","DDDD"],function(g,E,I){I._dayOfYear=q(g)}),Y("m",["mm",2],0,"minute"),W("minute","m"),Z("minute",14),ft("m",at),ft("mm",at,fe),Qt(["m","mm"],Et);var as,to=U("Minutes",!1),ss=(Y("s",["ss",2],0,"second"),W("second","s"),Z("second",15),ft("s",at),ft("ss",at,fe),Qt(["s","ss"],kt),U("Seconds",!1));for(Y("S",0,0,function(){return~~(this.millisecond()/100)}),Y(0,["SS",2],0,function(){return~~(this.millisecond()/10)}),Y(0,["SSS",3],0,"millisecond"),Y(0,["SSSS",4],0,function(){return 10*this.millisecond()}),Y(0,["SSSSS",5],0,function(){return 100*this.millisecond()}),Y(0,["SSSSSS",6],0,function(){return 1e3*this.millisecond()}),Y(0,["SSSSSSS",7],0,function(){return 1e4*this.millisecond()}),Y(0,["SSSSSSSS",8],0,function(){return 1e5*this.millisecond()}),Y(0,["SSSSSSSSS",9],0,function(){return 1e6*this.millisecond()}),W("millisecond","ms"),Z("millisecond",16),ft("S",Rt,P),ft("SS",Rt,fe),ft("SSS",Rt,et),as="SSSS";as.length<=9;as+="S")ft(as,Ct);function Ast(g,E){E[Ut]=q(1e3*("0."+g))}for(as="S";as.length<=9;as+="S")Qt(as,Ast);os=U("Milliseconds",!1),Y("z",0,0,"zoneAbbr"),Y("zz",0,0,"zoneName"),P=C.prototype;function fR(g){return g}P.add=ne,P.calendar=function(I,G){arguments.length===1&&(arguments[0]?Sst(arguments[0])?(I=arguments[0],G=void 0):function(ht){for(var xt=a(ht)&&!o(ht),Mt=!1,Vt=["sameDay","nextDay","lastDay","nextWeek","lastWeek","sameElse"],Ot=0;Ot<Vt.length;Ot+=1)Mt=Mt||s(ht,Vt[Ot]);return xt&&Mt}(arguments[0])&&(G=arguments[0],I=void 0):G=I=void 0);var I=I||De(),O=In(I,this).startOf("day"),O=n.calendarFormat(this,O)||"sameElse",G=G&&(v(G[O])?G[O].call(this,I):G[O]);return this.format(G||this.localeData().calendar(O,this,De(I)))},P.clone=function(){return new C(this)},P.diff=function(g,E,I){var O,G,ht;if(!this.isValid())return NaN;if(!(O=In(g,this)).isValid())return NaN;switch(G=6e4*(O.utcOffset()-this.utcOffset()),E=tt(E)){case"year":ht=L0(this,O)/12;break;case"month":ht=L0(this,O);break;case"quarter":ht=L0(this,O)/3;break;case"second":ht=(this-O)/1e3;break;case"minute":ht=(this-O)/6e4;break;case"hour":ht=(this-O)/36e5;break;case"day":ht=(this-O-G)/864e5;break;case"week":ht=(this-O-G)/6048e5;break;default:ht=this-O}return I?ht:Q(ht)},P.endOf=function(g){var E,I;if((g=tt(g))===void 0||g==="millisecond"||!this.isValid())return this;switch(I=this._isUTC?uR:cR,g){case"year":E=I(this.year()+1,0,1)-1;break;case"quarter":E=I(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":E=I(this.year(),this.month()+1,1)-1;break;case"week":E=I(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":E=I(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":E=I(this.year(),this.month(),this.date()+1)-1;break;case"hour":E=this._d.valueOf(),E+=36e5-ml(E+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":E=this._d.valueOf(),E+=6e4-ml(E,6e4)-1;break;case"second":E=this._d.valueOf(),E+=1e3-ml(E,1e3)-1;break}return this._d.setTime(E),n.updateOffset(this,!0),this},P.format=function(g){return g=g||(this.isUtc()?n.defaultFormatUtc:n.defaultFormat),g=$(this,g),this.localeData().postformat(g)},P.from=function(g,E){return this.isValid()&&(M(g)&&g.isValid()||De(g).isValid())?vi({to:this,from:g}).locale(this.locale()).humanize(!E):this.localeData().invalidDate()},P.fromNow=function(g){return this.from(De(),g)},P.to=function(g,E){return this.isValid()&&(M(g)&&g.isValid()||De(g).isValid())?vi({from:this,to:g}).locale(this.locale()).humanize(!E):this.localeData().invalidDate()},P.toNow=function(g){return this.to(De(),g)},P.get=function(g){return v(this[g=tt(g)])?this[g]():this},P.invalidAt=function(){return m(this).overflow},P.isAfter=function(g,E){return g=M(g)?g:De(g),!(!this.isValid()||!g.isValid())&&((E=tt(E)||"millisecond")==="millisecond"?this.valueOf()>g.valueOf():g.valueOf()<this.clone().startOf(E).valueOf())},P.isBefore=function(g,E){return g=M(g)?g:De(g),!(!this.isValid()||!g.isValid())&&((E=tt(E)||"millisecond")==="millisecond"?this.valueOf()<g.valueOf():this.clone().endOf(E).valueOf()<g.valueOf())},P.isBetween=function(g,E,I,O){return g=M(g)?g:De(g),E=M(E)?E:De(E),!!(this.isValid()&&g.isValid()&&E.isValid())&&((O=O||"()")[0]==="("?this.isAfter(g,I):!this.isBefore(g,I))&&(O[1]===")"?this.isBefore(E,I):!this.isAfter(E,I))},P.isSame=function(I,E){var I=M(I)?I:De(I);return!(!this.isValid()||!I.isValid())&&((E=tt(E)||"millisecond")==="millisecond"?this.valueOf()===I.valueOf():(I=I.valueOf(),this.clone().startOf(E).valueOf()<=I&&I<=this.clone().endOf(E).valueOf()))},P.isSameOrAfter=function(g,E){return this.isSame(g,E)||this.isAfter(g,E)},P.isSameOrBefore=function(g,E){return this.isSame(g,E)||this.isBefore(g,E)},P.isValid=function(){return _(this)},P.lang=st,P.locale=sR,P.localeData=oR,P.max=Lt,P.min=It,P.parsingFlags=function(){return f({},m(this))},P.set=function(g,E){if(typeof g=="object")for(var I=function(ht){var xt,Mt=[];for(xt in ht)s(ht,xt)&&Mt.push({unit:xt,priority:it[xt]});return Mt.sort(function(Vt,Ot){return Vt.priority-Ot.priority}),Mt}(g=K(g)),O=I.length,G=0;G<O;G++)this[I[G].unit](g[I[G].unit]);else if(v(this[g=tt(g)]))return this[g](E);return this},P.startOf=function(g){var E,I;if((g=tt(g))===void 0||g==="millisecond"||!this.isValid())return this;switch(I=this._isUTC?uR:cR,g){case"year":E=I(this.year(),0,1);break;case"quarter":E=I(this.year(),this.month()-this.month()%3,1);break;case"month":E=I(this.year(),this.month(),1);break;case"week":E=I(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":E=I(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":E=I(this.year(),this.month(),this.date());break;case"hour":E=this._d.valueOf(),E-=ml(E+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":E=this._d.valueOf(),E-=ml(E,6e4);break;case"second":E=this._d.valueOf(),E-=ml(E,1e3);break}return this._d.setTime(E),n.updateOffset(this,!0),this},P.subtract=Ze,P.toArray=function(){var g=this;return[g.year(),g.month(),g.date(),g.hour(),g.minute(),g.second(),g.millisecond()]},P.toObject=function(){var g=this;return{years:g.year(),months:g.month(),date:g.date(),hours:g.hours(),minutes:g.minutes(),seconds:g.seconds(),milliseconds:g.milliseconds()}},P.toDate=function(){return new Date(this.valueOf())},P.toISOString=function(g){if(!this.isValid())return null;var E=(g=g!==!0)?this.clone().utc():this;return E.year()<0||9999<E.year()?$(E,g?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):v(Date.prototype.toISOString)?g?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",$(E,"Z")):$(E,g?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},P.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var g,E="moment",I="";return this.isLocal()||(E=this.utcOffset()===0?"moment.utc":"moment.parseZone",I="Z"),E="["+E+'("]',g=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",this.format(E+g+"-MM-DD[T]HH:mm:ss.SSS"+(I+'[")]'))},typeof Symbol<"u"&&Symbol.for!=null&&(P[Symbol.for("nodejs.util.inspect.custom")]=function(){return"Moment<"+this.format()+">"}),P.toJSON=function(){return this.isValid()?this.toISOString():null},P.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},P.unix=function(){return Math.floor(this.valueOf()/1e3)},P.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},P.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},P.eraName=function(){for(var g,E=this.localeData().eras(),I=0,O=E.length;I<O;++I)if(g=this.clone().startOf("day").valueOf(),E[I].since<=g&&g<=E[I].until||E[I].until<=g&&g<=E[I].since)return E[I].name;return""},P.eraNarrow=function(){for(var g,E=this.localeData().eras(),I=0,O=E.length;I<O;++I)if(g=this.clone().startOf("day").valueOf(),E[I].since<=g&&g<=E[I].until||E[I].until<=g&&g<=E[I].since)return E[I].narrow;return""},P.eraAbbr=function(){for(var g,E=this.localeData().eras(),I=0,O=E.length;I<O;++I)if(g=this.clone().startOf("day").valueOf(),E[I].since<=g&&g<=E[I].until||E[I].until<=g&&g<=E[I].since)return E[I].abbr;return""},P.eraYear=function(){for(var g,E,I=this.localeData().eras(),O=0,G=I.length;O<G;++O)if(g=I[O].since<=I[O].until?1:-1,E=this.clone().startOf("day").valueOf(),I[O].since<=E&&E<=I[O].until||I[O].until<=E&&E<=I[O].since)return(this.year()-n(I[O].since).year())*g+I[O].offset;return this.year()},P.year=N0,P.isLeapYear=function(){return V(this.year())},P.weekYear=function(g){return hR.call(this,g,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},P.isoWeekYear=function(g){return hR.call(this,g,this.isoWeek(),this.isoWeekday(),1,4)},P.quarter=P.quarters=function(g){return g==null?Math.ceil((this.month()+1)/3):this.month(3*(g-1)+this.month()%3)},P.month=se,P.daysInMonth=function(){return yt(this.year(),this.month())},P.week=P.weeks=function(g){var E=this.localeData().week(this);return g==null?E:this.add(7*(g-E),"d")},P.isoWeek=P.isoWeeks=function(g){var E=Ke(this,1,4).week;return g==null?E:this.add(7*(g-E),"d")},P.weeksInYear=function(){var g=this.localeData()._week;return wr(this.year(),g.dow,g.doy)},P.weeksInWeekYear=function(){var g=this.localeData()._week;return wr(this.weekYear(),g.dow,g.doy)},P.isoWeeksInYear=function(){return wr(this.year(),1,4)},P.isoWeeksInISOWeekYear=function(){return wr(this.isoWeekYear(),1,4)},P.date=ls,P.day=P.days=function(g){if(!this.isValid())return g!=null?this:NaN;var E,I,O=this._isUTC?this._d.getUTCDay():this._d.getDay();return g!=null?(E=g,I=this.localeData(),g=typeof E!="string"?E:isNaN(E)?typeof(E=I.weekdaysParse(E))=="number"?E:null:parseInt(E,10),this.add(g-O,"d")):O},P.weekday=function(g){if(!this.isValid())return g!=null?this:NaN;var E=(this.day()+7-this.localeData()._week.dow)%7;return g==null?E:this.add(g-E,"d")},P.isoWeekday=function(g){return this.isValid()?g!=null?(E=g,I=this.localeData(),I=typeof E=="string"?I.weekdaysParse(E)%7||7:isNaN(E)?null:E,this.day(this.day()%7?I:I-7)):this.day()||7:g!=null?this:NaN;var E,I},P.dayOfYear=function(g){var E=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return g==null?E:this.add(g-E,"d")},P.hour=P.hours=Tt,P.minute=P.minutes=to,P.second=P.seconds=ss,P.millisecond=P.milliseconds=os,P.utcOffset=function(g,E,I){var O,G=this._offset||0;if(!this.isValid())return g!=null?this:NaN;if(g==null)return this._isUTC?G:h_(this);if(typeof g=="string"){if((g=Qs(vt,g))===null)return this}else Math.abs(g)<16&&!I&&(g*=60);return!this._isUTC&&E&&(O=h_(this)),this._offset=g,this._isUTC=!0,O!=null&&this.add(O,"m"),G!==g&&(!E||this._changeInProgress?iR(this,vi(g-G,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,n.updateOffset(this,!0),this._changeInProgress=null)),this},P.utc=function(g){return this.utcOffset(0,g)},P.local=function(g){return this._isUTC&&(this.utcOffset(0,g),this._isUTC=!1,g&&this.subtract(h_(this),"m")),this},P.parseZone=function(){var g;return this._tzm!=null?this.utcOffset(this._tzm,!1,!0):typeof this._i=="string"&&((g=Qs(mt,this._i))!=null?this.utcOffset(g):this.utcOffset(0,!0)),this},P.hasAlignedHourOffset=function(g){return!!this.isValid()&&(g=g?De(g).utcOffset():0,(this.utcOffset()-g)%60==0)},P.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},P.isLocal=function(){return!!this.isValid()&&!this._isUTC},P.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},P.isUtc=eR,P.isUTC=eR,P.zoneAbbr=function(){return this._isUTC?"UTC":""},P.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},P.dates=R("dates accessor is deprecated. Use date instead.",ls),P.months=R("months accessor is deprecated. Use month instead",se),P.years=R("years accessor is deprecated. Use year instead",N0),P.zone=R("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",function(g,E){return g!=null?(this.utcOffset(g=typeof g!="string"?-g:g,E),this):-this.utcOffset()}),P.isDSTShifted=R("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",function(){if(!l(this._isDSTShifted))return this._isDSTShifted;var g,E={};return T(E,this),(E=M0(E))._a?(g=(E._isUTC?p:De)(E._a),this._isDSTShifted=this.isValid()&&0<function(I,O,G){for(var ht=Math.min(I.length,O.length),xt=Math.abs(I.length-O.length),Mt=0,Vt=0;Vt<ht;Vt++)(G&&I[Vt]!==O[Vt]||!G&&q(I[Vt])!==q(O[Vt]))&&Mt++;return Mt+xt}(E._a,g.toArray())):this._isDSTShifted=!1,this._isDSTShifted}),fe=w.prototype;function I0(g,E,I,ht){var G=ce(),ht=p().set(ht,E);return G[I](ht,g)}function dR(g,E,I){if(u(g)&&(E=g,g=void 0),g=g||"",E!=null)return I0(g,E,I,"month");for(var O=[],G=0;G<12;G++)O[G]=I0(g,G,I,"month");return O}function p_(g,E,I,O){E=(typeof g=="boolean"?u(E)&&(I=E,E=void 0):(E=g,g=!1,u(I=E)&&(I=E,E=void 0)),E||"");var G,ht=ce(),xt=g?ht._week.dow:0,Mt=[];if(I!=null)return I0(E,(I+xt)%7,O,"day");for(G=0;G<7;G++)Mt[G]=I0(E,(G+xt)%7,O,"day");return Mt}fe.calendar=function(g,E,I){return v(g=this._calendar[g]||this._calendar.sameElse)?g.call(E,I):g},fe.longDateFormat=function(g){var E=this._longDateFormat[g],I=this._longDateFormat[g.toUpperCase()];return E||!I?E:(this._longDateFormat[g]=I.match(z).map(function(O){return O==="MMMM"||O==="MM"||O==="DD"||O==="dddd"?O.slice(1):O}).join(""),this._longDateFormat[g])},fe.invalidDate=function(){return this._invalidDate},fe.ordinal=function(g){return this._ordinal.replace("%d",g)},fe.preparse=fR,fe.postformat=fR,fe.relativeTime=function(g,E,I,O){var G=this._relativeTime[I];return v(G)?G(g,E,I,O):G.replace(/%d/i,g)},fe.pastFuture=function(g,E){return v(g=this._relativeTime[0<g?"future":"past"])?g(E):g.replace(/%s/i,E)},fe.set=function(g){var E,I;for(I in g)s(g,I)&&(v(E=g[I])?this[I]=E:this["_"+I]=E);this._config=g,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},fe.eras=function(g,E){for(var I,O=this._eras||ce("en")._eras,G=0,ht=O.length;G<ht;++G){switch(typeof O[G].since){case"string":I=n(O[G].since).startOf("day"),O[G].since=I.valueOf();break}switch(typeof O[G].until){case"undefined":O[G].until=1/0;break;case"string":I=n(O[G].until).startOf("day").valueOf(),O[G].until=I.valueOf();break}}return O},fe.erasParse=function(g,E,I){var O,G,ht,xt,Mt,Vt=this.eras();for(g=g.toUpperCase(),O=0,G=Vt.length;O<G;++O)if(ht=Vt[O].name.toUpperCase(),xt=Vt[O].abbr.toUpperCase(),Mt=Vt[O].narrow.toUpperCase(),I)switch(E){case"N":case"NN":case"NNN":if(xt===g)return Vt[O];break;case"NNNN":if(ht===g)return Vt[O];break;case"NNNNN":if(Mt===g)return Vt[O];break}else if(0<=[ht,xt,Mt].indexOf(g))return Vt[O]},fe.erasConvertYear=function(g,E){var I=g.since<=g.until?1:-1;return E===void 0?n(g.since).year():n(g.since).year()+(E-g.offset)*I},fe.erasAbbrRegex=function(g){return s(this,"_erasAbbrRegex")||d_.call(this),g?this._erasAbbrRegex:this._erasRegex},fe.erasNameRegex=function(g){return s(this,"_erasNameRegex")||d_.call(this),g?this._erasNameRegex:this._erasRegex},fe.erasNarrowRegex=function(g){return s(this,"_erasNarrowRegex")||d_.call(this),g?this._erasNarrowRegex:this._erasRegex},fe.months=function(g,E){return g?(i(this._months)?this._months:this._months[(this._months.isFormat||ye).test(E)?"format":"standalone"])[g.month()]:i(this._months)?this._months:this._months.standalone},fe.monthsShort=function(g,E){return g?(i(this._monthsShort)?this._monthsShort:this._monthsShort[ye.test(E)?"format":"standalone"])[g.month()]:i(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},fe.monthsParse=function(g,E,I){var O,G;if(this._monthsParseExact)return function(ie,xt,Mt){var Vt,Ot,de,ie=ie.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],Vt=0;Vt<12;++Vt)de=p([2e3,Vt]),this._shortMonthsParse[Vt]=this.monthsShort(de,"").toLocaleLowerCase(),this._longMonthsParse[Vt]=this.months(de,"").toLocaleLowerCase();return Mt?xt==="MMM"?(Ot=jt.call(this._shortMonthsParse,ie))!==-1?Ot:null:(Ot=jt.call(this._longMonthsParse,ie))!==-1?Ot:null:xt==="MMM"?(Ot=jt.call(this._shortMonthsParse,ie))!==-1||(Ot=jt.call(this._longMonthsParse,ie))!==-1?Ot:null:(Ot=jt.call(this._longMonthsParse,ie))!==-1||(Ot=jt.call(this._shortMonthsParse,ie))!==-1?Ot:null}.call(this,g,E,I);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),O=0;O<12;O++)if(G=p([2e3,O]),I&&!this._longMonthsParse[O]&&(this._longMonthsParse[O]=new RegExp("^"+this.months(G,"").replace(".","")+"$","i"),this._shortMonthsParse[O]=new RegExp("^"+this.monthsShort(G,"").replace(".","")+"$","i")),I||this._monthsParse[O]||(G="^"+this.months(G,"")+"|^"+this.monthsShort(G,""),this._monthsParse[O]=new RegExp(G.replace(".",""),"i")),I&&E==="MMMM"&&this._longMonthsParse[O].test(g)||I&&E==="MMM"&&this._shortMonthsParse[O].test(g)||!I&&this._monthsParse[O].test(g))return O},fe.monthsRegex=function(g){return this._monthsParseExact?(s(this,"_monthsRegex")||me.call(this),g?this._monthsStrictRegex:this._monthsRegex):(s(this,"_monthsRegex")||(this._monthsRegex=Te),this._monthsStrictRegex&&g?this._monthsStrictRegex:this._monthsRegex)},fe.monthsShortRegex=function(g){return this._monthsParseExact?(s(this,"_monthsRegex")||me.call(this),g?this._monthsShortStrictRegex:this._monthsShortRegex):(s(this,"_monthsShortRegex")||(this._monthsShortRegex=be),this._monthsShortStrictRegex&&g?this._monthsShortStrictRegex:this._monthsShortRegex)},fe.week=function(g){return Ke(g,this._week.dow,this._week.doy).week},fe.firstDayOfYear=function(){return this._week.doy},fe.firstDayOfWeek=function(){return this._week.dow},fe.weekdays=function(g,E){return E=i(this._weekdays)?this._weekdays:this._weekdays[g&&g!==!0&&this._weekdays.isFormat.test(E)?"format":"standalone"],g===!0?je(E,this._week.dow):g?E[g.day()]:E},fe.weekdaysMin=function(g){return g===!0?je(this._weekdaysMin,this._week.dow):g?this._weekdaysMin[g.day()]:this._weekdaysMin},fe.weekdaysShort=function(g){return g===!0?je(this._weekdaysShort,this._week.dow):g?this._weekdaysShort[g.day()]:this._weekdaysShort},fe.weekdaysParse=function(g,E,I){var O,G;if(this._weekdaysParseExact)return function(ie,xt,Mt){var Vt,Ot,de,ie=ie.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],Vt=0;Vt<7;++Vt)de=p([2e3,1]).day(Vt),this._minWeekdaysParse[Vt]=this.weekdaysMin(de,"").toLocaleLowerCase(),this._shortWeekdaysParse[Vt]=this.weekdaysShort(de,"").toLocaleLowerCase(),this._weekdaysParse[Vt]=this.weekdays(de,"").toLocaleLowerCase();return Mt?xt==="dddd"?(Ot=jt.call(this._weekdaysParse,ie))!==-1?Ot:null:xt==="ddd"?(Ot=jt.call(this._shortWeekdaysParse,ie))!==-1?Ot:null:(Ot=jt.call(this._minWeekdaysParse,ie))!==-1?Ot:null:xt==="dddd"?(Ot=jt.call(this._weekdaysParse,ie))!==-1||(Ot=jt.call(this._shortWeekdaysParse,ie))!==-1||(Ot=jt.call(this._minWeekdaysParse,ie))!==-1?Ot:null:xt==="ddd"?(Ot=jt.call(this._shortWeekdaysParse,ie))!==-1||(Ot=jt.call(this._weekdaysParse,ie))!==-1||(Ot=jt.call(this._minWeekdaysParse,ie))!==-1?Ot:null:(Ot=jt.call(this._minWeekdaysParse,ie))!==-1||(Ot=jt.call(this._weekdaysParse,ie))!==-1||(Ot=jt.call(this._shortWeekdaysParse,ie))!==-1?Ot:null}.call(this,g,E,I);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),O=0;O<7;O++)if(G=p([2e3,1]).day(O),I&&!this._fullWeekdaysParse[O]&&(this._fullWeekdaysParse[O]=new RegExp("^"+this.weekdays(G,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[O]=new RegExp("^"+this.weekdaysShort(G,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[O]=new RegExp("^"+this.weekdaysMin(G,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[O]||(G="^"+this.weekdays(G,"")+"|^"+this.weekdaysShort(G,"")+"|^"+this.weekdaysMin(G,""),this._weekdaysParse[O]=new RegExp(G.replace(".",""),"i")),I&&E==="dddd"&&this._fullWeekdaysParse[O].test(g)||I&&E==="ddd"&&this._shortWeekdaysParse[O].test(g)||I&&E==="dd"&&this._minWeekdaysParse[O].test(g)||!I&&this._weekdaysParse[O].test(g))return O},fe.weekdaysRegex=function(g){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||ze.call(this),g?this._weekdaysStrictRegex:this._weekdaysRegex):(s(this,"_weekdaysRegex")||(this._weekdaysRegex=At),this._weekdaysStrictRegex&&g?this._weekdaysStrictRegex:this._weekdaysRegex)},fe.weekdaysShortRegex=function(g){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||ze.call(this),g?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(s(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Nt),this._weekdaysShortStrictRegex&&g?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},fe.weekdaysMinRegex=function(g){return this._weekdaysParseExact?(s(this,"_weekdaysRegex")||ze.call(this),g?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(s(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=Jt),this._weekdaysMinStrictRegex&&g?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},fe.isPM=function(g){return(g+"").toLowerCase().charAt(0)==="p"},fe.meridiem=function(g,E,I){return 11<g?I?"pm":"PM":I?"am":"AM"},Xt("en",{eras:[{since:"0001-01-01",until:1/0,offset:1,name:"Anno Domini",narrow:"AD",abbr:"AD"},{since:"0000-12-31",until:-1/0,offset:1,name:"Before Christ",narrow:"BC",abbr:"BC"}],dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(g){var E=g%10;return g+(q(g%100/10)===1?"th":E==1?"st":E==2?"nd":E==3?"rd":"th")}}),n.lang=R("moment.lang is deprecated. Use moment.locale instead.",Xt),n.langData=R("moment.langData is deprecated. Use moment.localeData instead.",ce);var wa=Math.abs;function pR(g,E,I,O){return E=vi(E,I),g._milliseconds+=O*E._milliseconds,g._days+=O*E._days,g._months+=O*E._months,g._bubble()}function gR(g){return g<0?Math.floor(g):Math.ceil(g)}function yR(g){return 4800*g/146097}function g_(g){return 146097*g/4800}function Ta(g){return function(){return this.as(g)}}Rt=Ta("ms"),et=Ta("s"),ne=Ta("m"),Lt=Ta("h"),It=Ta("d"),Ze=Ta("w"),Tt=Ta("M"),to=Ta("Q"),ss=Ta("y");function eo(g){return function(){return this.isValid()?this._data[g]:NaN}}var os=eo("milliseconds"),ls=eo("seconds"),N0=eo("minutes"),fe=eo("hours"),Mst=eo("days"),Lst=eo("months"),Rst=eo("years"),Ea=Math.round,bl={ss:44,s:45,m:45,h:22,d:26,w:null,M:11};function Ist(g,E,I,O){var Ot=vi(g).abs(),de=Ea(Ot.as("s")),G=Ea(Ot.as("m")),ht=Ea(Ot.as("h")),xt=Ea(Ot.as("d")),Mt=Ea(Ot.as("M")),Vt=Ea(Ot.as("w")),Ot=Ea(Ot.as("y")),de=(de<=I.ss?["s",de]:de<I.s&&["ss",de])||G<=1&&["m"]||G<I.m&&["mm",G]||ht<=1&&["h"]||ht<I.h&&["hh",ht]||xt<=1&&["d"]||xt<I.d&&["dd",xt];return(de=(de=I.w!=null?de||Vt<=1&&["w"]||Vt<I.w&&["ww",Vt]:de)||Mt<=1&&["M"]||Mt<I.M&&["MM",Mt]||Ot<=1&&["y"]||["yy",Ot])[2]=E,de[3]=0<+g,de[4]=O,function(ie,er,br,xi,m_){return m_.relativeTime(er||1,!!br,ie,xi)}.apply(null,de)}var y_=Math.abs;function _l(g){return(0<g)-(g<0)||+g}function B0(){if(!this.isValid())return this.localeData().invalidDate();var g,E,I,O,G,ht,xt,Mt=y_(this._milliseconds)/1e3,Vt=y_(this._days),Ot=y_(this._months),de=this.asSeconds();return de?(g=Q(Mt/60),E=Q(g/60),Mt%=60,g%=60,I=Q(Ot/12),Ot%=12,O=Mt?Mt.toFixed(3).replace(/\.?0+$/,""):"",G=_l(this._months)!==_l(de)?"-":"",ht=_l(this._days)!==_l(de)?"-":"",xt=_l(this._milliseconds)!==_l(de)?"-":"",(de<0?"-":"")+"P"+(I?G+I+"Y":"")+(Ot?G+Ot+"M":"")+(Vt?ht+Vt+"D":"")+(E||g||Mt?"T":"")+(E?xt+E+"H":"")+(g?xt+g+"M":"")+(Mt?xt+O+"S":"")):"P0D"}var Be=_i.prototype;return Be.isValid=function(){return this._isValid},Be.abs=function(){var g=this._data;return this._milliseconds=wa(this._milliseconds),this._days=wa(this._days),this._months=wa(this._months),g.milliseconds=wa(g.milliseconds),g.seconds=wa(g.seconds),g.minutes=wa(g.minutes),g.hours=wa(g.hours),g.months=wa(g.months),g.years=wa(g.years),this},Be.add=function(g,E){return pR(this,g,E,1)},Be.subtract=function(g,E){return pR(this,g,E,-1)},Be.as=function(g){if(!this.isValid())return NaN;var E,I,O=this._milliseconds;if((g=tt(g))==="month"||g==="quarter"||g==="year")switch(E=this._days+O/864e5,I=this._months+yR(E),g){case"month":return I;case"quarter":return I/3;case"year":return I/12}else switch(E=this._days+Math.round(g_(this._months)),g){case"week":return E/7+O/6048e5;case"day":return E+O/864e5;case"hour":return 24*E+O/36e5;case"minute":return 1440*E+O/6e4;case"second":return 86400*E+O/1e3;case"millisecond":return Math.floor(864e5*E)+O;default:throw new Error("Unknown unit "+g)}},Be.asMilliseconds=Rt,Be.asSeconds=et,Be.asMinutes=ne,Be.asHours=Lt,Be.asDays=It,Be.asWeeks=Ze,Be.asMonths=Tt,Be.asQuarters=to,Be.asYears=ss,Be.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*q(this._months/12):NaN},Be._bubble=function(){var g=this._milliseconds,E=this._days,I=this._months,O=this._data;return 0<=g&&0<=E&&0<=I||g<=0&&E<=0&&I<=0||(g+=864e5*gR(g_(I)+E),I=E=0),O.milliseconds=g%1e3,g=Q(g/1e3),O.seconds=g%60,g=Q(g/60),O.minutes=g%60,g=Q(g/60),O.hours=g%24,E+=Q(g/24),I+=g=Q(yR(E)),E-=gR(g_(g)),g=Q(I/12),I%=12,O.days=E,O.months=I,O.years=g,this},Be.clone=function(){return vi(this)},Be.get=function(g){return g=tt(g),this.isValid()?this[g+"s"]():NaN},Be.milliseconds=os,Be.seconds=ls,Be.minutes=N0,Be.hours=fe,Be.days=Mst,Be.weeks=function(){return Q(this.days()/7)},Be.months=Lst,Be.years=Rst,Be.humanize=function(g,E){if(!this.isValid())return this.localeData().invalidDate();var I=!1,O=bl;return typeof g=="object"&&(E=g,g=!1),typeof g=="boolean"&&(I=g),typeof E=="object"&&(O=Object.assign({},bl,E),E.s!=null&&E.ss==null&&(O.ss=E.s-1)),g=this.localeData(),E=Ist(this,!I,O,g),I&&(E=g.pastFuture(+this,E)),g.postformat(E)},Be.toISOString=B0,Be.toString=B0,Be.toJSON=B0,Be.locale=sR,Be.localeData=oR,Be.toIsoString=R("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",B0),Be.lang=st,Y("X",0,0,"unix"),Y("x",0,0,"valueOf"),ft("x",pt),ft("X",/[+-]?\d+(\.\d{1,3})?/),Qt("X",function(g,E,I){I._d=new Date(1e3*parseFloat(g))}),Qt("x",function(g,E,I){I._d=new Date(q(g))}),n.version="2.29.4",r=De,n.fn=P,n.min=function(){return hn("isBefore",[].slice.call(arguments,0))},n.max=function(){return hn("isAfter",[].slice.call(arguments,0))},n.now=function(){return Date.now?Date.now():+new Date},n.utc=p,n.unix=function(g){return De(1e3*g)},n.months=function(g,E){return dR(g,E,"months")},n.isDate=h,n.locale=Xt,n.invalid=y,n.duration=vi,n.isMoment=M,n.weekdays=function(g,E,I){return p_(g,E,I,"weekdays")},n.parseZone=function(){return De.apply(null,arguments).parseZone()},n.localeData=ce,n.isDuration=ka,n.monthsShort=function(g,E){return dR(g,E,"monthsShort")},n.weekdaysMin=function(g,E,I){return p_(g,E,I,"weekdaysMin")},n.defineLocale=ee,n.updateLocale=function(g,E){var I,O;return E!=null?(O=va,Ce[g]!=null&&Ce[g].parentLocale!=null?Ce[g].set(B(Ce[g]._config,E)):(E=B(O=(I=Ln(g))!=null?I._config:O,E),I==null&&(E.abbr=g),(O=new w(E)).parentLocale=Ce[g],Ce[g]=O),Xt(g)):Ce[g]!=null&&(Ce[g].parentLocale!=null?(Ce[g]=Ce[g].parentLocale,g===Xt()&&Xt(g)):Ce[g]!=null&&delete Ce[g]),Ce[g]},n.locales=function(){return D(Ce)},n.weekdaysShort=function(g,E,I){return p_(g,E,I,"weekdaysShort")},n.normalizeUnits=tt,n.relativeTimeRounding=function(g){return g===void 0?Ea:typeof g=="function"&&(Ea=g,!0)},n.relativeTimeThreshold=function(g,E){return bl[g]!==void 0&&(E===void 0?bl[g]:(bl[g]=E,g==="s"&&(bl.ss=E-1),!0))},n.calendarFormat=function(g,E){return(g=g.diff(E,"days",!0))<-6?"sameElse":g<-1?"lastWeek":g<0?"lastDay":g<1?"sameDay":g<2?"nextDay":g<7?"nextWeek":"sameElse"},n.prototype=P,n.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},n})})(b_);const Xn=b_.exports,ji={trace:0,debug:1,info:2,warn:3,error:4,fatal:5},H={trace:(...t)=>{},debug:(...t)=>{},info:(...t)=>{},warn:(...t)=>{},error:(...t)=>{},fatal:(...t)=>{}},D0=function(t="fatal"){let e=ji.fatal;typeof t=="string"?(t=t.toLowerCase(),t in ji&&(e=ji[t])):typeof t=="number"&&(e=t),H.trace=()=>{},H.debug=()=>{},H.info=()=>{},H.warn=()=>{},H.error=()=>{},H.fatal=()=>{},e<=ji.fatal&&(H.fatal=console.error?console.error.bind(console,Nn("FATAL"),"color: orange"):console.log.bind(console,"\x1B[35m",Nn("FATAL"))),e<=ji.error&&(H.error=console.error?console.error.bind(console,Nn("ERROR"),"color: orange"):console.log.bind(console,"\x1B[31m",Nn("ERROR"))),e<=ji.warn&&(H.warn=console.warn?console.warn.bind(console,Nn("WARN"),"color: orange"):console.log.bind(console,"\x1B[33m",Nn("WARN"))),e<=ji.info&&(H.info=console.info?console.info.bind(console,Nn("INFO"),"color: lightblue"):console.log.bind(console,"\x1B[34m",Nn("INFO"))),e<=ji.debug&&(H.debug=console.debug?console.debug.bind(console,Nn("DEBUG"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Nn("DEBUG"))),e<=ji.trace&&(H.trace=console.debug?console.debug.bind(console,Nn("TRACE"),"color: lightgreen"):console.log.bind(console,"\x1B[32m",Nn("TRACE")))},Nn=t=>`%c${Xn().format("ss.SSS")} : ${t} : `;var O0={};Object.defineProperty(O0,"__esModule",{value:!0});var ki=O0.sanitizeUrl=void 0,mR=/^([^\w]*)(javascript|data|vbscript)/im,bR=/&#(\w+)(^\w|;)?/g,_R=/[\u0000-\u001F\u007F-\u009F\u2000-\u200D\uFEFF]/gim,vR=/^([^:]+):/gm,xR=[".","/"];function kR(t){return xR.indexOf(t[0])>-1}function wR(t){return t.replace(bR,function(e,r){return String.fromCharCode(r)})}function TR(t){var e=wR(t||"").replace(_R,"").trim();if(!e)return"about:blank";if(kR(e))return e;var r=e.match(vR);if(!r)return e;var n=r[0];return mR.test(n)?"about:blank":e}ki=O0.sanitizeUrl=TR;function Qe(t,e){return t==null||e==null?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function __(t,e){return t==null||e==null?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function xu(t){let e,r,n;t.length!==2?(e=Qe,r=(o,l)=>Qe(t(o),l),n=(o,l)=>t(o)-l):(e=t===Qe||t===__?t:ER,r=t,n=t);function i(o,l,u=0,h=o.length){if(u<h){if(e(l,l)!==0)return h;do{const d=u+h>>>1;r(o[d],l)<0?u=d+1:h=d}while(u<h)}return u}function a(o,l,u=0,h=o.length){if(u<h){if(e(l,l)!==0)return h;do{const d=u+h>>>1;r(o[d],l)<=0?u=d+1:h=d}while(u<h)}return u}function s(o,l,u=0,h=o.length){const d=i(o,l,u,h-1);return d>u&&n(o[d-1],l)>-n(o[d],l)?d-1:d}return{left:i,center:s,right:a}}function ER(){return 0}function v_(t){return t===null?NaN:+t}function*x_(t,e){if(e===void 0)for(let r of t)r!=null&&(r=+r)>=r&&(yield r);else{let r=-1;for(let n of t)(n=e(n,++r,t))!=null&&(n=+n)>=n&&(yield n)}}const k_=xu(Qe),w_=k_.right,CR=k_.left,SR=xu(v_).center,cs=w_;function AR(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 n=F0(e),i=t.slice();return n(t,i,0,r,1),n(i,t,0,r,1),n(t,i,0,r,1),t}const T_=E_(F0),MR=E_(LR);function E_(t){return function(e,r,n=r){if(!((r=+r)>=0))throw new RangeError("invalid rx");if(!((n=+n)>=0))throw new RangeError("invalid ry");let{data:i,width:a,height:s}=e;if(!((a=Math.floor(a))>=0))throw new RangeError("invalid width");if(!((s=Math.floor(s!==void 0?s:i.length/a))>=0))throw new RangeError("invalid height");if(!a||!s||!r&&!n)return e;const o=r&&t(r),l=n&&t(n),u=i.slice();return o&&l?(ro(o,u,i,a,s),ro(o,i,u,a,s),ro(o,u,i,a,s),no(l,i,u,a,s),no(l,u,i,a,s),no(l,i,u,a,s)):o?(ro(o,i,u,a,s),ro(o,u,i,a,s),ro(o,i,u,a,s)):l&&(no(l,i,u,a,s),no(l,u,i,a,s),no(l,i,u,a,s)),e}}function ro(t,e,r,n,i){for(let a=0,s=n*i;a<s;)t(e,r,a,a+=n,1)}function no(t,e,r,n,i){for(let a=0,s=n*i;a<n;++a)t(e,r,a,a+s,n)}function LR(t){const e=F0(t);return(r,n,i,a,s)=>{i<<=2,a<<=2,s<<=2,e(r,n,i+0,a+0,s),e(r,n,i+1,a+1,s),e(r,n,i+2,a+2,s),e(r,n,i+3,a+3,s)}}function F0(t){const e=Math.floor(t);if(e===t)return RR(t);const r=t-e,n=2*t+1;return(i,a,s,o,l)=>{if(!((o-=l)>=s))return;let u=e*a[s];const h=l*e,d=h+l;for(let f=s,p=s+h;f<p;f+=l)u+=a[Math.min(o,f)];for(let f=s,p=o;f<=p;f+=l)u+=a[Math.min(o,f+h)],i[f]=(u+r*(a[Math.max(s,f-d)]+a[Math.min(o,f+d)]))/n,u-=a[Math.max(s,f-h)]}}function RR(t){const e=2*t+1;return(r,n,i,a,s)=>{if(!((a-=s)>=i))return;let o=t*n[i];const l=s*t;for(let u=i,h=i+l;u<h;u+=s)o+=n[Math.min(a,u)];for(let u=i,h=a;u<=h;u+=s)o+=n[Math.min(a,u+l)],r[u]=o/e,o-=n[Math.max(i,u-l)]}}function ku(t,e){let r=0;if(e===void 0)for(let n of t)n!=null&&(n=+n)>=n&&++r;else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(i=+i)>=i&&++r}return r}function IR(t){return t.length|0}function NR(t){return!(t>0)}function BR(t){return typeof t!="object"||"length"in t?t:Array.from(t)}function DR(t){return e=>t(...e)}function OR(...t){const e=typeof t[t.length-1]=="function"&&DR(t.pop());t=t.map(BR);const r=t.map(IR),n=t.length-1,i=new Array(n+1).fill(0),a=[];if(n<0||r.some(NR))return a;for(;;){a.push(i.map((o,l)=>t[l][o]));let s=n;for(;++i[s]===r[s];){if(s===0)return e?a.map(e):a;i[s--]=0}}}function FR(t,e){var r=0,n=0;return Float64Array.from(t,e===void 0?i=>r+=+i||0:i=>r+=+e(i,n++,t)||0)}function C_(t,e){let r=0,n,i=0,a=0;if(e===void 0)for(let s of t)s!=null&&(s=+s)>=s&&(n=s-i,i+=n/++r,a+=n*(s-i));else{let s=-1;for(let o of t)(o=e(o,++s,t))!=null&&(o=+o)>=o&&(n=o-i,i+=n/++r,a+=n*(o-i))}if(r>1)return a/(r-1)}function S_(t,e){const r=C_(t,e);return r&&Math.sqrt(r)}function xl(t,e){let r,n;if(e===void 0)for(const i of t)i!=null&&(r===void 0?i>=i&&(r=n=i):(r>i&&(r=i),n<i&&(n=i)));else{let i=-1;for(let a of t)(a=e(a,++i,t))!=null&&(r===void 0?a>=a&&(r=n=a):(r>a&&(r=a),n<a&&(n=a)))}return[r,n]}class _r{constructor(){this._partials=new Float64Array(32),this._n=0}add(e){const r=this._partials;let n=0;for(let i=0;i<this._n&&i<32;i++){const a=r[i],s=e+a,o=Math.abs(e)<Math.abs(a)?e-(s-a):a-(s-e);o&&(r[n++]=o),e=s}return r[n]=e,this._n=n+1,this}valueOf(){const e=this._partials;let r=this._n,n,i,a,s=0;if(r>0){for(s=e[--r];r>0&&(n=s,i=e[--r],s=n+i,a=i-(s-n),!a););r>0&&(a<0&&e[r-1]<0||a>0&&e[r-1]>0)&&(i=a*2,n=s+i,i==n-s&&(s=n))}return s}}function PR(t,e){const r=new _r;if(e===void 0)for(let n of t)(n=+n)&&r.add(n);else{let n=-1;for(let i of t)(i=+e(i,++n,t))&&r.add(i)}return+r}function qR(t,e){const r=new _r;let n=-1;return Float64Array.from(t,e===void 0?i=>r.add(+i||0):i=>r.add(+e(i,++n,t)||0))}class kl extends Map{constructor(e,r=L_){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(const[n,i]of e)this.set(n,i)}get(e){return super.get(P0(this,e))}has(e){return super.has(P0(this,e))}set(e,r){return super.set(A_(this,e),r)}delete(e){return super.delete(M_(this,e))}}class us extends Set{constructor(e,r=L_){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:r}}),e!=null)for(const n of e)this.add(n)}has(e){return super.has(P0(this,e))}add(e){return super.add(A_(this,e))}delete(e){return super.delete(M_(this,e))}}function P0({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):r}function A_({_intern:t,_key:e},r){const n=e(r);return t.has(n)?t.get(n):(t.set(n,r),r)}function M_({_intern:t,_key:e},r){const n=e(r);return t.has(n)&&(r=t.get(n),t.delete(n)),r}function L_(t){return t!==null&&typeof t=="object"?t.valueOf():t}function io(t){return t}function R_(t,...e){return ao(t,io,io,e)}function I_(t,...e){return ao(t,Array.from,io,e)}function N_(t,e){for(let r=1,n=e.length;r<n;++r)t=t.flatMap(i=>i.pop().map(([a,s])=>[...i,a,s]));return t}function VR(t,...e){return N_(I_(t,...e),e)}function zR(t,e,...r){return N_(D_(t,e,...r),r)}function B_(t,e,...r){return ao(t,io,e,r)}function D_(t,e,...r){return ao(t,Array.from,e,r)}function YR(t,...e){return ao(t,io,O_,e)}function UR(t,...e){return ao(t,Array.from,O_,e)}function O_(t){if(t.length!==1)throw new Error("duplicate key");return t[0]}function ao(t,e,r,n){return function i(a,s){if(s>=n.length)return r(a);const o=new kl,l=n[s++];let u=-1;for(const h of a){const d=l(h,++u,a),f=o.get(d);f?f.push(h):o.set(d,[h])}for(const[h,d]of o)o.set(h,i(d,s));return e(o)}(t,0)}function F_(t,e){return Array.from(e,r=>t[r])}function q0(t,...e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");t=Array.from(t);let[r]=e;if(r&&r.length!==2||e.length>1){const n=Uint32Array.from(t,(i,a)=>a);return e.length>1?(e=e.map(i=>t.map(i)),n.sort((i,a)=>{for(const s of e){const o=so(s[i],s[a]);if(o)return o}})):(r=t.map(r),n.sort((i,a)=>so(r[i],r[a]))),F_(t,n)}return t.sort(V0(r))}function V0(t=Qe){if(t===Qe)return so;if(typeof t!="function")throw new TypeError("compare is not a function");return(e,r)=>{const n=t(e,r);return n||n===0?n:(t(r,r)===0)-(t(e,e)===0)}}function so(t,e){return(t==null||!(t>=t))-(e==null||!(e>=e))||(t<e?-1:t>e?1:0)}function WR(t,e,r){return(e.length!==2?q0(B_(t,e,r),([n,i],[a,s])=>Qe(i,s)||Qe(n,a)):q0(R_(t,r),([n,i],[a,s])=>e(i,s)||Qe(n,a))).map(([n])=>n)}var HR=Array.prototype,GR=HR.slice;function wu(t){return()=>t}var z0=Math.sqrt(50),Y0=Math.sqrt(10),U0=Math.sqrt(2);function hs(t,e,r){var n,i=-1,a,s,o;if(e=+e,t=+t,r=+r,t===e&&r>0)return[t];if((n=e<t)&&(a=t,t=e,e=a),(o=oo(t,e,r))===0||!isFinite(o))return[];if(o>0){let l=Math.round(t/o),u=Math.round(e/o);for(l*o<t&&++l,u*o>e&&--u,s=new Array(a=u-l+1);++i<a;)s[i]=(l+i)*o}else{o=-o;let l=Math.round(t*o),u=Math.round(e*o);for(l/o<t&&++l,u/o>e&&--u,s=new Array(a=u-l+1);++i<a;)s[i]=(l+i)/o}return n&&s.reverse(),s}function oo(t,e,r){var n=(e-t)/Math.max(0,r),i=Math.floor(Math.log(n)/Math.LN10),a=n/Math.pow(10,i);return i>=0?(a>=z0?10:a>=Y0?5:a>=U0?2:1)*Math.pow(10,i):-Math.pow(10,-i)/(a>=z0?10:a>=Y0?5:a>=U0?2:1)}function wl(t,e,r){var n=Math.abs(e-t)/Math.max(0,r),i=Math.pow(10,Math.floor(Math.log(n)/Math.LN10)),a=n/i;return a>=z0?i*=10:a>=Y0?i*=5:a>=U0&&(i*=2),e<t?-i:i}function P_(t,e,r){let n;for(;;){const i=oo(t,e,r);if(i===n||i===0||!isFinite(i))return[t,e];i>0?(t=Math.floor(t/i)*i,e=Math.ceil(e/i)*i):i<0&&(t=Math.ceil(t*i)/i,e=Math.floor(e*i)/i),n=i}}function W0(t){return Math.ceil(Math.log(ku(t))/Math.LN2)+1}function q_(){var t=io,e=xl,r=W0;function n(i){Array.isArray(i)||(i=Array.from(i));var a,s=i.length,o,l,u=new Array(s);for(a=0;a<s;++a)u[a]=t(i[a],a,i);var h=e(u),d=h[0],f=h[1],p=r(u,d,f);if(!Array.isArray(p)){const b=f,x=+p;if(e===xl&&([d,f]=P_(d,f,x)),p=hs(d,f,x),p[0]<=d&&(l=oo(d,f,x)),p[p.length-1]>=f)if(b>=f&&e===xl){const k=oo(d,f,x);isFinite(k)&&(k>0?f=(Math.floor(f/k)+1)*k:k<0&&(f=(Math.ceil(f*-k)+1)/-k))}else p.pop()}for(var m=p.length;p[0]<=d;)p.shift(),--m;for(;p[m-1]>f;)p.pop(),--m;var _=new Array(m+1),y;for(a=0;a<=m;++a)y=_[a]=[],y.x0=a>0?p[a-1]:d,y.x1=a<m?p[a]:f;if(isFinite(l)){if(l>0)for(a=0;a<s;++a)(o=u[a])!=null&&d<=o&&o<=f&&_[Math.min(m,Math.floor((o-d)/l))].push(i[a]);else if(l<0){for(a=0;a<s;++a)if((o=u[a])!=null&&d<=o&&o<=f){const b=Math.floor((d-o)*l);_[Math.min(m,b+(p[b]<=o))].push(i[a])}}}else for(a=0;a<s;++a)(o=u[a])!=null&&d<=o&&o<=f&&_[cs(p,o,0,m)].push(i[a]);return _}return n.value=function(i){return arguments.length?(t=typeof i=="function"?i:wu(i),n):t},n.domain=function(i){return arguments.length?(e=typeof i=="function"?i:wu([i[0],i[1]]),n):e},n.thresholds=function(i){return arguments.length?(r=typeof i=="function"?i:Array.isArray(i)?wu(GR.call(i)):wu(i),n):r},n}function lo(t,e){let r;if(e===void 0)for(const n of t)n!=null&&(r<n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r<i||r===void 0&&i>=i)&&(r=i)}return r}function H0(t,e){let r,n=-1,i=-1;if(e===void 0)for(const a of t)++i,a!=null&&(r<a||r===void 0&&a>=a)&&(r=a,n=i);else for(let a of t)(a=e(a,++i,t))!=null&&(r<a||r===void 0&&a>=a)&&(r=a,n=i);return n}function Tl(t,e){let r;if(e===void 0)for(const n of t)n!=null&&(r>n||r===void 0&&n>=n)&&(r=n);else{let n=-1;for(let i of t)(i=e(i,++n,t))!=null&&(r>i||r===void 0&&i>=i)&&(r=i)}return r}function G0(t,e){let r,n=-1,i=-1;if(e===void 0)for(const a of t)++i,a!=null&&(r>a||r===void 0&&a>=a)&&(r=a,n=i);else for(let a of t)(a=e(a,++i,t))!=null&&(r>a||r===void 0&&a>=a)&&(r=a,n=i);return n}function Tu(t,e,r=0,n=t.length-1,i){for(i=i===void 0?so:V0(i);n>r;){if(n-r>600){const l=n-r+1,u=e-r+1,h=Math.log(l),d=.5*Math.exp(2*h/3),f=.5*Math.sqrt(h*d*(l-d)/l)*(u-l/2<0?-1:1),p=Math.max(r,Math.floor(e-u*d/l+f)),m=Math.min(n,Math.floor(e+(l-u)*d/l+f));Tu(t,e,p,m,i)}const a=t[e];let s=r,o=n;for(El(t,r,e),i(t[n],a)>0&&El(t,r,n);s<o;){for(El(t,s,o),++s,--o;i(t[s],a)<0;)++s;for(;i(t[o],a)>0;)--o}i(t[r],a)===0?El(t,r,o):(++o,El(t,o,n)),o<=e&&(r=o+1),e<=o&&(n=o-1)}return t}function El(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function V_(t,e=Qe){let r,n=!1;if(e.length===1){let i;for(const a of t){const s=e(a);(n?Qe(s,i)>0:Qe(s,s)===0)&&(r=a,i=s,n=!0)}}else for(const i of t)(n?e(i,r)>0:e(i,i)===0)&&(r=i,n=!0);return r}function Cl(t,e,r){if(t=Float64Array.from(x_(t,r)),!!(n=t.length)){if((e=+e)<=0||n<2)return Tl(t);if(e>=1)return lo(t);var n,i=(n-1)*e,a=Math.floor(i),s=lo(Tu(t,a).subarray(0,a+1)),o=Tl(t.subarray(a+1));return s+(o-s)*(i-a)}}function z_(t,e,r=v_){if(!!(n=t.length)){if((e=+e)<=0||n<2)return+r(t[0],0,t);if(e>=1)return+r(t[n-1],n-1,t);var n,i=(n-1)*e,a=Math.floor(i),s=+r(t[a],a,t),o=+r(t[a+1],a+1,t);return s+(o-s)*(i-a)}}function Y_(t,e,r){if(t=Float64Array.from(x_(t,r)),!!(n=t.length)){if((e=+e)<=0||n<2)return G0(t);if(e>=1)return H0(t);var n,i=Math.floor((n-1)*e),a=(o,l)=>so(t[o],t[l]),s=Tu(Uint32Array.from(t,(o,l)=>l),i,0,n-1,a);return V_(s.subarray(0,i+1),o=>t[o])}}function jR(t,e,r){return Math.ceil((r-e)/(2*(Cl(t,.75)-Cl(t,.25))*Math.pow(ku(t),-1/3)))}function $R(t,e,r){return Math.ceil((r-e)*Math.cbrt(ku(t))/(3.49*S_(t)))}function XR(t,e){let r=0,n=0;if(e===void 0)for(let i of t)i!=null&&(i=+i)>=i&&(++r,n+=i);else{let i=-1;for(let a of t)(a=e(a,++i,t))!=null&&(a=+a)>=a&&(++r,n+=a)}if(r)return n/r}function KR(t,e){return Cl(t,.5,e)}function ZR(t,e){return Y_(t,.5,e)}function*QR(t){for(const e of t)yield*e}function j0(t){return Array.from(QR(t))}function JR(t,e){const r=new kl;if(e===void 0)for(let a of t)a!=null&&a>=a&&r.set(a,(r.get(a)||0)+1);else{let a=-1;for(let s of t)(s=e(s,++a,t))!=null&&s>=s&&r.set(s,(r.get(s)||0)+1)}let n,i=0;for(const[a,s]of r)s>i&&(i=s,n=a);return n}function tI(t,e=eI){const r=[];let n,i=!1;for(const a of t)i&&r.push(e(n,a)),n=a,i=!0;return r}function eI(t,e){return[t,e]}function Ca(t,e,r){t=+t,e=+e,r=(i=arguments.length)<2?(e=t,t=0,1):i<3?1:+r;for(var n=-1,i=Math.max(0,Math.ceil((e-t)/r))|0,a=new Array(i);++n<i;)a[n]=t+n*r;return a}function rI(t,e=Qe){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");let r=Array.from(t);const n=new Float64Array(r.length);e.length!==2&&(r=r.map(e),e=Qe);const i=(o,l)=>e(r[o],r[l]);let a,s;return Uint32Array.from(r,(o,l)=>l).sort(e===Qe?(o,l)=>so(r[o],r[l]):V0(i)).forEach((o,l)=>{const u=i(o,a===void 0?o:a);u>=0?((a===void 0||u>0)&&(a=o,s=l),n[o]=s):n[o]=NaN}),n}function nI(t,e=Qe){let r,n=!1;if(e.length===1){let i;for(const a of t){const s=e(a);(n?Qe(s,i)<0:Qe(s,s)===0)&&(r=a,i=s,n=!0)}}else for(const i of t)(n?e(i,r)<0:e(i,i)===0)&&(r=i,n=!0);return r}function U_(t,e=Qe){if(e.length===1)return G0(t,e);let r,n=-1,i=-1;for(const a of t)++i,(n<0?e(a,a)===0:e(a,r)<0)&&(r=a,n=i);return n}function iI(t,e=Qe){if(e.length===1)return H0(t,e);let r,n=-1,i=-1;for(const a of t)++i,(n<0?e(a,a)===0:e(a,r)>0)&&(r=a,n=i);return n}function aI(t,e){const r=U_(t,e);return r<0?void 0:r}const sI=W_(Math.random);function W_(t){return function(r,n=0,i=r.length){let a=i-(n=+n);for(;a;){const s=t()*a--|0,o=r[a+n];r[a+n]=r[s+n],r[s+n]=o}return r}}function oI(t,e){let r=0;if(e===void 0)for(let n of t)(n=+n)&&(r+=n);else{let n=-1;for(let i of t)(i=+e(i,++n,t))&&(r+=i)}return r}function H_(t){if(!(a=t.length))return[];for(var e=-1,r=Tl(t,lI),n=new Array(r);++e<r;)for(var i=-1,a,s=n[e]=new Array(a);++i<a;)s[i]=t[i][e];return n}function lI(t){return t.length}function cI(){return H_(arguments)}function uI(t,e){if(typeof e!="function")throw new TypeError("test is not a function");let r=-1;for(const n of t)if(!e(n,++r,t))return!1;return!0}function hI(t,e){if(typeof e!="function")throw new TypeError("test is not a function");let r=-1;for(const n of t)if(e(n,++r,t))return!0;return!1}function fI(t,e){if(typeof e!="function")throw new TypeError("test is not a function");const r=[];let n=-1;for(const i of t)e(i,++n,t)&&r.push(i);return r}function dI(t,e){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");if(typeof e!="function")throw new TypeError("mapper is not a function");return Array.from(t,(r,n)=>e(r,n,t))}function pI(t,e,r){if(typeof e!="function")throw new TypeError("reducer is not a function");const n=t[Symbol.iterator]();let i,a,s=-1;if(arguments.length<3){if({done:i,value:r}=n.next(),i)return;++s}for(;{done:i,value:a}=n.next(),!i;)r=e(r,a,++s,t);return r}function gI(t){if(typeof t[Symbol.iterator]!="function")throw new TypeError("values is not iterable");return Array.from(t).reverse()}function yI(t,...e){t=new us(t);for(const r of e)for(const n of r)t.delete(n);return t}function mI(t,e){const r=e[Symbol.iterator](),n=new us;for(const i of t){if(n.has(i))return!1;let a,s;for(;({value:a,done:s}=r.next())&&!s;){if(Object.is(i,a))return!1;n.add(a)}}return!0}function bI(t,...e){t=new us(t),e=e.map(_I);t:for(const r of t)for(const n of e)if(!n.has(r)){t.delete(r);continue t}return t}function _I(t){return t instanceof us?t:new us(t)}function G_(t,e){const r=t[Symbol.iterator](),n=new Set;for(const i of e){const a=j_(i);if(n.has(a))continue;let s,o;for(;{value:s,done:o}=r.next();){if(o)return!1;const l=j_(s);if(n.add(l),Object.is(a,l))break}}return!0}function j_(t){return t!==null&&typeof t=="object"?t.valueOf():t}function vI(t,e){return G_(e,t)}function xI(...t){const e=new us;for(const r of t)for(const n of r)e.add(n);return e}function kI(t){return t}var Eu=1,Cu=2,$0=3,Sl=4,$_=1e-6;function wI(t){return"translate("+t+",0)"}function TI(t){return"translate(0,"+t+")"}function EI(t){return e=>+t(e)}function CI(t,e){return e=Math.max(0,t.bandwidth()-e*2)/2,t.round()&&(e=Math.round(e)),r=>+t(r)+e}function SI(){return!this.__axis}function Su(t,e){var r=[],n=null,i=null,a=6,s=6,o=3,l=typeof window<"u"&&window.devicePixelRatio>1?0:.5,u=t===Eu||t===Sl?-1:1,h=t===Sl||t===Cu?"x":"y",d=t===Eu||t===$0?wI:TI;function f(p){var m=n==null?e.ticks?e.ticks.apply(e,r):e.domain():n,_=i==null?e.tickFormat?e.tickFormat.apply(e,r):kI:i,y=Math.max(a,0)+o,b=e.range(),x=+b[0]+l,k=+b[b.length-1]+l,T=(e.bandwidth?CI:EI)(e.copy(),l),C=p.selection?p.selection():p,M=C.selectAll(".domain").data([null]),S=C.selectAll(".tick").data(m,e).order(),R=S.exit(),A=S.enter().append("g").attr("class","tick"),L=S.select("line"),v=S.select("text");M=M.merge(M.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),S=S.merge(A),L=L.merge(A.append("line").attr("stroke","currentColor").attr(h+"2",u*a)),v=v.merge(A.append("text").attr("fill","currentColor").attr(h,u*y).attr("dy",t===Eu?"0em":t===$0?"0.71em":"0.32em")),p!==C&&(M=M.transition(p),S=S.transition(p),L=L.transition(p),v=v.transition(p),R=R.transition(p).attr("opacity",$_).attr("transform",function(B){return isFinite(B=T(B))?d(B+l):this.getAttribute("transform")}),A.attr("opacity",$_).attr("transform",function(B){var w=this.parentNode.__axis;return d((w&&isFinite(w=w(B))?w:T(B))+l)})),R.remove(),M.attr("d",t===Sl||t===Cu?s?"M"+u*s+","+x+"H"+l+"V"+k+"H"+u*s:"M"+l+","+x+"V"+k:s?"M"+x+","+u*s+"V"+l+"H"+k+"V"+u*s:"M"+x+","+l+"H"+k),S.attr("opacity",1).attr("transform",function(B){return d(T(B)+l)}),L.attr(h+"2",u*a),v.attr(h,u*y).text(_),C.filter(SI).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",t===Cu?"start":t===Sl?"end":"middle"),C.each(function(){this.__axis=T})}return f.scale=function(p){return arguments.length?(e=p,f):e},f.ticks=function(){return r=Array.from(arguments),f},f.tickArguments=function(p){return arguments.length?(r=p==null?[]:Array.from(p),f):r.slice()},f.tickValues=function(p){return arguments.length?(n=p==null?null:Array.from(p),f):n&&n.slice()},f.tickFormat=function(p){return arguments.length?(i=p,f):i},f.tickSize=function(p){return arguments.length?(a=s=+p,f):a},f.tickSizeInner=function(p){return arguments.length?(a=+p,f):a},f.tickSizeOuter=function(p){return arguments.length?(s=+p,f):s},f.tickPadding=function(p){return arguments.length?(o=+p,f):o},f.offset=function(p){return arguments.length?(l=+p,f):l},f}function X_(t){return Su(Eu,t)}function AI(t){return Su(Cu,t)}function K_(t){return Su($0,t)}function MI(t){return Su(Sl,t)}var LI={value:()=>{}};function fs(){for(var t=0,e=arguments.length,r={},n;t<e;++t){if(!(n=arguments[t]+"")||n in r||/[\s.]/.test(n))throw new Error("illegal type: "+n);r[n]=[]}return new Au(r)}function Au(t){this._=t}function RI(t,e){return t.trim().split(/^|\s+/).map(function(r){var n="",i=r.indexOf(".");if(i>=0&&(n=r.slice(i+1),r=r.slice(0,i)),r&&!e.hasOwnProperty(r))throw new Error("unknown type: "+r);return{type:r,name:n}})}Au.prototype=fs.prototype={constructor:Au,on:function(t,e){var r=this._,n=RI(t+"",r),i,a=-1,s=n.length;if(arguments.length<2){for(;++a<s;)if((i=(t=n[a]).type)&&(i=II(r[i],t.name)))return i;return}if(e!=null&&typeof e!="function")throw new Error("invalid callback: "+e);for(;++a<s;)if(i=(t=n[a]).type)r[i]=Z_(r[i],t.name,e);else if(e==null)for(i in r)r[i]=Z_(r[i],t.name,null);return this},copy:function(){var t={},e=this._;for(var r in e)t[r]=e[r].slice();return new Au(t)},call:function(t,e){if((i=arguments.length-2)>0)for(var r=new Array(i),n=0,i,a;n<i;++n)r[n]=arguments[n+2];if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(a=this._[t],n=0,i=a.length;n<i;++n)a[n].value.apply(e,r)},apply:function(t,e,r){if(!this._.hasOwnProperty(t))throw new Error("unknown type: "+t);for(var n=this._[t],i=0,a=n.length;i<a;++i)n[i].value.apply(e,r)}};function II(t,e){for(var r=0,n=t.length,i;r<n;++r)if((i=t[r]).name===e)return i.value}function Z_(t,e,r){for(var n=0,i=t.length;n<i;++n)if(t[n].name===e){t[n]=LI,t=t.slice(0,n).concat(t.slice(n+1));break}return r!=null&&t.push({name:e,value:r}),t}var X0="http://www.w3.org/1999/xhtml";const K0={svg:"http://www.w3.org/2000/svg",xhtml:X0,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function Al(t){var e=t+="",r=e.indexOf(":");return r>=0&&(e=t.slice(0,r))!=="xmlns"&&(t=t.slice(r+1)),K0.hasOwnProperty(e)?{space:K0[e],local:t}:t}function NI(t){return function(){var e=this.ownerDocument,r=this.namespaceURI;return r===X0&&e.documentElement.namespaceURI===X0?e.createElement(t):e.createElementNS(r,t)}}function BI(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}function Mu(t){var e=Al(t);return(e.local?BI:NI)(e)}function DI(){}function Lu(t){return t==null?DI:function(){return this.querySelector(t)}}function OI(t){typeof t!="function"&&(t=Lu(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var a=e[i],s=a.length,o=n[i]=new Array(s),l,u,h=0;h<s;++h)(l=a[h])&&(u=t.call(l,l.__data__,h,a))&&("__data__"in l&&(u.__data__=l.__data__),o[h]=u);return new $r(n,this._parents)}function Q_(t){return t==null?[]:Array.isArray(t)?t:Array.from(t)}function FI(){return[]}function Z0(t){return t==null?FI:function(){return this.querySelectorAll(t)}}function PI(t){return function(){return Q_(t.apply(this,arguments))}}function qI(t){typeof t=="function"?t=PI(t):t=Z0(t);for(var e=this._groups,r=e.length,n=[],i=[],a=0;a<r;++a)for(var s=e[a],o=s.length,l,u=0;u<o;++u)(l=s[u])&&(n.push(t.call(l,l.__data__,u,s)),i.push(l));return new $r(n,i)}function Q0(t){return function(){return this.matches(t)}}function J_(t){return function(e){return e.matches(t)}}var VI=Array.prototype.find;function zI(t){return function(){return VI.call(this.children,t)}}function YI(){return this.firstElementChild}function UI(t){return this.select(t==null?YI:zI(typeof t=="function"?t:J_(t)))}var WI=Array.prototype.filter;function HI(){return Array.from(this.children)}function GI(t){return function(){return WI.call(this.children,t)}}function jI(t){return this.selectAll(t==null?HI:GI(typeof t=="function"?t:J_(t)))}function $I(t){typeof t!="function"&&(t=Q0(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var a=e[i],s=a.length,o=n[i]=[],l,u=0;u<s;++u)(l=a[u])&&t.call(l,l.__data__,u,a)&&o.push(l);return new $r(n,this._parents)}function t5(t){return new Array(t.length)}function XI(){return new $r(this._enter||this._groups.map(t5),this._parents)}function Ru(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}Ru.prototype={constructor:Ru,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}};function KI(t){return function(){return t}}function ZI(t,e,r,n,i,a){for(var s=0,o,l=e.length,u=a.length;s<u;++s)(o=e[s])?(o.__data__=a[s],n[s]=o):r[s]=new Ru(t,a[s]);for(;s<l;++s)(o=e[s])&&(i[s]=o)}function QI(t,e,r,n,i,a,s){var o,l,u=new Map,h=e.length,d=a.length,f=new Array(h),p;for(o=0;o<h;++o)(l=e[o])&&(f[o]=p=s.call(l,l.__data__,o,e)+"",u.has(p)?i[o]=l:u.set(p,l));for(o=0;o<d;++o)p=s.call(t,a[o],o,a)+"",(l=u.get(p))?(n[o]=l,l.__data__=a[o],u.delete(p)):r[o]=new Ru(t,a[o]);for(o=0;o<h;++o)(l=e[o])&&u.get(f[o])===l&&(i[o]=l)}function JI(t){return t.__data__}function tN(t,e){if(!arguments.length)return Array.from(this,JI);var r=e?QI:ZI,n=this._parents,i=this._groups;typeof t!="function"&&(t=KI(t));for(var a=i.length,s=new Array(a),o=new Array(a),l=new Array(a),u=0;u<a;++u){var h=n[u],d=i[u],f=d.length,p=eN(t.call(h,h&&h.__data__,u,n)),m=p.length,_=o[u]=new Array(m),y=s[u]=new Array(m),b=l[u]=new Array(f);r(h,d,_,y,b,p,e);for(var x=0,k=0,T,C;x<m;++x)if(T=_[x]){for(x>=k&&(k=x+1);!(C=y[k])&&++k<m;);T._next=C||null}}return s=new $r(s,n),s._enter=o,s._exit=l,s}function eN(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function rN(){return new $r(this._exit||this._groups.map(t5),this._parents)}function nN(t,e,r){var n=this.enter(),i=this,a=this.exit();return typeof t=="function"?(n=t(n),n&&(n=n.selection())):n=n.append(t+""),e!=null&&(i=e(i),i&&(i=i.selection())),r==null?a.remove():r(a),n&&i?n.merge(i).order():i}function iN(t){for(var e=t.selection?t.selection():t,r=this._groups,n=e._groups,i=r.length,a=n.length,s=Math.min(i,a),o=new Array(i),l=0;l<s;++l)for(var u=r[l],h=n[l],d=u.length,f=o[l]=new Array(d),p,m=0;m<d;++m)(p=u[m]||h[m])&&(f[m]=p);for(;l<i;++l)o[l]=r[l];return new $r(o,this._parents)}function aN(){for(var t=this._groups,e=-1,r=t.length;++e<r;)for(var n=t[e],i=n.length-1,a=n[i],s;--i>=0;)(s=n[i])&&(a&&s.compareDocumentPosition(a)^4&&a.parentNode.insertBefore(s,a),a=s);return this}function sN(t){t||(t=oN);function e(d,f){return d&&f?t(d.__data__,f.__data__):!d-!f}for(var r=this._groups,n=r.length,i=new Array(n),a=0;a<n;++a){for(var s=r[a],o=s.length,l=i[a]=new Array(o),u,h=0;h<o;++h)(u=s[h])&&(l[h]=u);l.sort(e)}return new $r(i,this._parents).order()}function oN(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function lN(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this}function cN(){return Array.from(this)}function uN(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var n=t[e],i=0,a=n.length;i<a;++i){var s=n[i];if(s)return s}return null}function hN(){let t=0;for(const e of this)++t;return t}function fN(){return!this.node()}function dN(t){for(var e=this._groups,r=0,n=e.length;r<n;++r)for(var i=e[r],a=0,s=i.length,o;a<s;++a)(o=i[a])&&t.call(o,o.__data__,a,i);return this}function pN(t){return function(){this.removeAttribute(t)}}function gN(t){return function(){this.removeAttributeNS(t.space,t.local)}}function yN(t,e){return function(){this.setAttribute(t,e)}}function mN(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}function bN(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttribute(t):this.setAttribute(t,r)}}function _N(t,e){return function(){var r=e.apply(this,arguments);r==null?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,r)}}function vN(t,e){var r=Al(t);if(arguments.length<2){var n=this.node();return r.local?n.getAttributeNS(r.space,r.local):n.getAttribute(r)}return this.each((e==null?r.local?gN:pN:typeof e=="function"?r.local?_N:bN:r.local?mN:yN)(r,e))}function J0(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function xN(t){return function(){this.style.removeProperty(t)}}function kN(t,e,r){return function(){this.style.setProperty(t,e,r)}}function wN(t,e,r){return function(){var n=e.apply(this,arguments);n==null?this.style.removeProperty(t):this.style.setProperty(t,n,r)}}function TN(t,e,r){return arguments.length>1?this.each((e==null?xN:typeof e=="function"?wN:kN)(t,e,r==null?"":r)):ds(this.node(),t)}function ds(t,e){return t.style.getPropertyValue(e)||J0(t).getComputedStyle(t,null).getPropertyValue(e)}function EN(t){return function(){delete this[t]}}function CN(t,e){return function(){this[t]=e}}function SN(t,e){return function(){var r=e.apply(this,arguments);r==null?delete this[t]:this[t]=r}}function AN(t,e){return arguments.length>1?this.each((e==null?EN:typeof e=="function"?SN:CN)(t,e)):this.node()[t]}function e5(t){return t.trim().split(/^|\s+/)}function td(t){return t.classList||new r5(t)}function r5(t){this._node=t,this._names=e5(t.getAttribute("class")||"")}r5.prototype={add:function(t){var e=this._names.indexOf(t);e<0&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};function n5(t,e){for(var r=td(t),n=-1,i=e.length;++n<i;)r.add(e[n])}function i5(t,e){for(var r=td(t),n=-1,i=e.length;++n<i;)r.remove(e[n])}function MN(t){return function(){n5(this,t)}}function LN(t){return function(){i5(this,t)}}function RN(t,e){return function(){(e.apply(this,arguments)?n5:i5)(this,t)}}function IN(t,e){var r=e5(t+"");if(arguments.length<2){for(var n=td(this.node()),i=-1,a=r.length;++i<a;)if(!n.contains(r[i]))return!1;return!0}return this.each((typeof e=="function"?RN:e?MN:LN)(r,e))}function NN(){this.textContent=""}function BN(t){return function(){this.textContent=t}}function DN(t){return function(){var e=t.apply(this,arguments);this.textContent=e==null?"":e}}function ON(t){return arguments.length?this.each(t==null?NN:(typeof t=="function"?DN:BN)(t)):this.node().textContent}function FN(){this.innerHTML=""}function PN(t){return function(){this.innerHTML=t}}function qN(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e==null?"":e}}function VN(t){return arguments.length?this.each(t==null?FN:(typeof t=="function"?qN:PN)(t)):this.node().innerHTML}function zN(){this.nextSibling&&this.parentNode.appendChild(this)}function YN(){return this.each(zN)}function UN(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function WN(){return this.each(UN)}function HN(t){var e=typeof t=="function"?t:Mu(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})}function GN(){return null}function jN(t,e){var r=typeof t=="function"?t:Mu(t),n=e==null?GN:typeof e=="function"?e:Lu(e);return this.select(function(){return this.insertBefore(r.apply(this,arguments),n.apply(this,arguments)||null)})}function $N(){var t=this.parentNode;t&&t.removeChild(this)}function XN(){return this.each($N)}function KN(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function ZN(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function QN(t){return this.select(t?ZN:KN)}function JN(t){return arguments.length?this.property("__data__",t):this.node().__data__}function tB(t){return function(e){t.call(this,e,this.__data__)}}function eB(t){return t.trim().split(/^|\s+/).map(function(e){var r="",n=e.indexOf(".");return n>=0&&(r=e.slice(n+1),e=e.slice(0,n)),{type:e,name:r}})}function rB(t){return function(){var e=this.__on;if(!!e){for(var r=0,n=-1,i=e.length,a;r<i;++r)a=e[r],(!t.type||a.type===t.type)&&a.name===t.name?this.removeEventListener(a.type,a.listener,a.options):e[++n]=a;++n?e.length=n:delete this.__on}}}function nB(t,e,r){return function(){var n=this.__on,i,a=tB(e);if(n){for(var s=0,o=n.length;s<o;++s)if((i=n[s]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=a,i.options=r),i.value=e;return}}this.addEventListener(t.type,a,r),i={type:t.type,name:t.name,value:e,listener:a,options:r},n?n.push(i):this.__on=[i]}}function iB(t,e,r){var n=eB(t+""),i,a=n.length,s;if(arguments.length<2){var o=this.node().__on;if(o){for(var l=0,u=o.length,h;l<u;++l)for(i=0,h=o[l];i<a;++i)if((s=n[i]).type===h.type&&s.name===h.name)return h.value}return}for(o=e?nB:rB,i=0;i<a;++i)this.each(o(n[i],e,r));return this}function a5(t,e,r){var n=J0(t),i=n.CustomEvent;typeof i=="function"?i=new i(e,r):(i=n.document.createEvent("Event"),r?(i.initEvent(e,r.bubbles,r.cancelable),i.detail=r.detail):i.initEvent(e,!1,!1)),t.dispatchEvent(i)}function aB(t,e){return function(){return a5(this,t,e)}}function sB(t,e){return function(){return a5(this,t,e.apply(this,arguments))}}function oB(t,e){return this.each((typeof e=="function"?sB:aB)(t,e))}function*lB(){for(var t=this._groups,e=0,r=t.length;e<r;++e)for(var n=t[e],i=0,a=n.length,s;i<a;++i)(s=n[i])&&(yield s)}var ed=[null];function $r(t,e){this._groups=t,this._parents=e}function ps(){return new $r([[document.documentElement]],ed)}function cB(){return this}$r.prototype=ps.prototype={constructor:$r,select:OI,selectAll:qI,selectChild:UI,selectChildren:jI,filter:$I,data:tN,enter:XI,exit:rN,join:nN,merge:iN,selection:cB,order:aN,sort:sN,call:lN,nodes:cN,node:uN,size:hN,empty:fN,each:dN,attr:vN,style:TN,property:AN,classed:IN,text:ON,html:VN,raise:YN,lower:WN,append:HN,insert:jN,remove:XN,clone:QN,datum:JN,on:iB,dispatch:oB,[Symbol.iterator]:lB};function St(t){return typeof t=="string"?new $r([[document.querySelector(t)]],[document.documentElement]):new $r([[t]],ed)}function uB(t){return St(Mu(t).call(document.documentElement))}var hB=0;function s5(){return new rd}function rd(){this._="@"+(++hB).toString(36)}rd.prototype=s5.prototype={constructor:rd,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._}};function o5(t){let e;for(;e=t.sourceEvent;)t=e;return t}function Tn(t,e){if(t=o5(t),e===void 0&&(e=t.currentTarget),e){var r=e.ownerSVGElement||e;if(r.createSVGPoint){var n=r.createSVGPoint();return n.x=t.clientX,n.y=t.clientY,n=n.matrixTransform(e.getScreenCTM().inverse()),[n.x,n.y]}if(e.getBoundingClientRect){var i=e.getBoundingClientRect();return[t.clientX-i.left-e.clientLeft,t.clientY-i.top-e.clientTop]}}return[t.pageX,t.pageY]}function fB(t,e){return t.target&&(t=o5(t),e===void 0&&(e=t.currentTarget),t=t.touches||[t]),Array.from(t,r=>Tn(r,e))}function Iu(t){return typeof t=="string"?new $r([document.querySelectorAll(t)],[document.documentElement]):new $r([Q_(t)],ed)}const dB={passive:!1},Ml={capture:!0,passive:!1};function nd(t){t.stopImmediatePropagation()}function co(t){t.preventDefault(),t.stopImmediatePropagation()}function Nu(t){var e=t.document.documentElement,r=St(t).on("dragstart.drag",co,Ml);"onselectstart"in e?r.on("selectstart.drag",co,Ml):(e.__noselect=e.style.MozUserSelect,e.style.MozUserSelect="none")}function Bu(t,e){var r=t.document.documentElement,n=St(t).on("dragstart.drag",null);e&&(n.on("click.drag",co,Ml),setTimeout(function(){n.on("click.drag",null)},0)),"onselectstart"in r?n.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect)}const Du=t=>()=>t;function id(t,{sourceEvent:e,subject:r,target:n,identifier:i,active:a,x:s,y:o,dx:l,dy:u,dispatch:h}){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:n,enumerable:!0,configurable:!0},identifier:{value:i,enumerable:!0,configurable:!0},active:{value:a,enumerable:!0,configurable:!0},x:{value:s,enumerable:!0,configurable:!0},y:{value:o,enumerable:!0,configurable:!0},dx:{value:l,enumerable:!0,configurable:!0},dy:{value:u,enumerable:!0,configurable:!0},_:{value:h}})}id.prototype.on=function(){var t=this._.on.apply(this._,arguments);return t===this._?this:t};function pB(t){return!t.ctrlKey&&!t.button}function gB(){return this.parentNode}function yB(t,e){return e==null?{x:t.x,y:t.y}:e}function mB(){return navigator.maxTouchPoints||"ontouchstart"in this}function bB(){var t=pB,e=gB,r=yB,n=mB,i={},a=fs("start","drag","end"),s=0,o,l,u,h,d=0;function f(T){T.on("mousedown.drag",p).filter(n).on("touchstart.drag",y).on("touchmove.drag",b,dB).on("touchend.drag touchcancel.drag",x).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function p(T,C){if(!(h||!t.call(this,T,C))){var M=k(this,e.call(this,T,C),T,C,"mouse");!M||(St(T.view).on("mousemove.drag",m,Ml).on("mouseup.drag",_,Ml),Nu(T.view),nd(T),u=!1,o=T.clientX,l=T.clientY,M("start",T))}}function m(T){if(co(T),!u){var C=T.clientX-o,M=T.clientY-l;u=C*C+M*M>d}i.mouse("drag",T)}function _(T){St(T.view).on("mousemove.drag mouseup.drag",null),Bu(T.view,u),co(T),i.mouse("end",T)}function y(T,C){if(!!t.call(this,T,C)){var M=T.changedTouches,S=e.call(this,T,C),R=M.length,A,L;for(A=0;A<R;++A)(L=k(this,S,T,C,M[A].identifier,M[A]))&&(nd(T),L("start",T,M[A]))}}function b(T){var C=T.changedTouches,M=C.length,S,R;for(S=0;S<M;++S)(R=i[C[S].identifier])&&(co(T),R("drag",T,C[S]))}function x(T){var C=T.changedTouches,M=C.length,S,R;for(h&&clearTimeout(h),h=setTimeout(function(){h=null},500),S=0;S<M;++S)(R=i[C[S].identifier])&&(nd(T),R("end",T,C[S]))}function k(T,C,M,S,R,A){var L=a.copy(),v=Tn(A||M,C),B,w,D;if((D=r.call(T,new id("beforestart",{sourceEvent:M,target:f,identifier:R,active:s,x:v[0],y:v[1],dx:0,dy:0,dispatch:L}),S))!=null)return B=D.x-v[0]||0,w=D.y-v[1]||0,function N(z,X,ct){var J=v,Y;switch(z){case"start":i[R]=N,Y=s++;break;case"end":delete i[R],--s;case"drag":v=Tn(ct||X,C),Y=s;break}L.call(z,T,new id(z,{sourceEvent:X,subject:D,target:f,identifier:R,active:Y,x:v[0]+B,y:v[1]+w,dx:v[0]-J[0],dy:v[1]-J[1],dispatch:L}),S)}}return f.filter=function(T){return arguments.length?(t=typeof T=="function"?T:Du(!!T),f):t},f.container=function(T){return arguments.length?(e=typeof T=="function"?T:Du(T),f):e},f.subject=function(T){return arguments.length?(r=typeof T=="function"?T:Du(T),f):r},f.touchable=function(T){return arguments.length?(n=typeof T=="function"?T:Du(!!T),f):n},f.on=function(){var T=a.on.apply(a,arguments);return T===a?f:T},f.clickDistance=function(T){return arguments.length?(d=(T=+T)*T,f):Math.sqrt(d)},f}function uo(t,e,r){t.prototype=e.prototype=r,r.constructor=t}function Ll(t,e){var r=Object.create(t.prototype);for(var n in e)r[n]=e[n];return r}function Sa(){}var gs=.7,ho=1/gs,fo="\\s*([+-]?\\d+)\\s*",Rl="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",wi="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",_B=/^#([0-9a-f]{3,8})$/,vB=new RegExp(`^rgb\\(${fo},${fo},${fo}\\)$`),xB=new RegExp(`^rgb\\(${wi},${wi},${wi}\\)$`),kB=new RegExp(`^rgba\\(${fo},${fo},${fo},${Rl}\\)$`),wB=new RegExp(`^rgba\\(${wi},${wi},${wi},${Rl}\\)$`),TB=new RegExp(`^hsl\\(${Rl},${wi},${wi}\\)$`),EB=new RegExp(`^hsla\\(${Rl},${wi},${wi},${Rl}\\)$`),l5={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};uo(Sa,Aa,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:c5,formatHex:c5,formatHex8:CB,formatHsl:SB,formatRgb:u5,toString:u5});function c5(){return this.rgb().formatHex()}function CB(){return this.rgb().formatHex8()}function SB(){return g5(this).formatHsl()}function u5(){return this.rgb().formatRgb()}function Aa(t){var e,r;return t=(t+"").trim().toLowerCase(),(e=_B.exec(t))?(r=e[1].length,e=parseInt(e[1],16),r===6?h5(e):r===3?new Er(e>>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):r===8?Ou(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):r===4?Ou(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=vB.exec(t))?new Er(e[1],e[2],e[3],1):(e=xB.exec(t))?new Er(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=kB.exec(t))?Ou(e[1],e[2],e[3],e[4]):(e=wB.exec(t))?Ou(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=TB.exec(t))?p5(e[1],e[2]/100,e[3]/100,1):(e=EB.exec(t))?p5(e[1],e[2]/100,e[3]/100,e[4]):l5.hasOwnProperty(t)?h5(l5[t]):t==="transparent"?new Er(NaN,NaN,NaN,0):null}function h5(t){return new Er(t>>16&255,t>>8&255,t&255,1)}function Ou(t,e,r,n){return n<=0&&(t=e=r=NaN),new Er(t,e,r,n)}function ad(t){return t instanceof Sa||(t=Aa(t)),t?(t=t.rgb(),new Er(t.r,t.g,t.b,t.opacity)):new Er}function po(t,e,r,n){return arguments.length===1?ad(t):new Er(t,e,r,n==null?1:n)}function Er(t,e,r,n){this.r=+t,this.g=+e,this.b=+r,this.opacity=+n}uo(Er,po,Ll(Sa,{brighter(t){return t=t==null?ho:Math.pow(ho,t),new Er(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=t==null?gs:Math.pow(gs,t),new Er(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new Er(ys(this.r),ys(this.g),ys(this.b),Fu(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:f5,formatHex:f5,formatHex8:AB,formatRgb:d5,toString:d5}));function f5(){return`#${ms(this.r)}${ms(this.g)}${ms(this.b)}`}function AB(){return`#${ms(this.r)}${ms(this.g)}${ms(this.b)}${ms((isNaN(this.opacity)?1:this.opacity)*255)}`}function d5(){const t=Fu(this.opacity);return`${t===1?"rgb(":"rgba("}${ys(this.r)}, ${ys(this.g)}, ${ys(this.b)}${t===1?")":`, ${t})`}`}function Fu(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function ys(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function ms(t){return t=ys(t),(t<16?"0":"")+t.toString(16)}function p5(t,e,r,n){return n<=0?t=e=r=NaN:r<=0||r>=1?t=e=NaN:e<=0&&(t=NaN),new Kn(t,e,r,n)}function g5(t){if(t instanceof Kn)return new Kn(t.h,t.s,t.l,t.opacity);if(t instanceof Sa||(t=Aa(t)),!t)return new Kn;if(t instanceof Kn)return t;t=t.rgb();var e=t.r/255,r=t.g/255,n=t.b/255,i=Math.min(e,r,n),a=Math.max(e,r,n),s=NaN,o=a-i,l=(a+i)/2;return o?(e===a?s=(r-n)/o+(r<n)*6:r===a?s=(n-e)/o+2:s=(e-r)/o+4,o/=l<.5?a+i:2-a-i,s*=60):o=l>0&&l<1?0:s,new Kn(s,o,l,t.opacity)}function Pu(t,e,r,n){return arguments.length===1?g5(t):new Kn(t,e,r,n==null?1:n)}function Kn(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}uo(Kn,Pu,Ll(Sa,{brighter(t){return t=t==null?ho:Math.pow(ho,t),new Kn(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?gs:Math.pow(gs,t),new Kn(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,r=this.l,n=r+(r<.5?r:1-r)*e,i=2*r-n;return new Er(sd(t>=240?t-240:t+120,i,n),sd(t,i,n),sd(t<120?t+240:t-120,i,n),this.opacity)},clamp(){return new Kn(y5(this.h),qu(this.s),qu(this.l),Fu(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=Fu(this.opacity);return`${t===1?"hsl(":"hsla("}${y5(this.h)}, ${qu(this.s)*100}%, ${qu(this.l)*100}%${t===1?")":`, ${t})`}`}}));function y5(t){return t=(t||0)%360,t<0?t+360:t}function qu(t){return Math.max(0,Math.min(1,t||0))}function sd(t,e,r){return(t<60?e+(r-e)*t/60:t<180?r:t<240?e+(r-e)*(240-t)/60:e)*255}const m5=Math.PI/180,b5=180/Math.PI,Vu=18,_5=.96422,v5=1,x5=.82521,k5=4/29,go=6/29,w5=3*go*go,MB=go*go*go;function T5(t){if(t instanceof Zn)return new Zn(t.l,t.a,t.b,t.opacity);if(t instanceof Ti)return C5(t);t instanceof Er||(t=ad(t));var e=ud(t.r),r=ud(t.g),n=ud(t.b),i=od((.2225045*e+.7168786*r+.0606169*n)/v5),a,s;return e===r&&r===n?a=s=i:(a=od((.4360747*e+.3850649*r+.1430804*n)/_5),s=od((.0139322*e+.0971045*r+.7141733*n)/x5)),new Zn(116*i-16,500*(a-i),200*(i-s),t.opacity)}function LB(t,e){return new Zn(t,0,0,e==null?1:e)}function zu(t,e,r,n){return arguments.length===1?T5(t):new Zn(t,e,r,n==null?1:n)}function Zn(t,e,r,n){this.l=+t,this.a=+e,this.b=+r,this.opacity=+n}uo(Zn,zu,Ll(Sa,{brighter(t){return new Zn(this.l+Vu*(t==null?1:t),this.a,this.b,this.opacity)},darker(t){return new Zn(this.l-Vu*(t==null?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 e=_5*ld(e),t=v5*ld(t),r=x5*ld(r),new Er(cd(3.1338561*e-1.6168667*t-.4906146*r),cd(-.9787684*e+1.9161415*t+.033454*r),cd(.0719453*e-.2289914*t+1.4052427*r),this.opacity)}}));function od(t){return t>MB?Math.pow(t,1/3):t/w5+k5}function ld(t){return t>go?t*t*t:w5*(t-k5)}function cd(t){return 255*(t<=.0031308?12.92*t:1.055*Math.pow(t,1/2.4)-.055)}function ud(t){return(t/=255)<=.04045?t/12.92:Math.pow((t+.055)/1.055,2.4)}function E5(t){if(t instanceof Ti)return new Ti(t.h,t.c,t.l,t.opacity);if(t instanceof Zn||(t=T5(t)),t.a===0&&t.b===0)return new Ti(NaN,0<t.l&&t.l<100?0:NaN,t.l,t.opacity);var e=Math.atan2(t.b,t.a)*b5;return new Ti(e<0?e+360:e,Math.sqrt(t.a*t.a+t.b*t.b),t.l,t.opacity)}function RB(t,e,r,n){return arguments.length===1?E5(t):new Ti(r,e,t,n==null?1:n)}function Yu(t,e,r,n){return arguments.length===1?E5(t):new Ti(t,e,r,n==null?1:n)}function Ti(t,e,r,n){this.h=+t,this.c=+e,this.l=+r,this.opacity=+n}function C5(t){if(isNaN(t.h))return new Zn(t.l,0,0,t.opacity);var e=t.h*m5;return new Zn(t.l,Math.cos(e)*t.c,Math.sin(e)*t.c,t.opacity)}uo(Ti,Yu,Ll(Sa,{brighter(t){return new Ti(this.h,this.c,this.l+Vu*(t==null?1:t),this.opacity)},darker(t){return new Ti(this.h,this.c,this.l-Vu*(t==null?1:t),this.opacity)},rgb(){return C5(this).rgb()}}));var S5=-.14861,hd=1.78277,fd=-.29227,Uu=-.90649,Il=1.97294,A5=Il*Uu,M5=Il*hd,L5=hd*fd-Uu*S5;function IB(t){if(t instanceof bs)return new bs(t.h,t.s,t.l,t.opacity);t instanceof Er||(t=ad(t));var e=t.r/255,r=t.g/255,n=t.b/255,i=(L5*n+A5*e-M5*r)/(L5+A5-M5),a=n-i,s=(Il*(r-i)-fd*a)/Uu,o=Math.sqrt(s*s+a*a)/(Il*i*(1-i)),l=o?Math.atan2(s,a)*b5-120:NaN;return new bs(l<0?l+360:l,o,i,t.opacity)}function Qn(t,e,r,n){return arguments.length===1?IB(t):new bs(t,e,r,n==null?1:n)}function bs(t,e,r,n){this.h=+t,this.s=+e,this.l=+r,this.opacity=+n}uo(bs,Qn,Ll(Sa,{brighter(t){return t=t==null?ho:Math.pow(ho,t),new bs(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=t==null?gs:Math.pow(gs,t),new bs(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=isNaN(this.h)?0:(this.h+120)*m5,e=+this.l,r=isNaN(this.s)?0:this.s*e*(1-e),n=Math.cos(t),i=Math.sin(t);return new Er(255*(e+r*(S5*n+hd*i)),255*(e+r*(fd*n+Uu*i)),255*(e+r*(Il*n)),this.opacity)}}));function R5(t,e,r,n,i){var a=t*t,s=a*t;return((1-3*t+3*a-s)*e+(4-6*a+3*s)*r+(1+3*t+3*a-3*s)*n+s*i)/6}function I5(t){var e=t.length-1;return function(r){var n=r<=0?r=0:r>=1?(r=1,e-1):Math.floor(r*e),i=t[n],a=t[n+1],s=n>0?t[n-1]:2*i-a,o=n<e-1?t[n+2]:2*a-i;return R5((r-n/e)*e,s,i,a,o)}}function N5(t){var e=t.length;return function(r){var n=Math.floor(((r%=1)<0?++r:r)*e),i=t[(n+e-1)%e],a=t[n%e],s=t[(n+1)%e],o=t[(n+2)%e];return R5((r-n/e)*e,i,a,s,o)}}const Wu=t=>()=>t;function B5(t,e){return function(r){return t+r*e}}function NB(t,e,r){return t=Math.pow(t,r),e=Math.pow(e,r)-t,r=1/r,function(n){return Math.pow(t+n*e,r)}}function Hu(t,e){var r=e-t;return r?B5(t,r>180||r<-180?r-360*Math.round(r/360):r):Wu(isNaN(t)?e:t)}function BB(t){return(t=+t)==1?Cr:function(e,r){return r-e?NB(e,r,t):Wu(isNaN(e)?r:e)}}function Cr(t,e){var r=e-t;return r?B5(t,r):Wu(isNaN(t)?e:t)}const Nl=function t(e){var r=BB(e);function n(i,a){var s=r((i=po(i)).r,(a=po(a)).r),o=r(i.g,a.g),l=r(i.b,a.b),u=Cr(i.opacity,a.opacity);return function(h){return i.r=s(h),i.g=o(h),i.b=l(h),i.opacity=u(h),i+""}}return n.gamma=t,n}(1);function D5(t){return function(e){var r=e.length,n=new Array(r),i=new Array(r),a=new Array(r),s,o;for(s=0;s<r;++s)o=po(e[s]),n[s]=o.r||0,i[s]=o.g||0,a[s]=o.b||0;return n=t(n),i=t(i),a=t(a),o.opacity=1,function(l){return o.r=n(l),o.g=i(l),o.b=a(l),o+""}}}var O5=D5(I5),DB=D5(N5);function dd(t,e){e||(e=[]);var r=t?Math.min(e.length,t.length):0,n=e.slice(),i;return function(a){for(i=0;i<r;++i)n[i]=t[i]*(1-a)+e[i]*a;return n}}function F5(t){return ArrayBuffer.isView(t)&&!(t instanceof DataView)}function OB(t,e){return(F5(e)?dd:P5)(t,e)}function P5(t,e){var r=e?e.length:0,n=t?Math.min(r,t.length):0,i=new Array(n),a=new Array(r),s;for(s=0;s<n;++s)i[s]=Ma(t[s],e[s]);for(;s<r;++s)a[s]=e[s];return function(o){for(s=0;s<n;++s)a[s]=i[s](o);return a}}function q5(t,e){var r=new Date;return t=+t,e=+e,function(n){return r.setTime(t*(1-n)+e*n),r}}function Bn(t,e){return t=+t,e=+e,function(r){return t*(1-r)+e*r}}function V5(t,e){var r={},n={},i;(t===null||typeof t!="object")&&(t={}),(e===null||typeof e!="object")&&(e={});for(i in e)i in t?r[i]=Ma(t[i],e[i]):n[i]=e[i];return function(a){for(i in r)n[i]=r[i](a);return n}}var pd=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,gd=new RegExp(pd.source,"g");function FB(t){return function(){return t}}function PB(t){return function(e){return t(e)+""}}function yd(t,e){var r=pd.lastIndex=gd.lastIndex=0,n,i,a,s=-1,o=[],l=[];for(t=t+"",e=e+"";(n=pd.exec(t))&&(i=gd.exec(e));)(a=i.index)>r&&(a=e.slice(r,a),o[s]?o[s]+=a:o[++s]=a),(n=n[0])===(i=i[0])?o[s]?o[s]+=i:o[++s]=i:(o[++s]=null,l.push({i:s,x:Bn(n,i)})),r=gd.lastIndex;return r<e.length&&(a=e.slice(r),o[s]?o[s]+=a:o[++s]=a),o.length<2?l[0]?PB(l[0].x):FB(e):(e=l.length,function(u){for(var h=0,d;h<e;++h)o[(d=l[h]).i]=d.x(u);return o.join("")})}function Ma(t,e){var r=typeof e,n;return e==null||r==="boolean"?Wu(e):(r==="number"?Bn:r==="string"?(n=Aa(e))?(e=n,Nl):yd:e instanceof Aa?Nl:e instanceof Date?q5:F5(e)?dd:Array.isArray(e)?P5:typeof e.valueOf!="function"&&typeof e.toString!="function"||isNaN(e)?V5:Bn)(t,e)}function qB(t){var e=t.length;return function(r){return t[Math.max(0,Math.min(e-1,Math.floor(r*e)))]}}function VB(t,e){var r=Hu(+t,+e);return function(n){var i=r(n);return i-360*Math.floor(i/360)}}function Gu(t,e){return t=+t,e=+e,function(r){return Math.round(t*(1-r)+e*r)}}var z5=180/Math.PI,md={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function Y5(t,e,r,n,i,a){var s,o,l;return(s=Math.sqrt(t*t+e*e))&&(t/=s,e/=s),(l=t*r+e*n)&&(r-=t*l,n-=e*l),(o=Math.sqrt(r*r+n*n))&&(r/=o,n/=o,l/=o),t*n<e*r&&(t=-t,e=-e,l=-l,s=-s),{translateX:i,translateY:a,rotate:Math.atan2(e,t)*z5,skewX:Math.atan(l)*z5,scaleX:s,scaleY:o}}var ju;function zB(t){const e=new(typeof DOMMatrix=="function"?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?md:Y5(e.a,e.b,e.c,e.d,e.e,e.f)}function YB(t){return t==null||(ju||(ju=document.createElementNS("http://www.w3.org/2000/svg","g")),ju.setAttribute("transform",t),!(t=ju.transform.baseVal.consolidate()))?md:(t=t.matrix,Y5(t.a,t.b,t.c,t.d,t.e,t.f))}function U5(t,e,r,n){function i(u){return u.length?u.pop()+" ":""}function a(u,h,d,f,p,m){if(u!==d||h!==f){var _=p.push("translate(",null,e,null,r);m.push({i:_-4,x:Bn(u,d)},{i:_-2,x:Bn(h,f)})}else(d||f)&&p.push("translate("+d+e+f+r)}function s(u,h,d,f){u!==h?(u-h>180?h+=360:h-u>180&&(u+=360),f.push({i:d.push(i(d)+"rotate(",null,n)-2,x:Bn(u,h)})):h&&d.push(i(d)+"rotate("+h+n)}function o(u,h,d,f){u!==h?f.push({i:d.push(i(d)+"skewX(",null,n)-2,x:Bn(u,h)}):h&&d.push(i(d)+"skewX("+h+n)}function l(u,h,d,f,p,m){if(u!==d||h!==f){var _=p.push(i(p)+"scale(",null,",",null,")");m.push({i:_-4,x:Bn(u,d)},{i:_-2,x:Bn(h,f)})}else(d!==1||f!==1)&&p.push(i(p)+"scale("+d+","+f+")")}return function(u,h){var d=[],f=[];return u=t(u),h=t(h),a(u.translateX,u.translateY,h.translateX,h.translateY,d,f),s(u.rotate,h.rotate,d,f),o(u.skewX,h.skewX,d,f),l(u.scaleX,u.scaleY,h.scaleX,h.scaleY,d,f),u=h=null,function(p){for(var m=-1,_=f.length,y;++m<_;)d[(y=f[m]).i]=y.x(p);return d.join("")}}}var W5=U5(zB,"px, ","px)","deg)"),H5=U5(YB,", ",")",")"),UB=1e-12;function G5(t){return((t=Math.exp(t))+1/t)/2}function WB(t){return((t=Math.exp(t))-1/t)/2}function HB(t){return((t=Math.exp(2*t))-1)/(t+1)}const j5=function t(e,r,n){function i(a,s){var o=a[0],l=a[1],u=a[2],h=s[0],d=s[1],f=s[2],p=h-o,m=d-l,_=p*p+m*m,y,b;if(_<UB)b=Math.log(f/u)/e,y=function(S){return[o+S*p,l+S*m,u*Math.exp(e*S*b)]};else{var x=Math.sqrt(_),k=(f*f-u*u+n*_)/(2*u*r*x),T=(f*f-u*u-n*_)/(2*f*r*x),C=Math.log(Math.sqrt(k*k+1)-k),M=Math.log(Math.sqrt(T*T+1)-T);b=(M-C)/e,y=function(S){var R=S*b,A=G5(C),L=u/(r*x)*(A*HB(e*R+C)-WB(C));return[o+L*p,l+L*m,u*A/G5(e*R+C)]}}return y.duration=b*1e3*e/Math.SQRT2,y}return i.rho=function(a){var s=Math.max(.001,+a),o=s*s,l=o*o;return t(s,o,l)},i}(Math.SQRT2,2,4);function $5(t){return function(e,r){var n=t((e=Pu(e)).h,(r=Pu(r)).h),i=Cr(e.s,r.s),a=Cr(e.l,r.l),s=Cr(e.opacity,r.opacity);return function(o){return e.h=n(o),e.s=i(o),e.l=a(o),e.opacity=s(o),e+""}}}const GB=$5(Hu);var jB=$5(Cr);function $B(t,e){var r=Cr((t=zu(t)).l,(e=zu(e)).l),n=Cr(t.a,e.a),i=Cr(t.b,e.b),a=Cr(t.opacity,e.opacity);return function(s){return t.l=r(s),t.a=n(s),t.b=i(s),t.opacity=a(s),t+""}}function X5(t){return function(e,r){var n=t((e=Yu(e)).h,(r=Yu(r)).h),i=Cr(e.c,r.c),a=Cr(e.l,r.l),s=Cr(e.opacity,r.opacity);return function(o){return e.h=n(o),e.c=i(o),e.l=a(o),e.opacity=s(o),e+""}}}const K5=X5(Hu);var XB=X5(Cr);function Z5(t){return function e(r){r=+r;function n(i,a){var s=t((i=Qn(i)).h,(a=Qn(a)).h),o=Cr(i.s,a.s),l=Cr(i.l,a.l),u=Cr(i.opacity,a.opacity);return function(h){return i.h=s(h),i.s=o(h),i.l=l(Math.pow(h,r)),i.opacity=u(h),i+""}}return n.gamma=e,n}(1)}const KB=Z5(Hu);var $u=Z5(Cr);function Q5(t,e){e===void 0&&(e=t,t=Ma);for(var r=0,n=e.length-1,i=e[0],a=new Array(n<0?0:n);r<n;)a[r]=t(i,i=e[++r]);return function(s){var o=Math.max(0,Math.min(n-1,Math.floor(s*=n)));return a[o](s-o)}}function ZB(t,e){for(var r=new Array(e),n=0;n<e;++n)r[n]=t(n/(e-1));return r}var yo=0,Bl=0,Dl=0,J5=1e3,Xu,Ol,Ku=0,_s=0,Zu=0,Fl=typeof performance=="object"&&performance.now?performance:Date,tv=typeof window=="object"&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function Pl(){return _s||(tv(QB),_s=Fl.now()+Zu)}function QB(){_s=0}function ql(){this._call=this._time=this._next=null}ql.prototype=Qu.prototype={constructor:ql,restart:function(t,e,r){if(typeof t!="function")throw new TypeError("callback is not a function");r=(r==null?Pl():+r)+(e==null?0:+e),!this._next&&Ol!==this&&(Ol?Ol._next=this:Xu=this,Ol=this),this._call=t,this._time=r,bd()},stop:function(){this._call&&(this._call=null,this._time=1/0,bd())}};function Qu(t,e,r){var n=new ql;return n.restart(t,e,r),n}function ev(){Pl(),++yo;for(var t=Xu,e;t;)(e=_s-t._time)>=0&&t._call.call(void 0,e),t=t._next;--yo}function rv(){_s=(Ku=Fl.now())+Zu,yo=Bl=0;try{ev()}finally{yo=0,tD(),_s=0}}function JB(){var t=Fl.now(),e=t-Ku;e>J5&&(Zu-=e,Ku=t)}function tD(){for(var t,e=Xu,r,n=1/0;e;)e._call?(n>e._time&&(n=e._time),t=e,e=e._next):(r=e._next,e._next=null,e=t?t._next=r:Xu=r);Ol=t,bd(n)}function bd(t){if(!yo){Bl&&(Bl=clearTimeout(Bl));var e=t-_s;e>24?(t<1/0&&(Bl=setTimeout(rv,t-Fl.now()-Zu)),Dl&&(Dl=clearInterval(Dl))):(Dl||(Ku=Fl.now(),Dl=setInterval(JB,J5)),yo=1,tv(rv))}}function _d(t,e,r){var n=new ql;return e=e==null?0:+e,n.restart(i=>{n.stop(),t(i+e)},e,r),n}function eD(t,e,r){var n=new ql,i=e;return e==null?(n.restart(t,e,r),n):(n._restart=n.restart,n.restart=function(a,s,o){s=+s,o=o==null?Pl():+o,n._restart(function l(u){u+=i,n._restart(l,i+=s,o),a(u)},s,o)},n.restart(t,e,r),n)}var rD=fs("start","end","cancel","interrupt"),nD=[],nv=0,vd=1,xd=2,Ju=3,iv=4,kd=5,th=6;function eh(t,e,r,n,i,a){var s=t.__transition;if(!s)t.__transition={};else if(r in s)return;iD(t,r,{name:e,index:n,group:i,on:rD,tween:nD,time:a.time,delay:a.delay,duration:a.duration,ease:a.ease,timer:null,state:nv})}function wd(t,e){var r=Jn(t,e);if(r.state>nv)throw new Error("too late; already scheduled");return r}function Ei(t,e){var r=Jn(t,e);if(r.state>Ju)throw new Error("too late; already running");return r}function Jn(t,e){var r=t.__transition;if(!r||!(r=r[e]))throw new Error("transition not found");return r}function iD(t,e,r){var n=t.__transition,i;n[e]=r,r.timer=Qu(a,0,r.time);function a(u){r.state=vd,r.timer.restart(s,r.delay,r.time),r.delay<=u&&s(u-r.delay)}function s(u){var h,d,f,p;if(r.state!==vd)return l();for(h in n)if(p=n[h],p.name===r.name){if(p.state===Ju)return _d(s);p.state===iv?(p.state=th,p.timer.stop(),p.on.call("interrupt",t,t.__data__,p.index,p.group),delete n[h]):+h<e&&(p.state=th,p.timer.stop(),p.on.call("cancel",t,t.__data__,p.index,p.group),delete n[h])}if(_d(function(){r.state===Ju&&(r.state=iv,r.timer.restart(o,r.delay,r.time),o(u))}),r.state=xd,r.on.call("start",t,t.__data__,r.index,r.group),r.state===xd){for(r.state=Ju,i=new Array(f=r.tween.length),h=0,d=-1;h<f;++h)(p=r.tween[h].value.call(t,t.__data__,r.index,r.group))&&(i[++d]=p);i.length=d+1}}function o(u){for(var h=u<r.duration?r.ease.call(null,u/r.duration):(r.timer.restart(l),r.state=kd,1),d=-1,f=i.length;++d<f;)i[d].call(t,h);r.state===kd&&(r.on.call("end",t,t.__data__,r.index,r.group),l())}function l(){r.state=th,r.timer.stop(),delete n[e];for(var u in n)return;delete t.__transition}}function vs(t,e){var r=t.__transition,n,i,a=!0,s;if(!!r){e=e==null?null:e+"";for(s in r){if((n=r[s]).name!==e){a=!1;continue}i=n.state>xd&&n.state<kd,n.state=th,n.timer.stop(),n.on.call(i?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete r[s]}a&&delete t.__transition}}function aD(t){return this.each(function(){vs(this,t)})}function sD(t,e){var r,n;return function(){var i=Ei(this,t),a=i.tween;if(a!==r){n=r=a;for(var s=0,o=n.length;s<o;++s)if(n[s].name===e){n=n.slice(),n.splice(s,1);break}}i.tween=n}}function oD(t,e,r){var n,i;if(typeof r!="function")throw new Error;return function(){var a=Ei(this,t),s=a.tween;if(s!==n){i=(n=s).slice();for(var o={name:e,value:r},l=0,u=i.length;l<u;++l)if(i[l].name===e){i[l]=o;break}l===u&&i.push(o)}a.tween=i}}function lD(t,e){var r=this._id;if(t+="",arguments.length<2){for(var n=Jn(this.node(),r).tween,i=0,a=n.length,s;i<a;++i)if((s=n[i]).name===t)return s.value;return null}return this.each((e==null?sD:oD)(r,t,e))}function Td(t,e,r){var n=t._id;return t.each(function(){var i=Ei(this,n);(i.value||(i.value={}))[e]=r.apply(this,arguments)}),function(i){return Jn(i,n).value[e]}}function av(t,e){var r;return(typeof e=="number"?Bn:e instanceof Aa?Nl:(r=Aa(e))?(e=r,Nl):yd)(t,e)}function cD(t){return function(){this.removeAttribute(t)}}function uD(t){return function(){this.removeAttributeNS(t.space,t.local)}}function hD(t,e,r){var n,i=r+"",a;return function(){var s=this.getAttribute(t);return s===i?null:s===n?a:a=e(n=s,r)}}function fD(t,e,r){var n,i=r+"",a;return function(){var s=this.getAttributeNS(t.space,t.local);return s===i?null:s===n?a:a=e(n=s,r)}}function dD(t,e,r){var n,i,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttribute(t):(s=this.getAttribute(t),l=o+"",s===l?null:s===n&&l===i?a:(i=l,a=e(n=s,o)))}}function pD(t,e,r){var n,i,a;return function(){var s,o=r(this),l;return o==null?void this.removeAttributeNS(t.space,t.local):(s=this.getAttributeNS(t.space,t.local),l=o+"",s===l?null:s===n&&l===i?a:(i=l,a=e(n=s,o)))}}function gD(t,e){var r=Al(t),n=r==="transform"?H5:av;return this.attrTween(t,typeof e=="function"?(r.local?pD:dD)(r,n,Td(this,"attr."+t,e)):e==null?(r.local?uD:cD)(r):(r.local?fD:hD)(r,n,e))}function yD(t,e){return function(r){this.setAttribute(t,e.call(this,r))}}function mD(t,e){return function(r){this.setAttributeNS(t.space,t.local,e.call(this,r))}}function bD(t,e){var r,n;function i(){var a=e.apply(this,arguments);return a!==n&&(r=(n=a)&&mD(t,a)),r}return i._value=e,i}function _D(t,e){var r,n;function i(){var a=e.apply(this,arguments);return a!==n&&(r=(n=a)&&yD(t,a)),r}return i._value=e,i}function vD(t,e){var r="attr."+t;if(arguments.length<2)return(r=this.tween(r))&&r._value;if(e==null)return this.tween(r,null);if(typeof e!="function")throw new Error;var n=Al(t);return this.tween(r,(n.local?bD:_D)(n,e))}function xD(t,e){return function(){wd(this,t).delay=+e.apply(this,arguments)}}function kD(t,e){return e=+e,function(){wd(this,t).delay=e}}function wD(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?xD:kD)(e,t)):Jn(this.node(),e).delay}function TD(t,e){return function(){Ei(this,t).duration=+e.apply(this,arguments)}}function ED(t,e){return e=+e,function(){Ei(this,t).duration=e}}function CD(t){var e=this._id;return arguments.length?this.each((typeof t=="function"?TD:ED)(e,t)):Jn(this.node(),e).duration}function SD(t,e){if(typeof e!="function")throw new Error;return function(){Ei(this,t).ease=e}}function AD(t){var e=this._id;return arguments.length?this.each(SD(e,t)):Jn(this.node(),e).ease}function MD(t,e){return function(){var r=e.apply(this,arguments);if(typeof r!="function")throw new Error;Ei(this,t).ease=r}}function LD(t){if(typeof t!="function")throw new Error;return this.each(MD(this._id,t))}function RD(t){typeof t!="function"&&(t=Q0(t));for(var e=this._groups,r=e.length,n=new Array(r),i=0;i<r;++i)for(var a=e[i],s=a.length,o=n[i]=[],l,u=0;u<s;++u)(l=a[u])&&t.call(l,l.__data__,u,a)&&o.push(l);return new Ci(n,this._parents,this._name,this._id)}function ID(t){if(t._id!==this._id)throw new Error;for(var e=this._groups,r=t._groups,n=e.length,i=r.length,a=Math.min(n,i),s=new Array(n),o=0;o<a;++o)for(var l=e[o],u=r[o],h=l.length,d=s[o]=new Array(h),f,p=0;p<h;++p)(f=l[p]||u[p])&&(d[p]=f);for(;o<n;++o)s[o]=e[o];return new Ci(s,this._parents,this._name,this._id)}function ND(t){return(t+"").trim().split(/^|\s+/).every(function(e){var r=e.indexOf(".");return r>=0&&(e=e.slice(0,r)),!e||e==="start"})}function BD(t,e,r){var n,i,a=ND(e)?wd:Ei;return function(){var s=a(this,t),o=s.on;o!==n&&(i=(n=o).copy()).on(e,r),s.on=i}}function DD(t,e){var r=this._id;return arguments.length<2?Jn(this.node(),r).on.on(t):this.each(BD(r,t,e))}function OD(t){return function(){var e=this.parentNode;for(var r in this.__transition)if(+r!==t)return;e&&e.removeChild(this)}}function FD(){return this.on("end.remove",OD(this._id))}function PD(t){var e=this._name,r=this._id;typeof t!="function"&&(t=Lu(t));for(var n=this._groups,i=n.length,a=new Array(i),s=0;s<i;++s)for(var o=n[s],l=o.length,u=a[s]=new Array(l),h,d,f=0;f<l;++f)(h=o[f])&&(d=t.call(h,h.__data__,f,o))&&("__data__"in h&&(d.__data__=h.__data__),u[f]=d,eh(u[f],e,r,f,u,Jn(h,r)));return new Ci(a,this._parents,e,r)}function qD(t){var e=this._name,r=this._id;typeof t!="function"&&(t=Z0(t));for(var n=this._groups,i=n.length,a=[],s=[],o=0;o<i;++o)for(var l=n[o],u=l.length,h,d=0;d<u;++d)if(h=l[d]){for(var f=t.call(h,h.__data__,d,l),p,m=Jn(h,r),_=0,y=f.length;_<y;++_)(p=f[_])&&eh(p,e,r,_,f,m);a.push(f),s.push(h)}return new Ci(a,s,e,r)}var VD=ps.prototype.constructor;function zD(){return new VD(this._groups,this._parents)}function YD(t,e){var r,n,i;return function(){var a=ds(this,t),s=(this.style.removeProperty(t),ds(this,t));return a===s?null:a===r&&s===n?i:i=e(r=a,n=s)}}function sv(t){return function(){this.style.removeProperty(t)}}function UD(t,e,r){var n,i=r+"",a;return function(){var s=ds(this,t);return s===i?null:s===n?a:a=e(n=s,r)}}function WD(t,e,r){var n,i,a;return function(){var s=ds(this,t),o=r(this),l=o+"";return o==null&&(l=o=(this.style.removeProperty(t),ds(this,t))),s===l?null:s===n&&l===i?a:(i=l,a=e(n=s,o))}}function HD(t,e){var r,n,i,a="style."+e,s="end."+a,o;return function(){var l=Ei(this,t),u=l.on,h=l.value[a]==null?o||(o=sv(e)):void 0;(u!==r||i!==h)&&(n=(r=u).copy()).on(s,i=h),l.on=n}}function GD(t,e,r){var n=(t+="")=="transform"?W5:av;return e==null?this.styleTween(t,YD(t,n)).on("end.style."+t,sv(t)):typeof e=="function"?this.styleTween(t,WD(t,n,Td(this,"style."+t,e))).each(HD(this._id,t)):this.styleTween(t,UD(t,n,e),r).on("end.style."+t,null)}function jD(t,e,r){return function(n){this.style.setProperty(t,e.call(this,n),r)}}function $D(t,e,r){var n,i;function a(){var s=e.apply(this,arguments);return s!==i&&(n=(i=s)&&jD(t,s,r)),n}return a._value=e,a}function XD(t,e,r){var n="style."+(t+="");if(arguments.length<2)return(n=this.tween(n))&&n._value;if(e==null)return this.tween(n,null);if(typeof e!="function")throw new Error;return this.tween(n,$D(t,e,r==null?"":r))}function KD(t){return function(){this.textContent=t}}function ZD(t){return function(){var e=t(this);this.textContent=e==null?"":e}}function QD(t){return this.tween("text",typeof t=="function"?ZD(Td(this,"text",t)):KD(t==null?"":t+""))}function JD(t){return function(e){this.textContent=t.call(this,e)}}function tO(t){var e,r;function n(){var i=t.apply(this,arguments);return i!==r&&(e=(r=i)&&JD(i)),e}return n._value=t,n}function eO(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(t==null)return this.tween(e,null);if(typeof t!="function")throw new Error;return this.tween(e,tO(t))}function rO(){for(var t=this._name,e=this._id,r=lv(),n=this._groups,i=n.length,a=0;a<i;++a)for(var s=n[a],o=s.length,l,u=0;u<o;++u)if(l=s[u]){var h=Jn(l,e);eh(l,t,r,u,s,{time:h.time+h.delay+h.duration,delay:0,duration:h.duration,ease:h.ease})}return new Ci(n,this._parents,t,r)}function nO(){var t,e,r=this,n=r._id,i=r.size();return new Promise(function(a,s){var o={value:s},l={value:function(){--i===0&&a()}};r.each(function(){var u=Ei(this,n),h=u.on;h!==t&&(e=(t=h).copy(),e._.cancel.push(o),e._.interrupt.push(o),e._.end.push(l)),u.on=e}),i===0&&a()})}var iO=0;function Ci(t,e,r,n){this._groups=t,this._parents=e,this._name=r,this._id=n}function ov(t){return ps().transition(t)}function lv(){return++iO}var $i=ps.prototype;Ci.prototype=ov.prototype={constructor:Ci,select:PD,selectAll:qD,selectChild:$i.selectChild,selectChildren:$i.selectChildren,filter:RD,merge:ID,selection:zD,transition:rO,call:$i.call,nodes:$i.nodes,node:$i.node,size:$i.size,empty:$i.empty,each:$i.each,on:DD,attr:gD,attrTween:vD,style:GD,styleTween:XD,text:QD,textTween:eO,remove:FD,tween:lD,delay:wD,duration:CD,ease:AD,easeVarying:LD,end:nO,[Symbol.iterator]:$i[Symbol.iterator]};const aO=t=>+t;function sO(t){return t*t}function oO(t){return t*(2-t)}function cv(t){return((t*=2)<=1?t*t:--t*(2-t)+1)/2}function lO(t){return t*t*t}function cO(t){return--t*t*t+1}function Ed(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}var Cd=3,uO=function t(e){e=+e;function r(n){return Math.pow(n,e)}return r.exponent=t,r}(Cd),hO=function t(e){e=+e;function r(n){return 1-Math.pow(1-n,e)}return r.exponent=t,r}(Cd),uv=function t(e){e=+e;function r(n){return((n*=2)<=1?Math.pow(n,e):2-Math.pow(2-n,e))/2}return r.exponent=t,r}(Cd),hv=Math.PI,fv=hv/2;function fO(t){return+t==1?1:1-Math.cos(t*fv)}function dO(t){return Math.sin(t*fv)}function dv(t){return(1-Math.cos(hv*t))/2}function La(t){return(Math.pow(2,-10*t)-.0009765625)*1.0009775171065494}function pO(t){return La(1-+t)}function gO(t){return 1-La(t)}function pv(t){return((t*=2)<=1?La(1-t):2-La(t-1))/2}function yO(t){return 1-Math.sqrt(1-t*t)}function mO(t){return Math.sqrt(1- --t*t)}function gv(t){return((t*=2)<=1?1-Math.sqrt(1-t*t):Math.sqrt(1-(t-=2)*t)+1)/2}var Sd=4/11,bO=6/11,_O=8/11,vO=3/4,xO=9/11,kO=10/11,wO=15/16,TO=21/22,EO=63/64,rh=1/Sd/Sd;function CO(t){return 1-Vl(1-t)}function Vl(t){return(t=+t)<Sd?rh*t*t:t<_O?rh*(t-=bO)*t+vO:t<kO?rh*(t-=xO)*t+wO:rh*(t-=TO)*t+EO}function SO(t){return((t*=2)<=1?1-Vl(1-t):Vl(t-1)+1)/2}var Ad=1.70158,AO=function t(e){e=+e;function r(n){return(n=+n)*n*(e*(n-1)+n)}return r.overshoot=t,r}(Ad),MO=function t(e){e=+e;function r(n){return--n*n*((n+1)*e+n)+1}return r.overshoot=t,r}(Ad),yv=function t(e){e=+e;function r(n){return((n*=2)<1?n*n*((e+1)*n-e):(n-=2)*n*((e+1)*n+e)+2)/2}return r.overshoot=t,r}(Ad),mo=2*Math.PI,Md=1,Ld=.3,LO=function t(e,r){var n=Math.asin(1/(e=Math.max(1,e)))*(r/=mo);function i(a){return e*La(- --a)*Math.sin((n-a)/r)}return i.amplitude=function(a){return t(a,r*mo)},i.period=function(a){return t(e,a)},i}(Md,Ld),mv=function t(e,r){var n=Math.asin(1/(e=Math.max(1,e)))*(r/=mo);function i(a){return 1-e*La(a=+a)*Math.sin((a+n)/r)}return i.amplitude=function(a){return t(a,r*mo)},i.period=function(a){return t(e,a)},i}(Md,Ld),RO=function t(e,r){var n=Math.asin(1/(e=Math.max(1,e)))*(r/=mo);function i(a){return((a=a*2-1)<0?e*La(-a)*Math.sin((n-a)/r):2-e*La(a)*Math.sin((n+a)/r))/2}return i.amplitude=function(a){return t(a,r*mo)},i.period=function(a){return t(e,a)},i}(Md,Ld),IO={time:null,delay:0,duration:250,ease:Ed};function NO(t,e){for(var r;!(r=t.__transition)||!(r=r[e]);)if(!(t=t.parentNode))throw new Error(`transition ${e} not found`);return r}function BO(t){var e,r;t instanceof Ci?(e=t._id,t=t._name):(e=lv(),(r=IO).time=Pl(),t=t==null?null:t+"");for(var n=this._groups,i=n.length,a=0;a<i;++a)for(var s=n[a],o=s.length,l,u=0;u<o;++u)(l=s[u])&&eh(l,t,e,u,s,r||NO(l,e));return new Ci(n,this._parents,t,e)}ps.prototype.interrupt=aD,ps.prototype.transition=BO;var DO=[null];function OO(t,e){var r=t.__transition,n,i;if(r){e=e==null?null:e+"";for(i in r)if((n=r[i]).state>vd&&n.name===e)return new Ci([[t]],DO,e,+i)}return null}const Rd=t=>()=>t;function FO(t,{sourceEvent:e,target:r,selection:n,mode:i,dispatch:a}){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:n,enumerable:!0,configurable:!0},mode:{value:i,enumerable:!0,configurable:!0},_:{value:a}})}function PO(t){t.stopImmediatePropagation()}function Id(t){t.preventDefault(),t.stopImmediatePropagation()}var bv={name:"drag"},Nd={name:"space"},bo={name:"handle"},_o={name:"center"};const{abs:_v,max:Or,min:Fr}=Math;function vv(t){return[+t[0],+t[1]]}function Bd(t){return[vv(t[0]),vv(t[1])]}var nh={name:"x",handles:["w","e"].map(zl),input:function(t,e){return t==null?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},ih={name:"y",handles:["n","s"].map(zl),input:function(t,e){return t==null?null:[[e[0][0],+t[0]],[e[1][0],+t[1]]]},output:function(t){return t&&[t[0][1],t[1][1]]}},qO={name:"xy",handles:["n","w","e","s","nw","ne","sw","se"].map(zl),input:function(t){return t==null?null:Bd(t)},output:function(t){return t}},Xi={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"},xv={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},kv={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},zO={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function zl(t){return{type:t}}function YO(t){return!t.ctrlKey&&!t.button}function UO(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.x,t.y],[t.x+t.width,t.y+t.height]]):[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function WO(){return navigator.maxTouchPoints||"ontouchstart"in this}function Dd(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function HO(t){return t[0][0]===t[1][0]||t[0][1]===t[1][1]}function GO(t){var e=t.__brush;return e?e.dim.output(e.selection):null}function jO(){return Od(nh)}function $O(){return Od(ih)}function XO(){return Od(qO)}function Od(t){var e=UO,r=YO,n=WO,i=!0,a=fs("start","brush","end"),s=6,o;function l(y){var b=y.property("__brush",_).selectAll(".overlay").data([zl("overlay")]);b.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",Xi.overlay).merge(b).each(function(){var k=Dd(this).extent;St(this).attr("x",k[0][0]).attr("y",k[0][1]).attr("width",k[1][0]-k[0][0]).attr("height",k[1][1]-k[0][1])}),y.selectAll(".selection").data([zl("selection")]).enter().append("rect").attr("class","selection").attr("cursor",Xi.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var x=y.selectAll(".handle").data(t.handles,function(k){return k.type});x.exit().remove(),x.enter().append("rect").attr("class",function(k){return"handle handle--"+k.type}).attr("cursor",function(k){return Xi[k.type]}),y.each(u).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",f).filter(n).on("touchstart.brush",f).on("touchmove.brush",p).on("touchend.brush touchcancel.brush",m).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}l.move=function(y,b,x){y.tween?y.on("start.brush",function(k){h(this,arguments).beforestart().start(k)}).on("interrupt.brush end.brush",function(k){h(this,arguments).end(k)}).tween("brush",function(){var k=this,T=k.__brush,C=h(k,arguments),M=T.selection,S=t.input(typeof b=="function"?b.apply(this,arguments):b,T.extent),R=Ma(M,S);function A(L){T.selection=L===1&&S===null?null:R(L),u.call(k),C.brush()}return M!==null&&S!==null?A:A(1)}):y.each(function(){var k=this,T=arguments,C=k.__brush,M=t.input(typeof b=="function"?b.apply(k,T):b,C.extent),S=h(k,T).beforestart();vs(k),C.selection=M===null?null:M,u.call(k),S.start(x).brush(x).end(x)})},l.clear=function(y,b){l.move(y,null,b)};function u(){var y=St(this),b=Dd(this).selection;b?(y.selectAll(".selection").style("display",null).attr("x",b[0][0]).attr("y",b[0][1]).attr("width",b[1][0]-b[0][0]).attr("height",b[1][1]-b[0][1]),y.selectAll(".handle").style("display",null).attr("x",function(x){return x.type[x.type.length-1]==="e"?b[1][0]-s/2:b[0][0]-s/2}).attr("y",function(x){return x.type[0]==="s"?b[1][1]-s/2:b[0][1]-s/2}).attr("width",function(x){return x.type==="n"||x.type==="s"?b[1][0]-b[0][0]+s:s}).attr("height",function(x){return x.type==="e"||x.type==="w"?b[1][1]-b[0][1]+s:s})):y.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function h(y,b,x){var k=y.__brush.emitter;return k&&(!x||!k.clean)?k:new d(y,b,x)}function d(y,b,x){this.that=y,this.args=b,this.state=y.__brush,this.active=0,this.clean=x}d.prototype={beforestart:function(){return++this.active===1&&(this.state.emitter=this,this.starting=!0),this},start:function(y,b){return this.starting?(this.starting=!1,this.emit("start",y,b)):this.emit("brush",y),this},brush:function(y,b){return this.emit("brush",y,b),this},end:function(y,b){return--this.active===0&&(delete this.state.emitter,this.emit("end",y,b)),this},emit:function(y,b,x){var k=St(this.that).datum();a.call(y,this.that,new FO(y,{sourceEvent:b,target:l,selection:t.output(this.state.selection),mode:x,dispatch:a}),k)}};function f(y){if(o&&!y.touches||!r.apply(this,arguments))return;var b=this,x=y.target.__data__.type,k=(i&&y.metaKey?x="overlay":x)==="selection"?bv:i&&y.altKey?_o:bo,T=t===ih?null:VO[x],C=t===nh?null:zO[x],M=Dd(b),S=M.extent,R=M.selection,A=S[0][0],L,v,B=S[0][1],w,D,N=S[1][0],z,X,ct=S[1][1],J,Y,$=0,lt=0,ut,W=T&&C&&i&&y.shiftKey,tt,K,it=Array.from(y.touches||[y],at=>{const It=at.identifier;return at=Tn(at,b),at.point0=at.slice(),at.identifier=It,at});vs(b);var Z=h(b,arguments,!0).beforestart();if(x==="overlay"){R&&(ut=!0);const at=[it[0],it[1]||it[0]];M.selection=R=[[L=t===ih?A:Fr(at[0][0],at[1][0]),w=t===nh?B:Fr(at[0][1],at[1][1])],[z=t===ih?N:Or(at[0][0],at[1][0]),J=t===nh?ct:Or(at[0][1],at[1][1])]],it.length>1&&F(y)}else L=R[0][0],w=R[0][1],z=R[1][0],J=R[1][1];v=L,D=w,X=z,Y=J;var V=St(b).attr("pointer-events","none"),Q=V.selectAll(".overlay").attr("cursor",Xi[x]);if(y.touches)Z.moved=U,Z.ended=j;else{var q=St(y.view).on("mousemove.brush",U,!0).on("mouseup.brush",j,!0);i&&q.on("keydown.brush",P,!0).on("keyup.brush",et,!0),Nu(y.view)}u.call(b),Z.start(y,k.name);function U(at){for(const It of at.changedTouches||[at])for(const Lt of it)Lt.identifier===It.identifier&&(Lt.cur=Tn(It,b));if(W&&!tt&&!K&&it.length===1){const It=it[0];_v(It.cur[0]-It[0])>_v(It.cur[1]-It[1])?K=!0:tt=!0}for(const It of it)It.cur&&(It[0]=It.cur[0],It[1]=It.cur[1]);ut=!0,Id(at),F(at)}function F(at){const It=it[0],Lt=It.point0;var Rt;switch($=It[0]-Lt[0],lt=It[1]-Lt[1],k){case Nd:case bv:{T&&($=Or(A-L,Fr(N-z,$)),v=L+$,X=z+$),C&&(lt=Or(B-w,Fr(ct-J,lt)),D=w+lt,Y=J+lt);break}case bo:{it[1]?(T&&(v=Or(A,Fr(N,it[0][0])),X=Or(A,Fr(N,it[1][0])),T=1),C&&(D=Or(B,Fr(ct,it[0][1])),Y=Or(B,Fr(ct,it[1][1])),C=1)):(T<0?($=Or(A-L,Fr(N-L,$)),v=L+$,X=z):T>0&&($=Or(A-z,Fr(N-z,$)),v=L,X=z+$),C<0?(lt=Or(B-w,Fr(ct-w,lt)),D=w+lt,Y=J):C>0&&(lt=Or(B-J,Fr(ct-J,lt)),D=w,Y=J+lt));break}case _o:{T&&(v=Or(A,Fr(N,L-$*T)),X=Or(A,Fr(N,z+$*T))),C&&(D=Or(B,Fr(ct,w-lt*C)),Y=Or(B,Fr(ct,J+lt*C)));break}}X<v&&(T*=-1,Rt=L,L=z,z=Rt,Rt=v,v=X,X=Rt,x in xv&&Q.attr("cursor",Xi[x=xv[x]])),Y<D&&(C*=-1,Rt=w,w=J,J=Rt,Rt=D,D=Y,Y=Rt,x in kv&&Q.attr("cursor",Xi[x=kv[x]])),M.selection&&(R=M.selection),tt&&(v=R[0][0],X=R[1][0]),K&&(D=R[0][1],Y=R[1][1]),(R[0][0]!==v||R[0][1]!==D||R[1][0]!==X||R[1][1]!==Y)&&(M.selection=[[v,D],[X,Y]],u.call(b),Z.brush(at,k.name))}function j(at){if(PO(at),at.touches){if(at.touches.length)return;o&&clearTimeout(o),o=setTimeout(function(){o=null},500)}else Bu(at.view,ut),q.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);V.attr("pointer-events","all"),Q.attr("cursor",Xi.overlay),M.selection&&(R=M.selection),HO(R)&&(M.selection=null,u.call(b)),Z.end(at,k.name)}function P(at){switch(at.keyCode){case 16:{W=T&&C;break}case 18:{k===bo&&(T&&(z=X-$*T,L=v+$*T),C&&(J=Y-lt*C,w=D+lt*C),k=_o,F(at));break}case 32:{(k===bo||k===_o)&&(T<0?z=X-$:T>0&&(L=v-$),C<0?J=Y-lt:C>0&&(w=D-lt),k=Nd,Q.attr("cursor",Xi.selection),F(at));break}default:return}Id(at)}function et(at){switch(at.keyCode){case 16:{W&&(tt=K=W=!1,F(at));break}case 18:{k===_o&&(T<0?z=X:T>0&&(L=v),C<0?J=Y:C>0&&(w=D),k=bo,F(at));break}case 32:{k===Nd&&(at.altKey?(T&&(z=X-$*T,L=v+$*T),C&&(J=Y-lt*C,w=D+lt*C),k=_o):(T<0?z=X:T>0&&(L=v),C<0?J=Y:C>0&&(w=D),k=bo),Q.attr("cursor",Xi[x]),F(at));break}default:return}Id(at)}}function p(y){h(this,arguments).moved(y)}function m(y){h(this,arguments).ended(y)}function _(){var y=this.__brush||{selection:null};return y.extent=Bd(e.apply(this,arguments)),y.dim=t,y}return l.extent=function(y){return arguments.length?(e=typeof y=="function"?y:Rd(Bd(y)),l):e},l.filter=function(y){return arguments.length?(r=typeof y=="function"?y:Rd(!!y),l):r},l.touchable=function(y){return arguments.length?(n=typeof y=="function"?y:Rd(!!y),l):n},l.handleSize=function(y){return arguments.length?(s=+y,l):s},l.keyModifiers=function(y){return arguments.length?(i=!!y,l):i},l.on=function(){var y=a.on.apply(a,arguments);return y===a?l:y},l}var wv=Math.abs,vo=Math.cos,xo=Math.sin,Tv=Math.PI,ah=Tv/2,Ev=Tv*2,Cv=Math.max,Fd=1e-12;function Pd(t,e){return Array.from({length:e-t},(r,n)=>t+n)}function KO(t){return function(e,r){return t(e.source.value+e.target.value,r.source.value+r.target.value)}}function ZO(){return qd(!1,!1)}function QO(){return qd(!1,!0)}function JO(){return qd(!0,!1)}function qd(t,e){var r=0,n=null,i=null,a=null;function s(o){var l=o.length,u=new Array(l),h=Pd(0,l),d=new Array(l*l),f=new Array(l),p=0,m;o=Float64Array.from({length:l*l},e?(_,y)=>o[y%l][y/l|0]:(_,y)=>o[y/l|0][y%l]);for(let _=0;_<l;++_){let y=0;for(let b=0;b<l;++b)y+=o[_*l+b]+t*o[b*l+_];p+=u[_]=y}p=Cv(0,Ev-r*l)/p,m=p?r:Ev/l;{let _=0;n&&h.sort((y,b)=>n(u[y],u[b]));for(const y of h){const b=_;if(t){const x=Pd(~l+1,l).filter(k=>k<0?o[~k*l+y]:o[y*l+k]);i&&x.sort((k,T)=>i(k<0?-o[~k*l+y]:o[y*l+k],T<0?-o[~T*l+y]:o[y*l+T]));for(const k of x)if(k<0){const T=d[~k*l+y]||(d[~k*l+y]={source:null,target:null});T.target={index:y,startAngle:_,endAngle:_+=o[~k*l+y]*p,value:o[~k*l+y]}}else{const T=d[y*l+k]||(d[y*l+k]={source:null,target:null});T.source={index:y,startAngle:_,endAngle:_+=o[y*l+k]*p,value:o[y*l+k]}}f[y]={index:y,startAngle:b,endAngle:_,value:u[y]}}else{const x=Pd(0,l).filter(k=>o[y*l+k]||o[k*l+y]);i&&x.sort((k,T)=>i(o[y*l+k],o[y*l+T]));for(const k of x){let T;if(y<k?(T=d[y*l+k]||(d[y*l+k]={source:null,target:null}),T.source={index:y,startAngle:_,endAngle:_+=o[y*l+k]*p,value:o[y*l+k]}):(T=d[k*l+y]||(d[k*l+y]={source:null,target:null}),T.target={index:y,startAngle:_,endAngle:_+=o[y*l+k]*p,value:o[y*l+k]},y===k&&(T.source=T.target)),T.source&&T.target&&T.source.value<T.target.value){const C=T.source;T.source=T.target,T.target=C}}f[y]={index:y,startAngle:b,endAngle:_,value:u[y]}}_+=m}}return d=Object.values(d),d.groups=f,a?d.sort(a):d}return s.padAngle=function(o){return arguments.length?(r=Cv(0,o),s):r},s.sortGroups=function(o){return arguments.length?(n=o,s):n},s.sortSubgroups=function(o){return arguments.length?(i=o,s):i},s.sortChords=function(o){return arguments.length?(o==null?a=null:(a=KO(o))._=o,s):a&&a._},s}const Vd=Math.PI,zd=2*Vd,xs=1e-6,tF=zd-xs;function Yd(){this._x0=this._y0=this._x1=this._y1=null,this._=""}function Ra(){return new Yd}Yd.prototype=Ra.prototype={constructor:Yd,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,r,n){this._+="Q"+ +t+","+ +e+","+(this._x1=+r)+","+(this._y1=+n)},bezierCurveTo:function(t,e,r,n,i,a){this._+="C"+ +t+","+ +e+","+ +r+","+ +n+","+(this._x1=+i)+","+(this._y1=+a)},arcTo:function(t,e,r,n,i){t=+t,e=+e,r=+r,n=+n,i=+i;var a=this._x1,s=this._y1,o=r-t,l=n-e,u=a-t,h=s-e,d=u*u+h*h;if(i<0)throw new Error("negative radius: "+i);if(this._x1===null)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(d>xs)if(!(Math.abs(h*o-l*u)>xs)||!i)this._+="L"+(this._x1=t)+","+(this._y1=e);else{var f=r-a,p=n-s,m=o*o+l*l,_=f*f+p*p,y=Math.sqrt(m),b=Math.sqrt(d),x=i*Math.tan((Vd-Math.acos((m+d-_)/(2*y*b)))/2),k=x/b,T=x/y;Math.abs(k-1)>xs&&(this._+="L"+(t+k*u)+","+(e+k*h)),this._+="A"+i+","+i+",0,0,"+ +(h*f>u*p)+","+(this._x1=t+T*o)+","+(this._y1=e+T*l)}},arc:function(t,e,r,n,i,a){t=+t,e=+e,r=+r,a=!!a;var s=r*Math.cos(n),o=r*Math.sin(n),l=t+s,u=e+o,h=1^a,d=a?n-i:i-n;if(r<0)throw new Error("negative radius: "+r);this._x1===null?this._+="M"+l+","+u:(Math.abs(this._x1-l)>xs||Math.abs(this._y1-u)>xs)&&(this._+="L"+l+","+u),r&&(d<0&&(d=d%zd+zd),d>tF?this._+="A"+r+","+r+",0,1,"+h+","+(t-s)+","+(e-o)+"A"+r+","+r+",0,1,"+h+","+(this._x1=l)+","+(this._y1=u):d>xs&&(this._+="A"+r+","+r+",0,"+ +(d>=Vd)+","+h+","+(this._x1=t+r*Math.cos(i))+","+(this._y1=e+r*Math.sin(i))))},rect:function(t,e,r,n){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +r+"v"+ +n+"h"+-r+"Z"},toString:function(){return this._}};var eF=Array.prototype.slice;function ks(t){return function(){return t}}function rF(t){return t.source}function nF(t){return t.target}function Sv(t){return t.radius}function iF(t){return t.startAngle}function aF(t){return t.endAngle}function sF(){return 0}function oF(){return 10}function Av(t){var e=rF,r=nF,n=Sv,i=Sv,a=iF,s=aF,o=sF,l=null;function u(){var h,d=e.apply(this,arguments),f=r.apply(this,arguments),p=o.apply(this,arguments)/2,m=eF.call(arguments),_=+n.apply(this,(m[0]=d,m)),y=a.apply(this,m)-ah,b=s.apply(this,m)-ah,x=+i.apply(this,(m[0]=f,m)),k=a.apply(this,m)-ah,T=s.apply(this,m)-ah;if(l||(l=h=Ra()),p>Fd&&(wv(b-y)>p*2+Fd?b>y?(y+=p,b-=p):(y-=p,b+=p):y=b=(y+b)/2,wv(T-k)>p*2+Fd?T>k?(k+=p,T-=p):(k-=p,T+=p):k=T=(k+T)/2),l.moveTo(_*vo(y),_*xo(y)),l.arc(0,0,_,y,b),y!==k||b!==T)if(t){var C=+t.apply(this,arguments),M=x-C,S=(k+T)/2;l.quadraticCurveTo(0,0,M*vo(k),M*xo(k)),l.lineTo(x*vo(S),x*xo(S)),l.lineTo(M*vo(T),M*xo(T))}else l.quadraticCurveTo(0,0,x*vo(k),x*xo(k)),l.arc(0,0,x,k,T);if(l.quadraticCurveTo(0,0,_*vo(y),_*xo(y)),l.closePath(),h)return l=null,h+""||null}return t&&(u.headRadius=function(h){return arguments.length?(t=typeof h=="function"?h:ks(+h),u):t}),u.radius=function(h){return arguments.length?(n=i=typeof h=="function"?h:ks(+h),u):n},u.sourceRadius=function(h){return arguments.length?(n=typeof h=="function"?h:ks(+h),u):n},u.targetRadius=function(h){return arguments.length?(i=typeof h=="function"?h:ks(+h),u):i},u.startAngle=function(h){return arguments.length?(a=typeof h=="function"?h:ks(+h),u):a},u.endAngle=function(h){return arguments.length?(s=typeof h=="function"?h:ks(+h),u):s},u.padAngle=function(h){return arguments.length?(o=typeof h=="function"?h:ks(+h),u):o},u.source=function(h){return arguments.length?(e=h,u):e},u.target=function(h){return arguments.length?(r=h,u):r},u.context=function(h){return arguments.length?(l=h==null?null:h,u):l},u}function lF(){return Av()}function cF(){return Av(oF)}var uF=Array.prototype,Mv=uF.slice;function hF(t,e){return t-e}function fF(t){for(var e=0,r=t.length,n=t[r-1][1]*t[0][0]-t[r-1][0]*t[0][1];++e<r;)n+=t[e-1][1]*t[e][0]-t[e-1][0]*t[e][1];return n}const Ia=t=>()=>t;function dF(t,e){for(var r=-1,n=e.length,i;++r<n;)if(i=pF(t,e[r]))return i;return 0}function pF(t,e){for(var r=e[0],n=e[1],i=-1,a=0,s=t.length,o=s-1;a<s;o=a++){var l=t[a],u=l[0],h=l[1],d=t[o],f=d[0],p=d[1];if(gF(l,d,e))return 0;h>n!=p>n&&r<(f-u)*(n-h)/(p-h)+u&&(i=-i)}return i}function gF(t,e,r){var n;return yF(t,e,r)&&mF(t[n=+(t[0]===e[0])],r[n],e[n])}function yF(t,e,r){return(e[0]-t[0])*(r[1]-t[1])===(r[0]-t[0])*(e[1]-t[1])}function mF(t,e,r){return t<=e&&e<=r||r<=e&&e<=t}function bF(){}var Ki=[[],[[[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 Ud(){var t=1,e=1,r=W0,n=l;function i(u){var h=r(u);if(Array.isArray(h))h=h.slice().sort(hF);else{const d=xl(u),f=wl(d[0],d[1],h);h=hs(Math.floor(d[0]/f)*f,Math.floor(d[1]/f-1)*f,h)}return h.map(d=>a(u,d))}function a(u,h){var d=[],f=[];return s(u,h,function(p){n(p,u,h),fF(p)>0?d.push([p]):f.push(p)}),f.forEach(function(p){for(var m=0,_=d.length,y;m<_;++m)if(dF((y=d[m])[0],p)!==-1){y.push(p);return}}),{type:"MultiPolygon",value:h,coordinates:d}}function s(u,h,d){var f=new Array,p=new Array,m,_,y,b,x,k;for(m=_=-1,b=u[0]>=h,Ki[b<<1].forEach(T);++m<t-1;)y=b,b=u[m+1]>=h,Ki[y|b<<1].forEach(T);for(Ki[b<<0].forEach(T);++_<e-1;){for(m=-1,b=u[_*t+t]>=h,x=u[_*t]>=h,Ki[b<<1|x<<2].forEach(T);++m<t-1;)y=b,b=u[_*t+t+m+1]>=h,k=x,x=u[_*t+m+1]>=h,Ki[y|b<<1|x<<2|k<<3].forEach(T);Ki[b|x<<3].forEach(T)}for(m=-1,x=u[_*t]>=h,Ki[x<<2].forEach(T);++m<t-1;)k=x,x=u[_*t+m+1]>=h,Ki[x<<2|k<<3].forEach(T);Ki[x<<3].forEach(T);function T(C){var M=[C[0][0]+m,C[0][1]+_],S=[C[1][0]+m,C[1][1]+_],R=o(M),A=o(S),L,v;(L=p[R])?(v=f[A])?(delete p[L.end],delete f[v.start],L===v?(L.ring.push(S),d(L.ring)):f[L.start]=p[v.end]={start:L.start,end:v.end,ring:L.ring.concat(v.ring)}):(delete p[L.end],L.ring.push(S),p[L.end=A]=L):(L=f[A])?(v=p[R])?(delete f[L.start],delete p[v.end],L===v?(L.ring.push(S),d(L.ring)):f[v.start]=p[L.end]={start:v.start,end:L.end,ring:v.ring.concat(L.ring)}):(delete f[L.start],L.ring.unshift(M),f[L.start=R]=L):f[R]=p[A]={start:R,end:A,ring:[M,S]}}}function o(u){return u[0]*2+u[1]*(t+1)*4}function l(u,h,d){u.forEach(function(f){var p=f[0],m=f[1],_=p|0,y=m|0,b,x=h[y*t+_];p>0&&p<t&&_===p&&(b=h[y*t+_-1],f[0]=p+(d-b)/(x-b)-.5),m>0&&m<e&&y===m&&(b=h[(y-1)*t+_],f[1]=m+(d-b)/(x-b)-.5)})}return i.contour=a,i.size=function(u){if(!arguments.length)return[t,e];var h=Math.floor(u[0]),d=Math.floor(u[1]);if(!(h>=0&&d>=0))throw new Error("invalid size");return t=h,e=d,i},i.thresholds=function(u){return arguments.length?(r=typeof u=="function"?u:Array.isArray(u)?Ia(Mv.call(u)):Ia(u),i):r},i.smooth=function(u){return arguments.length?(n=u?l:bF,i):n===l},i}function _F(t){return t[0]}function vF(t){return t[1]}function xF(){return 1}function kF(){var t=_F,e=vF,r=xF,n=960,i=500,a=20,s=2,o=a*3,l=n+o*2>>s,u=i+o*2>>s,h=Ia(20);function d(x){var k=new Float32Array(l*u),T=Math.pow(2,-s),C=-1;for(const w of x){var M=(t(w,++C,x)+o)*T,S=(e(w,C,x)+o)*T,R=+r(w,C,x);if(M>=0&&M<l&&S>=0&&S<u){var A=Math.floor(M),L=Math.floor(S),v=M-A-.5,B=S-L-.5;k[A+L*l]+=(1-v)*(1-B)*R,k[A+1+L*l]+=v*(1-B)*R,k[A+1+(L+1)*l]+=v*B*R,k[A+(L+1)*l]+=(1-v)*B*R}}return T_({data:k,width:l,height:u},a*T),k}function f(x){var k=d(x),T=h(k),C=Math.pow(2,2*s);return Array.isArray(T)||(T=hs(Number.MIN_VALUE,lo(k)/C,T)),Ud().size([l,u]).thresholds(T.map(M=>M*C))(k).map((M,S)=>(M.value=+T[S],p(M)))}f.contours=function(x){var k=d(x),T=Ud().size([l,u]),C=Math.pow(2,2*s),M=S=>{S=+S;var R=p(T.contour(k,S*C));return R.value=S,R};return Object.defineProperty(M,"max",{get:()=>lo(k)/C}),M};function p(x){return x.coordinates.forEach(m),x}function m(x){x.forEach(_)}function _(x){x.forEach(y)}function y(x){x[0]=x[0]*Math.pow(2,s)-o,x[1]=x[1]*Math.pow(2,s)-o}function b(){return o=a*3,l=n+o*2>>s,u=i+o*2>>s,f}return f.x=function(x){return arguments.length?(t=typeof x=="function"?x:Ia(+x),f):t},f.y=function(x){return arguments.length?(e=typeof x=="function"?x:Ia(+x),f):e},f.weight=function(x){return arguments.length?(r=typeof x=="function"?x:Ia(+x),f):r},f.size=function(x){if(!arguments.length)return[n,i];var k=+x[0],T=+x[1];if(!(k>=0&&T>=0))throw new Error("invalid size");return n=k,i=T,b()},f.cellSize=function(x){if(!arguments.length)return 1<<s;if(!((x=+x)>=1))throw new Error("invalid cell size");return s=Math.floor(Math.log(x)/Math.LN2),b()},f.thresholds=function(x){return arguments.length?(h=typeof x=="function"?x:Array.isArray(x)?Ia(Mv.call(x)):Ia(x),f):h},f.bandwidth=function(x){if(!arguments.length)return Math.sqrt(a*(a+1));if(!((x=+x)>=0))throw new Error("invalid bandwidth");return a=(Math.sqrt(4*x*x+1)-1)/2,b()},f}const Zi=11102230246251565e-32,Pr=134217729,wF=(3+8*Zi)*Zi;function Wd(t,e,r,n,i){let a,s,o,l,u=e[0],h=n[0],d=0,f=0;h>u==h>-u?(a=u,u=e[++d]):(a=h,h=n[++f]);let p=0;if(d<t&&f<r)for(h>u==h>-u?(s=u+a,o=a-(s-u),u=e[++d]):(s=h+a,o=a-(s-h),h=n[++f]),a=s,o!==0&&(i[p++]=o);d<t&&f<r;)h>u==h>-u?(s=a+u,l=s-a,o=a-(s-l)+(u-l),u=e[++d]):(s=a+h,l=s-a,o=a-(s-l)+(h-l),h=n[++f]),a=s,o!==0&&(i[p++]=o);for(;d<t;)s=a+u,l=s-a,o=a-(s-l)+(u-l),u=e[++d],a=s,o!==0&&(i[p++]=o);for(;f<r;)s=a+h,l=s-a,o=a-(s-l)+(h-l),h=n[++f],a=s,o!==0&&(i[p++]=o);return(a!==0||p===0)&&(i[p++]=a),p}function TF(t,e){let r=e[0];for(let n=1;n<t;n++)r+=e[n];return r}function Yl(t){return new Float64Array(t)}const EF=(3+16*Zi)*Zi,CF=(2+12*Zi)*Zi,SF=(9+64*Zi)*Zi*Zi,ko=Yl(4),Lv=Yl(8),Rv=Yl(12),Iv=Yl(16),Xr=Yl(4);function AF(t,e,r,n,i,a,s){let o,l,u,h,d,f,p,m,_,y,b,x,k,T,C,M,S,R;const A=t-i,L=r-i,v=e-a,B=n-a;T=A*B,f=Pr*A,p=f-(f-A),m=A-p,f=Pr*B,_=f-(f-B),y=B-_,C=m*y-(T-p*_-m*_-p*y),M=v*L,f=Pr*v,p=f-(f-v),m=v-p,f=Pr*L,_=f-(f-L),y=L-_,S=m*y-(M-p*_-m*_-p*y),b=C-S,d=C-b,ko[0]=C-(b+d)+(d-S),x=T+b,d=x-T,k=T-(x-d)+(b-d),b=k-M,d=k-b,ko[1]=k-(b+d)+(d-M),R=x+b,d=R-x,ko[2]=x-(R-d)+(b-d),ko[3]=R;let w=TF(4,ko),D=CF*s;if(w>=D||-w>=D||(d=t-A,o=t-(A+d)+(d-i),d=r-L,u=r-(L+d)+(d-i),d=e-v,l=e-(v+d)+(d-a),d=n-B,h=n-(B+d)+(d-a),o===0&&l===0&&u===0&&h===0)||(D=SF*s+wF*Math.abs(w),w+=A*h+B*o-(v*u+L*l),w>=D||-w>=D))return w;T=o*B,f=Pr*o,p=f-(f-o),m=o-p,f=Pr*B,_=f-(f-B),y=B-_,C=m*y-(T-p*_-m*_-p*y),M=l*L,f=Pr*l,p=f-(f-l),m=l-p,f=Pr*L,_=f-(f-L),y=L-_,S=m*y-(M-p*_-m*_-p*y),b=C-S,d=C-b,Xr[0]=C-(b+d)+(d-S),x=T+b,d=x-T,k=T-(x-d)+(b-d),b=k-M,d=k-b,Xr[1]=k-(b+d)+(d-M),R=x+b,d=R-x,Xr[2]=x-(R-d)+(b-d),Xr[3]=R;const N=Wd(4,ko,4,Xr,Lv);T=A*h,f=Pr*A,p=f-(f-A),m=A-p,f=Pr*h,_=f-(f-h),y=h-_,C=m*y-(T-p*_-m*_-p*y),M=v*u,f=Pr*v,p=f-(f-v),m=v-p,f=Pr*u,_=f-(f-u),y=u-_,S=m*y-(M-p*_-m*_-p*y),b=C-S,d=C-b,Xr[0]=C-(b+d)+(d-S),x=T+b,d=x-T,k=T-(x-d)+(b-d),b=k-M,d=k-b,Xr[1]=k-(b+d)+(d-M),R=x+b,d=R-x,Xr[2]=x-(R-d)+(b-d),Xr[3]=R;const z=Wd(N,Lv,4,Xr,Rv);T=o*h,f=Pr*o,p=f-(f-o),m=o-p,f=Pr*h,_=f-(f-h),y=h-_,C=m*y-(T-p*_-m*_-p*y),M=l*u,f=Pr*l,p=f-(f-l),m=l-p,f=Pr*u,_=f-(f-u),y=u-_,S=m*y-(M-p*_-m*_-p*y),b=C-S,d=C-b,Xr[0]=C-(b+d)+(d-S),x=T+b,d=x-T,k=T-(x-d)+(b-d),b=k-M,d=k-b,Xr[1]=k-(b+d)+(d-M),R=x+b,d=R-x,Xr[2]=x-(R-d)+(b-d),Xr[3]=R;const X=Wd(z,Rv,4,Xr,Iv);return Iv[X-1]}function sh(t,e,r,n,i,a){const s=(e-a)*(r-i),o=(t-i)*(n-a),l=s-o;if(s===0||o===0||s>0!=o>0)return l;const u=Math.abs(s+o);return Math.abs(l)>=EF*u?l:-AF(t,e,r,n,i,a,u)}const Nv=Math.pow(2,-52),oh=new Uint32Array(512);class lh{static from(e,r=NF,n=BF){const i=e.length,a=new Float64Array(i*2);for(let s=0;s<i;s++){const o=e[s];a[2*s]=r(o),a[2*s+1]=n(o)}return new lh(a)}constructor(e){const r=e.length>>1;if(r>0&&typeof e[0]!="number")throw new Error("Expected coords to contain numbers.");this.coords=e;const n=Math.max(2*r-5,0);this._triangles=new Uint32Array(n*3),this._halfedges=new Int32Array(n*3),this._hashSize=Math.ceil(Math.sqrt(r)),this._hullPrev=new Uint32Array(r),this._hullNext=new Uint32Array(r),this._hullTri=new Uint32Array(r),this._hullHash=new Int32Array(this._hashSize).fill(-1),this._ids=new Uint32Array(r),this._dists=new Float64Array(r),this.update()}update(){const{coords:e,_hullPrev:r,_hullNext:n,_hullTri:i,_hullHash:a}=this,s=e.length>>1;let o=1/0,l=1/0,u=-1/0,h=-1/0;for(let L=0;L<s;L++){const v=e[2*L],B=e[2*L+1];v<o&&(o=v),B<l&&(l=B),v>u&&(u=v),B>h&&(h=B),this._ids[L]=L}const d=(o+u)/2,f=(l+h)/2;let p=1/0,m,_,y;for(let L=0;L<s;L++){const v=Hd(d,f,e[2*L],e[2*L+1]);v<p&&(m=L,p=v)}const b=e[2*m],x=e[2*m+1];p=1/0;for(let L=0;L<s;L++){if(L===m)continue;const v=Hd(b,x,e[2*L],e[2*L+1]);v<p&&v>0&&(_=L,p=v)}let k=e[2*_],T=e[2*_+1],C=1/0;for(let L=0;L<s;L++){if(L===m||L===_)continue;const v=RF(b,x,k,T,e[2*L],e[2*L+1]);v<C&&(y=L,C=v)}let M=e[2*y],S=e[2*y+1];if(C===1/0){for(let B=0;B<s;B++)this._dists[B]=e[2*B]-e[0]||e[2*B+1]-e[1];wo(this._ids,this._dists,0,s-1);const L=new Uint32Array(s);let v=0;for(let B=0,w=-1/0;B<s;B++){const D=this._ids[B];this._dists[D]>w&&(L[v++]=D,w=this._dists[D])}this.hull=L.subarray(0,v),this.triangles=new Uint32Array(0),this.halfedges=new Uint32Array(0);return}if(sh(b,x,k,T,M,S)<0){const L=_,v=k,B=T;_=y,k=M,T=S,y=L,M=v,S=B}const R=IF(b,x,k,T,M,S);this._cx=R.x,this._cy=R.y;for(let L=0;L<s;L++)this._dists[L]=Hd(e[2*L],e[2*L+1],R.x,R.y);wo(this._ids,this._dists,0,s-1),this._hullStart=m;let A=3;n[m]=r[y]=_,n[_]=r[m]=y,n[y]=r[_]=m,i[m]=0,i[_]=1,i[y]=2,a.fill(-1),a[this._hashKey(b,x)]=m,a[this._hashKey(k,T)]=_,a[this._hashKey(M,S)]=y,this.trianglesLen=0,this._addTriangle(m,_,y,-1,-1,-1);for(let L=0,v,B;L<this._ids.length;L++){const w=this._ids[L],D=e[2*w],N=e[2*w+1];if(L>0&&Math.abs(D-v)<=Nv&&Math.abs(N-B)<=Nv||(v=D,B=N,w===m||w===_||w===y))continue;let z=0;for(let $=0,lt=this._hashKey(D,N);$<this._hashSize&&(z=a[(lt+$)%this._hashSize],!(z!==-1&&z!==n[z]));$++);z=r[z];let X=z,ct;for(;ct=n[X],sh(D,N,e[2*X],e[2*X+1],e[2*ct],e[2*ct+1])>=0;)if(X=ct,X===z){X=-1;break}if(X===-1)continue;let J=this._addTriangle(X,w,n[X],-1,-1,i[X]);i[w]=this._legalize(J+2),i[X]=J,A++;let Y=n[X];for(;ct=n[Y],sh(D,N,e[2*Y],e[2*Y+1],e[2*ct],e[2*ct+1])<0;)J=this._addTriangle(Y,w,ct,i[w],-1,i[Y]),i[w]=this._legalize(J+2),n[Y]=Y,A--,Y=ct;if(X===z)for(;ct=r[X],sh(D,N,e[2*ct],e[2*ct+1],e[2*X],e[2*X+1])<0;)J=this._addTriangle(ct,w,X,-1,i[X],i[ct]),this._legalize(J+2),i[ct]=J,n[X]=X,A--,X=ct;this._hullStart=r[w]=X,n[X]=r[Y]=w,n[w]=Y,a[this._hashKey(D,N)]=w,a[this._hashKey(e[2*X],e[2*X+1])]=X}this.hull=new Uint32Array(A);for(let L=0,v=this._hullStart;L<A;L++)this.hull[L]=v,v=n[v];this.triangles=this._triangles.subarray(0,this.trianglesLen),this.halfedges=this._halfedges.subarray(0,this.trianglesLen)}_hashKey(e,r){return Math.floor(MF(e-this._cx,r-this._cy)*this._hashSize)%this._hashSize}_legalize(e){const{_triangles:r,_halfedges:n,coords:i}=this;let a=0,s=0;for(;;){const o=n[e],l=e-e%3;if(s=l+(e+2)%3,o===-1){if(a===0)break;e=oh[--a];continue}const u=o-o%3,h=l+(e+1)%3,d=u+(o+2)%3,f=r[s],p=r[e],m=r[h],_=r[d];if(LF(i[2*f],i[2*f+1],i[2*p],i[2*p+1],i[2*m],i[2*m+1],i[2*_],i[2*_+1])){r[e]=_,r[o]=f;const b=n[d];if(b===-1){let k=this._hullStart;do{if(this._hullTri[k]===d){this._hullTri[k]=e;break}k=this._hullPrev[k]}while(k!==this._hullStart)}this._link(e,b),this._link(o,n[s]),this._link(s,d);const x=u+(o+1)%3;a<oh.length&&(oh[a++]=x)}else{if(a===0)break;e=oh[--a]}}return s}_link(e,r){this._halfedges[e]=r,r!==-1&&(this._halfedges[r]=e)}_addTriangle(e,r,n,i,a,s){const o=this.trianglesLen;return this._triangles[o]=e,this._triangles[o+1]=r,this._triangles[o+2]=n,this._link(o,i),this._link(o+1,a),this._link(o+2,s),this.trianglesLen+=3,o}}function MF(t,e){const r=t/(Math.abs(t)+Math.abs(e));return(e>0?3-r:1+r)/4}function Hd(t,e,r,n){const i=t-r,a=e-n;return i*i+a*a}function LF(t,e,r,n,i,a,s,o){const l=t-s,u=e-o,h=r-s,d=n-o,f=i-s,p=a-o,m=l*l+u*u,_=h*h+d*d,y=f*f+p*p;return l*(d*y-_*p)-u*(h*y-_*f)+m*(h*p-d*f)<0}function RF(t,e,r,n,i,a){const s=r-t,o=n-e,l=i-t,u=a-e,h=s*s+o*o,d=l*l+u*u,f=.5/(s*u-o*l),p=(u*h-o*d)*f,m=(s*d-l*h)*f;return p*p+m*m}function IF(t,e,r,n,i,a){const s=r-t,o=n-e,l=i-t,u=a-e,h=s*s+o*o,d=l*l+u*u,f=.5/(s*u-o*l),p=t+(u*h-o*d)*f,m=e+(s*d-l*h)*f;return{x:p,y:m}}function wo(t,e,r,n){if(n-r<=20)for(let i=r+1;i<=n;i++){const a=t[i],s=e[a];let o=i-1;for(;o>=r&&e[t[o]]>s;)t[o+1]=t[o--];t[o+1]=a}else{const i=r+n>>1;let a=r+1,s=n;Ul(t,i,a),e[t[r]]>e[t[n]]&&Ul(t,r,n),e[t[a]]>e[t[n]]&&Ul(t,a,n),e[t[r]]>e[t[a]]&&Ul(t,r,a);const o=t[a],l=e[o];for(;;){do a++;while(e[t[a]]<l);do s--;while(e[t[s]]>l);if(s<a)break;Ul(t,a,s)}t[r+1]=t[s],t[s]=o,n-a+1>=s-r?(wo(t,e,a,n),wo(t,e,r,s-1)):(wo(t,e,r,s-1),wo(t,e,a,n))}}function Ul(t,e,r){const n=t[e];t[e]=t[r],t[r]=n}function NF(t){return t[0]}function BF(t){return t[1]}const Bv=1e-6;class ws{constructor(){this._x0=this._y0=this._x1=this._y1=null,this._=""}moveTo(e,r){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}`}closePath(){this._x1!==null&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")}lineTo(e,r){this._+=`L${this._x1=+e},${this._y1=+r}`}arc(e,r,n){e=+e,r=+r,n=+n;const i=e+n,a=r;if(n<0)throw new Error("negative radius");this._x1===null?this._+=`M${i},${a}`:(Math.abs(this._x1-i)>Bv||Math.abs(this._y1-a)>Bv)&&(this._+="L"+i+","+a),n&&(this._+=`A${n},${n},0,1,1,${e-n},${r}A${n},${n},0,1,1,${this._x1=i},${this._y1=a}`)}rect(e,r,n,i){this._+=`M${this._x0=this._x1=+e},${this._y0=this._y1=+r}h${+n}v${+i}h${-n}Z`}value(){return this._||null}}class Gd{constructor(){this._=[]}moveTo(e,r){this._.push([e,r])}closePath(){this._.push(this._[0].slice())}lineTo(e,r){this._.push([e,r])}value(){return this._.length?this._:null}}class Dv{constructor(e,[r,n,i,a]=[0,0,960,500]){if(!((i=+i)>=(r=+r))||!((a=+a)>=(n=+n)))throw new Error("invalid bounds");this.delaunay=e,this._circumcenters=new Float64Array(e.points.length*2),this.vectors=new Float64Array(e.points.length*2),this.xmax=i,this.xmin=r,this.ymax=a,this.ymin=n,this._init()}update(){return this.delaunay.update(),this._init(),this}_init(){const{delaunay:{points:e,hull:r,triangles:n},vectors:i}=this,a=this.circumcenters=this._circumcenters.subarray(0,n.length/3*2);for(let p=0,m=0,_=n.length,y,b;p<_;p+=3,m+=2){const x=n[p]*2,k=n[p+1]*2,T=n[p+2]*2,C=e[x],M=e[x+1],S=e[k],R=e[k+1],A=e[T],L=e[T+1],v=S-C,B=R-M,w=A-C,D=L-M,N=(v*D-B*w)*2;if(Math.abs(N)<1e-9){let z=1e9;const X=n[0]*2;z*=Math.sign((e[X]-C)*D-(e[X+1]-M)*w),y=(C+A)/2-z*D,b=(M+L)/2+z*w}else{const z=1/N,X=v*v+B*B,ct=w*w+D*D;y=C+(D*X-B*ct)*z,b=M+(v*ct-w*X)*z}a[m]=y,a[m+1]=b}let s=r[r.length-1],o,l=s*4,u,h=e[2*s],d,f=e[2*s+1];i.fill(0);for(let p=0;p<r.length;++p)s=r[p],o=l,u=h,d=f,l=s*4,h=e[2*s],f=e[2*s+1],i[o+2]=i[l]=d-f,i[o+3]=i[l+1]=h-u}render(e){const r=e==null?e=new ws:void 0,{delaunay:{halfedges:n,inedges:i,hull:a},circumcenters:s,vectors:o}=this;if(a.length<=1)return null;for(let h=0,d=n.length;h<d;++h){const f=n[h];if(f<h)continue;const p=Math.floor(h/3)*2,m=Math.floor(f/3)*2,_=s[p],y=s[p+1],b=s[m],x=s[m+1];this._renderSegment(_,y,b,x,e)}let l,u=a[a.length-1];for(let h=0;h<a.length;++h){l=u,u=a[h];const d=Math.floor(i[u]/3)*2,f=s[d],p=s[d+1],m=l*4,_=this._project(f,p,o[m+2],o[m+3]);_&&this._renderSegment(f,p,_[0],_[1],e)}return r&&r.value()}renderBounds(e){const r=e==null?e=new ws:void 0;return e.rect(this.xmin,this.ymin,this.xmax-this.xmin,this.ymax-this.ymin),r&&r.value()}renderCell(e,r){const n=r==null?r=new ws:void 0,i=this._clip(e);if(i===null||!i.length)return;r.moveTo(i[0],i[1]);let a=i.length;for(;i[0]===i[a-2]&&i[1]===i[a-1]&&a>1;)a-=2;for(let s=2;s<a;s+=2)(i[s]!==i[s-2]||i[s+1]!==i[s-1])&&r.lineTo(i[s],i[s+1]);return r.closePath(),n&&n.value()}*cellPolygons(){const{delaunay:{points:e}}=this;for(let r=0,n=e.length/2;r<n;++r){const i=this.cellPolygon(r);i&&(i.index=r,yield i)}}cellPolygon(e){const r=new Gd;return this.renderCell(e,r),r.value()}_renderSegment(e,r,n,i,a){let s;const o=this._regioncode(e,r),l=this._regioncode(n,i);o===0&&l===0?(a.moveTo(e,r),a.lineTo(n,i)):(s=this._clipSegment(e,r,n,i,o,l))&&(a.moveTo(s[0],s[1]),a.lineTo(s[2],s[3]))}contains(e,r,n){return r=+r,r!==r||(n=+n,n!==n)?!1:this.delaunay._step(e,r,n)===e}*neighbors(e){const r=this._clip(e);if(r)for(const n of this.delaunay.neighbors(e)){const i=this._clip(n);if(i){t:for(let a=0,s=r.length;a<s;a+=2)for(let o=0,l=i.length;o<l;o+=2)if(r[a]==i[o]&&r[a+1]==i[o+1]&&r[(a+2)%s]==i[(o+l-2)%l]&&r[(a+3)%s]==i[(o+l-1)%l]){yield n;break t}}}}_cell(e){const{circumcenters:r,delaunay:{inedges:n,halfedges:i,triangles:a}}=this,s=n[e];if(s===-1)return null;const o=[];let l=s;do{const u=Math.floor(l/3);if(o.push(r[u*2],r[u*2+1]),l=l%3===2?l-2:l+1,a[l]!==e)break;l=i[l]}while(l!==s&&l!==-1);return o}_clip(e){if(e===0&&this.delaunay.hull.length===1)return[this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax,this.xmin,this.ymin];const r=this._cell(e);if(r===null)return null;const{vectors:n}=this,i=e*4;return n[i]||n[i+1]?this._clipInfinite(e,r,n[i],n[i+1],n[i+2],n[i+3]):this._clipFinite(e,r)}_clipFinite(e,r){const n=r.length;let i=null,a,s,o=r[n-2],l=r[n-1],u,h=this._regioncode(o,l),d,f=0;for(let p=0;p<n;p+=2)if(a=o,s=l,o=r[p],l=r[p+1],u=h,h=this._regioncode(o,l),u===0&&h===0)d=f,f=0,i?i.push(o,l):i=[o,l];else{let m,_,y,b,x;if(u===0){if((m=this._clipSegment(a,s,o,l,u,h))===null)continue;[_,y,b,x]=m}else{if((m=this._clipSegment(o,l,a,s,h,u))===null)continue;[b,x,_,y]=m,d=f,f=this._edgecode(_,y),d&&f&&this._edge(e,d,f,i,i.length),i?i.push(_,y):i=[_,y]}d=f,f=this._edgecode(b,x),d&&f&&this._edge(e,d,f,i,i.length),i?i.push(b,x):i=[b,x]}if(i)d=f,f=this._edgecode(i[0],i[1]),d&&f&&this._edge(e,d,f,i,i.length);else if(this.contains(e,(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 i}_clipSegment(e,r,n,i,a,s){for(;;){if(a===0&&s===0)return[e,r,n,i];if(a&s)return null;let o,l,u=a||s;u&8?(o=e+(n-e)*(this.ymax-r)/(i-r),l=this.ymax):u&4?(o=e+(n-e)*(this.ymin-r)/(i-r),l=this.ymin):u&2?(l=r+(i-r)*(this.xmax-e)/(n-e),o=this.xmax):(l=r+(i-r)*(this.xmin-e)/(n-e),o=this.xmin),a?(e=o,r=l,a=this._regioncode(e,r)):(n=o,i=l,s=this._regioncode(n,i))}}_clipInfinite(e,r,n,i,a,s){let o=Array.from(r),l;if((l=this._project(o[0],o[1],n,i))&&o.unshift(l[0],l[1]),(l=this._project(o[o.length-2],o[o.length-1],a,s))&&o.push(l[0],l[1]),o=this._clipFinite(e,o))for(let u=0,h=o.length,d,f=this._edgecode(o[h-2],o[h-1]);u<h;u+=2)d=f,f=this._edgecode(o[u],o[u+1]),d&&f&&(u=this._edge(e,d,f,o,u),h=o.length);else this.contains(e,(this.xmin+this.xmax)/2,(this.ymin+this.ymax)/2)&&(o=[this.xmin,this.ymin,this.xmax,this.ymin,this.xmax,this.ymax,this.xmin,this.ymax]);return o}_edge(e,r,n,i,a){for(;r!==n;){let s,o;switch(r){case 5:r=4;continue;case 4:r=6,s=this.xmax,o=this.ymin;break;case 6:r=2;continue;case 2:r=10,s=this.xmax,o=this.ymax;break;case 10:r=8;continue;case 8:r=9,s=this.xmin,o=this.ymax;break;case 9:r=1;continue;case 1:r=5,s=this.xmin,o=this.ymin;break}(i[a]!==s||i[a+1]!==o)&&this.contains(e,s,o)&&(i.splice(a,0,s,o),a+=2)}if(i.length>4)for(let s=0;s<i.length;s+=2){const o=(s+2)%i.length,l=(s+4)%i.length;(i[s]===i[o]&&i[o]===i[l]||i[s+1]===i[o+1]&&i[o+1]===i[l+1])&&(i.splice(o,2),s-=2)}return a}_project(e,r,n,i){let a=1/0,s,o,l;if(i<0){if(r<=this.ymin)return null;(s=(this.ymin-r)/i)<a&&(l=this.ymin,o=e+(a=s)*n)}else if(i>0){if(r>=this.ymax)return null;(s=(this.ymax-r)/i)<a&&(l=this.ymax,o=e+(a=s)*n)}if(n>0){if(e>=this.xmax)return null;(s=(this.xmax-e)/n)<a&&(o=this.xmax,l=r+(a=s)*i)}else if(n<0){if(e<=this.xmin)return null;(s=(this.xmin-e)/n)<a&&(o=this.xmin,l=r+(a=s)*i)}return[o,l]}_edgecode(e,r){return(e===this.xmin?1:e===this.xmax?2:0)|(r===this.ymin?4:r===this.ymax?8:0)}_regioncode(e,r){return(e<this.xmin?1:e>this.xmax?2:0)|(r<this.ymin?4:r>this.ymax?8:0)}}const DF=2*Math.PI,To=Math.pow;function OF(t){return t[0]}function FF(t){return t[1]}function PF(t){const{triangles:e,coords:r}=t;for(let n=0;n<e.length;n+=3){const i=2*e[n],a=2*e[n+1],s=2*e[n+2];if((r[s]-r[i])*(r[a+1]-r[i+1])-(r[a]-r[i])*(r[s+1]-r[i+1])>1e-10)return!1}return!0}function qF(t,e,r){return[t+Math.sin(t+e)*r,e+Math.cos(t-e)*r]}class jd{static from(e,r=OF,n=FF,i){return new jd("length"in e?VF(e,r,n,i):Float64Array.from(zF(e,r,n,i)))}constructor(e){this._delaunator=new lh(e),this.inedges=new Int32Array(e.length/2),this._hullIndex=new Int32Array(e.length/2),this.points=this._delaunator.coords,this._init()}update(){return this._delaunator.update(),this._init(),this}_init(){const e=this._delaunator,r=this.points;if(e.hull&&e.hull.length>2&&PF(e)){this.collinear=Int32Array.from({length:r.length/2},(f,p)=>p).sort((f,p)=>r[2*f]-r[2*p]||r[2*f+1]-r[2*p+1]);const l=this.collinear[0],u=this.collinear[this.collinear.length-1],h=[r[2*l],r[2*l+1],r[2*u],r[2*u+1]],d=1e-8*Math.hypot(h[3]-h[1],h[2]-h[0]);for(let f=0,p=r.length/2;f<p;++f){const m=qF(r[2*f],r[2*f+1],d);r[2*f]=m[0],r[2*f+1]=m[1]}this._delaunator=new lh(r)}else delete this.collinear;const n=this.halfedges=this._delaunator.halfedges,i=this.hull=this._delaunator.hull,a=this.triangles=this._delaunator.triangles,s=this.inedges.fill(-1),o=this._hullIndex.fill(-1);for(let l=0,u=n.length;l<u;++l){const h=a[l%3===2?l-2:l+1];(n[l]===-1||s[h]===-1)&&(s[h]=l)}for(let l=0,u=i.length;l<u;++l)o[i[l]]=l;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],s[i[0]]=1,i.length===2&&(s[i[1]]=0,this.triangles[1]=i[1],this.triangles[2]=i[1]))}voronoi(e){return new Dv(this,e)}*neighbors(e){const{inedges:r,hull:n,_hullIndex:i,halfedges:a,triangles:s,collinear:o}=this;if(o){const d=o.indexOf(e);d>0&&(yield o[d-1]),d<o.length-1&&(yield o[d+1]);return}const l=r[e];if(l===-1)return;let u=l,h=-1;do{if(yield h=s[u],u=u%3===2?u-2:u+1,s[u]!==e)return;if(u=a[u],u===-1){const d=n[(i[e]+1)%n.length];d!==h&&(yield d);return}}while(u!==l)}find(e,r,n=0){if(e=+e,e!==e||(r=+r,r!==r))return-1;const i=n;let a;for(;(a=this._step(n,e,r))>=0&&a!==n&&a!==i;)n=a;return a}_step(e,r,n){const{inedges:i,hull:a,_hullIndex:s,halfedges:o,triangles:l,points:u}=this;if(i[e]===-1||!u.length)return(e+1)%(u.length>>1);let h=e,d=To(r-u[e*2],2)+To(n-u[e*2+1],2);const f=i[e];let p=f;do{let m=l[p];const _=To(r-u[m*2],2)+To(n-u[m*2+1],2);if(_<d&&(d=_,h=m),p=p%3===2?p-2:p+1,l[p]!==e)break;if(p=o[p],p===-1){if(p=a[(s[e]+1)%a.length],p!==m&&To(r-u[p*2],2)+To(n-u[p*2+1],2)<d)return p;break}}while(p!==f);return h}render(e){const r=e==null?e=new ws:void 0,{points:n,halfedges:i,triangles:a}=this;for(let s=0,o=i.length;s<o;++s){const l=i[s];if(l<s)continue;const u=a[s]*2,h=a[l]*2;e.moveTo(n[u],n[u+1]),e.lineTo(n[h],n[h+1])}return this.renderHull(e),r&&r.value()}renderPoints(e,r){r===void 0&&(!e||typeof e.moveTo!="function")&&(r=e,e=null),r=r==null?2:+r;const n=e==null?e=new ws:void 0,{points:i}=this;for(let a=0,s=i.length;a<s;a+=2){const o=i[a],l=i[a+1];e.moveTo(o+r,l),e.arc(o,l,r,0,DF)}return n&&n.value()}renderHull(e){const r=e==null?e=new ws:void 0,{hull:n,points:i}=this,a=n[0]*2,s=n.length;e.moveTo(i[a],i[a+1]);for(let o=1;o<s;++o){const l=2*n[o];e.lineTo(i[l],i[l+1])}return e.closePath(),r&&r.value()}hullPolygon(){const e=new Gd;return this.renderHull(e),e.value()}renderTriangle(e,r){const n=r==null?r=new ws:void 0,{points:i,triangles:a}=this,s=a[e*=3]*2,o=a[e+1]*2,l=a[e+2]*2;return r.moveTo(i[s],i[s+1]),r.lineTo(i[o],i[o+1]),r.lineTo(i[l],i[l+1]),r.closePath(),n&&n.value()}*trianglePolygons(){const{triangles:e}=this;for(let r=0,n=e.length/3;r<n;++r)yield this.trianglePolygon(r)}trianglePolygon(e){const r=new Gd;return this.renderTriangle(e,r),r.value()}}function VF(t,e,r,n){const i=t.length,a=new Float64Array(i*2);for(let s=0;s<i;++s){const o=t[s];a[s*2]=e.call(n,o,s,t),a[s*2+1]=r.call(n,o,s,t)}return a}function*zF(t,e,r,n){let i=0;for(const a of t)yield e.call(n,a,i,t),yield r.call(n,a,i,t),++i}var Ov={},$d={},Xd=34,Wl=10,Kd=13;function Fv(t){return new Function("d","return {"+t.map(function(e,r){return JSON.stringify(e)+": d["+r+'] || ""'}).join(",")+"}")}function YF(t,e){var r=Fv(t);return function(n,i){return e(r(n),i,t)}}function Pv(t){var e=Object.create(null),r=[];return t.forEach(function(n){for(var i in n)i in e||r.push(e[i]=i)}),r}function dn(t,e){var r=t+"",n=r.length;return n<e?new Array(e-n+1).join(0)+r:r}function UF(t){return t<0?"-"+dn(-t,6):t>9999?"+"+dn(t,6):dn(t,4)}function WF(t){var e=t.getUTCHours(),r=t.getUTCMinutes(),n=t.getUTCSeconds(),i=t.getUTCMilliseconds();return isNaN(t)?"Invalid Date":UF(t.getUTCFullYear())+"-"+dn(t.getUTCMonth()+1,2)+"-"+dn(t.getUTCDate(),2)+(i?"T"+dn(e,2)+":"+dn(r,2)+":"+dn(n,2)+"."+dn(i,3)+"Z":n?"T"+dn(e,2)+":"+dn(r,2)+":"+dn(n,2)+"Z":r||e?"T"+dn(e,2)+":"+dn(r,2)+"Z":"")}function ch(t){var e=new RegExp('["'+t+`
+\r]`),r=t.charCodeAt(0);function n(d,f){var p,m,_=i(d,function(y,b){if(p)return p(y,b-1);m=y,p=f?YF(y,f):Fv(y)});return _.columns=m||[],_}function i(d,f){var p=[],m=d.length,_=0,y=0,b,x=m<=0,k=!1;d.charCodeAt(m-1)===Wl&&--m,d.charCodeAt(m-1)===Kd&&--m;function T(){if(x)return $d;if(k)return k=!1,Ov;var M,S=_,R;if(d.charCodeAt(S)===Xd){for(;_++<m&&d.charCodeAt(_)!==Xd||d.charCodeAt(++_)===Xd;);return(M=_)>=m?x=!0:(R=d.charCodeAt(_++))===Wl?k=!0:R===Kd&&(k=!0,d.charCodeAt(_)===Wl&&++_),d.slice(S+1,M-1).replace(/""/g,'"')}for(;_<m;){if((R=d.charCodeAt(M=_++))===Wl)k=!0;else if(R===Kd)k=!0,d.charCodeAt(_)===Wl&&++_;else if(R!==r)continue;return d.slice(S,M)}return x=!0,d.slice(S,m)}for(;(b=T())!==$d;){for(var C=[];b!==Ov&&b!==$d;)C.push(b),b=T();f&&(C=f(C,y++))==null||p.push(C)}return p}function a(d,f){return d.map(function(p){return f.map(function(m){return h(p[m])}).join(t)})}function s(d,f){return f==null&&(f=Pv(d)),[f.map(h).join(t)].concat(a(d,f)).join(`
+`)}function o(d,f){return f==null&&(f=Pv(d)),a(d,f).join(`
+`)}function l(d){return d.map(u).join(`
+`)}function u(d){return d.map(h).join(t)}function h(d){return d==null?"":d instanceof Date?WF(d):e.test(d+="")?'"'+d.replace(/"/g,'""')+'"':d}return{parse:n,parseRows:i,format:s,formatBody:o,formatRows:l,formatRow:u,formatValue:h}}var Ts=ch(","),qv=Ts.parse,HF=Ts.parseRows,GF=Ts.format,jF=Ts.formatBody,$F=Ts.formatRows,XF=Ts.formatRow,KF=Ts.formatValue,Es=ch(" "),Vv=Es.parse,ZF=Es.parseRows,QF=Es.format,JF=Es.formatBody,tP=Es.formatRows,eP=Es.formatRow,rP=Es.formatValue;function nP(t){for(var e in t){var r=t[e].trim(),n,i;if(!r)r=null;else if(r==="true")r=!0;else if(r==="false")r=!1;else if(r==="NaN")r=NaN;else if(!isNaN(n=+r))r=n;else if(i=r.match(/^([-+]\d{2})?\d{4}(-\d{2}(-\d{2})?)?(T\d{2}:\d{2}(:\d{2}(\.\d{3})?)?(Z|[-+]\d{2}:\d{2})?)?$/))iP&&!!i[4]&&!i[7]&&(r=r.replace(/-/g,"/").replace(/T/," ")),r=new Date(r);else continue;t[e]=r}return t}const iP=new Date("2019-01-01T00:00").getHours()||new Date("2019-07-01T00:00").getHours();function aP(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.blob()}function sP(t,e){return fetch(t,e).then(aP)}function oP(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.arrayBuffer()}function lP(t,e){return fetch(t,e).then(oP)}function cP(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);return t.text()}function uh(t,e){return fetch(t,e).then(cP)}function zv(t){return function(e,r,n){return arguments.length===2&&typeof r=="function"&&(n=r,r=void 0),uh(e,r).then(function(i){return t(i,n)})}}function uP(t,e,r,n){arguments.length===3&&typeof r=="function"&&(n=r,r=void 0);var i=ch(t);return uh(e,r).then(function(a){return i.parse(a,n)})}var hP=zv(qv),fP=zv(Vv);function dP(t,e){return new Promise(function(r,n){var i=new Image;for(var a in e)i[a]=e[a];i.onerror=n,i.onload=function(){r(i)},i.src=t})}function pP(t){if(!t.ok)throw new Error(t.status+" "+t.statusText);if(!(t.status===204||t.status===205))return t.json()}function gP(t,e){return fetch(t,e).then(pP)}function Zd(t){return(e,r)=>uh(e,r).then(n=>new DOMParser().parseFromString(n,t))}const yP=Zd("application/xml");var mP=Zd("text/html"),bP=Zd("image/svg+xml");function _P(t,e){var r,n=1;t==null&&(t=0),e==null&&(e=0);function i(){var a,s=r.length,o,l=0,u=0;for(a=0;a<s;++a)o=r[a],l+=o.x,u+=o.y;for(l=(l/s-t)*n,u=(u/s-e)*n,a=0;a<s;++a)o=r[a],o.x-=l,o.y-=u}return i.initialize=function(a){r=a},i.x=function(a){return arguments.length?(t=+a,i):t},i.y=function(a){return arguments.length?(e=+a,i):e},i.strength=function(a){return arguments.length?(n=+a,i):n},i}function vP(t){const e=+this._x.call(null,t),r=+this._y.call(null,t);return Yv(this.cover(e,r),e,r,t)}function Yv(t,e,r,n){if(isNaN(e)||isNaN(r))return t;var i,a=t._root,s={data:n},o=t._x0,l=t._y0,u=t._x1,h=t._y1,d,f,p,m,_,y,b,x;if(!a)return t._root=s,t;for(;a.length;)if((_=e>=(d=(o+u)/2))?o=d:u=d,(y=r>=(f=(l+h)/2))?l=f:h=f,i=a,!(a=a[b=y<<1|_]))return i[b]=s,t;if(p=+t._x.call(null,a.data),m=+t._y.call(null,a.data),e===p&&r===m)return s.next=a,i?i[b]=s:t._root=s,t;do i=i?i[b]=new Array(4):t._root=new Array(4),(_=e>=(d=(o+u)/2))?o=d:u=d,(y=r>=(f=(l+h)/2))?l=f:h=f;while((b=y<<1|_)===(x=(m>=f)<<1|p>=d));return i[x]=a,i[b]=s,t}function xP(t){var e,r,n=t.length,i,a,s=new Array(n),o=new Array(n),l=1/0,u=1/0,h=-1/0,d=-1/0;for(r=0;r<n;++r)isNaN(i=+this._x.call(null,e=t[r]))||isNaN(a=+this._y.call(null,e))||(s[r]=i,o[r]=a,i<l&&(l=i),i>h&&(h=i),a<u&&(u=a),a>d&&(d=a));if(l>h||u>d)return this;for(this.cover(l,u).cover(h,d),r=0;r<n;++r)Yv(this,s[r],o[r],t[r]);return this}function kP(t,e){if(isNaN(t=+t)||isNaN(e=+e))return this;var r=this._x0,n=this._y0,i=this._x1,a=this._y1;if(isNaN(r))i=(r=Math.floor(t))+1,a=(n=Math.floor(e))+1;else{for(var s=i-r||1,o=this._root,l,u;r>t||t>=i||n>e||e>=a;)switch(u=(e<n)<<1|t<r,l=new Array(4),l[u]=o,o=l,s*=2,u){case 0:i=r+s,a=n+s;break;case 1:r=i-s,a=n+s;break;case 2:i=r+s,n=a-s;break;case 3:r=i-s,n=a-s;break}this._root&&this._root.length&&(this._root=o)}return this._x0=r,this._y0=n,this._x1=i,this._y1=a,this}function wP(){var t=[];return this.visit(function(e){if(!e.length)do t.push(e.data);while(e=e.next)}),t}function TP(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]]}function Kr(t,e,r,n,i){this.node=t,this.x0=e,this.y0=r,this.x1=n,this.y1=i}function EP(t,e,r){var n,i=this._x0,a=this._y0,s,o,l,u,h=this._x1,d=this._y1,f=[],p=this._root,m,_;for(p&&f.push(new Kr(p,i,a,h,d)),r==null?r=1/0:(i=t-r,a=e-r,h=t+r,d=e+r,r*=r);m=f.pop();)if(!(!(p=m.node)||(s=m.x0)>h||(o=m.y0)>d||(l=m.x1)<i||(u=m.y1)<a))if(p.length){var y=(s+l)/2,b=(o+u)/2;f.push(new Kr(p[3],y,b,l,u),new Kr(p[2],s,b,y,u),new Kr(p[1],y,o,l,b),new Kr(p[0],s,o,y,b)),(_=(e>=b)<<1|t>=y)&&(m=f[f.length-1],f[f.length-1]=f[f.length-1-_],f[f.length-1-_]=m)}else{var x=t-+this._x.call(null,p.data),k=e-+this._y.call(null,p.data),T=x*x+k*k;if(T<r){var C=Math.sqrt(r=T);i=t-C,a=e-C,h=t+C,d=e+C,n=p.data}}return n}function CP(t){if(isNaN(h=+this._x.call(null,t))||isNaN(d=+this._y.call(null,t)))return this;var e,r=this._root,n,i,a,s=this._x0,o=this._y0,l=this._x1,u=this._y1,h,d,f,p,m,_,y,b;if(!r)return this;if(r.length)for(;;){if((m=h>=(f=(s+l)/2))?s=f:l=f,(_=d>=(p=(o+u)/2))?o=p:u=p,e=r,!(r=r[y=_<<1|m]))return this;if(!r.length)break;(e[y+1&3]||e[y+2&3]||e[y+3&3])&&(n=e,b=y)}for(;r.data!==t;)if(i=r,!(r=r.next))return this;return(a=r.next)&&delete r.next,i?(a?i.next=a:delete i.next,this):e?(a?e[y]=a:delete e[y],(r=e[0]||e[1]||e[2]||e[3])&&r===(e[3]||e[2]||e[1]||e[0])&&!r.length&&(n?n[b]=r:this._root=r),this):(this._root=a,this)}function SP(t){for(var e=0,r=t.length;e<r;++e)this.remove(t[e]);return this}function AP(){return this._root}function MP(){var t=0;return this.visit(function(e){if(!e.length)do++t;while(e=e.next)}),t}function LP(t){var e=[],r,n=this._root,i,a,s,o,l;for(n&&e.push(new Kr(n,this._x0,this._y0,this._x1,this._y1));r=e.pop();)if(!t(n=r.node,a=r.x0,s=r.y0,o=r.x1,l=r.y1)&&n.length){var u=(a+o)/2,h=(s+l)/2;(i=n[3])&&e.push(new Kr(i,u,h,o,l)),(i=n[2])&&e.push(new Kr(i,a,h,u,l)),(i=n[1])&&e.push(new Kr(i,u,s,o,h)),(i=n[0])&&e.push(new Kr(i,a,s,u,h))}return this}function RP(t){var e=[],r=[],n;for(this._root&&e.push(new Kr(this._root,this._x0,this._y0,this._x1,this._y1));n=e.pop();){var i=n.node;if(i.length){var a,s=n.x0,o=n.y0,l=n.x1,u=n.y1,h=(s+l)/2,d=(o+u)/2;(a=i[0])&&e.push(new Kr(a,s,o,h,d)),(a=i[1])&&e.push(new Kr(a,h,o,l,d)),(a=i[2])&&e.push(new Kr(a,s,d,h,u)),(a=i[3])&&e.push(new Kr(a,h,d,l,u))}r.push(n)}for(;n=r.pop();)t(n.node,n.x0,n.y0,n.x1,n.y1);return this}function IP(t){return t[0]}function NP(t){return arguments.length?(this._x=t,this):this._x}function BP(t){return t[1]}function DP(t){return arguments.length?(this._y=t,this):this._y}function hh(t,e,r){var n=new Qd(e==null?IP:e,r==null?BP:r,NaN,NaN,NaN,NaN);return t==null?n:n.addAll(t)}function Qd(t,e,r,n,i,a){this._x=t,this._y=e,this._x0=r,this._y0=n,this._x1=i,this._y1=a,this._root=void 0}function Uv(t){for(var e={data:t.data},r=e;t=t.next;)r=r.next={data:t.data};return e}var Zr=hh.prototype=Qd.prototype;Zr.copy=function(){var t=new Qd(this._x,this._y,this._x0,this._y0,this._x1,this._y1),e=this._root,r,n;if(!e)return t;if(!e.length)return t._root=Uv(e),t;for(r=[{source:e,target:t._root=new Array(4)}];e=r.pop();)for(var i=0;i<4;++i)(n=e.source[i])&&(n.length?r.push({source:n,target:e.target[i]=new Array(4)}):e.target[i]=Uv(n));return t},Zr.add=vP,Zr.addAll=xP,Zr.cover=kP,Zr.data=wP,Zr.extent=TP,Zr.find=EP,Zr.remove=CP,Zr.removeAll=SP,Zr.root=AP,Zr.size=MP,Zr.visit=LP,Zr.visitAfter=RP,Zr.x=NP,Zr.y=DP;function vr(t){return function(){return t}}function Na(t){return(t()-.5)*1e-6}function OP(t){return t.x+t.vx}function FP(t){return t.y+t.vy}function PP(t){var e,r,n,i=1,a=1;typeof t!="function"&&(t=vr(t==null?1:+t));function s(){for(var u,h=e.length,d,f,p,m,_,y,b=0;b<a;++b)for(d=hh(e,OP,FP).visitAfter(o),u=0;u<h;++u)f=e[u],_=r[f.index],y=_*_,p=f.x+f.vx,m=f.y+f.vy,d.visit(x);function x(k,T,C,M,S){var R=k.data,A=k.r,L=_+A;if(R){if(R.index>f.index){var v=p-R.x-R.vx,B=m-R.y-R.vy,w=v*v+B*B;w<L*L&&(v===0&&(v=Na(n),w+=v*v),B===0&&(B=Na(n),w+=B*B),w=(L-(w=Math.sqrt(w)))/w*i,f.vx+=(v*=w)*(L=(A*=A)/(y+A)),f.vy+=(B*=w)*L,R.vx-=v*(L=1-L),R.vy-=B*L)}return}return T>p+L||M<p-L||C>m+L||S<m-L}}function o(u){if(u.data)return u.r=r[u.data.index];for(var h=u.r=0;h<4;++h)u[h]&&u[h].r>u.r&&(u.r=u[h].r)}function l(){if(!!e){var u,h=e.length,d;for(r=new Array(h),u=0;u<h;++u)d=e[u],r[d.index]=+t(d,u,e)}}return s.initialize=function(u,h){e=u,n=h,l()},s.iterations=function(u){return arguments.length?(a=+u,s):a},s.strength=function(u){return arguments.length?(i=+u,s):i},s.radius=function(u){return arguments.length?(t=typeof u=="function"?u:vr(+u),l(),s):t},s}function qP(t){return t.index}function Wv(t,e){var r=t.get(e);if(!r)throw new Error("node not found: "+e);return r}function VP(t){var e=qP,r=d,n,i=vr(30),a,s,o,l,u,h=1;t==null&&(t=[]);function d(y){return 1/Math.min(o[y.source.index],o[y.target.index])}function f(y){for(var b=0,x=t.length;b<h;++b)for(var k=0,T,C,M,S,R,A,L;k<x;++k)T=t[k],C=T.source,M=T.target,S=M.x+M.vx-C.x-C.vx||Na(u),R=M.y+M.vy-C.y-C.vy||Na(u),A=Math.sqrt(S*S+R*R),A=(A-a[k])/A*y*n[k],S*=A,R*=A,M.vx-=S*(L=l[k]),M.vy-=R*L,C.vx+=S*(L=1-L),C.vy+=R*L}function p(){if(!!s){var y,b=s.length,x=t.length,k=new Map(s.map((C,M)=>[e(C,M,s),C])),T;for(y=0,o=new Array(b);y<x;++y)T=t[y],T.index=y,typeof T.source!="object"&&(T.source=Wv(k,T.source)),typeof T.target!="object"&&(T.target=Wv(k,T.target)),o[T.source.index]=(o[T.source.index]||0)+1,o[T.target.index]=(o[T.target.index]||0)+1;for(y=0,l=new Array(x);y<x;++y)T=t[y],l[y]=o[T.source.index]/(o[T.source.index]+o[T.target.index]);n=new Array(x),m(),a=new Array(x),_()}}function m(){if(!!s)for(var y=0,b=t.length;y<b;++y)n[y]=+r(t[y],y,t)}function _(){if(!!s)for(var y=0,b=t.length;y<b;++y)a[y]=+i(t[y],y,t)}return f.initialize=function(y,b){s=y,u=b,p()},f.links=function(y){return arguments.length?(t=y,p(),f):t},f.id=function(y){return arguments.length?(e=y,f):e},f.iterations=function(y){return arguments.length?(h=+y,f):h},f.strength=function(y){return arguments.length?(r=typeof y=="function"?y:vr(+y),m(),f):r},f.distance=function(y){return arguments.length?(i=typeof y=="function"?y:vr(+y),_(),f):i},f}const zP=1664525,YP=1013904223,Hv=4294967296;function UP(){let t=1;return()=>(t=(zP*t+YP)%Hv)/Hv}function WP(t){return t.x}function HP(t){return t.y}var GP=10,jP=Math.PI*(3-Math.sqrt(5));function $P(t){var e,r=1,n=.001,i=1-Math.pow(n,1/300),a=0,s=.6,o=new Map,l=Qu(d),u=fs("tick","end"),h=UP();t==null&&(t=[]);function d(){f(),u.call("tick",e),r<n&&(l.stop(),u.call("end",e))}function f(_){var y,b=t.length,x;_===void 0&&(_=1);for(var k=0;k<_;++k)for(r+=(a-r)*i,o.forEach(function(T){T(r)}),y=0;y<b;++y)x=t[y],x.fx==null?x.x+=x.vx*=s:(x.x=x.fx,x.vx=0),x.fy==null?x.y+=x.vy*=s:(x.y=x.fy,x.vy=0);return e}function p(){for(var _=0,y=t.length,b;_<y;++_){if(b=t[_],b.index=_,b.fx!=null&&(b.x=b.fx),b.fy!=null&&(b.y=b.fy),isNaN(b.x)||isNaN(b.y)){var x=GP*Math.sqrt(.5+_),k=_*jP;b.x=x*Math.cos(k),b.y=x*Math.sin(k)}(isNaN(b.vx)||isNaN(b.vy))&&(b.vx=b.vy=0)}}function m(_){return _.initialize&&_.initialize(t,h),_}return p(),e={tick:f,restart:function(){return l.restart(d),e},stop:function(){return l.stop(),e},nodes:function(_){return arguments.length?(t=_,p(),o.forEach(m),e):t},alpha:function(_){return arguments.length?(r=+_,e):r},alphaMin:function(_){return arguments.length?(n=+_,e):n},alphaDecay:function(_){return arguments.length?(i=+_,e):+i},alphaTarget:function(_){return arguments.length?(a=+_,e):a},velocityDecay:function(_){return arguments.length?(s=1-_,e):1-s},randomSource:function(_){return arguments.length?(h=_,o.forEach(m),e):h},force:function(_,y){return arguments.length>1?(y==null?o.delete(_):o.set(_,m(y)),e):o.get(_)},find:function(_,y,b){var x=0,k=t.length,T,C,M,S,R;for(b==null?b=1/0:b*=b,x=0;x<k;++x)S=t[x],T=_-S.x,C=y-S.y,M=T*T+C*C,M<b&&(R=S,b=M);return R},on:function(_,y){return arguments.length>1?(u.on(_,y),e):u.on(_)}}}function XP(){var t,e,r,n,i=vr(-30),a,s=1,o=1/0,l=.81;function u(p){var m,_=t.length,y=hh(t,WP,HP).visitAfter(d);for(n=p,m=0;m<_;++m)e=t[m],y.visit(f)}function h(){if(!!t){var p,m=t.length,_;for(a=new Array(m),p=0;p<m;++p)_=t[p],a[_.index]=+i(_,p,t)}}function d(p){var m=0,_,y,b=0,x,k,T;if(p.length){for(x=k=T=0;T<4;++T)(_=p[T])&&(y=Math.abs(_.value))&&(m+=_.value,b+=y,x+=y*_.x,k+=y*_.y);p.x=x/b,p.y=k/b}else{_=p,_.x=_.data.x,_.y=_.data.y;do m+=a[_.data.index];while(_=_.next)}p.value=m}function f(p,m,_,y){if(!p.value)return!0;var b=p.x-e.x,x=p.y-e.y,k=y-m,T=b*b+x*x;if(k*k/l<T)return T<o&&(b===0&&(b=Na(r),T+=b*b),x===0&&(x=Na(r),T+=x*x),T<s&&(T=Math.sqrt(s*T)),e.vx+=b*p.value*n/T,e.vy+=x*p.value*n/T),!0;if(p.length||T>=o)return;(p.data!==e||p.next)&&(b===0&&(b=Na(r),T+=b*b),x===0&&(x=Na(r),T+=x*x),T<s&&(T=Math.sqrt(s*T)));do p.data!==e&&(k=a[p.data.index]*n/T,e.vx+=b*k,e.vy+=x*k);while(p=p.next)}return u.initialize=function(p,m){t=p,r=m,h()},u.strength=function(p){return arguments.length?(i=typeof p=="function"?p:vr(+p),h(),u):i},u.distanceMin=function(p){return arguments.length?(s=p*p,u):Math.sqrt(s)},u.distanceMax=function(p){return arguments.length?(o=p*p,u):Math.sqrt(o)},u.theta=function(p){return arguments.length?(l=p*p,u):Math.sqrt(l)},u}function KP(t,e,r){var n,i=vr(.1),a,s;typeof t!="function"&&(t=vr(+t)),e==null&&(e=0),r==null&&(r=0);function o(u){for(var h=0,d=n.length;h<d;++h){var f=n[h],p=f.x-e||1e-6,m=f.y-r||1e-6,_=Math.sqrt(p*p+m*m),y=(s[h]-_)*a[h]*u/_;f.vx+=p*y,f.vy+=m*y}}function l(){if(!!n){var u,h=n.length;for(a=new Array(h),s=new Array(h),u=0;u<h;++u)s[u]=+t(n[u],u,n),a[u]=isNaN(s[u])?0:+i(n[u],u,n)}}return o.initialize=function(u){n=u,l()},o.strength=function(u){return arguments.length?(i=typeof u=="function"?u:vr(+u),l(),o):i},o.radius=function(u){return arguments.length?(t=typeof u=="function"?u:vr(+u),l(),o):t},o.x=function(u){return arguments.length?(e=+u,o):e},o.y=function(u){return arguments.length?(r=+u,o):r},o}function ZP(t){var e=vr(.1),r,n,i;typeof t!="function"&&(t=vr(t==null?0:+t));function a(o){for(var l=0,u=r.length,h;l<u;++l)h=r[l],h.vx+=(i[l]-h.x)*n[l]*o}function s(){if(!!r){var o,l=r.length;for(n=new Array(l),i=new Array(l),o=0;o<l;++o)n[o]=isNaN(i[o]=+t(r[o],o,r))?0:+e(r[o],o,r)}}return a.initialize=function(o){r=o,s()},a.strength=function(o){return arguments.length?(e=typeof o=="function"?o:vr(+o),s(),a):e},a.x=function(o){return arguments.length?(t=typeof o=="function"?o:vr(+o),s(),a):t},a}function QP(t){var e=vr(.1),r,n,i;typeof t!="function"&&(t=vr(t==null?0:+t));function a(o){for(var l=0,u=r.length,h;l<u;++l)h=r[l],h.vy+=(i[l]-h.y)*n[l]*o}function s(){if(!!r){var o,l=r.length;for(n=new Array(l),i=new Array(l),o=0;o<l;++o)n[o]=isNaN(i[o]=+t(r[o],o,r))?0:+e(r[o],o,r)}}return a.initialize=function(o){r=o,s()},a.strength=function(o){return arguments.length?(e=typeof o=="function"?o:vr(+o),s(),a):e},a.y=function(o){return arguments.length?(t=typeof o=="function"?o:vr(+o),s(),a):t},a}function JP(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)}function fh(t,e){if((r=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var r,n=t.slice(0,r);return[n.length>1?n[0]+n.slice(2):n,+t.slice(r+1)]}function Eo(t){return t=fh(Math.abs(t)),t?t[1]:NaN}function tq(t,e){return function(r,n){for(var i=r.length,a=[],s=0,o=t[0],l=0;i>0&&o>0&&(l+o+1>n&&(o=Math.max(1,n-l)),a.push(r.substring(i-=o,i+o)),!((l+=o+1)>n));)o=t[s=(s+1)%t.length];return a.reverse().join(e)}}function eq(t){return function(e){return e.replace(/[0-9]/g,function(r){return t[+r]})}}var rq=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function Co(t){if(!(e=rq.exec(t)))throw new Error("invalid format: "+t);var e;return new dh({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]})}Co.prototype=dh.prototype;function dh(t){this.fill=t.fill===void 0?" ":t.fill+"",this.align=t.align===void 0?">":t.align+"",this.sign=t.sign===void 0?"-":t.sign+"",this.symbol=t.symbol===void 0?"":t.symbol+"",this.zero=!!t.zero,this.width=t.width===void 0?void 0:+t.width,this.comma=!!t.comma,this.precision=t.precision===void 0?void 0:+t.precision,this.trim=!!t.trim,this.type=t.type===void 0?"":t.type+""}dh.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(this.width===void 0?"":Math.max(1,this.width|0))+(this.comma?",":"")+(this.precision===void 0?"":"."+Math.max(0,this.precision|0))+(this.trim?"~":"")+this.type};function nq(t){t:for(var e=t.length,r=1,n=-1,i;r<e;++r)switch(t[r]){case".":n=i=r;break;case"0":n===0&&(n=r),i=r;break;default:if(!+t[r])break t;n>0&&(n=0);break}return n>0?t.slice(0,n)+t.slice(i+1):t}var Gv;function iq(t,e){var r=fh(t,e);if(!r)return t+"";var n=r[0],i=r[1],a=i-(Gv=Math.max(-8,Math.min(8,Math.floor(i/3)))*3)+1,s=n.length;return a===s?n:a>s?n+new Array(a-s+1).join("0"):a>0?n.slice(0,a)+"."+n.slice(a):"0."+new Array(1-a).join("0")+fh(t,Math.max(0,e+a-1))[0]}function jv(t,e){var r=fh(t,e);if(!r)return t+"";var n=r[0],i=r[1];return i<0?"0."+new Array(-i).join("0")+n:n.length>i+1?n.slice(0,i+1)+"."+n.slice(i+1):n+new Array(i-n.length+2).join("0")}const $v={"%":(t,e)=>(t*100).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:JP,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)=>jv(t*100,e),r:jv,s:iq,X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function Xv(t){return t}var Kv=Array.prototype.map,Zv=["y","z","a","f","p","n","\xB5","m","","k","M","G","T","P","E","Z","Y"];function Qv(t){var e=t.grouping===void 0||t.thousands===void 0?Xv:tq(Kv.call(t.grouping,Number),t.thousands+""),r=t.currency===void 0?"":t.currency[0]+"",n=t.currency===void 0?"":t.currency[1]+"",i=t.decimal===void 0?".":t.decimal+"",a=t.numerals===void 0?Xv:eq(Kv.call(t.numerals,String)),s=t.percent===void 0?"%":t.percent+"",o=t.minus===void 0?"\u2212":t.minus+"",l=t.nan===void 0?"NaN":t.nan+"";function u(d){d=Co(d);var f=d.fill,p=d.align,m=d.sign,_=d.symbol,y=d.zero,b=d.width,x=d.comma,k=d.precision,T=d.trim,C=d.type;C==="n"?(x=!0,C="g"):$v[C]||(k===void 0&&(k=12),T=!0,C="g"),(y||f==="0"&&p==="=")&&(y=!0,f="0",p="=");var M=_==="$"?r:_==="#"&&/[boxX]/.test(C)?"0"+C.toLowerCase():"",S=_==="$"?n:/[%p]/.test(C)?s:"",R=$v[C],A=/[defgprs%]/.test(C);k=k===void 0?6:/[gprs]/.test(C)?Math.max(1,Math.min(21,k)):Math.max(0,Math.min(20,k));function L(v){var B=M,w=S,D,N,z;if(C==="c")w=R(v)+w,v="";else{v=+v;var X=v<0||1/v<0;if(v=isNaN(v)?l:R(Math.abs(v),k),T&&(v=nq(v)),X&&+v==0&&m!=="+"&&(X=!1),B=(X?m==="("?m:o:m==="-"||m==="("?"":m)+B,w=(C==="s"?Zv[8+Gv/3]:"")+w+(X&&m==="("?")":""),A){for(D=-1,N=v.length;++D<N;)if(z=v.charCodeAt(D),48>z||z>57){w=(z===46?i+v.slice(D+1):v.slice(D))+w,v=v.slice(0,D);break}}}x&&!y&&(v=e(v,1/0));var ct=B.length+v.length+w.length,J=ct<b?new Array(b-ct+1).join(f):"";switch(x&&y&&(v=e(J+v,J.length?b-w.length:1/0),J=""),p){case"<":v=B+v+w+J;break;case"=":v=B+J+v+w;break;case"^":v=J.slice(0,ct=J.length>>1)+B+v+w+J.slice(ct);break;default:v=J+B+v+w;break}return a(v)}return L.toString=function(){return d+""},L}function h(d,f){var p=u((d=Co(d),d.type="f",d)),m=Math.max(-8,Math.min(8,Math.floor(Eo(f)/3)))*3,_=Math.pow(10,-m),y=Zv[8+m/3];return function(b){return p(_*b)+y}}return{format:u,formatPrefix:h}}var ph,gh,Jd;Jv({thousands:",",grouping:[3],currency:["$",""]});function Jv(t){return ph=Qv(t),gh=ph.format,Jd=ph.formatPrefix,ph}function t6(t){return Math.max(0,-Eo(Math.abs(t)))}function e6(t,e){return Math.max(0,Math.max(-8,Math.min(8,Math.floor(Eo(e)/3)))*3-Eo(Math.abs(t)))}function r6(t,e){return t=Math.abs(t),e=Math.abs(e)-t,Math.max(0,Eo(e)-Eo(t))+1}var te=1e-6,Hl=1e-12,Ae=Math.PI,rr=Ae/2,yh=Ae/4,Qr=Ae*2,Ue=180/Ae,re=Ae/180,Ne=Math.abs,So=Math.atan,Jr=Math.atan2,Kt=Math.cos,mh=Math.ceil,n6=Math.exp,t2=Math.hypot,bh=Math.log,e2=Math.pow,Ht=Math.sin,Dn=Math.sign||function(t){return t>0?1:t<0?-1:0},Sr=Math.sqrt,r2=Math.tan;function i6(t){return t>1?0:t<-1?Ae:Math.acos(t)}function tn(t){return t>1?rr:t<-1?-rr:Math.asin(t)}function a6(t){return(t=Ht(t/2))*t}function Je(){}function _h(t,e){t&&o6.hasOwnProperty(t.type)&&o6[t.type](t,e)}var s6={Feature:function(t,e){_h(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++n<i;)_h(r[n].geometry,e)}},o6={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,n=-1,i=r.length;++n<i;)t=r[n],e.point(t[0],t[1],t[2])},LineString:function(t,e){n2(t.coordinates,e,0)},MultiLineString:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n<i;)n2(r[n],e,0)},Polygon:function(t,e){l6(t.coordinates,e)},MultiPolygon:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n<i;)l6(r[n],e)},GeometryCollection:function(t,e){for(var r=t.geometries,n=-1,i=r.length;++n<i;)_h(r[n],e)}};function n2(t,e,r){var n=-1,i=t.length-r,a;for(e.lineStart();++n<i;)a=t[n],e.point(a[0],a[1],a[2]);e.lineEnd()}function l6(t,e){var r=-1,n=t.length;for(e.polygonStart();++r<n;)n2(t[r],e,1);e.polygonEnd()}function ti(t,e){t&&s6.hasOwnProperty(t.type)?s6[t.type](t,e):_h(t,e)}var vh=new _r,xh=new _r,c6,u6,i2,a2,s2,Si={point:Je,lineStart:Je,lineEnd:Je,polygonStart:function(){vh=new _r,Si.lineStart=aq,Si.lineEnd=sq},polygonEnd:function(){var t=+vh;xh.add(t<0?Qr+t:t),this.lineStart=this.lineEnd=this.point=Je},sphere:function(){xh.add(Qr)}};function aq(){Si.point=oq}function sq(){h6(c6,u6)}function oq(t,e){Si.point=h6,c6=t,u6=e,t*=re,e*=re,i2=t,a2=Kt(e=e/2+yh),s2=Ht(e)}function h6(t,e){t*=re,e*=re,e=e/2+yh;var r=t-i2,n=r>=0?1:-1,i=n*r,a=Kt(e),s=Ht(e),o=s2*s,l=a2*a+o*Kt(i),u=o*n*Ht(i);vh.add(Jr(u,l)),i2=t,a2=a,s2=s}function lq(t){return xh=new _r,ti(t,Si),xh*2}function kh(t){return[Jr(t[1],t[0]),tn(t[2])]}function Cs(t){var e=t[0],r=t[1],n=Kt(r);return[n*Kt(e),n*Ht(e),Ht(r)]}function wh(t,e){return t[0]*e[0]+t[1]*e[1]+t[2]*e[2]}function Ao(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 o2(t,e){t[0]+=e[0],t[1]+=e[1],t[2]+=e[2]}function Th(t,e){return[t[0]*e,t[1]*e,t[2]*e]}function Eh(t){var e=Sr(t[0]*t[0]+t[1]*t[1]+t[2]*t[2]);t[0]/=e,t[1]/=e,t[2]/=e}var tr,pn,nr,En,Ss,f6,d6,Mo,Gl,Ba,Qi,Ji={point:l2,lineStart:g6,lineEnd:y6,polygonStart:function(){Ji.point=m6,Ji.lineStart=cq,Ji.lineEnd=uq,Gl=new _r,Si.polygonStart()},polygonEnd:function(){Si.polygonEnd(),Ji.point=l2,Ji.lineStart=g6,Ji.lineEnd=y6,vh<0?(tr=-(nr=180),pn=-(En=90)):Gl>te?En=90:Gl<-te&&(pn=-90),Qi[0]=tr,Qi[1]=nr},sphere:function(){tr=-(nr=180),pn=-(En=90)}};function l2(t,e){Ba.push(Qi=[tr=t,nr=t]),e<pn&&(pn=e),e>En&&(En=e)}function p6(t,e){var r=Cs([t*re,e*re]);if(Mo){var n=Ao(Mo,r),i=[n[1],-n[0],0],a=Ao(i,n);Eh(a),a=kh(a);var s=t-Ss,o=s>0?1:-1,l=a[0]*Ue*o,u,h=Ne(s)>180;h^(o*Ss<l&&l<o*t)?(u=a[1]*Ue,u>En&&(En=u)):(l=(l+360)%360-180,h^(o*Ss<l&&l<o*t)?(u=-a[1]*Ue,u<pn&&(pn=u)):(e<pn&&(pn=e),e>En&&(En=e))),h?t<Ss?Cn(tr,t)>Cn(tr,nr)&&(nr=t):Cn(t,nr)>Cn(tr,nr)&&(tr=t):nr>=tr?(t<tr&&(tr=t),t>nr&&(nr=t)):t>Ss?Cn(tr,t)>Cn(tr,nr)&&(nr=t):Cn(t,nr)>Cn(tr,nr)&&(tr=t)}else Ba.push(Qi=[tr=t,nr=t]);e<pn&&(pn=e),e>En&&(En=e),Mo=r,Ss=t}function g6(){Ji.point=p6}function y6(){Qi[0]=tr,Qi[1]=nr,Ji.point=l2,Mo=null}function m6(t,e){if(Mo){var r=t-Ss;Gl.add(Ne(r)>180?r+(r>0?360:-360):r)}else f6=t,d6=e;Si.point(t,e),p6(t,e)}function cq(){Si.lineStart()}function uq(){m6(f6,d6),Si.lineEnd(),Ne(Gl)>te&&(tr=-(nr=180)),Qi[0]=tr,Qi[1]=nr,Mo=null}function Cn(t,e){return(e-=t)<0?e+360:e}function hq(t,e){return t[0]-e[0]}function b6(t,e){return t[0]<=t[1]?t[0]<=e&&e<=t[1]:e<t[0]||t[1]<e}function fq(t){var e,r,n,i,a,s,o;if(En=nr=-(tr=pn=1/0),Ba=[],ti(t,Ji),r=Ba.length){for(Ba.sort(hq),e=1,n=Ba[0],a=[n];e<r;++e)i=Ba[e],b6(n,i[0])||b6(n,i[1])?(Cn(n[0],i[1])>Cn(n[0],n[1])&&(n[1]=i[1]),Cn(i[0],n[1])>Cn(n[0],n[1])&&(n[0]=i[0])):a.push(n=i);for(s=-1/0,r=a.length-1,e=0,n=a[r];e<=r;n=i,++e)i=a[e],(o=Cn(n[1],i[0]))>s&&(s=o,tr=i[0],nr=n[1])}return Ba=Qi=null,tr===1/0||pn===1/0?[[NaN,NaN],[NaN,NaN]]:[[tr,pn],[nr,En]]}var jl,Ch,Sh,Ah,Mh,Lh,Rh,Ih,c2,u2,h2,_6,v6,en,rn,nn,ei={sphere:Je,point:f2,lineStart:x6,lineEnd:k6,polygonStart:function(){ei.lineStart=gq,ei.lineEnd=yq},polygonEnd:function(){ei.lineStart=x6,ei.lineEnd=k6}};function f2(t,e){t*=re,e*=re;var r=Kt(e);$l(r*Kt(t),r*Ht(t),Ht(e))}function $l(t,e,r){++jl,Sh+=(t-Sh)/jl,Ah+=(e-Ah)/jl,Mh+=(r-Mh)/jl}function x6(){ei.point=dq}function dq(t,e){t*=re,e*=re;var r=Kt(e);en=r*Kt(t),rn=r*Ht(t),nn=Ht(e),ei.point=pq,$l(en,rn,nn)}function pq(t,e){t*=re,e*=re;var r=Kt(e),n=r*Kt(t),i=r*Ht(t),a=Ht(e),s=Jr(Sr((s=rn*a-nn*i)*s+(s=nn*n-en*a)*s+(s=en*i-rn*n)*s),en*n+rn*i+nn*a);Ch+=s,Lh+=s*(en+(en=n)),Rh+=s*(rn+(rn=i)),Ih+=s*(nn+(nn=a)),$l(en,rn,nn)}function k6(){ei.point=f2}function gq(){ei.point=mq}function yq(){w6(_6,v6),ei.point=f2}function mq(t,e){_6=t,v6=e,t*=re,e*=re,ei.point=w6;var r=Kt(e);en=r*Kt(t),rn=r*Ht(t),nn=Ht(e),$l(en,rn,nn)}function w6(t,e){t*=re,e*=re;var r=Kt(e),n=r*Kt(t),i=r*Ht(t),a=Ht(e),s=rn*a-nn*i,o=nn*n-en*a,l=en*i-rn*n,u=t2(s,o,l),h=tn(u),d=u&&-h/u;c2.add(d*s),u2.add(d*o),h2.add(d*l),Ch+=h,Lh+=h*(en+(en=n)),Rh+=h*(rn+(rn=i)),Ih+=h*(nn+(nn=a)),$l(en,rn,nn)}function bq(t){jl=Ch=Sh=Ah=Mh=Lh=Rh=Ih=0,c2=new _r,u2=new _r,h2=new _r,ti(t,ei);var e=+c2,r=+u2,n=+h2,i=t2(e,r,n);return i<Hl&&(e=Lh,r=Rh,n=Ih,Ch<te&&(e=Sh,r=Ah,n=Mh),i=t2(e,r,n),i<Hl)?[NaN,NaN]:[Jr(r,e)*Ue,tn(n/i)*Ue]}function Lo(t){return function(){return t}}function d2(t,e){function r(n,i){return n=t(n,i),e(n[0],n[1])}return t.invert&&e.invert&&(r.invert=function(n,i){return n=e.invert(n,i),n&&t.invert(n[0],n[1])}),r}function p2(t,e){return[Ne(t)>Ae?t+Math.round(-t/Qr)*Qr:t,e]}p2.invert=p2;function g2(t,e,r){return(t%=Qr)?e||r?d2(E6(t),C6(e,r)):E6(t):e||r?C6(e,r):p2}function T6(t){return function(e,r){return e+=t,[e>Ae?e-Qr:e<-Ae?e+Qr:e,r]}}function E6(t){var e=T6(t);return e.invert=T6(-t),e}function C6(t,e){var r=Kt(t),n=Ht(t),i=Kt(e),a=Ht(e);function s(o,l){var u=Kt(l),h=Kt(o)*u,d=Ht(o)*u,f=Ht(l),p=f*r+h*n;return[Jr(d*i-p*a,h*r-f*n),tn(p*i+d*a)]}return s.invert=function(o,l){var u=Kt(l),h=Kt(o)*u,d=Ht(o)*u,f=Ht(l),p=f*i-d*a;return[Jr(d*i+f*a,h*r+p*n),tn(p*r-h*n)]},s}function S6(t){t=g2(t[0]*re,t[1]*re,t.length>2?t[2]*re:0);function e(r){return r=t(r[0]*re,r[1]*re),r[0]*=Ue,r[1]*=Ue,r}return e.invert=function(r){return r=t.invert(r[0]*re,r[1]*re),r[0]*=Ue,r[1]*=Ue,r},e}function A6(t,e,r,n,i,a){if(!!r){var s=Kt(e),o=Ht(e),l=n*r;i==null?(i=e+n*Qr,a=e-l/2):(i=M6(s,i),a=M6(s,a),(n>0?i<a:i>a)&&(i+=n*Qr));for(var u,h=i;n>0?h>a:h<a;h-=l)u=kh([s,-o*Kt(h),-o*Ht(h)]),t.point(u[0],u[1])}}function M6(t,e){e=Cs(e),e[0]-=t,Eh(e);var r=i6(-e[1]);return((-e[2]<0?-r:r)+Qr-te)%Qr}function _q(){var t=Lo([0,0]),e=Lo(90),r=Lo(6),n,i,a={point:s};function s(l,u){n.push(l=i(l,u)),l[0]*=Ue,l[1]*=Ue}function o(){var l=t.apply(this,arguments),u=e.apply(this,arguments)*re,h=r.apply(this,arguments)*re;return n=[],i=g2(-l[0]*re,-l[1]*re,0).invert,A6(a,u,h,1),l={type:"Polygon",coordinates:[n]},n=i=null,l}return o.center=function(l){return arguments.length?(t=typeof l=="function"?l:Lo([+l[0],+l[1]]),o):t},o.radius=function(l){return arguments.length?(e=typeof l=="function"?l:Lo(+l),o):e},o.precision=function(l){return arguments.length?(r=typeof l=="function"?l:Lo(+l),o):r},o}function L6(){var t=[],e;return{point:function(r,n,i){e.push([r,n,i])},lineStart:function(){t.push(e=[])},lineEnd:Je,rejoin:function(){t.length>1&&t.push(t.pop().concat(t.shift()))},result:function(){var r=t;return t=[],e=null,r}}}function Nh(t,e){return Ne(t[0]-e[0])<te&&Ne(t[1]-e[1])<te}function Bh(t,e,r,n){this.x=t,this.z=e,this.o=r,this.e=n,this.v=!1,this.n=this.p=null}function R6(t,e,r,n,i){var a=[],s=[],o,l;if(t.forEach(function(m){if(!((_=m.length-1)<=0)){var _,y=m[0],b=m[_],x;if(Nh(y,b)){if(!y[2]&&!b[2]){for(i.lineStart(),o=0;o<_;++o)i.point((y=m[o])[0],y[1]);i.lineEnd();return}b[0]+=2*te}a.push(x=new Bh(y,m,null,!0)),s.push(x.o=new Bh(y,null,x,!1)),a.push(x=new Bh(b,m,null,!1)),s.push(x.o=new Bh(b,null,x,!0))}}),!!a.length){for(s.sort(e),I6(a),I6(s),o=0,l=s.length;o<l;++o)s[o].e=r=!r;for(var u=a[0],h,d;;){for(var f=u,p=!0;f.v;)if((f=f.n)===u)return;h=f.z,i.lineStart();do{if(f.v=f.o.v=!0,f.e){if(p)for(o=0,l=h.length;o<l;++o)i.point((d=h[o])[0],d[1]);else n(f.x,f.n.x,1,i);f=f.n}else{if(p)for(h=f.p.z,o=h.length-1;o>=0;--o)i.point((d=h[o])[0],d[1]);else n(f.x,f.p.x,-1,i);f=f.p}f=f.o,h=f.z,p=!p}while(!f.v);i.lineEnd()}}}function I6(t){if(!!(e=t.length)){for(var e,r=0,n=t[0],i;++r<e;)n.n=i=t[r],i.p=n,n=i;n.n=i=t[0],i.p=n}}function y2(t){return Ne(t[0])<=Ae?t[0]:Dn(t[0])*((Ne(t[0])+Ae)%Qr-Ae)}function N6(t,e){var r=y2(e),n=e[1],i=Ht(n),a=[Ht(r),-Kt(r),0],s=0,o=0,l=new _r;i===1?n=rr+te:i===-1&&(n=-rr-te);for(var u=0,h=t.length;u<h;++u)if(!!(f=(d=t[u]).length))for(var d,f,p=d[f-1],m=y2(p),_=p[1]/2+yh,y=Ht(_),b=Kt(_),x=0;x<f;++x,m=T,y=M,b=S,p=k){var k=d[x],T=y2(k),C=k[1]/2+yh,M=Ht(C),S=Kt(C),R=T-m,A=R>=0?1:-1,L=A*R,v=L>Ae,B=y*M;if(l.add(Jr(B*A*Ht(L),b*S+B*Kt(L))),s+=v?R+A*Qr:R,v^m>=r^T>=r){var w=Ao(Cs(p),Cs(k));Eh(w);var D=Ao(a,w);Eh(D);var N=(v^R>=0?-1:1)*tn(D[2]);(n>N||n===N&&(w[0]||w[1]))&&(o+=v^R>=0?1:-1)}}return(s<-te||s<te&&l<-Hl)^o&1}function B6(t,e,r,n){return function(i){var a=e(i),s=L6(),o=e(s),l=!1,u,h,d,f={point:p,lineStart:_,lineEnd:y,polygonStart:function(){f.point=b,f.lineStart=x,f.lineEnd=k,h=[],u=[]},polygonEnd:function(){f.point=p,f.lineStart=_,f.lineEnd=y,h=j0(h);var T=N6(u,n);h.length?(l||(i.polygonStart(),l=!0),R6(h,xq,T,r,i)):T&&(l||(i.polygonStart(),l=!0),i.lineStart(),r(null,null,1,i),i.lineEnd()),l&&(i.polygonEnd(),l=!1),h=u=null},sphere:function(){i.polygonStart(),i.lineStart(),r(null,null,1,i),i.lineEnd(),i.polygonEnd()}};function p(T,C){t(T,C)&&i.point(T,C)}function m(T,C){a.point(T,C)}function _(){f.point=m,a.lineStart()}function y(){f.point=p,a.lineEnd()}function b(T,C){d.push([T,C]),o.point(T,C)}function x(){o.lineStart(),d=[]}function k(){b(d[0][0],d[0][1]),o.lineEnd();var T=o.clean(),C=s.result(),M,S=C.length,R,A,L;if(d.pop(),u.push(d),d=null,!!S){if(T&1){if(A=C[0],(R=A.length-1)>0){for(l||(i.polygonStart(),l=!0),i.lineStart(),M=0;M<R;++M)i.point((L=A[M])[0],L[1]);i.lineEnd()}return}S>1&&T&2&&C.push(C.pop().concat(C.shift())),h.push(C.filter(vq))}}return f}}function vq(t){return t.length>1}function xq(t,e){return((t=t.x)[0]<0?t[1]-rr-te:rr-t[1])-((e=e.x)[0]<0?e[1]-rr-te:rr-e[1])}const m2=B6(function(){return!0},kq,Tq,[-Ae,-rr]);function kq(t){var e=NaN,r=NaN,n=NaN,i;return{lineStart:function(){t.lineStart(),i=1},point:function(a,s){var o=a>0?Ae:-Ae,l=Ne(a-e);Ne(l-Ae)<te?(t.point(e,r=(r+s)/2>0?rr:-rr),t.point(n,r),t.lineEnd(),t.lineStart(),t.point(o,r),t.point(a,r),i=0):n!==o&&l>=Ae&&(Ne(e-n)<te&&(e-=n*te),Ne(a-o)<te&&(a-=o*te),r=wq(e,r,a,s),t.point(n,r),t.lineEnd(),t.lineStart(),t.point(o,r),i=0),t.point(e=a,r=s),n=o},lineEnd:function(){t.lineEnd(),e=r=NaN},clean:function(){return 2-i}}}function wq(t,e,r,n){var i,a,s=Ht(t-r);return Ne(s)>te?So((Ht(e)*(a=Kt(n))*Ht(r)-Ht(n)*(i=Kt(e))*Ht(t))/(i*a*s)):(e+n)/2}function Tq(t,e,r,n){var i;if(t==null)i=r*rr,n.point(-Ae,i),n.point(0,i),n.point(Ae,i),n.point(Ae,0),n.point(Ae,-i),n.point(0,-i),n.point(-Ae,-i),n.point(-Ae,0),n.point(-Ae,i);else if(Ne(t[0]-e[0])>te){var a=t[0]<e[0]?Ae:-Ae;i=r*a/2,n.point(-a,i),n.point(0,i),n.point(a,i)}else n.point(e[0],e[1])}function D6(t){var e=Kt(t),r=6*re,n=e>0,i=Ne(e)>te;function a(h,d,f,p){A6(p,t,r,f,h,d)}function s(h,d){return Kt(h)*Kt(d)>e}function o(h){var d,f,p,m,_;return{lineStart:function(){m=p=!1,_=1},point:function(y,b){var x=[y,b],k,T=s(y,b),C=n?T?0:u(y,b):T?u(y+(y<0?Ae:-Ae),b):0;if(!d&&(m=p=T)&&h.lineStart(),T!==p&&(k=l(d,x),(!k||Nh(d,k)||Nh(x,k))&&(x[2]=1)),T!==p)_=0,T?(h.lineStart(),k=l(x,d),h.point(k[0],k[1])):(k=l(d,x),h.point(k[0],k[1],2),h.lineEnd()),d=k;else if(i&&d&&n^T){var M;!(C&f)&&(M=l(x,d,!0))&&(_=0,n?(h.lineStart(),h.point(M[0][0],M[0][1]),h.point(M[1][0],M[1][1]),h.lineEnd()):(h.point(M[1][0],M[1][1]),h.lineEnd(),h.lineStart(),h.point(M[0][0],M[0][1],3)))}T&&(!d||!Nh(d,x))&&h.point(x[0],x[1]),d=x,p=T,f=C},lineEnd:function(){p&&h.lineEnd(),d=null},clean:function(){return _|(m&&p)<<1}}}function l(h,d,f){var p=Cs(h),m=Cs(d),_=[1,0,0],y=Ao(p,m),b=wh(y,y),x=y[0],k=b-x*x;if(!k)return!f&&h;var T=e*b/k,C=-e*x/k,M=Ao(_,y),S=Th(_,T),R=Th(y,C);o2(S,R);var A=M,L=wh(S,A),v=wh(A,A),B=L*L-v*(wh(S,S)-1);if(!(B<0)){var w=Sr(B),D=Th(A,(-L-w)/v);if(o2(D,S),D=kh(D),!f)return D;var N=h[0],z=d[0],X=h[1],ct=d[1],J;z<N&&(J=N,N=z,z=J);var Y=z-N,$=Ne(Y-Ae)<te,lt=$||Y<te;if(!$&&ct<X&&(J=X,X=ct,ct=J),lt?$?X+ct>0^D[1]<(Ne(D[0]-N)<te?X:ct):X<=D[1]&&D[1]<=ct:Y>Ae^(N<=D[0]&&D[0]<=z)){var ut=Th(A,(-L+w)/v);return o2(ut,S),[D,kh(ut)]}}}function u(h,d){var f=n?t:Ae-t,p=0;return h<-f?p|=1:h>f&&(p|=2),d<-f?p|=4:d>f&&(p|=8),p}return B6(s,o,a,n?[0,-t]:[-Ae,t-Ae])}function Eq(t,e,r,n,i,a){var s=t[0],o=t[1],l=e[0],u=e[1],h=0,d=1,f=l-s,p=u-o,m;if(m=r-s,!(!f&&m>0)){if(m/=f,f<0){if(m<h)return;m<d&&(d=m)}else if(f>0){if(m>d)return;m>h&&(h=m)}if(m=i-s,!(!f&&m<0)){if(m/=f,f<0){if(m>d)return;m>h&&(h=m)}else if(f>0){if(m<h)return;m<d&&(d=m)}if(m=n-o,!(!p&&m>0)){if(m/=p,p<0){if(m<h)return;m<d&&(d=m)}else if(p>0){if(m>d)return;m>h&&(h=m)}if(m=a-o,!(!p&&m<0)){if(m/=p,p<0){if(m>d)return;m>h&&(h=m)}else if(p>0){if(m<h)return;m<d&&(d=m)}return h>0&&(t[0]=s+h*f,t[1]=o+h*p),d<1&&(e[0]=s+d*f,e[1]=o+d*p),!0}}}}}var Xl=1e9,Dh=-Xl;function Oh(t,e,r,n){function i(u,h){return t<=u&&u<=r&&e<=h&&h<=n}function a(u,h,d,f){var p=0,m=0;if(u==null||(p=s(u,d))!==(m=s(h,d))||l(u,h)<0^d>0)do f.point(p===0||p===3?t:r,p>1?n:e);while((p=(p+d+4)%4)!==m);else f.point(h[0],h[1])}function s(u,h){return Ne(u[0]-t)<te?h>0?0:3:Ne(u[0]-r)<te?h>0?2:1:Ne(u[1]-e)<te?h>0?1:0:h>0?3:2}function o(u,h){return l(u.x,h.x)}function l(u,h){var d=s(u,1),f=s(h,1);return d!==f?d-f:d===0?h[1]-u[1]:d===1?u[0]-h[0]:d===2?u[1]-h[1]:h[0]-u[0]}return function(u){var h=u,d=L6(),f,p,m,_,y,b,x,k,T,C,M,S={point:R,lineStart:B,lineEnd:w,polygonStart:L,polygonEnd:v};function R(N,z){i(N,z)&&h.point(N,z)}function A(){for(var N=0,z=0,X=p.length;z<X;++z)for(var ct=p[z],J=1,Y=ct.length,$=ct[0],lt,ut,W=$[0],tt=$[1];J<Y;++J)lt=W,ut=tt,$=ct[J],W=$[0],tt=$[1],ut<=n?tt>n&&(W-lt)*(n-ut)>(tt-ut)*(t-lt)&&++N:tt<=n&&(W-lt)*(n-ut)<(tt-ut)*(t-lt)&&--N;return N}function L(){h=d,f=[],p=[],M=!0}function v(){var N=A(),z=M&&N,X=(f=j0(f)).length;(z||X)&&(u.polygonStart(),z&&(u.lineStart(),a(null,null,1,u),u.lineEnd()),X&&R6(f,o,N,a,u),u.polygonEnd()),h=u,f=p=m=null}function B(){S.point=D,p&&p.push(m=[]),C=!0,T=!1,x=k=NaN}function w(){f&&(D(_,y),b&&T&&d.rejoin(),f.push(d.result())),S.point=R,T&&h.lineEnd()}function D(N,z){var X=i(N,z);if(p&&m.push([N,z]),C)_=N,y=z,b=X,C=!1,X&&(h.lineStart(),h.point(N,z));else if(X&&T)h.point(N,z);else{var ct=[x=Math.max(Dh,Math.min(Xl,x)),k=Math.max(Dh,Math.min(Xl,k))],J=[N=Math.max(Dh,Math.min(Xl,N)),z=Math.max(Dh,Math.min(Xl,z))];Eq(ct,J,t,e,r,n)?(T||(h.lineStart(),h.point(ct[0],ct[1])),h.point(J[0],J[1]),X||h.lineEnd(),M=!1):X&&(h.lineStart(),h.point(N,z),M=!1)}x=N,k=z,T=X}return S}}function Cq(){var t=0,e=0,r=960,n=500,i,a,s;return s={stream:function(o){return i&&a===o?i:i=Oh(t,e,r,n)(a=o)},extent:function(o){return arguments.length?(t=+o[0][0],e=+o[0][1],r=+o[1][0],n=+o[1][1],i=a=null,s):[[t,e],[r,n]]}}}var b2,_2,Fh,Ph,Ro={sphere:Je,point:Je,lineStart:Sq,lineEnd:Je,polygonStart:Je,polygonEnd:Je};function Sq(){Ro.point=Mq,Ro.lineEnd=Aq}function Aq(){Ro.point=Ro.lineEnd=Je}function Mq(t,e){t*=re,e*=re,_2=t,Fh=Ht(e),Ph=Kt(e),Ro.point=Lq}function Lq(t,e){t*=re,e*=re;var r=Ht(e),n=Kt(e),i=Ne(t-_2),a=Kt(i),s=Ht(i),o=n*s,l=Ph*r-Fh*n*a,u=Fh*r+Ph*n*a;b2.add(Jr(Sr(o*o+l*l),u)),_2=t,Fh=r,Ph=n}function O6(t){return b2=new _r,ti(t,Ro),+b2}var v2=[null,null],Rq={type:"LineString",coordinates:v2};function qh(t,e){return v2[0]=t,v2[1]=e,O6(Rq)}var F6={Feature:function(t,e){return Vh(t.geometry,e)},FeatureCollection:function(t,e){for(var r=t.features,n=-1,i=r.length;++n<i;)if(Vh(r[n].geometry,e))return!0;return!1}},P6={Sphere:function(){return!0},Point:function(t,e){return q6(t.coordinates,e)},MultiPoint:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n<i;)if(q6(r[n],e))return!0;return!1},LineString:function(t,e){return V6(t.coordinates,e)},MultiLineString:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n<i;)if(V6(r[n],e))return!0;return!1},Polygon:function(t,e){return z6(t.coordinates,e)},MultiPolygon:function(t,e){for(var r=t.coordinates,n=-1,i=r.length;++n<i;)if(z6(r[n],e))return!0;return!1},GeometryCollection:function(t,e){for(var r=t.geometries,n=-1,i=r.length;++n<i;)if(Vh(r[n],e))return!0;return!1}};function Vh(t,e){return t&&P6.hasOwnProperty(t.type)?P6[t.type](t,e):!1}function q6(t,e){return qh(t,e)===0}function V6(t,e){for(var r,n,i,a=0,s=t.length;a<s;a++){if(n=qh(t[a],e),n===0||a>0&&(i=qh(t[a],t[a-1]),i>0&&r<=i&&n<=i&&(r+n-i)*(1-Math.pow((r-n)/i,2))<Hl*i))return!0;r=n}return!1}function z6(t,e){return!!N6(t.map(Iq),Y6(e))}function Iq(t){return t=t.map(Y6),t.pop(),t}function Y6(t){return[t[0]*re,t[1]*re]}function Nq(t,e){return(t&&F6.hasOwnProperty(t.type)?F6[t.type]:Vh)(t,e)}function U6(t,e,r){var n=Ca(t,e-te,r).concat(e);return function(i){return n.map(function(a){return[i,a]})}}function W6(t,e,r){var n=Ca(t,e-te,r).concat(e);return function(i){return n.map(function(a){return[a,i]})}}function H6(){var t,e,r,n,i,a,s,o,l=10,u=l,h=90,d=360,f,p,m,_,y=2.5;function b(){return{type:"MultiLineString",coordinates:x()}}function x(){return Ca(mh(n/h)*h,r,h).map(m).concat(Ca(mh(o/d)*d,s,d).map(_)).concat(Ca(mh(e/l)*l,t,l).filter(function(k){return Ne(k%h)>te}).map(f)).concat(Ca(mh(a/u)*u,i,u).filter(function(k){return Ne(k%d)>te}).map(p))}return b.lines=function(){return x().map(function(k){return{type:"LineString",coordinates:k}})},b.outline=function(){return{type:"Polygon",coordinates:[m(n).concat(_(s).slice(1),m(r).reverse().slice(1),_(o).reverse().slice(1))]}},b.extent=function(k){return arguments.length?b.extentMajor(k).extentMinor(k):b.extentMinor()},b.extentMajor=function(k){return arguments.length?(n=+k[0][0],r=+k[1][0],o=+k[0][1],s=+k[1][1],n>r&&(k=n,n=r,r=k),o>s&&(k=o,o=s,s=k),b.precision(y)):[[n,o],[r,s]]},b.extentMinor=function(k){return arguments.length?(e=+k[0][0],t=+k[1][0],a=+k[0][1],i=+k[1][1],e>t&&(k=e,e=t,t=k),a>i&&(k=a,a=i,i=k),b.precision(y)):[[e,a],[t,i]]},b.step=function(k){return arguments.length?b.stepMajor(k).stepMinor(k):b.stepMinor()},b.stepMajor=function(k){return arguments.length?(h=+k[0],d=+k[1],b):[h,d]},b.stepMinor=function(k){return arguments.length?(l=+k[0],u=+k[1],b):[l,u]},b.precision=function(k){return arguments.length?(y=+k,f=U6(a,i,90),p=W6(e,t,y),m=U6(o,s,90),_=W6(n,r,y),b):y},b.extentMajor([[-180,-90+te],[180,90-te]]).extentMinor([[-180,-80-te],[180,80+te]])}function Bq(){return H6()()}function Dq(t,e){var r=t[0]*re,n=t[1]*re,i=e[0]*re,a=e[1]*re,s=Kt(n),o=Ht(n),l=Kt(a),u=Ht(a),h=s*Kt(r),d=s*Ht(r),f=l*Kt(i),p=l*Ht(i),m=2*tn(Sr(a6(a-n)+s*l*a6(i-r))),_=Ht(m),y=m?function(b){var x=Ht(b*=m)/_,k=Ht(m-b)/_,T=k*h+x*f,C=k*d+x*p,M=k*o+x*u;return[Jr(C,T)*Ue,Jr(M,Sr(T*T+C*C))*Ue]}:function(){return[r*Ue,n*Ue]};return y.distance=m,y}const Kl=t=>t;var x2=new _r,k2=new _r,G6,j6,w2,T2,Da={point:Je,lineStart:Je,lineEnd:Je,polygonStart:function(){Da.lineStart=Oq,Da.lineEnd=Pq},polygonEnd:function(){Da.lineStart=Da.lineEnd=Da.point=Je,x2.add(Ne(k2)),k2=new _r},result:function(){var t=x2/2;return x2=new _r,t}};function Oq(){Da.point=Fq}function Fq(t,e){Da.point=$6,G6=w2=t,j6=T2=e}function $6(t,e){k2.add(T2*t-w2*e),w2=t,T2=e}function Pq(){$6(G6,j6)}const X6=Da;var Io=1/0,zh=Io,Zl=-Io,Yh=Zl,qq={point:Vq,lineStart:Je,lineEnd:Je,polygonStart:Je,polygonEnd:Je,result:function(){var t=[[Io,zh],[Zl,Yh]];return Zl=Yh=-(zh=Io=1/0),t}};function Vq(t,e){t<Io&&(Io=t),t>Zl&&(Zl=t),e<zh&&(zh=e),e>Yh&&(Yh=e)}const Uh=qq;var E2=0,C2=0,Ql=0,Wh=0,Hh=0,No=0,S2=0,A2=0,Jl=0,K6,Z6,Ai,Mi,ri={point:As,lineStart:Q6,lineEnd:J6,polygonStart:function(){ri.lineStart=Uq,ri.lineEnd=Wq},polygonEnd:function(){ri.point=As,ri.lineStart=Q6,ri.lineEnd=J6},result:function(){var t=Jl?[S2/Jl,A2/Jl]:No?[Wh/No,Hh/No]:Ql?[E2/Ql,C2/Ql]:[NaN,NaN];return E2=C2=Ql=Wh=Hh=No=S2=A2=Jl=0,t}};function As(t,e){E2+=t,C2+=e,++Ql}function Q6(){ri.point=zq}function zq(t,e){ri.point=Yq,As(Ai=t,Mi=e)}function Yq(t,e){var r=t-Ai,n=e-Mi,i=Sr(r*r+n*n);Wh+=i*(Ai+t)/2,Hh+=i*(Mi+e)/2,No+=i,As(Ai=t,Mi=e)}function J6(){ri.point=As}function Uq(){ri.point=Hq}function Wq(){tx(K6,Z6)}function Hq(t,e){ri.point=tx,As(K6=Ai=t,Z6=Mi=e)}function tx(t,e){var r=t-Ai,n=e-Mi,i=Sr(r*r+n*n);Wh+=i*(Ai+t)/2,Hh+=i*(Mi+e)/2,No+=i,i=Mi*t-Ai*e,S2+=i*(Ai+t),A2+=i*(Mi+e),Jl+=i*3,As(Ai=t,Mi=e)}const ex=ri;function rx(t){this._context=t}rx.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(){this._line===0&&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,Qr);break}}},result:Je};var M2=new _r,L2,nx,ix,tc,ec,Gh={point:Je,lineStart:function(){Gh.point=Gq},lineEnd:function(){L2&&ax(nx,ix),Gh.point=Je},polygonStart:function(){L2=!0},polygonEnd:function(){L2=null},result:function(){var t=+M2;return M2=new _r,t}};function Gq(t,e){Gh.point=ax,nx=tc=t,ix=ec=e}function ax(t,e){tc-=t,ec-=e,M2.add(Sr(tc*tc+ec*ec)),tc=t,ec=e}const sx=Gh;function ox(){this._string=[]}ox.prototype={_radius:4.5,_circle:lx(4.5),pointRadius:function(t){return(t=+t)!==this._radius&&(this._radius=t,this._circle=null),this},polygonStart:function(){this._line=0},polygonEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){this._line===0&&this._string.push("Z"),this._point=NaN},point:function(t,e){switch(this._point){case 0:{this._string.push("M",t,",",e),this._point=1;break}case 1:{this._string.push("L",t,",",e);break}default:{this._circle==null&&(this._circle=lx(this._radius)),this._string.push("M",t,",",e,this._circle);break}}},result:function(){if(this._string.length){var t=this._string.join("");return this._string=[],t}else return null}};function lx(t){return"m0,"+t+"a"+t+","+t+" 0 1,1 0,"+-2*t+"a"+t+","+t+" 0 1,1 0,"+2*t+"z"}function jq(t,e){var r=4.5,n,i;function a(s){return s&&(typeof r=="function"&&i.pointRadius(+r.apply(this,arguments)),ti(s,n(i))),i.result()}return a.area=function(s){return ti(s,n(X6)),X6.result()},a.measure=function(s){return ti(s,n(sx)),sx.result()},a.bounds=function(s){return ti(s,n(Uh)),Uh.result()},a.centroid=function(s){return ti(s,n(ex)),ex.result()},a.projection=function(s){return arguments.length?(n=s==null?(t=null,Kl):(t=s).stream,a):t},a.context=function(s){return arguments.length?(i=s==null?(e=null,new ox):new rx(e=s),typeof r!="function"&&i.pointRadius(r),a):e},a.pointRadius=function(s){return arguments.length?(r=typeof s=="function"?s:(i.pointRadius(+s),+s),a):r},a.projection(t).context(e)}function $q(t){return{stream:rc(t)}}function rc(t){return function(e){var r=new R2;for(var n in t)r[n]=t[n];return r.stream=e,r}}function R2(){}R2.prototype={constructor:R2,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()}};function I2(t,e,r){var n=t.clipExtent&&t.clipExtent();return t.scale(150).translate([0,0]),n!=null&&t.clipExtent(null),ti(r,t.stream(Uh)),e(Uh.result()),n!=null&&t.clipExtent(n),t}function jh(t,e,r){return I2(t,function(n){var i=e[1][0]-e[0][0],a=e[1][1]-e[0][1],s=Math.min(i/(n[1][0]-n[0][0]),a/(n[1][1]-n[0][1])),o=+e[0][0]+(i-s*(n[1][0]+n[0][0]))/2,l=+e[0][1]+(a-s*(n[1][1]+n[0][1]))/2;t.scale(150*s).translate([o,l])},r)}function N2(t,e,r){return jh(t,[[0,0],e],r)}function B2(t,e,r){return I2(t,function(n){var i=+e,a=i/(n[1][0]-n[0][0]),s=(i-a*(n[1][0]+n[0][0]))/2,o=-a*n[0][1];t.scale(150*a).translate([s,o])},r)}function D2(t,e,r){return I2(t,function(n){var i=+e,a=i/(n[1][1]-n[0][1]),s=-a*n[0][0],o=(i-a*(n[1][1]+n[0][1]))/2;t.scale(150*a).translate([s,o])},r)}var cx=16,Xq=Kt(30*re);function ux(t,e){return+e?Zq(t,e):Kq(t)}function Kq(t){return rc({point:function(e,r){e=t(e,r),this.stream.point(e[0],e[1])}})}function Zq(t,e){function r(n,i,a,s,o,l,u,h,d,f,p,m,_,y){var b=u-n,x=h-i,k=b*b+x*x;if(k>4*e&&_--){var T=s+f,C=o+p,M=l+m,S=Sr(T*T+C*C+M*M),R=tn(M/=S),A=Ne(Ne(M)-1)<te||Ne(a-d)<te?(a+d)/2:Jr(C,T),L=t(A,R),v=L[0],B=L[1],w=v-n,D=B-i,N=x*w-b*D;(N*N/k>e||Ne((b*w+x*D)/k-.5)>.3||s*f+o*p+l*m<Xq)&&(r(n,i,a,s,o,l,v,B,A,T/=S,C/=S,M,_,y),y.point(v,B),r(v,B,A,T,C,M,u,h,d,f,p,m,_,y))}}return function(n){var i,a,s,o,l,u,h,d,f,p,m,_,y={point:b,lineStart:x,lineEnd:T,polygonStart:function(){n.polygonStart(),y.lineStart=C},polygonEnd:function(){n.polygonEnd(),y.lineStart=x}};function b(R,A){R=t(R,A),n.point(R[0],R[1])}function x(){d=NaN,y.point=k,n.lineStart()}function k(R,A){var L=Cs([R,A]),v=t(R,A);r(d,f,h,p,m,_,d=v[0],f=v[1],h=R,p=L[0],m=L[1],_=L[2],cx,n),n.point(d,f)}function T(){y.point=b,n.lineEnd()}function C(){x(),y.point=M,y.lineEnd=S}function M(R,A){k(i=R,A),a=d,s=f,o=p,l=m,u=_,y.point=k}function S(){r(d,f,h,p,m,_,a,s,i,o,l,u,cx,n),y.lineEnd=T,T()}return y}}var Qq=rc({point:function(t,e){this.stream.point(t*re,e*re)}});function Jq(t){return rc({point:function(e,r){var n=t(e,r);return this.stream.point(n[0],n[1])}})}function tV(t,e,r,n,i){function a(s,o){return s*=n,o*=i,[e+t*s,r-t*o]}return a.invert=function(s,o){return[(s-e)/t*n,(r-o)/t*i]},a}function hx(t,e,r,n,i,a){if(!a)return tV(t,e,r,n,i);var s=Kt(a),o=Ht(a),l=s*t,u=o*t,h=s/t,d=o/t,f=(o*r-s*e)/t,p=(o*e+s*r)/t;function m(_,y){return _*=n,y*=i,[l*_-u*y+e,r-u*_-l*y]}return m.invert=function(_,y){return[n*(h*_-d*y+f),i*(p-d*_-h*y)]},m}function Li(t){return O2(function(){return t})()}function O2(t){var e,r=150,n=480,i=250,a=0,s=0,o=0,l=0,u=0,h,d=0,f=1,p=1,m=null,_=m2,y=null,b,x,k,T=Kl,C=.5,M,S,R,A,L;function v(N){return R(N[0]*re,N[1]*re)}function B(N){return N=R.invert(N[0],N[1]),N&&[N[0]*Ue,N[1]*Ue]}v.stream=function(N){return A&&L===N?A:A=Qq(Jq(h)(_(M(T(L=N)))))},v.preclip=function(N){return arguments.length?(_=N,m=void 0,D()):_},v.postclip=function(N){return arguments.length?(T=N,y=b=x=k=null,D()):T},v.clipAngle=function(N){return arguments.length?(_=+N?D6(m=N*re):(m=null,m2),D()):m*Ue},v.clipExtent=function(N){return arguments.length?(T=N==null?(y=b=x=k=null,Kl):Oh(y=+N[0][0],b=+N[0][1],x=+N[1][0],k=+N[1][1]),D()):y==null?null:[[y,b],[x,k]]},v.scale=function(N){return arguments.length?(r=+N,w()):r},v.translate=function(N){return arguments.length?(n=+N[0],i=+N[1],w()):[n,i]},v.center=function(N){return arguments.length?(a=N[0]%360*re,s=N[1]%360*re,w()):[a*Ue,s*Ue]},v.rotate=function(N){return arguments.length?(o=N[0]%360*re,l=N[1]%360*re,u=N.length>2?N[2]%360*re:0,w()):[o*Ue,l*Ue,u*Ue]},v.angle=function(N){return arguments.length?(d=N%360*re,w()):d*Ue},v.reflectX=function(N){return arguments.length?(f=N?-1:1,w()):f<0},v.reflectY=function(N){return arguments.length?(p=N?-1:1,w()):p<0},v.precision=function(N){return arguments.length?(M=ux(S,C=N*N),D()):Sr(C)},v.fitExtent=function(N,z){return jh(v,N,z)},v.fitSize=function(N,z){return N2(v,N,z)},v.fitWidth=function(N,z){return B2(v,N,z)},v.fitHeight=function(N,z){return D2(v,N,z)};function w(){var N=hx(r,0,0,f,p,d).apply(null,e(a,s)),z=hx(r,n-N[0],i-N[1],f,p,d);return h=g2(o,l,u),S=d2(e,z),R=d2(h,S),M=ux(S,C),D()}function D(){return A=L=null,v}return function(){return e=t.apply(this,arguments),v.invert=e.invert&&B,w()}}function F2(t){var e=0,r=Ae/3,n=O2(t),i=n(e,r);return i.parallels=function(a){return arguments.length?n(e=a[0]*re,r=a[1]*re):[e*Ue,r*Ue]},i}function eV(t){var e=Kt(t);function r(n,i){return[n*e,Ht(i)/e]}return r.invert=function(n,i){return[n/e,tn(i*e)]},r}function fx(t,e){var r=Ht(t),n=(r+Ht(e))/2;if(Ne(n)<te)return eV(t);var i=1+r*(2*n-r),a=Sr(i)/n;function s(o,l){var u=Sr(i-2*n*Ht(l))/n;return[u*Ht(o*=n),a-u*Kt(o)]}return s.invert=function(o,l){var u=a-l,h=Jr(o,Ne(u))*Dn(u);return u*n<0&&(h-=Ae*Dn(o)*Dn(u)),[h/n,tn((i-(o*o+u*u)*n*n)/(2*n))]},s}function $h(){return F2(fx).scale(155.424).center([0,33.6442])}function dx(){return $h().parallels([29.5,45.5]).scale(1070).translate([480,250]).rotate([96,0]).center([-.6,38.7])}function rV(t){var e=t.length;return{point:function(r,n){for(var i=-1;++i<e;)t[i].point(r,n)},sphere:function(){for(var r=-1;++r<e;)t[r].sphere()},lineStart:function(){for(var r=-1;++r<e;)t[r].lineStart()},lineEnd:function(){for(var r=-1;++r<e;)t[r].lineEnd()},polygonStart:function(){for(var r=-1;++r<e;)t[r].polygonStart()},polygonEnd:function(){for(var r=-1;++r<e;)t[r].polygonEnd()}}}function nV(){var t,e,r=dx(),n,i=$h().rotate([154,0]).center([-2,58.5]).parallels([55,65]),a,s=$h().rotate([157,0]).center([-3,19.9]).parallels([8,18]),o,l,u={point:function(f,p){l=[f,p]}};function h(f){var p=f[0],m=f[1];return l=null,n.point(p,m),l||(a.point(p,m),l)||(o.point(p,m),l)}h.invert=function(f){var p=r.scale(),m=r.translate(),_=(f[0]-m[0])/p,y=(f[1]-m[1])/p;return(y>=.12&&y<.234&&_>=-.425&&_<-.214?i:y>=.166&&y<.234&&_>=-.214&&_<-.115?s:r).invert(f)},h.stream=function(f){return t&&e===f?t:t=rV([r.stream(e=f),i.stream(f),s.stream(f)])},h.precision=function(f){return arguments.length?(r.precision(f),i.precision(f),s.precision(f),d()):r.precision()},h.scale=function(f){return arguments.length?(r.scale(f),i.scale(f*.35),s.scale(f),h.translate(r.translate())):r.scale()},h.translate=function(f){if(!arguments.length)return r.translate();var p=r.scale(),m=+f[0],_=+f[1];return n=r.translate(f).clipExtent([[m-.455*p,_-.238*p],[m+.455*p,_+.238*p]]).stream(u),a=i.translate([m-.307*p,_+.201*p]).clipExtent([[m-.425*p+te,_+.12*p+te],[m-.214*p-te,_+.234*p-te]]).stream(u),o=s.translate([m-.205*p,_+.212*p]).clipExtent([[m-.214*p+te,_+.166*p+te],[m-.115*p-te,_+.234*p-te]]).stream(u),d()},h.fitExtent=function(f,p){return jh(h,f,p)},h.fitSize=function(f,p){return N2(h,f,p)},h.fitWidth=function(f,p){return B2(h,f,p)},h.fitHeight=function(f,p){return D2(h,f,p)};function d(){return t=e=null,h}return h.scale(1070)}function px(t){return function(e,r){var n=Kt(e),i=Kt(r),a=t(n*i);return a===1/0?[2,0]:[a*i*Ht(e),a*Ht(r)]}}function nc(t){return function(e,r){var n=Sr(e*e+r*r),i=t(n),a=Ht(i),s=Kt(i);return[Jr(e*a,n*s),tn(n&&r*a/n)]}}var P2=px(function(t){return Sr(2/(1+t))});P2.invert=nc(function(t){return 2*tn(t/2)});function iV(){return Li(P2).scale(124.75).clipAngle(180-.001)}var q2=px(function(t){return(t=i6(t))&&t/Ht(t)});q2.invert=nc(function(t){return t});function aV(){return Li(q2).scale(79.4188).clipAngle(180-.001)}function ic(t,e){return[t,bh(r2((rr+e)/2))]}ic.invert=function(t,e){return[t,2*So(n6(e))-rr]};function sV(){return gx(ic).scale(961/Qr)}function gx(t){var e=Li(t),r=e.center,n=e.scale,i=e.translate,a=e.clipExtent,s=null,o,l,u;e.scale=function(d){return arguments.length?(n(d),h()):n()},e.translate=function(d){return arguments.length?(i(d),h()):i()},e.center=function(d){return arguments.length?(r(d),h()):r()},e.clipExtent=function(d){return arguments.length?(d==null?s=o=l=u=null:(s=+d[0][0],o=+d[0][1],l=+d[1][0],u=+d[1][1]),h()):s==null?null:[[s,o],[l,u]]};function h(){var d=Ae*n(),f=e(S6(e.rotate()).invert([0,0]));return a(s==null?[[f[0]-d,f[1]-d],[f[0]+d,f[1]+d]]:t===ic?[[Math.max(f[0]-d,s),o],[Math.min(f[0]+d,l),u]]:[[s,Math.max(f[1]-d,o)],[l,Math.min(f[1]+d,u)]])}return h()}function Xh(t){return r2((rr+t)/2)}function yx(t,e){var r=Kt(t),n=t===e?Ht(t):bh(r/Kt(e))/bh(Xh(e)/Xh(t)),i=r*e2(Xh(t),n)/n;if(!n)return ic;function a(s,o){i>0?o<-rr+te&&(o=-rr+te):o>rr-te&&(o=rr-te);var l=i/e2(Xh(o),n);return[l*Ht(n*s),i-l*Kt(n*s)]}return a.invert=function(s,o){var l=i-o,u=Dn(n)*Sr(s*s+l*l),h=Jr(s,Ne(l))*Dn(l);return l*n<0&&(h-=Ae*Dn(s)*Dn(l)),[h/n,2*So(e2(i/u,1/n))-rr]},a}function oV(){return F2(yx).scale(109.5).parallels([30,30])}function ac(t,e){return[t,e]}ac.invert=ac;function lV(){return Li(ac).scale(152.63)}function mx(t,e){var r=Kt(t),n=t===e?Ht(t):(r-Kt(e))/(e-t),i=r/n+t;if(Ne(n)<te)return ac;function a(s,o){var l=i-o,u=n*s;return[l*Ht(u),i-l*Kt(u)]}return a.invert=function(s,o){var l=i-o,u=Jr(s,Ne(l))*Dn(l);return l*n<0&&(u-=Ae*Dn(s)*Dn(l)),[u/n,i-Dn(n)*Sr(s*s+l*l)]},a}function cV(){return F2(mx).scale(131.154).center([0,13.9389])}var sc=1.340264,oc=-.081106,lc=893e-6,cc=.003796,Kh=Sr(3)/2,uV=12;function V2(t,e){var r=tn(Kh*Ht(e)),n=r*r,i=n*n*n;return[t*Kt(r)/(Kh*(sc+3*oc*n+i*(7*lc+9*cc*n))),r*(sc+oc*n+i*(lc+cc*n))]}V2.invert=function(t,e){for(var r=e,n=r*r,i=n*n*n,a=0,s,o,l;a<uV&&(o=r*(sc+oc*n+i*(lc+cc*n))-e,l=sc+3*oc*n+i*(7*lc+9*cc*n),r-=s=o/l,n=r*r,i=n*n*n,!(Ne(s)<Hl));++a);return[Kh*t*(sc+3*oc*n+i*(7*lc+9*cc*n))/Kt(r),tn(Ht(r)/Kh)]};function hV(){return Li(V2).scale(177.158)}function z2(t,e){var r=Kt(e),n=Kt(t)*r;return[r*Ht(t)/n,Ht(e)/n]}z2.invert=nc(So);function fV(){return Li(z2).scale(144.049).clipAngle(60)}function dV(){var t=1,e=0,r=0,n=1,i=1,a=0,s,o,l=null,u,h,d,f=1,p=1,m=rc({point:function(T,C){var M=k([T,C]);this.stream.point(M[0],M[1])}}),_=Kl,y,b;function x(){return f=t*n,p=t*i,y=b=null,k}function k(T){var C=T[0]*f,M=T[1]*p;if(a){var S=M*s-C*o;C=C*s+M*o,M=S}return[C+e,M+r]}return k.invert=function(T){var C=T[0]-e,M=T[1]-r;if(a){var S=M*s+C*o;C=C*s-M*o,M=S}return[C/f,M/p]},k.stream=function(T){return y&&b===T?y:y=m(_(b=T))},k.postclip=function(T){return arguments.length?(_=T,l=u=h=d=null,x()):_},k.clipExtent=function(T){return arguments.length?(_=T==null?(l=u=h=d=null,Kl):Oh(l=+T[0][0],u=+T[0][1],h=+T[1][0],d=+T[1][1]),x()):l==null?null:[[l,u],[h,d]]},k.scale=function(T){return arguments.length?(t=+T,x()):t},k.translate=function(T){return arguments.length?(e=+T[0],r=+T[1],x()):[e,r]},k.angle=function(T){return arguments.length?(a=T%360*re,o=Ht(a),s=Kt(a),x()):a*Ue},k.reflectX=function(T){return arguments.length?(n=T?-1:1,x()):n<0},k.reflectY=function(T){return arguments.length?(i=T?-1:1,x()):i<0},k.fitExtent=function(T,C){return jh(k,T,C)},k.fitSize=function(T,C){return N2(k,T,C)},k.fitWidth=function(T,C){return B2(k,T,C)},k.fitHeight=function(T,C){return D2(k,T,C)},k}function Y2(t,e){var r=e*e,n=r*r;return[t*(.8707-.131979*r+n*(-.013791+n*(.003971*r-.001529*n))),e*(1.007226+r*(.015085+n*(-.044475+.028874*r-.005916*n)))]}Y2.invert=function(t,e){var r=e,n=25,i;do{var a=r*r,s=a*a;r-=i=(r*(1.007226+a*(.015085+s*(-.044475+.028874*a-.005916*s)))-e)/(1.007226+a*(.015085*3+s*(-.044475*7+.028874*9*a-.005916*11*s)))}while(Ne(i)>te&&--n>0);return[t/(.8707+(a=r*r)*(-.131979+a*(-.013791+a*a*a*(.003971-.001529*a)))),r]};function pV(){return Li(Y2).scale(175.295)}function U2(t,e){return[Kt(e)*Ht(t),Ht(e)]}U2.invert=nc(tn);function gV(){return Li(U2).scale(249.5).clipAngle(90+te)}function W2(t,e){var r=Kt(e),n=1+Kt(t)*r;return[r*Ht(t)/n,Ht(e)/n]}W2.invert=nc(function(t){return 2*So(t)});function yV(){return Li(W2).scale(250).clipAngle(142)}function H2(t,e){return[bh(r2((rr+e)/2)),-t]}H2.invert=function(t,e){return[-e,2*So(n6(t))-rr]};function mV(){var t=gx(H2),e=t.center,r=t.rotate;return t.center=function(n){return arguments.length?e([-n[1],n[0]]):(n=e(),[n[1],-n[0]])},t.rotate=function(n){return arguments.length?r([n[0],n[1],n.length>2?n[2]+90:90]):(n=r(),[n[0],n[1],n[2]-90])},r([0,0,90]).scale(159.155)}function bV(t,e){return t.parent===e.parent?1:2}function _V(t){return t.reduce(vV,0)/t.length}function vV(t,e){return t+e.x}function xV(t){return 1+t.reduce(kV,0)}function kV(t,e){return Math.max(t,e.y)}function wV(t){for(var e;e=t.children;)t=e[0];return t}function TV(t){for(var e;e=t.children;)t=e[e.length-1];return t}function EV(){var t=bV,e=1,r=1,n=!1;function i(a){var s,o=0;a.eachAfter(function(f){var p=f.children;p?(f.x=_V(p),f.y=xV(p)):(f.x=s?o+=t(f,s):0,f.y=0,s=f)});var l=wV(a),u=TV(a),h=l.x-t(l,u)/2,d=u.x+t(u,l)/2;return a.eachAfter(n?function(f){f.x=(f.x-a.x)*e,f.y=(a.y-f.y)*r}:function(f){f.x=(f.x-h)/(d-h)*e,f.y=(1-(a.y?f.y/a.y:1))*r})}return i.separation=function(a){return arguments.length?(t=a,i):t},i.size=function(a){return arguments.length?(n=!1,e=+a[0],r=+a[1],i):n?null:[e,r]},i.nodeSize=function(a){return arguments.length?(n=!0,e=+a[0],r=+a[1],i):n?[e,r]:null},i}function CV(t){var e=0,r=t.children,n=r&&r.length;if(!n)e=1;else for(;--n>=0;)e+=r[n].value;t.value=e}function SV(){return this.eachAfter(CV)}function AV(t,e){let r=-1;for(const n of this)t.call(e,n,++r,this);return this}function MV(t,e){for(var r=this,n=[r],i,a,s=-1;r=n.pop();)if(t.call(e,r,++s,this),i=r.children)for(a=i.length-1;a>=0;--a)n.push(i[a]);return this}function LV(t,e){for(var r=this,n=[r],i=[],a,s,o,l=-1;r=n.pop();)if(i.push(r),a=r.children)for(s=0,o=a.length;s<o;++s)n.push(a[s]);for(;r=i.pop();)t.call(e,r,++l,this);return this}function RV(t,e){let r=-1;for(const n of this)if(t.call(e,n,++r,this))return n}function IV(t){return this.eachAfter(function(e){for(var r=+t(e.data)||0,n=e.children,i=n&&n.length;--i>=0;)r+=n[i].value;e.value=r})}function NV(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})}function BV(t){for(var e=this,r=DV(e,t),n=[e];e!==r;)e=e.parent,n.push(e);for(var i=n.length;t!==r;)n.splice(i,0,t),t=t.parent;return n}function DV(t,e){if(t===e)return t;var r=t.ancestors(),n=e.ancestors(),i=null;for(t=r.pop(),e=n.pop();t===e;)i=t,t=r.pop(),e=n.pop();return i}function OV(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e}function FV(){return Array.from(this)}function PV(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t}function qV(){var t=this,e=[];return t.each(function(r){r!==t&&e.push({source:r.parent,target:r})}),e}function*VV(){var t=this,e,r=[t],n,i,a;do for(e=r.reverse(),r=[];t=e.pop();)if(yield t,n=t.children)for(i=0,a=n.length;i<a;++i)r.push(n[i]);while(r.length)}function G2(t,e){t instanceof Map?(t=[void 0,t],e===void 0&&(e=UV)):e===void 0&&(e=YV);for(var r=new Ms(t),n,i=[r],a,s,o,l;n=i.pop();)if((s=e(n.data))&&(l=(s=Array.from(s)).length))for(n.children=s,o=l-1;o>=0;--o)i.push(a=s[o]=new Ms(s[o])),a.parent=n,a.depth=n.depth+1;return r.eachBefore(bx)}function zV(){return G2(this).eachBefore(WV)}function YV(t){return t.children}function UV(t){return Array.isArray(t)?t[1]:null}function WV(t){t.data.value!==void 0&&(t.value=t.data.value),t.data=t.data.data}function bx(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function Ms(t){this.data=t,this.depth=this.height=0,this.parent=null}Ms.prototype=G2.prototype={constructor:Ms,count:SV,each:AV,eachAfter:LV,eachBefore:MV,find:RV,sum:IV,sort:NV,path:BV,ancestors:OV,descendants:FV,leaves:PV,links:qV,copy:zV,[Symbol.iterator]:VV};function Zh(t){return t==null?null:_x(t)}function _x(t){if(typeof t!="function")throw new Error;return t}function Ls(){return 0}function Bo(t){return function(){return t}}const HV=1664525,GV=1013904223,vx=4294967296;function j2(){let t=1;return()=>(t=(HV*t+GV)%vx)/vx}function jV(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function $V(t,e){let r=t.length,n,i;for(;r;)i=e()*r--|0,n=t[r],t[r]=t[i],t[i]=n;return t}function XV(t){return xx(t,j2())}function xx(t,e){for(var r=0,n=(t=$V(Array.from(t),e)).length,i=[],a,s;r<n;)a=t[r],s&&kx(s,a)?++r:(s=ZV(i=KV(i,a)),r=0);return s}function KV(t,e){var r,n;if($2(e,t))return[e];for(r=0;r<t.length;++r)if(Qh(e,t[r])&&$2(uc(t[r],e),t))return[t[r],e];for(r=0;r<t.length-1;++r)for(n=r+1;n<t.length;++n)if(Qh(uc(t[r],t[n]),e)&&Qh(uc(t[r],e),t[n])&&Qh(uc(t[n],e),t[r])&&$2(wx(t[r],t[n],e),t))return[t[r],t[n],e];throw new Error}function Qh(t,e){var r=t.r-e.r,n=e.x-t.x,i=e.y-t.y;return r<0||r*r<n*n+i*i}function kx(t,e){var r=t.r-e.r+Math.max(t.r,e.r,1)*1e-9,n=e.x-t.x,i=e.y-t.y;return r>0&&r*r>n*n+i*i}function $2(t,e){for(var r=0;r<e.length;++r)if(!kx(t,e[r]))return!1;return!0}function ZV(t){switch(t.length){case 1:return QV(t[0]);case 2:return uc(t[0],t[1]);case 3:return wx(t[0],t[1],t[2])}}function QV(t){return{x:t.x,y:t.y,r:t.r}}function uc(t,e){var r=t.x,n=t.y,i=t.r,a=e.x,s=e.y,o=e.r,l=a-r,u=s-n,h=o-i,d=Math.sqrt(l*l+u*u);return{x:(r+a+l/d*h)/2,y:(n+s+u/d*h)/2,r:(d+i+o)/2}}function wx(t,e,r){var n=t.x,i=t.y,a=t.r,s=e.x,o=e.y,l=e.r,u=r.x,h=r.y,d=r.r,f=n-s,p=n-u,m=i-o,_=i-h,y=l-a,b=d-a,x=n*n+i*i-a*a,k=x-s*s-o*o+l*l,T=x-u*u-h*h+d*d,C=p*m-f*_,M=(m*T-_*k)/(C*2)-n,S=(_*y-m*b)/C,R=(p*k-f*T)/(C*2)-i,A=(f*b-p*y)/C,L=S*S+A*A-1,v=2*(a+M*S+R*A),B=M*M+R*R-a*a,w=-(Math.abs(L)>1e-6?(v+Math.sqrt(v*v-4*L*B))/(2*L):B/v);return{x:n+M+S*w,y:i+R+A*w,r:w}}function Tx(t,e,r){var n=t.x-e.x,i,a,s=t.y-e.y,o,l,u=n*n+s*s;u?(a=e.r+r.r,a*=a,l=t.r+r.r,l*=l,a>l?(i=(u+l-a)/(2*u),o=Math.sqrt(Math.max(0,l/u-i*i)),r.x=t.x-i*n-o*s,r.y=t.y-i*s+o*n):(i=(u+a-l)/(2*u),o=Math.sqrt(Math.max(0,a/u-i*i)),r.x=e.x+i*n-o*s,r.y=e.y+i*s+o*n)):(r.x=e.x+r.r,r.y=e.y)}function Ex(t,e){var r=t.r+e.r-1e-6,n=e.x-t.x,i=e.y-t.y;return r>0&&r*r>n*n+i*i}function Cx(t){var e=t._,r=t.next._,n=e.r+r.r,i=(e.x*r.r+r.x*e.r)/n,a=(e.y*r.r+r.y*e.r)/n;return i*i+a*a}function Jh(t){this._=t,this.next=null,this.previous=null}function Sx(t,e){if(!(a=(t=jV(t)).length))return 0;var r,n,i,a,s,o,l,u,h,d,f;if(r=t[0],r.x=0,r.y=0,!(a>1))return r.r;if(n=t[1],r.x=-n.r,n.x=r.r,n.y=0,!(a>2))return r.r+n.r;Tx(n,r,i=t[2]),r=new Jh(r),n=new Jh(n),i=new Jh(i),r.next=i.previous=n,n.next=r.previous=i,i.next=n.previous=r;t:for(l=3;l<a;++l){Tx(r._,n._,i=t[l]),i=new Jh(i),u=n.next,h=r.previous,d=n._.r,f=r._.r;do if(d<=f){if(Ex(u._,i._)){n=u,r.next=n,n.previous=r,--l;continue t}d+=u._.r,u=u.next}else{if(Ex(h._,i._)){r=h,r.next=n,n.previous=r,--l;continue t}f+=h._.r,h=h.previous}while(u!==h.next);for(i.previous=r,i.next=n,r.next=n.previous=n=i,s=Cx(r);(i=i.next)!==n;)(o=Cx(i))<s&&(r=i,s=o);n=r.next}for(r=[n._],i=n;(i=i.next)!==n;)r.push(i._);for(i=xx(r,e),l=0;l<a;++l)r=t[l],r.x-=i.x,r.y-=i.y;return i.r}function JV(t){return Sx(t,j2()),t}function tz(t){return Math.sqrt(t.value)}function ez(){var t=null,e=1,r=1,n=Ls;function i(a){const s=j2();return a.x=e/2,a.y=r/2,t?a.eachBefore(Ax(t)).eachAfter(X2(n,.5,s)).eachBefore(Mx(1)):a.eachBefore(Ax(tz)).eachAfter(X2(Ls,1,s)).eachAfter(X2(n,a.r/Math.min(e,r),s)).eachBefore(Mx(Math.min(e,r)/(2*a.r))),a}return i.radius=function(a){return arguments.length?(t=Zh(a),i):t},i.size=function(a){return arguments.length?(e=+a[0],r=+a[1],i):[e,r]},i.padding=function(a){return arguments.length?(n=typeof a=="function"?a:Bo(+a),i):n},i}function Ax(t){return function(e){e.children||(e.r=Math.max(0,+t(e)||0))}}function X2(t,e,r){return function(n){if(i=n.children){var i,a,s=i.length,o=t(n)*e||0,l;if(o)for(a=0;a<s;++a)i[a].r+=o;if(l=Sx(i,r),o)for(a=0;a<s;++a)i[a].r-=o;n.r=l+o}}}function Mx(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 Lx(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 hc(t,e,r,n,i){for(var a=t.children,s,o=-1,l=a.length,u=t.value&&(n-e)/t.value;++o<l;)s=a[o],s.y0=r,s.y1=i,s.x0=e,s.x1=e+=s.value*u}function rz(){var t=1,e=1,r=0,n=!1;function i(s){var o=s.height+1;return s.x0=s.y0=r,s.x1=t,s.y1=e/o,s.eachBefore(a(e,o)),n&&s.eachBefore(Lx),s}function a(s,o){return function(l){l.children&&hc(l,l.x0,s*(l.depth+1)/o,l.x1,s*(l.depth+2)/o);var u=l.x0,h=l.y0,d=l.x1-r,f=l.y1-r;d<u&&(u=d=(u+d)/2),f<h&&(h=f=(h+f)/2),l.x0=u,l.y0=h,l.x1=d,l.y1=f}}return i.round=function(s){return arguments.length?(n=!!s,i):n},i.size=function(s){return arguments.length?(t=+s[0],e=+s[1],i):[t,e]},i.padding=function(s){return arguments.length?(r=+s,i):r},i}var nz={depth:-1},Rx={},K2={};function iz(t){return t.id}function az(t){return t.parentId}function sz(){var t=iz,e=az,r;function n(i){var a=Array.from(i),s=t,o=e,l,u,h,d,f,p,m,_,y=new Map;if(r!=null){const b=a.map((T,C)=>oz(r(T,C,i))),x=b.map(Ix),k=new Set(b).add("");for(const T of x)k.has(T)||(k.add(T),b.push(T),x.push(Ix(T)),a.push(K2));s=(T,C)=>b[C],o=(T,C)=>x[C]}for(h=0,l=a.length;h<l;++h)u=a[h],p=a[h]=new Ms(u),(m=s(u,h,i))!=null&&(m+="")&&(_=p.id=m,y.set(_,y.has(_)?Rx:p)),(m=o(u,h,i))!=null&&(m+="")&&(p.parent=m);for(h=0;h<l;++h)if(p=a[h],m=p.parent){if(f=y.get(m),!f)throw new Error("missing: "+m);if(f===Rx)throw new Error("ambiguous: "+m);f.children?f.children.push(p):f.children=[p],p.parent=f}else{if(d)throw new Error("multiple roots");d=p}if(!d)throw new Error("no root");if(r!=null){for(;d.data===K2&&d.children.length===1;)d=d.children[0],--l;for(let b=a.length-1;b>=0&&(p=a[b],p.data===K2);--b)p.data=null}if(d.parent=nz,d.eachBefore(function(b){b.depth=b.parent.depth+1,--l}).eachBefore(bx),d.parent=null,l>0)throw new Error("cycle");return d}return n.id=function(i){return arguments.length?(t=Zh(i),n):t},n.parentId=function(i){return arguments.length?(e=Zh(i),n):e},n.path=function(i){return arguments.length?(r=Zh(i),n):r},n}function oz(t){t=`${t}`;let e=t.length;return Z2(t,e-1)&&!Z2(t,e-2)&&(t=t.slice(0,-1)),t[0]==="/"?t:`/${t}`}function Ix(t){let e=t.length;if(e<2)return"";for(;--e>1&&!Z2(t,e););return t.slice(0,e)}function Z2(t,e){if(t[e]==="/"){let r=0;for(;e>0&&t[--e]==="\\";)++r;if((r&1)===0)return!0}return!1}function lz(t,e){return t.parent===e.parent?1:2}function Q2(t){var e=t.children;return e?e[0]:t.t}function J2(t){var e=t.children;return e?e[e.length-1]:t.t}function cz(t,e,r){var n=r/(e.i-t.i);e.c-=n,e.s+=r,t.c+=n,e.z+=r,e.m+=r}function uz(t){for(var e=0,r=0,n=t.children,i=n.length,a;--i>=0;)a=n[i],a.z+=e,a.m+=e,e+=a.s+(r+=a.c)}function hz(t,e,r){return t.a.parent===e.parent?t.a:r}function tf(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}tf.prototype=Object.create(Ms.prototype);function fz(t){for(var e=new tf(t,0),r,n=[e],i,a,s,o;r=n.pop();)if(a=r._.children)for(r.children=new Array(o=a.length),s=o-1;s>=0;--s)n.push(i=r.children[s]=new tf(a[s],s)),i.parent=r;return(e.parent=new tf(null,0)).children=[e],e}function dz(){var t=lz,e=1,r=1,n=null;function i(u){var h=fz(u);if(h.eachAfter(a),h.parent.m=-h.z,h.eachBefore(s),n)u.eachBefore(l);else{var d=u,f=u,p=u;u.eachBefore(function(x){x.x<d.x&&(d=x),x.x>f.x&&(f=x),x.depth>p.depth&&(p=x)});var m=d===f?1:t(d,f)/2,_=m-d.x,y=e/(f.x+m+_),b=r/(p.depth||1);u.eachBefore(function(x){x.x=(x.x+_)*y,x.y=x.depth*b})}return u}function a(u){var h=u.children,d=u.parent.children,f=u.i?d[u.i-1]:null;if(h){uz(u);var p=(h[0].z+h[h.length-1].z)/2;f?(u.z=f.z+t(u._,f._),u.m=u.z-p):u.z=p}else f&&(u.z=f.z+t(u._,f._));u.parent.A=o(u,f,u.parent.A||d[0])}function s(u){u._.x=u.z+u.parent.m,u.m+=u.parent.m}function o(u,h,d){if(h){for(var f=u,p=u,m=h,_=f.parent.children[0],y=f.m,b=p.m,x=m.m,k=_.m,T;m=J2(m),f=Q2(f),m&&f;)_=Q2(_),p=J2(p),p.a=u,T=m.z+x-f.z-y+t(m._,f._),T>0&&(cz(hz(m,u,d),u,T),y+=T,b+=T),x+=m.m,y+=f.m,k+=_.m,b+=p.m;m&&!J2(p)&&(p.t=m,p.m+=x-b),f&&!Q2(_)&&(_.t=f,_.m+=y-k,d=u)}return d}function l(u){u.x*=e,u.y=u.depth*r}return i.separation=function(u){return arguments.length?(t=u,i):t},i.size=function(u){return arguments.length?(n=!1,e=+u[0],r=+u[1],i):n?null:[e,r]},i.nodeSize=function(u){return arguments.length?(n=!0,e=+u[0],r=+u[1],i):n?[e,r]:null},i}function ef(t,e,r,n,i){for(var a=t.children,s,o=-1,l=a.length,u=t.value&&(i-r)/t.value;++o<l;)s=a[o],s.x0=e,s.x1=n,s.y0=r,s.y1=r+=s.value*u}var Nx=(1+Math.sqrt(5))/2;function Bx(t,e,r,n,i,a){for(var s=[],o=e.children,l,u,h=0,d=0,f=o.length,p,m,_=e.value,y,b,x,k,T,C,M;h<f;){p=i-r,m=a-n;do y=o[d++].value;while(!y&&d<f);for(b=x=y,C=Math.max(m/p,p/m)/(_*t),M=y*y*C,T=Math.max(x/M,M/b);d<f;++d){if(y+=u=o[d].value,u<b&&(b=u),u>x&&(x=u),M=y*y*C,k=Math.max(x/M,M/b),k>T){y-=u;break}T=k}s.push(l={value:y,dice:p<m,children:o.slice(h,d)}),l.dice?hc(l,r,n,i,_?n+=m*y/_:a):ef(l,r,n,_?r+=p*y/_:i,a),_-=y,h=d}return s}const Dx=function t(e){function r(n,i,a,s,o){Bx(e,n,i,a,s,o)}return r.ratio=function(n){return t((n=+n)>1?n:1)},r}(Nx);function pz(){var t=Dx,e=!1,r=1,n=1,i=[0],a=Ls,s=Ls,o=Ls,l=Ls,u=Ls;function h(f){return f.x0=f.y0=0,f.x1=r,f.y1=n,f.eachBefore(d),i=[0],e&&f.eachBefore(Lx),f}function d(f){var p=i[f.depth],m=f.x0+p,_=f.y0+p,y=f.x1-p,b=f.y1-p;y<m&&(m=y=(m+y)/2),b<_&&(_=b=(_+b)/2),f.x0=m,f.y0=_,f.x1=y,f.y1=b,f.children&&(p=i[f.depth+1]=a(f)/2,m+=u(f)-p,_+=s(f)-p,y-=o(f)-p,b-=l(f)-p,y<m&&(m=y=(m+y)/2),b<_&&(_=b=(_+b)/2),t(f,m,_,y,b))}return h.round=function(f){return arguments.length?(e=!!f,h):e},h.size=function(f){return arguments.length?(r=+f[0],n=+f[1],h):[r,n]},h.tile=function(f){return arguments.length?(t=_x(f),h):t},h.padding=function(f){return arguments.length?h.paddingInner(f).paddingOuter(f):h.paddingInner()},h.paddingInner=function(f){return arguments.length?(a=typeof f=="function"?f:Bo(+f),h):a},h.paddingOuter=function(f){return arguments.length?h.paddingTop(f).paddingRight(f).paddingBottom(f).paddingLeft(f):h.paddingTop()},h.paddingTop=function(f){return arguments.length?(s=typeof f=="function"?f:Bo(+f),h):s},h.paddingRight=function(f){return arguments.length?(o=typeof f=="function"?f:Bo(+f),h):o},h.paddingBottom=function(f){return arguments.length?(l=typeof f=="function"?f:Bo(+f),h):l},h.paddingLeft=function(f){return arguments.length?(u=typeof f=="function"?f:Bo(+f),h):u},h}function gz(t,e,r,n,i){var a=t.children,s,o=a.length,l,u=new Array(o+1);for(u[0]=l=s=0;s<o;++s)u[s+1]=l+=a[s].value;h(0,o,t.value,e,r,n,i);function h(d,f,p,m,_,y,b){if(d>=f-1){var x=a[d];x.x0=m,x.y0=_,x.x1=y,x.y1=b;return}for(var k=u[d],T=p/2+k,C=d+1,M=f-1;C<M;){var S=C+M>>>1;u[S]<T?C=S+1:M=S}T-u[C-1]<u[C]-T&&d+1<C&&--C;var R=u[C]-k,A=p-R;if(y-m>b-_){var L=p?(m*A+y*R)/p:y;h(d,C,R,m,_,L,b),h(C,f,A,L,_,y,b)}else{var v=p?(_*A+b*R)/p:b;h(d,C,R,m,_,y,v),h(C,f,A,m,v,y,b)}}}function yz(t,e,r,n,i){(t.depth&1?ef:hc)(t,e,r,n,i)}const mz=function t(e){function r(n,i,a,s,o){if((l=n._squarify)&&l.ratio===e)for(var l,u,h,d,f=-1,p,m=l.length,_=n.value;++f<m;){for(u=l[f],h=u.children,d=u.value=0,p=h.length;d<p;++d)u.value+=h[d].value;u.dice?hc(u,i,a,s,_?a+=(o-a)*u.value/_:o):ef(u,i,a,_?i+=(s-i)*u.value/_:s,o),_-=u.value}else n._squarify=l=Bx(e,n,i,a,s,o),l.ratio=e}return r.ratio=function(n){return t((n=+n)>1?n:1)},r}(Nx);function bz(t){for(var e=-1,r=t.length,n,i=t[r-1],a=0;++e<r;)n=i,i=t[e],a+=n[1]*i[0]-n[0]*i[1];return a/2}function _z(t){for(var e=-1,r=t.length,n=0,i=0,a,s=t[r-1],o,l=0;++e<r;)a=s,s=t[e],l+=o=a[0]*s[1]-s[0]*a[1],n+=(a[0]+s[0])*o,i+=(a[1]+s[1])*o;return l*=3,[n/l,i/l]}function vz(t,e,r){return(e[0]-t[0])*(r[1]-t[1])-(e[1]-t[1])*(r[0]-t[0])}function xz(t,e){return t[0]-e[0]||t[1]-e[1]}function Ox(t){const e=t.length,r=[0,1];let n=2,i;for(i=2;i<e;++i){for(;n>1&&vz(t[r[n-2]],t[r[n-1]],t[i])<=0;)--n;r[n++]=i}return r.slice(0,n)}function kz(t){if((r=t.length)<3)return null;var e,r,n=new Array(r),i=new Array(r);for(e=0;e<r;++e)n[e]=[+t[e][0],+t[e][1],e];for(n.sort(xz),e=0;e<r;++e)i[e]=[n[e][0],-n[e][1]];var a=Ox(n),s=Ox(i),o=s[0]===a[0],l=s[s.length-1]===a[a.length-1],u=[];for(e=a.length-1;e>=0;--e)u.push(t[n[a[e]][2]]);for(e=+o;e<s.length-l;++e)u.push(t[n[s[e]][2]]);return u}function wz(t,e){for(var r=t.length,n=t[r-1],i=e[0],a=e[1],s=n[0],o=n[1],l,u,h=!1,d=0;d<r;++d)n=t[d],l=n[0],u=n[1],u>a!=o>a&&i<(s-l)*(a-u)/(o-u)+l&&(h=!h),s=l,o=u;return h}function Tz(t){for(var e=-1,r=t.length,n=t[r-1],i,a,s=n[0],o=n[1],l=0;++e<r;)i=s,a=o,n=t[e],s=n[0],o=n[1],i-=s,a-=o,l+=Math.hypot(i,a);return l}const Ir=Math.random,Ez=function t(e){function r(n,i){return n=n==null?0:+n,i=i==null?1:+i,arguments.length===1?(i=n,n=0):i-=n,function(){return e()*i+n}}return r.source=t,r}(Ir),Cz=function t(e){function r(n,i){return arguments.length<2&&(i=n,n=0),n=Math.floor(n),i=Math.floor(i)-n,function(){return Math.floor(e()*i+n)}}return r.source=t,r}(Ir),tp=function t(e){function r(n,i){var a,s;return n=n==null?0:+n,i=i==null?1:+i,function(){var o;if(a!=null)o=a,a=null;else do a=e()*2-1,o=e()*2-1,s=a*a+o*o;while(!s||s>1);return n+i*o*Math.sqrt(-2*Math.log(s)/s)}}return r.source=t,r}(Ir),Sz=function t(e){var r=tp.source(e);function n(){var i=r.apply(this,arguments);return function(){return Math.exp(i())}}return n.source=t,n}(Ir),Fx=function t(e){function r(n){return(n=+n)<=0?()=>0:function(){for(var i=0,a=n;a>1;--a)i+=e();return i+a*e()}}return r.source=t,r}(Ir),Az=function t(e){var r=Fx.source(e);function n(i){if((i=+i)==0)return e;var a=r(i);return function(){return a()/i}}return n.source=t,n}(Ir),Mz=function t(e){function r(n){return function(){return-Math.log1p(-e())/n}}return r.source=t,r}(Ir),Lz=function t(e){function r(n){if((n=+n)<0)throw new RangeError("invalid alpha");return n=1/-n,function(){return Math.pow(1-e(),n)}}return r.source=t,r}(Ir),Rz=function t(e){function r(n){if((n=+n)<0||n>1)throw new RangeError("invalid p");return function(){return Math.floor(e()+n)}}return r.source=t,r}(Ir),Px=function t(e){function r(n){if((n=+n)<0||n>1)throw new RangeError("invalid p");return n===0?()=>1/0:n===1?()=>1:(n=Math.log1p(-n),function(){return 1+Math.floor(Math.log1p(-e())/n)})}return r.source=t,r}(Ir),ep=function t(e){var r=tp.source(e)();function n(i,a){if((i=+i)<0)throw new RangeError("invalid k");if(i===0)return()=>0;if(a=a==null?1:+a,i===1)return()=>-Math.log1p(-e())*a;var s=(i<1?i+1:i)-1/3,o=1/(3*Math.sqrt(s)),l=i<1?()=>Math.pow(e(),1/i):()=>1;return function(){do{do var u=r(),h=1+o*u;while(h<=0);h*=h*h;var d=1-e()}while(d>=1-.0331*u*u*u*u&&Math.log(d)>=.5*u*u+s*(1-h+Math.log(h)));return s*h*l()*a}}return n.source=t,n}(Ir),qx=function t(e){var r=ep.source(e);function n(i,a){var s=r(i),o=r(a);return function(){var l=s();return l===0?0:l/(l+o())}}return n.source=t,n}(Ir),Vx=function t(e){var r=Px.source(e),n=qx.source(e);function i(a,s){return a=+a,(s=+s)>=1?()=>a:s<=0?()=>0:function(){for(var o=0,l=a,u=s;l*u>16&&l*(1-u)>16;){var h=Math.floor((l+1)*u),d=n(h,l-h+1)();d<=u?(o+=h,l-=h,u=(u-d)/(1-d)):(l=h-1,u/=d)}for(var f=u<.5,p=f?u:1-u,m=r(p),_=m(),y=0;_<=l;++y)_+=m();return o+(f?y:l-y)}}return i.source=t,i}(Ir),Iz=function t(e){function r(n,i,a){var s;return(n=+n)==0?s=o=>-Math.log(o):(n=1/n,s=o=>Math.pow(o,n)),i=i==null?0:+i,a=a==null?1:+a,function(){return i+a*s(-Math.log1p(-e()))}}return r.source=t,r}(Ir),Nz=function t(e){function r(n,i){return n=n==null?0:+n,i=i==null?1:+i,function(){return n+i*Math.tan(Math.PI*e())}}return r.source=t,r}(Ir),Bz=function t(e){function r(n,i){return n=n==null?0:+n,i=i==null?1:+i,function(){var a=e();return n+i*Math.log(a/(1-a))}}return r.source=t,r}(Ir),Dz=function t(e){var r=ep.source(e),n=Vx.source(e);function i(a){return function(){for(var s=0,o=a;o>16;){var l=Math.floor(.875*o),u=r(l)();if(u>o)return s+n(l-1,o/u)();s+=l,o-=u}for(var h=-Math.log1p(-e()),d=0;h<=o;++d)h-=Math.log1p(-e());return s+d}}return i.source=t,i}(Ir),Oz=1664525,Fz=1013904223,zx=1/4294967296;function Pz(t=Math.random()){let e=(0<=t&&t<1?t/zx:Math.abs(t))|0;return()=>(e=Oz*e+Fz|0,zx*(e>>>0))}function On(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t);break}return this}function ta(t,e){switch(arguments.length){case 0:break;case 1:{typeof t=="function"?this.interpolator(t):this.range(t);break}default:{this.domain(t),typeof e=="function"?this.interpolator(e):this.range(e);break}}return this}const rp=Symbol("implicit");function rf(){var t=new kl,e=[],r=[],n=rp;function i(a){let s=t.get(a);if(s===void 0){if(n!==rp)return n;t.set(a,s=e.push(a)-1)}return r[s%r.length]}return i.domain=function(a){if(!arguments.length)return e.slice();e=[],t=new kl;for(const s of a)t.has(s)||t.set(s,e.push(s)-1);return i},i.range=function(a){return arguments.length?(r=Array.from(a),i):r.slice()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return rf(e,r).unknown(n)},On.apply(i,arguments),i}function np(){var t=rf().unknown(void 0),e=t.domain,r=t.range,n=0,i=1,a,s,o=!1,l=0,u=0,h=.5;delete t.unknown;function d(){var f=e().length,p=i<n,m=p?i:n,_=p?n:i;a=(_-m)/Math.max(1,f-l+u*2),o&&(a=Math.floor(a)),m+=(_-m-a*(f-l))*h,s=a*(1-l),o&&(m=Math.round(m),s=Math.round(s));var y=Ca(f).map(function(b){return m+a*b});return r(p?y.reverse():y)}return t.domain=function(f){return arguments.length?(e(f),d()):e()},t.range=function(f){return arguments.length?([n,i]=f,n=+n,i=+i,d()):[n,i]},t.rangeRound=function(f){return[n,i]=f,n=+n,i=+i,o=!0,d()},t.bandwidth=function(){return s},t.step=function(){return a},t.round=function(f){return arguments.length?(o=!!f,d()):o},t.padding=function(f){return arguments.length?(l=Math.min(1,u=+f),d()):l},t.paddingInner=function(f){return arguments.length?(l=Math.min(1,f),d()):l},t.paddingOuter=function(f){return arguments.length?(u=+f,d()):u},t.align=function(f){return arguments.length?(h=Math.max(0,Math.min(1,f)),d()):h},t.copy=function(){return np(e(),[n,i]).round(o).paddingInner(l).paddingOuter(u).align(h)},On.apply(d(),arguments)}function Yx(t){var e=t.copy;return t.padding=t.paddingOuter,delete t.paddingInner,delete t.paddingOuter,t.copy=function(){return Yx(e())},t}function qz(){return Yx(np.apply(null,arguments).paddingInner(1))}function Vz(t){return function(){return t}}function nf(t){return+t}var Ux=[0,1];function an(t){return t}function ip(t,e){return(e-=t=+t)?function(r){return(r-t)/e}:Vz(isNaN(e)?NaN:.5)}function zz(t,e){var r;return t>e&&(r=t,t=e,e=r),function(n){return Math.max(t,Math.min(e,n))}}function Yz(t,e,r){var n=t[0],i=t[1],a=e[0],s=e[1];return i<n?(n=ip(i,n),a=r(s,a)):(n=ip(n,i),a=r(a,s)),function(o){return a(n(o))}}function Uz(t,e,r){var n=Math.min(t.length,e.length)-1,i=new Array(n),a=new Array(n),s=-1;for(t[n]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++s<n;)i[s]=ip(t[s],t[s+1]),a[s]=r(e[s],e[s+1]);return function(o){var l=cs(t,o,1,n)-1;return a[l](i[l](o))}}function fc(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function af(){var t=Ux,e=Ux,r=Ma,n,i,a,s=an,o,l,u;function h(){var f=Math.min(t.length,e.length);return s!==an&&(s=zz(t[0],t[f-1])),o=f>2?Uz:Yz,l=u=null,d}function d(f){return f==null||isNaN(f=+f)?a:(l||(l=o(t.map(n),e,r)))(n(s(f)))}return d.invert=function(f){return s(i((u||(u=o(e,t.map(n),Bn)))(f)))},d.domain=function(f){return arguments.length?(t=Array.from(f,nf),h()):t.slice()},d.range=function(f){return arguments.length?(e=Array.from(f),h()):e.slice()},d.rangeRound=function(f){return e=Array.from(f),r=Gu,h()},d.clamp=function(f){return arguments.length?(s=f?!0:an,h()):s!==an},d.interpolate=function(f){return arguments.length?(r=f,h()):r},d.unknown=function(f){return arguments.length?(a=f,d):a},function(f,p){return n=f,i=p,h()}}function ap(){return af()(an,an)}function Wx(t,e,r,n){var i=wl(t,e,r),a;switch(n=Co(n==null?",f":n),n.type){case"s":{var s=Math.max(Math.abs(t),Math.abs(e));return n.precision==null&&!isNaN(a=e6(i,s))&&(n.precision=a),Jd(n,s)}case"":case"e":case"g":case"p":case"r":{n.precision==null&&!isNaN(a=r6(i,Math.max(Math.abs(t),Math.abs(e))))&&(n.precision=a-(n.type==="e"));break}case"f":case"%":{n.precision==null&&!isNaN(a=t6(i))&&(n.precision=a-(n.type==="%")*2);break}}return gh(n)}function Oa(t){var e=t.domain;return t.ticks=function(r){var n=e();return hs(n[0],n[n.length-1],r==null?10:r)},t.tickFormat=function(r,n){var i=e();return Wx(i[0],i[i.length-1],r==null?10:r,n)},t.nice=function(r){r==null&&(r=10);var n=e(),i=0,a=n.length-1,s=n[i],o=n[a],l,u,h=10;for(o<s&&(u=s,s=o,o=u,u=i,i=a,a=u);h-- >0;){if(u=oo(s,o,r),u===l)return n[i]=s,n[a]=o,e(n);if(u>0)s=Math.floor(s/u)*u,o=Math.ceil(o/u)*u;else if(u<0)s=Math.ceil(s*u)/u,o=Math.floor(o*u)/u;else break;l=u}return t},t}function sp(){var t=ap();return t.copy=function(){return fc(t,sp())},On.apply(t,arguments),Oa(t)}function Hx(t){var e;function r(n){return n==null||isNaN(n=+n)?e:n}return r.invert=r,r.domain=r.range=function(n){return arguments.length?(t=Array.from(n,nf),r):t.slice()},r.unknown=function(n){return arguments.length?(e=n,r):e},r.copy=function(){return Hx(t).unknown(e)},t=arguments.length?Array.from(t,nf):[0,1],Oa(r)}function Gx(t,e){t=t.slice();var r=0,n=t.length-1,i=t[r],a=t[n],s;return a<i&&(s=r,r=n,n=s,s=i,i=a,a=s),t[r]=e.floor(i),t[n]=e.ceil(a),t}function jx(t){return Math.log(t)}function $x(t){return Math.exp(t)}function Wz(t){return-Math.log(-t)}function Hz(t){return-Math.exp(-t)}function Gz(t){return isFinite(t)?+("1e"+t):t<0?0:t}function jz(t){return t===10?Gz:t===Math.E?Math.exp:e=>Math.pow(t,e)}function $z(t){return t===Math.E?Math.log:t===10&&Math.log10||t===2&&Math.log2||(t=Math.log(t),e=>Math.log(e)/t)}function Xx(t){return(e,r)=>-t(-e,r)}function op(t){const e=t(jx,$x),r=e.domain;let n=10,i,a;function s(){return i=$z(n),a=jz(n),r()[0]<0?(i=Xx(i),a=Xx(a),t(Wz,Hz)):t(jx,$x),e}return e.base=function(o){return arguments.length?(n=+o,s()):n},e.domain=function(o){return arguments.length?(r(o),s()):r()},e.ticks=o=>{const l=r();let u=l[0],h=l[l.length-1];const d=h<u;d&&([u,h]=[h,u]);let f=i(u),p=i(h),m,_;const y=o==null?10:+o;let b=[];if(!(n%1)&&p-f<y){if(f=Math.floor(f),p=Math.ceil(p),u>0){for(;f<=p;++f)for(m=1;m<n;++m)if(_=f<0?m/a(-f):m*a(f),!(_<u)){if(_>h)break;b.push(_)}}else for(;f<=p;++f)for(m=n-1;m>=1;--m)if(_=f>0?m/a(-f):m*a(f),!(_<u)){if(_>h)break;b.push(_)}b.length*2<y&&(b=hs(u,h,y))}else b=hs(f,p,Math.min(p-f,y)).map(a);return d?b.reverse():b},e.tickFormat=(o,l)=>{if(o==null&&(o=10),l==null&&(l=n===10?"s":","),typeof l!="function"&&(!(n%1)&&(l=Co(l)).precision==null&&(l.trim=!0),l=gh(l)),o===1/0)return l;const u=Math.max(1,n*o/e.ticks().length);return h=>{let d=h/a(Math.round(i(h)));return d*n<n-.5&&(d*=n),d<=u?l(h):""}},e.nice=()=>r(Gx(r(),{floor:o=>a(Math.floor(i(o))),ceil:o=>a(Math.ceil(i(o)))})),e}function Kx(){const t=op(af()).domain([1,10]);return t.copy=()=>fc(t,Kx()).base(t.base()),On.apply(t,arguments),t}function Zx(t){return function(e){return Math.sign(e)*Math.log1p(Math.abs(e/t))}}function Qx(t){return function(e){return Math.sign(e)*Math.expm1(Math.abs(e))*t}}function lp(t){var e=1,r=t(Zx(e),Qx(e));return r.constant=function(n){return arguments.length?t(Zx(e=+n),Qx(e)):e},Oa(r)}function Jx(){var t=lp(af());return t.copy=function(){return fc(t,Jx()).constant(t.constant())},On.apply(t,arguments)}function t8(t){return function(e){return e<0?-Math.pow(-e,t):Math.pow(e,t)}}function Xz(t){return t<0?-Math.sqrt(-t):Math.sqrt(t)}function Kz(t){return t<0?-t*t:t*t}function cp(t){var e=t(an,an),r=1;function n(){return r===1?t(an,an):r===.5?t(Xz,Kz):t(t8(r),t8(1/r))}return e.exponent=function(i){return arguments.length?(r=+i,n()):r},Oa(e)}function up(){var t=cp(af());return t.copy=function(){return fc(t,up()).exponent(t.exponent())},On.apply(t,arguments),t}function Zz(){return up.apply(null,arguments).exponent(.5)}function e8(t){return Math.sign(t)*t*t}function Qz(t){return Math.sign(t)*Math.sqrt(Math.abs(t))}function r8(){var t=ap(),e=[0,1],r=!1,n;function i(a){var s=Qz(t(a));return isNaN(s)?n:r?Math.round(s):s}return i.invert=function(a){return t.invert(e8(a))},i.domain=function(a){return arguments.length?(t.domain(a),i):t.domain()},i.range=function(a){return arguments.length?(t.range((e=Array.from(a,nf)).map(e8)),i):e.slice()},i.rangeRound=function(a){return i.range(a).round(!0)},i.round=function(a){return arguments.length?(r=!!a,i):r},i.clamp=function(a){return arguments.length?(t.clamp(a),i):t.clamp()},i.unknown=function(a){return arguments.length?(n=a,i):n},i.copy=function(){return r8(t.domain(),e).round(r).clamp(t.clamp()).unknown(n)},On.apply(i,arguments),Oa(i)}function n8(){var t=[],e=[],r=[],n;function i(){var s=0,o=Math.max(1,e.length);for(r=new Array(o-1);++s<o;)r[s-1]=z_(t,s/o);return a}function a(s){return s==null||isNaN(s=+s)?n:e[cs(r,s)]}return a.invertExtent=function(s){var o=e.indexOf(s);return o<0?[NaN,NaN]:[o>0?r[o-1]:t[0],o<r.length?r[o]:t[t.length-1]]},a.domain=function(s){if(!arguments.length)return t.slice();t=[];for(let o of s)o!=null&&!isNaN(o=+o)&&t.push(o);return t.sort(Qe),i()},a.range=function(s){return arguments.length?(e=Array.from(s),i()):e.slice()},a.unknown=function(s){return arguments.length?(n=s,a):n},a.quantiles=function(){return r.slice()},a.copy=function(){return n8().domain(t).range(e).unknown(n)},On.apply(a,arguments)}function i8(){var t=0,e=1,r=1,n=[.5],i=[0,1],a;function s(l){return l!=null&&l<=l?i[cs(n,l,0,r)]:a}function o(){var l=-1;for(n=new Array(r);++l<r;)n[l]=((l+1)*e-(l-r)*t)/(r+1);return s}return s.domain=function(l){return arguments.length?([t,e]=l,t=+t,e=+e,o()):[t,e]},s.range=function(l){return arguments.length?(r=(i=Array.from(l)).length-1,o()):i.slice()},s.invertExtent=function(l){var u=i.indexOf(l);return u<0?[NaN,NaN]:u<1?[t,n[0]]:u>=r?[n[r-1],e]:[n[u-1],n[u]]},s.unknown=function(l){return arguments.length&&(a=l),s},s.thresholds=function(){return n.slice()},s.copy=function(){return i8().domain([t,e]).range(i).unknown(a)},On.apply(Oa(s),arguments)}function a8(){var t=[.5],e=[0,1],r,n=1;function i(a){return a!=null&&a<=a?e[cs(t,a,0,n)]:r}return i.domain=function(a){return arguments.length?(t=Array.from(a),n=Math.min(t.length,e.length-1),i):t.slice()},i.range=function(a){return arguments.length?(e=Array.from(a),n=Math.min(t.length,e.length-1),i):e.slice()},i.invertExtent=function(a){var s=e.indexOf(a);return[t[s-1],t[s]]},i.unknown=function(a){return arguments.length?(r=a,i):r},i.copy=function(){return a8().domain(t).range(e).unknown(r)},On.apply(i,arguments)}var hp=new Date,fp=new Date;function xr(t,e,r,n){function i(a){return t(a=arguments.length===0?new Date:new Date(+a)),a}return i.floor=function(a){return t(a=new Date(+a)),a},i.ceil=function(a){return t(a=new Date(a-1)),e(a,1),t(a),a},i.round=function(a){var s=i(a),o=i.ceil(a);return a-s<o-a?s:o},i.offset=function(a,s){return e(a=new Date(+a),s==null?1:Math.floor(s)),a},i.range=function(a,s,o){var l=[],u;if(a=i.ceil(a),o=o==null?1:Math.floor(o),!(a<s)||!(o>0))return l;do l.push(u=new Date(+a)),e(a,o),t(a);while(u<a&&a<s);return l},i.filter=function(a){return xr(function(s){if(s>=s)for(;t(s),!a(s);)s.setTime(s-1)},function(s,o){if(s>=s)if(o<0)for(;++o<=0;)for(;e(s,-1),!a(s););else for(;--o>=0;)for(;e(s,1),!a(s););})},r&&(i.count=function(a,s){return hp.setTime(+a),fp.setTime(+s),t(hp),t(fp),Math.floor(r(hp,fp))},i.every=function(a){return a=Math.floor(a),!isFinite(a)||!(a>0)?null:a>1?i.filter(n?function(s){return n(s)%a===0}:function(s){return i.count(0,s)%a===0}):i}),i}var sf=xr(function(){},function(t,e){t.setTime(+t+e)},function(t,e){return e-t});sf.every=function(t){return t=Math.floor(t),!isFinite(t)||!(t>0)?null:t>1?xr(function(e){e.setTime(Math.floor(e/t)*t)},function(e,r){e.setTime(+e+r*t)},function(e,r){return(r-e)/t}):sf};const dp=sf;var s8=sf.range;const ea=1e3,Fn=ea*60,ra=Fn*60,Rs=ra*24,pp=Rs*7,o8=Rs*30,gp=Rs*365;var l8=xr(function(t){t.setTime(t-t.getMilliseconds())},function(t,e){t.setTime(+t+e*ea)},function(t,e){return(e-t)/ea},function(t){return t.getUTCSeconds()});const Fa=l8;var c8=l8.range,u8=xr(function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*ea)},function(t,e){t.setTime(+t+e*Fn)},function(t,e){return(e-t)/Fn},function(t){return t.getMinutes()});const yp=u8;var Jz=u8.range,h8=xr(function(t){t.setTime(t-t.getMilliseconds()-t.getSeconds()*ea-t.getMinutes()*Fn)},function(t,e){t.setTime(+t+e*ra)},function(t,e){return(e-t)/ra},function(t){return t.getHours()});const mp=h8;var tY=h8.range,f8=xr(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*Fn)/Rs,t=>t.getDate()-1);const dc=f8;var eY=f8.range;function Is(t){return xr(function(e){e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},function(e,r){e.setDate(e.getDate()+r*7)},function(e,r){return(r-e-(r.getTimezoneOffset()-e.getTimezoneOffset())*Fn)/pp})}var Do=Is(0),pc=Is(1),d8=Is(2),p8=Is(3),Ns=Is(4),g8=Is(5),y8=Is(6),m8=Do.range,rY=pc.range,nY=d8.range,iY=p8.range,aY=Ns.range,sY=g8.range,oY=y8.range,b8=xr(function(t){t.setDate(1),t.setHours(0,0,0,0)},function(t,e){t.setMonth(t.getMonth()+e)},function(t,e){return e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12},function(t){return t.getMonth()});const bp=b8;var lY=b8.range,_p=xr(function(t){t.setMonth(0,1),t.setHours(0,0,0,0)},function(t,e){t.setFullYear(t.getFullYear()+e)},function(t,e){return e.getFullYear()-t.getFullYear()},function(t){return t.getFullYear()});_p.every=function(t){return!isFinite(t=Math.floor(t))||!(t>0)?null:xr(function(e){e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},function(e,r){e.setFullYear(e.getFullYear()+r*t)})};const Pa=_p;var cY=_p.range,_8=xr(function(t){t.setUTCSeconds(0,0)},function(t,e){t.setTime(+t+e*Fn)},function(t,e){return(e-t)/Fn},function(t){return t.getUTCMinutes()});const vp=_8;var uY=_8.range,v8=xr(function(t){t.setUTCMinutes(0,0,0)},function(t,e){t.setTime(+t+e*ra)},function(t,e){return(e-t)/ra},function(t){return t.getUTCHours()});const xp=v8;var hY=v8.range,x8=xr(function(t){t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCDate(t.getUTCDate()+e)},function(t,e){return(e-t)/Rs},function(t){return t.getUTCDate()-1});const gc=x8;var fY=x8.range;function Bs(t){return xr(function(e){e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},function(e,r){e.setUTCDate(e.getUTCDate()+r*7)},function(e,r){return(r-e)/pp})}var Oo=Bs(0),yc=Bs(1),k8=Bs(2),w8=Bs(3),Ds=Bs(4),T8=Bs(5),E8=Bs(6),C8=Oo.range,dY=yc.range,pY=k8.range,gY=w8.range,yY=Ds.range,mY=T8.range,bY=E8.range,S8=xr(function(t){t.setUTCDate(1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCMonth(t.getUTCMonth()+e)},function(t,e){return e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12},function(t){return t.getUTCMonth()});const kp=S8;var _Y=S8.range,wp=xr(function(t){t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},function(t,e){t.setUTCFullYear(t.getUTCFullYear()+e)},function(t,e){return e.getUTCFullYear()-t.getUTCFullYear()},function(t){return t.getUTCFullYear()});wp.every=function(t){return!isFinite(t=Math.floor(t))||!(t>0)?null:xr(function(e){e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},function(e,r){e.setUTCFullYear(e.getUTCFullYear()+r*t)})};const qa=wp;var vY=wp.range;function A8(t,e,r,n,i,a){const s=[[Fa,1,ea],[Fa,5,5*ea],[Fa,15,15*ea],[Fa,30,30*ea],[a,1,Fn],[a,5,5*Fn],[a,15,15*Fn],[a,30,30*Fn],[i,1,ra],[i,3,3*ra],[i,6,6*ra],[i,12,12*ra],[n,1,Rs],[n,2,2*Rs],[r,1,pp],[e,1,o8],[e,3,3*o8],[t,1,gp]];function o(u,h,d){const f=h<u;f&&([u,h]=[h,u]);const p=d&&typeof d.range=="function"?d:l(u,h,d),m=p?p.range(u,+h+1):[];return f?m.reverse():m}function l(u,h,d){const f=Math.abs(h-u)/d,p=xu(([,,y])=>y).right(s,f);if(p===s.length)return t.every(wl(u/gp,h/gp,d));if(p===0)return dp.every(Math.max(wl(u,h,d),1));const[m,_]=s[f/s[p-1][2]<s[p][2]/f?p-1:p];return m.every(_)}return[o,l]}const[M8,L8]=A8(qa,kp,Oo,gc,xp,vp),[R8,I8]=A8(Pa,bp,Do,dc,mp,yp);function Tp(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 Ep(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 mc(t,e,r){return{y:t,m:e,d:r,H:0,M:0,S:0,L:0}}function N8(t){var e=t.dateTime,r=t.date,n=t.time,i=t.periods,a=t.days,s=t.shortDays,o=t.months,l=t.shortMonths,u=bc(i),h=_c(i),d=bc(a),f=_c(a),p=bc(s),m=_c(s),_=bc(o),y=_c(o),b=bc(l),x=_c(l),k={a:X,A:ct,b:J,B:Y,c:null,d:q8,e:q8,f:UY,g:JY,G:eU,H:VY,I:zY,j:YY,L:V8,m:WY,M:HY,p:$,q:lt,Q:G8,s:j8,S:GY,u:jY,U:$Y,V:XY,w:KY,W:ZY,x:null,X:null,y:QY,Y:tU,Z:rU,"%":H8},T={a:ut,A:W,b:tt,B:K,c:null,d:Y8,e:Y8,f:sU,g:yU,G:bU,H:nU,I:iU,j:aU,L:U8,m:oU,M:lU,p:it,q:Z,Q:G8,s:j8,S:cU,u:uU,U:hU,V:fU,w:dU,W:pU,x:null,X:null,y:gU,Y:mU,Z:_U,"%":H8},C={a:L,A:v,b:B,B:w,c:D,d:F8,e:F8,f:OY,g:O8,G:D8,H:P8,I:P8,j:IY,L:DY,m:RY,M:NY,p:A,q:LY,Q:PY,s:qY,S:BY,u:EY,U:CY,V:SY,w:TY,W:AY,x:N,X:z,y:O8,Y:D8,Z:MY,"%":FY};k.x=M(r,k),k.X=M(n,k),k.c=M(e,k),T.x=M(r,T),T.X=M(n,T),T.c=M(e,T);function M(V,Q){return function(q){var U=[],F=-1,j=0,P=V.length,et,at,It;for(q instanceof Date||(q=new Date(+q));++F<P;)V.charCodeAt(F)===37&&(U.push(V.slice(j,F)),(at=B8[et=V.charAt(++F)])!=null?et=V.charAt(++F):at=et==="e"?" ":"0",(It=Q[et])&&(et=It(q,at)),U.push(et),j=F+1);return U.push(V.slice(j,F)),U.join("")}}function S(V,Q){return function(q){var U=mc(1900,void 0,1),F=R(U,V,q+="",0),j,P;if(F!=q.length)return null;if("Q"in U)return new Date(U.Q);if("s"in U)return new Date(U.s*1e3+("L"in U?U.L:0));if(Q&&!("Z"in U)&&(U.Z=0),"p"in U&&(U.H=U.H%12+U.p*12),U.m===void 0&&(U.m="q"in U?U.q:0),"V"in U){if(U.V<1||U.V>53)return null;"w"in U||(U.w=1),"Z"in U?(j=Ep(mc(U.y,0,1)),P=j.getUTCDay(),j=P>4||P===0?yc.ceil(j):yc(j),j=gc.offset(j,(U.V-1)*7),U.y=j.getUTCFullYear(),U.m=j.getUTCMonth(),U.d=j.getUTCDate()+(U.w+6)%7):(j=Tp(mc(U.y,0,1)),P=j.getDay(),j=P>4||P===0?pc.ceil(j):pc(j),j=dc.offset(j,(U.V-1)*7),U.y=j.getFullYear(),U.m=j.getMonth(),U.d=j.getDate()+(U.w+6)%7)}else("W"in U||"U"in U)&&("w"in U||(U.w="u"in U?U.u%7:"W"in U?1:0),P="Z"in U?Ep(mc(U.y,0,1)).getUTCDay():Tp(mc(U.y,0,1)).getDay(),U.m=0,U.d="W"in U?(U.w+6)%7+U.W*7-(P+5)%7:U.w+U.U*7-(P+6)%7);return"Z"in U?(U.H+=U.Z/100|0,U.M+=U.Z%100,Ep(U)):Tp(U)}}function R(V,Q,q,U){for(var F=0,j=Q.length,P=q.length,et,at;F<j;){if(U>=P)return-1;if(et=Q.charCodeAt(F++),et===37){if(et=Q.charAt(F++),at=C[et in B8?Q.charAt(F++):et],!at||(U=at(V,q,U))<0)return-1}else if(et!=q.charCodeAt(U++))return-1}return U}function A(V,Q,q){var U=u.exec(Q.slice(q));return U?(V.p=h.get(U[0].toLowerCase()),q+U[0].length):-1}function L(V,Q,q){var U=p.exec(Q.slice(q));return U?(V.w=m.get(U[0].toLowerCase()),q+U[0].length):-1}function v(V,Q,q){var U=d.exec(Q.slice(q));return U?(V.w=f.get(U[0].toLowerCase()),q+U[0].length):-1}function B(V,Q,q){var U=b.exec(Q.slice(q));return U?(V.m=x.get(U[0].toLowerCase()),q+U[0].length):-1}function w(V,Q,q){var U=_.exec(Q.slice(q));return U?(V.m=y.get(U[0].toLowerCase()),q+U[0].length):-1}function D(V,Q,q){return R(V,e,Q,q)}function N(V,Q,q){return R(V,r,Q,q)}function z(V,Q,q){return R(V,n,Q,q)}function X(V){return s[V.getDay()]}function ct(V){return a[V.getDay()]}function J(V){return l[V.getMonth()]}function Y(V){return o[V.getMonth()]}function $(V){return i[+(V.getHours()>=12)]}function lt(V){return 1+~~(V.getMonth()/3)}function ut(V){return s[V.getUTCDay()]}function W(V){return a[V.getUTCDay()]}function tt(V){return l[V.getUTCMonth()]}function K(V){return o[V.getUTCMonth()]}function it(V){return i[+(V.getUTCHours()>=12)]}function Z(V){return 1+~~(V.getUTCMonth()/3)}return{format:function(V){var Q=M(V+="",k);return Q.toString=function(){return V},Q},parse:function(V){var Q=S(V+="",!1);return Q.toString=function(){return V},Q},utcFormat:function(V){var Q=M(V+="",T);return Q.toString=function(){return V},Q},utcParse:function(V){var Q=S(V+="",!0);return Q.toString=function(){return V},Q}}}var B8={"-":"",_:" ",0:"0"},Ar=/^\s*\d+/,xY=/^%/,kY=/[\\^$*+?|[\]().{}]/g;function Oe(t,e,r){var n=t<0?"-":"",i=(n?-t:t)+"",a=i.length;return n+(a<r?new Array(r-a+1).join(e)+i:i)}function wY(t){return t.replace(kY,"\\$&")}function bc(t){return new RegExp("^(?:"+t.map(wY).join("|")+")","i")}function _c(t){return new Map(t.map((e,r)=>[e.toLowerCase(),r]))}function TY(t,e,r){var n=Ar.exec(e.slice(r,r+1));return n?(t.w=+n[0],r+n[0].length):-1}function EY(t,e,r){var n=Ar.exec(e.slice(r,r+1));return n?(t.u=+n[0],r+n[0].length):-1}function CY(t,e,r){var n=Ar.exec(e.slice(r,r+2));return n?(t.U=+n[0],r+n[0].length):-1}function SY(t,e,r){var n=Ar.exec(e.slice(r,r+2));return n?(t.V=+n[0],r+n[0].length):-1}function AY(t,e,r){var n=Ar.exec(e.slice(r,r+2));return n?(t.W=+n[0],r+n[0].length):-1}function D8(t,e,r){var n=Ar.exec(e.slice(r,r+4));return n?(t.y=+n[0],r+n[0].length):-1}function O8(t,e,r){var n=Ar.exec(e.slice(r,r+2));return n?(t.y=+n[0]+(+n[0]>68?1900:2e3),r+n[0].length):-1}function MY(t,e,r){var n=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(r,r+6));return n?(t.Z=n[1]?0:-(n[2]+(n[3]||"00")),r+n[0].length):-1}function LY(t,e,r){var n=Ar.exec(e.slice(r,r+1));return n?(t.q=n[0]*3-3,r+n[0].length):-1}function RY(t,e,r){var n=Ar.exec(e.slice(r,r+2));return n?(t.m=n[0]-1,r+n[0].length):-1}function F8(t,e,r){var n=Ar.exec(e.slice(r,r+2));return n?(t.d=+n[0],r+n[0].length):-1}function IY(t,e,r){var n=Ar.exec(e.slice(r,r+3));return n?(t.m=0,t.d=+n[0],r+n[0].length):-1}function P8(t,e,r){var n=Ar.exec(e.slice(r,r+2));return n?(t.H=+n[0],r+n[0].length):-1}function NY(t,e,r){var n=Ar.exec(e.slice(r,r+2));return n?(t.M=+n[0],r+n[0].length):-1}function BY(t,e,r){var n=Ar.exec(e.slice(r,r+2));return n?(t.S=+n[0],r+n[0].length):-1}function DY(t,e,r){var n=Ar.exec(e.slice(r,r+3));return n?(t.L=+n[0],r+n[0].length):-1}function OY(t,e,r){var n=Ar.exec(e.slice(r,r+6));return n?(t.L=Math.floor(n[0]/1e3),r+n[0].length):-1}function FY(t,e,r){var n=xY.exec(e.slice(r,r+1));return n?r+n[0].length:-1}function PY(t,e,r){var n=Ar.exec(e.slice(r));return n?(t.Q=+n[0],r+n[0].length):-1}function qY(t,e,r){var n=Ar.exec(e.slice(r));return n?(t.s=+n[0],r+n[0].length):-1}function q8(t,e){return Oe(t.getDate(),e,2)}function VY(t,e){return Oe(t.getHours(),e,2)}function zY(t,e){return Oe(t.getHours()%12||12,e,2)}function YY(t,e){return Oe(1+dc.count(Pa(t),t),e,3)}function V8(t,e){return Oe(t.getMilliseconds(),e,3)}function UY(t,e){return V8(t,e)+"000"}function WY(t,e){return Oe(t.getMonth()+1,e,2)}function HY(t,e){return Oe(t.getMinutes(),e,2)}function GY(t,e){return Oe(t.getSeconds(),e,2)}function jY(t){var e=t.getDay();return e===0?7:e}function $Y(t,e){return Oe(Do.count(Pa(t)-1,t),e,2)}function z8(t){var e=t.getDay();return e>=4||e===0?Ns(t):Ns.ceil(t)}function XY(t,e){return t=z8(t),Oe(Ns.count(Pa(t),t)+(Pa(t).getDay()===4),e,2)}function KY(t){return t.getDay()}function ZY(t,e){return Oe(pc.count(Pa(t)-1,t),e,2)}function QY(t,e){return Oe(t.getFullYear()%100,e,2)}function JY(t,e){return t=z8(t),Oe(t.getFullYear()%100,e,2)}function tU(t,e){return Oe(t.getFullYear()%1e4,e,4)}function eU(t,e){var r=t.getDay();return t=r>=4||r===0?Ns(t):Ns.ceil(t),Oe(t.getFullYear()%1e4,e,4)}function rU(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+Oe(e/60|0,"0",2)+Oe(e%60,"0",2)}function Y8(t,e){return Oe(t.getUTCDate(),e,2)}function nU(t,e){return Oe(t.getUTCHours(),e,2)}function iU(t,e){return Oe(t.getUTCHours()%12||12,e,2)}function aU(t,e){return Oe(1+gc.count(qa(t),t),e,3)}function U8(t,e){return Oe(t.getUTCMilliseconds(),e,3)}function sU(t,e){return U8(t,e)+"000"}function oU(t,e){return Oe(t.getUTCMonth()+1,e,2)}function lU(t,e){return Oe(t.getUTCMinutes(),e,2)}function cU(t,e){return Oe(t.getUTCSeconds(),e,2)}function uU(t){var e=t.getUTCDay();return e===0?7:e}function hU(t,e){return Oe(Oo.count(qa(t)-1,t),e,2)}function W8(t){var e=t.getUTCDay();return e>=4||e===0?Ds(t):Ds.ceil(t)}function fU(t,e){return t=W8(t),Oe(Ds.count(qa(t),t)+(qa(t).getUTCDay()===4),e,2)}function dU(t){return t.getUTCDay()}function pU(t,e){return Oe(yc.count(qa(t)-1,t),e,2)}function gU(t,e){return Oe(t.getUTCFullYear()%100,e,2)}function yU(t,e){return t=W8(t),Oe(t.getUTCFullYear()%100,e,2)}function mU(t,e){return Oe(t.getUTCFullYear()%1e4,e,4)}function bU(t,e){var r=t.getUTCDay();return t=r>=4||r===0?Ds(t):Ds.ceil(t),Oe(t.getUTCFullYear()%1e4,e,4)}function _U(){return"+0000"}function H8(){return"%"}function G8(t){return+t}function j8(t){return Math.floor(+t/1e3)}var Fo,vc,$8,of,Cp;X8({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]});function X8(t){return Fo=N8(t),vc=Fo.format,$8=Fo.parse,of=Fo.utcFormat,Cp=Fo.utcParse,Fo}var K8="%Y-%m-%dT%H:%M:%S.%LZ";function vU(t){return t.toISOString()}var xU=Date.prototype.toISOString?vU:of(K8);const kU=xU;function wU(t){var e=new Date(t);return isNaN(e)?null:e}var TU=+new Date("2000-01-01T00:00:00.000Z")?wU:Cp(K8);const EU=TU;function CU(t){return new Date(t)}function SU(t){return t instanceof Date?+t:+new Date(+t)}function Sp(t,e,r,n,i,a,s,o,l,u){var h=ap(),d=h.invert,f=h.domain,p=u(".%L"),m=u(":%S"),_=u("%I:%M"),y=u("%I %p"),b=u("%a %d"),x=u("%b %d"),k=u("%B"),T=u("%Y");function C(M){return(l(M)<M?p:o(M)<M?m:s(M)<M?_:a(M)<M?y:n(M)<M?i(M)<M?b:x:r(M)<M?k:T)(M)}return h.invert=function(M){return new Date(d(M))},h.domain=function(M){return arguments.length?f(Array.from(M,SU)):f().map(CU)},h.ticks=function(M){var S=f();return t(S[0],S[S.length-1],M==null?10:M)},h.tickFormat=function(M,S){return S==null?C:u(S)},h.nice=function(M){var S=f();return(!M||typeof M.range!="function")&&(M=e(S[0],S[S.length-1],M==null?10:M)),M?f(Gx(S,M)):h},h.copy=function(){return fc(h,Sp(t,e,r,n,i,a,s,o,l,u))},h}function Z8(){return On.apply(Sp(R8,I8,Pa,bp,Do,dc,mp,yp,Fa,vc).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}function AU(){return On.apply(Sp(M8,L8,qa,kp,Oo,gc,xp,vp,Fa,of).domain([Date.UTC(2e3,0,1),Date.UTC(2e3,0,2)]),arguments)}function lf(){var t=0,e=1,r,n,i,a,s=an,o=!1,l;function u(d){return d==null||isNaN(d=+d)?l:s(i===0?.5:(d=(a(d)-r)*i,o?Math.max(0,Math.min(1,d)):d))}u.domain=function(d){return arguments.length?([t,e]=d,r=a(t=+t),n=a(e=+e),i=r===n?0:1/(n-r),u):[t,e]},u.clamp=function(d){return arguments.length?(o=!!d,u):o},u.interpolator=function(d){return arguments.length?(s=d,u):s};function h(d){return function(f){var p,m;return arguments.length?([p,m]=f,s=d(p,m),u):[s(0),s(1)]}}return u.range=h(Ma),u.rangeRound=h(Gu),u.unknown=function(d){return arguments.length?(l=d,u):l},function(d){return a=d,r=d(t),n=d(e),i=r===n?0:1/(n-r),u}}function Va(t,e){return e.domain(t.domain()).interpolator(t.interpolator()).clamp(t.clamp()).unknown(t.unknown())}function Q8(){var t=Oa(lf()(an));return t.copy=function(){return Va(t,Q8())},ta.apply(t,arguments)}function J8(){var t=op(lf()).domain([1,10]);return t.copy=function(){return Va(t,J8()).base(t.base())},ta.apply(t,arguments)}function t7(){var t=lp(lf());return t.copy=function(){return Va(t,t7()).constant(t.constant())},ta.apply(t,arguments)}function Ap(){var t=cp(lf());return t.copy=function(){return Va(t,Ap()).exponent(t.exponent())},ta.apply(t,arguments)}function MU(){return Ap.apply(null,arguments).exponent(.5)}function e7(){var t=[],e=an;function r(n){if(n!=null&&!isNaN(n=+n))return e((cs(t,n,1)-1)/(t.length-1))}return r.domain=function(n){if(!arguments.length)return t.slice();t=[];for(let i of n)i!=null&&!isNaN(i=+i)&&t.push(i);return t.sort(Qe),r},r.interpolator=function(n){return arguments.length?(e=n,r):e},r.range=function(){return t.map((n,i)=>e(i/(t.length-1)))},r.quantiles=function(n){return Array.from({length:n+1},(i,a)=>Cl(t,a/n))},r.copy=function(){return e7(e).domain(t)},ta.apply(r,arguments)}function cf(){var t=0,e=.5,r=1,n=1,i,a,s,o,l,u=an,h,d=!1,f;function p(_){return isNaN(_=+_)?f:(_=.5+((_=+h(_))-a)*(n*_<n*a?o:l),u(d?Math.max(0,Math.min(1,_)):_))}p.domain=function(_){return arguments.length?([t,e,r]=_,i=h(t=+t),a=h(e=+e),s=h(r=+r),o=i===a?0:.5/(a-i),l=a===s?0:.5/(s-a),n=a<i?-1:1,p):[t,e,r]},p.clamp=function(_){return arguments.length?(d=!!_,p):d},p.interpolator=function(_){return arguments.length?(u=_,p):u};function m(_){return function(y){var b,x,k;return arguments.length?([b,x,k]=y,u=Q5(_,[b,x,k]),p):[u(0),u(.5),u(1)]}}return p.range=m(Ma),p.rangeRound=m(Gu),p.unknown=function(_){return arguments.length?(f=_,p):f},function(_){return h=_,i=_(t),a=_(e),s=_(r),o=i===a?0:.5/(a-i),l=a===s?0:.5/(s-a),n=a<i?-1:1,p}}function r7(){var t=Oa(cf()(an));return t.copy=function(){return Va(t,r7())},ta.apply(t,arguments)}function n7(){var t=op(cf()).domain([.1,1,10]);return t.copy=function(){return Va(t,n7()).base(t.base())},ta.apply(t,arguments)}function i7(){var t=lp(cf());return t.copy=function(){return Va(t,i7()).constant(t.constant())},ta.apply(t,arguments)}function Mp(){var t=cp(cf());return t.copy=function(){return Va(t,Mp()).exponent(t.exponent())},ta.apply(t,arguments)}function LU(){return Mp.apply(null,arguments).exponent(.5)}function Ee(t){for(var e=t.length/6|0,r=new Array(e),n=0;n<e;)r[n]="#"+t.slice(n*6,++n*6);return r}const RU=Ee("1f77b4ff7f0e2ca02cd627289467bd8c564be377c27f7f7fbcbd2217becf"),IU=Ee("7fc97fbeaed4fdc086ffff99386cb0f0027fbf5b17666666"),NU=Ee("1b9e77d95f027570b3e7298a66a61ee6ab02a6761d666666"),BU=Ee("a6cee31f78b4b2df8a33a02cfb9a99e31a1cfdbf6fff7f00cab2d66a3d9affff99b15928"),DU=Ee("fbb4aeb3cde3ccebc5decbe4fed9a6ffffcce5d8bdfddaecf2f2f2"),OU=Ee("b3e2cdfdcdaccbd5e8f4cae4e6f5c9fff2aef1e2cccccccc"),FU=Ee("e41a1c377eb84daf4a984ea3ff7f00ffff33a65628f781bf999999"),PU=Ee("66c2a5fc8d628da0cbe78ac3a6d854ffd92fe5c494b3b3b3"),qU=Ee("8dd3c7ffffb3bebadafb807280b1d3fdb462b3de69fccde5d9d9d9bc80bdccebc5ffed6f"),VU=Ee("4e79a7f28e2ce1575976b7b259a14fedc949af7aa1ff9da79c755fbab0ab"),We=t=>O5(t[t.length-1]);var a7=new Array(3).concat("d8b365f5f5f55ab4ac","a6611adfc27d80cdc1018571","a6611adfc27df5f5f580cdc1018571","8c510ad8b365f6e8c3c7eae55ab4ac01665e","8c510ad8b365f6e8c3f5f5f5c7eae55ab4ac01665e","8c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e","8c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e","5430058c510abf812ddfc27df6e8c3c7eae580cdc135978f01665e003c30","5430058c510abf812ddfc27df6e8c3f5f5f5c7eae580cdc135978f01665e003c30").map(Ee);const zU=We(a7);var s7=new Array(3).concat("af8dc3f7f7f77fbf7b","7b3294c2a5cfa6dba0008837","7b3294c2a5cff7f7f7a6dba0008837","762a83af8dc3e7d4e8d9f0d37fbf7b1b7837","762a83af8dc3e7d4e8f7f7f7d9f0d37fbf7b1b7837","762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b7837","762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b7837","40004b762a839970abc2a5cfe7d4e8d9f0d3a6dba05aae611b783700441b","40004b762a839970abc2a5cfe7d4e8f7f7f7d9f0d3a6dba05aae611b783700441b").map(Ee);const YU=We(s7);var o7=new Array(3).concat("e9a3c9f7f7f7a1d76a","d01c8bf1b6dab8e1864dac26","d01c8bf1b6daf7f7f7b8e1864dac26","c51b7de9a3c9fde0efe6f5d0a1d76a4d9221","c51b7de9a3c9fde0eff7f7f7e6f5d0a1d76a4d9221","c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221","c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221","8e0152c51b7dde77aef1b6dafde0efe6f5d0b8e1867fbc414d9221276419","8e0152c51b7dde77aef1b6dafde0eff7f7f7e6f5d0b8e1867fbc414d9221276419").map(Ee);const UU=We(o7);var l7=new Array(3).concat("998ec3f7f7f7f1a340","5e3c99b2abd2fdb863e66101","5e3c99b2abd2f7f7f7fdb863e66101","542788998ec3d8daebfee0b6f1a340b35806","542788998ec3d8daebf7f7f7fee0b6f1a340b35806","5427888073acb2abd2d8daebfee0b6fdb863e08214b35806","5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b35806","2d004b5427888073acb2abd2d8daebfee0b6fdb863e08214b358067f3b08","2d004b5427888073acb2abd2d8daebf7f7f7fee0b6fdb863e08214b358067f3b08").map(Ee);const WU=We(l7);var c7=new Array(3).concat("ef8a62f7f7f767a9cf","ca0020f4a58292c5de0571b0","ca0020f4a582f7f7f792c5de0571b0","b2182bef8a62fddbc7d1e5f067a9cf2166ac","b2182bef8a62fddbc7f7f7f7d1e5f067a9cf2166ac","b2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac","b2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac","67001fb2182bd6604df4a582fddbc7d1e5f092c5de4393c32166ac053061","67001fb2182bd6604df4a582fddbc7f7f7f7d1e5f092c5de4393c32166ac053061").map(Ee);const HU=We(c7);var u7=new Array(3).concat("ef8a62ffffff999999","ca0020f4a582bababa404040","ca0020f4a582ffffffbababa404040","b2182bef8a62fddbc7e0e0e09999994d4d4d","b2182bef8a62fddbc7ffffffe0e0e09999994d4d4d","b2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d","b2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d","67001fb2182bd6604df4a582fddbc7e0e0e0bababa8787874d4d4d1a1a1a","67001fb2182bd6604df4a582fddbc7ffffffe0e0e0bababa8787874d4d4d1a1a1a").map(Ee);const GU=We(u7);var h7=new Array(3).concat("fc8d59ffffbf91bfdb","d7191cfdae61abd9e92c7bb6","d7191cfdae61ffffbfabd9e92c7bb6","d73027fc8d59fee090e0f3f891bfdb4575b4","d73027fc8d59fee090ffffbfe0f3f891bfdb4575b4","d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4","d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4","a50026d73027f46d43fdae61fee090e0f3f8abd9e974add14575b4313695","a50026d73027f46d43fdae61fee090ffffbfe0f3f8abd9e974add14575b4313695").map(Ee);const jU=We(h7);var f7=new Array(3).concat("fc8d59ffffbf91cf60","d7191cfdae61a6d96a1a9641","d7191cfdae61ffffbfa6d96a1a9641","d73027fc8d59fee08bd9ef8b91cf601a9850","d73027fc8d59fee08bffffbfd9ef8b91cf601a9850","d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850","d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850","a50026d73027f46d43fdae61fee08bd9ef8ba6d96a66bd631a9850006837","a50026d73027f46d43fdae61fee08bffffbfd9ef8ba6d96a66bd631a9850006837").map(Ee);const $U=We(f7);var d7=new Array(3).concat("fc8d59ffffbf99d594","d7191cfdae61abdda42b83ba","d7191cfdae61ffffbfabdda42b83ba","d53e4ffc8d59fee08be6f59899d5943288bd","d53e4ffc8d59fee08bffffbfe6f59899d5943288bd","d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd","d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd","9e0142d53e4ff46d43fdae61fee08be6f598abdda466c2a53288bd5e4fa2","9e0142d53e4ff46d43fdae61fee08bffffbfe6f598abdda466c2a53288bd5e4fa2").map(Ee);const XU=We(d7);var p7=new Array(3).concat("e5f5f999d8c92ca25f","edf8fbb2e2e266c2a4238b45","edf8fbb2e2e266c2a42ca25f006d2c","edf8fbccece699d8c966c2a42ca25f006d2c","edf8fbccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45005824","f7fcfde5f5f9ccece699d8c966c2a441ae76238b45006d2c00441b").map(Ee);const KU=We(p7);var g7=new Array(3).concat("e0ecf49ebcda8856a7","edf8fbb3cde38c96c688419d","edf8fbb3cde38c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68856a7810f7c","edf8fbbfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d6e016b","f7fcfde0ecf4bfd3e69ebcda8c96c68c6bb188419d810f7c4d004b").map(Ee);const ZU=We(g7);var y7=new Array(3).concat("e0f3dba8ddb543a2ca","f0f9e8bae4bc7bccc42b8cbe","f0f9e8bae4bc7bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc443a2ca0868ac","f0f9e8ccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe08589e","f7fcf0e0f3dbccebc5a8ddb57bccc44eb3d32b8cbe0868ac084081").map(Ee);const QU=We(y7);var m7=new Array(3).concat("fee8c8fdbb84e34a33","fef0d9fdcc8afc8d59d7301f","fef0d9fdcc8afc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59e34a33b30000","fef0d9fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301f990000","fff7ecfee8c8fdd49efdbb84fc8d59ef6548d7301fb300007f0000").map(Ee);const JU=We(m7);var b7=new Array(3).concat("ece2f0a6bddb1c9099","f6eff7bdc9e167a9cf02818a","f6eff7bdc9e167a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf1c9099016c59","f6eff7d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016450","fff7fbece2f0d0d1e6a6bddb67a9cf3690c002818a016c59014636").map(Ee);const tW=We(b7);var _7=new Array(3).concat("ece7f2a6bddb2b8cbe","f1eef6bdc9e174a9cf0570b0","f1eef6bdc9e174a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf2b8cbe045a8d","f1eef6d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0034e7b","fff7fbece7f2d0d1e6a6bddb74a9cf3690c00570b0045a8d023858").map(Ee);const eW=We(_7);var v7=new Array(3).concat("e7e1efc994c7dd1c77","f1eef6d7b5d8df65b0ce1256","f1eef6d7b5d8df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0dd1c77980043","f1eef6d4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125691003f","f7f4f9e7e1efd4b9dac994c7df65b0e7298ace125698004367001f").map(Ee);const rW=We(v7);var x7=new Array(3).concat("fde0ddfa9fb5c51b8a","feebe2fbb4b9f768a1ae017e","feebe2fbb4b9f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1c51b8a7a0177","feebe2fcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a0177","fff7f3fde0ddfcc5c0fa9fb5f768a1dd3497ae017e7a017749006a").map(Ee);const nW=We(x7);var k7=new Array(3).concat("edf8b17fcdbb2c7fb8","ffffcca1dab441b6c4225ea8","ffffcca1dab441b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c42c7fb8253494","ffffccc7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea80c2c84","ffffd9edf8b1c7e9b47fcdbb41b6c41d91c0225ea8253494081d58").map(Ee);const iW=We(k7);var w7=new Array(3).concat("f7fcb9addd8e31a354","ffffccc2e69978c679238443","ffffccc2e69978c67931a354006837","ffffccd9f0a3addd8e78c67931a354006837","ffffccd9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443005a32","ffffe5f7fcb9d9f0a3addd8e78c67941ab5d238443006837004529").map(Ee);const aW=We(w7);var T7=new Array(3).concat("fff7bcfec44fd95f0e","ffffd4fed98efe9929cc4c02","ffffd4fed98efe9929d95f0e993404","ffffd4fee391fec44ffe9929d95f0e993404","ffffd4fee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c028c2d04","ffffe5fff7bcfee391fec44ffe9929ec7014cc4c02993404662506").map(Ee);const sW=We(T7);var E7=new Array(3).concat("ffeda0feb24cf03b20","ffffb2fecc5cfd8d3ce31a1c","ffffb2fecc5cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cf03b20bd0026","ffffb2fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cb10026","ffffccffeda0fed976feb24cfd8d3cfc4e2ae31a1cbd0026800026").map(Ee);const oW=We(E7);var C7=new Array(3).concat("deebf79ecae13182bd","eff3ffbdd7e76baed62171b5","eff3ffbdd7e76baed63182bd08519c","eff3ffc6dbef9ecae16baed63182bd08519c","eff3ffc6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b5084594","f7fbffdeebf7c6dbef9ecae16baed64292c62171b508519c08306b").map(Ee);const lW=We(C7);var S7=new Array(3).concat("e5f5e0a1d99b31a354","edf8e9bae4b374c476238b45","edf8e9bae4b374c47631a354006d2c","edf8e9c7e9c0a1d99b74c47631a354006d2c","edf8e9c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45005a32","f7fcf5e5f5e0c7e9c0a1d99b74c47641ab5d238b45006d2c00441b").map(Ee);const cW=We(S7);var A7=new Array(3).concat("f0f0f0bdbdbd636363","f7f7f7cccccc969696525252","f7f7f7cccccc969696636363252525","f7f7f7d9d9d9bdbdbd969696636363252525","f7f7f7d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525","fffffff0f0f0d9d9d9bdbdbd969696737373525252252525000000").map(Ee);const uW=We(A7);var M7=new Array(3).concat("efedf5bcbddc756bb1","f2f0f7cbc9e29e9ac86a51a3","f2f0f7cbc9e29e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8756bb154278f","f2f0f7dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a34a1486","fcfbfdefedf5dadaebbcbddc9e9ac8807dba6a51a354278f3f007d").map(Ee);const hW=We(M7);var L7=new Array(3).concat("fee0d2fc9272de2d26","fee5d9fcae91fb6a4acb181d","fee5d9fcae91fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4ade2d26a50f15","fee5d9fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181d99000d","fff5f0fee0d2fcbba1fc9272fb6a4aef3b2ccb181da50f1567000d").map(Ee);const fW=We(L7);var R7=new Array(3).concat("fee6cefdae6be6550d","feeddefdbe85fd8d3cd94701","feeddefdbe85fd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3ce6550da63603","feeddefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d948018c2d04","fff5ebfee6cefdd0a2fdae6bfd8d3cf16913d94801a636037f2704").map(Ee);const dW=We(R7);function pW(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-t*2710.57)))))))+", "+Math.max(0,Math.min(255,Math.round(32.49+t*(170.73+t*(52.82-t*(131.46-t*(176.58-t*67.37)))))))+", "+Math.max(0,Math.min(255,Math.round(81.24+t*(442.36-t*(2482.43-t*(6167.24-t*(6614.94-t*2475.67)))))))+")"}const gW=$u(Qn(300,.5,0),Qn(-240,.5,1));var yW=$u(Qn(-100,.75,.35),Qn(80,1.5,.8)),mW=$u(Qn(260,.75,.35),Qn(80,1.5,.8)),uf=Qn();function bW(t){(t<0||t>1)&&(t-=Math.floor(t));var e=Math.abs(t-.5);return uf.h=360*t-100,uf.s=1.5-1.5*e,uf.l=.8-.9*e,uf+""}var hf=po(),_W=Math.PI/3,vW=Math.PI*2/3;function xW(t){var e;return t=(.5-t)*Math.PI,hf.r=255*(e=Math.sin(t))*e,hf.g=255*(e=Math.sin(t+_W))*e,hf.b=255*(e=Math.sin(t+vW))*e,hf+""}function kW(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-t*14825.05)))))))+", "+Math.max(0,Math.min(255,Math.round(23.31+t*(557.33+t*(1225.33-t*(3574.96-t*(1073.77+t*707.56)))))))+", "+Math.max(0,Math.min(255,Math.round(27.2+t*(3211.1-t*(15327.97-t*(27814-t*(22569.18-t*6838.66)))))))+")"}function ff(t){var e=t.length;return function(r){return t[Math.max(0,Math.min(e-1,Math.floor(r*e)))]}}const wW=ff(Ee("44015444025645045745055946075a46085c460a5d460b5e470d60470e6147106347116447136548146748166848176948186a481a6c481b6d481c6e481d6f481f70482071482173482374482475482576482677482878482979472a7a472c7a472d7b472e7c472f7d46307e46327e46337f463480453581453781453882443983443a83443b84433d84433e85423f854240864241864142874144874045884046883f47883f48893e49893e4a893e4c8a3d4d8a3d4e8a3c4f8a3c508b3b518b3b528b3a538b3a548c39558c39568c38588c38598c375a8c375b8d365c8d365d8d355e8d355f8d34608d34618d33628d33638d32648e32658e31668e31678e31688e30698e306a8e2f6b8e2f6c8e2e6d8e2e6e8e2e6f8e2d708e2d718e2c718e2c728e2c738e2b748e2b758e2a768e2a778e2a788e29798e297a8e297b8e287c8e287d8e277e8e277f8e27808e26818e26828e26828e25838e25848e25858e24868e24878e23888e23898e238a8d228b8d228c8d228d8d218e8d218f8d21908d21918c20928c20928c20938c1f948c1f958b1f968b1f978b1f988b1f998a1f9a8a1e9b8a1e9c891e9d891f9e891f9f881fa0881fa1881fa1871fa28720a38620a48621a58521a68522a78522a88423a98324aa8325ab8225ac8226ad8127ad8128ae8029af7f2ab07f2cb17e2db27d2eb37c2fb47c31b57b32b67a34b67935b77937b87838b9773aba763bbb753dbc743fbc7340bd7242be7144bf7046c06f48c16e4ac16d4cc26c4ec36b50c46a52c56954c56856c66758c7655ac8645cc8635ec96260ca6063cb5f65cb5e67cc5c69cd5b6ccd5a6ece5870cf5773d05675d05477d1537ad1517cd2507fd34e81d34d84d44b86d54989d5488bd6468ed64590d74393d74195d84098d83e9bd93c9dd93ba0da39a2da37a5db36a8db34aadc32addc30b0dd2fb2dd2db5de2bb8de29bade28bddf26c0df25c2df23c5e021c8e020cae11fcde11dd0e11cd2e21bd5e21ad8e219dae319dde318dfe318e2e418e5e419e7e419eae51aece51befe51cf1e51df4e61ef6e620f8e621fbe723fde725"));var TW=ff(Ee("00000401000501010601010802010902020b02020d03030f03031204041405041606051806051a07061c08071e0907200a08220b09240c09260d0a290e0b2b100b2d110c2f120d31130d34140e36150e38160f3b180f3d19103f1a10421c10441d11471e114920114b21114e22115024125325125527125829115a2a115c2c115f2d11612f116331116533106734106936106b38106c390f6e3b0f703d0f713f0f72400f74420f75440f764510774710784910784a10794c117a4e117b4f127b51127c52137c54137d56147d57157e59157e5a167e5c167f5d177f5f187f601880621980641a80651a80671b80681c816a1c816b1d816d1d816e1e81701f81721f817320817521817621817822817922827b23827c23827e24828025828125818326818426818627818827818928818b29818c29818e2a81902a81912b81932b80942c80962c80982d80992d809b2e7f9c2e7f9e2f7fa02f7fa1307ea3307ea5317ea6317da8327daa337dab337cad347cae347bb0357bb2357bb3367ab5367ab73779b83779ba3878bc3978bd3977bf3a77c03a76c23b75c43c75c53c74c73d73c83e73ca3e72cc3f71cd4071cf4070d0416fd2426fd3436ed5446dd6456cd8456cd9466bdb476adc4869de4968df4a68e04c67e24d66e34e65e44f64e55064e75263e85362e95462ea5661eb5760ec5860ed5a5fee5b5eef5d5ef05f5ef1605df2625df2645cf3655cf4675cf4695cf56b5cf66c5cf66e5cf7705cf7725cf8745cf8765cf9785df9795df97b5dfa7d5efa7f5efa815ffb835ffb8560fb8761fc8961fc8a62fc8c63fc8e64fc9065fd9266fd9467fd9668fd9869fd9a6afd9b6bfe9d6cfe9f6dfea16efea36ffea571fea772fea973feaa74feac76feae77feb078feb27afeb47bfeb67cfeb77efeb97ffebb81febd82febf84fec185fec287fec488fec68afec88cfeca8dfecc8ffecd90fecf92fed194fed395fed597fed799fed89afdda9cfddc9efddea0fde0a1fde2a3fde3a5fde5a7fde7a9fde9aafdebacfcecaefceeb0fcf0b2fcf2b4fcf4b6fcf6b8fcf7b9fcf9bbfcfbbdfcfdbf")),EW=ff(Ee("00000401000501010601010802010a02020c02020e03021004031204031405041706041907051b08051d09061f0a07220b07240c08260d08290e092b10092d110a30120a32140b34150b37160b39180c3c190c3e1b0c411c0c431e0c451f0c48210c4a230c4c240c4f260c51280b53290b552b0b572d0b592f0a5b310a5c320a5e340a5f3609613809623909633b09643d09653e0966400a67420a68440a68450a69470b6a490b6a4a0c6b4c0c6b4d0d6c4f0d6c510e6c520e6d540f6d550f6d57106e59106e5a116e5c126e5d126e5f136e61136e62146e64156e65156e67166e69166e6a176e6c186e6d186e6f196e71196e721a6e741a6e751b6e771c6d781c6d7a1d6d7c1d6d7d1e6d7f1e6c801f6c82206c84206b85216b87216b88226a8a226a8c23698d23698f24699025689225689326679526679727669827669a28659b29649d29649f2a63a02a63a22b62a32c61a52c60a62d60a82e5fa92e5eab2f5ead305dae305cb0315bb1325ab3325ab43359b63458b73557b93556ba3655bc3754bd3853bf3952c03a51c13a50c33b4fc43c4ec63d4dc73e4cc83f4bca404acb4149cc4248ce4347cf4446d04545d24644d34743d44842d54a41d74b3fd84c3ed94d3dda4e3cdb503bdd513ade5238df5337e05536e15635e25734e35933e45a31e55c30e65d2fe75e2ee8602de9612bea632aeb6429eb6628ec6726ed6925ee6a24ef6c23ef6e21f06f20f1711ff1731df2741cf3761bf37819f47918f57b17f57d15f67e14f68013f78212f78410f8850ff8870ef8890cf98b0bf98c0af98e09fa9008fa9207fa9407fb9606fb9706fb9906fb9b06fb9d07fc9f07fca108fca309fca50afca60cfca80dfcaa0ffcac11fcae12fcb014fcb216fcb418fbb61afbb81dfbba1ffbbc21fbbe23fac026fac228fac42afac62df9c72ff9c932f9cb35f8cd37f8cf3af7d13df7d340f6d543f6d746f5d949f5db4cf4dd4ff4df53f4e156f3e35af3e55df2e661f2e865f2ea69f1ec6df1ed71f1ef75f1f179f2f27df2f482f3f586f3f68af4f88ef5f992f6fa96f8fb9af9fc9dfafda1fcffa4")),CW=ff(Ee("0d088710078813078916078a19068c1b068d1d068e20068f2206902406912605912805922a05932c05942e05952f059631059733059735049837049938049a3a049a3c049b3e049c3f049c41049d43039e44039e46039f48039f4903a04b03a14c02a14e02a25002a25102a35302a35502a45601a45801a45901a55b01a55c01a65e01a66001a66100a76300a76400a76600a76700a86900a86a00a86c00a86e00a86f00a87100a87201a87401a87501a87701a87801a87a02a87b02a87d03a87e03a88004a88104a78305a78405a78606a68707a68808a68a09a58b0aa58d0ba58e0ca48f0da4910ea3920fa39410a29511a19613a19814a099159f9a169f9c179e9d189d9e199da01a9ca11b9ba21d9aa31e9aa51f99a62098a72197a82296aa2395ab2494ac2694ad2793ae2892b02991b12a90b22b8fb32c8eb42e8db52f8cb6308bb7318ab83289ba3388bb3488bc3587bd3786be3885bf3984c03a83c13b82c23c81c33d80c43e7fc5407ec6417dc7427cc8437bc9447aca457acb4679cc4778cc4977cd4a76ce4b75cf4c74d04d73d14e72d24f71d35171d45270d5536fd5546ed6556dd7566cd8576bd9586ada5a6ada5b69db5c68dc5d67dd5e66de5f65de6164df6263e06363e16462e26561e26660e3685fe4695ee56a5de56b5de66c5ce76e5be76f5ae87059e97158e97257ea7457eb7556eb7655ec7754ed7953ed7a52ee7b51ef7c51ef7e50f07f4ff0804ef1814df1834cf2844bf3854bf3874af48849f48948f58b47f58c46f68d45f68f44f79044f79143f79342f89441f89540f9973ff9983ef99a3efa9b3dfa9c3cfa9e3bfb9f3afba139fba238fca338fca537fca636fca835fca934fdab33fdac33fdae32fdaf31fdb130fdb22ffdb42ffdb52efeb72dfeb82cfeba2cfebb2bfebd2afebe2afec029fdc229fdc328fdc527fdc627fdc827fdca26fdcb26fccd25fcce25fcd025fcd225fbd324fbd524fbd724fad824fada24f9dc24f9dd25f8df25f8e125f7e225f7e425f6e626f6e826f5e926f5eb27f4ed27f3ee27f3f027f2f227f1f426f1f525f0f724f0f921"));function xe(t){return function(){return t}}const I7=Math.abs,qr=Math.atan2,na=Math.cos,SW=Math.max,Po=Math.min,gn=Math.sin,Ge=Math.sqrt,Vr=1e-12,za=Math.PI,df=za/2,Ya=2*za;function AW(t){return t>1?0:t<-1?za:Math.acos(t)}function N7(t){return t>=1?df:t<=-1?-df:Math.asin(t)}function MW(t){return t.innerRadius}function LW(t){return t.outerRadius}function RW(t){return t.startAngle}function IW(t){return t.endAngle}function NW(t){return t&&t.padAngle}function BW(t,e,r,n,i,a,s,o){var l=r-t,u=n-e,h=s-i,d=o-a,f=d*l-h*u;if(!(f*f<Vr))return f=(h*(e-a)-d*(t-i))/f,[t+f*l,e+f*u]}function pf(t,e,r,n,i,a,s){var o=t-r,l=e-n,u=(s?a:-a)/Ge(o*o+l*l),h=u*l,d=-u*o,f=t+h,p=e+d,m=r+h,_=n+d,y=(f+m)/2,b=(p+_)/2,x=m-f,k=_-p,T=x*x+k*k,C=i-a,M=f*_-m*p,S=(k<0?-1:1)*Ge(SW(0,C*C*T-M*M)),R=(M*k-x*S)/T,A=(-M*x-k*S)/T,L=(M*k+x*S)/T,v=(-M*x+k*S)/T,B=R-y,w=A-b,D=L-y,N=v-b;return B*B+w*w>D*D+N*N&&(R=L,A=v),{cx:R,cy:A,x01:-h,y01:-d,x11:R*(i/C-1),y11:A*(i/C-1)}}function gf(){var t=MW,e=LW,r=xe(0),n=null,i=RW,a=IW,s=NW,o=null;function l(){var u,h,d=+t.apply(this,arguments),f=+e.apply(this,arguments),p=i.apply(this,arguments)-df,m=a.apply(this,arguments)-df,_=I7(m-p),y=m>p;if(o||(o=u=Ra()),f<d&&(h=f,f=d,d=h),!(f>Vr))o.moveTo(0,0);else if(_>Ya-Vr)o.moveTo(f*na(p),f*gn(p)),o.arc(0,0,f,p,m,!y),d>Vr&&(o.moveTo(d*na(m),d*gn(m)),o.arc(0,0,d,m,p,y));else{var b=p,x=m,k=p,T=m,C=_,M=_,S=s.apply(this,arguments)/2,R=S>Vr&&(n?+n.apply(this,arguments):Ge(d*d+f*f)),A=Po(I7(f-d)/2,+r.apply(this,arguments)),L=A,v=A,B,w;if(R>Vr){var D=N7(R/d*gn(S)),N=N7(R/f*gn(S));(C-=D*2)>Vr?(D*=y?1:-1,k+=D,T-=D):(C=0,k=T=(p+m)/2),(M-=N*2)>Vr?(N*=y?1:-1,b+=N,x-=N):(M=0,b=x=(p+m)/2)}var z=f*na(b),X=f*gn(b),ct=d*na(T),J=d*gn(T);if(A>Vr){var Y=f*na(x),$=f*gn(x),lt=d*na(k),ut=d*gn(k),W;if(_<za&&(W=BW(z,X,lt,ut,Y,$,ct,J))){var tt=z-W[0],K=X-W[1],it=Y-W[0],Z=$-W[1],V=1/gn(AW((tt*it+K*Z)/(Ge(tt*tt+K*K)*Ge(it*it+Z*Z)))/2),Q=Ge(W[0]*W[0]+W[1]*W[1]);L=Po(A,(d-Q)/(V-1)),v=Po(A,(f-Q)/(V+1))}}M>Vr?v>Vr?(B=pf(lt,ut,z,X,f,v,y),w=pf(Y,$,ct,J,f,v,y),o.moveTo(B.cx+B.x01,B.cy+B.y01),v<A?o.arc(B.cx,B.cy,v,qr(B.y01,B.x01),qr(w.y01,w.x01),!y):(o.arc(B.cx,B.cy,v,qr(B.y01,B.x01),qr(B.y11,B.x11),!y),o.arc(0,0,f,qr(B.cy+B.y11,B.cx+B.x11),qr(w.cy+w.y11,w.cx+w.x11),!y),o.arc(w.cx,w.cy,v,qr(w.y11,w.x11),qr(w.y01,w.x01),!y))):(o.moveTo(z,X),o.arc(0,0,f,b,x,!y)):o.moveTo(z,X),!(d>Vr)||!(C>Vr)?o.lineTo(ct,J):L>Vr?(B=pf(ct,J,Y,$,d,-L,y),w=pf(z,X,lt,ut,d,-L,y),o.lineTo(B.cx+B.x01,B.cy+B.y01),L<A?o.arc(B.cx,B.cy,L,qr(B.y01,B.x01),qr(w.y01,w.x01),!y):(o.arc(B.cx,B.cy,L,qr(B.y01,B.x01),qr(B.y11,B.x11),!y),o.arc(0,0,d,qr(B.cy+B.y11,B.cx+B.x11),qr(w.cy+w.y11,w.cx+w.x11),y),o.arc(w.cx,w.cy,L,qr(w.y11,w.x11),qr(w.y01,w.x01),!y))):o.arc(0,0,d,T,k,y)}if(o.closePath(),u)return o=null,u+""||null}return l.centroid=function(){var u=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,h=(+i.apply(this,arguments)+ +a.apply(this,arguments))/2-za/2;return[na(h)*u,gn(h)*u]},l.innerRadius=function(u){return arguments.length?(t=typeof u=="function"?u:xe(+u),l):t},l.outerRadius=function(u){return arguments.length?(e=typeof u=="function"?u:xe(+u),l):e},l.cornerRadius=function(u){return arguments.length?(r=typeof u=="function"?u:xe(+u),l):r},l.padRadius=function(u){return arguments.length?(n=u==null?null:typeof u=="function"?u:xe(+u),l):n},l.startAngle=function(u){return arguments.length?(i=typeof u=="function"?u:xe(+u),l):i},l.endAngle=function(u){return arguments.length?(a=typeof u=="function"?u:xe(+u),l):a},l.padAngle=function(u){return arguments.length?(s=typeof u=="function"?u:xe(+u),l):s},l.context=function(u){return arguments.length?(o=u==null?null:u,l):o},l}var DW=Array.prototype.slice;function yf(t){return typeof t=="object"&&"length"in t?t:Array.from(t)}function B7(t){this._context=t}B7.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e);break}}};function yn(t){return new B7(t)}function Lp(t){return t[0]}function Rp(t){return t[1]}function Ua(t,e){var r=xe(!0),n=null,i=yn,a=null;t=typeof t=="function"?t:t===void 0?Lp:xe(t),e=typeof e=="function"?e:e===void 0?Rp:xe(e);function s(o){var l,u=(o=yf(o)).length,h,d=!1,f;for(n==null&&(a=i(f=Ra())),l=0;l<=u;++l)!(l<u&&r(h=o[l],l,o))===d&&((d=!d)?a.lineStart():a.lineEnd()),d&&a.point(+t(h,l,o),+e(h,l,o));if(f)return a=null,f+""||null}return s.x=function(o){return arguments.length?(t=typeof o=="function"?o:xe(+o),s):t},s.y=function(o){return arguments.length?(e=typeof o=="function"?o:xe(+o),s):e},s.defined=function(o){return arguments.length?(r=typeof o=="function"?o:xe(!!o),s):r},s.curve=function(o){return arguments.length?(i=o,n!=null&&(a=i(n)),s):i},s.context=function(o){return arguments.length?(o==null?n=a=null:a=i(n=o),s):n},s}function D7(t,e,r){var n=null,i=xe(!0),a=null,s=yn,o=null;t=typeof t=="function"?t:t===void 0?Lp:xe(+t),e=typeof e=="function"?e:xe(e===void 0?0:+e),r=typeof r=="function"?r:r===void 0?Rp:xe(+r);function l(h){var d,f,p,m=(h=yf(h)).length,_,y=!1,b,x=new Array(m),k=new Array(m);for(a==null&&(o=s(b=Ra())),d=0;d<=m;++d){if(!(d<m&&i(_=h[d],d,h))===y)if(y=!y)f=d,o.areaStart(),o.lineStart();else{for(o.lineEnd(),o.lineStart(),p=d-1;p>=f;--p)o.point(x[p],k[p]);o.lineEnd(),o.areaEnd()}y&&(x[d]=+t(_,d,h),k[d]=+e(_,d,h),o.point(n?+n(_,d,h):x[d],r?+r(_,d,h):k[d]))}if(b)return o=null,b+""||null}function u(){return Ua().defined(i).curve(s).context(a)}return l.x=function(h){return arguments.length?(t=typeof h=="function"?h:xe(+h),n=null,l):t},l.x0=function(h){return arguments.length?(t=typeof h=="function"?h:xe(+h),l):t},l.x1=function(h){return arguments.length?(n=h==null?null:typeof h=="function"?h:xe(+h),l):n},l.y=function(h){return arguments.length?(e=typeof h=="function"?h:xe(+h),r=null,l):e},l.y0=function(h){return arguments.length?(e=typeof h=="function"?h:xe(+h),l):e},l.y1=function(h){return arguments.length?(r=h==null?null:typeof h=="function"?h:xe(+h),l):r},l.lineX0=l.lineY0=function(){return u().x(t).y(e)},l.lineY1=function(){return u().x(t).y(r)},l.lineX1=function(){return u().x(n).y(e)},l.defined=function(h){return arguments.length?(i=typeof h=="function"?h:xe(!!h),l):i},l.curve=function(h){return arguments.length?(s=h,a!=null&&(o=s(a)),l):s},l.context=function(h){return arguments.length?(h==null?a=o=null:o=s(a=h),l):a},l}function OW(t,e){return e<t?-1:e>t?1:e>=t?0:NaN}function FW(t){return t}function O7(){var t=FW,e=OW,r=null,n=xe(0),i=xe(Ya),a=xe(0);function s(o){var l,u=(o=yf(o)).length,h,d,f=0,p=new Array(u),m=new Array(u),_=+n.apply(this,arguments),y=Math.min(Ya,Math.max(-Ya,i.apply(this,arguments)-_)),b,x=Math.min(Math.abs(y)/u,a.apply(this,arguments)),k=x*(y<0?-1:1),T;for(l=0;l<u;++l)(T=m[p[l]=l]=+t(o[l],l,o))>0&&(f+=T);for(e!=null?p.sort(function(C,M){return e(m[C],m[M])}):r!=null&&p.sort(function(C,M){return r(o[C],o[M])}),l=0,d=f?(y-u*k)/f:0;l<u;++l,_=b)h=p[l],T=m[h],b=_+(T>0?T*d:0)+k,m[h]={data:o[h],index:l,value:T,startAngle:_,endAngle:b,padAngle:x};return m}return s.value=function(o){return arguments.length?(t=typeof o=="function"?o:xe(+o),s):t},s.sortValues=function(o){return arguments.length?(e=o,r=null,s):e},s.sort=function(o){return arguments.length?(r=o,e=null,s):r},s.startAngle=function(o){return arguments.length?(n=typeof o=="function"?o:xe(+o),s):n},s.endAngle=function(o){return arguments.length?(i=typeof o=="function"?o:xe(+o),s):i},s.padAngle=function(o){return arguments.length?(a=typeof o=="function"?o:xe(+o),s):a},s}var F7=Ip(yn);function P7(t){this._curve=t}P7.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))}};function Ip(t){function e(r){return new P7(t(r))}return e._curve=t,e}function xc(t){var e=t.curve;return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t.curve=function(r){return arguments.length?e(Ip(r)):e()._curve},t}function q7(){return xc(Ua().curve(F7))}function V7(){var t=D7().curve(F7),e=t.curve,r=t.lineX0,n=t.lineX1,i=t.lineY0,a=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 xc(r())},delete t.lineX0,t.lineEndAngle=function(){return xc(n())},delete t.lineX1,t.lineInnerRadius=function(){return xc(i())},delete t.lineY0,t.lineOuterRadius=function(){return xc(a())},delete t.lineY1,t.curve=function(s){return arguments.length?e(Ip(s)):e()._curve},t}function kc(t,e){return[(e=+e)*Math.cos(t-=Math.PI/2),e*Math.sin(t)]}class z7{constructor(e,r){this._context=e,this._x=r}areaStart(){this._line=0}areaEnd(){this._line=NaN}lineStart(){this._point=0}lineEnd(){(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line}point(e,r){switch(e=+e,r=+r,this._point){case 0:{this._point=1,this._line?this._context.lineTo(e,r):this._context.moveTo(e,r);break}case 1:this._point=2;default:{this._x?this._context.bezierCurveTo(this._x0=(this._x0+e)/2,this._y0,this._x0,r,e,r):this._context.bezierCurveTo(this._x0,this._y0=(this._y0+r)/2,e,this._y0,e,r);break}}this._x0=e,this._y0=r}}class PW{constructor(e){this._context=e}lineStart(){this._point=0}lineEnd(){}point(e,r){if(e=+e,r=+r,this._point++===0)this._x0=e,this._y0=r;else{const n=kc(this._x0,this._y0),i=kc(this._x0,this._y0=(this._y0+r)/2),a=kc(e,this._y0),s=kc(e,r);this._context.moveTo(...n),this._context.bezierCurveTo(...i,...a,...s)}}}function Y7(t){return new z7(t,!0)}function U7(t){return new z7(t,!1)}function qW(t){return new PW(t)}function VW(t){return t.source}function zW(t){return t.target}function mf(t){let e=VW,r=zW,n=Lp,i=Rp,a=null,s=null;function o(){let l;const u=DW.call(arguments),h=e.apply(this,u),d=r.apply(this,u);if(a==null&&(s=t(l=Ra())),s.lineStart(),u[0]=h,s.point(+n.apply(this,u),+i.apply(this,u)),u[0]=d,s.point(+n.apply(this,u),+i.apply(this,u)),s.lineEnd(),l)return s=null,l+""||null}return o.source=function(l){return arguments.length?(e=l,o):e},o.target=function(l){return arguments.length?(r=l,o):r},o.x=function(l){return arguments.length?(n=typeof l=="function"?l:xe(+l),o):n},o.y=function(l){return arguments.length?(i=typeof l=="function"?l:xe(+l),o):i},o.context=function(l){return arguments.length?(l==null?a=s=null:s=t(a=l),o):a},o}function YW(){return mf(Y7)}function UW(){return mf(U7)}function WW(){const t=mf(qW);return t.angle=t.x,delete t.x,t.radius=t.y,delete t.y,t}const HW=Ge(3),W7={draw(t,e){const r=Ge(e+Po(e/28,.75))*.59436,n=r/2,i=n*HW;t.moveTo(0,r),t.lineTo(0,-r),t.moveTo(-i,-n),t.lineTo(i,n),t.moveTo(-i,n),t.lineTo(i,-n)}},bf={draw(t,e){const r=Ge(e/za);t.moveTo(r,0),t.arc(0,0,r,0,Ya)}},H7={draw(t,e){const r=Ge(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()}},G7=Ge(1/3),GW=G7*2,j7={draw(t,e){const r=Ge(e/GW),n=r*G7;t.moveTo(0,-r),t.lineTo(n,0),t.lineTo(0,r),t.lineTo(-n,0),t.closePath()}},$7={draw(t,e){const r=Ge(e)*.62625;t.moveTo(0,-r),t.lineTo(r,0),t.lineTo(0,r),t.lineTo(-r,0),t.closePath()}},X7={draw(t,e){const r=Ge(e-Po(e/7,2))*.87559;t.moveTo(-r,0),t.lineTo(r,0),t.moveTo(0,r),t.lineTo(0,-r)}},K7={draw(t,e){const r=Ge(e),n=-r/2;t.rect(n,n,r,r)}},Z7={draw(t,e){const r=Ge(e)*.4431;t.moveTo(r,r),t.lineTo(r,-r),t.lineTo(-r,-r),t.lineTo(-r,r),t.closePath()}},jW=.8908130915292852,Q7=gn(za/10)/gn(7*za/10),$W=gn(Ya/10)*Q7,XW=-na(Ya/10)*Q7,J7={draw(t,e){const r=Ge(e*jW),n=$W*r,i=XW*r;t.moveTo(0,-r),t.lineTo(n,i);for(let a=1;a<5;++a){const s=Ya*a/5,o=na(s),l=gn(s);t.lineTo(l*r,-o*r),t.lineTo(o*n-l*i,l*n+o*i)}t.closePath()}},Np=Ge(3),tk={draw(t,e){const r=-Ge(e/(Np*3));t.moveTo(0,r*2),t.lineTo(-Np*r,-r),t.lineTo(Np*r,-r),t.closePath()}},KW=Ge(3),ek={draw(t,e){const r=Ge(e)*.6824,n=r/2,i=r*KW/2;t.moveTo(0,-r),t.lineTo(i,n),t.lineTo(-i,n),t.closePath()}},Pn=-.5,qn=Ge(3)/2,Bp=1/Ge(12),ZW=(Bp/2+1)*3,rk={draw(t,e){const r=Ge(e/ZW),n=r/2,i=r*Bp,a=n,s=r*Bp+r,o=-a,l=s;t.moveTo(n,i),t.lineTo(a,s),t.lineTo(o,l),t.lineTo(Pn*n-qn*i,qn*n+Pn*i),t.lineTo(Pn*a-qn*s,qn*a+Pn*s),t.lineTo(Pn*o-qn*l,qn*o+Pn*l),t.lineTo(Pn*n+qn*i,Pn*i-qn*n),t.lineTo(Pn*a+qn*s,Pn*s-qn*a),t.lineTo(Pn*o+qn*l,Pn*l-qn*o),t.closePath()}},nk={draw(t,e){const r=Ge(e-Po(e/6,1.7))*.6189;t.moveTo(-r,-r),t.lineTo(r,r),t.moveTo(-r,r),t.lineTo(r,-r)}},ik=[bf,H7,j7,K7,J7,tk,rk],QW=[bf,X7,nk,ek,W7,Z7,$7];function JW(t,e){let r=null;t=typeof t=="function"?t:xe(t||bf),e=typeof e=="function"?e:xe(e===void 0?64:+e);function n(){let i;if(r||(r=i=Ra()),t.apply(this,arguments).draw(r,+e.apply(this,arguments)),i)return r=null,i+""||null}return n.type=function(i){return arguments.length?(t=typeof i=="function"?i:xe(i),n):t},n.size=function(i){return arguments.length?(e=typeof i=="function"?i:xe(+i),n):e},n.context=function(i){return arguments.length?(r=i==null?null:i,n):r},n}function Wa(){}function _f(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 vf(t){this._context=t}vf.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:_f(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:_f(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function Os(t){return new vf(t)}function ak(t){this._context=t}ak.prototype={areaStart:Wa,areaEnd:Wa,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:{this._context.moveTo(this._x2,this._y2),this._context.closePath();break}case 2:{this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break}case 3:{this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4);break}}},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:_f(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function sk(t){return new ak(t)}function ok(t){this._context=t}ok.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var r=(this._x0+4*this._x1+t)/6,n=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(r,n):this._context.moveTo(r,n);break;case 3:this._point=4;default:_f(this,t,e);break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}};function lk(t){return new ok(t)}function ck(t,e){this._basis=new vf(t),this._beta=e}ck.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 n=t[0],i=e[0],a=t[r]-n,s=e[r]-i,o=-1,l;++o<=r;)l=o/r,this._basis.point(this._beta*t[o]+(1-this._beta)*(n+l*a),this._beta*e[o]+(1-this._beta)*(i+l*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};const tH=function t(e){function r(n){return e===1?new vf(n):new ck(n,e)}return r.beta=function(n){return t(+n)},r}(.85);function xf(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 Dp(t,e){this._context=t,this._k=(1-e)/6}Dp.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:xf(this,this._x1,this._y1);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:xf(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const eH=function t(e){function r(n){return new Dp(n,e)}return r.tension=function(n){return t(+n)},r}(0);function Op(t,e){this._context=t,this._k=(1-e)/6}Op.prototype={areaStart:Wa,areaEnd:Wa,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);break}}},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:xf(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const rH=function t(e){function r(n){return new Op(n,e)}return r.tension=function(n){return t(+n)},r}(0);function Fp(t,e){this._context=t,this._k=(1-e)/6}Fp.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||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:xf(this,t,e);break}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const nH=function t(e){function r(n){return new Fp(n,e)}return r.tension=function(n){return t(+n)},r}(0);function Pp(t,e,r){var n=t._x1,i=t._y1,a=t._x2,s=t._y2;if(t._l01_a>Vr){var o=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);n=(n*o-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,i=(i*o-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>Vr){var u=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,h=3*t._l23_a*(t._l23_a+t._l12_a);a=(a*u+t._x1*t._l23_2a-e*t._l12_2a)/h,s=(s*u+t._y1*t._l23_2a-r*t._l12_2a)/h}t._context.bezierCurveTo(n,i,a,s,t._x2,t._y2)}function uk(t,e){this._context=t,this._alpha=e}uk.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);break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:Pp(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const iH=function t(e){function r(n){return e?new uk(n,e):new Dp(n,0)}return r.alpha=function(n){return t(+n)},r}(.5);function hk(t,e){this._context=t,this._alpha=e}hk.prototype={areaStart:Wa,areaEnd:Wa,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);break}}},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:Pp(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const aH=function t(e){function r(n){return e?new hk(n,e):new Op(n,0)}return r.alpha=function(n){return t(+n)},r}(.5);function fk(t,e){this._context=t,this._alpha=e}fk.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||this._line!==0&&this._point===3)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t=+t,e=+e,this._point){var r=this._x2-t,n=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(r*r+n*n,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:Pp(this,t,e);break}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};const sH=function t(e){function r(n){return e?new fk(n,e):new Fp(n,0)}return r.alpha=function(n){return t(+n)},r}(.5);function dk(t){this._context=t}dk.prototype={areaStart:Wa,areaEnd:Wa,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t=+t,e=+e,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};function pk(t){return new dk(t)}function gk(t){return t<0?-1:1}function yk(t,e,r){var n=t._x1-t._x0,i=e-t._x1,a=(t._y1-t._y0)/(n||i<0&&-0),s=(r-t._y1)/(i||n<0&&-0),o=(a*i+s*n)/(n+i);return(gk(a)+gk(s))*Math.min(Math.abs(a),Math.abs(s),.5*Math.abs(o))||0}function mk(t,e){var r=t._x1-t._x0;return r?(3*(t._y1-t._y0)/r-e)/2:e}function qp(t,e,r){var n=t._x0,i=t._y0,a=t._x1,s=t._y1,o=(a-n)/3;t._context.bezierCurveTo(n+o,i+o*e,a-o,s-o*r,a,s)}function kf(t){this._context=t}kf.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:qp(this,this._t0,mk(this,this._t0));break}(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var r=NaN;if(t=+t,e=+e,!(t===this._x1&&e===this._y1)){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,qp(this,mk(this,r=yk(this,t,e)),r);break;default:qp(this,this._t0,r=yk(this,t,e));break}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=r}}};function bk(t){this._context=new _k(t)}(bk.prototype=Object.create(kf.prototype)).point=function(t,e){kf.prototype.point.call(this,e,t)};function _k(t){this._context=t}_k.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,n,i,a){this._context.bezierCurveTo(e,t,n,r,a,i)}};function vk(t){return new kf(t)}function xk(t){return new bk(t)}function kk(t){this._context=t}kk.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,r=t.length;if(r)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),r===2)this._context.lineTo(t[1],e[1]);else for(var n=wk(t),i=wk(e),a=0,s=1;s<r;++a,++s)this._context.bezierCurveTo(n[0][a],i[0][a],n[1][a],i[1][a],t[s],e[s]);(this._line||this._line!==0&&r===1)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}};function wk(t){var e,r=t.length-1,n,i=new Array(r),a=new Array(r),s=new Array(r);for(i[0]=0,a[0]=2,s[0]=t[0]+2*t[1],e=1;e<r-1;++e)i[e]=1,a[e]=4,s[e]=4*t[e]+2*t[e+1];for(i[r-1]=2,a[r-1]=7,s[r-1]=8*t[r-1]+t[r],e=1;e<r;++e)n=i[e]/a[e-1],a[e]-=n,s[e]-=n*s[e-1];for(i[r-1]=s[r-1]/a[r-1],e=r-2;e>=0;--e)i[e]=(s[e]-i[e+1])/a[e];for(a[r-1]=(t[r]+i[r-1])/2,e=0;e<r-1;++e)a[e]=2*t[e+1]-i[e+1];return[i,a]}function Tk(t){return new kk(t)}function wf(t,e){this._context=t,this._t=e}wf.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&this._point===2&&this._context.lineTo(this._x,this._y),(this._line||this._line!==0&&this._point===1)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t=+t,e=+e,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:{if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var r=this._x*(1-this._t)+t*this._t;this._context.lineTo(r,this._y),this._context.lineTo(r,e)}break}}this._x=t,this._y=e}};function Ek(t){return new wf(t,.5)}function Ck(t){return new wf(t,0)}function Sk(t){return new wf(t,1)}function qo(t,e){if((s=t.length)>1)for(var r=1,n,i,a=t[e[0]],s,o=a.length;r<s;++r)for(i=a,a=t[e[r]],n=0;n<o;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function Vo(t){for(var e=t.length,r=new Array(e);--e>=0;)r[e]=e;return r}function oH(t,e){return t[e]}function lH(t){const e=[];return e.key=t,e}function cH(){var t=xe([]),e=Vo,r=qo,n=oH;function i(a){var s=Array.from(t.apply(this,arguments),lH),o,l=s.length,u=-1,h;for(const d of a)for(o=0,++u;o<l;++o)(s[o][u]=[0,+n(d,s[o].key,u,a)]).data=d;for(o=0,h=yf(e(s));o<l;++o)s[h[o]].index=o;return r(s,h),s}return i.keys=function(a){return arguments.length?(t=typeof a=="function"?a:xe(Array.from(a)),i):t},i.value=function(a){return arguments.length?(n=typeof a=="function"?a:xe(+a),i):n},i.order=function(a){return arguments.length?(e=a==null?Vo:typeof a=="function"?a:xe(Array.from(a)),i):e},i.offset=function(a){return arguments.length?(r=a==null?qo:a,i):r},i}function uH(t,e){if((n=t.length)>0){for(var r,n,i=0,a=t[0].length,s;i<a;++i){for(s=r=0;r<n;++r)s+=t[r][i][1]||0;if(s)for(r=0;r<n;++r)t[r][i][1]/=s}qo(t,e)}}function hH(t,e){if((l=t.length)>0)for(var r,n=0,i,a,s,o,l,u=t[e[0]].length;n<u;++n)for(s=o=0,r=0;r<l;++r)(a=(i=t[e[r]][n])[1]-i[0])>0?(i[0]=s,i[1]=s+=a):a<0?(i[1]=o,i[0]=o+=a):(i[0]=0,i[1]=a)}function fH(t,e){if((i=t.length)>0){for(var r=0,n=t[e[0]],i,a=n.length;r<a;++r){for(var s=0,o=0;s<i;++s)o+=t[s][r][1]||0;n[r][1]+=n[r][0]=-o/2}qo(t,e)}}function dH(t,e){if(!(!((s=t.length)>0)||!((a=(i=t[e[0]]).length)>0))){for(var r=0,n=1,i,a,s;n<a;++n){for(var o=0,l=0,u=0;o<s;++o){for(var h=t[e[o]],d=h[n][1]||0,f=h[n-1][1]||0,p=(d-f)/2,m=0;m<o;++m){var _=t[e[m]],y=_[n][1]||0,b=_[n-1][1]||0;p+=y-b}l+=d,u+=p*d}i[n-1][1]+=i[n-1][0]=r,l&&(r-=u/l)}i[n-1][1]+=i[n-1][0]=r,qo(t,e)}}function Ak(t){var e=t.map(pH);return Vo(t).sort(function(r,n){return e[r]-e[n]})}function pH(t){for(var e=-1,r=0,n=t.length,i,a=-1/0;++e<n;)(i=+t[e][1])>a&&(a=i,r=e);return r}function Mk(t){var e=t.map(Lk);return Vo(t).sort(function(r,n){return e[r]-e[n]})}function Lk(t){for(var e=0,r=-1,n=t.length,i;++r<n;)(i=+t[r][1])&&(e+=i);return e}function gH(t){return Mk(t).reverse()}function yH(t){var e=t.length,r,n,i=t.map(Lk),a=Ak(t),s=0,o=0,l=[],u=[];for(r=0;r<e;++r)n=a[r],s<o?(s+=i[n],l.push(n)):(o+=i[n],u.push(n));return u.reverse().concat(l)}function mH(t){return Vo(t).reverse()}const Tf=t=>()=>t;function bH(t,{sourceEvent:e,target:r,transform:n,dispatch:i}){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:n,enumerable:!0,configurable:!0},_:{value:i}})}function Ri(t,e,r){this.k=t,this.x=e,this.y=r}Ri.prototype={constructor:Ri,scale:function(t){return t===1?this:new Ri(this.k*t,this.x,this.y)},translate:function(t,e){return t===0&e===0?this:new Ri(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 Ef=new Ri(1,0,0);Rk.prototype=Ri.prototype;function Rk(t){for(;!t.__zoom;)if(!(t=t.parentNode))return Ef;return t.__zoom}function Vp(t){t.stopImmediatePropagation()}function wc(t){t.preventDefault(),t.stopImmediatePropagation()}function _H(t){return(!t.ctrlKey||t.type==="wheel")&&!t.button}function vH(){var t=this;return t instanceof SVGElement?(t=t.ownerSVGElement||t,t.hasAttribute("viewBox")?(t=t.viewBox.baseVal,[[t.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 Ik(){return this.__zoom||Ef}function xH(t){return-t.deltaY*(t.deltaMode===1?.05:t.deltaMode?1:.002)*(t.ctrlKey?10:1)}function kH(){return navigator.maxTouchPoints||"ontouchstart"in this}function wH(t,e,r){var n=t.invertX(e[0][0])-r[0][0],i=t.invertX(e[1][0])-r[1][0],a=t.invertY(e[0][1])-r[0][1],s=t.invertY(e[1][1])-r[1][1];return t.translate(i>n?(n+i)/2:Math.min(0,n)||Math.max(0,i),s>a?(a+s)/2:Math.min(0,a)||Math.max(0,s))}function TH(){var t=_H,e=vH,r=wH,n=xH,i=kH,a=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],o=250,l=j5,u=fs("start","zoom","end"),h,d,f,p=500,m=150,_=0,y=10;function b(D){D.property("__zoom",Ik).on("wheel.zoom",R,{passive:!1}).on("mousedown.zoom",A).on("dblclick.zoom",L).filter(i).on("touchstart.zoom",v).on("touchmove.zoom",B).on("touchend.zoom touchcancel.zoom",w).style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}b.transform=function(D,N,z,X){var ct=D.selection?D.selection():D;ct.property("__zoom",Ik),D!==ct?C(D,N,z,X):ct.interrupt().each(function(){M(this,arguments).event(X).start().zoom(null,typeof N=="function"?N.apply(this,arguments):N).end()})},b.scaleBy=function(D,N,z,X){b.scaleTo(D,function(){var ct=this.__zoom.k,J=typeof N=="function"?N.apply(this,arguments):N;return ct*J},z,X)},b.scaleTo=function(D,N,z,X){b.transform(D,function(){var ct=e.apply(this,arguments),J=this.__zoom,Y=z==null?T(ct):typeof z=="function"?z.apply(this,arguments):z,$=J.invert(Y),lt=typeof N=="function"?N.apply(this,arguments):N;return r(k(x(J,lt),Y,$),ct,s)},z,X)},b.translateBy=function(D,N,z,X){b.transform(D,function(){return r(this.__zoom.translate(typeof N=="function"?N.apply(this,arguments):N,typeof z=="function"?z.apply(this,arguments):z),e.apply(this,arguments),s)},null,X)},b.translateTo=function(D,N,z,X,ct){b.transform(D,function(){var J=e.apply(this,arguments),Y=this.__zoom,$=X==null?T(J):typeof X=="function"?X.apply(this,arguments):X;return r(Ef.translate($[0],$[1]).scale(Y.k).translate(typeof N=="function"?-N.apply(this,arguments):-N,typeof z=="function"?-z.apply(this,arguments):-z),J,s)},X,ct)};function x(D,N){return N=Math.max(a[0],Math.min(a[1],N)),N===D.k?D:new Ri(N,D.x,D.y)}function k(D,N,z){var X=N[0]-z[0]*D.k,ct=N[1]-z[1]*D.k;return X===D.x&&ct===D.y?D:new Ri(D.k,X,ct)}function T(D){return[(+D[0][0]+ +D[1][0])/2,(+D[0][1]+ +D[1][1])/2]}function C(D,N,z,X){D.on("start.zoom",function(){M(this,arguments).event(X).start()}).on("interrupt.zoom end.zoom",function(){M(this,arguments).event(X).end()}).tween("zoom",function(){var ct=this,J=arguments,Y=M(ct,J).event(X),$=e.apply(ct,J),lt=z==null?T($):typeof z=="function"?z.apply(ct,J):z,ut=Math.max($[1][0]-$[0][0],$[1][1]-$[0][1]),W=ct.__zoom,tt=typeof N=="function"?N.apply(ct,J):N,K=l(W.invert(lt).concat(ut/W.k),tt.invert(lt).concat(ut/tt.k));return function(it){if(it===1)it=tt;else{var Z=K(it),V=ut/Z[2];it=new Ri(V,lt[0]-Z[0]*V,lt[1]-Z[1]*V)}Y.zoom(null,it)}})}function M(D,N,z){return!z&&D.__zooming||new S(D,N)}function S(D,N){this.that=D,this.args=N,this.active=0,this.sourceEvent=null,this.extent=e.apply(D,N),this.taps=0}S.prototype={event:function(D){return D&&(this.sourceEvent=D),this},start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(D,N){return this.mouse&&D!=="mouse"&&(this.mouse[1]=N.invert(this.mouse[0])),this.touch0&&D!=="touch"&&(this.touch0[1]=N.invert(this.touch0[0])),this.touch1&&D!=="touch"&&(this.touch1[1]=N.invert(this.touch1[0])),this.that.__zoom=N,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(D){var N=St(this.that).datum();u.call(D,this.that,new bH(D,{sourceEvent:this.sourceEvent,target:b,type:D,transform:this.that.__zoom,dispatch:u}),N)}};function R(D,...N){if(!t.apply(this,arguments))return;var z=M(this,N).event(D),X=this.__zoom,ct=Math.max(a[0],Math.min(a[1],X.k*Math.pow(2,n.apply(this,arguments)))),J=Tn(D);if(z.wheel)(z.mouse[0][0]!==J[0]||z.mouse[0][1]!==J[1])&&(z.mouse[1]=X.invert(z.mouse[0]=J)),clearTimeout(z.wheel);else{if(X.k===ct)return;z.mouse=[J,X.invert(J)],vs(this),z.start()}wc(D),z.wheel=setTimeout(Y,m),z.zoom("mouse",r(k(x(X,ct),z.mouse[0],z.mouse[1]),z.extent,s));function Y(){z.wheel=null,z.end()}}function A(D,...N){if(f||!t.apply(this,arguments))return;var z=D.currentTarget,X=M(this,N,!0).event(D),ct=St(D.view).on("mousemove.zoom",lt,!0).on("mouseup.zoom",ut,!0),J=Tn(D,z),Y=D.clientX,$=D.clientY;Nu(D.view),Vp(D),X.mouse=[J,this.__zoom.invert(J)],vs(this),X.start();function lt(W){if(wc(W),!X.moved){var tt=W.clientX-Y,K=W.clientY-$;X.moved=tt*tt+K*K>_}X.event(W).zoom("mouse",r(k(X.that.__zoom,X.mouse[0]=Tn(W,z),X.mouse[1]),X.extent,s))}function ut(W){ct.on("mousemove.zoom mouseup.zoom",null),Bu(W.view,X.moved),wc(W),X.event(W).end()}}function L(D,...N){if(!!t.apply(this,arguments)){var z=this.__zoom,X=Tn(D.changedTouches?D.changedTouches[0]:D,this),ct=z.invert(X),J=z.k*(D.shiftKey?.5:2),Y=r(k(x(z,J),X,ct),e.apply(this,N),s);wc(D),o>0?St(this).transition().duration(o).call(C,Y,X,D):St(this).call(b.transform,Y,X,D)}}function v(D,...N){if(!!t.apply(this,arguments)){var z=D.touches,X=z.length,ct=M(this,N,D.changedTouches.length===X).event(D),J,Y,$,lt;for(Vp(D),Y=0;Y<X;++Y)$=z[Y],lt=Tn($,this),lt=[lt,this.__zoom.invert(lt),$.identifier],ct.touch0?!ct.touch1&&ct.touch0[2]!==lt[2]&&(ct.touch1=lt,ct.taps=0):(ct.touch0=lt,J=!0,ct.taps=1+!!h);h&&(h=clearTimeout(h)),J&&(ct.taps<2&&(d=lt[0],h=setTimeout(function(){h=null},p)),vs(this),ct.start())}}function B(D,...N){if(!!this.__zooming){var z=M(this,N).event(D),X=D.changedTouches,ct=X.length,J,Y,$,lt;for(wc(D),J=0;J<ct;++J)Y=X[J],$=Tn(Y,this),z.touch0&&z.touch0[2]===Y.identifier?z.touch0[0]=$:z.touch1&&z.touch1[2]===Y.identifier&&(z.touch1[0]=$);if(Y=z.that.__zoom,z.touch1){var ut=z.touch0[0],W=z.touch0[1],tt=z.touch1[0],K=z.touch1[1],it=(it=tt[0]-ut[0])*it+(it=tt[1]-ut[1])*it,Z=(Z=K[0]-W[0])*Z+(Z=K[1]-W[1])*Z;Y=x(Y,Math.sqrt(it/Z)),$=[(ut[0]+tt[0])/2,(ut[1]+tt[1])/2],lt=[(W[0]+K[0])/2,(W[1]+K[1])/2]}else if(z.touch0)$=z.touch0[0],lt=z.touch0[1];else return;z.zoom("touch",r(k(Y,$,lt),z.extent,s))}}function w(D,...N){if(!!this.__zooming){var z=M(this,N).event(D),X=D.changedTouches,ct=X.length,J,Y;for(Vp(D),f&&clearTimeout(f),f=setTimeout(function(){f=null},p),J=0;J<ct;++J)Y=X[J],z.touch0&&z.touch0[2]===Y.identifier?delete z.touch0:z.touch1&&z.touch1[2]===Y.identifier&&delete z.touch1;if(z.touch1&&!z.touch0&&(z.touch0=z.touch1,delete z.touch1),z.touch0)z.touch0[1]=this.__zoom.invert(z.touch0[0]);else if(z.end(),z.taps===2&&(Y=Tn(Y,this),Math.hypot(d[0]-Y[0],d[1]-Y[1])<y)){var $=St(this).on("dblclick.zoom");$&&$.apply(this,arguments)}}}return b.wheelDelta=function(D){return arguments.length?(n=typeof D=="function"?D:Tf(+D),b):n},b.filter=function(D){return arguments.length?(t=typeof D=="function"?D:Tf(!!D),b):t},b.touchable=function(D){return arguments.length?(i=typeof D=="function"?D:Tf(!!D),b):i},b.extent=function(D){return arguments.length?(e=typeof D=="function"?D:Tf([[+D[0][0],+D[0][1]],[+D[1][0],+D[1][1]]]),b):e},b.scaleExtent=function(D){return arguments.length?(a[0]=+D[0],a[1]=+D[1],b):[a[0],a[1]]},b.translateExtent=function(D){return arguments.length?(s[0][0]=+D[0][0],s[1][0]=+D[1][0],s[0][1]=+D[0][1],s[1][1]=+D[1][1],b):[[s[0][0],s[0][1]],[s[1][0],s[1][1]]]},b.constrain=function(D){return arguments.length?(r=D,b):r},b.duration=function(D){return arguments.length?(o=+D,b):o},b.interpolate=function(D){return arguments.length?(l=D,b):l},b.on=function(){var D=u.on.apply(u,arguments);return D===u?b:D},b.clickDistance=function(D){return arguments.length?(_=(D=+D)*D,b):Math.sqrt(_)},b.tapDistance=function(D){return arguments.length?(y=+D,b):y},b}const EH=Object.freeze(Object.defineProperty({__proto__:null,bisect:cs,bisectRight:w_,bisectLeft:CR,bisectCenter:SR,ascending:Qe,bisector:xu,blur:AR,blur2:T_,blurImage:MR,count:ku,cross:OR,cumsum:FR,descending:__,deviation:S_,extent:xl,Adder:_r,fsum:PR,fcumsum:qR,group:R_,flatGroup:VR,flatRollup:zR,groups:I_,index:YR,indexes:UR,rollup:B_,rollups:D_,groupSort:WR,bin:q_,histogram:q_,thresholdFreedmanDiaconis:jR,thresholdScott:$R,thresholdSturges:W0,max:lo,maxIndex:H0,mean:XR,median:KR,medianIndex:ZR,merge:j0,min:Tl,minIndex:G0,mode:JR,nice:P_,pairs:tI,permute:F_,quantile:Cl,quantileIndex:Y_,quantileSorted:z_,quickselect:Tu,range:Ca,rank:rI,least:nI,leastIndex:U_,greatest:V_,greatestIndex:iI,scan:aI,shuffle:sI,shuffler:W_,sum:oI,ticks:hs,tickIncrement:oo,tickStep:wl,transpose:H_,variance:C_,zip:cI,every:uI,some:hI,filter:fI,map:dI,reduce:pI,reverse:gI,sort:q0,difference:yI,disjoint:mI,intersection:bI,subset:vI,superset:G_,union:xI,InternMap:kl,InternSet:us,axisTop:X_,axisRight:AI,axisBottom:K_,axisLeft:MI,brush:XO,brushX:jO,brushY:$O,brushSelection:GO,chord:ZO,chordTranspose:QO,chordDirected:JO,ribbon:lF,ribbonArrow:cF,color:Aa,rgb:po,hsl:Pu,lab:zu,hcl:Yu,lch:RB,gray:LB,cubehelix:Qn,contours:Ud,contourDensity:kF,Delaunay:jd,Voronoi:Dv,dispatch:fs,drag:bB,dragDisable:Nu,dragEnable:Bu,dsvFormat:ch,csvParse:qv,csvParseRows:HF,csvFormat:GF,csvFormatBody:jF,csvFormatRows:$F,csvFormatRow:XF,csvFormatValue:KF,tsvParse:Vv,tsvParseRows:ZF,tsvFormat:QF,tsvFormatBody:JF,tsvFormatRows:tP,tsvFormatRow:eP,tsvFormatValue:rP,autoType:nP,easeLinear:aO,easeQuad:cv,easeQuadIn:sO,easeQuadOut:oO,easeQuadInOut:cv,easeCubic:Ed,easeCubicIn:lO,easeCubicOut:cO,easeCubicInOut:Ed,easePoly:uv,easePolyIn:uO,easePolyOut:hO,easePolyInOut:uv,easeSin:dv,easeSinIn:fO,easeSinOut:dO,easeSinInOut:dv,easeExp:pv,easeExpIn:pO,easeExpOut:gO,easeExpInOut:pv,easeCircle:gv,easeCircleIn:yO,easeCircleOut:mO,easeCircleInOut:gv,easeBounce:Vl,easeBounceIn:CO,easeBounceOut:Vl,easeBounceInOut:SO,easeBack:yv,easeBackIn:AO,easeBackOut:MO,easeBackInOut:yv,easeElastic:mv,easeElasticIn:LO,easeElasticOut:mv,easeElasticInOut:RO,blob:sP,buffer:lP,dsv:uP,csv:hP,tsv:fP,image:dP,json:gP,text:uh,xml:yP,html:mP,svg:bP,forceCenter:_P,forceCollide:PP,forceLink:VP,forceManyBody:XP,forceRadial:KP,forceSimulation:$P,forceX:ZP,forceY:QP,formatDefaultLocale:Jv,get format(){return gh},get formatPrefix(){return Jd},formatLocale:Qv,formatSpecifier:Co,FormatSpecifier:dh,precisionFixed:t6,precisionPrefix:e6,precisionRound:r6,geoArea:lq,geoBounds:fq,geoCentroid:bq,geoCircle:_q,geoClipAntimeridian:m2,geoClipCircle:D6,geoClipExtent:Cq,geoClipRectangle:Oh,geoContains:Nq,geoDistance:qh,geoGraticule:H6,geoGraticule10:Bq,geoInterpolate:Dq,geoLength:O6,geoPath:jq,geoAlbers:dx,geoAlbersUsa:nV,geoAzimuthalEqualArea:iV,geoAzimuthalEqualAreaRaw:P2,geoAzimuthalEquidistant:aV,geoAzimuthalEquidistantRaw:q2,geoConicConformal:oV,geoConicConformalRaw:yx,geoConicEqualArea:$h,geoConicEqualAreaRaw:fx,geoConicEquidistant:cV,geoConicEquidistantRaw:mx,geoEqualEarth:hV,geoEqualEarthRaw:V2,geoEquirectangular:lV,geoEquirectangularRaw:ac,geoGnomonic:fV,geoGnomonicRaw:z2,geoIdentity:dV,geoProjection:Li,geoProjectionMutator:O2,geoMercator:sV,geoMercatorRaw:ic,geoNaturalEarth1:pV,geoNaturalEarth1Raw:Y2,geoOrthographic:gV,geoOrthographicRaw:U2,geoStereographic:yV,geoStereographicRaw:W2,geoTransverseMercator:mV,geoTransverseMercatorRaw:H2,geoRotation:S6,geoStream:ti,geoTransform:$q,cluster:EV,hierarchy:G2,Node:Ms,pack:ez,packSiblings:JV,packEnclose:XV,partition:rz,stratify:sz,tree:dz,treemap:pz,treemapBinary:gz,treemapDice:hc,treemapSlice:ef,treemapSliceDice:yz,treemapSquarify:Dx,treemapResquarify:mz,interpolate:Ma,interpolateArray:OB,interpolateBasis:I5,interpolateBasisClosed:N5,interpolateDate:q5,interpolateDiscrete:qB,interpolateHue:VB,interpolateNumber:Bn,interpolateNumberArray:dd,interpolateObject:V5,interpolateRound:Gu,interpolateString:yd,interpolateTransformCss:W5,interpolateTransformSvg:H5,interpolateZoom:j5,interpolateRgb:Nl,interpolateRgbBasis:O5,interpolateRgbBasisClosed:DB,interpolateHsl:GB,interpolateHslLong:jB,interpolateLab:$B,interpolateHcl:K5,interpolateHclLong:XB,interpolateCubehelix:KB,interpolateCubehelixLong:$u,piecewise:Q5,quantize:ZB,path:Ra,polygonArea:bz,polygonCentroid:_z,polygonHull:kz,polygonContains:wz,polygonLength:Tz,quadtree:hh,randomUniform:Ez,randomInt:Cz,randomNormal:tp,randomLogNormal:Sz,randomBates:Az,randomIrwinHall:Fx,randomExponential:Mz,randomPareto:Lz,randomBernoulli:Rz,randomGeometric:Px,randomBinomial:Vx,randomGamma:ep,randomBeta:qx,randomWeibull:Iz,randomCauchy:Nz,randomLogistic:Bz,randomPoisson:Dz,randomLcg:Pz,scaleBand:np,scalePoint:qz,scaleIdentity:Hx,scaleLinear:sp,scaleLog:Kx,scaleSymlog:Jx,scaleOrdinal:rf,scaleImplicit:rp,scalePow:up,scaleSqrt:Zz,scaleRadial:r8,scaleQuantile:n8,scaleQuantize:i8,scaleThreshold:a8,scaleTime:Z8,scaleUtc:AU,scaleSequential:Q8,scaleSequentialLog:J8,scaleSequentialPow:Ap,scaleSequentialSqrt:MU,scaleSequentialSymlog:t7,scaleSequentialQuantile:e7,scaleDiverging:r7,scaleDivergingLog:n7,scaleDivergingPow:Mp,scaleDivergingSqrt:LU,scaleDivergingSymlog:i7,tickFormat:Wx,schemeCategory10:RU,schemeAccent:IU,schemeDark2:NU,schemePaired:BU,schemePastel1:DU,schemePastel2:OU,schemeSet1:FU,schemeSet2:PU,schemeSet3:qU,schemeTableau10:VU,interpolateBrBG:zU,schemeBrBG:a7,interpolatePRGn:YU,schemePRGn:s7,interpolatePiYG:UU,schemePiYG:o7,interpolatePuOr:WU,schemePuOr:l7,interpolateRdBu:HU,schemeRdBu:c7,interpolateRdGy:GU,schemeRdGy:u7,interpolateRdYlBu:jU,schemeRdYlBu:h7,interpolateRdYlGn:$U,schemeRdYlGn:f7,interpolateSpectral:XU,schemeSpectral:d7,interpolateBuGn:KU,schemeBuGn:p7,interpolateBuPu:ZU,schemeBuPu:g7,interpolateGnBu:QU,schemeGnBu:y7,interpolateOrRd:JU,schemeOrRd:m7,interpolatePuBuGn:tW,schemePuBuGn:b7,interpolatePuBu:eW,schemePuBu:_7,interpolatePuRd:rW,schemePuRd:v7,interpolateRdPu:nW,schemeRdPu:x7,interpolateYlGnBu:iW,schemeYlGnBu:k7,interpolateYlGn:aW,schemeYlGn:w7,interpolateYlOrBr:sW,schemeYlOrBr:T7,interpolateYlOrRd:oW,schemeYlOrRd:E7,interpolateBlues:lW,schemeBlues:C7,interpolateGreens:cW,schemeGreens:S7,interpolateGreys:uW,schemeGreys:A7,interpolatePurples:hW,schemePurples:M7,interpolateReds:fW,schemeReds:L7,interpolateOranges:dW,schemeOranges:R7,interpolateCividis:pW,interpolateCubehelixDefault:gW,interpolateRainbow:bW,interpolateWarm:yW,interpolateCool:mW,interpolateSinebow:xW,interpolateTurbo:kW,interpolateViridis:wW,interpolateMagma:TW,interpolateInferno:EW,interpolatePlasma:CW,create:uB,creator:Mu,local:s5,matcher:Q0,namespace:Al,namespaces:K0,pointer:Tn,pointers:fB,select:St,selectAll:Iu,selection:ps,selector:Lu,selectorAll:Z0,style:ds,window:J0,arc:gf,area:D7,line:Ua,pie:O7,areaRadial:V7,radialArea:V7,lineRadial:q7,radialLine:q7,pointRadial:kc,link:mf,linkHorizontal:YW,linkVertical:UW,linkRadial:WW,symbol:JW,symbolsStroke:QW,symbolsFill:ik,symbols:ik,symbolAsterisk:W7,symbolCircle:bf,symbolCross:H7,symbolDiamond:j7,symbolDiamond2:$7,symbolPlus:X7,symbolSquare:K7,symbolSquare2:Z7,symbolStar:J7,symbolTriangle:tk,symbolTriangle2:ek,symbolWye:rk,symbolX:nk,curveBasisClosed:sk,curveBasisOpen:lk,curveBasis:Os,curveBumpX:Y7,curveBumpY:U7,curveBundle:tH,curveCardinalClosed:rH,curveCardinalOpen:nH,curveCardinal:eH,curveCatmullRomClosed:aH,curveCatmullRomOpen:sH,curveCatmullRom:iH,curveLinearClosed:pk,curveLinear:yn,curveMonotoneX:vk,curveMonotoneY:xk,curveNatural:Tk,curveStep:Ek,curveStepAfter:Sk,curveStepBefore:Ck,stack:cH,stackOffsetExpand:uH,stackOffsetDiverging:hH,stackOffsetNone:qo,stackOffsetSilhouette:fH,stackOffsetWiggle:dH,stackOrderAppearance:Ak,stackOrderAscending:Mk,stackOrderDescending:gH,stackOrderInsideOut:yH,stackOrderNone:Vo,stackOrderReverse:mH,timeInterval:xr,timeMillisecond:dp,timeMilliseconds:s8,utcMillisecond:dp,utcMilliseconds:s8,timeSecond:Fa,timeSeconds:c8,utcSecond:Fa,utcSeconds:c8,timeMinute:yp,timeMinutes:Jz,timeHour:mp,timeHours:tY,timeDay:dc,timeDays:eY,timeWeek:Do,timeWeeks:m8,timeSunday:Do,timeSundays:m8,timeMonday:pc,timeMondays:rY,timeTuesday:d8,timeTuesdays:nY,timeWednesday:p8,timeWednesdays:iY,timeThursday:Ns,timeThursdays:aY,timeFriday:g8,timeFridays:sY,timeSaturday:y8,timeSaturdays:oY,timeMonth:bp,timeMonths:lY,timeYear:Pa,timeYears:cY,utcMinute:vp,utcMinutes:uY,utcHour:xp,utcHours:hY,utcDay:gc,utcDays:fY,utcWeek:Oo,utcWeeks:C8,utcSunday:Oo,utcSundays:C8,utcMonday:yc,utcMondays:dY,utcTuesday:k8,utcTuesdays:pY,utcWednesday:w8,utcWednesdays:gY,utcThursday:Ds,utcThursdays:yY,utcFriday:T8,utcFridays:mY,utcSaturday:E8,utcSaturdays:bY,utcMonth:kp,utcMonths:_Y,utcYear:qa,utcYears:vY,utcTicks:M8,utcTickInterval:L8,timeTicks:R8,timeTickInterval:I8,timeFormatDefaultLocale:X8,get timeFormat(){return vc},get timeParse(){return $8},get utcFormat(){return of},get utcParse(){return Cp},timeFormatLocale:N8,isoFormat:kU,isoParse:EU,now:Pl,timer:Qu,timerFlush:ev,timeout:_d,interval:eD,transition:ov,active:OO,interrupt:vs,zoom:TH,zoomTransform:Rk,zoomIdentity:Ef,ZoomTransform:Ri},Symbol.toStringTag,{value:"Module"}));/*! @license DOMPurify 2.4.0 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/2.4.0/LICENSE */function Ha(t){return Ha=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},Ha(t)}function zp(t,e){return zp=Object.setPrototypeOf||function(n,i){return n.__proto__=i,n},zp(t,e)}function CH(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function Cf(t,e,r){return CH()?Cf=Reflect.construct:Cf=function(i,a,s){var o=[null];o.push.apply(o,a);var l=Function.bind.apply(i,o),u=new l;return s&&zp(u,s.prototype),u},Cf.apply(null,arguments)}function ni(t){return SH(t)||AH(t)||MH(t)||LH()}function SH(t){if(Array.isArray(t))return Yp(t)}function AH(t){if(typeof Symbol<"u"&&t[Symbol.iterator]!=null||t["@@iterator"]!=null)return Array.from(t)}function MH(t,e){if(!!t){if(typeof t=="string")return Yp(t,e);var r=Object.prototype.toString.call(t).slice(8,-1);if(r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set")return Array.from(t);if(r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r))return Yp(t,e)}}function Yp(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,n=new Array(e);r<e;r++)n[r]=t[r];return n}function LH(){throw new TypeError(`Invalid attempt to spread non-iterable instance.
+In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}var RH=Object.hasOwnProperty,Nk=Object.setPrototypeOf,IH=Object.isFrozen,NH=Object.getPrototypeOf,BH=Object.getOwnPropertyDescriptor,sn=Object.freeze,Ii=Object.seal,DH=Object.create,Bk=typeof Reflect<"u"&&Reflect,Sf=Bk.apply,Up=Bk.construct;Sf||(Sf=function(e,r,n){return e.apply(r,n)}),sn||(sn=function(e){return e}),Ii||(Ii=function(e){return e}),Up||(Up=function(e,r){return Cf(e,ni(r))});var OH=ii(Array.prototype.forEach),Dk=ii(Array.prototype.pop),Tc=ii(Array.prototype.push),Af=ii(String.prototype.toLowerCase),FH=ii(String.prototype.match),Ga=ii(String.prototype.replace),PH=ii(String.prototype.indexOf),qH=ii(String.prototype.trim),on=ii(RegExp.prototype.test),Wp=VH(TypeError);function ii(t){return function(e){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return Sf(t,e,n)}}function VH(t){return function(){for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return Up(t,r)}}function Me(t,e,r){r=r||Af,Nk&&Nk(t,null);for(var n=e.length;n--;){var i=e[n];if(typeof i=="string"){var a=r(i);a!==i&&(IH(e)||(e[n]=a),i=a)}t[i]=!0}return t}function Fs(t){var e=DH(null),r;for(r in t)Sf(RH,t,[r])&&(e[r]=t[r]);return e}function Mf(t,e){for(;t!==null;){var r=BH(t,e);if(r){if(r.get)return ii(r.get);if(typeof r.value=="function")return ii(r.value)}t=NH(t)}function n(i){return console.warn("fallback value for",i),null}return n}var Ok=sn(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),Hp=sn(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),Gp=sn(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),zH=sn(["animate","color-profile","cursor","discard","fedropshadow","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),jp=sn(["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"]),YH=sn(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),Fk=sn(["#text"]),Pk=sn(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","xmlns","slot"]),$p=sn(["accent-height","accumulate","additive","alignment-baseline","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),qk=sn(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),Lf=sn(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),UH=Ii(/\{\{[\w\W]*|[\w\W]*\}\}/gm),WH=Ii(/<%[\w\W]*|[\w\W]*%>/gm),HH=Ii(/^data-[\-\w.\u00B7-\uFFFF]/),GH=Ii(/^aria-[\-\w]+$/),jH=Ii(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|cid|xmpp):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),$H=Ii(/^(?:\w+script|data):/i),XH=Ii(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),KH=Ii(/^html$/i),ZH=function(){return typeof window>"u"?null:window},QH=function(e,r){if(Ha(e)!=="object"||typeof e.createPolicy!="function")return null;var n=null,i="data-tt-policy-suffix";r.currentScript&&r.currentScript.hasAttribute(i)&&(n=r.currentScript.getAttribute(i));var a="dompurify"+(n?"#"+n:"");try{return e.createPolicy(a,{createHTML:function(o){return o},createScriptURL:function(o){return o}})}catch{return console.warn("TrustedTypes policy "+a+" could not be created."),null}};function Vk(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:ZH(),e=function(st){return Vk(st)};if(e.version="2.4.0",e.removed=[],!t||!t.document||t.document.nodeType!==9)return e.isSupported=!1,e;var r=t.document,n=t.document,i=t.DocumentFragment,a=t.HTMLTemplateElement,s=t.Node,o=t.Element,l=t.NodeFilter,u=t.NamedNodeMap,h=u===void 0?t.NamedNodeMap||t.MozNamedAttrMap:u,d=t.HTMLFormElement,f=t.DOMParser,p=t.trustedTypes,m=o.prototype,_=Mf(m,"cloneNode"),y=Mf(m,"nextSibling"),b=Mf(m,"childNodes"),x=Mf(m,"parentNode");if(typeof a=="function"){var k=n.createElement("template");k.content&&k.content.ownerDocument&&(n=k.content.ownerDocument)}var T=QH(p,r),C=T?T.createHTML(""):"",M=n,S=M.implementation,R=M.createNodeIterator,A=M.createDocumentFragment,L=M.getElementsByTagName,v=r.importNode,B={};try{B=Fs(n).documentMode?n.documentMode:{}}catch{}var w={};e.isSupported=typeof x=="function"&&S&&typeof S.createHTMLDocument<"u"&&B!==9;var D=UH,N=WH,z=HH,X=GH,ct=$H,J=XH,Y=jH,$=null,lt=Me({},[].concat(ni(Ok),ni(Hp),ni(Gp),ni(jp),ni(Fk))),ut=null,W=Me({},[].concat(ni(Pk),ni($p),ni(qk),ni(Lf))),tt=Object.seal(Object.create(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),K=null,it=null,Z=!0,V=!0,Q=!1,q=!1,U=!1,F=!1,j=!1,P=!1,et=!1,at=!1,It=!0,Lt=!1,Rt="user-content-",Ct=!0,pt=!1,mt={},vt=null,Tt=Me({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),ft=null,le=Me({},["audio","video","img","source","image","track"]),Dt=null,Gt=Me({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),$t="http://www.w3.org/1998/Math/MathML",Qt="http://www.w3.org/2000/svg",we="http://www.w3.org/1999/xhtml",jt=we,Ft=!1,zt,wt=["application/xhtml+xml","text/html"],bt="text/html",Et,kt=null,Ut=n.createElement("form"),gt=function(st){return st instanceof RegExp||st instanceof Function},he=function(st){kt&&kt===st||((!st||Ha(st)!=="object")&&(st={}),st=Fs(st),zt=wt.indexOf(st.PARSER_MEDIA_TYPE)===-1?zt=bt:zt=st.PARSER_MEDIA_TYPE,Et=zt==="application/xhtml+xml"?function(At){return At}:Af,$="ALLOWED_TAGS"in st?Me({},st.ALLOWED_TAGS,Et):lt,ut="ALLOWED_ATTR"in st?Me({},st.ALLOWED_ATTR,Et):W,Dt="ADD_URI_SAFE_ATTR"in st?Me(Fs(Gt),st.ADD_URI_SAFE_ATTR,Et):Gt,ft="ADD_DATA_URI_TAGS"in st?Me(Fs(le),st.ADD_DATA_URI_TAGS,Et):le,vt="FORBID_CONTENTS"in st?Me({},st.FORBID_CONTENTS,Et):Tt,K="FORBID_TAGS"in st?Me({},st.FORBID_TAGS,Et):{},it="FORBID_ATTR"in st?Me({},st.FORBID_ATTR,Et):{},mt="USE_PROFILES"in st?st.USE_PROFILES:!1,Z=st.ALLOW_ARIA_ATTR!==!1,V=st.ALLOW_DATA_ATTR!==!1,Q=st.ALLOW_UNKNOWN_PROTOCOLS||!1,q=st.SAFE_FOR_TEMPLATES||!1,U=st.WHOLE_DOCUMENT||!1,P=st.RETURN_DOM||!1,et=st.RETURN_DOM_FRAGMENT||!1,at=st.RETURN_TRUSTED_TYPE||!1,j=st.FORCE_BODY||!1,It=st.SANITIZE_DOM!==!1,Lt=st.SANITIZE_NAMED_PROPS||!1,Ct=st.KEEP_CONTENT!==!1,pt=st.IN_PLACE||!1,Y=st.ALLOWED_URI_REGEXP||Y,jt=st.NAMESPACE||we,st.CUSTOM_ELEMENT_HANDLING&&gt(st.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(tt.tagNameCheck=st.CUSTOM_ELEMENT_HANDLING.tagNameCheck),st.CUSTOM_ELEMENT_HANDLING&&gt(st.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(tt.attributeNameCheck=st.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),st.CUSTOM_ELEMENT_HANDLING&&typeof st.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements=="boolean"&&(tt.allowCustomizedBuiltInElements=st.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),q&&(V=!1),et&&(P=!0),mt&&($=Me({},ni(Fk)),ut=[],mt.html===!0&&(Me($,Ok),Me(ut,Pk)),mt.svg===!0&&(Me($,Hp),Me(ut,$p),Me(ut,Lf)),mt.svgFilters===!0&&(Me($,Gp),Me(ut,$p),Me(ut,Lf)),mt.mathMl===!0&&(Me($,jp),Me(ut,qk),Me(ut,Lf))),st.ADD_TAGS&&($===lt&&($=Fs($)),Me($,st.ADD_TAGS,Et)),st.ADD_ATTR&&(ut===W&&(ut=Fs(ut)),Me(ut,st.ADD_ATTR,Et)),st.ADD_URI_SAFE_ATTR&&Me(Dt,st.ADD_URI_SAFE_ATTR,Et),st.FORBID_CONTENTS&&(vt===Tt&&(vt=Fs(vt)),Me(vt,st.FORBID_CONTENTS,Et)),Ct&&($["#text"]=!0),U&&Me($,["html","head","body"]),$.table&&(Me($,["tbody"]),delete K.tbody),sn&&sn(st),kt=st)},yt=Me({},["mi","mo","mn","ms","mtext"]),ne=Me({},["foreignobject","desc","title","annotation-xml"]),ve=Me({},["title","style","font","a","script"]),ye=Me({},Hp);Me(ye,Gp),Me(ye,zH);var be=Me({},jp);Me(be,YH);var Te=function(st){var At=x(st);(!At||!At.tagName)&&(At={namespaceURI:we,tagName:"template"});var Nt=Af(st.tagName),Jt=Af(At.tagName);return st.namespaceURI===Qt?At.namespaceURI===we?Nt==="svg":At.namespaceURI===$t?Nt==="svg"&&(Jt==="annotation-xml"||yt[Jt]):Boolean(ye[Nt]):st.namespaceURI===$t?At.namespaceURI===we?Nt==="math":At.namespaceURI===Qt?Nt==="math"&&ne[Jt]:Boolean(be[Nt]):st.namespaceURI===we?At.namespaceURI===Qt&&!ne[Jt]||At.namespaceURI===$t&&!yt[Jt]?!1:!be[Nt]&&(ve[Nt]||!ye[Nt]):!1},Wt=function(st){Tc(e.removed,{element:st});try{st.parentNode.removeChild(st)}catch{try{st.outerHTML=C}catch{st.remove()}}},se=function(st,At){try{Tc(e.removed,{attribute:At.getAttributeNode(st),from:At})}catch{Tc(e.removed,{attribute:null,from:At})}if(At.removeAttribute(st),st==="is"&&!ut[st])if(P||et)try{Wt(At)}catch{}else try{At.setAttribute(st,"")}catch{}},me=function(st){var At,Nt;if(j)st="<remove></remove>"+st;else{var Jt=FH(st,/^[\r\n\t ]+/);Nt=Jt&&Jt[0]}zt==="application/xhtml+xml"&&(st='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+st+"</body></html>");var ze=T?T.createHTML(st):st;if(jt===we)try{At=new f().parseFromString(ze,zt)}catch{}if(!At||!At.documentElement){At=S.createDocument(jt,"template",null);try{At.documentElement.innerHTML=Ft?"":ze}catch{}}var Pe=At.body||At.documentElement;return st&&Nt&&Pe.insertBefore(n.createTextNode(Nt),Pe.childNodes[0]||null),jt===we?L.call(At,U?"html":"body")[0]:U?At.documentElement:Pe},ue=function(st){return R.call(st.ownerDocument||st,st,l.SHOW_ELEMENT|l.SHOW_COMMENT|l.SHOW_TEXT,null,!1)},_a=function(st){return st instanceof d&&(typeof st.nodeName!="string"||typeof st.textContent!="string"||typeof st.removeChild!="function"||!(st.attributes instanceof h)||typeof st.removeAttribute!="function"||typeof st.setAttribute!="function"||typeof st.namespaceURI!="string"||typeof st.insertBefore!="function")},Hr=function(st){return Ha(s)==="object"?st instanceof s:st&&Ha(st)==="object"&&typeof st.nodeType=="number"&&typeof st.nodeName=="string"},Ie=function(st,At,Nt){!w[st]||OH(w[st],function(Jt){Jt.call(e,At,Nt,kt)})},oe=function(st){var At;if(Ie("beforeSanitizeElements",st,null),_a(st)||on(/[\u0080-\uFFFF]/,st.nodeName))return Wt(st),!0;var Nt=Et(st.nodeName);if(Ie("uponSanitizeElement",st,{tagName:Nt,allowedTags:$}),st.hasChildNodes()&&!Hr(st.firstElementChild)&&(!Hr(st.content)||!Hr(st.content.firstElementChild))&&on(/<[/\w]/g,st.innerHTML)&&on(/<[/\w]/g,st.textContent)||Nt==="select"&&on(/<template/i,st.innerHTML))return Wt(st),!0;if(!$[Nt]||K[Nt]){if(!K[Nt]&&wr(Nt)&&(tt.tagNameCheck instanceof RegExp&&on(tt.tagNameCheck,Nt)||tt.tagNameCheck instanceof Function&&tt.tagNameCheck(Nt)))return!1;if(Ct&&!vt[Nt]){var Jt=x(st)||st.parentNode,ze=b(st)||st.childNodes;if(ze&&Jt)for(var Pe=ze.length,qe=Pe-1;qe>=0;--qe)Jt.insertBefore(_(ze[qe],!0),y(st))}return Wt(st),!0}return st instanceof o&&!Te(st)||(Nt==="noscript"||Nt==="noembed")&&on(/<\/no(script|embed)/i,st.innerHTML)?(Wt(st),!0):(q&&st.nodeType===3&&(At=st.textContent,At=Ga(At,D," "),At=Ga(At,N," "),st.textContent!==At&&(Tc(e.removed,{element:st.cloneNode()}),st.textContent=At)),Ie("afterSanitizeElements",st,null),!1)},Ke=function(st,At,Nt){if(It&&(At==="id"||At==="name")&&(Nt in n||Nt in Ut))return!1;if(!(V&&!it[At]&&on(z,At))){if(!(Z&&on(X,At))){if(!ut[At]||it[At]){if(!(wr(st)&&(tt.tagNameCheck instanceof RegExp&&on(tt.tagNameCheck,st)||tt.tagNameCheck instanceof Function&&tt.tagNameCheck(st))&&(tt.attributeNameCheck instanceof RegExp&&on(tt.attributeNameCheck,At)||tt.attributeNameCheck instanceof Function&&tt.attributeNameCheck(At))||At==="is"&&tt.allowCustomizedBuiltInElements&&(tt.tagNameCheck instanceof RegExp&&on(tt.tagNameCheck,Nt)||tt.tagNameCheck instanceof Function&&tt.tagNameCheck(Nt))))return!1}else if(!Dt[At]){if(!on(Y,Ga(Nt,J,""))){if(!((At==="src"||At==="xlink:href"||At==="href")&&st!=="script"&&PH(Nt,"data:")===0&&ft[st])){if(!(Q&&!on(ct,Ga(Nt,J,"")))){if(Nt)return!1}}}}}}return!0},wr=function(st){return st.indexOf("-")>0},je=function(st){var At,Nt,Jt,ze;Ie("beforeSanitizeAttributes",st,null);var Pe=st.attributes;if(!!Pe){var qe={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:ut};for(ze=Pe.length;ze--;){At=Pe[ze];var Tr=At,Ve=Tr.name,va=Tr.namespaceURI;if(Nt=Ve==="value"?At.value:qH(At.value),Jt=Et(Ve),qe.attrName=Jt,qe.attrValue=Nt,qe.keepAttr=!0,qe.forceKeepAttr=void 0,Ie("uponSanitizeAttribute",st,qe),Nt=qe.attrValue,!qe.forceKeepAttr&&(se(Ve,st),!!qe.keepAttr)){if(on(/\/>/i,Nt)){se(Ve,st);continue}q&&(Nt=Ga(Nt,D," "),Nt=Ga(Nt,N," "));var Ce=Et(st.nodeName);if(!!Ke(Ce,Jt,Nt)){if(Lt&&(Jt==="id"||Jt==="name")&&(se(Ve,st),Nt=Rt+Nt),T&&Ha(p)==="object"&&typeof p.getAttributeType=="function"&&!va)switch(p.getAttributeType(Ce,Jt)){case"TrustedHTML":Nt=T.createHTML(Nt);break;case"TrustedScriptURL":Nt=T.createScriptURL(Nt);break}try{va?st.setAttributeNS(va,Ve,Nt):st.setAttribute(Ve,Nt),Dk(e.removed)}catch{}}}}Ie("afterSanitizeAttributes",st,null)}},Ze=function qt(st){var At,Nt=ue(st);for(Ie("beforeSanitizeShadowDOM",st,null);At=Nt.nextNode();)Ie("uponSanitizeShadowNode",At,null),!oe(At)&&(At.content instanceof i&&qt(At.content),je(At));Ie("afterSanitizeShadowDOM",st,null)};return e.sanitize=function(qt){var st=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},At,Nt,Jt,ze,Pe;if(Ft=!qt,Ft&&(qt="<!-->"),typeof qt!="string"&&!Hr(qt)){if(typeof qt.toString!="function")throw Wp("toString is not a function");if(qt=qt.toString(),typeof qt!="string")throw Wp("dirty is not a string, aborting")}if(!e.isSupported){if(Ha(t.toStaticHTML)==="object"||typeof t.toStaticHTML=="function"){if(typeof qt=="string")return t.toStaticHTML(qt);if(Hr(qt))return t.toStaticHTML(qt.outerHTML)}return qt}if(F||he(st),e.removed=[],typeof qt=="string"&&(pt=!1),pt){if(qt.nodeName){var qe=Et(qt.nodeName);if(!$[qe]||K[qe])throw Wp("root node is forbidden and cannot be sanitized in-place")}}else if(qt instanceof s)At=me("<!---->"),Nt=At.ownerDocument.importNode(qt,!0),Nt.nodeType===1&&Nt.nodeName==="BODY"||Nt.nodeName==="HTML"?At=Nt:At.appendChild(Nt);else{if(!P&&!q&&!U&&qt.indexOf("<")===-1)return T&&at?T.createHTML(qt):qt;if(At=me(qt),!At)return P?null:at?C:""}At&&j&&Wt(At.firstChild);for(var Tr=ue(pt?qt:At);Jt=Tr.nextNode();)Jt.nodeType===3&&Jt===ze||oe(Jt)||(Jt.content instanceof i&&Ze(Jt.content),je(Jt),ze=Jt);if(ze=null,pt)return qt;if(P){if(et)for(Pe=A.call(At.ownerDocument);At.firstChild;)Pe.appendChild(At.firstChild);else Pe=At;return ut.shadowroot&&(Pe=v.call(r,Pe,!0)),Pe}var Ve=U?At.outerHTML:At.innerHTML;return U&&$["!doctype"]&&At.ownerDocument&&At.ownerDocument.doctype&&At.ownerDocument.doctype.name&&on(KH,At.ownerDocument.doctype.name)&&(Ve="<!DOCTYPE "+At.ownerDocument.doctype.name+`>
+`+Ve),q&&(Ve=Ga(Ve,D," "),Ve=Ga(Ve,N," ")),T&&at?T.createHTML(Ve):Ve},e.setConfig=function(qt){he(qt),F=!0},e.clearConfig=function(){kt=null,F=!1},e.isValidAttribute=function(qt,st,At){kt||he({});var Nt=Et(qt),Jt=Et(st);return Ke(Nt,Jt,At)},e.addHook=function(qt,st){typeof st=="function"&&(w[qt]=w[qt]||[],Tc(w[qt],st))},e.removeHook=function(qt){if(w[qt])return Dk(w[qt])},e.removeHooks=function(qt){w[qt]&&(w[qt]=[])},e.removeAllHooks=function(){w={}},e}var Ec=Vk();const JH=t=>t?Uk(t).replace(/\\n/g,"#br#").split("#br#"):[""],zk=t=>Ec.sanitize(t),Yk=(t,e)=>{var r;if(((r=e.flowchart)==null?void 0:r.htmlLabels)!==!1){const n=e.securityLevel;n==="antiscript"||n==="strict"?t=zk(t):n!=="loose"&&(t=Uk(t),t=t.replace(/</g,"&lt;").replace(/>/g,"&gt;"),t=t.replace(/=/g,"&equals;"),t=nG(t))}return t},ai=(t,e)=>t&&(e.dompurifyConfig?t=Ec.sanitize(Yk(t,e),e.dompurifyConfig).toString():t=Ec.sanitize(Yk(t,e)),t),tG=(t,e)=>typeof t=="string"?ai(t,e):t.flat().map(r=>ai(r,e)),Rf=/<br\s*\/?>/gi,eG=t=>Rf.test(t),rG=t=>t.split(Rf),nG=t=>t.replace(/#br#/g,"<br/>"),Uk=t=>t.replace(Rf,"#br#"),iG=t=>{let e="";return t&&(e=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,e=e.replaceAll(/\(/g,"\\("),e=e.replaceAll(/\)/g,"\\)")),e},Mr=t=>!(t===!1||["false","null","0"].includes(String(t).trim().toLowerCase())),ja=function(t){let e=t;return t.indexOf("~")!==-1?(e=e.replace(/~([^~].*)/,"<$1"),e=e.replace(/~([^~]*)$/,">$1"),ja(e)):e},pe={getRows:JH,sanitizeText:ai,sanitizeTextOrArray:tG,hasBreaks:eG,splitBreaks:rG,lineBreakRegex:Rf,removeScript:zk,getUrl:iG,evaluate:Mr},If={min:{r:0,g:0,b:0,s:0,l:0,a:0},max:{r:255,g:255,b:255,h:360,s:100,l:100,a:1},clamp:{r:t=>t>=255?255:t<0?0:t,g:t=>t>=255?255:t<0?0:t,b:t=>t>=255?255:t<0?0:t,h:t=>t%360,s:t=>t>=100?100:t<0?0:t,l:t=>t>=100?100:t<0?0:t,a:t=>t>=1?1:t<0?0:t},toLinear:t=>{const e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:(t,e,r)=>(r<0&&(r+=1),r>1&&(r-=1),r<1/6?t+(e-t)*6*r:r<1/2?e:r<2/3?t+(e-t)*(2/3-r)*6:t),hsl2rgb:({h:t,s:e,l:r},n)=>{if(!e)return r*2.55;t/=360,e/=100,r/=100;const i=r<.5?r*(1+e):r+e-r*e,a=2*r-i;switch(n){case"r":return If.hue2rgb(a,i,t+1/3)*255;case"g":return If.hue2rgb(a,i,t)*255;case"b":return If.hue2rgb(a,i,t-1/3)*255}},rgb2hsl:({r:t,g:e,b:r},n)=>{t/=255,e/=255,r/=255;const i=Math.max(t,e,r),a=Math.min(t,e,r),s=(i+a)/2;if(n==="l")return s*100;if(i===a)return 0;const o=i-a,l=s>.5?o/(2-i-a):o/(i+a);if(n==="s")return l*100;switch(i){case t:return((e-r)/o+(e<r?6:0))*60;case e:return((r-t)/o+2)*60;case r:return((t-e)/o+4)*60;default:return-1}}},ke={channel:If,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(t*1e10)/1e10},unit:{dec2hex:t=>{const e=Math.round(t).toString(16);return e.length>1?e:`0${e}`}}},$a={};for(let t=0;t<=255;t++)$a[t]=ke.unit.dec2hex(t);const zr={ALL:0,RGB:1,HSL:2};class aG{constructor(){this.type=zr.ALL}get(){return this.type}set(e){if(this.type&&this.type!==e)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=e}reset(){this.type=zr.ALL}is(e){return this.type===e}}const sG=aG;class oG{constructor(e,r){this.color=r,this.changed=!1,this.data=e,this.type=new sG}set(e,r){return this.color=r,this.changed=!1,this.data=e,this.type.type=zr.ALL,this}_ensureHSL(){const e=this.data,{h:r,s:n,l:i}=e;r===void 0&&(e.h=ke.channel.rgb2hsl(e,"h")),n===void 0&&(e.s=ke.channel.rgb2hsl(e,"s")),i===void 0&&(e.l=ke.channel.rgb2hsl(e,"l"))}_ensureRGB(){const e=this.data,{r,g:n,b:i}=e;r===void 0&&(e.r=ke.channel.hsl2rgb(e,"r")),n===void 0&&(e.g=ke.channel.hsl2rgb(e,"g")),i===void 0&&(e.b=ke.channel.hsl2rgb(e,"b"))}get r(){const e=this.data,r=e.r;return!this.type.is(zr.HSL)&&r!==void 0?r:(this._ensureHSL(),ke.channel.hsl2rgb(e,"r"))}get g(){const e=this.data,r=e.g;return!this.type.is(zr.HSL)&&r!==void 0?r:(this._ensureHSL(),ke.channel.hsl2rgb(e,"g"))}get b(){const e=this.data,r=e.b;return!this.type.is(zr.HSL)&&r!==void 0?r:(this._ensureHSL(),ke.channel.hsl2rgb(e,"b"))}get h(){const e=this.data,r=e.h;return!this.type.is(zr.RGB)&&r!==void 0?r:(this._ensureRGB(),ke.channel.rgb2hsl(e,"h"))}get s(){const e=this.data,r=e.s;return!this.type.is(zr.RGB)&&r!==void 0?r:(this._ensureRGB(),ke.channel.rgb2hsl(e,"s"))}get l(){const e=this.data,r=e.l;return!this.type.is(zr.RGB)&&r!==void 0?r:(this._ensureRGB(),ke.channel.rgb2hsl(e,"l"))}get a(){return this.data.a}set r(e){this.type.set(zr.RGB),this.changed=!0,this.data.r=e}set g(e){this.type.set(zr.RGB),this.changed=!0,this.data.g=e}set b(e){this.type.set(zr.RGB),this.changed=!0,this.data.b=e}set h(e){this.type.set(zr.HSL),this.changed=!0,this.data.h=e}set s(e){this.type.set(zr.HSL),this.changed=!0,this.data.s=e}set l(e){this.type.set(zr.HSL),this.changed=!0,this.data.l=e}set a(e){this.changed=!0,this.data.a=e}}const lG=oG,Nf=new lG({r:0,g:0,b:0,a:0},"transparent"),Wk={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:t=>{if(t.charCodeAt(0)!==35)return;const e=t.match(Wk.re);if(!e)return;const r=e[1],n=parseInt(r,16),i=r.length,a=i%4===0,s=i>4,o=s?1:17,l=s?8:4,u=a?0:-1,h=s?255:15;return Nf.set({r:(n>>l*(u+3)&h)*o,g:(n>>l*(u+2)&h)*o,b:(n>>l*(u+1)&h)*o,a:a?(n&h)*o/255:1},t)},stringify:t=>{const{r:e,g:r,b:n,a:i}=t;return i<1?`#${$a[Math.round(e)]}${$a[Math.round(r)]}${$a[Math.round(n)]}${$a[Math.round(i*255)]}`:`#${$a[Math.round(e)]}${$a[Math.round(r)]}${$a[Math.round(n)]}`}},Cc=Wk,Bf={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(Bf.hueRe);if(e){const[,r,n]=e;switch(n){case"grad":return ke.channel.clamp.h(parseFloat(r)*.9);case"rad":return ke.channel.clamp.h(parseFloat(r)*180/Math.PI);case"turn":return ke.channel.clamp.h(parseFloat(r)*360)}}return ke.channel.clamp.h(parseFloat(t))},parse:t=>{const e=t.charCodeAt(0);if(e!==104&&e!==72)return;const r=t.match(Bf.re);if(!r)return;const[,n,i,a,s,o]=r;return Nf.set({h:Bf._hue2deg(n),s:ke.channel.clamp.s(parseFloat(i)),l:ke.channel.clamp.l(parseFloat(a)),a:s?ke.channel.clamp.a(o?parseFloat(s)/100:parseFloat(s)):1},t)},stringify:t=>{const{h:e,s:r,l:n,a:i}=t;return i<1?`hsla(${ke.lang.round(e)}, ${ke.lang.round(r)}%, ${ke.lang.round(n)}%, ${i})`:`hsl(${ke.lang.round(e)}, ${ke.lang.round(r)}%, ${ke.lang.round(n)}%)`}},Df=Bf,Of={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=Of.colors[t];if(!!e)return Cc.parse(e)},stringify:t=>{const e=Cc.stringify(t);for(const r in Of.colors)if(Of.colors[r]===e)return r}},Hk=Of,Gk={re:/^rgba?\(\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))\s*?(?:,|\s)\s*?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?))(?:\s*?(?:,|\/)\s*?\+?(-?(?:\d+(?:\.\d+)?|(?:\.\d+))(?:e\d+)?(%?)))?\s*?\)$/i,parse:t=>{const e=t.charCodeAt(0);if(e!==114&&e!==82)return;const r=t.match(Gk.re);if(!r)return;const[,n,i,a,s,o,l,u,h]=r;return Nf.set({r:ke.channel.clamp.r(i?parseFloat(n)*2.55:parseFloat(n)),g:ke.channel.clamp.g(s?parseFloat(a)*2.55:parseFloat(a)),b:ke.channel.clamp.b(l?parseFloat(o)*2.55:parseFloat(o)),a:u?ke.channel.clamp.a(h?parseFloat(u)/100:parseFloat(u)):1},t)},stringify:t=>{const{r:e,g:r,b:n,a:i}=t;return i<1?`rgba(${ke.lang.round(e)}, ${ke.lang.round(r)}, ${ke.lang.round(n)}, ${ke.lang.round(i)})`:`rgb(${ke.lang.round(e)}, ${ke.lang.round(r)}, ${ke.lang.round(n)})`}},Ff=Gk,ia={format:{keyword:Hk,hex:Cc,rgb:Ff,rgba:Ff,hsl:Df,hsla:Df},parse:t=>{if(typeof t!="string")return t;const e=Cc.parse(t)||Ff.parse(t)||Df.parse(t)||Hk.parse(t);if(e)return e;throw new Error(`Unsupported color format: "${t}"`)},stringify:t=>!t.changed&&t.color?t.color:t.type.is(zr.HSL)||t.data.r===void 0?Df.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?Ff.stringify(t):Cc.stringify(t)},jk=(t,e)=>{const r=ia.parse(t);for(const n in e)r[n]=ke.channel.clamp[n](e[n]);return ia.stringify(r)},Sc=(t,e,r=0,n=1)=>{if(typeof t!="number")return jk(t,{a:e});const i=Nf.set({r:ke.channel.clamp.r(t),g:ke.channel.clamp.g(e),b:ke.channel.clamp.b(r),a:ke.channel.clamp.a(n)});return ia.stringify(i)},$k=(t,e,r)=>{const n=ia.parse(t),i=n[e],a=ke.channel.clamp[e](i+r);return i!==a&&(n[e]=a),ia.stringify(n)},ae=(t,e)=>$k(t,"l",e),ge=(t,e)=>$k(t,"l",-e),_t=(t,e)=>{const r=ia.parse(t),n={};for(const i in e)!e[i]||(n[i]=r[i]+e[i]);return jk(t,n)},cG=(t,e,r=50)=>{const{r:n,g:i,b:a,a:s}=ia.parse(t),{r:o,g:l,b:u,a:h}=ia.parse(e),d=r/100,f=d*2-1,p=s-h,_=((f*p===-1?f:(f+p)/(1+f*p))+1)/2,y=1-_,b=n*_+o*y,x=i*_+l*y,k=a*_+u*y,T=s*d+h*(1-d);return Sc(b,x,k,T)},Yt=(t,e=100)=>{const r=ia.parse(t);return r.r=255-r.r,r.g=255-r.g,r.b=255-r.b,cG(r,t,e)},ln=(t,e)=>e?_t(t,{s:-40,l:10}):_t(t,{s:-40,l:-10}),Pf="#ffffff",qf="#f2f2f2";class uG{constructor(){this.background="#f4f4f4",this.darkMode=!1,this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.THEME_COLOR_LIMIT=12,this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px"}updateColors(){if(this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#eee":"#333"),this.secondaryColor=this.secondaryColor||_t(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||_t(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||ln(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||ln(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||ln(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||ln(this.noteBkgColor,this.darkMode),this.noteBkgColor=this.noteBkgColor||"#fff5ad",this.noteTextColor=this.noteTextColor||"#333",this.secondaryTextColor=this.secondaryTextColor||Yt(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Yt(this.tertiaryColor),this.lineColor=this.lineColor||Yt(this.background),this.textColor=this.textColor||this.primaryTextColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||(this.darkMode?ge(this.secondaryColor,30):this.secondaryColor),this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||"grey",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||ge(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Yt(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.excludeBkgColor=this.excludeBkgColor||"#eeeeee",this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||ae(this.primaryColor,23),this.gridColor=this.gridColor||"lightgrey",this.doneTaskBkgColor=this.doneTaskBkgColor||"lightgrey",this.doneTaskBorderColor=this.doneTaskBorderColor||"grey",this.critBorderColor=this.critBorderColor||"#ff8888",this.critBkgColor=this.critBkgColor||"red",this.todayLineColor=this.todayLineColor||"red",this.taskTextColor=this.taskTextColor||this.textColor,this.taskTextOutsideColor=this.taskTextOutsideColor||this.textColor,this.taskTextLightColor=this.taskTextLightColor||this.textColor,this.taskTextColor=this.taskTextColor||this.primaryTextColor,this.taskTextDarkColor=this.taskTextDarkColor||this.textColor,this.taskTextClickableColor=this.taskTextClickableColor||"#003163",this.personBorder=this.personBorder||this.primaryBorderColor,this.personBkg=this.personBkg||this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||this.tertiaryColor,this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.specialStateColor=this.lineColor,this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||_t(this.primaryColor,{h:30}),this.cScale4=this.cScale4||_t(this.primaryColor,{h:60}),this.cScale5=this.cScale5||_t(this.primaryColor,{h:90}),this.cScale6=this.cScale6||_t(this.primaryColor,{h:120}),this.cScale7=this.cScale7||_t(this.primaryColor,{h:150}),this.cScale8=this.cScale8||_t(this.primaryColor,{h:210,l:150}),this.cScale9=this.cScale9||_t(this.primaryColor,{h:270}),this.cScale10=this.cScale10||_t(this.primaryColor,{h:300}),this.cScale11=this.cScale11||_t(this.primaryColor,{h:330}),this.darkMode)for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=ge(this["cScale"+e],75);else for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=ge(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||Yt(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||ae(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||ge(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||_t(this.primaryColor,{h:64}),this.fillType3=this.fillType3||_t(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||_t(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||_t(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||_t(this.primaryColor,{h:128}),this.fillType7=this.fillType7||_t(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||_t(this.primaryColor,{l:-10}),this.pie5=this.pie5||_t(this.secondaryColor,{l:-10}),this.pie6=this.pie6||_t(this.tertiaryColor,{l:-10}),this.pie7=this.pie7||_t(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||_t(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||_t(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||_t(this.primaryColor,{h:60,l:-20}),this.pie11=this.pie11||_t(this.primaryColor,{h:-60,l:-20}),this.pie12=this.pie12||_t(this.primaryColor,{h:120,l:-10}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ge(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||_t(this.primaryColor,{h:-30}),this.git4=this.git4||_t(this.primaryColor,{h:-60}),this.git5=this.git5||_t(this.primaryColor,{h:-90}),this.git6=this.git6||_t(this.primaryColor,{h:60}),this.git7=this.git7||_t(this.primaryColor,{h:120}),this.darkMode?(this.git0=ae(this.git0,25),this.git1=ae(this.git1,25),this.git2=ae(this.git2,25),this.git3=ae(this.git3,25),this.git4=ae(this.git4,25),this.git5=ae(this.git5,25),this.git6=ae(this.git6,25),this.git7=ae(this.git7,25)):(this.git0=ge(this.git0,25),this.git1=ge(this.git1,25),this.git2=ge(this.git2,25),this.git3=ge(this.git3,25),this.git4=ge(this.git4,25),this.git5=ge(this.git5,25),this.git6=ge(this.git6,25),this.git7=ge(this.git7,25)),this.gitInv0=this.gitInv0||Yt(this.git0),this.gitInv1=this.gitInv1||Yt(this.git1),this.gitInv2=this.gitInv2||Yt(this.git2),this.gitInv3=this.gitInv3||Yt(this.git3),this.gitInv4=this.gitInv4||Yt(this.git4),this.gitInv5=this.gitInv5||Yt(this.git5),this.gitInv6=this.gitInv6||Yt(this.git6),this.gitInv7=this.gitInv7||Yt(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||Pf,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qf}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}}const hG=t=>{const e=new uG;return e.calculate(t),e};class fG{constructor(){this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=ae(this.primaryColor,16),this.tertiaryColor=_t(this.primaryColor,{h:-160}),this.primaryBorderColor=Yt(this.background),this.secondaryBorderColor=ln(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ln(this.tertiaryColor,this.darkMode),this.primaryTextColor=Yt(this.primaryColor),this.secondaryTextColor=Yt(this.secondaryColor),this.tertiaryTextColor=Yt(this.tertiaryColor),this.lineColor=Yt(this.background),this.textColor=Yt(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=ae(Yt("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=Sc(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=ge("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.taskBorderColor=Sc(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Sc(255,255,255,50),this.activeTaskBkgColor="#81B1DB",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="grey",this.critBorderColor="#E83737",this.critBkgColor="#E83737",this.taskTextDarkColor="calculated",this.todayLineColor="#DB5757",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}updateColors(){this.secondBkg=ae(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=ae(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.secondaryBorderColor,this.noteBkgColor=this.secondBkg,this.noteTextColor=this.secondaryTextColor,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=ae(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#555",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#f4f4f4",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=_t(this.primaryColor,{h:64}),this.fillType3=_t(this.secondaryColor,{h:64}),this.fillType4=_t(this.primaryColor,{h:-64}),this.fillType5=_t(this.secondaryColor,{h:-64}),this.fillType6=_t(this.primaryColor,{h:128}),this.fillType7=_t(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||_t(this.primaryColor,{h:30}),this.cScale4=this.cScale4||_t(this.primaryColor,{h:60}),this.cScale5=this.cScale5||_t(this.primaryColor,{h:90}),this.cScale6=this.cScale6||_t(this.primaryColor,{h:120}),this.cScale7=this.cScale7||_t(this.primaryColor,{h:150}),this.cScale8=this.cScale8||_t(this.primaryColor,{h:210}),this.cScale9=this.cScale9||_t(this.primaryColor,{h:270}),this.cScale10=this.cScale10||_t(this.primaryColor,{h:300}),this.cScale11=this.cScale11||_t(this.primaryColor,{h:330});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||Yt(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScalePeer"+e]=this["cScalePeer"+e]||ae(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.classText=this.primaryTextColor,this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||(this.darkMode?ge(this.secondaryColor,30):this.secondaryColor),this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=ae(this.secondaryColor,20),this.git1=ae(this.pie2||this.secondaryColor,20),this.git2=ae(this.pie3||this.tertiaryColor,20),this.git3=ae(this.pie4||_t(this.primaryColor,{h:-30}),20),this.git4=ae(this.pie5||_t(this.primaryColor,{h:-60}),20),this.git5=ae(this.pie6||_t(this.primaryColor,{h:-90}),10),this.git6=ae(this.pie7||_t(this.primaryColor,{h:60}),10),this.git7=ae(this.pie8||_t(this.primaryColor,{h:120}),20),this.gitInv0=this.gitInv0||Yt(this.git0),this.gitInv1=this.gitInv1||Yt(this.git1),this.gitInv2=this.gitInv2||Yt(this.git2),this.gitInv3=this.gitInv3||Yt(this.git3),this.gitInv4=this.gitInv4||Yt(this.git4),this.gitInv5=this.gitInv5||Yt(this.git5),this.gitInv6=this.gitInv6||Yt(this.git6),this.gitInv7=this.gitInv7||Yt(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||ae(this.background,12),this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||ae(this.background,2)}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}}const dG=t=>{const e=new fG;return e.calculate(t),e};class pG{constructor(){this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=_t(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=_t(this.primaryColor,{h:-160}),this.primaryBorderColor=ln(this.primaryColor,this.darkMode),this.secondaryBorderColor=ln(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ln(this.tertiaryColor,this.darkMode),this.primaryTextColor=Yt(this.primaryColor),this.secondaryTextColor=Yt(this.secondaryColor),this.tertiaryTextColor=Yt(this.tertiaryColor),this.lineColor=Yt(this.background),this.textColor=Yt(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=Sc(102,102,255,.49),this.altSectionBkgColor="white",this.sectionBkgColor2="#fff400",this.taskBorderColor="#534fbc",this.taskBkgColor="#8a90dd",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="#534fbc",this.activeTaskBkgColor="#bfc7ff",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||_t(this.primaryColor,{h:30}),this.cScale4=this.cScale4||_t(this.primaryColor,{h:60}),this.cScale5=this.cScale5||_t(this.primaryColor,{h:90}),this.cScale6=this.cScale6||_t(this.primaryColor,{h:120}),this.cScale7=this.cScale7||_t(this.primaryColor,{h:150}),this.cScale8=this.cScale8||_t(this.primaryColor,{h:210}),this.cScale9=this.cScale9||_t(this.primaryColor,{h:270}),this.cScale10=this.cScale10||_t(this.primaryColor,{h:300}),this.cScale11=this.cScale11||_t(this.primaryColor,{h:330}),this["cScalePeer"+1]=this["cScalePeer"+1]||ge(this.secondaryColor,45),this["cScalePeer"+2]=this["cScalePeer"+2]||ge(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=ge(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||ge(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||_t(this["cScale"+e],{h:180});if(this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor,this.labelTextColor!=="calculated"){this.cScaleLabel0=this.cScaleLabel0||Yt(this.labelTextColor),this.cScaleLabel3=this.cScaleLabel3||Yt(this.labelTextColor);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.labelTextColor}this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.textColor,this.edgeLabelBackground=this.labelBackground,this.actorBorder=ae(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.nodeBorder,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=_t(this.primaryColor,{h:64}),this.fillType3=_t(this.secondaryColor,{h:64}),this.fillType4=_t(this.primaryColor,{h:-64}),this.fillType5=_t(this.secondaryColor,{h:-64}),this.fillType6=_t(this.primaryColor,{h:128}),this.fillType7=_t(this.secondaryColor,{h:128}),this.pie1=this.pie1||this.primaryColor,this.pie2=this.pie2||this.secondaryColor,this.pie3=this.pie3||_t(this.tertiaryColor,{l:-40}),this.pie4=this.pie4||_t(this.primaryColor,{l:-10}),this.pie5=this.pie5||_t(this.secondaryColor,{l:-30}),this.pie6=this.pie6||_t(this.tertiaryColor,{l:-20}),this.pie7=this.pie7||_t(this.primaryColor,{h:60,l:-20}),this.pie8=this.pie8||_t(this.primaryColor,{h:-60,l:-40}),this.pie9=this.pie9||_t(this.primaryColor,{h:120,l:-40}),this.pie10=this.pie10||_t(this.primaryColor,{h:60,l:-40}),this.pie11=this.pie11||_t(this.primaryColor,{h:-90,l:-40}),this.pie12=this.pie12||_t(this.primaryColor,{h:120,l:-30}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.labelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||_t(this.primaryColor,{h:-30}),this.git4=this.git4||_t(this.primaryColor,{h:-60}),this.git5=this.git5||_t(this.primaryColor,{h:-90}),this.git6=this.git6||_t(this.primaryColor,{h:60}),this.git7=this.git7||_t(this.primaryColor,{h:120}),this.darkMode?(this.git0=ae(this.git0,25),this.git1=ae(this.git1,25),this.git2=ae(this.git2,25),this.git3=ae(this.git3,25),this.git4=ae(this.git4,25),this.git5=ae(this.git5,25),this.git6=ae(this.git6,25),this.git7=ae(this.git7,25)):(this.git0=ge(this.git0,25),this.git1=ge(this.git1,25),this.git2=ge(this.git2,25),this.git3=ge(this.git3,25),this.git4=ge(this.git4,25),this.git5=ge(this.git5,25),this.git6=ge(this.git6,25),this.git7=ge(this.git7,25)),this.gitInv0=this.gitInv0||ge(Yt(this.git0),25),this.gitInv1=this.gitInv1||Yt(this.git1),this.gitInv2=this.gitInv2||Yt(this.git2),this.gitInv3=this.gitInv3||Yt(this.git3),this.gitInv4=this.gitInv4||Yt(this.git4),this.gitInv5=this.gitInv5||Yt(this.git5),this.gitInv6=this.gitInv6||Yt(this.git6),this.gitInv7=this.gitInv7||Yt(this.git7),this.gitBranchLabel0=this.gitBranchLabel0||Yt(this.labelTextColor),this.gitBranchLabel1=this.gitBranchLabel1||this.labelTextColor,this.gitBranchLabel2=this.gitBranchLabel2||this.labelTextColor,this.gitBranchLabel3=this.gitBranchLabel3||Yt(this.labelTextColor),this.gitBranchLabel4=this.gitBranchLabel4||this.labelTextColor,this.gitBranchLabel5=this.gitBranchLabel5||this.labelTextColor,this.gitBranchLabel6=this.gitBranchLabel6||this.labelTextColor,this.gitBranchLabel7=this.gitBranchLabel7||this.labelTextColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Pf,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qf}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}}const gG=t=>{const e=new pG;return e.calculate(t),e};class yG{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=ae("#cde498",10),this.primaryBorderColor=ln(this.primaryColor,this.darkMode),this.secondaryBorderColor=ln(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ln(this.tertiaryColor,this.darkMode),this.primaryTextColor=Yt(this.primaryColor),this.secondaryTextColor=Yt(this.secondaryColor),this.tertiaryTextColor=Yt(this.primaryColor),this.lineColor=Yt(this.background),this.textColor=Yt(this.background),this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="#487e3a",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="black",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="lightgrey",this.doneTaskBkgColor="lightgrey",this.doneTaskBorderColor="grey",this.critBorderColor="#ff8888",this.critBkgColor="red",this.todayLineColor="red",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.cScale0=this.cScale0||this.primaryColor,this.cScale1=this.cScale1||this.secondaryColor,this.cScale2=this.cScale2||this.tertiaryColor,this.cScale3=this.cScale3||_t(this.primaryColor,{h:30}),this.cScale4=this.cScale4||_t(this.primaryColor,{h:60}),this.cScale5=this.cScale5||_t(this.primaryColor,{h:90}),this.cScale6=this.cScale6||_t(this.primaryColor,{h:120}),this.cScale7=this.cScale7||_t(this.primaryColor,{h:150}),this.cScale8=this.cScale8||_t(this.primaryColor,{h:210}),this.cScale9=this.cScale9||_t(this.primaryColor,{h:270}),this.cScale10=this.cScale10||_t(this.primaryColor,{h:300}),this.cScale11=this.cScale11||_t(this.primaryColor,{h:330}),this["cScalePeer"+1]=this["cScalePeer"+1]||ge(this.secondaryColor,45),this["cScalePeer"+2]=this["cScalePeer"+2]||ge(this.tertiaryColor,40);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScale"+e]=ge(this["cScale"+e],10),this["cScalePeer"+e]=this["cScalePeer"+e]||ge(this["cScale"+e],25);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||_t(this["cScale"+e],{h:180});this.scaleLabelColor=this.scaleLabelColor!=="calculated"&&this.scaleLabelColor?this.scaleLabelColor:this.labelTextColor;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.actorBorder=ge(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.transitionColor=this.transitionColor||this.lineColor,this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f0f0f0",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.compositeBorder=this.compositeBorder||this.nodeBorder,this.innerEndBackground=this.primaryBorderColor,this.specialStateColor=this.lineColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.transitionColor=this.transitionColor||this.lineColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=_t(this.primaryColor,{h:64}),this.fillType3=_t(this.secondaryColor,{h:64}),this.fillType4=_t(this.primaryColor,{h:-64}),this.fillType5=_t(this.secondaryColor,{h:-64}),this.fillType6=_t(this.primaryColor,{h:128}),this.fillType7=_t(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||_t(this.primaryColor,{l:-30}),this.pie5=this.pie5||_t(this.secondaryColor,{l:-30}),this.pie6=this.pie6||_t(this.tertiaryColor,{h:40,l:-40}),this.pie7=this.pie7||_t(this.primaryColor,{h:60,l:-10}),this.pie8=this.pie8||_t(this.primaryColor,{h:-60,l:-10}),this.pie9=this.pie9||_t(this.primaryColor,{h:120,l:0}),this.pie10=this.pie10||_t(this.primaryColor,{h:60,l:-50}),this.pie11=this.pie11||_t(this.primaryColor,{h:-60,l:-50}),this.pie12=this.pie12||_t(this.primaryColor,{h:120,l:-50}),this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=this.git0||this.primaryColor,this.git1=this.git1||this.secondaryColor,this.git2=this.git2||this.tertiaryColor,this.git3=this.git3||_t(this.primaryColor,{h:-30}),this.git4=this.git4||_t(this.primaryColor,{h:-60}),this.git5=this.git5||_t(this.primaryColor,{h:-90}),this.git6=this.git6||_t(this.primaryColor,{h:60}),this.git7=this.git7||_t(this.primaryColor,{h:120}),this.darkMode?(this.git0=ae(this.git0,25),this.git1=ae(this.git1,25),this.git2=ae(this.git2,25),this.git3=ae(this.git3,25),this.git4=ae(this.git4,25),this.git5=ae(this.git5,25),this.git6=ae(this.git6,25),this.git7=ae(this.git7,25)):(this.git0=ge(this.git0,25),this.git1=ge(this.git1,25),this.git2=ge(this.git2,25),this.git3=ge(this.git3,25),this.git4=ge(this.git4,25),this.git5=ge(this.git5,25),this.git6=ge(this.git6,25),this.git7=ge(this.git7,25)),this.gitInv0=this.gitInv0||Yt(this.git0),this.gitInv1=this.gitInv1||Yt(this.git1),this.gitInv2=this.gitInv2||Yt(this.git2),this.gitInv3=this.gitInv3||Yt(this.git3),this.gitInv4=this.gitInv4||Yt(this.git4),this.gitInv5=this.gitInv5||Yt(this.git5),this.gitInv6=this.gitInv6||Yt(this.git6),this.gitInv7=this.gitInv7||Yt(this.git7),this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Pf,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qf}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}}const mG=t=>{const e=new yG;return e.calculate(t),e};class bG{constructor(){this.primaryColor="#eee",this.contrast="#707070",this.secondaryColor=ae(this.contrast,55),this.background="#ffffff",this.tertiaryColor=_t(this.primaryColor,{h:-160}),this.primaryBorderColor=ln(this.primaryColor,this.darkMode),this.secondaryBorderColor=ln(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=ln(this.tertiaryColor,this.darkMode),this.primaryTextColor=Yt(this.primaryColor),this.secondaryTextColor=Yt(this.secondaryColor),this.tertiaryTextColor=Yt(this.tertiaryColor),this.lineColor=Yt(this.background),this.textColor=Yt(this.background),this.mainBkg="#eee",this.secondBkg="calculated",this.lineColor="#666",this.border1="#999",this.border2="calculated",this.note="#ffa",this.text="#333",this.critical="#d42",this.done="#bbb",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial, sans-serif',this.fontSize="16px",this.THEME_COLOR_LIMIT=12,this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.excludeBkgColor="#eeeeee",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="white",this.taskTextColor="calculated",this.taskTextDarkColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBkgColor="calculated",this.critBorderColor="calculated",this.todayLineColor="calculated",this.personBorder="calculated",this.personBkg="calculated",this.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}updateColors(){this.secondBkg=ae(this.contrast,55),this.border2=this.contrast,this.cScale0=this.cScale0||"#555",this.cScale1=this.cScale1||"#F4F4F4",this.cScale2=this.cScale2||"#555",this.cScale3=this.cScale3||"#BBB",this.cScale4=this.cScale4||"#777",this.cScale5=this.cScale5||"#999",this.cScale6=this.cScale6||"#DDD",this.cScale7=this.cScale7||"#FFF",this.cScale8=this.cScale8||"#DDD",this.cScale9=this.cScale9||"#BBB",this.cScale10=this.cScale10||"#999",this.cScale11=this.cScale11||"#777";for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleInv"+e]=this["cScaleInv"+e]||Yt(this["cScale"+e]);for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this.darkMode?this["cScalePeer"+e]=this["cScalePeer"+e]||ae(this["cScale"+e],10):this["cScalePeer"+e]=this["cScalePeer"+e]||ge(this["cScale"+e],10);this.scaleLabelColor=this.scaleLabelColor||(this.darkMode?"black":this.labelTextColor),this.cScaleLabel0=this.cScaleLabel0||this.cScale1,this.cScaleLabel2=this.cScaleLabel2||this.cScale1;for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["cScaleLabel"+e]=this["cScaleLabel"+e]||this.scaleLabelColor;this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.actorBorder=ae(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor="#999",this.noteBkgColor="#666",this.noteTextColor="#fff",this.sectionBkgColor=ae(this.contrast,30),this.sectionBkgColor2=ae(this.contrast,30),this.taskBorderColor=ge(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=ae(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=ge(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.transitionColor=this.transitionColor||"#000",this.transitionLabelColor=this.transitionLabelColor||this.textColor,this.stateLabelColor=this.stateLabelColor||this.stateBkg||this.primaryTextColor,this.stateBkg=this.stateBkg||this.mainBkg,this.labelBackgroundColor=this.labelBackgroundColor||this.stateBkg,this.compositeBackground=this.compositeBackground||this.background||this.tertiaryColor,this.altBackground=this.altBackground||"#f4f4f4",this.compositeTitleBackground=this.compositeTitleBackground||this.mainBkg,this.stateBorder=this.stateBorder||"#000",this.innerEndBackground=this.primaryBorderColor,this.specialStateColor="#222",this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=_t(this.primaryColor,{h:64}),this.fillType3=_t(this.secondaryColor,{h:64}),this.fillType4=_t(this.primaryColor,{h:-64}),this.fillType5=_t(this.secondaryColor,{h:-64}),this.fillType6=_t(this.primaryColor,{h:128}),this.fillType7=_t(this.secondaryColor,{h:128});for(let e=0;e<this.THEME_COLOR_LIMIT;e++)this["pie"+e]=this["cScale"+e];this.pie12=this.pie0,this.pieTitleTextSize=this.pieTitleTextSize||"25px",this.pieTitleTextColor=this.pieTitleTextColor||this.taskTextDarkColor,this.pieSectionTextSize=this.pieSectionTextSize||"17px",this.pieSectionTextColor=this.pieSectionTextColor||this.textColor,this.pieLegendTextSize=this.pieLegendTextSize||"17px",this.pieLegendTextColor=this.pieLegendTextColor||this.taskTextDarkColor,this.pieStrokeColor=this.pieStrokeColor||"black",this.pieStrokeWidth=this.pieStrokeWidth||"2px",this.pieOpacity=this.pieOpacity||"0.7",this.requirementBackground=this.requirementBackground||this.primaryColor,this.requirementBorderColor=this.requirementBorderColor||this.primaryBorderColor,this.requirementBorderSize=this.requirementBorderSize||this.primaryBorderColor,this.requirementTextColor=this.requirementTextColor||this.primaryTextColor,this.relationColor=this.relationColor||this.lineColor,this.relationLabelBackground=this.relationLabelBackground||this.edgeLabelBackground,this.relationLabelColor=this.relationLabelColor||this.actorTextColor,this.git0=ge(this.pie1,25)||this.primaryColor,this.git1=this.pie2||this.secondaryColor,this.git2=this.pie3||this.tertiaryColor,this.git3=this.pie4||_t(this.primaryColor,{h:-30}),this.git4=this.pie5||_t(this.primaryColor,{h:-60}),this.git5=this.pie6||_t(this.primaryColor,{h:-90}),this.git6=this.pie7||_t(this.primaryColor,{h:60}),this.git7=this.pie8||_t(this.primaryColor,{h:120}),this.gitInv0=this.gitInv0||Yt(this.git0),this.gitInv1=this.gitInv1||Yt(this.git1),this.gitInv2=this.gitInv2||Yt(this.git2),this.gitInv3=this.gitInv3||Yt(this.git3),this.gitInv4=this.gitInv4||Yt(this.git4),this.gitInv5=this.gitInv5||Yt(this.git5),this.gitInv6=this.gitInv6||Yt(this.git6),this.gitInv7=this.gitInv7||Yt(this.git7),this.branchLabelColor=this.branchLabelColor||this.labelTextColor,this.gitBranchLabel0=this.branchLabelColor,this.gitBranchLabel1="white",this.gitBranchLabel2=this.branchLabelColor,this.gitBranchLabel3="white",this.gitBranchLabel4=this.branchLabelColor,this.gitBranchLabel5=this.branchLabelColor,this.gitBranchLabel6=this.branchLabelColor,this.gitBranchLabel7=this.branchLabelColor,this.tagLabelColor=this.tagLabelColor||this.primaryTextColor,this.tagLabelBackground=this.tagLabelBackground||this.primaryColor,this.tagLabelBorder=this.tagBorder||this.primaryBorderColor,this.tagLabelFontSize=this.tagLabelFontSize||"10px",this.commitLabelColor=this.commitLabelColor||this.secondaryTextColor,this.commitLabelBackground=this.commitLabelBackground||this.secondaryColor,this.commitLabelFontSize=this.commitLabelFontSize||"10px",this.attributeBackgroundColorOdd=this.attributeBackgroundColorOdd||Pf,this.attributeBackgroundColorEven=this.attributeBackgroundColorEven||qf}calculate(e){if(typeof e!="object"){this.updateColors();return}const r=Object.keys(e);r.forEach(n=>{this[n]=e[n]}),this.updateColors(),r.forEach(n=>{this[n]=e[n]})}}const aa={base:{getThemeVariables:hG},dark:{getThemeVariables:dG},default:{getThemeVariables:gG},forest:{getThemeVariables:mG},neutral:{getThemeVariables:t=>{const e=new bG;return e.calculate(t),e}}},Xa={theme:"default",themeVariables:aa.default.getThemeVariables(),themeCSS:void 0,maxTextSize:5e4,darkMode:!1,fontFamily:'"trebuchet ms", verdana, arial, sans-serif;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],lazyLoadedDiagrams:[],deterministicIds:!1,deterministicIDSeed:void 0,flowchart:{diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"basis",padding:15,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},sequence:{hideUnusedParticipants:!1,activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,forceMenus:!1,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open Sans", sans-serif',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial, sans-serif',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial, sans-serif',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,sectionFontSize:11,numberSectionStyles:4,axisFormat:"%Y-%m-%d",useMaxWidth:!0,topAxis:!1,useWidth:void 0},journey:{diagramMarginX:50,diagramMarginY:10,leftMargin:150,width:150,height:50,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,taskFontSize:14,taskFontFamily:'"Open Sans", sans-serif',taskMargin:50,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},class:{arrowMarkerAbsolute:!1,dividerMargin:10,padding:5,textHeight:10,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},state:{dividerMargin:10,sizeUnit:5,padding:8,textHeight:10,titleShift:-15,noteMargin:10,forkWidth:70,forkHeight:7,miniPadding:2,fontSizeFactor:5.02,fontSize:24,labelHeight:16,edgeLengthFactor:"20",compositTitleSize:35,radius:5,useMaxWidth:!0,defaultRenderer:"dagre-wrapper"},er:{diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12,useMaxWidth:!0},pie:{useWidth:void 0,useMaxWidth:!0},requirement:{useWidth:void 0,useMaxWidth:!0,rect_fill:"#f9f9f9",text_color:"#333",rect_border_size:"0.5px",rect_border_color:"#bbb",rect_min_width:200,rect_min_height:200,fontSize:14,rect_padding:10,line_height:20},gitGraph:{diagramPadding:8,nodeLabel:{width:75,height:100,x:-25,y:0},mainBranchName:"main",mainBranchOrder:0,showCommitLabel:!0,showBranches:!0,rotateCommitLabel:!0},c4:{useWidth:void 0,diagramMarginX:50,diagramMarginY:10,c4ShapeMargin:50,c4ShapePadding:20,width:216,height:60,boxMargin:10,useMaxWidth:!0,c4ShapeInRow:4,nextLinePaddingX:0,c4BoundaryInRow:2,personFontSize:14,personFontFamily:'"Open Sans", sans-serif',personFontWeight:"normal",external_personFontSize:14,external_personFontFamily:'"Open Sans", sans-serif',external_personFontWeight:"normal",systemFontSize:14,systemFontFamily:'"Open Sans", sans-serif',systemFontWeight:"normal",external_systemFontSize:14,external_systemFontFamily:'"Open Sans", sans-serif',external_systemFontWeight:"normal",system_dbFontSize:14,system_dbFontFamily:'"Open Sans", sans-serif',system_dbFontWeight:"normal",external_system_dbFontSize:14,external_system_dbFontFamily:'"Open Sans", sans-serif',external_system_dbFontWeight:"normal",system_queueFontSize:14,system_queueFontFamily:'"Open Sans", sans-serif',system_queueFontWeight:"normal",external_system_queueFontSize:14,external_system_queueFontFamily:'"Open Sans", sans-serif',external_system_queueFontWeight:"normal",boundaryFontSize:14,boundaryFontFamily:'"Open Sans", sans-serif',boundaryFontWeight:"normal",messageFontSize:12,messageFontFamily:'"Open Sans", sans-serif',messageFontWeight:"normal",containerFontSize:14,containerFontFamily:'"Open Sans", sans-serif',containerFontWeight:"normal",external_containerFontSize:14,external_containerFontFamily:'"Open Sans", sans-serif',external_containerFontWeight:"normal",container_dbFontSize:14,container_dbFontFamily:'"Open Sans", sans-serif',container_dbFontWeight:"normal",external_container_dbFontSize:14,external_container_dbFontFamily:'"Open Sans", sans-serif',external_container_dbFontWeight:"normal",container_queueFontSize:14,container_queueFontFamily:'"Open Sans", sans-serif',container_queueFontWeight:"normal",external_container_queueFontSize:14,external_container_queueFontFamily:'"Open Sans", sans-serif',external_container_queueFontWeight:"normal",componentFontSize:14,componentFontFamily:'"Open Sans", sans-serif',componentFontWeight:"normal",external_componentFontSize:14,external_componentFontFamily:'"Open Sans", sans-serif',external_componentFontWeight:"normal",component_dbFontSize:14,component_dbFontFamily:'"Open Sans", sans-serif',component_dbFontWeight:"normal",external_component_dbFontSize:14,external_component_dbFontFamily:'"Open Sans", sans-serif',external_component_dbFontWeight:"normal",component_queueFontSize:14,component_queueFontFamily:'"Open Sans", sans-serif',component_queueFontWeight:"normal",external_component_queueFontSize:14,external_component_queueFontFamily:'"Open Sans", sans-serif',external_component_queueFontWeight:"normal",wrap:!0,wrapPadding:10,personFont:function(){return{fontFamily:this.personFontFamily,fontSize:this.personFontSize,fontWeight:this.personFontWeight}},external_personFont:function(){return{fontFamily:this.external_personFontFamily,fontSize:this.external_personFontSize,fontWeight:this.external_personFontWeight}},systemFont:function(){return{fontFamily:this.systemFontFamily,fontSize:this.systemFontSize,fontWeight:this.systemFontWeight}},external_systemFont:function(){return{fontFamily:this.external_systemFontFamily,fontSize:this.external_systemFontSize,fontWeight:this.external_systemFontWeight}},system_dbFont:function(){return{fontFamily:this.system_dbFontFamily,fontSize:this.system_dbFontSize,fontWeight:this.system_dbFontWeight}},external_system_dbFont:function(){return{fontFamily:this.external_system_dbFontFamily,fontSize:this.external_system_dbFontSize,fontWeight:this.external_system_dbFontWeight}},system_queueFont:function(){return{fontFamily:this.system_queueFontFamily,fontSize:this.system_queueFontSize,fontWeight:this.system_queueFontWeight}},external_system_queueFont:function(){return{fontFamily:this.external_system_queueFontFamily,fontSize:this.external_system_queueFontSize,fontWeight:this.external_system_queueFontWeight}},containerFont:function(){return{fontFamily:this.containerFontFamily,fontSize:this.containerFontSize,fontWeight:this.containerFontWeight}},external_containerFont:function(){return{fontFamily:this.external_containerFontFamily,fontSize:this.external_containerFontSize,fontWeight:this.external_containerFontWeight}},container_dbFont:function(){return{fontFamily:this.container_dbFontFamily,fontSize:this.container_dbFontSize,fontWeight:this.container_dbFontWeight}},external_container_dbFont:function(){return{fontFamily:this.external_container_dbFontFamily,fontSize:this.external_container_dbFontSize,fontWeight:this.external_container_dbFontWeight}},container_queueFont:function(){return{fontFamily:this.container_queueFontFamily,fontSize:this.container_queueFontSize,fontWeight:this.container_queueFontWeight}},external_container_queueFont:function(){return{fontFamily:this.external_container_queueFontFamily,fontSize:this.external_container_queueFontSize,fontWeight:this.external_container_queueFontWeight}},componentFont:function(){return{fontFamily:this.componentFontFamily,fontSize:this.componentFontSize,fontWeight:this.componentFontWeight}},external_componentFont:function(){return{fontFamily:this.external_componentFontFamily,fontSize:this.external_componentFontSize,fontWeight:this.external_componentFontWeight}},component_dbFont:function(){return{fontFamily:this.component_dbFontFamily,fontSize:this.component_dbFontSize,fontWeight:this.component_dbFontWeight}},external_component_dbFont:function(){return{fontFamily:this.external_component_dbFontFamily,fontSize:this.external_component_dbFontSize,fontWeight:this.external_component_dbFontWeight}},component_queueFont:function(){return{fontFamily:this.component_queueFontFamily,fontSize:this.component_queueFontSize,fontWeight:this.component_queueFontWeight}},external_component_queueFont:function(){return{fontFamily:this.external_component_queueFontFamily,fontSize:this.external_component_queueFontSize,fontWeight:this.external_component_queueFontWeight}},boundaryFont:function(){return{fontFamily:this.boundaryFontFamily,fontSize:this.boundaryFontSize,fontWeight:this.boundaryFontWeight}},messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},person_bg_color:"#08427B",person_border_color:"#073B6F",external_person_bg_color:"#686868",external_person_border_color:"#8A8A8A",system_bg_color:"#1168BD",system_border_color:"#3C7FC0",system_db_bg_color:"#1168BD",system_db_border_color:"#3C7FC0",system_queue_bg_color:"#1168BD",system_queue_border_color:"#3C7FC0",external_system_bg_color:"#999999",external_system_border_color:"#8A8A8A",external_system_db_bg_color:"#999999",external_system_db_border_color:"#8A8A8A",external_system_queue_bg_color:"#999999",external_system_queue_border_color:"#8A8A8A",container_bg_color:"#438DD5",container_border_color:"#3C7FC0",container_db_bg_color:"#438DD5",container_db_border_color:"#3C7FC0",container_queue_bg_color:"#438DD5",container_queue_border_color:"#3C7FC0",external_container_bg_color:"#B3B3B3",external_container_border_color:"#A6A6A6",external_container_db_bg_color:"#B3B3B3",external_container_db_border_color:"#A6A6A6",external_container_queue_bg_color:"#B3B3B3",external_container_queue_border_color:"#A6A6A6",component_bg_color:"#85BBF0",component_border_color:"#78A8D8",component_db_bg_color:"#85BBF0",component_db_border_color:"#78A8D8",component_queue_bg_color:"#85BBF0",component_queue_border_color:"#78A8D8",external_component_bg_color:"#CCCCCC",external_component_border_color:"#BFBFBF",external_component_db_bg_color:"#CCCCCC",external_component_db_border_color:"#BFBFBF",external_component_queue_bg_color:"#CCCCCC",external_component_queue_border_color:"#BFBFBF"},mindmap:{useMaxWidth:!0,padding:10,maxNodeWidth:200},fontSize:16};Xa.class&&(Xa.class.arrowMarkerAbsolute=Xa.arrowMarkerAbsolute),Xa.gitGraph&&(Xa.gitGraph.arrowMarkerAbsolute=Xa.arrowMarkerAbsolute);const Xk=(t,e="")=>Object.keys(t).reduce((r,n)=>Array.isArray(t[n])?r:typeof t[n]=="object"&&t[n]!==null?[...r,e+n,...Xk(t[n],"")]:[...r,e+n],[]),_G=Xk(Xa,""),vG=/[%]{2}[{]\s*(?:(?:(\w+)\s*:|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi,xG=/\s*%%.*\n/gm,Vf={},Xp=function(t,e){t=t.replace(vG,"").replace(xG,`
+`);for(const[r,{detector:n}]of Object.entries(Vf))if(n(t,e))return r;throw new Error(`No diagram type detected for text: ${t}`)},Kk=(t,e,r)=>{if(Vf[t])throw new Error(`Detector with key ${t} already exists`);Vf[t]={detector:e,loader:r},H.debug(`Detector with key ${t} added${r?" with loader":""}`)},kG=t=>Vf[t].loader,fr=function(t,e,r){const{depth:n,clobber:i}=Object.assign({depth:2,clobber:!1},r);return Array.isArray(e)&&!Array.isArray(t)?(e.forEach(a=>fr(t,a,r)),t):Array.isArray(e)&&Array.isArray(t)?(e.forEach(a=>{t.indexOf(a)===-1&&t.push(a)}),t):typeof t>"u"||n<=0?t!=null&&typeof t=="object"&&typeof e=="object"?Object.assign(t,e):e:(typeof e<"u"&&typeof t=="object"&&typeof e=="object"&&Object.keys(e).forEach(a=>{typeof e[a]=="object"&&(t[a]===void 0||typeof t[a]=="object")?(t[a]===void 0&&(t[a]=Array.isArray(e[a])?[]:{}),t[a]=fr(t[a],e[a],{depth:n-1,clobber:i})):(i||typeof t[a]!="object"&&typeof e[a]!="object")&&(t[a]=e[a])}),t)};var wG=typeof jr=="object"&&jr&&jr.Object===Object&&jr,Zk=wG,TG=Zk,EG=typeof self=="object"&&self&&self.Object===Object&&self,CG=TG||EG||Function("return this")(),si=CG,SG=si,AG=SG.Symbol,zo=AG,Qk=zo,Jk=Object.prototype,MG=Jk.hasOwnProperty,LG=Jk.toString,Ac=Qk?Qk.toStringTag:void 0;function RG(t){var e=MG.call(t,Ac),r=t[Ac];try{t[Ac]=void 0;var n=!0}catch{}var i=LG.call(t);return n&&(e?t[Ac]=r:delete t[Ac]),i}var IG=RG,NG=Object.prototype,BG=NG.toString;function DG(t){return BG.call(t)}var OG=DG,tw=zo,FG=IG,PG=OG,qG="[object Null]",VG="[object Undefined]",ew=tw?tw.toStringTag:void 0;function zG(t){return t==null?t===void 0?VG:qG:ew&&ew in Object(t)?FG(t):PG(t)}var Ps=zG;function YG(t){var e=typeof t;return t!=null&&(e=="object"||e=="function")}var Vn=YG,UG=Ps,WG=Vn,HG="[object AsyncFunction]",GG="[object Function]",jG="[object GeneratorFunction]",$G="[object Proxy]";function XG(t){if(!WG(t))return!1;var e=UG(t);return e==GG||e==jG||e==HG||e==$G}var Yo=XG,KG=si,ZG=KG["__core-js_shared__"],QG=ZG,Kp=QG,rw=function(){var t=/[^.]+$/.exec(Kp&&Kp.keys&&Kp.keys.IE_PROTO||"");return t?"Symbol(src)_1."+t:""}();function JG(t){return!!rw&&rw in t}var tj=JG,ej=Function.prototype,rj=ej.toString;function nj(t){if(t!=null){try{return rj.call(t)}catch{}try{return t+""}catch{}}return""}var nw=nj,ij=Yo,aj=tj,sj=Vn,oj=nw,lj=/[\\^$.*+?()[\]{}|]/g,cj=/^\[object .+?Constructor\]$/,uj=Function.prototype,hj=Object.prototype,fj=uj.toString,dj=hj.hasOwnProperty,pj=RegExp("^"+fj.call(dj).replace(lj,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function gj(t){if(!sj(t)||aj(t))return!1;var e=ij(t)?pj:cj;return e.test(oj(t))}var yj=gj;function mj(t,e){return t==null?void 0:t[e]}var bj=mj,_j=yj,vj=bj;function xj(t,e){var r=vj(t,e);return _j(r)?r:void 0}var qs=xj,kj=qs,wj=kj(Object,"create"),zf=wj,iw=zf;function Tj(){this.__data__=iw?iw(null):{},this.size=0}var Ej=Tj;function Cj(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}var Sj=Cj,Aj=zf,Mj="__lodash_hash_undefined__",Lj=Object.prototype,Rj=Lj.hasOwnProperty;function Ij(t){var e=this.__data__;if(Aj){var r=e[t];return r===Mj?void 0:r}return Rj.call(e,t)?e[t]:void 0}var Nj=Ij,Bj=zf,Dj=Object.prototype,Oj=Dj.hasOwnProperty;function Fj(t){var e=this.__data__;return Bj?e[t]!==void 0:Oj.call(e,t)}var Pj=Fj,qj=zf,Vj="__lodash_hash_undefined__";function zj(t,e){var r=this.__data__;return this.size+=this.has(t)?0:1,r[t]=qj&&e===void 0?Vj:e,this}var Yj=zj,Uj=Ej,Wj=Sj,Hj=Nj,Gj=Pj,jj=Yj;function Uo(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Uo.prototype.clear=Uj,Uo.prototype.delete=Wj,Uo.prototype.get=Hj,Uo.prototype.has=Gj,Uo.prototype.set=jj;var $j=Uo;function Xj(){this.__data__=[],this.size=0}var Kj=Xj;function Zj(t,e){return t===e||t!==t&&e!==e}var Wo=Zj,Qj=Wo;function Jj(t,e){for(var r=t.length;r--;)if(Qj(t[r][0],e))return r;return-1}var Yf=Jj,t$=Yf,e$=Array.prototype,r$=e$.splice;function n$(t){var e=this.__data__,r=t$(e,t);if(r<0)return!1;var n=e.length-1;return r==n?e.pop():r$.call(e,r,1),--this.size,!0}var i$=n$,a$=Yf;function s$(t){var e=this.__data__,r=a$(e,t);return r<0?void 0:e[r][1]}var o$=s$,l$=Yf;function c$(t){return l$(this.__data__,t)>-1}var u$=c$,h$=Yf;function f$(t,e){var r=this.__data__,n=h$(r,t);return n<0?(++this.size,r.push([t,e])):r[n][1]=e,this}var d$=f$,p$=Kj,g$=i$,y$=o$,m$=u$,b$=d$;function Ho(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Ho.prototype.clear=p$,Ho.prototype.delete=g$,Ho.prototype.get=y$,Ho.prototype.has=m$,Ho.prototype.set=b$;var Uf=Ho,_$=qs,v$=si,x$=_$(v$,"Map"),Zp=x$,aw=$j,k$=Uf,w$=Zp;function T$(){this.size=0,this.__data__={hash:new aw,map:new(w$||k$),string:new aw}}var E$=T$;function C$(t){var e=typeof t;return e=="string"||e=="number"||e=="symbol"||e=="boolean"?t!=="__proto__":t===null}var S$=C$,A$=S$;function M$(t,e){var r=t.__data__;return A$(e)?r[typeof e=="string"?"string":"hash"]:r.map}var Wf=M$,L$=Wf;function R$(t){var e=L$(this,t).delete(t);return this.size-=e?1:0,e}var I$=R$,N$=Wf;function B$(t){return N$(this,t).get(t)}var D$=B$,O$=Wf;function F$(t){return O$(this,t).has(t)}var P$=F$,q$=Wf;function V$(t,e){var r=q$(this,t),n=r.size;return r.set(t,e),this.size+=r.size==n?0:1,this}var z$=V$,Y$=E$,U$=I$,W$=D$,H$=P$,G$=z$;function Go(t){var e=-1,r=t==null?0:t.length;for(this.clear();++e<r;){var n=t[e];this.set(n[0],n[1])}}Go.prototype.clear=Y$,Go.prototype.delete=U$,Go.prototype.get=W$,Go.prototype.has=H$,Go.prototype.set=G$;var Qp=Go,sw=Qp,j$="Expected a function";function Jp(t,e){if(typeof t!="function"||e!=null&&typeof e!="function")throw new TypeError(j$);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],a=r.cache;if(a.has(i))return a.get(i);var s=t.apply(this,n);return r.cache=a.set(i,s)||a,s};return r.cache=new(Jp.Cache||sw),r}Jp.Cache=sw;var Hf=Jp;const $$={curveBasis:Os,curveBasisClosed:sk,curveBasisOpen:lk,curveLinear:yn,curveLinearClosed:pk,curveMonotoneX:vk,curveMonotoneY:xk,curveNatural:Tk,curveStep:Ek,curveStepAfter:Sk,curveStepBefore:Ck},tg=/[%]{2}[{]\s*(?:(?:(\w+)\s*:|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi,X$=/\s*(?:(?:(\w+)(?=:):|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi,K$=function(t,e){const r=ow(t,/(?:init\b)|(?:initialize\b)/);let n={};if(Array.isArray(r)){const i=r.map(a=>a.args);Vs(i),n=fr(n,[...i])}else n=r.args;if(n){let i=Xp(t,e);["config"].forEach(a=>{typeof n[a]<"u"&&(i==="flowchart-v2"&&(i="flowchart"),n[i]=n[a],delete n[a])})}return n},ow=function(t,e=null){try{const r=new RegExp(`[%]{2}(?![{]${X$.source})(?=[}][%]{2}).*
+`,"ig");t=t.trim().replace(r,"").replace(/'/gm,'"'),H.debug(`Detecting diagram directive${e!==null?" type:"+e:""} based on the text:${t}`);let n;const i=[];for(;(n=tg.exec(t))!==null;)if(n.index===tg.lastIndex&&tg.lastIndex++,n&&!e||e&&n[1]&&n[1].match(e)||e&&n[2]&&n[2].match(e)){const a=n[1]?n[1]:n[2],s=n[3]?n[3].trim():n[4]?JSON.parse(n[4].trim()):null;i.push({type:a,args:s})}return i.length===0&&i.push({type:t,args:null}),i.length===1?i[0]:i}catch(r){return H.error(`ERROR: ${r.message} - Unable to parse directive
+ ${e!==null?" type:"+e:""} based on the text:${t}`),{type:null,args:null}}},Z$=function(t,e){for(let r=0;r<e.length;r++)if(e[r].match(t))return r;return-1},Ni=(t,e)=>{if(!t)return e;const r=`curve${t.charAt(0).toUpperCase()+t.slice(1)}`;return $$[r]||e},Q$=(t,e)=>{const r=t.trim();if(r)return e.securityLevel!=="loose"?ki(r):r},J$=(t,...e)=>{const r=t.split("."),n=r.length-1,i=r[n];let a=window;for(let s=0;s<n;s++)if(a=a[r[s]],!a)return;a[i](...e)},Mc=(t,e)=>t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0,tX=t=>{let e,r=0;t.forEach(a=>{r+=Mc(a,e),e=a});let n=r/2,i;return e=void 0,t.forEach(a=>{if(e&&!i){const s=Mc(a,e);if(s<n)n-=s;else{const o=n/s;o<=0&&(i=e),o>=1&&(i={x:a.x,y:a.y}),o>0&&o<1&&(i={x:(1-o)*e.x+o*a.x,y:(1-o)*e.y+o*a.y})}}e=a}),i},eX=t=>t.length===1?t[0]:tX(t),rX=(t,e,r)=>{let n;H.info("our points",e),e[0]!==r&&(e=e.reverse()),e.forEach(h=>{totalDistance+=Mc(h,n),n=h});let a=25,s;n=void 0,e.forEach(h=>{if(n&&!s){const d=Mc(h,n);if(d<a)a-=d;else{const f=a/d;f<=0&&(s=n),f>=1&&(s={x:h.x,y:h.y}),f>0&&f<1&&(s={x:(1-f)*n.x+f*h.x,y:(1-f)*n.y+f*h.y})}}n=h});const o=t?10:5,l=Math.atan2(e[0].y-s.y,e[0].x-s.x),u={x:0,y:0};return u.x=Math.sin(l)*o+(e[0].x+s.x)/2,u.y=-Math.cos(l)*o+(e[0].y+s.y)/2,u},nX=(t,e,r)=>{let n=JSON.parse(JSON.stringify(r)),i;H.info("our points",n),e!=="start_left"&&e!=="start_right"&&(n=n.reverse()),n.forEach(d=>{i=d});let s=25+t,o;i=void 0,n.forEach(d=>{if(i&&!o){const f=Mc(d,i);if(f<s)s-=f;else{const p=s/f;p<=0&&(o=i),p>=1&&(o={x:d.x,y:d.y}),p>0&&p<1&&(o={x:(1-p)*i.x+p*d.x,y:(1-p)*i.y+p*d.y})}}i=d});const l=10+t*.5,u=Math.atan2(n[0].y-o.y,n[0].x-o.x),h={x:0,y:0};return h.x=Math.sin(u)*l+(n[0].x+o.x)/2,h.y=-Math.cos(u)*l+(n[0].y+o.y)/2,e==="start_left"&&(h.x=Math.sin(u+Math.PI)*l+(n[0].x+o.x)/2,h.y=-Math.cos(u+Math.PI)*l+(n[0].y+o.y)/2),e==="end_right"&&(h.x=Math.sin(u-Math.PI)*l+(n[0].x+o.x)/2-5,h.y=-Math.cos(u-Math.PI)*l+(n[0].y+o.y)/2-5),e==="end_left"&&(h.x=Math.sin(u)*l+(n[0].x+o.x)/2-5,h.y=-Math.cos(u)*l+(n[0].y+o.y)/2-5),h},Ka=t=>{let e="",r="";for(let n=0;n<t.length;n++)typeof t[n]<"u"&&(t[n].startsWith("color:")||t[n].startsWith("text-align:")?r=r+t[n]+";":e=e+t[n]+";");return{style:e,labelStyle:r}};let lw=0;const cw=()=>(lw++,"id-"+Math.random().toString(36).substr(2,12)+"-"+lw);function iX(t){let e="";const r="0123456789abcdef",n=r.length;for(let i=0;i<t;i++)e+=r.charAt(Math.floor(Math.random()*n));return e}const uw=t=>iX(t.length),aX=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}},sX=function(t,e){const r=e.text.replace(pe.lineBreakRegex," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.style("text-anchor",e.anchor),n.style("font-family",e.fontFamily),n.style("font-size",e.fontSize),n.style("font-weight",e.fontWeight),n.attr("fill",e.fill),typeof e.class<"u"&&n.attr("class",e.class);const i=n.append("tspan");return i.attr("x",e.x+e.textMargin*2),i.attr("fill",e.fill),i.text(r),n},hw=Hf((t,e,r)=>{if(!t||(r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},r),pe.lineBreakRegex.test(t)))return t;const n=t.split(" "),i=[];let a="";return n.forEach((s,o)=>{const l=Bi(`${s} `,r),u=Bi(a,r);if(l>e){const{hyphenatedStrings:f,remainingWord:p}=oX(s,e,"-",r);i.push(a,...f),a=p}else u+l>=e?(i.push(a),a=s):a=[a,s].filter(Boolean).join(" ");o+1===n.length&&i.push(a)}),i.filter(s=>s!=="").join(r.joinWith)},(t,e,r)=>`${t}${e}${r.fontSize}${r.fontWeight}${r.fontFamily}${r.joinWith}`),oX=Hf((t,e,r="-",n)=>{n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},n);const i=t.split(""),a=[];let s="";return i.forEach((o,l)=>{const u=`${s}${o}`;if(Bi(u,n)>=e){const d=l+1,f=i.length===d,p=`${u}${r}`;a.push(f?u:p),s=""}else s=u}),{hyphenatedStrings:a,remainingWord:s}},(t,e,r="-",n)=>`${t}${e}${r}${n.fontSize}${n.fontWeight}${n.fontFamily}`),eg=function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),rg(t,e).height},Bi=function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),rg(t,e).width},rg=Hf(function(t,e){e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e);const{fontSize:r,fontFamily:n,fontWeight:i}=e;if(!t)return{width:0,height:0};const a=["sans-serif",n],s=t.split(pe.lineBreakRegex),o=[],l=St("body");if(!l.remove)return{width:0,height:0,lineHeight:0};const u=l.append("svg");for(const d of a){let f=0;const p={width:0,height:0,lineHeight:0};for(const m of s){const _=aX();_.text=m;const y=sX(u,_).style("font-size",r).style("font-weight",i).style("font-family",d),b=(y._groups||y)[0][0].getBBox();p.width=Math.round(Math.max(p.width,b.width)),f=Math.round(b.height),p.height+=f,p.lineHeight=Math.round(Math.max(p.lineHeight,f))}o.push(p)}u.remove();const h=isNaN(o[1].height)||isNaN(o[1].width)||isNaN(o[1].lineHeight)||o[0].height>o[1].height&&o[0].width>o[1].width&&o[0].lineHeight>o[1].lineHeight?0:1;return o[h]},(t,e)=>`${t}${e.fontSize}${e.fontWeight}${e.fontFamily}`),lX=class{constructor(e,r){this.deterministic=e,this.seed=r,this.count=r?r.length:0}next(){return this.deterministic?this.count++:Date.now()}};let Gf;const cX=function(t){return Gf=Gf||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),Gf.innerHTML=t,unescape(Gf.textContent)},Vs=t=>{if(H.debug("directiveSanitizer called with",t),typeof t=="object"&&(t.length?t.forEach(e=>Vs(e)):Object.keys(t).forEach(e=>{H.debug("Checking key",e),e.indexOf("__")===0&&(H.debug("sanitize deleting __ option",e),delete t[e]),e.indexOf("proto")>=0&&(H.debug("sanitize deleting proto option",e),delete t[e]),e.indexOf("constr")>=0&&(H.debug("sanitize deleting constr option",e),delete t[e]),e.indexOf("themeCSS")>=0&&(H.debug("sanitizing themeCss option"),t[e]=jf(t[e])),e.indexOf("fontFamily")>=0&&(H.debug("sanitizing fontFamily option"),t[e]=jf(t[e])),e.indexOf("altFontFamily")>=0&&(H.debug("sanitizing altFontFamily option"),t[e]=jf(t[e])),_G.indexOf(e)<0?(H.debug("sanitize deleting option",e),delete t[e]):typeof t[e]=="object"&&(H.debug("sanitize deleting object",e),Vs(t[e]))})),t.themeVariables){const e=Object.keys(t.themeVariables);for(let r=0;r<e.length;r++){const n=e[r],i=t.themeVariables[n];i&&i.match&&!i.match(/^[a-zA-Z0-9#,";()%. ]+$/)&&(t.themeVariables[n]="")}}H.debug("After sanitization",t)},jf=t=>{let e=0,r=0;for(let n=0;n<t.length;n++){if(e<r)return"{ /* ERROR: Unbalanced CSS */ }";t[n]==="{"?e++:t[n]==="}"&&r++}return e!==r?"{ /* ERROR: Unbalanced CSS */ }":t};function ng(t){return"str"in t}function uX(t){return t instanceof Error?t.message:String(t)}const Se={assignWithDepth:fr,wrapLabel:hw,calculateTextHeight:eg,calculateTextWidth:Bi,calculateTextDimensions:rg,detectInit:K$,detectDirective:ow,isSubstringInArray:Z$,interpolateToCurve:Ni,calcLabelPosition:eX,calcCardinalityPosition:rX,calcTerminalLabelPosition:nX,formatUrl:Q$,getStylesFromArray:Ka,generateId:cw,random:uw,runFunc:J$,entityDecode:cX,initIdGenerator:lX,directiveSanitizer:Vs,sanitizeCss:jf};var fw="comm",dw="rule",pw="decl",hX="@import",fX="@keyframes",dX=Math.abs,ig=String.fromCharCode;function gw(t){return t.trim()}function ag(t,e,r){return t.replace(e,r)}function pX(t,e){return t.indexOf(e)}function $f(t,e){return t.charCodeAt(e)|0}function Lc(t,e,r){return t.slice(e,r)}function Za(t){return t.length}function yw(t){return t.length}function Xf(t,e){return e.push(t),t}var Kf=1,jo=1,mw=0,zn=0,dr=0,$o="";function sg(t,e,r,n,i,a,s){return{value:t,root:e,parent:r,type:n,props:i,children:a,line:Kf,column:jo,length:s,return:""}}function gX(){return dr}function yX(){return dr=zn>0?$f($o,--zn):0,jo--,dr===10&&(jo=1,Kf--),dr}function oi(){return dr=zn<mw?$f($o,zn++):0,jo++,dr===10&&(jo=1,Kf++),dr}function zs(){return $f($o,zn)}function Zf(){return zn}function Qf(t,e){return Lc($o,t,e)}function og(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 mX(t){return Kf=jo=1,mw=Za($o=t),zn=0,[]}function bX(t){return $o="",t}function lg(t){return gw(Qf(zn-1,cg(t===91?t+2:t===40?t+1:t)))}function _X(t){for(;(dr=zs())&&dr<33;)oi();return og(t)>2||og(dr)>3?"":" "}function vX(t,e){for(;--e&&oi()&&!(dr<48||dr>102||dr>57&&dr<65||dr>70&&dr<97););return Qf(t,Zf()+(e<6&&zs()==32&&oi()==32))}function cg(t){for(;oi();)switch(dr){case t:return zn;case 34:case 39:t!==34&&t!==39&&cg(dr);break;case 40:t===41&&cg(t);break;case 92:oi();break}return zn}function xX(t,e){for(;oi()&&t+dr!==47+10;)if(t+dr===42+42&&zs()===47)break;return"/*"+Qf(e,zn-1)+"*"+ig(t===47?t:oi())}function kX(t){for(;!og(zs());)oi();return Qf(t,zn)}function bw(t){return bX(Jf("",null,null,null,[""],t=mX(t),0,[0],t))}function Jf(t,e,r,n,i,a,s,o,l){for(var u=0,h=0,d=s,f=0,p=0,m=0,_=1,y=1,b=1,x=0,k="",T=i,C=a,M=n,S=k;y;)switch(m=x,x=oi()){case 40:if(m!=108&&$f(S,d-1)==58){pX(S+=ag(lg(x),"&","&\f"),"&\f")!=-1&&(b=-1);break}case 34:case 39:case 91:S+=lg(x);break;case 9:case 10:case 13:case 32:S+=_X(m);break;case 92:S+=vX(Zf()-1,7);continue;case 47:switch(zs()){case 42:case 47:Xf(wX(xX(oi(),Zf()),e,r),l);break;default:S+="/"}break;case 123*_:o[u++]=Za(S)*b;case 125*_:case 59:case 0:switch(x){case 0:case 125:y=0;case 59+h:p>0&&Za(S)-d&&Xf(p>32?vw(S+";",n,r,d-1):vw(ag(S," ","")+";",n,r,d-2),l);break;case 59:S+=";";default:if(Xf(M=_w(S,e,r,u,h,i,o,k,T=[],C=[],d),a),x===123)if(h===0)Jf(S,e,M,M,T,a,d,o,C);else switch(f){case 100:case 109:case 115:Jf(t,M,M,n&&Xf(_w(t,M,M,0,0,i,o,k,i,T=[],d),C),i,C,d,o,n?T:C);break;default:Jf(S,M,M,M,[""],C,0,o,C)}}u=h=p=0,_=b=1,k=S="",d=s;break;case 58:d=1+Za(S),p=m;default:if(_<1){if(x==123)--_;else if(x==125&&_++==0&&yX()==125)continue}switch(S+=ig(x),x*_){case 38:b=h>0?1:(S+="\f",-1);break;case 44:o[u++]=(Za(S)-1)*b,b=1;break;case 64:zs()===45&&(S+=lg(oi())),f=zs(),h=d=Za(k=S+=kX(Zf())),x++;break;case 45:m===45&&Za(S)==2&&(_=0)}}return a}function _w(t,e,r,n,i,a,s,o,l,u,h){for(var d=i-1,f=i===0?a:[""],p=yw(f),m=0,_=0,y=0;m<n;++m)for(var b=0,x=Lc(t,d+1,d=dX(_=s[m])),k=t;b<p;++b)(k=gw(_>0?f[b]+" "+x:ag(x,/&\f/g,f[b])))&&(l[y++]=k);return sg(t,e,r,i===0?dw:o,l,u,h)}function wX(t,e,r){return sg(t,e,r,fw,ig(gX()),Lc(t,2,-2),0)}function vw(t,e,r,n){return sg(t,e,r,pw,Lc(t,0,n),Lc(t,n+1,-1),n)}function t1(t,e){for(var r="",n=yw(t),i=0;i<n;i++)r+=e(t[i],i,t,e)||"";return r}function xw(t,e,r,n){switch(t.type){case hX:case pw:return t.return=t.return||t.value;case fw:return"";case fX:return t.return=t.value+"{"+t1(t.children,n)+"}";case dw:t.value=t.props.join(",")}return Za(r=t1(t.children,n))?t.return=t.value+"{"+r+"}":""}const e1={name:"mermaid",version:"9.2.0",description:"Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.",main:"./dist/mermaid.core.mjs",module:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts",type:"module",exports:{".":{require:"./dist/mermaid.min.js",import:"./dist/mermaid.core.mjs",types:"./dist/mermaid.d.ts"},"./*":"./*"},keywords:["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph"],scripts:{clean:"rimraf dist","build:code":"node .esbuild/esbuild.cjs","build:types":"tsc -p ./tsconfig.json --emitDeclarationOnly","build:watch":"yarn build:code --watch","build:esbuild":'concurrently "yarn build:code" "yarn build:types"',build:"yarn clean; yarn build:esbuild",dev:"node .esbuild/serve.cjs","docs:build":"ts-node-esm src/docs.mts","docs:verify":"yarn docs:build --verify","todo-postbuild":"documentation build src/mermaidAPI.ts src/config.ts src/defaultConfig.ts --shallow -f md --markdown-toc false > src/docs/Setup.md && prettier --write src/docs/Setup.md",release:"yarn build",lint:"eslint --cache --ignore-path .gitignore . && yarn lint:jison && prettier --check .","lint:fix":"eslint --fix --ignore-path .gitignore . && prettier --write .","lint:jison":"ts-node-esm src/jison/lint.mts",cypress:"cypress run","cypress:open":"cypress open",e2e:"start-server-and-test dev http://localhost:9000/ cypress","todo-prepare":'concurrently "husky install" "yarn build"',"pre-commit":"lint-staged"},repository:{type:"git",url:"https://github.com/mermaid-js/mermaid"},author:"Knut Sveidqvist",license:"MIT",standard:{ignore:["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],globals:["page"]},dependencies:{"@braintree/sanitize-url":"^6.0.0",d3:"^7.0.0",dagre:"^0.8.5","dagre-d3":"^0.6.4",dompurify:"2.4.0","fast-clone":"^1.5.13",graphlib:"^2.1.8",khroma:"^2.0.0",lodash:"^4.17.21","moment-mini":"^2.24.0","non-layered-tidy-tree-layout":"^2.0.2",stylis:"^4.1.2",uuid:"^9.0.0"},devDependencies:{"@applitools/eyes-cypress":"^3.25.7","@commitlint/cli":"^17.1.2","@commitlint/config-conventional":"^17.0.0","@types/d3":"^7.4.0","@types/dompurify":"^2.3.4","@types/eslint":"^8.4.6","@types/express":"^4.17.13","@types/jsdom":"^20.0.0","@types/lodash":"^4.14.185","@types/prettier":"^2.7.0","@types/stylis":"^4.0.2","@types/uuid":"^8.3.4","@typescript-eslint/eslint-plugin":"^5.37.0","@typescript-eslint/parser":"^5.37.0",concurrently:"^7.4.0",coveralls:"^3.1.1",cypress:"^10.0.0","cypress-image-snapshot":"^4.0.1",documentation:"13.2.0",esbuild:"^0.15.8",eslint:"^8.23.1","eslint-config-prettier":"^8.5.0","eslint-plugin-cypress":"^2.12.1","eslint-plugin-html":"^7.1.0","eslint-plugin-jest":"^27.0.4","eslint-plugin-jsdoc":"^39.3.6","eslint-plugin-json":"^3.1.0","eslint-plugin-markdown":"^3.0.0",express:"^4.18.1",globby:"^13.1.2",husky:"^8.0.0","identity-obj-proxy":"^3.0.0",jison:"^0.4.18","js-base64":"3.7.2",jsdom:"^20.0.0","lint-staged":"^13.0.0",moment:"^2.23.0","path-browserify":"^1.0.1",prettier:"^2.7.1","prettier-plugin-jsdoc":"^0.4.2",remark:"^14.0.2",rimraf:"^3.0.2","start-server-and-test":"^1.12.6","ts-node":"^10.9.1",typescript:"^4.8.3","unist-util-flatmap":"^1.0.0"},resolutions:{d3:"^7.0.0"},files:["dist"],sideEffects:["**/*.css","**/*.scss"]},Xo=Object.freeze(Xa);let mn=fr({},Xo),kw,Ko=[],r1=fr({},Xo);const n1=(t,e)=>{let r=fr({},t),n={};for(let i=0;i<e.length;i++){const a=e[i];Ew(a),n=fr(n,a)}if(r=fr(r,n),n.theme&&n.theme in aa){const i=fr({},kw),a=fr(i.themeVariables||{},n.themeVariables);r.theme&&r.theme in aa&&(r.themeVariables=aa[r.theme].getThemeVariables(a))}return r1=r,r},TX=t=>(mn=fr({},Xo),mn=fr(mn,t),t.theme&&aa[t.theme]&&(mn.themeVariables=aa[t.theme].getThemeVariables(t.themeVariables)),r1=n1(mn,Ko),mn),EX=t=>{kw=fr({},t)},CX=t=>(mn=fr(mn,t),n1(mn,Ko),mn),ww=()=>fr({},mn),Tw=t=>(fr(r1,t),nt()),nt=()=>fr({},r1),Ew=t=>{var e;["secure",...(e=mn.secure)!=null?e:[]].forEach(r=>{typeof t[r]<"u"&&(H.debug(`Denied attempt to modify a secure key ${r}`,t[r]),delete t[r])}),Object.keys(t).forEach(r=>{r.indexOf("__")===0&&delete t[r]}),Object.keys(t).forEach(r=>{typeof t[r]=="string"&&(t[r].indexOf("<")>-1||t[r].indexOf(">")>-1||t[r].indexOf("url(data:")>-1)&&delete t[r],typeof t[r]=="object"&&Ew(t[r])})},ug=t=>{t.fontFamily&&(t.themeVariables?t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily}):t.themeVariables={fontFamily:t.fontFamily}),Ko.push(t),n1(mn,Ko)},Rc=(t=mn)=>{Ko=[],n1(t,Ko)},SX=function(t,e){for(let r of e)t.attr(r[0],r[1])},AX=function(t,e,r){let n=new Map;return r?(n.set("width","100%"),n.set("style",`max-width: ${e}px;`)):n.set("width",e),n},li=function(t,e,r,n){const i=AX(e,r,n);SX(t,i)},i1=function(t,e,r,n){const i=e.node().getBBox(),a=i.width,s=i.height;H.info(`SVG bounds: ${a}x${s}`,i);let o=0,l=0;H.info(`Graph bounds: ${o}x${l}`,t),o=a+r*2,l=s+r*2,H.info(`Calculated bounds: ${o}x${l}`),li(e,l,o,n);const u=`${i.x-r} ${i.y-r} ${i.width+2*r} ${i.height+2*r}`;e.attr("viewBox",u)},Ic=t=>`g.classGroup text {
+ fill: ${t.nodeBorder};
+ fill: ${t.classText};
+ stroke: none;
+ font-family: ${t.fontFamily};
+ font-size: 10px;
+
+ .title {
+ font-weight: bolder;
+ }
+
+}
+
+.nodeLabel, .edgeLabel {
+ color: ${t.classText};
+}
+.edgeLabel .label rect {
+ fill: ${t.mainBkg};
+}
+.label text {
+ fill: ${t.classText};
+}
+.edgeLabel .label span {
+ background: ${t.mainBkg};
+}
+
+.classTitle {
+ font-weight: bolder;
+}
+.node rect,
+ .node circle,
+ .node ellipse,
+ .node polygon,
+ .node path {
+ fill: ${t.mainBkg};
+ stroke: ${t.nodeBorder};
+ stroke-width: 1px;
+ }
+
+
+.divider {
+ stroke: ${t.nodeBorder};
+ stroke: 1;
+}
+
+g.clickable {
+ cursor: pointer;
+}
+
+g.classGroup rect {
+ fill: ${t.mainBkg};
+ stroke: ${t.nodeBorder};
+}
+
+g.classGroup line {
+ stroke: ${t.nodeBorder};
+ stroke-width: 1;
+}
+
+.classLabel .box {
+ stroke: none;
+ stroke-width: 0;
+ fill: ${t.mainBkg};
+ opacity: 0.5;
+}
+
+.classLabel .label {
+ fill: ${t.nodeBorder};
+ font-size: 10px;
+}
+
+.relation {
+ stroke: ${t.lineColor};
+ stroke-width: 1;
+ fill: none;
+}
+
+.dashed-line{
+ stroke-dasharray: 3;
+}
+
+#compositionStart, .composition {
+ fill: ${t.lineColor} !important;
+ stroke: ${t.lineColor} !important;
+ stroke-width: 1;
+}
+
+#compositionEnd, .composition {
+ fill: ${t.lineColor} !important;
+ stroke: ${t.lineColor} !important;
+ stroke-width: 1;
+}
+
+#dependencyStart, .dependency {
+ fill: ${t.lineColor} !important;
+ stroke: ${t.lineColor} !important;
+ stroke-width: 1;
+}
+
+#dependencyStart, .dependency {
+ fill: ${t.lineColor} !important;
+ stroke: ${t.lineColor} !important;
+ stroke-width: 1;
+}
+
+#extensionStart, .extension {
+ fill: ${t.lineColor} !important;
+ stroke: ${t.lineColor} !important;
+ stroke-width: 1;
+}
+
+#extensionEnd, .extension {
+ fill: ${t.lineColor} !important;
+ stroke: ${t.lineColor} !important;
+ stroke-width: 1;
+}
+
+#aggregationStart, .aggregation {
+ fill: ${t.mainBkg} !important;
+ stroke: ${t.lineColor} !important;
+ stroke-width: 1;
+}
+
+#aggregationEnd, .aggregation {
+ fill: ${t.mainBkg} !important;
+ stroke: ${t.lineColor} !important;
+ stroke-width: 1;
+}
+
+#lollipopStart, .lollipop {
+ fill: ${t.mainBkg} !important;
+ stroke: ${t.lineColor} !important;
+ stroke-width: 1;
+}
+
+#lollipopEnd, .lollipop {
+ fill: ${t.mainBkg} !important;
+ stroke: ${t.lineColor} !important;
+ stroke-width: 1;
+}
+
+.edgeTerminals {
+ font-size: 11px;
+}
+
+`,Cw=t=>`
+ .entityBox {
+ fill: ${t.mainBkg};
+ stroke: ${t.nodeBorder};
+ }
+
+ .attributeBoxOdd {
+ fill: ${t.attributeBackgroundColorOdd};
+ stroke: ${t.nodeBorder};
+ }
+
+ .attributeBoxEven {
+ fill: ${t.attributeBackgroundColorEven};
+ stroke: ${t.nodeBorder};
+ }
+
+ .relationshipLabelBox {
+ fill: ${t.tertiaryColor};
+ opacity: 0.7;
+ background-color: ${t.tertiaryColor};
+ rect {
+ opacity: 0.5;
+ }
+ }
+
+ .relationshipLine {
+ stroke: ${t.lineColor};
+ }
+`,Sw=()=>"",a1=t=>`.label {
+ font-family: ${t.fontFamily};
+ color: ${t.nodeTextColor||t.textColor};
+ }
+ .cluster-label text {
+ fill: ${t.titleColor};
+ }
+ .cluster-label span {
+ color: ${t.titleColor};
+ }
+
+ .label text,span {
+ fill: ${t.nodeTextColor||t.textColor};
+ color: ${t.nodeTextColor||t.textColor};
+ }
+
+ .node rect,
+ .node circle,
+ .node ellipse,
+ .node polygon,
+ .node path {
+ fill: ${t.mainBkg};
+ stroke: ${t.nodeBorder};
+ stroke-width: 1px;
+ }
+
+ .node .label {
+ text-align: center;
+ }
+ .node.clickable {
+ cursor: pointer;
+ }
+
+ .arrowheadPath {
+ fill: ${t.arrowheadColor};
+ }
+
+ .edgePath .path {
+ stroke: ${t.lineColor};
+ stroke-width: 2.0px;
+ }
+
+ .flowchart-link {
+ stroke: ${t.lineColor};
+ fill: none;
+ }
+
+ .edgeLabel {
+ background-color: ${t.edgeLabelBackground};
+ rect {
+ opacity: 0.5;
+ background-color: ${t.edgeLabelBackground};
+ fill: ${t.edgeLabelBackground};
+ }
+ text-align: center;
+ }
+
+ .cluster rect {
+ fill: ${t.clusterBkg};
+ stroke: ${t.clusterBorder};
+ stroke-width: 1px;
+ }
+
+ .cluster text {
+ fill: ${t.titleColor};
+ }
+
+ .cluster span {
+ color: ${t.titleColor};
+ }
+ /* .cluster div {
+ color: ${t.titleColor};
+ } */
+
+ div.mermaidTooltip {
+ position: absolute;
+ text-align: center;
+ max-width: 200px;
+ padding: 2px;
+ font-family: ${t.fontFamily};
+ font-size: 12px;
+ background: ${t.tertiaryColor};
+ border: 1px solid ${t.border2};
+ border-radius: 2px;
+ pointer-events: none;
+ z-index: 100;
+ }
+`,Aw=t=>`
+ .mermaid-main-font {
+ font-family: "trebuchet ms", verdana, arial, sans-serif;
+ font-family: var(--mermaid-font-family);
+ }
+ .exclude-range {
+ fill: ${t.excludeBkgColor};
+ }
+
+ .section {
+ stroke: none;
+ opacity: 0.2;
+ }
+
+ .section0 {
+ fill: ${t.sectionBkgColor};
+ }
+
+ .section2 {
+ fill: ${t.sectionBkgColor2};
+ }
+
+ .section1,
+ .section3 {
+ fill: ${t.altSectionBkgColor};
+ opacity: 0.2;
+ }
+
+ .sectionTitle0 {
+ fill: ${t.titleColor};
+ }
+
+ .sectionTitle1 {
+ fill: ${t.titleColor};
+ }
+
+ .sectionTitle2 {
+ fill: ${t.titleColor};
+ }
+
+ .sectionTitle3 {
+ fill: ${t.titleColor};
+ }
+
+ .sectionTitle {
+ text-anchor: start;
+ // font-size: ${t.ganttFontSize};
+ // text-height: 14px;
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
+ font-family: var(--mermaid-font-family);
+
+ }
+
+
+ /* Grid and axis */
+
+ .grid .tick {
+ stroke: ${t.gridColor};
+ opacity: 0.8;
+ shape-rendering: crispEdges;
+ text {
+ font-family: ${t.fontFamily};
+ fill: ${t.textColor};
+ }
+ }
+
+ .grid path {
+ stroke-width: 0;
+ }
+
+
+ /* Today line */
+
+ .today {
+ fill: none;
+ stroke: ${t.todayLineColor};
+ stroke-width: 2px;
+ }
+
+
+ /* Task styling */
+
+ /* Default task */
+
+ .task {
+ stroke-width: 2;
+ }
+
+ .taskText {
+ text-anchor: middle;
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
+ font-family: var(--mermaid-font-family);
+ }
+
+ // .taskText:not([font-size]) {
+ // font-size: ${t.ganttFontSize};
+ // }
+
+ .taskTextOutsideRight {
+ fill: ${t.taskTextDarkColor};
+ text-anchor: start;
+ // font-size: ${t.ganttFontSize};
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
+ font-family: var(--mermaid-font-family);
+
+ }
+
+ .taskTextOutsideLeft {
+ fill: ${t.taskTextDarkColor};
+ text-anchor: end;
+ // font-size: ${t.ganttFontSize};
+ }
+
+ /* Special case clickable */
+ .task.clickable {
+ cursor: pointer;
+ }
+ .taskText.clickable {
+ cursor: pointer;
+ fill: ${t.taskTextClickableColor} !important;
+ font-weight: bold;
+ }
+
+ .taskTextOutsideLeft.clickable {
+ cursor: pointer;
+ fill: ${t.taskTextClickableColor} !important;
+ font-weight: bold;
+ }
+
+ .taskTextOutsideRight.clickable {
+ cursor: pointer;
+ fill: ${t.taskTextClickableColor} !important;
+ font-weight: bold;
+ }
+
+ /* Specific task settings for the sections*/
+
+ .taskText0,
+ .taskText1,
+ .taskText2,
+ .taskText3 {
+ fill: ${t.taskTextColor};
+ }
+
+ .task0,
+ .task1,
+ .task2,
+ .task3 {
+ fill: ${t.taskBkgColor};
+ stroke: ${t.taskBorderColor};
+ }
+
+ .taskTextOutside0,
+ .taskTextOutside2
+ {
+ fill: ${t.taskTextOutsideColor};
+ }
+
+ .taskTextOutside1,
+ .taskTextOutside3 {
+ fill: ${t.taskTextOutsideColor};
+ }
+
+
+ /* Active task */
+
+ .active0,
+ .active1,
+ .active2,
+ .active3 {
+ fill: ${t.activeTaskBkgColor};
+ stroke: ${t.activeTaskBorderColor};
+ }
+
+ .activeText0,
+ .activeText1,
+ .activeText2,
+ .activeText3 {
+ fill: ${t.taskTextDarkColor} !important;
+ }
+
+
+ /* Completed task */
+
+ .done0,
+ .done1,
+ .done2,
+ .done3 {
+ stroke: ${t.doneTaskBorderColor};
+ fill: ${t.doneTaskBkgColor};
+ stroke-width: 2;
+ }
+
+ .doneText0,
+ .doneText1,
+ .doneText2,
+ .doneText3 {
+ fill: ${t.taskTextDarkColor} !important;
+ }
+
+
+ /* Tasks on the critical line */
+
+ .crit0,
+ .crit1,
+ .crit2,
+ .crit3 {
+ stroke: ${t.critBorderColor};
+ fill: ${t.critBkgColor};
+ stroke-width: 2;
+ }
+
+ .activeCrit0,
+ .activeCrit1,
+ .activeCrit2,
+ .activeCrit3 {
+ stroke: ${t.critBorderColor};
+ fill: ${t.activeTaskBkgColor};
+ stroke-width: 2;
+ }
+
+ .doneCrit0,
+ .doneCrit1,
+ .doneCrit2,
+ .doneCrit3 {
+ stroke: ${t.critBorderColor};
+ fill: ${t.doneTaskBkgColor};
+ stroke-width: 2;
+ cursor: pointer;
+ shape-rendering: crispEdges;
+ }
+
+ .milestone {
+ transform: rotate(45deg) scale(0.8,0.8);
+ }
+
+ .milestoneText {
+ font-style: italic;
+ }
+ .doneCritText0,
+ .doneCritText1,
+ .doneCritText2,
+ .doneCritText3 {
+ fill: ${t.taskTextDarkColor} !important;
+ }
+
+ .activeCritText0,
+ .activeCritText1,
+ .activeCritText2,
+ .activeCritText3 {
+ fill: ${t.taskTextDarkColor} !important;
+ }
+
+ .titleText {
+ text-anchor: middle;
+ font-size: 18px;
+ fill: ${t.textColor} ;
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
+ font-family: var(--mermaid-font-family);
+ }
+`,Mw=()=>"",Lw=t=>`
+ .pieCircle{
+ stroke: ${t.pieStrokeColor};
+ stroke-width : ${t.pieStrokeWidth};
+ opacity : ${t.pieOpacity};
+ }
+ .pieTitleText {
+ text-anchor: middle;
+ font-size: ${t.pieTitleTextSize};
+ fill: ${t.pieTitleTextColor};
+ font-family: ${t.fontFamily};
+ }
+ .slice {
+ font-family: ${t.fontFamily};
+ fill: ${t.pieSectionTextColor};
+ font-size:${t.pieSectionTextSize};
+ // fill: white;
+ }
+ .legend text {
+ fill: ${t.pieLegendTextColor};
+ font-family: ${t.fontFamily};
+ font-size: ${t.pieLegendTextSize};
+ }
+`,Rw=t=>`
+
+ marker {
+ fill: ${t.relationColor};
+ stroke: ${t.relationColor};
+ }
+
+ marker.cross {
+ stroke: ${t.lineColor};
+ }
+
+ svg {
+ font-family: ${t.fontFamily};
+ font-size: ${t.fontSize};
+ }
+
+ .reqBox {
+ fill: ${t.requirementBackground};
+ fill-opacity: 100%;
+ stroke: ${t.requirementBorderColor};
+ stroke-width: ${t.requirementBorderSize};
+ }
+
+ .reqTitle, .reqLabel{
+ fill: ${t.requirementTextColor};
+ }
+ .reqLabelBox {
+ fill: ${t.relationLabelBackground};
+ fill-opacity: 100%;
+ }
+
+ .req-title-line {
+ stroke: ${t.requirementBorderColor};
+ stroke-width: ${t.requirementBorderSize};
+ }
+ .relationshipLine {
+ stroke: ${t.relationColor};
+ stroke-width: 1;
+ }
+ .relationshipLabel {
+ fill: ${t.relationLabelColor};
+ }
+
+`,Iw=t=>`.actor {
+ stroke: ${t.actorBorder};
+ fill: ${t.actorBkg};
+ }
+
+ text.actor > tspan {
+ fill: ${t.actorTextColor};
+ stroke: none;
+ }
+
+ .actor-line {
+ stroke: ${t.actorLineColor};
+ }
+
+ .messageLine0 {
+ stroke-width: 1.5;
+ stroke-dasharray: none;
+ stroke: ${t.signalColor};
+ }
+
+ .messageLine1 {
+ stroke-width: 1.5;
+ stroke-dasharray: 2, 2;
+ stroke: ${t.signalColor};
+ }
+
+ #arrowhead path {
+ fill: ${t.signalColor};
+ stroke: ${t.signalColor};
+ }
+
+ .sequenceNumber {
+ fill: ${t.sequenceNumberColor};
+ }
+
+ #sequencenumber {
+ fill: ${t.signalColor};
+ }
+
+ #crosshead path {
+ fill: ${t.signalColor};
+ stroke: ${t.signalColor};
+ }
+
+ .messageText {
+ fill: ${t.signalTextColor};
+ stroke: none;
+ }
+
+ .labelBox {
+ stroke: ${t.labelBoxBorderColor};
+ fill: ${t.labelBoxBkgColor};
+ }
+
+ .labelText, .labelText > tspan {
+ fill: ${t.labelTextColor};
+ stroke: none;
+ }
+
+ .loopText, .loopText > tspan {
+ fill: ${t.loopTextColor};
+ stroke: none;
+ }
+
+ .loopLine {
+ stroke-width: 2px;
+ stroke-dasharray: 2, 2;
+ stroke: ${t.labelBoxBorderColor};
+ fill: ${t.labelBoxBorderColor};
+ }
+
+ .note {
+ //stroke: #decc93;
+ stroke: ${t.noteBorderColor};
+ fill: ${t.noteBkgColor};
+ }
+
+ .noteText, .noteText > tspan {
+ fill: ${t.noteTextColor};
+ stroke: none;
+ }
+
+ .activation0 {
+ fill: ${t.activationBkgColor};
+ stroke: ${t.activationBorderColor};
+ }
+
+ .activation1 {
+ fill: ${t.activationBkgColor};
+ stroke: ${t.activationBorderColor};
+ }
+
+ .activation2 {
+ fill: ${t.activationBkgColor};
+ stroke: ${t.activationBorderColor};
+ }
+
+ .actorPopupMenu {
+ position: absolute;
+ }
+
+ .actorPopupMenuPanel {
+ position: absolute;
+ fill: ${t.actorBkg};
+ box-shadow: 0px 8px 16px 0px rgba(0,0,0,0.2);
+ filter: drop-shadow(3px 5px 2px rgb(0 0 0 / 0.4));
+}
+ .actor-man line {
+ stroke: ${t.actorBorder};
+ fill: ${t.actorBkg};
+ }
+ .actor-man circle, line {
+ stroke: ${t.actorBorder};
+ fill: ${t.actorBkg};
+ stroke-width: 2px;
+ }
+`,s1=t=>`
+defs #statediagram-barbEnd {
+ fill: ${t.transitionColor};
+ stroke: ${t.transitionColor};
+ }
+g.stateGroup text {
+ fill: ${t.nodeBorder};
+ stroke: none;
+ font-size: 10px;
+}
+g.stateGroup text {
+ fill: ${t.textColor};
+ stroke: none;
+ font-size: 10px;
+
+}
+g.stateGroup .state-title {
+ font-weight: bolder;
+ fill: ${t.stateLabelColor};
+}
+
+g.stateGroup rect {
+ fill: ${t.mainBkg};
+ stroke: ${t.nodeBorder};
+}
+
+g.stateGroup line {
+ stroke: ${t.lineColor};
+ stroke-width: 1;
+}
+
+.transition {
+ stroke: ${t.transitionColor};
+ stroke-width: 1;
+ fill: none;
+}
+
+.stateGroup .composit {
+ fill: ${t.background};
+ border-bottom: 1px
+}
+
+.stateGroup .alt-composit {
+ fill: #e0e0e0;
+ border-bottom: 1px
+}
+
+.state-note {
+ stroke: ${t.noteBorderColor};
+ fill: ${t.noteBkgColor};
+
+ text {
+ fill: ${t.noteTextColor};
+ stroke: none;
+ font-size: 10px;
+ }
+}
+
+.stateLabel .box {
+ stroke: none;
+ stroke-width: 0;
+ fill: ${t.mainBkg};
+ opacity: 0.5;
+}
+
+.edgeLabel .label rect {
+ fill: ${t.labelBackgroundColor};
+ opacity: 0.5;
+}
+.edgeLabel .label text {
+ fill: ${t.transitionLabelColor||t.tertiaryTextColor};
+}
+.label div .edgeLabel {
+ color: ${t.transitionLabelColor||t.tertiaryTextColor};
+}
+
+.stateLabel text {
+ fill: ${t.stateLabelColor};
+ font-size: 10px;
+ font-weight: bold;
+}
+
+.node circle.state-start {
+ fill: ${t.specialStateColor};
+ stroke: ${t.specialStateColor};
+}
+
+.node .fork-join {
+ fill: ${t.specialStateColor};
+ stroke: ${t.specialStateColor};
+}
+
+.node circle.state-end {
+ fill: ${t.innerEndBackground};
+ stroke: ${t.background};
+ stroke-width: 1.5
+}
+.end-state-inner {
+ fill: ${t.compositeBackground||t.background};
+ // stroke: ${t.background};
+ stroke-width: 1.5
+}
+
+.node rect {
+ fill: ${t.stateBkg||t.mainBkg};
+ stroke: ${t.stateBorder||t.nodeBorder};
+ stroke-width: 1px;
+}
+.node polygon {
+ fill: ${t.mainBkg};
+ stroke: ${t.stateBorder||t.nodeBorder};;
+ stroke-width: 1px;
+}
+#statediagram-barbEnd {
+ fill: ${t.lineColor};
+}
+
+.statediagram-cluster rect {
+ fill: ${t.compositeTitleBackground};
+ stroke: ${t.stateBorder||t.nodeBorder};
+ stroke-width: 1px;
+}
+
+.cluster-label, .nodeLabel {
+ color: ${t.stateLabelColor};
+}
+
+.statediagram-cluster rect.outer {
+ rx: 5px;
+ ry: 5px;
+}
+.statediagram-state .divider {
+ stroke: ${t.stateBorder||t.nodeBorder};
+}
+
+.statediagram-state .title-state {
+ rx: 5px;
+ ry: 5px;
+}
+.statediagram-cluster.statediagram-cluster .inner {
+ fill: ${t.compositeBackground||t.background};
+}
+.statediagram-cluster.statediagram-cluster-alt .inner {
+ fill: ${t.altBackground?t.altBackground:"#efefef"};
+}
+
+.statediagram-cluster .inner {
+ rx:0;
+ ry:0;
+}
+
+.statediagram-state rect.basic {
+ rx: 5px;
+ ry: 5px;
+}
+.statediagram-state rect.divider {
+ stroke-dasharray: 10,10;
+ fill: ${t.altBackground?t.altBackground:"#efefef"};
+}
+
+.note-edge {
+ stroke-dasharray: 5;
+}
+
+.statediagram-note rect {
+ fill: ${t.noteBkgColor};
+ stroke: ${t.noteBorderColor};
+ stroke-width: 1px;
+ rx: 0;
+ ry: 0;
+}
+.statediagram-note rect {
+ fill: ${t.noteBkgColor};
+ stroke: ${t.noteBorderColor};
+ stroke-width: 1px;
+ rx: 0;
+ ry: 0;
+}
+
+.statediagram-note text {
+ fill: ${t.noteTextColor};
+}
+
+.statediagram-note .nodeLabel {
+ color: ${t.noteTextColor};
+}
+.statediagram .edgeLabel {
+ color: red; // ${t.noteTextColor};
+}
+
+#dependencyStart, #dependencyEnd {
+ fill: ${t.lineColor};
+ stroke: ${t.lineColor};
+ stroke-width: 1;
+}
+`,Nw=t=>`.label {
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
+ font-family: var(--mermaid-font-family);
+ color: ${t.textColor};
+ }
+ .mouth {
+ stroke: #666;
+ }
+
+ line {
+ stroke: ${t.textColor}
+ }
+
+ .legend {
+ fill: ${t.textColor};
+ }
+
+ .label text {
+ fill: #333;
+ }
+ .label {
+ color: ${t.textColor}
+ }
+
+ .face {
+ ${t.faceColor?`fill: ${t.faceColor}`:"fill: #FFF8DC"};
+ stroke: #999;
+ }
+
+ .node rect,
+ .node circle,
+ .node ellipse,
+ .node polygon,
+ .node path {
+ fill: ${t.mainBkg};
+ stroke: ${t.nodeBorder};
+ stroke-width: 1px;
+ }
+
+ .node .label {
+ text-align: center;
+ }
+ .node.clickable {
+ cursor: pointer;
+ }
+
+ .arrowheadPath {
+ fill: ${t.arrowheadColor};
+ }
+
+ .edgePath .path {
+ stroke: ${t.lineColor};
+ stroke-width: 1.5px;
+ }
+
+ .flowchart-link {
+ stroke: ${t.lineColor};
+ fill: none;
+ }
+
+ .edgeLabel {
+ background-color: ${t.edgeLabelBackground};
+ rect {
+ opacity: 0.5;
+ }
+ text-align: center;
+ }
+
+ .cluster rect {
+ }
+
+ .cluster text {
+ fill: ${t.titleColor};
+ }
+
+ div.mermaidTooltip {
+ position: absolute;
+ text-align: center;
+ max-width: 200px;
+ padding: 2px;
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
+ font-family: var(--mermaid-font-family);
+ font-size: 12px;
+ background: ${t.tertiaryColor};
+ border: 1px solid ${t.border2};
+ border-radius: 2px;
+ pointer-events: none;
+ z-index: 100;
+ }
+
+ .task-type-0, .section-type-0 {
+ ${t.fillType0?`fill: ${t.fillType0}`:""};
+ }
+ .task-type-1, .section-type-1 {
+ ${t.fillType0?`fill: ${t.fillType1}`:""};
+ }
+ .task-type-2, .section-type-2 {
+ ${t.fillType0?`fill: ${t.fillType2}`:""};
+ }
+ .task-type-3, .section-type-3 {
+ ${t.fillType0?`fill: ${t.fillType3}`:""};
+ }
+ .task-type-4, .section-type-4 {
+ ${t.fillType0?`fill: ${t.fillType4}`:""};
+ }
+ .task-type-5, .section-type-5 {
+ ${t.fillType0?`fill: ${t.fillType5}`:""};
+ }
+ .task-type-6, .section-type-6 {
+ ${t.fillType0?`fill: ${t.fillType6}`:""};
+ }
+ .task-type-7, .section-type-7 {
+ ${t.fillType0?`fill: ${t.fillType7}`:""};
+ }
+
+ .actor-0 {
+ ${t.actor0?`fill: ${t.actor0}`:""};
+ }
+ .actor-1 {
+ ${t.actor1?`fill: ${t.actor1}`:""};
+ }
+ .actor-2 {
+ ${t.actor2?`fill: ${t.actor2}`:""};
+ }
+ .actor-3 {
+ ${t.actor3?`fill: ${t.actor3}`:""};
+ }
+ .actor-4 {
+ ${t.actor4?`fill: ${t.actor4}`:""};
+ }
+ .actor-5 {
+ ${t.actor5?`fill: ${t.actor5}`:""};
+ }
+`,Bw=t=>`.person {
+ stroke: ${t.personBorder};
+ fill: ${t.personBkg};
+ }
+`,o1={flowchart:a1,"flowchart-v2":a1,sequence:Iw,gantt:Aw,classDiagram:Ic,"classDiagram-v2":Ic,class:Ic,stateDiagram:s1,state:s1,info:Mw,pie:Lw,er:Cw,error:Sw,journey:Nw,requirement:Rw,c4:Bw},Dw=(t,e,r)=>{let n="";return t in o1&&o1[t]?n=o1[t](r):H.warn(`No theme found for ${t}`),` {
+ font-family: ${r.fontFamily};
+ font-size: ${r.fontSize};
+ fill: ${r.textColor}
+ }
+
+ /* Classes common for multiple diagrams */
+
+ .error-icon {
+ fill: ${r.errorBkgColor};
+ }
+ .error-text {
+ fill: ${r.errorTextColor};
+ stroke: ${r.errorTextColor};
+ }
+
+ .edge-thickness-normal {
+ stroke-width: 2px;
+ }
+ .edge-thickness-thick {
+ stroke-width: 3.5px
+ }
+ .edge-pattern-solid {
+ stroke-dasharray: 0;
+ }
+
+ .edge-pattern-dashed{
+ stroke-dasharray: 3;
+ }
+ .edge-pattern-dotted {
+ stroke-dasharray: 2;
+ }
+
+ .marker {
+ fill: ${r.lineColor};
+ stroke: ${r.lineColor};
+ }
+ .marker.cross {
+ stroke: ${r.lineColor};
+ }
+
+ svg {
+ font-family: ${r.fontFamily};
+ font-size: ${r.fontSize};
+ }
+
+ ${n}
+
+ ${e}
+`},MX=(t,e)=>{o1[t]=e},Nc=H,LX=D0,Zo=nt,RX=t=>ai(t,Zo()),Ow=i1,Qo={},Lr=(t,e,r,n)=>{Nc.debug(`Registering diagram ${t}`),Qo[t]&&Nc.warn(`Diagram ${t} already registered.`),Qo[t]=e,r&&Kk(t,r),MX(t,e.styles),typeof n<"u"&&n(Nc,LX,Zo,RX,Ow),Nc.debug(`Registered diagram ${t}. ${Object.keys(Qo).join(", ")} diagrams registered.`)},Fw=t=>{if(Nc.debug(`Getting diagram ${t}. ${Object.keys(Qo).join(", ")} diagrams registered.`),t in Qo)return Qo[t];throw new Pw(t)};class Pw extends Error{constructor(e){super(`Diagram ${e} not found.`)}}var hg=function(){var t=function(C,M,S,R){for(S=S||{},R=C.length;R--;S[C[R]]=M);return S},e=[1,4],r=[1,7],n=[1,5],i=[1,9],a=[1,6],s=[2,6],o=[1,16],l=[6,8,14,20,22,24,25,27,29,32,37,40,50,54],u=[8,14,20,22,24,25,27,29,32,37,40],h=[8,13,14,20,22,24,25,27,29,32,37,40],d=[1,26],f=[6,8,14,50,54],p=[8,14,54],m=[1,65],_=[1,66],y=[1,67],b=[8,14,33,35,42,54],x={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,GG:6,document:7,EOF:8,":":9,DIR:10,options:11,body:12,OPT:13,NL:14,line:15,statement:16,commitStatement:17,mergeStatement:18,cherryPickStatement:19,acc_title:20,acc_title_value:21,acc_descr:22,acc_descr_value:23,acc_descr_multiline_value:24,section:25,branchStatement:26,CHECKOUT:27,ID:28,BRANCH:29,ORDER:30,NUM:31,CHERRY_PICK:32,COMMIT_ID:33,STR:34,COMMIT_TAG:35,EMPTYSTR:36,MERGE:37,COMMIT_TYPE:38,commitType:39,COMMIT:40,commit_arg:41,COMMIT_MSG:42,NORMAL:43,REVERSE:44,HIGHLIGHT:45,openDirective:46,typeDirective:47,closeDirective:48,argDirective:49,open_directive:50,type_directive:51,arg_directive:52,close_directive:53,";":54,$accept:0,$end:1},terminals_:{2:"error",6:"GG",8:"EOF",9:":",10:"DIR",13:"OPT",14:"NL",20:"acc_title",21:"acc_title_value",22:"acc_descr",23:"acc_descr_value",24:"acc_descr_multiline_value",25:"section",27:"CHECKOUT",28:"ID",29:"BRANCH",30:"ORDER",31:"NUM",32:"CHERRY_PICK",33:"COMMIT_ID",34:"STR",35:"COMMIT_TAG",36:"EMPTYSTR",37:"MERGE",38:"COMMIT_TYPE",40:"COMMIT",42:"COMMIT_MSG",43:"NORMAL",44:"REVERSE",45:"HIGHLIGHT",50:"open_directive",51:"type_directive",52:"arg_directive",53:"close_directive",54:";"},productions_:[0,[3,2],[3,2],[3,3],[3,4],[3,5],[7,0],[7,2],[11,2],[11,1],[12,0],[12,2],[15,2],[15,1],[16,1],[16,1],[16,1],[16,2],[16,2],[16,1],[16,1],[16,1],[16,2],[26,2],[26,4],[19,3],[19,5],[19,5],[19,5],[19,5],[18,2],[18,4],[18,4],[18,4],[18,6],[18,6],[18,6],[18,6],[18,6],[18,6],[18,8],[18,8],[18,8],[18,8],[18,8],[18,8],[17,2],[17,3],[17,3],[17,5],[17,5],[17,3],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,3],[17,5],[17,5],[17,5],[17,5],[17,5],[17,5],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,7],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[17,9],[41,0],[41,1],[39,1],[39,1],[39,1],[5,3],[5,5],[46,1],[47,1],[49,1],[48,1],[4,1],[4,1],[4,1]],performAction:function(M,S,R,A,L,v,B){var w=v.length-1;switch(L){case 3:return v[w];case 4:return v[w-1];case 5:return A.setDirection(v[w-3]),v[w-1];case 7:A.setOptions(v[w-1]),this.$=v[w];break;case 8:v[w-1]+=v[w],this.$=v[w-1];break;case 10:this.$=[];break;case 11:v[w-1].push(v[w]),this.$=v[w-1];break;case 12:this.$=v[w-1];break;case 17:this.$=v[w].trim(),A.setAccTitle(this.$);break;case 18:case 19:this.$=v[w].trim(),A.setAccDescription(this.$);break;case 20:A.addSection(v[w].substr(8)),this.$=v[w].substr(8);break;case 22:A.checkout(v[w]);break;case 23:A.branch(v[w]);break;case 24:A.branch(v[w-2],v[w]);break;case 25:A.cherryPick(v[w],"",void 0);break;case 26:A.cherryPick(v[w-2],"",v[w]);break;case 27:case 29:A.cherryPick(v[w-2],"","");break;case 28:A.cherryPick(v[w],"",v[w-2]);break;case 30:A.merge(v[w],"","","");break;case 31:A.merge(v[w-2],v[w],"","");break;case 32:A.merge(v[w-2],"",v[w],"");break;case 33:A.merge(v[w-2],"","",v[w]);break;case 34:A.merge(v[w-4],v[w],"",v[w-2]);break;case 35:A.merge(v[w-4],"",v[w],v[w-2]);break;case 36:A.merge(v[w-4],"",v[w-2],v[w]);break;case 37:A.merge(v[w-4],v[w-2],v[w],"");break;case 38:A.merge(v[w-4],v[w-2],"",v[w]);break;case 39:A.merge(v[w-4],v[w],v[w-2],"");break;case 40:A.merge(v[w-6],v[w-4],v[w-2],v[w]);break;case 41:A.merge(v[w-6],v[w],v[w-4],v[w-2]);break;case 42:A.merge(v[w-6],v[w-4],v[w],v[w-2]);break;case 43:A.merge(v[w-6],v[w-2],v[w-4],v[w]);break;case 44:A.merge(v[w-6],v[w],v[w-2],v[w-4]);break;case 45:A.merge(v[w-6],v[w-2],v[w],v[w-4]);break;case 46:A.commit(v[w]);break;case 47:A.commit("","",A.commitType.NORMAL,v[w]);break;case 48:A.commit("","",v[w],"");break;case 49:A.commit("","",v[w],v[w-2]);break;case 50:A.commit("","",v[w-2],v[w]);break;case 51:A.commit("",v[w],A.commitType.NORMAL,"");break;case 52:A.commit("",v[w-2],A.commitType.NORMAL,v[w]);break;case 53:A.commit("",v[w],A.commitType.NORMAL,v[w-2]);break;case 54:A.commit("",v[w-2],v[w],"");break;case 55:A.commit("",v[w],v[w-2],"");break;case 56:A.commit("",v[w-4],v[w-2],v[w]);break;case 57:A.commit("",v[w-4],v[w],v[w-2]);break;case 58:A.commit("",v[w-2],v[w-4],v[w]);break;case 59:A.commit("",v[w],v[w-4],v[w-2]);break;case 60:A.commit("",v[w],v[w-2],v[w-4]);break;case 61:A.commit("",v[w-2],v[w],v[w-4]);break;case 62:A.commit(v[w],"",A.commitType.NORMAL,"");break;case 63:A.commit(v[w],"",A.commitType.NORMAL,v[w-2]);break;case 64:A.commit(v[w-2],"",A.commitType.NORMAL,v[w]);break;case 65:A.commit(v[w-2],"",v[w],"");break;case 66:A.commit(v[w],"",v[w-2],"");break;case 67:A.commit(v[w],v[w-2],A.commitType.NORMAL,"");break;case 68:A.commit(v[w-2],v[w],A.commitType.NORMAL,"");break;case 69:A.commit(v[w-4],"",v[w-2],v[w]);break;case 70:A.commit(v[w-4],"",v[w],v[w-2]);break;case 71:A.commit(v[w-2],"",v[w-4],v[w]);break;case 72:A.commit(v[w],"",v[w-4],v[w-2]);break;case 73:A.commit(v[w],"",v[w-2],v[w-4]);break;case 74:A.commit(v[w-2],"",v[w],v[w-4]);break;case 75:A.commit(v[w-4],v[w],v[w-2],"");break;case 76:A.commit(v[w-4],v[w-2],v[w],"");break;case 77:A.commit(v[w-2],v[w],v[w-4],"");break;case 78:A.commit(v[w],v[w-2],v[w-4],"");break;case 79:A.commit(v[w],v[w-4],v[w-2],"");break;case 80:A.commit(v[w-2],v[w-4],v[w],"");break;case 81:A.commit(v[w-4],v[w],A.commitType.NORMAL,v[w-2]);break;case 82:A.commit(v[w-4],v[w-2],A.commitType.NORMAL,v[w]);break;case 83:A.commit(v[w-2],v[w],A.commitType.NORMAL,v[w-4]);break;case 84:A.commit(v[w],v[w-2],A.commitType.NORMAL,v[w-4]);break;case 85:A.commit(v[w],v[w-4],A.commitType.NORMAL,v[w-2]);break;case 86:A.commit(v[w-2],v[w-4],A.commitType.NORMAL,v[w]);break;case 87:A.commit(v[w-6],v[w-4],v[w-2],v[w]);break;case 88:A.commit(v[w-6],v[w-4],v[w],v[w-2]);break;case 89:A.commit(v[w-6],v[w-2],v[w-4],v[w]);break;case 90:A.commit(v[w-6],v[w],v[w-4],v[w-2]);break;case 91:A.commit(v[w-6],v[w-2],v[w],v[w-4]);break;case 92:A.commit(v[w-6],v[w],v[w-2],v[w-4]);break;case 93:A.commit(v[w-4],v[w-6],v[w-2],v[w]);break;case 94:A.commit(v[w-4],v[w-6],v[w],v[w-2]);break;case 95:A.commit(v[w-2],v[w-6],v[w-4],v[w]);break;case 96:A.commit(v[w],v[w-6],v[w-4],v[w-2]);break;case 97:A.commit(v[w-2],v[w-6],v[w],v[w-4]);break;case 98:A.commit(v[w],v[w-6],v[w-2],v[w-4]);break;case 99:A.commit(v[w],v[w-4],v[w-2],v[w-6]);break;case 100:A.commit(v[w-2],v[w-4],v[w],v[w-6]);break;case 101:A.commit(v[w],v[w-2],v[w-4],v[w-6]);break;case 102:A.commit(v[w-2],v[w],v[w-4],v[w-6]);break;case 103:A.commit(v[w-4],v[w-2],v[w],v[w-6]);break;case 104:A.commit(v[w-4],v[w],v[w-2],v[w-6]);break;case 105:A.commit(v[w-2],v[w-4],v[w-6],v[w]);break;case 106:A.commit(v[w],v[w-4],v[w-6],v[w-2]);break;case 107:A.commit(v[w-2],v[w],v[w-6],v[w-4]);break;case 108:A.commit(v[w],v[w-2],v[w-6],v[w-4]);break;case 109:A.commit(v[w-4],v[w-2],v[w-6],v[w]);break;case 110:A.commit(v[w-4],v[w],v[w-6],v[w-2]);break;case 111:this.$="";break;case 112:this.$=v[w];break;case 113:this.$=A.commitType.NORMAL;break;case 114:this.$=A.commitType.REVERSE;break;case 115:this.$=A.commitType.HIGHLIGHT;break;case 118:A.parseDirective("%%{","open_directive");break;case 119:A.parseDirective(v[w],"type_directive");break;case 120:v[w]=v[w].trim().replace(/'/g,'"'),A.parseDirective(v[w],"arg_directive");break;case 121:A.parseDirective("}%%","close_directive","gitGraph");break}},table:[{3:1,4:2,5:3,6:e,8:r,14:n,46:8,50:i,54:a},{1:[3]},{3:10,4:2,5:3,6:e,8:r,14:n,46:8,50:i,54:a},{3:11,4:2,5:3,6:e,8:r,14:n,46:8,50:i,54:a},{7:12,8:s,9:[1,13],10:[1,14],11:15,14:o},t(l,[2,122]),t(l,[2,123]),t(l,[2,124]),{47:17,51:[1,18]},{51:[2,118]},{1:[2,1]},{1:[2,2]},{8:[1,19]},{7:20,8:s,11:15,14:o},{9:[1,21]},t(u,[2,10],{12:22,13:[1,23]}),t(h,[2,9]),{9:[1,25],48:24,53:d},t([9,53],[2,119]),{1:[2,3]},{8:[1,27]},{7:28,8:s,11:15,14:o},{8:[2,7],14:[1,31],15:29,16:30,17:32,18:33,19:34,20:[1,35],22:[1,36],24:[1,37],25:[1,38],26:39,27:[1,40],29:[1,44],32:[1,43],37:[1,42],40:[1,41]},t(h,[2,8]),t(f,[2,116]),{49:45,52:[1,46]},t(f,[2,121]),{1:[2,4]},{8:[1,47]},t(u,[2,11]),{4:48,8:r,14:n,54:a},t(u,[2,13]),t(p,[2,14]),t(p,[2,15]),t(p,[2,16]),{21:[1,49]},{23:[1,50]},t(p,[2,19]),t(p,[2,20]),t(p,[2,21]),{28:[1,51]},t(p,[2,111],{41:52,33:[1,55],34:[1,57],35:[1,53],38:[1,54],42:[1,56]}),{28:[1,58]},{33:[1,59],35:[1,60]},{28:[1,61]},{48:62,53:d},{53:[2,120]},{1:[2,5]},t(u,[2,12]),t(p,[2,17]),t(p,[2,18]),t(p,[2,22]),t(p,[2,46]),{34:[1,63]},{39:64,43:m,44:_,45:y},{34:[1,68]},{34:[1,69]},t(p,[2,112]),t(p,[2,30],{33:[1,70],35:[1,72],38:[1,71]}),{34:[1,73]},{34:[1,74],36:[1,75]},t(p,[2,23],{30:[1,76]}),t(f,[2,117]),t(p,[2,47],{33:[1,78],38:[1,77],42:[1,79]}),t(p,[2,48],{33:[1,81],35:[1,80],42:[1,82]}),t(b,[2,113]),t(b,[2,114]),t(b,[2,115]),t(p,[2,51],{35:[1,83],38:[1,84],42:[1,85]}),t(p,[2,62],{33:[1,88],35:[1,86],38:[1,87]}),{34:[1,89]},{39:90,43:m,44:_,45:y},{34:[1,91]},t(p,[2,25],{35:[1,92]}),{33:[1,93]},{33:[1,94]},{31:[1,95]},{39:96,43:m,44:_,45:y},{34:[1,97]},{34:[1,98]},{34:[1,99]},{34:[1,100]},{34:[1,101]},{34:[1,102]},{39:103,43:m,44:_,45:y},{34:[1,104]},{34:[1,105]},{39:106,43:m,44:_,45:y},{34:[1,107]},t(p,[2,31],{35:[1,109],38:[1,108]}),t(p,[2,32],{33:[1,111],35:[1,110]}),t(p,[2,33],{33:[1,112],38:[1,113]}),{34:[1,114],36:[1,115]},{34:[1,116]},{34:[1,117]},t(p,[2,24]),t(p,[2,49],{33:[1,118],42:[1,119]}),t(p,[2,53],{38:[1,120],42:[1,121]}),t(p,[2,63],{33:[1,123],38:[1,122]}),t(p,[2,50],{33:[1,124],42:[1,125]}),t(p,[2,55],{35:[1,126],42:[1,127]}),t(p,[2,66],{33:[1,129],35:[1,128]}),t(p,[2,52],{38:[1,130],42:[1,131]}),t(p,[2,54],{35:[1,132],42:[1,133]}),t(p,[2,67],{35:[1,135],38:[1,134]}),t(p,[2,64],{33:[1,137],38:[1,136]}),t(p,[2,65],{33:[1,139],35:[1,138]}),t(p,[2,68],{35:[1,141],38:[1,140]}),{39:142,43:m,44:_,45:y},{34:[1,143]},{34:[1,144]},{34:[1,145]},{34:[1,146]},{39:147,43:m,44:_,45:y},t(p,[2,26]),t(p,[2,27]),t(p,[2,28]),t(p,[2,29]),{34:[1,148]},{34:[1,149]},{39:150,43:m,44:_,45:y},{34:[1,151]},{39:152,43:m,44:_,45:y},{34:[1,153]},{34:[1,154]},{34:[1,155]},{34:[1,156]},{34:[1,157]},{34:[1,158]},{34:[1,159]},{39:160,43:m,44:_,45:y},{34:[1,161]},{34:[1,162]},{34:[1,163]},{39:164,43:m,44:_,45:y},{34:[1,165]},{39:166,43:m,44:_,45:y},{34:[1,167]},{34:[1,168]},{34:[1,169]},{39:170,43:m,44:_,45:y},{34:[1,171]},t(p,[2,37],{35:[1,172]}),t(p,[2,38],{38:[1,173]}),t(p,[2,36],{33:[1,174]}),t(p,[2,39],{35:[1,175]}),t(p,[2,34],{38:[1,176]}),t(p,[2,35],{33:[1,177]}),t(p,[2,60],{42:[1,178]}),t(p,[2,73],{33:[1,179]}),t(p,[2,61],{42:[1,180]}),t(p,[2,84],{38:[1,181]}),t(p,[2,74],{33:[1,182]}),t(p,[2,83],{38:[1,183]}),t(p,[2,59],{42:[1,184]}),t(p,[2,72],{33:[1,185]}),t(p,[2,58],{42:[1,186]}),t(p,[2,78],{35:[1,187]}),t(p,[2,71],{33:[1,188]}),t(p,[2,77],{35:[1,189]}),t(p,[2,57],{42:[1,190]}),t(p,[2,85],{38:[1,191]}),t(p,[2,56],{42:[1,192]}),t(p,[2,79],{35:[1,193]}),t(p,[2,80],{35:[1,194]}),t(p,[2,86],{38:[1,195]}),t(p,[2,70],{33:[1,196]}),t(p,[2,81],{38:[1,197]}),t(p,[2,69],{33:[1,198]}),t(p,[2,75],{35:[1,199]}),t(p,[2,76],{35:[1,200]}),t(p,[2,82],{38:[1,201]}),{34:[1,202]},{39:203,43:m,44:_,45:y},{34:[1,204]},{34:[1,205]},{39:206,43:m,44:_,45:y},{34:[1,207]},{34:[1,208]},{34:[1,209]},{34:[1,210]},{39:211,43:m,44:_,45:y},{34:[1,212]},{39:213,43:m,44:_,45:y},{34:[1,214]},{34:[1,215]},{34:[1,216]},{34:[1,217]},{34:[1,218]},{34:[1,219]},{34:[1,220]},{39:221,43:m,44:_,45:y},{34:[1,222]},{34:[1,223]},{34:[1,224]},{39:225,43:m,44:_,45:y},{34:[1,226]},{39:227,43:m,44:_,45:y},{34:[1,228]},{34:[1,229]},{34:[1,230]},{39:231,43:m,44:_,45:y},t(p,[2,40]),t(p,[2,42]),t(p,[2,41]),t(p,[2,43]),t(p,[2,45]),t(p,[2,44]),t(p,[2,101]),t(p,[2,102]),t(p,[2,99]),t(p,[2,100]),t(p,[2,104]),t(p,[2,103]),t(p,[2,108]),t(p,[2,107]),t(p,[2,106]),t(p,[2,105]),t(p,[2,110]),t(p,[2,109]),t(p,[2,98]),t(p,[2,97]),t(p,[2,96]),t(p,[2,95]),t(p,[2,93]),t(p,[2,94]),t(p,[2,92]),t(p,[2,91]),t(p,[2,90]),t(p,[2,89]),t(p,[2,87]),t(p,[2,88])],defaultActions:{9:[2,118],10:[2,1],11:[2,2],19:[2,3],27:[2,4],46:[2,120],47:[2,5]},parseError:function(M,S){if(S.recoverable)this.trace(M);else{var R=new Error(M);throw R.hash=S,R}},parse:function(M){var S=this,R=[0],A=[],L=[null],v=[],B=this.table,w="",D=0,N=0,z=2,X=1,ct=v.slice.call(arguments,1),J=Object.create(this.lexer),Y={yy:{}};for(var $ in this.yy)Object.prototype.hasOwnProperty.call(this.yy,$)&&(Y.yy[$]=this.yy[$]);J.setInput(M,Y.yy),Y.yy.lexer=J,Y.yy.parser=this,typeof J.yylloc>"u"&&(J.yylloc={});var lt=J.yylloc;v.push(lt);var ut=J.options&&J.options.ranges;typeof Y.yy.parseError=="function"?this.parseError=Y.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function W(){var P;return P=A.pop()||J.lex()||X,typeof P!="number"&&(P instanceof Array&&(A=P,P=A.pop()),P=S.symbols_[P]||P),P}for(var tt,K,it,Z,V={},Q,q,U,F;;){if(K=R[R.length-1],this.defaultActions[K]?it=this.defaultActions[K]:((tt===null||typeof tt>"u")&&(tt=W()),it=B[K]&&B[K][tt]),typeof it>"u"||!it.length||!it[0]){var j="";F=[];for(Q in B[K])this.terminals_[Q]&&Q>z&&F.push("'"+this.terminals_[Q]+"'");J.showPosition?j="Parse error on line "+(D+1)+`:
+`+J.showPosition()+`
+Expecting `+F.join(", ")+", got '"+(this.terminals_[tt]||tt)+"'":j="Parse error on line "+(D+1)+": Unexpected "+(tt==X?"end of input":"'"+(this.terminals_[tt]||tt)+"'"),this.parseError(j,{text:J.match,token:this.terminals_[tt]||tt,line:J.yylineno,loc:lt,expected:F})}if(it[0]instanceof Array&&it.length>1)throw new Error("Parse Error: multiple actions possible at state: "+K+", token: "+tt);switch(it[0]){case 1:R.push(tt),L.push(J.yytext),v.push(J.yylloc),R.push(it[1]),tt=null,N=J.yyleng,w=J.yytext,D=J.yylineno,lt=J.yylloc;break;case 2:if(q=this.productions_[it[1]][1],V.$=L[L.length-q],V._$={first_line:v[v.length-(q||1)].first_line,last_line:v[v.length-1].last_line,first_column:v[v.length-(q||1)].first_column,last_column:v[v.length-1].last_column},ut&&(V._$.range=[v[v.length-(q||1)].range[0],v[v.length-1].range[1]]),Z=this.performAction.apply(V,[w,N,D,Y.yy,it[1],L,v].concat(ct)),typeof Z<"u")return Z;q&&(R=R.slice(0,-1*q*2),L=L.slice(0,-1*q),v=v.slice(0,-1*q)),R.push(this.productions_[it[1]][0]),L.push(V.$),v.push(V._$),U=B[R[R.length-2]][R[R.length-1]],R.push(U);break;case 3:return!0}}return!0}},k=function(){var C={EOF:1,parseError:function(S,R){if(this.yy.parser)this.yy.parser.parseError(S,R);else throw new Error(S)},setInput:function(M,S){return this.yy=S||this.yy||{},this._input=M,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var M=this._input[0];this.yytext+=M,this.yyleng++,this.offset++,this.match+=M,this.matched+=M;var S=M.match(/(?:\r\n?|\n).*/g);return S?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),M},unput:function(M){var S=M.length,R=M.split(/(?:\r\n?|\n)/g);this._input=M+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-S),this.offset-=S;var A=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),R.length-1&&(this.yylineno-=R.length-1);var L=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:R?(R.length===A.length?this.yylloc.first_column:0)+A[A.length-R.length].length-R[0].length:this.yylloc.first_column-S},this.options.ranges&&(this.yylloc.range=[L[0],L[0]+this.yyleng-S]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
+`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(M){this.unput(this.match.slice(M))},pastInput:function(){var M=this.matched.substr(0,this.matched.length-this.match.length);return(M.length>20?"...":"")+M.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var M=this.match;return M.length<20&&(M+=this._input.substr(0,20-M.length)),(M.substr(0,20)+(M.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var M=this.pastInput(),S=new Array(M.length+1).join("-");return M+this.upcomingInput()+`
+`+S+"^"},test_match:function(M,S){var R,A,L;if(this.options.backtrack_lexer&&(L={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(L.yylloc.range=this.yylloc.range.slice(0))),A=M[0].match(/(?:\r\n?|\n).*/g),A&&(this.yylineno+=A.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:A?A[A.length-1].length-A[A.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+M[0].length},this.yytext+=M[0],this.match+=M[0],this.matches=M,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(M[0].length),this.matched+=M[0],R=this.performAction.call(this,this.yy,this,S,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),R)return R;if(this._backtrack){for(var v in L)this[v]=L[v];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var M,S,R,A;this._more||(this.yytext="",this.match="");for(var L=this._currentRules(),v=0;v<L.length;v++)if(R=this._input.match(this.rules[L[v]]),R&&(!S||R[0].length>S[0].length)){if(S=R,A=v,this.options.backtrack_lexer){if(M=this.test_match(R,L[v]),M!==!1)return M;if(this._backtrack){S=!1;continue}else return!1}else if(!this.options.flex)break}return S?(M=this.test_match(S,L[A]),M!==!1?M:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
+`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var S=this.next();return S||this.lex()},begin:function(S){this.conditionStack.push(S)},popState:function(){var S=this.conditionStack.length-1;return S>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(S){return S=this.conditionStack.length-1-Math.abs(S||0),S>=0?this.conditionStack[S]:"INITIAL"},pushState:function(S){this.begin(S)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(S,R,A,L){switch(A){case 0:return this.begin("open_directive"),50;case 1:return this.begin("type_directive"),51;case 2:return this.popState(),this.begin("arg_directive"),9;case 3:return this.popState(),this.popState(),53;case 4:return 52;case 5:return this.begin("acc_title"),20;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),22;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:return 14;case 13:break;case 14:break;case 15:return 6;case 16:return 40;case 17:return 33;case 18:return 38;case 19:return 42;case 20:return 43;case 21:return 44;case 22:return 45;case 23:return 35;case 24:return 29;case 25:return 30;case 26:return 37;case 27:return 32;case 28:return 27;case 29:return 10;case 30:return 10;case 31:return 9;case 32:return"CARET";case 33:this.begin("options");break;case 34:this.popState();break;case 35:return 13;case 36:return 36;case 37:this.begin("string");break;case 38:this.popState();break;case 39:return 34;case 40:return 31;case 41:return 28;case 42:return 8}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit(?=\s|$))/i,/^(?:id:)/i,/^(?:type:)/i,/^(?:msg:)/i,/^(?:NORMAL\b)/i,/^(?:REVERSE\b)/i,/^(?:HIGHLIGHT\b)/i,/^(?:tag:)/i,/^(?:branch(?=\s|$))/i,/^(?:order:)/i,/^(?:merge(?=\s|$))/i,/^(?:cherry-pick(?=\s|$))/i,/^(?:checkout(?=\s|$))/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:[ \r\n\t]+end\b)/i,/^(?:[\s\S]+(?=[ \r\n\t]+end))/i,/^(?:["]["])/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[0-9]+(?=\s|$))/i,/^(?:\w([-\./\w]*[-\w])?)/i,/^(?:$)/i,/^(?:\s+)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},options:{rules:[34,35],inclusive:!1},string:{rules:[38,39],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,36,37,40,41,42,43],inclusive:!0}}};return C}();x.lexer=k;function T(){this.yy={}}return T.prototype=x,x.Parser=T,new T}();hg.parser=hg;const IX=t=>t.match(/^\s*gitGraph/)!==null;let fg="",l1="",dg="";const pg=t=>ai(t,nt()),ci=function(){fg="",dg="",l1=""},Yn=function(t){fg=pg(t).replace(/^\s+/g,"")},ui=function(){return fg||l1},hi=function(t){dg=pg(t).replace(/\n\s+/g,`
+`)},fi=function(){return dg},c1=function(t){l1=pg(t)},u1=function(){return l1};let h1=nt().gitGraph.mainBranchName,NX=nt().gitGraph.mainBranchOrder,kr={},cn=null,Bc={};Bc[h1]={name:h1,order:NX};let pr={};pr[h1]=cn;let Rr=h1,qw="LR",Ys=0;function gg(){return uw({length:7})}const BX=function(t,e,r){He.parseDirective(this,t,e,r)};function DX(t,e){const r=Object.create(null);return t.reduce((n,i)=>{const a=e(i);return r[a]||(r[a]=!0,n.push(i)),n},[])}const OX=function(t){qw=t};let Vw={};const FX=function(t){H.debug("options str",t),t=t&&t.trim(),t=t||"{}";try{Vw=JSON.parse(t)}catch(e){H.error("error while parsing gitGraph options",e.message)}},PX=function(){return Vw},qX=function(t,e,r,n){H.debug("Entering commit:",t,e,r,n),e=pe.sanitizeText(e,nt()),t=pe.sanitizeText(t,nt()),n=pe.sanitizeText(n,nt());const i={id:e||Ys+"-"+gg(),message:t,seq:Ys++,type:r||Dc.NORMAL,tag:n||"",parents:cn==null?[]:[cn.id],branch:Rr};cn=i,kr[i.id]=i,pr[Rr]=i.id,H.debug("in pushCommit "+i.id)},VX=function(t,e){if(t=pe.sanitizeText(t,nt()),typeof pr[t]>"u")pr[t]=cn!=null?cn.id:null,Bc[t]={name:t,order:e?parseInt(e,10):null},zw(t),H.debug("in createBranch");else{let r=new Error('Trying to create an existing branch. (Help: Either use a new name if you want create a new branch or try using "checkout '+t+'")');throw r.hash={text:"branch "+t,token:"branch "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"checkout '+t+'"']},r}},zX=function(t,e,r,n){t=pe.sanitizeText(t,nt()),e=pe.sanitizeText(e,nt());const i=kr[pr[Rr]],a=kr[pr[t]];if(Rr===t){let o=new Error('Incorrect usage of "merge". Cannot merge a branch to itself');throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},o}else if(typeof i>"u"||!i){let o=new Error('Incorrect usage of "merge". Current branch ('+Rr+")has no commits");throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["commit"]},o}else if(typeof pr[t]>"u"){let o=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") does not exist");throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch "+t]},o}else if(typeof a>"u"||!a){let o=new Error('Incorrect usage of "merge". Branch to be merged ('+t+") has no commits");throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"commit"']},o}else if(i===a){let o=new Error('Incorrect usage of "merge". Both branches have same head');throw o.hash={text:"merge "+t,token:"merge "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["branch abc"]},o}else if(e&&typeof kr[e]<"u"){let o=new Error('Incorrect usage of "merge". Commit with id:'+e+" already exists, use different custom Id");throw o.hash={text:"merge "+t+e+r+n,token:"merge "+t+e+r+n,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["merge "+t+" "+e+"_UNIQUE "+r+" "+n]},o}const s={id:e||Ys+"-"+gg(),message:"merged branch "+t+" into "+Rr,seq:Ys++,parents:[cn==null?null:cn.id,pr[t]],branch:Rr,type:Dc.MERGE,customType:r,customId:!!e,tag:n||""};cn=s,kr[s.id]=s,pr[Rr]=s.id,H.debug(pr),H.debug("in mergeBranch")},YX=function(t,e,r){if(H.debug("Entering cherryPick:",t,e,r),t=pe.sanitizeText(t,nt()),e=pe.sanitizeText(e,nt()),r=pe.sanitizeText(r,nt()),!t||typeof kr[t]>"u"){let a=new Error('Incorrect usage of "cherryPick". Source commit id should exist and provided');throw a.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},a}let n=kr[t],i=n.branch;if(n.type===Dc.MERGE){let a=new Error('Incorrect usage of "cherryPick". Source commit should not be a merge commit');throw a.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},a}if(!e||typeof kr[e]>"u"){if(i===Rr){let o=new Error('Incorrect usage of "cherryPick". Source commit is already on current branch');throw o.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},o}const a=kr[pr[Rr]];if(typeof a>"u"||!a){let o=new Error('Incorrect usage of "cherry-pick". Current branch ('+Rr+")has no commits");throw o.hash={text:"cherryPick "+t+" "+e,token:"cherryPick "+t+" "+e,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["cherry-pick abc"]},o}const s={id:Ys+"-"+gg(),message:"cherry-picked "+n+" into "+Rr,seq:Ys++,parents:[cn==null?null:cn.id,n.id],branch:Rr,type:Dc.CHERRY_PICK,tag:r!=null?r:"cherry-pick:"+n.id};cn=s,kr[s.id]=s,pr[Rr]=s.id,H.debug(pr),H.debug("in cherryPick")}},zw=function(t){if(t=pe.sanitizeText(t,nt()),typeof pr[t]>"u"){let e=new Error('Trying to checkout branch which is not yet created. (Help try using "branch '+t+'")');throw e.hash={text:"checkout "+t,token:"checkout "+t,line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:['"branch '+t+'"']},e}else{Rr=t;const e=pr[Rr];cn=kr[e]}};function Yw(t,e,r){const n=t.indexOf(e);n===-1?t.push(r):t.splice(n,1,r)}function Uw(t){const e=t.reduce((i,a)=>i.seq>a.seq?i:a,t[0]);let r="";t.forEach(function(i){i===e?r+=" *":r+=" |"});const n=[r,e.id,e.seq];for(let i in pr)pr[i]===e.id&&n.push(i);if(H.debug(n.join(" ")),e.parents&&e.parents.length==2){const i=kr[e.parents[0]];Yw(t,e,i),t.push(kr[e.parents[1]])}else{if(e.parents.length==0)return;{const i=kr[e.parents];Yw(t,e,i)}}t=DX(t,i=>i.id),Uw(t)}const UX=function(){H.debug(kr);const t=Ww()[0];Uw([t])},WX=function(){kr={},cn=null;let t=nt().gitGraph.mainBranchName,e=nt().gitGraph.mainBranchOrder;pr={},pr[t]=null,Bc={},Bc[t]={name:t,order:e},Rr=t,Ys=0,ci()},HX=function(){return Object.values(Bc).map((e,r)=>e.order!==null?e:{...e,order:parseFloat(`0.${r}`,10)}).sort((e,r)=>e.order-r.order).map(({name:e})=>({name:e}))},GX=function(){return pr},jX=function(){return kr},Ww=function(){const t=Object.keys(kr).map(function(e){return kr[e]});return t.forEach(function(e){H.debug(e.id)}),t.sort((e,r)=>e.seq-r.seq),t},$X=function(){return Rr},XX=function(){return qw},KX=function(){return cn},Dc={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},ZX={parseDirective:BX,getConfig:()=>nt().gitGraph,setDirection:OX,setOptions:FX,getOptions:PX,commit:qX,branch:VX,merge:zX,cherryPick:YX,checkout:zw,prettyPrint:UX,clear:WX,getBranchesAsObjArray:HX,getBranches:GX,getCommits:jX,getCommitsArray:Ww,getCurrentBranch:$X,getDirection:XX,getHead:KX,setAccTitle:Yn,getAccTitle:ui,getAccDescription:fi,setAccDescription:hi,commitType:Dc};function bn(t,e,r){if(typeof e.insert>"u")return;let n=t.getAccTitle(),i=t.getAccDescription();e.attr("role","img").attr("aria-labelledby","chart-title-"+r+" chart-desc-"+r),e.insert("desc",":first-child").attr("id","chart-desc-"+r).text(i),e.insert("title",":first-child").attr("id","chart-title-"+r).text(n)}let Oc={};const Sn={NORMAL:0,REVERSE:1,HIGHLIGHT:2,MERGE:3,CHERRY_PICK:4},Us=8;let _n={},f1={},Fc=[],d1=0;const QX=()=>{_n={},f1={},Oc={},d1=0,Fc=[]},JX=t=>{const e=document.createElementNS("http://www.w3.org/2000/svg","text");let r=[];typeof t=="string"?r=t.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(t)?r=t:r=[];for(let n=0;n<r.length;n++){const i=document.createElementNS("http://www.w3.org/2000/svg","tspan");i.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),i.setAttribute("dy","1em"),i.setAttribute("x","0"),i.setAttribute("class","row"),i.textContent=r[n].trim(),e.appendChild(i)}return e},Hw=(t,e,r)=>{const n=Zo().gitGraph,i=t.append("g").attr("class","commit-bullets"),a=t.append("g").attr("class","commit-labels");let s=0;Object.keys(e).sort((u,h)=>e[u].seq-e[h].seq).forEach(u=>{const h=e[u],d=_n[h.branch].pos,f=s+10;if(r){let p,m=typeof h.customType<"u"&&h.customType!==""?h.customType:h.type;switch(m){case Sn.NORMAL:p="commit-normal";break;case Sn.REVERSE:p="commit-reverse";break;case Sn.HIGHLIGHT:p="commit-highlight";break;case Sn.MERGE:p="commit-merge";break;case Sn.CHERRY_PICK:p="commit-cherry-pick";break;default:p="commit-normal"}if(m===Sn.HIGHLIGHT){const _=i.append("rect");_.attr("x",f-10),_.attr("y",d-10),_.attr("height",20),_.attr("width",20),_.attr("class",`commit ${h.id} commit-highlight${_n[h.branch].index%Us} ${p}-outer`),i.append("rect").attr("x",f-6).attr("y",d-6).attr("height",12).attr("width",12).attr("class",`commit ${h.id} commit${_n[h.branch].index%Us} ${p}-inner`)}else if(m===Sn.CHERRY_PICK)i.append("circle").attr("cx",f).attr("cy",d).attr("r",10).attr("class",`commit ${h.id} ${p}`),i.append("circle").attr("cx",f-3).attr("cy",d+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${h.id} ${p}`),i.append("circle").attr("cx",f+3).attr("cy",d+2).attr("r",2.75).attr("fill","#fff").attr("class",`commit ${h.id} ${p}`),i.append("line").attr("x1",f+3).attr("y1",d+1).attr("x2",f).attr("y2",d-5).attr("stroke","#fff").attr("class",`commit ${h.id} ${p}`),i.append("line").attr("x1",f-3).attr("y1",d+1).attr("x2",f).attr("y2",d-5).attr("stroke","#fff").attr("class",`commit ${h.id} ${p}`);else{const _=i.append("circle");if(_.attr("cx",f),_.attr("cy",d),_.attr("r",h.type===Sn.MERGE?9:10),_.attr("class",`commit ${h.id} commit${_n[h.branch].index%Us}`),m===Sn.MERGE){const y=i.append("circle");y.attr("cx",f),y.attr("cy",d),y.attr("r",6),y.attr("class",`commit ${p} ${h.id} commit${_n[h.branch].index%Us}`)}m===Sn.REVERSE&&i.append("path").attr("d",`M ${f-5},${d-5}L${f+5},${d+5}M${f-5},${d+5}L${f+5},${d-5}`).attr("class",`commit ${p} ${h.id} commit${_n[h.branch].index%Us}`)}}if(f1[h.id]={x:s+10,y:d},r){if(h.type!==Sn.CHERRY_PICK&&(h.customId&&h.type===Sn.MERGE||h.type!==Sn.MERGE)&&n.showCommitLabel){const _=a.append("g"),y=_.insert("rect").attr("class","commit-label-bkg"),b=_.append("text").attr("x",s).attr("y",d+25).attr("class","commit-label").text(h.id);let x=b.node().getBBox();if(y.attr("x",s+10-x.width/2-2).attr("y",d+13.5).attr("width",x.width+2*2).attr("height",x.height+2*2),b.attr("x",s+10-x.width/2),n.rotateCommitLabel){let k=-7.5-(x.width+10)/25*9.5,T=10+x.width/25*8.5;_.attr("transform","translate("+k+", "+T+") rotate("+-45+", "+s+", "+d+")")}}if(h.tag){const _=a.insert("polygon"),y=a.append("circle"),b=a.append("text").attr("y",d-16).attr("class","tag-label").text(h.tag);let x=b.node().getBBox();b.attr("x",s+10-x.width/2);const k=x.height/2,T=d-19.2;_.attr("class","tag-label-bkg").attr("points",`
+ ${s-x.width/2-4/2},${T+2}
+ ${s-x.width/2-4/2},${T-2}
+ ${s+10-x.width/2-4},${T-k-2}
+ ${s+10+x.width/2+4},${T-k-2}
+ ${s+10+x.width/2+4},${T+k+2}
+ ${s+10-x.width/2-4},${T+k+2}`),y.attr("cx",s-x.width/2+4/2).attr("cy",T).attr("r",1.5).attr("class","tag-hole")}}s+=50,s>d1&&(d1=s)})},tK=(t,e,r)=>Object.keys(r).filter(a=>r[a].branch===e.branch&&r[a].seq>t.seq&&r[a].seq<e.seq).length>0,yg=(t,e,r)=>{const n=r||0,i=t+Math.abs(t-e)/2;if(n>5)return i;let a=!0;for(let o=0;o<Fc.length;o++)Math.abs(Fc[o]-i)<10&&(a=!1);if(a)return Fc.push(i),i;const s=Math.abs(t-e);return yg(t,e-s/5,n+1)},eK=(t,e,r,n)=>{const i=f1[e.id],a=f1[r.id],s=tK(e,r,n);let o="",l="",u=0,h=0,d=_n[r.branch].index,f;if(s){o="A 10 10, 0, 0, 0,",l="A 10 10, 0, 0, 1,",u=10,h=10,d=_n[r.branch].index;const p=i.y<a.y?yg(i.y,a.y):yg(a.y,i.y);i.y<a.y?f=`M ${i.x} ${i.y} L ${i.x} ${p-u} ${o} ${i.x+h} ${p} L ${a.x-u} ${p} ${l} ${a.x} ${p+h} L ${a.x} ${a.y}`:f=`M ${i.x} ${i.y} L ${i.x} ${p+u} ${l} ${i.x+h} ${p} L ${a.x-u} ${p} ${o} ${a.x} ${p-h} L ${a.x} ${a.y}`}else i.y<a.y&&(o="A 20 20, 0, 0, 0,",u=20,h=20,d=_n[r.branch].index,f=`M ${i.x} ${i.y} L ${i.x} ${a.y-u} ${o} ${i.x+h} ${a.y} L ${a.x} ${a.y}`),i.y>a.y&&(o="A 20 20, 0, 0, 0,",u=20,h=20,d=_n[e.branch].index,f=`M ${i.x} ${i.y} L ${a.x-u} ${i.y} ${o} ${a.x} ${i.y-h} L ${a.x} ${a.y}`),i.y===a.y&&(d=_n[e.branch].index,f=`M ${i.x} ${i.y} L ${i.x} ${a.y-u} ${o} ${i.x+h} ${a.y} L ${a.x} ${a.y}`);t.append("path").attr("d",f).attr("class","arrow arrow"+d%Us)},rK=(t,e)=>{const r=t.append("g").attr("class","commit-arrows");Object.keys(e).forEach(n=>{const i=e[n];i.parents&&i.parents.length>0&&i.parents.forEach(a=>{eK(r,e[a],i,e)})})},nK=(t,e)=>{const r=Zo().gitGraph,n=t.append("g");e.forEach((i,a)=>{const s=a%Us,o=_n[i.name].pos,l=n.append("line");l.attr("x1",0),l.attr("y1",o),l.attr("x2",d1),l.attr("y2",o),l.attr("class","branch branch"+s),Fc.push(o);let u=i.name;const h=JX(u),d=n.insert("rect"),p=n.insert("g").attr("class","branchLabel").insert("g").attr("class","label branch-label"+s);p.node().appendChild(h);let m=h.getBBox();d.attr("class","branchLabelBkg label"+s).attr("rx",4).attr("ry",4).attr("x",-m.width-4-(r.rotateCommitLabel===!0?30:0)).attr("y",-m.height/2+8).attr("width",m.width+18).attr("height",m.height+4),p.attr("transform","translate("+(-m.width-14-(r.rotateCommitLabel===!0?30:0))+", "+(o-m.height/2-1)+")"),d.attr("transform","translate("+-19+", "+(o-m.height/2)+")")})},iK={draw:function(t,e,r,n){QX();const i=Zo(),a=Zo().gitGraph;H.debug("in gitgraph renderer",t+`
+`,"id:",e,r),Oc=n.db.getCommits();const s=n.db.getBranchesAsObjArray();let o=0;s.forEach((u,h)=>{_n[u.name]={pos:o,index:h},o+=50+(a.rotateCommitLabel?40:0)});const l=St(`[id="${e}"]`);bn(n.db,l,e),Hw(l,Oc,!1),a.showBranches&&nK(l,s),rK(l,Oc),Hw(l,Oc,!0),Ow(void 0,l,a.diagramPadding,i.useMaxWidth)}},aK=t=>`
+ .commit-id,
+ .commit-msg,
+ .branch-label {
+ fill: lightgrey;
+ color: lightgrey;
+ font-family: 'trebuchet ms', verdana, arial, sans-serif;
+ font-family: var(--mermaid-font-family);
+ }
+ ${[0,1,2,3,4,5,6,7].map(e=>`
+ .branch-label${e} { fill: ${t["gitBranchLabel"+e]}; }
+ .commit${e} { stroke: ${t["git"+e]}; fill: ${t["git"+e]}; }
+ .commit-highlight${e} { stroke: ${t["gitInv"+e]}; fill: ${t["gitInv"+e]}; }
+ .label${e} { fill: ${t["git"+e]}; }
+ .arrow${e} { stroke: ${t["git"+e]}; }
+ `).join(`
+`)}
+
+ .branch {
+ stroke-width: 1;
+ stroke: ${t.lineColor};
+ stroke-dasharray: 2;
+ }
+ .commit-label { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelColor};}
+ .commit-label-bkg { font-size: ${t.commitLabelFontSize}; fill: ${t.commitLabelBackground}; opacity: 0.5; }
+ .tag-label { font-size: ${t.tagLabelFontSize}; fill: ${t.tagLabelColor};}
+ .tag-label-bkg { fill: ${t.tagLabelBackground}; stroke: ${t.tagLabelBorder}; }
+ .tag-hole { fill: ${t.textColor}; }
+
+ .commit-merge {
+ stroke: ${t.primaryColor};
+ fill: ${t.primaryColor};
+ }
+ .commit-reverse {
+ stroke: ${t.primaryColor};
+ fill: ${t.primaryColor};
+ stroke-width: 3;
+ }
+ .commit-highlight-outer {
+ }
+ .commit-highlight-inner {
+ stroke: ${t.primaryColor};
+ fill: ${t.primaryColor};
+ }
+
+ .arrow { stroke-width: 8; stroke-linecap: round; fill: none}
+ }
+`;var Pc=function(){var t=function(zt,wt,bt,Et){for(bt=bt||{},Et=zt.length;Et--;bt[zt[Et]]=wt);return bt},e=[1,6],r=[1,7],n=[1,8],i=[1,9],a=[1,16],s=[1,11],o=[1,12],l=[1,13],u=[1,14],h=[1,15],d=[1,27],f=[1,33],p=[1,34],m=[1,35],_=[1,36],y=[1,37],b=[1,72],x=[1,73],k=[1,74],T=[1,75],C=[1,76],M=[1,77],S=[1,78],R=[1,38],A=[1,39],L=[1,40],v=[1,41],B=[1,42],w=[1,43],D=[1,44],N=[1,45],z=[1,46],X=[1,47],ct=[1,48],J=[1,49],Y=[1,50],$=[1,51],lt=[1,52],ut=[1,53],W=[1,54],tt=[1,55],K=[1,56],it=[1,57],Z=[1,59],V=[1,60],Q=[1,61],q=[1,62],U=[1,63],F=[1,64],j=[1,65],P=[1,66],et=[1,67],at=[1,68],It=[1,69],Lt=[24,52],Rt=[24,44,46,47,48,49,50,51,52,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],Ct=[15,24,44,46,47,48,49,50,51,52,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],pt=[1,94],mt=[1,95],vt=[1,96],Tt=[1,97],ft=[15,24,52],le=[7,8,9,10,18,22,25,26,27,28],Dt=[15,24,43,52],Gt=[15,24,43,52,86,87,89,90],$t=[15,43],Qt=[44,46,47,48,49,50,51,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84],we={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,direction:5,directive:6,direction_tb:7,direction_bt:8,direction_rl:9,direction_lr:10,graphConfig:11,openDirective:12,typeDirective:13,closeDirective:14,NEWLINE:15,":":16,argDirective:17,open_directive:18,type_directive:19,arg_directive:20,close_directive:21,C4_CONTEXT:22,statements:23,EOF:24,C4_CONTAINER:25,C4_COMPONENT:26,C4_DYNAMIC:27,C4_DEPLOYMENT:28,otherStatements:29,diagramStatements:30,otherStatement:31,title:32,accDescription:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,boundaryStatement:39,boundaryStartStatement:40,boundaryStopStatement:41,boundaryStart:42,LBRACE:43,ENTERPRISE_BOUNDARY:44,attributes:45,SYSTEM_BOUNDARY:46,BOUNDARY:47,CONTAINER_BOUNDARY:48,NODE:49,NODE_L:50,NODE_R:51,RBRACE:52,diagramStatement:53,PERSON:54,PERSON_EXT:55,SYSTEM:56,SYSTEM_DB:57,SYSTEM_QUEUE:58,SYSTEM_EXT:59,SYSTEM_EXT_DB:60,SYSTEM_EXT_QUEUE:61,CONTAINER:62,CONTAINER_DB:63,CONTAINER_QUEUE:64,CONTAINER_EXT:65,CONTAINER_EXT_DB:66,CONTAINER_EXT_QUEUE:67,COMPONENT:68,COMPONENT_DB:69,COMPONENT_QUEUE:70,COMPONENT_EXT:71,COMPONENT_EXT_DB:72,COMPONENT_EXT_QUEUE:73,REL:74,BIREL:75,REL_U:76,REL_D:77,REL_L:78,REL_R:79,REL_B:80,REL_INDEX:81,UPDATE_EL_STYLE:82,UPDATE_REL_STYLE:83,UPDATE_LAYOUT_CONFIG:84,attribute:85,STR:86,STR_KEY:87,STR_VALUE:88,ATTRIBUTE:89,ATTRIBUTE_EMPTY:90,$accept:0,$end:1},terminals_:{2:"error",7:"direction_tb",8:"direction_bt",9:"direction_rl",10:"direction_lr",15:"NEWLINE",16:":",18:"open_directive",19:"type_directive",20:"arg_directive",21:"close_directive",22:"C4_CONTEXT",24:"EOF",25:"C4_CONTAINER",26:"C4_COMPONENT",27:"C4_DYNAMIC",28:"C4_DEPLOYMENT",32:"title",33:"accDescription",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",43:"LBRACE",44:"ENTERPRISE_BOUNDARY",46:"SYSTEM_BOUNDARY",47:"BOUNDARY",48:"CONTAINER_BOUNDARY",49:"NODE",50:"NODE_L",51:"NODE_R",52:"RBRACE",54:"PERSON",55:"PERSON_EXT",56:"SYSTEM",57:"SYSTEM_DB",58:"SYSTEM_QUEUE",59:"SYSTEM_EXT",60:"SYSTEM_EXT_DB",61:"SYSTEM_EXT_QUEUE",62:"CONTAINER",63:"CONTAINER_DB",64:"CONTAINER_QUEUE",65:"CONTAINER_EXT",66:"CONTAINER_EXT_DB",67:"CONTAINER_EXT_QUEUE",68:"COMPONENT",69:"COMPONENT_DB",70:"COMPONENT_QUEUE",71:"COMPONENT_EXT",72:"COMPONENT_EXT_DB",73:"COMPONENT_EXT_QUEUE",74:"REL",75:"BIREL",76:"REL_U",77:"REL_D",78:"REL_L",79:"REL_R",80:"REL_B",81:"REL_INDEX",82:"UPDATE_EL_STYLE",83:"UPDATE_REL_STYLE",84:"UPDATE_LAYOUT_CONFIG",86:"STR",87:"STR_KEY",88:"STR_VALUE",89:"ATTRIBUTE",90:"ATTRIBUTE_EMPTY"},productions_:[0,[3,1],[3,1],[3,2],[5,1],[5,1],[5,1],[5,1],[4,1],[6,4],[6,6],[12,1],[13,1],[17,1],[14,1],[11,4],[11,4],[11,4],[11,4],[11,4],[23,1],[23,1],[23,2],[29,1],[29,2],[29,3],[31,1],[31,1],[31,2],[31,2],[31,1],[39,3],[40,3],[40,3],[40,4],[42,2],[42,2],[42,2],[42,2],[42,2],[42,2],[42,2],[41,1],[30,1],[30,2],[30,3],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,1],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[53,2],[45,1],[45,2],[85,1],[85,2],[85,1],[85,1]],performAction:function(wt,bt,Et,kt,Ut,gt,he){var yt=gt.length-1;switch(Ut){case 4:kt.setDirection("TB");break;case 5:kt.setDirection("BT");break;case 6:kt.setDirection("RL");break;case 7:kt.setDirection("LR");break;case 11:kt.parseDirective("%%{","open_directive");break;case 12:break;case 13:gt[yt]=gt[yt].trim().replace(/'/g,'"'),kt.parseDirective(gt[yt],"arg_directive");break;case 14:kt.parseDirective("}%%","close_directive","c4Context");break;case 15:case 16:case 17:case 18:case 19:kt.setC4Type(gt[yt-3]);break;case 26:kt.setTitle(gt[yt].substring(6)),this.$=gt[yt].substring(6);break;case 27:kt.setAccDescription(gt[yt].substring(15)),this.$=gt[yt].substring(15);break;case 28:this.$=gt[yt].trim(),kt.setTitle(this.$);break;case 29:case 30:this.$=gt[yt].trim(),kt.setAccDescription(this.$);break;case 35:case 36:gt[yt].splice(2,0,"ENTERPRISE"),kt.addPersonOrSystemBoundary(...gt[yt]),this.$=gt[yt];break;case 37:kt.addPersonOrSystemBoundary(...gt[yt]),this.$=gt[yt];break;case 38:gt[yt].splice(2,0,"CONTAINER"),kt.addContainerBoundary(...gt[yt]),this.$=gt[yt];break;case 39:kt.addDeploymentNode("node",...gt[yt]),this.$=gt[yt];break;case 40:kt.addDeploymentNode("nodeL",...gt[yt]),this.$=gt[yt];break;case 41:kt.addDeploymentNode("nodeR",...gt[yt]),this.$=gt[yt];break;case 42:kt.popBoundaryParseStack();break;case 46:kt.addPersonOrSystem("person",...gt[yt]),this.$=gt[yt];break;case 47:kt.addPersonOrSystem("external_person",...gt[yt]),this.$=gt[yt];break;case 48:kt.addPersonOrSystem("system",...gt[yt]),this.$=gt[yt];break;case 49:kt.addPersonOrSystem("system_db",...gt[yt]),this.$=gt[yt];break;case 50:kt.addPersonOrSystem("system_queue",...gt[yt]),this.$=gt[yt];break;case 51:kt.addPersonOrSystem("external_system",...gt[yt]),this.$=gt[yt];break;case 52:kt.addPersonOrSystem("external_system_db",...gt[yt]),this.$=gt[yt];break;case 53:kt.addPersonOrSystem("external_system_queue",...gt[yt]),this.$=gt[yt];break;case 54:kt.addContainer("container",...gt[yt]),this.$=gt[yt];break;case 55:kt.addContainer("container_db",...gt[yt]),this.$=gt[yt];break;case 56:kt.addContainer("container_queue",...gt[yt]),this.$=gt[yt];break;case 57:kt.addContainer("external_container",...gt[yt]),this.$=gt[yt];break;case 58:kt.addContainer("external_container_db",...gt[yt]),this.$=gt[yt];break;case 59:kt.addContainer("external_container_queue",...gt[yt]),this.$=gt[yt];break;case 60:kt.addComponent("component",...gt[yt]),this.$=gt[yt];break;case 61:kt.addComponent("component_db",...gt[yt]),this.$=gt[yt];break;case 62:kt.addComponent("component_queue",...gt[yt]),this.$=gt[yt];break;case 63:kt.addComponent("external_component",...gt[yt]),this.$=gt[yt];break;case 64:kt.addComponent("external_component_db",...gt[yt]),this.$=gt[yt];break;case 65:kt.addComponent("external_component_queue",...gt[yt]),this.$=gt[yt];break;case 67:kt.addRel("rel",...gt[yt]),this.$=gt[yt];break;case 68:kt.addRel("birel",...gt[yt]),this.$=gt[yt];break;case 69:kt.addRel("rel_u",...gt[yt]),this.$=gt[yt];break;case 70:kt.addRel("rel_d",...gt[yt]),this.$=gt[yt];break;case 71:kt.addRel("rel_l",...gt[yt]),this.$=gt[yt];break;case 72:kt.addRel("rel_r",...gt[yt]),this.$=gt[yt];break;case 73:kt.addRel("rel_b",...gt[yt]),this.$=gt[yt];break;case 74:gt[yt].splice(0,1),kt.addRel("rel",...gt[yt]),this.$=gt[yt];break;case 75:kt.updateElStyle("update_el_style",...gt[yt]),this.$=gt[yt];break;case 76:kt.updateRelStyle("update_rel_style",...gt[yt]),this.$=gt[yt];break;case 77:kt.updateLayoutConfig("update_layout_config",...gt[yt]),this.$=gt[yt];break;case 78:this.$=[gt[yt]];break;case 79:gt[yt].unshift(gt[yt-1]),this.$=gt[yt];break;case 80:case 82:this.$=gt[yt].trim();break;case 81:let ne={};ne[gt[yt-1].trim()]=gt[yt].trim(),this.$=ne;break;case 83:this.$="";break}},table:[{3:1,4:2,5:3,6:4,7:e,8:r,9:n,10:i,11:5,12:10,18:a,22:s,25:o,26:l,27:u,28:h},{1:[3]},{1:[2,1]},{1:[2,2]},{3:17,4:2,5:3,6:4,7:e,8:r,9:n,10:i,11:5,12:10,18:a,22:s,25:o,26:l,27:u,28:h},{1:[2,8]},{1:[2,4]},{1:[2,5]},{1:[2,6]},{1:[2,7]},{13:18,19:[1,19]},{15:[1,20]},{15:[1,21]},{15:[1,22]},{15:[1,23]},{15:[1,24]},{19:[2,11]},{1:[2,3]},{14:25,16:[1,26],21:d},t([16,21],[2,12]),{23:28,29:29,30:30,31:31,32:f,33:p,34:m,36:_,38:y,39:58,40:70,42:71,44:b,46:x,47:k,48:T,49:C,50:M,51:S,53:32,54:R,55:A,56:L,57:v,58:B,59:w,60:D,61:N,62:z,63:X,64:ct,65:J,66:Y,67:$,68:lt,69:ut,70:W,71:tt,72:K,73:it,74:Z,75:V,76:Q,77:q,78:U,79:F,80:j,81:P,82:et,83:at,84:It},{23:79,29:29,30:30,31:31,32:f,33:p,34:m,36:_,38:y,39:58,40:70,42:71,44:b,46:x,47:k,48:T,49:C,50:M,51:S,53:32,54:R,55:A,56:L,57:v,58:B,59:w,60:D,61:N,62:z,63:X,64:ct,65:J,66:Y,67:$,68:lt,69:ut,70:W,71:tt,72:K,73:it,74:Z,75:V,76:Q,77:q,78:U,79:F,80:j,81:P,82:et,83:at,84:It},{23:80,29:29,30:30,31:31,32:f,33:p,34:m,36:_,38:y,39:58,40:70,42:71,44:b,46:x,47:k,48:T,49:C,50:M,51:S,53:32,54:R,55:A,56:L,57:v,58:B,59:w,60:D,61:N,62:z,63:X,64:ct,65:J,66:Y,67:$,68:lt,69:ut,70:W,71:tt,72:K,73:it,74:Z,75:V,76:Q,77:q,78:U,79:F,80:j,81:P,82:et,83:at,84:It},{23:81,29:29,30:30,31:31,32:f,33:p,34:m,36:_,38:y,39:58,40:70,42:71,44:b,46:x,47:k,48:T,49:C,50:M,51:S,53:32,54:R,55:A,56:L,57:v,58:B,59:w,60:D,61:N,62:z,63:X,64:ct,65:J,66:Y,67:$,68:lt,69:ut,70:W,71:tt,72:K,73:it,74:Z,75:V,76:Q,77:q,78:U,79:F,80:j,81:P,82:et,83:at,84:It},{23:82,29:29,30:30,31:31,32:f,33:p,34:m,36:_,38:y,39:58,40:70,42:71,44:b,46:x,47:k,48:T,49:C,50:M,51:S,53:32,54:R,55:A,56:L,57:v,58:B,59:w,60:D,61:N,62:z,63:X,64:ct,65:J,66:Y,67:$,68:lt,69:ut,70:W,71:tt,72:K,73:it,74:Z,75:V,76:Q,77:q,78:U,79:F,80:j,81:P,82:et,83:at,84:It},{15:[1,83]},{17:84,20:[1,85]},{15:[2,14]},{24:[1,86]},t(Lt,[2,20],{53:32,39:58,40:70,42:71,30:87,44:b,46:x,47:k,48:T,49:C,50:M,51:S,54:R,55:A,56:L,57:v,58:B,59:w,60:D,61:N,62:z,63:X,64:ct,65:J,66:Y,67:$,68:lt,69:ut,70:W,71:tt,72:K,73:it,74:Z,75:V,76:Q,77:q,78:U,79:F,80:j,81:P,82:et,83:at,84:It}),t(Lt,[2,21]),t(Rt,[2,23],{15:[1,88]}),t(Lt,[2,43],{15:[1,89]}),t(Ct,[2,26]),t(Ct,[2,27]),{35:[1,90]},{37:[1,91]},t(Ct,[2,30]),{45:92,85:93,86:pt,87:mt,89:vt,90:Tt},{45:98,85:93,86:pt,87:mt,89:vt,90:Tt},{45:99,85:93,86:pt,87:mt,89:vt,90:Tt},{45:100,85:93,86:pt,87:mt,89:vt,90:Tt},{45:101,85:93,86:pt,87:mt,89:vt,90:Tt},{45:102,85:93,86:pt,87:mt,89:vt,90:Tt},{45:103,85:93,86:pt,87:mt,89:vt,90:Tt},{45:104,85:93,86:pt,87:mt,89:vt,90:Tt},{45:105,85:93,86:pt,87:mt,89:vt,90:Tt},{45:106,85:93,86:pt,87:mt,89:vt,90:Tt},{45:107,85:93,86:pt,87:mt,89:vt,90:Tt},{45:108,85:93,86:pt,87:mt,89:vt,90:Tt},{45:109,85:93,86:pt,87:mt,89:vt,90:Tt},{45:110,85:93,86:pt,87:mt,89:vt,90:Tt},{45:111,85:93,86:pt,87:mt,89:vt,90:Tt},{45:112,85:93,86:pt,87:mt,89:vt,90:Tt},{45:113,85:93,86:pt,87:mt,89:vt,90:Tt},{45:114,85:93,86:pt,87:mt,89:vt,90:Tt},{45:115,85:93,86:pt,87:mt,89:vt,90:Tt},{45:116,85:93,86:pt,87:mt,89:vt,90:Tt},t(ft,[2,66]),{45:117,85:93,86:pt,87:mt,89:vt,90:Tt},{45:118,85:93,86:pt,87:mt,89:vt,90:Tt},{45:119,85:93,86:pt,87:mt,89:vt,90:Tt},{45:120,85:93,86:pt,87:mt,89:vt,90:Tt},{45:121,85:93,86:pt,87:mt,89:vt,90:Tt},{45:122,85:93,86:pt,87:mt,89:vt,90:Tt},{45:123,85:93,86:pt,87:mt,89:vt,90:Tt},{45:124,85:93,86:pt,87:mt,89:vt,90:Tt},{45:125,85:93,86:pt,87:mt,89:vt,90:Tt},{45:126,85:93,86:pt,87:mt,89:vt,90:Tt},{45:127,85:93,86:pt,87:mt,89:vt,90:Tt},{30:128,39:58,40:70,42:71,44:b,46:x,47:k,48:T,49:C,50:M,51:S,53:32,54:R,55:A,56:L,57:v,58:B,59:w,60:D,61:N,62:z,63:X,64:ct,65:J,66:Y,67:$,68:lt,69:ut,70:W,71:tt,72:K,73:it,74:Z,75:V,76:Q,77:q,78:U,79:F,80:j,81:P,82:et,83:at,84:It},{15:[1,130],43:[1,129]},{45:131,85:93,86:pt,87:mt,89:vt,90:Tt},{45:132,85:93,86:pt,87:mt,89:vt,90:Tt},{45:133,85:93,86:pt,87:mt,89:vt,90:Tt},{45:134,85:93,86:pt,87:mt,89:vt,90:Tt},{45:135,85:93,86:pt,87:mt,89:vt,90:Tt},{45:136,85:93,86:pt,87:mt,89:vt,90:Tt},{45:137,85:93,86:pt,87:mt,89:vt,90:Tt},{24:[1,138]},{24:[1,139]},{24:[1,140]},{24:[1,141]},t(le,[2,9]),{14:142,21:d},{21:[2,13]},{1:[2,15]},t(Lt,[2,22]),t(Rt,[2,24],{31:31,29:143,32:f,33:p,34:m,36:_,38:y}),t(Lt,[2,44],{29:29,30:30,31:31,53:32,39:58,40:70,42:71,23:144,32:f,33:p,34:m,36:_,38:y,44:b,46:x,47:k,48:T,49:C,50:M,51:S,54:R,55:A,56:L,57:v,58:B,59:w,60:D,61:N,62:z,63:X,64:ct,65:J,66:Y,67:$,68:lt,69:ut,70:W,71:tt,72:K,73:it,74:Z,75:V,76:Q,77:q,78:U,79:F,80:j,81:P,82:et,83:at,84:It}),t(Ct,[2,28]),t(Ct,[2,29]),t(ft,[2,46]),t(Dt,[2,78],{85:93,45:145,86:pt,87:mt,89:vt,90:Tt}),t(Gt,[2,80]),{88:[1,146]},t(Gt,[2,82]),t(Gt,[2,83]),t(ft,[2,47]),t(ft,[2,48]),t(ft,[2,49]),t(ft,[2,50]),t(ft,[2,51]),t(ft,[2,52]),t(ft,[2,53]),t(ft,[2,54]),t(ft,[2,55]),t(ft,[2,56]),t(ft,[2,57]),t(ft,[2,58]),t(ft,[2,59]),t(ft,[2,60]),t(ft,[2,61]),t(ft,[2,62]),t(ft,[2,63]),t(ft,[2,64]),t(ft,[2,65]),t(ft,[2,67]),t(ft,[2,68]),t(ft,[2,69]),t(ft,[2,70]),t(ft,[2,71]),t(ft,[2,72]),t(ft,[2,73]),t(ft,[2,74]),t(ft,[2,75]),t(ft,[2,76]),t(ft,[2,77]),{41:147,52:[1,148]},{15:[1,149]},{43:[1,150]},t($t,[2,35]),t($t,[2,36]),t($t,[2,37]),t($t,[2,38]),t($t,[2,39]),t($t,[2,40]),t($t,[2,41]),{1:[2,16]},{1:[2,17]},{1:[2,18]},{1:[2,19]},{15:[1,151]},t(Rt,[2,25]),t(Lt,[2,45]),t(Dt,[2,79]),t(Gt,[2,81]),t(ft,[2,31]),t(ft,[2,42]),t(Qt,[2,32]),t(Qt,[2,33],{15:[1,152]}),t(le,[2,10]),t(Qt,[2,34])],defaultActions:{2:[2,1],3:[2,2],5:[2,8],6:[2,4],7:[2,5],8:[2,6],9:[2,7],16:[2,11],17:[2,3],27:[2,14],85:[2,13],86:[2,15],138:[2,16],139:[2,17],140:[2,18],141:[2,19]},parseError:function(wt,bt){if(bt.recoverable)this.trace(wt);else{var Et=new Error(wt);throw Et.hash=bt,Et}},parse:function(wt){var bt=this,Et=[0],kt=[],Ut=[null],gt=[],he=this.table,yt="",ne=0,ve=0,ye=2,be=1,Te=gt.slice.call(arguments,1),Wt=Object.create(this.lexer),se={yy:{}};for(var me in this.yy)Object.prototype.hasOwnProperty.call(this.yy,me)&&(se.yy[me]=this.yy[me]);Wt.setInput(wt,se.yy),se.yy.lexer=Wt,se.yy.parser=this,typeof Wt.yylloc>"u"&&(Wt.yylloc={});var ue=Wt.yylloc;gt.push(ue);var _a=Wt.options&&Wt.options.ranges;typeof se.yy.parseError=="function"?this.parseError=se.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Hr(){var Jt;return Jt=kt.pop()||Wt.lex()||be,typeof Jt!="number"&&(Jt instanceof Array&&(kt=Jt,Jt=kt.pop()),Jt=bt.symbols_[Jt]||Jt),Jt}for(var Ie,oe,Ke,wr,je={},Ze,qt,st,At;;){if(oe=Et[Et.length-1],this.defaultActions[oe]?Ke=this.defaultActions[oe]:((Ie===null||typeof Ie>"u")&&(Ie=Hr()),Ke=he[oe]&&he[oe][Ie]),typeof Ke>"u"||!Ke.length||!Ke[0]){var Nt="";At=[];for(Ze in he[oe])this.terminals_[Ze]&&Ze>ye&&At.push("'"+this.terminals_[Ze]+"'");Wt.showPosition?Nt="Parse error on line "+(ne+1)+`:
+`+Wt.showPosition()+`
+Expecting `+At.join(", ")+", got '"+(this.terminals_[Ie]||Ie)+"'":Nt="Parse error on line "+(ne+1)+": Unexpected "+(Ie==be?"end of input":"'"+(this.terminals_[Ie]||Ie)+"'"),this.parseError(Nt,{text:Wt.match,token:this.terminals_[Ie]||Ie,line:Wt.yylineno,loc:ue,expected:At})}if(Ke[0]instanceof Array&&Ke.length>1)throw new Error("Parse Error: multiple actions possible at state: "+oe+", token: "+Ie);switch(Ke[0]){case 1:Et.push(Ie),Ut.push(Wt.yytext),gt.push(Wt.yylloc),Et.push(Ke[1]),Ie=null,ve=Wt.yyleng,yt=Wt.yytext,ne=Wt.yylineno,ue=Wt.yylloc;break;case 2:if(qt=this.productions_[Ke[1]][1],je.$=Ut[Ut.length-qt],je._$={first_line:gt[gt.length-(qt||1)].first_line,last_line:gt[gt.length-1].last_line,first_column:gt[gt.length-(qt||1)].first_column,last_column:gt[gt.length-1].last_column},_a&&(je._$.range=[gt[gt.length-(qt||1)].range[0],gt[gt.length-1].range[1]]),wr=this.performAction.apply(je,[yt,ve,ne,se.yy,Ke[1],Ut,gt].concat(Te)),typeof wr<"u")return wr;qt&&(Et=Et.slice(0,-1*qt*2),Ut=Ut.slice(0,-1*qt),gt=gt.slice(0,-1*qt)),Et.push(this.productions_[Ke[1]][0]),Ut.push(je.$),gt.push(je._$),st=he[Et[Et.length-2]][Et[Et.length-1]],Et.push(st);break;case 3:return!0}}return!0}},jt=function(){var zt={EOF:1,parseError:function(bt,Et){if(this.yy.parser)this.yy.parser.parseError(bt,Et);else throw new Error(bt)},setInput:function(wt,bt){return this.yy=bt||this.yy||{},this._input=wt,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var wt=this._input[0];this.yytext+=wt,this.yyleng++,this.offset++,this.match+=wt,this.matched+=wt;var bt=wt.match(/(?:\r\n?|\n).*/g);return bt?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),wt},unput:function(wt){var bt=wt.length,Et=wt.split(/(?:\r\n?|\n)/g);this._input=wt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-bt),this.offset-=bt;var kt=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Et.length-1&&(this.yylineno-=Et.length-1);var Ut=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Et?(Et.length===kt.length?this.yylloc.first_column:0)+kt[kt.length-Et.length].length-Et[0].length:this.yylloc.first_column-bt},this.options.ranges&&(this.yylloc.range=[Ut[0],Ut[0]+this.yyleng-bt]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
+`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(wt){this.unput(this.match.slice(wt))},pastInput:function(){var wt=this.matched.substr(0,this.matched.length-this.match.length);return(wt.length>20?"...":"")+wt.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var wt=this.match;return wt.length<20&&(wt+=this._input.substr(0,20-wt.length)),(wt.substr(0,20)+(wt.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var wt=this.pastInput(),bt=new Array(wt.length+1).join("-");return wt+this.upcomingInput()+`
+`+bt+"^"},test_match:function(wt,bt){var Et,kt,Ut;if(this.options.backtrack_lexer&&(Ut={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(Ut.yylloc.range=this.yylloc.range.slice(0))),kt=wt[0].match(/(?:\r\n?|\n).*/g),kt&&(this.yylineno+=kt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:kt?kt[kt.length-1].length-kt[kt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+wt[0].length},this.yytext+=wt[0],this.match+=wt[0],this.matches=wt,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(wt[0].length),this.matched+=wt[0],Et=this.performAction.call(this,this.yy,this,bt,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Et)return Et;if(this._backtrack){for(var gt in Ut)this[gt]=Ut[gt];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var wt,bt,Et,kt;this._more||(this.yytext="",this.match="");for(var Ut=this._currentRules(),gt=0;gt<Ut.length;gt++)if(Et=this._input.match(this.rules[Ut[gt]]),Et&&(!bt||Et[0].length>bt[0].length)){if(bt=Et,kt=gt,this.options.backtrack_lexer){if(wt=this.test_match(Et,Ut[gt]),wt!==!1)return wt;if(this._backtrack){bt=!1;continue}else return!1}else if(!this.options.flex)break}return bt?(wt=this.test_match(bt,Ut[kt]),wt!==!1?wt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
+`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var bt=this.next();return bt||this.lex()},begin:function(bt){this.conditionStack.push(bt)},popState:function(){var bt=this.conditionStack.length-1;return bt>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(bt){return bt=this.conditionStack.length-1-Math.abs(bt||0),bt>=0?this.conditionStack[bt]:"INITIAL"},pushState:function(bt){this.begin(bt)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(bt,Et,kt,Ut){switch(kt){case 0:return this.begin("open_directive"),18;case 1:return 7;case 2:return 8;case 3:return 9;case 4:return 10;case 5:return this.begin("type_directive"),19;case 6:return this.popState(),this.begin("arg_directive"),16;case 7:return this.popState(),this.popState(),21;case 8:return 20;case 9:return 32;case 10:return 33;case 11:return this.begin("acc_title"),34;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),36;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:break;case 19:c;break;case 20:return 15;case 21:break;case 22:return 22;case 23:return 25;case 24:return 26;case 25:return 27;case 26:return 28;case 27:return this.begin("person_ext"),55;case 28:return this.begin("person"),54;case 29:return this.begin("system_ext_queue"),61;case 30:return this.begin("system_ext_db"),60;case 31:return this.begin("system_ext"),59;case 32:return this.begin("system_queue"),58;case 33:return this.begin("system_db"),57;case 34:return this.begin("system"),56;case 35:return this.begin("boundary"),47;case 36:return this.begin("enterprise_boundary"),44;case 37:return this.begin("system_boundary"),46;case 38:return this.begin("container_ext_queue"),67;case 39:return this.begin("container_ext_db"),66;case 40:return this.begin("container_ext"),65;case 41:return this.begin("container_queue"),64;case 42:return this.begin("container_db"),63;case 43:return this.begin("container"),62;case 44:return this.begin("container_boundary"),48;case 45:return this.begin("component_ext_queue"),73;case 46:return this.begin("component_ext_db"),72;case 47:return this.begin("component_ext"),71;case 48:return this.begin("component_queue"),70;case 49:return this.begin("component_db"),69;case 50:return this.begin("component"),68;case 51:return this.begin("node"),49;case 52:return this.begin("node"),49;case 53:return this.begin("node_l"),50;case 54:return this.begin("node_r"),51;case 55:return this.begin("rel"),74;case 56:return this.begin("birel"),75;case 57:return this.begin("rel_u"),76;case 58:return this.begin("rel_u"),76;case 59:return this.begin("rel_d"),77;case 60:return this.begin("rel_d"),77;case 61:return this.begin("rel_l"),78;case 62:return this.begin("rel_l"),78;case 63:return this.begin("rel_r"),79;case 64:return this.begin("rel_r"),79;case 65:return this.begin("rel_b"),80;case 66:return this.begin("rel_index"),81;case 67:return this.begin("update_el_style"),82;case 68:return this.begin("update_rel_style"),83;case 69:return this.begin("update_layout_config"),84;case 70:return"EOF_IN_STRUCT";case 71:return this.begin("attribute"),"ATTRIBUTE_EMPTY";case 72:this.begin("attribute");break;case 73:this.popState(),this.popState();break;case 74:return 90;case 75:break;case 76:return 90;case 77:this.begin("string");break;case 78:this.popState();break;case 79:return"STR";case 80:this.begin("string_kv");break;case 81:return this.begin("string_kv_key"),"STR_KEY";case 82:this.popState(),this.begin("string_kv_value");break;case 83:return"STR_VALUE";case 84:this.popState(),this.popState();break;case 85:return"STR";case 86:return"LBRACE";case 87:return"RBRACE";case 88:return"SPACE";case 89:return"EOL";case 90:return 24}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:title\s[^#\n;]+)/,/^(?:accDescription\s[^#\n;]+)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:C4Context\b)/,/^(?:C4Container\b)/,/^(?:C4Component\b)/,/^(?:C4Dynamic\b)/,/^(?:C4Deployment\b)/,/^(?:Person_Ext\b)/,/^(?:Person\b)/,/^(?:SystemQueue_Ext\b)/,/^(?:SystemDb_Ext\b)/,/^(?:System_Ext\b)/,/^(?:SystemQueue\b)/,/^(?:SystemDb\b)/,/^(?:System\b)/,/^(?:Boundary\b)/,/^(?:Enterprise_Boundary\b)/,/^(?:System_Boundary\b)/,/^(?:ContainerQueue_Ext\b)/,/^(?:ContainerDb_Ext\b)/,/^(?:Container_Ext\b)/,/^(?:ContainerQueue\b)/,/^(?:ContainerDb\b)/,/^(?:Container\b)/,/^(?:Container_Boundary\b)/,/^(?:ComponentQueue_Ext\b)/,/^(?:ComponentDb_Ext\b)/,/^(?:Component_Ext\b)/,/^(?:ComponentQueue\b)/,/^(?:ComponentDb\b)/,/^(?:Component\b)/,/^(?:Deployment_Node\b)/,/^(?:Node\b)/,/^(?:Node_L\b)/,/^(?:Node_R\b)/,/^(?:Rel\b)/,/^(?:BiRel\b)/,/^(?:Rel_Up\b)/,/^(?:Rel_U\b)/,/^(?:Rel_Down\b)/,/^(?:Rel_D\b)/,/^(?:Rel_Left\b)/,/^(?:Rel_L\b)/,/^(?:Rel_Right\b)/,/^(?:Rel_R\b)/,/^(?:Rel_Back\b)/,/^(?:RelIndex\b)/,/^(?:UpdateElementStyle\b)/,/^(?:UpdateRelStyle\b)/,/^(?:UpdateLayoutConfig\b)/,/^(?:$)/,/^(?:[(][ ]*[,])/,/^(?:[(])/,/^(?:[)])/,/^(?:,,)/,/^(?:,)/,/^(?:[ ]*["]["])/,/^(?:[ ]*["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[ ]*[\$])/,/^(?:[^=]*)/,/^(?:[=][ ]*["])/,/^(?:[^"]+)/,/^(?:["])/,/^(?:[^,]+)/,/^(?:\{)/,/^(?:\})/,/^(?:[\s]+)/,/^(?:[\n\r]+)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},string_kv_value:{rules:[83,84],inclusive:!1},string_kv_key:{rules:[82],inclusive:!1},string_kv:{rules:[81],inclusive:!1},string:{rules:[78,79],inclusive:!1},attribute:{rules:[73,74,75,76,77,80,85],inclusive:!1},update_layout_config:{rules:[70,71,72,73],inclusive:!1},update_rel_style:{rules:[70,71,72,73],inclusive:!1},update_el_style:{rules:[70,71,72,73],inclusive:!1},rel_b:{rules:[70,71,72,73],inclusive:!1},rel_r:{rules:[70,71,72,73],inclusive:!1},rel_l:{rules:[70,71,72,73],inclusive:!1},rel_d:{rules:[70,71,72,73],inclusive:!1},rel_u:{rules:[70,71,72,73],inclusive:!1},rel_bi:{rules:[],inclusive:!1},rel:{rules:[70,71,72,73],inclusive:!1},node_r:{rules:[70,71,72,73],inclusive:!1},node_l:{rules:[70,71,72,73],inclusive:!1},node:{rules:[70,71,72,73],inclusive:!1},index:{rules:[],inclusive:!1},rel_index:{rules:[70,71,72,73],inclusive:!1},component_ext_queue:{rules:[],inclusive:!1},component_ext_db:{rules:[70,71,72,73],inclusive:!1},component_ext:{rules:[70,71,72,73],inclusive:!1},component_queue:{rules:[70,71,72,73],inclusive:!1},component_db:{rules:[70,71,72,73],inclusive:!1},component:{rules:[70,71,72,73],inclusive:!1},container_boundary:{rules:[70,71,72,73],inclusive:!1},container_ext_queue:{rules:[],inclusive:!1},container_ext_db:{rules:[70,71,72,73],inclusive:!1},container_ext:{rules:[70,71,72,73],inclusive:!1},container_queue:{rules:[70,71,72,73],inclusive:!1},container_db:{rules:[70,71,72,73],inclusive:!1},container:{rules:[70,71,72,73],inclusive:!1},birel:{rules:[70,71,72,73],inclusive:!1},system_boundary:{rules:[70,71,72,73],inclusive:!1},enterprise_boundary:{rules:[70,71,72,73],inclusive:!1},boundary:{rules:[70,71,72,73],inclusive:!1},system_ext_queue:{rules:[70,71,72,73],inclusive:!1},system_ext_db:{rules:[70,71,72,73],inclusive:!1},system_ext:{rules:[70,71,72,73],inclusive:!1},system_queue:{rules:[70,71,72,73],inclusive:!1},system_db:{rules:[70,71,72,73],inclusive:!1},system:{rules:[70,71,72,73],inclusive:!1},person_ext:{rules:[70,71,72,73],inclusive:!1},person:{rules:[70,71,72,73],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,86,87,88,89,90],inclusive:!0}}};return zt}();we.lexer=jt;function Ft(){this.yy={}}return Ft.prototype=we,we.Parser=Ft,new Ft}();Pc.parser=Pc;const sK=t=>t.match(/^\s*C4Context|C4Container|C4Component|C4Dynamic|C4Deployment/)!==null;let di=[],Qa=[""],un="global",pi="",Di=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],qc=[],mg="",bg=!1,p1=4,g1=2;var Gw;const oK=function(){return Gw},lK=function(t){Gw=ai(t,nt())},cK=function(t,e,r){He.parseDirective(this,t,e,r)},uK=function(t,e,r,n,i,a,s,o,l){if(t==null||e===void 0||e===null||r===void 0||r===null||n===void 0||n===null)return;let u={};const h=qc.find(d=>d.from===e&&d.to===r);if(h?u=h:qc.push(u),u.type=t,u.from=e,u.to=r,u.label={text:n},i==null)u.techn={text:""};else if(typeof i=="object"){let[d,f]=Object.entries(i)[0];u[d]={text:f}}else u.techn={text:i};if(a==null)u.descr={text:""};else if(typeof a=="object"){let[d,f]=Object.entries(a)[0];u[d]={text:f}}else u.descr={text:a};if(typeof s=="object"){let[d,f]=Object.entries(s)[0];u[d]=f}else u.sprite=s;if(typeof o=="object"){let[d,f]=Object.entries(o)[0];u[d]=f}else u.tags=o;if(typeof l=="object"){let[d,f]=Object.entries(l)[0];u[d]=f}else u.link=l;u.wrap=Ja()},hK=function(t,e,r,n,i,a,s){if(e===null||r===null)return;let o={};const l=di.find(u=>u.alias===e);if(l&&e===l.alias?o=l:(o.alias=e,di.push(o)),r==null?o.label={text:""}:o.label={text:r},n==null)o.descr={text:""};else if(typeof n=="object"){let[u,h]=Object.entries(n)[0];o[u]={text:h}}else o.descr={text:n};if(typeof i=="object"){let[u,h]=Object.entries(i)[0];o[u]=h}else o.sprite=i;if(typeof a=="object"){let[u,h]=Object.entries(a)[0];o[u]=h}else o.tags=a;if(typeof s=="object"){let[u,h]=Object.entries(s)[0];o[u]=h}else o.link=s;o.typeC4Shape={text:t},o.parentBoundary=un,o.wrap=Ja()},fK=function(t,e,r,n,i,a,s,o){if(e===null||r===null)return;let l={};const u=di.find(h=>h.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,di.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.techn={text:""};else if(typeof n=="object"){let[h,d]=Object.entries(n)[0];l[h]={text:d}}else l.techn={text:n};if(i==null)l.descr={text:""};else if(typeof i=="object"){let[h,d]=Object.entries(i)[0];l[h]={text:d}}else l.descr={text:i};if(typeof a=="object"){let[h,d]=Object.entries(a)[0];l[h]=d}else l.sprite=a;if(typeof s=="object"){let[h,d]=Object.entries(s)[0];l[h]=d}else l.tags=s;if(typeof o=="object"){let[h,d]=Object.entries(o)[0];l[h]=d}else l.link=o;l.wrap=Ja(),l.typeC4Shape={text:t},l.parentBoundary=un},dK=function(t,e,r,n,i,a,s,o){if(e===null||r===null)return;let l={};const u=di.find(h=>h.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,di.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.techn={text:""};else if(typeof n=="object"){let[h,d]=Object.entries(n)[0];l[h]={text:d}}else l.techn={text:n};if(i==null)l.descr={text:""};else if(typeof i=="object"){let[h,d]=Object.entries(i)[0];l[h]={text:d}}else l.descr={text:i};if(typeof a=="object"){let[h,d]=Object.entries(a)[0];l[h]=d}else l.sprite=a;if(typeof s=="object"){let[h,d]=Object.entries(s)[0];l[h]=d}else l.tags=s;if(typeof o=="object"){let[h,d]=Object.entries(o)[0];l[h]=d}else l.link=o;l.wrap=Ja(),l.typeC4Shape={text:t},l.parentBoundary=un},pK=function(t,e,r,n,i){if(t===null||e===null)return;let a={};const s=Di.find(o=>o.alias===t);if(s&&t===s.alias?a=s:(a.alias=t,Di.push(a)),e==null?a.label={text:""}:a.label={text:e},r==null)a.type={text:"system"};else if(typeof r=="object"){let[o,l]=Object.entries(r)[0];a[o]={text:l}}else a.type={text:r};if(typeof n=="object"){let[o,l]=Object.entries(n)[0];a[o]=l}else a.tags=n;if(typeof i=="object"){let[o,l]=Object.entries(i)[0];a[o]=l}else a.link=i;a.parentBoundary=un,a.wrap=Ja(),pi=un,un=t,Qa.push(pi)},gK=function(t,e,r,n,i){if(t===null||e===null)return;let a={};const s=Di.find(o=>o.alias===t);if(s&&t===s.alias?a=s:(a.alias=t,Di.push(a)),e==null?a.label={text:""}:a.label={text:e},r==null)a.type={text:"container"};else if(typeof r=="object"){let[o,l]=Object.entries(r)[0];a[o]={text:l}}else a.type={text:r};if(typeof n=="object"){let[o,l]=Object.entries(n)[0];a[o]=l}else a.tags=n;if(typeof i=="object"){let[o,l]=Object.entries(i)[0];a[o]=l}else a.link=i;a.parentBoundary=un,a.wrap=Ja(),pi=un,un=t,Qa.push(pi)},yK=function(t,e,r,n,i,a,s,o){if(e===null||r===null)return;let l={};const u=Di.find(h=>h.alias===e);if(u&&e===u.alias?l=u:(l.alias=e,Di.push(l)),r==null?l.label={text:""}:l.label={text:r},n==null)l.type={text:"node"};else if(typeof n=="object"){let[h,d]=Object.entries(n)[0];l[h]={text:d}}else l.type={text:n};if(i==null)l.descr={text:""};else if(typeof i=="object"){let[h,d]=Object.entries(i)[0];l[h]={text:d}}else l.descr={text:i};if(typeof s=="object"){let[h,d]=Object.entries(s)[0];l[h]=d}else l.tags=s;if(typeof o=="object"){let[h,d]=Object.entries(o)[0];l[h]=d}else l.link=o;l.nodeType=t,l.parentBoundary=un,l.wrap=Ja(),pi=un,un=e,Qa.push(pi)},mK=function(){un=pi,Qa.pop(),pi=Qa.pop(),Qa.push(pi)},bK=function(t,e,r,n,i,a,s,o,l,u,h){let d=di.find(f=>f.alias===e);if(!(d===void 0&&(d=Di.find(f=>f.alias===e),d===void 0))){if(r!=null)if(typeof r=="object"){let[f,p]=Object.entries(r)[0];d[f]=p}else d.bgColor=r;if(n!=null)if(typeof n=="object"){let[f,p]=Object.entries(n)[0];d[f]=p}else d.fontColor=n;if(i!=null)if(typeof i=="object"){let[f,p]=Object.entries(i)[0];d[f]=p}else d.borderColor=i;if(a!=null)if(typeof a=="object"){let[f,p]=Object.entries(a)[0];d[f]=p}else d.shadowing=a;if(s!=null)if(typeof s=="object"){let[f,p]=Object.entries(s)[0];d[f]=p}else d.shape=s;if(o!=null)if(typeof o=="object"){let[f,p]=Object.entries(o)[0];d[f]=p}else d.sprite=o;if(l!=null)if(typeof l=="object"){let[f,p]=Object.entries(l)[0];d[f]=p}else d.techn=l;if(u!=null)if(typeof u=="object"){let[f,p]=Object.entries(u)[0];d[f]=p}else d.legendText=u;if(h!=null)if(typeof h=="object"){let[f,p]=Object.entries(h)[0];d[f]=p}else d.legendSprite=h}},_K=function(t,e,r,n,i,a,s){const o=qc.find(l=>l.from===e&&l.to===r);if(o!==void 0){if(n!=null)if(typeof n=="object"){let[l,u]=Object.entries(n)[0];o[l]=u}else o.textColor=n;if(i!=null)if(typeof i=="object"){let[l,u]=Object.entries(i)[0];o[l]=u}else o.lineColor=i;if(a!=null)if(typeof a=="object"){let[l,u]=Object.entries(a)[0];o[l]=parseInt(u)}else o.offsetX=parseInt(a);if(s!=null)if(typeof s=="object"){let[l,u]=Object.entries(s)[0];o[l]=parseInt(u)}else o.offsetY=parseInt(s)}},vK=function(t,e,r){let n=p1,i=g1;if(typeof e=="object"){const a=Object.values(e)[0];n=parseInt(a)}else n=parseInt(e);if(typeof r=="object"){const a=Object.values(r)[0];i=parseInt(a)}else i=parseInt(r);n>=1&&(p1=n),i>=1&&(g1=i)},xK=function(){return p1},kK=function(){return g1},wK=function(){return un},TK=function(){return pi},jw=function(t){return t==null?di:di.filter(e=>e.parentBoundary===t)},EK=function(t){return di.find(e=>e.alias===t)},CK=function(t){return Object.keys(jw(t))},SK=function(t){return t==null?Di:Di.filter(e=>e.parentBoundary===t)},AK=function(){return qc},MK=function(){return mg},LK=function(t){bg=t},Ja=function(){return bg},$w={addPersonOrSystem:hK,addPersonOrSystemBoundary:pK,addContainer:fK,addContainerBoundary:gK,addComponent:dK,addDeploymentNode:yK,popBoundaryParseStack:mK,addRel:uK,updateElStyle:bK,updateRelStyle:_K,updateLayoutConfig:vK,autoWrap:Ja,setWrap:LK,getC4ShapeArray:jw,getC4Shape:EK,getC4ShapeKeys:CK,getBoundarys:SK,getCurrentBoundaryParse:wK,getParentBoundaryParse:TK,getRels:AK,getTitle:MK,getC4Type:oK,getC4ShapeInRow:xK,getC4BoundaryInRow:kK,setAccTitle:Yn,getAccTitle:ui,getAccDescription:fi,setAccDescription:hi,parseDirective:cK,getConfig:()=>nt().c4,clear:function(){di=[],Di=[{alias:"global",label:{text:"global"},type:{text:"global"},tags:null,link:null,parentBoundary:""}],pi="",un="global",Qa=[""],qc=[],Qa=[""],mg="",bg=!1,p1=4,g1=2},LINETYPE:{SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25},ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},setTitle:function(t){mg=ai(t,nt())},setC4Type:lK},_g=function(t,e){const r=t.append("rect");if(r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),e.attrs!=="undefined"&&e.attrs!==null)for(let n in e.attrs)r.attr(n,e.attrs[n]);return e.class!=="undefined"&&r.attr("class",e.class),r},Xw=function(t,e,r,n,i,a){const s=t.append("image");s.attr("width",e),s.attr("height",r),s.attr("x",n),s.attr("y",i);let o=a.startsWith("data:image/png;base64")?a:ki(a);s.attr("xlink:href",o)},RK=function(t,e,r,n){const i=t.append("use");i.attr("x",e),i.attr("y",r);var a=ki(n);i.attr("xlink:href","#"+a)},Kw=function(t,e){let r=0,n=0;const i=e.text.split(pe.lineBreakRegex);let a=[],s=0,o=()=>e.y;if(typeof e.valign<"u"&&typeof e.textMargin<"u"&&e.textMargin>0)switch(e.valign){case"top":case"start":o=()=>Math.round(e.y+e.textMargin);break;case"middle":case"center":o=()=>Math.round(e.y+(r+n+e.textMargin)/2);break;case"bottom":case"end":o=()=>Math.round(e.y+(r+n+2*e.textMargin)-e.textMargin);break}if(typeof e.anchor<"u"&&typeof e.textMargin<"u"&&typeof e.width<"u")switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="text-after-edge",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="text-before-edge",e.alignmentBaseline="middle";break}for(let l=0;l<i.length;l++){let u=i[l];typeof e.textMargin<"u"&&e.textMargin===0&&typeof e.fontSize<"u"&&(s=l*e.fontSize);const h=t.append("text");if(h.attr("x",e.x),h.attr("y",o()),typeof e.anchor<"u"&&h.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),typeof e.fontFamily<"u"&&h.style("font-family",e.fontFamily),typeof e.fontSize<"u"&&h.style("font-size",e.fontSize),typeof e.fontWeight<"u"&&h.style("font-weight",e.fontWeight),typeof e.fill<"u"&&h.attr("fill",e.fill),typeof e.class<"u"&&h.attr("class",e.class),typeof e.dy<"u"?h.attr("dy",e.dy):s!==0&&h.attr("dy",s),e.tspan){const d=h.append("tspan");d.attr("x",e.x),typeof e.fill<"u"&&d.attr("fill",e.fill),d.text(u)}else h.text(u);typeof e.valign<"u"&&typeof e.textMargin<"u"&&e.textMargin>0&&(n+=(h._groups||h)[0][0].getBBox().height,r=n),a.push(h)}return a},IK=function(t,e){function r(i,a,s,o,l){return i+","+a+" "+(i+s)+","+a+" "+(i+s)+","+(a+o-l)+" "+(i+s-l*1.2)+","+(a+o)+" "+i+","+(a+o)}const n=t.append("polygon");return n.attr("points",r(e.x,e.y,e.width,e.height,7)),n.attr("class","labelBox"),e.y=e.y+e.height/2,Kw(t,e),n},NK=(t,e,r)=>{const n=t.append("g");let i=0;for(let a of e){let s=a.textColor?a.textColor:"#444444",o=a.lineColor?a.lineColor:"#444444",l=a.offsetX?parseInt(a.offsetX):0,u=a.offsetY?parseInt(a.offsetY):0,h="";if(i===0){let f=n.append("line");f.attr("x1",a.startPoint.x),f.attr("y1",a.startPoint.y),f.attr("x2",a.endPoint.x),f.attr("y2",a.endPoint.y),f.attr("stroke-width","1"),f.attr("stroke",o),f.style("fill","none"),a.type!=="rel_b"&&f.attr("marker-end","url("+h+"#arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&f.attr("marker-start","url("+h+"#arrowend)"),i=-1}else{let f=n.append("path");f.attr("fill","none").attr("stroke-width","1").attr("stroke",o).attr("d","Mstartx,starty Qcontrolx,controly stopx,stopy ".replaceAll("startx",a.startPoint.x).replaceAll("starty",a.startPoint.y).replaceAll("controlx",a.startPoint.x+(a.endPoint.x-a.startPoint.x)/2-(a.endPoint.x-a.startPoint.x)/4).replaceAll("controly",a.startPoint.y+(a.endPoint.y-a.startPoint.y)/2).replaceAll("stopx",a.endPoint.x).replaceAll("stopy",a.endPoint.y)),a.type!=="rel_b"&&f.attr("marker-end","url("+h+"#arrowhead)"),(a.type==="birel"||a.type==="rel_b")&&f.attr("marker-start","url("+h+"#arrowend)")}let d=r.messageFont();sa(r)(a.label.text,n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+l,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+u,a.label.width,a.label.height,{fill:s},d),a.techn&&a.techn.text!==""&&(d=r.messageFont(),sa(r)("["+a.techn.text+"]",n,Math.min(a.startPoint.x,a.endPoint.x)+Math.abs(a.endPoint.x-a.startPoint.x)/2+l,Math.min(a.startPoint.y,a.endPoint.y)+Math.abs(a.endPoint.y-a.startPoint.y)/2+r.messageFontSize+5+u,Math.max(a.label.width,a.techn.width),a.techn.height,{fill:s,"font-style":"italic"},d))}},BK=function(t,e,r){const n=t.append("g");let i=e.bgColor?e.bgColor:"none",a=e.borderColor?e.borderColor:"#444444",s=e.fontColor?e.fontColor:"black",o={"stroke-width":1,"stroke-dasharray":"7.0,7.0"};e.nodeType&&(o={"stroke-width":1});let l={x:e.x,y:e.y,fill:i,stroke:a,width:e.width,height:e.height,rx:2.5,ry:2.5,attrs:o};_g(n,l);let u=r.boundaryFont();u.fontWeight="bold",u.fontSize=u.fontSize+2,u.fontColor=s,sa(r)(e.label.text,n,e.x,e.y+e.label.Y,e.width,e.height,{fill:"#444444"},u),e.type&&e.type.text!==""&&(u=r.boundaryFont(),u.fontColor=s,sa(r)(e.type.text,n,e.x,e.y+e.type.Y,e.width,e.height,{fill:"#444444"},u)),e.descr&&e.descr.text!==""&&(u=r.boundaryFont(),u.fontSize=u.fontSize-2,u.fontColor=s,sa(r)(e.descr.text,n,e.x,e.y+e.descr.Y,e.width,e.height,{fill:"#444444"},u))},DK=function(t,e,r){let n=e.bgColor?e.bgColor:r[e.typeC4Shape.text+"_bg_color"],i=e.borderColor?e.borderColor:r[e.typeC4Shape.text+"_border_color"],a=e.fontColor?e.fontColor:"#FFFFFF",s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";switch(e.typeC4Shape.text){case"person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAACD0lEQVR4Xu2YoU4EMRCGT+4j8Ai8AhaH4QHgAUjQuFMECUgMIUgwJAgMhgQsAYUiJCiQIBBY+EITsjfTdme6V24v4c8vyGbb+ZjOtN0bNcvjQXmkH83WvYBWto6PLm6v7p7uH1/w2fXD+PBycX1Pv2l3IdDm/vn7x+dXQiAubRzoURa7gRZWd0iGRIiJbOnhnfYBQZNJjNbuyY2eJG8fkDE3bbG4ep6MHUAsgYxmE3nVs6VsBWJSGccsOlFPmLIViMzLOB7pCVO2AtHJMohH7Fh6zqitQK7m0rJvAVYgGcEpe//PLdDz65sM4pF9N7ICcXDKIB5Nv6j7tD0NoSdM2QrU9Gg0ewE1LqBhHR3BBdvj2vapnidjHxD/q6vd7Pvhr31AwcY8eXMTXAKECZZJFXuEq27aLgQK5uLMohCenGGuGewOxSjBvYBqeG6B+Nqiblggdjnc+ZXDy+FNFpFzw76O3UBAROuXh6FoiAcf5g9eTvUgzy0nWg6I8cXHRUpg5bOVBCo+KDpFajOf23GgPme7RSQ+lacIENUgJ6gg1k6HjgOlqnLqip4tEuhv0hNEMXUD0clyXE3p6pZA0S2nnvTlXwLJEZWlb7cTQH1+USgTN4VhAenm/wea1OCAOmqo6fE1WCb9WSKBah+rbUWPWAmE2Rvk0ApiB45eOyNAzU8xcTvj8KvkKEoOaIYeHNA3ZuygAvFMUO0AAAAASUVORK5CYII=";break;case"external_person":s="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAADAAAAAwCAIAAADYYG7QAAAB6ElEQVR4Xu2YLY+EMBCG9+dWr0aj0Wg0Go1Go0+j8Xdv2uTCvv1gpt0ebHKPuhDaeW4605Z9mJvx4AdXUyTUdd08z+u6flmWZRnHsWkafk9DptAwDPu+f0eAYtu2PEaGWuj5fCIZrBAC2eLBAnRCsEkkxmeaJp7iDJ2QMDdHsLg8SxKFEJaAo8lAXnmuOFIhTMpxxKATebo4UiFknuNo4OniSIXQyRxEA3YsnjGCVEjVXD7yLUAqxBGUyPv/Y4W2beMgGuS7kVQIBycH0fD+oi5pezQETxdHKmQKGk1eQEYldK+jw5GxPfZ9z7Mk0Qnhf1W1m3w//EUn5BDmSZsbR44QQLBEqrBHqOrmSKaQAxdnLArCrxZcM7A7ZKs4ioRq8LFC+NpC3WCBJsvpVw5edm9iEXFuyNfxXAgSwfrFQ1c0iNda8AdejvUgnktOtJQQxmcfFzGglc5WVCj7oDgFqU18boeFSs52CUh8LE8BIVQDT1ABrB0HtgSEYlX5doJnCwv9TXocKCaKbnwhdDKPq4lf3SwU3HLq4V/+WYhHVMa/3b4IlfyikAduCkcBc7mQ3/z/Qq/cTuikhkzB12Ae/mcJC9U+Vo8Ej1gWAtgbeGgFsAMHr50BIWOLCbezvhpBFUdY6EJuJ/QDW0XoMX60zZ0AAAAASUVORK5CYII=";break}const o=t.append("g");o.attr("class","person-man");const l=Zw();switch(e.typeC4Shape.text){case"person":case"external_person":case"system":case"external_system":case"container":case"external_container":case"component":case"external_component":l.x=e.x,l.y=e.y,l.fill=n,l.width=e.width,l.height=e.height,l.style="stroke:"+i+";stroke-width:0.5;",l.rx=2.5,l.ry=2.5,_g(o,l);break;case"system_db":case"external_system_db":case"container_db":case"external_container_db":case"component_db":case"external_component_db":o.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,-10 half,-10 half,-10c0,0 half,0 half,10l0,heightc0,10 -half,10 -half,10c0,0 -half,0 -half,-10l0,-height".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2).replaceAll("height",e.height)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc0,10 half,10 half,10c0,0 half,0 half,-10".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("half",e.width/2));break;case"system_queue":case"external_system_queue":case"container_queue":case"external_container_queue":case"component_queue":case"external_component_queue":o.append("path").attr("fill",n).attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startylwidth,0c5,0 5,half 5,halfc0,0 0,half -5,halfl-width,0c-5,0 -5,-half -5,-halfc0,0 0,-half 5,-half".replaceAll("startx",e.x).replaceAll("starty",e.y).replaceAll("width",e.width).replaceAll("half",e.height/2)),o.append("path").attr("fill","none").attr("stroke-width","0.5").attr("stroke",i).attr("d","Mstartx,startyc-5,0 -5,half -5,halfc0,half 5,half 5,half".replaceAll("startx",e.x+e.width).replaceAll("starty",e.y).replaceAll("half",e.height/2));break}let u=HK(r,e.typeC4Shape.text);switch(o.append("text").attr("fill",a).attr("font-family",u.fontFamily).attr("font-size",u.fontSize-2).attr("font-style","italic").attr("lengthAdjust","spacing").attr("textLength",e.typeC4Shape.width).attr("x",e.x+e.width/2-e.typeC4Shape.width/2).attr("y",e.y+e.typeC4Shape.Y).text("<<"+e.typeC4Shape.text+">>"),e.typeC4Shape.text){case"person":case"external_person":Xw(o,48,48,e.x+e.width/2-24,e.y+e.image.Y,s);break}let h=r[e.typeC4Shape.text+"Font"]();return h.fontWeight="bold",h.fontSize=h.fontSize+2,h.fontColor=a,sa(r)(e.label.text,o,e.x,e.y+e.label.Y,e.width,e.height,{fill:a},h),h=r[e.typeC4Shape.text+"Font"](),h.fontColor=a,e.thchn&&e.thchn.text!==""?sa(r)(e.thchn.text,o,e.x,e.y+e.thchn.Y,e.width,e.height,{fill:a,"font-style":"italic"},h):e.type&&e.type.text!==""&&sa(r)(e.type.text,o,e.x,e.y+e.type.Y,e.width,e.height,{fill:a,"font-style":"italic"},h),e.descr&&e.descr.text!==""&&(h=r.personFont(),h.fontColor=a,sa(r)(e.descr.text,o,e.x,e.y+e.descr.Y,e.width,e.height,{fill:a},h)),e.height},OK=function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},FK=function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},PK=function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},qK=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},VK=function(t){t.append("defs").append("marker").attr("id","arrowend").attr("refX",1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 10 0 L 0 5 L 10 10 z")},zK=function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},YK=function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},UK=function(t){const r=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);r.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),r.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},WK=function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},Zw=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},HK=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),sa=function(){function t(i,a,s,o,l,u,h){const d=a.append("text").attr("x",s+l/2).attr("y",o+u/2+5).style("text-anchor","middle").text(i);n(d,h)}function e(i,a,s,o,l,u,h,d){const{fontSize:f,fontFamily:p,fontWeight:m}=d,_=i.split(pe.lineBreakRegex);for(let y=0;y<_.length;y++){const b=y*f-f*(_.length-1)/2,x=a.append("text").attr("x",s+l/2).attr("y",o).style("text-anchor","middle").attr("dominant-baseline","middle").style("font-size",f).style("font-weight",m).style("font-family",p);x.append("tspan").attr("dy",b).text(_[y]).attr("alignment-baseline","mathematical"),n(x,h)}}function r(i,a,s,o,l,u,h,d){const f=a.append("switch"),m=f.append("foreignObject").attr("x",s).attr("y",o).attr("width",l).attr("height",u).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");m.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,f,s,o,l,u,h,d),n(m,h)}function n(i,a){for(const s in a)a.hasOwnProperty(s)&&i.attr(s,a[s])}return function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?t:e}}(),Oi={drawRect:_g,drawText:Kw,drawLabel:IK,drawBoundary:BK,drawC4Shape:DK,drawRels:NK,drawImage:Xw,drawEmbeddedImage:RK,insertArrowHead:qK,insertArrowEnd:VK,insertArrowFilledHead:zK,insertDynamicNumber:YK,insertArrowCrossHead:UK,insertDatabaseIcon:OK,insertComputerIcon:FK,insertClockIcon:PK,getTextObj:WK,getNoteRect:Zw,sanitizeUrl:ki};let y1=0,m1=0,Qw=4,vg=2;Pc.yy=$w;let Zt={};class Jw{constructor(e){this.name="",this.data={},this.data.startx=void 0,this.data.stopx=void 0,this.data.starty=void 0,this.data.stopy=void 0,this.data.widthLimit=void 0,this.nextData={},this.nextData.startx=void 0,this.nextData.stopx=void 0,this.nextData.starty=void 0,this.nextData.stopy=void 0,this.nextData.cnt=0,xg(e.db.getConfig())}setData(e,r,n,i){this.nextData.startx=this.data.startx=e,this.nextData.stopx=this.data.stopx=r,this.nextData.starty=this.data.starty=n,this.nextData.stopy=this.data.stopy=i}updateVal(e,r,n,i){typeof e[r]>"u"?e[r]=n:e[r]=i(n,e[r])}insert(e){this.nextData.cnt=this.nextData.cnt+1;let r=this.nextData.startx===this.nextData.stopx?this.nextData.stopx+e.margin:this.nextData.stopx+e.margin*2,n=r+e.width,i=this.nextData.starty+e.margin*2,a=i+e.height;(r>=this.data.widthLimit||n>=this.data.widthLimit||this.nextData.cnt>Qw)&&(r=this.nextData.startx+e.margin+Zt.nextLinePaddingX,i=this.nextData.stopy+e.margin*2,this.nextData.stopx=n=r+e.width,this.nextData.starty=this.nextData.stopy,this.nextData.stopy=a=i+e.height,this.nextData.cnt=1),e.x=r,e.y=i,this.updateVal(this.data,"startx",r,Math.min),this.updateVal(this.data,"starty",i,Math.min),this.updateVal(this.data,"stopx",n,Math.max),this.updateVal(this.data,"stopy",a,Math.max),this.updateVal(this.nextData,"startx",r,Math.min),this.updateVal(this.nextData,"starty",i,Math.min),this.updateVal(this.nextData,"stopx",n,Math.max),this.updateVal(this.nextData,"stopy",a,Math.max)}init(e){this.name="",this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,widthLimit:void 0},this.nextData={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0,cnt:0},xg(e.db.getConfig())}bumpLastMargin(e){this.data.stopx+=e,this.data.stopy+=e}}const xg=function(t){fr(Zt,t),t.fontFamily&&(Zt.personFontFamily=Zt.systemFontFamily=Zt.messageFontFamily=t.fontFamily),t.fontSize&&(Zt.personFontSize=Zt.systemFontSize=Zt.messageFontSize=t.fontSize),t.fontWeight&&(Zt.personFontWeight=Zt.systemFontWeight=Zt.messageFontWeight=t.fontWeight)},Vc=(t,e)=>({fontFamily:t[e+"FontFamily"],fontSize:t[e+"FontSize"],fontWeight:t[e+"FontWeight"]}),b1=t=>({fontFamily:t.boundaryFontFamily,fontSize:t.boundaryFontSize,fontWeight:t.boundaryFontWeight}),GK=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight});function gi(t,e,r,n,i){if(!e[t].width)if(r)e[t].text=hw(e[t].text,i,n),e[t].textLines=e[t].text.split(pe.lineBreakRegex).length,e[t].width=i,e[t].height=eg(e[t].text,n);else{let a=e[t].text.split(pe.lineBreakRegex);e[t].textLines=a.length;let s=0;e[t].height=0,e[t].width=0;for(let o=0;o<a.length;o++)e[t].width=Math.max(Bi(a[o],n),e[t].width),s=eg(a[o],n),e[t].height=e[t].height+s}}const t9=function(t,e,r){e.x=r.data.startx,e.y=r.data.starty,e.width=r.data.stopx-r.data.startx,e.height=r.data.stopy-r.data.starty,e.label.y=Zt.c4ShapeMargin-35;let n=e.wrap&&Zt.wrap,i=b1(Zt);i.fontSize=i.fontSize+2,i.fontWeight="bold";let a=Bi(e.label.text,i);gi("label",e,n,i,a),Oi.drawBoundary(t,e,Zt)},e9=function(t,e,r,n){let i=0;for(let a=0;a<n.length;a++){i=0;const s=r[n[a]];let o=Vc(Zt,s.typeC4Shape.text);switch(o.fontSize=o.fontSize-2,s.typeC4Shape.width=Bi("<<"+s.typeC4Shape.text+">>",o),s.typeC4Shape.height=o.fontSize+2,s.typeC4Shape.Y=Zt.c4ShapePadding,i=s.typeC4Shape.Y+s.typeC4Shape.height-4,s.image={width:0,height:0,Y:0},s.typeC4Shape.text){case"person":case"external_person":s.image.width=48,s.image.height=48,s.image.Y=i,i=s.image.Y+s.image.height;break}s.sprite&&(s.image.width=48,s.image.height=48,s.image.Y=i,i=s.image.Y+s.image.height);let l=s.wrap&&Zt.wrap,u=Zt.width-Zt.c4ShapePadding*2,h=Vc(Zt,s.typeC4Shape.text);if(h.fontSize=h.fontSize+2,h.fontWeight="bold",gi("label",s,l,h,u),s.label.Y=i+8,i=s.label.Y+s.label.height,s.type&&s.type.text!==""){s.type.text="["+s.type.text+"]";let p=Vc(Zt,s.typeC4Shape.text);gi("type",s,l,p,u),s.type.Y=i+5,i=s.type.Y+s.type.height}else if(s.techn&&s.techn.text!==""){s.techn.text="["+s.techn.text+"]";let p=Vc(Zt,s.techn.text);gi("techn",s,l,p,u),s.techn.Y=i+5,i=s.techn.Y+s.techn.height}let d=i,f=s.label.width;if(s.descr&&s.descr.text!==""){let p=Vc(Zt,s.typeC4Shape.text);gi("descr",s,l,p,u),s.descr.Y=i+20,i=s.descr.Y+s.descr.height,f=Math.max(s.label.width,s.descr.width),d=i-s.descr.textLines*5}f=f+Zt.c4ShapePadding,s.width=Math.max(s.width||Zt.width,f,Zt.width),s.height=Math.max(s.height||Zt.height,d,Zt.height),s.margin=s.margin||Zt.c4ShapeMargin,t.insert(s),Oi.drawC4Shape(e,s,Zt)}t.bumpLastMargin(Zt.c4ShapeMargin)};class Un{constructor(e,r){this.x=e,this.y=r}}let r9=function(t,e){let r=t.x,n=t.y,i=e.x,a=e.y,s=r+t.width/2,o=n+t.height/2,l=Math.abs(r-i),u=Math.abs(n-a),h=u/l,d=t.height/t.width,f=null;return n==a&&r<i?f=new Un(r+t.width,o):n==a&&r>i?f=new Un(r,o):r==i&&n<a?f=new Un(s,n+t.height):r==i&&n>a&&(f=new Un(s,n)),r>i&&n<a?d>=h?f=new Un(r,o+h*t.width/2):f=new Un(s-l/u*t.height/2,n+t.height):r<i&&n<a?d>=h?f=new Un(r+t.width,o+h*t.width/2):f=new Un(s+l/u*t.height/2,n+t.height):r<i&&n>a?d>=h?f=new Un(r+t.width,o-h*t.width/2):f=new Un(s+t.height/2*l/u,n):r>i&&n>a&&(d>=h?f=new Un(r,o-t.width/2*h):f=new Un(s-t.height/2*l/u,n)),f},jK=function(t,e){let r={x:0,y:0};r.x=e.x+e.width/2,r.y=e.y+e.height/2;let n=r9(t,r);r.x=t.x+t.width/2,r.y=t.y+t.height/2;let i=r9(e,r);return{startPoint:n,endPoint:i}};const $K=function(t,e,r,n){let i=0;for(let a of e){i=i+1;let s=a.wrap&&Zt.wrap,o=GK(Zt);n.db.getC4Type()==="C4Dynamic"&&(a.label.text=i+": "+a.label.text);let u=Bi(a.label.text,o);gi("label",a,s,o,u),a.techn&&a.techn.text!==""&&(u=Bi(a.techn.text,o),gi("techn",a,s,o,u)),a.descr&&a.descr.text!==""&&(u=Bi(a.descr.text,o),gi("descr",a,s,o,u));let h=r(a.from),d=r(a.to),f=jK(h,d);a.startPoint=f.startPoint,a.endPoint=f.endPoint}Oi.drawRels(t,e,Zt)};function n9(t,e,r,n,i){let a=new Jw(i);a.data.widthLimit=r.data.widthLimit/Math.min(vg,n.length);for(let s=0;s<n.length;s++){let o=n[s],l=0;o.image={width:0,height:0,Y:0},o.sprite&&(o.image.width=48,o.image.height=48,o.image.Y=l,l=o.image.Y+o.image.height);let u=o.wrap&&Zt.wrap,h=b1(Zt);if(h.fontSize=h.fontSize+2,h.fontWeight="bold",gi("label",o,u,h,a.data.widthLimit),o.label.Y=l+8,l=o.label.Y+o.label.height,o.type&&o.type.text!==""){o.type.text="["+o.type.text+"]";let m=b1(Zt);gi("type",o,u,m,a.data.widthLimit),o.type.Y=l+5,l=o.type.Y+o.type.height}if(o.descr&&o.descr.text!==""){let m=b1(Zt);m.fontSize=m.fontSize-2,gi("descr",o,u,m,a.data.widthLimit),o.descr.Y=l+20,l=o.descr.Y+o.descr.height}if(s==0||s%vg===0){let m=r.data.startx+Zt.diagramMarginX,_=r.data.stopy+Zt.diagramMarginY+l;a.setData(m,m,_,_)}else{let m=a.data.stopx!==a.data.startx?a.data.stopx+Zt.diagramMarginX:a.data.startx,_=a.data.starty;a.setData(m,m,_,_)}a.name=o.alias;let d=i.db.getC4ShapeArray(o.alias),f=i.db.getC4ShapeKeys(o.alias);f.length>0&&e9(a,t,d,f),e=o.alias;let p=i.db.getBoundarys(e);p.length>0&&n9(t,e,a,p,i),o.alias!=="global"&&t9(t,o,a),r.data.stopy=Math.max(a.data.stopy+Zt.c4ShapeMargin,r.data.stopy),r.data.stopx=Math.max(a.data.stopx+Zt.c4ShapeMargin,r.data.stopx),y1=Math.max(y1,r.data.stopx),m1=Math.max(m1,r.data.stopy)}}const i9={drawPersonOrSystemArray:e9,drawBoundary:t9,setConf:xg,draw:function(t,e,r,n){Zt=nt().c4;const i=nt().securityLevel;let a;i==="sandbox"&&(a=St("#i"+e));const s=St(i==="sandbox"?a.nodes()[0].contentDocument.body:"body");let o=n.db;n.db.setWrap(Zt.wrap),Qw=o.getC4ShapeInRow(),vg=o.getC4BoundaryInRow(),H.debug(`C:${JSON.stringify(Zt,null,2)}`);const l=i==="sandbox"?s.select(`[id="${e}"]`):St(`[id="${e}"]`);Oi.insertComputerIcon(l),Oi.insertDatabaseIcon(l),Oi.insertClockIcon(l);let u=new Jw(n);u.setData(Zt.diagramMarginX,Zt.diagramMarginX,Zt.diagramMarginY,Zt.diagramMarginY),u.data.widthLimit=screen.availWidth,y1=Zt.diagramMarginX,m1=Zt.diagramMarginY;const h=n.db.getTitle();let d=n.db.getBoundarys("");n9(l,"",u,d,n),Oi.insertArrowHead(l),Oi.insertArrowEnd(l),Oi.insertArrowCrossHead(l),Oi.insertArrowFilledHead(l),$K(l,n.db.getRels(),n.db.getC4Shape,n),u.data.stopx=y1,u.data.stopy=m1;const f=u.data;let m=f.stopy-f.starty+2*Zt.diagramMarginY;const y=f.stopx-f.startx+2*Zt.diagramMarginX;h&&l.append("text").text(h).attr("x",(f.stopx-f.startx)/2-4*Zt.diagramMarginX).attr("y",f.starty+Zt.diagramMarginY),li(l,m,y,Zt.useMaxWidth);const b=h?60:0;l.attr("viewBox",f.startx-Zt.diagramMarginX+" -"+(Zt.diagramMarginY+b)+" "+y+" "+(m+b)),bn(Pc.yy,l,e),H.debug("models:",f)}};var _1=function(){var t=function(Z,V,Q,q){for(Q=Q||{},q=Z.length;q--;Q[Z[q]]=V);return Q},e=[1,3],r=[1,7],n=[1,8],i=[1,9],a=[1,10],s=[1,13],o=[1,12],l=[1,16,25],u=[1,20],h=[1,31],d=[1,32],f=[1,33],p=[1,35],m=[1,38],_=[1,36],y=[1,37],b=[1,39],x=[1,40],k=[1,41],T=[1,42],C=[1,45],M=[1,46],S=[1,47],R=[1,48],A=[16,25],L=[1,62],v=[1,63],B=[1,64],w=[1,65],D=[1,66],N=[1,67],z=[1,68],X=[16,25,32,44,45,53,56,57,58,59,60,61,62,67,69],ct=[16,25,30,32,44,45,49,53,56,57,58,59,60,61,62,67,69,84,85,86,87],J=[5,8,9,10,11,16,19,23,25],Y=[53,84,85,86,87],$=[53,61,62,84,85,86,87],lt=[53,56,57,58,59,60,84,85,86,87],ut=[16,25,32],W=[1,100],tt={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,statments:5,direction:6,directive:7,direction_tb:8,direction_bt:9,direction_rl:10,direction_lr:11,graphConfig:12,openDirective:13,typeDirective:14,closeDirective:15,NEWLINE:16,":":17,argDirective:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,CLASS_DIAGRAM:23,statements:24,EOF:25,statement:26,className:27,alphaNumToken:28,classLiteralName:29,GENERICTYPE:30,relationStatement:31,LABEL:32,classStatement:33,methodStatement:34,annotationStatement:35,clickStatement:36,cssClassStatement:37,acc_title:38,acc_title_value:39,acc_descr:40,acc_descr_value:41,acc_descr_multiline_value:42,CLASS:43,STYLE_SEPARATOR:44,STRUCT_START:45,members:46,STRUCT_STOP:47,ANNOTATION_START:48,ANNOTATION_END:49,MEMBER:50,SEPARATOR:51,relation:52,STR:53,relationType:54,lineType:55,AGGREGATION:56,EXTENSION:57,COMPOSITION:58,DEPENDENCY:59,LOLLIPOP:60,LINE:61,DOTTED_LINE:62,CALLBACK:63,LINK:64,LINK_TARGET:65,CLICK:66,CALLBACK_NAME:67,CALLBACK_ARGS:68,HREF:69,CSSCLASS:70,commentToken:71,textToken:72,graphCodeTokens:73,textNoTagsToken:74,TAGSTART:75,TAGEND:76,"==":77,"--":78,PCT:79,DEFAULT:80,SPACE:81,MINUS:82,keywords:83,UNICODE_TEXT:84,NUM:85,ALPHA:86,BQUOTE_STR:87,$accept:0,$end:1},terminals_:{2:"error",5:"statments",8:"direction_tb",9:"direction_bt",10:"direction_rl",11:"direction_lr",16:"NEWLINE",17:":",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",23:"CLASS_DIAGRAM",25:"EOF",30:"GENERICTYPE",32:"LABEL",38:"acc_title",39:"acc_title_value",40:"acc_descr",41:"acc_descr_value",42:"acc_descr_multiline_value",43:"CLASS",44:"STYLE_SEPARATOR",45:"STRUCT_START",47:"STRUCT_STOP",48:"ANNOTATION_START",49:"ANNOTATION_END",50:"MEMBER",51:"SEPARATOR",53:"STR",56:"AGGREGATION",57:"EXTENSION",58:"COMPOSITION",59:"DEPENDENCY",60:"LOLLIPOP",61:"LINE",62:"DOTTED_LINE",63:"CALLBACK",64:"LINK",65:"LINK_TARGET",66:"CLICK",67:"CALLBACK_NAME",68:"CALLBACK_ARGS",69:"HREF",70:"CSSCLASS",73:"graphCodeTokens",75:"TAGSTART",76:"TAGEND",77:"==",78:"--",79:"PCT",80:"DEFAULT",81:"SPACE",82:"MINUS",83:"keywords",84:"UNICODE_TEXT",85:"NUM",86:"ALPHA",87:"BQUOTE_STR"},productions_:[0,[3,1],[3,1],[3,1],[3,2],[6,1],[6,1],[6,1],[6,1],[4,1],[7,4],[7,6],[13,1],[14,1],[18,1],[15,1],[12,4],[24,1],[24,2],[24,3],[27,1],[27,1],[27,2],[27,2],[27,2],[26,1],[26,2],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,2],[26,2],[26,1],[33,2],[33,4],[33,5],[33,7],[35,4],[46,1],[46,2],[34,1],[34,2],[34,1],[34,1],[31,3],[31,4],[31,4],[31,5],[52,3],[52,2],[52,2],[52,1],[54,1],[54,1],[54,1],[54,1],[54,1],[55,1],[55,1],[36,3],[36,4],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[36,3],[36,4],[36,4],[36,5],[37,3],[71,1],[71,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[74,1],[74,1],[74,1],[74,1],[28,1],[28,1],[28,1],[29,1]],performAction:function(V,Q,q,U,F,j,P){var et=j.length-1;switch(F){case 5:U.setDirection("TB");break;case 6:U.setDirection("BT");break;case 7:U.setDirection("RL");break;case 8:U.setDirection("LR");break;case 12:U.parseDirective("%%{","open_directive");break;case 13:U.parseDirective(j[et],"type_directive");break;case 14:j[et]=j[et].trim().replace(/'/g,'"'),U.parseDirective(j[et],"arg_directive");break;case 15:U.parseDirective("}%%","close_directive","class");break;case 20:case 21:this.$=j[et];break;case 22:this.$=j[et-1]+j[et];break;case 23:case 24:this.$=j[et-1]+"~"+j[et];break;case 25:U.addRelation(j[et]);break;case 26:j[et-1].title=U.cleanupLabel(j[et]),U.addRelation(j[et-1]);break;case 34:this.$=j[et].trim(),U.setAccTitle(this.$);break;case 35:case 36:this.$=j[et].trim(),U.setAccDescription(this.$);break;case 37:U.addClass(j[et]);break;case 38:U.addClass(j[et-2]),U.setCssClass(j[et-2],j[et]);break;case 39:U.addClass(j[et-3]),U.addMembers(j[et-3],j[et-1]);break;case 40:U.addClass(j[et-5]),U.setCssClass(j[et-5],j[et-3]),U.addMembers(j[et-5],j[et-1]);break;case 41:U.addAnnotation(j[et],j[et-2]);break;case 42:this.$=[j[et]];break;case 43:j[et].push(j[et-1]),this.$=j[et];break;case 44:break;case 45:U.addMember(j[et-1],U.cleanupLabel(j[et]));break;case 46:break;case 47:break;case 48:this.$={id1:j[et-2],id2:j[et],relation:j[et-1],relationTitle1:"none",relationTitle2:"none"};break;case 49:this.$={id1:j[et-3],id2:j[et],relation:j[et-1],relationTitle1:j[et-2],relationTitle2:"none"};break;case 50:this.$={id1:j[et-3],id2:j[et],relation:j[et-2],relationTitle1:"none",relationTitle2:j[et-1]};break;case 51:this.$={id1:j[et-4],id2:j[et],relation:j[et-2],relationTitle1:j[et-3],relationTitle2:j[et-1]};break;case 52:this.$={type1:j[et-2],type2:j[et],lineType:j[et-1]};break;case 53:this.$={type1:"none",type2:j[et],lineType:j[et-1]};break;case 54:this.$={type1:j[et-1],type2:"none",lineType:j[et]};break;case 55:this.$={type1:"none",type2:"none",lineType:j[et]};break;case 56:this.$=U.relationType.AGGREGATION;break;case 57:this.$=U.relationType.EXTENSION;break;case 58:this.$=U.relationType.COMPOSITION;break;case 59:this.$=U.relationType.DEPENDENCY;break;case 60:this.$=U.relationType.LOLLIPOP;break;case 61:this.$=U.lineType.LINE;break;case 62:this.$=U.lineType.DOTTED_LINE;break;case 63:case 69:this.$=j[et-2],U.setClickEvent(j[et-1],j[et]);break;case 64:case 70:this.$=j[et-3],U.setClickEvent(j[et-2],j[et-1]),U.setTooltip(j[et-2],j[et]);break;case 65:case 73:this.$=j[et-2],U.setLink(j[et-1],j[et]);break;case 66:this.$=j[et-3],U.setLink(j[et-2],j[et-1],j[et]);break;case 67:case 75:this.$=j[et-3],U.setLink(j[et-2],j[et-1]),U.setTooltip(j[et-2],j[et]);break;case 68:case 76:this.$=j[et-4],U.setLink(j[et-3],j[et-2],j[et]),U.setTooltip(j[et-3],j[et-1]);break;case 71:this.$=j[et-3],U.setClickEvent(j[et-2],j[et-1],j[et]);break;case 72:this.$=j[et-4],U.setClickEvent(j[et-3],j[et-2],j[et-1]),U.setTooltip(j[et-3],j[et]);break;case 74:this.$=j[et-3],U.setLink(j[et-2],j[et-1],j[et]);break;case 77:U.setCssClass(j[et-1],j[et]);break}},table:[{3:1,4:2,5:e,6:4,7:5,8:r,9:n,10:i,11:a,12:6,13:11,19:s,23:o},{1:[3]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{3:14,4:2,5:e,6:4,7:5,8:r,9:n,10:i,11:a,12:6,13:11,19:s,23:o},{1:[2,9]},t(l,[2,5]),t(l,[2,6]),t(l,[2,7]),t(l,[2,8]),{14:15,20:[1,16]},{16:[1,17]},{20:[2,12]},{1:[2,4]},{15:18,17:[1,19],22:u},t([17,22],[2,13]),{6:30,7:29,8:r,9:n,10:i,11:a,13:11,19:s,24:21,26:22,27:34,28:43,29:44,31:23,33:24,34:25,35:26,36:27,37:28,38:h,40:d,42:f,43:p,48:m,50:_,51:y,63:b,64:x,66:k,70:T,84:C,85:M,86:S,87:R},{16:[1,49]},{18:50,21:[1,51]},{16:[2,15]},{25:[1,52]},{16:[1,53],25:[2,17]},t(A,[2,25],{32:[1,54]}),t(A,[2,27]),t(A,[2,28]),t(A,[2,29]),t(A,[2,30]),t(A,[2,31]),t(A,[2,32]),t(A,[2,33]),{39:[1,55]},{41:[1,56]},t(A,[2,36]),t(A,[2,44],{52:57,54:60,55:61,32:[1,59],53:[1,58],56:L,57:v,58:B,59:w,60:D,61:N,62:z}),{27:69,28:43,29:44,84:C,85:M,86:S,87:R},t(A,[2,46]),t(A,[2,47]),{28:70,84:C,85:M,86:S},{27:71,28:43,29:44,84:C,85:M,86:S,87:R},{27:72,28:43,29:44,84:C,85:M,86:S,87:R},{27:73,28:43,29:44,84:C,85:M,86:S,87:R},{53:[1,74]},t(X,[2,20],{28:43,29:44,27:75,30:[1,76],84:C,85:M,86:S,87:R}),t(X,[2,21],{30:[1,77]}),t(ct,[2,91]),t(ct,[2,92]),t(ct,[2,93]),t([16,25,30,32,44,45,53,56,57,58,59,60,61,62,67,69],[2,94]),t(J,[2,10]),{15:78,22:u},{22:[2,14]},{1:[2,16]},{6:30,7:29,8:r,9:n,10:i,11:a,13:11,19:s,24:79,25:[2,18],26:22,27:34,28:43,29:44,31:23,33:24,34:25,35:26,36:27,37:28,38:h,40:d,42:f,43:p,48:m,50:_,51:y,63:b,64:x,66:k,70:T,84:C,85:M,86:S,87:R},t(A,[2,26]),t(A,[2,34]),t(A,[2,35]),{27:80,28:43,29:44,53:[1,81],84:C,85:M,86:S,87:R},{52:82,54:60,55:61,56:L,57:v,58:B,59:w,60:D,61:N,62:z},t(A,[2,45]),{55:83,61:N,62:z},t(Y,[2,55],{54:84,56:L,57:v,58:B,59:w,60:D}),t($,[2,56]),t($,[2,57]),t($,[2,58]),t($,[2,59]),t($,[2,60]),t(lt,[2,61]),t(lt,[2,62]),t(A,[2,37],{44:[1,85],45:[1,86]}),{49:[1,87]},{53:[1,88]},{53:[1,89]},{67:[1,90],69:[1,91]},{28:92,84:C,85:M,86:S},t(X,[2,22]),t(X,[2,23]),t(X,[2,24]),{16:[1,93]},{25:[2,19]},t(ut,[2,48]),{27:94,28:43,29:44,84:C,85:M,86:S,87:R},{27:95,28:43,29:44,53:[1,96],84:C,85:M,86:S,87:R},t(Y,[2,54],{54:97,56:L,57:v,58:B,59:w,60:D}),t(Y,[2,53]),{28:98,84:C,85:M,86:S},{46:99,50:W},{27:101,28:43,29:44,84:C,85:M,86:S,87:R},t(A,[2,63],{53:[1,102]}),t(A,[2,65],{53:[1,104],65:[1,103]}),t(A,[2,69],{53:[1,105],68:[1,106]}),t(A,[2,73],{53:[1,108],65:[1,107]}),t(A,[2,77]),t(J,[2,11]),t(ut,[2,50]),t(ut,[2,49]),{27:109,28:43,29:44,84:C,85:M,86:S,87:R},t(Y,[2,52]),t(A,[2,38],{45:[1,110]}),{47:[1,111]},{46:112,47:[2,42],50:W},t(A,[2,41]),t(A,[2,64]),t(A,[2,66]),t(A,[2,67],{65:[1,113]}),t(A,[2,70]),t(A,[2,71],{53:[1,114]}),t(A,[2,74]),t(A,[2,75],{65:[1,115]}),t(ut,[2,51]),{46:116,50:W},t(A,[2,39]),{47:[2,43]},t(A,[2,68]),t(A,[2,72]),t(A,[2,76]),{47:[1,117]},t(A,[2,40])],defaultActions:{2:[2,1],3:[2,2],4:[2,3],6:[2,9],13:[2,12],14:[2,4],20:[2,15],51:[2,14],52:[2,16],79:[2,19],112:[2,43]},parseError:function(V,Q){if(Q.recoverable)this.trace(V);else{var q=new Error(V);throw q.hash=Q,q}},parse:function(V){var Q=this,q=[0],U=[],F=[null],j=[],P=this.table,et="",at=0,It=0,Lt=2,Rt=1,Ct=j.slice.call(arguments,1),pt=Object.create(this.lexer),mt={yy:{}};for(var vt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,vt)&&(mt.yy[vt]=this.yy[vt]);pt.setInput(V,mt.yy),mt.yy.lexer=pt,mt.yy.parser=this,typeof pt.yylloc>"u"&&(pt.yylloc={});var Tt=pt.yylloc;j.push(Tt);var ft=pt.options&&pt.options.ranges;typeof mt.yy.parseError=="function"?this.parseError=mt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function le(){var Et;return Et=U.pop()||pt.lex()||Rt,typeof Et!="number"&&(Et instanceof Array&&(U=Et,Et=U.pop()),Et=Q.symbols_[Et]||Et),Et}for(var Dt,Gt,$t,Qt,we={},jt,Ft,zt,wt;;){if(Gt=q[q.length-1],this.defaultActions[Gt]?$t=this.defaultActions[Gt]:((Dt===null||typeof Dt>"u")&&(Dt=le()),$t=P[Gt]&&P[Gt][Dt]),typeof $t>"u"||!$t.length||!$t[0]){var bt="";wt=[];for(jt in P[Gt])this.terminals_[jt]&&jt>Lt&&wt.push("'"+this.terminals_[jt]+"'");pt.showPosition?bt="Parse error on line "+(at+1)+`:
+`+pt.showPosition()+`
+Expecting `+wt.join(", ")+", got '"+(this.terminals_[Dt]||Dt)+"'":bt="Parse error on line "+(at+1)+": Unexpected "+(Dt==Rt?"end of input":"'"+(this.terminals_[Dt]||Dt)+"'"),this.parseError(bt,{text:pt.match,token:this.terminals_[Dt]||Dt,line:pt.yylineno,loc:Tt,expected:wt})}if($t[0]instanceof Array&&$t.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Gt+", token: "+Dt);switch($t[0]){case 1:q.push(Dt),F.push(pt.yytext),j.push(pt.yylloc),q.push($t[1]),Dt=null,It=pt.yyleng,et=pt.yytext,at=pt.yylineno,Tt=pt.yylloc;break;case 2:if(Ft=this.productions_[$t[1]][1],we.$=F[F.length-Ft],we._$={first_line:j[j.length-(Ft||1)].first_line,last_line:j[j.length-1].last_line,first_column:j[j.length-(Ft||1)].first_column,last_column:j[j.length-1].last_column},ft&&(we._$.range=[j[j.length-(Ft||1)].range[0],j[j.length-1].range[1]]),Qt=this.performAction.apply(we,[et,It,at,mt.yy,$t[1],F,j].concat(Ct)),typeof Qt<"u")return Qt;Ft&&(q=q.slice(0,-1*Ft*2),F=F.slice(0,-1*Ft),j=j.slice(0,-1*Ft)),q.push(this.productions_[$t[1]][0]),F.push(we.$),j.push(we._$),zt=P[q[q.length-2]][q[q.length-1]],q.push(zt);break;case 3:return!0}}return!0}},K=function(){var Z={EOF:1,parseError:function(Q,q){if(this.yy.parser)this.yy.parser.parseError(Q,q);else throw new Error(Q)},setInput:function(V,Q){return this.yy=Q||this.yy||{},this._input=V,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var V=this._input[0];this.yytext+=V,this.yyleng++,this.offset++,this.match+=V,this.matched+=V;var Q=V.match(/(?:\r\n?|\n).*/g);return Q?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),V},unput:function(V){var Q=V.length,q=V.split(/(?:\r\n?|\n)/g);this._input=V+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Q),this.offset-=Q;var U=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),q.length-1&&(this.yylineno-=q.length-1);var F=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:q?(q.length===U.length?this.yylloc.first_column:0)+U[U.length-q.length].length-q[0].length:this.yylloc.first_column-Q},this.options.ranges&&(this.yylloc.range=[F[0],F[0]+this.yyleng-Q]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
+`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(V){this.unput(this.match.slice(V))},pastInput:function(){var V=this.matched.substr(0,this.matched.length-this.match.length);return(V.length>20?"...":"")+V.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var V=this.match;return V.length<20&&(V+=this._input.substr(0,20-V.length)),(V.substr(0,20)+(V.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var V=this.pastInput(),Q=new Array(V.length+1).join("-");return V+this.upcomingInput()+`
+`+Q+"^"},test_match:function(V,Q){var q,U,F;if(this.options.backtrack_lexer&&(F={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(F.yylloc.range=this.yylloc.range.slice(0))),U=V[0].match(/(?:\r\n?|\n).*/g),U&&(this.yylineno+=U.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:U?U[U.length-1].length-U[U.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+V[0].length},this.yytext+=V[0],this.match+=V[0],this.matches=V,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(V[0].length),this.matched+=V[0],q=this.performAction.call(this,this.yy,this,Q,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),q)return q;if(this._backtrack){for(var j in F)this[j]=F[j];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var V,Q,q,U;this._more||(this.yytext="",this.match="");for(var F=this._currentRules(),j=0;j<F.length;j++)if(q=this._input.match(this.rules[F[j]]),q&&(!Q||q[0].length>Q[0].length)){if(Q=q,U=j,this.options.backtrack_lexer){if(V=this.test_match(q,F[j]),V!==!1)return V;if(this._backtrack){Q=!1;continue}else return!1}else if(!this.options.flex)break}return Q?(V=this.test_match(Q,F[U]),V!==!1?V:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
+`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var Q=this.next();return Q||this.lex()},begin:function(Q){this.conditionStack.push(Q)},popState:function(){var Q=this.conditionStack.length-1;return Q>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(Q){return Q=this.conditionStack.length-1-Math.abs(Q||0),Q>=0?this.conditionStack[Q]:"INITIAL"},pushState:function(Q){this.begin(Q)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(Q,q,U,F){switch(U){case 0:return this.begin("open_directive"),19;case 1:return 8;case 2:return 9;case 3:return 10;case 4:return 11;case 5:return this.begin("type_directive"),20;case 6:return this.popState(),this.begin("arg_directive"),17;case 7:return this.popState(),this.popState(),22;case 8:return 21;case 9:break;case 10:break;case 11:return this.begin("acc_title"),38;case 12:return this.popState(),"acc_title_value";case 13:return this.begin("acc_descr"),40;case 14:return this.popState(),"acc_descr_value";case 15:this.begin("acc_descr_multiline");break;case 16:this.popState();break;case 17:return"acc_descr_multiline_value";case 18:return 16;case 19:break;case 20:return 23;case 21:return 23;case 22:return this.begin("struct"),45;case 23:return"EDGE_STATE";case 24:return"EOF_IN_STRUCT";case 25:return"OPEN_IN_STRUCT";case 26:return this.popState(),47;case 27:break;case 28:return"MEMBER";case 29:return 43;case 30:return 70;case 31:return 63;case 32:return 64;case 33:return 66;case 34:return 48;case 35:return 49;case 36:this.begin("generic");break;case 37:this.popState();break;case 38:return"GENERICTYPE";case 39:this.begin("string");break;case 40:this.popState();break;case 41:return"STR";case 42:this.begin("bqstring");break;case 43:this.popState();break;case 44:return"BQUOTE_STR";case 45:this.begin("href");break;case 46:this.popState();break;case 47:return 69;case 48:this.begin("callback_name");break;case 49:this.popState();break;case 50:this.popState(),this.begin("callback_args");break;case 51:return 67;case 52:this.popState();break;case 53:return 68;case 54:return 65;case 55:return 65;case 56:return 65;case 57:return 65;case 58:return 57;case 59:return 57;case 60:return 59;case 61:return 59;case 62:return 58;case 63:return 56;case 64:return 60;case 65:return 61;case 66:return 62;case 67:return 32;case 68:return 44;case 69:return 82;case 70:return"DOT";case 71:return"PLUS";case 72:return 79;case 73:return"EQUALS";case 74:return"EQUALS";case 75:return 86;case 76:return"PUNCTUATION";case 77:return 85;case 78:return 84;case 79:return 81;case 80:return 25}},rules:[/^(?:%%\{)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:\s*(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:[{])/,/^(?:\[\*\])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:class\b)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:click\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:[`])/,/^(?:[`])/,/^(?:[^`]+)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:\s*\(\))/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/],conditions:{acc_descr_multiline:{rules:[16,17],inclusive:!1},acc_descr:{rules:[14],inclusive:!1},acc_title:{rules:[12],inclusive:!1},arg_directive:{rules:[7,8],inclusive:!1},type_directive:{rules:[6,7],inclusive:!1},open_directive:{rules:[5],inclusive:!1},callback_args:{rules:[52,53],inclusive:!1},callback_name:{rules:[49,50,51],inclusive:!1},href:{rules:[46,47],inclusive:!1},struct:{rules:[23,24,25,26,27,28],inclusive:!1},generic:{rules:[37,38],inclusive:!1},bqstring:{rules:[43,44],inclusive:!1},string:{rules:[40,41],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,13,15,18,19,20,21,22,23,29,30,31,32,33,34,35,36,39,42,45,48,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80],inclusive:!0}}};return Z}();tt.lexer=K;function it(){this.yy={}}return it.prototype=tt,tt.Parser=it,new it}();_1.parser=_1;const XK=(t,e)=>{var r;return((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:t.match(/^\s*classDiagram/)!==null},KK=(t,e)=>{var r;return t.match(/^\s*classDiagram/)!==null&&((r=e==null?void 0:e.class)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!0:t.match(/^\s*classDiagram-v2/)!==null},kg="classid-";let wg=[],lr={},a9=0,zc=[];const Yc=t=>pe.sanitizeText(t,nt()),ZK=function(t,e,r){He.parseDirective(this,t,e,r)},Uc=function(t){let e="",r=t;if(t.indexOf("~")>0){let n=t.split("~");r=n[0],e=pe.sanitizeText(n[1],nt())}return{className:r,type:e}},Tg=function(t){let e=Uc(t);typeof lr[e.className]<"u"||(lr[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:kg+e.className+"-"+a9},a9++)},s9=function(t){const e=Object.keys(lr);for(let r=0;r<e.length;r++)if(lr[e[r]].id===t)return lr[e[r]].domId},QK=function(){wg=[],lr={},zc=[],zc.push(l9),ci()},JK=function(t){return lr[t]},tZ=function(){return lr},eZ=function(){return wg},rZ=function(t){H.debug("Adding relation: "+JSON.stringify(t)),Tg(t.id1),Tg(t.id2),t.id1=Uc(t.id1).className,t.id2=Uc(t.id2).className,t.relationTitle1=pe.sanitizeText(t.relationTitle1.trim(),nt()),t.relationTitle2=pe.sanitizeText(t.relationTitle2.trim(),nt()),wg.push(t)},nZ=function(t,e){const r=Uc(t).className;lr[r].annotations.push(e)},o9=function(t,e){const r=Uc(t).className,n=lr[r];if(typeof e=="string"){const i=e.trim();i.startsWith("<<")&&i.endsWith(">>")?n.annotations.push(Yc(i.substring(2,i.length-2))):i.indexOf(")")>0?n.methods.push(Yc(i)):i&&n.members.push(Yc(i))}},iZ=function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach(r=>o9(t,r)))},aZ=function(t){return t.substring(0,1)===":"?pe.sanitizeText(t.substr(1).trim(),nt()):Yc(t.trim())},Eg=function(t,e){t.split(",").forEach(function(r){let n=r;r[0].match(/\d/)&&(n=kg+n),typeof lr[n]<"u"&&lr[n].cssClasses.push(e)})},sZ=function(t,e){const r=nt();t.split(",").forEach(function(n){typeof e<"u"&&(lr[n].tooltip=pe.sanitizeText(e,r))})},oZ=function(t){return lr[t].tooltip},lZ=function(t,e,r){const n=nt();t.split(",").forEach(function(i){let a=i;i[0].match(/\d/)&&(a=kg+a),typeof lr[a]<"u"&&(lr[a].link=Se.formatUrl(e,n),n.securityLevel==="sandbox"?lr[a].linkTarget="_top":typeof r=="string"?lr[a].linkTarget=Yc(r):lr[a].linkTarget="_blank")}),Eg(t,"clickable")},cZ=function(t,e,r){t.split(",").forEach(function(n){uZ(n,e,r),lr[n].haveCallback=!0}),Eg(t,"clickable")},uZ=function(t,e,r){const n=nt();let i=t,a=s9(i);if(n.securityLevel==="loose"&&!(typeof e>"u")&&typeof lr[i]<"u"){let s=[];if(typeof r=="string"){s=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let o=0;o<s.length;o++){let l=s[o].trim();l.charAt(0)==='"'&&l.charAt(l.length-1)==='"'&&(l=l.substr(1,l.length-2)),s[o]=l}}s.length===0&&s.push(a),zc.push(function(){const o=document.querySelector(`[id="${a}"]`);o!==null&&o.addEventListener("click",function(){Se.runFunc(e,...s)},!1)})}},hZ=function(t){zc.forEach(function(e){e(t)})},fZ={LINE:0,DOTTED_LINE:1},dZ={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3,LOLLIPOP:4},l9=function(t){let e=St(".mermaidTooltip");(e._groups||e)[0][0]===null&&(e=St("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),St(t).select("svg").selectAll("g.node").on("mouseover",function(){const i=St(this);if(i.attr("title")===null)return;const s=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(i.attr("title")).style("left",window.scrollX+s.left+(s.right-s.left)/2+"px").style("top",window.scrollY+s.top-14+document.body.scrollTop+"px"),e.html(e.html().replace(/&lt;br\/&gt;/g,"<br/>")),i.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),St(this).classed("hover",!1)})};zc.push(l9);let c9="TB";const Jo={parseDirective:ZK,setAccTitle:Yn,getAccTitle:ui,getAccDescription:fi,setAccDescription:hi,getConfig:()=>nt().class,addClass:Tg,bindFunctions:hZ,clear:QK,getClass:JK,getClasses:tZ,addAnnotation:nZ,getRelations:eZ,addRelation:rZ,getDirection:()=>c9,setDirection:t=>{c9=t},addMember:o9,addMembers:iZ,cleanupLabel:aZ,lineType:fZ,relationType:dZ,setClickEvent:cZ,setCssClass:Eg,setLink:lZ,getTooltip:oZ,setTooltip:sZ,lookUpDomId:s9};var Cg,u9;function pZ(){if(u9)return Cg;u9=1;var t=Uf;function e(){this.__data__=new t,this.size=0}return Cg=e,Cg}var Sg,h9;function gZ(){if(h9)return Sg;h9=1;function t(e){var r=this.__data__,n=r.delete(e);return this.size=r.size,n}return Sg=t,Sg}var Ag,f9;function yZ(){if(f9)return Ag;f9=1;function t(e){return this.__data__.get(e)}return Ag=t,Ag}var Mg,d9;function mZ(){if(d9)return Mg;d9=1;function t(e){return this.__data__.has(e)}return Mg=t,Mg}var Lg,p9;function bZ(){if(p9)return Lg;p9=1;var t=Uf,e=Zp,r=Qp,n=200;function i(a,s){var o=this.__data__;if(o instanceof t){var l=o.__data__;if(!e||l.length<n-1)return l.push([a,s]),this.size=++o.size,this;o=this.__data__=new r(l)}return o.set(a,s),this.size=o.size,this}return Lg=i,Lg}var Rg,g9;function v1(){if(g9)return Rg;g9=1;var t=Uf,e=pZ(),r=gZ(),n=yZ(),i=mZ(),a=bZ();function s(o){var l=this.__data__=new t(o);this.size=l.size}return s.prototype.clear=e,s.prototype.delete=r,s.prototype.get=n,s.prototype.has=i,s.prototype.set=a,Rg=s,Rg}var Ig,y9;function Ng(){if(y9)return Ig;y9=1;function t(e,r){for(var n=-1,i=e==null?0:e.length;++n<i&&r(e[n],n,e)!==!1;);return e}return Ig=t,Ig}var Bg,m9;function b9(){if(m9)return Bg;m9=1;var t=qs,e=function(){try{var r=t(Object,"defineProperty");return r({},"",{}),r}catch{}}();return Bg=e,Bg}var Dg,_9;function x1(){if(_9)return Dg;_9=1;var t=b9();function e(r,n,i){n=="__proto__"&&t?t(r,n,{configurable:!0,enumerable:!0,value:i,writable:!0}):r[n]=i}return Dg=e,Dg}var Og,v9;function k1(){if(v9)return Og;v9=1;var t=x1(),e=Wo,r=Object.prototype,n=r.hasOwnProperty;function i(a,s,o){var l=a[s];(!(n.call(a,s)&&e(l,o))||o===void 0&&!(s in a))&&t(a,s,o)}return Og=i,Og}var Fg,x9;function Wc(){if(x9)return Fg;x9=1;var t=k1(),e=x1();function r(n,i,a,s){var o=!a;a||(a={});for(var l=-1,u=i.length;++l<u;){var h=i[l],d=s?s(a[h],n[h],h,a,n):void 0;d===void 0&&(d=n[h]),o?e(a,h,d):t(a,h,d)}return a}return Fg=r,Fg}var Pg,k9;function _Z(){if(k9)return Pg;k9=1;function t(e,r){for(var n=-1,i=Array(e);++n<e;)i[n]=r(n);return i}return Pg=t,Pg}var qg,w9;function Fi(){if(w9)return qg;w9=1;function t(e){return e!=null&&typeof e=="object"}return qg=t,qg}var Vg,T9;function vZ(){if(T9)return Vg;T9=1;var t=Ps,e=Fi(),r="[object Arguments]";function n(i){return e(i)&&t(i)==r}return Vg=n,Vg}var zg,E9;function Hc(){if(E9)return zg;E9=1;var t=vZ(),e=Fi(),r=Object.prototype,n=r.hasOwnProperty,i=r.propertyIsEnumerable,a=t(function(){return arguments}())?t:function(s){return e(s)&&n.call(s,"callee")&&!i.call(s,"callee")};return zg=a,zg}var Yg,C9;function gr(){if(C9)return Yg;C9=1;var t=Array.isArray;return Yg=t,Yg}var w1={exports:{}},Ug,S9;function xZ(){if(S9)return Ug;S9=1;function t(){return!1}return Ug=t,Ug}var A9;function tl(){return A9||(A9=1,function(t,e){var r=si,n=xZ(),i=e&&!e.nodeType&&e,a=i&&!0&&t&&!t.nodeType&&t,s=a&&a.exports===i,o=s?r.Buffer:void 0,l=o?o.isBuffer:void 0,u=l||n;t.exports=u}(w1,w1.exports)),w1.exports}var Wg,M9;function T1(){if(M9)return Wg;M9=1;var t=9007199254740991,e=/^(?:0|[1-9]\d*)$/;function r(n,i){var a=typeof n;return i=i==null?t:i,!!i&&(a=="number"||a!="symbol"&&e.test(n))&&n>-1&&n%1==0&&n<i}return Wg=r,Wg}var Hg,L9;function Gg(){if(L9)return Hg;L9=1;var t=9007199254740991;function e(r){return typeof r=="number"&&r>-1&&r%1==0&&r<=t}return Hg=e,Hg}var jg,R9;function kZ(){if(R9)return jg;R9=1;var t=Ps,e=Gg(),r=Fi(),n="[object Arguments]",i="[object Array]",a="[object Boolean]",s="[object Date]",o="[object Error]",l="[object Function]",u="[object Map]",h="[object Number]",d="[object Object]",f="[object RegExp]",p="[object Set]",m="[object String]",_="[object WeakMap]",y="[object ArrayBuffer]",b="[object DataView]",x="[object Float32Array]",k="[object Float64Array]",T="[object Int8Array]",C="[object Int16Array]",M="[object Int32Array]",S="[object Uint8Array]",R="[object Uint8ClampedArray]",A="[object Uint16Array]",L="[object Uint32Array]",v={};v[x]=v[k]=v[T]=v[C]=v[M]=v[S]=v[R]=v[A]=v[L]=!0,v[n]=v[i]=v[y]=v[a]=v[b]=v[s]=v[o]=v[l]=v[u]=v[h]=v[d]=v[f]=v[p]=v[m]=v[_]=!1;function B(w){return r(w)&&e(w.length)&&!!v[t(w)]}return jg=B,jg}var $g,I9;function E1(){if(I9)return $g;I9=1;function t(e){return function(r){return e(r)}}return $g=t,$g}var C1={exports:{}},N9;function Xg(){return N9||(N9=1,function(t,e){var r=Zk,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,s=a&&r.process,o=function(){try{var l=i&&i.require&&i.require("util").types;return l||s&&s.binding&&s.binding("util")}catch{}}();t.exports=o}(C1,C1.exports)),C1.exports}var Kg,B9;function Gc(){if(B9)return Kg;B9=1;var t=kZ(),e=E1(),r=Xg(),n=r&&r.isTypedArray,i=n?e(n):t;return Kg=i,Kg}var Zg,D9;function O9(){if(D9)return Zg;D9=1;var t=_Z(),e=Hc(),r=gr(),n=tl(),i=T1(),a=Gc(),s=Object.prototype,o=s.hasOwnProperty;function l(u,h){var d=r(u),f=!d&&e(u),p=!d&&!f&&n(u),m=!d&&!f&&!p&&a(u),_=d||f||p||m,y=_?t(u.length,String):[],b=y.length;for(var x in u)(h||o.call(u,x))&&!(_&&(x=="length"||p&&(x=="offset"||x=="parent")||m&&(x=="buffer"||x=="byteLength"||x=="byteOffset")||i(x,b)))&&y.push(x);return y}return Zg=l,Zg}var Qg,F9;function S1(){if(F9)return Qg;F9=1;var t=Object.prototype;function e(r){var n=r&&r.constructor,i=typeof n=="function"&&n.prototype||t;return r===i}return Qg=e,Qg}var Jg,P9;function q9(){if(P9)return Jg;P9=1;function t(e,r){return function(n){return e(r(n))}}return Jg=t,Jg}var ty,V9;function wZ(){if(V9)return ty;V9=1;var t=q9(),e=t(Object.keys,Object);return ty=e,ty}var ey,z9;function ry(){if(z9)return ey;z9=1;var t=S1(),e=wZ(),r=Object.prototype,n=r.hasOwnProperty;function i(a){if(!t(a))return e(a);var s=[];for(var o in Object(a))n.call(a,o)&&o!="constructor"&&s.push(o);return s}return ey=i,ey}var ny,Y9;function oa(){if(Y9)return ny;Y9=1;var t=Yo,e=Gg();function r(n){return n!=null&&e(n.length)&&!t(n)}return ny=r,ny}var iy,U9;function ts(){if(U9)return iy;U9=1;var t=O9(),e=ry(),r=oa();function n(i){return r(i)?t(i):e(i)}return iy=n,iy}var ay,W9;function TZ(){if(W9)return ay;W9=1;var t=Wc(),e=ts();function r(n,i){return n&&t(i,e(i),n)}return ay=r,ay}var sy,H9;function EZ(){if(H9)return sy;H9=1;function t(e){var r=[];if(e!=null)for(var n in Object(e))r.push(n);return r}return sy=t,sy}var oy,G9;function CZ(){if(G9)return oy;G9=1;var t=Vn,e=S1(),r=EZ(),n=Object.prototype,i=n.hasOwnProperty;function a(s){if(!t(s))return r(s);var o=e(s),l=[];for(var u in s)u=="constructor"&&(o||!i.call(s,u))||l.push(u);return l}return oy=a,oy}var ly,j9;function Ws(){if(j9)return ly;j9=1;var t=O9(),e=CZ(),r=oa();function n(i){return r(i)?t(i,!0):e(i)}return ly=n,ly}var cy,$9;function SZ(){if($9)return cy;$9=1;var t=Wc(),e=Ws();function r(n,i){return n&&t(i,e(i),n)}return cy=r,cy}var A1={exports:{}},X9;function K9(){return X9||(X9=1,function(t,e){var r=si,n=e&&!e.nodeType&&e,i=n&&!0&&t&&!t.nodeType&&t,a=i&&i.exports===n,s=a?r.Buffer:void 0,o=s?s.allocUnsafe:void 0;function l(u,h){if(h)return u.slice();var d=u.length,f=o?o(d):new u.constructor(d);return u.copy(f),f}t.exports=l}(A1,A1.exports)),A1.exports}var uy,Z9;function Q9(){if(Z9)return uy;Z9=1;function t(e,r){var n=-1,i=e.length;for(r||(r=Array(i));++n<i;)r[n]=e[n];return r}return uy=t,uy}var hy,J9;function tT(){if(J9)return hy;J9=1;function t(e,r){for(var n=-1,i=e==null?0:e.length,a=0,s=[];++n<i;){var o=e[n];r(o,n,e)&&(s[a++]=o)}return s}return hy=t,hy}var fy,eT;function rT(){if(eT)return fy;eT=1;function t(){return[]}return fy=t,fy}var dy,nT;function py(){if(nT)return dy;nT=1;var t=tT(),e=rT(),r=Object.prototype,n=r.propertyIsEnumerable,i=Object.getOwnPropertySymbols,a=i?function(s){return s==null?[]:(s=Object(s),t(i(s),function(o){return n.call(s,o)}))}:e;return dy=a,dy}var gy,iT;function AZ(){if(iT)return gy;iT=1;var t=Wc(),e=py();function r(n,i){return t(n,e(n),i)}return gy=r,gy}var yy,aT;function my(){if(aT)return yy;aT=1;function t(e,r){for(var n=-1,i=r.length,a=e.length;++n<i;)e[a+n]=r[n];return e}return yy=t,yy}var by,sT;function M1(){if(sT)return by;sT=1;var t=q9(),e=t(Object.getPrototypeOf,Object);return by=e,by}var _y,oT;function lT(){if(oT)return _y;oT=1;var t=my(),e=M1(),r=py(),n=rT(),i=Object.getOwnPropertySymbols,a=i?function(s){for(var o=[];s;)t(o,r(s)),s=e(s);return o}:n;return _y=a,_y}var vy,cT;function MZ(){if(cT)return vy;cT=1;var t=Wc(),e=lT();function r(n,i){return t(n,e(n),i)}return vy=r,vy}var xy,uT;function hT(){if(uT)return xy;uT=1;var t=my(),e=gr();function r(n,i,a){var s=i(n);return e(n)?s:t(s,a(n))}return xy=r,xy}var ky,fT;function dT(){if(fT)return ky;fT=1;var t=hT(),e=py(),r=ts();function n(i){return t(i,r,e)}return ky=n,ky}var wy,pT;function LZ(){if(pT)return wy;pT=1;var t=hT(),e=lT(),r=Ws();function n(i){return t(i,r,e)}return wy=n,wy}var Ty,gT;function RZ(){if(gT)return Ty;gT=1;var t=qs,e=si,r=t(e,"DataView");return Ty=r,Ty}var Ey,yT;function IZ(){if(yT)return Ey;yT=1;var t=qs,e=si,r=t(e,"Promise");return Ey=r,Ey}var Cy,mT;function bT(){if(mT)return Cy;mT=1;var t=qs,e=si,r=t(e,"Set");return Cy=r,Cy}var Sy,_T;function NZ(){if(_T)return Sy;_T=1;var t=qs,e=si,r=t(e,"WeakMap");return Sy=r,Sy}var Ay,vT;function el(){if(vT)return Ay;vT=1;var t=RZ(),e=Zp,r=IZ(),n=bT(),i=NZ(),a=Ps,s=nw,o="[object Map]",l="[object Object]",u="[object Promise]",h="[object Set]",d="[object WeakMap]",f="[object DataView]",p=s(t),m=s(e),_=s(r),y=s(n),b=s(i),x=a;return(t&&x(new t(new ArrayBuffer(1)))!=f||e&&x(new e)!=o||r&&x(r.resolve())!=u||n&&x(new n)!=h||i&&x(new i)!=d)&&(x=function(k){var T=a(k),C=T==l?k.constructor:void 0,M=C?s(C):"";if(M)switch(M){case p:return f;case m:return o;case _:return u;case y:return h;case b:return d}return T}),Ay=x,Ay}var My,xT;function BZ(){if(xT)return My;xT=1;var t=Object.prototype,e=t.hasOwnProperty;function r(n){var i=n.length,a=new n.constructor(i);return i&&typeof n[0]=="string"&&e.call(n,"index")&&(a.index=n.index,a.input=n.input),a}return My=r,My}var Ly,kT;function wT(){if(kT)return Ly;kT=1;var t=si,e=t.Uint8Array;return Ly=e,Ly}var Ry,TT;function Iy(){if(TT)return Ry;TT=1;var t=wT();function e(r){var n=new r.constructor(r.byteLength);return new t(n).set(new t(r)),n}return Ry=e,Ry}var Ny,ET;function DZ(){if(ET)return Ny;ET=1;var t=Iy();function e(r,n){var i=n?t(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.byteLength)}return Ny=e,Ny}var By,CT;function OZ(){if(CT)return By;CT=1;var t=/\w*$/;function e(r){var n=new r.constructor(r.source,t.exec(r));return n.lastIndex=r.lastIndex,n}return By=e,By}var Dy,ST;function FZ(){if(ST)return Dy;ST=1;var t=zo,e=t?t.prototype:void 0,r=e?e.valueOf:void 0;function n(i){return r?Object(r.call(i)):{}}return Dy=n,Dy}var Oy,AT;function MT(){if(AT)return Oy;AT=1;var t=Iy();function e(r,n){var i=n?t(r.buffer):r.buffer;return new r.constructor(i,r.byteOffset,r.length)}return Oy=e,Oy}var Fy,LT;function PZ(){if(LT)return Fy;LT=1;var t=Iy(),e=DZ(),r=OZ(),n=FZ(),i=MT(),a="[object Boolean]",s="[object Date]",o="[object Map]",l="[object Number]",u="[object RegExp]",h="[object Set]",d="[object String]",f="[object Symbol]",p="[object ArrayBuffer]",m="[object DataView]",_="[object Float32Array]",y="[object Float64Array]",b="[object Int8Array]",x="[object Int16Array]",k="[object Int32Array]",T="[object Uint8Array]",C="[object Uint8ClampedArray]",M="[object Uint16Array]",S="[object Uint32Array]";function R(A,L,v){var B=A.constructor;switch(L){case p:return t(A);case a:case s:return new B(+A);case m:return e(A,v);case _:case y:case b:case x:case k:case T:case C:case M:case S:return i(A,v);case o:return new B;case l:case d:return new B(A);case u:return r(A);case h:return new B;case f:return n(A)}}return Fy=R,Fy}var Py,RT;function IT(){if(RT)return Py;RT=1;var t=Vn,e=Object.create,r=function(){function n(){}return function(i){if(!t(i))return{};if(e)return e(i);n.prototype=i;var a=new n;return n.prototype=void 0,a}}();return Py=r,Py}var qy,NT;function BT(){if(NT)return qy;NT=1;var t=IT(),e=M1(),r=S1();function n(i){return typeof i.constructor=="function"&&!r(i)?t(e(i)):{}}return qy=n,qy}var Vy,DT;function qZ(){if(DT)return Vy;DT=1;var t=el(),e=Fi(),r="[object Map]";function n(i){return e(i)&&t(i)==r}return Vy=n,Vy}var zy,OT;function VZ(){if(OT)return zy;OT=1;var t=qZ(),e=E1(),r=Xg(),n=r&&r.isMap,i=n?e(n):t;return zy=i,zy}var Yy,FT;function zZ(){if(FT)return Yy;FT=1;var t=el(),e=Fi(),r="[object Set]";function n(i){return e(i)&&t(i)==r}return Yy=n,Yy}var Uy,PT;function YZ(){if(PT)return Uy;PT=1;var t=zZ(),e=E1(),r=Xg(),n=r&&r.isSet,i=n?e(n):t;return Uy=i,Uy}var Wy,qT;function VT(){if(qT)return Wy;qT=1;var t=v1(),e=Ng(),r=k1(),n=TZ(),i=SZ(),a=K9(),s=Q9(),o=AZ(),l=MZ(),u=dT(),h=LZ(),d=el(),f=BZ(),p=PZ(),m=BT(),_=gr(),y=tl(),b=VZ(),x=Vn,k=YZ(),T=ts(),C=Ws(),M=1,S=2,R=4,A="[object Arguments]",L="[object Array]",v="[object Boolean]",B="[object Date]",w="[object Error]",D="[object Function]",N="[object GeneratorFunction]",z="[object Map]",X="[object Number]",ct="[object Object]",J="[object RegExp]",Y="[object Set]",$="[object String]",lt="[object Symbol]",ut="[object WeakMap]",W="[object ArrayBuffer]",tt="[object DataView]",K="[object Float32Array]",it="[object Float64Array]",Z="[object Int8Array]",V="[object Int16Array]",Q="[object Int32Array]",q="[object Uint8Array]",U="[object Uint8ClampedArray]",F="[object Uint16Array]",j="[object Uint32Array]",P={};P[A]=P[L]=P[W]=P[tt]=P[v]=P[B]=P[K]=P[it]=P[Z]=P[V]=P[Q]=P[z]=P[X]=P[ct]=P[J]=P[Y]=P[$]=P[lt]=P[q]=P[U]=P[F]=P[j]=!0,P[w]=P[D]=P[ut]=!1;function et(at,It,Lt,Rt,Ct,pt){var mt,vt=It&M,Tt=It&S,ft=It&R;if(Lt&&(mt=Ct?Lt(at,Rt,Ct,pt):Lt(at)),mt!==void 0)return mt;if(!x(at))return at;var le=_(at);if(le){if(mt=f(at),!vt)return s(at,mt)}else{var Dt=d(at),Gt=Dt==D||Dt==N;if(y(at))return a(at,vt);if(Dt==ct||Dt==A||Gt&&!Ct){if(mt=Tt||Gt?{}:m(at),!vt)return Tt?l(at,i(mt,at)):o(at,n(mt,at))}else{if(!P[Dt])return Ct?at:{};mt=p(at,Dt,vt)}}pt||(pt=new t);var $t=pt.get(at);if($t)return $t;pt.set(at,mt),k(at)?at.forEach(function(jt){mt.add(et(jt,It,Lt,jt,at,pt))}):b(at)&&at.forEach(function(jt,Ft){mt.set(Ft,et(jt,It,Lt,Ft,at,pt))});var Qt=ft?Tt?h:u:Tt?C:T,we=le?void 0:Qt(at);return e(we||at,function(jt,Ft){we&&(Ft=jt,jt=at[Ft]),r(mt,Ft,et(jt,It,Lt,Ft,at,pt))}),mt}return Wy=et,Wy}var Hy,zT;function UZ(){if(zT)return Hy;zT=1;var t=VT(),e=4;function r(n){return t(n,e)}return Hy=r,Hy}var Gy,YT;function jy(){if(YT)return Gy;YT=1;function t(e){return function(){return e}}return Gy=t,Gy}var $y={exports:{}},Xy,UT;function WZ(){if(UT)return Xy;UT=1;function t(e){return function(r,n,i){for(var a=-1,s=Object(r),o=i(r),l=o.length;l--;){var u=o[e?l:++a];if(n(s[u],u,s)===!1)break}return r}}return Xy=t,Xy}var Ky,WT;function Zy(){if(WT)return Ky;WT=1;var t=WZ(),e=t();return Ky=e,Ky}var Qy,HT;function Jy(){if(HT)return Qy;HT=1;var t=Zy(),e=ts();function r(n,i){return n&&t(n,i,e)}return Qy=r,Qy}var tm,GT;function HZ(){if(GT)return tm;GT=1;var t=oa();function e(r,n){return function(i,a){if(i==null)return i;if(!t(i))return r(i,a);for(var s=i.length,o=n?s:-1,l=Object(i);(n?o--:++o<s)&&a(l[o],o,l)!==!1;);return i}}return tm=e,tm}var em,jT;function L1(){if(jT)return em;jT=1;var t=Jy(),e=HZ(),r=e(t);return em=r,em}var rm,$T;function Hs(){if($T)return rm;$T=1;function t(e){return e}return rm=t,rm}var nm,XT;function KT(){if(XT)return nm;XT=1;var t=Hs();function e(r){return typeof r=="function"?r:t}return nm=e,nm}var im,ZT;function QT(){if(ZT)return im;ZT=1;var t=Ng(),e=L1(),r=KT(),n=gr();function i(a,s){var o=n(a)?t:e;return o(a,r(s))}return im=i,im}var JT;function am(){return JT||(JT=1,function(t){t.exports=QT()}($y)),$y.exports}var sm,tE;function GZ(){if(tE)return sm;tE=1;var t=L1();function e(r,n){var i=[];return t(r,function(a,s,o){n(a,s,o)&&i.push(a)}),i}return sm=e,sm}var om,eE;function jZ(){if(eE)return om;eE=1;var t="__lodash_hash_undefined__";function e(r){return this.__data__.set(r,t),this}return om=e,om}var lm,rE;function $Z(){if(rE)return lm;rE=1;function t(e){return this.__data__.has(e)}return lm=t,lm}var cm,nE;function iE(){if(nE)return cm;nE=1;var t=Qp,e=jZ(),r=$Z();function n(i){var a=-1,s=i==null?0:i.length;for(this.__data__=new t;++a<s;)this.add(i[a])}return n.prototype.add=n.prototype.push=e,n.prototype.has=r,cm=n,cm}var um,aE;function XZ(){if(aE)return um;aE=1;function t(e,r){for(var n=-1,i=e==null?0:e.length;++n<i;)if(r(e[n],n,e))return!0;return!1}return um=t,um}var hm,sE;function oE(){if(sE)return hm;sE=1;function t(e,r){return e.has(r)}return hm=t,hm}var fm,lE;function cE(){if(lE)return fm;lE=1;var t=iE(),e=XZ(),r=oE(),n=1,i=2;function a(s,o,l,u,h,d){var f=l&n,p=s.length,m=o.length;if(p!=m&&!(f&&m>p))return!1;var _=d.get(s),y=d.get(o);if(_&&y)return _==o&&y==s;var b=-1,x=!0,k=l&i?new t:void 0;for(d.set(s,o),d.set(o,s);++b<p;){var T=s[b],C=o[b];if(u)var M=f?u(C,T,b,o,s,d):u(T,C,b,s,o,d);if(M!==void 0){if(M)continue;x=!1;break}if(k){if(!e(o,function(S,R){if(!r(k,R)&&(T===S||h(T,S,l,u,d)))return k.push(R)})){x=!1;break}}else if(!(T===C||h(T,C,l,u,d))){x=!1;break}}return d.delete(s),d.delete(o),x}return fm=a,fm}var dm,uE;function KZ(){if(uE)return dm;uE=1;function t(e){var r=-1,n=Array(e.size);return e.forEach(function(i,a){n[++r]=[a,i]}),n}return dm=t,dm}var pm,hE;function gm(){if(hE)return pm;hE=1;function t(e){var r=-1,n=Array(e.size);return e.forEach(function(i){n[++r]=i}),n}return pm=t,pm}var ym,fE;function ZZ(){if(fE)return ym;fE=1;var t=zo,e=wT(),r=Wo,n=cE(),i=KZ(),a=gm(),s=1,o=2,l="[object Boolean]",u="[object Date]",h="[object Error]",d="[object Map]",f="[object Number]",p="[object RegExp]",m="[object Set]",_="[object String]",y="[object Symbol]",b="[object ArrayBuffer]",x="[object DataView]",k=t?t.prototype:void 0,T=k?k.valueOf:void 0;function C(M,S,R,A,L,v,B){switch(R){case x:if(M.byteLength!=S.byteLength||M.byteOffset!=S.byteOffset)return!1;M=M.buffer,S=S.buffer;case b:return!(M.byteLength!=S.byteLength||!v(new e(M),new e(S)));case l:case u:case f:return r(+M,+S);case h:return M.name==S.name&&M.message==S.message;case p:case _:return M==S+"";case d:var w=i;case m:var D=A&s;if(w||(w=a),M.size!=S.size&&!D)return!1;var N=B.get(M);if(N)return N==S;A|=o,B.set(M,S);var z=n(w(M),w(S),A,L,v,B);return B.delete(M),z;case y:if(T)return T.call(M)==T.call(S)}return!1}return ym=C,ym}var mm,dE;function QZ(){if(dE)return mm;dE=1;var t=dT(),e=1,r=Object.prototype,n=r.hasOwnProperty;function i(a,s,o,l,u,h){var d=o&e,f=t(a),p=f.length,m=t(s),_=m.length;if(p!=_&&!d)return!1;for(var y=p;y--;){var b=f[y];if(!(d?b in s:n.call(s,b)))return!1}var x=h.get(a),k=h.get(s);if(x&&k)return x==s&&k==a;var T=!0;h.set(a,s),h.set(s,a);for(var C=d;++y<p;){b=f[y];var M=a[b],S=s[b];if(l)var R=d?l(S,M,b,s,a,h):l(M,S,b,a,s,h);if(!(R===void 0?M===S||u(M,S,o,l,h):R)){T=!1;break}C||(C=b=="constructor")}if(T&&!C){var A=a.constructor,L=s.constructor;A!=L&&"constructor"in a&&"constructor"in s&&!(typeof A=="function"&&A instanceof A&&typeof L=="function"&&L instanceof L)&&(T=!1)}return h.delete(a),h.delete(s),T}return mm=i,mm}var bm,pE;function JZ(){if(pE)return bm;pE=1;var t=v1(),e=cE(),r=ZZ(),n=QZ(),i=el(),a=gr(),s=tl(),o=Gc(),l=1,u="[object Arguments]",h="[object Array]",d="[object Object]",f=Object.prototype,p=f.hasOwnProperty;function m(_,y,b,x,k,T){var C=a(_),M=a(y),S=C?h:i(_),R=M?h:i(y);S=S==u?d:S,R=R==u?d:R;var A=S==d,L=R==d,v=S==R;if(v&&s(_)){if(!s(y))return!1;C=!0,A=!1}if(v&&!A)return T||(T=new t),C||o(_)?e(_,y,b,x,k,T):r(_,y,S,b,x,k,T);if(!(b&l)){var B=A&&p.call(_,"__wrapped__"),w=L&&p.call(y,"__wrapped__");if(B||w){var D=B?_.value():_,N=w?y.value():y;return T||(T=new t),k(D,N,b,x,T)}}return v?(T||(T=new t),n(_,y,b,x,k,T)):!1}return bm=m,bm}var _m,gE;function yE(){if(gE)return _m;gE=1;var t=JZ(),e=Fi();function r(n,i,a,s,o){return n===i?!0:n==null||i==null||!e(n)&&!e(i)?n!==n&&i!==i:t(n,i,a,s,r,o)}return _m=r,_m}var vm,mE;function tQ(){if(mE)return vm;mE=1;var t=v1(),e=yE(),r=1,n=2;function i(a,s,o,l){var u=o.length,h=u,d=!l;if(a==null)return!h;for(a=Object(a);u--;){var f=o[u];if(d&&f[2]?f[1]!==a[f[0]]:!(f[0]in a))return!1}for(;++u<h;){f=o[u];var p=f[0],m=a[p],_=f[1];if(d&&f[2]){if(m===void 0&&!(p in a))return!1}else{var y=new t;if(l)var b=l(m,_,p,a,s,y);if(!(b===void 0?e(_,m,r|n,l,y):b))return!1}}return!0}return vm=i,vm}var xm,bE;function _E(){if(bE)return xm;bE=1;var t=Vn;function e(r){return r===r&&!t(r)}return xm=e,xm}var km,vE;function eQ(){if(vE)return km;vE=1;var t=_E(),e=ts();function r(n){for(var i=e(n),a=i.length;a--;){var s=i[a],o=n[s];i[a]=[s,o,t(o)]}return i}return km=r,km}var wm,xE;function kE(){if(xE)return wm;xE=1;function t(e,r){return function(n){return n==null?!1:n[e]===r&&(r!==void 0||e in Object(n))}}return wm=t,wm}var Tm,wE;function rQ(){if(wE)return Tm;wE=1;var t=tQ(),e=eQ(),r=kE();function n(i){var a=e(i);return a.length==1&&a[0][2]?r(a[0][0],a[0][1]):function(s){return s===i||t(s,i,a)}}return Tm=n,Tm}var Em,TE;function rl(){if(TE)return Em;TE=1;var t=Ps,e=Fi(),r="[object Symbol]";function n(i){return typeof i=="symbol"||e(i)&&t(i)==r}return Em=n,Em}var Cm,EE;function Sm(){if(EE)return Cm;EE=1;var t=gr(),e=rl(),r=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,n=/^\w*$/;function i(a,s){if(t(a))return!1;var o=typeof a;return o=="number"||o=="symbol"||o=="boolean"||a==null||e(a)?!0:n.test(a)||!r.test(a)||s!=null&&a in Object(s)}return Cm=i,Cm}var Am,CE;function nQ(){if(CE)return Am;CE=1;var t=Hf,e=500;function r(n){var i=t(n,function(s){return a.size===e&&a.clear(),s}),a=i.cache;return i}return Am=r,Am}var Mm,SE;function iQ(){if(SE)return Mm;SE=1;var t=nQ(),e=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,r=/\\(\\)?/g,n=t(function(i){var a=[];return i.charCodeAt(0)===46&&a.push(""),i.replace(e,function(s,o,l,u){a.push(l?u.replace(r,"$1"):o||s)}),a});return Mm=n,Mm}var Lm,AE;function R1(){if(AE)return Lm;AE=1;function t(e,r){for(var n=-1,i=e==null?0:e.length,a=Array(i);++n<i;)a[n]=r(e[n],n,e);return a}return Lm=t,Lm}var Rm,ME;function aQ(){if(ME)return Rm;ME=1;var t=zo,e=R1(),r=gr(),n=rl(),i=1/0,a=t?t.prototype:void 0,s=a?a.toString:void 0;function o(l){if(typeof l=="string")return l;if(r(l))return e(l,o)+"";if(n(l))return s?s.call(l):"";var u=l+"";return u=="0"&&1/l==-i?"-0":u}return Rm=o,Rm}var Im,LE;function RE(){if(LE)return Im;LE=1;var t=aQ();function e(r){return r==null?"":t(r)}return Im=e,Im}var Nm,IE;function I1(){if(IE)return Nm;IE=1;var t=gr(),e=Sm(),r=iQ(),n=RE();function i(a,s){return t(a)?a:e(a,s)?[a]:r(n(a))}return Nm=i,Nm}var Bm,NE;function jc(){if(NE)return Bm;NE=1;var t=rl(),e=1/0;function r(n){if(typeof n=="string"||t(n))return n;var i=n+"";return i=="0"&&1/n==-e?"-0":i}return Bm=r,Bm}var Dm,BE;function N1(){if(BE)return Dm;BE=1;var t=I1(),e=jc();function r(n,i){i=t(i,n);for(var a=0,s=i.length;n!=null&&a<s;)n=n[e(i[a++])];return a&&a==s?n:void 0}return Dm=r,Dm}var Om,DE;function sQ(){if(DE)return Om;DE=1;var t=N1();function e(r,n,i){var a=r==null?void 0:t(r,n);return a===void 0?i:a}return Om=e,Om}var Fm,OE;function oQ(){if(OE)return Fm;OE=1;function t(e,r){return e!=null&&r in Object(e)}return Fm=t,Fm}var Pm,FE;function PE(){if(FE)return Pm;FE=1;var t=I1(),e=Hc(),r=gr(),n=T1(),i=Gg(),a=jc();function s(o,l,u){l=t(l,o);for(var h=-1,d=l.length,f=!1;++h<d;){var p=a(l[h]);if(!(f=o!=null&&u(o,p)))break;o=o[p]}return f||++h!=d?f:(d=o==null?0:o.length,!!d&&i(d)&&n(p,d)&&(r(o)||e(o)))}return Pm=s,Pm}var qm,qE;function VE(){if(qE)return qm;qE=1;var t=oQ(),e=PE();function r(n,i){return n!=null&&e(n,i,t)}return qm=r,qm}var Vm,zE;function lQ(){if(zE)return Vm;zE=1;var t=yE(),e=sQ(),r=VE(),n=Sm(),i=_E(),a=kE(),s=jc(),o=1,l=2;function u(h,d){return n(h)&&i(d)?a(s(h),d):function(f){var p=e(f,h);return p===void 0&&p===d?r(f,h):t(d,p,o|l)}}return Vm=u,Vm}var zm,YE;function UE(){if(YE)return zm;YE=1;function t(e){return function(r){return r==null?void 0:r[e]}}return zm=t,zm}var Ym,WE;function cQ(){if(WE)return Ym;WE=1;var t=N1();function e(r){return function(n){return t(n,r)}}return Ym=e,Ym}var Um,HE;function uQ(){if(HE)return Um;HE=1;var t=UE(),e=cQ(),r=Sm(),n=jc();function i(a){return r(a)?t(n(a)):e(a)}return Um=i,Um}var Wm,GE;function la(){if(GE)return Wm;GE=1;var t=rQ(),e=lQ(),r=Hs(),n=gr(),i=uQ();function a(s){return typeof s=="function"?s:s==null?r:typeof s=="object"?n(s)?e(s[0],s[1]):t(s):i(s)}return Wm=a,Wm}var Hm,jE;function $E(){if(jE)return Hm;jE=1;var t=tT(),e=GZ(),r=la(),n=gr();function i(a,s){var o=n(a)?t:e;return o(a,r(s,3))}return Hm=i,Hm}var Gm,XE;function hQ(){if(XE)return Gm;XE=1;var t=Object.prototype,e=t.hasOwnProperty;function r(n,i){return n!=null&&e.call(n,i)}return Gm=r,Gm}var jm,KE;function $m(){if(KE)return jm;KE=1;var t=hQ(),e=PE();function r(n,i){return n!=null&&e(n,i,t)}return jm=r,jm}var Xm,ZE;function fQ(){if(ZE)return Xm;ZE=1;var t=ry(),e=el(),r=Hc(),n=gr(),i=oa(),a=tl(),s=S1(),o=Gc(),l="[object Map]",u="[object Set]",h=Object.prototype,d=h.hasOwnProperty;function f(p){if(p==null)return!0;if(i(p)&&(n(p)||typeof p=="string"||typeof p.splice=="function"||a(p)||o(p)||r(p)))return!p.length;var m=e(p);if(m==l||m==u)return!p.size;if(s(p))return!t(p).length;for(var _ in p)if(d.call(p,_))return!1;return!0}return Xm=f,Xm}var Km,QE;function JE(){if(QE)return Km;QE=1;function t(e){return e===void 0}return Km=t,Km}var Zm,tC;function eC(){if(tC)return Zm;tC=1;var t=L1(),e=oa();function r(n,i){var a=-1,s=e(n)?Array(n.length):[];return t(n,function(o,l,u){s[++a]=i(o,l,u)}),s}return Zm=r,Zm}var Qm,rC;function nC(){if(rC)return Qm;rC=1;var t=R1(),e=la(),r=eC(),n=gr();function i(a,s){var o=n(a)?t:r;return o(a,e(s,3))}return Qm=i,Qm}var Jm,iC;function dQ(){if(iC)return Jm;iC=1;function t(e,r,n,i){var a=-1,s=e==null?0:e.length;for(i&&s&&(n=e[++a]);++a<s;)n=r(n,e[a],a,e);return n}return Jm=t,Jm}var tb,aC;function pQ(){if(aC)return tb;aC=1;function t(e,r,n,i,a){return a(e,function(s,o,l){n=i?(i=!1,s):r(n,s,o,l)}),n}return tb=t,tb}var eb,sC;function oC(){if(sC)return eb;sC=1;var t=dQ(),e=L1(),r=la(),n=pQ(),i=gr();function a(s,o,l){var u=i(s)?t:n,h=arguments.length<3;return u(s,r(o,4),l,h,e)}return eb=a,eb}var rb,lC;function gQ(){if(lC)return rb;lC=1;var t=Ps,e=gr(),r=Fi(),n="[object String]";function i(a){return typeof a=="string"||!e(a)&&r(a)&&t(a)==n}return rb=i,rb}var nb,cC;function yQ(){if(cC)return nb;cC=1;var t=UE(),e=t("length");return nb=e,nb}var ib,uC;function mQ(){if(uC)return ib;uC=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=e+r+n,a="\\ufe0e\\ufe0f",s="\\u200d",o=RegExp("["+s+t+i+a+"]");function l(u){return o.test(u)}return ib=l,ib}var ab,hC;function bQ(){if(hC)return ab;hC=1;var t="\\ud800-\\udfff",e="\\u0300-\\u036f",r="\\ufe20-\\ufe2f",n="\\u20d0-\\u20ff",i=e+r+n,a="\\ufe0e\\ufe0f",s="["+t+"]",o="["+i+"]",l="\\ud83c[\\udffb-\\udfff]",u="(?:"+o+"|"+l+")",h="[^"+t+"]",d="(?:\\ud83c[\\udde6-\\uddff]){2}",f="[\\ud800-\\udbff][\\udc00-\\udfff]",p="\\u200d",m=u+"?",_="["+a+"]?",y="(?:"+p+"(?:"+[h,d,f].join("|")+")"+_+m+")*",b=_+m+y,x="(?:"+[h+o+"?",o,d,f,s].join("|")+")",k=RegExp(l+"(?="+l+")|"+x+b,"g");function T(C){for(var M=k.lastIndex=0;k.test(C);)++M;return M}return ab=T,ab}var sb,fC;function _Q(){if(fC)return sb;fC=1;var t=yQ(),e=mQ(),r=bQ();function n(i){return e(i)?r(i):t(i)}return sb=n,sb}var ob,dC;function vQ(){if(dC)return ob;dC=1;var t=ry(),e=el(),r=oa(),n=gQ(),i=_Q(),a="[object Map]",s="[object Set]";function o(l){if(l==null)return 0;if(r(l))return n(l)?i(l):l.length;var u=e(l);return u==a||u==s?l.size:t(l).length}return ob=o,ob}var lb,pC;function xQ(){if(pC)return lb;pC=1;var t=Ng(),e=IT(),r=Jy(),n=la(),i=M1(),a=gr(),s=tl(),o=Yo,l=Vn,u=Gc();function h(d,f,p){var m=a(d),_=m||s(d)||u(d);if(f=n(f,4),p==null){var y=d&&d.constructor;_?p=m?new y:[]:l(d)?p=o(y)?e(i(d)):{}:p={}}return(_?t:r)(d,function(b,x,k){return f(p,b,x,k)}),p}return lb=h,lb}var cb,gC;function kQ(){if(gC)return cb;gC=1;var t=zo,e=Hc(),r=gr(),n=t?t.isConcatSpreadable:void 0;function i(a){return r(a)||e(a)||!!(n&&a&&a[n])}return cb=i,cb}var ub,yC;function hb(){if(yC)return ub;yC=1;var t=my(),e=kQ();function r(n,i,a,s,o){var l=-1,u=n.length;for(a||(a=e),o||(o=[]);++l<u;){var h=n[l];i>0&&a(h)?i>1?r(h,i-1,a,s,o):t(o,h):s||(o[o.length]=h)}return o}return ub=r,ub}var fb,mC;function wQ(){if(mC)return fb;mC=1;function t(e,r,n){switch(n.length){case 0:return e.call(r);case 1:return e.call(r,n[0]);case 2:return e.call(r,n[0],n[1]);case 3:return e.call(r,n[0],n[1],n[2])}return e.apply(r,n)}return fb=t,fb}var db,bC;function _C(){if(bC)return db;bC=1;var t=wQ(),e=Math.max;function r(n,i,a){return i=e(i===void 0?n.length-1:i,0),function(){for(var s=arguments,o=-1,l=e(s.length-i,0),u=Array(l);++o<l;)u[o]=s[i+o];o=-1;for(var h=Array(i+1);++o<i;)h[o]=s[o];return h[i]=a(u),t(n,this,h)}}return db=r,db}var pb,vC;function TQ(){if(vC)return pb;vC=1;var t=jy(),e=b9(),r=Hs(),n=e?function(i,a){return e(i,"toString",{configurable:!0,enumerable:!1,value:t(a),writable:!0})}:r;return pb=n,pb}var gb,xC;function EQ(){if(xC)return gb;xC=1;var t=800,e=16,r=Date.now;function n(i){var a=0,s=0;return function(){var o=r(),l=e-(o-s);if(s=o,l>0){if(++a>=t)return arguments[0]}else a=0;return i.apply(void 0,arguments)}}return gb=n,gb}var yb,kC;function wC(){if(kC)return yb;kC=1;var t=TQ(),e=EQ(),r=e(t);return yb=r,yb}var mb,TC;function B1(){if(TC)return mb;TC=1;var t=Hs(),e=_C(),r=wC();function n(i,a){return r(e(i,a,t),i+"")}return mb=n,mb}var bb,EC;function CC(){if(EC)return bb;EC=1;function t(e,r,n,i){for(var a=e.length,s=n+(i?1:-1);i?s--:++s<a;)if(r(e[s],s,e))return s;return-1}return bb=t,bb}var _b,SC;function CQ(){if(SC)return _b;SC=1;function t(e){return e!==e}return _b=t,_b}var vb,AC;function SQ(){if(AC)return vb;AC=1;function t(e,r,n){for(var i=n-1,a=e.length;++i<a;)if(e[i]===r)return i;return-1}return vb=t,vb}var xb,MC;function AQ(){if(MC)return xb;MC=1;var t=CC(),e=CQ(),r=SQ();function n(i,a,s){return a===a?r(i,a,s):t(i,e,s)}return xb=n,xb}var kb,LC;function MQ(){if(LC)return kb;LC=1;var t=AQ();function e(r,n){var i=r==null?0:r.length;return!!i&&t(r,n,0)>-1}return kb=e,kb}var wb,RC;function LQ(){if(RC)return wb;RC=1;function t(e,r,n){for(var i=-1,a=e==null?0:e.length;++i<a;)if(n(r,e[i]))return!0;return!1}return wb=t,wb}var Tb,IC;function RQ(){if(IC)return Tb;IC=1;function t(){}return Tb=t,Tb}var Eb,NC;function IQ(){if(NC)return Eb;NC=1;var t=bT(),e=RQ(),r=gm(),n=1/0,i=t&&1/r(new t([,-0]))[1]==n?function(a){return new t(a)}:e;return Eb=i,Eb}var Cb,BC;function NQ(){if(BC)return Cb;BC=1;var t=iE(),e=MQ(),r=LQ(),n=oE(),i=IQ(),a=gm(),s=200;function o(l,u,h){var d=-1,f=e,p=l.length,m=!0,_=[],y=_;if(h)m=!1,f=r;else if(p>=s){var b=u?null:i(l);if(b)return a(b);m=!1,f=n,y=new t}else y=u?[]:_;t:for(;++d<p;){var x=l[d],k=u?u(x):x;if(x=h||x!==0?x:0,m&&k===k){for(var T=y.length;T--;)if(y[T]===k)continue t;u&&y.push(k),_.push(x)}else f(y,k,h)||(y!==_&&y.push(k),_.push(x))}return _}return Cb=o,Cb}var Sb,DC;function OC(){if(DC)return Sb;DC=1;var t=oa(),e=Fi();function r(n){return e(n)&&t(n)}return Sb=r,Sb}var Ab,FC;function BQ(){if(FC)return Ab;FC=1;var t=hb(),e=B1(),r=NQ(),n=OC(),i=e(function(a){return r(t(a,1,n,!0))});return Ab=i,Ab}var Mb,PC;function DQ(){if(PC)return Mb;PC=1;var t=R1();function e(r,n){return t(n,function(i){return r[i]})}return Mb=e,Mb}var Lb,qC;function VC(){if(qC)return Lb;qC=1;var t=DQ(),e=ts();function r(n){return n==null?[]:t(n,e(n))}return Lb=r,Lb}var D1;if(typeof fn=="function")try{D1={clone:UZ(),constant:jy(),each:am(),filter:$E(),has:$m(),isArray:gr(),isEmpty:fQ(),isFunction:Yo,isUndefined:JE(),keys:ts(),map:nC(),reduce:oC(),size:vQ(),transform:xQ(),union:BQ(),values:VC()}}catch{}D1||(D1=window._);var Wn=D1,_e=Wn,Rb=Le,OQ="\0",Gs="\0",zC="";function Le(t){this._isDirected=_e.has(t,"directed")?t.directed:!0,this._isMultigraph=_e.has(t,"multigraph")?t.multigraph:!1,this._isCompound=_e.has(t,"compound")?t.compound:!1,this._label=void 0,this._defaultNodeLabelFn=_e.constant(void 0),this._defaultEdgeLabelFn=_e.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[Gs]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}Le.prototype._nodeCount=0,Le.prototype._edgeCount=0,Le.prototype.isDirected=function(){return this._isDirected},Le.prototype.isMultigraph=function(){return this._isMultigraph},Le.prototype.isCompound=function(){return this._isCompound},Le.prototype.setGraph=function(t){return this._label=t,this},Le.prototype.graph=function(){return this._label},Le.prototype.setDefaultNodeLabel=function(t){return _e.isFunction(t)||(t=_e.constant(t)),this._defaultNodeLabelFn=t,this},Le.prototype.nodeCount=function(){return this._nodeCount},Le.prototype.nodes=function(){return _e.keys(this._nodes)},Le.prototype.sources=function(){var t=this;return _e.filter(this.nodes(),function(e){return _e.isEmpty(t._in[e])})},Le.prototype.sinks=function(){var t=this;return _e.filter(this.nodes(),function(e){return _e.isEmpty(t._out[e])})},Le.prototype.setNodes=function(t,e){var r=arguments,n=this;return _e.each(t,function(i){r.length>1?n.setNode(i,e):n.setNode(i)}),this},Le.prototype.setNode=function(t,e){return _e.has(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]=Gs,this._children[t]={},this._children[Gs][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},Le.prototype.node=function(t){return this._nodes[t]},Le.prototype.hasNode=function(t){return _e.has(this._nodes,t)},Le.prototype.removeNode=function(t){var e=this;if(_e.has(this._nodes,t)){var r=function(n){e.removeEdge(e._edgeObjs[n])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],_e.each(this.children(t),function(n){e.setParent(n)}),delete this._children[t]),_e.each(_e.keys(this._in[t]),r),delete this._in[t],delete this._preds[t],_e.each(_e.keys(this._out[t]),r),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},Le.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(_e.isUndefined(e))e=Gs;else{e+="";for(var r=e;!_e.isUndefined(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},Le.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},Le.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if(e!==Gs)return e}},Le.prototype.children=function(t){if(_e.isUndefined(t)&&(t=Gs),this._isCompound){var e=this._children[t];if(e)return _e.keys(e)}else{if(t===Gs)return this.nodes();if(this.hasNode(t))return[]}},Le.prototype.predecessors=function(t){var e=this._preds[t];if(e)return _e.keys(e)},Le.prototype.successors=function(t){var e=this._sucs[t];if(e)return _e.keys(e)},Le.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return _e.union(e,this.successors(t))},Le.prototype.isLeaf=function(t){var e;return this.isDirected()?e=this.successors(t):e=this.neighbors(t),e.length===0},Le.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var r=this;_e.each(this._nodes,function(a,s){t(s)&&e.setNode(s,a)}),_e.each(this._edgeObjs,function(a){e.hasNode(a.v)&&e.hasNode(a.w)&&e.setEdge(a,r.edge(a))});var n={};function i(a){var s=r.parent(a);return s===void 0||e.hasNode(s)?(n[a]=s,s):s in n?n[s]:i(s)}return this._isCompound&&_e.each(e.nodes(),function(a){e.setParent(a,i(a))}),e},Le.prototype.setDefaultEdgeLabel=function(t){return _e.isFunction(t)||(t=_e.constant(t)),this._defaultEdgeLabelFn=t,this},Le.prototype.edgeCount=function(){return this._edgeCount},Le.prototype.edges=function(){return _e.values(this._edgeObjs)},Le.prototype.setPath=function(t,e){var r=this,n=arguments;return _e.reduce(t,function(i,a){return n.length>1?r.setEdge(i,a,e):r.setEdge(i,a),a}),this},Le.prototype.setEdge=function(){var t,e,r,n,i=!1,a=arguments[0];typeof a=="object"&&a!==null&&"v"in a?(t=a.v,e=a.w,r=a.name,arguments.length===2&&(n=arguments[1],i=!0)):(t=a,e=arguments[1],r=arguments[3],arguments.length>2&&(n=arguments[2],i=!0)),t=""+t,e=""+e,_e.isUndefined(r)||(r=""+r);var s=$c(this._isDirected,t,e,r);if(_e.has(this._edgeLabels,s))return i&&(this._edgeLabels[s]=n),this;if(!_e.isUndefined(r)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[s]=i?n:this._defaultEdgeLabelFn(t,e,r);var o=FQ(this._isDirected,t,e,r);return t=o.v,e=o.w,Object.freeze(o),this._edgeObjs[s]=o,YC(this._preds[e],t),YC(this._sucs[t],e),this._in[e][s]=o,this._out[t][s]=o,this._edgeCount++,this},Le.prototype.edge=function(t,e,r){var n=arguments.length===1?Ib(this._isDirected,arguments[0]):$c(this._isDirected,t,e,r);return this._edgeLabels[n]},Le.prototype.hasEdge=function(t,e,r){var n=arguments.length===1?Ib(this._isDirected,arguments[0]):$c(this._isDirected,t,e,r);return _e.has(this._edgeLabels,n)},Le.prototype.removeEdge=function(t,e,r){var n=arguments.length===1?Ib(this._isDirected,arguments[0]):$c(this._isDirected,t,e,r),i=this._edgeObjs[n];return i&&(t=i.v,e=i.w,delete this._edgeLabels[n],delete this._edgeObjs[n],UC(this._preds[e],t),UC(this._sucs[t],e),delete this._in[e][n],delete this._out[t][n],this._edgeCount--),this},Le.prototype.inEdges=function(t,e){var r=this._in[t];if(r){var n=_e.values(r);return e?_e.filter(n,function(i){return i.v===e}):n}},Le.prototype.outEdges=function(t,e){var r=this._out[t];if(r){var n=_e.values(r);return e?_e.filter(n,function(i){return i.w===e}):n}},Le.prototype.nodeEdges=function(t,e){var r=this.inEdges(t,e);if(r)return r.concat(this.outEdges(t,e))};function YC(t,e){t[e]?t[e]++:t[e]=1}function UC(t,e){--t[e]||delete t[e]}function $c(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var s=i;i=a,a=s}return i+zC+a+zC+(_e.isUndefined(n)?OQ:n)}function FQ(t,e,r,n){var i=""+e,a=""+r;if(!t&&i>a){var s=i;i=a,a=s}var o={v:i,w:a};return n&&(o.name=n),o}function Ib(t,e){return $c(t,e.v,e.w,e.name)}var PQ="2.1.8",qQ={Graph:Rb,version:PQ},Pi=Wn,VQ=Rb,zQ={write:YQ,read:HQ};function YQ(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:UQ(t),edges:WQ(t)};return Pi.isUndefined(t.graph())||(e.value=Pi.clone(t.graph())),e}function UQ(t){return Pi.map(t.nodes(),function(e){var r=t.node(e),n=t.parent(e),i={v:e};return Pi.isUndefined(r)||(i.value=r),Pi.isUndefined(n)||(i.parent=n),i})}function WQ(t){return Pi.map(t.edges(),function(e){var r=t.edge(e),n={v:e.v,w:e.w};return Pi.isUndefined(e.name)||(n.name=e.name),Pi.isUndefined(r)||(n.value=r),n})}function HQ(t){var e=new VQ(t.options).setGraph(t.value);return Pi.each(t.nodes,function(r){e.setNode(r.v,r.value),r.parent&&e.setParent(r.v,r.parent)}),Pi.each(t.edges,function(r){e.setEdge({v:r.v,w:r.w,name:r.name},r.value)}),e}var O1=Wn,GQ=jQ;function jQ(t){var e={},r=[],n;function i(a){O1.has(e,a)||(e[a]=!0,n.push(a),O1.each(t.successors(a),i),O1.each(t.predecessors(a),i))}return O1.each(t.nodes(),function(a){n=[],i(a),n.length&&r.push(n)}),r}var WC=Wn,HC=Hn;function Hn(){this._arr=[],this._keyIndices={}}Hn.prototype.size=function(){return this._arr.length},Hn.prototype.keys=function(){return this._arr.map(function(t){return t.key})},Hn.prototype.has=function(t){return WC.has(this._keyIndices,t)},Hn.prototype.priority=function(t){var e=this._keyIndices[t];if(e!==void 0)return this._arr[e].priority},Hn.prototype.min=function(){if(this.size()===0)throw new Error("Queue underflow");return this._arr[0].key},Hn.prototype.add=function(t,e){var r=this._keyIndices;if(t=String(t),!WC.has(r,t)){var n=this._arr,i=n.length;return r[t]=i,n.push({key:t,priority:e}),this._decrease(i),!0}return!1},Hn.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},Hn.prototype.decrease=function(t,e){var r=this._keyIndices[t];if(e>this._arr[r].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[r].priority+" New: "+e);this._arr[r].priority=e,this._decrease(r)},Hn.prototype._heapify=function(t){var e=this._arr,r=2*t,n=r+1,i=t;r<e.length&&(i=e[r].priority<e[i].priority?r:i,n<e.length&&(i=e[n].priority<e[i].priority?n:i),i!==t&&(this._swap(t,i),this._heapify(i)))},Hn.prototype._decrease=function(t){for(var e=this._arr,r=e[t].priority,n;t!==0&&(n=t>>1,!(e[n].priority<r));)this._swap(t,n),t=n},Hn.prototype._swap=function(t,e){var r=this._arr,n=this._keyIndices,i=r[t],a=r[e];r[t]=a,r[e]=i,n[a.key]=t,n[i.key]=e};var $Q=Wn,XQ=HC,GC=ZQ,KQ=$Q.constant(1);function ZQ(t,e,r,n){return QQ(t,String(e),r||KQ,n||function(i){return t.outEdges(i)})}function QQ(t,e,r,n){var i={},a=new XQ,s,o,l=function(u){var h=u.v!==s?u.v:u.w,d=i[h],f=r(u),p=o.distance+f;if(f<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+u+" Weight: "+f);p<d.distance&&(d.distance=p,d.predecessor=s,a.decrease(h,p))};for(t.nodes().forEach(function(u){var h=u===e?0:Number.POSITIVE_INFINITY;i[u]={distance:h},a.add(u,h)});a.size()>0&&(s=a.removeMin(),o=i[s],o.distance!==Number.POSITIVE_INFINITY);)n(s).forEach(l);return i}var JQ=GC,tJ=Wn,eJ=rJ;function rJ(t,e,r){return tJ.transform(t.nodes(),function(n,i){n[i]=JQ(t,i,e,r)},{})}var jC=Wn,$C=nJ;function nJ(t){var e=0,r=[],n={},i=[];function a(s){var o=n[s]={onStack:!0,lowlink:e,index:e++};if(r.push(s),t.successors(s).forEach(function(h){jC.has(n,h)?n[h].onStack&&(o.lowlink=Math.min(o.lowlink,n[h].index)):(a(h),o.lowlink=Math.min(o.lowlink,n[h].lowlink))}),o.lowlink===o.index){var l=[],u;do u=r.pop(),n[u].onStack=!1,l.push(u);while(s!==u);i.push(l)}}return t.nodes().forEach(function(s){jC.has(n,s)||a(s)}),i}var iJ=Wn,aJ=$C,sJ=oJ;function oJ(t){return iJ.filter(aJ(t),function(e){return e.length>1||e.length===1&&t.hasEdge(e[0],e[0])})}var lJ=Wn,cJ=hJ,uJ=lJ.constant(1);function hJ(t,e,r){return fJ(t,e||uJ,r||function(n){return t.outEdges(n)})}function fJ(t,e,r){var n={},i=t.nodes();return i.forEach(function(a){n[a]={},n[a][a]={distance:0},i.forEach(function(s){a!==s&&(n[a][s]={distance:Number.POSITIVE_INFINITY})}),r(a).forEach(function(s){var o=s.v===a?s.w:s.v,l=e(s);n[a][o]={distance:l,predecessor:a}})}),i.forEach(function(a){var s=n[a];i.forEach(function(o){var l=n[o];i.forEach(function(u){var h=l[a],d=s[u],f=l[u],p=h.distance+d.distance;p<f.distance&&(f.distance=p,f.predecessor=d.predecessor)})})}),n}var Xc=Wn,XC=KC;KC.CycleException=F1;function KC(t){var e={},r={},n=[];function i(a){if(Xc.has(r,a))throw new F1;Xc.has(e,a)||(r[a]=!0,e[a]=!0,Xc.each(t.predecessors(a),i),delete r[a],n.push(a))}if(Xc.each(t.sinks(),i),Xc.size(e)!==t.nodeCount())throw new F1;return n}function F1(){}F1.prototype=new Error;var ZC=XC,dJ=pJ;function pJ(t){try{ZC(t)}catch(e){if(e instanceof ZC.CycleException)return!1;throw e}return!0}var P1=Wn,QC=gJ;function gJ(t,e,r){P1.isArray(e)||(e=[e]);var n=(t.isDirected()?t.successors:t.neighbors).bind(t),i=[],a={};return P1.each(e,function(s){if(!t.hasNode(s))throw new Error("Graph does not have node: "+s);JC(t,s,r==="post",a,n,i)}),i}function JC(t,e,r,n,i,a){P1.has(n,e)||(n[e]=!0,r||a.push(e),P1.each(i(e),function(s){JC(t,s,r,n,i,a)}),r&&a.push(e))}var yJ=QC,mJ=bJ;function bJ(t,e){return yJ(t,e,"post")}var _J=QC,vJ=xJ;function xJ(t,e){return _J(t,e,"pre")}var tS=Wn,kJ=Rb,wJ=HC,TJ=EJ;function EJ(t,e){var r=new kJ,n={},i=new wJ,a;function s(l){var u=l.v===a?l.w:l.v,h=i.priority(u);if(h!==void 0){var d=e(l);d<h&&(n[u]=a,i.decrease(u,d))}}if(t.nodeCount()===0)return r;tS.each(t.nodes(),function(l){i.add(l,Number.POSITIVE_INFINITY),r.setNode(l)}),i.decrease(t.nodes()[0],0);for(var o=!1;i.size()>0;){if(a=i.removeMin(),tS.has(n,a))r.setEdge(a,n[a]);else{if(o)throw new Error("Input graph is not connected: "+t);o=!0}t.nodeEdges(a).forEach(s)}return r}var CJ={components:GQ,dijkstra:GC,dijkstraAll:eJ,findCycles:sJ,floydWarshall:cJ,isAcyclic:dJ,postorder:mJ,preorder:vJ,prim:TJ,tarjan:$C,topsort:XC},eS=qQ,cr={Graph:eS.Graph,json:zQ,alg:CJ,version:eS.version},Nb,rS;function yi(){if(rS)return Nb;rS=1;var t;if(typeof fn=="function")try{t=cr}catch{}return t||(t=window.graphlib),Nb=t,Nb}var Bb,nS;function SJ(){if(nS)return Bb;nS=1;var t=VT(),e=1,r=4;function n(i){return t(i,e|r)}return Bb=n,Bb}var Db,iS;function q1(){if(iS)return Db;iS=1;var t=Wo,e=oa(),r=T1(),n=Vn;function i(a,s,o){if(!n(o))return!1;var l=typeof s;return(l=="number"?e(o)&&r(s,o.length):l=="string"&&s in o)?t(o[s],a):!1}return Db=i,Db}var Ob,aS;function sS(){if(aS)return Ob;aS=1;var t=B1(),e=Wo,r=q1(),n=Ws(),i=Object.prototype,a=i.hasOwnProperty,s=t(function(o,l){o=Object(o);var u=-1,h=l.length,d=h>2?l[2]:void 0;for(d&&r(l[0],l[1],d)&&(h=1);++u<h;)for(var f=l[u],p=n(f),m=-1,_=p.length;++m<_;){var y=p[m],b=o[y];(b===void 0||e(b,i[y])&&!a.call(o,y))&&(o[y]=f[y])}return o});return Ob=s,Ob}var Fb,oS;function AJ(){if(oS)return Fb;oS=1;var t=la(),e=oa(),r=ts();function n(i){return function(a,s,o){var l=Object(a);if(!e(a)){var u=t(s,3);a=r(a),s=function(d){return u(l[d],d,l)}}var h=i(a,s,o);return h>-1?l[u?a[h]:h]:void 0}}return Fb=n,Fb}var Pb,lS;function MJ(){if(lS)return Pb;lS=1;var t=/\s/;function e(r){for(var n=r.length;n--&&t.test(r.charAt(n)););return n}return Pb=e,Pb}var qb,cS;function LJ(){if(cS)return qb;cS=1;var t=MJ(),e=/^\s+/;function r(n){return n&&n.slice(0,t(n)+1).replace(e,"")}return qb=r,qb}var Vb,uS;function RJ(){if(uS)return Vb;uS=1;var t=LJ(),e=Vn,r=rl(),n=0/0,i=/^[-+]0x[0-9a-f]+$/i,a=/^0b[01]+$/i,s=/^0o[0-7]+$/i,o=parseInt;function l(u){if(typeof u=="number")return u;if(r(u))return n;if(e(u)){var h=typeof u.valueOf=="function"?u.valueOf():u;u=e(h)?h+"":h}if(typeof u!="string")return u===0?u:+u;u=t(u);var d=a.test(u);return d||s.test(u)?o(u.slice(2),d?2:8):i.test(u)?n:+u}return Vb=l,Vb}var zb,hS;function fS(){if(hS)return zb;hS=1;var t=RJ(),e=1/0,r=17976931348623157e292;function n(i){if(!i)return i===0?i:0;if(i=t(i),i===e||i===-e){var a=i<0?-1:1;return a*r}return i===i?i:0}return zb=n,zb}var Yb,dS;function IJ(){if(dS)return Yb;dS=1;var t=fS();function e(r){var n=t(r),i=n%1;return n===n?i?n-i:n:0}return Yb=e,Yb}var Ub,pS;function NJ(){if(pS)return Ub;pS=1;var t=CC(),e=la(),r=IJ(),n=Math.max;function i(a,s,o){var l=a==null?0:a.length;if(!l)return-1;var u=o==null?0:r(o);return u<0&&(u=n(l+u,0)),t(a,e(s,3),u)}return Ub=i,Ub}var Wb,gS;function BJ(){if(gS)return Wb;gS=1;var t=AJ(),e=NJ(),r=t(e);return Wb=r,Wb}var Hb,yS;function mS(){if(yS)return Hb;yS=1;var t=hb();function e(r){var n=r==null?0:r.length;return n?t(r,1):[]}return Hb=e,Hb}var Gb,bS;function DJ(){if(bS)return Gb;bS=1;var t=Zy(),e=KT(),r=Ws();function n(i,a){return i==null?i:t(i,e(a),r)}return Gb=n,Gb}var jb,_S;function OJ(){if(_S)return jb;_S=1;function t(e){var r=e==null?0:e.length;return r?e[r-1]:void 0}return jb=t,jb}var $b,vS;function FJ(){if(vS)return $b;vS=1;var t=x1(),e=Jy(),r=la();function n(i,a){var s={};return a=r(a,3),e(i,function(o,l,u){t(s,l,a(o,l,u))}),s}return $b=n,$b}var Xb,xS;function Kb(){if(xS)return Xb;xS=1;var t=rl();function e(r,n,i){for(var a=-1,s=r.length;++a<s;){var o=r[a],l=n(o);if(l!=null&&(u===void 0?l===l&&!t(l):i(l,u)))var u=l,h=o}return h}return Xb=e,Xb}var Zb,kS;function PJ(){if(kS)return Zb;kS=1;function t(e,r){return e>r}return Zb=t,Zb}var Qb,wS;function qJ(){if(wS)return Qb;wS=1;var t=Kb(),e=PJ(),r=Hs();function n(i){return i&&i.length?t(i,r,e):void 0}return Qb=n,Qb}var Jb,TS;function ES(){if(TS)return Jb;TS=1;var t=x1(),e=Wo;function r(n,i,a){(a!==void 0&&!e(n[i],a)||a===void 0&&!(i in n))&&t(n,i,a)}return Jb=r,Jb}var t3,CS;function SS(){if(CS)return t3;CS=1;var t=Ps,e=M1(),r=Fi(),n="[object Object]",i=Function.prototype,a=Object.prototype,s=i.toString,o=a.hasOwnProperty,l=s.call(Object);function u(h){if(!r(h)||t(h)!=n)return!1;var d=e(h);if(d===null)return!0;var f=o.call(d,"constructor")&&d.constructor;return typeof f=="function"&&f instanceof f&&s.call(f)==l}return t3=u,t3}var e3,AS;function MS(){if(AS)return e3;AS=1;function t(e,r){if(!(r==="constructor"&&typeof e[r]=="function")&&r!="__proto__")return e[r]}return e3=t,e3}var r3,LS;function VJ(){if(LS)return r3;LS=1;var t=Wc(),e=Ws();function r(n){return t(n,e(n))}return r3=r,r3}var n3,RS;function zJ(){if(RS)return n3;RS=1;var t=ES(),e=K9(),r=MT(),n=Q9(),i=BT(),a=Hc(),s=gr(),o=OC(),l=tl(),u=Yo,h=Vn,d=SS(),f=Gc(),p=MS(),m=VJ();function _(y,b,x,k,T,C,M){var S=p(y,x),R=p(b,x),A=M.get(R);if(A){t(y,x,A);return}var L=C?C(S,R,x+"",y,b,M):void 0,v=L===void 0;if(v){var B=s(R),w=!B&&l(R),D=!B&&!w&&f(R);L=R,B||w||D?s(S)?L=S:o(S)?L=n(S):w?(v=!1,L=e(R,!0)):D?(v=!1,L=r(R,!0)):L=[]:d(R)||a(R)?(L=S,a(S)?L=m(S):(!h(S)||u(S))&&(L=i(R))):v=!1}v&&(M.set(R,L),T(L,R,k,C,M),M.delete(R)),t(y,x,L)}return n3=_,n3}var i3,IS;function YJ(){if(IS)return i3;IS=1;var t=v1(),e=ES(),r=Zy(),n=zJ(),i=Vn,a=Ws(),s=MS();function o(l,u,h,d,f){l!==u&&r(u,function(p,m){if(f||(f=new t),i(p))n(l,u,m,h,o,d,f);else{var _=d?d(s(l,m),p,m+"",l,u,f):void 0;_===void 0&&(_=p),e(l,m,_)}},a)}return i3=o,i3}var a3,NS;function UJ(){if(NS)return a3;NS=1;var t=B1(),e=q1();function r(n){return t(function(i,a){var s=-1,o=a.length,l=o>1?a[o-1]:void 0,u=o>2?a[2]:void 0;for(l=n.length>3&&typeof l=="function"?(o--,l):void 0,u&&e(a[0],a[1],u)&&(l=o<3?void 0:l,o=1),i=Object(i);++s<o;){var h=a[s];h&&n(i,h,s,l)}return i})}return a3=r,a3}var s3,BS;function WJ(){if(BS)return s3;BS=1;var t=YJ(),e=UJ(),r=e(function(n,i,a){t(n,i,a)});return s3=r,s3}var o3,DS;function OS(){if(DS)return o3;DS=1;function t(e,r){return e<r}return o3=t,o3}var l3,FS;function HJ(){if(FS)return l3;FS=1;var t=Kb(),e=OS(),r=Hs();function n(i){return i&&i.length?t(i,r,e):void 0}return l3=n,l3}var c3,PS;function GJ(){if(PS)return c3;PS=1;var t=Kb(),e=la(),r=OS();function n(i,a){return i&&i.length?t(i,e(a,2),r):void 0}return c3=n,c3}var u3,qS;function jJ(){if(qS)return u3;qS=1;var t=si,e=function(){return t.Date.now()};return u3=e,u3}var h3,VS;function $J(){if(VS)return h3;VS=1;var t=k1(),e=I1(),r=T1(),n=Vn,i=jc();function a(s,o,l,u){if(!n(s))return s;o=e(o,s);for(var h=-1,d=o.length,f=d-1,p=s;p!=null&&++h<d;){var m=i(o[h]),_=l;if(m==="__proto__"||m==="constructor"||m==="prototype")return s;if(h!=f){var y=p[m];_=u?u(y,m,p):void 0,_===void 0&&(_=n(y)?y:r(o[h+1])?[]:{})}t(p,m,_),p=p[m]}return s}return h3=a,h3}var f3,zS;function XJ(){if(zS)return f3;zS=1;var t=N1(),e=$J(),r=I1();function n(i,a,s){for(var o=-1,l=a.length,u={};++o<l;){var h=a[o],d=t(i,h);s(d,h)&&e(u,r(h,i),d)}return u}return f3=n,f3}var d3,YS;function KJ(){if(YS)return d3;YS=1;var t=XJ(),e=VE();function r(n,i){return t(n,i,function(a,s){return e(n,s)})}return d3=r,d3}var p3,US;function ZJ(){if(US)return p3;US=1;var t=mS(),e=_C(),r=wC();function n(i){return r(e(i,void 0,t),i+"")}return p3=n,p3}var g3,WS;function HS(){if(WS)return g3;WS=1;var t=KJ(),e=ZJ(),r=e(function(n,i){return n==null?{}:t(n,i)});return g3=r,g3}var y3,GS;function QJ(){if(GS)return y3;GS=1;var t=Math.ceil,e=Math.max;function r(n,i,a,s){for(var o=-1,l=e(t((i-n)/(a||1)),0),u=Array(l);l--;)u[s?l:++o]=n,n+=a;return u}return y3=r,y3}var m3,jS;function JJ(){if(jS)return m3;jS=1;var t=QJ(),e=q1(),r=fS();function n(i){return function(a,s,o){return o&&typeof o!="number"&&e(a,s,o)&&(s=o=void 0),a=r(a),s===void 0?(s=a,a=0):s=r(s),o=o===void 0?a<s?1:-1:r(o),t(a,s,o,i)}}return m3=n,m3}var b3,$S;function XS(){if($S)return b3;$S=1;var t=JJ(),e=t();return b3=e,b3}var _3,KS;function ttt(){if(KS)return _3;KS=1;function t(e,r){var n=e.length;for(e.sort(r);n--;)e[n]=e[n].value;return e}return _3=t,_3}var v3,ZS;function ett(){if(ZS)return v3;ZS=1;var t=rl();function e(r,n){if(r!==n){var i=r!==void 0,a=r===null,s=r===r,o=t(r),l=n!==void 0,u=n===null,h=n===n,d=t(n);if(!u&&!d&&!o&&r>n||o&&l&&h&&!u&&!d||a&&l&&h||!i&&h||!s)return 1;if(!a&&!o&&!d&&r<n||d&&i&&s&&!a&&!o||u&&i&&s||!l&&s||!h)return-1}return 0}return v3=e,v3}var x3,QS;function rtt(){if(QS)return x3;QS=1;var t=ett();function e(r,n,i){for(var a=-1,s=r.criteria,o=n.criteria,l=s.length,u=i.length;++a<l;){var h=t(s[a],o[a]);if(h){if(a>=u)return h;var d=i[a];return h*(d=="desc"?-1:1)}}return r.index-n.index}return x3=e,x3}var k3,JS;function ntt(){if(JS)return k3;JS=1;var t=R1(),e=N1(),r=la(),n=eC(),i=ttt(),a=E1(),s=rtt(),o=Hs(),l=gr();function u(h,d,f){d.length?d=t(d,function(_){return l(_)?function(y){return e(y,_.length===1?_[0]:_)}:_}):d=[o];var p=-1;d=t(d,a(r));var m=n(h,function(_,y,b){var x=t(d,function(k){return k(_)});return{criteria:x,index:++p,value:_}});return i(m,function(_,y){return s(_,y,f)})}return k3=u,k3}var w3,tA;function itt(){if(tA)return w3;tA=1;var t=hb(),e=ntt(),r=B1(),n=q1(),i=r(function(a,s){if(a==null)return[];var o=s.length;return o>1&&n(a,s[0],s[1])?s=[]:o>2&&n(s[0],s[1],s[2])&&(s=[s[0]]),e(a,t(s,1),[])});return w3=i,w3}var T3,eA;function rA(){if(eA)return T3;eA=1;var t=RE(),e=0;function r(n){var i=++e;return t(n)+i}return T3=r,T3}var E3,nA;function att(){if(nA)return E3;nA=1;function t(e,r,n){for(var i=-1,a=e.length,s=r.length,o={};++i<a;){var l=i<s?r[i]:void 0;n(o,e[i],l)}return o}return E3=t,E3}var C3,iA;function stt(){if(iA)return C3;iA=1;var t=k1(),e=att();function r(n,i){return e(n||[],i||[],t)}return C3=r,C3}var S3,aA;function Xe(){if(aA)return S3;aA=1;var t;if(typeof fn=="function")try{t={cloneDeep:SJ(),constant:jy(),defaults:sS(),each:am(),filter:$E(),find:BJ(),flatten:mS(),forEach:QT(),forIn:DJ(),has:$m(),isUndefined:JE(),last:OJ(),map:nC(),mapValues:FJ(),max:qJ(),merge:WJ(),min:HJ(),minBy:GJ(),now:jJ(),pick:HS(),range:XS(),reduce:oC(),sortBy:itt(),uniqueId:rA(),values:VC(),zipObject:stt()}}catch{}return t||(t=window._),S3=t,S3}var A3,sA;function ott(){if(sA)return A3;sA=1,A3=t;function t(){var n={};n._next=n._prev=n,this._sentinel=n}t.prototype.dequeue=function(){var n=this._sentinel,i=n._prev;if(i!==n)return e(i),i},t.prototype.enqueue=function(n){var i=this._sentinel;n._prev&&n._next&&e(n),n._next=i._next,i._next._prev=n,i._next=n,n._prev=i},t.prototype.toString=function(){for(var n=[],i=this._sentinel,a=i._prev;a!==i;)n.push(JSON.stringify(a,r)),a=a._prev;return"["+n.join(", ")+"]"};function e(n){n._prev._next=n._next,n._next._prev=n._prev,delete n._next,delete n._prev}function r(n,i){if(n!=="_next"&&n!=="_prev")return i}return A3}var M3,oA;function ltt(){if(oA)return M3;oA=1;var t=Xe(),e=yi().Graph,r=ott();M3=i;var n=t.constant(1);function i(u,h){if(u.nodeCount()<=1)return[];var d=o(u,h||n),f=a(d.graph,d.buckets,d.zeroIdx);return t.flatten(t.map(f,function(p){return u.outEdges(p.v,p.w)}),!0)}function a(u,h,d){for(var f=[],p=h[h.length-1],m=h[0],_;u.nodeCount();){for(;_=m.dequeue();)s(u,h,d,_);for(;_=p.dequeue();)s(u,h,d,_);if(u.nodeCount()){for(var y=h.length-2;y>0;--y)if(_=h[y].dequeue(),_){f=f.concat(s(u,h,d,_,!0));break}}}return f}function s(u,h,d,f,p){var m=p?[]:void 0;return t.forEach(u.inEdges(f.v),function(_){var y=u.edge(_),b=u.node(_.v);p&&m.push({v:_.v,w:_.w}),b.out-=y,l(h,d,b)}),t.forEach(u.outEdges(f.v),function(_){var y=u.edge(_),b=_.w,x=u.node(b);x.in-=y,l(h,d,x)}),u.removeNode(f.v),m}function o(u,h){var d=new e,f=0,p=0;t.forEach(u.nodes(),function(y){d.setNode(y,{v:y,in:0,out:0})}),t.forEach(u.edges(),function(y){var b=d.edge(y.v,y.w)||0,x=h(y),k=b+x;d.setEdge(y.v,y.w,k),p=Math.max(p,d.node(y.v).out+=x),f=Math.max(f,d.node(y.w).in+=x)});var m=t.range(p+f+3).map(function(){return new r}),_=f+1;return t.forEach(d.nodes(),function(y){l(m,_,d.node(y))}),{graph:d,buckets:m,zeroIdx:_}}function l(u,h,d){d.out?d.in?u[d.out-d.in+h].enqueue(d):u[u.length-1].enqueue(d):u[0].enqueue(d)}return M3}var L3,lA;function ctt(){if(lA)return L3;lA=1;var t=Xe(),e=ltt();L3={run:r,undo:i};function r(a){var s=a.graph().acyclicer==="greedy"?e(a,o(a)):n(a);t.forEach(s,function(l){var u=a.edge(l);a.removeEdge(l),u.forwardName=l.name,u.reversed=!0,a.setEdge(l.w,l.v,u,t.uniqueId("rev"))});function o(l){return function(u){return l.edge(u).weight}}}function n(a){var s=[],o={},l={};function u(h){t.has(l,h)||(l[h]=!0,o[h]=!0,t.forEach(a.outEdges(h),function(d){t.has(o,d.w)?s.push(d):u(d.w)}),delete o[h])}return t.forEach(a.nodes(),u),s}function i(a){t.forEach(a.edges(),function(s){var o=a.edge(s);if(o.reversed){a.removeEdge(s);var l=o.forwardName;delete o.reversed,delete o.forwardName,a.setEdge(s.w,s.v,o,l)}})}return L3}var R3,cA;function vn(){if(cA)return R3;cA=1;var t=Xe(),e=yi().Graph;R3={addDummyNode:r,simplify:n,asNonCompoundGraph:i,successorWeights:a,predecessorWeights:s,intersectRect:o,buildLayerMatrix:l,normalizeRanks:u,removeEmptyRanks:h,addBorderNode:d,maxRank:f,partition:p,time:m,notime:_};function r(y,b,x,k){var T;do T=t.uniqueId(k);while(y.hasNode(T));return x.dummy=b,y.setNode(T,x),T}function n(y){var b=new e().setGraph(y.graph());return t.forEach(y.nodes(),function(x){b.setNode(x,y.node(x))}),t.forEach(y.edges(),function(x){var k=b.edge(x.v,x.w)||{weight:0,minlen:1},T=y.edge(x);b.setEdge(x.v,x.w,{weight:k.weight+T.weight,minlen:Math.max(k.minlen,T.minlen)})}),b}function i(y){var b=new e({multigraph:y.isMultigraph()}).setGraph(y.graph());return t.forEach(y.nodes(),function(x){y.children(x).length||b.setNode(x,y.node(x))}),t.forEach(y.edges(),function(x){b.setEdge(x,y.edge(x))}),b}function a(y){var b=t.map(y.nodes(),function(x){var k={};return t.forEach(y.outEdges(x),function(T){k[T.w]=(k[T.w]||0)+y.edge(T).weight}),k});return t.zipObject(y.nodes(),b)}function s(y){var b=t.map(y.nodes(),function(x){var k={};return t.forEach(y.inEdges(x),function(T){k[T.v]=(k[T.v]||0)+y.edge(T).weight}),k});return t.zipObject(y.nodes(),b)}function o(y,b){var x=y.x,k=y.y,T=b.x-x,C=b.y-k,M=y.width/2,S=y.height/2;if(!T&&!C)throw new Error("Not possible to find intersection inside of the rectangle");var R,A;return Math.abs(C)*M>Math.abs(T)*S?(C<0&&(S=-S),R=S*T/C,A=S):(T<0&&(M=-M),R=M,A=M*C/T),{x:x+R,y:k+A}}function l(y){var b=t.map(t.range(f(y)+1),function(){return[]});return t.forEach(y.nodes(),function(x){var k=y.node(x),T=k.rank;t.isUndefined(T)||(b[T][k.order]=x)}),b}function u(y){var b=t.min(t.map(y.nodes(),function(x){return y.node(x).rank}));t.forEach(y.nodes(),function(x){var k=y.node(x);t.has(k,"rank")&&(k.rank-=b)})}function h(y){var b=t.min(t.map(y.nodes(),function(C){return y.node(C).rank})),x=[];t.forEach(y.nodes(),function(C){var M=y.node(C).rank-b;x[M]||(x[M]=[]),x[M].push(C)});var k=0,T=y.graph().nodeRankFactor;t.forEach(x,function(C,M){t.isUndefined(C)&&M%T!==0?--k:k&&t.forEach(C,function(S){y.node(S).rank+=k})})}function d(y,b,x,k){var T={width:0,height:0};return arguments.length>=4&&(T.rank=x,T.order=k),r(y,"border",T,b)}function f(y){return t.max(t.map(y.nodes(),function(b){var x=y.node(b).rank;if(!t.isUndefined(x))return x}))}function p(y,b){var x={lhs:[],rhs:[]};return t.forEach(y,function(k){b(k)?x.lhs.push(k):x.rhs.push(k)}),x}function m(y,b){var x=t.now();try{return b()}finally{console.log(y+" time: "+(t.now()-x)+"ms")}}function _(y,b){return b()}return R3}var I3,uA;function utt(){if(uA)return I3;uA=1;var t=Xe(),e=vn();I3={run:r,undo:i};function r(a){a.graph().dummyChains=[],t.forEach(a.edges(),function(s){n(a,s)})}function n(a,s){var o=s.v,l=a.node(o).rank,u=s.w,h=a.node(u).rank,d=s.name,f=a.edge(s),p=f.labelRank;if(h!==l+1){a.removeEdge(s);var m,_,y;for(y=0,++l;l<h;++y,++l)f.points=[],_={width:0,height:0,edgeLabel:f,edgeObj:s,rank:l},m=e.addDummyNode(a,"edge",_,"_d"),l===p&&(_.width=f.width,_.height=f.height,_.dummy="edge-label",_.labelpos=f.labelpos),a.setEdge(o,m,{weight:f.weight},d),y===0&&a.graph().dummyChains.push(m),o=m;a.setEdge(o,u,{weight:f.weight},d)}}function i(a){t.forEach(a.graph().dummyChains,function(s){var o=a.node(s),l=o.edgeLabel,u;for(a.setEdge(o.edgeObj,l);o.dummy;)u=a.successors(s)[0],a.removeNode(s),l.points.push({x:o.x,y:o.y}),o.dummy==="edge-label"&&(l.x=o.x,l.y=o.y,l.width=o.width,l.height=o.height),s=u,o=a.node(s)})}return I3}var N3,hA;function V1(){if(hA)return N3;hA=1;var t=Xe();N3={longestPath:e,slack:r};function e(n){var i={};function a(s){var o=n.node(s);if(t.has(i,s))return o.rank;i[s]=!0;var l=t.min(t.map(n.outEdges(s),function(u){return a(u.w)-n.edge(u).minlen}));return(l===Number.POSITIVE_INFINITY||l===void 0||l===null)&&(l=0),o.rank=l}t.forEach(n.sources(),a)}function r(n,i){return n.node(i.w).rank-n.node(i.v).rank-n.edge(i).minlen}return N3}var B3,fA;function dA(){if(fA)return B3;fA=1;var t=Xe(),e=yi().Graph,r=V1().slack;B3=n;function n(o){var l=new e({directed:!1}),u=o.nodes()[0],h=o.nodeCount();l.setNode(u,{});for(var d,f;i(l,o)<h;)d=a(l,o),f=l.hasNode(d.v)?r(o,d):-r(o,d),s(l,o,f);return l}function i(o,l){function u(h){t.forEach(l.nodeEdges(h),function(d){var f=d.v,p=h===f?d.w:f;!o.hasNode(p)&&!r(l,d)&&(o.setNode(p,{}),o.setEdge(h,p,{}),u(p))})}return t.forEach(o.nodes(),u),o.nodeCount()}function a(o,l){return t.minBy(l.edges(),function(u){if(o.hasNode(u.v)!==o.hasNode(u.w))return r(l,u)})}function s(o,l,u){t.forEach(o.nodes(),function(h){l.node(h).rank+=u})}return B3}var D3,pA;function htt(){if(pA)return D3;pA=1;var t=Xe(),e=dA(),r=V1().slack,n=V1().longestPath,i=yi().alg.preorder,a=yi().alg.postorder,s=vn().simplify;D3=o,o.initLowLimValues=d,o.initCutValues=l,o.calcCutValue=h,o.leaveEdge=p,o.enterEdge=m,o.exchangeEdges=_;function o(k){k=s(k),n(k);var T=e(k);d(T),l(T,k);for(var C,M;C=p(T);)M=m(T,k,C),_(T,k,C,M)}function l(k,T){var C=a(k,k.nodes());C=C.slice(0,C.length-1),t.forEach(C,function(M){u(k,T,M)})}function u(k,T,C){var M=k.node(C),S=M.parent;k.edge(C,S).cutvalue=h(k,T,C)}function h(k,T,C){var M=k.node(C),S=M.parent,R=!0,A=T.edge(C,S),L=0;return A||(R=!1,A=T.edge(S,C)),L=A.weight,t.forEach(T.nodeEdges(C),function(v){var B=v.v===C,w=B?v.w:v.v;if(w!==S){var D=B===R,N=T.edge(v).weight;if(L+=D?N:-N,b(k,C,w)){var z=k.edge(C,w).cutvalue;L+=D?-z:z}}}),L}function d(k,T){arguments.length<2&&(T=k.nodes()[0]),f(k,{},1,T)}function f(k,T,C,M,S){var R=C,A=k.node(M);return T[M]=!0,t.forEach(k.neighbors(M),function(L){t.has(T,L)||(C=f(k,T,C,L,M))}),A.low=R,A.lim=C++,S?A.parent=S:delete A.parent,C}function p(k){return t.find(k.edges(),function(T){return k.edge(T).cutvalue<0})}function m(k,T,C){var M=C.v,S=C.w;T.hasEdge(M,S)||(M=C.w,S=C.v);var R=k.node(M),A=k.node(S),L=R,v=!1;R.lim>A.lim&&(L=A,v=!0);var B=t.filter(T.edges(),function(w){return v===x(k,k.node(w.v),L)&&v!==x(k,k.node(w.w),L)});return t.minBy(B,function(w){return r(T,w)})}function _(k,T,C,M){var S=C.v,R=C.w;k.removeEdge(S,R),k.setEdge(M.v,M.w,{}),d(k),l(k,T),y(k,T)}function y(k,T){var C=t.find(k.nodes(),function(S){return!T.node(S).parent}),M=i(k,C);M=M.slice(1),t.forEach(M,function(S){var R=k.node(S).parent,A=T.edge(S,R),L=!1;A||(A=T.edge(R,S),L=!0),T.node(S).rank=T.node(R).rank+(L?A.minlen:-A.minlen)})}function b(k,T,C){return k.hasEdge(T,C)}function x(k,T,C){return C.low<=T.lim&&T.lim<=C.lim}return D3}var O3,gA;function ftt(){if(gA)return O3;gA=1;var t=V1(),e=t.longestPath,r=dA(),n=htt();O3=i;function i(l){switch(l.graph().ranker){case"network-simplex":o(l);break;case"tight-tree":s(l);break;case"longest-path":a(l);break;default:o(l)}}var a=e;function s(l){e(l),r(l)}function o(l){n(l)}return O3}var F3,yA;function dtt(){if(yA)return F3;yA=1;var t=Xe();F3=e;function e(i){var a=n(i);t.forEach(i.graph().dummyChains,function(s){for(var o=i.node(s),l=o.edgeObj,u=r(i,a,l.v,l.w),h=u.path,d=u.lca,f=0,p=h[f],m=!0;s!==l.w;){if(o=i.node(s),m){for(;(p=h[f])!==d&&i.node(p).maxRank<o.rank;)f++;p===d&&(m=!1)}if(!m){for(;f<h.length-1&&i.node(p=h[f+1]).minRank<=o.rank;)f++;p=h[f]}i.setParent(s,p),s=i.successors(s)[0]}})}function r(i,a,s,o){var l=[],u=[],h=Math.min(a[s].low,a[o].low),d=Math.max(a[s].lim,a[o].lim),f,p;f=s;do f=i.parent(f),l.push(f);while(f&&(a[f].low>h||d>a[f].lim));for(p=f,f=o;(f=i.parent(f))!==p;)u.push(f);return{path:l.concat(u.reverse()),lca:p}}function n(i){var a={},s=0;function o(l){var u=s;t.forEach(i.children(l),o),a[l]={low:u,lim:s++}}return t.forEach(i.children(),o),a}return F3}var P3,mA;function ptt(){if(mA)return P3;mA=1;var t=Xe(),e=vn();P3={run:r,cleanup:s};function r(o){var l=e.addDummyNode(o,"root",{},"_root"),u=i(o),h=t.max(t.values(u))-1,d=2*h+1;o.graph().nestingRoot=l,t.forEach(o.edges(),function(p){o.edge(p).minlen*=d});var f=a(o)+1;t.forEach(o.children(),function(p){n(o,l,d,f,h,u,p)}),o.graph().nodeRankFactor=d}function n(o,l,u,h,d,f,p){var m=o.children(p);if(!m.length){p!==l&&o.setEdge(l,p,{weight:0,minlen:u});return}var _=e.addBorderNode(o,"_bt"),y=e.addBorderNode(o,"_bb"),b=o.node(p);o.setParent(_,p),b.borderTop=_,o.setParent(y,p),b.borderBottom=y,t.forEach(m,function(x){n(o,l,u,h,d,f,x);var k=o.node(x),T=k.borderTop?k.borderTop:x,C=k.borderBottom?k.borderBottom:x,M=k.borderTop?h:2*h,S=T!==C?1:d-f[p]+1;o.setEdge(_,T,{weight:M,minlen:S,nestingEdge:!0}),o.setEdge(C,y,{weight:M,minlen:S,nestingEdge:!0})}),o.parent(p)||o.setEdge(l,_,{weight:0,minlen:d+f[p]})}function i(o){var l={};function u(h,d){var f=o.children(h);f&&f.length&&t.forEach(f,function(p){u(p,d+1)}),l[h]=d}return t.forEach(o.children(),function(h){u(h,1)}),l}function a(o){return t.reduce(o.edges(),function(l,u){return l+o.edge(u).weight},0)}function s(o){var l=o.graph();o.removeNode(l.nestingRoot),delete l.nestingRoot,t.forEach(o.edges(),function(u){var h=o.edge(u);h.nestingEdge&&o.removeEdge(u)})}return P3}var q3,bA;function gtt(){if(bA)return q3;bA=1;var t=Xe(),e=vn();q3=r;function r(i){function a(s){var o=i.children(s),l=i.node(s);if(o.length&&t.forEach(o,a),t.has(l,"minRank")){l.borderLeft=[],l.borderRight=[];for(var u=l.minRank,h=l.maxRank+1;u<h;++u)n(i,"borderLeft","_bl",s,l,u),n(i,"borderRight","_br",s,l,u)}}t.forEach(i.children(),a)}function n(i,a,s,o,l,u){var h={width:0,height:0,rank:u,borderType:a},d=l[a][u-1],f=e.addDummyNode(i,"border",h,s);l[a][u]=f,i.setParent(f,o),d&&i.setEdge(d,f,{weight:1})}return q3}var V3,_A;function ytt(){if(_A)return V3;_A=1;var t=Xe();V3={adjust:e,undo:r};function e(u){var h=u.graph().rankdir.toLowerCase();(h==="lr"||h==="rl")&&n(u)}function r(u){var h=u.graph().rankdir.toLowerCase();(h==="bt"||h==="rl")&&a(u),(h==="lr"||h==="rl")&&(o(u),n(u))}function n(u){t.forEach(u.nodes(),function(h){i(u.node(h))}),t.forEach(u.edges(),function(h){i(u.edge(h))})}function i(u){var h=u.width;u.width=u.height,u.height=h}function a(u){t.forEach(u.nodes(),function(h){s(u.node(h))}),t.forEach(u.edges(),function(h){var d=u.edge(h);t.forEach(d.points,s),t.has(d,"y")&&s(d)})}function s(u){u.y=-u.y}function o(u){t.forEach(u.nodes(),function(h){l(u.node(h))}),t.forEach(u.edges(),function(h){var d=u.edge(h);t.forEach(d.points,l),t.has(d,"x")&&l(d)})}function l(u){var h=u.x;u.x=u.y,u.y=h}return V3}var z3,vA;function mtt(){if(vA)return z3;vA=1;var t=Xe();z3=e;function e(r){var n={},i=t.filter(r.nodes(),function(u){return!r.children(u).length}),a=t.max(t.map(i,function(u){return r.node(u).rank})),s=t.map(t.range(a+1),function(){return[]});function o(u){if(!t.has(n,u)){n[u]=!0;var h=r.node(u);s[h.rank].push(u),t.forEach(r.successors(u),o)}}var l=t.sortBy(i,function(u){return r.node(u).rank});return t.forEach(l,o),s}return z3}var Y3,xA;function btt(){if(xA)return Y3;xA=1;var t=Xe();Y3=e;function e(n,i){for(var a=0,s=1;s<i.length;++s)a+=r(n,i[s-1],i[s]);return a}function r(n,i,a){for(var s=t.zipObject(a,t.map(a,function(f,p){return p})),o=t.flatten(t.map(i,function(f){return t.sortBy(t.map(n.outEdges(f),function(p){return{pos:s[p.w],weight:n.edge(p).weight}}),"pos")}),!0),l=1;l<a.length;)l<<=1;var u=2*l-1;l-=1;var h=t.map(new Array(u),function(){return 0}),d=0;return t.forEach(o.forEach(function(f){var p=f.pos+l;h[p]+=f.weight;for(var m=0;p>0;)p%2&&(m+=h[p+1]),p=p-1>>1,h[p]+=f.weight;d+=f.weight*m})),d}return Y3}var U3,kA;function _tt(){if(kA)return U3;kA=1;var t=Xe();U3=e;function e(r,n){return t.map(n,function(i){var a=r.inEdges(i);if(a.length){var s=t.reduce(a,function(o,l){var u=r.edge(l),h=r.node(l.v);return{sum:o.sum+u.weight*h.order,weight:o.weight+u.weight}},{sum:0,weight:0});return{v:i,barycenter:s.sum/s.weight,weight:s.weight}}else return{v:i}})}return U3}var W3,wA;function vtt(){if(wA)return W3;wA=1;var t=Xe();W3=e;function e(i,a){var s={};t.forEach(i,function(l,u){var h=s[l.v]={indegree:0,in:[],out:[],vs:[l.v],i:u};t.isUndefined(l.barycenter)||(h.barycenter=l.barycenter,h.weight=l.weight)}),t.forEach(a.edges(),function(l){var u=s[l.v],h=s[l.w];!t.isUndefined(u)&&!t.isUndefined(h)&&(h.indegree++,u.out.push(s[l.w]))});var o=t.filter(s,function(l){return!l.indegree});return r(o)}function r(i){var a=[];function s(u){return function(h){h.merged||(t.isUndefined(h.barycenter)||t.isUndefined(u.barycenter)||h.barycenter>=u.barycenter)&&n(u,h)}}function o(u){return function(h){h.in.push(u),--h.indegree===0&&i.push(h)}}for(;i.length;){var l=i.pop();a.push(l),t.forEach(l.in.reverse(),s(l)),t.forEach(l.out,o(l))}return t.map(t.filter(a,function(u){return!u.merged}),function(u){return t.pick(u,["vs","i","barycenter","weight"])})}function n(i,a){var s=0,o=0;i.weight&&(s+=i.barycenter*i.weight,o+=i.weight),a.weight&&(s+=a.barycenter*a.weight,o+=a.weight),i.vs=a.vs.concat(i.vs),i.barycenter=s/o,i.weight=o,i.i=Math.min(a.i,i.i),a.merged=!0}return W3}var H3,TA;function xtt(){if(TA)return H3;TA=1;var t=Xe(),e=vn();H3=r;function r(a,s){var o=e.partition(a,function(_){return t.has(_,"barycenter")}),l=o.lhs,u=t.sortBy(o.rhs,function(_){return-_.i}),h=[],d=0,f=0,p=0;l.sort(i(!!s)),p=n(h,u,p),t.forEach(l,function(_){p+=_.vs.length,h.push(_.vs),d+=_.barycenter*_.weight,f+=_.weight,p=n(h,u,p)});var m={vs:t.flatten(h,!0)};return f&&(m.barycenter=d/f,m.weight=f),m}function n(a,s,o){for(var l;s.length&&(l=t.last(s)).i<=o;)s.pop(),a.push(l.vs),o++;return o}function i(a){return function(s,o){return s.barycenter<o.barycenter?-1:s.barycenter>o.barycenter?1:a?o.i-s.i:s.i-o.i}}return H3}var G3,EA;function ktt(){if(EA)return G3;EA=1;var t=Xe(),e=_tt(),r=vtt(),n=xtt();G3=i;function i(o,l,u,h){var d=o.children(l),f=o.node(l),p=f?f.borderLeft:void 0,m=f?f.borderRight:void 0,_={};p&&(d=t.filter(d,function(C){return C!==p&&C!==m}));var y=e(o,d);t.forEach(y,function(C){if(o.children(C.v).length){var M=i(o,C.v,u,h);_[C.v]=M,t.has(M,"barycenter")&&s(C,M)}});var b=r(y,u);a(b,_);var x=n(b,h);if(p&&(x.vs=t.flatten([p,x.vs,m],!0),o.predecessors(p).length)){var k=o.node(o.predecessors(p)[0]),T=o.node(o.predecessors(m)[0]);t.has(x,"barycenter")||(x.barycenter=0,x.weight=0),x.barycenter=(x.barycenter*x.weight+k.order+T.order)/(x.weight+2),x.weight+=2}return x}function a(o,l){t.forEach(o,function(u){u.vs=t.flatten(u.vs.map(function(h){return l[h]?l[h].vs:h}),!0)})}function s(o,l){t.isUndefined(o.barycenter)?(o.barycenter=l.barycenter,o.weight=l.weight):(o.barycenter=(o.barycenter*o.weight+l.barycenter*l.weight)/(o.weight+l.weight),o.weight+=l.weight)}return G3}var j3,CA;function wtt(){if(CA)return j3;CA=1;var t=Xe(),e=yi().Graph;j3=r;function r(i,a,s){var o=n(i),l=new e({compound:!0}).setGraph({root:o}).setDefaultNodeLabel(function(u){return i.node(u)});return t.forEach(i.nodes(),function(u){var h=i.node(u),d=i.parent(u);(h.rank===a||h.minRank<=a&&a<=h.maxRank)&&(l.setNode(u),l.setParent(u,d||o),t.forEach(i[s](u),function(f){var p=f.v===u?f.w:f.v,m=l.edge(p,u),_=t.isUndefined(m)?0:m.weight;l.setEdge(p,u,{weight:i.edge(f).weight+_})}),t.has(h,"minRank")&&l.setNode(u,{borderLeft:h.borderLeft[a],borderRight:h.borderRight[a]}))}),l}function n(i){for(var a;i.hasNode(a=t.uniqueId("_root")););return a}return j3}var $3,SA;function Ttt(){if(SA)return $3;SA=1;var t=Xe();$3=e;function e(r,n,i){var a={},s;t.forEach(i,function(o){for(var l=r.parent(o),u,h;l;){if(u=r.parent(l),u?(h=a[u],a[u]=l):(h=s,s=l),h&&h!==l){n.setEdge(h,l);return}l=u}})}return $3}var X3,AA;function Ett(){if(AA)return X3;AA=1;var t=Xe(),e=mtt(),r=btt(),n=ktt(),i=wtt(),a=Ttt(),s=yi().Graph,o=vn();X3=l;function l(f){var p=o.maxRank(f),m=u(f,t.range(1,p+1),"inEdges"),_=u(f,t.range(p-1,-1,-1),"outEdges"),y=e(f);d(f,y);for(var b=Number.POSITIVE_INFINITY,x,k=0,T=0;T<4;++k,++T){h(k%2?m:_,k%4>=2),y=o.buildLayerMatrix(f);var C=r(f,y);C<b&&(T=0,x=t.cloneDeep(y),b=C)}d(f,x)}function u(f,p,m){return t.map(p,function(_){return i(f,_,m)})}function h(f,p){var m=new s;t.forEach(f,function(_){var y=_.graph().root,b=n(_,y,m,p);t.forEach(b.vs,function(x,k){_.node(x).order=k}),a(_,m,b.vs)})}function d(f,p){t.forEach(p,function(m){t.forEach(m,function(_,y){f.node(_).order=y})})}return X3}var K3,MA;function Ctt(){if(MA)return K3;MA=1;var t=Xe(),e=yi().Graph,r=vn();K3={positionX:m,findType1Conflicts:n,findType2Conflicts:i,addConflict:s,hasConflict:o,verticalAlignment:l,horizontalCompaction:u,alignCoordinates:f,findSmallestWidthAlignment:d,balance:p};function n(b,x){var k={};function T(C,M){var S=0,R=0,A=C.length,L=t.last(M);return t.forEach(M,function(v,B){var w=a(b,v),D=w?b.node(w).order:A;(w||v===L)&&(t.forEach(M.slice(R,B+1),function(N){t.forEach(b.predecessors(N),function(z){var X=b.node(z),ct=X.order;(ct<S||D<ct)&&!(X.dummy&&b.node(N).dummy)&&s(k,z,N)})}),R=B+1,S=D)}),M}return t.reduce(x,T),k}function i(b,x){var k={};function T(M,S,R,A,L){var v;t.forEach(t.range(S,R),function(B){v=M[B],b.node(v).dummy&&t.forEach(b.predecessors(v),function(w){var D=b.node(w);D.dummy&&(D.order<A||D.order>L)&&s(k,w,v)})})}function C(M,S){var R=-1,A,L=0;return t.forEach(S,function(v,B){if(b.node(v).dummy==="border"){var w=b.predecessors(v);w.length&&(A=b.node(w[0]).order,T(S,L,B,R,A),L=B,R=A)}T(S,L,S.length,A,M.length)}),S}return t.reduce(x,C),k}function a(b,x){if(b.node(x).dummy)return t.find(b.predecessors(x),function(k){return b.node(k).dummy})}function s(b,x,k){if(x>k){var T=x;x=k,k=T}var C=b[x];C||(b[x]=C={}),C[k]=!0}function o(b,x,k){if(x>k){var T=x;x=k,k=T}return t.has(b[x],k)}function l(b,x,k,T){var C={},M={},S={};return t.forEach(x,function(R){t.forEach(R,function(A,L){C[A]=A,M[A]=A,S[A]=L})}),t.forEach(x,function(R){var A=-1;t.forEach(R,function(L){var v=T(L);if(v.length){v=t.sortBy(v,function(z){return S[z]});for(var B=(v.length-1)/2,w=Math.floor(B),D=Math.ceil(B);w<=D;++w){var N=v[w];M[L]===L&&A<S[N]&&!o(k,L,N)&&(M[N]=L,M[L]=C[L]=C[N],A=S[N])}}})}),{root:C,align:M}}function u(b,x,k,T,C){var M={},S=h(b,x,k,C),R=C?"borderLeft":"borderRight";function A(B,w){for(var D=S.nodes(),N=D.pop(),z={};N;)z[N]?B(N):(z[N]=!0,D.push(N),D=D.concat(w(N))),N=D.pop()}function L(B){M[B]=S.inEdges(B).reduce(function(w,D){return Math.max(w,M[D.v]+S.edge(D))},0)}function v(B){var w=S.outEdges(B).reduce(function(N,z){return Math.min(N,M[z.w]-S.edge(z))},Number.POSITIVE_INFINITY),D=b.node(B);w!==Number.POSITIVE_INFINITY&&D.borderType!==R&&(M[B]=Math.max(M[B],w))}return A(L,S.predecessors.bind(S)),A(v,S.successors.bind(S)),t.forEach(T,function(B){M[B]=M[k[B]]}),M}function h(b,x,k,T){var C=new e,M=b.graph(),S=_(M.nodesep,M.edgesep,T);return t.forEach(x,function(R){var A;t.forEach(R,function(L){var v=k[L];if(C.setNode(v),A){var B=k[A],w=C.edge(B,v);C.setEdge(B,v,Math.max(S(b,L,A),w||0))}A=L})}),C}function d(b,x){return t.minBy(t.values(x),function(k){var T=Number.NEGATIVE_INFINITY,C=Number.POSITIVE_INFINITY;return t.forIn(k,function(M,S){var R=y(b,S)/2;T=Math.max(M+R,T),C=Math.min(M-R,C)}),T-C})}function f(b,x){var k=t.values(x),T=t.min(k),C=t.max(k);t.forEach(["u","d"],function(M){t.forEach(["l","r"],function(S){var R=M+S,A=b[R],L;if(A!==x){var v=t.values(A);L=S==="l"?T-t.min(v):C-t.max(v),L&&(b[R]=t.mapValues(A,function(B){return B+L}))}})})}function p(b,x){return t.mapValues(b.ul,function(k,T){if(x)return b[x.toLowerCase()][T];var C=t.sortBy(t.map(b,T));return(C[1]+C[2])/2})}function m(b){var x=r.buildLayerMatrix(b),k=t.merge(n(b,x),i(b,x)),T={},C;t.forEach(["u","d"],function(S){C=S==="u"?x:t.values(x).reverse(),t.forEach(["l","r"],function(R){R==="r"&&(C=t.map(C,function(B){return t.values(B).reverse()}));var A=(S==="u"?b.predecessors:b.successors).bind(b),L=l(b,C,k,A),v=u(b,C,L.root,L.align,R==="r");R==="r"&&(v=t.mapValues(v,function(B){return-B})),T[S+R]=v})});var M=d(b,T);return f(T,M),p(T,b.graph().align)}function _(b,x,k){return function(T,C,M){var S=T.node(C),R=T.node(M),A=0,L;if(A+=S.width/2,t.has(S,"labelpos"))switch(S.labelpos.toLowerCase()){case"l":L=-S.width/2;break;case"r":L=S.width/2;break}if(L&&(A+=k?L:-L),L=0,A+=(S.dummy?x:b)/2,A+=(R.dummy?x:b)/2,A+=R.width/2,t.has(R,"labelpos"))switch(R.labelpos.toLowerCase()){case"l":L=R.width/2;break;case"r":L=-R.width/2;break}return L&&(A+=k?L:-L),L=0,A}}function y(b,x){return b.node(x).width}return K3}var Z3,LA;function Stt(){if(LA)return Z3;LA=1;var t=Xe(),e=vn(),r=Ctt().positionX;Z3=n;function n(a){a=e.asNonCompoundGraph(a),i(a),t.forEach(r(a),function(s,o){a.node(o).x=s})}function i(a){var s=e.buildLayerMatrix(a),o=a.graph().ranksep,l=0;t.forEach(s,function(u){var h=t.max(t.map(u,function(d){return a.node(d).height}));t.forEach(u,function(d){a.node(d).y=l+h/2}),l+=h+o})}return Z3}var Q3,RA;function Att(){if(RA)return Q3;RA=1;var t=Xe(),e=ctt(),r=utt(),n=ftt(),i=vn().normalizeRanks,a=dtt(),s=vn().removeEmptyRanks,o=ptt(),l=gtt(),u=ytt(),h=Ett(),d=Stt(),f=vn(),p=yi().Graph;Q3=m;function m(W,tt){var K=tt&&tt.debugTiming?f.time:f.notime;K("layout",function(){var it=K(" buildLayoutGraph",function(){return A(W)});K(" runLayout",function(){_(it,K)}),K(" updateInputGraph",function(){y(W,it)})})}function _(W,tt){tt(" makeSpaceForEdgeLabels",function(){L(W)}),tt(" removeSelfEdges",function(){J(W)}),tt(" acyclic",function(){e.run(W)}),tt(" nestingGraph.run",function(){o.run(W)}),tt(" rank",function(){n(f.asNonCompoundGraph(W))}),tt(" injectEdgeLabelProxies",function(){v(W)}),tt(" removeEmptyRanks",function(){s(W)}),tt(" nestingGraph.cleanup",function(){o.cleanup(W)}),tt(" normalizeRanks",function(){i(W)}),tt(" assignRankMinMax",function(){B(W)}),tt(" removeEdgeLabelProxies",function(){w(W)}),tt(" normalize.run",function(){r.run(W)}),tt(" parentDummyChains",function(){a(W)}),tt(" addBorderSegments",function(){l(W)}),tt(" order",function(){h(W)}),tt(" insertSelfEdges",function(){Y(W)}),tt(" adjustCoordinateSystem",function(){u.adjust(W)}),tt(" position",function(){d(W)}),tt(" positionSelfEdges",function(){$(W)}),tt(" removeBorderNodes",function(){ct(W)}),tt(" normalize.undo",function(){r.undo(W)}),tt(" fixupEdgeLabelCoords",function(){z(W)}),tt(" undoCoordinateSystem",function(){u.undo(W)}),tt(" translateGraph",function(){D(W)}),tt(" assignNodeIntersects",function(){N(W)}),tt(" reversePoints",function(){X(W)}),tt(" acyclic.undo",function(){e.undo(W)})}function y(W,tt){t.forEach(W.nodes(),function(K){var it=W.node(K),Z=tt.node(K);it&&(it.x=Z.x,it.y=Z.y,tt.children(K).length&&(it.width=Z.width,it.height=Z.height))}),t.forEach(W.edges(),function(K){var it=W.edge(K),Z=tt.edge(K);it.points=Z.points,t.has(Z,"x")&&(it.x=Z.x,it.y=Z.y)}),W.graph().width=tt.graph().width,W.graph().height=tt.graph().height}var b=["nodesep","edgesep","ranksep","marginx","marginy"],x={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},k=["acyclicer","ranker","rankdir","align"],T=["width","height"],C={width:0,height:0},M=["minlen","weight","width","height","labeloffset"],S={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},R=["labelpos"];function A(W){var tt=new p({multigraph:!0,compound:!0}),K=ut(W.graph());return tt.setGraph(t.merge({},x,lt(K,b),t.pick(K,k))),t.forEach(W.nodes(),function(it){var Z=ut(W.node(it));tt.setNode(it,t.defaults(lt(Z,T),C)),tt.setParent(it,W.parent(it))}),t.forEach(W.edges(),function(it){var Z=ut(W.edge(it));tt.setEdge(it,t.merge({},S,lt(Z,M),t.pick(Z,R)))}),tt}function L(W){var tt=W.graph();tt.ranksep/=2,t.forEach(W.edges(),function(K){var it=W.edge(K);it.minlen*=2,it.labelpos.toLowerCase()!=="c"&&(tt.rankdir==="TB"||tt.rankdir==="BT"?it.width+=it.labeloffset:it.height+=it.labeloffset)})}function v(W){t.forEach(W.edges(),function(tt){var K=W.edge(tt);if(K.width&&K.height){var it=W.node(tt.v),Z=W.node(tt.w),V={rank:(Z.rank-it.rank)/2+it.rank,e:tt};f.addDummyNode(W,"edge-proxy",V,"_ep")}})}function B(W){var tt=0;t.forEach(W.nodes(),function(K){var it=W.node(K);it.borderTop&&(it.minRank=W.node(it.borderTop).rank,it.maxRank=W.node(it.borderBottom).rank,tt=t.max(tt,it.maxRank))}),W.graph().maxRank=tt}function w(W){t.forEach(W.nodes(),function(tt){var K=W.node(tt);K.dummy==="edge-proxy"&&(W.edge(K.e).labelRank=K.rank,W.removeNode(tt))})}function D(W){var tt=Number.POSITIVE_INFINITY,K=0,it=Number.POSITIVE_INFINITY,Z=0,V=W.graph(),Q=V.marginx||0,q=V.marginy||0;function U(F){var j=F.x,P=F.y,et=F.width,at=F.height;tt=Math.min(tt,j-et/2),K=Math.max(K,j+et/2),it=Math.min(it,P-at/2),Z=Math.max(Z,P+at/2)}t.forEach(W.nodes(),function(F){U(W.node(F))}),t.forEach(W.edges(),function(F){var j=W.edge(F);t.has(j,"x")&&U(j)}),tt-=Q,it-=q,t.forEach(W.nodes(),function(F){var j=W.node(F);j.x-=tt,j.y-=it}),t.forEach(W.edges(),function(F){var j=W.edge(F);t.forEach(j.points,function(P){P.x-=tt,P.y-=it}),t.has(j,"x")&&(j.x-=tt),t.has(j,"y")&&(j.y-=it)}),V.width=K-tt+Q,V.height=Z-it+q}function N(W){t.forEach(W.edges(),function(tt){var K=W.edge(tt),it=W.node(tt.v),Z=W.node(tt.w),V,Q;K.points?(V=K.points[0],Q=K.points[K.points.length-1]):(K.points=[],V=Z,Q=it),K.points.unshift(f.intersectRect(it,V)),K.points.push(f.intersectRect(Z,Q))})}function z(W){t.forEach(W.edges(),function(tt){var K=W.edge(tt);if(t.has(K,"x"))switch((K.labelpos==="l"||K.labelpos==="r")&&(K.width-=K.labeloffset),K.labelpos){case"l":K.x-=K.width/2+K.labeloffset;break;case"r":K.x+=K.width/2+K.labeloffset;break}})}function X(W){t.forEach(W.edges(),function(tt){var K=W.edge(tt);K.reversed&&K.points.reverse()})}function ct(W){t.forEach(W.nodes(),function(tt){if(W.children(tt).length){var K=W.node(tt),it=W.node(K.borderTop),Z=W.node(K.borderBottom),V=W.node(t.last(K.borderLeft)),Q=W.node(t.last(K.borderRight));K.width=Math.abs(Q.x-V.x),K.height=Math.abs(Z.y-it.y),K.x=V.x+K.width/2,K.y=it.y+K.height/2}}),t.forEach(W.nodes(),function(tt){W.node(tt).dummy==="border"&&W.removeNode(tt)})}function J(W){t.forEach(W.edges(),function(tt){if(tt.v===tt.w){var K=W.node(tt.v);K.selfEdges||(K.selfEdges=[]),K.selfEdges.push({e:tt,label:W.edge(tt)}),W.removeEdge(tt)}})}function Y(W){var tt=f.buildLayerMatrix(W);t.forEach(tt,function(K){var it=0;t.forEach(K,function(Z,V){var Q=W.node(Z);Q.order=V+it,t.forEach(Q.selfEdges,function(q){f.addDummyNode(W,"selfedge",{width:q.label.width,height:q.label.height,rank:Q.rank,order:V+ ++it,e:q.e,label:q.label},"_se")}),delete Q.selfEdges})})}function $(W){t.forEach(W.nodes(),function(tt){var K=W.node(tt);if(K.dummy==="selfedge"){var it=W.node(K.e.v),Z=it.x+it.width/2,V=it.y,Q=K.x-Z,q=it.height/2;W.setEdge(K.e,K.label),W.removeNode(tt),K.label.points=[{x:Z+2*Q/3,y:V-q},{x:Z+5*Q/6,y:V-q},{x:Z+Q,y:V},{x:Z+5*Q/6,y:V+q},{x:Z+2*Q/3,y:V+q}],K.label.x=K.x,K.label.y=K.y}})}function lt(W,tt){return t.mapValues(t.pick(W,tt),Number)}function ut(W){var tt={};return t.forEach(W,function(K,it){tt[it.toLowerCase()]=K}),tt}return Q3}var J3,IA;function Mtt(){if(IA)return J3;IA=1;var t=Xe(),e=vn(),r=yi().Graph;J3={debugOrdering:n};function n(i){var a=e.buildLayerMatrix(i),s=new r({compound:!0,multigraph:!0}).setGraph({});return t.forEach(i.nodes(),function(o){s.setNode(o,{label:o}),s.setParent(o,"layer"+i.node(o).rank)}),t.forEach(i.edges(),function(o){s.setEdge(o.v,o.w,{},o.name)}),t.forEach(a,function(o,l){var u="layer"+l;s.setNode(u,{rank:"same"}),t.reduce(o,function(h,d){return s.setEdge(h,d,{style:"invis"}),d})}),s}return J3}var t4,NA;function Ltt(){return NA||(NA=1,t4="0.8.5"),t4}var e4,BA;function DA(){return BA||(BA=1,e4={graphlib:yi(),layout:Att(),debug:Mtt(),util:{time:vn().time,notime:vn().notime},version:Ltt()}),e4}var Kc=DA();let OA=0;const Rtt=function(t,e,r,n,i){const a=function(x){switch(x){case i.db.relationType.AGGREGATION:return"aggregation";case i.db.EXTENSION:return"extension";case i.db.COMPOSITION:return"composition";case i.db.DEPENDENCY:return"dependency";case i.db.LOLLIPOP:return"lollipop"}};e.points=e.points.filter(x=>!Number.isNaN(x.y));const s=e.points,o=Ua().x(function(x){return x.x}).y(function(x){return x.y}).curve(Os),l=t.append("path").attr("d",o(s)).attr("id","edge"+OA).attr("class","relation");let u="";n.arrowMarkerAbsolute&&(u=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,u=u.replace(/\(/g,"\\("),u=u.replace(/\)/g,"\\)")),r.relation.lineType==1&&l.attr("class","relation dashed-line"),r.relation.type1!=="none"&&l.attr("marker-start","url("+u+"#"+a(r.relation.type1)+"Start)"),r.relation.type2!=="none"&&l.attr("marker-end","url("+u+"#"+a(r.relation.type2)+"End)");let h,d;const f=e.points.length;let p=Se.calcLabelPosition(e.points);h=p.x,d=p.y;let m,_,y,b;if(f%2!==0&&f>1){let x=Se.calcCardinalityPosition(r.relation.type1!=="none",e.points,e.points[0]),k=Se.calcCardinalityPosition(r.relation.type2!=="none",e.points,e.points[f-1]);H.debug("cardinality_1_point "+JSON.stringify(x)),H.debug("cardinality_2_point "+JSON.stringify(k)),m=x.x,_=x.y,y=k.x,b=k.y}if(typeof r.title<"u"){const x=t.append("g").attr("class","classLabel"),k=x.append("text").attr("class","label").attr("x",h).attr("y",d).attr("fill","red").attr("text-anchor","middle").text(r.title);window.label=k;const T=k.node().getBBox();x.insert("rect",":first-child").attr("class","box").attr("x",T.x-n.padding/2).attr("y",T.y-n.padding/2).attr("width",T.width+n.padding).attr("height",T.height+n.padding)}H.info("Rendering relation "+JSON.stringify(r)),typeof r.relationTitle1<"u"&&r.relationTitle1!=="none"&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",m).attr("y",_).attr("fill","black").attr("font-size","6").text(r.relationTitle1),typeof r.relationTitle2<"u"&&r.relationTitle2!=="none"&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",y).attr("y",b).attr("fill","black").attr("font-size","6").text(r.relationTitle2),OA++},Itt=function(t,e,r,n){H.debug("Rendering class ",e,r);const i=e.id,a={id:i,label:e.id,width:0,height:0},s=t.append("g").attr("id",n.db.lookUpDomId(i)).attr("class","classGroup");let o;e.link?o=s.append("svg:a").attr("xlink:href",e.link).attr("target",e.linkTarget).append("text").attr("y",r.textHeight+r.padding).attr("x",0):o=s.append("text").attr("y",r.textHeight+r.padding).attr("x",0);let l=!0;e.annotations.forEach(function(C){const M=o.append("tspan").text("\xAB"+C+"\xBB");l||M.attr("dy",r.textHeight),l=!1});let u=e.id;e.type!==void 0&&e.type!==""&&(u+="<"+e.type+">");const h=o.append("tspan").text(u).attr("class","title");l||h.attr("dy",r.textHeight);const d=o.node().getBBox().height,f=s.append("line").attr("x1",0).attr("y1",r.padding+d+r.dividerMargin/2).attr("y2",r.padding+d+r.dividerMargin/2),p=s.append("text").attr("x",r.padding).attr("y",d+r.dividerMargin+r.textHeight).attr("fill","white").attr("class","classText");l=!0,e.members.forEach(function(C){FA(p,C,l,r),l=!1});const m=p.node().getBBox(),_=s.append("line").attr("x1",0).attr("y1",r.padding+d+r.dividerMargin+m.height).attr("y2",r.padding+d+r.dividerMargin+m.height),y=s.append("text").attr("x",r.padding).attr("y",d+2*r.dividerMargin+m.height+r.textHeight).attr("fill","white").attr("class","classText");l=!0,e.methods.forEach(function(C){FA(y,C,l,r),l=!1});const b=s.node().getBBox();var x=" ";e.cssClasses.length>0&&(x=x+e.cssClasses.join(" "));const T=s.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",b.width+2*r.padding).attr("height",b.height+r.padding+.5*r.dividerMargin).attr("class",x).node().getBBox().width;return o.node().childNodes.forEach(function(C){C.setAttribute("x",(T-C.getBBox().width)/2)}),e.tooltip&&o.insert("title").text(e.tooltip),f.attr("x2",T),_.attr("x2",T),a.width=T,a.height=b.height+r.padding+.5*r.dividerMargin,a},z1=function(t){const e=/^(\+|-|~|#)?(\w+)(~\w+~|\[\])?\s+(\w+) *(\*|\$)?$/,r=/^([+|\-|~|#])?(\w+) *\( *(.*)\) *(\*|\$)? *(\w*[~|[\]]*\s*\w*~?)$/;let n=t.match(e),i=t.match(r);return n&&!i?Ntt(n):i?Btt(i):Dtt(t)},Ntt=function(t){let e="",r="";try{let n=t[1]?t[1].trim():"",i=t[2]?t[2].trim():"",a=t[3]?ja(t[3].trim()):"",s=t[4]?t[4].trim():"",o=t[5]?t[5].trim():"";r=n+i+a+" "+s,e=r4(o)}catch{r=t}return{displayText:r,cssStyle:e}},Btt=function(t){let e="",r="";try{let n=t[1]?t[1].trim():"",i=t[2]?t[2].trim():"",a=t[3]?ja(t[3].trim()):"",s=t[4]?t[4].trim():"",o=t[5]?" : "+ja(t[5]).trim():"";r=n+i+"("+a+")"+o,e=r4(s)}catch{r=t}return{displayText:r,cssStyle:e}},Dtt=function(t){let e="",r="",n="",i=t.indexOf("("),a=t.indexOf(")");if(i>1&&a>i&&a<=t.length){let s="",o="",l=t.substring(0,1);l.match(/\w/)?o=t.substring(0,i).trim():(l.match(/\+|-|~|#/)&&(s=l),o=t.substring(1,i).trim());const u=t.substring(i+1,a);t.substring(a+1,1),r=r4(t.substring(a+1,a+2)),e=s+o+"("+ja(u.trim())+")",a<t.length&&(n=t.substring(a+2).trim(),n!==""&&(n=" : "+ja(n),e+=n))}else e=ja(t);return{displayText:e,cssStyle:r}},FA=function(t,e,r,n){let i=z1(e);const a=t.append("tspan").attr("x",n.padding).text(i.displayText);i.cssStyle!==""&&a.attr("style",i.cssStyle),r||a.attr("dy",n.textHeight)},r4=function(t){switch(t){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}},PA={drawClass:Itt,drawEdge:Rtt,parseMember:z1};let n4={};const Y1=20,U1=function(t){const e=Object.entries(n4).find(r=>r[1].label===t);if(e)return e[0]},Ott=function(t){t.append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),t.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},Ftt={draw:function(t,e,r,n){const i=nt().class;n4={},H.info("Rendering diagram "+t);const a=nt().securityLevel;let s;a==="sandbox"&&(s=St("#i"+e));const o=St(a==="sandbox"?s.nodes()[0].contentDocument.body:"body"),l=o.select(`[id='${e}']`);Ott(l);const u=new cr.Graph({multigraph:!0});u.setGraph({isMultiGraph:!0}),u.setDefaultEdgeLabel(function(){return{}});const h=n.db.getClasses(),d=Object.keys(h);for(let b=0;b<d.length;b++){const x=h[d[b]],k=PA.drawClass(l,x,i,n);n4[k.id]=k,u.setNode(k.id,k),H.info("Org height: "+k.height)}n.db.getRelations().forEach(function(b){H.info("tjoho"+U1(b.id1)+U1(b.id2)+JSON.stringify(b)),u.setEdge(U1(b.id1),U1(b.id2),{relation:b},b.title||"DEFAULT")}),Kc.layout(u),u.nodes().forEach(function(b){typeof b<"u"&&typeof u.node(b)<"u"&&(H.debug("Node "+b+": "+JSON.stringify(u.node(b))),o.select("#"+n.db.lookUpDomId(b)).attr("transform","translate("+(u.node(b).x-u.node(b).width/2)+","+(u.node(b).y-u.node(b).height/2)+" )"))}),u.edges().forEach(function(b){typeof b<"u"&&typeof u.edge(b)<"u"&&(H.debug("Edge "+b.v+" -> "+b.w+": "+JSON.stringify(u.edge(b))),PA.drawEdge(l,u.edge(b),u.edge(b).relation,i,n))});const p=l.node().getBBox(),m=p.width+Y1*2,_=p.height+Y1*2;li(l,_,m,i.useMaxWidth);const y=`${p.x-Y1} ${p.y-Y1} ${m} ${_}`;H.debug(`viewBox ${y}`),l.attr("viewBox",y),bn(n.db,l,e)}},Ptt=(t,e,r,n)=>{e.forEach(i=>{qtt[i](t,r,n)})},qtt={extension:(t,e,r)=>{H.trace("Making markers for ",r),t.append("defs").append("marker").attr("id",e+"-extensionStart").attr("class","marker extension "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},composition:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-compositionStart").attr("class","marker composition "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},aggregation:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},dependency:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},lollipop:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-lollipopStart").attr("class","marker lollipop "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("circle").attr("stroke","black").attr("fill","white").attr("cx",6).attr("cy",7).attr("r",6)},point:(t,e)=>{t.append("marker").attr("id",e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",10).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},circle:(t,e)=>{t.append("marker").attr("id",e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},cross:(t,e)=>{t.append("marker").attr("id",e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},barb:(t,e)=>{t.append("defs").append("marker").attr("id",e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}};function Vtt(t,e){e&&t.attr("style",e)}function ztt(t){const e=St(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),r=e.append("xhtml:div"),n=t.label,i=t.isNode?"nodeLabel":"edgeLabel";return r.html('<span class="'+i+'" '+(t.labelStyle?'style="'+t.labelStyle+'"':"")+">"+n+"</span>"),Vtt(r,t.labelStyle),r.style("display","inline-block"),r.style("white-space","nowrap"),r.attr("xmlns","http://www.w3.org/1999/xhtml"),e.node()}const xn=(t,e,r,n)=>{let i=t||"";if(typeof i=="object"&&(i=i[0]),Mr(nt().flowchart.htmlLabels)){i=i.replace(/\\n|\n/g,"<br />"),H.info("vertexText"+i);const a={isNode:n,label:w0(i).replace(/fa[lrsb]?:fa-[\w-]+/g,o=>`<i class='${o.replace(":"," ")}'></i>`),labelStyle:e.replace("fill:","color:")};return ztt(a)}else{const a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",e.replace("color:","fill:"));let s=[];typeof i=="string"?s=i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?s=i:s=[];for(let o=0;o<s.length;o++){const l=document.createElementNS("http://www.w3.org/2000/svg","tspan");l.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),l.setAttribute("dy","1em"),l.setAttribute("x","0"),r?l.setAttribute("class","title-row"):l.setAttribute("class","row"),l.textContent=s[o].trim(),a.appendChild(l)}return a}},Yr=(t,e,r,n)=>{let i;r?i=r:i="node default";const a=t.insert("g").attr("class",i).attr("id",e.domId||e.id),s=a.insert("g").attr("class","label").attr("style",e.labelStyle);let o;typeof e.labelText>"u"?o="":o=typeof e.labelText=="string"?e.labelText:e.labelText[0];const l=s.node().appendChild(xn(ai(w0(o),nt()),e.labelStyle,!1,n));let u=l.getBBox();if(Mr(nt().flowchart.htmlLabels)){const d=l.children[0],f=St(l);u=d.getBoundingClientRect(),f.attr("width",u.width),f.attr("height",u.height)}const h=e.padding/2;return s.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),{shapeSvg:a,bbox:u,halfPadding:h,label:s}},ur=(t,e)=>{const r=e.node().getBBox();t.width=r.width,t.height=r.height};function ca(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+r/2+")")}let Re={},mi={},qA={};const Ytt=()=>{mi={},qA={},Re={}},W1=(t,e)=>(H.trace("In isDecendant",e," ",t," = ",mi[e].indexOf(t)>=0),mi[e].indexOf(t)>=0),Utt=(t,e)=>(H.info("Decendants of ",e," is ",mi[e]),H.info("Edge is ",t),t.v===e||t.w===e?!1:mi[e]?!!(mi[e].indexOf(t.v)>=0||W1(t.v,e)||W1(t.w,e)||mi[e].indexOf(t.w)>=0):(H.debug("Tilt, ",e,",not in decendants"),!1)),VA=(t,e,r,n)=>{H.warn("Copying children of ",t,"root",n,"data",e.node(t),n);const i=e.children(t)||[];t!==n&&i.push(t),H.warn("Copying (nodes) clusterId",t,"nodes",i),i.forEach(a=>{if(e.children(a).length>0)VA(a,e,r,n);else{const s=e.node(a);H.info("cp ",a," to ",n," with parent ",t),r.setNode(a,s),n!==e.parent(a)&&(H.warn("Setting parent",a,e.parent(a)),r.setParent(a,e.parent(a))),t!==n&&a!==t?(H.debug("Setting parent",a,t),r.setParent(a,t)):(H.info("In copy ",t,"root",n,"data",e.node(t),n),H.debug("Not Setting parent for node=",a,"cluster!==rootId",t!==n,"node!==clusterId",a!==t));const o=e.edges(a);H.debug("Copying Edges",o),o.forEach(l=>{H.info("Edge",l);const u=e.edge(l.v,l.w,l.name);H.info("Edge data",u,n);try{Utt(l,n)?(H.info("Copying as ",l.v,l.w,u,l.name),r.setEdge(l.v,l.w,u,l.name),H.info("newGraph edges ",r.edges(),r.edge(r.edges()[0]))):H.info("Skipping copy of edge ",l.v,"-->",l.w," rootId: ",n," clusterId:",t)}catch(h){H.error(h)}})}H.debug("Removing node",a),e.removeNode(a)})},zA=(t,e)=>{const r=e.children(t);let n=[].concat(r);for(let i=0;i<r.length;i++)qA[r[i]]=t,n=n.concat(zA(r[i],e));return n},Zc=(t,e)=>{H.trace("Searching",t);const r=e.children(t);if(H.trace("Searching children of id ",t,r),r.length<1)return H.trace("This is a valid node",t),t;for(let n=0;n<r.length;n++){const i=Zc(r[n],e);if(i)return H.trace("Found replacement for",t," => ",i),i}},H1=t=>!Re[t]||!Re[t].externalConnections?t:Re[t]?Re[t].id:t,Wtt=(t,e)=>{if(!t||e>10){H.debug("Opting out, no graph ");return}else H.debug("Opting in, graph ");t.nodes().forEach(function(r){t.children(r).length>0&&(H.warn("Cluster identified",r," Replacement id in edges: ",Zc(r,t)),mi[r]=zA(r,t),Re[r]={id:Zc(r,t),clusterData:t.node(r)})}),t.nodes().forEach(function(r){const n=t.children(r),i=t.edges();n.length>0?(H.debug("Cluster identified",r,mi),i.forEach(a=>{if(a.v!==r&&a.w!==r){const s=W1(a.v,r),o=W1(a.w,r);s^o&&(H.warn("Edge: ",a," leaves cluster ",r),H.warn("Decendants of XXX ",r,": ",mi[r]),Re[r].externalConnections=!0)}})):H.debug("Not a cluster ",r,mi)}),t.edges().forEach(function(r){const n=t.edge(r);H.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(r)),H.warn("Edge "+r.v+" -> "+r.w+": "+JSON.stringify(t.edge(r)));let i=r.v,a=r.w;if(H.warn("Fix XXX",Re,"ids:",r.v,r.w,"Translateing: ",Re[r.v]," --- ",Re[r.w]),Re[r.v]&&Re[r.w]&&Re[r.v]===Re[r.w]){H.warn("Fixing and trixing link to self - removing XXX",r.v,r.w,r.name),H.warn("Fixing and trixing - removing XXX",r.v,r.w,r.name),i=H1(r.v),a=H1(r.w),t.removeEdge(r.v,r.w,r.name);const s=r.w+"---"+r.v;t.setNode(s,{domId:s,id:s,labelStyle:"",labelText:n.label,padding:0,shape:"labelRect",style:""});const o=JSON.parse(JSON.stringify(n)),l=JSON.parse(JSON.stringify(n));o.label="",o.arrowTypeEnd="none",l.label="",o.fromCluster=r.v,l.toCluster=r.v,t.setEdge(i,s,o,r.name+"-cyclic-special"),t.setEdge(s,a,l,r.name+"-cyclic-special")}else(Re[r.v]||Re[r.w])&&(H.warn("Fixing and trixing - removing XXX",r.v,r.w,r.name),i=H1(r.v),a=H1(r.w),t.removeEdge(r.v,r.w,r.name),i!==r.v&&(n.fromCluster=r.v),a!==r.w&&(n.toCluster=r.w),H.warn("Fix Replacing with XXX",i,a,r.name),t.setEdge(i,a,n,r.name))}),H.warn("Adjusted Graph",cr.json.write(t)),YA(t,0),H.trace(Re)},YA=(t,e)=>{if(H.warn("extractor - ",e,cr.json.write(t),t.children("D")),e>10){H.error("Bailing out");return}let r=t.nodes(),n=!1;for(let i=0;i<r.length;i++){const a=r[i],s=t.children(a);n=n||s.length>0}if(!n){H.debug("Done, no node has children",t.nodes());return}H.debug("Nodes = ",r,e);for(let i=0;i<r.length;i++){const a=r[i];if(H.debug("Extracting node",a,Re,Re[a]&&!Re[a].externalConnections,!t.parent(a),t.node(a),t.children("D")," Depth ",e),!Re[a])H.debug("Not a cluster",a,e);else if(!Re[a].externalConnections&&t.children(a)&&t.children(a).length>0){H.warn("Cluster without external connections, without a parent and with children",a,e);let o=t.graph().rankdir==="TB"?"LR":"TB";Re[a]&&Re[a].clusterData&&Re[a].clusterData.dir&&(o=Re[a].clusterData.dir,H.warn("Fixing dir",Re[a].clusterData.dir,o));const l=new cr.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:o,nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});H.warn("Old graph before copy",cr.json.write(t)),VA(a,t,l,a),t.setNode(a,{clusterNode:!0,id:a,clusterData:Re[a].clusterData,labelText:Re[a].labelText,graph:l}),H.warn("New graph after copy node: (",a,")",cr.json.write(l)),H.debug("Old graph after copy",cr.json.write(t))}else H.warn("Cluster ** ",a," **not meeting the criteria !externalConnections:",!Re[a].externalConnections," no parent: ",!t.parent(a)," children ",t.children(a)&&t.children(a).length>0,t.children("D"),e),H.debug(Re)}r=t.nodes(),H.warn("New list of nodes",r);for(let i=0;i<r.length;i++){const a=r[i],s=t.node(a);H.warn(" Now next level",a,s),s.clusterNode&&YA(s.graph,e+1)}},UA=(t,e)=>{if(e.length===0)return[];let r=Object.assign(e);return e.forEach(n=>{const i=t.children(n),a=UA(t,i);r=r.concat(a)}),r},Htt=t=>UA(t,t.children());function Gtt(t,e){return t.intersect(e)}function WA(t,e,r,n){var i=t.x,a=t.y,s=i-n.x,o=a-n.y,l=Math.sqrt(e*e*o*o+r*r*s*s),u=Math.abs(e*r*s/l);n.x<i&&(u=-u);var h=Math.abs(e*r*o/l);return n.y<a&&(h=-h),{x:i+u,y:a+h}}function jtt(t,e,r){return WA(t,e,e,r)}function $tt(t,e,r,n){var i,a,s,o,l,u,h,d,f,p,m,_,y,b,x;if(i=e.y-t.y,s=t.x-e.x,l=e.x*t.y-t.x*e.y,f=i*r.x+s*r.y+l,p=i*n.x+s*n.y+l,!(f!==0&&p!==0&&HA(f,p))&&(a=n.y-r.y,o=r.x-n.x,u=n.x*r.y-r.x*n.y,h=a*t.x+o*t.y+u,d=a*e.x+o*e.y+u,!(h!==0&&d!==0&&HA(h,d))&&(m=i*o-a*s,m!==0)))return _=Math.abs(m/2),y=s*u-o*l,b=y<0?(y-_)/m:(y+_)/m,y=a*l-i*u,x=y<0?(y-_)/m:(y+_)/m,{x:b,y:x}}function HA(t,e){return t*e>0}function Xtt(t,e,r){var n=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;typeof e.forEach=="function"?e.forEach(function(m){s=Math.min(s,m.x),o=Math.min(o,m.y)}):(s=Math.min(s,e.x),o=Math.min(o,e.y));for(var l=n-t.width/2-s,u=i-t.height/2-o,h=0;h<e.length;h++){var d=e[h],f=e[h<e.length-1?h+1:0],p=$tt(t,r,{x:l+d.x,y:u+d.y},{x:l+f.x,y:u+f.y});p&&a.push(p)}return a.length?(a.length>1&&a.sort(function(m,_){var y=m.x-r.x,b=m.y-r.y,x=Math.sqrt(y*y+b*b),k=_.x-r.x,T=_.y-r.y,C=Math.sqrt(k*k+T*T);return x<C?-1:x===C?0:1}),a[0]):t}const Qc=(t,e)=>{var r=t.x,n=t.y,i=e.x-r,a=e.y-n,s=t.width/2,o=t.height/2,l,u;return Math.abs(a)*s>Math.abs(i)*o?(a<0&&(o=-o),l=a===0?0:o*i/a,u=o):(i<0&&(s=-s),l=s,u=i===0?0:s*a/i),{x:r+l,y:n+u}},ir={node:Gtt,circle:jtt,ellipse:WA,polygon:Xtt,rect:Qc},Ktt=(t,e)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=Yr(t,e,"node "+e.classes,!0);H.info("Classes = ",e.classes);const a=r.insert("rect",":first-child");return a.attr("rx",e.rx).attr("ry",e.ry).attr("x",-n.width/2-i).attr("y",-n.height/2-i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),ur(e,a),e.intersect=function(s){return ir.rect(e,s)},r},Ztt=(t,e)=>{const{shapeSvg:r,bbox:n}=Yr(t,e,void 0,!0),i=n.width+e.padding,a=n.height+e.padding,s=i+a,o=[{x:s/2,y:0},{x:s,y:-s/2},{x:s/2,y:-s},{x:0,y:-s/2}];H.info("Question main (Circle)");const l=ca(r,s,s,o);return l.attr("style",e.style),ur(e,l),e.intersect=function(u){return H.warn("Intersect called"),ir.polygon(e,o,u)},r},Qtt=(t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=28,i=[{x:0,y:n/2},{x:n/2,y:0},{x:0,y:-n/2},{x:-n/2,y:0}];return r.insert("polygon",":first-child").attr("points",i.map(function(s){return s.x+","+s.y}).join(" ")).attr("class","state-start").attr("r",7).attr("width",28).attr("height",28),e.width=28,e.height=28,e.intersect=function(s){return ir.circle(e,14,s)},r},Jtt=(t,e)=>{const{shapeSvg:r,bbox:n}=Yr(t,e,void 0,!0),i=4,a=n.height+e.padding,s=a/i,o=n.width+2*s+e.padding,l=[{x:s,y:0},{x:o-s,y:0},{x:o,y:-a/2},{x:o-s,y:-a},{x:s,y:-a},{x:0,y:-a/2}],u=ca(r,o,a,l);return u.attr("style",e.style),ur(e,u),e.intersect=function(h){return ir.polygon(e,l,h)},r},tet=(t,e)=>{const{shapeSvg:r,bbox:n}=Yr(t,e,void 0,!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-a/2,y:0},{x:i,y:0},{x:i,y:-a},{x:-a/2,y:-a},{x:0,y:-a/2}];return ca(r,i,a,s).attr("style",e.style),e.width=i+a,e.height=a,e.intersect=function(l){return ir.polygon(e,s,l)},r},eet=(t,e)=>{const{shapeSvg:r,bbox:n}=Yr(t,e,void 0,!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-2*a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:a/6,y:-a}],o=ca(r,i,a,s);return o.attr("style",e.style),ur(e,o),e.intersect=function(l){return ir.polygon(e,s,l)},r},ret=(t,e)=>{const{shapeSvg:r,bbox:n}=Yr(t,e,void 0,!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:2*a/6,y:0},{x:i+a/6,y:0},{x:i-2*a/6,y:-a},{x:-a/6,y:-a}],o=ca(r,i,a,s);return o.attr("style",e.style),ur(e,o),e.intersect=function(l){return ir.polygon(e,s,l)},r},net=(t,e)=>{const{shapeSvg:r,bbox:n}=Yr(t,e,void 0,!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:-2*a/6,y:0},{x:i+2*a/6,y:0},{x:i-a/6,y:-a},{x:a/6,y:-a}],o=ca(r,i,a,s);return o.attr("style",e.style),ur(e,o),e.intersect=function(l){return ir.polygon(e,s,l)},r},iet=(t,e)=>{const{shapeSvg:r,bbox:n}=Yr(t,e,void 0,!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:a/6,y:0},{x:i-a/6,y:0},{x:i+2*a/6,y:-a},{x:-2*a/6,y:-a}],o=ca(r,i,a,s);return o.attr("style",e.style),ur(e,o),e.intersect=function(l){return ir.polygon(e,s,l)},r},aet=(t,e)=>{const{shapeSvg:r,bbox:n}=Yr(t,e,void 0,!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:0,y:0},{x:i+a/2,y:0},{x:i,y:-a/2},{x:i+a/2,y:-a},{x:0,y:-a}],o=ca(r,i,a,s);return o.attr("style",e.style),ur(e,o),e.intersect=function(l){return ir.polygon(e,s,l)},r},set=(t,e)=>{const{shapeSvg:r,bbox:n}=Yr(t,e,void 0,!0),i=n.width+e.padding,a=i/2,s=a/(2.5+i/50),o=n.height+s+e.padding,l="M 0,"+s+" a "+a+","+s+" 0,0,0 "+i+" 0 a "+a+","+s+" 0,0,0 "+-i+" 0 l 0,"+o+" a "+a+","+s+" 0,0,0 "+i+" 0 l 0,"+-o,u=r.attr("label-offset-y",s).insert("path",":first-child").attr("style",e.style).attr("d",l).attr("transform","translate("+-i/2+","+-(o/2+s)+")");return ur(e,u),e.intersect=function(h){const d=ir.rect(e,h),f=d.x-e.x;if(a!=0&&(Math.abs(f)<e.width/2||Math.abs(f)==e.width/2&&Math.abs(d.y-e.y)>e.height/2-s)){let p=s*s*(1-f*f/(a*a));p!=0&&(p=Math.sqrt(p)),p=s-p,h.y-e.y>0&&(p=-p),d.y+=p}return d},r},oet=(t,e)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=Yr(t,e,"node "+e.classes,!0);H.trace("Classes = ",e.classes);const a=r.insert("rect",":first-child"),s=n.width+e.padding,o=n.height+e.padding;if(a.attr("class","basic label-container").attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",-n.width/2-i).attr("y",-n.height/2-i).attr("width",s).attr("height",o),e.props){const l=new Set(Object.keys(e.props));e.props.borders&&(GA(a,e.props.borders,s,o),l.delete("borders")),l.forEach(u=>{H.warn(`Unknown node property ${u}`)})}return ur(e,a),e.intersect=function(l){return ir.rect(e,l)},r},cet=(t,e)=>{const{shapeSvg:r}=Yr(t,e,"label",!0);H.trace("Classes = ",e.classes);const n=r.insert("rect",":first-child"),i=0,a=0;if(n.attr("width",i).attr("height",a),r.attr("class","label edgeLabel"),e.props){const s=new Set(Object.keys(e.props));e.props.borders&&(GA(n,e.props.borders,i,a),s.delete("borders")),s.forEach(o=>{H.warn(`Unknown node property ${o}`)})}return ur(e,n),e.intersect=function(s){return ir.rect(e,s)},r};function GA(t,e,r,n){const i=[],a=o=>{i.push(o),i.push(0)},s=o=>{i.push(0),i.push(o)};e.includes("t")?(H.debug("add top border"),a(r)):s(r),e.includes("r")?(H.debug("add right border"),a(n)):s(n),e.includes("b")?(H.debug("add bottom border"),a(r)):s(r),e.includes("l")?(H.debug("add left border"),a(n)):s(n),t.attr("stroke-dasharray",i.join(" "))}const uet=(t,e)=>{let r;e.classes?r="node "+e.classes:r="node default";const n=t.insert("g").attr("class",r).attr("id",e.domId||e.id),i=n.insert("rect",":first-child"),a=n.insert("line"),s=n.insert("g").attr("class","label"),o=e.labelText.flat?e.labelText.flat():e.labelText;let l="";typeof o=="object"?l=o[0]:l=o,H.info("Label text abc79",l,o,typeof o=="object");const u=s.node().appendChild(xn(l,e.labelStyle,!0,!0));let h={width:0,height:0};if(Mr(nt().flowchart.htmlLabels)){const _=u.children[0],y=St(u);h=_.getBoundingClientRect(),y.attr("width",h.width),y.attr("height",h.height)}H.info("Text 2",o);const d=o.slice(1,o.length);let f=u.getBBox();const p=s.node().appendChild(xn(d.join?d.join("<br/>"):d,e.labelStyle,!0,!0));if(Mr(nt().flowchart.htmlLabels)){const _=p.children[0],y=St(p);h=_.getBoundingClientRect(),y.attr("width",h.width),y.attr("height",h.height)}const m=e.padding/2;return St(p).attr("transform","translate( "+(h.width>f.width?0:(f.width-h.width)/2)+", "+(f.height+m+5)+")"),St(u).attr("transform","translate( "+(h.width<f.width?0:-(f.width-h.width)/2)+", "+0+")"),h=s.node().getBBox(),s.attr("transform","translate("+-h.width/2+", "+(-h.height/2-m+3)+")"),i.attr("class","outer title-state").attr("x",-h.width/2-m).attr("y",-h.height/2-m).attr("width",h.width+e.padding).attr("height",h.height+e.padding),a.attr("class","divider").attr("x1",-h.width/2-m).attr("x2",h.width/2+m).attr("y1",-h.height/2-m+f.height+m).attr("y2",-h.height/2-m+f.height+m),ur(e,i),e.intersect=function(_){return ir.rect(e,_)},n},het=(t,e)=>{const{shapeSvg:r,bbox:n}=Yr(t,e,void 0,!0),i=n.height+e.padding,a=n.width+i/4+e.padding,s=r.insert("rect",":first-child").attr("style",e.style).attr("rx",i/2).attr("ry",i/2).attr("x",-a/2).attr("y",-i/2).attr("width",a).attr("height",i);return ur(e,s),e.intersect=function(o){return ir.rect(e,o)},r},fet=(t,e)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=Yr(t,e,void 0,!0),a=r.insert("circle",":first-child");return a.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),H.info("Circle main"),ur(e,a),e.intersect=function(s){return H.info("Circle intersect",e,n.width/2+i,s),ir.circle(e,n.width/2+i,s)},r},det=(t,e)=>{const{shapeSvg:r,bbox:n,halfPadding:i}=Yr(t,e,void 0,!0),a=5,s=r.insert("g",":first-child"),o=s.insert("circle"),l=s.insert("circle");return o.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i+a).attr("width",n.width+e.padding+a*2).attr("height",n.height+e.padding+a*2),l.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("r",n.width/2+i).attr("width",n.width+e.padding).attr("height",n.height+e.padding),H.info("DoubleCircle main"),ur(e,o),e.intersect=function(u){return H.info("DoubleCircle intersect",e,n.width/2+i+a,u),ir.circle(e,n.width/2+i+a,u)},r},pet=(t,e)=>{const{shapeSvg:r,bbox:n}=Yr(t,e,void 0,!0),i=n.width+e.padding,a=n.height+e.padding,s=[{x:0,y:0},{x:i,y:0},{x:i,y:-a},{x:0,y:-a},{x:0,y:0},{x:-8,y:0},{x:i+8,y:0},{x:i+8,y:-a},{x:-8,y:-a},{x:-8,y:0}],o=ca(r,i,a,s);return o.attr("style",e.style),ur(e,o),e.intersect=function(l){return ir.polygon(e,s,l)},r},get=(t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=r.insert("circle",":first-child");return n.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),ur(e,n),e.intersect=function(i){return ir.circle(e,7,i)},r},jA=(t,e,r)=>{const n=t.insert("g").attr("class","node default").attr("id",e.domId||e.id);let i=70,a=10;r==="LR"&&(i=10,a=70);const s=n.append("rect").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join");return ur(e,s),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(o){return ir.rect(e,o)},n},$A={question:Ztt,rect:oet,labelRect:cet,rectWithTitle:uet,choice:Qtt,circle:fet,doublecircle:det,stadium:het,hexagon:Jtt,rect_left_inv_arrow:tet,lean_right:eet,lean_left:ret,trapezoid:net,inv_trapezoid:iet,rect_right_inv_arrow:aet,cylinder:set,start:get,end:(t,e)=>{const r=t.insert("g").attr("class","node default").attr("id",e.domId||e.id),n=r.insert("circle",":first-child"),i=r.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),n.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),ur(e,i),e.intersect=function(a){return ir.circle(e,7,a)},r},note:Ktt,subroutine:pet,fork:jA,join:jA,class_box:(t,e)=>{const r=e.padding/2,n=4,i=8;let a;e.classes?a="node "+e.classes:a="node default";const s=t.insert("g").attr("class",a).attr("id",e.domId||e.id),o=s.insert("rect",":first-child"),l=s.insert("line"),u=s.insert("line");let h=0,d=n;const f=s.insert("g").attr("class","label");let p=0;const m=e.classData.annotations&&e.classData.annotations[0],_=e.classData.annotations[0]?"\xAB"+e.classData.annotations[0]+"\xBB":"",y=f.node().appendChild(xn(_,e.labelStyle,!0,!0));let b=y.getBBox();if(Mr(nt().flowchart.htmlLabels)){const R=y.children[0],A=St(y);b=R.getBoundingClientRect(),A.attr("width",b.width),A.attr("height",b.height)}e.classData.annotations[0]&&(d+=b.height+n,h+=b.width);let x=e.classData.id;e.classData.type!==void 0&&e.classData.type!==""&&(nt().flowchart.htmlLabels?x+="&lt;"+e.classData.type+"&gt;":x+="<"+e.classData.type+">");const k=f.node().appendChild(xn(x,e.labelStyle,!0,!0));St(k).attr("class","classTitle");let T=k.getBBox();if(Mr(nt().flowchart.htmlLabels)){const R=k.children[0],A=St(k);T=R.getBoundingClientRect(),A.attr("width",T.width),A.attr("height",T.height)}d+=T.height+n,T.width>h&&(h=T.width);const C=[];e.classData.members.forEach(R=>{const A=z1(R);let L=A.displayText;nt().flowchart.htmlLabels&&(L=L.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const v=f.node().appendChild(xn(L,A.cssStyle?A.cssStyle:e.labelStyle,!0,!0));let B=v.getBBox();if(Mr(nt().flowchart.htmlLabels)){const w=v.children[0],D=St(v);B=w.getBoundingClientRect(),D.attr("width",B.width),D.attr("height",B.height)}B.width>h&&(h=B.width),d+=B.height+n,C.push(v)}),d+=i;const M=[];if(e.classData.methods.forEach(R=>{const A=z1(R);let L=A.displayText;nt().flowchart.htmlLabels&&(L=L.replace(/</g,"&lt;").replace(/>/g,"&gt;"));const v=f.node().appendChild(xn(L,A.cssStyle?A.cssStyle:e.labelStyle,!0,!0));let B=v.getBBox();if(Mr(nt().flowchart.htmlLabels)){const w=v.children[0],D=St(v);B=w.getBoundingClientRect(),D.attr("width",B.width),D.attr("height",B.height)}B.width>h&&(h=B.width),d+=B.height+n,M.push(v)}),d+=i,m){let R=(h-b.width)/2;St(y).attr("transform","translate( "+(-1*h/2+R)+", "+-1*d/2+")"),p=b.height+n}let S=(h-T.width)/2;return St(k).attr("transform","translate( "+(-1*h/2+S)+", "+(-1*d/2+p)+")"),p+=T.height+n,l.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-d/2-r+i+p).attr("y2",-d/2-r+i+p),p+=i,C.forEach(R=>{St(R).attr("transform","translate( "+-h/2+", "+(-1*d/2+p+i/2)+")"),p+=T.height+n}),p+=i,u.attr("class","divider").attr("x1",-h/2-r).attr("x2",h/2+r).attr("y1",-d/2-r+i+p).attr("y2",-d/2-r+i+p),p+=i,M.forEach(R=>{St(R).attr("transform","translate( "+-h/2+", "+(-1*d/2+p)+")"),p+=T.height+n}),o.attr("class","outer title-state").attr("x",-h/2-r).attr("y",-(d/2)-r).attr("width",h+e.padding).attr("height",d+e.padding),ur(e,o),e.intersect=function(R){return ir.rect(e,R)},s}};let nl={};const yet=(t,e,r)=>{let n,i;if(e.link){let a;nt().securityLevel==="sandbox"?a="_top":e.linkTarget&&(a=e.linkTarget||"_blank"),n=t.insert("svg:a").attr("xlink:href",e.link).attr("target",a),i=$A[e.shape](n,e,r)}else i=$A[e.shape](t,e,r),n=i;e.tooltip&&i.attr("title",e.tooltip),e.class&&i.attr("class","node default "+e.class),nl[e.id]=n,e.haveCallback&&nl[e.id].attr("class",nl[e.id].attr("class")+" clickable")},met=(t,e)=>{nl[e.id]=t},bet=()=>{nl={}},XA=t=>{const e=nl[t.id];H.trace("Transforming node",t.diff,t,"translate("+(t.x-t.width/2-5)+", "+t.width/2+")");const r=8,n=t.diff||0;return t.clusterNode?e.attr("transform","translate("+(t.x+n-t.width/2)+", "+(t.y-t.height/2-r)+")"):e.attr("transform","translate("+t.x+", "+t.y+")"),n},_et={rect:(t,e)=>{H.trace("Creating subgraph rect for ",e.id,e);const r=t.insert("g").attr("class","cluster"+(e.class?" "+e.class:"")).attr("id",e.id),n=r.insert("rect",":first-child"),i=r.insert("g").attr("class","cluster-label"),a=i.node().appendChild(xn(e.labelText,e.labelStyle,void 0,!0));let s=a.getBBox();if(Mr(nt().flowchart.htmlLabels)){const d=a.children[0],f=St(a);s=d.getBoundingClientRect(),f.attr("width",s.width),f.attr("height",s.height)}const o=0*e.padding,l=o/2,u=e.width<=s.width+o?s.width+o:e.width;e.width<=s.width+o?e.diff=(s.width-e.width)/2-e.padding/2:e.diff=-e.padding/2,H.trace("Data ",e,JSON.stringify(e)),n.attr("style",e.style).attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-u/2).attr("y",e.y-e.height/2-l).attr("width",u).attr("height",e.height+o),i.attr("transform","translate("+(e.x-s.width/2)+", "+(e.y-e.height/2+e.padding/3)+")");const h=n.node().getBBox();return e.width=h.width,e.height=h.height,e.intersect=function(d){return Qc(e,d)},r},roundedWithTitle:(t,e)=>{const r=t.insert("g").attr("class",e.classes).attr("id",e.id),n=r.insert("rect",":first-child"),i=r.insert("g").attr("class","cluster-label"),a=r.append("rect"),s=i.node().appendChild(xn(e.labelText,e.labelStyle,void 0,!0));let o=s.getBBox();if(Mr(nt().flowchart.htmlLabels)){const f=s.children[0],p=St(s);o=f.getBoundingClientRect(),p.attr("width",o.width),p.attr("height",o.height)}o=s.getBBox();const l=0*e.padding,u=l/2,h=e.width<=o.width+e.padding?o.width+e.padding:e.width;e.width<=o.width+e.padding?e.diff=(o.width+e.padding*0-e.width)/2:e.diff=-e.padding/2,n.attr("class","outer").attr("x",e.x-h/2-u).attr("y",e.y-e.height/2-u).attr("width",h+l).attr("height",e.height+l),a.attr("class","inner").attr("x",e.x-h/2-u).attr("y",e.y-e.height/2-u+o.height-1).attr("width",h+l).attr("height",e.height+l-o.height-3),i.attr("transform","translate("+(e.x-o.width/2)+", "+(e.y-e.height/2-e.padding/3+(Mr(nt().flowchart.htmlLabels)?5:3))+")");const d=n.node().getBBox();return e.height=d.height,e.intersect=function(f){return Qc(e,f)},r},noteGroup:(t,e)=>{const r=t.insert("g").attr("class","note-cluster").attr("id",e.id),n=r.insert("rect",":first-child"),i=0*e.padding,a=i/2;n.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");const s=n.node().getBBox();return e.width=s.width,e.height=s.height,e.intersect=function(o){return Qc(e,o)},r},divider:(t,e)=>{const r=t.insert("g").attr("class",e.classes).attr("id",e.id),n=r.insert("rect",":first-child"),i=0*e.padding,a=i/2;n.attr("class","divider").attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2).attr("width",e.width+i).attr("height",e.height+i);const s=n.node().getBBox();return e.width=s.width,e.height=s.height,e.diff=-e.padding/2,e.intersect=function(o){return Qc(e,o)},r}};let KA={};const vet=(t,e)=>{H.trace("Inserting cluster");const r=e.shape||"rect";KA[e.id]=_et[r](t,e)},xet=()=>{KA={}};let G1={},Nr={};const ket=()=>{G1={},Nr={}},wet=(t,e)=>{const r=xn(e.label,e.labelStyle),n=t.insert("g").attr("class","edgeLabel"),i=n.insert("g").attr("class","label");i.node().appendChild(r);let a=r.getBBox();if(Mr(nt().flowchart.htmlLabels)){const o=r.children[0],l=St(r);a=o.getBoundingClientRect(),l.attr("width",a.width),l.attr("height",a.height)}i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),G1[e.id]=n,e.width=a.width,e.height=a.height;let s;if(e.startLabelLeft){const o=xn(e.startLabelLeft,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),u=l.insert("g").attr("class","inner");s=u.node().appendChild(o);const h=o.getBBox();u.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),Nr[e.id]||(Nr[e.id]={}),Nr[e.id].startLeft=l,j1(s,e.startLabelLeft)}if(e.startLabelRight){const o=xn(e.startLabelRight,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),u=l.insert("g").attr("class","inner");s=l.node().appendChild(o),u.node().appendChild(o);const h=o.getBBox();u.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),Nr[e.id]||(Nr[e.id]={}),Nr[e.id].startRight=l,j1(s,e.startLabelRight)}if(e.endLabelLeft){const o=xn(e.endLabelLeft,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),u=l.insert("g").attr("class","inner");s=u.node().appendChild(o);const h=o.getBBox();u.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),l.node().appendChild(o),Nr[e.id]||(Nr[e.id]={}),Nr[e.id].endLeft=l,j1(s,e.endLabelLeft)}if(e.endLabelRight){const o=xn(e.endLabelRight,e.labelStyle),l=t.insert("g").attr("class","edgeTerminals"),u=l.insert("g").attr("class","inner");s=u.node().appendChild(o);const h=o.getBBox();u.attr("transform","translate("+-h.width/2+", "+-h.height/2+")"),l.node().appendChild(o),Nr[e.id]||(Nr[e.id]={}),Nr[e.id].endRight=l,j1(s,e.endLabelRight)}};function j1(t,e){nt().flowchart.htmlLabels&&t&&(t.style.width=e.length*9+"px",t.style.height="12px")}const Tet=(t,e)=>{H.info("Moving label abc78 ",t.id,t.label,G1[t.id]);let r=e.updatedPath?e.updatedPath:e.originalPath;if(t.label){const n=G1[t.id];let i=t.x,a=t.y;if(r){const s=Se.calcLabelPosition(r);H.info("Moving label from (",i,",",a,") to (",s.x,",",s.y,") abc78")}n.attr("transform","translate("+i+", "+a+")")}if(t.startLabelLeft){const n=Nr[t.id].startLeft;let i=t.x,a=t.y;if(r){const s=Se.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_left",r);i=s.x,a=s.y}n.attr("transform","translate("+i+", "+a+")")}if(t.startLabelRight){const n=Nr[t.id].startRight;let i=t.x,a=t.y;if(r){const s=Se.calcTerminalLabelPosition(t.arrowTypeStart?10:0,"start_right",r);i=s.x,a=s.y}n.attr("transform","translate("+i+", "+a+")")}if(t.endLabelLeft){const n=Nr[t.id].endLeft;let i=t.x,a=t.y;if(r){const s=Se.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_left",r);i=s.x,a=s.y}n.attr("transform","translate("+i+", "+a+")")}if(t.endLabelRight){const n=Nr[t.id].endRight;let i=t.x,a=t.y;if(r){const s=Se.calcTerminalLabelPosition(t.arrowTypeEnd?10:0,"end_right",r);i=s.x,a=s.y}n.attr("transform","translate("+i+", "+a+")")}},Eet=(t,e)=>{const r=t.x,n=t.y,i=Math.abs(e.x-r),a=Math.abs(e.y-n),s=t.width/2,o=t.height/2;return i>=s||a>=o},Cet=(t,e,r)=>{H.warn(`intersection calc abc89:
+ outsidePoint: ${JSON.stringify(e)}
+ insidePoint : ${JSON.stringify(r)}
+ node : x:${t.x} y:${t.y} w:${t.width} h:${t.height}`);const n=t.x,i=t.y,a=Math.abs(n-r.x),s=t.width/2;let o=r.x<e.x?s-a:s+a;const l=t.height/2,u=Math.abs(e.y-r.y),h=Math.abs(e.x-r.x);if(Math.abs(i-e.y)*s>Math.abs(n-e.x)*l){let d=r.y<e.y?e.y-l-i:i-l-e.y;o=h*d/u;const f={x:r.x<e.x?r.x+o:r.x-h+o,y:r.y<e.y?r.y+u-d:r.y-u+d};return o===0&&(f.x=e.x,f.y=e.y),h===0&&(f.x=e.x),u===0&&(f.y=e.y),H.warn(`abc89 topp/bott calc, Q ${u}, q ${d}, R ${h}, r ${o}`,f),f}else{r.x<e.x?o=e.x-s-n:o=n-s-e.x;let d=u*o/h,f=r.x<e.x?r.x+h-o:r.x-h+o,p=r.y<e.y?r.y+d:r.y-d;return H.warn(`sides calc abc89, Q ${u}, q ${d}, R ${h}, r ${o}`,{_x:f,_y:p}),o===0&&(f=e.x,p=e.y),h===0&&(f=e.x),u===0&&(p=e.y),{x:f,y:p}}},ZA=(t,e)=>{H.warn("abc88 cutPathAtIntersect",t,e);let r=[],n=t[0],i=!1;return t.forEach(a=>{if(H.info("abc88 checking point",a,e),!Eet(e,a)&&!i){const s=Cet(e,n,a);H.warn("abc88 inside",a,n,s),H.warn("abc88 intersection",s);let o=!1;r.forEach(l=>{o=o||l.x===s.x&&l.y===s.y}),r.find(l=>l.x===s.x&&l.y===s.y)?H.warn("abc88 no intersect",s,r):r.push(s),i=!0}else H.warn("abc88 outside",a,n),n=a,i||r.push(a)}),H.warn("abc88 returning points",r),r},Aet=function(t,e,r,n,i,a){let s=r.points,o=!1;const l=a.node(e.v);var u=a.node(e.w);H.info("abc88 InsertEdge: ",r),u.intersect&&l.intersect&&(s=s.slice(1,r.points.length-1),s.unshift(l.intersect(s[0])),H.info("Last point",s[s.length-1],u,u.intersect(s[s.length-1])),s.push(u.intersect(s[s.length-1]))),r.toCluster&&(H.info("to cluster abc88",n[r.toCluster]),s=ZA(r.points,n[r.toCluster].node),o=!0),r.fromCluster&&(H.info("from cluster abc88",n[r.fromCluster]),s=ZA(s.reverse(),n[r.fromCluster].node).reverse(),o=!0);const h=s.filter(b=>!Number.isNaN(b.y));let d;i==="graph"||i==="flowchart"?d=r.curve||Os:d=Os;const f=Ua().x(function(b){return b.x}).y(function(b){return b.y}).curve(d);let p;switch(r.thickness){case"normal":p="edge-thickness-normal";break;case"thick":p="edge-thickness-thick";break;case"invisible":p="edge-thickness-thick";break;default:p=""}switch(r.pattern){case"solid":p+=" edge-pattern-solid";break;case"dotted":p+=" edge-pattern-dotted";break;case"dashed":p+=" edge-pattern-dashed";break}const m=t.append("path").attr("d",f(h)).attr("id",r.id).attr("class"," "+p+(r.classes?" "+r.classes:"")).attr("style",r.style);let _="";switch((nt().flowchart.arrowMarkerAbsolute||nt().state.arrowMarkerAbsolute)&&(_=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,_=_.replace(/\(/g,"\\("),_=_.replace(/\)/g,"\\)")),H.info("arrowTypeStart",r.arrowTypeStart),H.info("arrowTypeEnd",r.arrowTypeEnd),r.arrowTypeStart){case"arrow_cross":m.attr("marker-start","url("+_+"#"+i+"-crossStart)");break;case"arrow_point":m.attr("marker-start","url("+_+"#"+i+"-pointStart)");break;case"arrow_barb":m.attr("marker-start","url("+_+"#"+i+"-barbStart)");break;case"arrow_circle":m.attr("marker-start","url("+_+"#"+i+"-circleStart)");break;case"aggregation":m.attr("marker-start","url("+_+"#"+i+"-aggregationStart)");break;case"extension":m.attr("marker-start","url("+_+"#"+i+"-extensionStart)");break;case"composition":m.attr("marker-start","url("+_+"#"+i+"-compositionStart)");break;case"dependency":m.attr("marker-start","url("+_+"#"+i+"-dependencyStart)");break;case"lollipop":m.attr("marker-start","url("+_+"#"+i+"-lollipopStart)");break}switch(r.arrowTypeEnd){case"arrow_cross":m.attr("marker-end","url("+_+"#"+i+"-crossEnd)");break;case"arrow_point":m.attr("marker-end","url("+_+"#"+i+"-pointEnd)");break;case"arrow_barb":m.attr("marker-end","url("+_+"#"+i+"-barbEnd)");break;case"arrow_circle":m.attr("marker-end","url("+_+"#"+i+"-circleEnd)");break;case"aggregation":m.attr("marker-end","url("+_+"#"+i+"-aggregationEnd)");break;case"extension":m.attr("marker-end","url("+_+"#"+i+"-extensionEnd)");break;case"composition":m.attr("marker-end","url("+_+"#"+i+"-compositionEnd)");break;case"dependency":m.attr("marker-end","url("+_+"#"+i+"-dependencyEnd)");break;case"lollipop":m.attr("marker-end","url("+_+"#"+i+"-lollipopEnd)");break}let y={};return o&&(y.updatedPath=s),y.originalPath=r.points,y},QA=(t,e,r,n)=>{H.info("Graph in recursive render: XXX",cr.json.write(e),n);const i=e.graph().rankdir;H.trace("Dir in recursive render - dir:",i);const a=t.insert("g").attr("class","root");e.nodes()?H.info("Recursive render XXX",e.nodes()):H.info("No nodes found for",e),e.edges().length>0&&H.trace("Recursive edges",e.edge(e.edges()[0]));const s=a.insert("g").attr("class","clusters"),o=a.insert("g").attr("class","edgePaths"),l=a.insert("g").attr("class","edgeLabels"),u=a.insert("g").attr("class","nodes");e.nodes().forEach(function(d){const f=e.node(d);if(typeof n<"u"){const p=JSON.parse(JSON.stringify(n.clusterData));H.info("Setting data for cluster XXX (",d,") ",p,n),e.setNode(n.id,p),e.parent(d)||(H.trace("Setting parent",d,n.id),e.setParent(d,n.id,p))}if(H.info("(Insert) Node XXX"+d+": "+JSON.stringify(e.node(d))),f&&f.clusterNode){H.info("Cluster identified",d,f.width,e.node(d));const p=QA(u,f.graph,r,e.node(d)),m=p.elem;ur(f,m),f.diff=p.diff||0,H.info("Node bounds (abc123)",d,f,f.width,f.x,f.y),met(m,f),H.warn("Recursive render complete ",m,f)}else e.children(d).length>0?(H.info("Cluster - the non recursive path XXX",d,f.id,f,e),H.info(Zc(f.id,e)),Re[f.id]={id:Zc(f.id,e),node:f}):(H.info("Node - the non recursive path",d,f.id,f),yet(u,e.node(d),i))}),e.edges().forEach(function(d){const f=e.edge(d.v,d.w,d.name);H.info("Edge "+d.v+" -> "+d.w+": "+JSON.stringify(d)),H.info("Edge "+d.v+" -> "+d.w+": ",d," ",JSON.stringify(e.edge(d))),H.info("Fix",Re,"ids:",d.v,d.w,"Translateing: ",Re[d.v],Re[d.w]),wet(l,f)}),e.edges().forEach(function(d){H.info("Edge "+d.v+" -> "+d.w+": "+JSON.stringify(d))}),H.info("#############################################"),H.info("### Layout ###"),H.info("#############################################"),H.info(e),Kc.layout(e),H.info("Graph after layout:",cr.json.write(e));let h=0;return Htt(e).forEach(function(d){const f=e.node(d);H.info("Position "+d+": "+JSON.stringify(e.node(d))),H.info("Position "+d+": ("+f.x,","+f.y,") width: ",f.width," height: ",f.height),f&&f.clusterNode?XA(f):e.children(d).length>0?(vet(s,f),Re[f.id].node=f):XA(f)}),e.edges().forEach(function(d){const f=e.edge(d);H.info("Edge "+d.v+" -> "+d.w+": "+JSON.stringify(f),f);const p=Aet(o,d,f,Re,r,e);Tet(f,p)}),e.nodes().forEach(function(d){const f=e.node(d);H.info(d,f.type,f.diff),f.type==="group"&&(h=f.diff)}),{elem:a,diff:h}},i4=(t,e,r,n,i)=>{Ptt(t,r,n,i),bet(),ket(),xet(),Ytt(),H.warn("Graph at first:",cr.json.write(e)),Wtt(e),H.warn("Graph after:",cr.json.write(e)),QA(t,e,n)},Met=t=>pe.sanitizeText(t,nt()),Let=function(t,e,r,n){const i=Object.keys(t);H.info("keys:",i),H.info(t),i.forEach(function(a){const s=t[a];let o="";s.cssClasses.length>0&&(o=o+" "+s.cssClasses.join(" "));const l={labelStyle:""};let u=s.text!==void 0?s.text:s.id,h=0,d="";switch(s.type){case"class":d="class_box";break;default:d="class_box"}e.setNode(s.id,{labelStyle:l.labelStyle,shape:d,labelText:Met(u),classData:s,rx:h,ry:h,class:o,style:l.style,id:s.id,domId:s.domId,tooltip:n.db.getTooltip(s.id)||"",haveCallback:s.haveCallback,link:s.link,width:s.type==="group"?500:void 0,type:s.type,padding:nt().flowchart.padding}),H.info("setNode",{labelStyle:l.labelStyle,shape:d,labelText:u,rx:h,ry:h,class:o,style:l.style,id:s.id,width:s.type==="group"?500:void 0,type:s.type,padding:nt().flowchart.padding})})},Ret=function(t,e){const r=nt().flowchart;let n=0;t.forEach(function(i){n++;const a={};a.classes="relation",a.pattern=i.relation.lineType==1?"dashed":"solid",a.id="id"+n,i.type==="arrow_open"?a.arrowhead="none":a.arrowhead="normal",H.info(a,i),a.startLabelRight=i.relationTitle1==="none"?"":i.relationTitle1,a.endLabelLeft=i.relationTitle2==="none"?"":i.relationTitle2,a.arrowTypeStart=JA(i.relation.type1),a.arrowTypeEnd=JA(i.relation.type2);let s="",o="";if(typeof i.style<"u"){const l=Ka(i.style);s=l.style,o=l.labelStyle}else s="fill:none";a.style=s,a.labelStyle=o,typeof i.interpolate<"u"?a.curve=Ni(i.interpolate,yn):typeof t.defaultInterpolate<"u"?a.curve=Ni(t.defaultInterpolate,yn):a.curve=Ni(r.curve,yn),i.text=i.title,typeof i.text>"u"?typeof i.style<"u"&&(a.arrowheadStyle="fill: #333"):(a.arrowheadStyle="fill: #333",a.labelpos="c",nt().flowchart.htmlLabels?(a.labelType="html",a.label='<span class="edgeLabel">'+i.text+"</span>"):(a.labelType="text",a.label=i.text.replace(pe.lineBreakRegex,`
+`),typeof i.style>"u"&&(a.style=a.style||"stroke: #333; stroke-width: 1.5px;fill:none"),a.labelStyle=a.labelStyle.replace("color:","fill:"))),e.setEdge(i.id1,i.id2,a,n)})},Iet=function(t){Object.keys(t).forEach(function(r){t[r]})},Net=function(t,e,r,n){H.info("Drawing class - ",e);const i=nt().flowchart,a=nt().securityLevel;H.info("config:",i);const s=i.nodeSpacing||50,o=i.rankSpacing||50,l=new cr.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:n.db.getDirection(),nodesep:s,ranksep:o,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}}),u=n.db.getClasses(),h=n.db.getRelations();H.info(h),Let(u,l,e,n),Ret(h,l);let d;a==="sandbox"&&(d=St("#i"+e));const f=St(a==="sandbox"?d.nodes()[0].contentDocument.body:"body"),p=f.select(`[id="${e}"]`),m=f.select("#"+e+" g");if(i4(m,l,["aggregation","extension","composition","dependency","lollipop"],"classDiagram",e),i1(l,p,i.diagramPadding,i.useMaxWidth),!i.htmlLabels){const _=a==="sandbox"?d.nodes()[0].contentDocument:document,y=_.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(let b=0;b<y.length;b++){const x=y[b],k=x.getBBox(),T=_.createElementNS("http://www.w3.org/2000/svg","rect");T.setAttribute("rx",0),T.setAttribute("ry",0),T.setAttribute("width",k.width),T.setAttribute("height",k.height),x.insertBefore(T,x.firstChild)}}bn(n.db,p,e)};function JA(t){let e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;case 4:e="lollipop";break;default:e="none"}return e}const Bet={setConf:Iet,draw:Net};var a4=function(){var t=function(A,L,v,B){for(v=v||{},B=A.length;B--;v[A[B]]=L);return v},e=[1,2],r=[1,5],n=[6,9,11,23,25,27,29,30,31,49],i=[1,17],a=[1,18],s=[1,19],o=[1,20],l=[1,21],u=[1,22],h=[1,25],d=[1,30],f=[1,31],p=[1,32],m=[1,33],_=[6,9,11,15,20,23,25,27,29,30,31,42,43,44,45,49],y=[1,45],b=[30,31,46,47],x=[4,6,9,11,23,25,27,29,30,31,49],k=[42,43,44,45],T=[22,37],C=[1,64],M={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,entityName:17,relSpec:18,role:19,BLOCK_START:20,attributes:21,BLOCK_STOP:22,title:23,title_value:24,acc_title:25,acc_title_value:26,acc_descr:27,acc_descr_value:28,acc_descr_multiline_value:29,ALPHANUM:30,ENTITY_NAME:31,attribute:32,attributeType:33,attributeName:34,attributeKeyType:35,attributeComment:36,ATTRIBUTE_WORD:37,ATTRIBUTE_KEY:38,COMMENT:39,cardinality:40,relType:41,ZERO_OR_ONE:42,ZERO_OR_MORE:43,ONE_OR_MORE:44,ONLY_ONE:45,NON_IDENTIFYING:46,IDENTIFYING:47,WORD:48,open_directive:49,type_directive:50,arg_directive:51,close_directive:52,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",20:"BLOCK_START",22:"BLOCK_STOP",23:"title",24:"title_value",25:"acc_title",26:"acc_title_value",27:"acc_descr",28:"acc_descr_value",29:"acc_descr_multiline_value",30:"ALPHANUM",31:"ENTITY_NAME",37:"ATTRIBUTE_WORD",38:"ATTRIBUTE_KEY",39:"COMMENT",42:"ZERO_OR_ONE",43:"ZERO_OR_MORE",44:"ONE_OR_MORE",45:"ONLY_ONE",46:"NON_IDENTIFYING",47:"IDENTIFYING",48:"WORD",49:"open_directive",50:"type_directive",51:"arg_directive",52:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,5],[10,4],[10,3],[10,1],[10,2],[10,2],[10,2],[10,1],[17,1],[17,1],[21,1],[21,2],[32,2],[32,3],[32,3],[32,4],[33,1],[34,1],[35,1],[36,1],[18,3],[40,1],[40,1],[40,1],[40,1],[41,1],[41,1],[19,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(L,v,B,w,D,N,z){var X=N.length-1;switch(D){case 1:break;case 3:this.$=[];break;case 4:N[X-1].push(N[X]),this.$=N[X-1];break;case 5:case 6:this.$=N[X];break;case 7:case 8:this.$=[];break;case 12:w.addEntity(N[X-4]),w.addEntity(N[X-2]),w.addRelationship(N[X-4],N[X],N[X-2],N[X-3]);break;case 13:w.addEntity(N[X-3]),w.addAttributes(N[X-3],N[X-1]);break;case 14:w.addEntity(N[X-2]);break;case 15:w.addEntity(N[X]);break;case 16:case 17:this.$=N[X].trim(),w.setAccTitle(this.$);break;case 18:case 19:this.$=N[X].trim(),w.setAccDescription(this.$);break;case 20:case 41:this.$=N[X];break;case 21:case 39:case 40:this.$=N[X].replace(/"/g,"");break;case 22:this.$=[N[X]];break;case 23:N[X].push(N[X-1]),this.$=N[X];break;case 24:this.$={attributeType:N[X-1],attributeName:N[X]};break;case 25:this.$={attributeType:N[X-2],attributeName:N[X-1],attributeKeyType:N[X]};break;case 26:this.$={attributeType:N[X-2],attributeName:N[X-1],attributeComment:N[X]};break;case 27:this.$={attributeType:N[X-3],attributeName:N[X-2],attributeKeyType:N[X-1],attributeComment:N[X]};break;case 28:case 29:case 30:this.$=N[X];break;case 31:this.$=N[X].replace(/"/g,"");break;case 32:this.$={cardA:N[X],relType:N[X-1],cardB:N[X-2]};break;case 33:this.$=w.Cardinality.ZERO_OR_ONE;break;case 34:this.$=w.Cardinality.ZERO_OR_MORE;break;case 35:this.$=w.Cardinality.ONE_OR_MORE;break;case 36:this.$=w.Cardinality.ONLY_ONE;break;case 37:this.$=w.Identification.NON_IDENTIFYING;break;case 38:this.$=w.Identification.IDENTIFYING;break;case 42:w.parseDirective("%%{","open_directive");break;case 43:w.parseDirective(N[X],"type_directive");break;case 44:N[X]=N[X].trim().replace(/'/g,'"'),w.parseDirective(N[X],"arg_directive");break;case 45:w.parseDirective("}%%","close_directive","er");break}},table:[{3:1,4:e,7:3,12:4,49:r},{1:[3]},t(n,[2,3],{5:6}),{3:7,4:e,7:3,12:4,49:r},{13:8,50:[1,9]},{50:[2,42]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,23:i,25:a,27:s,29:o,30:l,31:u,49:r},{1:[2,2]},{14:23,15:[1,24],52:h},t([15,52],[2,43]),t(n,[2,8],{1:[2,1]}),t(n,[2,4]),{7:15,10:26,12:4,17:16,23:i,25:a,27:s,29:o,30:l,31:u,49:r},t(n,[2,6]),t(n,[2,7]),t(n,[2,11]),t(n,[2,15],{18:27,40:29,20:[1,28],42:d,43:f,44:p,45:m}),{24:[1,34]},{26:[1,35]},{28:[1,36]},t(n,[2,19]),t(_,[2,20]),t(_,[2,21]),{11:[1,37]},{16:38,51:[1,39]},{11:[2,45]},t(n,[2,5]),{17:40,30:l,31:u},{21:41,22:[1,42],32:43,33:44,37:y},{41:46,46:[1,47],47:[1,48]},t(b,[2,33]),t(b,[2,34]),t(b,[2,35]),t(b,[2,36]),t(n,[2,16]),t(n,[2,17]),t(n,[2,18]),t(x,[2,9]),{14:49,52:h},{52:[2,44]},{15:[1,50]},{22:[1,51]},t(n,[2,14]),{21:52,22:[2,22],32:43,33:44,37:y},{34:53,37:[1,54]},{37:[2,28]},{40:55,42:d,43:f,44:p,45:m},t(k,[2,37]),t(k,[2,38]),{11:[1,56]},{19:57,30:[1,60],31:[1,59],48:[1,58]},t(n,[2,13]),{22:[2,23]},t(T,[2,24],{35:61,36:62,38:[1,63],39:C}),t([22,37,38,39],[2,29]),t([30,31],[2,32]),t(x,[2,10]),t(n,[2,12]),t(n,[2,39]),t(n,[2,40]),t(n,[2,41]),t(T,[2,25],{36:65,39:C}),t(T,[2,26]),t([22,37,39],[2,30]),t(T,[2,31]),t(T,[2,27])],defaultActions:{5:[2,42],7:[2,2],25:[2,45],39:[2,44],45:[2,28],52:[2,23]},parseError:function(L,v){if(v.recoverable)this.trace(L);else{var B=new Error(L);throw B.hash=v,B}},parse:function(L){var v=this,B=[0],w=[],D=[null],N=[],z=this.table,X="",ct=0,J=0,Y=2,$=1,lt=N.slice.call(arguments,1),ut=Object.create(this.lexer),W={yy:{}};for(var tt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,tt)&&(W.yy[tt]=this.yy[tt]);ut.setInput(L,W.yy),W.yy.lexer=ut,W.yy.parser=this,typeof ut.yylloc>"u"&&(ut.yylloc={});var K=ut.yylloc;N.push(K);var it=ut.options&&ut.options.ranges;typeof W.yy.parseError=="function"?this.parseError=W.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function Z(){var Lt;return Lt=w.pop()||ut.lex()||$,typeof Lt!="number"&&(Lt instanceof Array&&(w=Lt,Lt=w.pop()),Lt=v.symbols_[Lt]||Lt),Lt}for(var V,Q,q,U,F={},j,P,et,at;;){if(Q=B[B.length-1],this.defaultActions[Q]?q=this.defaultActions[Q]:((V===null||typeof V>"u")&&(V=Z()),q=z[Q]&&z[Q][V]),typeof q>"u"||!q.length||!q[0]){var It="";at=[];for(j in z[Q])this.terminals_[j]&&j>Y&&at.push("'"+this.terminals_[j]+"'");ut.showPosition?It="Parse error on line "+(ct+1)+`:
+`+ut.showPosition()+`
+Expecting `+at.join(", ")+", got '"+(this.terminals_[V]||V)+"'":It="Parse error on line "+(ct+1)+": Unexpected "+(V==$?"end of input":"'"+(this.terminals_[V]||V)+"'"),this.parseError(It,{text:ut.match,token:this.terminals_[V]||V,line:ut.yylineno,loc:K,expected:at})}if(q[0]instanceof Array&&q.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Q+", token: "+V);switch(q[0]){case 1:B.push(V),D.push(ut.yytext),N.push(ut.yylloc),B.push(q[1]),V=null,J=ut.yyleng,X=ut.yytext,ct=ut.yylineno,K=ut.yylloc;break;case 2:if(P=this.productions_[q[1]][1],F.$=D[D.length-P],F._$={first_line:N[N.length-(P||1)].first_line,last_line:N[N.length-1].last_line,first_column:N[N.length-(P||1)].first_column,last_column:N[N.length-1].last_column},it&&(F._$.range=[N[N.length-(P||1)].range[0],N[N.length-1].range[1]]),U=this.performAction.apply(F,[X,J,ct,W.yy,q[1],D,N].concat(lt)),typeof U<"u")return U;P&&(B=B.slice(0,-1*P*2),D=D.slice(0,-1*P),N=N.slice(0,-1*P)),B.push(this.productions_[q[1]][0]),D.push(F.$),N.push(F._$),et=z[B[B.length-2]][B[B.length-1]],B.push(et);break;case 3:return!0}}return!0}},S=function(){var A={EOF:1,parseError:function(v,B){if(this.yy.parser)this.yy.parser.parseError(v,B);else throw new Error(v)},setInput:function(L,v){return this.yy=v||this.yy||{},this._input=L,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var L=this._input[0];this.yytext+=L,this.yyleng++,this.offset++,this.match+=L,this.matched+=L;var v=L.match(/(?:\r\n?|\n).*/g);return v?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),L},unput:function(L){var v=L.length,B=L.split(/(?:\r\n?|\n)/g);this._input=L+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-v),this.offset-=v;var w=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),B.length-1&&(this.yylineno-=B.length-1);var D=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:B?(B.length===w.length?this.yylloc.first_column:0)+w[w.length-B.length].length-B[0].length:this.yylloc.first_column-v},this.options.ranges&&(this.yylloc.range=[D[0],D[0]+this.yyleng-v]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
+`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(L){this.unput(this.match.slice(L))},pastInput:function(){var L=this.matched.substr(0,this.matched.length-this.match.length);return(L.length>20?"...":"")+L.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var L=this.match;return L.length<20&&(L+=this._input.substr(0,20-L.length)),(L.substr(0,20)+(L.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var L=this.pastInput(),v=new Array(L.length+1).join("-");return L+this.upcomingInput()+`
+`+v+"^"},test_match:function(L,v){var B,w,D;if(this.options.backtrack_lexer&&(D={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(D.yylloc.range=this.yylloc.range.slice(0))),w=L[0].match(/(?:\r\n?|\n).*/g),w&&(this.yylineno+=w.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:w?w[w.length-1].length-w[w.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+L[0].length},this.yytext+=L[0],this.match+=L[0],this.matches=L,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(L[0].length),this.matched+=L[0],B=this.performAction.call(this,this.yy,this,v,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),B)return B;if(this._backtrack){for(var N in D)this[N]=D[N];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var L,v,B,w;this._more||(this.yytext="",this.match="");for(var D=this._currentRules(),N=0;N<D.length;N++)if(B=this._input.match(this.rules[D[N]]),B&&(!v||B[0].length>v[0].length)){if(v=B,w=N,this.options.backtrack_lexer){if(L=this.test_match(B,D[N]),L!==!1)return L;if(this._backtrack){v=!1;continue}else return!1}else if(!this.options.flex)break}return v?(L=this.test_match(v,D[w]),L!==!1?L:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
+`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var v=this.next();return v||this.lex()},begin:function(v){this.conditionStack.push(v)},popState:function(){var v=this.conditionStack.length-1;return v>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(v){return v=this.conditionStack.length-1-Math.abs(v||0),v>=0?this.conditionStack[v]:"INITIAL"},pushState:function(v){this.begin(v)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(v,B,w,D){switch(w){case 0:return this.begin("acc_title"),25;case 1:return this.popState(),"acc_title_value";case 2:return this.begin("acc_descr"),27;case 3:return this.popState(),"acc_descr_value";case 4:this.begin("acc_descr_multiline");break;case 5:this.popState();break;case 6:return"acc_descr_multiline_value";case 7:return this.begin("open_directive"),49;case 8:return this.begin("type_directive"),50;case 9:return this.popState(),this.begin("arg_directive"),15;case 10:return this.popState(),this.popState(),52;case 11:return 51;case 12:break;case 13:break;case 14:return 11;case 15:break;case 16:return 9;case 17:return 31;case 18:return 48;case 19:return 4;case 20:return this.begin("block"),20;case 21:break;case 22:return 38;case 23:return 37;case 24:return 37;case 25:return 39;case 26:break;case 27:return this.popState(),22;case 28:return B.yytext[0];case 29:return 42;case 30:return 43;case 31:return 44;case 32:return 45;case 33:return 42;case 34:return 43;case 35:return 44;case 36:return 46;case 37:return 47;case 38:return 46;case 39:return 46;case 40:return 30;case 41:return B.yytext[0];case 42:return 6}},rules:[/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"%\r\n\v\b\\]+")/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\{)/i,/^(?:\s+)/i,/^(?:\b((?:PK)|(?:FK))\b)/i,/^(?:(.*?)[~](.*?)*[~])/i,/^(?:[A-Za-z][A-Za-z0-9\-_\[\]]*)/i,/^(?:"[^"]*")/i,/^(?:[\n]+)/i,/^(?:\})/i,/^(?:.)/i,/^(?:\|o\b)/i,/^(?:\}o\b)/i,/^(?:\}\|)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z][A-Za-z0-9\-_]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[5,6],inclusive:!1},acc_descr:{rules:[3],inclusive:!1},acc_title:{rules:[1],inclusive:!1},open_directive:{rules:[8],inclusive:!1},type_directive:{rules:[9,10],inclusive:!1},arg_directive:{rules:[10,11],inclusive:!1},block:{rules:[21,22,23,24,25,26,27,28],inclusive:!1},INITIAL:{rules:[0,2,4,7,12,13,14,15,16,17,18,19,20,29,30,31,32,33,34,35,36,37,38,39,40,41,42],inclusive:!0}}};return A}();M.lexer=S;function R(){this.yy={}}return R.prototype=M,M.Parser=R,new R}();a4.parser=a4;const Det=t=>t.match(/^\s*erDiagram/)!==null;let Jc={},s4=[];const Oet={ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE"},Fet={NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},Pet=function(t,e,r){He.parseDirective(this,t,e,r)},tM=function(t){return typeof Jc[t]>"u"&&(Jc[t]={attributes:[]},H.info("Added new entity :",t)),Jc[t]},qet={Cardinality:Oet,Identification:Fet,parseDirective:Pet,getConfig:()=>nt().er,addEntity:tM,addAttributes:function(t,e){let r=tM(t),n;for(n=e.length-1;n>=0;n--)r.attributes.push(e[n]),H.debug("Added attribute ",e[n].attributeName)},getEntities:()=>Jc,addRelationship:function(t,e,r,n){let i={entityA:t,roleA:e,entityB:r,relSpec:n};s4.push(i),H.debug("Added new relationship :",i)},getRelationships:()=>s4,clear:function(){Jc={},s4=[],ci()},setAccTitle:Yn,getAccTitle:ui,setAccDescription:hi,getAccDescription:fi},ua={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END"},ha={ERMarkers:ua,insertMarkers:function(t,e){let r;t.append("defs").append("marker").attr("id",ua.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",ua.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",ua.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),r=t.append("defs").append("marker").attr("id",ua.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",ua.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",ua.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),r=t.append("defs").append("marker").attr("id",ua.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),r=t.append("defs").append("marker").attr("id",ua.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto"),r.append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),r.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")}};let $1;const Vet=new Uint8Array(16);function zet(){if(!$1&&($1=typeof crypto<"u"&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto),!$1))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return $1(Vet)}const Br=[];for(let t=0;t<256;++t)Br.push((t+256).toString(16).slice(1));function Yet(t,e=0){return(Br[t[e+0]]+Br[t[e+1]]+Br[t[e+2]]+Br[t[e+3]]+"-"+Br[t[e+4]]+Br[t[e+5]]+"-"+Br[t[e+6]]+Br[t[e+7]]+"-"+Br[t[e+8]]+Br[t[e+9]]+"-"+Br[t[e+10]]+Br[t[e+11]]+Br[t[e+12]]+Br[t[e+13]]+Br[t[e+14]]+Br[t[e+15]]).toLowerCase()}const eM={randomUUID:typeof crypto<"u"&&crypto.randomUUID&&crypto.randomUUID.bind(crypto)};function Uet(t,e,r){if(eM.randomUUID&&!e&&!t)return eM.randomUUID();t=t||{};const n=t.random||(t.rng||zet)();if(n[6]=n[6]&15|64,n[8]=n[8]&63|128,e){r=r||0;for(let i=0;i<16;++i)e[r+i]=n[i];return e}return Yet(n)}const Wet=/[^A-Za-z0-9]([\W])*/g;let Ye={},tu=new Map;const Het=function(t){const e=Object.keys(t);for(let r=0;r<e.length;r++)Ye[e[r]]=t[e[r]]},Get=(t,e,r)=>{const n=Ye.entityPadding/3,i=Ye.entityPadding/3,a=Ye.fontSize*.85,s=e.node().getBBox(),o=[];let l=!1,u=!1,h=0,d=0,f=0,p=0,m=s.height+n*2,_=1;r.forEach(k=>{k.attributeKeyType!==void 0&&(l=!0),k.attributeComment!==void 0&&(u=!0)}),r.forEach(k=>{const T=`${e.node().id}-attr-${_}`;let C=0;const M=ja(k.attributeType),S=t.append("text").attr("class","er entityLabel").attr("id",`${T}-type`).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+nt().fontFamily+"; font-size: "+a+"px").text(M),R=t.append("text").attr("class","er entityLabel").attr("id",`${T}-name`).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+nt().fontFamily+"; font-size: "+a+"px").text(k.attributeName),A={};A.tn=S,A.nn=R;const L=S.node().getBBox(),v=R.node().getBBox();if(h=Math.max(h,L.width),d=Math.max(d,v.width),C=Math.max(L.height,v.height),l){const B=t.append("text").attr("class","er entityLabel").attr("id",`${T}-key`).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+nt().fontFamily+"; font-size: "+a+"px").text(k.attributeKeyType||"");A.kn=B;const w=B.node().getBBox();f=Math.max(f,w.width),C=Math.max(C,w.height)}if(u){const B=t.append("text").attr("class","er entityLabel").attr("id",`${T}-comment`).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","left").attr("style","font-family: "+nt().fontFamily+"; font-size: "+a+"px").text(k.attributeComment||"");A.cn=B;const w=B.node().getBBox();p=Math.max(p,w.width),C=Math.max(C,w.height)}A.height=C,o.push(A),m+=C+n*2,_+=1});let y=4;l&&(y+=2),u&&(y+=2);const b=h+d+f+p,x={width:Math.max(Ye.minEntityWidth,Math.max(s.width+Ye.entityPadding*2,b+i*y)),height:r.length>0?m:Math.max(Ye.minEntityHeight,s.height+Ye.entityPadding*2)};if(r.length>0){const k=Math.max(0,(x.width-b-i*y)/(y/2));e.attr("transform","translate("+x.width/2+","+(n+s.height/2)+")");let T=s.height+n*2,C="attributeBoxOdd";o.forEach(M=>{const S=T+n+M.height/2;M.tn.attr("transform","translate("+i+","+S+")");const R=t.insert("rect","#"+M.tn.node().id).attr("class",`er ${C}`).attr("fill",Ye.fill).attr("fill-opacity","100%").attr("stroke",Ye.stroke).attr("x",0).attr("y",T).attr("width",h+i*2+k).attr("height",M.height+n*2),A=parseFloat(R.attr("x"))+parseFloat(R.attr("width"));M.nn.attr("transform","translate("+(A+i)+","+S+")");const L=t.insert("rect","#"+M.nn.node().id).attr("class",`er ${C}`).attr("fill",Ye.fill).attr("fill-opacity","100%").attr("stroke",Ye.stroke).attr("x",A).attr("y",T).attr("width",d+i*2+k).attr("height",M.height+n*2);let v=parseFloat(L.attr("x"))+parseFloat(L.attr("width"));if(l){M.kn.attr("transform","translate("+(v+i)+","+S+")");const B=t.insert("rect","#"+M.kn.node().id).attr("class",`er ${C}`).attr("fill",Ye.fill).attr("fill-opacity","100%").attr("stroke",Ye.stroke).attr("x",v).attr("y",T).attr("width",f+i*2+k).attr("height",M.height+n*2);v=parseFloat(B.attr("x"))+parseFloat(B.attr("width"))}u&&(M.cn.attr("transform","translate("+(v+i)+","+S+")"),t.insert("rect","#"+M.cn.node().id).attr("class",`er ${C}`).attr("fill",Ye.fill).attr("fill-opacity","100%").attr("stroke",Ye.stroke).attr("x",v).attr("y",T).attr("width",p+i*2+k).attr("height",M.height+n*2)),T+=M.height+n*2,C=C==="attributeBoxOdd"?"attributeBoxEven":"attributeBoxOdd"})}else x.height=Math.max(Ye.minEntityHeight,m),e.attr("transform","translate("+x.width/2+","+x.height/2+")");return x},jet=function(t,e,r){const n=Object.keys(e);let i;return n.forEach(function(a){const s=Qet(a,"entity");tu.set(a,s);const o=t.append("g").attr("id",s);i=i===void 0?s:i;const l="text-"+s,u=o.append("text").attr("class","er entityLabel").attr("id",l).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("style","font-family: "+nt().fontFamily+"; font-size: "+Ye.fontSize+"px").text(a),{width:h,height:d}=Get(o,u,e[a].attributes),p=o.insert("rect","#"+l).attr("class","er entityBox").attr("fill",Ye.fill).attr("fill-opacity","100%").attr("stroke",Ye.stroke).attr("x",0).attr("y",0).attr("width",h).attr("height",d).node().getBBox();r.setNode(s,{width:p.width,height:p.height,shape:"rect",id:s})}),i},$et=function(t,e){e.nodes().forEach(function(r){typeof r<"u"&&typeof e.node(r)<"u"&&t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )")})},rM=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},Xet=function(t,e){return t.forEach(function(r){e.setEdge(tu.get(r.entityA),tu.get(r.entityB),{relationship:r},rM(r))}),t};let nM=0;const Ket=function(t,e,r,n,i){nM++;const a=r.edge(tu.get(e.entityA),tu.get(e.entityB),rM(e)),s=Ua().x(function(m){return m.x}).y(function(m){return m.y}).curve(Os),o=t.insert("path","#"+n).attr("class","er relationshipLine").attr("d",s(a.points)).attr("stroke",Ye.stroke).attr("fill","none");e.relSpec.relType===i.db.Identification.NON_IDENTIFYING&&o.attr("stroke-dasharray","8,8");let l="";switch(Ye.arrowMarkerAbsolute&&(l=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,l=l.replace(/\(/g,"\\("),l=l.replace(/\)/g,"\\)")),e.relSpec.cardA){case i.db.Cardinality.ZERO_OR_ONE:o.attr("marker-end","url("+l+"#"+ha.ERMarkers.ZERO_OR_ONE_END+")");break;case i.db.Cardinality.ZERO_OR_MORE:o.attr("marker-end","url("+l+"#"+ha.ERMarkers.ZERO_OR_MORE_END+")");break;case i.db.Cardinality.ONE_OR_MORE:o.attr("marker-end","url("+l+"#"+ha.ERMarkers.ONE_OR_MORE_END+")");break;case i.db.Cardinality.ONLY_ONE:o.attr("marker-end","url("+l+"#"+ha.ERMarkers.ONLY_ONE_END+")");break}switch(e.relSpec.cardB){case i.db.Cardinality.ZERO_OR_ONE:o.attr("marker-start","url("+l+"#"+ha.ERMarkers.ZERO_OR_ONE_START+")");break;case i.db.Cardinality.ZERO_OR_MORE:o.attr("marker-start","url("+l+"#"+ha.ERMarkers.ZERO_OR_MORE_START+")");break;case i.db.Cardinality.ONE_OR_MORE:o.attr("marker-start","url("+l+"#"+ha.ERMarkers.ONE_OR_MORE_START+")");break;case i.db.Cardinality.ONLY_ONE:o.attr("marker-start","url("+l+"#"+ha.ERMarkers.ONLY_ONE_START+")");break}const u=o.node().getTotalLength(),h=o.node().getPointAtLength(u*.5),d="rel"+nM,p=t.append("text").attr("class","er relationshipLabel").attr("id",d).attr("x",h.x).attr("y",h.y).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("style","font-family: "+nt().fontFamily+"; font-size: "+Ye.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+d).attr("class","er relationshipLabelBox").attr("x",h.x-p.width/2).attr("y",h.y-p.height/2).attr("width",p.width).attr("height",p.height).attr("fill","white").attr("fill-opacity","85%")},Zet=function(t,e,r,n){Ye=nt().er,H.info("Drawing ER diagram");const i=nt().securityLevel;let a;i==="sandbox"&&(a=St("#i"+e));const o=St(i==="sandbox"?a.nodes()[0].contentDocument.body:"body").select(`[id='${e}']`);ha.insertMarkers(o,Ye);let l;l=new cr.Graph({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:Ye.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});const u=jet(o,n.db.getEntities(),l),h=Xet(n.db.getRelationships(),l);Kc.layout(l),$et(o,l),h.forEach(function(_){Ket(o,_,l,u,n)});const d=Ye.diagramPadding,f=o.node().getBBox(),p=f.width+d*2,m=f.height+d*2;li(o,m,p,Ye.useMaxWidth),o.attr("viewBox",`${f.x-d} ${f.y-d} ${p} ${m}`),bn(n.db,o,e)};function Qet(t="",e=""){const r=t.replace(Wet,"");return`${iM(e)}${iM(r)}${Uet()}`}function iM(t=""){return t.length>0?`${t}-`:""}const Jet={setConf:Het,draw:Zet};var X1=function(){var t=function(Ln,Xt,ee,ce){for(ee=ee||{},ce=Ln.length;ce--;ee[Ln[ce]]=Xt);return ee},e=[1,9],r=[1,7],n=[1,6],i=[1,8],a=[1,20,21,22,23,38,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],s=[2,10],o=[1,20],l=[1,21],u=[1,22],h=[1,23],d=[1,30],f=[1,32],p=[1,33],m=[1,34],_=[1,62],y=[1,48],b=[1,52],x=[1,36],k=[1,37],T=[1,38],C=[1,39],M=[1,40],S=[1,56],R=[1,63],A=[1,51],L=[1,53],v=[1,55],B=[1,59],w=[1,60],D=[1,41],N=[1,42],z=[1,43],X=[1,44],ct=[1,61],J=[1,50],Y=[1,54],$=[1,57],lt=[1,58],ut=[1,49],W=[1,66],tt=[1,71],K=[1,20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],it=[1,75],Z=[1,74],V=[1,76],Q=[20,21,23,81,82],q=[1,99],U=[1,104],F=[1,107],j=[1,108],P=[1,101],et=[1,106],at=[1,109],It=[1,102],Lt=[1,114],Rt=[1,113],Ct=[1,103],pt=[1,105],mt=[1,110],vt=[1,111],Tt=[1,112],ft=[1,115],le=[20,21,22,23,81,82],Dt=[20,21,22,23,53,81,82],Gt=[20,21,22,23,40,52,53,55,57,59,61,63,65,66,67,69,71,73,74,76,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],$t=[20,21,23],Qt=[20,21,23,52,66,67,81,82,91,95,105,106,109,111,112,122,123,124,125,126,127],we=[1,12,20,21,22,23,24,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],jt=[52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],Ft=[1,149],zt=[1,157],wt=[1,158],bt=[1,159],Et=[1,160],kt=[1,144],Ut=[1,145],gt=[1,141],he=[1,152],yt=[1,153],ne=[1,154],ve=[1,155],ye=[1,156],be=[1,161],Te=[1,162],Wt=[1,147],se=[1,150],me=[1,146],ue=[1,143],_a=[20,21,22,23,38,42,44,46,48,52,66,67,86,87,88,89,90,91,95,105,106,109,111,112,118,119,120,121,122,123,124,125,126,127],Hr=[1,165],Ie=[20,21,22,23,26,52,66,67,91,105,106,109,111,112,122,123,124,125,126,127],oe=[20,21,22,23,24,26,38,40,41,42,52,56,58,60,62,64,66,67,68,70,72,73,75,77,81,82,86,87,88,89,90,91,92,95,105,106,109,111,112,113,114,122,123,124,125,126,127],Ke=[12,21,22,24],wr=[22,106],je=[1,250],Ze=[1,245],qt=[1,246],st=[1,254],At=[1,251],Nt=[1,248],Jt=[1,247],ze=[1,249],Pe=[1,252],qe=[1,253],Tr=[1,255],Ve=[1,273],va=[20,21,23,106],Ce=[20,21,22,23,66,67,86,102,105,106,109,110,111,112,113],Wi={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,openDirective:6,typeDirective:7,closeDirective:8,separator:9,":":10,argDirective:11,open_directive:12,type_directive:13,arg_directive:14,close_directive:15,graphConfig:16,document:17,line:18,statement:19,SEMI:20,NEWLINE:21,SPACE:22,EOF:23,GRAPH:24,NODIR:25,DIR:26,FirstStmtSeperator:27,ending:28,endToken:29,spaceList:30,spaceListNewline:31,verticeStatement:32,styleStatement:33,linkStyleStatement:34,classDefStatement:35,classStatement:36,clickStatement:37,subgraph:38,text:39,SQS:40,SQE:41,end:42,direction:43,acc_title:44,acc_title_value:45,acc_descr:46,acc_descr_value:47,acc_descr_multiline_value:48,link:49,node:50,vertex:51,AMP:52,STYLE_SEPARATOR:53,idString:54,DOUBLECIRCLESTART:55,DOUBLECIRCLEEND:56,PS:57,PE:58,"(-":59,"-)":60,STADIUMSTART:61,STADIUMEND:62,SUBROUTINESTART:63,SUBROUTINEEND:64,VERTEX_WITH_PROPS_START:65,ALPHA:66,COLON:67,PIPE:68,CYLINDERSTART:69,CYLINDEREND:70,DIAMOND_START:71,DIAMOND_STOP:72,TAGEND:73,TRAPSTART:74,TRAPEND:75,INVTRAPSTART:76,INVTRAPEND:77,linkStatement:78,arrowText:79,TESTSTR:80,START_LINK:81,LINK:82,textToken:83,STR:84,keywords:85,STYLE:86,LINKSTYLE:87,CLASSDEF:88,CLASS:89,CLICK:90,DOWN:91,UP:92,textNoTags:93,textNoTagsToken:94,DEFAULT:95,stylesOpt:96,alphaNum:97,CALLBACKNAME:98,CALLBACKARGS:99,HREF:100,LINK_TARGET:101,HEX:102,numList:103,INTERPOLATE:104,NUM:105,COMMA:106,style:107,styleComponent:108,MINUS:109,UNIT:110,BRKT:111,DOT:112,PCT:113,TAGSTART:114,alphaNumToken:115,idStringToken:116,alphaNumStatement:117,direction_tb:118,direction_bt:119,direction_rl:120,direction_lr:121,PUNCTUATION:122,UNICODE_TEXT:123,PLUS:124,EQUALS:125,MULT:126,UNDERSCORE:127,graphCodeTokens:128,ARROW_CROSS:129,ARROW_POINT:130,ARROW_CIRCLE:131,ARROW_OPEN:132,QUOTE:133,$accept:0,$end:1},terminals_:{2:"error",10:":",12:"open_directive",13:"type_directive",14:"arg_directive",15:"close_directive",20:"SEMI",21:"NEWLINE",22:"SPACE",23:"EOF",24:"GRAPH",25:"NODIR",26:"DIR",38:"subgraph",40:"SQS",41:"SQE",42:"end",44:"acc_title",45:"acc_title_value",46:"acc_descr",47:"acc_descr_value",48:"acc_descr_multiline_value",52:"AMP",53:"STYLE_SEPARATOR",55:"DOUBLECIRCLESTART",56:"DOUBLECIRCLEEND",57:"PS",58:"PE",59:"(-",60:"-)",61:"STADIUMSTART",62:"STADIUMEND",63:"SUBROUTINESTART",64:"SUBROUTINEEND",65:"VERTEX_WITH_PROPS_START",66:"ALPHA",67:"COLON",68:"PIPE",69:"CYLINDERSTART",70:"CYLINDEREND",71:"DIAMOND_START",72:"DIAMOND_STOP",73:"TAGEND",74:"TRAPSTART",75:"TRAPEND",76:"INVTRAPSTART",77:"INVTRAPEND",80:"TESTSTR",81:"START_LINK",82:"LINK",84:"STR",86:"STYLE",87:"LINKSTYLE",88:"CLASSDEF",89:"CLASS",90:"CLICK",91:"DOWN",92:"UP",95:"DEFAULT",98:"CALLBACKNAME",99:"CALLBACKARGS",100:"HREF",101:"LINK_TARGET",102:"HEX",104:"INTERPOLATE",105:"NUM",106:"COMMA",109:"MINUS",110:"UNIT",111:"BRKT",112:"DOT",113:"PCT",114:"TAGSTART",118:"direction_tb",119:"direction_bt",120:"direction_rl",121:"direction_lr",122:"PUNCTUATION",123:"UNICODE_TEXT",124:"PLUS",125:"EQUALS",126:"MULT",127:"UNDERSCORE",129:"ARROW_CROSS",130:"ARROW_POINT",131:"ARROW_CIRCLE",132:"ARROW_OPEN",133:"QUOTE"},productions_:[0,[3,1],[3,2],[5,4],[5,6],[6,1],[7,1],[11,1],[8,1],[4,2],[17,0],[17,2],[18,1],[18,1],[18,1],[18,1],[18,1],[16,2],[16,2],[16,2],[16,3],[28,2],[28,1],[29,1],[29,1],[29,1],[27,1],[27,1],[27,2],[31,2],[31,2],[31,1],[31,1],[30,2],[30,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,9],[19,6],[19,4],[19,1],[19,2],[19,2],[19,1],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[50,1],[50,5],[50,3],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,8],[51,4],[51,4],[51,4],[51,6],[51,4],[51,4],[51,4],[51,4],[51,4],[51,1],[49,2],[49,3],[49,3],[49,1],[49,3],[78,1],[79,3],[39,1],[39,2],[39,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[85,1],[93,1],[93,2],[35,5],[35,5],[36,5],[37,2],[37,4],[37,3],[37,5],[37,2],[37,4],[37,4],[37,6],[37,2],[37,4],[37,2],[37,4],[37,4],[37,6],[33,5],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[103,1],[103,3],[96,1],[96,3],[107,1],[107,2],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[108,1],[83,1],[83,1],[83,1],[83,1],[83,1],[83,1],[94,1],[94,1],[94,1],[94,1],[54,1],[54,2],[97,1],[97,2],[117,1],[117,1],[117,1],[117,1],[43,1],[43,1],[43,1],[43,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[115,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[116,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1],[128,1]],performAction:function(Xt,ee,ce,Pt,$e,rt,Ks){var ot=rt.length-1;switch($e){case 5:Pt.parseDirective("%%{","open_directive");break;case 6:Pt.parseDirective(rt[ot],"type_directive");break;case 7:rt[ot]=rt[ot].trim().replace(/'/g,'"'),Pt.parseDirective(rt[ot],"arg_directive");break;case 8:Pt.parseDirective("}%%","close_directive","flowchart");break;case 10:this.$=[];break;case 11:(!Array.isArray(rt[ot])||rt[ot].length>0)&&rt[ot-1].push(rt[ot]),this.$=rt[ot-1];break;case 12:case 82:case 84:case 96:case 152:case 154:case 155:this.$=rt[ot];break;case 19:Pt.setDirection("TB"),this.$="TB";break;case 20:Pt.setDirection(rt[ot-1]),this.$=rt[ot-1];break;case 35:this.$=rt[ot-1].nodes;break;case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 41:this.$=Pt.addSubGraph(rt[ot-6],rt[ot-1],rt[ot-4]);break;case 42:this.$=Pt.addSubGraph(rt[ot-3],rt[ot-1],rt[ot-3]);break;case 43:this.$=Pt.addSubGraph(void 0,rt[ot-1],void 0);break;case 45:this.$=rt[ot].trim(),Pt.setAccTitle(this.$);break;case 46:case 47:this.$=rt[ot].trim(),Pt.setAccDescription(this.$);break;case 51:Pt.addLink(rt[ot-2].stmt,rt[ot],rt[ot-1]),this.$={stmt:rt[ot],nodes:rt[ot].concat(rt[ot-2].nodes)};break;case 52:Pt.addLink(rt[ot-3].stmt,rt[ot-1],rt[ot-2]),this.$={stmt:rt[ot-1],nodes:rt[ot-1].concat(rt[ot-3].nodes)};break;case 53:this.$={stmt:rt[ot-1],nodes:rt[ot-1]};break;case 54:this.$={stmt:rt[ot],nodes:rt[ot]};break;case 55:this.$=[rt[ot]];break;case 56:this.$=rt[ot-4].concat(rt[ot]);break;case 57:this.$=[rt[ot-2]],Pt.setClass(rt[ot-2],rt[ot]);break;case 58:this.$=rt[ot-3],Pt.addVertex(rt[ot-3],rt[ot-1],"square");break;case 59:this.$=rt[ot-3],Pt.addVertex(rt[ot-3],rt[ot-1],"doublecircle");break;case 60:this.$=rt[ot-5],Pt.addVertex(rt[ot-5],rt[ot-2],"circle");break;case 61:this.$=rt[ot-3],Pt.addVertex(rt[ot-3],rt[ot-1],"ellipse");break;case 62:this.$=rt[ot-3],Pt.addVertex(rt[ot-3],rt[ot-1],"stadium");break;case 63:this.$=rt[ot-3],Pt.addVertex(rt[ot-3],rt[ot-1],"subroutine");break;case 64:this.$=rt[ot-7],Pt.addVertex(rt[ot-7],rt[ot-1],"rect",void 0,void 0,void 0,Object.fromEntries([[rt[ot-5],rt[ot-3]]]));break;case 65:this.$=rt[ot-3],Pt.addVertex(rt[ot-3],rt[ot-1],"cylinder");break;case 66:this.$=rt[ot-3],Pt.addVertex(rt[ot-3],rt[ot-1],"round");break;case 67:this.$=rt[ot-3],Pt.addVertex(rt[ot-3],rt[ot-1],"diamond");break;case 68:this.$=rt[ot-5],Pt.addVertex(rt[ot-5],rt[ot-2],"hexagon");break;case 69:this.$=rt[ot-3],Pt.addVertex(rt[ot-3],rt[ot-1],"odd");break;case 70:this.$=rt[ot-3],Pt.addVertex(rt[ot-3],rt[ot-1],"trapezoid");break;case 71:this.$=rt[ot-3],Pt.addVertex(rt[ot-3],rt[ot-1],"inv_trapezoid");break;case 72:this.$=rt[ot-3],Pt.addVertex(rt[ot-3],rt[ot-1],"lean_right");break;case 73:this.$=rt[ot-3],Pt.addVertex(rt[ot-3],rt[ot-1],"lean_left");break;case 74:this.$=rt[ot],Pt.addVertex(rt[ot]);break;case 75:rt[ot-1].text=rt[ot],this.$=rt[ot-1];break;case 76:case 77:rt[ot-2].text=rt[ot-1],this.$=rt[ot-2];break;case 78:this.$=rt[ot];break;case 79:var Gr=Pt.destructLink(rt[ot],rt[ot-2]);this.$={type:Gr.type,stroke:Gr.stroke,length:Gr.length,text:rt[ot-1]};break;case 80:var Gr=Pt.destructLink(rt[ot]);this.$={type:Gr.type,stroke:Gr.stroke,length:Gr.length};break;case 81:this.$=rt[ot-1];break;case 83:case 97:case 153:this.$=rt[ot-1]+""+rt[ot];break;case 98:case 99:this.$=rt[ot-4],Pt.addClass(rt[ot-2],rt[ot]);break;case 100:this.$=rt[ot-4],Pt.setClass(rt[ot-2],rt[ot]);break;case 101:case 109:this.$=rt[ot-1],Pt.setClickEvent(rt[ot-1],rt[ot]);break;case 102:case 110:this.$=rt[ot-3],Pt.setClickEvent(rt[ot-3],rt[ot-2]),Pt.setTooltip(rt[ot-3],rt[ot]);break;case 103:this.$=rt[ot-2],Pt.setClickEvent(rt[ot-2],rt[ot-1],rt[ot]);break;case 104:this.$=rt[ot-4],Pt.setClickEvent(rt[ot-4],rt[ot-3],rt[ot-2]),Pt.setTooltip(rt[ot-4],rt[ot]);break;case 105:case 111:this.$=rt[ot-1],Pt.setLink(rt[ot-1],rt[ot]);break;case 106:case 112:this.$=rt[ot-3],Pt.setLink(rt[ot-3],rt[ot-2]),Pt.setTooltip(rt[ot-3],rt[ot]);break;case 107:case 113:this.$=rt[ot-3],Pt.setLink(rt[ot-3],rt[ot-2],rt[ot]);break;case 108:case 114:this.$=rt[ot-5],Pt.setLink(rt[ot-5],rt[ot-4],rt[ot]),Pt.setTooltip(rt[ot-5],rt[ot-2]);break;case 115:this.$=rt[ot-4],Pt.addVertex(rt[ot-2],void 0,void 0,rt[ot]);break;case 116:case 118:this.$=rt[ot-4],Pt.updateLink(rt[ot-2],rt[ot]);break;case 117:this.$=rt[ot-4],Pt.updateLink([rt[ot-2]],rt[ot]);break;case 119:this.$=rt[ot-8],Pt.updateLinkInterpolate([rt[ot-6]],rt[ot-2]),Pt.updateLink([rt[ot-6]],rt[ot]);break;case 120:this.$=rt[ot-8],Pt.updateLinkInterpolate(rt[ot-6],rt[ot-2]),Pt.updateLink(rt[ot-6],rt[ot]);break;case 121:this.$=rt[ot-6],Pt.updateLinkInterpolate([rt[ot-4]],rt[ot]);break;case 122:this.$=rt[ot-6],Pt.updateLinkInterpolate(rt[ot-4],rt[ot]);break;case 123:case 125:this.$=[rt[ot]];break;case 124:case 126:rt[ot-2].push(rt[ot]),this.$=rt[ot-2];break;case 128:this.$=rt[ot-1]+rt[ot];break;case 150:this.$=rt[ot];break;case 151:this.$=rt[ot-1]+""+rt[ot];break;case 156:this.$="v";break;case 157:this.$="-";break;case 158:this.$={stmt:"dir",value:"TB"};break;case 159:this.$={stmt:"dir",value:"BT"};break;case 160:this.$={stmt:"dir",value:"RL"};break;case 161:this.$={stmt:"dir",value:"LR"};break}},table:[{3:1,4:2,5:3,6:5,12:e,16:4,21:r,22:n,24:i},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:e,16:4,21:r,22:n,24:i},t(a,s,{17:11}),{7:12,13:[1,13]},{16:14,21:r,22:n,24:i},{16:15,21:r,22:n,24:i},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:o,21:l,22:u,23:h,32:24,33:25,34:26,35:27,36:28,37:29,38:d,43:31,44:f,46:p,48:m,50:35,51:45,52:_,54:46,66:y,67:b,86:x,87:k,88:T,89:C,90:M,91:S,95:R,105:A,106:L,109:v,111:B,112:w,116:47,118:D,119:N,120:z,121:X,122:ct,123:J,124:Y,125:$,126:lt,127:ut},{8:64,10:[1,65],15:W},t([10,15],[2,6]),t(a,[2,17]),t(a,[2,18]),t(a,[2,19]),{20:[1,68],21:[1,69],22:tt,27:67,30:70},t(K,[2,11]),t(K,[2,12]),t(K,[2,13]),t(K,[2,14]),t(K,[2,15]),t(K,[2,16]),{9:72,20:it,21:Z,23:V,49:73,78:77,81:[1,78],82:[1,79]},{9:80,20:it,21:Z,23:V},{9:81,20:it,21:Z,23:V},{9:82,20:it,21:Z,23:V},{9:83,20:it,21:Z,23:V},{9:84,20:it,21:Z,23:V},{9:86,20:it,21:Z,22:[1,85],23:V},t(K,[2,44]),{45:[1,87]},{47:[1,88]},t(K,[2,47]),t(Q,[2,54],{30:89,22:tt}),{22:[1,90]},{22:[1,91]},{22:[1,92]},{22:[1,93]},{26:q,52:U,66:F,67:j,84:[1,97],91:P,97:96,98:[1,94],100:[1,95],105:et,106:at,109:It,111:Lt,112:Rt,115:100,117:98,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},t(K,[2,158]),t(K,[2,159]),t(K,[2,160]),t(K,[2,161]),t(le,[2,55],{53:[1,116]}),t(Dt,[2,74],{116:129,40:[1,117],52:_,55:[1,118],57:[1,119],59:[1,120],61:[1,121],63:[1,122],65:[1,123],66:y,67:b,69:[1,124],71:[1,125],73:[1,126],74:[1,127],76:[1,128],91:S,95:R,105:A,106:L,109:v,111:B,112:w,122:ct,123:J,124:Y,125:$,126:lt,127:ut}),t(Gt,[2,150]),t(Gt,[2,175]),t(Gt,[2,176]),t(Gt,[2,177]),t(Gt,[2,178]),t(Gt,[2,179]),t(Gt,[2,180]),t(Gt,[2,181]),t(Gt,[2,182]),t(Gt,[2,183]),t(Gt,[2,184]),t(Gt,[2,185]),t(Gt,[2,186]),t(Gt,[2,187]),t(Gt,[2,188]),t(Gt,[2,189]),t(Gt,[2,190]),{9:130,20:it,21:Z,23:V},{11:131,14:[1,132]},t($t,[2,8]),t(a,[2,20]),t(a,[2,26]),t(a,[2,27]),{21:[1,133]},t(Qt,[2,34],{30:134,22:tt}),t(K,[2,35]),{50:135,51:45,52:_,54:46,66:y,67:b,91:S,95:R,105:A,106:L,109:v,111:B,112:w,116:47,122:ct,123:J,124:Y,125:$,126:lt,127:ut},t(we,[2,48]),t(we,[2,49]),t(we,[2,50]),t(jt,[2,78],{79:136,68:[1,138],80:[1,137]}),{22:Ft,24:zt,26:wt,38:bt,39:139,42:Et,52:U,66:F,67:j,73:kt,81:Ut,83:140,84:gt,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},t([52,66,67,68,80,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,80]),t(K,[2,36]),t(K,[2,37]),t(K,[2,38]),t(K,[2,39]),t(K,[2,40]),{22:Ft,24:zt,26:wt,38:bt,39:163,42:Et,52:U,66:F,67:j,73:kt,81:Ut,83:140,84:gt,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},t(_a,s,{17:164}),t(K,[2,45]),t(K,[2,46]),t(Q,[2,53],{52:Hr}),{26:q,52:U,66:F,67:j,91:P,97:166,102:[1,167],105:et,106:at,109:It,111:Lt,112:Rt,115:100,117:98,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{95:[1,168],103:169,105:[1,170]},{26:q,52:U,66:F,67:j,91:P,95:[1,171],97:172,105:et,106:at,109:It,111:Lt,112:Rt,115:100,117:98,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{26:q,52:U,66:F,67:j,91:P,97:173,105:et,106:at,109:It,111:Lt,112:Rt,115:100,117:98,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},t($t,[2,101],{22:[1,174],99:[1,175]}),t($t,[2,105],{22:[1,176]}),t($t,[2,109],{115:100,117:178,22:[1,177],26:q,52:U,66:F,67:j,91:P,105:et,106:at,109:It,111:Lt,112:Rt,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft}),t($t,[2,111],{22:[1,179]}),t(Ie,[2,152]),t(Ie,[2,154]),t(Ie,[2,155]),t(Ie,[2,156]),t(Ie,[2,157]),t(oe,[2,162]),t(oe,[2,163]),t(oe,[2,164]),t(oe,[2,165]),t(oe,[2,166]),t(oe,[2,167]),t(oe,[2,168]),t(oe,[2,169]),t(oe,[2,170]),t(oe,[2,171]),t(oe,[2,172]),t(oe,[2,173]),t(oe,[2,174]),{52:_,54:180,66:y,67:b,91:S,95:R,105:A,106:L,109:v,111:B,112:w,116:47,122:ct,123:J,124:Y,125:$,126:lt,127:ut},{22:Ft,24:zt,26:wt,38:bt,39:181,42:Et,52:U,66:F,67:j,73:kt,81:Ut,83:140,84:gt,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{22:Ft,24:zt,26:wt,38:bt,39:182,42:Et,52:U,66:F,67:j,73:kt,81:Ut,83:140,84:gt,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{22:Ft,24:zt,26:wt,38:bt,39:184,42:Et,52:U,57:[1,183],66:F,67:j,73:kt,81:Ut,83:140,84:gt,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{22:Ft,24:zt,26:wt,38:bt,39:185,42:Et,52:U,66:F,67:j,73:kt,81:Ut,83:140,84:gt,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{22:Ft,24:zt,26:wt,38:bt,39:186,42:Et,52:U,66:F,67:j,73:kt,81:Ut,83:140,84:gt,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{22:Ft,24:zt,26:wt,38:bt,39:187,42:Et,52:U,66:F,67:j,73:kt,81:Ut,83:140,84:gt,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{66:[1,188]},{22:Ft,24:zt,26:wt,38:bt,39:189,42:Et,52:U,66:F,67:j,73:kt,81:Ut,83:140,84:gt,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{22:Ft,24:zt,26:wt,38:bt,39:190,42:Et,52:U,66:F,67:j,71:[1,191],73:kt,81:Ut,83:140,84:gt,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{22:Ft,24:zt,26:wt,38:bt,39:192,42:Et,52:U,66:F,67:j,73:kt,81:Ut,83:140,84:gt,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{22:Ft,24:zt,26:wt,38:bt,39:193,42:Et,52:U,66:F,67:j,73:kt,81:Ut,83:140,84:gt,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{22:Ft,24:zt,26:wt,38:bt,39:194,42:Et,52:U,66:F,67:j,73:kt,81:Ut,83:140,84:gt,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},t(Gt,[2,151]),t(Ke,[2,3]),{8:195,15:W},{15:[2,7]},t(a,[2,28]),t(Qt,[2,33]),t(Q,[2,51],{30:196,22:tt}),t(jt,[2,75],{22:[1,197]}),{22:[1,198]},{22:Ft,24:zt,26:wt,38:bt,39:199,42:Et,52:U,66:F,67:j,73:kt,81:Ut,83:140,84:gt,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{22:Ft,24:zt,26:wt,38:bt,42:Et,52:U,66:F,67:j,73:kt,81:Ut,82:[1,200],83:201,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},t(oe,[2,82]),t(oe,[2,84]),t(oe,[2,140]),t(oe,[2,141]),t(oe,[2,142]),t(oe,[2,143]),t(oe,[2,144]),t(oe,[2,145]),t(oe,[2,146]),t(oe,[2,147]),t(oe,[2,148]),t(oe,[2,149]),t(oe,[2,85]),t(oe,[2,86]),t(oe,[2,87]),t(oe,[2,88]),t(oe,[2,89]),t(oe,[2,90]),t(oe,[2,91]),t(oe,[2,92]),t(oe,[2,93]),t(oe,[2,94]),t(oe,[2,95]),{9:203,20:it,21:Z,22:Ft,23:V,24:zt,26:wt,38:bt,40:[1,202],42:Et,52:U,66:F,67:j,73:kt,81:Ut,83:201,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{18:18,19:19,20:o,21:l,22:u,23:h,32:24,33:25,34:26,35:27,36:28,37:29,38:d,42:[1,204],43:31,44:f,46:p,48:m,50:35,51:45,52:_,54:46,66:y,67:b,86:x,87:k,88:T,89:C,90:M,91:S,95:R,105:A,106:L,109:v,111:B,112:w,116:47,118:D,119:N,120:z,121:X,122:ct,123:J,124:Y,125:$,126:lt,127:ut},{22:tt,30:205},{22:[1,206],26:q,52:U,66:F,67:j,91:P,105:et,106:at,109:It,111:Lt,112:Rt,115:100,117:178,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{22:[1,207]},{22:[1,208]},{22:[1,209],106:[1,210]},t(wr,[2,123]),{22:[1,211]},{22:[1,212],26:q,52:U,66:F,67:j,91:P,105:et,106:at,109:It,111:Lt,112:Rt,115:100,117:178,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{22:[1,213],26:q,52:U,66:F,67:j,91:P,105:et,106:at,109:It,111:Lt,112:Rt,115:100,117:178,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{84:[1,214]},t($t,[2,103],{22:[1,215]}),{84:[1,216],101:[1,217]},{84:[1,218]},t(Ie,[2,153]),{84:[1,219],101:[1,220]},t(le,[2,57],{116:129,52:_,66:y,67:b,91:S,95:R,105:A,106:L,109:v,111:B,112:w,122:ct,123:J,124:Y,125:$,126:lt,127:ut}),{22:Ft,24:zt,26:wt,38:bt,41:[1,221],42:Et,52:U,66:F,67:j,73:kt,81:Ut,83:201,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{22:Ft,24:zt,26:wt,38:bt,42:Et,52:U,56:[1,222],66:F,67:j,73:kt,81:Ut,83:201,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{22:Ft,24:zt,26:wt,38:bt,39:223,42:Et,52:U,66:F,67:j,73:kt,81:Ut,83:140,84:gt,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{22:Ft,24:zt,26:wt,38:bt,42:Et,52:U,58:[1,224],66:F,67:j,73:kt,81:Ut,83:201,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{22:Ft,24:zt,26:wt,38:bt,42:Et,52:U,60:[1,225],66:F,67:j,73:kt,81:Ut,83:201,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{22:Ft,24:zt,26:wt,38:bt,42:Et,52:U,62:[1,226],66:F,67:j,73:kt,81:Ut,83:201,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{22:Ft,24:zt,26:wt,38:bt,42:Et,52:U,64:[1,227],66:F,67:j,73:kt,81:Ut,83:201,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{67:[1,228]},{22:Ft,24:zt,26:wt,38:bt,42:Et,52:U,66:F,67:j,70:[1,229],73:kt,81:Ut,83:201,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{22:Ft,24:zt,26:wt,38:bt,42:Et,52:U,66:F,67:j,72:[1,230],73:kt,81:Ut,83:201,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{22:Ft,24:zt,26:wt,38:bt,39:231,42:Et,52:U,66:F,67:j,73:kt,81:Ut,83:140,84:gt,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{22:Ft,24:zt,26:wt,38:bt,41:[1,232],42:Et,52:U,66:F,67:j,73:kt,81:Ut,83:201,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{22:Ft,24:zt,26:wt,38:bt,42:Et,52:U,66:F,67:j,73:kt,75:[1,233],77:[1,234],81:Ut,83:201,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{22:Ft,24:zt,26:wt,38:bt,42:Et,52:U,66:F,67:j,73:kt,75:[1,236],77:[1,235],81:Ut,83:201,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{9:237,20:it,21:Z,23:V},t(Q,[2,52],{52:Hr}),t(jt,[2,77]),t(jt,[2,76]),{22:Ft,24:zt,26:wt,38:bt,42:Et,52:U,66:F,67:j,68:[1,238],73:kt,81:Ut,83:201,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},t(jt,[2,79]),t(oe,[2,83]),{22:Ft,24:zt,26:wt,38:bt,39:239,42:Et,52:U,66:F,67:j,73:kt,81:Ut,83:140,84:gt,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},t(_a,s,{17:240}),t(K,[2,43]),{51:241,52:_,54:46,66:y,67:b,91:S,95:R,105:A,106:L,109:v,111:B,112:w,116:47,122:ct,123:J,124:Y,125:$,126:lt,127:ut},{22:je,66:Ze,67:qt,86:st,96:242,102:At,105:Nt,107:243,108:244,109:Jt,110:ze,111:Pe,112:qe,113:Tr},{22:je,66:Ze,67:qt,86:st,96:256,102:At,105:Nt,107:243,108:244,109:Jt,110:ze,111:Pe,112:qe,113:Tr},{22:je,66:Ze,67:qt,86:st,96:257,102:At,104:[1,258],105:Nt,107:243,108:244,109:Jt,110:ze,111:Pe,112:qe,113:Tr},{22:je,66:Ze,67:qt,86:st,96:259,102:At,104:[1,260],105:Nt,107:243,108:244,109:Jt,110:ze,111:Pe,112:qe,113:Tr},{105:[1,261]},{22:je,66:Ze,67:qt,86:st,96:262,102:At,105:Nt,107:243,108:244,109:Jt,110:ze,111:Pe,112:qe,113:Tr},{22:je,66:Ze,67:qt,86:st,96:263,102:At,105:Nt,107:243,108:244,109:Jt,110:ze,111:Pe,112:qe,113:Tr},{26:q,52:U,66:F,67:j,91:P,97:264,105:et,106:at,109:It,111:Lt,112:Rt,115:100,117:98,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},t($t,[2,102]),{84:[1,265]},t($t,[2,106],{22:[1,266]}),t($t,[2,107]),t($t,[2,110]),t($t,[2,112],{22:[1,267]}),t($t,[2,113]),t(Dt,[2,58]),t(Dt,[2,59]),{22:Ft,24:zt,26:wt,38:bt,42:Et,52:U,58:[1,268],66:F,67:j,73:kt,81:Ut,83:201,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},t(Dt,[2,66]),t(Dt,[2,61]),t(Dt,[2,62]),t(Dt,[2,63]),{66:[1,269]},t(Dt,[2,65]),t(Dt,[2,67]),{22:Ft,24:zt,26:wt,38:bt,42:Et,52:U,66:F,67:j,72:[1,270],73:kt,81:Ut,83:201,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},t(Dt,[2,69]),t(Dt,[2,70]),t(Dt,[2,72]),t(Dt,[2,71]),t(Dt,[2,73]),t(Ke,[2,4]),t([22,52,66,67,91,95,105,106,109,111,112,122,123,124,125,126,127],[2,81]),{22:Ft,24:zt,26:wt,38:bt,41:[1,271],42:Et,52:U,66:F,67:j,73:kt,81:Ut,83:201,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{18:18,19:19,20:o,21:l,22:u,23:h,32:24,33:25,34:26,35:27,36:28,37:29,38:d,42:[1,272],43:31,44:f,46:p,48:m,50:35,51:45,52:_,54:46,66:y,67:b,86:x,87:k,88:T,89:C,90:M,91:S,95:R,105:A,106:L,109:v,111:B,112:w,116:47,118:D,119:N,120:z,121:X,122:ct,123:J,124:Y,125:$,126:lt,127:ut},t(le,[2,56]),t($t,[2,115],{106:Ve}),t(va,[2,125],{108:274,22:je,66:Ze,67:qt,86:st,102:At,105:Nt,109:Jt,110:ze,111:Pe,112:qe,113:Tr}),t(Ce,[2,127]),t(Ce,[2,129]),t(Ce,[2,130]),t(Ce,[2,131]),t(Ce,[2,132]),t(Ce,[2,133]),t(Ce,[2,134]),t(Ce,[2,135]),t(Ce,[2,136]),t(Ce,[2,137]),t(Ce,[2,138]),t(Ce,[2,139]),t($t,[2,116],{106:Ve}),t($t,[2,117],{106:Ve}),{22:[1,275]},t($t,[2,118],{106:Ve}),{22:[1,276]},t(wr,[2,124]),t($t,[2,98],{106:Ve}),t($t,[2,99],{106:Ve}),t($t,[2,100],{115:100,117:178,26:q,52:U,66:F,67:j,91:P,105:et,106:at,109:It,111:Lt,112:Rt,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft}),t($t,[2,104]),{101:[1,277]},{101:[1,278]},{58:[1,279]},{68:[1,280]},{72:[1,281]},{9:282,20:it,21:Z,23:V},t(K,[2,42]),{22:je,66:Ze,67:qt,86:st,102:At,105:Nt,107:283,108:244,109:Jt,110:ze,111:Pe,112:qe,113:Tr},t(Ce,[2,128]),{26:q,52:U,66:F,67:j,91:P,97:284,105:et,106:at,109:It,111:Lt,112:Rt,115:100,117:98,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{26:q,52:U,66:F,67:j,91:P,97:285,105:et,106:at,109:It,111:Lt,112:Rt,115:100,117:98,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},t($t,[2,108]),t($t,[2,114]),t(Dt,[2,60]),{22:Ft,24:zt,26:wt,38:bt,39:286,42:Et,52:U,66:F,67:j,73:kt,81:Ut,83:140,84:gt,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},t(Dt,[2,68]),t(_a,s,{17:287}),t(va,[2,126],{108:274,22:je,66:Ze,67:qt,86:st,102:At,105:Nt,109:Jt,110:ze,111:Pe,112:qe,113:Tr}),t($t,[2,121],{115:100,117:178,22:[1,288],26:q,52:U,66:F,67:j,91:P,105:et,106:at,109:It,111:Lt,112:Rt,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft}),t($t,[2,122],{115:100,117:178,22:[1,289],26:q,52:U,66:F,67:j,91:P,105:et,106:at,109:It,111:Lt,112:Rt,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft}),{22:Ft,24:zt,26:wt,38:bt,41:[1,290],42:Et,52:U,66:F,67:j,73:kt,81:Ut,83:201,85:151,86:he,87:yt,88:ne,89:ve,90:ye,91:be,92:Te,94:142,95:Wt,105:et,106:at,109:se,111:Lt,112:Rt,113:me,114:ue,115:148,122:Ct,123:pt,124:mt,125:vt,126:Tt,127:ft},{18:18,19:19,20:o,21:l,22:u,23:h,32:24,33:25,34:26,35:27,36:28,37:29,38:d,42:[1,291],43:31,44:f,46:p,48:m,50:35,51:45,52:_,54:46,66:y,67:b,86:x,87:k,88:T,89:C,90:M,91:S,95:R,105:A,106:L,109:v,111:B,112:w,116:47,118:D,119:N,120:z,121:X,122:ct,123:J,124:Y,125:$,126:lt,127:ut},{22:je,66:Ze,67:qt,86:st,96:292,102:At,105:Nt,107:243,108:244,109:Jt,110:ze,111:Pe,112:qe,113:Tr},{22:je,66:Ze,67:qt,86:st,96:293,102:At,105:Nt,107:243,108:244,109:Jt,110:ze,111:Pe,112:qe,113:Tr},t(Dt,[2,64]),t(K,[2,41]),t($t,[2,119],{106:Ve}),t($t,[2,120],{106:Ve})],defaultActions:{2:[2,1],9:[2,5],10:[2,2],132:[2,7]},parseError:function(Xt,ee){if(ee.recoverable)this.trace(Xt);else{var ce=new Error(Xt);throw ce.hash=ee,ce}},parse:function(Xt){var ee=this,ce=[0],Pt=[],$e=[null],rt=[],Ks=this.table,ot="",Gr=0,C0=0,u_=2,S0=1,A0=rt.slice.call(arguments,1),mr=Object.create(this.lexer),Hi={yy:{}};for(var Gi in this.yy)Object.prototype.hasOwnProperty.call(this.yy,Gi)&&(Hi.yy[Gi]=this.yy[Gi]);mr.setInput(Xt,Hi.yy),Hi.yy.lexer=mr,Hi.yy.parser=this,typeof mr.yylloc>"u"&&(mr.yylloc={});var Zs=mr.yylloc;rt.push(Zs);var _u=mr.options&&mr.options.ranges;typeof Hi.yy.parseError=="function"?this.parseError=Hi.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function M0(){var In;return In=Pt.pop()||mr.lex()||S0,typeof In!="number"&&(In instanceof Array&&(Pt=In,In=Pt.pop()),In=ee.symbols_[In]||In),In}for(var Dr,De,hn,xa,_i={},ka,Rn,vu,yl;;){if(De=ce[ce.length-1],this.defaultActions[De]?hn=this.defaultActions[De]:((Dr===null||typeof Dr>"u")&&(Dr=M0()),hn=Ks[De]&&Ks[De][Dr]),typeof hn>"u"||!hn.length||!hn[0]){var Qs="";yl=[];for(ka in Ks[De])this.terminals_[ka]&&ka>u_&&yl.push("'"+this.terminals_[ka]+"'");mr.showPosition?Qs="Parse error on line "+(Gr+1)+`:
+`+mr.showPosition()+`
+Expecting `+yl.join(", ")+", got '"+(this.terminals_[Dr]||Dr)+"'":Qs="Parse error on line "+(Gr+1)+": Unexpected "+(Dr==S0?"end of input":"'"+(this.terminals_[Dr]||Dr)+"'"),this.parseError(Qs,{text:mr.match,token:this.terminals_[Dr]||Dr,line:mr.yylineno,loc:Zs,expected:yl})}if(hn[0]instanceof Array&&hn.length>1)throw new Error("Parse Error: multiple actions possible at state: "+De+", token: "+Dr);switch(hn[0]){case 1:ce.push(Dr),$e.push(mr.yytext),rt.push(mr.yylloc),ce.push(hn[1]),Dr=null,C0=mr.yyleng,ot=mr.yytext,Gr=mr.yylineno,Zs=mr.yylloc;break;case 2:if(Rn=this.productions_[hn[1]][1],_i.$=$e[$e.length-Rn],_i._$={first_line:rt[rt.length-(Rn||1)].first_line,last_line:rt[rt.length-1].last_line,first_column:rt[rt.length-(Rn||1)].first_column,last_column:rt[rt.length-1].last_column},_u&&(_i._$.range=[rt[rt.length-(Rn||1)].range[0],rt[rt.length-1].range[1]]),xa=this.performAction.apply(_i,[ot,C0,Gr,Hi.yy,hn[1],$e,rt].concat(A0)),typeof xa<"u")return xa;Rn&&(ce=ce.slice(0,-1*Rn*2),$e=$e.slice(0,-1*Rn),rt=rt.slice(0,-1*Rn)),ce.push(this.productions_[hn[1]][0]),$e.push(_i.$),rt.push(_i._$),vu=Ks[ce[ce.length-2]][ce[ce.length-1]],ce.push(vu);break;case 3:return!0}}return!0}},E0=function(){var Ln={EOF:1,parseError:function(ee,ce){if(this.yy.parser)this.yy.parser.parseError(ee,ce);else throw new Error(ee)},setInput:function(Xt,ee){return this.yy=ee||this.yy||{},this._input=Xt,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var Xt=this._input[0];this.yytext+=Xt,this.yyleng++,this.offset++,this.match+=Xt,this.matched+=Xt;var ee=Xt.match(/(?:\r\n?|\n).*/g);return ee?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Xt},unput:function(Xt){var ee=Xt.length,ce=Xt.split(/(?:\r\n?|\n)/g);this._input=Xt+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-ee),this.offset-=ee;var Pt=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),ce.length-1&&(this.yylineno-=ce.length-1);var $e=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:ce?(ce.length===Pt.length?this.yylloc.first_column:0)+Pt[Pt.length-ce.length].length-ce[0].length:this.yylloc.first_column-ee},this.options.ranges&&(this.yylloc.range=[$e[0],$e[0]+this.yyleng-ee]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
+`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(Xt){this.unput(this.match.slice(Xt))},pastInput:function(){var Xt=this.matched.substr(0,this.matched.length-this.match.length);return(Xt.length>20?"...":"")+Xt.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var Xt=this.match;return Xt.length<20&&(Xt+=this._input.substr(0,20-Xt.length)),(Xt.substr(0,20)+(Xt.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var Xt=this.pastInput(),ee=new Array(Xt.length+1).join("-");return Xt+this.upcomingInput()+`
+`+ee+"^"},test_match:function(Xt,ee){var ce,Pt,$e;if(this.options.backtrack_lexer&&($e={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&($e.yylloc.range=this.yylloc.range.slice(0))),Pt=Xt[0].match(/(?:\r\n?|\n).*/g),Pt&&(this.yylineno+=Pt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:Pt?Pt[Pt.length-1].length-Pt[Pt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Xt[0].length},this.yytext+=Xt[0],this.match+=Xt[0],this.matches=Xt,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Xt[0].length),this.matched+=Xt[0],ce=this.performAction.call(this,this.yy,this,ee,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),ce)return ce;if(this._backtrack){for(var rt in $e)this[rt]=$e[rt];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Xt,ee,ce,Pt;this._more||(this.yytext="",this.match="");for(var $e=this._currentRules(),rt=0;rt<$e.length;rt++)if(ce=this._input.match(this.rules[$e[rt]]),ce&&(!ee||ce[0].length>ee[0].length)){if(ee=ce,Pt=rt,this.options.backtrack_lexer){if(Xt=this.test_match(ce,$e[rt]),Xt!==!1)return Xt;if(this._backtrack){ee=!1;continue}else return!1}else if(!this.options.flex)break}return ee?(Xt=this.test_match(ee,$e[Pt]),Xt!==!1?Xt:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
+`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var ee=this.next();return ee||this.lex()},begin:function(ee){this.conditionStack.push(ee)},popState:function(){var ee=this.conditionStack.length-1;return ee>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(ee){return ee=this.conditionStack.length-1-Math.abs(ee||0),ee>=0?this.conditionStack[ee]:"INITIAL"},pushState:function(ee){this.begin(ee)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(ee,ce,Pt,$e){switch(Pt){case 0:return this.begin("open_directive"),12;case 1:return this.begin("type_directive"),13;case 2:return this.popState(),this.begin("arg_directive"),10;case 3:return this.popState(),this.popState(),15;case 4:return 14;case 5:break;case 6:break;case 7:return this.begin("acc_title"),44;case 8:return this.popState(),"acc_title_value";case 9:return this.begin("acc_descr"),46;case 10:return this.popState(),"acc_descr_value";case 11:this.begin("acc_descr_multiline");break;case 12:this.popState();break;case 13:return"acc_descr_multiline_value";case 14:this.begin("string");break;case 15:this.popState();break;case 16:return"STR";case 17:return 86;case 18:return 95;case 19:return 87;case 20:return 104;case 21:return 88;case 22:return 89;case 23:this.begin("href");break;case 24:this.popState();break;case 25:return 100;case 26:this.begin("callbackname");break;case 27:this.popState();break;case 28:this.popState(),this.begin("callbackargs");break;case 29:return 98;case 30:this.popState();break;case 31:return 99;case 32:this.begin("click");break;case 33:this.popState();break;case 34:return 90;case 35:return ee.lex.firstGraph()&&this.begin("dir"),24;case 36:return ee.lex.firstGraph()&&this.begin("dir"),24;case 37:return 38;case 38:return 42;case 39:return 101;case 40:return 101;case 41:return 101;case 42:return 101;case 43:return this.popState(),25;case 44:return this.popState(),26;case 45:return this.popState(),26;case 46:return this.popState(),26;case 47:return this.popState(),26;case 48:return this.popState(),26;case 49:return this.popState(),26;case 50:return this.popState(),26;case 51:return this.popState(),26;case 52:return this.popState(),26;case 53:return this.popState(),26;case 54:return 118;case 55:return 119;case 56:return 120;case 57:return 121;case 58:return 105;case 59:return 111;case 60:return 53;case 61:return 67;case 62:return 52;case 63:return 20;case 64:return 106;case 65:return 126;case 66:return 82;case 67:return 82;case 68:return 82;case 69:return 82;case 70:return 81;case 71:return 81;case 72:return 81;case 73:return 59;case 74:return 60;case 75:return 61;case 76:return 62;case 77:return 63;case 78:return 64;case 79:return 65;case 80:return 69;case 81:return 70;case 82:return 55;case 83:return 56;case 84:return 109;case 85:return 112;case 86:return 127;case 87:return 124;case 88:return 113;case 89:return 125;case 90:return 125;case 91:return 114;case 92:return 73;case 93:return 92;case 94:return"SEP";case 95:return 91;case 96:return 66;case 97:return 75;case 98:return 74;case 99:return 77;case 100:return 76;case 101:return 122;case 102:return 123;case 103:return 68;case 104:return 57;case 105:return 58;case 106:return 40;case 107:return 41;case 108:return 71;case 109:return 72;case 110:return 133;case 111:return 21;case 112:return 22;case 113:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[^\}]%%[^\n]*)/,/^(?:accTitle\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*:\s*)/,/^(?:(?!\n||)*[^\n]*)/,/^(?:accDescr\s*\{\s*)/,/^(?:[\}])/,/^(?:[^\}]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:href[\s]+["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:call[\s]+)/,/^(?:\([\s]*\))/,/^(?:\()/,/^(?:[^(]*)/,/^(?:\))/,/^(?:[^)]*)/,/^(?:click[\s]+)/,/^(?:[\s\n])/,/^(?:[^\s\n]*)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:.*direction\s+TB[^\n]*)/,/^(?:.*direction\s+BT[^\n]*)/,/^(?:.*direction\s+RL[^\n]*)/,/^(?:.*direction\s+LR[^\n]*)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*~~[\~]+\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\[)/,/^(?:\]\))/,/^(?:\[\[)/,/^(?:\]\])/,/^(?:\[\|)/,/^(?:\[\()/,/^(?:\)\])/,/^(?:\(\(\()/,/^(?:\)\)\))/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_/])/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[30,31],inclusive:!1},callbackname:{rules:[27,28,29],inclusive:!1},href:{rules:[24,25],inclusive:!1},click:{rules:[33,34],inclusive:!1},vertex:{rules:[],inclusive:!1},dir:{rules:[43,44,45,46,47,48,49,50,51,52,53],inclusive:!1},acc_descr_multiline:{rules:[12,13],inclusive:!1},acc_descr:{rules:[10],inclusive:!1},acc_title:{rules:[8],inclusive:!1},string:{rules:[15,16],inclusive:!1},INITIAL:{rules:[0,5,6,7,9,11,14,17,18,19,20,21,22,23,26,32,35,36,37,38,39,40,41,42,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87,88,89,90,91,92,93,94,95,96,97,98,99,100,101,102,103,104,105,106,107,108,109,110,111,112,113],inclusive:!0}}};return Ln}();Wi.lexer=E0;function bu(){this.yy={}}return bu.prototype=Wi,Wi.Parser=bu,new bu}();X1.parser=X1;const trt=(t,e)=>{var r;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:t.match(/^\s*graph/)!==null},ert=(t,e)=>{var r;return((r=e==null?void 0:e.flowchart)==null?void 0:r.defaultRenderer)==="dagre-wrapper"&&t.match(/^\s*graph/)!==null?!0:t.match(/^\s*flowchart/)!==null},rrt="flowchart-";let aM=0,o4=nt(),ar={},js=[],il=[],qi=[],K1={},l4={},Z1=0,c4=!0,Vi,Q1,J1=[];const t0=t=>pe.sanitizeText(t,o4),nrt=function(t,e,r){He.parseDirective(this,t,e,r)},e0=function(t){const e=Object.keys(ar);for(let r=0;r<e.length;r++)if(ar[e[r]].id===t)return ar[e[r]].domId;return t},irt=function(t,e,r,n,i,a,s={}){let o,l=t;typeof l>"u"||l.trim().length!==0&&(typeof ar[l]>"u"&&(ar[l]={id:l,domId:rrt+l+"-"+aM,styles:[],classes:[]}),aM++,typeof e<"u"?(o4=nt(),o=t0(e.trim()),o[0]==='"'&&o[o.length-1]==='"'&&(o=o.substring(1,o.length-1)),ar[l].text=o):typeof ar[l].text>"u"&&(ar[l].text=t),typeof r<"u"&&(ar[l].type=r),typeof n<"u"&&n!==null&&n.forEach(function(u){ar[l].styles.push(u)}),typeof i<"u"&&i!==null&&i.forEach(function(u){ar[l].classes.push(u)}),typeof a<"u"&&(ar[l].dir=a),ar[l].props=s)},art=function(t,e,r,n){const s={start:t,end:e,type:void 0,text:""};n=r.text,typeof n<"u"&&(s.text=t0(n.trim()),s.text[0]==='"'&&s.text[s.text.length-1]==='"'&&(s.text=s.text.substring(1,s.text.length-1))),typeof r<"u"&&(s.type=r.type,s.stroke=r.stroke,s.length=r.length),js.push(s)},srt=function(t,e,r,n){let i,a;for(i=0;i<t.length;i++)for(a=0;a<e.length;a++)art(t[i],e[a],r,n)},ort=function(t,e){t.forEach(function(r){r==="default"?js.defaultInterpolate=e:js[r].interpolate=e})},lrt=function(t,e){t.forEach(function(r){r==="default"?js.defaultStyle=e:(Se.isSubstringInArray("fill",e)===-1&&e.push("fill:none"),js[r].style=e)})},crt=function(t,e){typeof il[t]>"u"&&(il[t]={id:t,styles:[],textStyles:[]}),typeof e<"u"&&e!==null&&e.forEach(function(r){if(r.match("color")){const i=r.replace("fill","bgFill").replace("color","fill");il[t].textStyles.push(i)}il[t].styles.push(r)})},urt=function(t){Vi=t,Vi.match(/.*</)&&(Vi="RL"),Vi.match(/.*\^/)&&(Vi="BT"),Vi.match(/.*>/)&&(Vi="LR"),Vi.match(/.*v/)&&(Vi="TB")},u4=function(t,e){t.split(",").forEach(function(r){let n=r;typeof ar[n]<"u"&&ar[n].classes.push(e),typeof K1[n]<"u"&&K1[n].classes.push(e)})},hrt=function(t,e){t.split(",").forEach(function(r){typeof e<"u"&&(l4[Q1==="gen-1"?e0(r):r]=t0(e))})},frt=function(t,e,r){let n=e0(t);if(nt().securityLevel!=="loose"||typeof e>"u")return;let i=[];if(typeof r=="string"){i=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let a=0;a<i.length;a++){let s=i[a].trim();s.charAt(0)==='"'&&s.charAt(s.length-1)==='"'&&(s=s.substr(1,s.length-2)),i[a]=s}}i.length===0&&i.push(t),typeof ar[t]<"u"&&(ar[t].haveCallback=!0,J1.push(function(){const a=document.querySelector(`[id="${n}"]`);a!==null&&a.addEventListener("click",function(){Se.runFunc(e,...i)},!1)}))},drt=function(t,e,r){t.split(",").forEach(function(n){typeof ar[n]<"u"&&(ar[n].link=Se.formatUrl(e,o4),ar[n].linkTarget=r)}),u4(t,"clickable")},prt=function(t){return l4[t]},grt=function(t,e,r){t.split(",").forEach(function(n){frt(n,e,r)}),u4(t,"clickable")},yrt=function(t){J1.forEach(function(e){e(t)})},mrt=function(){return Vi.trim()},brt=function(){return ar},_rt=function(){return js},vrt=function(){return il},sM=function(t){let e=St(".mermaidTooltip");(e._groups||e)[0][0]===null&&(e=St("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),St(t).select("svg").selectAll("g.node").on("mouseover",function(){const i=St(this);if(i.attr("title")===null)return;const s=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.text(i.attr("title")).style("left",window.scrollX+s.left+(s.right-s.left)/2+"px").style("top",window.scrollY+s.top-14+document.body.scrollTop+"px"),e.html(e.html().replace(/&lt;br\/&gt;/g,"<br/>")),i.classed("hover",!0)}).on("mouseout",function(){e.transition().duration(500).style("opacity",0),St(this).classed("hover",!1)})};J1.push(sM);const xrt=function(t="gen-1"){ar={},il={},js=[],J1=[sM],qi=[],K1={},Z1=0,l4=[],c4=!0,Q1=t,ci()},krt=t=>{Q1=t||"gen-1"},wrt=function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},Trt=function(t,e,r){let n=t.trim(),i=r.trim();n===i&&i.match(/\s/)&&(n=void 0);function a(h){const d={boolean:{},number:{},string:{}},f=[];let p;return{nodeList:h.filter(function(_){const y=typeof _;return _.stmt&&_.stmt==="dir"?(p=_.value,!1):_.trim()===""?!1:y in d?d[y].hasOwnProperty(_)?!1:d[y][_]=!0:f.indexOf(_)>=0?!1:f.push(_)}),dir:p}}let s=[];const{nodeList:o,dir:l}=a(s.concat.apply(s,e));if(s=o,Q1==="gen-1")for(let h=0;h<s.length;h++)s[h]=e0(s[h]);n=n||"subGraph"+Z1,i=i||"",i=t0(i),Z1=Z1+1;const u={id:n,nodes:s,title:i.trim(),classes:[],dir:l};return H.info("Adding",u.id,u.nodes,u.dir),u.nodes=uM(u,qi).nodes,qi.push(u),K1[n]=u,n},Ert=function(t){for(let e=0;e<qi.length;e++)if(qi[e].id===t)return e;return-1};let eu=-1;const oM=[],lM=function(t,e){const r=qi[e].nodes;if(eu=eu+1,eu>2e3)return;if(oM[eu]=e,qi[e].id===t)return{result:!0,count:0};let n=0,i=1;for(;n<r.length;){const a=Ert(r[n]);if(a>=0){const s=lM(t,a);if(s.result)return{result:!0,count:i+s.count};i=i+s.count}n=n+1}return{result:!1,count:i}},Crt=function(t){return oM[t]},Srt=function(){eu=-1,qi.length>0&&lM("none",qi.length-1)},Art=function(){return qi},Mrt=()=>c4?(c4=!1,!0):!1,Lrt=t=>{let e=t.trim(),r="arrow_open";switch(e[0]){case"<":r="arrow_point",e=e.slice(1);break;case"x":r="arrow_cross",e=e.slice(1);break;case"o":r="arrow_circle",e=e.slice(1);break}let n="normal";return e.indexOf("=")!==-1&&(n="thick"),e.indexOf(".")!==-1&&(n="dotted"),{type:r,stroke:n}},Rrt=(t,e)=>{const r=e.length;let n=0;for(let i=0;i<r;++i)e[i]===t&&++n;return n},Irt=t=>{const e=t.trim();let r=e.slice(0,-1),n="arrow_open";switch(e.slice(-1)){case"x":n="arrow_cross",e[0]==="x"&&(n="double_"+n,r=r.slice(1));break;case">":n="arrow_point",e[0]==="<"&&(n="double_"+n,r=r.slice(1));break;case"o":n="arrow_circle",e[0]==="o"&&(n="double_"+n,r=r.slice(1));break}let i="normal",a=r.length-1;r[0]==="="&&(i="thick"),r[0]==="~"&&(i="invisible");let s=Rrt(".",r);return s&&(i="dotted",a=s),{type:n,stroke:i,length:a}},Nrt=(t,e)=>{const r=Irt(t);let n;if(e){if(n=Lrt(e),n.stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if(n.type==="arrow_open")n.type=r.type;else{if(n.type!==r.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return n.type==="double_arrow"&&(n.type="double_arrow_point"),n.length=r.length,n}return r},cM=(t,e)=>{let r=!1;return t.forEach(n=>{n.nodes.indexOf(e)>=0&&(r=!0)}),r},uM=(t,e)=>{const r=[];return t.nodes.forEach((n,i)=>{cM(e,n)||r.push(t.nodes[i])}),{nodes:r}},fa={parseDirective:nrt,defaultConfig:()=>Xo.flowchart,setAccTitle:Yn,getAccTitle:ui,getAccDescription:fi,setAccDescription:hi,addVertex:irt,lookUpDomId:e0,addLink:srt,updateLinkInterpolate:ort,updateLink:lrt,addClass:crt,setDirection:urt,setClass:u4,setTooltip:hrt,getTooltip:prt,setClickEvent:grt,setLink:drt,bindFunctions:yrt,getDirection:mrt,getVertices:brt,getEdges:_rt,getClasses:vrt,clear:xrt,setGen:krt,defaultStyle:wrt,addSubGraph:Trt,getDepthFirstPos:Crt,indexNodes:Srt,getSubGraphs:Art,destructLink:Nrt,lex:{firstGraph:Mrt},exists:cM,makeUniq:uM};var r0;if(typeof fn=="function")try{r0=cr}catch{}r0||(r0=window.graphlib);var Brt=r0,n0;if(typeof fn=="function")try{n0=DA()}catch{}n0||(n0=window.dagre);var hM=n0,fM=Drt;function Drt(t,e){return t.intersect(e)}var h4=Ort;function Ort(t,e,r,n){var i=t.x,a=t.y,s=i-n.x,o=a-n.y,l=Math.sqrt(e*e*o*o+r*r*s*s),u=Math.abs(e*r*s/l);n.x<i&&(u=-u);var h=Math.abs(e*r*o/l);return n.y<a&&(h=-h),{x:i+u,y:a+h}}var Frt=h4,dM=Prt;function Prt(t,e,r){return Frt(t,e,e,r)}var qrt=Vrt;function Vrt(t,e,r,n){var i,a,s,o,l,u,h,d,f,p,m,_,y,b,x;if(i=e.y-t.y,s=t.x-e.x,l=e.x*t.y-t.x*e.y,f=i*r.x+s*r.y+l,p=i*n.x+s*n.y+l,!(f!==0&&p!==0&&pM(f,p))&&(a=n.y-r.y,o=r.x-n.x,u=n.x*r.y-r.x*n.y,h=a*t.x+o*t.y+u,d=a*e.x+o*e.y+u,!(h!==0&&d!==0&&pM(h,d))&&(m=i*o-a*s,m!==0)))return _=Math.abs(m/2),y=s*u-o*l,b=y<0?(y-_)/m:(y+_)/m,y=a*l-i*u,x=y<0?(y-_)/m:(y+_)/m,{x:b,y:x}}function pM(t,e){return t*e>0}var zrt=qrt,gM=Yrt;function Yrt(t,e,r){var n=t.x,i=t.y,a=[],s=Number.POSITIVE_INFINITY,o=Number.POSITIVE_INFINITY;e.forEach(function(m){s=Math.min(s,m.x),o=Math.min(o,m.y)});for(var l=n-t.width/2-s,u=i-t.height/2-o,h=0;h<e.length;h++){var d=e[h],f=e[h<e.length-1?h+1:0],p=zrt(t,r,{x:l+d.x,y:u+d.y},{x:l+f.x,y:u+f.y});p&&a.push(p)}return a.length?(a.length>1&&a.sort(function(m,_){var y=m.x-r.x,b=m.y-r.y,x=Math.sqrt(y*y+b*b),k=_.x-r.x,T=_.y-r.y,C=Math.sqrt(k*k+T*T);return x<C?-1:x===C?0:1}),a[0]):(console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t)}var yM=Urt;function Urt(t,e){var r=t.x,n=t.y,i=e.x-r,a=e.y-n,s=t.width/2,o=t.height/2,l,u;return Math.abs(a)*s>Math.abs(i)*o?(a<0&&(o=-o),l=a===0?0:o*i/a,u=o):(i<0&&(s=-s),l=s,u=i===0?0:s*a/i),{x:r+l,y:n+u}}var Wrt={node:fM,circle:dM,ellipse:h4,polygon:gM,rect:yM},i0;if(typeof fn=="function")try{i0={defaults:sS(),each:am(),isFunction:Yo,isPlainObject:SS(),pick:HS(),has:$m(),range:XS(),uniqueId:rA()}}catch{}i0||(i0=window._);var al=i0;const Hrt=wn(EH);var ru;if(!ru&&typeof fn=="function")try{ru=Hrt}catch{}ru||(ru=window.d3);var es=ru,mM=al,Gn={isSubgraph:Grt,edgeToId:jrt,applyStyle:Xrt,applyClass:Krt,applyTransition:Zrt};function Grt(t,e){return!!t.children(e).length}function jrt(t){return f4(t.v)+":"+f4(t.w)+":"+f4(t.name)}var $rt=/:/g;function f4(t){return t?String(t).replace($rt,"\\:"):""}function Xrt(t,e){e&&t.attr("style",e)}function Krt(t,e,r){e&&t.attr("class",e).attr("class",r+" "+t.attr("class"))}function Zrt(t,e){var r=e.graph();if(mM.isPlainObject(r)){var n=r.transition;if(mM.isFunction(n))return n(t)}return t}var d4,bM;function Qrt(){if(bM)return d4;bM=1;var t=Gn;d4=e;function e(n,i){for(var a=n.append("text"),s=r(i.label).split(`
+`),o=0;o<s.length;o++)a.append("tspan").attr("xml:space","preserve").attr("dy","1em").attr("x","1").text(s[o]);return t.applyStyle(a,i.labelStyle),a}function r(n){for(var i="",a=!1,s,o=0;o<n.length;++o)if(s=n[o],a){switch(s){case"n":i+=`
+`;break;default:i+=s}a=!1}else s==="\\"?a=!0:i+=s;return i}return d4}var Jrt=Gn,p4=tnt;function tnt(t,e){var r=t.append("foreignObject").attr("width","100000"),n=r.append("xhtml:div");n.attr("xmlns","http://www.w3.org/1999/xhtml");var i=e.label;switch(typeof i){case"function":n.insert(i);break;case"object":n.insert(function(){return i});break;default:n.html(i)}Jrt.applyStyle(n,e.labelStyle),n.style("display","inline-block"),n.style("white-space","nowrap");var a=n.node().getBoundingClientRect();return r.attr("width",a.width).attr("height",a.height),r}var g4,_M;function ent(){if(_M)return g4;_M=1;var t=Gn;g4=e;function e(r,n){var i=r;return i.node().appendChild(n.label),t.applyStyle(i,n.labelStyle),i}return g4}var y4,vM;function m4(){if(vM)return y4;vM=1;var t=Qrt(),e=p4,r=ent();y4=n;function n(i,a,s){var o=a.label,l=i.append("g");a.labelType==="svg"?r(l,a):typeof o!="string"||a.labelType==="html"?e(l,a):t(l,a);var u=l.node().getBBox(),h;switch(s){case"top":h=-a.height/2;break;case"bottom":h=a.height/2-u.height;break;default:h=-u.height/2}return l.attr("transform","translate("+-u.width/2+","+h+")"),l}return y4}var b4,xM;function rnt(){if(xM)return b4;xM=1;var t=al,e=m4(),r=Gn,n=es;b4=i;function i(a,s,o){var l=s.nodes().filter(function(d){return!r.isSubgraph(s,d)}),u=a.selectAll("g.node").data(l,function(d){return d}).classed("update",!0);u.exit().remove(),u.enter().append("g").attr("class","node").style("opacity",0),u=a.selectAll("g.node"),u.each(function(d){var f=s.node(d),p=n.select(this);r.applyClass(p,f.class,(p.classed("update")?"update ":"")+"node"),p.select("g.label").remove();var m=p.append("g").attr("class","label"),_=e(m,f),y=o[f.shape],b=t.pick(_.node().getBBox(),"width","height");f.elem=this,f.id&&p.attr("id",f.id),f.labelId&&m.attr("id",f.labelId),t.has(f,"width")&&(b.width=f.width),t.has(f,"height")&&(b.height=f.height),b.width+=f.paddingLeft+f.paddingRight,b.height+=f.paddingTop+f.paddingBottom,m.attr("transform","translate("+(f.paddingLeft-f.paddingRight)/2+","+(f.paddingTop-f.paddingBottom)/2+")");var x=n.select(this);x.select(".label-container").remove();var k=y(x,b,f).classed("label-container",!0);r.applyStyle(k,f.style);var T=k.node().getBBox();f.width=T.width,f.height=T.height});var h;return u.exit?h=u.exit():h=u.selectAll(null),r.applyTransition(h,s).style("opacity",0).remove(),u}return b4}var _4,kM;function nnt(){if(kM)return _4;kM=1;var t=Gn,e=es,r=m4();_4=n;function n(i,a){var s=a.nodes().filter(function(u){return t.isSubgraph(a,u)}),o=i.selectAll("g.cluster").data(s,function(u){return u});o.selectAll("*").remove(),o.enter().append("g").attr("class","cluster").attr("id",function(u){var h=a.node(u);return h.id}).style("opacity",0),o=i.selectAll("g.cluster"),t.applyTransition(o,a).style("opacity",1),o.each(function(u){var h=a.node(u),d=e.select(this);e.select(this).append("rect");var f=d.append("g").attr("class","label");r(f,h,h.clusterLabelPos)}),o.selectAll("rect").each(function(u){var h=a.node(u),d=e.select(this);t.applyStyle(d,h.style)});var l;return o.exit?l=o.exit():l=o.selectAll(null),t.applyTransition(l,a).style("opacity",0).remove(),o}return _4}var v4,wM;function int(){if(wM)return v4;wM=1;var t=al,e=m4(),r=Gn,n=es;v4=i;function i(a,s){var o=a.selectAll("g.edgeLabel").data(s.edges(),function(u){return r.edgeToId(u)}).classed("update",!0);o.exit().remove(),o.enter().append("g").classed("edgeLabel",!0).style("opacity",0),o=a.selectAll("g.edgeLabel"),o.each(function(u){var h=n.select(this);h.select(".label").remove();var d=s.edge(u),f=e(h,s.edge(u),0,0).classed("label",!0),p=f.node().getBBox();d.labelId&&f.attr("id",d.labelId),t.has(d,"width")||(d.width=p.width),t.has(d,"height")||(d.height=p.height)});var l;return o.exit?l=o.exit():l=o.selectAll(null),r.applyTransition(l,s).style("opacity",0).remove(),o}return v4}var x4,TM;function ant(){if(TM)return x4;TM=1;var t=al,e=fM,r=Gn,n=es;x4=i;function i(d,f,p){var m=d.selectAll("g.edgePath").data(f.edges(),function(b){return r.edgeToId(b)}).classed("update",!0),_=u(m,f);h(m,f);var y=m.merge!==void 0?m.merge(_):m;return r.applyTransition(y,f).style("opacity",1),y.each(function(b){var x=n.select(this),k=f.edge(b);k.elem=this,k.id&&x.attr("id",k.id),r.applyClass(x,k.class,(x.classed("update")?"update ":"")+"edgePath")}),y.selectAll("path.path").each(function(b){var x=f.edge(b);x.arrowheadId=t.uniqueId("arrowhead");var k=n.select(this).attr("marker-end",function(){return"url("+a(location.href,x.arrowheadId)+")"}).style("fill","none");r.applyTransition(k,f).attr("d",function(T){return s(f,T)}),r.applyStyle(k,x.style)}),y.selectAll("defs *").remove(),y.selectAll("defs").each(function(b){var x=f.edge(b),k=p[x.arrowhead];k(n.select(this),x.arrowheadId,x,"arrowhead")}),y}function a(d,f){var p=d.split("#")[0];return p+"#"+f}function s(d,f){var p=d.edge(f),m=d.node(f.v),_=d.node(f.w),y=p.points.slice(1,p.points.length-1);return y.unshift(e(m,y[0])),y.push(e(_,y[y.length-1])),o(p,y)}function o(d,f){var p=(n.line||n.svg.line)().x(function(m){return m.x}).y(function(m){return m.y});return(p.curve||p.interpolate)(d.curve),p(f)}function l(d){var f=d.getBBox(),p=d.ownerSVGElement.getScreenCTM().inverse().multiply(d.getScreenCTM()).translate(f.width/2,f.height/2);return{x:p.e,y:p.f}}function u(d,f){var p=d.enter().append("g").attr("class","edgePath").style("opacity",0);return p.append("path").attr("class","path").attr("d",function(m){var _=f.edge(m),y=f.node(m.v).elem,b=t.range(_.points.length).map(function(){return l(y)});return o(_,b)}),p.append("defs"),p}function h(d,f){var p=d.exit();r.applyTransition(p,f).style("opacity",0).remove()}return x4}var k4,EM;function snt(){if(EM)return k4;EM=1;var t=Gn,e=es;k4=r;function r(n,i){var a=n.filter(function(){return!e.select(this).classed("update")});function s(o){var l=i.node(o);return"translate("+l.x+","+l.y+")"}a.attr("transform",s),t.applyTransition(n,i).style("opacity",1).attr("transform",s)}return k4}var w4,CM;function ont(){if(CM)return w4;CM=1;var t=Gn,e=es,r=al;w4=n;function n(i,a){var s=i.filter(function(){return!e.select(this).classed("update")});function o(l){var u=a.edge(l);return r.has(u,"x")?"translate("+u.x+","+u.y+")":""}s.attr("transform",o),t.applyTransition(i,a).style("opacity",1).attr("transform",o)}return w4}var T4,SM;function lnt(){if(SM)return T4;SM=1;var t=Gn,e=es;T4=r;function r(n,i){var a=n.filter(function(){return!e.select(this).classed("update")});function s(o){var l=i.node(o);return"translate("+l.x+","+l.y+")"}a.attr("transform",s),t.applyTransition(n,i).style("opacity",1).attr("transform",s),t.applyTransition(a.selectAll("rect"),i).attr("width",function(o){return i.node(o).width}).attr("height",function(o){return i.node(o).height}).attr("x",function(o){var l=i.node(o);return-l.width/2}).attr("y",function(o){var l=i.node(o);return-l.height/2})}return T4}var E4,AM;function cnt(){if(AM)return E4;AM=1;var t=yM,e=h4,r=dM,n=gM;E4={rect:i,ellipse:a,circle:s,diamond:o};function i(l,u,h){var d=l.insert("rect",":first-child").attr("rx",h.rx).attr("ry",h.ry).attr("x",-u.width/2).attr("y",-u.height/2).attr("width",u.width).attr("height",u.height);return h.intersect=function(f){return t(h,f)},d}function a(l,u,h){var d=u.width/2,f=u.height/2,p=l.insert("ellipse",":first-child").attr("x",-u.width/2).attr("y",-u.height/2).attr("rx",d).attr("ry",f);return h.intersect=function(m){return e(h,d,f,m)},p}function s(l,u,h){var d=Math.max(u.width,u.height)/2,f=l.insert("circle",":first-child").attr("x",-u.width/2).attr("y",-u.height/2).attr("r",d);return h.intersect=function(p){return r(h,d,p)},f}function o(l,u,h){var d=u.width*Math.SQRT2/2,f=u.height*Math.SQRT2/2,p=[{x:0,y:-f},{x:-d,y:0},{x:0,y:f},{x:d,y:0}],m=l.insert("polygon",":first-child").attr("points",p.map(function(_){return _.x+","+_.y}).join(" "));return h.intersect=function(_){return n(h,p,_)},m}return E4}var C4,MM;function unt(){if(MM)return C4;MM=1;var t=Gn;C4={default:e,normal:e,vee:r,undirected:n};function e(i,a,s,o){var l=i.append("marker").attr("id",a).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),u=l.append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");t.applyStyle(u,s[o+"Style"]),s[o+"Class"]&&u.attr("class",s[o+"Class"])}function r(i,a,s,o){var l=i.append("marker").attr("id",a).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),u=l.append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");t.applyStyle(u,s[o+"Style"]),s[o+"Class"]&&u.attr("class",s[o+"Class"])}function n(i,a,s,o){var l=i.append("marker").attr("id",a).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto"),u=l.append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");t.applyStyle(u,s[o+"Style"]),s[o+"Class"]&&u.attr("class",s[o+"Class"])}return C4}var Ur=al,hnt=es,fnt=hM.layout,dnt=pnt;function pnt(){var t=rnt(),e=nnt(),r=int(),n=ant(),i=snt(),a=ont(),s=lnt(),o=cnt(),l=unt(),u=function(h,d){mnt(d);var f=nu(h,"output"),p=nu(f,"clusters"),m=nu(f,"edgePaths"),_=r(nu(f,"edgeLabels"),d),y=t(nu(f,"nodes"),d,o);fnt(d),i(y,d),a(_,d),n(m,d,l);var b=e(p,d);s(b,d),bnt(d)};return u.createNodes=function(h){return arguments.length?(t=h,u):t},u.createClusters=function(h){return arguments.length?(e=h,u):e},u.createEdgeLabels=function(h){return arguments.length?(r=h,u):r},u.createEdgePaths=function(h){return arguments.length?(n=h,u):n},u.shapes=function(h){return arguments.length?(o=h,u):o},u.arrows=function(h){return arguments.length?(l=h,u):l},u}var gnt={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},ynt={arrowhead:"normal",curve:hnt.curveLinear};function mnt(t){t.nodes().forEach(function(e){var r=t.node(e);!Ur.has(r,"label")&&!t.children(e).length&&(r.label=e),Ur.has(r,"paddingX")&&Ur.defaults(r,{paddingLeft:r.paddingX,paddingRight:r.paddingX}),Ur.has(r,"paddingY")&&Ur.defaults(r,{paddingTop:r.paddingY,paddingBottom:r.paddingY}),Ur.has(r,"padding")&&Ur.defaults(r,{paddingLeft:r.padding,paddingRight:r.padding,paddingTop:r.padding,paddingBottom:r.padding}),Ur.defaults(r,gnt),Ur.each(["paddingLeft","paddingRight","paddingTop","paddingBottom"],function(n){r[n]=Number(r[n])}),Ur.has(r,"width")&&(r._prevWidth=r.width),Ur.has(r,"height")&&(r._prevHeight=r.height)}),t.edges().forEach(function(e){var r=t.edge(e);Ur.has(r,"label")||(r.label=""),Ur.defaults(r,ynt)})}function bnt(t){Ur.each(t.nodes(),function(e){var r=t.node(e);Ur.has(r,"_prevWidth")?r.width=r._prevWidth:delete r.width,Ur.has(r,"_prevHeight")?r.height=r._prevHeight:delete r.height,delete r._prevWidth,delete r._prevHeight})}function nu(t,e){var r=t.select("g."+e);return r.empty()&&(r=t.append("g").attr("class",e)),r}var _nt="0.6.4";/**
* @license
* Copyright (c) 2012-2013 Chris Pettitt
*
@@ -20,13 +1200,81 @@
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
- */
-t.exports={graphlib:n(311),dagre:n(153),intersect:n(368),render:n(370),util:n(12),version:n(382)}},function(t,e){t.exports=function(t){return t.webpackPolyfill||(t.deprecate=function(){},t.paths=[],t.children||(t.children=[]),Object.defineProperty(t,"loaded",{enumerable:!0,get:function(){return t.l}}),Object.defineProperty(t,"id",{enumerable:!0,get:function(){return t.i}}),t.webpackPolyfill=1),t}},function(t,e,n){"use strict";var r=n(4),i=n(17).Graph;function a(t,e,n,i){var a;do{a=r.uniqueId(i)}while(t.hasNode(a));return n.dummy=e,t.setNode(a,n),a}function o(t){return r.max(r.map(t.nodes(),(function(e){var n=t.node(e).rank;if(!r.isUndefined(n))return n})))}t.exports={addDummyNode:a,simplify:function(t){var e=(new i).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){var r=e.edge(n.v,n.w)||{weight:0,minlen:1},i=t.edge(n);e.setEdge(n.v,n.w,{weight:r.weight+i.weight,minlen:Math.max(r.minlen,i.minlen)})})),e},asNonCompoundGraph:function(t){var e=new i({multigraph:t.isMultigraph()}).setGraph(t.graph());return r.forEach(t.nodes(),(function(n){t.children(n).length||e.setNode(n,t.node(n))})),r.forEach(t.edges(),(function(n){e.setEdge(n,t.edge(n))})),e},successorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.outEdges(e),(function(e){n[e.w]=(n[e.w]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},predecessorWeights:function(t){var e=r.map(t.nodes(),(function(e){var n={};return r.forEach(t.inEdges(e),(function(e){n[e.v]=(n[e.v]||0)+t.edge(e).weight})),n}));return r.zipObject(t.nodes(),e)},intersectRect:function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,u=t.height/2;if(!o&&!s)throw new Error("Not possible to find intersection inside of the rectangle");Math.abs(s)*c>Math.abs(o)*u?(s<0&&(u=-u),n=u*o/s,r=u):(o<0&&(c=-c),n=c,r=c*s/o);return{x:i+n,y:a+r}},buildLayerMatrix:function(t){var e=r.map(r.range(o(t)+1),(function(){return[]}));return r.forEach(t.nodes(),(function(n){var i=t.node(n),a=i.rank;r.isUndefined(a)||(e[a][i.order]=n)})),e},normalizeRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank})));r.forEach(t.nodes(),(function(n){var i=t.node(n);r.has(i,"rank")&&(i.rank-=e)}))},removeEmptyRanks:function(t){var e=r.min(r.map(t.nodes(),(function(e){return t.node(e).rank}))),n=[];r.forEach(t.nodes(),(function(r){var i=t.node(r).rank-e;n[i]||(n[i]=[]),n[i].push(r)}));var i=0,a=t.graph().nodeRankFactor;r.forEach(n,(function(e,n){r.isUndefined(e)&&n%a!=0?--i:i&&r.forEach(e,(function(e){t.node(e).rank+=i}))}))},addBorderNode:function(t,e,n,r){var i={width:0,height:0};arguments.length>=4&&(i.rank=n,i.order=r);return a(t,"border",i,e)},maxRank:o,partition:function(t,e){var n={lhs:[],rhs:[]};return r.forEach(t,(function(t){e(t)?n.lhs.push(t):n.rhs.push(t)})),n},time:function(t,e){var n=r.now();try{return e()}finally{console.log(t+" time: "+(r.now()-n)+"ms")}},notime:function(t,e){return e()}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(173),i=n(174),a=n(175),o={channel:r.default,lang:i.default,unit:a.default};e.default=o},function(t,e,n){var r;try{r={clone:n(199),constant:n(86),each:n(87),filter:n(128),has:n(93),isArray:n(5),isEmpty:n(276),isFunction:n(37),isUndefined:n(139),keys:n(30),map:n(140),reduce:n(142),size:n(279),transform:n(285),union:n(286),values:n(147)}}catch(t){}r||(r=window._),t.exports=r},function(t,e){t.exports=function(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}},function(t,e,n){var r=n(43);t.exports={isSubgraph:function(t,e){return!!t.children(e).length},edgeToId:function(t){return a(t.v)+":"+a(t.w)+":"+a(t.name)},applyStyle:function(t,e){e&&t.attr("style",e)},applyClass:function(t,e,n){e&&t.attr("class",e).attr("class",n+" "+t.attr("class"))},applyTransition:function(t,e){var n=e.graph();if(r.isPlainObject(n)){var i=n.transition;if(r.isFunction(i))return i(t)}return t}};var i=/:/g;function a(t){return t?String(t).replace(i,"\\:"):""}},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,7],n=[1,6],r=[1,14],i=[1,25],a=[1,28],o=[1,26],s=[1,27],c=[1,29],u=[1,30],l=[1,31],h=[1,33],f=[1,34],d=[1,35],p=[10,19],g=[1,47],y=[1,48],v=[1,49],m=[1,50],b=[1,51],x=[1,52],_=[10,19,25,32,33,41,44,45,46,47,48,49],k=[10,19,23,25,32,33,37,41,44,45,46,47,48,49,66,67,68],w=[10,13,17,19],E=[41,66,67,68],T=[41,48,49,66,67,68],C=[41,44,45,46,47,66,67,68],A=[10,19,25],S=[1,81],M={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,graphConfig:6,openDirective:7,typeDirective:8,closeDirective:9,NEWLINE:10,":":11,argDirective:12,open_directive:13,type_directive:14,arg_directive:15,close_directive:16,CLASS_DIAGRAM:17,statements:18,EOF:19,statement:20,className:21,alphaNumToken:22,GENERICTYPE:23,relationStatement:24,LABEL:25,classStatement:26,methodStatement:27,annotationStatement:28,clickStatement:29,cssClassStatement:30,CLASS:31,STYLE_SEPARATOR:32,STRUCT_START:33,members:34,STRUCT_STOP:35,ANNOTATION_START:36,ANNOTATION_END:37,MEMBER:38,SEPARATOR:39,relation:40,STR:41,relationType:42,lineType:43,AGGREGATION:44,EXTENSION:45,COMPOSITION:46,DEPENDENCY:47,LINE:48,DOTTED_LINE:49,CALLBACK:50,LINK:51,CSSCLASS:52,commentToken:53,textToken:54,graphCodeTokens:55,textNoTagsToken:56,TAGSTART:57,TAGEND:58,"==":59,"--":60,PCT:61,DEFAULT:62,SPACE:63,MINUS:64,keywords:65,UNICODE_TEXT:66,NUM:67,ALPHA:68,$accept:0,$end:1},terminals_:{2:"error",10:"NEWLINE",11:":",13:"open_directive",14:"type_directive",15:"arg_directive",16:"close_directive",17:"CLASS_DIAGRAM",19:"EOF",23:"GENERICTYPE",25:"LABEL",31:"CLASS",32:"STYLE_SEPARATOR",33:"STRUCT_START",35:"STRUCT_STOP",36:"ANNOTATION_START",37:"ANNOTATION_END",38:"MEMBER",39:"SEPARATOR",41:"STR",44:"AGGREGATION",45:"EXTENSION",46:"COMPOSITION",47:"DEPENDENCY",48:"LINE",49:"DOTTED_LINE",50:"CALLBACK",51:"LINK",52:"CSSCLASS",55:"graphCodeTokens",57:"TAGSTART",58:"TAGEND",59:"==",60:"--",61:"PCT",62:"DEFAULT",63:"SPACE",64:"MINUS",65:"keywords",66:"UNICODE_TEXT",67:"NUM",68:"ALPHA"},productions_:[0,[3,1],[3,2],[4,1],[5,4],[5,6],[7,1],[8,1],[12,1],[9,1],[6,4],[18,1],[18,2],[18,3],[21,1],[21,2],[21,3],[21,2],[20,1],[20,2],[20,1],[20,1],[20,1],[20,1],[20,1],[20,1],[26,2],[26,4],[26,5],[26,7],[28,4],[34,1],[34,2],[27,1],[27,2],[27,1],[27,1],[24,3],[24,4],[24,4],[24,5],[40,3],[40,2],[40,2],[40,1],[42,1],[42,1],[42,1],[42,1],[43,1],[43,1],[29,3],[29,4],[29,3],[29,4],[30,3],[53,1],[53,1],[54,1],[54,1],[54,1],[54,1],[54,1],[54,1],[54,1],[56,1],[56,1],[56,1],[56,1],[22,1],[22,1],[22,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 6:r.parseDirective("%%{","open_directive");break;case 7:r.parseDirective(a[s],"type_directive");break;case 8:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 9:r.parseDirective("}%%","close_directive","class");break;case 14:this.$=a[s];break;case 15:this.$=a[s-1]+a[s];break;case 16:this.$=a[s-2]+"~"+a[s-1]+a[s];break;case 17:this.$=a[s-1]+"~"+a[s];break;case 18:r.addRelation(a[s]);break;case 19:a[s-1].title=r.cleanupLabel(a[s]),r.addRelation(a[s-1]);break;case 26:r.addClass(a[s]);break;case 27:r.addClass(a[s-2]),r.setCssClass(a[s-2],a[s]);break;case 28:r.addClass(a[s-3]),r.addMembers(a[s-3],a[s-1]);break;case 29:r.addClass(a[s-5]),r.setCssClass(a[s-5],a[s-3]),r.addMembers(a[s-5],a[s-1]);break;case 30:r.addAnnotation(a[s],a[s-2]);break;case 31:this.$=[a[s]];break;case 32:a[s].push(a[s-1]),this.$=a[s];break;case 33:break;case 34:r.addMember(a[s-1],r.cleanupLabel(a[s]));break;case 35:case 36:break;case 37:this.$={id1:a[s-2],id2:a[s],relation:a[s-1],relationTitle1:"none",relationTitle2:"none"};break;case 38:this.$={id1:a[s-3],id2:a[s],relation:a[s-1],relationTitle1:a[s-2],relationTitle2:"none"};break;case 39:this.$={id1:a[s-3],id2:a[s],relation:a[s-2],relationTitle1:"none",relationTitle2:a[s-1]};break;case 40:this.$={id1:a[s-4],id2:a[s],relation:a[s-2],relationTitle1:a[s-3],relationTitle2:a[s-1]};break;case 41:this.$={type1:a[s-2],type2:a[s],lineType:a[s-1]};break;case 42:this.$={type1:"none",type2:a[s],lineType:a[s-1]};break;case 43:this.$={type1:a[s-1],type2:"none",lineType:a[s]};break;case 44:this.$={type1:"none",type2:"none",lineType:a[s]};break;case 45:this.$=r.relationType.AGGREGATION;break;case 46:this.$=r.relationType.EXTENSION;break;case 47:this.$=r.relationType.COMPOSITION;break;case 48:this.$=r.relationType.DEPENDENCY;break;case 49:this.$=r.lineType.LINE;break;case 50:this.$=r.lineType.DOTTED_LINE;break;case 51:this.$=a[s-2],r.setClickEvent(a[s-1],a[s],void 0);break;case 52:this.$=a[s-3],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 53:this.$=a[s-2],r.setLink(a[s-1],a[s],void 0);break;case 54:this.$=a[s-3],r.setLink(a[s-2],a[s-1],a[s]);break;case 55:r.setCssClass(a[s-1],a[s])}},table:[{3:1,4:2,5:3,6:4,7:5,13:e,17:n},{1:[3]},{1:[2,1]},{3:8,4:2,5:3,6:4,7:5,13:e,17:n},{1:[2,3]},{8:9,14:[1,10]},{10:[1,11]},{14:[2,6]},{1:[2,2]},{9:12,11:[1,13],16:r},t([11,16],[2,7]),{5:23,7:5,13:e,18:15,20:16,21:24,22:32,24:17,26:18,27:19,28:20,29:21,30:22,31:i,36:a,38:o,39:s,50:c,51:u,52:l,66:h,67:f,68:d},{10:[1,36]},{12:37,15:[1,38]},{10:[2,9]},{19:[1,39]},{10:[1,40],19:[2,11]},t(p,[2,18],{25:[1,41]}),t(p,[2,20]),t(p,[2,21]),t(p,[2,22]),t(p,[2,23]),t(p,[2,24]),t(p,[2,25]),t(p,[2,33],{40:42,42:45,43:46,25:[1,44],41:[1,43],44:g,45:y,46:v,47:m,48:b,49:x}),{21:53,22:32,66:h,67:f,68:d},t(p,[2,35]),t(p,[2,36]),{22:54,66:h,67:f,68:d},{21:55,22:32,66:h,67:f,68:d},{21:56,22:32,66:h,67:f,68:d},{41:[1,57]},t(_,[2,14],{22:32,21:58,23:[1,59],66:h,67:f,68:d}),t(k,[2,69]),t(k,[2,70]),t(k,[2,71]),t(w,[2,4]),{9:60,16:r},{16:[2,8]},{1:[2,10]},{5:23,7:5,13:e,18:61,19:[2,12],20:16,21:24,22:32,24:17,26:18,27:19,28:20,29:21,30:22,31:i,36:a,38:o,39:s,50:c,51:u,52:l,66:h,67:f,68:d},t(p,[2,19]),{21:62,22:32,41:[1,63],66:h,67:f,68:d},{40:64,42:45,43:46,44:g,45:y,46:v,47:m,48:b,49:x},t(p,[2,34]),{43:65,48:b,49:x},t(E,[2,44],{42:66,44:g,45:y,46:v,47:m}),t(T,[2,45]),t(T,[2,46]),t(T,[2,47]),t(T,[2,48]),t(C,[2,49]),t(C,[2,50]),t(p,[2,26],{32:[1,67],33:[1,68]}),{37:[1,69]},{41:[1,70]},{41:[1,71]},{22:72,66:h,67:f,68:d},t(_,[2,15]),t(_,[2,17],{22:32,21:73,66:h,67:f,68:d}),{10:[1,74]},{19:[2,13]},t(A,[2,37]),{21:75,22:32,66:h,67:f,68:d},{21:76,22:32,41:[1,77],66:h,67:f,68:d},t(E,[2,43],{42:78,44:g,45:y,46:v,47:m}),t(E,[2,42]),{22:79,66:h,67:f,68:d},{34:80,38:S},{21:82,22:32,66:h,67:f,68:d},t(p,[2,51],{41:[1,83]}),t(p,[2,53],{41:[1,84]}),t(p,[2,55]),t(_,[2,16]),t(w,[2,5]),t(A,[2,39]),t(A,[2,38]),{21:85,22:32,66:h,67:f,68:d},t(E,[2,41]),t(p,[2,27],{33:[1,86]}),{35:[1,87]},{34:88,35:[2,31],38:S},t(p,[2,30]),t(p,[2,52]),t(p,[2,54]),t(A,[2,40]),{34:89,38:S},t(p,[2,28]),{35:[2,32]},{35:[1,90]},t(p,[2,29])],defaultActions:{2:[2,1],4:[2,3],7:[2,6],8:[2,2],14:[2,9],38:[2,8],39:[2,10],61:[2,13],88:[2,32]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,A,S,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in S=[],o[k])this.terminals_[T]&&T>h&&S.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:S})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,g.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0}},O={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),13;case 1:return this.begin("type_directive"),14;case 2:return this.popState(),this.begin("arg_directive"),11;case 3:return this.popState(),this.popState(),16;case 4:return 15;case 5:case 6:break;case 7:return 10;case 8:break;case 9:case 10:return 17;case 11:return this.begin("struct"),33;case 12:return"EOF_IN_STRUCT";case 13:return"OPEN_IN_STRUCT";case 14:return this.popState(),35;case 15:break;case 16:return"MEMBER";case 17:return 31;case 18:return 52;case 19:return 50;case 20:return 51;case 21:return 36;case 22:return 37;case 23:this.begin("generic");break;case 24:this.popState();break;case 25:return"GENERICTYPE";case 26:this.begin("string");break;case 27:this.popState();break;case 28:return"STR";case 29:case 30:return 45;case 31:case 32:return 47;case 33:return 46;case 34:return 44;case 35:return 48;case 36:return 49;case 37:return 25;case 38:return 32;case 39:return 64;case 40:return"DOT";case 41:return"PLUS";case 42:return 61;case 43:case 44:return"EQUALS";case 45:return 68;case 46:return"PUNCTUATION";case 47:return 67;case 48:return 66;case 49:return 63;case 50:return 19}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)*[^\n]*(\r?\n?)+)/,/^(?:%%[^\n]*(\r?\n)*)/,/^(?:(\r?\n)+)/,/^(?:\s+)/,/^(?:classDiagram-v2\b)/,/^(?:classDiagram\b)/,/^(?:[{])/,/^(?:$)/,/^(?:[{])/,/^(?:[}])/,/^(?:[\n])/,/^(?:[^{}\n]*)/,/^(?:class\b)/,/^(?:cssClass\b)/,/^(?:callback\b)/,/^(?:link\b)/,/^(?:<<)/,/^(?:>>)/,/^(?:[~])/,/^(?:[~])/,/^(?:[^~]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:\s*<\|)/,/^(?:\s*\|>)/,/^(?:\s*>)/,/^(?:\s*<)/,/^(?:\s*\*)/,/^(?:\s*o\b)/,/^(?:--)/,/^(?:\.\.)/,/^(?::{1}[^:\n;]+)/,/^(?::{3})/,/^(?:-)/,/^(?:\.)/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:\w+)/,/^(?:[!"#$%&'*+,-.`?\\/])/,/^(?:[0-9]+)/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\s)/,/^(?:$)/],conditions:{string:{rules:[27,28],inclusive:!1},generic:{rules:[24,25],inclusive:!1},struct:{rules:[12,13,14,15,16],inclusive:!1},open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,17,18,19,20,21,22,23,26,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50],inclusive:!0}}};function D(){this.yy={}}return M.lexer=O,D.prototype=M,M.Parser=D,new D}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(19).readFileSync(n(20).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(14),n(7)(t))},function(t,e){var n,r,i=t.exports={};function a(){throw new Error("setTimeout has not been defined")}function o(){throw new Error("clearTimeout has not been defined")}function s(t){if(n===setTimeout)return setTimeout(t,0);if((n===a||!n)&&setTimeout)return n=setTimeout,setTimeout(t,0);try{return n(t,0)}catch(e){try{return n.call(null,t,0)}catch(e){return n.call(this,t,0)}}}!function(){try{n="function"==typeof setTimeout?setTimeout:a}catch(t){n=a}try{r="function"==typeof clearTimeout?clearTimeout:o}catch(t){r=o}}();var c,u=[],l=!1,h=-1;function f(){l&&c&&(l=!1,c.length?u=c.concat(u):h=-1,u.length&&d())}function d(){if(!l){var t=s(f);l=!0;for(var e=u.length;e;){for(c=u,u=[];++h<e;)c&&c[h].run();h=-1,e=u.length}c=null,l=!1,function(t){if(r===clearTimeout)return clearTimeout(t);if((r===o||!r)&&clearTimeout)return r=clearTimeout,clearTimeout(t);try{r(t)}catch(e){try{return r.call(null,t)}catch(e){return r.call(this,t)}}}(t)}}function p(t,e){this.fun=t,this.array=e}function g(){}i.nextTick=function(t){var e=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)e[n-1]=arguments[n];u.push(new p(t,e)),1!==u.length||l||s(d)},p.prototype.run=function(){this.fun.apply(null,this.array)},i.title="browser",i.browser=!0,i.env={},i.argv=[],i.version="",i.versions={},i.on=g,i.addListener=g,i.once=g,i.off=g,i.removeListener=g,i.removeAllListeners=g,i.emit=g,i.prependListener=g,i.prependOnceListener=g,i.listeners=function(t){return[]},i.binding=function(t){throw new Error("process.binding is not supported")},i.cwd=function(){return"/"},i.chdir=function(t){throw new Error("process.chdir is not supported")},i.umask=function(){return 0}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(75),i=n(99),a=n(179),o=n(180),s=n(181),c={format:{keyword:a.default,hex:i.default,rgb:o.default,rgba:o.default,hsl:s.default,hsla:s.default},parse:function(t){if("string"!=typeof t)return t;var e=i.default.parse(t)||o.default.parse(t)||s.default.parse(t)||a.default.parse(t);if(e)return e;throw new Error('Unsupported color format: "'+t+'"')},stringify:function(t){return!t.changed&&t.color?t.color:t.type.is(r.TYPE.HSL)||void 0===t.data.r?s.default.stringify(t):t.a<1||!Number.isInteger(t.r)||!Number.isInteger(t.g)||!Number.isInteger(t.b)?o.default.stringify(t):i.default.stringify(t)}};e.default=c},function(t,e,n){var r=n(109),i="object"==typeof self&&self&&self.Object===Object&&self,a=r||i||Function("return this")();t.exports=a},function(t,e,n){var r;try{r=n(3)}catch(t){}r||(r=window.graphlib),t.exports=r},function(t,e,n){t.exports={graphlib:n(17),layout:n(312),debug:n(366),util:{time:n(8).time,notime:n(8).notime},version:n(367)}},function(t,e){},function(t,e,n){(function(t){function n(t,e){for(var n=0,r=t.length-1;r>=0;r--){var i=t[r];"."===i?t.splice(r,1):".."===i?(t.splice(r,1),n++):n&&(t.splice(r,1),n--)}if(e)for(;n--;n)t.unshift("..");return t}function r(t,e){if(t.filter)return t.filter(e);for(var n=[],r=0;r<t.length;r++)e(t[r],r,t)&&n.push(t[r]);return n}e.resolve=function(){for(var e="",i=!1,a=arguments.length-1;a>=-1&&!i;a--){var o=a>=0?arguments[a]:t.cwd();if("string"!=typeof o)throw new TypeError("Arguments to path.resolve must be strings");o&&(e=o+"/"+e,i="/"===o.charAt(0))}return(i?"/":"")+(e=n(r(e.split("/"),(function(t){return!!t})),!i).join("/"))||"."},e.normalize=function(t){var a=e.isAbsolute(t),o="/"===i(t,-1);return(t=n(r(t.split("/"),(function(t){return!!t})),!a).join("/"))||a||(t="."),t&&o&&(t+="/"),(a?"/":"")+t},e.isAbsolute=function(t){return"/"===t.charAt(0)},e.join=function(){var t=Array.prototype.slice.call(arguments,0);return e.normalize(r(t,(function(t,e){if("string"!=typeof t)throw new TypeError("Arguments to path.join must be strings");return t})).join("/"))},e.relative=function(t,n){function r(t){for(var e=0;e<t.length&&""===t[e];e++);for(var n=t.length-1;n>=0&&""===t[n];n--);return e>n?[]:t.slice(e,n-e+1)}t=e.resolve(t).substr(1),n=e.resolve(n).substr(1);for(var i=r(t.split("/")),a=r(n.split("/")),o=Math.min(i.length,a.length),s=o,c=0;c<o;c++)if(i[c]!==a[c]){s=c;break}var u=[];for(c=s;c<i.length;c++)u.push("..");return(u=u.concat(a.slice(s))).join("/")},e.sep="/",e.delimiter=":",e.dirname=function(t){if("string"!=typeof t&&(t+=""),0===t.length)return".";for(var e=t.charCodeAt(0),n=47===e,r=-1,i=!0,a=t.length-1;a>=1;--a)if(47===(e=t.charCodeAt(a))){if(!i){r=a;break}}else i=!1;return-1===r?n?"/":".":n&&1===r?"/":t.slice(0,r)},e.basename=function(t,e){var n=function(t){"string"!=typeof t&&(t+="");var e,n=0,r=-1,i=!0;for(e=t.length-1;e>=0;--e)if(47===t.charCodeAt(e)){if(!i){n=e+1;break}}else-1===r&&(i=!1,r=e+1);return-1===r?"":t.slice(n,r)}(t);return e&&n.substr(-1*e.length)===e&&(n=n.substr(0,n.length-e.length)),n},e.extname=function(t){"string"!=typeof t&&(t+="");for(var e=-1,n=0,r=-1,i=!0,a=0,o=t.length-1;o>=0;--o){var s=t.charCodeAt(o);if(47!==s)-1===r&&(i=!1,r=o+1),46===s?-1===e?e=o:1!==a&&(a=1):-1!==e&&(a=-1);else if(!i){n=o+1;break}}return-1===e||-1===r||0===a||1===a&&e===r-1&&e===n+1?"":t.slice(e,r)};var i="b"==="ab".substr(-1)?function(t,e,n){return t.substr(e,n)}:function(t,e,n){return e<0&&(e=t.length+e),t.substr(e,n)}}).call(this,n(14))},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t}},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,3],r=[1,5],i=[1,7],a=[2,5],o=[1,15],s=[1,17],c=[1,19],u=[1,20],l=[1,21],h=[1,22],f=[1,28],d=[1,23],p=[1,24],g=[1,25],y=[1,26],v=[1,29],m=[1,32],b=[1,4,5,14,15,17,19,20,22,23,24,25,26,36,39],x=[1,4,5,12,13,14,15,17,19,20,22,23,24,25,26,36,39],_=[1,4,5,7,14,15,17,19,20,22,23,24,25,26,36,39],k=[4,5,14,15,17,19,20,22,23,24,25,26,36,39],w={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,directive:6,SD:7,document:8,line:9,statement:10,idStatement:11,DESCR:12,"--\x3e":13,HIDE_EMPTY:14,scale:15,WIDTH:16,COMPOSIT_STATE:17,STRUCT_START:18,STRUCT_STOP:19,STATE_DESCR:20,AS:21,ID:22,FORK:23,JOIN:24,CONCURRENT:25,note:26,notePosition:27,NOTE_TEXT:28,openDirective:29,typeDirective:30,closeDirective:31,":":32,argDirective:33,eol:34,";":35,EDGE_STATE:36,left_of:37,right_of:38,open_directive:39,type_directive:40,arg_directive:41,close_directive:42,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",7:"SD",12:"DESCR",13:"--\x3e",14:"HIDE_EMPTY",15:"scale",16:"WIDTH",17:"COMPOSIT_STATE",18:"STRUCT_START",19:"STRUCT_STOP",20:"STATE_DESCR",21:"AS",22:"ID",23:"FORK",24:"JOIN",25:"CONCURRENT",26:"note",28:"NOTE_TEXT",32:":",35:";",36:"EDGE_STATE",37:"left_of",38:"right_of",39:"open_directive",40:"type_directive",41:"arg_directive",42:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,1],[10,2],[10,1],[10,4],[10,3],[10,6],[10,1],[10,1],[10,1],[10,4],[10,4],[10,1],[6,3],[6,5],[34,1],[34,1],[11,1],[11,1],[27,1],[27,1],[29,1],[30,1],[33,1],[31,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 4:return r.setRootDoc(a[s]),a[s];case 5:this.$=[];break;case 6:"nl"!=a[s]&&(a[s-1].push(a[s]),this.$=a[s-1]);break;case 7:case 8:this.$=a[s];break;case 9:this.$="nl";break;case 10:this.$={stmt:"state",id:a[s],type:"default",description:""};break;case 11:this.$={stmt:"state",id:a[s-1],type:"default",description:r.trimColon(a[s])};break;case 12:this.$={stmt:"relation",state1:{stmt:"state",id:a[s-2],type:"default",description:""},state2:{stmt:"state",id:a[s],type:"default",description:""}};break;case 13:this.$={stmt:"relation",state1:{stmt:"state",id:a[s-3],type:"default",description:""},state2:{stmt:"state",id:a[s-1],type:"default",description:""},description:a[s].substr(1).trim()};break;case 17:this.$={stmt:"state",id:a[s-3],type:"default",description:"",doc:a[s-1]};break;case 18:var c=a[s],u=a[s-2].trim();if(a[s].match(":")){var l=a[s].split(":");c=l[0],u=[u,l[1]]}this.$={stmt:"state",id:c,type:"default",description:u};break;case 19:this.$={stmt:"state",id:a[s-3],type:"default",description:a[s-5],doc:a[s-1]};break;case 20:this.$={stmt:"state",id:a[s],type:"fork"};break;case 21:this.$={stmt:"state",id:a[s],type:"join"};break;case 22:this.$={stmt:"state",id:r.getDividerId(),type:"divider"};break;case 23:this.$={stmt:"state",id:a[s-1].trim(),note:{position:a[s-2].trim(),text:a[s].trim()}};break;case 30:case 31:this.$=a[s];break;case 34:r.parseDirective("%%{","open_directive");break;case 35:r.parseDirective(a[s],"type_directive");break;case 36:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 37:r.parseDirective("}%%","close_directive","state")}},table:[{3:1,4:e,5:n,6:4,7:r,29:6,39:i},{1:[3]},{3:8,4:e,5:n,6:4,7:r,29:6,39:i},{3:9,4:e,5:n,6:4,7:r,29:6,39:i},{3:10,4:e,5:n,6:4,7:r,29:6,39:i},t([1,4,5,14,15,17,20,22,23,24,25,26,36,39],a,{8:11}),{30:12,40:[1,13]},{40:[2,34]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:o,5:s,6:27,9:14,10:16,11:18,14:c,15:u,17:l,20:h,22:f,23:d,24:p,25:g,26:y,29:6,36:v,39:i},{31:30,32:[1,31],42:m},t([32,42],[2,35]),t(b,[2,6]),{6:27,10:33,11:18,14:c,15:u,17:l,20:h,22:f,23:d,24:p,25:g,26:y,29:6,36:v,39:i},t(b,[2,8]),t(b,[2,9]),t(b,[2,10],{12:[1,34],13:[1,35]}),t(b,[2,14]),{16:[1,36]},t(b,[2,16],{18:[1,37]}),{21:[1,38]},t(b,[2,20]),t(b,[2,21]),t(b,[2,22]),{27:39,28:[1,40],37:[1,41],38:[1,42]},t(b,[2,25]),t(x,[2,30]),t(x,[2,31]),t(_,[2,26]),{33:43,41:[1,44]},t(_,[2,37]),t(b,[2,7]),t(b,[2,11]),{11:45,22:f,36:v},t(b,[2,15]),t(k,a,{8:46}),{22:[1,47]},{22:[1,48]},{21:[1,49]},{22:[2,32]},{22:[2,33]},{31:50,42:m},{42:[2,36]},t(b,[2,12],{12:[1,51]}),{4:o,5:s,6:27,9:14,10:16,11:18,14:c,15:u,17:l,19:[1,52],20:h,22:f,23:d,24:p,25:g,26:y,29:6,36:v,39:i},t(b,[2,18],{18:[1,53]}),{28:[1,54]},{22:[1,55]},t(_,[2,27]),t(b,[2,13]),t(b,[2,17]),t(k,a,{8:56}),t(b,[2,23]),t(b,[2,24]),{4:o,5:s,6:27,9:14,10:16,11:18,14:c,15:u,17:l,19:[1,57],20:h,22:f,23:d,24:p,25:g,26:y,29:6,36:v,39:i},t(b,[2,19])],defaultActions:{7:[2,34],8:[2,1],9:[2,2],10:[2,3],41:[2,32],42:[2,33],44:[2,36]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,A,S,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in S=[],o[k])this.terminals_[T]&&T>h&&S.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:S})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,g.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0}},E={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),39;case 1:return this.begin("type_directive"),40;case 2:return this.popState(),this.begin("arg_directive"),32;case 3:return this.popState(),this.popState(),42;case 4:return 41;case 5:break;case 6:console.log("Crap after close");break;case 7:return 5;case 8:case 9:case 10:case 11:break;case 12:return this.pushState("SCALE"),15;case 13:return 16;case 14:this.popState();break;case 15:this.pushState("STATE");break;case 16:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),23;case 17:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),24;case 18:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),23;case 19:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),24;case 20:this.begin("STATE_STRING");break;case 21:return this.popState(),this.pushState("STATE_ID"),"AS";case 22:return this.popState(),"ID";case 23:this.popState();break;case 24:return"STATE_DESCR";case 25:return 17;case 26:this.popState();break;case 27:return this.popState(),this.pushState("struct"),18;case 28:return this.popState(),19;case 29:break;case 30:return this.begin("NOTE"),26;case 31:return this.popState(),this.pushState("NOTE_ID"),37;case 32:return this.popState(),this.pushState("NOTE_ID"),38;case 33:this.popState(),this.pushState("FLOATING_NOTE");break;case 34:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 35:break;case 36:return"NOTE_TEXT";case 37:return this.popState(),"ID";case 38:return this.popState(),this.pushState("NOTE_TEXT"),22;case 39:return this.popState(),e.yytext=e.yytext.substr(2).trim(),28;case 40:return this.popState(),e.yytext=e.yytext.slice(0,-8).trim(),28;case 41:case 42:return 7;case 43:return 14;case 44:return 36;case 45:return 22;case 46:return e.yytext=e.yytext.trim(),12;case 47:return 13;case 48:return 25;case 49:return 5;case 50:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:\s*[^:;]+end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[9,10],inclusive:!1},close_directive:{rules:[9,10],inclusive:!1},arg_directive:{rules:[3,4,9,10],inclusive:!1},type_directive:{rules:[2,3,9,10],inclusive:!1},open_directive:{rules:[1,9,10],inclusive:!1},struct:{rules:[9,10,15,28,29,30,44,45,46,47,48],inclusive:!1},FLOATING_NOTE_ID:{rules:[37],inclusive:!1},FLOATING_NOTE:{rules:[34,35,36],inclusive:!1},NOTE_TEXT:{rules:[39,40],inclusive:!1},NOTE_ID:{rules:[38],inclusive:!1},NOTE:{rules:[31,32,33],inclusive:!1},SCALE:{rules:[13,14],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[22],inclusive:!1},STATE_STRING:{rules:[23,24],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[9,10,16,17,18,19,20,21,25,26,27],inclusive:!1},ID:{rules:[9,10],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,10,11,12,15,27,30,41,42,43,44,45,46,47,49,50],inclusive:!0}}};function T(){this.yy={}}return w.lexer=E,T.prototype=w,w.Parser=T,new T}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(19).readFileSync(n(20).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(14),n(7)(t))},function(t,e,n){(function(t){t.exports=function(){"use strict";var e,r;function i(){return e.apply(null,arguments)}function a(t){return t instanceof Array||"[object Array]"===Object.prototype.toString.call(t)}function o(t){return null!=t&&"[object Object]"===Object.prototype.toString.call(t)}function s(t){return void 0===t}function c(t){return"number"==typeof t||"[object Number]"===Object.prototype.toString.call(t)}function u(t){return t instanceof Date||"[object Date]"===Object.prototype.toString.call(t)}function l(t,e){var n,r=[];for(n=0;n<t.length;++n)r.push(e(t[n],n));return r}function h(t,e){return Object.prototype.hasOwnProperty.call(t,e)}function f(t,e){for(var n in e)h(e,n)&&(t[n]=e[n]);return h(e,"toString")&&(t.toString=e.toString),h(e,"valueOf")&&(t.valueOf=e.valueOf),t}function d(t,e,n,r){return be(t,e,n,r,!0).utc()}function p(t){return null==t._pf&&(t._pf={empty:!1,unusedTokens:[],unusedInput:[],overflow:-2,charsLeftOver:0,nullInput:!1,invalidMonth:null,invalidFormat:!1,userInvalidated:!1,iso:!1,parsedDateParts:[],meridiem:null,rfc2822:!1,weekdayMismatch:!1}),t._pf}function g(t){if(null==t._isValid){var e=p(t),n=r.call(e.parsedDateParts,(function(t){return null!=t})),i=!isNaN(t._d.getTime())&&e.overflow<0&&!e.empty&&!e.invalidMonth&&!e.invalidWeekday&&!e.weekdayMismatch&&!e.nullInput&&!e.invalidFormat&&!e.userInvalidated&&(!e.meridiem||e.meridiem&&n);if(t._strict&&(i=i&&0===e.charsLeftOver&&0===e.unusedTokens.length&&void 0===e.bigHour),null!=Object.isFrozen&&Object.isFrozen(t))return i;t._isValid=i}return t._isValid}function y(t){var e=d(NaN);return null!=t?f(p(e),t):p(e).userInvalidated=!0,e}r=Array.prototype.some?Array.prototype.some:function(t){for(var e=Object(this),n=e.length>>>0,r=0;r<n;r++)if(r in e&&t.call(this,e[r],r,e))return!0;return!1};var v=i.momentProperties=[];function m(t,e){var n,r,i;if(s(e._isAMomentObject)||(t._isAMomentObject=e._isAMomentObject),s(e._i)||(t._i=e._i),s(e._f)||(t._f=e._f),s(e._l)||(t._l=e._l),s(e._strict)||(t._strict=e._strict),s(e._tzm)||(t._tzm=e._tzm),s(e._isUTC)||(t._isUTC=e._isUTC),s(e._offset)||(t._offset=e._offset),s(e._pf)||(t._pf=p(e)),s(e._locale)||(t._locale=e._locale),0<v.length)for(n=0;n<v.length;n++)s(i=e[r=v[n]])||(t[r]=i);return t}var b=!1;function x(t){m(this,t),this._d=new Date(null!=t._d?t._d.getTime():NaN),this.isValid()||(this._d=new Date(NaN)),!1===b&&(b=!0,i.updateOffset(this),b=!1)}function _(t){return t instanceof x||null!=t&&null!=t._isAMomentObject}function k(t){return t<0?Math.ceil(t)||0:Math.floor(t)}function w(t){var e=+t,n=0;return 0!==e&&isFinite(e)&&(n=k(e)),n}function E(t,e,n){var r,i=Math.min(t.length,e.length),a=Math.abs(t.length-e.length),o=0;for(r=0;r<i;r++)(n&&t[r]!==e[r]||!n&&w(t[r])!==w(e[r]))&&o++;return o+a}function T(t){!1===i.suppressDeprecationWarnings&&"undefined"!=typeof console&&console.warn&&console.warn("Deprecation warning: "+t)}function C(t,e){var n=!0;return f((function(){if(null!=i.deprecationHandler&&i.deprecationHandler(null,t),n){for(var r,a=[],o=0;o<arguments.length;o++){if(r="","object"==typeof arguments[o]){for(var s in r+="\n["+o+"] ",arguments[0])r+=s+": "+arguments[0][s]+", ";r=r.slice(0,-2)}else r=arguments[o];a.push(r)}T(t+"\nArguments: "+Array.prototype.slice.call(a).join("")+"\n"+(new Error).stack),n=!1}return e.apply(this,arguments)}),e)}var A,S={};function M(t,e){null!=i.deprecationHandler&&i.deprecationHandler(t,e),S[t]||(T(e),S[t]=!0)}function O(t){return t instanceof Function||"[object Function]"===Object.prototype.toString.call(t)}function D(t,e){var n,r=f({},t);for(n in e)h(e,n)&&(o(t[n])&&o(e[n])?(r[n]={},f(r[n],t[n]),f(r[n],e[n])):null!=e[n]?r[n]=e[n]:delete r[n]);for(n in t)h(t,n)&&!h(e,n)&&o(t[n])&&(r[n]=f({},r[n]));return r}function N(t){null!=t&&this.set(t)}i.suppressDeprecationWarnings=!1,i.deprecationHandler=null,A=Object.keys?Object.keys:function(t){var e,n=[];for(e in t)h(t,e)&&n.push(e);return n};var B={};function L(t,e){var n=t.toLowerCase();B[n]=B[n+"s"]=B[e]=t}function F(t){return"string"==typeof t?B[t]||B[t.toLowerCase()]:void 0}function P(t){var e,n,r={};for(n in t)h(t,n)&&(e=F(n))&&(r[e]=t[n]);return r}var I={};function j(t,e){I[t]=e}function R(t,e,n){var r=""+Math.abs(t),i=e-r.length;return(0<=t?n?"+":"":"-")+Math.pow(10,Math.max(0,i)).toString().substr(1)+r}var Y=/(\[[^\[]*\])|(\\)?([Hh]mm(ss)?|Mo|MM?M?M?|Do|DDDo|DD?D?D?|ddd?d?|do?|w[o|w]?|W[o|W]?|Qo?|YYYYYY|YYYYY|YYYY|YY|gg(ggg?)?|GG(GGG?)?|e|E|a|A|hh?|HH?|kk?|mm?|ss?|S{1,9}|x|X|zz?|ZZ?|.)/g,z=/(\[[^\[]*\])|(\\)?(LTS|LT|LL?L?L?|l{1,4})/g,U={},$={};function W(t,e,n,r){var i=r;"string"==typeof r&&(i=function(){return this[r]()}),t&&($[t]=i),e&&($[e[0]]=function(){return R(i.apply(this,arguments),e[1],e[2])}),n&&($[n]=function(){return this.localeData().ordinal(i.apply(this,arguments),t)})}function V(t,e){return t.isValid()?(e=H(e,t.localeData()),U[e]=U[e]||function(t){var e,n,r,i=t.match(Y);for(e=0,n=i.length;e<n;e++)$[i[e]]?i[e]=$[i[e]]:i[e]=(r=i[e]).match(/\[[\s\S]/)?r.replace(/^\[|\]$/g,""):r.replace(/\\/g,"");return function(e){var r,a="";for(r=0;r<n;r++)a+=O(i[r])?i[r].call(e,t):i[r];return a}}(e),U[e](t)):t.localeData().invalidDate()}function H(t,e){var n=5;function r(t){return e.longDateFormat(t)||t}for(z.lastIndex=0;0<=n&&z.test(t);)t=t.replace(z,r),z.lastIndex=0,n-=1;return t}var G=/\d/,q=/\d\d/,X=/\d{3}/,Z=/\d{4}/,J=/[+-]?\d{6}/,Q=/\d\d?/,K=/\d\d\d\d?/,tt=/\d\d\d\d\d\d?/,et=/\d{1,3}/,nt=/\d{1,4}/,rt=/[+-]?\d{1,6}/,it=/\d+/,at=/[+-]?\d+/,ot=/Z|[+-]\d\d:?\d\d/gi,st=/Z|[+-]\d\d(?::?\d\d)?/gi,ct=/[0-9]{0,256}['a-z\u00A0-\u05FF\u0700-\uD7FF\uF900-\uFDCF\uFDF0-\uFF07\uFF10-\uFFEF]{1,256}|[\u0600-\u06FF\/]{1,256}(\s*?[\u0600-\u06FF]{1,256}){1,2}/i,ut={};function lt(t,e,n){ut[t]=O(e)?e:function(t,r){return t&&n?n:e}}function ht(t,e){return h(ut,t)?ut[t](e._strict,e._locale):new RegExp(ft(t.replace("\\","").replace(/\\(\[)|\\(\])|\[([^\]\[]*)\]|\\(.)/g,(function(t,e,n,r,i){return e||n||r||i}))))}function ft(t){return t.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&")}var dt={};function pt(t,e){var n,r=e;for("string"==typeof t&&(t=[t]),c(e)&&(r=function(t,n){n[e]=w(t)}),n=0;n<t.length;n++)dt[t[n]]=r}function gt(t,e){pt(t,(function(t,n,r,i){r._w=r._w||{},e(t,r._w,r,i)}))}function yt(t){return vt(t)?366:365}function vt(t){return t%4==0&&t%100!=0||t%400==0}W("Y",0,0,(function(){var t=this.year();return t<=9999?""+t:"+"+t})),W(0,["YY",2],0,(function(){return this.year()%100})),W(0,["YYYY",4],0,"year"),W(0,["YYYYY",5],0,"year"),W(0,["YYYYYY",6,!0],0,"year"),L("year","y"),j("year",1),lt("Y",at),lt("YY",Q,q),lt("YYYY",nt,Z),lt("YYYYY",rt,J),lt("YYYYYY",rt,J),pt(["YYYYY","YYYYYY"],0),pt("YYYY",(function(t,e){e[0]=2===t.length?i.parseTwoDigitYear(t):w(t)})),pt("YY",(function(t,e){e[0]=i.parseTwoDigitYear(t)})),pt("Y",(function(t,e){e[0]=parseInt(t,10)})),i.parseTwoDigitYear=function(t){return w(t)+(68<w(t)?1900:2e3)};var mt,bt=xt("FullYear",!0);function xt(t,e){return function(n){return null!=n?(kt(this,t,n),i.updateOffset(this,e),this):_t(this,t)}}function _t(t,e){return t.isValid()?t._d["get"+(t._isUTC?"UTC":"")+e]():NaN}function kt(t,e,n){t.isValid()&&!isNaN(n)&&("FullYear"===e&&vt(t.year())&&1===t.month()&&29===t.date()?t._d["set"+(t._isUTC?"UTC":"")+e](n,t.month(),wt(n,t.month())):t._d["set"+(t._isUTC?"UTC":"")+e](n))}function wt(t,e){if(isNaN(t)||isNaN(e))return NaN;var n=(e%12+12)%12;return t+=(e-n)/12,1===n?vt(t)?29:28:31-n%7%2}mt=Array.prototype.indexOf?Array.prototype.indexOf:function(t){var e;for(e=0;e<this.length;++e)if(this[e]===t)return e;return-1},W("M",["MM",2],"Mo",(function(){return this.month()+1})),W("MMM",0,0,(function(t){return this.localeData().monthsShort(this,t)})),W("MMMM",0,0,(function(t){return this.localeData().months(this,t)})),L("month","M"),j("month",8),lt("M",Q),lt("MM",Q,q),lt("MMM",(function(t,e){return e.monthsShortRegex(t)})),lt("MMMM",(function(t,e){return e.monthsRegex(t)})),pt(["M","MM"],(function(t,e){e[1]=w(t)-1})),pt(["MMM","MMMM"],(function(t,e,n,r){var i=n._locale.monthsParse(t,r,n._strict);null!=i?e[1]=i:p(n).invalidMonth=t}));var Et=/D[oD]?(\[[^\[\]]*\]|\s)+MMMM?/,Tt="January_February_March_April_May_June_July_August_September_October_November_December".split("_"),Ct="Jan_Feb_Mar_Apr_May_Jun_Jul_Aug_Sep_Oct_Nov_Dec".split("_");function At(t,e){var n;if(!t.isValid())return t;if("string"==typeof e)if(/^\d+$/.test(e))e=w(e);else if(!c(e=t.localeData().monthsParse(e)))return t;return n=Math.min(t.date(),wt(t.year(),e)),t._d["set"+(t._isUTC?"UTC":"")+"Month"](e,n),t}function St(t){return null!=t?(At(this,t),i.updateOffset(this,!0),this):_t(this,"Month")}var Mt=ct,Ot=ct;function Dt(){function t(t,e){return e.length-t.length}var e,n,r=[],i=[],a=[];for(e=0;e<12;e++)n=d([2e3,e]),r.push(this.monthsShort(n,"")),i.push(this.months(n,"")),a.push(this.months(n,"")),a.push(this.monthsShort(n,""));for(r.sort(t),i.sort(t),a.sort(t),e=0;e<12;e++)r[e]=ft(r[e]),i[e]=ft(i[e]);for(e=0;e<24;e++)a[e]=ft(a[e]);this._monthsRegex=new RegExp("^("+a.join("|")+")","i"),this._monthsShortRegex=this._monthsRegex,this._monthsStrictRegex=new RegExp("^("+i.join("|")+")","i"),this._monthsShortStrictRegex=new RegExp("^("+r.join("|")+")","i")}function Nt(t){var e;if(t<100&&0<=t){var n=Array.prototype.slice.call(arguments);n[0]=t+400,e=new Date(Date.UTC.apply(null,n)),isFinite(e.getUTCFullYear())&&e.setUTCFullYear(t)}else e=new Date(Date.UTC.apply(null,arguments));return e}function Bt(t,e,n){var r=7+e-n;return-(7+Nt(t,0,r).getUTCDay()-e)%7+r-1}function Lt(t,e,n,r,i){var a,o,s=1+7*(e-1)+(7+n-r)%7+Bt(t,r,i);return o=s<=0?yt(a=t-1)+s:s>yt(t)?(a=t+1,s-yt(t)):(a=t,s),{year:a,dayOfYear:o}}function Ft(t,e,n){var r,i,a=Bt(t.year(),e,n),o=Math.floor((t.dayOfYear()-a-1)/7)+1;return o<1?r=o+Pt(i=t.year()-1,e,n):o>Pt(t.year(),e,n)?(r=o-Pt(t.year(),e,n),i=t.year()+1):(i=t.year(),r=o),{week:r,year:i}}function Pt(t,e,n){var r=Bt(t,e,n),i=Bt(t+1,e,n);return(yt(t)-r+i)/7}function It(t,e){return t.slice(e,7).concat(t.slice(0,e))}W("w",["ww",2],"wo","week"),W("W",["WW",2],"Wo","isoWeek"),L("week","w"),L("isoWeek","W"),j("week",5),j("isoWeek",5),lt("w",Q),lt("ww",Q,q),lt("W",Q),lt("WW",Q,q),gt(["w","ww","W","WW"],(function(t,e,n,r){e[r.substr(0,1)]=w(t)})),W("d",0,"do","day"),W("dd",0,0,(function(t){return this.localeData().weekdaysMin(this,t)})),W("ddd",0,0,(function(t){return this.localeData().weekdaysShort(this,t)})),W("dddd",0,0,(function(t){return this.localeData().weekdays(this,t)})),W("e",0,0,"weekday"),W("E",0,0,"isoWeekday"),L("day","d"),L("weekday","e"),L("isoWeekday","E"),j("day",11),j("weekday",11),j("isoWeekday",11),lt("d",Q),lt("e",Q),lt("E",Q),lt("dd",(function(t,e){return e.weekdaysMinRegex(t)})),lt("ddd",(function(t,e){return e.weekdaysShortRegex(t)})),lt("dddd",(function(t,e){return e.weekdaysRegex(t)})),gt(["dd","ddd","dddd"],(function(t,e,n,r){var i=n._locale.weekdaysParse(t,r,n._strict);null!=i?e.d=i:p(n).invalidWeekday=t})),gt(["d","e","E"],(function(t,e,n,r){e[r]=w(t)}));var jt="Sunday_Monday_Tuesday_Wednesday_Thursday_Friday_Saturday".split("_"),Rt="Sun_Mon_Tue_Wed_Thu_Fri_Sat".split("_"),Yt="Su_Mo_Tu_We_Th_Fr_Sa".split("_"),zt=ct,Ut=ct,$t=ct;function Wt(){function t(t,e){return e.length-t.length}var e,n,r,i,a,o=[],s=[],c=[],u=[];for(e=0;e<7;e++)n=d([2e3,1]).day(e),r=this.weekdaysMin(n,""),i=this.weekdaysShort(n,""),a=this.weekdays(n,""),o.push(r),s.push(i),c.push(a),u.push(r),u.push(i),u.push(a);for(o.sort(t),s.sort(t),c.sort(t),u.sort(t),e=0;e<7;e++)s[e]=ft(s[e]),c[e]=ft(c[e]),u[e]=ft(u[e]);this._weekdaysRegex=new RegExp("^("+u.join("|")+")","i"),this._weekdaysShortRegex=this._weekdaysRegex,this._weekdaysMinRegex=this._weekdaysRegex,this._weekdaysStrictRegex=new RegExp("^("+c.join("|")+")","i"),this._weekdaysShortStrictRegex=new RegExp("^("+s.join("|")+")","i"),this._weekdaysMinStrictRegex=new RegExp("^("+o.join("|")+")","i")}function Vt(){return this.hours()%12||12}function Ht(t,e){W(t,0,0,(function(){return this.localeData().meridiem(this.hours(),this.minutes(),e)}))}function Gt(t,e){return e._meridiemParse}W("H",["HH",2],0,"hour"),W("h",["hh",2],0,Vt),W("k",["kk",2],0,(function(){return this.hours()||24})),W("hmm",0,0,(function(){return""+Vt.apply(this)+R(this.minutes(),2)})),W("hmmss",0,0,(function(){return""+Vt.apply(this)+R(this.minutes(),2)+R(this.seconds(),2)})),W("Hmm",0,0,(function(){return""+this.hours()+R(this.minutes(),2)})),W("Hmmss",0,0,(function(){return""+this.hours()+R(this.minutes(),2)+R(this.seconds(),2)})),Ht("a",!0),Ht("A",!1),L("hour","h"),j("hour",13),lt("a",Gt),lt("A",Gt),lt("H",Q),lt("h",Q),lt("k",Q),lt("HH",Q,q),lt("hh",Q,q),lt("kk",Q,q),lt("hmm",K),lt("hmmss",tt),lt("Hmm",K),lt("Hmmss",tt),pt(["H","HH"],3),pt(["k","kk"],(function(t,e,n){var r=w(t);e[3]=24===r?0:r})),pt(["a","A"],(function(t,e,n){n._isPm=n._locale.isPM(t),n._meridiem=t})),pt(["h","hh"],(function(t,e,n){e[3]=w(t),p(n).bigHour=!0})),pt("hmm",(function(t,e,n){var r=t.length-2;e[3]=w(t.substr(0,r)),e[4]=w(t.substr(r)),p(n).bigHour=!0})),pt("hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=w(t.substr(0,r)),e[4]=w(t.substr(r,2)),e[5]=w(t.substr(i)),p(n).bigHour=!0})),pt("Hmm",(function(t,e,n){var r=t.length-2;e[3]=w(t.substr(0,r)),e[4]=w(t.substr(r))})),pt("Hmmss",(function(t,e,n){var r=t.length-4,i=t.length-2;e[3]=w(t.substr(0,r)),e[4]=w(t.substr(r,2)),e[5]=w(t.substr(i))}));var qt,Xt=xt("Hours",!0),Zt={calendar:{sameDay:"[Today at] LT",nextDay:"[Tomorrow at] LT",nextWeek:"dddd [at] LT",lastDay:"[Yesterday at] LT",lastWeek:"[Last] dddd [at] LT",sameElse:"L"},longDateFormat:{LTS:"h:mm:ss A",LT:"h:mm A",L:"MM/DD/YYYY",LL:"MMMM D, YYYY",LLL:"MMMM D, YYYY h:mm A",LLLL:"dddd, MMMM D, YYYY h:mm A"},invalidDate:"Invalid date",ordinal:"%d",dayOfMonthOrdinalParse:/\d{1,2}/,relativeTime:{future:"in %s",past:"%s ago",s:"a few seconds",ss:"%d seconds",m:"a minute",mm:"%d minutes",h:"an hour",hh:"%d hours",d:"a day",dd:"%d days",M:"a month",MM:"%d months",y:"a year",yy:"%d years"},months:Tt,monthsShort:Ct,week:{dow:0,doy:6},weekdays:jt,weekdaysMin:Yt,weekdaysShort:Rt,meridiemParse:/[ap]\.?m?\.?/i},Jt={},Qt={};function Kt(t){return t?t.toLowerCase().replace("_","-"):t}function te(e){var r=null;if(!Jt[e]&&void 0!==t&&t&&t.exports)try{r=qt._abbr,n(171)("./"+e),ee(r)}catch(e){}return Jt[e]}function ee(t,e){var n;return t&&((n=s(e)?re(t):ne(t,e))?qt=n:"undefined"!=typeof console&&console.warn&&console.warn("Locale "+t+" not found. Did you forget to load it?")),qt._abbr}function ne(t,e){if(null===e)return delete Jt[t],null;var n,r=Zt;if(e.abbr=t,null!=Jt[t])M("defineLocaleOverride","use moment.updateLocale(localeName, config) to change an existing locale. moment.defineLocale(localeName, config) should only be used for creating a new locale See http://momentjs.com/guides/#/warnings/define-locale/ for more info."),r=Jt[t]._config;else if(null!=e.parentLocale)if(null!=Jt[e.parentLocale])r=Jt[e.parentLocale]._config;else{if(null==(n=te(e.parentLocale)))return Qt[e.parentLocale]||(Qt[e.parentLocale]=[]),Qt[e.parentLocale].push({name:t,config:e}),null;r=n._config}return Jt[t]=new N(D(r,e)),Qt[t]&&Qt[t].forEach((function(t){ne(t.name,t.config)})),ee(t),Jt[t]}function re(t){var e;if(t&&t._locale&&t._locale._abbr&&(t=t._locale._abbr),!t)return qt;if(!a(t)){if(e=te(t))return e;t=[t]}return function(t){for(var e,n,r,i,a=0;a<t.length;){for(e=(i=Kt(t[a]).split("-")).length,n=(n=Kt(t[a+1]))?n.split("-"):null;0<e;){if(r=te(i.slice(0,e).join("-")))return r;if(n&&n.length>=e&&E(i,n,!0)>=e-1)break;e--}a++}return qt}(t)}function ie(t){var e,n=t._a;return n&&-2===p(t).overflow&&(e=n[1]<0||11<n[1]?1:n[2]<1||n[2]>wt(n[0],n[1])?2:n[3]<0||24<n[3]||24===n[3]&&(0!==n[4]||0!==n[5]||0!==n[6])?3:n[4]<0||59<n[4]?4:n[5]<0||59<n[5]?5:n[6]<0||999<n[6]?6:-1,p(t)._overflowDayOfYear&&(e<0||2<e)&&(e=2),p(t)._overflowWeeks&&-1===e&&(e=7),p(t)._overflowWeekday&&-1===e&&(e=8),p(t).overflow=e),t}function ae(t,e,n){return null!=t?t:null!=e?e:n}function oe(t){var e,n,r,a,o,s=[];if(!t._d){var c,u;for(c=t,u=new Date(i.now()),r=c._useUTC?[u.getUTCFullYear(),u.getUTCMonth(),u.getUTCDate()]:[u.getFullYear(),u.getMonth(),u.getDate()],t._w&&null==t._a[2]&&null==t._a[1]&&function(t){var e,n,r,i,a,o,s,c;if(null!=(e=t._w).GG||null!=e.W||null!=e.E)a=1,o=4,n=ae(e.GG,t._a[0],Ft(xe(),1,4).year),r=ae(e.W,1),((i=ae(e.E,1))<1||7<i)&&(c=!0);else{a=t._locale._week.dow,o=t._locale._week.doy;var u=Ft(xe(),a,o);n=ae(e.gg,t._a[0],u.year),r=ae(e.w,u.week),null!=e.d?((i=e.d)<0||6<i)&&(c=!0):null!=e.e?(i=e.e+a,(e.e<0||6<e.e)&&(c=!0)):i=a}r<1||r>Pt(n,a,o)?p(t)._overflowWeeks=!0:null!=c?p(t)._overflowWeekday=!0:(s=Lt(n,r,i,a,o),t._a[0]=s.year,t._dayOfYear=s.dayOfYear)}(t),null!=t._dayOfYear&&(o=ae(t._a[0],r[0]),(t._dayOfYear>yt(o)||0===t._dayOfYear)&&(p(t)._overflowDayOfYear=!0),n=Nt(o,0,t._dayOfYear),t._a[1]=n.getUTCMonth(),t._a[2]=n.getUTCDate()),e=0;e<3&&null==t._a[e];++e)t._a[e]=s[e]=r[e];for(;e<7;e++)t._a[e]=s[e]=null==t._a[e]?2===e?1:0:t._a[e];24===t._a[3]&&0===t._a[4]&&0===t._a[5]&&0===t._a[6]&&(t._nextDay=!0,t._a[3]=0),t._d=(t._useUTC?Nt:function(t,e,n,r,i,a,o){var s;return t<100&&0<=t?(s=new Date(t+400,e,n,r,i,a,o),isFinite(s.getFullYear())&&s.setFullYear(t)):s=new Date(t,e,n,r,i,a,o),s}).apply(null,s),a=t._useUTC?t._d.getUTCDay():t._d.getDay(),null!=t._tzm&&t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),t._nextDay&&(t._a[3]=24),t._w&&void 0!==t._w.d&&t._w.d!==a&&(p(t).weekdayMismatch=!0)}}var se=/^\s*((?:[+-]\d{6}|\d{4})-(?:\d\d-\d\d|W\d\d-\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?::\d\d(?::\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ce=/^\s*((?:[+-]\d{6}|\d{4})(?:\d\d\d\d|W\d\d\d|W\d\d|\d\d\d|\d\d))(?:(T| )(\d\d(?:\d\d(?:\d\d(?:[.,]\d+)?)?)?)([\+\-]\d\d(?::?\d\d)?|\s*Z)?)?$/,ue=/Z|[+-]\d\d(?::?\d\d)?/,le=[["YYYYYY-MM-DD",/[+-]\d{6}-\d\d-\d\d/],["YYYY-MM-DD",/\d{4}-\d\d-\d\d/],["GGGG-[W]WW-E",/\d{4}-W\d\d-\d/],["GGGG-[W]WW",/\d{4}-W\d\d/,!1],["YYYY-DDD",/\d{4}-\d{3}/],["YYYY-MM",/\d{4}-\d\d/,!1],["YYYYYYMMDD",/[+-]\d{10}/],["YYYYMMDD",/\d{8}/],["GGGG[W]WWE",/\d{4}W\d{3}/],["GGGG[W]WW",/\d{4}W\d{2}/,!1],["YYYYDDD",/\d{7}/]],he=[["HH:mm:ss.SSSS",/\d\d:\d\d:\d\d\.\d+/],["HH:mm:ss,SSSS",/\d\d:\d\d:\d\d,\d+/],["HH:mm:ss",/\d\d:\d\d:\d\d/],["HH:mm",/\d\d:\d\d/],["HHmmss.SSSS",/\d\d\d\d\d\d\.\d+/],["HHmmss,SSSS",/\d\d\d\d\d\d,\d+/],["HHmmss",/\d\d\d\d\d\d/],["HHmm",/\d\d\d\d/],["HH",/\d\d/]],fe=/^\/?Date\((\-?\d+)/i;function de(t){var e,n,r,i,a,o,s=t._i,c=se.exec(s)||ce.exec(s);if(c){for(p(t).iso=!0,e=0,n=le.length;e<n;e++)if(le[e][1].exec(c[1])){i=le[e][0],r=!1!==le[e][2];break}if(null==i)return void(t._isValid=!1);if(c[3]){for(e=0,n=he.length;e<n;e++)if(he[e][1].exec(c[3])){a=(c[2]||" ")+he[e][0];break}if(null==a)return void(t._isValid=!1)}if(!r&&null!=a)return void(t._isValid=!1);if(c[4]){if(!ue.exec(c[4]))return void(t._isValid=!1);o="Z"}t._f=i+(a||"")+(o||""),ve(t)}else t._isValid=!1}var pe=/^(?:(Mon|Tue|Wed|Thu|Fri|Sat|Sun),?\s)?(\d{1,2})\s(Jan|Feb|Mar|Apr|May|Jun|Jul|Aug|Sep|Oct|Nov|Dec)\s(\d{2,4})\s(\d\d):(\d\d)(?::(\d\d))?\s(?:(UT|GMT|[ECMP][SD]T)|([Zz])|([+-]\d{4}))$/,ge={UT:0,GMT:0,EDT:-240,EST:-300,CDT:-300,CST:-360,MDT:-360,MST:-420,PDT:-420,PST:-480};function ye(t){var e,n,r,i=pe.exec(t._i.replace(/\([^)]*\)|[\n\t]/g," ").replace(/(\s\s+)/g," ").replace(/^\s\s*/,"").replace(/\s\s*$/,""));if(i){var a=function(t,e,n,r,i,a){var o=[function(t){var e=parseInt(t,10);return e<=49?2e3+e:e<=999?1900+e:e}(t),Ct.indexOf(e),parseInt(n,10),parseInt(r,10),parseInt(i,10)];return a&&o.push(parseInt(a,10)),o}(i[4],i[3],i[2],i[5],i[6],i[7]);if(n=a,r=t,(e=i[1])&&Rt.indexOf(e)!==new Date(n[0],n[1],n[2]).getDay()&&(p(r).weekdayMismatch=!0,!(r._isValid=!1)))return;t._a=a,t._tzm=function(t,e,n){if(t)return ge[t];if(e)return 0;var r=parseInt(n,10),i=r%100;return(r-i)/100*60+i}(i[8],i[9],i[10]),t._d=Nt.apply(null,t._a),t._d.setUTCMinutes(t._d.getUTCMinutes()-t._tzm),p(t).rfc2822=!0}else t._isValid=!1}function ve(t){if(t._f!==i.ISO_8601)if(t._f!==i.RFC_2822){t._a=[],p(t).empty=!0;var e,n,r,a,o,s,c,u,l=""+t._i,f=l.length,d=0;for(r=H(t._f,t._locale).match(Y)||[],e=0;e<r.length;e++)a=r[e],(n=(l.match(ht(a,t))||[])[0])&&(0<(o=l.substr(0,l.indexOf(n))).length&&p(t).unusedInput.push(o),l=l.slice(l.indexOf(n)+n.length),d+=n.length),$[a]?(n?p(t).empty=!1:p(t).unusedTokens.push(a),s=a,u=t,null!=(c=n)&&h(dt,s)&&dt[s](c,u._a,u,s)):t._strict&&!n&&p(t).unusedTokens.push(a);p(t).charsLeftOver=f-d,0<l.length&&p(t).unusedInput.push(l),t._a[3]<=12&&!0===p(t).bigHour&&0<t._a[3]&&(p(t).bigHour=void 0),p(t).parsedDateParts=t._a.slice(0),p(t).meridiem=t._meridiem,t._a[3]=function(t,e,n){var r;return null==n?e:null!=t.meridiemHour?t.meridiemHour(e,n):(null!=t.isPM&&((r=t.isPM(n))&&e<12&&(e+=12),r||12!==e||(e=0)),e)}(t._locale,t._a[3],t._meridiem),oe(t),ie(t)}else ye(t);else de(t)}function me(t){var e,n,r,h,d=t._i,v=t._f;return t._locale=t._locale||re(t._l),null===d||void 0===v&&""===d?y({nullInput:!0}):("string"==typeof d&&(t._i=d=t._locale.preparse(d)),_(d)?new x(ie(d)):(u(d)?t._d=d:a(v)?function(t){var e,n,r,i,a;if(0===t._f.length)return p(t).invalidFormat=!0,t._d=new Date(NaN);for(i=0;i<t._f.length;i++)a=0,e=m({},t),null!=t._useUTC&&(e._useUTC=t._useUTC),e._f=t._f[i],ve(e),g(e)&&(a+=p(e).charsLeftOver,a+=10*p(e).unusedTokens.length,p(e).score=a,(null==r||a<r)&&(r=a,n=e));f(t,n||e)}(t):v?ve(t):s(n=(e=t)._i)?e._d=new Date(i.now()):u(n)?e._d=new Date(n.valueOf()):"string"==typeof n?(r=e,null===(h=fe.exec(r._i))?(de(r),!1===r._isValid&&(delete r._isValid,ye(r),!1===r._isValid&&(delete r._isValid,i.createFromInputFallback(r)))):r._d=new Date(+h[1])):a(n)?(e._a=l(n.slice(0),(function(t){return parseInt(t,10)})),oe(e)):o(n)?function(t){if(!t._d){var e=P(t._i);t._a=l([e.year,e.month,e.day||e.date,e.hour,e.minute,e.second,e.millisecond],(function(t){return t&&parseInt(t,10)})),oe(t)}}(e):c(n)?e._d=new Date(n):i.createFromInputFallback(e),g(t)||(t._d=null),t))}function be(t,e,n,r,i){var s,c={};return!0!==n&&!1!==n||(r=n,n=void 0),(o(t)&&function(t){if(Object.getOwnPropertyNames)return 0===Object.getOwnPropertyNames(t).length;var e;for(e in t)if(t.hasOwnProperty(e))return!1;return!0}(t)||a(t)&&0===t.length)&&(t=void 0),c._isAMomentObject=!0,c._useUTC=c._isUTC=i,c._l=n,c._i=t,c._f=e,c._strict=r,(s=new x(ie(me(c))))._nextDay&&(s.add(1,"d"),s._nextDay=void 0),s}function xe(t,e,n,r){return be(t,e,n,r,!1)}i.createFromInputFallback=C("value provided is not in a recognized RFC2822 or ISO format. moment construction falls back to js Date(), which is not reliable across all browsers and versions. Non RFC2822/ISO date formats are discouraged and will be removed in an upcoming major release. Please refer to http://momentjs.com/guides/#/warnings/js-date/ for more info.",(function(t){t._d=new Date(t._i+(t._useUTC?" UTC":""))})),i.ISO_8601=function(){},i.RFC_2822=function(){};var _e=C("moment().min is deprecated, use moment.max instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=xe.apply(null,arguments);return this.isValid()&&t.isValid()?t<this?this:t:y()})),ke=C("moment().max is deprecated, use moment.min instead. http://momentjs.com/guides/#/warnings/min-max/",(function(){var t=xe.apply(null,arguments);return this.isValid()&&t.isValid()?this<t?this:t:y()}));function we(t,e){var n,r;if(1===e.length&&a(e[0])&&(e=e[0]),!e.length)return xe();for(n=e[0],r=1;r<e.length;++r)e[r].isValid()&&!e[r][t](n)||(n=e[r]);return n}var Ee=["year","quarter","month","week","day","hour","minute","second","millisecond"];function Te(t){var e=P(t),n=e.year||0,r=e.quarter||0,i=e.month||0,a=e.week||e.isoWeek||0,o=e.day||0,s=e.hour||0,c=e.minute||0,u=e.second||0,l=e.millisecond||0;this._isValid=function(t){for(var e in t)if(-1===mt.call(Ee,e)||null!=t[e]&&isNaN(t[e]))return!1;for(var n=!1,r=0;r<Ee.length;++r)if(t[Ee[r]]){if(n)return!1;parseFloat(t[Ee[r]])!==w(t[Ee[r]])&&(n=!0)}return!0}(e),this._milliseconds=+l+1e3*u+6e4*c+1e3*s*60*60,this._days=+o+7*a,this._months=+i+3*r+12*n,this._data={},this._locale=re(),this._bubble()}function Ce(t){return t instanceof Te}function Ae(t){return t<0?-1*Math.round(-1*t):Math.round(t)}function Se(t,e){W(t,0,0,(function(){var t=this.utcOffset(),n="+";return t<0&&(t=-t,n="-"),n+R(~~(t/60),2)+e+R(~~t%60,2)}))}Se("Z",":"),Se("ZZ",""),lt("Z",st),lt("ZZ",st),pt(["Z","ZZ"],(function(t,e,n){n._useUTC=!0,n._tzm=Oe(st,t)}));var Me=/([\+\-]|\d\d)/gi;function Oe(t,e){var n=(e||"").match(t);if(null===n)return null;var r=((n[n.length-1]||[])+"").match(Me)||["-",0,0],i=60*r[1]+w(r[2]);return 0===i?0:"+"===r[0]?i:-i}function De(t,e){var n,r;return e._isUTC?(n=e.clone(),r=(_(t)||u(t)?t.valueOf():xe(t).valueOf())-n.valueOf(),n._d.setTime(n._d.valueOf()+r),i.updateOffset(n,!1),n):xe(t).local()}function Ne(t){return 15*-Math.round(t._d.getTimezoneOffset()/15)}function Be(){return!!this.isValid()&&this._isUTC&&0===this._offset}i.updateOffset=function(){};var Le=/^(\-|\+)?(?:(\d*)[. ])?(\d+)\:(\d+)(?:\:(\d+)(\.\d*)?)?$/,Fe=/^(-|\+)?P(?:([-+]?[0-9,.]*)Y)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)W)?(?:([-+]?[0-9,.]*)D)?(?:T(?:([-+]?[0-9,.]*)H)?(?:([-+]?[0-9,.]*)M)?(?:([-+]?[0-9,.]*)S)?)?$/;function Pe(t,e){var n,r,i,a=t,o=null;return Ce(t)?a={ms:t._milliseconds,d:t._days,M:t._months}:c(t)?(a={},e?a[e]=t:a.milliseconds=t):(o=Le.exec(t))?(n="-"===o[1]?-1:1,a={y:0,d:w(o[2])*n,h:w(o[3])*n,m:w(o[4])*n,s:w(o[5])*n,ms:w(Ae(1e3*o[6]))*n}):(o=Fe.exec(t))?(n="-"===o[1]?-1:1,a={y:Ie(o[2],n),M:Ie(o[3],n),w:Ie(o[4],n),d:Ie(o[5],n),h:Ie(o[6],n),m:Ie(o[7],n),s:Ie(o[8],n)}):null==a?a={}:"object"==typeof a&&("from"in a||"to"in a)&&(i=function(t,e){var n;return t.isValid()&&e.isValid()?(e=De(e,t),t.isBefore(e)?n=je(t,e):((n=je(e,t)).milliseconds=-n.milliseconds,n.months=-n.months),n):{milliseconds:0,months:0}}(xe(a.from),xe(a.to)),(a={}).ms=i.milliseconds,a.M=i.months),r=new Te(a),Ce(t)&&h(t,"_locale")&&(r._locale=t._locale),r}function Ie(t,e){var n=t&&parseFloat(t.replace(",","."));return(isNaN(n)?0:n)*e}function je(t,e){var n={};return n.months=e.month()-t.month()+12*(e.year()-t.year()),t.clone().add(n.months,"M").isAfter(e)&&--n.months,n.milliseconds=+e-+t.clone().add(n.months,"M"),n}function Re(t,e){return function(n,r){var i;return null===r||isNaN(+r)||(M(e,"moment()."+e+"(period, number) is deprecated. Please use moment()."+e+"(number, period). See http://momentjs.com/guides/#/warnings/add-inverted-param/ for more info."),i=n,n=r,r=i),Ye(this,Pe(n="string"==typeof n?+n:n,r),t),this}}function Ye(t,e,n,r){var a=e._milliseconds,o=Ae(e._days),s=Ae(e._months);t.isValid()&&(r=null==r||r,s&&At(t,_t(t,"Month")+s*n),o&&kt(t,"Date",_t(t,"Date")+o*n),a&&t._d.setTime(t._d.valueOf()+a*n),r&&i.updateOffset(t,o||s))}Pe.fn=Te.prototype,Pe.invalid=function(){return Pe(NaN)};var ze=Re(1,"add"),Ue=Re(-1,"subtract");function $e(t,e){var n=12*(e.year()-t.year())+(e.month()-t.month()),r=t.clone().add(n,"months");return-(n+(e-r<0?(e-r)/(r-t.clone().add(n-1,"months")):(e-r)/(t.clone().add(n+1,"months")-r)))||0}function We(t){var e;return void 0===t?this._locale._abbr:(null!=(e=re(t))&&(this._locale=e),this)}i.defaultFormat="YYYY-MM-DDTHH:mm:ssZ",i.defaultFormatUtc="YYYY-MM-DDTHH:mm:ss[Z]";var Ve=C("moment().lang() is deprecated. Instead, use moment().localeData() to get the language configuration. Use moment().locale() to change languages.",(function(t){return void 0===t?this.localeData():this.locale(t)}));function He(){return this._locale}var Ge=126227808e5;function qe(t,e){return(t%e+e)%e}function Xe(t,e,n){return t<100&&0<=t?new Date(t+400,e,n)-Ge:new Date(t,e,n).valueOf()}function Ze(t,e,n){return t<100&&0<=t?Date.UTC(t+400,e,n)-Ge:Date.UTC(t,e,n)}function Je(t,e){W(0,[t,t.length],0,e)}function Qe(t,e,n,r,i){var a;return null==t?Ft(this,r,i).year:((a=Pt(t,r,i))<e&&(e=a),function(t,e,n,r,i){var a=Lt(t,e,n,r,i),o=Nt(a.year,0,a.dayOfYear);return this.year(o.getUTCFullYear()),this.month(o.getUTCMonth()),this.date(o.getUTCDate()),this}.call(this,t,e,n,r,i))}W(0,["gg",2],0,(function(){return this.weekYear()%100})),W(0,["GG",2],0,(function(){return this.isoWeekYear()%100})),Je("gggg","weekYear"),Je("ggggg","weekYear"),Je("GGGG","isoWeekYear"),Je("GGGGG","isoWeekYear"),L("weekYear","gg"),L("isoWeekYear","GG"),j("weekYear",1),j("isoWeekYear",1),lt("G",at),lt("g",at),lt("GG",Q,q),lt("gg",Q,q),lt("GGGG",nt,Z),lt("gggg",nt,Z),lt("GGGGG",rt,J),lt("ggggg",rt,J),gt(["gggg","ggggg","GGGG","GGGGG"],(function(t,e,n,r){e[r.substr(0,2)]=w(t)})),gt(["gg","GG"],(function(t,e,n,r){e[r]=i.parseTwoDigitYear(t)})),W("Q",0,"Qo","quarter"),L("quarter","Q"),j("quarter",7),lt("Q",G),pt("Q",(function(t,e){e[1]=3*(w(t)-1)})),W("D",["DD",2],"Do","date"),L("date","D"),j("date",9),lt("D",Q),lt("DD",Q,q),lt("Do",(function(t,e){return t?e._dayOfMonthOrdinalParse||e._ordinalParse:e._dayOfMonthOrdinalParseLenient})),pt(["D","DD"],2),pt("Do",(function(t,e){e[2]=w(t.match(Q)[0])}));var Ke=xt("Date",!0);W("DDD",["DDDD",3],"DDDo","dayOfYear"),L("dayOfYear","DDD"),j("dayOfYear",4),lt("DDD",et),lt("DDDD",X),pt(["DDD","DDDD"],(function(t,e,n){n._dayOfYear=w(t)})),W("m",["mm",2],0,"minute"),L("minute","m"),j("minute",14),lt("m",Q),lt("mm",Q,q),pt(["m","mm"],4);var tn=xt("Minutes",!1);W("s",["ss",2],0,"second"),L("second","s"),j("second",15),lt("s",Q),lt("ss",Q,q),pt(["s","ss"],5);var en,nn=xt("Seconds",!1);for(W("S",0,0,(function(){return~~(this.millisecond()/100)})),W(0,["SS",2],0,(function(){return~~(this.millisecond()/10)})),W(0,["SSS",3],0,"millisecond"),W(0,["SSSS",4],0,(function(){return 10*this.millisecond()})),W(0,["SSSSS",5],0,(function(){return 100*this.millisecond()})),W(0,["SSSSSS",6],0,(function(){return 1e3*this.millisecond()})),W(0,["SSSSSSS",7],0,(function(){return 1e4*this.millisecond()})),W(0,["SSSSSSSS",8],0,(function(){return 1e5*this.millisecond()})),W(0,["SSSSSSSSS",9],0,(function(){return 1e6*this.millisecond()})),L("millisecond","ms"),j("millisecond",16),lt("S",et,G),lt("SS",et,q),lt("SSS",et,X),en="SSSS";en.length<=9;en+="S")lt(en,it);function rn(t,e){e[6]=w(1e3*("0."+t))}for(en="S";en.length<=9;en+="S")pt(en,rn);var an=xt("Milliseconds",!1);W("z",0,0,"zoneAbbr"),W("zz",0,0,"zoneName");var on=x.prototype;function sn(t){return t}on.add=ze,on.calendar=function(t,e){var n=t||xe(),r=De(n,this).startOf("day"),a=i.calendarFormat(this,r)||"sameElse",o=e&&(O(e[a])?e[a].call(this,n):e[a]);return this.format(o||this.localeData().calendar(a,this,xe(n)))},on.clone=function(){return new x(this)},on.diff=function(t,e,n){var r,i,a;if(!this.isValid())return NaN;if(!(r=De(t,this)).isValid())return NaN;switch(i=6e4*(r.utcOffset()-this.utcOffset()),e=F(e)){case"year":a=$e(this,r)/12;break;case"month":a=$e(this,r);break;case"quarter":a=$e(this,r)/3;break;case"second":a=(this-r)/1e3;break;case"minute":a=(this-r)/6e4;break;case"hour":a=(this-r)/36e5;break;case"day":a=(this-r-i)/864e5;break;case"week":a=(this-r-i)/6048e5;break;default:a=this-r}return n?a:k(a)},on.endOf=function(t){var e;if(void 0===(t=F(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?Ze:Xe;switch(t){case"year":e=n(this.year()+1,0,1)-1;break;case"quarter":e=n(this.year(),this.month()-this.month()%3+3,1)-1;break;case"month":e=n(this.year(),this.month()+1,1)-1;break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday()+7)-1;break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1)+7)-1;break;case"day":case"date":e=n(this.year(),this.month(),this.date()+1)-1;break;case"hour":e=this._d.valueOf(),e+=36e5-qe(e+(this._isUTC?0:6e4*this.utcOffset()),36e5)-1;break;case"minute":e=this._d.valueOf(),e+=6e4-qe(e,6e4)-1;break;case"second":e=this._d.valueOf(),e+=1e3-qe(e,1e3)-1}return this._d.setTime(e),i.updateOffset(this,!0),this},on.format=function(t){t||(t=this.isUtc()?i.defaultFormatUtc:i.defaultFormat);var e=V(this,t);return this.localeData().postformat(e)},on.from=function(t,e){return this.isValid()&&(_(t)&&t.isValid()||xe(t).isValid())?Pe({to:this,from:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},on.fromNow=function(t){return this.from(xe(),t)},on.to=function(t,e){return this.isValid()&&(_(t)&&t.isValid()||xe(t).isValid())?Pe({from:this,to:t}).locale(this.locale()).humanize(!e):this.localeData().invalidDate()},on.toNow=function(t){return this.to(xe(),t)},on.get=function(t){return O(this[t=F(t)])?this[t]():this},on.invalidAt=function(){return p(this).overflow},on.isAfter=function(t,e){var n=_(t)?t:xe(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=F(e)||"millisecond")?this.valueOf()>n.valueOf():n.valueOf()<this.clone().startOf(e).valueOf())},on.isBefore=function(t,e){var n=_(t)?t:xe(t);return!(!this.isValid()||!n.isValid())&&("millisecond"===(e=F(e)||"millisecond")?this.valueOf()<n.valueOf():this.clone().endOf(e).valueOf()<n.valueOf())},on.isBetween=function(t,e,n,r){var i=_(t)?t:xe(t),a=_(e)?e:xe(e);return!!(this.isValid()&&i.isValid()&&a.isValid())&&("("===(r=r||"()")[0]?this.isAfter(i,n):!this.isBefore(i,n))&&(")"===r[1]?this.isBefore(a,n):!this.isAfter(a,n))},on.isSame=function(t,e){var n,r=_(t)?t:xe(t);return!(!this.isValid()||!r.isValid())&&("millisecond"===(e=F(e)||"millisecond")?this.valueOf()===r.valueOf():(n=r.valueOf(),this.clone().startOf(e).valueOf()<=n&&n<=this.clone().endOf(e).valueOf()))},on.isSameOrAfter=function(t,e){return this.isSame(t,e)||this.isAfter(t,e)},on.isSameOrBefore=function(t,e){return this.isSame(t,e)||this.isBefore(t,e)},on.isValid=function(){return g(this)},on.lang=Ve,on.locale=We,on.localeData=He,on.max=ke,on.min=_e,on.parsingFlags=function(){return f({},p(this))},on.set=function(t,e){if("object"==typeof t)for(var n=function(t){var e=[];for(var n in t)e.push({unit:n,priority:I[n]});return e.sort((function(t,e){return t.priority-e.priority})),e}(t=P(t)),r=0;r<n.length;r++)this[n[r].unit](t[n[r].unit]);else if(O(this[t=F(t)]))return this[t](e);return this},on.startOf=function(t){var e;if(void 0===(t=F(t))||"millisecond"===t||!this.isValid())return this;var n=this._isUTC?Ze:Xe;switch(t){case"year":e=n(this.year(),0,1);break;case"quarter":e=n(this.year(),this.month()-this.month()%3,1);break;case"month":e=n(this.year(),this.month(),1);break;case"week":e=n(this.year(),this.month(),this.date()-this.weekday());break;case"isoWeek":e=n(this.year(),this.month(),this.date()-(this.isoWeekday()-1));break;case"day":case"date":e=n(this.year(),this.month(),this.date());break;case"hour":e=this._d.valueOf(),e-=qe(e+(this._isUTC?0:6e4*this.utcOffset()),36e5);break;case"minute":e=this._d.valueOf(),e-=qe(e,6e4);break;case"second":e=this._d.valueOf(),e-=qe(e,1e3)}return this._d.setTime(e),i.updateOffset(this,!0),this},on.subtract=Ue,on.toArray=function(){var t=this;return[t.year(),t.month(),t.date(),t.hour(),t.minute(),t.second(),t.millisecond()]},on.toObject=function(){var t=this;return{years:t.year(),months:t.month(),date:t.date(),hours:t.hours(),minutes:t.minutes(),seconds:t.seconds(),milliseconds:t.milliseconds()}},on.toDate=function(){return new Date(this.valueOf())},on.toISOString=function(t){if(!this.isValid())return null;var e=!0!==t,n=e?this.clone().utc():this;return n.year()<0||9999<n.year()?V(n,e?"YYYYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYYYY-MM-DD[T]HH:mm:ss.SSSZ"):O(Date.prototype.toISOString)?e?this.toDate().toISOString():new Date(this.valueOf()+60*this.utcOffset()*1e3).toISOString().replace("Z",V(n,"Z")):V(n,e?"YYYY-MM-DD[T]HH:mm:ss.SSS[Z]":"YYYY-MM-DD[T]HH:mm:ss.SSSZ")},on.inspect=function(){if(!this.isValid())return"moment.invalid(/* "+this._i+" */)";var t="moment",e="";this.isLocal()||(t=0===this.utcOffset()?"moment.utc":"moment.parseZone",e="Z");var n="["+t+'("]',r=0<=this.year()&&this.year()<=9999?"YYYY":"YYYYYY",i=e+'[")]';return this.format(n+r+"-MM-DD[T]HH:mm:ss.SSS"+i)},on.toJSON=function(){return this.isValid()?this.toISOString():null},on.toString=function(){return this.clone().locale("en").format("ddd MMM DD YYYY HH:mm:ss [GMT]ZZ")},on.unix=function(){return Math.floor(this.valueOf()/1e3)},on.valueOf=function(){return this._d.valueOf()-6e4*(this._offset||0)},on.creationData=function(){return{input:this._i,format:this._f,locale:this._locale,isUTC:this._isUTC,strict:this._strict}},on.year=bt,on.isLeapYear=function(){return vt(this.year())},on.weekYear=function(t){return Qe.call(this,t,this.week(),this.weekday(),this.localeData()._week.dow,this.localeData()._week.doy)},on.isoWeekYear=function(t){return Qe.call(this,t,this.isoWeek(),this.isoWeekday(),1,4)},on.quarter=on.quarters=function(t){return null==t?Math.ceil((this.month()+1)/3):this.month(3*(t-1)+this.month()%3)},on.month=St,on.daysInMonth=function(){return wt(this.year(),this.month())},on.week=on.weeks=function(t){var e=this.localeData().week(this);return null==t?e:this.add(7*(t-e),"d")},on.isoWeek=on.isoWeeks=function(t){var e=Ft(this,1,4).week;return null==t?e:this.add(7*(t-e),"d")},on.weeksInYear=function(){var t=this.localeData()._week;return Pt(this.year(),t.dow,t.doy)},on.isoWeeksInYear=function(){return Pt(this.year(),1,4)},on.date=Ke,on.day=on.days=function(t){if(!this.isValid())return null!=t?this:NaN;var e,n,r=this._isUTC?this._d.getUTCDay():this._d.getDay();return null!=t?(e=t,n=this.localeData(),t="string"!=typeof e?e:isNaN(e)?"number"==typeof(e=n.weekdaysParse(e))?e:null:parseInt(e,10),this.add(t-r,"d")):r},on.weekday=function(t){if(!this.isValid())return null!=t?this:NaN;var e=(this.day()+7-this.localeData()._week.dow)%7;return null==t?e:this.add(t-e,"d")},on.isoWeekday=function(t){if(!this.isValid())return null!=t?this:NaN;if(null==t)return this.day()||7;var e,n,r=(e=t,n=this.localeData(),"string"==typeof e?n.weekdaysParse(e)%7||7:isNaN(e)?null:e);return this.day(this.day()%7?r:r-7)},on.dayOfYear=function(t){var e=Math.round((this.clone().startOf("day")-this.clone().startOf("year"))/864e5)+1;return null==t?e:this.add(t-e,"d")},on.hour=on.hours=Xt,on.minute=on.minutes=tn,on.second=on.seconds=nn,on.millisecond=on.milliseconds=an,on.utcOffset=function(t,e,n){var r,a=this._offset||0;if(!this.isValid())return null!=t?this:NaN;if(null==t)return this._isUTC?a:Ne(this);if("string"==typeof t){if(null===(t=Oe(st,t)))return this}else Math.abs(t)<16&&!n&&(t*=60);return!this._isUTC&&e&&(r=Ne(this)),this._offset=t,this._isUTC=!0,null!=r&&this.add(r,"m"),a!==t&&(!e||this._changeInProgress?Ye(this,Pe(t-a,"m"),1,!1):this._changeInProgress||(this._changeInProgress=!0,i.updateOffset(this,!0),this._changeInProgress=null)),this},on.utc=function(t){return this.utcOffset(0,t)},on.local=function(t){return this._isUTC&&(this.utcOffset(0,t),this._isUTC=!1,t&&this.subtract(Ne(this),"m")),this},on.parseZone=function(){if(null!=this._tzm)this.utcOffset(this._tzm,!1,!0);else if("string"==typeof this._i){var t=Oe(ot,this._i);null!=t?this.utcOffset(t):this.utcOffset(0,!0)}return this},on.hasAlignedHourOffset=function(t){return!!this.isValid()&&(t=t?xe(t).utcOffset():0,(this.utcOffset()-t)%60==0)},on.isDST=function(){return this.utcOffset()>this.clone().month(0).utcOffset()||this.utcOffset()>this.clone().month(5).utcOffset()},on.isLocal=function(){return!!this.isValid()&&!this._isUTC},on.isUtcOffset=function(){return!!this.isValid()&&this._isUTC},on.isUtc=Be,on.isUTC=Be,on.zoneAbbr=function(){return this._isUTC?"UTC":""},on.zoneName=function(){return this._isUTC?"Coordinated Universal Time":""},on.dates=C("dates accessor is deprecated. Use date instead.",Ke),on.months=C("months accessor is deprecated. Use month instead",St),on.years=C("years accessor is deprecated. Use year instead",bt),on.zone=C("moment().zone is deprecated, use moment().utcOffset instead. http://momentjs.com/guides/#/warnings/zone/",(function(t,e){return null!=t?("string"!=typeof t&&(t=-t),this.utcOffset(t,e),this):-this.utcOffset()})),on.isDSTShifted=C("isDSTShifted is deprecated. See http://momentjs.com/guides/#/warnings/dst-shifted/ for more information",(function(){if(!s(this._isDSTShifted))return this._isDSTShifted;var t={};if(m(t,this),(t=me(t))._a){var e=t._isUTC?d(t._a):xe(t._a);this._isDSTShifted=this.isValid()&&0<E(t._a,e.toArray())}else this._isDSTShifted=!1;return this._isDSTShifted}));var cn=N.prototype;function un(t,e,n,r){var i=re(),a=d().set(r,e);return i[n](a,t)}function ln(t,e,n){if(c(t)&&(e=t,t=void 0),t=t||"",null!=e)return un(t,e,n,"month");var r,i=[];for(r=0;r<12;r++)i[r]=un(t,r,n,"month");return i}function hn(t,e,n,r){"boolean"==typeof t?c(e)&&(n=e,e=void 0):(e=t,t=!1,c(n=e)&&(n=e,e=void 0)),e=e||"";var i,a=re(),o=t?a._week.dow:0;if(null!=n)return un(e,(n+o)%7,r,"day");var s=[];for(i=0;i<7;i++)s[i]=un(e,(i+o)%7,r,"day");return s}cn.calendar=function(t,e,n){var r=this._calendar[t]||this._calendar.sameElse;return O(r)?r.call(e,n):r},cn.longDateFormat=function(t){var e=this._longDateFormat[t],n=this._longDateFormat[t.toUpperCase()];return e||!n?e:(this._longDateFormat[t]=n.replace(/MMMM|MM|DD|dddd/g,(function(t){return t.slice(1)})),this._longDateFormat[t])},cn.invalidDate=function(){return this._invalidDate},cn.ordinal=function(t){return this._ordinal.replace("%d",t)},cn.preparse=sn,cn.postformat=sn,cn.relativeTime=function(t,e,n,r){var i=this._relativeTime[n];return O(i)?i(t,e,n,r):i.replace(/%d/i,t)},cn.pastFuture=function(t,e){var n=this._relativeTime[0<t?"future":"past"];return O(n)?n(e):n.replace(/%s/i,e)},cn.set=function(t){var e,n;for(n in t)O(e=t[n])?this[n]=e:this["_"+n]=e;this._config=t,this._dayOfMonthOrdinalParseLenient=new RegExp((this._dayOfMonthOrdinalParse.source||this._ordinalParse.source)+"|"+/\d{1,2}/.source)},cn.months=function(t,e){return t?a(this._months)?this._months[t.month()]:this._months[(this._months.isFormat||Et).test(e)?"format":"standalone"][t.month()]:a(this._months)?this._months:this._months.standalone},cn.monthsShort=function(t,e){return t?a(this._monthsShort)?this._monthsShort[t.month()]:this._monthsShort[Et.test(e)?"format":"standalone"][t.month()]:a(this._monthsShort)?this._monthsShort:this._monthsShort.standalone},cn.monthsParse=function(t,e,n){var r,i,a;if(this._monthsParseExact)return function(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._monthsParse)for(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[],r=0;r<12;++r)a=d([2e3,r]),this._shortMonthsParse[r]=this.monthsShort(a,"").toLocaleLowerCase(),this._longMonthsParse[r]=this.months(a,"").toLocaleLowerCase();return n?"MMM"===e?-1!==(i=mt.call(this._shortMonthsParse,o))?i:null:-1!==(i=mt.call(this._longMonthsParse,o))?i:null:"MMM"===e?-1!==(i=mt.call(this._shortMonthsParse,o))?i:-1!==(i=mt.call(this._longMonthsParse,o))?i:null:-1!==(i=mt.call(this._longMonthsParse,o))?i:-1!==(i=mt.call(this._shortMonthsParse,o))?i:null}.call(this,t,e,n);for(this._monthsParse||(this._monthsParse=[],this._longMonthsParse=[],this._shortMonthsParse=[]),r=0;r<12;r++){if(i=d([2e3,r]),n&&!this._longMonthsParse[r]&&(this._longMonthsParse[r]=new RegExp("^"+this.months(i,"").replace(".","")+"$","i"),this._shortMonthsParse[r]=new RegExp("^"+this.monthsShort(i,"").replace(".","")+"$","i")),n||this._monthsParse[r]||(a="^"+this.months(i,"")+"|^"+this.monthsShort(i,""),this._monthsParse[r]=new RegExp(a.replace(".",""),"i")),n&&"MMMM"===e&&this._longMonthsParse[r].test(t))return r;if(n&&"MMM"===e&&this._shortMonthsParse[r].test(t))return r;if(!n&&this._monthsParse[r].test(t))return r}},cn.monthsRegex=function(t){return this._monthsParseExact?(h(this,"_monthsRegex")||Dt.call(this),t?this._monthsStrictRegex:this._monthsRegex):(h(this,"_monthsRegex")||(this._monthsRegex=Ot),this._monthsStrictRegex&&t?this._monthsStrictRegex:this._monthsRegex)},cn.monthsShortRegex=function(t){return this._monthsParseExact?(h(this,"_monthsRegex")||Dt.call(this),t?this._monthsShortStrictRegex:this._monthsShortRegex):(h(this,"_monthsShortRegex")||(this._monthsShortRegex=Mt),this._monthsShortStrictRegex&&t?this._monthsShortStrictRegex:this._monthsShortRegex)},cn.week=function(t){return Ft(t,this._week.dow,this._week.doy).week},cn.firstDayOfYear=function(){return this._week.doy},cn.firstDayOfWeek=function(){return this._week.dow},cn.weekdays=function(t,e){var n=a(this._weekdays)?this._weekdays:this._weekdays[t&&!0!==t&&this._weekdays.isFormat.test(e)?"format":"standalone"];return!0===t?It(n,this._week.dow):t?n[t.day()]:n},cn.weekdaysMin=function(t){return!0===t?It(this._weekdaysMin,this._week.dow):t?this._weekdaysMin[t.day()]:this._weekdaysMin},cn.weekdaysShort=function(t){return!0===t?It(this._weekdaysShort,this._week.dow):t?this._weekdaysShort[t.day()]:this._weekdaysShort},cn.weekdaysParse=function(t,e,n){var r,i,a;if(this._weekdaysParseExact)return function(t,e,n){var r,i,a,o=t.toLocaleLowerCase();if(!this._weekdaysParse)for(this._weekdaysParse=[],this._shortWeekdaysParse=[],this._minWeekdaysParse=[],r=0;r<7;++r)a=d([2e3,1]).day(r),this._minWeekdaysParse[r]=this.weekdaysMin(a,"").toLocaleLowerCase(),this._shortWeekdaysParse[r]=this.weekdaysShort(a,"").toLocaleLowerCase(),this._weekdaysParse[r]=this.weekdays(a,"").toLocaleLowerCase();return n?"dddd"===e?-1!==(i=mt.call(this._weekdaysParse,o))?i:null:"ddd"===e?-1!==(i=mt.call(this._shortWeekdaysParse,o))?i:null:-1!==(i=mt.call(this._minWeekdaysParse,o))?i:null:"dddd"===e?-1!==(i=mt.call(this._weekdaysParse,o))?i:-1!==(i=mt.call(this._shortWeekdaysParse,o))?i:-1!==(i=mt.call(this._minWeekdaysParse,o))?i:null:"ddd"===e?-1!==(i=mt.call(this._shortWeekdaysParse,o))?i:-1!==(i=mt.call(this._weekdaysParse,o))?i:-1!==(i=mt.call(this._minWeekdaysParse,o))?i:null:-1!==(i=mt.call(this._minWeekdaysParse,o))?i:-1!==(i=mt.call(this._weekdaysParse,o))?i:-1!==(i=mt.call(this._shortWeekdaysParse,o))?i:null}.call(this,t,e,n);for(this._weekdaysParse||(this._weekdaysParse=[],this._minWeekdaysParse=[],this._shortWeekdaysParse=[],this._fullWeekdaysParse=[]),r=0;r<7;r++){if(i=d([2e3,1]).day(r),n&&!this._fullWeekdaysParse[r]&&(this._fullWeekdaysParse[r]=new RegExp("^"+this.weekdays(i,"").replace(".","\\.?")+"$","i"),this._shortWeekdaysParse[r]=new RegExp("^"+this.weekdaysShort(i,"").replace(".","\\.?")+"$","i"),this._minWeekdaysParse[r]=new RegExp("^"+this.weekdaysMin(i,"").replace(".","\\.?")+"$","i")),this._weekdaysParse[r]||(a="^"+this.weekdays(i,"")+"|^"+this.weekdaysShort(i,"")+"|^"+this.weekdaysMin(i,""),this._weekdaysParse[r]=new RegExp(a.replace(".",""),"i")),n&&"dddd"===e&&this._fullWeekdaysParse[r].test(t))return r;if(n&&"ddd"===e&&this._shortWeekdaysParse[r].test(t))return r;if(n&&"dd"===e&&this._minWeekdaysParse[r].test(t))return r;if(!n&&this._weekdaysParse[r].test(t))return r}},cn.weekdaysRegex=function(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Wt.call(this),t?this._weekdaysStrictRegex:this._weekdaysRegex):(h(this,"_weekdaysRegex")||(this._weekdaysRegex=zt),this._weekdaysStrictRegex&&t?this._weekdaysStrictRegex:this._weekdaysRegex)},cn.weekdaysShortRegex=function(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Wt.call(this),t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex):(h(this,"_weekdaysShortRegex")||(this._weekdaysShortRegex=Ut),this._weekdaysShortStrictRegex&&t?this._weekdaysShortStrictRegex:this._weekdaysShortRegex)},cn.weekdaysMinRegex=function(t){return this._weekdaysParseExact?(h(this,"_weekdaysRegex")||Wt.call(this),t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex):(h(this,"_weekdaysMinRegex")||(this._weekdaysMinRegex=$t),this._weekdaysMinStrictRegex&&t?this._weekdaysMinStrictRegex:this._weekdaysMinRegex)},cn.isPM=function(t){return"p"===(t+"").toLowerCase().charAt(0)},cn.meridiem=function(t,e,n){return 11<t?n?"pm":"PM":n?"am":"AM"},ee("en",{dayOfMonthOrdinalParse:/\d{1,2}(th|st|nd|rd)/,ordinal:function(t){var e=t%10;return t+(1===w(t%100/10)?"th":1===e?"st":2===e?"nd":3===e?"rd":"th")}}),i.lang=C("moment.lang is deprecated. Use moment.locale instead.",ee),i.langData=C("moment.langData is deprecated. Use moment.localeData instead.",re);var fn=Math.abs;function dn(t,e,n,r){var i=Pe(e,n);return t._milliseconds+=r*i._milliseconds,t._days+=r*i._days,t._months+=r*i._months,t._bubble()}function pn(t){return t<0?Math.floor(t):Math.ceil(t)}function gn(t){return 4800*t/146097}function yn(t){return 146097*t/4800}function vn(t){return function(){return this.as(t)}}var mn=vn("ms"),bn=vn("s"),xn=vn("m"),_n=vn("h"),kn=vn("d"),wn=vn("w"),En=vn("M"),Tn=vn("Q"),Cn=vn("y");function An(t){return function(){return this.isValid()?this._data[t]:NaN}}var Sn=An("milliseconds"),Mn=An("seconds"),On=An("minutes"),Dn=An("hours"),Nn=An("days"),Bn=An("months"),Ln=An("years"),Fn=Math.round,Pn={ss:44,s:45,m:45,h:22,d:26,M:11},In=Math.abs;function jn(t){return(0<t)-(t<0)||+t}function Rn(){if(!this.isValid())return this.localeData().invalidDate();var t,e,n=In(this._milliseconds)/1e3,r=In(this._days),i=In(this._months);e=k((t=k(n/60))/60),n%=60,t%=60;var a=k(i/12),o=i%=12,s=r,c=e,u=t,l=n?n.toFixed(3).replace(/\.?0+$/,""):"",h=this.asSeconds();if(!h)return"P0D";var f=h<0?"-":"",d=jn(this._months)!==jn(h)?"-":"",p=jn(this._days)!==jn(h)?"-":"",g=jn(this._milliseconds)!==jn(h)?"-":"";return f+"P"+(a?d+a+"Y":"")+(o?d+o+"M":"")+(s?p+s+"D":"")+(c||u||l?"T":"")+(c?g+c+"H":"")+(u?g+u+"M":"")+(l?g+l+"S":"")}var Yn=Te.prototype;return Yn.isValid=function(){return this._isValid},Yn.abs=function(){var t=this._data;return this._milliseconds=fn(this._milliseconds),this._days=fn(this._days),this._months=fn(this._months),t.milliseconds=fn(t.milliseconds),t.seconds=fn(t.seconds),t.minutes=fn(t.minutes),t.hours=fn(t.hours),t.months=fn(t.months),t.years=fn(t.years),this},Yn.add=function(t,e){return dn(this,t,e,1)},Yn.subtract=function(t,e){return dn(this,t,e,-1)},Yn.as=function(t){if(!this.isValid())return NaN;var e,n,r=this._milliseconds;if("month"===(t=F(t))||"quarter"===t||"year"===t)switch(e=this._days+r/864e5,n=this._months+gn(e),t){case"month":return n;case"quarter":return n/3;case"year":return n/12}else switch(e=this._days+Math.round(yn(this._months)),t){case"week":return e/7+r/6048e5;case"day":return e+r/864e5;case"hour":return 24*e+r/36e5;case"minute":return 1440*e+r/6e4;case"second":return 86400*e+r/1e3;case"millisecond":return Math.floor(864e5*e)+r;default:throw new Error("Unknown unit "+t)}},Yn.asMilliseconds=mn,Yn.asSeconds=bn,Yn.asMinutes=xn,Yn.asHours=_n,Yn.asDays=kn,Yn.asWeeks=wn,Yn.asMonths=En,Yn.asQuarters=Tn,Yn.asYears=Cn,Yn.valueOf=function(){return this.isValid()?this._milliseconds+864e5*this._days+this._months%12*2592e6+31536e6*w(this._months/12):NaN},Yn._bubble=function(){var t,e,n,r,i,a=this._milliseconds,o=this._days,s=this._months,c=this._data;return 0<=a&&0<=o&&0<=s||a<=0&&o<=0&&s<=0||(a+=864e5*pn(yn(s)+o),s=o=0),c.milliseconds=a%1e3,t=k(a/1e3),c.seconds=t%60,e=k(t/60),c.minutes=e%60,n=k(e/60),c.hours=n%24,s+=i=k(gn(o+=k(n/24))),o-=pn(yn(i)),r=k(s/12),s%=12,c.days=o,c.months=s,c.years=r,this},Yn.clone=function(){return Pe(this)},Yn.get=function(t){return t=F(t),this.isValid()?this[t+"s"]():NaN},Yn.milliseconds=Sn,Yn.seconds=Mn,Yn.minutes=On,Yn.hours=Dn,Yn.days=Nn,Yn.weeks=function(){return k(this.days()/7)},Yn.months=Bn,Yn.years=Ln,Yn.humanize=function(t){if(!this.isValid())return this.localeData().invalidDate();var e,n,r,i,a,o,s,c,u,l,h=this.localeData(),f=(e=!t,n=h,r=Pe(this).abs(),i=Fn(r.as("s")),a=Fn(r.as("m")),o=Fn(r.as("h")),s=Fn(r.as("d")),c=Fn(r.as("M")),u=Fn(r.as("y")),(l=i<=Pn.ss&&["s",i]||i<Pn.s&&["ss",i]||a<=1&&["m"]||a<Pn.m&&["mm",a]||o<=1&&["h"]||o<Pn.h&&["hh",o]||s<=1&&["d"]||s<Pn.d&&["dd",s]||c<=1&&["M"]||c<Pn.M&&["MM",c]||u<=1&&["y"]||["yy",u])[2]=e,l[3]=0<+this,l[4]=n,function(t,e,n,r,i){return i.relativeTime(e||1,!!n,t,r)}.apply(null,l));return t&&(f=h.pastFuture(+this,f)),h.postformat(f)},Yn.toISOString=Rn,Yn.toString=Rn,Yn.toJSON=Rn,Yn.locale=We,Yn.localeData=He,Yn.toIsoString=C("toIsoString() is deprecated. Please use toISOString() instead (notice the capitals)",Rn),Yn.lang=Ve,W("X",0,0,"unix"),W("x",0,0,"valueOf"),lt("x",at),lt("X",/[+-]?\d+(\.\d{1,3})?/),pt("X",(function(t,e,n){n._d=new Date(1e3*parseFloat(t,10))})),pt("x",(function(t,e,n){n._d=new Date(w(t))})),i.version="2.24.0",e=xe,i.fn=on,i.min=function(){return we("isBefore",[].slice.call(arguments,0))},i.max=function(){return we("isAfter",[].slice.call(arguments,0))},i.now=function(){return Date.now?Date.now():+new Date},i.utc=d,i.unix=function(t){return xe(1e3*t)},i.months=function(t,e){return ln(t,e,"months")},i.isDate=u,i.locale=ee,i.invalid=y,i.duration=Pe,i.isMoment=_,i.weekdays=function(t,e,n){return hn(t,e,n,"weekdays")},i.parseZone=function(){return xe.apply(null,arguments).parseZone()},i.localeData=re,i.isDuration=Ce,i.monthsShort=function(t,e){return ln(t,e,"monthsShort")},i.weekdaysMin=function(t,e,n){return hn(t,e,n,"weekdaysMin")},i.defineLocale=ne,i.updateLocale=function(t,e){if(null!=e){var n,r,i=Zt;null!=(r=te(t))&&(i=r._config),(n=new N(e=D(i,e))).parentLocale=Jt[t],Jt[t]=n,ee(t)}else null!=Jt[t]&&(null!=Jt[t].parentLocale?Jt[t]=Jt[t].parentLocale:null!=Jt[t]&&delete Jt[t]);return Jt[t]},i.locales=function(){return A(Jt)},i.weekdaysShort=function(t,e,n){return hn(t,e,n,"weekdaysShort")},i.normalizeUnits=F,i.relativeTimeRounding=function(t){return void 0===t?Fn:"function"==typeof t&&(Fn=t,!0)},i.relativeTimeThreshold=function(t,e){return void 0!==Pn[t]&&(void 0===e?Pn[t]:(Pn[t]=e,"s"===t&&(Pn.ss=e-1),!0))},i.calendarFormat=function(t,e){var n=t.diff(e,"days",!0);return n<-6?"sameElse":n<-1?"lastWeek":n<0?"lastDay":n<1?"sameDay":n<2?"nextDay":n<7?"nextWeek":"sameElse"},i.prototype=on,i.HTML5_FMT={DATETIME_LOCAL:"YYYY-MM-DDTHH:mm",DATETIME_LOCAL_SECONDS:"YYYY-MM-DDTHH:mm:ss",DATETIME_LOCAL_MS:"YYYY-MM-DDTHH:mm:ss.SSS",DATE:"YYYY-MM-DD",TIME:"HH:mm",TIME_SECONDS:"HH:mm:ss",TIME_MS:"HH:mm:ss.SSS",WEEK:"GGGG-[W]WW",MONTH:"YYYY-MM"},i}()}).call(this,n(7)(t))},function(t,e,n){var r=n(37),i=n(80);t.exports=function(t){return null!=t&&i(t.length)&&!r(t)}},function(t,e,n){var r=n(256),i=n(266),a=n(35),o=n(5),s=n(273);t.exports=function(t){return"function"==typeof t?t:null==t?a:"object"==typeof t?o(t)?i(t[0],t[1]):r(t):s(t)}},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,9],n=[1,7],r=[1,6],i=[1,8],a=[1,20,21,22,23,38,46,75,76,77,78,79,80,91,92,95,96,97,99,100,106,107,108,109,110,111],o=[2,10],s=[1,20],c=[1,21],u=[1,22],l=[1,23],h=[1,30],f=[1,54],d=[1,32],p=[1,33],g=[1,34],y=[1,35],v=[1,36],m=[1,48],b=[1,43],x=[1,45],_=[1,40],k=[1,44],w=[1,47],E=[1,51],T=[1,52],C=[1,53],A=[1,42],S=[1,46],M=[1,49],O=[1,50],D=[1,41],N=[1,57],B=[1,62],L=[1,20,21,22,23,38,42,46,75,76,77,78,79,80,91,92,95,96,97,99,100,106,107,108,109,110,111],F=[1,66],P=[1,65],I=[1,67],j=[20,21,23,69,70],R=[20,21,22,23,69,70],Y=[20,21,22,23,47,69,70],z=[20,21,22,23,40,46,47,49,51,53,55,57,59,61,62,64,69,70,80,91,92,95,96,97,99,100,106,107,108,109,110,111],U=[20,21,23],$=[20,21,23,46,69,70,80,91,92,95,96,97,99,100,106,107,108,109,110,111],W=[1,12,20,21,22,23,24,38,42,46,75,76,77,78,79,80,91,92,95,96,97,99,100,106,107,108,109,110,111],V=[46,80,91,92,95,96,97,99,100,106,107,108,109,110,111],H=[1,115],G=[1,136],q=[1,137],X=[1,138],Z=[1,139],J=[1,119],Q=[1,110],K=[1,111],tt=[1,107],et=[1,131],nt=[1,132],rt=[1,133],it=[1,134],at=[1,135],ot=[1,140],st=[1,141],ct=[1,113],ut=[1,121],lt=[1,124],ht=[1,122],ft=[1,123],dt=[1,116],pt=[1,129],gt=[1,128],yt=[1,112],vt=[1,109],mt=[1,118],bt=[1,120],xt=[1,125],_t=[1,126],kt=[1,127],wt=[1,130],Et=[20,21,22,23,38,42,46,75,76,77,78,79,80,91,92,95,96,97,99,100,106,107,108,109,110,111],Tt=[1,144],Ct=[1,148],At=[1,150],St=[1,151],Mt=[12,21,22,24],Ot=[20,21,22,23,24,26,38,40,41,42,46,50,52,54,56,58,60,61,63,65,69,70,71,75,76,77,78,79,80,81,84,91,92,95,96,97,99,100,101,102,106,107,108,109,110,111],Dt=[20,21,22,23,26,46,80,91,92,95,96,97,99,100,106,107,108,109,110,111],Nt=[22,92],Bt=[1,220],Lt=[1,224],Ft=[1,221],Pt=[1,218],It=[1,215],jt=[1,216],Rt=[1,217],Yt=[1,219],zt=[1,222],Ut=[1,223],$t=[1,225],Wt=[1,241],Vt=[20,21,23,92],Ht=[20,21,22,23,75,88,91,92,95,96,97,98,99,100,101],Gt={trace:function(){},yy:{},symbols_:{error:2,start:3,mermaidDoc:4,directive:5,openDirective:6,typeDirective:7,closeDirective:8,separator:9,":":10,argDirective:11,open_directive:12,type_directive:13,arg_directive:14,close_directive:15,graphConfig:16,document:17,line:18,statement:19,SEMI:20,NEWLINE:21,SPACE:22,EOF:23,GRAPH:24,NODIR:25,DIR:26,FirstStmtSeperator:27,ending:28,endToken:29,spaceList:30,spaceListNewline:31,verticeStatement:32,styleStatement:33,linkStyleStatement:34,classDefStatement:35,classStatement:36,clickStatement:37,subgraph:38,text:39,SQS:40,SQE:41,end:42,link:43,node:44,vertex:45,AMP:46,STYLE_SEPARATOR:47,idString:48,PS:49,PE:50,"(-":51,"-)":52,STADIUMSTART:53,STADIUMEND:54,SUBROUTINESTART:55,SUBROUTINEEND:56,CYLINDERSTART:57,CYLINDEREND:58,DIAMOND_START:59,DIAMOND_STOP:60,TAGEND:61,TRAPSTART:62,TRAPEND:63,INVTRAPSTART:64,INVTRAPEND:65,linkStatement:66,arrowText:67,TESTSTR:68,START_LINK:69,LINK:70,PIPE:71,textToken:72,STR:73,keywords:74,STYLE:75,LINKSTYLE:76,CLASSDEF:77,CLASS:78,CLICK:79,DOWN:80,UP:81,textNoTags:82,textNoTagsToken:83,DEFAULT:84,stylesOpt:85,alphaNum:86,LINK_TARGET:87,HEX:88,numList:89,INTERPOLATE:90,NUM:91,COMMA:92,style:93,styleComponent:94,ALPHA:95,COLON:96,MINUS:97,UNIT:98,BRKT:99,DOT:100,PCT:101,TAGSTART:102,alphaNumToken:103,idStringToken:104,alphaNumStatement:105,PUNCTUATION:106,UNICODE_TEXT:107,PLUS:108,EQUALS:109,MULT:110,UNDERSCORE:111,graphCodeTokens:112,ARROW_CROSS:113,ARROW_POINT:114,ARROW_CIRCLE:115,ARROW_OPEN:116,QUOTE:117,$accept:0,$end:1},terminals_:{2:"error",10:":",12:"open_directive",13:"type_directive",14:"arg_directive",15:"close_directive",20:"SEMI",21:"NEWLINE",22:"SPACE",23:"EOF",24:"GRAPH",25:"NODIR",26:"DIR",38:"subgraph",40:"SQS",41:"SQE",42:"end",46:"AMP",47:"STYLE_SEPARATOR",49:"PS",50:"PE",51:"(-",52:"-)",53:"STADIUMSTART",54:"STADIUMEND",55:"SUBROUTINESTART",56:"SUBROUTINEEND",57:"CYLINDERSTART",58:"CYLINDEREND",59:"DIAMOND_START",60:"DIAMOND_STOP",61:"TAGEND",62:"TRAPSTART",63:"TRAPEND",64:"INVTRAPSTART",65:"INVTRAPEND",68:"TESTSTR",69:"START_LINK",70:"LINK",71:"PIPE",73:"STR",75:"STYLE",76:"LINKSTYLE",77:"CLASSDEF",78:"CLASS",79:"CLICK",80:"DOWN",81:"UP",84:"DEFAULT",87:"LINK_TARGET",88:"HEX",90:"INTERPOLATE",91:"NUM",92:"COMMA",95:"ALPHA",96:"COLON",97:"MINUS",98:"UNIT",99:"BRKT",100:"DOT",101:"PCT",102:"TAGSTART",106:"PUNCTUATION",107:"UNICODE_TEXT",108:"PLUS",109:"EQUALS",110:"MULT",111:"UNDERSCORE",113:"ARROW_CROSS",114:"ARROW_POINT",115:"ARROW_CIRCLE",116:"ARROW_OPEN",117:"QUOTE"},productions_:[0,[3,1],[3,2],[5,4],[5,6],[6,1],[7,1],[11,1],[8,1],[4,2],[17,0],[17,2],[18,1],[18,1],[18,1],[18,1],[18,1],[16,2],[16,2],[16,2],[16,3],[28,2],[28,1],[29,1],[29,1],[29,1],[27,1],[27,1],[27,2],[31,2],[31,2],[31,1],[31,1],[30,2],[30,1],[19,2],[19,2],[19,2],[19,2],[19,2],[19,2],[19,9],[19,6],[19,4],[9,1],[9,1],[9,1],[32,3],[32,4],[32,2],[32,1],[44,1],[44,5],[44,3],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,4],[45,6],[45,4],[45,4],[45,4],[45,4],[45,4],[45,1],[43,2],[43,3],[43,3],[43,1],[43,3],[66,1],[67,3],[39,1],[39,2],[39,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[74,1],[82,1],[82,2],[35,5],[35,5],[36,5],[37,5],[37,7],[37,5],[37,7],[37,7],[37,9],[33,5],[33,5],[34,5],[34,5],[34,9],[34,9],[34,7],[34,7],[89,1],[89,3],[85,1],[85,3],[93,1],[93,2],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[94,1],[72,1],[72,1],[72,1],[72,1],[72,1],[72,1],[83,1],[83,1],[83,1],[83,1],[48,1],[48,2],[86,1],[86,2],[105,1],[105,1],[105,1],[105,1],[103,1],[103,1],[103,1],[103,1],[103,1],[103,1],[103,1],[103,1],[103,1],[103,1],[103,1],[103,1],[103,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[104,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1],[112,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 5:r.parseDirective("%%{","open_directive");break;case 6:r.parseDirective(a[s],"type_directive");break;case 7:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 8:r.parseDirective("}%%","close_directive","flowchart");break;case 10:this.$=[];break;case 11:a[s]!==[]&&a[s-1].push(a[s]),this.$=a[s-1];break;case 12:case 76:case 78:case 90:case 138:case 140:case 141:this.$=a[s];break;case 19:r.setDirection("TB"),this.$="TB";break;case 20:r.setDirection(a[s-1]),this.$=a[s-1];break;case 35:this.$=a[s-1].nodes;break;case 36:case 37:case 38:case 39:case 40:this.$=[];break;case 41:this.$=r.addSubGraph(a[s-6],a[s-1],a[s-4]);break;case 42:this.$=r.addSubGraph(a[s-3],a[s-1],a[s-3]);break;case 43:this.$=r.addSubGraph(void 0,a[s-1],void 0);break;case 47:r.addLink(a[s-2].stmt,a[s],a[s-1]),this.$={stmt:a[s],nodes:a[s].concat(a[s-2].nodes)};break;case 48:r.addLink(a[s-3].stmt,a[s-1],a[s-2]),this.$={stmt:a[s-1],nodes:a[s-1].concat(a[s-3].nodes)};break;case 49:this.$={stmt:a[s-1],nodes:a[s-1]};break;case 50:this.$={stmt:a[s],nodes:a[s]};break;case 51:this.$=[a[s]];break;case 52:this.$=a[s-4].concat(a[s]);break;case 53:this.$=[a[s-2]],r.setClass(a[s-2],a[s]);break;case 54:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"square");break;case 55:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],"circle");break;case 56:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"ellipse");break;case 57:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"stadium");break;case 58:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"subroutine");break;case 59:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"cylinder");break;case 60:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"round");break;case 61:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"diamond");break;case 62:this.$=a[s-5],r.addVertex(a[s-5],a[s-2],"hexagon");break;case 63:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"odd");break;case 64:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"trapezoid");break;case 65:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"inv_trapezoid");break;case 66:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"lean_right");break;case 67:this.$=a[s-3],r.addVertex(a[s-3],a[s-1],"lean_left");break;case 68:this.$=a[s],r.addVertex(a[s]);break;case 69:a[s-1].text=a[s],this.$=a[s-1];break;case 70:case 71:a[s-2].text=a[s-1],this.$=a[s-2];break;case 72:this.$=a[s];break;case 73:var c=r.destructLink(a[s],a[s-2]);this.$={type:c.type,stroke:c.stroke,length:c.length,text:a[s-1]};break;case 74:c=r.destructLink(a[s]);this.$={type:c.type,stroke:c.stroke,length:c.length};break;case 75:this.$=a[s-1];break;case 77:case 91:case 139:this.$=a[s-1]+""+a[s];break;case 92:case 93:this.$=a[s-4],r.addClass(a[s-2],a[s]);break;case 94:this.$=a[s-4],r.setClass(a[s-2],a[s]);break;case 95:this.$=a[s-4],r.setClickEvent(a[s-2],a[s],void 0);break;case 96:this.$=a[s-6],r.setClickEvent(a[s-4],a[s-2],a[s]);break;case 97:this.$=a[s-4],r.setLink(a[s-2],a[s],void 0,void 0);break;case 98:this.$=a[s-6],r.setLink(a[s-4],a[s-2],a[s],void 0);break;case 99:this.$=a[s-6],r.setLink(a[s-4],a[s-2],void 0,a[s]);break;case 100:this.$=a[s-8],r.setLink(a[s-6],a[s-4],a[s-2],a[s]);break;case 101:this.$=a[s-4],r.addVertex(a[s-2],void 0,void 0,a[s]);break;case 102:case 104:this.$=a[s-4],r.updateLink(a[s-2],a[s]);break;case 103:this.$=a[s-4],r.updateLink([a[s-2]],a[s]);break;case 105:this.$=a[s-8],r.updateLinkInterpolate([a[s-6]],a[s-2]),r.updateLink([a[s-6]],a[s]);break;case 106:this.$=a[s-8],r.updateLinkInterpolate(a[s-6],a[s-2]),r.updateLink(a[s-6],a[s]);break;case 107:this.$=a[s-6],r.updateLinkInterpolate([a[s-4]],a[s]);break;case 108:this.$=a[s-6],r.updateLinkInterpolate(a[s-4],a[s]);break;case 109:case 111:this.$=[a[s]];break;case 110:case 112:a[s-2].push(a[s]),this.$=a[s-2];break;case 114:this.$=a[s-1]+a[s];break;case 136:this.$=a[s];break;case 137:this.$=a[s-1]+""+a[s];break;case 142:this.$="v";break;case 143:this.$="-"}},table:[{3:1,4:2,5:3,6:5,12:e,16:4,21:n,22:r,24:i},{1:[3]},{1:[2,1]},{3:10,4:2,5:3,6:5,12:e,16:4,21:n,22:r,24:i},t(a,o,{17:11}),{7:12,13:[1,13]},{16:14,21:n,22:r,24:i},{16:15,21:n,22:r,24:i},{25:[1,16],26:[1,17]},{13:[2,5]},{1:[2,2]},{1:[2,9],18:18,19:19,20:s,21:c,22:u,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,44:31,45:37,46:f,48:38,75:d,76:p,77:g,78:y,79:v,80:m,91:b,92:x,95:_,96:k,97:w,99:E,100:T,104:39,106:C,107:A,108:S,109:M,110:O,111:D},{8:55,10:[1,56],15:N},t([10,15],[2,6]),t(a,[2,17]),t(a,[2,18]),t(a,[2,19]),{20:[1,59],21:[1,60],22:B,27:58,30:61},t(L,[2,11]),t(L,[2,12]),t(L,[2,13]),t(L,[2,14]),t(L,[2,15]),t(L,[2,16]),{9:63,20:F,21:P,23:I,43:64,66:68,69:[1,69],70:[1,70]},{9:71,20:F,21:P,23:I},{9:72,20:F,21:P,23:I},{9:73,20:F,21:P,23:I},{9:74,20:F,21:P,23:I},{9:75,20:F,21:P,23:I},{9:77,20:F,21:P,22:[1,76],23:I},t(j,[2,50],{30:78,22:B}),{22:[1,79]},{22:[1,80]},{22:[1,81]},{22:[1,82]},{22:[1,83]},t(R,[2,51],{47:[1,84]}),t(Y,[2,68],{104:95,40:[1,85],46:f,49:[1,86],51:[1,87],53:[1,88],55:[1,89],57:[1,90],59:[1,91],61:[1,92],62:[1,93],64:[1,94],80:m,91:b,92:x,95:_,96:k,97:w,99:E,100:T,106:C,107:A,108:S,109:M,110:O,111:D}),t(z,[2,136]),t(z,[2,157]),t(z,[2,158]),t(z,[2,159]),t(z,[2,160]),t(z,[2,161]),t(z,[2,162]),t(z,[2,163]),t(z,[2,164]),t(z,[2,165]),t(z,[2,166]),t(z,[2,167]),t(z,[2,168]),t(z,[2,169]),t(z,[2,170]),t(z,[2,171]),{9:96,20:F,21:P,23:I},{11:97,14:[1,98]},t(U,[2,8]),t(a,[2,20]),t(a,[2,26]),t(a,[2,27]),{21:[1,99]},t($,[2,34],{30:100,22:B}),t(L,[2,35]),{44:101,45:37,46:f,48:38,80:m,91:b,92:x,95:_,96:k,97:w,99:E,100:T,104:39,106:C,107:A,108:S,109:M,110:O,111:D},t(W,[2,44]),t(W,[2,45]),t(W,[2,46]),t(V,[2,72],{67:102,68:[1,103],71:[1,104]}),{22:H,24:G,26:q,38:X,39:105,42:Z,46:J,61:Q,69:K,72:106,73:tt,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},t([46,68,71,80,91,92,95,96,97,99,100,106,107,108,109,110,111],[2,74]),t(L,[2,36]),t(L,[2,37]),t(L,[2,38]),t(L,[2,39]),t(L,[2,40]),{22:H,24:G,26:q,38:X,39:142,42:Z,46:J,61:Q,69:K,72:106,73:tt,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},t(Et,o,{17:143}),t(j,[2,49],{46:Tt}),{26:Ct,46:J,80:At,86:145,88:[1,146],91:ut,92:lt,95:ht,96:ft,97:St,99:pt,100:gt,103:149,105:147,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{84:[1,152],89:153,91:[1,154]},{26:Ct,46:J,80:At,84:[1,155],86:156,91:ut,92:lt,95:ht,96:ft,97:St,99:pt,100:gt,103:149,105:147,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{26:Ct,46:J,80:At,86:157,91:ut,92:lt,95:ht,96:ft,97:St,99:pt,100:gt,103:149,105:147,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{26:Ct,46:J,80:At,86:158,91:ut,92:lt,95:ht,96:ft,97:St,99:pt,100:gt,103:149,105:147,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{46:f,48:159,80:m,91:b,92:x,95:_,96:k,97:w,99:E,100:T,104:39,106:C,107:A,108:S,109:M,110:O,111:D},{22:H,24:G,26:q,38:X,39:160,42:Z,46:J,61:Q,69:K,72:106,73:tt,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{22:H,24:G,26:q,38:X,39:162,42:Z,46:J,49:[1,161],61:Q,69:K,72:106,73:tt,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{22:H,24:G,26:q,38:X,39:163,42:Z,46:J,61:Q,69:K,72:106,73:tt,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{22:H,24:G,26:q,38:X,39:164,42:Z,46:J,61:Q,69:K,72:106,73:tt,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{22:H,24:G,26:q,38:X,39:165,42:Z,46:J,61:Q,69:K,72:106,73:tt,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{22:H,24:G,26:q,38:X,39:166,42:Z,46:J,61:Q,69:K,72:106,73:tt,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{22:H,24:G,26:q,38:X,39:167,42:Z,46:J,59:[1,168],61:Q,69:K,72:106,73:tt,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{22:H,24:G,26:q,38:X,39:169,42:Z,46:J,61:Q,69:K,72:106,73:tt,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{22:H,24:G,26:q,38:X,39:170,42:Z,46:J,61:Q,69:K,72:106,73:tt,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{22:H,24:G,26:q,38:X,39:171,42:Z,46:J,61:Q,69:K,72:106,73:tt,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},t(z,[2,137]),t(Mt,[2,3]),{8:172,15:N},{15:[2,7]},t(a,[2,28]),t($,[2,33]),t(j,[2,47],{30:173,22:B}),t(V,[2,69],{22:[1,174]}),{22:[1,175]},{22:H,24:G,26:q,38:X,39:176,42:Z,46:J,61:Q,69:K,72:106,73:tt,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{22:H,24:G,26:q,38:X,42:Z,46:J,61:Q,69:K,70:[1,177],72:178,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},t(Ot,[2,76]),t(Ot,[2,78]),t(Ot,[2,126]),t(Ot,[2,127]),t(Ot,[2,128]),t(Ot,[2,129]),t(Ot,[2,130]),t(Ot,[2,131]),t(Ot,[2,132]),t(Ot,[2,133]),t(Ot,[2,134]),t(Ot,[2,135]),t(Ot,[2,144]),t(Ot,[2,145]),t(Ot,[2,146]),t(Ot,[2,147]),t(Ot,[2,148]),t(Ot,[2,149]),t(Ot,[2,150]),t(Ot,[2,151]),t(Ot,[2,152]),t(Ot,[2,153]),t(Ot,[2,154]),t(Ot,[2,155]),t(Ot,[2,156]),t(Ot,[2,79]),t(Ot,[2,80]),t(Ot,[2,81]),t(Ot,[2,82]),t(Ot,[2,83]),t(Ot,[2,84]),t(Ot,[2,85]),t(Ot,[2,86]),t(Ot,[2,87]),t(Ot,[2,88]),t(Ot,[2,89]),{9:180,20:F,21:P,22:H,23:I,24:G,26:q,38:X,40:[1,179],42:Z,46:J,61:Q,69:K,72:178,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{18:18,19:19,20:s,21:c,22:u,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,181],44:31,45:37,46:f,48:38,75:d,76:p,77:g,78:y,79:v,80:m,91:b,92:x,95:_,96:k,97:w,99:E,100:T,104:39,106:C,107:A,108:S,109:M,110:O,111:D},{22:B,30:182},{22:[1,183],26:Ct,46:J,80:At,91:ut,92:lt,95:ht,96:ft,97:St,99:pt,100:gt,103:149,105:184,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{22:[1,185]},t(Dt,[2,138]),t(Dt,[2,140]),t(Dt,[2,141]),t(Dt,[2,142]),t(Dt,[2,143]),{22:[1,186]},{22:[1,187],92:[1,188]},t(Nt,[2,109]),{22:[1,189]},{22:[1,190],26:Ct,46:J,80:At,91:ut,92:lt,95:ht,96:ft,97:St,99:pt,100:gt,103:149,105:184,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{22:[1,191],26:Ct,46:J,80:At,91:ut,92:lt,95:ht,96:ft,97:St,99:pt,100:gt,103:149,105:184,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{22:[1,192],26:Ct,46:J,80:At,91:ut,92:lt,95:ht,96:ft,97:St,99:pt,100:gt,103:149,105:184,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},t(R,[2,53],{104:95,46:f,80:m,91:b,92:x,95:_,96:k,97:w,99:E,100:T,106:C,107:A,108:S,109:M,110:O,111:D}),{22:H,24:G,26:q,38:X,41:[1,193],42:Z,46:J,61:Q,69:K,72:178,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{22:H,24:G,26:q,38:X,39:194,42:Z,46:J,61:Q,69:K,72:106,73:tt,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{22:H,24:G,26:q,38:X,42:Z,46:J,50:[1,195],61:Q,69:K,72:178,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{22:H,24:G,26:q,38:X,42:Z,46:J,52:[1,196],61:Q,69:K,72:178,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{22:H,24:G,26:q,38:X,42:Z,46:J,54:[1,197],61:Q,69:K,72:178,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{22:H,24:G,26:q,38:X,42:Z,46:J,56:[1,198],61:Q,69:K,72:178,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{22:H,24:G,26:q,38:X,42:Z,46:J,58:[1,199],61:Q,69:K,72:178,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{22:H,24:G,26:q,38:X,42:Z,46:J,60:[1,200],61:Q,69:K,72:178,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{22:H,24:G,26:q,38:X,39:201,42:Z,46:J,61:Q,69:K,72:106,73:tt,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{22:H,24:G,26:q,38:X,41:[1,202],42:Z,46:J,61:Q,69:K,72:178,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{22:H,24:G,26:q,38:X,42:Z,46:J,61:Q,63:[1,203],65:[1,204],69:K,72:178,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{22:H,24:G,26:q,38:X,42:Z,46:J,61:Q,63:[1,206],65:[1,205],69:K,72:178,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{9:207,20:F,21:P,23:I},t(j,[2,48],{46:Tt}),t(V,[2,71]),t(V,[2,70]),{22:H,24:G,26:q,38:X,42:Z,46:J,61:Q,69:K,71:[1,208],72:178,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},t(V,[2,73]),t(Ot,[2,77]),{22:H,24:G,26:q,38:X,39:209,42:Z,46:J,61:Q,69:K,72:106,73:tt,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},t(Et,o,{17:210}),t(L,[2,43]),{45:211,46:f,48:38,80:m,91:b,92:x,95:_,96:k,97:w,99:E,100:T,104:39,106:C,107:A,108:S,109:M,110:O,111:D},{22:Bt,75:Lt,85:212,88:Ft,91:Pt,93:213,94:214,95:It,96:jt,97:Rt,98:Yt,99:zt,100:Ut,101:$t},t(Dt,[2,139]),{22:Bt,75:Lt,85:226,88:Ft,91:Pt,93:213,94:214,95:It,96:jt,97:Rt,98:Yt,99:zt,100:Ut,101:$t},{22:Bt,75:Lt,85:227,88:Ft,90:[1,228],91:Pt,93:213,94:214,95:It,96:jt,97:Rt,98:Yt,99:zt,100:Ut,101:$t},{22:Bt,75:Lt,85:229,88:Ft,90:[1,230],91:Pt,93:213,94:214,95:It,96:jt,97:Rt,98:Yt,99:zt,100:Ut,101:$t},{91:[1,231]},{22:Bt,75:Lt,85:232,88:Ft,91:Pt,93:213,94:214,95:It,96:jt,97:Rt,98:Yt,99:zt,100:Ut,101:$t},{22:Bt,75:Lt,85:233,88:Ft,91:Pt,93:213,94:214,95:It,96:jt,97:Rt,98:Yt,99:zt,100:Ut,101:$t},{26:Ct,46:J,80:At,86:234,91:ut,92:lt,95:ht,96:ft,97:St,99:pt,100:gt,103:149,105:147,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{26:Ct,46:J,73:[1,236],80:At,86:235,91:ut,92:lt,95:ht,96:ft,97:St,99:pt,100:gt,103:149,105:147,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},t(Y,[2,54]),{22:H,24:G,26:q,38:X,42:Z,46:J,50:[1,237],61:Q,69:K,72:178,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},t(Y,[2,60]),t(Y,[2,56]),t(Y,[2,57]),t(Y,[2,58]),t(Y,[2,59]),t(Y,[2,61]),{22:H,24:G,26:q,38:X,42:Z,46:J,60:[1,238],61:Q,69:K,72:178,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},t(Y,[2,63]),t(Y,[2,64]),t(Y,[2,66]),t(Y,[2,65]),t(Y,[2,67]),t(Mt,[2,4]),t([22,46,80,91,92,95,96,97,99,100,106,107,108,109,110,111],[2,75]),{22:H,24:G,26:q,38:X,41:[1,239],42:Z,46:J,61:Q,69:K,72:178,74:117,75:et,76:nt,77:rt,78:it,79:at,80:ot,81:st,83:108,84:ct,91:ut,92:lt,95:ht,96:ft,97:dt,99:pt,100:gt,101:yt,102:vt,103:114,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{18:18,19:19,20:s,21:c,22:u,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,240],44:31,45:37,46:f,48:38,75:d,76:p,77:g,78:y,79:v,80:m,91:b,92:x,95:_,96:k,97:w,99:E,100:T,104:39,106:C,107:A,108:S,109:M,110:O,111:D},t(R,[2,52]),t(U,[2,101],{92:Wt}),t(Vt,[2,111],{94:242,22:Bt,75:Lt,88:Ft,91:Pt,95:It,96:jt,97:Rt,98:Yt,99:zt,100:Ut,101:$t}),t(Ht,[2,113]),t(Ht,[2,115]),t(Ht,[2,116]),t(Ht,[2,117]),t(Ht,[2,118]),t(Ht,[2,119]),t(Ht,[2,120]),t(Ht,[2,121]),t(Ht,[2,122]),t(Ht,[2,123]),t(Ht,[2,124]),t(Ht,[2,125]),t(U,[2,102],{92:Wt}),t(U,[2,103],{92:Wt}),{22:[1,243]},t(U,[2,104],{92:Wt}),{22:[1,244]},t(Nt,[2,110]),t(U,[2,92],{92:Wt}),t(U,[2,93],{92:Wt}),t(U,[2,94],{103:149,105:184,26:Ct,46:J,80:At,91:ut,92:lt,95:ht,96:ft,97:St,99:pt,100:gt,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt}),t(U,[2,95],{103:149,105:184,22:[1,245],26:Ct,46:J,80:At,91:ut,92:lt,95:ht,96:ft,97:St,99:pt,100:gt,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt}),t(U,[2,97],{22:[1,246]}),{50:[1,247]},{60:[1,248]},{9:249,20:F,21:P,23:I},t(L,[2,42]),{22:Bt,75:Lt,88:Ft,91:Pt,93:250,94:214,95:It,96:jt,97:Rt,98:Yt,99:zt,100:Ut,101:$t},t(Ht,[2,114]),{26:Ct,46:J,80:At,86:251,91:ut,92:lt,95:ht,96:ft,97:St,99:pt,100:gt,103:149,105:147,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{26:Ct,46:J,80:At,86:252,91:ut,92:lt,95:ht,96:ft,97:St,99:pt,100:gt,103:149,105:147,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt},{73:[1,253]},{73:[1,254],87:[1,255]},t(Y,[2,55]),t(Y,[2,62]),t(Et,o,{17:256}),t(Vt,[2,112],{94:242,22:Bt,75:Lt,88:Ft,91:Pt,95:It,96:jt,97:Rt,98:Yt,99:zt,100:Ut,101:$t}),t(U,[2,107],{103:149,105:184,22:[1,257],26:Ct,46:J,80:At,91:ut,92:lt,95:ht,96:ft,97:St,99:pt,100:gt,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt}),t(U,[2,108],{103:149,105:184,22:[1,258],26:Ct,46:J,80:At,91:ut,92:lt,95:ht,96:ft,97:St,99:pt,100:gt,106:mt,107:bt,108:xt,109:_t,110:kt,111:wt}),t(U,[2,96]),t(U,[2,98],{22:[1,259]}),t(U,[2,99]),{18:18,19:19,20:s,21:c,22:u,23:l,32:24,33:25,34:26,35:27,36:28,37:29,38:h,42:[1,260],44:31,45:37,46:f,48:38,75:d,76:p,77:g,78:y,79:v,80:m,91:b,92:x,95:_,96:k,97:w,99:E,100:T,104:39,106:C,107:A,108:S,109:M,110:O,111:D},{22:Bt,75:Lt,85:261,88:Ft,91:Pt,93:213,94:214,95:It,96:jt,97:Rt,98:Yt,99:zt,100:Ut,101:$t},{22:Bt,75:Lt,85:262,88:Ft,91:Pt,93:213,94:214,95:It,96:jt,97:Rt,98:Yt,99:zt,100:Ut,101:$t},{87:[1,263]},t(L,[2,41]),t(U,[2,105],{92:Wt}),t(U,[2,106],{92:Wt}),t(U,[2,100])],defaultActions:{2:[2,1],9:[2,5],10:[2,2],98:[2,7]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,A,S,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in S=[],o[k])this.terminals_[T]&&T>h&&S.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:S})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,g.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0}},qt={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),12;case 1:return this.begin("type_directive"),13;case 2:return this.popState(),this.begin("arg_directive"),10;case 3:return this.popState(),this.popState(),15;case 4:return 14;case 5:case 6:break;case 7:this.begin("string");break;case 8:this.popState();break;case 9:return"STR";case 10:return 75;case 11:return 84;case 12:return 76;case 13:return 90;case 14:return 77;case 15:return 78;case 16:return 79;case 17:case 18:return t.lex.firstGraph()&&this.begin("dir"),24;case 19:return 38;case 20:return 42;case 21:case 22:case 23:case 24:return 87;case 25:return this.popState(),25;case 26:case 27:case 28:case 29:case 30:case 31:case 32:case 33:case 34:case 35:return this.popState(),26;case 36:return 91;case 37:return 99;case 38:return 47;case 39:return 96;case 40:return 46;case 41:return 20;case 42:return 92;case 43:return 110;case 44:case 45:case 46:return 70;case 47:case 48:case 49:return 69;case 50:return 51;case 51:return 52;case 52:return 53;case 53:return 54;case 54:return 55;case 55:return 56;case 56:return 57;case 57:return 58;case 58:return 97;case 59:return 100;case 60:return 111;case 61:return 108;case 62:return 101;case 63:case 64:return 109;case 65:return 102;case 66:return 61;case 67:return 81;case 68:return"SEP";case 69:return 80;case 70:return 95;case 71:return 63;case 72:return 62;case 73:return 65;case 74:return 64;case 75:return 106;case 76:return 107;case 77:return 71;case 78:return 49;case 79:return 50;case 80:return 40;case 81:return 41;case 82:return 59;case 83:return 60;case 84:return 117;case 85:return 21;case 86:return 22;case 87:return 23}},rules:[/^(?:%%\{)/,/^(?:((?:(?!\}%%)[^:.])*))/,/^(?::)/,/^(?:\}%%)/,/^(?:((?:(?!\}%%).|\n)*))/,/^(?:%%(?!\{)[^\n]*)/,/^(?:[^\}]%%[^\n]*)/,/^(?:["])/,/^(?:["])/,/^(?:[^"]*)/,/^(?:style\b)/,/^(?:default\b)/,/^(?:linkStyle\b)/,/^(?:interpolate\b)/,/^(?:classDef\b)/,/^(?:class\b)/,/^(?:click\b)/,/^(?:graph\b)/,/^(?:flowchart\b)/,/^(?:subgraph\b)/,/^(?:end\b\s*)/,/^(?:_self\b)/,/^(?:_blank\b)/,/^(?:_parent\b)/,/^(?:_top\b)/,/^(?:(\r?\n)*\s*\n)/,/^(?:\s*LR\b)/,/^(?:\s*RL\b)/,/^(?:\s*TB\b)/,/^(?:\s*BT\b)/,/^(?:\s*TD\b)/,/^(?:\s*BR\b)/,/^(?:\s*<)/,/^(?:\s*>)/,/^(?:\s*\^)/,/^(?:\s*v\b)/,/^(?:[0-9]+)/,/^(?:#)/,/^(?::::)/,/^(?::)/,/^(?:&)/,/^(?:;)/,/^(?:,)/,/^(?:\*)/,/^(?:\s*[xo<]?--+[-xo>]\s*)/,/^(?:\s*[xo<]?==+[=xo>]\s*)/,/^(?:\s*[xo<]?-?\.+-[xo>]?\s*)/,/^(?:\s*[xo<]?--\s*)/,/^(?:\s*[xo<]?==\s*)/,/^(?:\s*[xo<]?-\.\s*)/,/^(?:\(-)/,/^(?:-\))/,/^(?:\(\[)/,/^(?:\]\))/,/^(?:\[\[)/,/^(?:\]\])/,/^(?:\[\()/,/^(?:\)\])/,/^(?:-)/,/^(?:\.)/,/^(?:[\_])/,/^(?:\+)/,/^(?:%)/,/^(?:=)/,/^(?:=)/,/^(?:<)/,/^(?:>)/,/^(?:\^)/,/^(?:\\\|)/,/^(?:v\b)/,/^(?:[A-Za-z]+)/,/^(?:\\\])/,/^(?:\[\/)/,/^(?:\/\])/,/^(?:\[\\)/,/^(?:[!"#$%&'*+,-.`?\\_/])/,/^(?:[\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6]|[\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377]|[\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5]|[\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA]|[\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE]|[\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA]|[\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0]|[\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977]|[\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2]|[\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A]|[\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39]|[\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8]|[\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C]|[\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C]|[\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99]|[\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0]|[\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D]|[\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3]|[\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10]|[\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1]|[\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81]|[\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3]|[\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6]|[\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A]|[\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081]|[\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D]|[\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0]|[\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310]|[\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C]|[\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711]|[\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7]|[\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C]|[\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16]|[\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF]|[\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC]|[\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D]|[\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D]|[\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3]|[\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F]|[\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128]|[\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184]|[\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3]|[\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6]|[\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE]|[\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C]|[\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D]|[\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC]|[\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B]|[\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788]|[\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805]|[\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB]|[\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28]|[\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5]|[\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4]|[\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E]|[\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D]|[\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36]|[\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D]|[\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC]|[\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF]|[\uFFD2-\uFFD7\uFFDA-\uFFDC])/,/^(?:\|)/,/^(?:\()/,/^(?:\))/,/^(?:\[)/,/^(?:\])/,/^(?:\{)/,/^(?:\})/,/^(?:")/,/^(?:(\r?\n)+)/,/^(?:\s)/,/^(?:$)/],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},vertex:{rules:[],inclusive:!1},dir:{rules:[25,26,27,28,29,30,31,32,33,34,35],inclusive:!1},string:{rules:[8,9],inclusive:!1},INITIAL:{rules:[0,5,6,7,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66,67,68,69,70,71,72,73,74,75,76,77,78,79,80,81,82,83,84,85,86,87],inclusive:!0}}};function Xt(){this.yy={}}return Gt.lexer=qt,Xt.prototype=Gt,Gt.Parser=Xt,new Xt}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(19).readFileSync(n(20).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(14),n(7)(t))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,3],n=[1,5],r=[7,9,11,12,13,14,15,16,17,18,20,27,32],i=[1,15],a=[1,16],o=[1,17],s=[1,18],c=[1,19],u=[1,20],l=[1,21],h=[1,23],f=[1,25],d=[1,28],p=[5,7,9,11,12,13,14,15,16,17,18,20,27,32],g={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,gantt:5,document:6,EOF:7,line:8,SPACE:9,statement:10,NL:11,dateFormat:12,inclusiveEndDates:13,axisFormat:14,excludes:15,todayMarker:16,title:17,section:18,clickStatement:19,taskTxt:20,taskData:21,openDirective:22,typeDirective:23,closeDirective:24,":":25,argDirective:26,click:27,callbackname:28,callbackargs:29,href:30,clickStatementDebug:31,open_directive:32,type_directive:33,arg_directive:34,close_directive:35,$accept:0,$end:1},terminals_:{2:"error",5:"gantt",7:"EOF",9:"SPACE",11:"NL",12:"dateFormat",13:"inclusiveEndDates",14:"axisFormat",15:"excludes",16:"todayMarker",17:"title",18:"section",20:"taskTxt",21:"taskData",25:":",27:"click",28:"callbackname",29:"callbackargs",30:"href",32:"open_directive",33:"type_directive",34:"arg_directive",35:"close_directive"},productions_:[0,[3,2],[3,3],[6,0],[6,2],[8,2],[8,1],[8,1],[8,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,1],[4,4],[4,6],[19,2],[19,3],[19,3],[19,4],[19,3],[19,4],[19,2],[31,2],[31,3],[31,3],[31,4],[31,3],[31,4],[31,2],[22,1],[23,1],[26,1],[24,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 2:return a[s-1];case 3:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 7:case 8:this.$=[];break;case 9:r.setDateFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 10:r.enableInclusiveEndDates(),this.$=a[s].substr(18);break;case 11:r.setAxisFormat(a[s].substr(11)),this.$=a[s].substr(11);break;case 12:r.setExcludes(a[s].substr(9)),this.$=a[s].substr(9);break;case 13:r.setTodayMarker(a[s].substr(12)),this.$=a[s].substr(12);break;case 14:r.setTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 15:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 17:r.addTask(a[s-1],a[s]),this.$="task";break;case 21:this.$=a[s-1],r.setClickEvent(a[s-1],a[s],null);break;case 22:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],a[s]);break;case 23:this.$=a[s-2],r.setClickEvent(a[s-2],a[s-1],null),r.setLink(a[s-2],a[s]);break;case 24:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-2],a[s-1]),r.setLink(a[s-3],a[s]);break;case 25:this.$=a[s-2],r.setClickEvent(a[s-2],a[s],null),r.setLink(a[s-2],a[s-1]);break;case 26:this.$=a[s-3],r.setClickEvent(a[s-3],a[s-1],a[s]),r.setLink(a[s-3],a[s-2]);break;case 27:this.$=a[s-1],r.setLink(a[s-1],a[s]);break;case 28:case 34:this.$=a[s-1]+" "+a[s];break;case 29:case 30:case 32:this.$=a[s-2]+" "+a[s-1]+" "+a[s];break;case 31:case 33:this.$=a[s-3]+" "+a[s-2]+" "+a[s-1]+" "+a[s];break;case 35:r.parseDirective("%%{","open_directive");break;case 36:r.parseDirective(a[s],"type_directive");break;case 37:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 38:r.parseDirective("}%%","close_directive","gantt")}},table:[{3:1,4:2,5:e,22:4,32:n},{1:[3]},{3:6,4:2,5:e,22:4,32:n},t(r,[2,3],{6:7}),{23:8,33:[1,9]},{33:[2,35]},{1:[2,1]},{4:24,7:[1,10],8:11,9:[1,12],10:13,11:[1,14],12:i,13:a,14:o,15:s,16:c,17:u,18:l,19:22,20:h,22:4,27:f,32:n},{24:26,25:[1,27],35:d},t([25,35],[2,36]),t(r,[2,8],{1:[2,2]}),t(r,[2,4]),{4:24,10:29,12:i,13:a,14:o,15:s,16:c,17:u,18:l,19:22,20:h,22:4,27:f,32:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,9]),t(r,[2,10]),t(r,[2,11]),t(r,[2,12]),t(r,[2,13]),t(r,[2,14]),t(r,[2,15]),t(r,[2,16]),{21:[1,30]},t(r,[2,18]),{28:[1,31],30:[1,32]},{11:[1,33]},{26:34,34:[1,35]},{11:[2,38]},t(r,[2,5]),t(r,[2,17]),t(r,[2,21],{29:[1,36],30:[1,37]}),t(r,[2,27],{28:[1,38]}),t(p,[2,19]),{24:39,35:d},{35:[2,37]},t(r,[2,22],{30:[1,40]}),t(r,[2,23]),t(r,[2,25],{29:[1,41]}),{11:[1,42]},t(r,[2,24]),t(r,[2,26]),t(p,[2,20])],defaultActions:{5:[2,35],6:[2,1],28:[2,38],35:[2,37]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,A,S,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in S=[],o[k])this.terminals_[T]&&T>h&&S.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:S})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,g.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0}},y={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),32;case 1:return this.begin("type_directive"),33;case 2:return this.popState(),this.begin("arg_directive"),25;case 3:return this.popState(),this.popState(),35;case 4:return 34;case 5:case 6:case 7:break;case 8:return 11;case 9:case 10:case 11:break;case 12:this.begin("href");break;case 13:this.popState();break;case 14:return 30;case 15:this.begin("callbackname");break;case 16:this.popState();break;case 17:this.popState(),this.begin("callbackargs");break;case 18:return 28;case 19:this.popState();break;case 20:return 29;case 21:this.begin("click");break;case 22:this.popState();break;case 23:return 27;case 24:return 5;case 25:return 12;case 26:return 13;case 27:return 14;case 28:return 15;case 29:return 16;case 30:return"date";case 31:return 17;case 32:return 18;case 33:return 20;case 34:return 21;case 35:return 25;case 36:return 7;case 37:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[19,20],inclusive:!1},callbackname:{rules:[16,17,18],inclusive:!1},href:{rules:[13,14],inclusive:!1},click:{rules:[22,23],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,15,21,24,25,26,27,28,29,30,31,32,33,34,35,36,37],inclusive:!0}}};function v(){this.yy={}}return g.lexer=y,v.prototype=g,g.Parser=v,new v}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(19).readFileSync(n(20).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(14),n(7)(t))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,5],r=[6,9,11,17,18,19,21],i=[1,15],a=[1,16],o=[1,17],s=[1,21],c=[4,6,9,11,17,18,19,21],u={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,section:18,taskName:19,taskData:20,open_directive:21,type_directive:22,arg_directive:23,close_directive:24,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"section",19:"taskName",20:"taskData",21:"open_directive",22:"type_directive",23:"arg_directive",24:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 3:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 7:case 8:this.$=[];break;case 11:r.setTitle(a[s].substr(6)),this.$=a[s].substr(6);break;case 12:r.addSection(a[s].substr(8)),this.$=a[s].substr(8);break;case 13:r.addTask(a[s-1],a[s]),this.$="task";break;case 15:r.parseDirective("%%{","open_directive");break;case 16:r.parseDirective(a[s],"type_directive");break;case 17:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 18:r.parseDirective("}%%","close_directive","journey")}},table:[{3:1,4:e,7:3,12:4,21:n},{1:[3]},t(r,[2,3],{5:6}),{3:7,4:e,7:3,12:4,21:n},{13:8,22:[1,9]},{22:[2,15]},{6:[1,10],7:18,8:11,9:[1,12],10:13,11:[1,14],12:4,17:i,18:a,19:o,21:n},{1:[2,2]},{14:19,15:[1,20],24:s},t([15,24],[2,16]),t(r,[2,8],{1:[2,1]}),t(r,[2,4]),{7:18,10:22,12:4,17:i,18:a,19:o,21:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,11]),t(r,[2,12]),{20:[1,23]},t(r,[2,14]),{11:[1,24]},{16:25,23:[1,26]},{11:[2,18]},t(r,[2,5]),t(r,[2,13]),t(c,[2,9]),{14:27,24:s},{24:[2,17]},{11:[1,28]},t(c,[2,10])],defaultActions:{5:[2,15],7:[2,2],21:[2,18],26:[2,17]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,A,S,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in S=[],o[k])this.terminals_[T]&&T>h&&S.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:S})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,g.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0}},l={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),21;case 1:return this.begin("type_directive"),22;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),24;case 4:return 23;case 5:case 6:break;case 7:return 11;case 8:case 9:break;case 10:return 4;case 11:return 17;case 12:return 18;case 13:return 19;case 14:return 20;case 15:return 15;case 16:return 6;case 17:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,13,14,15,16,17],inclusive:!0}}};function h(){this.yy={}}return u.lexer=l,h.prototype=u,u.Parser=h,new h}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(19).readFileSync(n(20).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(14),n(7)(t))},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9),i=n(15);e.default=function(t,e){return r.default.lang.round(i.default.parse(t)[e])}},function(t,e,n){var r=n(112),i=n(82),a=n(24);t.exports=function(t){return a(t)?r(t):i(t)}},function(t,e,n){var r;if(!r)try{r=n(0)}catch(t){}r||(r=window.d3),t.exports=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9),i=n(15);e.default=function(t,e,n){var a=i.default.parse(t),o=a[e],s=r.default.channel.clamp[e](o+n);return o!==s&&(a[e]=s),i.default.stringify(a)}},function(t,e,n){var r=n(210),i=n(216);t.exports=function(t,e){var n=i(t,e);return r(n)?n:void 0}},function(t,e,n){var r=n(38),i=n(212),a=n(213),o=r?r.toStringTag:void 0;t.exports=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":o&&o in Object(t)?i(t):a(t)}},function(t,e){t.exports=function(t){return t}},function(t,e){t.exports=function(t,e){return t===e||t!=t&&e!=e}},function(t,e,n){var r=n(34),i=n(11);t.exports=function(t){if(!i(t))return!1;var e=r(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}},function(t,e,n){var r=n(16).Symbol;t.exports=r},function(t,e,n){(function(t){var r=n(16),i=n(232),a=e&&!e.nodeType&&e,o=a&&"object"==typeof t&&t&&!t.nodeType&&t,s=o&&o.exports===a?r.Buffer:void 0,c=(s?s.isBuffer:void 0)||i;t.exports=c}).call(this,n(7)(t))},function(t,e,n){var r=n(112),i=n(236),a=n(24);t.exports=function(t){return a(t)?r(t,!0):i(t)}},function(t,e,n){var r=n(241),i=n(77),a=n(242),o=n(121),s=n(243),c=n(34),u=n(110),l=u(r),h=u(i),f=u(a),d=u(o),p=u(s),g=c;(r&&"[object DataView]"!=g(new r(new ArrayBuffer(1)))||i&&"[object Map]"!=g(new i)||a&&"[object Promise]"!=g(a.resolve())||o&&"[object Set]"!=g(new o)||s&&"[object WeakMap]"!=g(new s))&&(g=function(t){var e=c(t),n="[object Object]"==e?t.constructor:void 0,r=n?u(n):"";if(r)switch(r){case l:return"[object DataView]";case h:return"[object Map]";case f:return"[object Promise]";case d:return"[object Set]";case p:return"[object WeakMap]"}return e}),t.exports=g},function(t,e,n){var r=n(34),i=n(21);t.exports=function(t){return"symbol"==typeof t||i(t)&&"[object Symbol]"==r(t)}},function(t,e,n){var r;try{r={defaults:n(154),each:n(87),isFunction:n(37),isPlainObject:n(158),pick:n(161),has:n(93),range:n(162),uniqueId:n(163)}}catch(t){}r||(r=window._),t.exports=r},function(t){t.exports=JSON.parse('{"name":"mermaid","version":"8.8.0","description":"Markdownish syntax for generating flowcharts, sequence diagrams, class diagrams, gantt charts and git graphs.","main":"dist/mermaid.core.js","keywords":["diagram","markdown","flowchart","sequence diagram","gantt","class diagram","git graph"],"scripts":{"build:development":"webpack --progress --colors","build:production":"yarn build:development -p --config webpack.config.prod.babel.js","build":"yarn build:development && yarn build:production","postbuild":"documentation build src/mermaidAPI.js src/config.js --shallow -f md --markdown-toc false | gsed \'1i---\\\\nsort: 3\\\\ntitle: Configurations\\\\n---\\\\n\' > docs/getting-started/Setup.md","build:watch":"yarn build --watch","minify":"minify ./dist/mermaid.js > ./dist/mermaid.min.js","release":"yarn build","lint":"eslint src","e2e:depr":"yarn lint && jest e2e --config e2e/jest.config.js","cypress":"percy exec -- cypress run","e2e":"start-server-and-test dev http://localhost:9000/ cypress","e2e-upd":"yarn lint && jest e2e -u --config e2e/jest.config.js","dev":"webpack-dev-server --config webpack.config.e2e.js","test":"yarn lint && jest src/.*","test:watch":"jest --watch src","prepublishOnly":"yarn build && yarn test && yarn e2e","prepare":"yarn build"},"repository":{"type":"git","url":"https://github.com/knsv/mermaid"},"author":"Knut Sveidqvist","license":"MIT","standard":{"ignore":["**/parser/*.js","dist/**/*.js","cypress/**/*.js"],"globals":["page"]},"dependencies":{"@braintree/sanitize-url":"^3.1.0","babel-eslint":"^10.1.0","d3":"^5.7.0","dagre":"^0.8.4","dagre-d3":"^0.6.4","entity-decode":"^2.0.2","graphlib":"^2.1.7","he":"^1.2.0","khroma":"^1.1.0","minify":"^4.1.1","moment-mini":"^2.22.1","stylis":"^3.5.2"},"devDependencies":{"@babel/core":"^7.2.2","@babel/preset-env":"^7.8.4","@babel/register":"^7.0.0","@percy/cypress":"*","babel-core":"7.0.0-bridge.0","babel-jest":"^24.9.0","babel-loader":"^8.0.4","coveralls":"^3.0.2","css-loader":"^2.0.1","css-to-string-loader":"^0.1.3","cypress":"4.0.1","documentation":"^12.0.1","eslint":"^6.3.0","eslint-config-prettier":"^6.3.0","eslint-plugin-prettier":"^3.1.0","husky":"^1.2.1","identity-obj-proxy":"^3.0.0","jest":"^24.9.0","jison":"^0.4.18","moment":"^2.23.0","node-sass":"^4.12.0","prettier":"^1.18.2","puppeteer":"^1.17.0","sass-loader":"^7.1.0","start-server-and-test":"^1.10.6","terser-webpack-plugin":"^2.2.2","webpack":"^4.41.2","webpack-bundle-analyzer":"^3.7.0","webpack-cli":"^3.1.2","webpack-dev-server":"^3.4.1","webpack-node-externals":"^1.7.2","yarn-upgrade-all":"^0.5.0"},"files":["dist"],"yarn-upgrade-all":{"ignore":["babel-core"]},"sideEffects":["**/*.css","**/*.scss"],"husky":{"hooks":{"pre-push":"yarn test"}}}')},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=new(n(176).default)({r:0,g:0,b:0,a:0},"transparent");e.default=r},function(t,e,n){var r=n(58),i=n(59);t.exports=function(t,e,n,a){var o=!n;n||(n={});for(var s=-1,c=e.length;++s<c;){var u=e[s],l=a?a(n[u],t[u],u,n,t):void 0;void 0===l&&(l=t[u]),o?i(n,u,l):r(n,u,l)}return n}},function(t,e,n){var r=n(231),i=n(21),a=Object.prototype,o=a.hasOwnProperty,s=a.propertyIsEnumerable,c=r(function(){return arguments}())?r:function(t){return i(t)&&o.call(t,"callee")&&!s.call(t,"callee")};t.exports=c},function(t,e,n){var r=n(233),i=n(61),a=n(81),o=a&&a.isTypedArray,s=o?i(o):r;t.exports=s},function(t,e,n){var r=n(42);t.exports=function(t){if("string"==typeof t||r(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}},function(t,e,n){var r=n(12);t.exports=function(t,e){var n=t.append("foreignObject").attr("width","100000"),i=n.append("xhtml:div");i.attr("xmlns","http://www.w3.org/1999/xhtml");var a=e.label;switch(typeof a){case"function":i.insert(a);break;case"object":i.insert((function(){return a}));break;default:i.html(a)}r.applyStyle(i,e.labelStyle),i.style("display","inline-block"),i.style("white-space","nowrap");var o=i.node().getBoundingClientRect();return n.attr("width",o.width).attr("height",o.height),n}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9),i=n(45),a=n(15),o=n(52);e.default=function(t,e,n,s){if(void 0===n&&(n=0),void 0===s&&(s=1),"number"!=typeof t)return o.default(t,{a:e});var c=i.default.set({r:r.default.channel.clamp.r(t),g:r.default.channel.clamp.g(e),b:r.default.channel.clamp.b(n),a:r.default.channel.clamp.a(s)});return a.default.stringify(c)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9),i=n(15);e.default=function(t,e){var n=i.default.parse(t);for(var a in e)n[a]=r.default.channel.clamp[a](e[a]);return i.default.stringify(n)}},function(t,e,n){var r=n(54),i=n(205),a=n(206),o=n(207),s=n(208),c=n(209);function u(t){var e=this.__data__=new r(t);this.size=e.size}u.prototype.clear=i,u.prototype.delete=a,u.prototype.get=o,u.prototype.has=s,u.prototype.set=c,t.exports=u},function(t,e,n){var r=n(200),i=n(201),a=n(202),o=n(203),s=n(204);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c},function(t,e,n){var r=n(36);t.exports=function(t,e){for(var n=t.length;n--;)if(r(t[n][0],e))return n;return-1}},function(t,e,n){var r=n(33)(Object,"create");t.exports=r},function(t,e,n){var r=n(225);t.exports=function(t,e){var n=t.__data__;return r(e)?n["string"==typeof e?"string":"hash"]:n.map}},function(t,e,n){var r=n(59),i=n(36),a=Object.prototype.hasOwnProperty;t.exports=function(t,e,n){var o=t[e];a.call(t,e)&&i(o,n)&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(111);t.exports=function(t,e,n){"__proto__"==e&&r?r(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}},function(t,e){var n=/^(?:0|[1-9]\d*)$/;t.exports=function(t,e){var r=typeof t;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&n.test(t))&&t>-1&&t%1==0&&t<e}},function(t,e){t.exports=function(t){return function(e){return t(e)}}},function(t,e){var n=Object.prototype;t.exports=function(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||n)}},function(t,e,n){var r=n(113)(Object.getPrototypeOf,Object);t.exports=r},function(t,e,n){var r=n(88),i=n(254)(r);t.exports=i},function(t,e,n){var r=n(5),i=n(92),a=n(268),o=n(135);t.exports=function(t,e){return r(t)?t:i(t,e)?[t]:a(o(t))}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=Array(r);++n<r;)i[n]=e(t[n],n,t);return i}},function(t,e,n){var r=n(35),i=n(143),a=n(144);t.exports=function(t,e){return a(i(t,e,r),t+"")}},function(t,e,n){var r=n(36),i=n(24),a=n(60),o=n(11);t.exports=function(t,e,n){if(!o(n))return!1;var s=typeof e;return!!("number"==s?i(n)&&a(e,n.length):"string"==s&&e in n)&&r(n[e],t)}},function(t,e,n){"use strict";var r=n(4);t.exports={longestPath:function(t){var e={};r.forEach(t.sources(),(function n(i){var a=t.node(i);if(r.has(e,i))return a.rank;e[i]=!0;var o=r.min(r.map(t.outEdges(i),(function(e){return n(e.w)-t.edge(e).minlen})));return o!==Number.POSITIVE_INFINITY&&null!=o||(o=0),a.rank=o}))},slack:function(t,e){return t.node(e.w).rank-t.node(e.v).rank-t.edge(e).minlen}}},function(t,e,n){"use strict";var r=/^(%20|\s)*(javascript|data)/im,i=/[^\x20-\x7E]/gim,a=/^([^:]+):/gm,o=[".","/"];t.exports={sanitizeUrl:function(t){if(!t)return"about:blank";var e,n,s=t.replace(i,"").trim();return function(t){return o.indexOf(t[0])>-1}(s)?s:(n=s.match(a))?(e=n[0],r.test(e)?"about:blank":s):"about:blank"}}},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[2,3],n=[1,7],r=[7,12,15,17,19,20,21],i=[7,11,12,15,17,19,20,21],a=[2,20],o=[1,32],s={trace:function(){},yy:{},symbols_:{error:2,start:3,GG:4,":":5,document:6,EOF:7,DIR:8,options:9,body:10,OPT:11,NL:12,line:13,statement:14,COMMIT:15,commit_arg:16,BRANCH:17,ID:18,CHECKOUT:19,MERGE:20,RESET:21,reset_arg:22,STR:23,HEAD:24,reset_parents:25,CARET:26,$accept:0,$end:1},terminals_:{2:"error",4:"GG",5:":",7:"EOF",8:"DIR",11:"OPT",12:"NL",15:"COMMIT",17:"BRANCH",18:"ID",19:"CHECKOUT",20:"MERGE",21:"RESET",23:"STR",24:"HEAD",26:"CARET"},productions_:[0,[3,4],[3,5],[6,0],[6,2],[9,2],[9,1],[10,0],[10,2],[13,2],[13,1],[14,2],[14,2],[14,2],[14,2],[14,2],[16,0],[16,1],[22,2],[22,2],[25,0],[25,2]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:return a[s-1];case 2:return r.setDirection(a[s-3]),a[s-1];case 4:r.setOptions(a[s-1]),this.$=a[s];break;case 5:a[s-1]+=a[s],this.$=a[s-1];break;case 7:this.$=[];break;case 8:a[s-1].push(a[s]),this.$=a[s-1];break;case 9:this.$=a[s-1];break;case 11:r.commit(a[s]);break;case 12:r.branch(a[s]);break;case 13:r.checkout(a[s]);break;case 14:r.merge(a[s]);break;case 15:r.reset(a[s]);break;case 16:this.$="";break;case 17:this.$=a[s];break;case 18:this.$=a[s-1]+":"+a[s];break;case 19:this.$=a[s-1]+":"+r.count,r.count=0;break;case 20:r.count=0;break;case 21:r.count+=1}},table:[{3:1,4:[1,2]},{1:[3]},{5:[1,3],8:[1,4]},{6:5,7:e,9:6,12:n},{5:[1,8]},{7:[1,9]},t(r,[2,7],{10:10,11:[1,11]}),t(i,[2,6]),{6:12,7:e,9:6,12:n},{1:[2,1]},{7:[2,4],12:[1,15],13:13,14:14,15:[1,16],17:[1,17],19:[1,18],20:[1,19],21:[1,20]},t(i,[2,5]),{7:[1,21]},t(r,[2,8]),{12:[1,22]},t(r,[2,10]),{12:[2,16],16:23,23:[1,24]},{18:[1,25]},{18:[1,26]},{18:[1,27]},{18:[1,30],22:28,24:[1,29]},{1:[2,2]},t(r,[2,9]),{12:[2,11]},{12:[2,17]},{12:[2,12]},{12:[2,13]},{12:[2,14]},{12:[2,15]},{12:a,25:31,26:o},{12:a,25:33,26:o},{12:[2,18]},{12:a,25:34,26:o},{12:[2,19]},{12:[2,21]}],defaultActions:{9:[2,1],21:[2,2],23:[2,11],24:[2,17],25:[2,12],26:[2,13],27:[2,14],28:[2,15],31:[2,18],33:[2,19],34:[2,21]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,A,S,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in S=[],o[k])this.terminals_[T]&&T>h&&S.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:S})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,g.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0}},c={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 12;case 1:case 2:case 3:break;case 4:return 4;case 5:return 15;case 6:return 17;case 7:return 20;case 8:return 21;case 9:return 19;case 10:case 11:return 8;case 12:return 5;case 13:return 26;case 14:this.begin("options");break;case 15:this.popState();break;case 16:return 11;case 17:this.begin("string");break;case 18:this.popState();break;case 19:return 23;case 20:return 18;case 21:return 7}},rules:[/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:gitGraph\b)/i,/^(?:commit\b)/i,/^(?:branch\b)/i,/^(?:merge\b)/i,/^(?:reset\b)/i,/^(?:checkout\b)/i,/^(?:LR\b)/i,/^(?:BT\b)/i,/^(?::)/i,/^(?:\^)/i,/^(?:options\r?\n)/i,/^(?:end\r?\n)/i,/^(?:[^\n]+\r?\n)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[a-zA-Z][-_\.a-zA-Z0-9]*[-_a-zA-Z0-9])/i,/^(?:$)/i],conditions:{options:{rules:[15,16],inclusive:!1},string:{rules:[18,19],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,17,20,21],inclusive:!0}}};function u(){this.yy={}}return s.lexer=c,u.prototype=s,s.Parser=u,new u}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(19).readFileSync(n(20).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(14),n(7)(t))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[6,9,10],n={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(t,e,n,r,i,a,o){a.length;switch(i){case 1:return r;case 4:break;case 6:r.setInfo(!0)}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},t(e,[2,3]),t(e,[2,4]),t(e,[2,5]),t(e,[2,6])],defaultActions:{4:[2,1]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,A,S,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in S=[],o[k])this.terminals_[T]&&T>h&&S.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:S})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,g.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0}},r={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};function i(){this.yy={}}return n.lexer=r,i.prototype=n,n.Parser=i,new i}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(19).readFileSync(n(20).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(14),n(7)(t))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,4],n=[1,5],r=[1,6],i=[1,7],a=[1,9],o=[1,10,12,19,20,21,22],s=[1,6,10,12,19,20,21,22],c=[19,20,21],u=[1,22],l=[6,19,20,21,22],h={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,PIE:6,document:7,line:8,statement:9,txt:10,value:11,title:12,title_value:13,openDirective:14,typeDirective:15,closeDirective:16,":":17,argDirective:18,NEWLINE:19,";":20,EOF:21,open_directive:22,type_directive:23,arg_directive:24,close_directive:25,$accept:0,$end:1},terminals_:{2:"error",6:"PIE",10:"txt",11:"value",12:"title",13:"title_value",17:":",19:"NEWLINE",20:";",21:"EOF",22:"open_directive",23:"type_directive",24:"arg_directive",25:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[7,0],[7,2],[8,2],[9,0],[9,2],[9,2],[9,1],[5,3],[5,5],[4,1],[4,1],[4,1],[14,1],[15,1],[18,1],[16,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 6:this.$=a[s-1];break;case 8:r.addSection(a[s-1],r.cleanupValue(a[s]));break;case 9:this.$=a[s].trim(),r.setTitle(this.$);break;case 16:r.parseDirective("%%{","open_directive");break;case 17:r.parseDirective(a[s],"type_directive");break;case 18:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 19:r.parseDirective("}%%","close_directive","pie")}},table:[{3:1,4:2,5:3,6:e,14:8,19:n,20:r,21:i,22:a},{1:[3]},{3:10,4:2,5:3,6:e,14:8,19:n,20:r,21:i,22:a},{3:11,4:2,5:3,6:e,14:8,19:n,20:r,21:i,22:a},t(o,[2,4],{7:12}),t(s,[2,13]),t(s,[2,14]),t(s,[2,15]),{15:13,23:[1,14]},{23:[2,16]},{1:[2,1]},{1:[2,2]},t(c,[2,7],{14:8,8:15,9:16,5:19,1:[2,3],10:[1,17],12:[1,18],22:a}),{16:20,17:[1,21],25:u},t([17,25],[2,17]),t(o,[2,5]),{4:23,19:n,20:r,21:i},{11:[1,24]},{13:[1,25]},t(c,[2,10]),t(l,[2,11]),{18:26,24:[1,27]},t(l,[2,19]),t(o,[2,6]),t(c,[2,8]),t(c,[2,9]),{16:28,25:u},{25:[2,18]},t(l,[2,12])],defaultActions:{9:[2,16],10:[2,1],11:[2,2],27:[2,18]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,A,S,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in S=[],o[k])this.terminals_[T]&&T>h&&S.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:S})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,g.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0}},f={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),22;case 1:return this.begin("type_directive"),23;case 2:return this.popState(),this.begin("arg_directive"),17;case 3:return this.popState(),this.popState(),25;case 4:return 24;case 5:break;case 6:console.log("Crap after close");break;case 7:return 19;case 8:case 9:break;case 10:return this.begin("title"),12;case 11:return this.popState(),"title_value";case 12:this.begin("string");break;case 13:this.popState();break;case 14:return"txt";case 15:return 6;case 16:return"value";case 17:return 21}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[11],inclusive:!1},string:{rules:[13,14],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,15,16,17],inclusive:!0}}};function d(){this.yy={}}return h.lexer=f,d.prototype=h,h.Parser=d,new d}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(19).readFileSync(n(20).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(14),n(7)(t))},function(t,e,n){(function(t,r){var i=function(){var t=function(t,e,n,r){for(n=n||{},r=t.length;r--;n[t[r]]=e);return n},e=[1,2],n=[1,5],r=[6,9,11,20,30],i=[1,17],a=[1,20],o=[1,24],s=[1,25],c=[1,26],u=[1,27],l=[20,27,28],h=[4,6,9,11,20,30],f=[23,24,25,26],d={trace:function(){},yy:{},symbols_:{error:2,start:3,ER_DIAGRAM:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,entityName:17,relSpec:18,role:19,ALPHANUM:20,cardinality:21,relType:22,ZERO_OR_ONE:23,ZERO_OR_MORE:24,ONE_OR_MORE:25,ONLY_ONE:26,NON_IDENTIFYING:27,IDENTIFYING:28,WORD:29,open_directive:30,type_directive:31,arg_directive:32,close_directive:33,$accept:0,$end:1},terminals_:{2:"error",4:"ER_DIAGRAM",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",20:"ALPHANUM",23:"ZERO_OR_ONE",24:"ZERO_OR_MORE",25:"ONE_OR_MORE",26:"ONLY_ONE",27:"NON_IDENTIFYING",28:"IDENTIFYING",29:"WORD",30:"open_directive",31:"type_directive",32:"arg_directive",33:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,5],[17,1],[18,3],[21,1],[21,1],[21,1],[21,1],[22,1],[22,1],[19,1],[19,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(t,e,n,r,i,a,o){var s=a.length-1;switch(i){case 1:break;case 3:this.$=[];break;case 4:a[s-1].push(a[s]),this.$=a[s-1];break;case 5:case 6:this.$=a[s];break;case 7:case 8:this.$=[];break;case 12:r.addEntity(a[s-4]),r.addEntity(a[s-2]),r.addRelationship(a[s-4],a[s],a[s-2],a[s-3]);break;case 13:this.$=a[s];break;case 14:this.$={cardA:a[s],relType:a[s-1],cardB:a[s-2]};break;case 15:this.$=r.Cardinality.ZERO_OR_ONE;break;case 16:this.$=r.Cardinality.ZERO_OR_MORE;break;case 17:this.$=r.Cardinality.ONE_OR_MORE;break;case 18:this.$=r.Cardinality.ONLY_ONE;break;case 19:this.$=r.Identification.NON_IDENTIFYING;break;case 20:this.$=r.Identification.IDENTIFYING;break;case 21:this.$=a[s].replace(/"/g,"");break;case 22:this.$=a[s];break;case 23:r.parseDirective("%%{","open_directive");break;case 24:r.parseDirective(a[s],"type_directive");break;case 25:a[s]=a[s].trim().replace(/'/g,'"'),r.parseDirective(a[s],"arg_directive");break;case 26:r.parseDirective("}%%","close_directive","er")}},table:[{3:1,4:e,7:3,12:4,30:n},{1:[3]},t(r,[2,3],{5:6}),{3:7,4:e,7:3,12:4,30:n},{13:8,31:[1,9]},{31:[2,23]},{6:[1,10],7:15,8:11,9:[1,12],10:13,11:[1,14],12:4,17:16,20:i,30:n},{1:[2,2]},{14:18,15:[1,19],33:a},t([15,33],[2,24]),t(r,[2,8],{1:[2,1]}),t(r,[2,4]),{7:15,10:21,12:4,17:16,20:i,30:n},t(r,[2,6]),t(r,[2,7]),t(r,[2,11]),{18:22,21:23,23:o,24:s,25:c,26:u},t([15,23,24,25,26],[2,13]),{11:[1,28]},{16:29,32:[1,30]},{11:[2,26]},t(r,[2,5]),{17:31,20:i},{22:32,27:[1,33],28:[1,34]},t(l,[2,15]),t(l,[2,16]),t(l,[2,17]),t(l,[2,18]),t(h,[2,9]),{14:35,33:a},{33:[2,25]},{15:[1,36]},{21:37,23:o,24:s,25:c,26:u},t(f,[2,19]),t(f,[2,20]),{11:[1,38]},{19:39,20:[1,41],29:[1,40]},{20:[2,14]},t(h,[2,10]),t(r,[2,12]),t(r,[2,21]),t(r,[2,22])],defaultActions:{5:[2,23],7:[2,2],20:[2,26],30:[2,25],37:[2,14]},parseError:function(t,e){if(!e.recoverable){var n=new Error(t);throw n.hash=e,n}this.trace(t)},parse:function(t){var e=this,n=[0],r=[],i=[null],a=[],o=this.table,s="",c=0,u=0,l=0,h=2,f=1,d=a.slice.call(arguments,1),p=Object.create(this.lexer),g={yy:{}};for(var y in this.yy)Object.prototype.hasOwnProperty.call(this.yy,y)&&(g.yy[y]=this.yy[y]);p.setInput(t,g.yy),g.yy.lexer=p,g.yy.parser=this,void 0===p.yylloc&&(p.yylloc={});var v=p.yylloc;a.push(v);var m=p.options&&p.options.ranges;function b(){var t;return"number"!=typeof(t=r.pop()||p.lex()||f)&&(t instanceof Array&&(t=(r=t).pop()),t=e.symbols_[t]||t),t}"function"==typeof g.yy.parseError?this.parseError=g.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;for(var x,_,k,w,E,T,C,A,S,M={};;){if(k=n[n.length-1],this.defaultActions[k]?w=this.defaultActions[k]:(null==x&&(x=b()),w=o[k]&&o[k][x]),void 0===w||!w.length||!w[0]){var O="";for(T in S=[],o[k])this.terminals_[T]&&T>h&&S.push("'"+this.terminals_[T]+"'");O=p.showPosition?"Parse error on line "+(c+1)+":\n"+p.showPosition()+"\nExpecting "+S.join(", ")+", got '"+(this.terminals_[x]||x)+"'":"Parse error on line "+(c+1)+": Unexpected "+(x==f?"end of input":"'"+(this.terminals_[x]||x)+"'"),this.parseError(O,{text:p.match,token:this.terminals_[x]||x,line:p.yylineno,loc:v,expected:S})}if(w[0]instanceof Array&&w.length>1)throw new Error("Parse Error: multiple actions possible at state: "+k+", token: "+x);switch(w[0]){case 1:n.push(x),i.push(p.yytext),a.push(p.yylloc),n.push(w[1]),x=null,_?(x=_,_=null):(u=p.yyleng,s=p.yytext,c=p.yylineno,v=p.yylloc,l>0&&l--);break;case 2:if(C=this.productions_[w[1]][1],M.$=i[i.length-C],M._$={first_line:a[a.length-(C||1)].first_line,last_line:a[a.length-1].last_line,first_column:a[a.length-(C||1)].first_column,last_column:a[a.length-1].last_column},m&&(M._$.range=[a[a.length-(C||1)].range[0],a[a.length-1].range[1]]),void 0!==(E=this.performAction.apply(M,[s,u,c,g.yy,w[1],i,a].concat(d))))return E;C&&(n=n.slice(0,-1*C*2),i=i.slice(0,-1*C),a=a.slice(0,-1*C)),n.push(this.productions_[w[1]][0]),i.push(M.$),a.push(M._$),A=o[n[n.length-2]][n[n.length-1]],n.push(A);break;case 3:return!0}}return!0}},p={EOF:1,parseError:function(t,e){if(!this.yy.parser)throw new Error(t);this.yy.parser.parseError(t,e)},setInput:function(t,e){return this.yy=e||this.yy||{},this._input=t,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var t=this._input[0];return this.yytext+=t,this.yyleng++,this.offset++,this.match+=t,this.matched+=t,t.match(/(?:\r\n?|\n).*/g)?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),t},unput:function(t){var e=t.length,n=t.split(/(?:\r\n?|\n)/g);this._input=t+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-e),this.offset-=e;var r=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),n.length-1&&(this.yylineno-=n.length-1);var i=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:n?(n.length===r.length?this.yylloc.first_column:0)+r[r.length-n.length].length-n[0].length:this.yylloc.first_column-e},this.options.ranges&&(this.yylloc.range=[i[0],i[0]+this.yyleng-e]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){return this.options.backtrack_lexer?(this._backtrack=!0,this):this.parseError("Lexical error on line "+(this.yylineno+1)+". You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},less:function(t){this.unput(this.match.slice(t))},pastInput:function(){var t=this.matched.substr(0,this.matched.length-this.match.length);return(t.length>20?"...":"")+t.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var t=this.match;return t.length<20&&(t+=this._input.substr(0,20-t.length)),(t.substr(0,20)+(t.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var t=this.pastInput(),e=new Array(t.length+1).join("-");return t+this.upcomingInput()+"\n"+e+"^"},test_match:function(t,e){var n,r,i;if(this.options.backtrack_lexer&&(i={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(i.yylloc.range=this.yylloc.range.slice(0))),(r=t[0].match(/(?:\r\n?|\n).*/g))&&(this.yylineno+=r.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:r?r[r.length-1].length-r[r.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+t[0].length},this.yytext+=t[0],this.match+=t[0],this.matches=t,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(t[0].length),this.matched+=t[0],n=this.performAction.call(this,this.yy,this,e,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),n)return n;if(this._backtrack){for(var a in i)this[a]=i[a];return!1}return!1},next:function(){if(this.done)return this.EOF;var t,e,n,r;this._input||(this.done=!0),this._more||(this.yytext="",this.match="");for(var i=this._currentRules(),a=0;a<i.length;a++)if((n=this._input.match(this.rules[i[a]]))&&(!e||n[0].length>e[0].length)){if(e=n,r=a,this.options.backtrack_lexer){if(!1!==(t=this.test_match(n,i[a])))return t;if(this._backtrack){e=!1;continue}return!1}if(!this.options.flex)break}return e?!1!==(t=this.test_match(e,i[r]))&&t:""===this._input?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+". Unrecognized text.\n"+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var t=this.next();return t||this.lex()},begin:function(t){this.conditionStack.push(t)},popState:function(){return this.conditionStack.length-1>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(t){return(t=this.conditionStack.length-1-Math.abs(t||0))>=0?this.conditionStack[t]:"INITIAL"},pushState:function(t){this.begin(t)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(t,e,n,r){switch(n){case 0:return this.begin("open_directive"),30;case 1:return this.begin("type_directive"),31;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),33;case 4:return 32;case 5:case 6:break;case 7:return 11;case 8:break;case 9:return 9;case 10:return 29;case 11:return 4;case 12:return 23;case 13:return 24;case 14:return 25;case 15:return 26;case 16:return 23;case 17:return 24;case 18:return 25;case 19:return 27;case 20:return 28;case 21:case 22:return 27;case 23:return 20;case 24:return e.yytext[0];case 25:return 6}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:[\s]+)/i,/^(?:"[^"]*")/i,/^(?:erDiagram\b)/i,/^(?:\|o\b)/i,/^(?:\}o\b)/i,/^(?:\}\|)/i,/^(?:\|\|)/i,/^(?:o\|)/i,/^(?:o\{)/i,/^(?:\|\{)/i,/^(?:\.\.)/i,/^(?:--)/i,/^(?:\.-)/i,/^(?:-\.)/i,/^(?:[A-Za-z][A-Za-z0-9\-]*)/i,/^(?:.)/i,/^(?:$)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25],inclusive:!0}}};function g(){this.yy={}}return d.lexer=p,g.prototype=d,d.Parser=g,new g}();e.parser=i,e.Parser=i.Parser,e.parse=function(){return i.parse.apply(i,arguments)},e.main=function(r){r[1]||(console.log("Usage: "+r[0]+" FILE"),t.exit(1));var i=n(19).readFileSync(n(20).normalize(r[1]),"utf8");return e.parser.parse(i)},n.c[n.s]===r&&e.main(t.argv.slice(1))}).call(this,n(14),n(7)(t))},function(t,e,n){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),function(t){t[t.ALL=0]="ALL",t[t.RGB=1]="RGB",t[t.HSL=2]="HSL"}(r||(r={})),e.TYPE=r},function(t,e,n){"use strict";var r=n(10);t.exports=i;function i(t){this._isDirected=!r.has(t,"directed")||t.directed,this._isMultigraph=!!r.has(t,"multigraph")&&t.multigraph,this._isCompound=!!r.has(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=r.constant(void 0),this._defaultEdgeLabelFn=r.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children["\0"]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function a(t,e){t[e]?t[e]++:t[e]=1}function o(t,e){--t[e]||delete t[e]}function s(t,e,n,i){var a=""+e,o=""+n;if(!t&&a>o){var s=a;a=o,o=s}return a+""+o+""+(r.isUndefined(i)?"\0":i)}function c(t,e,n,r){var i=""+e,a=""+n;if(!t&&i>a){var o=i;i=a,a=o}var s={v:i,w:a};return r&&(s.name=r),s}function u(t,e){return s(t,e.v,e.w,e.name)}i.prototype._nodeCount=0,i.prototype._edgeCount=0,i.prototype.isDirected=function(){return this._isDirected},i.prototype.isMultigraph=function(){return this._isMultigraph},i.prototype.isCompound=function(){return this._isCompound},i.prototype.setGraph=function(t){return this._label=t,this},i.prototype.graph=function(){return this._label},i.prototype.setDefaultNodeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultNodeLabelFn=t,this},i.prototype.nodeCount=function(){return this._nodeCount},i.prototype.nodes=function(){return r.keys(this._nodes)},i.prototype.sources=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._in[e])}))},i.prototype.sinks=function(){var t=this;return r.filter(this.nodes(),(function(e){return r.isEmpty(t._out[e])}))},i.prototype.setNodes=function(t,e){var n=arguments,i=this;return r.each(t,(function(t){n.length>1?i.setNode(t,e):i.setNode(t)})),this},i.prototype.setNode=function(t,e){return r.has(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]="\0",this._children[t]={},this._children["\0"][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},i.prototype.node=function(t){return this._nodes[t]},i.prototype.hasNode=function(t){return r.has(this._nodes,t)},i.prototype.removeNode=function(t){var e=this;if(r.has(this._nodes,t)){var n=function(t){e.removeEdge(e._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],r.each(this.children(t),(function(t){e.setParent(t)})),delete this._children[t]),r.each(r.keys(this._in[t]),n),delete this._in[t],delete this._preds[t],r.each(r.keys(this._out[t]),n),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},i.prototype.setParent=function(t,e){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(r.isUndefined(e))e="\0";else{for(var n=e+="";!r.isUndefined(n);n=this.parent(n))if(n===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},i.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},i.prototype.parent=function(t){if(this._isCompound){var e=this._parent[t];if("\0"!==e)return e}},i.prototype.children=function(t){if(r.isUndefined(t)&&(t="\0"),this._isCompound){var e=this._children[t];if(e)return r.keys(e)}else{if("\0"===t)return this.nodes();if(this.hasNode(t))return[]}},i.prototype.predecessors=function(t){var e=this._preds[t];if(e)return r.keys(e)},i.prototype.successors=function(t){var e=this._sucs[t];if(e)return r.keys(e)},i.prototype.neighbors=function(t){var e=this.predecessors(t);if(e)return r.union(e,this.successors(t))},i.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},i.prototype.filterNodes=function(t){var e=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});e.setGraph(this.graph());var n=this;r.each(this._nodes,(function(n,r){t(r)&&e.setNode(r,n)})),r.each(this._edgeObjs,(function(t){e.hasNode(t.v)&&e.hasNode(t.w)&&e.setEdge(t,n.edge(t))}));var i={};return this._isCompound&&r.each(e.nodes(),(function(t){e.setParent(t,function t(r){var a=n.parent(r);return void 0===a||e.hasNode(a)?(i[r]=a,a):a in i?i[a]:t(a)}(t))})),e},i.prototype.setDefaultEdgeLabel=function(t){return r.isFunction(t)||(t=r.constant(t)),this._defaultEdgeLabelFn=t,this},i.prototype.edgeCount=function(){return this._edgeCount},i.prototype.edges=function(){return r.values(this._edgeObjs)},i.prototype.setPath=function(t,e){var n=this,i=arguments;return r.reduce(t,(function(t,r){return i.length>1?n.setEdge(t,r,e):n.setEdge(t,r),r})),this},i.prototype.setEdge=function(){var t,e,n,i,o=!1,u=arguments[0];"object"==typeof u&&null!==u&&"v"in u?(t=u.v,e=u.w,n=u.name,2===arguments.length&&(i=arguments[1],o=!0)):(t=u,e=arguments[1],n=arguments[3],arguments.length>2&&(i=arguments[2],o=!0)),t=""+t,e=""+e,r.isUndefined(n)||(n=""+n);var l=s(this._isDirected,t,e,n);if(r.has(this._edgeLabels,l))return o&&(this._edgeLabels[l]=i),this;if(!r.isUndefined(n)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(e),this._edgeLabels[l]=o?i:this._defaultEdgeLabelFn(t,e,n);var h=c(this._isDirected,t,e,n);return t=h.v,e=h.w,Object.freeze(h),this._edgeObjs[l]=h,a(this._preds[e],t),a(this._sucs[t],e),this._in[e][l]=h,this._out[t][l]=h,this._edgeCount++,this},i.prototype.edge=function(t,e,n){var r=1===arguments.length?u(this._isDirected,arguments[0]):s(this._isDirected,t,e,n);return this._edgeLabels[r]},i.prototype.hasEdge=function(t,e,n){var i=1===arguments.length?u(this._isDirected,arguments[0]):s(this._isDirected,t,e,n);return r.has(this._edgeLabels,i)},i.prototype.removeEdge=function(t,e,n){var r=1===arguments.length?u(this._isDirected,arguments[0]):s(this._isDirected,t,e,n),i=this._edgeObjs[r];return i&&(t=i.v,e=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],o(this._preds[e],t),o(this._sucs[t],e),delete this._in[e][r],delete this._out[t][r],this._edgeCount--),this},i.prototype.inEdges=function(t,e){var n=this._in[t];if(n){var i=r.values(n);return e?r.filter(i,(function(t){return t.v===e})):i}},i.prototype.outEdges=function(t,e){var n=this._out[t];if(n){var i=r.values(n);return e?r.filter(i,(function(t){return t.w===e})):i}},i.prototype.nodeEdges=function(t,e){var n=this.inEdges(t,e);if(n)return n.concat(this.outEdges(t,e))}},function(t,e,n){var r=n(33)(n(16),"Map");t.exports=r},function(t,e,n){var r=n(217),i=n(224),a=n(226),o=n(227),s=n(228);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r&&!1!==e(t[n],n,t););return t}},function(t,e){t.exports=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}},function(t,e,n){(function(t){var r=n(109),i=e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,o=a&&a.exports===i&&r.process,s=function(){try{var t=a&&a.require&&a.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(t){}}();t.exports=s}).call(this,n(7)(t))},function(t,e,n){var r=n(62),i=n(234),a=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return i(t);var e=[];for(var n in Object(t))a.call(t,n)&&"constructor"!=n&&e.push(n);return e}},function(t,e,n){var r=n(116),i=n(117),a=Object.prototype.propertyIsEnumerable,o=Object.getOwnPropertySymbols,s=o?function(t){return null==t?[]:(t=Object(t),r(o(t),(function(e){return a.call(t,e)})))}:i;t.exports=s},function(t,e){t.exports=function(t,e){for(var n=-1,r=e.length,i=t.length;++n<r;)t[i+n]=e[n];return t}},function(t,e,n){var r=n(122);t.exports=function(t){var e=new t.constructor(t.byteLength);return new r(e).set(new r(t)),e}},function(t,e){t.exports=function(t){return function(){return t}}},function(t,e,n){t.exports=n(126)},function(t,e,n){var r=n(89),i=n(30);t.exports=function(t,e){return t&&r(t,e,i)}},function(t,e,n){var r=n(253)();t.exports=r},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t){n[++e]=t})),n}},function(t,e,n){var r=n(65),i=n(49);t.exports=function(t,e){for(var n=0,a=(e=r(e,t)).length;null!=t&&n<a;)t=t[i(e[n++])];return n&&n==a?t:void 0}},function(t,e,n){var r=n(5),i=n(42),a=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,o=/^\w*$/;t.exports=function(t,e){if(r(t))return!1;var n=typeof t;return!("number"!=n&&"symbol"!=n&&"boolean"!=n&&null!=t&&!i(t))||(o.test(t)||!a.test(t)||null!=e&&t in Object(e))}},function(t,e,n){var r=n(275),i=n(137);t.exports=function(t,e){return null!=t&&i(t,e,r)}},function(t,e,n){var r=n(84),i=n(287);t.exports=function t(e,n,a,o,s){var c=-1,u=e.length;for(a||(a=i),s||(s=[]);++c<u;){var l=e[c];n>0&&a(l)?n>1?t(l,n-1,a,o,s):r(s,l):o||(s[s.length]=l)}return s}},function(t,e,n){var r=n(42);t.exports=function(t,e,n){for(var i=-1,a=t.length;++i<a;){var o=t[i],s=e(o);if(null!=s&&(void 0===c?s==s&&!r(s):n(s,c)))var c=s,u=o}return u}},function(t,e){t.exports=function(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,s=a-r.y,c=Math.sqrt(e*e*s*s+n*n*o*o),u=Math.abs(e*n*o/c);r.x<i&&(u=-u);var l=Math.abs(e*n*s/c);r.y<a&&(l=-l);return{x:i+u,y:a+l}}},function(t,e,n){var r=n(372),i=n(50),a=n(373);t.exports=function(t,e,n){var o=e.label,s=t.append("g");"svg"===e.labelType?a(s,e):"string"!=typeof o||"html"===e.labelType?i(s,e):r(s,e);var c,u=s.node().getBBox();switch(n){case"top":c=-e.height/2;break;case"bottom":c=e.height/2-u.height;break;default:c=-u.height/2}return s.attr("transform","translate("+-u.width/2+","+c+")"),s}},function(t,e){},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9),i=n(45),a=n(178),o={re:/^#((?:[a-f0-9]{2}){2,4}|[a-f0-9]{3})$/i,parse:function(t){if(35===t.charCodeAt(0)){var e=t.match(o.re);if(e){var n=e[1],r=parseInt(n,16),a=n.length,s=a%4==0,c=a>4,u=c?1:17,l=c?8:4,h=s?0:-1,f=c?255:15;return i.default.set({r:(r>>l*(h+3)&f)*u,g:(r>>l*(h+2)&f)*u,b:(r>>l*(h+1)&f)*u,a:s?(r&f)*u/255:1},t)}}},stringify:function(t){return t.a<1?"#"+a.DEC2HEX[Math.round(t.r)]+a.DEC2HEX[Math.round(t.g)]+a.DEC2HEX[Math.round(t.b)]+r.default.unit.frac2hex(t.a):"#"+a.DEC2HEX[Math.round(t.r)]+a.DEC2HEX[Math.round(t.g)]+a.DEC2HEX[Math.round(t.b)]}};e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9),i=n(45),a=n(15);e.default=function(t,e,n,o){void 0===o&&(o=1);var s=i.default.set({h:r.default.channel.clamp.h(t),s:r.default.channel.clamp.s(e),l:r.default.channel.clamp.l(n),a:r.default.channel.clamp.a(o)});return a.default.stringify(s)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29);e.default=function(t){return r.default(t,"a")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9),i=n(15);e.default=function(t){var e=i.default.parse(t),n=e.r,a=e.g,o=e.b,s=.2126*r.default.channel.toLinear(n)+.7152*r.default.channel.toLinear(a)+.0722*r.default.channel.toLinear(o);return r.default.lang.round(s)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(102);e.default=function(t){return r.default(t)>=.5}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(32);e.default=function(t,e){return r.default(t,"a",e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(32);e.default=function(t,e){return r.default(t,"a",-e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(15),i=n(52);e.default=function(t,e){var n=r.default.parse(t),a={};for(var o in e)e[o]&&(a[o]=n[o]+e[o]);return i.default(t,a)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(15),i=n(51);e.default=function(t,e,n){void 0===n&&(n=50);var a=r.default.parse(t),o=a.r,s=a.g,c=a.b,u=a.a,l=r.default.parse(e),h=l.r,f=l.g,d=l.b,p=l.a,g=n/100,y=2*g-1,v=u-p,m=((y*v==-1?y:(y+v)/(1+y*v))+1)/2,b=1-m,x=o*m+h*b,_=s*m+f*b,k=c*m+d*b,w=u*g+p*(1-g);return i.default(x,_,k,w)}},function(t,e,n){var r=n(53),i=n(79),a=n(58),o=n(229),s=n(235),c=n(114),u=n(115),l=n(238),h=n(239),f=n(119),d=n(240),p=n(41),g=n(244),y=n(245),v=n(124),m=n(5),b=n(39),x=n(249),_=n(11),k=n(251),w=n(30),E={};E["[object Arguments]"]=E["[object Array]"]=E["[object ArrayBuffer]"]=E["[object DataView]"]=E["[object Boolean]"]=E["[object Date]"]=E["[object Float32Array]"]=E["[object Float64Array]"]=E["[object Int8Array]"]=E["[object Int16Array]"]=E["[object Int32Array]"]=E["[object Map]"]=E["[object Number]"]=E["[object Object]"]=E["[object RegExp]"]=E["[object Set]"]=E["[object String]"]=E["[object Symbol]"]=E["[object Uint8Array]"]=E["[object Uint8ClampedArray]"]=E["[object Uint16Array]"]=E["[object Uint32Array]"]=!0,E["[object Error]"]=E["[object Function]"]=E["[object WeakMap]"]=!1,t.exports=function t(e,n,T,C,A,S){var M,O=1&n,D=2&n,N=4&n;if(T&&(M=A?T(e,C,A,S):T(e)),void 0!==M)return M;if(!_(e))return e;var B=m(e);if(B){if(M=g(e),!O)return u(e,M)}else{var L=p(e),F="[object Function]"==L||"[object GeneratorFunction]"==L;if(b(e))return c(e,O);if("[object Object]"==L||"[object Arguments]"==L||F&&!A){if(M=D||F?{}:v(e),!O)return D?h(e,s(M,e)):l(e,o(M,e))}else{if(!E[L])return A?e:{};M=y(e,L,O)}}S||(S=new r);var P=S.get(e);if(P)return P;S.set(e,M),k(e)?e.forEach((function(r){M.add(t(r,n,T,r,e,S))})):x(e)&&e.forEach((function(r,i){M.set(i,t(r,n,T,i,e,S))}));var I=N?D?d:f:D?keysIn:w,j=B?void 0:I(e);return i(j||e,(function(r,i){j&&(r=e[i=r]),a(M,i,t(r,n,T,i,e,S))})),M}},function(t,e,n){(function(e){var n="object"==typeof e&&e&&e.Object===Object&&e;t.exports=n}).call(this,n(211))},function(t,e){var n=Function.prototype.toString;t.exports=function(t){if(null!=t){try{return n.call(t)}catch(t){}try{return t+""}catch(t){}}return""}},function(t,e,n){var r=n(33),i=function(){try{var t=r(Object,"defineProperty");return t({},"",{}),t}catch(t){}}();t.exports=i},function(t,e,n){var r=n(230),i=n(47),a=n(5),o=n(39),s=n(60),c=n(48),u=Object.prototype.hasOwnProperty;t.exports=function(t,e){var n=a(t),l=!n&&i(t),h=!n&&!l&&o(t),f=!n&&!l&&!h&&c(t),d=n||l||h||f,p=d?r(t.length,String):[],g=p.length;for(var y in t)!e&&!u.call(t,y)||d&&("length"==y||h&&("offset"==y||"parent"==y)||f&&("buffer"==y||"byteLength"==y||"byteOffset"==y)||s(y,g))||p.push(y);return p}},function(t,e){t.exports=function(t,e){return function(n){return t(e(n))}}},function(t,e,n){(function(t){var r=n(16),i=e&&!e.nodeType&&e,a=i&&"object"==typeof t&&t&&!t.nodeType&&t,o=a&&a.exports===i?r.Buffer:void 0,s=o?o.allocUnsafe:void 0;t.exports=function(t,e){if(e)return t.slice();var n=t.length,r=s?s(n):new t.constructor(n);return t.copy(r),r}}).call(this,n(7)(t))},function(t,e){t.exports=function(t,e){var n=-1,r=t.length;for(e||(e=Array(r));++n<r;)e[n]=t[n];return e}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length,i=0,a=[];++n<r;){var o=t[n];e(o,n,t)&&(a[i++]=o)}return a}},function(t,e){t.exports=function(){return[]}},function(t,e,n){var r=n(84),i=n(63),a=n(83),o=n(117),s=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)r(e,a(t)),t=i(t);return e}:o;t.exports=s},function(t,e,n){var r=n(120),i=n(83),a=n(30);t.exports=function(t){return r(t,a,i)}},function(t,e,n){var r=n(84),i=n(5);t.exports=function(t,e,n){var a=e(t);return i(t)?a:r(a,n(t))}},function(t,e,n){var r=n(33)(n(16),"Set");t.exports=r},function(t,e,n){var r=n(16).Uint8Array;t.exports=r},function(t,e,n){var r=n(85);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}},function(t,e,n){var r=n(125),i=n(63),a=n(62);t.exports=function(t){return"function"!=typeof t.constructor||a(t)?{}:r(i(t))}},function(t,e,n){var r=n(11),i=Object.create,a=function(){function t(){}return function(e){if(!r(e))return{};if(i)return i(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();t.exports=a},function(t,e,n){var r=n(79),i=n(64),a=n(127),o=n(5);t.exports=function(t,e){return(o(t)?r:i)(t,a(e))}},function(t,e,n){var r=n(35);t.exports=function(t){return"function"==typeof t?t:r}},function(t,e,n){var r=n(116),i=n(255),a=n(25),o=n(5);t.exports=function(t,e){return(o(t)?r:i)(t,a(e,3))}},function(t,e,n){var r=n(258),i=n(21);t.exports=function t(e,n,a,o,s){return e===n||(null==e||null==n||!i(e)&&!i(n)?e!=e&&n!=n:r(e,n,a,o,t,s))}},function(t,e,n){var r=n(131),i=n(261),a=n(132);t.exports=function(t,e,n,o,s,c){var u=1&n,l=t.length,h=e.length;if(l!=h&&!(u&&h>l))return!1;var f=c.get(t);if(f&&c.get(e))return f==e;var d=-1,p=!0,g=2&n?new r:void 0;for(c.set(t,e),c.set(e,t);++d<l;){var y=t[d],v=e[d];if(o)var m=u?o(v,y,d,e,t,c):o(y,v,d,t,e,c);if(void 0!==m){if(m)continue;p=!1;break}if(g){if(!i(e,(function(t,e){if(!a(g,e)&&(y===t||s(y,t,n,o,c)))return g.push(e)}))){p=!1;break}}else if(y!==v&&!s(y,v,n,o,c)){p=!1;break}}return c.delete(t),c.delete(e),p}},function(t,e,n){var r=n(78),i=n(259),a=n(260);function o(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new r;++e<n;)this.add(t[e])}o.prototype.add=o.prototype.push=i,o.prototype.has=a,t.exports=o},function(t,e){t.exports=function(t,e){return t.has(e)}},function(t,e,n){var r=n(11);t.exports=function(t){return t==t&&!r(t)}},function(t,e){t.exports=function(t,e){return function(n){return null!=n&&(n[t]===e&&(void 0!==e||t in Object(n)))}}},function(t,e,n){var r=n(271);t.exports=function(t){return null==t?"":r(t)}},function(t,e,n){var r=n(272),i=n(137);t.exports=function(t,e){return null!=t&&i(t,e,r)}},function(t,e,n){var r=n(65),i=n(47),a=n(5),o=n(60),s=n(80),c=n(49);t.exports=function(t,e,n){for(var u=-1,l=(e=r(e,t)).length,h=!1;++u<l;){var f=c(e[u]);if(!(h=null!=t&&n(t,f)))break;t=t[f]}return h||++u!=l?h:!!(l=null==t?0:t.length)&&s(l)&&o(f,l)&&(a(t)||i(t))}},function(t,e){t.exports=function(t){return function(e){return null==e?void 0:e[t]}}},function(t,e){t.exports=function(t){return void 0===t}},function(t,e,n){var r=n(66),i=n(25),a=n(141),o=n(5);t.exports=function(t,e){return(o(t)?r:a)(t,i(e,3))}},function(t,e,n){var r=n(64),i=n(24);t.exports=function(t,e){var n=-1,a=i(t)?Array(t.length):[];return r(t,(function(t,r,i){a[++n]=e(t,r,i)})),a}},function(t,e,n){var r=n(277),i=n(64),a=n(25),o=n(278),s=n(5);t.exports=function(t,e,n){var c=s(t)?r:o,u=arguments.length<3;return c(t,a(e,4),n,u,i)}},function(t,e,n){var r=n(288),i=Math.max;t.exports=function(t,e,n){return e=i(void 0===e?t.length-1:e,0),function(){for(var a=arguments,o=-1,s=i(a.length-e,0),c=Array(s);++o<s;)c[o]=a[e+o];o=-1;for(var u=Array(e+1);++o<e;)u[o]=a[o];return u[e]=n(c),r(t,this,u)}}},function(t,e,n){var r=n(289),i=n(290)(r);t.exports=i},function(t,e){t.exports=function(t,e,n,r){for(var i=t.length,a=n+(r?1:-1);r?a--:++a<i;)if(e(t[a],a,t))return a;return-1}},function(t,e,n){var r=n(24),i=n(21);t.exports=function(t){return i(t)&&r(t)}},function(t,e,n){var r=n(299),i=n(30);t.exports=function(t){return null==t?[]:r(t,i(t))}},function(t,e,n){var r=n(10),i=n(149);t.exports=function(t,e,n,r){return function(t,e,n,r){var a,o,s={},c=new i,u=function(t){var e=t.v!==a?t.v:t.w,r=s[e],i=n(t),u=o.distance+i;if(i<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+i);u<r.distance&&(r.distance=u,r.predecessor=a,c.decrease(e,u))};t.nodes().forEach((function(t){var n=t===e?0:Number.POSITIVE_INFINITY;s[t]={distance:n},c.add(t,n)}));for(;c.size()>0&&(a=c.removeMin(),(o=s[a]).distance!==Number.POSITIVE_INFINITY);)r(a).forEach(u);return s}(t,String(e),n||a,r||function(e){return t.outEdges(e)})};var a=r.constant(1)},function(t,e,n){var r=n(10);function i(){this._arr=[],this._keyIndices={}}t.exports=i,i.prototype.size=function(){return this._arr.length},i.prototype.keys=function(){return this._arr.map((function(t){return t.key}))},i.prototype.has=function(t){return r.has(this._keyIndices,t)},i.prototype.priority=function(t){var e=this._keyIndices[t];if(void 0!==e)return this._arr[e].priority},i.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},i.prototype.add=function(t,e){var n=this._keyIndices;if(t=String(t),!r.has(n,t)){var i=this._arr,a=i.length;return n[t]=a,i.push({key:t,priority:e}),this._decrease(a),!0}return!1},i.prototype.removeMin=function(){this._swap(0,this._arr.length-1);var t=this._arr.pop();return delete this._keyIndices[t.key],this._heapify(0),t.key},i.prototype.decrease=function(t,e){var n=this._keyIndices[t];if(e>this._arr[n].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[n].priority+" New: "+e);this._arr[n].priority=e,this._decrease(n)},i.prototype._heapify=function(t){var e=this._arr,n=2*t,r=n+1,i=t;n<e.length&&(i=e[n].priority<e[i].priority?n:i,r<e.length&&(i=e[r].priority<e[i].priority?r:i),i!==t&&(this._swap(t,i),this._heapify(i)))},i.prototype._decrease=function(t){for(var e,n=this._arr,r=n[t].priority;0!==t&&!(n[e=t>>1].priority<r);)this._swap(t,e),t=e},i.prototype._swap=function(t,e){var n=this._arr,r=this._keyIndices,i=n[t],a=n[e];n[t]=a,n[e]=i,r[a.key]=t,r[i.key]=e}},function(t,e,n){var r=n(10);t.exports=function(t){var e=0,n=[],i={},a=[];return t.nodes().forEach((function(o){r.has(i,o)||function o(s){var c=i[s]={onStack:!0,lowlink:e,index:e++};if(n.push(s),t.successors(s).forEach((function(t){r.has(i,t)?i[t].onStack&&(c.lowlink=Math.min(c.lowlink,i[t].index)):(o(t),c.lowlink=Math.min(c.lowlink,i[t].lowlink))})),c.lowlink===c.index){var u,l=[];do{u=n.pop(),i[u].onStack=!1,l.push(u)}while(s!==u);a.push(l)}}(o)})),a}},function(t,e,n){var r=n(10);function i(t){var e={},n={},i=[];if(r.each(t.sinks(),(function o(s){if(r.has(n,s))throw new a;r.has(e,s)||(n[s]=!0,e[s]=!0,r.each(t.predecessors(s),o),delete n[s],i.push(s))})),r.size(e)!==t.nodeCount())throw new a;return i}function a(){}t.exports=i,i.CycleException=a,a.prototype=new Error},function(t,e,n){var r=n(10);t.exports=function(t,e,n){r.isArray(e)||(e=[e]);var i=(t.isDirected()?t.successors:t.neighbors).bind(t),a=[],o={};return r.each(e,(function(e){if(!t.hasNode(e))throw new Error("Graph does not have node: "+e);!function t(e,n,i,a,o,s){r.has(a,n)||(a[n]=!0,i||s.push(n),r.each(o(n),(function(n){t(e,n,i,a,o,s)})),i&&s.push(n))}(t,e,"post"===n,o,i,a)})),a}},function(t,e,n){var r;try{r=n(18)}catch(t){}r||(r=window.dagre),t.exports=r},function(t,e,n){var r=n(67),i=n(36),a=n(68),o=n(40),s=Object.prototype,c=s.hasOwnProperty,u=r((function(t,e){t=Object(t);var n=-1,r=e.length,u=r>2?e[2]:void 0;for(u&&a(e[0],e[1],u)&&(r=1);++n<r;)for(var l=e[n],h=o(l),f=-1,d=h.length;++f<d;){var p=h[f],g=t[p];(void 0===g||i(g,s[p])&&!c.call(t,p))&&(t[p]=l[p])}return t}));t.exports=u},function(t,e,n){var r=n(318);t.exports=function(t){return t?(t=r(t))===1/0||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}},function(t,e,n){var r=n(94);t.exports=function(t){return(null==t?0:t.length)?r(t,1):[]}},function(t,e,n){var r=n(59),i=n(36);t.exports=function(t,e,n){(void 0===n||i(t[e],n))&&(void 0!==n||e in t)||r(t,e,n)}},function(t,e,n){var r=n(34),i=n(63),a=n(21),o=Function.prototype,s=Object.prototype,c=o.toString,u=s.hasOwnProperty,l=c.call(Object);t.exports=function(t){if(!a(t)||"[object Object]"!=r(t))return!1;var e=i(t);if(null===e)return!0;var n=u.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&c.call(n)==l}},function(t,e){t.exports=function(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}},function(t,e){t.exports=function(t,e){return t<e}},function(t,e,n){var r=n(332),i=n(335)((function(t,e){return null==t?{}:r(t,e)}));t.exports=i},function(t,e,n){var r=n(336)();t.exports=r},function(t,e,n){var r=n(135),i=0;t.exports=function(t){var e=++i;return r(t)+e}},function(t,e,n){"use strict";var r=n(4),i=n(17).Graph,a=n(69).slack;function o(t,e){return r.forEach(t.nodes(),(function n(i){r.forEach(e.nodeEdges(i),(function(r){var o=r.v,s=i===o?r.w:o;t.hasNode(s)||a(e,r)||(t.setNode(s,{}),t.setEdge(i,s,{}),n(s))}))})),t.nodeCount()}function s(t,e){return r.minBy(e.edges(),(function(n){if(t.hasNode(n.v)!==t.hasNode(n.w))return a(e,n)}))}function c(t,e,n){r.forEach(t.nodes(),(function(t){e.node(t).rank+=n}))}t.exports=function(t){var e,n,r=new i({directed:!1}),u=t.nodes()[0],l=t.nodeCount();r.setNode(u,{});for(;o(r,t)<l;)e=s(r,t),n=r.hasNode(e.v)?a(t,e):-a(t,e),c(r,t,n);return r}},function(t,e){t.exports=function(t,e){return t.intersect(e)}},function(t,e,n){var r=n(96);t.exports=function(t,e,n){return r(t,e,e,n)}},function(t,e,n){var r=n(369);t.exports=function(t,e,n){var i=t.x,a=t.y,o=[],s=Number.POSITIVE_INFINITY,c=Number.POSITIVE_INFINITY;e.forEach((function(t){s=Math.min(s,t.x),c=Math.min(c,t.y)}));for(var u=i-t.width/2-s,l=a-t.height/2-c,h=0;h<e.length;h++){var f=e[h],d=e[h<e.length-1?h+1:0],p=r(t,n,{x:u+f.x,y:l+f.y},{x:u+d.x,y:l+d.y});p&&o.push(p)}if(!o.length)return console.log("NO INTERSECTION FOUND, RETURN NODE CENTER",t),t;o.length>1&&o.sort((function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,s=e.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}));return o[0]}},function(t,e){t.exports=function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,u=t.height/2;Math.abs(s)*c>Math.abs(o)*u?(s<0&&(u=-u),n=0===s?0:u*o/s,r=u):(o<0&&(c=-c),n=c,r=0===o?0:c*s/o);return{x:i+n,y:a+r}}},function(t,e,n){t.exports=function t(e){"use strict";var n=/^\0+/g,r=/[\0\r\f]/g,i=/: */g,a=/zoo|gra/,o=/([,: ])(transform)/g,s=/,+\s*(?![^(]*[)])/g,c=/ +\s*(?![^(]*[)])/g,u=/ *[\0] */g,l=/,\r+?/g,h=/([\t\r\n ])*\f?&/g,f=/:global\(((?:[^\(\)\[\]]*|\[.*\]|\([^\(\)]*\))*)\)/g,d=/\W+/g,p=/@(k\w+)\s*(\S*)\s*/,g=/::(place)/g,y=/:(read-only)/g,v=/\s+(?=[{\];=:>])/g,m=/([[}=:>])\s+/g,b=/(\{[^{]+?);(?=\})/g,x=/\s{2,}/g,_=/([^\(])(:+) */g,k=/[svh]\w+-[tblr]{2}/,w=/\(\s*(.*)\s*\)/g,E=/([\s\S]*?);/g,T=/-self|flex-/g,C=/[^]*?(:[rp][el]a[\w-]+)[^]*/,A=/stretch|:\s*\w+\-(?:conte|avail)/,S=/([^-])(image-set\()/,M="-webkit-",O="-moz-",D="-ms-",N=1,B=1,L=0,F=1,P=1,I=1,j=0,R=0,Y=0,z=[],U=[],$=0,W=null,V=0,H=1,G="",q="",X="";function Z(t,e,i,a,o){for(var s,c,l=0,h=0,f=0,d=0,v=0,m=0,b=0,x=0,k=0,E=0,T=0,C=0,A=0,S=0,O=0,D=0,j=0,U=0,W=0,Q=i.length,it=Q-1,at="",ot="",st="",ct="",ut="",lt="";O<Q;){if(b=i.charCodeAt(O),O===it&&h+d+f+l!==0&&(0!==h&&(b=47===h?10:47),d=f=l=0,Q++,it++),h+d+f+l===0){if(O===it&&(D>0&&(ot=ot.replace(r,"")),ot.trim().length>0)){switch(b){case 32:case 9:case 59:case 13:case 10:break;default:ot+=i.charAt(O)}b=59}if(1===j)switch(b){case 123:case 125:case 59:case 34:case 39:case 40:case 41:case 44:j=0;case 9:case 13:case 10:case 32:break;default:for(j=0,W=O,v=b,O--,b=59;W<Q;)switch(i.charCodeAt(W++)){case 10:case 13:case 59:++O,b=v,W=Q;break;case 58:D>0&&(++O,b=v);case 123:W=Q}}switch(b){case 123:for(v=(ot=ot.trim()).charCodeAt(0),T=1,W=++O;O<Q;){switch(b=i.charCodeAt(O)){case 123:T++;break;case 125:T--;break;case 47:switch(m=i.charCodeAt(O+1)){case 42:case 47:O=rt(m,O,it,i)}break;case 91:b++;case 40:b++;case 34:case 39:for(;O++<it&&i.charCodeAt(O)!==b;);}if(0===T)break;O++}switch(st=i.substring(W,O),0===v&&(v=(ot=ot.replace(n,"").trim()).charCodeAt(0)),v){case 64:switch(D>0&&(ot=ot.replace(r,"")),m=ot.charCodeAt(1)){case 100:case 109:case 115:case 45:s=e;break;default:s=z}if(W=(st=Z(e,s,st,m,o+1)).length,Y>0&&0===W&&(W=ot.length),$>0&&(c=nt(3,st,s=J(z,ot,U),e,B,N,W,m,o,a),ot=s.join(""),void 0!==c&&0===(W=(st=c.trim()).length)&&(m=0,st="")),W>0)switch(m){case 115:ot=ot.replace(w,et);case 100:case 109:case 45:st=ot+"{"+st+"}";break;case 107:st=(ot=ot.replace(p,"$1 $2"+(H>0?G:"")))+"{"+st+"}",st=1===P||2===P&&tt("@"+st,3)?"@"+M+st+"@"+st:"@"+st;break;default:st=ot+st,112===a&&(ct+=st,st="")}else st="";break;default:st=Z(e,J(e,ot,U),st,a,o+1)}ut+=st,C=0,j=0,S=0,D=0,U=0,A=0,ot="",st="",b=i.charCodeAt(++O);break;case 125:case 59:if((W=(ot=(D>0?ot.replace(r,""):ot).trim()).length)>1)switch(0===S&&(45===(v=ot.charCodeAt(0))||v>96&&v<123)&&(W=(ot=ot.replace(" ",":")).length),$>0&&void 0!==(c=nt(1,ot,e,t,B,N,ct.length,a,o,a))&&0===(W=(ot=c.trim()).length)&&(ot="\0\0"),v=ot.charCodeAt(0),m=ot.charCodeAt(1),v){case 0:break;case 64:if(105===m||99===m){lt+=ot+i.charAt(O);break}default:if(58===ot.charCodeAt(W-1))break;ct+=K(ot,v,m,ot.charCodeAt(2))}C=0,j=0,S=0,D=0,U=0,ot="",b=i.charCodeAt(++O)}}switch(b){case 13:case 10:if(h+d+f+l+R===0)switch(E){case 41:case 39:case 34:case 64:case 126:case 62:case 42:case 43:case 47:case 45:case 58:case 44:case 59:case 123:case 125:break;default:S>0&&(j=1)}47===h?h=0:F+C===0&&107!==a&&ot.length>0&&(D=1,ot+="\0"),$*V>0&&nt(0,ot,e,t,B,N,ct.length,a,o,a),N=1,B++;break;case 59:case 125:if(h+d+f+l===0){N++;break}default:switch(N++,at=i.charAt(O),b){case 9:case 32:if(d+l+h===0)switch(x){case 44:case 58:case 9:case 32:at="";break;default:32!==b&&(at=" ")}break;case 0:at="\\0";break;case 12:at="\\f";break;case 11:at="\\v";break;case 38:d+h+l===0&&F>0&&(U=1,D=1,at="\f"+at);break;case 108:if(d+h+l+L===0&&S>0)switch(O-S){case 2:112===x&&58===i.charCodeAt(O-3)&&(L=x);case 8:111===k&&(L=k)}break;case 58:d+h+l===0&&(S=O);break;case 44:h+f+d+l===0&&(D=1,at+="\r");break;case 34:case 39:0===h&&(d=d===b?0:0===d?b:d);break;case 91:d+h+f===0&&l++;break;case 93:d+h+f===0&&l--;break;case 41:d+h+l===0&&f--;break;case 40:if(d+h+l===0){if(0===C)switch(2*x+3*k){case 533:break;default:T=0,C=1}f++}break;case 64:h+f+d+l+S+A===0&&(A=1);break;case 42:case 47:if(d+l+f>0)break;switch(h){case 0:switch(2*b+3*i.charCodeAt(O+1)){case 235:h=47;break;case 220:W=O,h=42}break;case 42:47===b&&42===x&&W+2!==O&&(33===i.charCodeAt(W+2)&&(ct+=i.substring(W,O+1)),at="",h=0)}}if(0===h){if(F+d+l+A===0&&107!==a&&59!==b)switch(b){case 44:case 126:case 62:case 43:case 41:case 40:if(0===C){switch(x){case 9:case 32:case 10:case 13:at+="\0";break;default:at="\0"+at+(44===b?"":"\0")}D=1}else switch(b){case 40:S+7===O&&108===x&&(S=0),C=++T;break;case 41:0==(C=--T)&&(D=1,at+="\0")}break;case 9:case 32:switch(x){case 0:case 123:case 125:case 59:case 44:case 12:case 9:case 32:case 10:case 13:break;default:0===C&&(D=1,at+="\0")}}ot+=at,32!==b&&9!==b&&(E=b)}}k=x,x=b,O++}if(W=ct.length,Y>0&&0===W&&0===ut.length&&0===e[0].length==0&&(109!==a||1===e.length&&(F>0?q:X)===e[0])&&(W=e.join(",").length+2),W>0){if(s=0===F&&107!==a?function(t){for(var e,n,i=0,a=t.length,o=Array(a);i<a;++i){for(var s=t[i].split(u),c="",l=0,h=0,f=0,d=0,p=s.length;l<p;++l)if(!(0===(h=(n=s[l]).length)&&p>1)){if(f=c.charCodeAt(c.length-1),d=n.charCodeAt(0),e="",0!==l)switch(f){case 42:case 126:case 62:case 43:case 32:case 40:break;default:e=" "}switch(d){case 38:n=e+q;case 126:case 62:case 43:case 32:case 41:case 40:break;case 91:n=e+n+q;break;case 58:switch(2*n.charCodeAt(1)+3*n.charCodeAt(2)){case 530:if(I>0){n=e+n.substring(8,h-1);break}default:(l<1||s[l-1].length<1)&&(n=e+q+n)}break;case 44:e="";default:n=h>1&&n.indexOf(":")>0?e+n.replace(_,"$1"+q+"$2"):e+n+q}c+=n}o[i]=c.replace(r,"").trim()}return o}(e):e,$>0&&void 0!==(c=nt(2,ct,s,t,B,N,W,a,o,a))&&0===(ct=c).length)return lt+ct+ut;if(ct=s.join(",")+"{"+ct+"}",P*L!=0){switch(2!==P||tt(ct,2)||(L=0),L){case 111:ct=ct.replace(y,":-moz-$1")+ct;break;case 112:ct=ct.replace(g,"::-webkit-input-$1")+ct.replace(g,"::-moz-$1")+ct.replace(g,":-ms-input-$1")+ct}L=0}}return lt+ct+ut}function J(t,e,n){var r=e.trim().split(l),i=r,a=r.length,o=t.length;switch(o){case 0:case 1:for(var s=0,c=0===o?"":t[0]+" ";s<a;++s)i[s]=Q(c,i[s],n,o).trim();break;default:s=0;var u=0;for(i=[];s<a;++s)for(var h=0;h<o;++h)i[u++]=Q(t[h]+" ",r[s],n,o).trim()}return i}function Q(t,e,n,r){var i=e,a=i.charCodeAt(0);switch(a<33&&(a=(i=i.trim()).charCodeAt(0)),a){case 38:switch(F+r){case 0:case 1:if(0===t.trim().length)break;default:return i.replace(h,"$1"+t.trim())}break;case 58:switch(i.charCodeAt(1)){case 103:if(I>0&&F>0)return i.replace(f,"$1").replace(h,"$1"+X);break;default:return t.trim()+i.replace(h,"$1"+t.trim())}default:if(n*F>0&&i.indexOf("\f")>0)return i.replace(h,(58===t.charCodeAt(0)?"":"$1")+t.trim())}return t+i}function K(t,e,n,r){var u,l=0,h=t+";",f=2*e+3*n+4*r;if(944===f)return function(t){var e=t.length,n=t.indexOf(":",9)+1,r=t.substring(0,n).trim(),i=t.substring(n,e-1).trim();switch(t.charCodeAt(9)*H){case 0:break;case 45:if(110!==t.charCodeAt(10))break;default:var a=i.split((i="",s)),o=0;for(n=0,e=a.length;o<e;n=0,++o){for(var u=a[o],l=u.split(c);u=l[n];){var h=u.charCodeAt(0);if(1===H&&(h>64&&h<90||h>96&&h<123||95===h||45===h&&45!==u.charCodeAt(1)))switch(isNaN(parseFloat(u))+(-1!==u.indexOf("("))){case 1:switch(u){case"infinite":case"alternate":case"backwards":case"running":case"normal":case"forwards":case"both":case"none":case"linear":case"ease":case"ease-in":case"ease-out":case"ease-in-out":case"paused":case"reverse":case"alternate-reverse":case"inherit":case"initial":case"unset":case"step-start":case"step-end":break;default:u+=G}}l[n++]=u}i+=(0===o?"":",")+l.join(" ")}}return i=r+i+";",1===P||2===P&&tt(i,1)?M+i+i:i}(h);if(0===P||2===P&&!tt(h,1))return h;switch(f){case 1015:return 97===h.charCodeAt(10)?M+h+h:h;case 951:return 116===h.charCodeAt(3)?M+h+h:h;case 963:return 110===h.charCodeAt(5)?M+h+h:h;case 1009:if(100!==h.charCodeAt(4))break;case 969:case 942:return M+h+h;case 978:return M+h+O+h+h;case 1019:case 983:return M+h+O+h+D+h+h;case 883:return 45===h.charCodeAt(8)?M+h+h:h.indexOf("image-set(",11)>0?h.replace(S,"$1-webkit-$2")+h:h;case 932:if(45===h.charCodeAt(4))switch(h.charCodeAt(5)){case 103:return M+"box-"+h.replace("-grow","")+M+h+D+h.replace("grow","positive")+h;case 115:return M+h+D+h.replace("shrink","negative")+h;case 98:return M+h+D+h.replace("basis","preferred-size")+h}return M+h+D+h+h;case 964:return M+h+D+"flex-"+h+h;case 1023:if(99!==h.charCodeAt(8))break;return u=h.substring(h.indexOf(":",15)).replace("flex-","").replace("space-between","justify"),M+"box-pack"+u+M+h+D+"flex-pack"+u+h;case 1005:return a.test(h)?h.replace(i,":"+M)+h.replace(i,":"+O)+h:h;case 1e3:switch(l=(u=h.substring(13).trim()).indexOf("-")+1,u.charCodeAt(0)+u.charCodeAt(l)){case 226:u=h.replace(k,"tb");break;case 232:u=h.replace(k,"tb-rl");break;case 220:u=h.replace(k,"lr");break;default:return h}return M+h+D+u+h;case 1017:if(-1===h.indexOf("sticky",9))return h;case 975:switch(l=(h=t).length-10,f=(u=(33===h.charCodeAt(l)?h.substring(0,l):h).substring(t.indexOf(":",7)+1).trim()).charCodeAt(0)+(0|u.charCodeAt(7))){case 203:if(u.charCodeAt(8)<111)break;case 115:h=h.replace(u,M+u)+";"+h;break;case 207:case 102:h=h.replace(u,M+(f>102?"inline-":"")+"box")+";"+h.replace(u,M+u)+";"+h.replace(u,D+u+"box")+";"+h}return h+";";case 938:if(45===h.charCodeAt(5))switch(h.charCodeAt(6)){case 105:return u=h.replace("-items",""),M+h+M+"box-"+u+D+"flex-"+u+h;case 115:return M+h+D+"flex-item-"+h.replace(T,"")+h;default:return M+h+D+"flex-line-pack"+h.replace("align-content","").replace(T,"")+h}break;case 973:case 989:if(45!==h.charCodeAt(3)||122===h.charCodeAt(4))break;case 931:case 953:if(!0===A.test(t))return 115===(u=t.substring(t.indexOf(":")+1)).charCodeAt(0)?K(t.replace("stretch","fill-available"),e,n,r).replace(":fill-available",":stretch"):h.replace(u,M+u)+h.replace(u,O+u.replace("fill-",""))+h;break;case 962:if(h=M+h+(102===h.charCodeAt(5)?D+h:"")+h,n+r===211&&105===h.charCodeAt(13)&&h.indexOf("transform",10)>0)return h.substring(0,h.indexOf(";",27)+1).replace(o,"$1-webkit-$2")+h}return h}function tt(t,e){var n=t.indexOf(1===e?":":"{"),r=t.substring(0,3!==e?n:10),i=t.substring(n+1,t.length-1);return W(2!==e?r:r.replace(C,"$1"),i,e)}function et(t,e){var n=K(e,e.charCodeAt(0),e.charCodeAt(1),e.charCodeAt(2));return n!==e+";"?n.replace(E," or ($1)").substring(4):"("+e+")"}function nt(t,e,n,r,i,a,o,s,c,u){for(var l,h=0,f=e;h<$;++h)switch(l=U[h].call(at,t,f,n,r,i,a,o,s,c,u)){case void 0:case!1:case!0:case null:break;default:f=l}if(f!==e)return f}function rt(t,e,n,r){for(var i=e+1;i<n;++i)switch(r.charCodeAt(i)){case 47:if(42===t&&42===r.charCodeAt(i-1)&&e+2!==i)return i+1;break;case 10:if(47===t)return i+1}return i}function it(t){for(var e in t){var n=t[e];switch(e){case"keyframe":H=0|n;break;case"global":I=0|n;break;case"cascade":F=0|n;break;case"compress":j=0|n;break;case"semicolon":R=0|n;break;case"preserve":Y=0|n;break;case"prefix":W=null,n?"function"!=typeof n?P=1:(P=2,W=n):P=0}}return it}function at(e,n){if(void 0!==this&&this.constructor===at)return t(e);var i=e,a=i.charCodeAt(0);a<33&&(a=(i=i.trim()).charCodeAt(0)),H>0&&(G=i.replace(d,91===a?"":"-")),a=1,1===F?X=i:q=i;var o,s=[X];$>0&&void 0!==(o=nt(-1,n,s,s,B,N,0,0,0,0))&&"string"==typeof o&&(n=o);var c=Z(z,s,n,0,0);return $>0&&void 0!==(o=nt(-2,c,s,s,B,N,c.length,0,0,0))&&"string"!=typeof(c=o)&&(a=0),G="",X="",q="",L=0,B=1,N=1,j*a==0?c:function(t){return t.replace(r,"").replace(v,"").replace(m,"$1").replace(b,"$1").replace(x," ")}(c)}return at.use=function t(e){switch(e){case void 0:case null:$=U.length=0;break;default:if("function"==typeof e)U[$++]=e;else if("object"==typeof e)for(var n=0,r=e.length;n<r;++n)t(e[n]);else V=0|!!e}return t},at.set=it,void 0!==e&&it(e),at}(null)},function(t,e){t.exports=function(t,e){return t.intersect(e)}},function(t,e,n){var r={"./locale":98,"./locale.js":98};function i(t){var e=a(t);return n(e)}function a(t){if(!n.o(r,t)){var e=new Error("Cannot find module '"+t+"'");throw e.code="MODULE_NOT_FOUND",e}return r[t]}i.keys=function(){return Object.keys(r)},i.resolve=a,t.exports=i,i.id=171},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(51);e.hex=r.default;var i=n(51);e.rgb=i.default;var a=n(51);e.rgba=a.default;var o=n(100);e.hsl=o.default;var s=n(100);e.hsla=s.default;var c=n(29);e.channel=c.default;var u=n(182);e.red=u.default;var l=n(183);e.green=l.default;var h=n(184);e.blue=h.default;var f=n(185);e.hue=f.default;var d=n(186);e.saturation=d.default;var p=n(187);e.lightness=p.default;var g=n(101);e.alpha=g.default;var y=n(101);e.opacity=y.default;var v=n(102);e.luminance=v.default;var m=n(188);e.isDark=m.default;var b=n(103);e.isLight=b.default;var x=n(189);e.isValid=x.default;var _=n(190);e.saturate=_.default;var k=n(191);e.desaturate=k.default;var w=n(192);e.lighten=w.default;var E=n(193);e.darken=E.default;var T=n(104);e.opacify=T.default;var C=n(104);e.fadeIn=C.default;var A=n(105);e.transparentize=A.default;var S=n(105);e.fadeOut=S.default;var M=n(194);e.complement=M.default;var O=n(195);e.grayscale=O.default;var D=n(106);e.adjust=D.default;var N=n(52);e.change=N.default;var B=n(196);e.invert=B.default;var L=n(107);e.mix=L.default;var F=n(197);e.scale=F.default},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={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:function(t){return t>=255?255:t<0?0:t},g:function(t){return t>=255?255:t<0?0:t},b:function(t){return t>=255?255:t<0?0:t},h:function(t){return t%360},s:function(t){return t>=100?100:t<0?0:t},l:function(t){return t>=100?100:t<0?0:t},a:function(t){return t>=1?1:t<0?0:t}},toLinear:function(t){var e=t/255;return t>.03928?Math.pow((e+.055)/1.055,2.4):e/12.92},hue2rgb:function(t,e,n){return n<0&&(n+=1),n>1&&(n-=1),n<1/6?t+6*(e-t)*n:n<.5?e:n<2/3?t+(e-t)*(2/3-n)*6:t},hsl2rgb:function(t,e){var n=t.h,i=t.s,a=t.l;if(100===i)return 2.55*a;n/=360,i/=100;var o=(a/=100)<.5?a*(1+i):a+i-a*i,s=2*a-o;switch(e){case"r":return 255*r.hue2rgb(s,o,n+1/3);case"g":return 255*r.hue2rgb(s,o,n);case"b":return 255*r.hue2rgb(s,o,n-1/3)}},rgb2hsl:function(t,e){var n=t.r,r=t.g,i=t.b;n/=255,r/=255,i/=255;var a=Math.max(n,r,i),o=Math.min(n,r,i),s=(a+o)/2;if("l"===e)return 100*s;if(a===o)return 0;var c=a-o;if("s"===e)return 100*(s>.5?c/(2-a-o):c/(a+o));switch(a){case n:return 60*((r-i)/c+(r<i?6:0));case r:return 60*((i-n)/c+2);case i:return 60*((n-r)/c+4);default:return-1}}};e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={round:function(t){return Math.round(1e10*t)/1e10}};e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r={frac2hex:function(t){var e=Math.round(255*t).toString(16);return e.length>1?e:"0"+e},dec2hex:function(t){var e=Math.round(t).toString(16);return e.length>1?e:"0"+e}};e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9),i=n(75),a=n(177),o=function(){function t(t,e){this.color=e,this.changed=!1,this.data=t,this.type=new a.default}return t.prototype.set=function(t,e){return this.color=e,this.changed=!1,this.data=t,this.type.type=i.TYPE.ALL,this},t.prototype._ensureHSL=function(){void 0===this.data.h&&(this.data.h=r.default.channel.rgb2hsl(this.data,"h")),void 0===this.data.s&&(this.data.s=r.default.channel.rgb2hsl(this.data,"s")),void 0===this.data.l&&(this.data.l=r.default.channel.rgb2hsl(this.data,"l"))},t.prototype._ensureRGB=function(){void 0===this.data.r&&(this.data.r=r.default.channel.hsl2rgb(this.data,"r")),void 0===this.data.g&&(this.data.g=r.default.channel.hsl2rgb(this.data,"g")),void 0===this.data.b&&(this.data.b=r.default.channel.hsl2rgb(this.data,"b"))},Object.defineProperty(t.prototype,"r",{get:function(){return this.type.is(i.TYPE.HSL)||void 0===this.data.r?(this._ensureHSL(),r.default.channel.hsl2rgb(this.data,"r")):this.data.r},set:function(t){this.type.set(i.TYPE.RGB),this.changed=!0,this.data.r=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"g",{get:function(){return this.type.is(i.TYPE.HSL)||void 0===this.data.g?(this._ensureHSL(),r.default.channel.hsl2rgb(this.data,"g")):this.data.g},set:function(t){this.type.set(i.TYPE.RGB),this.changed=!0,this.data.g=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"b",{get:function(){return this.type.is(i.TYPE.HSL)||void 0===this.data.b?(this._ensureHSL(),r.default.channel.hsl2rgb(this.data,"b")):this.data.b},set:function(t){this.type.set(i.TYPE.RGB),this.changed=!0,this.data.b=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"h",{get:function(){return this.type.is(i.TYPE.RGB)||void 0===this.data.h?(this._ensureRGB(),r.default.channel.rgb2hsl(this.data,"h")):this.data.h},set:function(t){this.type.set(i.TYPE.HSL),this.changed=!0,this.data.h=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"s",{get:function(){return this.type.is(i.TYPE.RGB)||void 0===this.data.s?(this._ensureRGB(),r.default.channel.rgb2hsl(this.data,"s")):this.data.s},set:function(t){this.type.set(i.TYPE.HSL),this.changed=!0,this.data.s=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"l",{get:function(){return this.type.is(i.TYPE.RGB)||void 0===this.data.l?(this._ensureRGB(),r.default.channel.rgb2hsl(this.data,"l")):this.data.l},set:function(t){this.type.set(i.TYPE.HSL),this.changed=!0,this.data.l=t},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"a",{get:function(){return this.data.a},set:function(t){this.changed=!0,this.data.a=t},enumerable:!0,configurable:!0}),t}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(75),i=function(){function t(){this.type=r.TYPE.ALL}return t.prototype.get=function(){return this.type},t.prototype.set=function(t){if(this.type&&this.type!==t)throw new Error("Cannot change both RGB and HSL channels at the same time");this.type=t},t.prototype.reset=function(){this.type=r.TYPE.ALL},t.prototype.is=function(t){return this.type===t},t}();e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9),i={};e.DEC2HEX=i;for(var a=0;a<=255;a++)i[a]=r.default.unit.dec2hex(a)},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(99),i={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:function(t){t=t.toLowerCase();var e=i.colors[t];if(e)return r.default.parse(e)},stringify:function(t){var e=r.default.stringify(t);for(var n in i.colors)if(i.colors[n]===e)return n}};e.default=i},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9),i=n(45),a={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:function(t){var e=t.charCodeAt(0);if(114===e||82===e){var n=t.match(a.re);if(n){var o=n[1],s=n[2],c=n[3],u=n[4],l=n[5],h=n[6],f=n[7],d=n[8];return i.default.set({r:r.default.channel.clamp.r(s?2.55*parseFloat(o):parseFloat(o)),g:r.default.channel.clamp.g(u?2.55*parseFloat(c):parseFloat(c)),b:r.default.channel.clamp.b(h?2.55*parseFloat(l):parseFloat(l)),a:f?r.default.channel.clamp.a(d?parseFloat(f)/100:parseFloat(f)):1},t)}}},stringify:function(t){return t.a<1?"rgba("+r.default.lang.round(t.r)+", "+r.default.lang.round(t.g)+", "+r.default.lang.round(t.b)+", "+r.default.lang.round(t.a)+")":"rgb("+r.default.lang.round(t.r)+", "+r.default.lang.round(t.g)+", "+r.default.lang.round(t.b)+")"}};e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9),i=n(45),a={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:function(t){var e=t.match(a.hueRe);if(e){var n=e[1];switch(e[2]){case"grad":return r.default.channel.clamp.h(.9*parseFloat(n));case"rad":return r.default.channel.clamp.h(180*parseFloat(n)/Math.PI);case"turn":return r.default.channel.clamp.h(360*parseFloat(n))}}return r.default.channel.clamp.h(parseFloat(t))},parse:function(t){var e=t.charCodeAt(0);if(104===e||72===e){var n=t.match(a.re);if(n){var o=n[1],s=n[2],c=n[3],u=n[4],l=n[5];return i.default.set({h:a._hue2deg(o),s:r.default.channel.clamp.s(parseFloat(s)),l:r.default.channel.clamp.l(parseFloat(c)),a:u?r.default.channel.clamp.a(l?parseFloat(u)/100:parseFloat(u)):1},t)}}},stringify:function(t){return t.a<1?"hsla("+r.default.lang.round(t.h)+", "+r.default.lang.round(t.s)+"%, "+r.default.lang.round(t.l)+"%, "+t.a+")":"hsl("+r.default.lang.round(t.h)+", "+r.default.lang.round(t.s)+"%, "+r.default.lang.round(t.l)+"%)"}};e.default=a},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29);e.default=function(t){return r.default(t,"r")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29);e.default=function(t){return r.default(t,"g")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29);e.default=function(t){return r.default(t,"b")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29);e.default=function(t){return r.default(t,"h")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29);e.default=function(t){return r.default(t,"s")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(29);e.default=function(t){return r.default(t,"l")}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(103);e.default=function(t){return!r.default(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(15);e.default=function(t){try{return r.default.parse(t),!0}catch(t){return!1}}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(32);e.default=function(t,e){return r.default(t,"s",e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(32);e.default=function(t,e){return r.default(t,"s",-e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(32);e.default=function(t,e){return r.default(t,"l",e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(32);e.default=function(t,e){return r.default(t,"l",-e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(32);e.default=function(t){return r.default(t,"h",180)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(52);e.default=function(t){return r.default(t,{s:0})}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(15),i=n(107);e.default=function(t,e){void 0===e&&(e=100);var n=r.default.parse(t);return n.r=255-n.r,n.g=255-n.g,n.b=255-n.b,i.default(n,t,e)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(9),i=n(15),a=n(106);e.default=function(t,e){var n,o,s,c=i.default.parse(t),u={};for(var l in e)u[l]=(n=c[l],o=e[l],s=r.default.channel.max[l],o>0?(s-n)*o/100:n*o/100);return a.default(t,u)}},function(t,e,n){t.exports={Graph:n(76),version:n(300)}},function(t,e,n){var r=n(108);t.exports=function(t){return r(t,4)}},function(t,e){t.exports=function(){this.__data__=[],this.size=0}},function(t,e,n){var r=n(55),i=Array.prototype.splice;t.exports=function(t){var e=this.__data__,n=r(e,t);return!(n<0)&&(n==e.length-1?e.pop():i.call(e,n,1),--this.size,!0)}},function(t,e,n){var r=n(55);t.exports=function(t){var e=this.__data__,n=r(e,t);return n<0?void 0:e[n][1]}},function(t,e,n){var r=n(55);t.exports=function(t){return r(this.__data__,t)>-1}},function(t,e,n){var r=n(55);t.exports=function(t,e){var n=this.__data__,i=r(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this}},function(t,e,n){var r=n(54);t.exports=function(){this.__data__=new r,this.size=0}},function(t,e){t.exports=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n}},function(t,e){t.exports=function(t){return this.__data__.get(t)}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e,n){var r=n(54),i=n(77),a=n(78);t.exports=function(t,e){var n=this.__data__;if(n instanceof r){var o=n.__data__;if(!i||o.length<199)return o.push([t,e]),this.size=++n.size,this;n=this.__data__=new a(o)}return n.set(t,e),this.size=n.size,this}},function(t,e,n){var r=n(37),i=n(214),a=n(11),o=n(110),s=/^\[object .+?Constructor\]$/,c=Function.prototype,u=Object.prototype,l=c.toString,h=u.hasOwnProperty,f=RegExp("^"+l.call(h).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");t.exports=function(t){return!(!a(t)||i(t))&&(r(t)?f:s).test(o(t))}},function(t,e){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(t){"object"==typeof window&&(n=window)}t.exports=n},function(t,e,n){var r=n(38),i=Object.prototype,a=i.hasOwnProperty,o=i.toString,s=r?r.toStringTag:void 0;t.exports=function(t){var e=a.call(t,s),n=t[s];try{t[s]=void 0;var r=!0}catch(t){}var i=o.call(t);return r&&(e?t[s]=n:delete t[s]),i}},function(t,e){var n=Object.prototype.toString;t.exports=function(t){return n.call(t)}},function(t,e,n){var r,i=n(215),a=(r=/[^.]+$/.exec(i&&i.keys&&i.keys.IE_PROTO||""))?"Symbol(src)_1."+r:"";t.exports=function(t){return!!a&&a in t}},function(t,e,n){var r=n(16)["__core-js_shared__"];t.exports=r},function(t,e){t.exports=function(t,e){return null==t?void 0:t[e]}},function(t,e,n){var r=n(218),i=n(54),a=n(77);t.exports=function(){this.size=0,this.__data__={hash:new r,map:new(a||i),string:new r}}},function(t,e,n){var r=n(219),i=n(220),a=n(221),o=n(222),s=n(223);function c(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var r=t[e];this.set(r[0],r[1])}}c.prototype.clear=r,c.prototype.delete=i,c.prototype.get=a,c.prototype.has=o,c.prototype.set=s,t.exports=c},function(t,e,n){var r=n(56);t.exports=function(){this.__data__=r?r(null):{},this.size=0}},function(t,e){t.exports=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=e?1:0,e}},function(t,e,n){var r=n(56),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;if(r){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return i.call(e,t)?e[t]:void 0}},function(t,e,n){var r=n(56),i=Object.prototype.hasOwnProperty;t.exports=function(t){var e=this.__data__;return r?void 0!==e[t]:i.call(e,t)}},function(t,e,n){var r=n(56);t.exports=function(t,e){var n=this.__data__;return this.size+=this.has(t)?0:1,n[t]=r&&void 0===e?"__lodash_hash_undefined__":e,this}},function(t,e,n){var r=n(57);t.exports=function(t){var e=r(this,t).delete(t);return this.size-=e?1:0,e}},function(t,e){t.exports=function(t){var e=typeof t;return"string"==e||"number"==e||"symbol"==e||"boolean"==e?"__proto__"!==t:null===t}},function(t,e,n){var r=n(57);t.exports=function(t){return r(this,t).get(t)}},function(t,e,n){var r=n(57);t.exports=function(t){return r(this,t).has(t)}},function(t,e,n){var r=n(57);t.exports=function(t,e){var n=r(this,t),i=n.size;return n.set(t,e),this.size+=n.size==i?0:1,this}},function(t,e,n){var r=n(46),i=n(30);t.exports=function(t,e){return t&&r(e,i(e),t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=Array(t);++n<t;)r[n]=e(n);return r}},function(t,e,n){var r=n(34),i=n(21);t.exports=function(t){return i(t)&&"[object Arguments]"==r(t)}},function(t,e){t.exports=function(){return!1}},function(t,e,n){var r=n(34),i=n(80),a=n(21),o={};o["[object Float32Array]"]=o["[object Float64Array]"]=o["[object Int8Array]"]=o["[object Int16Array]"]=o["[object Int32Array]"]=o["[object Uint8Array]"]=o["[object Uint8ClampedArray]"]=o["[object Uint16Array]"]=o["[object Uint32Array]"]=!0,o["[object Arguments]"]=o["[object Array]"]=o["[object ArrayBuffer]"]=o["[object Boolean]"]=o["[object DataView]"]=o["[object Date]"]=o["[object Error]"]=o["[object Function]"]=o["[object Map]"]=o["[object Number]"]=o["[object Object]"]=o["[object RegExp]"]=o["[object Set]"]=o["[object String]"]=o["[object WeakMap]"]=!1,t.exports=function(t){return a(t)&&i(t.length)&&!!o[r(t)]}},function(t,e,n){var r=n(113)(Object.keys,Object);t.exports=r},function(t,e,n){var r=n(46),i=n(40);t.exports=function(t,e){return t&&r(e,i(e),t)}},function(t,e,n){var r=n(11),i=n(62),a=n(237),o=Object.prototype.hasOwnProperty;t.exports=function(t){if(!r(t))return a(t);var e=i(t),n=[];for(var s in t)("constructor"!=s||!e&&o.call(t,s))&&n.push(s);return n}},function(t,e){t.exports=function(t){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}},function(t,e,n){var r=n(46),i=n(83);t.exports=function(t,e){return r(t,i(t),e)}},function(t,e,n){var r=n(46),i=n(118);t.exports=function(t,e){return r(t,i(t),e)}},function(t,e,n){var r=n(120),i=n(118),a=n(40);t.exports=function(t){return r(t,a,i)}},function(t,e,n){var r=n(33)(n(16),"DataView");t.exports=r},function(t,e,n){var r=n(33)(n(16),"Promise");t.exports=r},function(t,e,n){var r=n(33)(n(16),"WeakMap");t.exports=r},function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function(t){var e=t.length,r=new t.constructor(e);return e&&"string"==typeof t[0]&&n.call(t,"index")&&(r.index=t.index,r.input=t.input),r}},function(t,e,n){var r=n(85),i=n(246),a=n(247),o=n(248),s=n(123);t.exports=function(t,e,n){var c=t.constructor;switch(e){case"[object ArrayBuffer]":return r(t);case"[object Boolean]":case"[object Date]":return new c(+t);case"[object DataView]":return i(t,n);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return s(t,n);case"[object Map]":return new c;case"[object Number]":case"[object String]":return new c(t);case"[object RegExp]":return a(t);case"[object Set]":return new c;case"[object Symbol]":return o(t)}}},function(t,e,n){var r=n(85);t.exports=function(t,e){var n=e?r(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.byteLength)}},function(t,e){var n=/\w*$/;t.exports=function(t){var e=new t.constructor(t.source,n.exec(t));return e.lastIndex=t.lastIndex,e}},function(t,e,n){var r=n(38),i=r?r.prototype:void 0,a=i?i.valueOf:void 0;t.exports=function(t){return a?Object(a.call(t)):{}}},function(t,e,n){var r=n(250),i=n(61),a=n(81),o=a&&a.isMap,s=o?i(o):r;t.exports=s},function(t,e,n){var r=n(41),i=n(21);t.exports=function(t){return i(t)&&"[object Map]"==r(t)}},function(t,e,n){var r=n(252),i=n(61),a=n(81),o=a&&a.isSet,s=o?i(o):r;t.exports=s},function(t,e,n){var r=n(41),i=n(21);t.exports=function(t){return i(t)&&"[object Set]"==r(t)}},function(t,e){t.exports=function(t){return function(e,n,r){for(var i=-1,a=Object(e),o=r(e),s=o.length;s--;){var c=o[t?s:++i];if(!1===n(a[c],c,a))break}return e}}},function(t,e,n){var r=n(24);t.exports=function(t,e){return function(n,i){if(null==n)return n;if(!r(n))return t(n,i);for(var a=n.length,o=e?a:-1,s=Object(n);(e?o--:++o<a)&&!1!==i(s[o],o,s););return n}}},function(t,e,n){var r=n(64);t.exports=function(t,e){var n=[];return r(t,(function(t,r,i){e(t,r,i)&&n.push(t)})),n}},function(t,e,n){var r=n(257),i=n(265),a=n(134);t.exports=function(t){var e=i(t);return 1==e.length&&e[0][2]?a(e[0][0],e[0][1]):function(n){return n===t||r(n,t,e)}}},function(t,e,n){var r=n(53),i=n(129);t.exports=function(t,e,n,a){var o=n.length,s=o,c=!a;if(null==t)return!s;for(t=Object(t);o--;){var u=n[o];if(c&&u[2]?u[1]!==t[u[0]]:!(u[0]in t))return!1}for(;++o<s;){var l=(u=n[o])[0],h=t[l],f=u[1];if(c&&u[2]){if(void 0===h&&!(l in t))return!1}else{var d=new r;if(a)var p=a(h,f,l,t,e,d);if(!(void 0===p?i(f,h,3,a,d):p))return!1}}return!0}},function(t,e,n){var r=n(53),i=n(130),a=n(262),o=n(264),s=n(41),c=n(5),u=n(39),l=n(48),h="[object Object]",f=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,d,p,g){var y=c(t),v=c(e),m=y?"[object Array]":s(t),b=v?"[object Array]":s(e),x=(m="[object Arguments]"==m?h:m)==h,_=(b="[object Arguments]"==b?h:b)==h,k=m==b;if(k&&u(t)){if(!u(e))return!1;y=!0,x=!1}if(k&&!x)return g||(g=new r),y||l(t)?i(t,e,n,d,p,g):a(t,e,m,n,d,p,g);if(!(1&n)){var w=x&&f.call(t,"__wrapped__"),E=_&&f.call(e,"__wrapped__");if(w||E){var T=w?t.value():t,C=E?e.value():e;return g||(g=new r),p(T,C,n,d,g)}}return!!k&&(g||(g=new r),o(t,e,n,d,p,g))}},function(t,e){t.exports=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}},function(t,e){t.exports=function(t){return this.__data__.has(t)}},function(t,e){t.exports=function(t,e){for(var n=-1,r=null==t?0:t.length;++n<r;)if(e(t[n],n,t))return!0;return!1}},function(t,e,n){var r=n(38),i=n(122),a=n(36),o=n(130),s=n(263),c=n(90),u=r?r.prototype:void 0,l=u?u.valueOf:void 0;t.exports=function(t,e,n,r,u,h,f){switch(n){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||!h(new i(t),new i(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return a(+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 d=s;case"[object Set]":var p=1&r;if(d||(d=c),t.size!=e.size&&!p)return!1;var g=f.get(t);if(g)return g==e;r|=2,f.set(t,e);var y=o(d(t),d(e),r,u,h,f);return f.delete(t),y;case"[object Symbol]":if(l)return l.call(t)==l.call(e)}return!1}},function(t,e){t.exports=function(t){var e=-1,n=Array(t.size);return t.forEach((function(t,r){n[++e]=[r,t]})),n}},function(t,e,n){var r=n(119),i=Object.prototype.hasOwnProperty;t.exports=function(t,e,n,a,o,s){var c=1&n,u=r(t),l=u.length;if(l!=r(e).length&&!c)return!1;for(var h=l;h--;){var f=u[h];if(!(c?f in e:i.call(e,f)))return!1}var d=s.get(t);if(d&&s.get(e))return d==e;var p=!0;s.set(t,e),s.set(e,t);for(var g=c;++h<l;){var y=t[f=u[h]],v=e[f];if(a)var m=c?a(v,y,f,e,t,s):a(y,v,f,t,e,s);if(!(void 0===m?y===v||o(y,v,n,a,s):m)){p=!1;break}g||(g="constructor"==f)}if(p&&!g){var b=t.constructor,x=e.constructor;b!=x&&"constructor"in t&&"constructor"in e&&!("function"==typeof b&&b instanceof b&&"function"==typeof x&&x instanceof x)&&(p=!1)}return s.delete(t),s.delete(e),p}},function(t,e,n){var r=n(133),i=n(30);t.exports=function(t){for(var e=i(t),n=e.length;n--;){var a=e[n],o=t[a];e[n]=[a,o,r(o)]}return e}},function(t,e,n){var r=n(129),i=n(267),a=n(136),o=n(92),s=n(133),c=n(134),u=n(49);t.exports=function(t,e){return o(t)&&s(e)?c(u(t),e):function(n){var o=i(n,t);return void 0===o&&o===e?a(n,t):r(e,o,3)}}},function(t,e,n){var r=n(91);t.exports=function(t,e,n){var i=null==t?void 0:r(t,e);return void 0===i?n:i}},function(t,e,n){var r=n(269),i=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,a=/\\(\\)?/g,o=r((function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(i,(function(t,n,r,i){e.push(r?i.replace(a,"$1"):n||t)})),e}));t.exports=o},function(t,e,n){var r=n(270);t.exports=function(t){var e=r(t,(function(t){return 500===n.size&&n.clear(),t})),n=e.cache;return e}},function(t,e,n){var r=n(78);function i(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new TypeError("Expected a function");var n=function(){var r=arguments,i=e?e.apply(this,r):r[0],a=n.cache;if(a.has(i))return a.get(i);var o=t.apply(this,r);return n.cache=a.set(i,o)||a,o};return n.cache=new(i.Cache||r),n}i.Cache=r,t.exports=i},function(t,e,n){var r=n(38),i=n(66),a=n(5),o=n(42),s=r?r.prototype:void 0,c=s?s.toString:void 0;t.exports=function t(e){if("string"==typeof e)return e;if(a(e))return i(e,t)+"";if(o(e))return c?c.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}},function(t,e){t.exports=function(t,e){return null!=t&&e in Object(t)}},function(t,e,n){var r=n(138),i=n(274),a=n(92),o=n(49);t.exports=function(t){return a(t)?r(o(t)):i(t)}},function(t,e,n){var r=n(91);t.exports=function(t){return function(e){return r(e,t)}}},function(t,e){var n=Object.prototype.hasOwnProperty;t.exports=function(t,e){return null!=t&&n.call(t,e)}},function(t,e,n){var r=n(82),i=n(41),a=n(47),o=n(5),s=n(24),c=n(39),u=n(62),l=n(48),h=Object.prototype.hasOwnProperty;t.exports=function(t){if(null==t)return!0;if(s(t)&&(o(t)||"string"==typeof t||"function"==typeof t.splice||c(t)||l(t)||a(t)))return!t.length;var e=i(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(u(t))return!r(t).length;for(var n in t)if(h.call(t,n))return!1;return!0}},function(t,e){t.exports=function(t,e,n,r){var i=-1,a=null==t?0:t.length;for(r&&a&&(n=t[++i]);++i<a;)n=e(n,t[i],i,t);return n}},function(t,e){t.exports=function(t,e,n,r,i){return i(t,(function(t,i,a){n=r?(r=!1,t):e(n,t,i,a)})),n}},function(t,e,n){var r=n(82),i=n(41),a=n(24),o=n(280),s=n(281);t.exports=function(t){if(null==t)return 0;if(a(t))return o(t)?s(t):t.length;var e=i(t);return"[object Map]"==e||"[object Set]"==e?t.size:r(t).length}},function(t,e,n){var r=n(34),i=n(5),a=n(21);t.exports=function(t){return"string"==typeof t||!i(t)&&a(t)&&"[object String]"==r(t)}},function(t,e,n){var r=n(282),i=n(283),a=n(284);t.exports=function(t){return i(t)?a(t):r(t)}},function(t,e,n){var r=n(138)("length");t.exports=r},function(t,e){var n=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");t.exports=function(t){return n.test(t)}},function(t,e){var n="[\\ud800-\\udfff]",r="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",i="\\ud83c[\\udffb-\\udfff]",a="[^\\ud800-\\udfff]",o="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",c="(?:"+r+"|"+i+")"+"?",u="[\\ufe0e\\ufe0f]?"+c+("(?:\\u200d(?:"+[a,o,s].join("|")+")[\\ufe0e\\ufe0f]?"+c+")*"),l="(?:"+[a+r+"?",r,o,s,n].join("|")+")",h=RegExp(i+"(?="+i+")|"+l+u,"g");t.exports=function(t){for(var e=h.lastIndex=0;h.test(t);)++e;return e}},function(t,e,n){var r=n(79),i=n(125),a=n(88),o=n(25),s=n(63),c=n(5),u=n(39),l=n(37),h=n(11),f=n(48);t.exports=function(t,e,n){var d=c(t),p=d||u(t)||f(t);if(e=o(e,4),null==n){var g=t&&t.constructor;n=p?d?new g:[]:h(t)&&l(g)?i(s(t)):{}}return(p?r:a)(t,(function(t,r,i){return e(n,t,r,i)})),n}},function(t,e,n){var r=n(94),i=n(67),a=n(291),o=n(146),s=i((function(t){return a(r(t,1,o,!0))}));t.exports=s},function(t,e,n){var r=n(38),i=n(47),a=n(5),o=r?r.isConcatSpreadable:void 0;t.exports=function(t){return a(t)||i(t)||!!(o&&t&&t[o])}},function(t,e){t.exports=function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}},function(t,e,n){var r=n(86),i=n(111),a=n(35),o=i?function(t,e){return i(t,"toString",{configurable:!0,enumerable:!1,value:r(e),writable:!0})}:a;t.exports=o},function(t,e){var n=Date.now;t.exports=function(t){var e=0,r=0;return function(){var i=n(),a=16-(i-r);if(r=i,a>0){if(++e>=800)return arguments[0]}else e=0;return t.apply(void 0,arguments)}}},function(t,e,n){var r=n(131),i=n(292),a=n(296),o=n(132),s=n(297),c=n(90);t.exports=function(t,e,n){var u=-1,l=i,h=t.length,f=!0,d=[],p=d;if(n)f=!1,l=a;else if(h>=200){var g=e?null:s(t);if(g)return c(g);f=!1,l=o,p=new r}else p=e?[]:d;t:for(;++u<h;){var y=t[u],v=e?e(y):y;if(y=n||0!==y?y:0,f&&v==v){for(var m=p.length;m--;)if(p[m]===v)continue t;e&&p.push(v),d.push(y)}else l(p,v,n)||(p!==d&&p.push(v),d.push(y))}return d}},function(t,e,n){var r=n(293);t.exports=function(t,e){return!!(null==t?0:t.length)&&r(t,e,0)>-1}},function(t,e,n){var r=n(145),i=n(294),a=n(295);t.exports=function(t,e,n){return e==e?a(t,e,n):r(t,i,n)}},function(t,e){t.exports=function(t){return t!=t}},function(t,e){t.exports=function(t,e,n){for(var r=n-1,i=t.length;++r<i;)if(t[r]===e)return r;return-1}},function(t,e){t.exports=function(t,e,n){for(var r=-1,i=null==t?0:t.length;++r<i;)if(n(e,t[r]))return!0;return!1}},function(t,e,n){var r=n(121),i=n(298),a=n(90),o=r&&1/a(new r([,-0]))[1]==1/0?function(t){return new r(t)}:i;t.exports=o},function(t,e){t.exports=function(){}},function(t,e,n){var r=n(66);t.exports=function(t,e){return r(e,(function(e){return t[e]}))}},function(t,e){t.exports="2.1.8"},function(t,e,n){var r=n(10),i=n(76);function a(t){return r.map(t.nodes(),(function(e){var n=t.node(e),i=t.parent(e),a={v:e};return r.isUndefined(n)||(a.value=n),r.isUndefined(i)||(a.parent=i),a}))}function o(t){return r.map(t.edges(),(function(e){var n=t.edge(e),i={v:e.v,w:e.w};return r.isUndefined(e.name)||(i.name=e.name),r.isUndefined(n)||(i.value=n),i}))}t.exports={write:function(t){var e={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:a(t),edges:o(t)};r.isUndefined(t.graph())||(e.value=r.clone(t.graph()));return e},read:function(t){var e=new i(t.options).setGraph(t.value);return r.each(t.nodes,(function(t){e.setNode(t.v,t.value),t.parent&&e.setParent(t.v,t.parent)})),r.each(t.edges,(function(t){e.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),e}}},function(t,e,n){t.exports={components:n(303),dijkstra:n(148),dijkstraAll:n(304),findCycles:n(305),floydWarshall:n(306),isAcyclic:n(307),postorder:n(308),preorder:n(309),prim:n(310),tarjan:n(150),topsort:n(151)}},function(t,e,n){var r=n(10);t.exports=function(t){var e,n={},i=[];function a(i){r.has(n,i)||(n[i]=!0,e.push(i),r.each(t.successors(i),a),r.each(t.predecessors(i),a))}return r.each(t.nodes(),(function(t){e=[],a(t),e.length&&i.push(e)})),i}},function(t,e,n){var r=n(148),i=n(10);t.exports=function(t,e,n){return i.transform(t.nodes(),(function(i,a){i[a]=r(t,a,e,n)}),{})}},function(t,e,n){var r=n(10),i=n(150);t.exports=function(t){return r.filter(i(t),(function(e){return e.length>1||1===e.length&&t.hasEdge(e[0],e[0])}))}},function(t,e,n){var r=n(10);t.exports=function(t,e,n){return function(t,e,n){var r={},i=t.nodes();return i.forEach((function(t){r[t]={},r[t][t]={distance:0},i.forEach((function(e){t!==e&&(r[t][e]={distance:Number.POSITIVE_INFINITY})})),n(t).forEach((function(n){var i=n.v===t?n.w:n.v,a=e(n);r[t][i]={distance:a,predecessor:t}}))})),i.forEach((function(t){var e=r[t];i.forEach((function(n){var a=r[n];i.forEach((function(n){var r=a[t],i=e[n],o=a[n],s=r.distance+i.distance;s<o.distance&&(o.distance=s,o.predecessor=i.predecessor)}))}))})),r}(t,e||i,n||function(e){return t.outEdges(e)})};var i=r.constant(1)},function(t,e,n){var r=n(151);t.exports=function(t){try{r(t)}catch(t){if(t instanceof r.CycleException)return!1;throw t}return!0}},function(t,e,n){var r=n(152);t.exports=function(t,e){return r(t,e,"post")}},function(t,e,n){var r=n(152);t.exports=function(t,e){return r(t,e,"pre")}},function(t,e,n){var r=n(10),i=n(76),a=n(149);t.exports=function(t,e){var n,o=new i,s={},c=new a;function u(t){var r=t.v===n?t.w:t.v,i=c.priority(r);if(void 0!==i){var a=e(t);a<i&&(s[r]=n,c.decrease(r,a))}}if(0===t.nodeCount())return o;r.each(t.nodes(),(function(t){c.add(t,Number.POSITIVE_INFINITY),o.setNode(t)})),c.decrease(t.nodes()[0],0);var l=!1;for(;c.size()>0;){if(n=c.removeMin(),r.has(s,n))o.setEdge(n,s[n]);else{if(l)throw new Error("Input graph is not connected: "+t);l=!0}t.nodeEdges(n).forEach(u)}return o}},function(t,e,n){var r;try{r=n(3)}catch(t){}r||(r=window.graphlib),t.exports=r},function(t,e,n){"use strict";var r=n(4),i=n(345),a=n(348),o=n(349),s=n(8).normalizeRanks,c=n(351),u=n(8).removeEmptyRanks,l=n(352),h=n(353),f=n(354),d=n(355),p=n(364),g=n(8),y=n(17).Graph;t.exports=function(t,e){var n=e&&e.debugTiming?g.time:g.notime;n("layout",(function(){var e=n(" buildLayoutGraph",(function(){return function(t){var e=new y({multigraph:!0,compound:!0}),n=C(t.graph());return e.setGraph(r.merge({},m,T(n,v),r.pick(n,b))),r.forEach(t.nodes(),(function(n){var i=C(t.node(n));e.setNode(n,r.defaults(T(i,x),_)),e.setParent(n,t.parent(n))})),r.forEach(t.edges(),(function(n){var i=C(t.edge(n));e.setEdge(n,r.merge({},w,T(i,k),r.pick(i,E)))})),e}(t)}));n(" runLayout",(function(){!function(t,e){e(" makeSpaceForEdgeLabels",(function(){!function(t){var e=t.graph();e.ranksep/=2,r.forEach(t.edges(),(function(n){var r=t.edge(n);r.minlen*=2,"c"!==r.labelpos.toLowerCase()&&("TB"===e.rankdir||"BT"===e.rankdir?r.width+=r.labeloffset:r.height+=r.labeloffset)}))}(t)})),e(" removeSelfEdges",(function(){!function(t){r.forEach(t.edges(),(function(e){if(e.v===e.w){var n=t.node(e.v);n.selfEdges||(n.selfEdges=[]),n.selfEdges.push({e:e,label:t.edge(e)}),t.removeEdge(e)}}))}(t)})),e(" acyclic",(function(){i.run(t)})),e(" nestingGraph.run",(function(){l.run(t)})),e(" rank",(function(){o(g.asNonCompoundGraph(t))})),e(" injectEdgeLabelProxies",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.width&&n.height){var r=t.node(e.v),i={rank:(t.node(e.w).rank-r.rank)/2+r.rank,e:e};g.addDummyNode(t,"edge-proxy",i,"_ep")}}))}(t)})),e(" removeEmptyRanks",(function(){u(t)})),e(" nestingGraph.cleanup",(function(){l.cleanup(t)})),e(" normalizeRanks",(function(){s(t)})),e(" assignRankMinMax",(function(){!function(t){var e=0;r.forEach(t.nodes(),(function(n){var i=t.node(n);i.borderTop&&(i.minRank=t.node(i.borderTop).rank,i.maxRank=t.node(i.borderBottom).rank,e=r.max(e,i.maxRank))})),t.graph().maxRank=e}(t)})),e(" removeEdgeLabelProxies",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);"edge-proxy"===n.dummy&&(t.edge(n.e).labelRank=n.rank,t.removeNode(e))}))}(t)})),e(" normalize.run",(function(){a.run(t)})),e(" parentDummyChains",(function(){c(t)})),e(" addBorderSegments",(function(){h(t)})),e(" order",(function(){d(t)})),e(" insertSelfEdges",(function(){!function(t){var e=g.buildLayerMatrix(t);r.forEach(e,(function(e){var n=0;r.forEach(e,(function(e,i){var a=t.node(e);a.order=i+n,r.forEach(a.selfEdges,(function(e){g.addDummyNode(t,"selfedge",{width:e.label.width,height:e.label.height,rank:a.rank,order:i+ ++n,e:e.e,label:e.label},"_se")})),delete a.selfEdges}))}))}(t)})),e(" adjustCoordinateSystem",(function(){f.adjust(t)})),e(" position",(function(){p(t)})),e(" positionSelfEdges",(function(){!function(t){r.forEach(t.nodes(),(function(e){var n=t.node(e);if("selfedge"===n.dummy){var r=t.node(n.e.v),i=r.x+r.width/2,a=r.y,o=n.x-i,s=r.height/2;t.setEdge(n.e,n.label),t.removeNode(e),n.label.points=[{x:i+2*o/3,y:a-s},{x:i+5*o/6,y:a-s},{x:i+o,y:a},{x:i+5*o/6,y:a+s},{x:i+2*o/3,y:a+s}],n.label.x=n.x,n.label.y=n.y}}))}(t)})),e(" removeBorderNodes",(function(){!function(t){r.forEach(t.nodes(),(function(e){if(t.children(e).length){var n=t.node(e),i=t.node(n.borderTop),a=t.node(n.borderBottom),o=t.node(r.last(n.borderLeft)),s=t.node(r.last(n.borderRight));n.width=Math.abs(s.x-o.x),n.height=Math.abs(a.y-i.y),n.x=o.x+n.width/2,n.y=i.y+n.height/2}})),r.forEach(t.nodes(),(function(e){"border"===t.node(e).dummy&&t.removeNode(e)}))}(t)})),e(" normalize.undo",(function(){a.undo(t)})),e(" fixupEdgeLabelCoords",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(r.has(n,"x"))switch("l"!==n.labelpos&&"r"!==n.labelpos||(n.width-=n.labeloffset),n.labelpos){case"l":n.x-=n.width/2+n.labeloffset;break;case"r":n.x+=n.width/2+n.labeloffset}}))}(t)})),e(" undoCoordinateSystem",(function(){f.undo(t)})),e(" translateGraph",(function(){!function(t){var e=Number.POSITIVE_INFINITY,n=0,i=Number.POSITIVE_INFINITY,a=0,o=t.graph(),s=o.marginx||0,c=o.marginy||0;function u(t){var r=t.x,o=t.y,s=t.width,c=t.height;e=Math.min(e,r-s/2),n=Math.max(n,r+s/2),i=Math.min(i,o-c/2),a=Math.max(a,o+c/2)}r.forEach(t.nodes(),(function(e){u(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.has(n,"x")&&u(n)})),e-=s,i-=c,r.forEach(t.nodes(),(function(n){var r=t.node(n);r.x-=e,r.y-=i})),r.forEach(t.edges(),(function(n){var a=t.edge(n);r.forEach(a.points,(function(t){t.x-=e,t.y-=i})),r.has(a,"x")&&(a.x-=e),r.has(a,"y")&&(a.y-=i)})),o.width=n-e+s,o.height=a-i+c}(t)})),e(" assignNodeIntersects",(function(){!function(t){r.forEach(t.edges(),(function(e){var n,r,i=t.edge(e),a=t.node(e.v),o=t.node(e.w);i.points?(n=i.points[0],r=i.points[i.points.length-1]):(i.points=[],n=o,r=a),i.points.unshift(g.intersectRect(a,n)),i.points.push(g.intersectRect(o,r))}))}(t)})),e(" reversePoints",(function(){!function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);n.reversed&&n.points.reverse()}))}(t)})),e(" acyclic.undo",(function(){i.undo(t)}))}(e,n)})),n(" updateInputGraph",(function(){!function(t,e){r.forEach(t.nodes(),(function(n){var r=t.node(n),i=e.node(n);r&&(r.x=i.x,r.y=i.y,e.children(n).length&&(r.width=i.width,r.height=i.height))})),r.forEach(t.edges(),(function(n){var i=t.edge(n),a=e.edge(n);i.points=a.points,r.has(a,"x")&&(i.x=a.x,i.y=a.y)})),t.graph().width=e.graph().width,t.graph().height=e.graph().height}(t,e)}))}))};var v=["nodesep","edgesep","ranksep","marginx","marginy"],m={ranksep:50,edgesep:20,nodesep:50,rankdir:"tb"},b=["acyclicer","ranker","rankdir","align"],x=["width","height"],_={width:0,height:0},k=["minlen","weight","width","height","labeloffset"],w={minlen:1,weight:1,width:0,height:0,labeloffset:10,labelpos:"r"},E=["labelpos"];function T(t,e){return r.mapValues(r.pick(t,e),Number)}function C(t){var e={};return r.forEach(t,(function(t,n){e[n.toLowerCase()]=t})),e}},function(t,e,n){var r=n(108);t.exports=function(t){return r(t,5)}},function(t,e,n){var r=n(315)(n(316));t.exports=r},function(t,e,n){var r=n(25),i=n(24),a=n(30);t.exports=function(t){return function(e,n,o){var s=Object(e);if(!i(e)){var c=r(n,3);e=a(e),n=function(t){return c(s[t],t,s)}}var u=t(e,n,o);return u>-1?s[c?e[u]:u]:void 0}}},function(t,e,n){var r=n(145),i=n(25),a=n(317),o=Math.max;t.exports=function(t,e,n){var s=null==t?0:t.length;if(!s)return-1;var c=null==n?0:a(n);return c<0&&(c=o(s+c,0)),r(t,i(e,3),c)}},function(t,e,n){var r=n(155);t.exports=function(t){var e=r(t),n=e%1;return e==e?n?e-n:e:0}},function(t,e,n){var r=n(11),i=n(42),a=/^\s+|\s+$/g,o=/^[-+]0x[0-9a-f]+$/i,s=/^0b[01]+$/i,c=/^0o[0-7]+$/i,u=parseInt;t.exports=function(t){if("number"==typeof t)return t;if(i(t))return NaN;if(r(t)){var e="function"==typeof t.valueOf?t.valueOf():t;t=r(e)?e+"":e}if("string"!=typeof t)return 0===t?t:+t;t=t.replace(a,"");var n=s.test(t);return n||c.test(t)?u(t.slice(2),n?2:8):o.test(t)?NaN:+t}},function(t,e,n){var r=n(89),i=n(127),a=n(40);t.exports=function(t,e){return null==t?t:r(t,i(e),a)}},function(t,e){t.exports=function(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}},function(t,e,n){var r=n(59),i=n(88),a=n(25);t.exports=function(t,e){var n={};return e=a(e,3),i(t,(function(t,i,a){r(n,i,e(t,i,a))})),n}},function(t,e,n){var r=n(95),i=n(323),a=n(35);t.exports=function(t){return t&&t.length?r(t,a,i):void 0}},function(t,e){t.exports=function(t,e){return t>e}},function(t,e,n){var r=n(325),i=n(328)((function(t,e,n){r(t,e,n)}));t.exports=i},function(t,e,n){var r=n(53),i=n(157),a=n(89),o=n(326),s=n(11),c=n(40),u=n(159);t.exports=function t(e,n,l,h,f){e!==n&&a(n,(function(a,c){if(f||(f=new r),s(a))o(e,n,c,l,t,h,f);else{var d=h?h(u(e,c),a,c+"",e,n,f):void 0;void 0===d&&(d=a),i(e,c,d)}}),c)}},function(t,e,n){var r=n(157),i=n(114),a=n(123),o=n(115),s=n(124),c=n(47),u=n(5),l=n(146),h=n(39),f=n(37),d=n(11),p=n(158),g=n(48),y=n(159),v=n(327);t.exports=function(t,e,n,m,b,x,_){var k=y(t,n),w=y(e,n),E=_.get(w);if(E)r(t,n,E);else{var T=x?x(k,w,n+"",t,e,_):void 0,C=void 0===T;if(C){var A=u(w),S=!A&&h(w),M=!A&&!S&&g(w);T=w,A||S||M?u(k)?T=k:l(k)?T=o(k):S?(C=!1,T=i(w,!0)):M?(C=!1,T=a(w,!0)):T=[]:p(w)||c(w)?(T=k,c(k)?T=v(k):d(k)&&!f(k)||(T=s(w))):C=!1}C&&(_.set(w,T),b(T,w,m,x,_),_.delete(w)),r(t,n,T)}}},function(t,e,n){var r=n(46),i=n(40);t.exports=function(t){return r(t,i(t))}},function(t,e,n){var r=n(67),i=n(68);t.exports=function(t){return r((function(e,n){var r=-1,a=n.length,o=a>1?n[a-1]:void 0,s=a>2?n[2]:void 0;for(o=t.length>3&&"function"==typeof o?(a--,o):void 0,s&&i(n[0],n[1],s)&&(o=a<3?void 0:o,a=1),e=Object(e);++r<a;){var c=n[r];c&&t(e,c,r,o)}return e}))}},function(t,e,n){var r=n(95),i=n(160),a=n(35);t.exports=function(t){return t&&t.length?r(t,a,i):void 0}},function(t,e,n){var r=n(95),i=n(25),a=n(160);t.exports=function(t,e){return t&&t.length?r(t,i(e,2),a):void 0}},function(t,e,n){var r=n(16);t.exports=function(){return r.Date.now()}},function(t,e,n){var r=n(333),i=n(136);t.exports=function(t,e){return r(t,e,(function(e,n){return i(t,n)}))}},function(t,e,n){var r=n(91),i=n(334),a=n(65);t.exports=function(t,e,n){for(var o=-1,s=e.length,c={};++o<s;){var u=e[o],l=r(t,u);n(l,u)&&i(c,a(u,t),l)}return c}},function(t,e,n){var r=n(58),i=n(65),a=n(60),o=n(11),s=n(49);t.exports=function(t,e,n,c){if(!o(t))return t;for(var u=-1,l=(e=i(e,t)).length,h=l-1,f=t;null!=f&&++u<l;){var d=s(e[u]),p=n;if(u!=h){var g=f[d];void 0===(p=c?c(g,d,f):void 0)&&(p=o(g)?g:a(e[u+1])?[]:{})}r(f,d,p),f=f[d]}return t}},function(t,e,n){var r=n(156),i=n(143),a=n(144);t.exports=function(t){return a(i(t,void 0,r),t+"")}},function(t,e,n){var r=n(337),i=n(68),a=n(155);t.exports=function(t){return function(e,n,o){return o&&"number"!=typeof o&&i(e,n,o)&&(n=o=void 0),e=a(e),void 0===n?(n=e,e=0):n=a(n),o=void 0===o?e<n?1:-1:a(o),r(e,n,o,t)}}},function(t,e){var n=Math.ceil,r=Math.max;t.exports=function(t,e,i,a){for(var o=-1,s=r(n((e-t)/(i||1)),0),c=Array(s);s--;)c[a?s:++o]=t,t+=i;return c}},function(t,e,n){var r=n(94),i=n(339),a=n(67),o=n(68),s=a((function(t,e){if(null==t)return[];var n=e.length;return n>1&&o(t,e[0],e[1])?e=[]:n>2&&o(e[0],e[1],e[2])&&(e=[e[0]]),i(t,r(e,1),[])}));t.exports=s},function(t,e,n){var r=n(66),i=n(25),a=n(141),o=n(340),s=n(61),c=n(341),u=n(35);t.exports=function(t,e,n){var l=-1;e=r(e.length?e:[u],s(i));var h=a(t,(function(t,n,i){return{criteria:r(e,(function(e){return e(t)})),index:++l,value:t}}));return o(h,(function(t,e){return c(t,e,n)}))}},function(t,e){t.exports=function(t,e){var n=t.length;for(t.sort(e);n--;)t[n]=t[n].value;return t}},function(t,e,n){var r=n(342);t.exports=function(t,e,n){for(var i=-1,a=t.criteria,o=e.criteria,s=a.length,c=n.length;++i<s;){var u=r(a[i],o[i]);if(u)return i>=c?u:u*("desc"==n[i]?-1:1)}return t.index-e.index}},function(t,e,n){var r=n(42);t.exports=function(t,e){if(t!==e){var n=void 0!==t,i=null===t,a=t==t,o=r(t),s=void 0!==e,c=null===e,u=e==e,l=r(e);if(!c&&!l&&!o&&t>e||o&&s&&u&&!c&&!l||i&&s&&u||!n&&u||!a)return 1;if(!i&&!o&&!l&&t<e||l&&n&&a&&!i&&!o||c&&n&&a||!s&&a||!u)return-1}return 0}},function(t,e,n){var r=n(58),i=n(344);t.exports=function(t,e){return i(t||[],e||[],r)}},function(t,e){t.exports=function(t,e,n){for(var r=-1,i=t.length,a=e.length,o={};++r<i;){var s=r<a?e[r]:void 0;n(o,t[r],s)}return o}},function(t,e,n){"use strict";var r=n(4),i=n(346);t.exports={run:function(t){var e="greedy"===t.graph().acyclicer?i(t,function(t){return function(e){return t.edge(e).weight}}(t)):function(t){var e=[],n={},i={};function a(o){r.has(i,o)||(i[o]=!0,n[o]=!0,r.forEach(t.outEdges(o),(function(t){r.has(n,t.w)?e.push(t):a(t.w)})),delete n[o])}return r.forEach(t.nodes(),a),e}(t);r.forEach(e,(function(e){var n=t.edge(e);t.removeEdge(e),n.forwardName=e.name,n.reversed=!0,t.setEdge(e.w,e.v,n,r.uniqueId("rev"))}))},undo:function(t){r.forEach(t.edges(),(function(e){var n=t.edge(e);if(n.reversed){t.removeEdge(e);var r=n.forwardName;delete n.reversed,delete n.forwardName,t.setEdge(e.w,e.v,n,r)}}))}}},function(t,e,n){var r=n(4),i=n(17).Graph,a=n(347);t.exports=function(t,e){if(t.nodeCount()<=1)return[];var n=function(t,e){var n=new i,o=0,s=0;r.forEach(t.nodes(),(function(t){n.setNode(t,{v:t,in:0,out:0})})),r.forEach(t.edges(),(function(t){var r=n.edge(t.v,t.w)||0,i=e(t),a=r+i;n.setEdge(t.v,t.w,a),s=Math.max(s,n.node(t.v).out+=i),o=Math.max(o,n.node(t.w).in+=i)}));var u=r.range(s+o+3).map((function(){return new a})),l=o+1;return r.forEach(n.nodes(),(function(t){c(u,l,n.node(t))})),{graph:n,buckets:u,zeroIdx:l}}(t,e||o),u=function(t,e,n){var r,i=[],a=e[e.length-1],o=e[0];for(;t.nodeCount();){for(;r=o.dequeue();)s(t,e,n,r);for(;r=a.dequeue();)s(t,e,n,r);if(t.nodeCount())for(var c=e.length-2;c>0;--c)if(r=e[c].dequeue()){i=i.concat(s(t,e,n,r,!0));break}}return i}(n.graph,n.buckets,n.zeroIdx);return r.flatten(r.map(u,(function(e){return t.outEdges(e.v,e.w)})),!0)};var o=r.constant(1);function s(t,e,n,i,a){var o=a?[]:void 0;return r.forEach(t.inEdges(i.v),(function(r){var i=t.edge(r),s=t.node(r.v);a&&o.push({v:r.v,w:r.w}),s.out-=i,c(e,n,s)})),r.forEach(t.outEdges(i.v),(function(r){var i=t.edge(r),a=r.w,o=t.node(a);o.in-=i,c(e,n,o)})),t.removeNode(i.v),o}function c(t,e,n){n.out?n.in?t[n.out-n.in+e].enqueue(n):t[t.length-1].enqueue(n):t[0].enqueue(n)}},function(t,e){function n(){var t={};t._next=t._prev=t,this._sentinel=t}function r(t){t._prev._next=t._next,t._next._prev=t._prev,delete t._next,delete t._prev}function i(t,e){if("_next"!==t&&"_prev"!==t)return e}t.exports=n,n.prototype.dequeue=function(){var t=this._sentinel,e=t._prev;if(e!==t)return r(e),e},n.prototype.enqueue=function(t){var e=this._sentinel;t._prev&&t._next&&r(t),t._next=e._next,e._next._prev=t,e._next=t,t._prev=e},n.prototype.toString=function(){for(var t=[],e=this._sentinel,n=e._prev;n!==e;)t.push(JSON.stringify(n,i)),n=n._prev;return"["+t.join(", ")+"]"}},function(t,e,n){"use strict";var r=n(4),i=n(8);t.exports={run:function(t){t.graph().dummyChains=[],r.forEach(t.edges(),(function(e){!function(t,e){var n,r,a,o=e.v,s=t.node(o).rank,c=e.w,u=t.node(c).rank,l=e.name,h=t.edge(e),f=h.labelRank;if(u===s+1)return;for(t.removeEdge(e),a=0,++s;s<u;++a,++s)h.points=[],r={width:0,height:0,edgeLabel:h,edgeObj:e,rank:s},n=i.addDummyNode(t,"edge",r,"_d"),s===f&&(r.width=h.width,r.height=h.height,r.dummy="edge-label",r.labelpos=h.labelpos),t.setEdge(o,n,{weight:h.weight},l),0===a&&t.graph().dummyChains.push(n),o=n;t.setEdge(o,c,{weight:h.weight},l)}(t,e)}))},undo:function(t){r.forEach(t.graph().dummyChains,(function(e){var n,r=t.node(e),i=r.edgeLabel;for(t.setEdge(r.edgeObj,i);r.dummy;)n=t.successors(e)[0],t.removeNode(e),i.points.push({x:r.x,y:r.y}),"edge-label"===r.dummy&&(i.x=r.x,i.y=r.y,i.width=r.width,i.height=r.height),e=n,r=t.node(e)}))}}},function(t,e,n){"use strict";var r=n(69).longestPath,i=n(164),a=n(350);t.exports=function(t){switch(t.graph().ranker){case"network-simplex":s(t);break;case"tight-tree":!function(t){r(t),i(t)}(t);break;case"longest-path":o(t);break;default:s(t)}};var o=r;function s(t){a(t)}},function(t,e,n){"use strict";var r=n(4),i=n(164),a=n(69).slack,o=n(69).longestPath,s=n(17).alg.preorder,c=n(17).alg.postorder,u=n(8).simplify;function l(t){t=u(t),o(t);var e,n=i(t);for(d(n),h(n,t);e=g(n);)v(n,t,e,y(n,t,e))}function h(t,e){var n=c(t,t.nodes());n=n.slice(0,n.length-1),r.forEach(n,(function(n){!function(t,e,n){var r=t.node(n).parent;t.edge(n,r).cutvalue=f(t,e,n)}(t,e,n)}))}function f(t,e,n){var i=t.node(n).parent,a=!0,o=e.edge(n,i),s=0;return o||(a=!1,o=e.edge(i,n)),s=o.weight,r.forEach(e.nodeEdges(n),(function(r){var o,c,u=r.v===n,l=u?r.w:r.v;if(l!==i){var h=u===a,f=e.edge(r).weight;if(s+=h?f:-f,o=n,c=l,t.hasEdge(o,c)){var d=t.edge(n,l).cutvalue;s+=h?-d:d}}})),s}function d(t,e){arguments.length<2&&(e=t.nodes()[0]),p(t,{},1,e)}function p(t,e,n,i,a){var o=n,s=t.node(i);return e[i]=!0,r.forEach(t.neighbors(i),(function(a){r.has(e,a)||(n=p(t,e,n,a,i))})),s.low=o,s.lim=n++,a?s.parent=a:delete s.parent,n}function g(t){return r.find(t.edges(),(function(e){return t.edge(e).cutvalue<0}))}function y(t,e,n){var i=n.v,o=n.w;e.hasEdge(i,o)||(i=n.w,o=n.v);var s=t.node(i),c=t.node(o),u=s,l=!1;s.lim>c.lim&&(u=c,l=!0);var h=r.filter(e.edges(),(function(e){return l===m(t,t.node(e.v),u)&&l!==m(t,t.node(e.w),u)}));return r.minBy(h,(function(t){return a(e,t)}))}function v(t,e,n,i){var a=n.v,o=n.w;t.removeEdge(a,o),t.setEdge(i.v,i.w,{}),d(t),h(t,e),function(t,e){var n=r.find(t.nodes(),(function(t){return!e.node(t).parent})),i=s(t,n);i=i.slice(1),r.forEach(i,(function(n){var r=t.node(n).parent,i=e.edge(n,r),a=!1;i||(i=e.edge(r,n),a=!0),e.node(n).rank=e.node(r).rank+(a?i.minlen:-i.minlen)}))}(t,e)}function m(t,e,n){return n.low<=e.lim&&e.lim<=n.lim}t.exports=l,l.initLowLimValues=d,l.initCutValues=h,l.calcCutValue=f,l.leaveEdge=g,l.enterEdge=y,l.exchangeEdges=v},function(t,e,n){var r=n(4);t.exports=function(t){var e=function(t){var e={},n=0;function i(a){var o=n;r.forEach(t.children(a),i),e[a]={low:o,lim:n++}}return r.forEach(t.children(),i),e}(t);r.forEach(t.graph().dummyChains,(function(n){for(var r=t.node(n),i=r.edgeObj,a=function(t,e,n,r){var i,a,o=[],s=[],c=Math.min(e[n].low,e[r].low),u=Math.max(e[n].lim,e[r].lim);i=n;do{i=t.parent(i),o.push(i)}while(i&&(e[i].low>c||u>e[i].lim));a=i,i=r;for(;(i=t.parent(i))!==a;)s.push(i);return{path:o.concat(s.reverse()),lca:a}}(t,e,i.v,i.w),o=a.path,s=a.lca,c=0,u=o[c],l=!0;n!==i.w;){if(r=t.node(n),l){for(;(u=o[c])!==s&&t.node(u).maxRank<r.rank;)c++;u===s&&(l=!1)}if(!l){for(;c<o.length-1&&t.node(u=o[c+1]).minRank<=r.rank;)c++;u=o[c]}t.setParent(n,u),n=t.successors(n)[0]}}))}},function(t,e,n){var r=n(4),i=n(8);t.exports={run:function(t){var e=i.addDummyNode(t,"root",{},"_root"),n=function(t){var e={};return r.forEach(t.children(),(function(n){!function n(i,a){var o=t.children(i);o&&o.length&&r.forEach(o,(function(t){n(t,a+1)}));e[i]=a}(n,1)})),e}(t),a=r.max(r.values(n))-1,o=2*a+1;t.graph().nestingRoot=e,r.forEach(t.edges(),(function(e){t.edge(e).minlen*=o}));var s=function(t){return r.reduce(t.edges(),(function(e,n){return e+t.edge(n).weight}),0)}(t)+1;r.forEach(t.children(),(function(c){!function t(e,n,a,o,s,c,u){var l=e.children(u);if(!l.length)return void(u!==n&&e.setEdge(n,u,{weight:0,minlen:a}));var h=i.addBorderNode(e,"_bt"),f=i.addBorderNode(e,"_bb"),d=e.node(u);e.setParent(h,u),d.borderTop=h,e.setParent(f,u),d.borderBottom=f,r.forEach(l,(function(r){t(e,n,a,o,s,c,r);var i=e.node(r),l=i.borderTop?i.borderTop:r,d=i.borderBottom?i.borderBottom:r,p=i.borderTop?o:2*o,g=l!==d?1:s-c[u]+1;e.setEdge(h,l,{weight:p,minlen:g,nestingEdge:!0}),e.setEdge(d,f,{weight:p,minlen:g,nestingEdge:!0})})),e.parent(u)||e.setEdge(n,h,{weight:0,minlen:s+c[u]})}(t,e,o,s,a,n,c)})),t.graph().nodeRankFactor=o},cleanup:function(t){var e=t.graph();t.removeNode(e.nestingRoot),delete e.nestingRoot,r.forEach(t.edges(),(function(e){t.edge(e).nestingEdge&&t.removeEdge(e)}))}}},function(t,e,n){var r=n(4),i=n(8);function a(t,e,n,r,a,o){var s={width:0,height:0,rank:o,borderType:e},c=a[e][o-1],u=i.addDummyNode(t,"border",s,n);a[e][o]=u,t.setParent(u,r),c&&t.setEdge(c,u,{weight:1})}t.exports=function(t){r.forEach(t.children(),(function e(n){var i=t.children(n),o=t.node(n);if(i.length&&r.forEach(i,e),r.has(o,"minRank")){o.borderLeft=[],o.borderRight=[];for(var s=o.minRank,c=o.maxRank+1;s<c;++s)a(t,"borderLeft","_bl",n,o,s),a(t,"borderRight","_br",n,o,s)}}))}},function(t,e,n){"use strict";var r=n(4);function i(t){r.forEach(t.nodes(),(function(e){a(t.node(e))})),r.forEach(t.edges(),(function(e){a(t.edge(e))}))}function a(t){var e=t.width;t.width=t.height,t.height=e}function o(t){t.y=-t.y}function s(t){var e=t.x;t.x=t.y,t.y=e}t.exports={adjust:function(t){var e=t.graph().rankdir.toLowerCase();"lr"!==e&&"rl"!==e||i(t)},undo:function(t){var e=t.graph().rankdir.toLowerCase();"bt"!==e&&"rl"!==e||function(t){r.forEach(t.nodes(),(function(e){o(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,o),r.has(n,"y")&&o(n)}))}(t);"lr"!==e&&"rl"!==e||(!function(t){r.forEach(t.nodes(),(function(e){s(t.node(e))})),r.forEach(t.edges(),(function(e){var n=t.edge(e);r.forEach(n.points,s),r.has(n,"x")&&s(n)}))}(t),i(t))}}},function(t,e,n){"use strict";var r=n(4),i=n(356),a=n(357),o=n(358),s=n(362),c=n(363),u=n(17).Graph,l=n(8);function h(t,e,n){return r.map(e,(function(e){return s(t,e,n)}))}function f(t,e){var n=new u;r.forEach(t,(function(t){var i=t.graph().root,a=o(t,i,n,e);r.forEach(a.vs,(function(e,n){t.node(e).order=n})),c(t,n,a.vs)}))}function d(t,e){r.forEach(e,(function(e){r.forEach(e,(function(e,n){t.node(e).order=n}))}))}t.exports=function(t){var e=l.maxRank(t),n=h(t,r.range(1,e+1),"inEdges"),o=h(t,r.range(e-1,-1,-1),"outEdges"),s=i(t);d(t,s);for(var c,u=Number.POSITIVE_INFINITY,p=0,g=0;g<4;++p,++g){f(p%2?n:o,p%4>=2),s=l.buildLayerMatrix(t);var y=a(t,s);y<u&&(g=0,c=r.cloneDeep(s),u=y)}d(t,c)}},function(t,e,n){"use strict";var r=n(4);t.exports=function(t){var e={},n=r.filter(t.nodes(),(function(e){return!t.children(e).length})),i=r.max(r.map(n,(function(e){return t.node(e).rank}))),a=r.map(r.range(i+1),(function(){return[]}));var o=r.sortBy(n,(function(e){return t.node(e).rank}));return r.forEach(o,(function n(i){if(r.has(e,i))return;e[i]=!0;var o=t.node(i);a[o.rank].push(i),r.forEach(t.successors(i),n)})),a}},function(t,e,n){"use strict";var r=n(4);function i(t,e,n){for(var i=r.zipObject(n,r.map(n,(function(t,e){return e}))),a=r.flatten(r.map(e,(function(e){return r.sortBy(r.map(t.outEdges(e),(function(e){return{pos:i[e.w],weight:t.edge(e).weight}})),"pos")})),!0),o=1;o<n.length;)o<<=1;var s=2*o-1;o-=1;var c=r.map(new Array(s),(function(){return 0})),u=0;return r.forEach(a.forEach((function(t){var e=t.pos+o;c[e]+=t.weight;for(var n=0;e>0;)e%2&&(n+=c[e+1]),c[e=e-1>>1]+=t.weight;u+=t.weight*n}))),u}t.exports=function(t,e){for(var n=0,r=1;r<e.length;++r)n+=i(t,e[r-1],e[r]);return n}},function(t,e,n){var r=n(4),i=n(359),a=n(360),o=n(361);t.exports=function t(e,n,s,c){var u=e.children(n),l=e.node(n),h=l?l.borderLeft:void 0,f=l?l.borderRight:void 0,d={};h&&(u=r.filter(u,(function(t){return t!==h&&t!==f})));var p=i(e,u);r.forEach(p,(function(n){if(e.children(n.v).length){var i=t(e,n.v,s,c);d[n.v]=i,r.has(i,"barycenter")&&(a=n,o=i,r.isUndefined(a.barycenter)?(a.barycenter=o.barycenter,a.weight=o.weight):(a.barycenter=(a.barycenter*a.weight+o.barycenter*o.weight)/(a.weight+o.weight),a.weight+=o.weight))}var a,o}));var g=a(p,s);!function(t,e){r.forEach(t,(function(t){t.vs=r.flatten(t.vs.map((function(t){return e[t]?e[t].vs:t})),!0)}))}(g,d);var y=o(g,c);if(h&&(y.vs=r.flatten([h,y.vs,f],!0),e.predecessors(h).length)){var v=e.node(e.predecessors(h)[0]),m=e.node(e.predecessors(f)[0]);r.has(y,"barycenter")||(y.barycenter=0,y.weight=0),y.barycenter=(y.barycenter*y.weight+v.order+m.order)/(y.weight+2),y.weight+=2}return y}},function(t,e,n){var r=n(4);t.exports=function(t,e){return r.map(e,(function(e){var n=t.inEdges(e);if(n.length){var i=r.reduce(n,(function(e,n){var r=t.edge(n),i=t.node(n.v);return{sum:e.sum+r.weight*i.order,weight:e.weight+r.weight}}),{sum:0,weight:0});return{v:e,barycenter:i.sum/i.weight,weight:i.weight}}return{v:e}}))}},function(t,e,n){"use strict";var r=n(4);t.exports=function(t,e){var n={};return r.forEach(t,(function(t,e){var i=n[t.v]={indegree:0,in:[],out:[],vs:[t.v],i:e};r.isUndefined(t.barycenter)||(i.barycenter=t.barycenter,i.weight=t.weight)})),r.forEach(e.edges(),(function(t){var e=n[t.v],i=n[t.w];r.isUndefined(e)||r.isUndefined(i)||(i.indegree++,e.out.push(n[t.w]))})),function(t){var e=[];function n(t){return function(e){e.merged||(r.isUndefined(e.barycenter)||r.isUndefined(t.barycenter)||e.barycenter>=t.barycenter)&&function(t,e){var n=0,r=0;t.weight&&(n+=t.barycenter*t.weight,r+=t.weight);e.weight&&(n+=e.barycenter*e.weight,r+=e.weight);t.vs=e.vs.concat(t.vs),t.barycenter=n/r,t.weight=r,t.i=Math.min(e.i,t.i),e.merged=!0}(t,e)}}function i(e){return function(n){n.in.push(e),0==--n.indegree&&t.push(n)}}for(;t.length;){var a=t.pop();e.push(a),r.forEach(a.in.reverse(),n(a)),r.forEach(a.out,i(a))}return r.map(r.filter(e,(function(t){return!t.merged})),(function(t){return r.pick(t,["vs","i","barycenter","weight"])}))}(r.filter(n,(function(t){return!t.indegree})))}},function(t,e,n){var r=n(4),i=n(8);function a(t,e,n){for(var i;e.length&&(i=r.last(e)).i<=n;)e.pop(),t.push(i.vs),n++;return n}t.exports=function(t,e){var n=i.partition(t,(function(t){return r.has(t,"barycenter")})),o=n.lhs,s=r.sortBy(n.rhs,(function(t){return-t.i})),c=[],u=0,l=0,h=0;o.sort((f=!!e,function(t,e){return t.barycenter<e.barycenter?-1:t.barycenter>e.barycenter?1:f?e.i-t.i:t.i-e.i})),h=a(c,s,h),r.forEach(o,(function(t){h+=t.vs.length,c.push(t.vs),u+=t.barycenter*t.weight,l+=t.weight,h=a(c,s,h)}));var f;var d={vs:r.flatten(c,!0)};l&&(d.barycenter=u/l,d.weight=l);return d}},function(t,e,n){var r=n(4),i=n(17).Graph;t.exports=function(t,e,n){var a=function(t){var e;for(;t.hasNode(e=r.uniqueId("_root")););return e}(t),o=new i({compound:!0}).setGraph({root:a}).setDefaultNodeLabel((function(e){return t.node(e)}));return r.forEach(t.nodes(),(function(i){var s=t.node(i),c=t.parent(i);(s.rank===e||s.minRank<=e&&e<=s.maxRank)&&(o.setNode(i),o.setParent(i,c||a),r.forEach(t[n](i),(function(e){var n=e.v===i?e.w:e.v,a=o.edge(n,i),s=r.isUndefined(a)?0:a.weight;o.setEdge(n,i,{weight:t.edge(e).weight+s})})),r.has(s,"minRank")&&o.setNode(i,{borderLeft:s.borderLeft[e],borderRight:s.borderRight[e]}))})),o}},function(t,e,n){var r=n(4);t.exports=function(t,e,n){var i,a={};r.forEach(n,(function(n){for(var r,o,s=t.parent(n);s;){if((r=t.parent(s))?(o=a[r],a[r]=s):(o=i,i=s),o&&o!==s)return void e.setEdge(o,s);s=r}}))}},function(t,e,n){"use strict";var r=n(4),i=n(8),a=n(365).positionX;t.exports=function(t){(function(t){var e=i.buildLayerMatrix(t),n=t.graph().ranksep,a=0;r.forEach(e,(function(e){var i=r.max(r.map(e,(function(e){return t.node(e).height})));r.forEach(e,(function(e){t.node(e).y=a+i/2})),a+=i+n}))})(t=i.asNonCompoundGraph(t)),r.forEach(a(t),(function(e,n){t.node(n).x=e}))}},function(t,e,n){"use strict";var r=n(4),i=n(17).Graph,a=n(8);function o(t,e){var n={};return r.reduce(e,(function(e,i){var a=0,o=0,s=e.length,u=r.last(i);return r.forEach(i,(function(e,l){var h=function(t,e){if(t.node(e).dummy)return r.find(t.predecessors(e),(function(e){return t.node(e).dummy}))}(t,e),f=h?t.node(h).order:s;(h||e===u)&&(r.forEach(i.slice(o,l+1),(function(e){r.forEach(t.predecessors(e),(function(r){var i=t.node(r),o=i.order;!(o<a||f<o)||i.dummy&&t.node(e).dummy||c(n,r,e)}))})),o=l+1,a=f)})),i})),n}function s(t,e){var n={};function i(e,i,a,o,s){var u;r.forEach(r.range(i,a),(function(i){u=e[i],t.node(u).dummy&&r.forEach(t.predecessors(u),(function(e){var r=t.node(e);r.dummy&&(r.order<o||r.order>s)&&c(n,e,u)}))}))}return r.reduce(e,(function(e,n){var a,o=-1,s=0;return r.forEach(n,(function(r,c){if("border"===t.node(r).dummy){var u=t.predecessors(r);u.length&&(a=t.node(u[0]).order,i(n,s,c,o,a),s=c,o=a)}i(n,s,n.length,a,e.length)})),n})),n}function c(t,e,n){if(e>n){var r=e;e=n,n=r}var i=t[e];i||(t[e]=i={}),i[n]=!0}function u(t,e,n){if(e>n){var i=e;e=n,n=i}return r.has(t[e],n)}function l(t,e,n,i){var a={},o={},s={};return r.forEach(e,(function(t){r.forEach(t,(function(t,e){a[t]=t,o[t]=t,s[t]=e}))})),r.forEach(e,(function(t){var e=-1;r.forEach(t,(function(t){var c=i(t);if(c.length)for(var l=((c=r.sortBy(c,(function(t){return s[t]}))).length-1)/2,h=Math.floor(l),f=Math.ceil(l);h<=f;++h){var d=c[h];o[t]===t&&e<s[d]&&!u(n,t,d)&&(o[d]=t,o[t]=a[t]=a[d],e=s[d])}}))})),{root:a,align:o}}function h(t,e,n,a,o){var s={},c=function(t,e,n,a){var o=new i,s=t.graph(),c=function(t,e,n){return function(i,a,o){var s,c=i.node(a),u=i.node(o),l=0;if(l+=c.width/2,r.has(c,"labelpos"))switch(c.labelpos.toLowerCase()){case"l":s=-c.width/2;break;case"r":s=c.width/2}if(s&&(l+=n?s:-s),s=0,l+=(c.dummy?e:t)/2,l+=(u.dummy?e:t)/2,l+=u.width/2,r.has(u,"labelpos"))switch(u.labelpos.toLowerCase()){case"l":s=u.width/2;break;case"r":s=-u.width/2}return s&&(l+=n?s:-s),s=0,l}}(s.nodesep,s.edgesep,a);return r.forEach(e,(function(e){var i;r.forEach(e,(function(e){var r=n[e];if(o.setNode(r),i){var a=n[i],s=o.edge(a,r);o.setEdge(a,r,Math.max(c(t,e,i),s||0))}i=e}))})),o}(t,e,n,o),u=o?"borderLeft":"borderRight";function l(t,e){for(var n=c.nodes(),r=n.pop(),i={};r;)i[r]?t(r):(i[r]=!0,n.push(r),n=n.concat(e(r))),r=n.pop()}return l((function(t){s[t]=c.inEdges(t).reduce((function(t,e){return Math.max(t,s[e.v]+c.edge(e))}),0)}),c.predecessors.bind(c)),l((function(e){var n=c.outEdges(e).reduce((function(t,e){return Math.min(t,s[e.w]-c.edge(e))}),Number.POSITIVE_INFINITY),r=t.node(e);n!==Number.POSITIVE_INFINITY&&r.borderType!==u&&(s[e]=Math.max(s[e],n))}),c.successors.bind(c)),r.forEach(a,(function(t){s[t]=s[n[t]]})),s}function f(t,e){return r.minBy(r.values(e),(function(e){var n=Number.NEGATIVE_INFINITY,i=Number.POSITIVE_INFINITY;return r.forIn(e,(function(e,r){var a=function(t,e){return t.node(e).width}(t,r)/2;n=Math.max(e+a,n),i=Math.min(e-a,i)})),n-i}))}function d(t,e){var n=r.values(e),i=r.min(n),a=r.max(n);r.forEach(["u","d"],(function(n){r.forEach(["l","r"],(function(o){var s,c=n+o,u=t[c];if(u!==e){var l=r.values(u);(s="l"===o?i-r.min(l):a-r.max(l))&&(t[c]=r.mapValues(u,(function(t){return t+s})))}}))}))}function p(t,e){return r.mapValues(t.ul,(function(n,i){if(e)return t[e.toLowerCase()][i];var a=r.sortBy(r.map(t,i));return(a[1]+a[2])/2}))}t.exports={positionX:function(t){var e,n=a.buildLayerMatrix(t),i=r.merge(o(t,n),s(t,n)),c={};r.forEach(["u","d"],(function(a){e="u"===a?n:r.values(n).reverse(),r.forEach(["l","r"],(function(n){"r"===n&&(e=r.map(e,(function(t){return r.values(t).reverse()})));var o=("u"===a?t.predecessors:t.successors).bind(t),s=l(t,e,i,o),u=h(t,e,s.root,s.align,"r"===n);"r"===n&&(u=r.mapValues(u,(function(t){return-t}))),c[a+n]=u}))}));var u=f(t,c);return d(c,u),p(c,t.graph().align)},findType1Conflicts:o,findType2Conflicts:s,addConflict:c,hasConflict:u,verticalAlignment:l,horizontalCompaction:h,alignCoordinates:d,findSmallestWidthAlignment:f,balance:p}},function(t,e,n){var r=n(4),i=n(8),a=n(17).Graph;t.exports={debugOrdering:function(t){var e=i.buildLayerMatrix(t),n=new a({compound:!0,multigraph:!0}).setGraph({});return r.forEach(t.nodes(),(function(e){n.setNode(e,{label:e}),n.setParent(e,"layer"+t.node(e).rank)})),r.forEach(t.edges(),(function(t){n.setEdge(t.v,t.w,{},t.name)})),r.forEach(e,(function(t,e){var i="layer"+e;n.setNode(i,{rank:"same"}),r.reduce(t,(function(t,e){return n.setEdge(t,e,{style:"invis"}),e}))})),n}}},function(t,e){t.exports="0.8.5"},function(t,e,n){t.exports={node:n(165),circle:n(166),ellipse:n(96),polygon:n(167),rect:n(168)}},function(t,e){function n(t,e){return t*e>0}t.exports=function(t,e,r,i){var a,o,s,c,u,l,h,f,d,p,g,y,v;if(a=e.y-t.y,s=t.x-e.x,u=e.x*t.y-t.x*e.y,d=a*r.x+s*r.y+u,p=a*i.x+s*i.y+u,0!==d&&0!==p&&n(d,p))return;if(o=i.y-r.y,c=r.x-i.x,l=i.x*r.y-r.x*i.y,h=o*t.x+c*t.y+l,f=o*e.x+c*e.y+l,0!==h&&0!==f&&n(h,f))return;if(0===(g=a*c-o*s))return;return y=Math.abs(g/2),{x:(v=s*l-c*u)<0?(v-y)/g:(v+y)/g,y:(v=o*u-a*l)<0?(v-y)/g:(v+y)/g}}},function(t,e,n){var r=n(43),i=n(31),a=n(153).layout;t.exports=function(){var t=n(371),e=n(374),i=n(375),u=n(376),l=n(377),h=n(378),f=n(379),d=n(380),p=n(381),g=function(n,g){!function(t){t.nodes().forEach((function(e){var n=t.node(e);r.has(n,"label")||t.children(e).length||(n.label=e),r.has(n,"paddingX")&&r.defaults(n,{paddingLeft:n.paddingX,paddingRight:n.paddingX}),r.has(n,"paddingY")&&r.defaults(n,{paddingTop:n.paddingY,paddingBottom:n.paddingY}),r.has(n,"padding")&&r.defaults(n,{paddingLeft:n.padding,paddingRight:n.padding,paddingTop:n.padding,paddingBottom:n.padding}),r.defaults(n,o),r.each(["paddingLeft","paddingRight","paddingTop","paddingBottom"],(function(t){n[t]=Number(n[t])})),r.has(n,"width")&&(n._prevWidth=n.width),r.has(n,"height")&&(n._prevHeight=n.height)})),t.edges().forEach((function(e){var n=t.edge(e);r.has(n,"label")||(n.label=""),r.defaults(n,s)}))}(g);var y=c(n,"output"),v=c(y,"clusters"),m=c(y,"edgePaths"),b=i(c(y,"edgeLabels"),g),x=t(c(y,"nodes"),g,d);a(g),l(x,g),h(b,g),u(m,g,p);var _=e(v,g);f(_,g),function(t){r.each(t.nodes(),(function(e){var n=t.node(e);r.has(n,"_prevWidth")?n.width=n._prevWidth:delete n.width,r.has(n,"_prevHeight")?n.height=n._prevHeight:delete n.height,delete n._prevWidth,delete n._prevHeight}))}(g)};return g.createNodes=function(e){return arguments.length?(t=e,g):t},g.createClusters=function(t){return arguments.length?(e=t,g):e},g.createEdgeLabels=function(t){return arguments.length?(i=t,g):i},g.createEdgePaths=function(t){return arguments.length?(u=t,g):u},g.shapes=function(t){return arguments.length?(d=t,g):d},g.arrows=function(t){return arguments.length?(p=t,g):p},g};var o={paddingLeft:10,paddingRight:10,paddingTop:10,paddingBottom:10,rx:0,ry:0,shape:"rect"},s={arrowhead:"normal",curve:i.curveLinear};function c(t,e){var n=t.select("g."+e);return n.empty()&&(n=t.append("g").attr("class",e)),n}},function(t,e,n){"use strict";var r=n(43),i=n(97),a=n(12),o=n(31);t.exports=function(t,e,n){var s,c=e.nodes().filter((function(t){return!a.isSubgraph(e,t)})),u=t.selectAll("g.node").data(c,(function(t){return t})).classed("update",!0);u.exit().remove(),u.enter().append("g").attr("class","node").style("opacity",0),(u=t.selectAll("g.node")).each((function(t){var s=e.node(t),c=o.select(this);a.applyClass(c,s.class,(c.classed("update")?"update ":"")+"node"),c.select("g.label").remove();var u=c.append("g").attr("class","label"),l=i(u,s),h=n[s.shape],f=r.pick(l.node().getBBox(),"width","height");s.elem=this,s.id&&c.attr("id",s.id),s.labelId&&u.attr("id",s.labelId),r.has(s,"width")&&(f.width=s.width),r.has(s,"height")&&(f.height=s.height),f.width+=s.paddingLeft+s.paddingRight,f.height+=s.paddingTop+s.paddingBottom,u.attr("transform","translate("+(s.paddingLeft-s.paddingRight)/2+","+(s.paddingTop-s.paddingBottom)/2+")");var d=o.select(this);d.select(".label-container").remove();var p=h(d,f,s).classed("label-container",!0);a.applyStyle(p,s.style);var g=p.node().getBBox();s.width=g.width,s.height=g.height})),s=u.exit?u.exit():u.selectAll(null);return a.applyTransition(s,e).style("opacity",0).remove(),u}},function(t,e,n){var r=n(12);t.exports=function(t,e){for(var n=t.append("text"),i=function(t){for(var e,n="",r=!1,i=0;i<t.length;++i)if(e=t[i],r){switch(e){case"n":n+="\n";break;default:n+=e}r=!1}else"\\"===e?r=!0:n+=e;return n}(e.label).split("\n"),a=0;a<i.length;a++)n.append("tspan").attr("xml:space","preserve").attr("dy","1em").attr("x","1").text(i[a]);return r.applyStyle(n,e.labelStyle),n}},function(t,e,n){var r=n(12);t.exports=function(t,e){var n=t;return n.node().appendChild(e.label),r.applyStyle(n,e.labelStyle),n}},function(t,e,n){var r=n(12),i=n(31),a=n(97);t.exports=function(t,e){var n,o=e.nodes().filter((function(t){return r.isSubgraph(e,t)})),s=t.selectAll("g.cluster").data(o,(function(t){return t}));s.selectAll("*").remove(),s.enter().append("g").attr("class","cluster").attr("id",(function(t){return e.node(t).id})).style("opacity",0),s=t.selectAll("g.cluster"),r.applyTransition(s,e).style("opacity",1),s.each((function(t){var n=e.node(t),r=i.select(this);i.select(this).append("rect");var o=r.append("g").attr("class","label");a(o,n,n.clusterLabelPos)})),s.selectAll("rect").each((function(t){var n=e.node(t),a=i.select(this);r.applyStyle(a,n.style)})),n=s.exit?s.exit():s.selectAll(null);return r.applyTransition(n,e).style("opacity",0).remove(),s}},function(t,e,n){"use strict";var r=n(43),i=n(97),a=n(12),o=n(31);t.exports=function(t,e){var n,s=t.selectAll("g.edgeLabel").data(e.edges(),(function(t){return a.edgeToId(t)})).classed("update",!0);s.exit().remove(),s.enter().append("g").classed("edgeLabel",!0).style("opacity",0),(s=t.selectAll("g.edgeLabel")).each((function(t){var n=o.select(this);n.select(".label").remove();var a=e.edge(t),s=i(n,e.edge(t),0,0).classed("label",!0),c=s.node().getBBox();a.labelId&&s.attr("id",a.labelId),r.has(a,"width")||(a.width=c.width),r.has(a,"height")||(a.height=c.height)})),n=s.exit?s.exit():s.selectAll(null);return a.applyTransition(n,e).style("opacity",0).remove(),s}},function(t,e,n){"use strict";var r=n(43),i=n(165),a=n(12),o=n(31);function s(t,e){var n=(o.line||o.svg.line)().x((function(t){return t.x})).y((function(t){return t.y}));return(n.curve||n.interpolate)(t.curve),n(e)}t.exports=function(t,e,n){var c=t.selectAll("g.edgePath").data(e.edges(),(function(t){return a.edgeToId(t)})).classed("update",!0),u=function(t,e){var n=t.enter().append("g").attr("class","edgePath").style("opacity",0);return n.append("path").attr("class","path").attr("d",(function(t){var n=e.edge(t),i=e.node(t.v).elem;return s(n,r.range(n.points.length).map((function(){return e=(t=i).getBBox(),{x:(n=t.ownerSVGElement.getScreenCTM().inverse().multiply(t.getScreenCTM()).translate(e.width/2,e.height/2)).e,y:n.f};var t,e,n})))})),n.append("defs"),n}(c,e);!function(t,e){var n=t.exit();a.applyTransition(n,e).style("opacity",0).remove()}(c,e);var l=void 0!==c.merge?c.merge(u):c;return a.applyTransition(l,e).style("opacity",1),l.each((function(t){var n=o.select(this),r=e.edge(t);r.elem=this,r.id&&n.attr("id",r.id),a.applyClass(n,r.class,(n.classed("update")?"update ":"")+"edgePath")})),l.selectAll("path.path").each((function(t){var n=e.edge(t);n.arrowheadId=r.uniqueId("arrowhead");var c=o.select(this).attr("marker-end",(function(){return"url("+(t=location.href,e=n.arrowheadId,t.split("#")[0]+"#"+e)+")";var t,e})).style("fill","none");a.applyTransition(c,e).attr("d",(function(t){return function(t,e){var n=t.edge(e),r=t.node(e.v),a=t.node(e.w),o=n.points.slice(1,n.points.length-1);return o.unshift(i(r,o[0])),o.push(i(a,o[o.length-1])),s(n,o)}(e,t)})),a.applyStyle(c,n.style)})),l.selectAll("defs *").remove(),l.selectAll("defs").each((function(t){var r=e.edge(t);(0,n[r.arrowhead])(o.select(this),r.arrowheadId,r,"arrowhead")})),l}},function(t,e,n){"use strict";var r=n(12),i=n(31);t.exports=function(t,e){function n(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}t.filter((function(){return!i.select(this).classed("update")})).attr("transform",n),r.applyTransition(t,e).style("opacity",1).attr("transform",n)}},function(t,e,n){"use strict";var r=n(12),i=n(31),a=n(43);t.exports=function(t,e){function n(t){var n=e.edge(t);return a.has(n,"x")?"translate("+n.x+","+n.y+")":""}t.filter((function(){return!i.select(this).classed("update")})).attr("transform",n),r.applyTransition(t,e).style("opacity",1).attr("transform",n)}},function(t,e,n){"use strict";var r=n(12),i=n(31);t.exports=function(t,e){var n=t.filter((function(){return!i.select(this).classed("update")}));function a(t){var n=e.node(t);return"translate("+n.x+","+n.y+")"}n.attr("transform",a),r.applyTransition(t,e).style("opacity",1).attr("transform",a),r.applyTransition(n.selectAll("rect"),e).attr("width",(function(t){return e.node(t).width})).attr("height",(function(t){return e.node(t).height})).attr("x",(function(t){return-e.node(t).width/2})).attr("y",(function(t){return-e.node(t).height/2}))}},function(t,e,n){"use strict";var r=n(168),i=n(96),a=n(166),o=n(167);t.exports={rect:function(t,e,n){var i=t.insert("rect",":first-child").attr("rx",n.rx).attr("ry",n.ry).attr("x",-e.width/2).attr("y",-e.height/2).attr("width",e.width).attr("height",e.height);return n.intersect=function(t){return r(n,t)},i},ellipse:function(t,e,n){var r=e.width/2,a=e.height/2,o=t.insert("ellipse",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("rx",r).attr("ry",a);return n.intersect=function(t){return i(n,r,a,t)},o},circle:function(t,e,n){var r=Math.max(e.width,e.height)/2,i=t.insert("circle",":first-child").attr("x",-e.width/2).attr("y",-e.height/2).attr("r",r);return n.intersect=function(t){return a(n,r,t)},i},diamond:function(t,e,n){var r=e.width*Math.SQRT2/2,i=e.height*Math.SQRT2/2,a=[{x:0,y:-i},{x:-r,y:0},{x:0,y:i},{x:r,y:0}],s=t.insert("polygon",":first-child").attr("points",a.map((function(t){return t.x+","+t.y})).join(" "));return n.intersect=function(t){return o(n,a,t)},s}}},function(t,e,n){var r=n(12);function i(t,e,n,i){var a=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").style("stroke-width",1).style("stroke-dasharray","1,0");r.applyStyle(a,n[i+"Style"]),n[i+"Class"]&&a.attr("class",n[i+"Class"])}t.exports={default:i,normal:i,vee:function(t,e,n,i){var a=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 L 4 5 z").style("stroke-width",1).style("stroke-dasharray","1,0");r.applyStyle(a,n[i+"Style"]),n[i+"Class"]&&a.attr("class",n[i+"Class"])},undirected:function(t,e,n,i){var a=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 5 L 10 5").style("stroke-width",1).style("stroke-dasharray","1,0");r.applyStyle(a,n[i+"Style"]),n[i+"Class"]&&a.attr("class",n[i+"Class"])}}},function(t,e){t.exports="0.6.4"},function(t,e,n){"use strict";var r;function i(t){return r=r||document.createElement("div"),t=escape(t).replace(/%26/g,"&").replace(/%23/g,"#").replace(/%3B/g,";"),r.innerHTML=t,unescape(r.textContent)}n.r(e);var a=n(169),o=n.n(a),s=n(0),c=n(44),u=n(23),l=n.n(u),h={debug:1,info:2,warn:3,error:4,fatal:5},f={debug:function(){},info:function(){},warn:function(){},error:function(){},fatal:function(){}},d=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"fatal";isNaN(t)&&(t=t.toLowerCase(),void 0!==h[t]&&(t=h[t])),f.trace=function(){},f.debug=function(){},f.info=function(){},f.warn=function(){},f.error=function(){},f.fatal=function(){},t<=h.fatal&&(f.fatal=console.error?console.error.bind(console,p("FATAL"),"color: orange"):console.log.bind(console,"",p("FATAL"))),t<=h.error&&(f.error=console.error?console.error.bind(console,p("ERROR"),"color: orange"):console.log.bind(console,"",p("ERROR"))),t<=h.warn&&(f.warn=console.warn?console.warn.bind(console,p("WARN"),"color: orange"):console.log.bind(console,"",p("WARN"))),t<=h.info&&(f.info=console.info?console.info.bind(console,p("INFO"),"color: lightblue"):console.log.bind(console,"",p("INFO"))),t<=h.debug&&(f.debug=console.debug?console.debug.bind(console,p("DEBUG"),"color: lightgreen"):console.log.bind(console,"",p("DEBUG")))},p=function(t){var e=l()().format("ss.SSS");return"%c".concat(e," : ").concat(t," : ")},g=n(70),y=function(t){for(var e="",n=0;n>=0;){if(!((n=t.indexOf("<script"))>=0)){e+=t,n=-1;break}e+=t.substr(0,n),(n=(t=t.substr(n+1)).indexOf("<\/script>"))>=0&&(n+=9,t=t.substr(n))}return e},v=/<br\s*\/?>/gi,m=function(t){return t.replace(v,"#br#")},b=function(t){return t.replace(/#br#/g,"<br/>")},x={getRows:function(t){if(!t)return 1;var e=m(t);return(e=e.replace(/\\n/g,"#br#")).split("#br#")},sanitizeText:function(t,e){var n=t,r=!0;if(!e.flowchart||!1!==e.flowchart.htmlLabels&&"false"!==e.flowchart.htmlLabels||(r=!1),r){var i=e.securityLevel;"antiscript"===i?n=y(n):"loose"!==i&&(n=(n=(n=m(n)).replace(/</g,"&lt;").replace(/>/g,"&gt;")).replace(/=/g,"&equals;"),n=b(n))}return n},hasBreaks:function(t){return/<br\s*[/]?>/gi.test(t)},splitBreaks:function(t){return t.split(/<br\s*[/]?>/gi)},lineBreakRegex:v,removeScript:y};function _(t){return(_="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function k(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var w={curveBasis:s.curveBasis,curveBasisClosed:s.curveBasisClosed,curveBasisOpen:s.curveBasisOpen,curveLinear:s.curveLinear,curveLinearClosed:s.curveLinearClosed,curveMonotoneX:s.curveMonotoneX,curveMonotoneY:s.curveMonotoneY,curveNatural:s.curveNatural,curveStep:s.curveStep,curveStepAfter:s.curveStepAfter,curveStepBefore:s.curveStepBefore},E=/[%]{2}[{]\s*(?:(?:(\w+)\s*:|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi,T=/\s*(?:(?:(\w+)(?=:):|(\w+))\s*(?:(?:(\w+))|((?:(?![}][%]{2}).|\r?\n)*))?\s*)(?:[}][%]{2})?/gi,C=/\s*%%.*\n/gm,A=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;try{var n=new RegExp("[%]{2}(?![{]".concat(T.source,")(?=[}][%]{2}).*\n"),"ig");t=t.trim().replace(n,"").replace(/'/gm,'"'),f.debug("Detecting diagram directive".concat(null!==e?" type:"+e:""," based on the text:").concat(t));for(var r,i=[];null!==(r=E.exec(t));)if(r.index===E.lastIndex&&E.lastIndex++,r&&!e||e&&r[1]&&r[1].match(e)||e&&r[2]&&r[2].match(e)){var a=r[1]?r[1]:r[2],o=r[3]?r[3].trim():r[4]?JSON.parse(r[4].trim()):null;i.push({type:a,args:o})}return 0===i.length&&i.push({type:t,args:null}),1===i.length?i[0]:i}catch(n){return f.error("ERROR: ".concat(n.message," - Unable to parse directive").concat(null!==e?" type:"+e:""," based on the text:").concat(t)),{type:null,args:null}}},S=function(t){return t=t.replace(E,"").replace(C,"\n"),f.debug("Detecting diagram type based on the text "+t),t.match(/^\s*sequenceDiagram/)?"sequence":t.match(/^\s*gantt/)?"gantt":t.match(/^\s*classDiagram-v2/)?"classDiagram":t.match(/^\s*classDiagram/)?"class":t.match(/^\s*stateDiagram-v2/)?"stateDiagram":t.match(/^\s*stateDiagram/)?"state":t.match(/^\s*gitGraph/)?"git":t.match(/^\s*flowchart/)?"flowchart-v2":t.match(/^\s*info/)?"info":t.match(/^\s*pie/)?"pie":t.match(/^\s*erDiagram/)?"er":t.match(/^\s*journey/)?"journey":"flowchart"},M=function(t,e){var n={};return function(){for(var r=arguments.length,i=new Array(r),a=0;a<r;a++)i[a]=arguments[a];var o=e?e.apply(void 0,i):i[0];if(o in n)return n[o];var s=t.apply(void 0,i);return n[o]=s,s}},O=function(t,e){if(!t)return e;var n="curve".concat(t.charAt(0).toUpperCase()+t.slice(1));return w[n]||e},D=function(t,e){return t&&e?Math.sqrt(Math.pow(e.x-t.x,2)+Math.pow(e.y-t.y,2)):0},N=function(t){for(var e="",n="",r=0;r<t.length;r++)void 0!==t[r]&&(t[r].startsWith("color:")||t[r].startsWith("text-align:")?n=n+t[r]+";":e=e+t[r]+";");return{style:e,labelStyle:n}},B=0,L=function(){return B++,"id-"+Math.random().toString(36).substr(2,12)+"-"+B};var F=function(t){return function(t){for(var e="",n="0123456789abcdef".length,r=0;r<t;r++)e+="0123456789abcdef".charAt(Math.floor(Math.random()*n));return e}(t.length)},P=function t(e,n,r){var i=Object.assign({depth:2,clobber:!1},r),a=i.depth,o=i.clobber;return Array.isArray(n)&&!Array.isArray(e)?(n.forEach((function(n){return t(e,n,r)})),e):Array.isArray(n)&&Array.isArray(e)?(n.forEach((function(t){-1===e.indexOf(t)&&e.push(t)})),e):void 0===e||a<=0?null!=e&&"object"===_(e)&&"object"===_(n)?Object.assign(e,n):n:(void 0!==n&&"object"===_(e)&&"object"===_(n)&&Object.keys(n).forEach((function(r){"object"!==_(n[r])||void 0!==e[r]&&"object"!==_(e[r])?(o||"object"!==_(e[r])&&"object"!==_(n[r]))&&(e[r]=n[r]):(void 0===e[r]&&(e[r]=Array.isArray(n[r])?[]:{}),e[r]=t(e[r],n[r],{depth:a-1,clobber:o}))})),e)},I=function(t,e){var n=e.text.replace(x.lineBreakRegex," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.style("text-anchor",e.anchor),r.style("font-family",e.fontFamily),r.style("font-size",e.fontSize),r.style("font-weight",e.fontWeight),r.attr("fill",e.fill),void 0!==e.class&&r.attr("class",e.class);var i=r.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.attr("fill",e.fill),i.text(n),r},j=M((function(t,e,n){if(!t)return t;if(n=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",joinWith:"<br/>"},n),x.lineBreakRegex.test(t))return t;var r=t.split(" "),i=[],a="";return r.forEach((function(t,o){var s=Y("".concat(t," "),n),c=Y(a,n);if(s>e){var u=R(t,e,"-",n),l=u.hyphenatedStrings,h=u.remainingWord;i.push.apply(i,[a].concat(k(l))),a=h}else c+s>=e?(i.push(a),a=t):a=[a,t].filter(Boolean).join(" ");o+1===r.length&&i.push(a)})),i.filter((function(t){return""!==t})).join(n.joinWith)}),(function(t,e,n){return"".concat(t,"-").concat(e,"-").concat(n.fontSize,"-").concat(n.fontWeight,"-").concat(n.fontFamily,"-").concat(n.joinWith)})),R=M((function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-",r=arguments.length>3?arguments[3]:void 0;r=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:0},r);var i=t.split(""),a=[],o="";return i.forEach((function(t,s){var c="".concat(o).concat(t);if(Y(c,r)>=e){var u=s+1,l=i.length===u,h="".concat(c).concat(n);a.push(l?c:h),o=""}else o=c})),{hyphenatedStrings:a,remainingWord:o}}),(function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"-",r=arguments.length>3?arguments[3]:void 0;return"".concat(t,"-").concat(e,"-").concat(n,"-").concat(r.fontSize,"-").concat(r.fontWeight,"-").concat(r.fontFamily)})),Y=function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),z(t,e).width},z=M((function(t,e){var n=e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial"},e),r=n.fontSize,i=n.fontFamily,a=n.fontWeight;if(!t)return{width:0,height:0};var o=["sans-serif",i],c=t.split(x.lineBreakRegex),u=[],l=Object(s.select)("body");if(!l.remove)return{width:0,height:0,lineHeight:0};for(var h=l.append("svg"),f=0,d=o;f<d.length;f++){var p=d[f],g=0,y={width:0,height:0,lineHeight:0},v=!0,m=!1,b=void 0;try{for(var _,k=c[Symbol.iterator]();!(v=(_=k.next()).done);v=!0){var w=_.value,E={x:0,y:0,fill:void 0,anchor:"start",style:"#666",width:100,height:100,textMargin:0,rx:0,ry:0,valign:void 0};E.text=w;var T=I(h,E).style("font-size",r).style("font-weight",a).style("font-family",p),C=(T._groups||T)[0][0].getBBox();y.width=Math.round(Math.max(y.width,C.width)),g=Math.round(C.height),y.height+=g,y.lineHeight=Math.round(Math.max(y.lineHeight,g))}}catch(t){m=!0,b=t}finally{try{v||null==k.return||k.return()}finally{if(m)throw b}}u.push(y)}return h.remove(),u[isNaN(u[1].height)||isNaN(u[1].width)||isNaN(u[1].lineHeight)||u[0].height>u[1].height&&u[0].width>u[1].width&&u[0].lineHeight>u[1].lineHeight?0:1]}),(function(t,e){return"".concat(t,"-").concat(e.fontSize,"-").concat(e.fontWeight,"-").concat(e.fontFamily)})),U={assignWithDepth:P,wrapLabel:j,calculateTextHeight:function(t,e){return e=Object.assign({fontSize:12,fontWeight:400,fontFamily:"Arial",margin:15},e),z(t,e).height},calculateTextWidth:Y,calculateTextDimensions:z,detectInit:function(t){var e=A(t,/(?:init\b)|(?:initialize\b)/),n={};if(Array.isArray(e)){var r=e.map((function(t){return t.args}));n=P(n,k(r))}else n=e.args;if(n){var i=S(t);["config"].forEach((function(t){void 0!==n[t]&&("flowchart-v2"===i&&(i="flowchart"),n[i]=n[t],delete n[t])}))}return n},detectDirective:A,detectType:S,isSubstringInArray:function(t,e){for(var n=0;n<e.length;n++)if(e[n].match(t))return n;return-1},interpolateToCurve:O,calcLabelPosition:function(t){return function(t){var e,n=0;t.forEach((function(t){n+=D(t,e),e=t}));var r=n/2,i=void 0;return e=void 0,t.forEach((function(t){if(e&&!i){var n=D(t,e);if(n<r)r-=n;else{var a=r/n;a<=0&&(i=e),a>=1&&(i={x:t.x,y:t.y}),a>0&&a<1&&(i={x:(1-a)*e.x+a*t.x,y:(1-a)*e.y+a*t.y})}}e=t})),i}(t)},calcCardinalityPosition:function(t,e,n){var r;e[0]!==n&&(e=e.reverse()),e.forEach((function(t){D(t,r),r=t}));var i,a=25;r=void 0,e.forEach((function(t){if(r&&!i){var e=D(t,r);if(e<a)a-=e;else{var n=a/e;n<=0&&(i=r),n>=1&&(i={x:t.x,y:t.y}),n>0&&n<1&&(i={x:(1-n)*r.x+n*t.x,y:(1-n)*r.y+n*t.y})}}r=t}));var o=t?10:5,s=Math.atan2(e[0].y-i.y,e[0].x-i.x),c={x:0,y:0};return c.x=Math.sin(s)*o+(e[0].x+i.x)/2,c.y=-Math.cos(s)*o+(e[0].y+i.y)/2,c},formatUrl:function(t,e){var n=t.trim();if(n)return"loose"!==e.securityLevel?Object(g.sanitizeUrl)(n):n},getStylesFromArray:N,generateId:L,random:F,memoize:M,runFunc:function(t){for(var e,n=t.split("."),r=n.length-1,i=n[r],a=window,o=0;o<r;o++)if(!(a=a[n[o]]))return;for(var s=arguments.length,c=new Array(s>1?s-1:0),u=1;u<s;u++)c[u-1]=arguments[u];(e=a)[i].apply(e,c)}},$=n(3),W=n.n($),V=n(1),H=function(t,e){return e?Object(V.adjust)(t,{s:-40,l:10}):Object(V.adjust)(t,{s:-40,l:-10})};function G(t){return(G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function q(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var X=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#f4f4f4",this.darkMode=!1,this.primaryColor="#fff4dd",this.noteBkgColor="#fff5ad",this.noteTextColor="#333",this.fontFamily='"trebuchet ms", verdana, arial',this.fontSize="16px"}var e,n,r;return e=t,(n=[{key:"updateColors",value:function(){this.primaryTextColor=this.primaryTextColor||(this.darkMode?"#ddd":"#333"),this.secondaryColor=this.secondaryColor||Object(V.adjust)(this.primaryColor,{h:-120}),this.tertiaryColor=this.tertiaryColor||Object(V.adjust)(this.primaryColor,{h:180,l:5}),this.primaryBorderColor=this.primaryBorderColor||H(this.primaryColor,this.darkMode),this.secondaryBorderColor=this.secondaryBorderColor||H(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=this.tertiaryBorderColor||H(this.tertiaryColor,this.darkMode),this.noteBorderColor=this.noteBorderColor||H(this.noteBkgColor,this.darkMode),this.secondaryTextColor=this.secondaryTextColor||Object(V.invert)(this.secondaryColor),this.tertiaryTextColor=this.tertiaryTextColor||Object(V.invert)(this.tertiaryColor),this.lineColor=this.lineColor||Object(V.invert)(this.background),this.textColor=this.textColor||this.primaryTextColor,this.nodeBkg=this.nodeBkg||this.primaryColor,this.mainBkg=this.mainBkg||this.primaryColor,this.nodeBorder=this.nodeBorder||this.primaryBorderColor,this.clusterBkg=this.clusterBkg||this.tertiaryColor,this.clusterBorder=this.clusterBorder||this.tertiaryBorderColor,this.defaultLinkColor=this.defaultLinkColor||this.lineColor,this.titleColor=this.titleColor||this.tertiaryTextColor,this.edgeLabelBackground=this.edgeLabelBackground||this.darkMode?Object(V.darken)(this.secondaryColor,30):this.secondaryColor,this.nodeTextColor=this.nodeTextColor||this.primaryTextColor,this.actorBorder=this.actorBorder||this.primaryBorderColor,this.actorBkg=this.actorBkg||this.mainBkg,this.actorTextColor=this.actorTextColor||this.primaryTextColor,this.actorLineColor=this.actorLineColor||"grey",this.labelBoxBkgColor=this.labelBoxBkgColor||this.actorBkg,this.signalColor=this.signalColor||this.textColor,this.signalTextColor=this.signalTextColor||this.textColor,this.labelBoxBorderColor=this.labelBoxBorderColor||this.actorBorder,this.labelTextColor=this.labelTextColor||this.actorTextColor,this.loopTextColor=this.loopTextColor||this.actorTextColor,this.activationBorderColor=this.activationBorderColor||Object(V.darken)(this.secondaryColor,10),this.activationBkgColor=this.activationBkgColor||this.secondaryColor,this.sequenceNumberColor=this.sequenceNumberColor||Object(V.invert)(this.lineColor),this.sectionBkgColor=this.sectionBkgColor||this.tertiaryColor,this.altSectionBkgColor=this.altSectionBkgColor||"white",this.sectionBkgColor=this.sectionBkgColor||this.secondaryColor,this.sectionBkgColor2=this.sectionBkgColor2||this.primaryColor,this.taskBorderColor=this.taskBorderColor||this.primaryBorderColor,this.taskBkgColor=this.taskBkgColor||this.primaryColor,this.activeTaskBorderColor=this.activeTaskBorderColor||this.primaryColor,this.activeTaskBkgColor=this.activeTaskBkgColor||Object(V.lighten)(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.labelColor=this.labelColor||this.primaryTextColor,this.altBackground=this.altBackground||this.tertiaryColor,this.errorBkgColor=this.errorBkgColor||this.tertiaryColor,this.errorTextColor=this.errorTextColor||this.tertiaryTextColor,this.classText=this.classText||this.textColor,this.fillType0=this.fillType0||this.primaryColor,this.fillType1=this.fillType1||this.secondaryColor,this.fillType2=this.fillType2||Object(V.adjust)(this.primaryColor,{h:64}),this.fillType3=this.fillType3||Object(V.adjust)(this.secondaryColor,{h:64}),this.fillType4=this.fillType4||Object(V.adjust)(this.primaryColor,{h:-64}),this.fillType5=this.fillType5||Object(V.adjust)(this.secondaryColor,{h:-64}),this.fillType6=this.fillType6||Object(V.adjust)(this.primaryColor,{h:128}),this.fillType7=this.fillType7||Object(V.adjust)(this.secondaryColor,{h:128})}},{key:"calculate",value:function(t){var e=this;if("object"===G(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}])&&q(e.prototype,n),r&&q(e,r),t}();function Z(t){return(Z="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function J(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var Q=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#333",this.primaryColor="#1f2020",this.secondaryColor=Object(V.lighten)(this.primaryColor,16),this.tertiaryColor=Object(V.adjust)(this.primaryColor,{h:-160}),this.primaryBorderColor=H(this.primaryColor,this.darkMode),this.secondaryBorderColor=H(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=H(this.tertiaryColor,this.darkMode),this.primaryTextColor=Object(V.invert)(this.primaryColor),this.secondaryTextColor=Object(V.invert)(this.secondaryColor),this.tertiaryTextColor=Object(V.invert)(this.tertiaryColor),this.lineColor=Object(V.invert)(this.background),this.textColor=Object(V.invert)(this.background),this.mainBkg="#1f2020",this.secondBkg="calculated",this.mainContrastColor="lightgrey",this.darkTextColor=Object(V.lighten)(Object(V.invert)("#323D47"),10),this.lineColor="calculated",this.border1="#81B1DB",this.border2=Object(V.rgba)(255,255,255,.25),this.arrowheadColor="calculated",this.fontFamily='"trebuchet ms", verdana, arial',this.fontSize="16px",this.labelBackground="#181818",this.textColor="#ccc",this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#F9FFFE",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="calculated",this.activationBkgColor="calculated",this.sequenceNumberColor="black",this.sectionBkgColor=Object(V.darken)("#EAE8D9",30),this.altSectionBkgColor="calculated",this.sectionBkgColor2="#EAE8D9",this.taskBorderColor=Object(V.rgba)(255,255,255,70),this.taskBkgColor="calculated",this.taskTextColor="calculated",this.taskTextLightColor="calculated",this.taskTextOutsideColor="calculated",this.taskTextClickableColor="#003163",this.activeTaskBorderColor=Object(V.rgba)(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.labelColor="calculated",this.errorBkgColor="#a44141",this.errorTextColor="#ddd"}var e,n,r;return e=t,(n=[{key:"updateColors",value:function(){this.secondBkg=Object(V.lighten)(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=Object(V.lighten)(this.labelBackground,25),this.actorBorder=this.border1,this.actorBkg=this.mainBkg,this.actorTextColor=this.mainContrastColor,this.actorLineColor=this.mainContrastColor,this.signalColor=this.mainContrastColor,this.signalTextColor=this.mainContrastColor,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.mainContrastColor,this.loopTextColor=this.mainContrastColor,this.noteBorderColor=this.border2,this.noteTextColor=this.mainBkg,this.activationBorderColor=this.border1,this.activationBkgColor=this.secondBkg,this.altSectionBkgColor=this.background,this.taskBkgColor=Object(V.lighten)(this.mainBkg,23),this.taskTextColor=this.darkTextColor,this.taskTextLightColor=this.mainContrastColor,this.taskTextOutsideColor=this.taskTextLightColor,this.gridColor=this.mainContrastColor,this.doneTaskBkgColor=this.mainContrastColor,this.taskTextDarkColor=this.darkTextColor,this.labelColor=this.textColor,this.altBackground=Object(V.lighten)(this.background,20),this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Object(V.adjust)(this.primaryColor,{h:64}),this.fillType3=Object(V.adjust)(this.secondaryColor,{h:64}),this.fillType4=Object(V.adjust)(this.primaryColor,{h:-64}),this.fillType5=Object(V.adjust)(this.secondaryColor,{h:-64}),this.fillType6=Object(V.adjust)(this.primaryColor,{h:128}),this.fillType7=Object(V.adjust)(this.secondaryColor,{h:128}),this.classText=this.primaryTextColor}},{key:"calculate",value:function(t){var e=this;if("object"===Z(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}])&&J(e.prototype,n),r&&J(e,r),t}();function K(t){return(K="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function tt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var et=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.background="#f4f4f4",this.primaryColor="#ECECFF",this.secondaryColor=Object(V.adjust)(this.primaryColor,{h:120}),this.secondaryColor="#ffffde",this.tertiaryColor=Object(V.adjust)(this.primaryColor,{h:-160}),this.primaryBorderColor=H(this.primaryColor,this.darkMode),this.secondaryBorderColor=H(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=H(this.tertiaryColor,this.darkMode),this.primaryTextColor=Object(V.invert)(this.primaryColor),this.secondaryTextColor=Object(V.invert)(this.secondaryColor),this.tertiaryTextColor=Object(V.invert)(this.tertiaryColor),this.lineColor=Object(V.invert)(this.background),this.textColor=Object(V.invert)(this.background),this.background="white",this.mainBkg="#ECECFF",this.secondBkg="#ffffde",this.lineColor="#333333",this.border1="#9370DB",this.border2="#aaaa33",this.arrowheadColor="#333333",this.fontFamily='"trebuchet ms", verdana, arial',this.fontSize="16px",this.labelBackground="#e8e8e8",this.textColor="#333",this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="calculated",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="calculated",this.sectionBkgColor2="calculated",this.taskBorderColor="calculated",this.taskBkgColor="calculated",this.taskTextLightColor="calculated",this.taskTextColor=this.taskTextLightColor,this.taskTextDarkColor="calculated",this.taskTextOutsideColor=this.taskTextDarkColor,this.taskTextClickableColor="calculated",this.activeTaskBorderColor="calculated",this.activeTaskBkgColor="calculated",this.gridColor="calculated",this.doneTaskBkgColor="calculated",this.doneTaskBorderColor="calculated",this.critBorderColor="calculated",this.critBkgColor="calculated",this.todayLineColor="calculated",this.sectionBkgColor=Object(V.rgba)(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.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222",this.updateColors()}var e,n,r;return e=t,(n=[{key:"updateColors",value:function(){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=Object(V.lighten)(this.border1,23),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.signalColor=this.textColor,this.signalTextColor=this.textColor,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Object(V.adjust)(this.primaryColor,{h:64}),this.fillType3=Object(V.adjust)(this.secondaryColor,{h:64}),this.fillType4=Object(V.adjust)(this.primaryColor,{h:-64}),this.fillType5=Object(V.adjust)(this.secondaryColor,{h:-64}),this.fillType6=Object(V.adjust)(this.primaryColor,{h:128}),this.fillType7=Object(V.adjust)(this.secondaryColor,{h:128})}},{key:"calculate",value:function(t){var e=this;if("object"===K(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}])&&tt(e.prototype,n),r&&tt(e,r),t}();function nt(t){return(nt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function rt(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var it=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),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',this.fontSize="16px",this.tertiaryColor=Object(V.lighten)("#cde498",10),this.primaryBorderColor=H(this.primaryColor,this.darkMode),this.secondaryBorderColor=H(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=H(this.tertiaryColor,this.darkMode),this.primaryTextColor=Object(V.invert)(this.primaryColor),this.secondaryTextColor=Object(V.invert)(this.secondaryColor),this.tertiaryTextColor=Object(V.invert)(this.primaryColor),this.lineColor=Object(V.invert)(this.background),this.textColor=Object(V.invert)(this.background),this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="#333",this.edgeLabelBackground="#e8e8e8",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="black",this.actorLineColor="grey",this.signalColor="#333",this.signalTextColor="#333",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="#326932",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="#fff5ad",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="#6eaa49",this.altSectionBkgColor="white",this.sectionBkgColor2="#6eaa49",this.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.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}var e,n,r;return e=t,(n=[{key:"updateColors",value:function(){this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.actorBorder=Object(V.darken)(this.mainBkg,20),this.actorBkg=this.mainBkg,this.labelBoxBkgColor=this.actorBkg,this.labelTextColor=this.actorTextColor,this.loopTextColor=this.actorTextColor,this.noteBorderColor=this.border2,this.noteTextColor=this.actorTextColor,this.taskBorderColor=this.border1,this.taskTextColor=this.taskTextLightColor,this.taskTextOutsideColor=this.taskTextDarkColor,this.activeTaskBorderColor=this.taskBorderColor,this.activeTaskBkgColor=this.mainBkg,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Object(V.adjust)(this.primaryColor,{h:64}),this.fillType3=Object(V.adjust)(this.secondaryColor,{h:64}),this.fillType4=Object(V.adjust)(this.primaryColor,{h:-64}),this.fillType5=Object(V.adjust)(this.secondaryColor,{h:-64}),this.fillType6=Object(V.adjust)(this.primaryColor,{h:128}),this.fillType7=Object(V.adjust)(this.secondaryColor,{h:128})}},{key:"calculate",value:function(t){var e=this;if("object"===nt(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}])&&rt(e.prototype,n),r&&rt(e,r),t}();function at(t){return(at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}function ot(t,e){for(var n=0;n<e.length;n++){var r=e[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(t,r.key,r)}}var st=function(){function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.primaryColor="#eee",this.contrast="#26a",this.secondaryColor=Object(V.lighten)(this.contrast,55),this.background="#ffffff",this.tertiaryColor=Object(V.adjust)(this.primaryColor,{h:-160}),this.primaryBorderColor=H(this.primaryColor,this.darkMode),this.secondaryBorderColor=H(this.secondaryColor,this.darkMode),this.tertiaryBorderColor=H(this.tertiaryColor,this.darkMode),this.primaryTextColor=Object(V.invert)(this.primaryColor),this.secondaryTextColor=Object(V.invert)(this.secondaryColor),this.tertiaryTextColor=Object(V.invert)(this.tertiaryColor),this.lineColor=Object(V.invert)(this.background),this.textColor=Object(V.invert)(this.background),this.altBackground=Object(V.lighten)(this.contrast,55),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',this.fontSize="16px",this.nodeBkg="calculated",this.nodeBorder="calculated",this.clusterBkg="calculated",this.clusterBorder="calculated",this.defaultLinkColor="calculated",this.titleColor="calculated",this.edgeLabelBackground="white",this.actorBorder="calculated",this.actorBkg="calculated",this.actorTextColor="calculated",this.actorLineColor="calculated",this.signalColor="calculated",this.signalTextColor="calculated",this.labelBoxBkgColor="calculated",this.labelBoxBorderColor="calculated",this.labelTextColor="calculated",this.loopTextColor="calculated",this.noteBorderColor="calculated",this.noteBkgColor="calculated",this.noteTextColor="calculated",this.activationBorderColor="#666",this.activationBkgColor="#f4f4f4",this.sequenceNumberColor="white",this.sectionBkgColor="calculated",this.altSectionBkgColor="white",this.sectionBkgColor2="calculated",this.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.labelColor="black",this.errorBkgColor="#552222",this.errorTextColor="#552222"}var e,n,r;return e=t,(n=[{key:"updateColors",value:function(){this.secondBkg=Object(V.lighten)(this.contrast,55),this.border2=this.contrast,this.nodeBkg=this.mainBkg,this.nodeBorder=this.border1,this.clusterBkg=this.secondBkg,this.clusterBorder=this.border2,this.defaultLinkColor=this.lineColor,this.titleColor=this.text,this.actorBorder=Object(V.lighten)(this.border1,23),this.actorBkg=this.mainBkg,this.actorTextColor=this.text,this.actorLineColor=this.lineColor,this.signalColor=this.text,this.signalTextColor=this.text,this.labelBoxBkgColor=this.actorBkg,this.labelBoxBorderColor=this.actorBorder,this.labelTextColor=this.text,this.loopTextColor=this.text,this.noteBorderColor=Object(V.darken)(this.note,60),this.noteBkgColor=this.note,this.noteTextColor=this.actorTextColor,this.sectionBkgColor=Object(V.lighten)(this.contrast,30),this.sectionBkgColor2=Object(V.lighten)(this.contrast,30),this.taskBorderColor=Object(V.darken)(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=Object(V.lighten)(this.border1,30),this.doneTaskBkgColor=this.done,this.doneTaskBorderColor=this.lineColor,this.critBkgColor=this.critical,this.critBorderColor=Object(V.darken)(this.critBkgColor,10),this.todayLineColor=this.critBkgColor,this.classText=this.primaryTextColor,this.fillType0=this.primaryColor,this.fillType1=this.secondaryColor,this.fillType2=Object(V.adjust)(this.primaryColor,{h:64}),this.fillType3=Object(V.adjust)(this.secondaryColor,{h:64}),this.fillType4=Object(V.adjust)(this.primaryColor,{h:-64}),this.fillType5=Object(V.adjust)(this.secondaryColor,{h:-64}),this.fillType6=Object(V.adjust)(this.primaryColor,{h:128}),this.fillType7=Object(V.adjust)(this.secondaryColor,{h:128})}},{key:"calculate",value:function(t){var e=this;if("object"===at(t)){var n=Object.keys(t);n.forEach((function(n){e[n]=t[n]})),this.updateColors(),n.forEach((function(n){e[n]=t[n]}))}else this.updateColors()}}])&&ot(e.prototype,n),r&&ot(e,r),t}(),ct={base:{getThemeVariables:function(t){var e=new X;return e.calculate(t),e}},dark:{getThemeVariables:function(t){var e=new Q;return e.calculate(t),console.info("Theme(dark)",{userOverrides:t,theme:e}),e}},default:{getThemeVariables:function(t){var e=new et;return e.calculate(t),e}},forest:{getThemeVariables:function(t){var e=new it;return e.calculate(t),console.info("Theme(forest)",{userOverrides:t,theme:e}),e}},neutral:{getThemeVariables:function(t){var e=new st;return e.calculate(t),console.info("Theme(neutral)",{userOverrides:t,theme:e}),e}}},ut={theme:"default",themeVariables:ct.default.getThemeVariables(),themeCSS:void 0,maxTextSize:5e4,fontFamily:'"trebuchet ms", verdana, arial;',logLevel:5,securityLevel:"strict",startOnLoad:!0,arrowMarkerAbsolute:!1,secure:["secure","securityLevel","startOnLoad","maxTextSize"],flowchart:{diagramPadding:8,htmlLabels:!0,nodeSpacing:50,rankSpacing:50,curve:"linear",padding:15},sequence:{activationWidth:10,diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",mirrorActors:!0,bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1,showSequenceNumbers:!1,actorFontSize:14,actorFontFamily:'"Open-Sans", "sans-serif"',actorFontWeight:400,noteFontSize:14,noteFontFamily:'"trebuchet ms", verdana, arial',noteFontWeight:400,noteAlign:"center",messageFontSize:16,messageFontFamily:'"trebuchet ms", verdana, arial',messageFontWeight:400,wrap:!1,wrapPadding:10,labelBoxWidth:50,labelBoxHeight:20,messageFont:function(){return{fontFamily:this.messageFontFamily,fontSize:this.messageFontSize,fontWeight:this.messageFontWeight}},noteFont:function(){return{fontFamily:this.noteFontFamily,fontSize:this.noteFontSize,fontWeight:this.noteFontWeight}},actorFont:function(){return{fontFamily:this.actorFontFamily,fontSize:this.actorFontSize,fontWeight:this.actorFontWeight}}},gantt:{titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"',numberSectionStyles:4,axisFormat:"%Y-%m-%d"},journey:{diagramMarginX:50,diagramMarginY:10,actorMargin:50,width:150,height:65,boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,useMaxWidth:!0,rightAngles:!1},class:{arrowMarkerAbsolute:!1},git:{arrowMarkerAbsolute:!1},state:{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},er:{diagramPadding:20,layoutDirection:"TB",minEntityWidth:100,minEntityHeight:75,entityPadding:15,stroke:"gray",fill:"honeydew",fontSize:12,useMaxWidth:!0}};ut.class.arrowMarkerAbsolute=ut.arrowMarkerAbsolute,ut.git.arrowMarkerAbsolute=ut.arrowMarkerAbsolute;var lt,ht=ut,ft=Object.freeze(ht),dt=P({},ft),pt=[],gt=P({},ft),yt=function(t,e){for(var n=P({},t),r={},i=0;i<e.length;i++){var a=e[i];bt(a),r=P(r,a)}if(n=P(n,r),r.theme){var o=P(lt.themeVariables||{},r.themeVariables);n.themeVariables=ct[n.theme].getThemeVariables(o)}return gt=n,n},vt=function(){return P({},dt)},mt=function(){return P({},gt)},bt=function(t){Object.keys(dt.secure).forEach((function(e){void 0!==t[dt.secure[e]]&&(f.debug("Denied attempt to modify a secure key ".concat(dt.secure[e]),t[dt.secure[e]]),delete t[dt.secure[e]])}))},xt=function(t){t.fontFamily&&(t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily})),pt.push(t),yt(dt,pt)},_t=function(){yt(dt,pt=[])};function kt(t){return(kt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var wt,Et=mt(),Tt={},Ct=[],At=[],St=[],Mt={},Ot={},Dt=0,Nt=!0,Bt=[],Lt=function(t,e,n,r){var i=t,a=e;i[0].match(/\d/)&&(i=""+i),a[0].match(/\d/)&&(a=""+a);var o={start:i,end:a,type:void 0,text:""};void 0!==(r=n.text)&&(o.text=x.sanitizeText(r.trim(),Et),'"'===o.text[0]&&'"'===o.text[o.text.length-1]&&(o.text=o.text.substring(1,o.text.length-1))),void 0!==n&&(o.type=n.type,o.stroke=n.stroke,o.length=n.length),Ct.push(o)},Ft=function(t,e){t.split(",").forEach((function(t){var n=t;t[0].match(/\d/)&&(n=""+n),void 0!==Tt[n]&&Tt[n].classes.push(e),void 0!==Mt[n]&&Mt[n].classes.push(e)}))},Pt=function(t,e){t.split(",").forEach((function(t){void 0!==e&&(Ot[t]=x.sanitizeText(e,Et))}))},It=function(t){var e=Object(s.select)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=Object(s.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Object(s.select)(t).select("svg").selectAll("g.node").on("mouseover",(function(){var t=Object(s.select)(this);if(null!==t.attr("title")){var n=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.html(t.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),Object(s.select)(this).classed("hover",!1)}))};Bt.push(It);var jt=function(t){for(var e=0;e<St.length;e++)if(St[e].id===t)return e;return-1},Rt=-1,Yt=[],zt={parseDirective:function(t,e,n){Lo.parseDirective(this,t,e,n)},defaultConfig:function(){return ft.flowchart},addVertex:function(t,e,n,r,i){var a,o=t;void 0!==o&&0!==o.trim().length&&(o[0].match(/\d/)&&(o=""+o),void 0===Tt[o]&&(Tt[o]={id:o,styles:[],classes:[]}),void 0!==e?(Et=mt(),'"'===(a=x.sanitizeText(e.trim(),Et))[0]&&'"'===a[a.length-1]&&(a=a.substring(1,a.length-1)),Tt[o].text=a):void 0===Tt[o].text&&(Tt[o].text=t),void 0!==n&&(Tt[o].type=n),null!=r&&r.forEach((function(t){Tt[o].styles.push(t)})),null!=i&&i.forEach((function(t){Tt[o].classes.push(t)})))},addLink:function(t,e,n,r){var i,a;for(i=0;i<t.length;i++)for(a=0;a<e.length;a++)Lt(t[i],e[a],n,r)},updateLinkInterpolate:function(t,e){t.forEach((function(t){"default"===t?Ct.defaultInterpolate=e:Ct[t].interpolate=e}))},updateLink:function(t,e){t.forEach((function(t){"default"===t?Ct.defaultStyle=e:(-1===U.isSubstringInArray("fill",e)&&e.push("fill:none"),Ct[t].style=e)}))},addClass:function(t,e){void 0===At[t]&&(At[t]={id:t,styles:[],textStyles:[]}),null!=e&&e.forEach((function(e){if(e.match("color")){var n=e.replace("fill","bgFill").replace("color","fill");At[t].textStyles.push(n)}At[t].styles.push(e)}))},setDirection:function(t){(wt=t).match(/.*</)&&(wt="RL"),wt.match(/.*\^/)&&(wt="BT"),wt.match(/.*>/)&&(wt="LR"),wt.match(/.*v/)&&(wt="TB")},setClass:Ft,getTooltip:function(t){return Ot[t]},setClickEvent:function(t,e,n){t.split(",").forEach((function(t){!function(t,e){var n=t;t[0].match(/\d/)&&(n=""+n),"loose"===mt().securityLevel&&void 0!==e&&void 0!==Tt[n]&&Bt.push((function(){var t=document.querySelector('[id="'.concat(n,'"]'));null!==t&&t.addEventListener("click",(function(){U.runFunc(e,n)}),!1)}))}(t,e)})),Pt(t,n),Ft(t,"clickable")},setLink:function(t,e,n,r){t.split(",").forEach((function(t){var n=t;t[0].match(/\d/)&&(n=""+n),void 0!==Tt[n]&&(Tt[n].link=U.formatUrl(e,Et),Tt[n].linkTarget=r)})),Pt(t,n),Ft(t,"clickable")},bindFunctions:function(t){Bt.forEach((function(e){e(t)}))},getDirection:function(){return wt.trim()},getVertices:function(){return Tt},getEdges:function(){return Ct},getClasses:function(){return At},clear:function(){Tt={},At={},Ct=[],(Bt=[]).push(It),St=[],Mt={},Dt=0,Ot=[],Nt=!0},defaultStyle:function(){return"fill:#ffa;stroke: #f66; stroke-width: 3px; stroke-dasharray: 5, 5;fill:#ffa;stroke: #666;"},addSubGraph:function(t,e,n){var r=t.trim(),i=n;t===n&&n.match(/\s/)&&(r=void 0);var a,o,s,c=[];a=c.concat.apply(c,e),o={boolean:{},number:{},string:{}},s=[],c=a.filter((function(t){var e=kt(t);return""!==t.trim()&&(e in o?!o[e].hasOwnProperty(t)&&(o[e][t]=!0):!(s.indexOf(t)>=0)&&s.push(t))}));for(var u=0;u<c.length;u++)c[u][0].match(/\d/)&&(c[u]=""+c[u]);(r=r||"subGraph"+Dt)[0].match(/\d/)&&(r=""+r),i=i||"",i=x.sanitizeText(i,Et),Dt+=1;var l={id:r,nodes:c,title:i.trim(),classes:[]};return St.push(l),Mt[r]=l,r},getDepthFirstPos:function(t){return Yt[t]},indexNodes:function(){Rt=-1,St.length>0&&function t(e,n){var r=St[n].nodes;if(!((Rt+=1)>2e3)){if(Yt[Rt]=n,St[n].id===e)return{result:!0,count:0};for(var i=0,a=1;i<r.length;){var o=jt(r[i]);if(o>=0){var s=t(e,o);if(s.result)return{result:!0,count:a+s.count};a+=s.count}i+=1}return{result:!1,count:a}}}("none",St.length-1)},getSubGraphs:function(){return St},destructLink:function(t,e){var n,r=function(t){var e=t.trim(),n=e.slice(0,-1),r="arrow_open";switch(e.slice(-1)){case"x":r="arrow_cross","x"===e[0]&&(r="double_"+r,n=n.slice(1));break;case">":r="arrow_point","<"===e[0]&&(r="double_"+r,n=n.slice(1));break;case"o":r="arrow_circle","o"===e[0]&&(r="double_"+r,n=n.slice(1))}var i="normal",a=n.length-1;"="===n[0]&&(i="thick");var o=function(t,e){for(var n=e.length,r=0,i=0;i<n;++i)e[i]===t&&++r;return r}(".",n);return o&&(i="dotted",a=o),{type:r,stroke:i,length:a}}(t);if(e){if((n=function(t){var e=t.trim(),n="arrow_open";switch(e[0]){case"<":n="arrow_point",e=e.slice(1);break;case"x":n="arrow_cross",e=e.slice(1);break;case"o":n="arrow_circle",e=e.slice(1)}var r="normal";return-1!==e.indexOf("=")&&(r="thick"),-1!==e.indexOf(".")&&(r="dotted"),{type:n,stroke:r}}(e)).stroke!==r.stroke)return{type:"INVALID",stroke:"INVALID"};if("arrow_open"===n.type)n.type=r.type;else{if(n.type!==r.type)return{type:"INVALID",stroke:"INVALID"};n.type="double_"+n.type}return"double_arrow"===n.type&&(n.type="double_arrow_point"),n.length=r.length,n}return r},lex:{firstGraph:function(){return!!Nt&&(Nt=!1,!0)}}},Ut=n(26),$t=n.n(Ut),Wt=n(6),Vt=n.n(Wt),Ht=n(50),Gt=n.n(Ht);function qt(t,e,n){var r=.9*(e.width+e.height),i=[{x:r/2,y:0},{x:r,y:-r/2},{x:r/2,y:-r},{x:0,y:-r/2}],a=ae(t,r,r,i);return n.intersect=function(t){return Vt.a.intersect.polygon(n,i,t)},a}function Xt(t,e,n){var r=e.height,i=r/4,a=e.width+2*i,o=[{x:i,y:0},{x:a-i,y:0},{x:a,y:-r/2},{x:a-i,y:-r},{x:i,y:-r},{x:0,y:-r/2}],s=ae(t,a,r,o);return n.intersect=function(t){return Vt.a.intersect.polygon(n,o,t)},s}function Zt(t,e,n){var r=e.width,i=e.height,a=[{x:-i/2,y:0},{x:r,y:0},{x:r,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],o=ae(t,r,i,a);return n.intersect=function(t){return Vt.a.intersect.polygon(n,a,t)},o}function Jt(t,e,n){var r=e.width,i=e.height,a=[{x:-2*i/6,y:0},{x:r-i/6,y:0},{x:r+2*i/6,y:-i},{x:i/6,y:-i}],o=ae(t,r,i,a);return n.intersect=function(t){return Vt.a.intersect.polygon(n,a,t)},o}function Qt(t,e,n){var r=e.width,i=e.height,a=[{x:2*i/6,y:0},{x:r+i/6,y:0},{x:r-2*i/6,y:-i},{x:-i/6,y:-i}],o=ae(t,r,i,a);return n.intersect=function(t){return Vt.a.intersect.polygon(n,a,t)},o}function Kt(t,e,n){var r=e.width,i=e.height,a=[{x:-2*i/6,y:0},{x:r+2*i/6,y:0},{x:r-i/6,y:-i},{x:i/6,y:-i}],o=ae(t,r,i,a);return n.intersect=function(t){return Vt.a.intersect.polygon(n,a,t)},o}function te(t,e,n){var r=e.width,i=e.height,a=[{x:i/6,y:0},{x:r-i/6,y:0},{x:r+2*i/6,y:-i},{x:-2*i/6,y:-i}],o=ae(t,r,i,a);return n.intersect=function(t){return Vt.a.intersect.polygon(n,a,t)},o}function ee(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r+i/2,y:0},{x:r,y:-i/2},{x:r+i/2,y:-i},{x:0,y:-i}],o=ae(t,r,i,a);return n.intersect=function(t){return Vt.a.intersect.polygon(n,a,t)},o}function ne(t,e,n){var r=e.height,i=e.width+r/4,a=t.insert("rect",":first-child").attr("rx",r/2).attr("ry",r/2).attr("x",-i/2).attr("y",-r/2).attr("width",i).attr("height",r);return n.intersect=function(t){return Vt.a.intersect.rect(n,t)},a}function re(t,e,n){var r=e.width,i=e.height,a=[{x:0,y:0},{x:r,y:0},{x:r,y:-i},{x:0,y:-i},{x:0,y:0},{x:-8,y:0},{x:r+8,y:0},{x:r+8,y:-i},{x:-8,y:-i},{x:-8,y:0}],o=ae(t,r,i,a);return n.intersect=function(t){return Vt.a.intersect.polygon(n,a,t)},o}function ie(t,e,n){var r=e.width,i=r/2,a=i/(2.5+r/50),o=e.height+a,s="M 0,"+a+" a "+i+","+a+" 0,0,0 "+r+" 0 a "+i+","+a+" 0,0,0 "+-r+" 0 l 0,"+o+" a "+i+","+a+" 0,0,0 "+r+" 0 l 0,"+-o,c=t.attr("label-offset-y",a).insert("path",":first-child").attr("d",s).attr("transform","translate("+-r/2+","+-(o/2+a)+")");return n.intersect=function(t){var e=Vt.a.intersect.rect(n,t),r=e.x-n.x;if(0!=i&&(Math.abs(r)<n.width/2||Math.abs(r)==n.width/2&&Math.abs(e.y-n.y)>n.height/2-a)){var o=a*a*(1-r*r/(i*i));0!=o&&(o=Math.sqrt(o)),o=a-o,t.y-n.y>0&&(o=-o),e.y+=o}return e},c}function ae(t,e,n,r){return t.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("transform","translate("+-e/2+","+n/2+")")}var oe={addToRender:function(t){t.shapes().question=qt,t.shapes().hexagon=Xt,t.shapes().stadium=ne,t.shapes().subroutine=re,t.shapes().cylinder=ie,t.shapes().rect_left_inv_arrow=Zt,t.shapes().lean_right=Jt,t.shapes().lean_left=Qt,t.shapes().trapezoid=Kt,t.shapes().inv_trapezoid=te,t.shapes().rect_right_inv_arrow=ee},addToRenderV2:function(t){t({question:qt}),t({hexagon:Xt}),t({stadium:ne}),t({subroutine:re}),t({cylinder:ie}),t({rect_left_inv_arrow:Zt}),t({lean_right:Jt}),t({lean_left:Qt}),t({trapezoid:Kt}),t({inv_trapezoid:te}),t({rect_right_inv_arrow:ee})}},se={},ce=function(t,e,n){var r=Object(s.select)('[id="'.concat(n,'"]'));Object.keys(t).forEach((function(n){var i=t[n],a="default";i.classes.length>0&&(a=i.classes.join(" "));var o,s=N(i.styles),c=void 0!==i.text?i.text:i.id;if(mt().flowchart.htmlLabels){var u={label:c.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")}))};(o=Gt()(r,u).node()).parentNode.removeChild(o)}else{var l=document.createElementNS("http://www.w3.org/2000/svg","text");l.setAttribute("style",s.labelStyle.replace("color:","fill:"));for(var h=c.split(x.lineBreakRegex),f=0;f<h.length;f++){var d=document.createElementNS("http://www.w3.org/2000/svg","tspan");d.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),d.setAttribute("dy","1em"),d.setAttribute("x","1"),d.textContent=h[f],l.appendChild(d)}o=l}var p=0,g="";switch(i.type){case"round":p=5,g="rect";break;case"square":g="rect";break;case"diamond":g="question";break;case"hexagon":g="hexagon";break;case"odd":g="rect_left_inv_arrow";break;case"lean_right":g="lean_right";break;case"lean_left":g="lean_left";break;case"trapezoid":g="trapezoid";break;case"inv_trapezoid":g="inv_trapezoid";break;case"odd_right":g="rect_left_inv_arrow";break;case"circle":g="circle";break;case"ellipse":g="ellipse";break;case"stadium":g="stadium";break;case"subroutine":g="subroutine";break;case"cylinder":g="cylinder";break;case"group":g="rect";break;default:g="rect"}e.setNode(i.id,{labelType:"svg",labelStyle:s.labelStyle,shape:g,label:o,rx:p,ry:p,class:a,style:s.style,id:i.id})}))},ue=function(t,e){var n,r,i=0;if(void 0!==t.defaultStyle){var a=N(t.defaultStyle);n=a.style,r=a.labelStyle}t.forEach((function(a){i++;var o="L-"+a.start+"-"+a.end,c="LS-"+a.start,u="LE-"+a.end,l={};"arrow_open"===a.type?l.arrowhead="none":l.arrowhead="normal";var h="",f="";if(void 0!==a.style){var d=N(a.style);h=d.style,f=d.labelStyle}else switch(a.stroke){case"normal":h="fill:none",void 0!==n&&(h=n),void 0!==r&&(f=r);break;case"dotted":h="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":h=" stroke-width: 3.5px;fill:none"}l.style=h,l.labelStyle=f,void 0!==a.interpolate?l.curve=O(a.interpolate,s.curveLinear):void 0!==t.defaultInterpolate?l.curve=O(t.defaultInterpolate,s.curveLinear):l.curve=O(se.curve,s.curveLinear),void 0===a.text?void 0!==a.style&&(l.arrowheadStyle="fill: #333"):(l.arrowheadStyle="fill: #333",l.labelpos="c",mt().flowchart.htmlLabels?(l.labelType="html",l.label='<span id="L-'.concat(o,'" class="edgeLabel L-').concat(c,"' L-").concat(u,'">').concat(a.text,"</span>")):(l.labelType="text",l.label=a.text.replace(x.lineBreakRegex,"\n"),void 0===a.style&&(l.style=l.style||"stroke: #333; stroke-width: 1.5px;fill:none"),l.labelStyle=l.labelStyle.replace("color:","fill:"))),l.id=o,l.class=c+" "+u,l.minlen=a.length||1,e.setEdge(a.start,a.end,l,i)}))},le=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)se[e[n]]=t[e[n]]},he=function(t){f.info("Extracting classes"),zt.clear();try{var e=$t.a.parser;return e.yy=zt,e.parse(t),zt.getClasses()}catch(t){return}},fe=function(t,e){f.info("Drawing flowchart"),zt.clear();var n=$t.a.parser;n.yy=zt,n.parse(t);var r=zt.getDirection();void 0===r&&(r="TD");for(var i,a=mt().flowchart,o=a.nodeSpacing||50,c=a.rankSpacing||50,u=new W.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:o,ranksep:c,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),l=zt.getSubGraphs(),h=l.length-1;h>=0;h--)i=l[h],zt.addVertex(i.id,i.title,"group",void 0,i.classes);var d=zt.getVertices(),p=zt.getEdges(),g=0;for(g=l.length-1;g>=0;g--){i=l[g],Object(s.selectAll)("cluster").append("text");for(var y=0;y<i.nodes.length;y++)u.setParent(i.nodes[y],i.id)}ce(d,u,e),ue(p,u);var v=new(0,Vt.a.render);oe.addToRender(v),v.arrows().none=function(t,e,n,r){var i=t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 0 0 L 0 0 z");Vt.a.util.applyStyle(i,n[r+"Style"])},v.arrows().normal=function(t,e){t.append("marker").attr("id",e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowheadPath").style("stroke-width",1).style("stroke-dasharray","1,0")};var m=Object(s.select)('[id="'.concat(e,'"]'));m.attr("xmlns:xlink","http://www.w3.org/1999/xlink");var b=Object(s.select)("#"+e+" g");v(b,u),b.selectAll("g.node").attr("title",(function(){return zt.getTooltip(this.id)}));var x=a.diagramPadding,_=m.node().getBBox(),k=_.width+2*x,w=_.height+2*x;a.useMaxWidth?(m.attr("width","100%"),m.attr("style","max-width: ".concat(k,"px;"))):(m.attr("height",w),m.attr("width",k));var E="".concat(_.x-x," ").concat(_.y-x," ").concat(k," ").concat(w);for(f.debug("viewBox ".concat(E)),m.attr("viewBox",E),zt.indexNodes("subGraph"+g),g=0;g<l.length;g++)if("undefined"!==(i=l[g]).title){var T=document.querySelectorAll("#"+e+' [id="'+i.id+'"] rect'),C=document.querySelectorAll("#"+e+' [id="'+i.id+'"]'),A=T[0].x.baseVal.value,S=T[0].y.baseVal.value,M=T[0].width.baseVal.value,O=Object(s.select)(C[0]).select(".label");O.attr("transform","translate(".concat(A+M/2,", ").concat(S+14,")")),O.attr("id",e+"Text");for(var D=0;D<i.classes.length;D++)C[0].classList.add(i.classes[D])}a.htmlLabels;for(var N=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),B=0;B<N.length;B++){var L=N[B],F=L.getBBox(),P=document.createElementNS("http://www.w3.org/2000/svg","rect");P.setAttribute("rx",0),P.setAttribute("ry",0),P.setAttribute("width",F.width),P.setAttribute("height",F.height),L.insertBefore(P,L.firstChild)}Object.keys(d).forEach((function(t){var n=d[t];if(n.link){var r=Object(s.select)("#"+e+' [id="'+t+'"]');if(r){var i=document.createElementNS("http://www.w3.org/2000/svg","a");i.setAttributeNS("http://www.w3.org/2000/svg","class",n.classes.join(" ")),i.setAttributeNS("http://www.w3.org/2000/svg","href",n.link),i.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),n.linkTarget&&i.setAttributeNS("http://www.w3.org/2000/svg","target",n.linkTarget);var a=r.insert((function(){return i}),":first-child"),o=r.select(".label-container");o&&a.append((function(){return o.node()}));var c=r.select(".label");c&&a.append((function(){return c.node()}))}}}))},de=n(18),pe=n.n(de),ge={extension:function(t,e,n){f.trace("Making markers for ",n),t.append("defs").append("marker").attr("id",e+"-extensionStart").attr("class","marker extension "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),t.append("defs").append("marker").attr("id",e+"-extensionEnd").attr("class","marker extension "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z")},composition:function(t,e){t.append("defs").append("marker").attr("id",e+"-compositionStart").attr("class","marker composition "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-compositionEnd").attr("class","marker composition "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},aggregation:function(t,e){t.append("defs").append("marker").attr("id",e+"-aggregationStart").attr("class","marker aggregation "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-aggregationEnd").attr("class","marker aggregation "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z")},dependency:function(t,e){t.append("defs").append("marker").attr("id",e+"-dependencyStart").attr("class","marker dependency "+e).attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),t.append("defs").append("marker").attr("id",e+"-dependencyEnd").attr("class","marker dependency "+e).attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},point:function(t,e){t.append("marker").attr("id",e+"-pointEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-pointStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",0).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 5 L 10 10 L 10 0 z").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},circle:function(t,e){t.append("marker").attr("id",e+"-circleEnd").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",11).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-circleStart").attr("class","marker "+e).attr("viewBox","0 0 10 10").attr("refX",-1).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("circle").attr("cx","5").attr("cy","5").attr("r","5").attr("class","arrowMarkerPath").style("stroke-width",1).style("stroke-dasharray","1,0")},cross:function(t,e){t.append("marker").attr("id",e+"-crossEnd").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",12).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0"),t.append("marker").attr("id",e+"-crossStart").attr("class","marker cross "+e).attr("viewBox","0 0 11 11").attr("refX",-1).attr("refY",5.2).attr("markerUnits","userSpaceOnUse").attr("markerWidth",11).attr("markerHeight",11).attr("orient","auto").append("path").attr("d","M 1,1 l 9,9 M 10,1 l -9,9").attr("class","arrowMarkerPath").style("stroke-width",2).style("stroke-dasharray","1,0")},barb:function(t,e){t.append("defs").append("marker").attr("id",e+"-barbEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",14).attr("markerUnits","strokeWidth").attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")}},ye=function(t,e,n,r){e.forEach((function(e){ge[e](t,n,r)}))};var ve=function(t,e,n,r){var i=t||"";if(mt().flowchart.htmlLabels)return i=i.replace(/\\n|\n/g,"<br />"),f.info("vertexText"+i),function(t){var e,n,r=Object(s.select)(document.createElementNS("http://www.w3.org/2000/svg","foreignObject")),i=r.append("xhtml:div"),a=t.label,o=t.isNode?"nodeLabel":"edgeLabel";return i.html('<span class="'+o+'">'+a+"</span>"),e=i,(n=t.labelStyle)&&e.attr("style",n),i.style("display","inline-block"),i.style("white-space","nowrap"),i.attr("xmlns","http://www.w3.org/1999/xhtml"),r.node()}({isNode:r,label:i.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")}))});var a=document.createElementNS("http://www.w3.org/2000/svg","text");a.setAttribute("style",e.replace("color:","fill:"));var o=[];o="string"==typeof i?i.split(/\\n|\n|<br\s*\/?>/gi):Array.isArray(i)?i:[];for(var c=0;c<o.length;c++){var u=document.createElementNS("http://www.w3.org/2000/svg","tspan");u.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),u.setAttribute("dy","1em"),u.setAttribute("x","0"),n?u.setAttribute("class","title-row"):u.setAttribute("class","row"),u.textContent=o[c].trim(),a.appendChild(u)}return a},me=function(t,e,n,r){var i;i=n||"node default";var a=t.insert("g").attr("class",i).attr("id",e.id),o=a.insert("g").attr("class","label"),c=o.node().appendChild(ve(e.labelText,e.labelStyle,!1,r)),u=c.getBBox();if(mt().flowchart.htmlLabels){var l=c.children[0],h=Object(s.select)(c);u=l.getBoundingClientRect(),h.attr("width",u.width),h.attr("height",u.height)}var f=e.padding/2;return o.attr("transform","translate("+-u.width/2+", "+-u.height/2+")"),{shapeSvg:a,bbox:u,halfPadding:f,label:o}},be=function(t,e){var n=e.node().getBBox();t.width=n.width,t.height=n.height};function xe(t,e,n,r){return t.insert("polygon",":first-child").attr("points",r.map((function(t){return t.x+","+t.y})).join(" ")).attr("class","label-container").attr("transform","translate("+-e/2+","+n/2+")")}var _e={},ke={},we={},Ee=function(t,e){return f.debug("In isDecendant",e," ",t," = ",ke[e].indexOf(t)>=0),ke[e].indexOf(t)>=0},Te=function t(e,n,r,i){f.info("Copying children of ",e,"root",i,"data",n.node(e),i);var a=n.children(e)||[];e!==i&&a.push(e),f.debug("Copying (nodes) clusterId",e,"nodes",a),a.forEach((function(a){if(n.children(a).length>0)t(a,n,r,i);else{var o=n.node(a);f.info("cp ",a," to ",i," with parent ",e),r.setNode(a,o),f.debug("Setting parent",a,n.parent(a)),i!==n.parent(a)&&r.setParent(a,n.parent(a)),e!==i&&a!==e?(f.debug("Setting parent",a,e),r.setParent(a,e)):(f.info("In copy ",e,"root",i,"data",n.node(e),i),f.debug("Not Setting parent for node=",a,"cluster!==rootId",e!==i,"node!==clusterId",a!==e));var s=n.edges(a);f.debug("Copying Edges",s),s.forEach((function(t){f.info("Edge",t);var a=n.edge(t.v,t.w,t.name);f.info("Edge data",a,i);try{!function(t,e){return f.info("Decendants of ",e," is ",ke[e]),f.info("Edge is ",t),t.v!==e&&(t.w!==e&&(ke[e]?(f.info("Here "),ke[e].indexOf(t.v)>=0||(!!Ee(t.v,e)||(!!Ee(t.w,e)||ke[e].indexOf(t.w)>=0))):(f.debug("Tilt, ",e,",not in decendants"),!1)))}(t,i)?f.info("Skipping copy of edge ",t.v,"--\x3e",t.w," rootId: ",i," clusterId:",e):(f.info("Copying as ",t.v,t.w,a,t.name),r.setEdge(t.v,t.w,a,t.name),f.info("newGraph edges ",r.edges(),r.edge(r.edges()[0])))}catch(t){f.error(t)}}))}f.debug("Removing node",a),n.removeNode(a)}))},Ce=function t(e,n){f.trace("Searching",e);var r=n.children(e);if(f.trace("Searching children of id ",e,r),r.length<1)return f.trace("This is a valid node",e),e;for(var i=0;i<r.length;i++){var a=t(r[i],n);if(a)return f.trace("Found replacement for",e," => ",a),a}},Ae=function(t){return _e[t]&&_e[t].externalConnections&&_e[t]?_e[t].id:t},Se=function(t,e){!t||e>10?f.debug("Opting out, no graph "):(f.debug("Opting in, graph "),t.nodes().forEach((function(e){t.children(e).length>0&&(f.warn("Cluster identified",e," Replacement id in edges: ",Ce(e,t)),ke[e]=function t(e,n){for(var r=n.children(e),i=[].concat(r),a=0;a<r.length;a++)we[r[a]]=e,i=i.concat(t(r[a],n));return i}(e,t),_e[e]={id:Ce(e,t),clusterData:t.node(e)})})),t.nodes().forEach((function(e){var n=t.children(e),r=t.edges();n.length>0&&(f.debug("Cluster identified",e,ke),r.forEach((function(t){t.v!==e&&t.w!==e&&(Ee(t.v,e)^Ee(t.w,e)&&(f.debug("Edge: ",t," leaves cluster ",e),f.debug("Decendants of ",e,": ",ke[e]),_e[e].externalConnections=!0))})))})),Me(t,0),t.edges().forEach((function(e){var n=t.edge(e);f.trace("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(e)),f.trace("Edge "+e.v+" -> "+e.w+": "+JSON.stringify(t.edge(e)));var r=e.v,i=e.w;f.trace("Fix",_e,"ids:",e.v,e.w,"Translateing: ",_e[e.v],_e[e.w]),(_e[e.v]||_e[e.w])&&(f.warn("Fixing and trixing - removing",e.v,e.w,e.name),r=Ae(e.v),i=Ae(e.w),t.removeEdge(e.v,e.w,e.name),r!==e.v&&(n.fromCluster=e.v),i!==e.w&&(n.toCluster=e.w),f.warn("Replacing with",r,i,e.name),t.setEdge(r,i,n,e.name))})),f.warn("Adjusted Graph",W.a.json.write(t)),f.trace(_e))},Me=function t(e,n){if(f.debug("extractor - ",n,W.a.json.write(e),e.children("D")),n>10)f.error("Bailing out");else{for(var r=e.nodes(),i=!1,a=0;a<r.length;a++){var o=r[a],s=e.children(o);i=i||s.length>0}if(i){f.debug("Nodes = ",r,n);for(var c=0;c<r.length;c++){var u=r[c];if(f.debug("Extracting node",u,_e,_e[u]&&!_e[u].externalConnections,!e.parent(u),e.node(u),e.children("D")," Depth ",n),_e[u])if(!_e[u].externalConnections&&!e.parent(u)&&e.children(u)&&e.children(u).length>0){f.debug("Cluster without external connections, without a parent and with children",u,n);var l=e.graph(),h=new W.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:"TB"===l.rankdir?"LR":"TB",nodesep:50,ranksep:50,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));f.debug("Old graph before copy",W.a.json.write(e)),Te(u,e,h,u),e.setNode(u,{clusterNode:!0,id:u,clusterData:_e[u].clusterData,labelText:_e[u].labelText,graph:h}),f.debug("New graph after copy",W.a.json.write(h)),f.debug("Old graph after copy",W.a.json.write(e))}else f.debug("Cluster ** ",u," **not meeting the criteria !externalConnections:",!_e[u].externalConnections," no parent: ",!e.parent(u)," children ",e.children(u)&&e.children(u).length>0,e.children("D"),n),f.debug(_e);else f.debug("Not a cluster",u,n)}r=e.nodes(),f.debug("New list of nodes",r);for(var d=0;d<r.length;d++){var p=r[d],g=e.node(p);f.debug(" Now next leveö",p,g),g.clusterNode&&t(g.graph,n+1)}}else f.debug("Done, no node has children",e.nodes())}},Oe=n(170);var De=function(t,e,n,r){var i=t.x,a=t.y,o=i-r.x,s=a-r.y,c=Math.sqrt(e*e*s*s+n*n*o*o),u=Math.abs(e*n*o/c);r.x<i&&(u=-u);var l=Math.abs(e*n*s/c);return r.y<a&&(l=-l),{x:i+u,y:a+l}};var Ne=function(t,e,n){return De(t,e,e,n)};function Be(t,e){return t*e>0}var Le=function(t,e,n,r){var i,a,o,s,c,u,l,h,f,d,p,g,y;if(i=e.y-t.y,o=t.x-e.x,c=e.x*t.y-t.x*e.y,f=i*n.x+o*n.y+c,d=i*r.x+o*r.y+c,!(0!==f&&0!==d&&Be(f,d)||(a=r.y-n.y,s=n.x-r.x,u=r.x*n.y-n.x*r.y,l=a*t.x+s*t.y+u,h=a*e.x+s*e.y+u,0!==l&&0!==h&&Be(l,h)||0==(p=i*s-a*o))))return g=Math.abs(p/2),{x:(y=o*u-s*c)<0?(y-g)/p:(y+g)/p,y:(y=a*c-i*u)<0?(y-g)/p:(y+g)/p}},Fe=function(t,e,n){var r=t.x,i=t.y,a=[],o=Number.POSITIVE_INFINITY,s=Number.POSITIVE_INFINITY;"function"==typeof e.forEach?e.forEach((function(t){o=Math.min(o,t.x),s=Math.min(s,t.y)})):(o=Math.min(o,e.x),s=Math.min(s,e.y));for(var c=r-t.width/2-o,u=i-t.height/2-s,l=0;l<e.length;l++){var h=e[l],f=e[l<e.length-1?l+1:0],d=Le(t,n,{x:c+h.x,y:u+h.y},{x:c+f.x,y:u+f.y});d&&a.push(d)}if(!a.length)return t;a.length>1&&a.sort((function(t,e){var r=t.x-n.x,i=t.y-n.y,a=Math.sqrt(r*r+i*i),o=e.x-n.x,s=e.y-n.y,c=Math.sqrt(o*o+s*s);return a<c?-1:a===c?0:1}));return a[0]};var Pe=function(t,e){var n,r,i=t.x,a=t.y,o=e.x-i,s=e.y-a,c=t.width/2,u=t.height/2;return Math.abs(s)*c>Math.abs(o)*u?(s<0&&(u=-u),n=0===s?0:u*o/s,r=u):(o<0&&(c=-c),n=c,r=0===o?0:c*s/o),{x:i+n,y:a+r}},Ie={node:n.n(Oe).a,circle:Ne,ellipse:De,polygon:Fe,rect:Pe},je=function(t,e,n){var r=t.insert("g").attr("class","node default").attr("id",e.id),i=70,a=10;"LR"===n&&(i=10,a=70);var o=r.append("rect").style("stroke","black").style("fill","black").attr("x",-1*i/2).attr("y",-1*a/2).attr("width",i).attr("height",a).attr("class","fork-join");return be(e,o),e.height=e.height+e.padding/2,e.width=e.width+e.padding/2,e.intersect=function(t){return Ie.rect(e,t)},r},Re={question:function(t,e){var n=me(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding+(i.height+e.padding),o=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}];f.info("Question main (Circle)");var s=xe(r,a,a,o);return be(e,s),e.intersect=function(t){return f.warn("Intersect called"),Ie.polygon(e,o,t)},r},rect:function(t,e){var n=me(t,e,"node "+e.classes,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding;f.trace("Classes = ",e.classes);var o=r.insert("rect",":first-child");return o.attr("class","basic label-container").attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),be(e,o),e.intersect=function(t){return Ie.rect(e,t)},r},rectWithTitle:function(t,e){var n;n=e.classes?"node "+e.classes:"node default";var r=t.insert("g").attr("class",n).attr("id",e.id),i=r.insert("rect",":first-child"),a=r.insert("line"),o=r.insert("g").attr("class","label"),c=e.labelText.flat();f.info("Label text",c[0]);var u,l=o.node().appendChild(ve(c[0],e.labelStyle,!0,!0));if(mt().flowchart.htmlLabels){var h=l.children[0],d=Object(s.select)(l);u=h.getBoundingClientRect(),d.attr("width",u.width),d.attr("height",u.height)}f.info("Text 2",c);var p=c.slice(1,c.length),g=l.getBBox(),y=o.node().appendChild(ve(p.join("<br/>"),e.labelStyle,!0,!0));if(mt().flowchart.htmlLabels){var v=y.children[0],m=Object(s.select)(y);u=v.getBoundingClientRect(),m.attr("width",u.width),m.attr("height",u.height)}var b=e.padding/2;return Object(s.select)(y).attr("transform","translate( "+(u.width>g.width?0:(g.width-u.width)/2)+", "+(g.height+b+5)+")"),Object(s.select)(l).attr("transform","translate( "+(u.width<g.width?0:-(g.width-u.width)/2)+", 0)"),u=o.node().getBBox(),o.attr("transform","translate("+-u.width/2+", "+(-u.height/2-b+3)+")"),i.attr("class","outer title-state").attr("x",-u.width/2-b).attr("y",-u.height/2-b).attr("width",u.width+e.padding).attr("height",u.height+e.padding),a.attr("class","divider").attr("x1",-u.width/2-b).attr("x2",u.width/2+b).attr("y1",-u.height/2-b+g.height+b).attr("y2",-u.height/2-b+g.height+b),be(e,i),e.intersect=function(t){return Ie.rect(e,t)},r},circle:function(t,e){var n=me(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding,o=r.insert("circle",":first-child");return o.attr("rx",e.rx).attr("ry",e.ry).attr("r",i.width/2+a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),f.info("Circle main"),be(e,o),e.intersect=function(t){return f.info("Circle intersect",e,i.width/2+a,t),Ie.circle(e,i.width/2+a,t)},r},stadium:function(t,e){var n=me(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.height+e.padding,o=i.width+a/4+e.padding,s=r.insert("rect",":first-child").attr("rx",a/2).attr("ry",a/2).attr("x",-o/2).attr("y",-a/2).attr("width",o).attr("height",a);return be(e,s),e.intersect=function(t){return Ie.rect(e,t)},r},hexagon:function(t,e){var n=me(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.height+e.padding,o=a/4,s=i.width+2*o+e.padding,c=xe(r,s,a,[{x:o,y:0},{x:s-o,y:0},{x:s,y:-a/2},{x:s-o,y:-a},{x:o,y:-a},{x:0,y:-a/2}]);return be(e,c),e.intersect=function(t){return Ie.polygon(e,t)},r},rect_left_inv_arrow:function(t,e){var n=me(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=xe(r,a,o,[{x:-o/2,y:0},{x:a,y:0},{x:a,y:-o},{x:-o/2,y:-o},{x:0,y:-o/2}]);return be(e,s),e.intersect=function(t){return Ie.polygon(e,t)},r},lean_right:function(t,e){var n=me(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=xe(r,a,o,[{x:-2*o/6,y:0},{x:a-o/6,y:0},{x:a+2*o/6,y:-o},{x:o/6,y:-o}]);return be(e,s),e.intersect=function(t){return Ie.polygon(e,t)},r},lean_left:function(t,e){var n=me(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=xe(r,a,o,[{x:2*o/6,y:0},{x:a+o/6,y:0},{x:a-2*o/6,y:-o},{x:-o/6,y:-o}]);return be(e,s),e.intersect=function(t){return Ie.polygon(e,t)},r},trapezoid:function(t,e){var n=me(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=xe(r,a,o,[{x:-2*o/6,y:0},{x:a+2*o/6,y:0},{x:a-o/6,y:-o},{x:o/6,y:-o}]);return be(e,s),e.intersect=function(t){return Ie.polygon(e,t)},r},inv_trapezoid:function(t,e){var n=me(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=xe(r,a,o,[{x:o/6,y:0},{x:a-o/6,y:0},{x:a+2*o/6,y:-o},{x:-2*o/6,y:-o}]);return be(e,s),e.intersect=function(t){return Ie.polygon(e,t)},r},rect_right_inv_arrow:function(t,e){var n=me(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=xe(r,a,o,[{x:0,y:0},{x:a+o/2,y:0},{x:a,y:-o/2},{x:a+o/2,y:-o},{x:0,y:-o}]);return be(e,s),e.intersect=function(t){return Ie.polygon(e,t)},r},cylinder:function(t,e){var n=me(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=a/2,s=o/(2.5+a/50),c=i.height+s+e.padding,u="M 0,"+s+" a "+o+","+s+" 0,0,0 "+a+" 0 a "+o+","+s+" 0,0,0 "+-a+" 0 l 0,"+c+" a "+o+","+s+" 0,0,0 "+a+" 0 l 0,"+-c,l=r.attr("label-offset-y",s).insert("path",":first-child").attr("d",u).attr("transform","translate("+-a/2+","+-(c/2+s)+")");return be(e,l),e.intersect=function(t){var n=Ie.rect(e,t),r=n.x-e.x;if(0!=o&&(Math.abs(r)<e.width/2||Math.abs(r)==e.width/2&&Math.abs(n.y-e.y)>e.height/2-s)){var i=s*s*(1-r*r/(o*o));0!=i&&(i=Math.sqrt(i)),i=s-i,t.y-e.y>0&&(i=-i),n.y+=i}return n},r},start:function(t,e){var n=t.insert("g").attr("class","node default").attr("id",e.id),r=n.insert("circle",":first-child");return r.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),be(e,r),e.intersect=function(t){return Ie.circle(e,7,t)},n},end:function(t,e){var n=t.insert("g").attr("class","node default").attr("id",e.id),r=n.insert("circle",":first-child"),i=n.insert("circle",":first-child");return i.attr("class","state-start").attr("r",7).attr("width",14).attr("height",14),r.attr("class","state-end").attr("r",5).attr("width",10).attr("height",10),be(e,i),e.intersect=function(t){return Ie.circle(e,7,t)},n},note:function(t,e){var n=me(t,e,"node "+e.classes,!0),r=n.shapeSvg,i=n.bbox,a=n.halfPadding;f.info("Classes = ",e.classes);var o=r.insert("rect",":first-child");return o.attr("rx",e.rx).attr("ry",e.ry).attr("x",-i.width/2-a).attr("y",-i.height/2-a).attr("width",i.width+e.padding).attr("height",i.height+e.padding),be(e,o),e.intersect=function(t){return Ie.rect(e,t)},r},subroutine:function(t,e){var n=me(t,e,void 0,!0),r=n.shapeSvg,i=n.bbox,a=i.width+e.padding,o=i.height+e.padding,s=xe(r,a,o,[{x:0,y:0},{x:a,y:0},{x:a,y:-o},{x:0,y:-o},{x:0,y:0},{x:-8,y:0},{x:a+8,y:0},{x:a+8,y:-o},{x:-8,y:-o},{x:-8,y:0}]);return be(e,s),e.intersect=function(t){return Ie.polygon(e,t)},r},fork:je,join:je,class_box:function(t,e){var n,r=e.padding/2;n=e.classes?"node "+e.classes:"node default";var i=t.insert("g").attr("class",n).attr("id",e.id),a=i.insert("rect",":first-child"),o=i.insert("line"),c=i.insert("line"),u=0,l=4,h=i.insert("g").attr("class","label"),f=0,d=e.classData.annotations&&e.classData.annotations[0],p=h.node().appendChild(ve(e.classData.annotations[0],e.labelStyle,!0,!0)),g=p.getBBox();e.classData.annotations[0]&&(l+=g.height+4,u+=g.width);var y=h.node().appendChild(ve(e.labelText,e.labelStyle,!0,!0)),v=y.getBBox();l+=v.height+4,v.width>u&&(u=v.width);var m=[];e.classData.members.forEach((function(t){var n=h.node().appendChild(ve(t,e.labelStyle,!0,!0)),r=n.getBBox();r.width>u&&(u=r.width),l+=r.height+4,m.push(n)}));var b=[];e.classData.methods.forEach((function(t){var n=h.node().appendChild(ve(t,e.labelStyle,!0,!0)),r=n.getBBox();r.width>u&&(u=r.width),l+=r.height+4,b.push(n)})),l+=8,d&&(Object(s.select)(p).attr("transform","translate( "+-(u+e.padding-g.width/2)/2+", "+-1*l/2+")"),f=g.height+4);var x,_=(u-v.width)/2;if(Object(s.select)(y).attr("transform","translate( "+(-1*u/2+_)+", "+(-1*l/2+f)+")"),f+=v.height+4,o.attr("class","divider").attr("x1",-u/2-r).attr("x2",u/2+r).attr("y1",-l/2-r+8+f).attr("y2",-l/2-r+8+f),f+=8,m.forEach((function(t){Object(s.select)(t).attr("transform","translate( "+-u/2+", "+(-1*l/2+f+4)+")"),f+=v.height+4})),c.attr("class","divider").attr("x1",-u/2-r).attr("x2",u/2+r).attr("y1",-l/2-r+8+f).attr("y2",-l/2-r+8+f),f+=8,b.forEach((function(t){Object(s.select)(t).attr("transform","translate( "+-u/2+", "+(-1*l/2+f)+")"),f+=v.height+4})),mt().flowchart.htmlLabels){var k=p.children[0],w=Object(s.select)(p);x=k.getBoundingClientRect(),w.attr("width",x.width),w.attr("height",x.height)}return a.attr("class","outer title-state").attr("x",-u/2-r).attr("y",-l/2-r).attr("width",u+e.padding).attr("height",l+e.padding),be(e,a),e.intersect=function(t){return Ie.rect(e,t)},i}},Ye={},ze=function(t){var e=Ye[t.id];f.trace("Transforming node",t,"translate("+(t.x-t.width/2-5)+", "+(t.y-t.height/2-5)+")");t.clusterNode?e.attr("transform","translate("+(t.x-t.width/2-8)+", "+(t.y-t.height/2-8)+")"):e.attr("transform","translate("+t.x+", "+t.y+")")},Ue={rect:function(t,e){f.trace("Creating subgraph rect for ",e.id,e);var n=t.insert("g").attr("class","cluster").attr("id",e.id),r=n.insert("rect",":first-child"),i=n.insert("g").attr("class","cluster-label"),a=i.node().appendChild(ve(e.labelText,e.labelStyle,void 0,!0)),o=a.getBBox();if(mt().flowchart.htmlLabels){var c=a.children[0],u=Object(s.select)(a);o=c.getBoundingClientRect(),u.attr("width",o.width),u.attr("height",o.height)}var l=0*e.padding,h=l/2;f.trace("Data ",e,JSON.stringify(e)),r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-h).attr("y",e.y-e.height/2-h).attr("width",e.width+l).attr("height",e.height+l),i.attr("transform","translate("+(e.x-o.width/2)+", "+(e.y-e.height/2-e.padding/3+3)+")");var d=r.node().getBBox();return e.width=d.width,e.height=d.height,e.intersect=function(t){return Pe(e,t)},n},roundedWithTitle:function(t,e){var n=t.insert("g").attr("class",e.classes).attr("id",e.id),r=n.insert("rect",":first-child"),i=n.insert("g").attr("class","cluster-label"),a=n.append("rect"),o=i.node().appendChild(ve(e.labelText,e.labelStyle,void 0,!0)),c=o.getBBox();if(mt().flowchart.htmlLabels){var u=o.children[0],l=Object(s.select)(o);c=u.getBoundingClientRect(),l.attr("width",c.width),l.attr("height",c.height)}c=o.getBBox();var h=0*e.padding,f=h/2;r.attr("class","outer").attr("x",e.x-e.width/2-f).attr("y",e.y-e.height/2-f).attr("width",e.width+h).attr("height",e.height+h),a.attr("class","inner").attr("x",e.x-e.width/2-f).attr("y",e.y-e.height/2-f+c.height-1).attr("width",e.width+h).attr("height",e.height+h-c.height-3),i.attr("transform","translate("+(e.x-c.width/2)+", "+(e.y-e.height/2-e.padding/3+(mt().flowchart.htmlLabels?5:3))+")");var d=r.node().getBBox();return e.width=d.width,e.height=d.height,e.intersect=function(t){return Pe(e,t)},n},noteGroup:function(t,e){var n=t.insert("g").attr("class","note-cluster").attr("id",e.id),r=n.insert("rect",":first-child"),i=0*e.padding,a=i/2;r.attr("rx",e.rx).attr("ry",e.ry).attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2-a).attr("width",e.width+i).attr("height",e.height+i).attr("fill","none");var o=r.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return Pe(e,t)},n},divider:function(t,e){var n=t.insert("g").attr("class",e.classes).attr("id",e.id),r=n.insert("rect",":first-child"),i=0*e.padding,a=i/2;r.attr("class","divider").attr("x",e.x-e.width/2-a).attr("y",e.y-e.height/2).attr("width",e.width+i).attr("height",e.height+i);var o=r.node().getBBox();return e.width=o.width,e.height=o.height,e.intersect=function(t){return Pe(e,t)},n}},$e={},We={},Ve=function(t,e){var n=t.x,r=t.y,i=Math.abs(e.x-n),a=Math.abs(e.y-r),o=t.width/2,s=t.height/2;return i>=o||a>=s},He=function(t,e,n){f.warn("intersection calc o:",e," i:",n,t);var r=t.x,i=t.y,a=Math.abs(r-n.x),o=t.width/2,s=n.x<e.x?o-a:o+a,c=t.height/2,u=r-o,l=r+o,h=i-c,d=i+c;if(e.x===u||e.x===l||e.y===h||e.y===d)return f.warn("calc equals on edge"),e;var p=Math.abs(e.y-n.y),g=Math.abs(e.x-n.x);if(Math.abs(i-e.y)*o>Math.abs(r-e.x)*c){var y=n.y<e.y?e.y-c-i:i-c-e.y;s=g*y/p;var v={x:n.x<e.x?n.x+g-s:n.x-s,y:e.y+y};return f.warn("topp/bott calc, Q ".concat(p,", q ").concat(y,", R ").concat(g,", r ").concat(s),v),v}var m=m=p*(s=n.x<e.x?e.x-o-r:r-o-e.x)/g;return f.warn("sides calc, Q ".concat(p,", q ").concat(m,", R ").concat(g,", r ").concat(s),{x:n.x<e.x?n.x+g-s:n.x+a-o,y:n.y<e.y?n.y+m:n.y-m}),{x:n.x<e.x?n.x+g-s:n.x+a-o,y:n.y<e.y?n.y+m:n.y-m}},Ge=function t(e,n,r,i){f.info("Graph in recursive render:",W.a.json.write(n),i);var a=n.graph().rankdir;f.warn("Dir in recursive render - dir:",a);var o=e.insert("g").attr("class","root");n.nodes()?f.info("Recursive render",n.nodes()):f.info("No nodes found for",n),n.edges().length>0&&f.info("Recursive edges",n.edge(n.edges()[0]));var c=o.insert("g").attr("class","clusters"),u=o.insert("g").attr("class","edgePaths"),l=o.insert("g").attr("class","edgeLabels"),h=o.insert("g").attr("class","nodes");return n.nodes().forEach((function(e){var o=n.node(e);if(void 0!==i){var s=JSON.parse(JSON.stringify(i.clusterData));f.info("Setting data for cluster",s),n.setNode(i.id,s),n.setParent(e,i.id,s)}if(f.info("(Insert) Node "+e+": "+JSON.stringify(n.node(e))),o&&o.clusterNode){f.info("Cluster identified",e,o,n.node(e));var c=t(h,o.graph,r,n.node(e));be(o,c),function(t,e){Ye[e.id]=t}(c,o),f.warn("Recursive render complete",c,o)}else n.children(e).length>0?(f.info("Cluster - the non recursive path",e,o.id,o,n),f.info(Ce(o.id,n)),_e[o.id]={id:Ce(o.id,n),node:o}):(f.info("Node - the non recursive path",e,o.id,o),function(t,e,n){Ye[e.id]=Re[e.shape](t,e,n)}(h,n.node(e),a))})),n.edges().forEach((function(t){var e=n.edge(t.v,t.w,t.name);f.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t)),f.info("Edge "+t.v+" -> "+t.w+": ",t," ",JSON.stringify(n.edge(t))),f.info("Fix",_e,"ids:",t.v,t.w,"Translateing: ",_e[t.v],_e[t.w]),function(t,e){var n=ve(e.label,e.labelStyle),r=t.insert("g").attr("class","edgeLabel"),i=r.insert("g").attr("class","label");i.node().appendChild(n);var a=n.getBBox();if(mt().flowchart.htmlLabels){var o=n.children[0],c=Object(s.select)(n);a=o.getBoundingClientRect(),c.attr("width",a.width),c.attr("height",a.height)}i.attr("transform","translate("+-a.width/2+", "+-a.height/2+")"),We[e.id]=r,e.width=a.width,e.height=a.height}(l,e)})),n.edges().forEach((function(t){f.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(t))})),f.info("#############################################"),f.info("### Layout ###"),f.info("#############################################"),f.info(n),pe.a.layout(n),f.info("Graph after layout:",W.a.json.write(n)),n.nodes().forEach((function(t){var e=n.node(t);f.info("Position "+t+": "+JSON.stringify(n.node(t))),f.info("Position "+t+": ("+e.x,","+e.y,") width: ",e.width," height: ",e.height),e&&e.clusterNode?ze(e):n.children(t).length>0?(!function(t,e){f.trace("Inserting cluster");var n=e.shape||"rect";$e[e.id]=Ue[n](t,e)}(c,e),_e[e.id].node=e):ze(e)})),n.edges().forEach((function(t){var e=n.edge(t);f.info("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(e),e);var i=function(t,e,n,r,i,a){var o=n.points,c=!1,u=a.node(e.v),l=a.node(e.w);if(l.intersect&&u.intersect&&((o=o.slice(1,n.points.length-1)).unshift(u.intersect(o[0])),f.info("Last point",o[o.length-1],l,l.intersect(o[o.length-1])),o.push(l.intersect(o[o.length-1]))),n.toCluster){var h;f.trace("edge",n),f.trace("to cluster",r[n.toCluster]),o=[];var d=!1;n.points.forEach((function(t){var e=r[n.toCluster].node;if(Ve(e,t)||d)d||o.push(t);else{f.trace("inside",n.toCluster,t,h);var i=He(e,h,t),a=!1;o.forEach((function(t){a=a||t.x===i.x&&t.y===i.y})),o.find((function(t){return t.x===i.x&&t.y===i.y}))?f.warn("no intersect",i,o):o.push(i),d=!0}h=t})),c=!0}if(n.fromCluster){f.trace("edge",n),f.warn("from cluster",r[n.fromCluster]);for(var p,g=[],y=!1,v=o.length-1;v>=0;v--){var m=o[v],b=r[n.fromCluster].node;if(Ve(b,m)||y)f.trace("Outside point",m),y||g.unshift(m);else{f.warn("inside",n.fromCluster,m,b);var x=He(b,p,m);g.unshift(x),y=!0}p=m}o=g,c=!0}var _,k=o.filter((function(t){return!Number.isNaN(t.y)})),w=Object(s.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(s.curveBasis);switch(n.thickness){case"normal":_="edge-thickness-normal";break;case"thick":_="edge-thickness-thick";break;default:_=""}switch(n.pattern){case"solid":_+=" edge-pattern-solid";break;case"dotted":_+=" edge-pattern-dotted";break;case"dashed":_+=" edge-pattern-dashed"}var E=t.append("path").attr("d",w(k)).attr("id",n.id).attr("class"," "+_+(n.classes?" "+n.classes:"")),T="";switch(mt().state.arrowMarkerAbsolute&&(T=(T=(T=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),f.info("arrowTypeStart",n.arrowTypeStart),f.info("arrowTypeEnd",n.arrowTypeEnd),n.arrowTypeStart){case"arrow_cross":E.attr("marker-start","url("+T+"#"+i+"-crossStart)");break;case"arrow_point":E.attr("marker-start","url("+T+"#"+i+"-pointStart)");break;case"arrow_barb":E.attr("marker-start","url("+T+"#"+i+"-barbStart)");break;case"arrow_circle":E.attr("marker-start","url("+T+"#"+i+"-circleStart)");break;case"aggregation":E.attr("marker-start","url("+T+"#"+i+"-aggregationStart)");break;case"extension":E.attr("marker-start","url("+T+"#"+i+"-extensionStart)");break;case"composition":E.attr("marker-start","url("+T+"#"+i+"-compositionStart)");break;case"dependency":E.attr("marker-start","url("+T+"#"+i+"-dependencyStart)")}switch(n.arrowTypeEnd){case"arrow_cross":E.attr("marker-end","url("+T+"#"+i+"-crossEnd)");break;case"arrow_point":E.attr("marker-end","url("+T+"#"+i+"-pointEnd)");break;case"arrow_barb":E.attr("marker-end","url("+T+"#"+i+"-barbEnd)");break;case"arrow_circle":E.attr("marker-end","url("+T+"#"+i+"-circleEnd)");break;case"aggregation":E.attr("marker-end","url("+T+"#"+i+"-aggregationEnd)");break;case"extension":E.attr("marker-end","url("+T+"#"+i+"-extensionEnd)");break;case"composition":E.attr("marker-end","url("+T+"#"+i+"-compositionEnd)");break;case"dependency":E.attr("marker-end","url("+T+"#"+i+"-dependencyEnd)")}if(c)return o}(u,t,e,_e,r,n);!function(t,e){if(f.info("Moving label",t.id,t.label,We[t.id]),t.label){var n=We[t.id],r=t.x,i=t.y;if(e){var a=U.calcLabelPosition(e);r=a.x,i=a.y}n.attr("transform","translate("+r+", "+i+")")}}(e,i)})),o},qe=function(t,e,n,r,i){ye(t,n,r,i),Ye={},We={},$e={},ke={},we={},_e={},f.warn("Graph before:",W.a.json.write(e)),Se(e),f.warn("Graph after:",W.a.json.write(e)),f.warn("Graph ever after:",e.graph()),Ge(t,e,r)},Xe={},Ze=function(t,e,n){var r=Object(s.select)('[id="'.concat(n,'"]'));Object.keys(t).forEach((function(n){var i=t[n],a="default";i.classes.length>0&&(a=i.classes.join(" "));var o,s=N(i.styles),c=void 0!==i.text?i.text:i.id;if(mt().flowchart.htmlLabels){var u={label:c.replace(/fa[lrsb]?:fa-[\w-]+/g,(function(t){return"<i class='".concat(t.replace(":"," "),"'></i>")}))};(o=Gt()(r,u).node()).parentNode.removeChild(o)}else{var l=document.createElementNS("http://www.w3.org/2000/svg","text");l.setAttribute("style",s.labelStyle.replace("color:","fill:"));for(var h=c.split(x.lineBreakRegex),d=0;d<h.length;d++){var p=document.createElementNS("http://www.w3.org/2000/svg","tspan");p.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),p.setAttribute("dy","1em"),p.setAttribute("x","1"),p.textContent=h[d],l.appendChild(p)}o=l}var g=0,y="";switch(i.type){case"round":g=5,y="rect";break;case"square":y="rect";break;case"diamond":y="question";break;case"hexagon":y="hexagon";break;case"odd":y="rect_left_inv_arrow";break;case"lean_right":y="lean_right";break;case"lean_left":y="lean_left";break;case"trapezoid":y="trapezoid";break;case"inv_trapezoid":y="inv_trapezoid";break;case"odd_right":y="rect_left_inv_arrow";break;case"circle":y="circle";break;case"ellipse":y="ellipse";break;case"stadium":y="stadium";break;case"subroutine":y="subroutine";break;case"cylinder":y="cylinder";break;case"group":y="rect";break;default:y="rect"}e.setNode(i.id,{labelStyle:s.labelStyle,shape:y,labelText:c,rx:g,ry:g,class:a,style:s.style,id:i.id,width:"group"===i.type?500:void 0,type:i.type,padding:mt().flowchart.padding}),f.info("setNode",{labelStyle:s.labelStyle,shape:y,labelText:c,rx:g,ry:g,class:a,style:s.style,id:i.id,width:"group"===i.type?500:void 0,type:i.type,padding:mt().flowchart.padding})}))},Je=function(t,e){var n,r,i=0;if(void 0!==t.defaultStyle){var a=N(t.defaultStyle);n=a.style,r=a.labelStyle}t.forEach((function(a){i++;var o="L-"+a.start+"-"+a.end,c="LS-"+a.start,u="LE-"+a.end,l={};switch(l.minlen=a.length||1,"arrow_open"===a.type?l.arrowhead="none":l.arrowhead="normal",l.arrowTypeStart="arrow_open",l.arrowTypeEnd="arrow_open",a.type){case"double_arrow_cross":l.arrowTypeStart="arrow_cross";case"arrow_cross":l.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":l.arrowTypeStart="arrow_point";case"arrow_point":l.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":l.arrowTypeStart="arrow_circle";case"arrow_circle":l.arrowTypeEnd="arrow_circle"}var h="",f="";if(void 0!==a.style){var d=N(a.style);h=d.style,f=d.labelStyle}else switch(a.stroke){case"normal":h="fill:none",void 0!==n&&(h=n),void 0!==r&&(f=r),l.thickness="normal",l.pattern="solid";break;case"dotted":l.thickness="normal",l.pattern="dotted";break;case"thick":l.thickness="thick",l.pattern="solid"}l.style=h,l.labelStyle=f,void 0!==a.interpolate?l.curve=O(a.interpolate,s.curveLinear):void 0!==t.defaultInterpolate?l.curve=O(t.defaultInterpolate,s.curveLinear):l.curve=O(Xe.curve,s.curveLinear),void 0===a.text?void 0!==a.style&&(l.arrowheadStyle="fill: #333"):(l.arrowheadStyle="fill: #333",l.labelpos="c",mt().flowchart.htmlLabels,l.labelType="text",l.label=a.text.replace(x.lineBreakRegex,"\n"),void 0===a.style&&(l.style=l.style||"stroke: #333; stroke-width: 1.5px;fill:none"),l.labelStyle=l.labelStyle.replace("color:","fill:")),l.id=o,l.classes="flowchart-link "+c+" "+u,e.setEdge(a.start,a.end,l,i)}))},Qe=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)Xe[e[n]]=t[e[n]]},Ke=function(t,e){f.info("Drawing flowchart"),zt.clear();var n=$t.a.parser;n.yy=zt,n.parse(t);var r=zt.getDirection();void 0===r&&(r="TD");var i,a=mt().flowchart,o=a.nodeSpacing||50,c=a.rankSpacing||50,u=new W.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:r,nodesep:o,ranksep:c,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),l=zt.getSubGraphs();f.info("Subgraphs - ",l);for(var h=l.length-1;h>=0;h--)i=l[h],f.info("Subgraph - ",i),zt.addVertex(i.id,i.title,"group",void 0,i.classes);var d=zt.getVertices(),p=zt.getEdges();f.info(p);var g=0;for(g=l.length-1;g>=0;g--){i=l[g],Object(s.selectAll)("cluster").append("text");for(var y=0;y<i.nodes.length;y++)u.setParent(i.nodes[y],i.id)}Ze(d,u,e),Je(p,u);var v=Object(s.select)('[id="'.concat(e,'"]'));v.attr("xmlns:xlink","http://www.w3.org/1999/xlink");var m=Object(s.select)("#"+e+" g");qe(m,u,["point","circle","cross"],"flowchart",e),m.selectAll("g.node").attr("title",(function(){return zt.getTooltip(this.id)}));var b=a.diagramPadding,x=v.node().getBBox(),_=x.width+2*b,k=x.height+2*b;if(f.debug("new ViewBox 0 0 ".concat(_," ").concat(k),"translate(".concat(b-u._label.marginx,", ").concat(b-u._label.marginy,")")),a.useMaxWidth?(v.attr("width","100%"),v.attr("style","max-width: ".concat(_,"px;"))):(v.attr("height",k),v.attr("width",_)),v.attr("viewBox","0 0 ".concat(_," ").concat(k)),v.select("g").attr("transform","translate(".concat(b-u._label.marginx,", ").concat(b-x.y,")")),zt.indexNodes("subGraph"+g),!a.htmlLabels)for(var w=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),E=0;E<w.length;E++){var T=w[E],C=T.getBBox(),A=document.createElementNS("http://www.w3.org/2000/svg","rect");A.setAttribute("rx",0),A.setAttribute("ry",0),A.setAttribute("width",C.width),A.setAttribute("height",C.height),T.insertBefore(A,T.firstChild)}Object.keys(d).forEach((function(t){var n=d[t];if(n.link){var r=Object(s.select)("#"+e+' [id="'+t+'"]');if(r){var i=document.createElementNS("http://www.w3.org/2000/svg","a");i.setAttributeNS("http://www.w3.org/2000/svg","class",n.classes.join(" ")),i.setAttributeNS("http://www.w3.org/2000/svg","href",n.link),i.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),n.linkTarget&&i.setAttributeNS("http://www.w3.org/2000/svg","target",n.linkTarget);var a=r.insert((function(){return i}),":first-child"),o=r.select(".label-container");o&&a.append((function(){return o.node()}));var c=r.select(".label");c&&a.append((function(){return c.node()}))}}}))},tn=function(t,e){var n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},en=function(t,e){var n=0,r=0,i=e.wrap?e.text.split(x.lineBreakRegex):[e.text.replace(x.lineBreakRegex," ")],a=[],o=0,s=function(){return e.y};if(void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0)switch(e.valign){case"top":case"start":s=function(){return Math.round(e.y+e.textMargin)};break;case"middle":case"center":s=function(){return Math.round(e.y+(n+r+e.textMargin)/2)};break;case"bottom":case"end":s=function(){return Math.round(e.y+(n+r+2*e.textMargin)-e.textMargin)}}if(void 0!==e.anchor&&void 0!==e.textMargin&&void 0!==e.width)switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="text-after-edge",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="text-before-edge",e.alignmentBaseline="middle"}for(var c=0;c<i.length;c++){var u=i[c];void 0!==e.textMargin&&0===e.textMargin&&void 0!==e.fontSize&&(o=c*e.fontSize);var l=t.append("text");if(l.attr("x",e.x),l.attr("y",s()),void 0!==e.anchor&&l.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),void 0!==e.fontFamily&&l.style("font-family",e.fontFamily),void 0!==e.fontSize&&l.style("font-size",e.fontSize),void 0!==e.fontWeight&&l.style("font-weight",e.fontWeight),void 0!==e.fill&&l.attr("fill",e.fill),void 0!==e.class&&l.attr("class",e.class),void 0!==e.dy?l.attr("dy",e.dy):0!==o&&l.attr("dy",o),e.tspan){var h=l.append("tspan");h.attr("x",e.x),void 0!==e.fill&&h.attr("fill",e.fill),h.text(u)}else l.text(u);void 0!==e.valign&&void 0!==e.textMargin&&e.textMargin>0&&(r+=(l._groups||l)[0][0].getBBox().height,n=r),a.push(l)}return a},nn=function(t,e){var n,r,i,a,o,s=t.append("polygon");return s.attr("points",(n=e.x,r=e.y,i=e.width,a=e.height,n+","+r+" "+(n+i)+","+r+" "+(n+i)+","+(r+a-(o=7))+" "+(n+i-1.2*o)+","+(r+a)+" "+n+","+(r+a))),s.attr("class","labelBox"),e.y=e.y+e.height/2,en(t,e),s},rn=-1,an=function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},on=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},sn=function(){function t(t,e,n,i,a,o,s){r(e.append("text").attr("x",n+a/2).attr("y",i+o/2+5).style("text-anchor","middle").text(t),s)}function e(t,e,n,i,a,o,s,c){for(var u=c.actorFontSize,l=c.actorFontFamily,h=c.actorFontWeight,f=t.split(x.lineBreakRegex),d=0;d<f.length;d++){var p=d*u-u*(f.length-1)/2,g=e.append("text").attr("x",n+a/2).attr("y",i).style("text-anchor","middle").style("font-size",u).style("font-weight",h).style("font-family",l);g.append("tspan").attr("x",n+a/2).attr("dy",p).text(f[d]),g.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(g,s)}}function n(t,n,i,a,o,s,c,u){var l=n.append("switch"),h=l.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s).append("div").style("display","table").style("height","100%").style("width","100%");h.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,l,i,a,o,s,c,u),r(h,c)}function r(t,e){for(var n in e)e.hasOwnProperty(n)&&t.attr(n,e[n])}return function(r){return"fo"===r.textPlacement?n:"old"===r.textPlacement?t:e}}(),cn={drawRect:tn,drawText:en,drawLabel:nn,drawActor:function(t,e,n){var r=e.x+e.width/2,i=t.append("g");0===e.y&&(rn++,i.append("line").attr("id","actor"+rn).attr("x1",r).attr("y1",5).attr("x2",r).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));var a=on();a.x=e.x,a.y=e.y,a.fill="#eaeaea",a.width=e.width,a.height=e.height,a.class="actor",a.rx=3,a.ry=3,tn(i,a),sn(n)(e.description,i,a.x,a.y,a.width,a.height,{class:"actor"},n)},anchorElement:function(t){return t.append("g")},drawActivation:function(t,e,n,r,i){var a=on(),o=e.anchored;a.x=e.startx,a.y=e.starty,a.class="activation"+i%3,a.width=e.stopx-e.startx,a.height=n-e.starty,tn(o,a)},drawLoop:function(t,e,n,r){var i=r.boxMargin,a=r.boxTextMargin,o=r.labelBoxHeight,s=r.labelBoxWidth,c=r.messageFontFamily,u=r.messageFontSize,l=r.messageFontWeight,h=t.append("g"),f=function(t,e,n,r){return h.append("line").attr("x1",t).attr("y1",e).attr("x2",n).attr("y2",r).attr("class","loopLine")};f(e.startx,e.starty,e.stopx,e.starty),f(e.stopx,e.starty,e.stopx,e.stopy),f(e.startx,e.stopy,e.stopx,e.stopy),f(e.startx,e.starty,e.startx,e.stopy),void 0!==e.sections&&e.sections.forEach((function(t){f(e.startx,t.y,e.stopx,t.y).style("stroke-dasharray","3, 3")}));var d=an();d.text=n,d.x=e.startx,d.y=e.starty,d.fontFamily=c,d.fontSize=u,d.fontWeight=l,d.anchor="middle",d.valign="middle",d.tspan=!1,d.width=s||50,d.height=o||20,d.textMargin=a,d.class="labelText",nn(h,d),(d=an()).text=e.title,d.x=e.startx+s/2+(e.stopx-e.startx)/2,d.y=e.starty+i+a,d.anchor="middle",d.valign="middle",d.textMargin=a,d.class="loopText",d.fontFamily=c,d.fontSize=u,d.fontWeight=l,d.wrap=!0;var p=en(h,d);return void 0!==e.sectionTitles&&e.sectionTitles.forEach((function(t,n){if(t.message){d.text=t.message,d.x=e.startx+(e.stopx-e.startx)/2,d.y=e.sections[n].y+i+a,d.class="loopText",d.anchor="middle",d.valign="middle",d.tspan=!1,d.fontFamily=c,d.fontSize=u,d.fontWeight=l,d.wrap=e.wrap,p=en(h,d);var r=Math.round(p.map((function(t){return(t._groups||t)[0][0].getBBox().height})).reduce((function(t,e){return t+e})));e.sections[n].height+=r-(i+a)}})),e.height=Math.round(e.stopy-e.starty),h},drawBackgroundRect:function(t,e){tn(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},insertArrowHead:function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")},insertSequenceNumber:function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},insertArrowCrossHead:function(t){var e=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);e.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),e.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},getTextObj:an,getNoteRect:on},un=n(2),ln=n.n(un),hn=void 0,fn={},dn=[],pn=[],gn="",yn=!1,vn=!1,mn=!1,bn=function(t,e,n){var r=fn[t];r&&e===r.name&&null==n||(null!=n&&null!=n.text||(n={text:e,wrap:null}),fn[t]={name:e,description:n.text,wrap:void 0===n.wrap&&kn()||!!n.wrap,prevActor:hn},hn&&fn[hn]&&(fn[hn].nextActor=t),hn=t)},xn=function(t){var e,n=0;for(e=0;e<dn.length;e++)dn[e].type===wn.ACTIVE_START&&dn[e].from.actor===t&&n++,dn[e].type===wn.ACTIVE_END&&dn[e].from.actor===t&&n--;return n},_n=function(t,e){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{text:void 0,wrap:void 0},r=arguments.length>3?arguments[3]:void 0;if(r===wn.ACTIVE_END){var i=xn(t.actor);if(i<1){var a=new Error("Trying to inactivate an inactive participant ("+t.actor+")");throw a.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},a}}return dn.push({from:t,to:e,message:n.text,wrap:void 0===n.wrap&&kn()||!!n.wrap,type:r}),!0},kn=function(){return mn},wn={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23},En=function(t,e,n){var r={actor:t,placement:e,message:n.text,wrap:void 0===n.wrap&&kn()||!!n.wrap},i=[].concat(t,t);pn.push(r),dn.push({from:i[0],to:i[1],message:n.text,wrap:void 0===n.wrap&&kn()||!!n.wrap,type:wn.NOTE,placement:e})},Tn=function(t){gn=t.text,yn=void 0===t.wrap&&kn()||!!t.wrap},Cn={addActor:bn,addMessage:function(t,e,n,r){dn.push({from:t,to:e,message:n.text,wrap:void 0===n.wrap&&kn()||!!n.wrap,answer:r})},addSignal:_n,autoWrap:kn,setWrap:function(t){mn=t},enableSequenceNumbers:function(){vn=!0},showSequenceNumbers:function(){return vn},getMessages:function(){return dn},getActors:function(){return fn},getActor:function(t){return fn[t]},getActorKeys:function(){return Object.keys(fn)},getTitle:function(){return gn},parseDirective:function(t,e,n){Lo.parseDirective(this,t,e,n)},getConfig:function(){return mt().sequence},getTitleWrapped:function(){return yn},clear:function(){fn={},dn=[]},parseMessage:function(t){var e=t.trim(),n={text:e.replace(/^[:]?(?:no)?wrap:/,"").trim(),wrap:null===e.match(/^[:]?(?:no)?wrap:/)?x.hasBreaks(e)||void 0:null!==e.match(/^[:]?wrap:/)||null===e.match(/^[:]?nowrap:/)&&void 0};return f.debug("parseMessage:",n),n},LINETYPE:wn,ARROWTYPE:{FILLED:0,OPEN:1},PLACEMENT:{LEFTOF:0,RIGHTOF:1,OVER:2},addNote:En,setTitle:Tn,apply:function t(e){if(e instanceof Array)e.forEach((function(e){t(e)}));else switch(e.type){case"addActor":bn(e.actor,e.actor,e.description);break;case"activeStart":case"activeEnd":_n(e.actor,void 0,void 0,e.signalType);break;case"addNote":En(e.actor,e.placement,e.text);break;case"addMessage":_n(e.from,e.to,e.msg,e.signalType);break;case"loopStart":_n(void 0,void 0,e.loopText,e.signalType);break;case"loopEnd":_n(void 0,void 0,void 0,e.signalType);break;case"rectStart":_n(void 0,void 0,e.color,e.signalType);break;case"rectEnd":_n(void 0,void 0,void 0,e.signalType);break;case"optStart":_n(void 0,void 0,e.optText,e.signalType);break;case"optEnd":_n(void 0,void 0,void 0,e.signalType);break;case"altStart":case"else":_n(void 0,void 0,e.altText,e.signalType);break;case"altEnd":_n(void 0,void 0,void 0,e.signalType);break;case"setTitle":Tn(e.text);break;case"parStart":case"and":_n(void 0,void 0,e.parText,e.signalType);break;case"parEnd":_n(void 0,void 0,void 0,e.signalType)}}};un.parser.yy=Cn;var An={},Sn={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,0===this.actors.length?[0]:this.actors.map((function(t){return t.height||0})))+(0===this.loops.length?0:this.loops.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))+(0===this.messages.length?0:this.messages.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))+(0===this.notes.length?0:this.notes.map((function(t){return t.height||0})).reduce((function(t,e){return t+e})))},clear:function(){this.actors=[],this.loops=[],this.messages=[],this.notes=[]},addActor:function(t){this.actors.push(t)},addLoop:function(t){this.loops.push(t)},addMessage:function(t){this.messages.push(t)},addNote:function(t){this.notes.push(t)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],loops:[],messages:[],notes:[]},init:function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,Bn(un.parser.yy.getConfig())},updateVal:function(t,e,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e])},updateBounds:function(t,e,n,r){var i=this,a=0;function o(o){return function(s){a++;var c=i.sequenceItems.length-a+1;i.updateVal(s,"starty",e-c*An.boxMargin,Math.min),i.updateVal(s,"stopy",r+c*An.boxMargin,Math.max),i.updateVal(Sn.data,"startx",t-c*An.boxMargin,Math.min),i.updateVal(Sn.data,"stopx",n+c*An.boxMargin,Math.max),"activation"!==o&&(i.updateVal(s,"startx",t-c*An.boxMargin,Math.min),i.updateVal(s,"stopx",n+c*An.boxMargin,Math.max),i.updateVal(Sn.data,"starty",e-c*An.boxMargin,Math.min),i.updateVal(Sn.data,"stopy",r+c*An.boxMargin,Math.max))}}this.sequenceItems.forEach(o()),this.activations.forEach(o("activation"))},insert:function(t,e,n,r){var i=Math.min(t,n),a=Math.max(t,n),o=Math.min(e,r),s=Math.max(e,r);this.updateVal(Sn.data,"startx",i,Math.min),this.updateVal(Sn.data,"starty",o,Math.min),this.updateVal(Sn.data,"stopx",a,Math.max),this.updateVal(Sn.data,"stopy",s,Math.max),this.updateBounds(i,o,a,s)},newActivation:function(t,e,n){var r=n[t.from.actor],i=Ln(t.from.actor).length||0,a=r.x+r.width/2+(i-1)*An.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+An.activationWidth,stopy:void 0,actor:t.from.actor,anchored:cn.anchorElement(e)})},endActivation:function(t){var e=this.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{message:void 0,wrap:!1,width:void 0},e=arguments.length>1?arguments[1]:void 0;return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},newLoop:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{message:void 0,wrap:!1,width:void 0},e=arguments.length>1?arguments[1]:void 0;this.sequenceItems.push(this.createLoop(t,e))},endLoop:function(){return this.sequenceItems.pop()},addSectionToLoop:function(t){var e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:Sn.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return console.log("here",this.data),{bounds:this.data,models:this.models}}},Mn=function(t){return{fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}},On=function(t){return{fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}},Dn=function(t){return{fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}},Nn=function(t,e,n,r){for(var i=0,a=0,o=0;o<n.length;o++){var s=e[n[o]];s.width=s.width||An.width,s.height=Math.max(s.height||An.height,An.height),s.margin=s.margin||An.actorMargin,s.x=i+a,s.y=r,cn.drawActor(t,s,An),Sn.insert(s.x,r,s.x+s.width,s.height),i+=s.width,a+=s.margin,Sn.models.addActor(s)}Sn.bumpVerticalPos(An.height)},Bn=function(t){P(An,t),t.fontFamily&&(An.actorFontFamily=An.noteFontFamily=An.messageFontFamily=t.fontFamily),t.fontSize&&(An.actorFontSize=An.noteFontSize=An.messageFontSize=t.fontSize),t.fontWeight&&(An.actorFontWeight=An.noteFontWeight=An.messageFontWeight=t.fontWeight)},Ln=function(t){return Sn.activations.filter((function(e){return e.actor===t}))},Fn=function(t,e){var n=e[t],r=Ln(t);return[r.reduce((function(t,e){return Math.min(t,e.startx)}),n.x+n.width/2),r.reduce((function(t,e){return Math.max(t,e.stopx)}),n.x+n.width/2)]};function Pn(t,e,n,r,i){Sn.bumpVerticalPos(n);var a=r;if(e.id&&e.message&&t[e.id]){var o=t[e.id].width,s=Mn(An);e.message=U.wrapLabel("[".concat(e.message,"]"),o-2*An.wrapPadding,s),e.width=o,e.wrap=!0;var c=U.calculateTextDimensions(e.message,s),u=Math.max(c.height,An.labelBoxHeight);a=r+u,f.debug("".concat(u," - ").concat(e.message))}i(e),Sn.bumpVerticalPos(a)}var In=function(t,e){var n={};return e.forEach((function(e){if(t[e.to]&&t[e.from]){var r=t[e.to];if(e.placement===un.parser.yy.PLACEMENT.LEFTOF&&!r.prevActor)return;if(e.placement===un.parser.yy.PLACEMENT.RIGHTOF&&!r.nextActor)return;var i=void 0!==e.placement,a=!i,o=i?On(An):Mn(An),s=e.wrap?U.wrapLabel(e.message,An.width-2*An.wrapPadding,o):e.message,c=U.calculateTextDimensions(s,o).width+2*An.wrapPadding;a&&e.from===r.nextActor?n[e.to]=Math.max(n[e.to]||0,c):a&&e.from===r.prevActor?n[e.from]=Math.max(n[e.from]||0,c):a&&e.from===e.to?(n[e.from]=Math.max(n[e.from]||0,c/2),n[e.to]=Math.max(n[e.to]||0,c/2)):e.placement===un.parser.yy.PLACEMENT.RIGHTOF?n[e.from]=Math.max(n[e.from]||0,c):e.placement===un.parser.yy.PLACEMENT.LEFTOF?n[r.prevActor]=Math.max(n[r.prevActor]||0,c):e.placement===un.parser.yy.PLACEMENT.OVER&&(r.prevActor&&(n[r.prevActor]=Math.max(n[r.prevActor]||0,c/2)),r.nextActor&&(n[e.from]=Math.max(n[e.from]||0,c/2)))}})),f.debug("maxMessageWidthPerActor:",n),n},jn=function(t,e){var n=0;for(var r in Object.keys(t).forEach((function(e){var r=t[e];r.wrap&&(r.description=U.wrapLabel(r.description,An.width-2*An.wrapPadding,Dn(An)));var i=U.calculateTextDimensions(r.description,Dn(An));r.width=r.wrap?An.width:Math.max(An.width,i.width+2*An.wrapPadding),r.height=r.wrap?Math.max(i.height,An.height):An.height,n=Math.max(n,r.height)})),e){var i=t[r];if(i){var a=t[i.nextActor];if(a){var o=e[r]+An.actorMargin-i.width/2-a.width/2;i.margin=Math.max(o,An.actorMargin)}}}return Math.max(n,An.height)},Rn=function(t,e){var n,r,i,a={},o=[];return t.forEach((function(t){switch(t.id=U.random({length:10}),t.type){case un.parser.yy.LINETYPE.LOOP_START:case un.parser.yy.LINETYPE.ALT_START:case un.parser.yy.LINETYPE.OPT_START:case un.parser.yy.LINETYPE.PAR_START:o.push({id:t.id,msg:t.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case un.parser.yy.LINETYPE.ALT_ELSE:case un.parser.yy.LINETYPE.PAR_AND:t.message&&(n=o.pop(),a[n.id]=n,a[t.id]=n,o.push(n));break;case un.parser.yy.LINETYPE.LOOP_END:case un.parser.yy.LINETYPE.ALT_END:case un.parser.yy.LINETYPE.OPT_END:case un.parser.yy.LINETYPE.PAR_END:n=o.pop(),a[n.id]=n;break;case un.parser.yy.LINETYPE.ACTIVE_START:var s=e[t.from?t.from.actor:t.to.actor],c=Ln(t.from?t.from.actor:t.to.actor).length,u=s.x+s.width/2+(c-1)*An.activationWidth/2,l={startx:u,stopx:u+An.activationWidth,actor:t.from.actor,enabled:!0};Sn.activations.push(l);break;case un.parser.yy.LINETYPE.ACTIVE_END:var h=Sn.activations.map((function(t){return t.actor})).lastIndexOf(t.from.actor);delete Sn.activations.splice(h,1)[0]}void 0!==t.placement?(r=function(t,e){var n=e[t.from].x,r=e[t.to].x,i=t.wrap&&t.message,a=U.calculateTextDimensions(i?U.wrapLabel(t.message,An.width,On(An)):t.message,On(An)),o={width:i?An.width:Math.max(An.width,a.width+2*An.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===un.parser.yy.PLACEMENT.RIGHTOF?(o.width=i?Math.max(An.width,a.width):Math.max(e[t.from].width/2+e[t.to].width/2,a.width+2*An.noteMargin),o.startx=n+(e[t.from].width+An.actorMargin)/2):t.placement===un.parser.yy.PLACEMENT.LEFTOF?(o.width=i?Math.max(An.width,a.width+2*An.noteMargin):Math.max(e[t.from].width/2+e[t.to].width/2,a.width+2*An.noteMargin),o.startx=n-o.width+(e[t.from].width-An.actorMargin)/2):t.to===t.from?(a=U.calculateTextDimensions(i?U.wrapLabel(t.message,Math.max(An.width,e[t.from].width),On(An)):t.message,On(An)),o.width=i?Math.max(An.width,e[t.from].width):Math.max(e[t.from].width,An.width,a.width+2*An.noteMargin),o.startx=n+(e[t.from].width-o.width)/2):(o.width=Math.abs(n+e[t.from].width/2-(r+e[t.to].width/2))+An.actorMargin,o.startx=n<r?n+e[t.from].width/2-An.actorMargin/2:r+e[t.to].width/2-An.actorMargin/2),i&&(o.message=U.wrapLabel(t.message,o.width-2*An.wrapPadding,On(An))),f.debug("NM:[".concat(o.startx,",").concat(o.stopx,",").concat(o.starty,",").concat(o.stopy,":").concat(o.width,",").concat(o.height,"=").concat(t.message,"]")),o}(t,e),t.noteModel=r,o.forEach((function(t){(n=t).from=Math.min(n.from,r.startx),n.to=Math.max(n.to,r.startx+r.width),n.width=Math.max(n.width,Math.abs(n.from-n.to))-An.labelBoxWidth}))):(i=function(t,e){var n=!1;if([un.parser.yy.LINETYPE.SOLID_OPEN,un.parser.yy.LINETYPE.DOTTED_OPEN,un.parser.yy.LINETYPE.SOLID,un.parser.yy.LINETYPE.DOTTED,un.parser.yy.LINETYPE.SOLID_CROSS,un.parser.yy.LINETYPE.DOTTED_CROSS].includes(t.type)&&(n=!0),!n)return{};var r=Fn(t.from,e),i=Fn(t.to,e),a=r[0]<=i[0]?1:0,o=r[0]<i[0]?0:1,s=r.concat(i),c=Math.abs(i[o]-r[a]),u=U.calculateTextDimensions(t.message,Mn(An));return t.wrap&&t.message&&(t.message=U.wrapLabel(t.message,Math.max(c+2*An.wrapPadding,An.width),Mn(An))),{width:Math.max(t.wrap?0:u.width+2*An.wrapPadding,c+2*An.wrapPadding,An.width),height:0,startx:r[a],stopx:i[o],starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,s),toBounds:Math.max.apply(null,s)}}(t,e),t.msgModel=i,i.startx&&i.stopx&&o.length>0&&o.forEach((function(r){if(n=r,i.startx===i.stopx){var a=e[t.from],o=e[t.to];n.from=Math.min(a.x-i.width/2,a.x-a.width/2,n.from),n.to=Math.max(o.x+i.width/2,o.x+a.width/2,n.to),n.width=Math.max(n.width,Math.abs(n.to-n.from))-An.labelBoxWidth}else n.from=Math.min(i.startx,n.from),n.to=Math.max(i.stopx,n.to),n.width=Math.max(n.width,i.width)-An.labelBoxWidth})))})),Sn.activations=[],f.debug("Loop type widths:",a),a},Yn={bounds:Sn,drawActors:Nn,setConf:Bn,draw:function(t,e){An=mt().sequence,console.log("there ",An),un.parser.yy.clear(),un.parser.yy.setWrap(An.wrap),un.parser.parse(t+"\n"),Sn.init(),f.debug("C:".concat(JSON.stringify(An,null,2)));var n=Object(s.select)('[id="'.concat(e,'"]')),r=un.parser.yy.getActors(),i=un.parser.yy.getActorKeys(),a=un.parser.yy.getMessages(),o=un.parser.yy.getTitle(),c=In(r,a);An.height=jn(r,c),Nn(n,r,i,0);var u=Rn(a,r,c);cn.insertArrowHead(n),cn.insertArrowCrossHead(n),cn.insertSequenceNumber(n);var l=1;a.forEach((function(t){var e,i,a;switch(t.type){case un.parser.yy.LINETYPE.NOTE:i=t.noteModel,function(t,e){Sn.bumpVerticalPos(An.boxMargin),e.height=An.boxMargin,e.starty=Sn.getVerticalPos();var n=cn.getNoteRect();n.x=e.startx,n.y=e.starty,n.width=e.width||An.width,n.class="note";var r=t.append("g"),i=cn.drawRect(r,n),a=cn.getTextObj();a.x=e.startx,a.y=e.starty,a.width=n.width,a.dy="1em",a.text=e.message,a.class="noteText",a.fontFamily=An.noteFontFamily,a.fontSize=An.noteFontSize,a.fontWeight=An.noteFontWeight,a.anchor=An.noteAlign,a.textMargin=An.noteMargin,a.valign=An.noteAlign,a.wrap=!0;var o=en(r,a),s=Math.round(o.map((function(t){return(t._groups||t)[0][0].getBBox().height})).reduce((function(t,e){return t+e})));i.attr("height",s+2*An.noteMargin),e.height+=s+2*An.noteMargin,Sn.bumpVerticalPos(s+2*An.noteMargin),e.stopy=e.starty+s+2*An.noteMargin,e.stopx=e.startx+n.width,Sn.insert(e.startx,e.starty,e.stopx,e.stopy),Sn.models.addNote(e)}(n,i);break;case un.parser.yy.LINETYPE.ACTIVE_START:Sn.newActivation(t,n,r);break;case un.parser.yy.LINETYPE.ACTIVE_END:!function(t,e){var r=Sn.endActivation(t);r.starty+18>e&&(r.starty=e-6,e+=12),cn.drawActivation(n,r,e,An,Ln(t.from.actor).length),Sn.insert(r.startx,e-10,r.stopx,e)}(t,Sn.getVerticalPos());break;case un.parser.yy.LINETYPE.LOOP_START:Pn(u,t,An.boxMargin,An.boxMargin+An.boxTextMargin,(function(t){return Sn.newLoop(t)}));break;case un.parser.yy.LINETYPE.LOOP_END:e=Sn.endLoop(),cn.drawLoop(n,e,"loop",An),Sn.bumpVerticalPos(e.stopy-Sn.getVerticalPos()),Sn.models.addLoop(e);break;case un.parser.yy.LINETYPE.RECT_START:Pn(u,t,An.boxMargin,An.boxMargin,(function(t){return Sn.newLoop(void 0,t.message)}));break;case un.parser.yy.LINETYPE.RECT_END:e=Sn.endLoop(),cn.drawBackgroundRect(n,e),Sn.models.addLoop(e),Sn.bumpVerticalPos(e.stopy-Sn.getVerticalPos());break;case un.parser.yy.LINETYPE.OPT_START:Pn(u,t,An.boxMargin,An.boxMargin+An.boxTextMargin,(function(t){return Sn.newLoop(t)}));break;case un.parser.yy.LINETYPE.OPT_END:e=Sn.endLoop(),cn.drawLoop(n,e,"opt",An),Sn.bumpVerticalPos(e.stopy-Sn.getVerticalPos()),Sn.models.addLoop(e);break;case un.parser.yy.LINETYPE.ALT_START:Pn(u,t,An.boxMargin,An.boxMargin+An.boxTextMargin,(function(t){return Sn.newLoop(t)}));break;case un.parser.yy.LINETYPE.ALT_ELSE:Pn(u,t,An.boxMargin+An.boxTextMargin,An.boxMargin,(function(t){return Sn.addSectionToLoop(t)}));break;case un.parser.yy.LINETYPE.ALT_END:e=Sn.endLoop(),cn.drawLoop(n,e,"alt",An),Sn.bumpVerticalPos(e.stopy-Sn.getVerticalPos()),Sn.models.addLoop(e);break;case un.parser.yy.LINETYPE.PAR_START:Pn(u,t,An.boxMargin,An.boxMargin+An.boxTextMargin,(function(t){return Sn.newLoop(t)}));break;case un.parser.yy.LINETYPE.PAR_AND:Pn(u,t,An.boxMargin+An.boxTextMargin,An.boxMargin,(function(t){return Sn.addSectionToLoop(t)}));break;case un.parser.yy.LINETYPE.PAR_END:e=Sn.endLoop(),cn.drawLoop(n,e,"par",An),Sn.bumpVerticalPos(e.stopy-Sn.getVerticalPos()),Sn.models.addLoop(e);break;default:try{(a=t.msgModel).starty=Sn.getVerticalPos(),a.sequenceIndex=l,function(t,e){Sn.bumpVerticalPos(10);var n=e.startx,r=e.stopx,i=e.starty,a=e.message,o=e.type,s=e.sequenceIndex,c=e.wrap,u=x.splitBreaks(a).length,l=U.calculateTextDimensions(a,Mn(An)),h=l.height/u;e.height+=h,Sn.bumpVerticalPos(h);var f=cn.getTextObj();f.x=n,f.y=i+10,f.width=r-n,f.class="messageText",f.dy="1em",f.text=a,f.fontFamily=An.messageFontFamily,f.fontSize=An.messageFontSize,f.fontWeight=An.messageFontWeight,f.anchor=An.messageAlign,f.valign=An.messageAlign,f.textMargin=An.wrapPadding,f.tspan=!1,f.wrap=c,en(t,f);var d,p,g=l.height-10,y=l.width;if(n===r){p=Sn.getVerticalPos()+g,An.rightAngles?d=t.append("path").attr("d","M ".concat(n,",").concat(p," H ").concat(n+Math.max(An.width/2,y/2)," V ").concat(p+25," H ").concat(n)):(g+=An.boxMargin,p=Sn.getVerticalPos()+g,d=t.append("path").attr("d","M "+n+","+p+" C "+(n+60)+","+(p-10)+" "+(n+60)+","+(p+30)+" "+n+","+(p+20))),g+=30;var v=Math.max(y/2,An.width/2);Sn.insert(n-v,Sn.getVerticalPos()-10+g,r+v,Sn.getVerticalPos()+30+g)}else g+=An.boxMargin,p=Sn.getVerticalPos()+g,(d=t.append("line")).attr("x1",n),d.attr("y1",p),d.attr("x2",r),d.attr("y2",p),Sn.insert(n,p-10,r,p);o===un.parser.yy.LINETYPE.DOTTED||o===un.parser.yy.LINETYPE.DOTTED_CROSS||o===un.parser.yy.LINETYPE.DOTTED_OPEN?(d.style("stroke-dasharray","3, 3"),d.attr("class","messageLine1")):d.attr("class","messageLine0");var m="";An.arrowMarkerAbsolute&&(m=(m=(m=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),d.attr("stroke-width",2),d.attr("stroke","none"),d.style("fill","none"),o!==un.parser.yy.LINETYPE.SOLID&&o!==un.parser.yy.LINETYPE.DOTTED||d.attr("marker-end","url("+m+"#arrowhead)"),o!==un.parser.yy.LINETYPE.SOLID_CROSS&&o!==un.parser.yy.LINETYPE.DOTTED_CROSS||d.attr("marker-end","url("+m+"#crosshead)"),(Cn.showSequenceNumbers()||An.showSequenceNumbers)&&(d.attr("marker-start","url("+m+"#sequencenumber)"),t.append("text").attr("x",n).attr("y",p+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("textLength","16px").attr("class","sequenceNumber").text(s)),Sn.bumpVerticalPos(g),e.height+=g,e.stopy=e.starty+e.height,Sn.insert(e.fromBounds,e.starty,e.toBounds,e.stopy)}(n,a),Sn.models.addMessage(a)}catch(t){f.error("error while drawing message",t)}}[un.parser.yy.LINETYPE.SOLID_OPEN,un.parser.yy.LINETYPE.DOTTED_OPEN,un.parser.yy.LINETYPE.SOLID,un.parser.yy.LINETYPE.DOTTED,un.parser.yy.LINETYPE.SOLID_CROSS,un.parser.yy.LINETYPE.DOTTED_CROSS].includes(t.type)&&l++})),An.mirrorActors&&(Sn.bumpVerticalPos(2*An.boxMargin),Nn(n,r,i,Sn.getVerticalPos()));var h=Sn.getBounds().bounds;f.debug("For line height fix Querying: #"+e+" .actor-line"),Object(s.selectAll)("#"+e+" .actor-line").attr("y2",h.stopy);var d=h.stopy-h.starty+2*An.diagramMarginY;An.mirrorActors&&(d=d-An.boxMargin+An.bottomMarginAdj);var p=h.stopx-h.startx+2*An.diagramMarginX;o&&n.append("text").text(o).attr("x",(h.stopx-h.startx)/2-2*An.diagramMarginX).attr("y",-25),An.useMaxWidth?(n.attr("height","100%"),n.attr("width","100%"),n.attr("style","max-width:"+p+"px;")):(n.attr("height",d),n.attr("width",p));var g=o?40:0;n.attr("viewBox",h.startx-An.diagramMarginX+" -"+(An.diagramMarginY+g)+" "+p+" "+(d+g)),f.debug("models:",Sn.models)}},zn=n(27),Un=n.n(zn);function $n(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var Wn,Vn,Hn="",Gn="",qn="",Xn=[],Zn="",Jn=[],Qn=[],Kn="",tr=["active","done","crit","milestone"],er=[],nr=!1,rr=0,ir=function(t,e,n){return t.isoWeekday()>=6&&n.indexOf("weekends")>=0||(n.indexOf(t.format("dddd").toLowerCase())>=0||n.indexOf(t.format(e.trim()))>=0)},ar=function(t,e,n){if(n.length&&!t.manualEndTime){var r=l()(t.startTime,e,!0);r.add(1,"d");var i=l()(t.endTime,e,!0),a=or(r,i,e,n);t.endTime=i.toDate(),t.renderEndTime=a}},or=function(t,e,n,r){for(var i=!1,a=null;t<=e;)i||(a=e.toDate()),(i=ir(t,n,r))&&e.add(1,"d"),t.add(1,"d");return a},sr=function(t,e,n){n=n.trim();var r=/^after\s+([\d\w- ]+)/.exec(n.trim());if(null!==r){var i=null;if(r[1].split(" ").forEach((function(t){var e=pr(t);void 0!==e&&(i?e.endTime>i.endTime&&(i=e):i=e)})),i)return i.endTime;var a=new Date;return a.setHours(0,0,0,0),a}var o=l()(n,e.trim(),!0);return o.isValid()?o.toDate():(f.debug("Invalid date:"+n),f.debug("With date format:"+e.trim()),new Date)},cr=function(t,e){if(null!==t)switch(t[2]){case"s":e.add(t[1],"seconds");break;case"m":e.add(t[1],"minutes");break;case"h":e.add(t[1],"hours");break;case"d":e.add(t[1],"days");break;case"w":e.add(t[1],"weeks")}return e.toDate()},ur=function(t,e,n,r){r=r||!1,n=n.trim();var i=l()(n,e.trim(),!0);return i.isValid()?(r&&i.add(1,"d"),i.toDate()):cr(/^([\d]+)([wdhms])/.exec(n.trim()),l()(t))},lr=0,hr=function(t){return void 0===t?"task"+(lr+=1):t},fr=[],dr={},pr=function(t){var e=dr[t];return fr[e]},gr=function(){for(var t=function(t){var e=fr[t],n="";switch(fr[t].raw.startTime.type){case"prevTaskEnd":var r=pr(e.prevTaskId);e.startTime=r.endTime;break;case"getStartDate":(n=sr(0,Hn,fr[t].raw.startTime.startData))&&(fr[t].startTime=n)}return fr[t].startTime&&(fr[t].endTime=ur(fr[t].startTime,Hn,fr[t].raw.endTime.data,nr),fr[t].endTime&&(fr[t].processed=!0,fr[t].manualEndTime=l()(fr[t].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),ar(fr[t],Hn,Xn))),fr[t].processed},e=!0,n=0;n<fr.length;n++)t(n),e=e&&fr[n].processed;return e},yr=function(t,e){t.split(",").forEach((function(t){var n=pr(t);void 0!==n&&n.classes.push(e)}))},vr=function(t,e){er.push((function(){var n=document.querySelector('[id="'.concat(t,'"]'));null!==n&&n.addEventListener("click",(function(){e()}))})),er.push((function(){var n=document.querySelector('[id="'.concat(t,'-text"]'));null!==n&&n.addEventListener("click",(function(){e()}))}))},mr={parseDirective:function(t,e,n){Lo.parseDirective(this,t,e,n)},getConfig:function(){return mt().gantt},clear:function(){Jn=[],Qn=[],Kn="",er=[],Zn="",lr=0,Wn=void 0,Vn=void 0,fr=[],Hn="",Gn="",qn="",Xn=[],nr=!1,rr=0},setDateFormat:function(t){Hn=t},getDateFormat:function(){return Hn},enableInclusiveEndDates:function(){nr=!0},endDatesAreInclusive:function(){return nr},setAxisFormat:function(t){Gn=t},getAxisFormat:function(){return Gn},setTodayMarker:function(t){qn=t},getTodayMarker:function(){return qn},setTitle:function(t){Zn=t},getTitle:function(){return Zn},addSection:function(t){Kn=t,Jn.push(t)},getSections:function(){return Jn},getTasks:function(){for(var t=gr(),e=0;!t&&e<10;)t=gr(),e++;return Qn=fr},addTask:function(t,e){var n={section:Kn,type:Kn,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},r=function(t,e){var n=(":"===e.substr(0,1)?e.substr(1,e.length):e).split(","),r={};br(n,r,tr);for(var i=0;i<n.length;i++)n[i]=n[i].trim();switch(n.length){case 1:r.id=hr(),r.startTime={type:"prevTaskEnd",id:t},r.endTime={data:n[0]};break;case 2:r.id=hr(),r.startTime={type:"getStartDate",startData:n[0]},r.endTime={data:n[1]};break;case 3:r.id=hr(n[0]),r.startTime={type:"getStartDate",startData:n[1]},r.endTime={data:n[2]}}return r}(Vn,e);n.raw.startTime=r.startTime,n.raw.endTime=r.endTime,n.id=r.id,n.prevTaskId=Vn,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,n.order=rr,rr++;var i=fr.push(n);Vn=n.id,dr[n.id]=i-1},findTaskById:pr,addTaskOrg:function(t,e){var n={section:Kn,type:Kn,description:t,task:t,classes:[]},r=function(t,e){var n=(":"===e.substr(0,1)?e.substr(1,e.length):e).split(","),r={};br(n,r,tr);for(var i=0;i<n.length;i++)n[i]=n[i].trim();var a="";switch(n.length){case 1:r.id=hr(),r.startTime=t.endTime,a=n[0];break;case 2:r.id=hr(),r.startTime=sr(0,Hn,n[0]),a=n[1];break;case 3:r.id=hr(n[0]),r.startTime=sr(0,Hn,n[1]),a=n[2]}return a&&(r.endTime=ur(r.startTime,Hn,a,nr),r.manualEndTime=l()(a,"YYYY-MM-DD",!0).isValid(),ar(r,Hn,Xn)),r}(Wn,e);n.startTime=r.startTime,n.endTime=r.endTime,n.id=r.id,n.active=r.active,n.done=r.done,n.crit=r.crit,n.milestone=r.milestone,Wn=n,Qn.push(n)},setExcludes:function(t){Xn=t.toLowerCase().split(/[\s,]+/)},getExcludes:function(){return Xn},setClickEvent:function(t,e,n){t.split(",").forEach((function(t){!function(t,e,n){if("loose"===mt().securityLevel&&void 0!==e){var r=[];if("string"==typeof n){r=n.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(var i=0;i<r.length;i++){var a=r[i].trim();'"'===a.charAt(0)&&'"'===a.charAt(a.length-1)&&(a=a.substr(1,a.length-2)),r[i]=a}}0===r.length&&r.push(t),void 0!==pr(t)&&vr(t,(function(){U.runFunc.apply(U,[e].concat($n(r)))}))}}(t,e,n)})),yr(t,"clickable")},setLink:function(t,e){var n=e;"loose"!==mt().securityLevel&&(n=Object(g.sanitizeUrl)(e)),t.split(",").forEach((function(t){void 0!==pr(t)&&vr(t,(function(){window.open(n,"_self")}))})),yr(t,"clickable")},bindFunctions:function(t){er.forEach((function(e){e(t)}))},durationToDate:cr};function br(t,e,n){for(var r=!0;r;)r=!1,n.forEach((function(n){var i=new RegExp("^\\s*"+n+"\\s*$");t[0].match(i)&&(e[n]=!0,t.shift(1),r=!0)}))}zn.parser.yy=mr;var xr,_r={titleTopMargin:25,barHeight:20,barGap:4,topPadding:50,rightPadding:75,leftPadding:75,gridLineStartPadding:35,fontSize:11,fontFamily:'"Open-Sans", "sans-serif"'},kr=function(t){Object.keys(t).forEach((function(e){_r[e]=t[e]}))},wr=function(t,e){zn.parser.yy.clear(),zn.parser.parse(t);var n=document.getElementById(e);void 0===(xr=n.parentElement.offsetWidth)&&(xr=1200),void 0!==_r.useWidth&&(xr=_r.useWidth);var r=zn.parser.yy.getTasks(),i=r.length*(_r.barHeight+_r.barGap)+2*_r.topPadding;n.setAttribute("height","100%"),n.setAttribute("viewBox","0 0 "+xr+" "+i);for(var a=Object(s.select)('[id="'.concat(e,'"]')),o=Object(s.scaleTime)().domain([Object(s.min)(r,(function(t){return t.startTime})),Object(s.max)(r,(function(t){return t.endTime}))]).rangeRound([0,xr-_r.leftPadding-_r.rightPadding]),c=[],u=0;u<r.length;u++)c.push(r[u].type);var l=c;function h(t){for(var e=t.length,n={};e;)n[t[--e]]=(n[t[e]]||0)+1;return n}c=function(t){for(var e={},n=[],r=0,i=t.length;r<i;++r)e.hasOwnProperty(t[r])||(e[t[r]]=!0,n.push(t[r]));return n}(c),r.sort((function(t,e){var n=t.startTime,r=e.startTime,i=0;return n>r?i=1:n<r&&(i=-1),i})),function(t,e,n){var r=_r.barHeight,i=r+_r.barGap,u=_r.topPadding,f=_r.leftPadding;Object(s.scaleLinear)().domain([0,c.length]).range(["#00B9FA","#F95002"]).interpolate(s.interpolateHcl);(function(t,e,n,r){var i=Object(s.axisBottom)(o).tickSize(-r+e+_r.gridLineStartPadding).tickFormat(Object(s.timeFormat)(zn.parser.yy.getAxisFormat()||_r.axisFormat||"%Y-%m-%d"));a.append("g").attr("class","grid").attr("transform","translate("+t+", "+(r-50)+")").call(i).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em")})(f,u,0,n),function(t,e,n,r,i,s,u){a.append("g").selectAll("rect").data(t).enter().append("rect").attr("x",0).attr("y",(function(t,r){return t.order*e+n-2})).attr("width",(function(){return u-_r.rightPadding/2})).attr("height",e).attr("class",(function(t){for(var e=0;e<c.length;e++)if(t.type===c[e])return"section section"+e%_r.numberSectionStyles;return"section section0"}));var l=a.append("g").selectAll("rect").data(t).enter();l.append("rect").attr("id",(function(t){return t.id})).attr("rx",3).attr("ry",3).attr("x",(function(t){return t.milestone?o(t.startTime)+r+.5*(o(t.endTime)-o(t.startTime))-.5*i:o(t.startTime)+r})).attr("y",(function(t,r){return t.order*e+n})).attr("width",(function(t){return t.milestone?i:o(t.renderEndTime||t.endTime)-o(t.startTime)})).attr("height",i).attr("transform-origin",(function(t,a){return(o(t.startTime)+r+.5*(o(t.endTime)-o(t.startTime))).toString()+"px "+(a*e+n+.5*i).toString()+"px"})).attr("class",(function(t){var e="";t.classes.length>0&&(e=t.classes.join(" "));for(var n=0,r=0;r<c.length;r++)t.type===c[r]&&(n=r%_r.numberSectionStyles);var i="";return t.active?t.crit?i+=" activeCrit":i=" active":t.done?i=t.crit?" doneCrit":" done":t.crit&&(i+=" crit"),0===i.length&&(i=" task"),t.milestone&&(i=" milestone "+i),i+=n,"task"+(i+=" "+e)})),l.append("text").attr("id",(function(t){return t.id+"-text"})).text((function(t){return t.task})).attr("font-size",_r.fontSize).attr("x",(function(t){var e=o(t.startTime),n=o(t.renderEndTime||t.endTime);t.milestone&&(e+=.5*(o(t.endTime)-o(t.startTime))-.5*i),t.milestone&&(n=e+i);var a=this.getBBox().width;return a>n-e?n+a+1.5*_r.leftPadding>u?e+r-5:n+r+5:(n-e)/2+e+r})).attr("y",(function(t,r){return t.order*e+_r.barHeight/2+(_r.fontSize/2-2)+n})).attr("text-height",i).attr("class",(function(t){var e=o(t.startTime),n=o(t.endTime);t.milestone&&(n=e+i);var r=this.getBBox().width,a="";t.classes.length>0&&(a=t.classes.join(" "));var s=0;console.log(_r);for(var l=0;l<c.length;l++)t.type===c[l]&&(s=l%_r.numberSectionStyles);var h="";return t.active&&(h=t.crit?"activeCritText"+s:"activeText"+s),t.done?h=t.crit?h+" doneCritText"+s:h+" doneText"+s:t.crit&&(h=h+" critText"+s),t.milestone&&(h+=" milestoneText"),r>n-e?n+r+1.5*_r.leftPadding>u?a+" taskTextOutsideLeft taskTextOutside"+s+" "+h:a+" taskTextOutsideRight taskTextOutside"+s+" "+h+" width-"+r:a+" taskText taskText"+s+" "+h+" width-"+r}))}(t,i,u,f,r,0,e),function(t,e){for(var n=[],r=0,i=0;i<c.length;i++)n[i]=[c[i],(o=c[i],s=l,h(s)[o]||0)];var o,s;a.append("g").selectAll("text").data(n).enter().append((function(t){var e=t[0].split(x.lineBreakRegex),n=-(e.length-1)/2,r=document.createElementNS("http://www.w3.org/2000/svg","text");r.setAttribute("dy",n+"em");for(var i=0;i<e.length;i++){var a=document.createElementNS("http://www.w3.org/2000/svg","tspan");a.setAttribute("alignment-baseline","central"),a.setAttribute("x","10"),i>0&&a.setAttribute("dy","1em"),a.textContent=e[i],r.appendChild(a)}return r})).attr("x",10).attr("y",(function(i,a){if(!(a>0))return i[1]*t/2+e;for(var o=0;o<a;o++)return r+=n[a-1][1],i[1]*t/2+r*t+e})).attr("class",(function(t){for(var e=0;e<c.length;e++)if(t[0]===c[e])return"sectionTitle sectionTitle"+e%_r.numberSectionStyles;return"sectionTitle"}))}(i,u),function(t,e,n,r){var i=mr.getTodayMarker();if("off"===i)return;var s=a.append("g").attr("class","today"),c=new Date,u=s.append("line");u.attr("x1",o(c)+t).attr("x2",o(c)+t).attr("y1",_r.titleTopMargin).attr("y2",r-_r.titleTopMargin).attr("class","today"),""!==i&&u.attr("style",i.replace(/,/g,";"))}(f,0,0,n)}(r,xr,i),void 0!==_r.useWidth&&n.setAttribute("width",xr),a.append("text").text(zn.parser.yy.getTitle()).attr("x",xr/2).attr("y",_r.titleTopMargin).attr("class","titleText")},Er=mt(),Tr=[],Cr={},Ar=0,Sr=[],Mr=function(t){var e="",n=t;if(t.indexOf("~")>0){var r=t.split("~");n=r[0],e=r[1]}return{className:n,type:e}},Or=function(t){var e=Mr(t);void 0===Cr[e.className]&&(Cr[e.className]={id:e.className,type:e.type,cssClasses:[],methods:[],members:[],annotations:[],domId:"classid-"+e.className+"-"+Ar},Ar++)},Dr=function(t){for(var e=Object.keys(Cr),n=0;n<e.length;n++)if(Cr[e[n]].id===t)return Cr[e[n]].domId},Nr=function(t,e){var n=Mr(t).className,r=Cr[n];if("string"==typeof e){var i=e.trim();i.startsWith("<<")&&i.endsWith(">>")?r.annotations.push(i.substring(2,i.length-2)):i.indexOf(")")>0?r.methods.push(i):i&&r.members.push(i)}},Br=function(t,e){t.split(",").forEach((function(t){var n=t;t[0].match(/\d/)&&(n="classid-"+n),void 0!==Cr[n]&&Cr[n].cssClasses.push(e)}))},Lr=function(t,e,n){var r=t,i=Dr(r);"loose"===Er.securityLevel&&void 0!==e&&void 0!==Cr[r]&&(n&&(Cr[r].tooltip=x.sanitizeText(n,Er)),Sr.push((function(){var t=document.querySelector('[id="'.concat(i,'"]'));null!==t&&t.addEventListener("click",(function(){U.runFunc(e,i)}),!1)})))},Fr={AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},Pr=function(t){var e=Object(s.select)(".mermaidTooltip");null===(e._groups||e)[0][0]&&(e=Object(s.select)("body").append("div").attr("class","mermaidTooltip").style("opacity",0)),Object(s.select)(t).select("svg").selectAll("g.node").on("mouseover",(function(){var t=Object(s.select)(this);if(null!==t.attr("title")){var n=this.getBoundingClientRect();e.transition().duration(200).style("opacity",".9"),e.html(t.attr("title")).style("left",window.scrollX+n.left+(n.right-n.left)/2+"px").style("top",window.scrollY+n.top-14+document.body.scrollTop+"px"),t.classed("hover",!0)}})).on("mouseout",(function(){e.transition().duration(500).style("opacity",0),Object(s.select)(this).classed("hover",!1)}))};Sr.push(Pr);var Ir={parseDirective:function(t,e,n){Lo.parseDirective(this,t,e,n)},getConfig:function(){return mt().class},addClass:Or,bindFunctions:function(t){Sr.forEach((function(e){e(t)}))},clear:function(){Tr=[],Cr={},(Sr=[]).push(Pr)},getClass:function(t){return Cr[t]},getClasses:function(){return Cr},addAnnotation:function(t,e){var n=Mr(t).className;Cr[n].annotations.push(e)},getRelations:function(){return Tr},addRelation:function(t){f.debug("Adding relation: "+JSON.stringify(t)),Or(t.id1),Or(t.id2),t.id1=Mr(t.id1).className,t.id2=Mr(t.id2).className,Tr.push(t)},addMember:Nr,addMembers:function(t,e){Array.isArray(e)&&(e.reverse(),e.forEach((function(e){return Nr(t,e)})))},cleanupLabel:function(t){return":"===t.substring(0,1)?t.substr(1).trim():t.trim()},lineType:{LINE:0,DOTTED_LINE:1},relationType:Fr,setClickEvent:function(t,e,n){t.split(",").forEach((function(t){Lr(t,e,n)})),Br(t,"clickable")},setCssClass:Br,setLink:function(t,e,n){t.split(",").forEach((function(t){var r=t;t[0].match(/\d/)&&(r="classid-"+r),void 0!==Cr[r]&&(Cr[r].link=U.formatUrl(e,Er),n&&(Cr[r].tooltip=x.sanitizeText(n,Er)))})),Br(t,"clickable")},lookUpDomId:Dr},jr=n(13),Rr=n.n(jr),Yr=0,zr=function(t){var e=t.match(/(\+|-|~|#)?(\w+)(~\w+~|\[\])?\s+(\w+)/),n=t.match(/^([+|\-|~|#])?(\w+) *\( *(.*)\) *(\*|\$)? *(\w*[~|[\]]*\s*\w*~?)$/);return e&&!n?Ur(e):n?$r(n):Wr(t)},Ur=function(t){var e="";try{e=(t[1]?t[1].trim():"")+(t[2]?t[2].trim():"")+(t[3]?Hr(t[3].trim()):"")+" "+(t[4]?t[4].trim():"")}catch(n){e=t}return{displayText:e,cssStyle:""}},$r=function(t){var e="",n="";try{var r=t[1]?t[1].trim():"",i=t[2]?t[2].trim():"",a=t[3]?Hr(t[3].trim()):"",o=t[4]?t[4].trim():"";n=r+i+"("+a+")"+(t[5]?" : "+Hr(t[5]).trim():""),e=Gr(o)}catch(e){n=t}return{displayText:n,cssStyle:e}},Wr=function(t){var e="",n="",r="",i=t.indexOf("("),a=t.indexOf(")");if(i>1&&a>i&&a<=t.length){var o="",s="",c=t.substring(0,1);c.match(/\w/)?s=t.substring(0,i).trim():(c.match(/\+|-|~|#/)&&(o=c),s=t.substring(1,i).trim());var u=t.substring(i+1,a),l=t.substring(a+1,1);n=Gr(l),e=o+s+"("+Hr(u.trim())+")",a<"".length&&""!==(r=t.substring(a+2).trim())&&(r=" : "+Hr(r))}else e=Hr(t);return{displayText:e,cssStyle:n}},Vr=function(t,e,n,r){var i=zr(e),a=t.append("tspan").attr("x",r.padding).text(i.displayText);""!==i.cssStyle&&a.attr("style",i.cssStyle),n||a.attr("dy",r.textHeight)},Hr=function t(e){var n=e;return-1!=e.indexOf("~")?t(n=(n=n.replace("~","<")).replace("~",">")):n},Gr=function(t){switch(t){case"*":return"font-style:italic;";case"$":return"text-decoration:underline;";default:return""}},qr=function(t,e,n){f.info("Rendering class "+e);var r,i=e.id,a={id:i,label:e.id,width:0,height:0},o=t.append("g").attr("id",Dr(i)).attr("class","classGroup");r=e.link?o.append("svg:a").attr("xlink:href",e.link).attr("target","_blank").append("text").attr("y",n.textHeight+n.padding).attr("x",0):o.append("text").attr("y",n.textHeight+n.padding).attr("x",0);var s=!0;e.annotations.forEach((function(t){var e=r.append("tspan").text("«"+t+"»");s||e.attr("dy",n.textHeight),s=!1}));var c=e.id;void 0!==e.type&&""!==e.type&&(c+="<"+e.type+">");var u=r.append("tspan").text(c).attr("class","title");s||u.attr("dy",n.textHeight);var l=r.node().getBBox().height,h=o.append("line").attr("x1",0).attr("y1",n.padding+l+n.dividerMargin/2).attr("y2",n.padding+l+n.dividerMargin/2),d=o.append("text").attr("x",n.padding).attr("y",l+n.dividerMargin+n.textHeight).attr("fill","white").attr("class","classText");s=!0,e.members.forEach((function(t){Vr(d,t,s,n),s=!1}));var p=d.node().getBBox(),g=o.append("line").attr("x1",0).attr("y1",n.padding+l+n.dividerMargin+p.height).attr("y2",n.padding+l+n.dividerMargin+p.height),y=o.append("text").attr("x",n.padding).attr("y",l+2*n.dividerMargin+p.height+n.textHeight).attr("fill","white").attr("class","classText");s=!0,e.methods.forEach((function(t){Vr(y,t,s,n),s=!1}));var v=o.node().getBBox(),m=" ";e.cssClasses.length>0&&(m+=e.cssClasses.join(" "));var b=o.insert("rect",":first-child").attr("x",0).attr("y",0).attr("width",v.width+2*n.padding).attr("height",v.height+n.padding+.5*n.dividerMargin).attr("class",m).node().getBBox().width;return r.node().childNodes.forEach((function(t){t.setAttribute("x",(b-t.getBBox().width)/2)})),e.tooltip&&r.insert("title").text(e.tooltip),h.attr("x2",b),g.attr("x2",b),a.width=b,a.height=v.height+n.padding+.5*n.dividerMargin,a},Xr=function(t,e,n,r){var i=function(t){switch(t){case Fr.AGGREGATION:return"aggregation";case Fr.EXTENSION:return"extension";case Fr.COMPOSITION:return"composition";case Fr.DEPENDENCY:return"dependency"}};e.points=e.points.filter((function(t){return!Number.isNaN(t.y)}));var a,o,c=e.points,u=Object(s.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(s.curveBasis),l=t.append("path").attr("d",u(c)).attr("id","edge"+Yr).attr("class","relation"),h="";r.arrowMarkerAbsolute&&(h=(h=(h=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),1==n.relation.lineType&&l.attr("class","relation dashed-line"),"none"!==n.relation.type1&&l.attr("marker-start","url("+h+"#"+i(n.relation.type1)+"Start)"),"none"!==n.relation.type2&&l.attr("marker-end","url("+h+"#"+i(n.relation.type2)+"End)");var d,p,g,y,v=e.points.length,m=U.calcLabelPosition(e.points);if(a=m.x,o=m.y,v%2!=0&&v>1){var b=U.calcCardinalityPosition("none"!==n.relation.type1,e.points,e.points[0]),x=U.calcCardinalityPosition("none"!==n.relation.type2,e.points,e.points[v-1]);f.debug("cardinality_1_point "+JSON.stringify(b)),f.debug("cardinality_2_point "+JSON.stringify(x)),d=b.x,p=b.y,g=x.x,y=x.y}if(void 0!==n.title){var _=t.append("g").attr("class","classLabel"),k=_.append("text").attr("class","label").attr("x",a).attr("y",o).attr("fill","red").attr("text-anchor","middle").text(n.title);window.label=k;var w=k.node().getBBox();_.insert("rect",":first-child").attr("class","box").attr("x",w.x-r.padding/2).attr("y",w.y-r.padding/2).attr("width",w.width+r.padding).attr("height",w.height+r.padding)}(f.info("Rendering relation "+JSON.stringify(n)),void 0!==n.relationTitle1&&"none"!==n.relationTitle1)&&t.append("g").attr("class","cardinality").append("text").attr("class","type1").attr("x",d).attr("y",p).attr("fill","black").attr("font-size","6").text(n.relationTitle1);void 0!==n.relationTitle2&&"none"!==n.relationTitle2&&t.append("g").attr("class","cardinality").append("text").attr("class","type2").attr("x",g).attr("y",y).attr("fill","black").attr("font-size","6").text(n.relationTitle2);Yr++};jr.parser.yy=Ir;var Zr={},Jr={dividerMargin:10,padding:5,textHeight:10},Qr=function(t){for(var e=Object.keys(Zr),n=0;n<e.length;n++)if(Zr[e[n]].label===t)return e[n]},Kr=function(t){Object.keys(t).forEach((function(e){Jr[e]=t[e]}))},ti=function(t,e){Zr={},jr.parser.yy.clear(),jr.parser.parse(t),f.info("Rendering diagram "+t);var n,r=Object(s.select)("[id='".concat(e,"']"));r.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),(n=r).append("defs").append("marker").attr("id","extensionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 1,7 L18,13 V 1 Z"),n.append("defs").append("marker").attr("id","extensionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 1,1 V 13 L18,7 Z"),n.append("defs").append("marker").attr("id","compositionStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","compositionEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","aggregationStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","aggregationEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","dependencyStart").attr("class","extension").attr("refX",0).attr("refY",7).attr("markerWidth",190).attr("markerHeight",240).attr("orient","auto").append("path").attr("d","M 5,7 L9,13 L1,7 L9,1 Z"),n.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z");var i=new W.a.Graph({multigraph:!0});i.setGraph({isMultiGraph:!0}),i.setDefaultEdgeLabel((function(){return{}}));for(var a=Ir.getClasses(),o=Object.keys(a),c=0;c<o.length;c++){var u=a[o[c]],l=qr(r,u,Jr);Zr[l.id]=l,i.setNode(l.id,l),f.info("Org height: "+l.height)}Ir.getRelations().forEach((function(t){f.info("tjoho"+Qr(t.id1)+Qr(t.id2)+JSON.stringify(t)),i.setEdge(Qr(t.id1),Qr(t.id2),{relation:t},t.title||"DEFAULT")})),pe.a.layout(i),i.nodes().forEach((function(t){void 0!==t&&void 0!==i.node(t)&&(f.debug("Node "+t+": "+JSON.stringify(i.node(t))),Object(s.select)("#"+Dr(t)).attr("transform","translate("+(i.node(t).x-i.node(t).width/2)+","+(i.node(t).y-i.node(t).height/2)+" )"))})),i.edges().forEach((function(t){void 0!==t&&void 0!==i.edge(t)&&(f.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(i.edge(t))),Xr(r,i.edge(t),i.edge(t).relation,Jr))}));var h=r.node().getBBox(),d=h.width+40,p=h.height+40;Jr.useMaxWidth?(r.attr("width","100%"),r.attr("style","max-width: ".concat(d,"px;"))):(r.attr("height",p),r.attr("width",d));var g="".concat(h.x-20," ").concat(h.y-20," ").concat(d," ").concat(p);f.debug("viewBox ".concat(g)),r.attr("viewBox",g)};jr.parser.yy=Ir;var ei={dividerMargin:10,padding:5,textHeight:10},ni=function(t){Object.keys(t).forEach((function(e){ei[e]=t[e]}))},ri=function(t,e){f.info("Drawing class"),Ir.clear(),jr.parser.parse(t);var n=mt().flowchart;f.info("config:",n);var r=n.nodeSpacing||50,i=n.rankSpacing||50,a=new W.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:"TD",nodesep:r,ranksep:i,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}})),o=Ir.getClasses(),c=Ir.getRelations();f.info(c),function(t,e){var n=Object.keys(t);f.info("keys:",n),f.info(t),n.forEach((function(n){var r=t[n],i={labelStyle:""},a=void 0!==r.text?r.text:r.id,o="";switch(r.type){case"class":o="class_box";break;default:o="class_box"}e.setNode(r.id,{labelStyle:i.labelStyle,shape:o,labelText:a,classData:r,rx:0,ry:0,class:"default",style:i.style,id:r.id,width:"group"===r.type?500:void 0,type:r.type,padding:mt().flowchart.padding}),f.info("setNode",{labelStyle:i.labelStyle,shape:o,labelText:a,rx:0,ry:0,class:"default",style:i.style,id:r.id,width:"group"===r.type?500:void 0,type:r.type,padding:mt().flowchart.padding})}))}(o,a),function(t,e){var n=0;t.forEach((function(r){n++;var i={classes:"relation"};i.pattern=1==r.relation.lineType?"dashed":"solid",i.id="id"+n,"arrow_open"===r.type?i.arrowhead="none":i.arrowhead="normal",f.info(i,r),i.arrowTypeStart=ii(r.relation.type1),i.arrowTypeEnd=ii(r.relation.type2);var a="",o="";if(void 0!==r.style){var c=N(r.style);a=c.style,o=c.labelStyle}else a="fill:none";i.style=a,i.labelStyle=o,void 0!==r.interpolate?i.curve=O(r.interpolate,s.curveLinear):void 0!==t.defaultInterpolate?i.curve=O(t.defaultInterpolate,s.curveLinear):i.curve=O(ei.curve,s.curveLinear),r.text=r.title,void 0===r.text?void 0!==r.style&&(i.arrowheadStyle="fill: #333"):(i.arrowheadStyle="fill: #333",i.labelpos="c",mt().flowchart.htmlLabels,i.labelType="text",i.label=r.text.replace(x.lineBreakRegex,"\n"),void 0===r.style&&(i.style=i.style||"stroke: #333; stroke-width: 1.5px;fill:none"),i.labelStyle=i.labelStyle.replace("color:","fill:")),e.setEdge(r.id1,r.id2,i,n)}))}(c,a);var u=Object(s.select)('[id="'.concat(e,'"]'));u.attr("xmlns:xlink","http://www.w3.org/1999/xlink");var l=Object(s.select)("#"+e+" g");qe(l,a,["aggregation","extension","composition","dependency"],"classDiagram",e);var h=u.node().getBBox(),d=h.width+16,p=h.height+16;if(f.debug("new ViewBox 0 0 ".concat(d," ").concat(p),"translate(".concat(8-a._label.marginx,", ").concat(8-a._label.marginy,")")),n.useMaxWidth?(u.attr("width","100%"),u.attr("style","max-width: ".concat(d,"px;"))):(u.attr("height",p),u.attr("width",d)),u.attr("viewBox","0 0 ".concat(d," ").concat(p)),u.select("g").attr("transform","translate(".concat(8-a._label.marginx,", ").concat(8-h.y,")")),!n.htmlLabels)for(var g=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),y=0;y<g.length;y++){var v=g[y],m=v.getBBox(),b=document.createElementNS("http://www.w3.org/2000/svg","rect");b.setAttribute("rx",0),b.setAttribute("ry",0),b.setAttribute("width",m.width),b.setAttribute("height",m.height),b.setAttribute("style","fill:#e8e8e8;"),v.insertBefore(b,v.firstChild)}};function ii(t){var e;switch(t){case 0:e="aggregation";break;case 1:e="extension";break;case 2:e="composition";break;case 3:e="dependency";break;default:e="none"}return e}function ai(t){return(ai="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var oi,si=function(t){return JSON.parse(JSON.stringify(t))},ci=[],ui={root:{relations:[],states:{},documents:{}}},li=ui.root,hi=0,fi=function(t,e,n,r,i){void 0===li.states[t]?li.states[t]={id:t,descriptions:[],type:e,doc:n,note:i}:(li.states[t].doc||(li.states[t].doc=n),li.states[t].type||(li.states[t].type=e)),r&&(f.info("Adding state ",t,r),"string"==typeof r&&gi(t,r.trim()),"object"===ai(r)&&r.forEach((function(e){return gi(t,e.trim())}))),i&&(li.states[t].note=i)},di=function(){li=(ui={root:{relations:[],states:{},documents:{}}}).root,li=ui.root,hi=0,0,vi=[]},pi=function(t,e,n){var r=t,i=e,a="default",o="default";"[*]"===t&&(r="start"+ ++hi,a="start"),"[*]"===e&&(i="end"+hi,o="end"),fi(r,a),fi(i,o),li.relations.push({id1:r,id2:i,title:n})},gi=function(t,e){var n=li.states[t],r=e;":"===r[0]&&(r=r.substr(1).trim()),n.descriptions.push(r)},yi=0,vi=[],mi={parseDirective:function(t,e,n){Lo.parseDirective(this,t,e,n)},getConfig:function(){return mt().state},addState:fi,clear:di,getState:function(t){return li.states[t]},getStates:function(){return li.states},getRelations:function(){return li.relations},getClasses:function(){return vi},getDirection:function(){return"TB"},addRelation:pi,getDividerId:function(){return"divider-id-"+ ++yi},cleanupLabel:function(t){return":"===t.substring(0,1)?t.substr(2).trim():t.trim()},lineType:{LINE:0,DOTTED_LINE:1},relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},logDocuments:function(){f.info("Documents = ",ui)},getRootDoc:function(){return ci},setRootDoc:function(t){f.info("Setting root doc",t),ci=t},getRootDocV2:function(){return function t(e,n,r){if("relation"===n.stmt)t(e,n.state1,!0),t(e,n.state2,!1);else if("state"===n.stmt&&"[*]"===n.id&&(n.id=r?e.id+"_start":e.id+"_end",n.start=r),n.doc){var i=[],a=0,o=[];for(a=0;a<n.doc.length;a++)if("divider"===n.doc[a].type){var s=si(n.doc[a]);s.doc=si(o),i.push(s),o=[]}else o.push(n.doc[a]);if(i.length>0&&o.length>0){var c={stmt:"state",id:L(),type:"divider",doc:si(o)};i.push(si(c)),n.doc=i}n.doc.forEach((function(e){return t(n,e,!0)}))}}({id:"root"},{id:"root",doc:ci},!0),{id:"root",doc:ci}},extract:function(t){var e;e=t.doc?t.doc:t,f.info(e),di(),f.info("Extract",e),e.forEach((function(t){"state"===t.stmt&&fi(t.id,t.type,t.doc,t.description,t.note),"relation"===t.stmt&&pi(t.state1.id,t.state2.id,t.description)}))},trimColon:function(t){return t&&":"===t[0]?t.substr(1).trim():t.trim()}},bi=n(22),xi=n.n(bi),_i={},ki=function(t,e){_i[t]=e},wi=function(t,e){var n=t.append("text").attr("x",2*mt().state.padding).attr("y",mt().state.textHeight+1.3*mt().state.padding).attr("font-size",mt().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),r=n.height,i=t.append("text").attr("x",mt().state.padding).attr("y",r+.4*mt().state.padding+mt().state.dividerMargin+mt().state.textHeight).attr("class","state-description"),a=!0,o=!0;e.descriptions.forEach((function(t){a||(!function(t,e,n){var r=t.append("tspan").attr("x",2*mt().state.padding).text(e);n||r.attr("dy",mt().state.textHeight)}(i,t,o),o=!1),a=!1}));var s=t.append("line").attr("x1",mt().state.padding).attr("y1",mt().state.padding+r+mt().state.dividerMargin/2).attr("y2",mt().state.padding+r+mt().state.dividerMargin/2).attr("class","descr-divider"),c=i.node().getBBox(),u=Math.max(c.width,n.width);return s.attr("x2",u+3*mt().state.padding),t.insert("rect",":first-child").attr("x",mt().state.padding).attr("y",mt().state.padding).attr("width",u+2*mt().state.padding).attr("height",c.height+r+2*mt().state.padding).attr("rx",mt().state.radius),t},Ei=function(t,e,n){var r,i=mt().state.padding,a=2*mt().state.padding,o=t.node().getBBox(),s=o.width,c=o.x,u=t.append("text").attr("x",0).attr("y",mt().state.titleShift).attr("font-size",mt().state.fontSize).attr("class","state-title").text(e.id),l=u.node().getBBox().width+a,h=Math.max(l,s);h===s&&(h+=a);var f=t.node().getBBox();e.doc,r=c-i,l>s&&(r=(s-h)/2+i),Math.abs(c-f.x)<i&&l>s&&(r=c-(l-s)/2);var d=1-mt().state.textHeight;return t.insert("rect",":first-child").attr("x",r).attr("y",d).attr("class",n?"alt-composit":"composit").attr("width",h).attr("height",f.height+mt().state.textHeight+mt().state.titleShift+1).attr("rx","0"),u.attr("x",r+i),l<=s&&u.attr("x",c+(h-a)/2-l/2+i),t.insert("rect",":first-child").attr("x",r).attr("y",mt().state.titleShift-mt().state.textHeight-mt().state.padding).attr("width",h).attr("height",3*mt().state.textHeight).attr("rx",mt().state.radius),t.insert("rect",":first-child").attr("x",r).attr("y",mt().state.titleShift-mt().state.textHeight-mt().state.padding).attr("width",h).attr("height",f.height+3+2*mt().state.textHeight).attr("rx",mt().state.radius),t},Ti=function(t,e){e.attr("class","state-note");var n=e.append("rect").attr("x",0).attr("y",mt().state.padding),r=function(t,e,n,r){var i=0,a=r.append("text");a.style("text-anchor","start"),a.attr("class","noteText");var o=t.replace(/\r\n/g,"<br/>"),s=(o=o.replace(/\n/g,"<br/>")).split(x.lineBreakRegex),c=1.25*mt().state.noteMargin,u=!0,l=!1,h=void 0;try{for(var f,d=s[Symbol.iterator]();!(u=(f=d.next()).done);u=!0){var p=f.value.trim();if(p.length>0){var g=a.append("tspan");if(g.text(p),0===c)c+=g.node().getBBox().height;i+=c,g.attr("x",e+mt().state.noteMargin),g.attr("y",n+i+1.25*mt().state.noteMargin)}}}catch(t){l=!0,h=t}finally{try{u||null==d.return||d.return()}finally{if(l)throw h}}return{textWidth:a.node().getBBox().width,textHeight:i}}(t,0,0,e.append("g")),i=r.textWidth,a=r.textHeight;return n.attr("height",a+2*mt().state.noteMargin),n.attr("width",i+2*mt().state.noteMargin),n},Ci=function(t,e){var n=e.id,r={id:n,label:e.id,width:0,height:0},i=t.append("g").attr("id",n).attr("class","stateGroup");"start"===e.type&&function(t){t.append("circle").attr("class","start-state").attr("r",mt().state.sizeUnit).attr("cx",mt().state.padding+mt().state.sizeUnit).attr("cy",mt().state.padding+mt().state.sizeUnit)}(i),"end"===e.type&&function(t){t.append("circle").attr("class","end-state-outer").attr("r",mt().state.sizeUnit+mt().state.miniPadding).attr("cx",mt().state.padding+mt().state.sizeUnit+mt().state.miniPadding).attr("cy",mt().state.padding+mt().state.sizeUnit+mt().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",mt().state.sizeUnit).attr("cx",mt().state.padding+mt().state.sizeUnit+2).attr("cy",mt().state.padding+mt().state.sizeUnit+2)}(i),"fork"!==e.type&&"join"!==e.type||function(t,e){var n=mt().state.forkWidth,r=mt().state.forkHeight;if(e.parentId){var i=n;n=r,r=i}t.append("rect").style("stroke","black").style("fill","black").attr("width",n).attr("height",r).attr("x",mt().state.padding).attr("y",mt().state.padding)}(i,e),"note"===e.type&&Ti(e.note.text,i),"divider"===e.type&&function(t){t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",mt().state.textHeight).attr("class","divider").attr("x2",2*mt().state.textHeight).attr("y1",0).attr("y2",0)}(i),"default"===e.type&&0===e.descriptions.length&&function(t,e){var n=t.append("text").attr("x",2*mt().state.padding).attr("y",mt().state.textHeight+2*mt().state.padding).attr("font-size",mt().state.fontSize).attr("class","state-title").text(e.id),r=n.node().getBBox();t.insert("rect",":first-child").attr("x",mt().state.padding).attr("y",mt().state.padding).attr("width",r.width+2*mt().state.padding).attr("height",r.height+2*mt().state.padding).attr("rx",mt().state.radius)}(i,e),"default"===e.type&&e.descriptions.length>0&&wi(i,e);var a=i.node().getBBox();return r.width=a.width+2*mt().state.padding,r.height=a.height+2*mt().state.padding,ki(n,r),r},Ai=0;bi.parser.yy=mi;var Si={},Mi=function t(e,n,r,i){var a,o=new W.a.Graph({compound:!0,multigraph:!0}),c=!0;for(a=0;a<e.length;a++)if("relation"===e[a].stmt){c=!1;break}r?o.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:c?1:oi.edgeLengthFactor,nodeSep:c?1:50,isMultiGraph:!0}):o.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:c?1:oi.edgeLengthFactor,nodeSep:c?1:50,ranker:"tight-tree",isMultiGraph:!0}),o.setDefaultEdgeLabel((function(){return{}})),mi.extract(e);for(var u=mi.getStates(),l=mi.getRelations(),h=Object.keys(u),d=0;d<h.length;d++){var p=u[h[d]];r&&(p.parentId=r);var g=void 0;if(p.doc){var y=n.append("g").attr("id",p.id).attr("class","stateGroup");g=t(p.doc,y,p.id,!i);var v=(y=Ei(y,p,i)).node().getBBox();g.width=v.width,g.height=v.height+oi.padding/2,Si[p.id]={y:oi.compositTitleSize}}else g=Ci(n,p);if(p.note){var m={descriptions:[],id:p.id+"-note",note:p.note,type:"note"},b=Ci(n,m);"left of"===p.note.position?(o.setNode(g.id+"-note",b),o.setNode(g.id,g)):(o.setNode(g.id,g),o.setNode(g.id+"-note",b)),o.setParent(g.id,g.id+"-group"),o.setParent(g.id+"-note",g.id+"-group")}else o.setNode(g.id,g)}f.debug("Count=",o.nodeCount(),o);var _=0;l.forEach((function(t){var e;_++,f.debug("Setting edge",t),o.setEdge(t.id1,t.id2,{relation:t,width:(e=t.title,e?e.length*oi.fontSizeFactor:1),height:oi.labelHeight*x.getRows(t.title).length,labelpos:"c"},"id"+_)})),pe.a.layout(o),f.debug("Graph after layout",o.nodes());var k=n.node();o.nodes().forEach((function(t){void 0!==t&&void 0!==o.node(t)?(f.warn("Node "+t+": "+JSON.stringify(o.node(t))),Object(s.select)("#"+k.id+" #"+t).attr("transform","translate("+(o.node(t).x-o.node(t).width/2)+","+(o.node(t).y+(Si[t]?Si[t].y:0)-o.node(t).height/2)+" )"),Object(s.select)("#"+k.id+" #"+t).attr("data-x-shift",o.node(t).x-o.node(t).width/2),document.querySelectorAll("#"+k.id+" #"+t+" .divider").forEach((function(t){var e=t.parentElement,n=0,r=0;e&&(e.parentElement&&(n=e.parentElement.getBBox().width),r=parseInt(e.getAttribute("data-x-shift"),10),Number.isNaN(r)&&(r=0)),t.setAttribute("x1",0-r+8),t.setAttribute("x2",n-r-8)}))):f.debug("No Node "+t+": "+JSON.stringify(o.node(t)))}));var w=k.getBBox();o.edges().forEach((function(t){void 0!==t&&void 0!==o.edge(t)&&(f.debug("Edge "+t.v+" -> "+t.w+": "+JSON.stringify(o.edge(t))),function(t,e,n){e.points=e.points.filter((function(t){return!Number.isNaN(t.y)}));var r=e.points,i=Object(s.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(s.curveBasis),a=t.append("path").attr("d",i(r)).attr("id","edge"+Ai).attr("class","transition"),o="";if(mt().state.arrowMarkerAbsolute&&(o=(o=(o=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),a.attr("marker-end","url("+o+"#"+function(t){switch(t){case mi.relationType.AGGREGATION:return"aggregation";case mi.relationType.EXTENSION:return"extension";case mi.relationType.COMPOSITION:return"composition";case mi.relationType.DEPENDENCY:return"dependency"}}(mi.relationType.DEPENDENCY)+"End)"),void 0!==n.title){for(var c=t.append("g").attr("class","stateLabel"),u=U.calcLabelPosition(e.points),l=u.x,h=u.y,d=x.getRows(n.title),p=0,g=[],y=0,v=0,m=0;m<=d.length;m++){var b=c.append("text").attr("text-anchor","middle").text(d[m]).attr("x",l).attr("y",h+p),_=b.node().getBBox();if(y=Math.max(y,_.width),v=Math.min(v,_.x),f.info(_.x,l,h+p),0===p){var k=b.node().getBBox();p=k.height,f.info("Title height",p,h)}g.push(b)}var w=p*d.length;if(d.length>1){var E=(d.length-1)*p*.5;g.forEach((function(t,e){return t.attr("y",h+e*p-E)})),w=p*d.length}var T=c.node().getBBox();c.insert("rect",":first-child").attr("class","box").attr("x",l-y/2-mt().state.padding/2).attr("y",h-w/2-mt().state.padding/2-3.5).attr("width",y+mt().state.padding).attr("height",w+mt().state.padding),f.info(T)}Ai++}(n,o.edge(t),o.edge(t).relation))})),w=k.getBBox();var E={id:r||"root",label:r||"root",width:0,height:0};return E.width=w.width+2*oi.padding,E.height=w.height+2*oi.padding,f.debug("Doc rendered",E,o),E},Oi=function(){},Di=function(t,e){oi=mt().state,bi.parser.yy.clear(),bi.parser.parse(t),f.debug("Rendering diagram "+t);var n=Object(s.select)("[id='".concat(e,"']"));n.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z"),new W.a.Graph({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel((function(){return{}}));var r=mi.getRootDoc();Mi(r,n,void 0,!1);var i=oi.padding,a=n.node().getBBox(),o=a.width+2*i,c=a.height+2*i;oi.useMaxWidth?(n.attr("width","100%"),n.attr("style","max-width: ".concat(1.75*o,"px;"))):n.attr("width",1.75*o),n.attr("viewBox","".concat(a.x-oi.padding," ").concat(a.y-oi.padding," ")+o+" "+c)},Ni={},Bi={},Li=function(t,e,n,r){if("root"!==n.id){var i="rect";!0===n.start&&(i="start"),!1===n.start&&(i="end"),"default"!==n.type&&(i=n.type),Bi[n.id]||(Bi[n.id]={id:n.id,shape:i,description:n.id,classes:"statediagram-state"}),n.description&&(Array.isArray(Bi[n.id].description)?(Bi[n.id].shape="rectWithTitle",Bi[n.id].description.push(n.description)):Bi[n.id].description.length>0?(Bi[n.id].shape="rectWithTitle",Bi[n.id].description===n.id?Bi[n.id].description=[n.description]:Bi[n.id].description=[Bi[n.id].description,n.description]):(Bi[n.id].shape="rect",Bi[n.id].description=n.description)),!Bi[n.id].type&&n.doc&&(f.info("Setting cluser for ",n.id),Bi[n.id].type="group",Bi[n.id].shape="divider"===n.type?"divider":"roundedWithTitle",Bi[n.id].classes=Bi[n.id].classes+" "+(r?"statediagram-cluster statediagram-cluster-alt":"statediagram-cluster"));var a={labelStyle:"",shape:Bi[n.id].shape,labelText:Bi[n.id].description,classes:Bi[n.id].classes,style:"",id:n.id,type:Bi[n.id].type,padding:15};if(n.note){var o={labelStyle:"",shape:"note",labelText:n.note.text,classes:"statediagram-note",style:"",id:n.id+"----note",type:Bi[n.id].type,padding:15},s={labelStyle:"",shape:"noteGroup",labelText:n.note.text,classes:Bi[n.id].classes,style:"",id:n.id+"----parent",type:"group",padding:0};t.setNode(n.id+"----parent",s),t.setNode(o.id,o),t.setNode(n.id,a),t.setParent(n.id,n.id+"----parent"),t.setParent(o.id,n.id+"----parent");var c=n.id,u=o.id;"left of"===n.note.position&&(c=o.id,u=n.id),t.setEdge(c,u,{arrowhead:"none",arrowType:"",style:"fill:none",labelStyle:"",classes:"transition note-edge",arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text",thickness:"normal"})}else t.setNode(n.id,a)}e&&"root"!==e.id&&(f.info("Setting node ",n.id," to be child of its parent ",e.id),t.setParent(n.id,e.id)),n.doc&&(f.info("Adding nodes children "),Pi(t,n,n.doc,!r))},Fi=0,Pi=function(t,e,n,r){f.trace("items",n),n.forEach((function(n){if("state"===n.stmt||"default"===n.stmt)Li(t,e,n,r);else if("relation"===n.stmt){Li(t,e,n.state1,r),Li(t,e,n.state2,r);var i={id:"edge"+Fi,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:"fill:none",labelStyle:"",label:n.description,arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text",thickness:"normal",classes:"transition"},a=n.state1.id,o=n.state2.id;t.setEdge(a,o,i,Fi),Fi++}}))},Ii=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)Ni[e[n]]=t[e[n]]},ji=function(t,e){f.info("Drawing state diagram (v2)",e),mi.clear(),Bi={};var n=xi.a.parser;n.yy=mi,n.parse(t);var r=mi.getDirection();void 0===r&&(r="LR");var i=mt().state,a=i.nodeSpacing||50,o=i.rankSpacing||50,c=new W.a.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:"TB",nodesep:a,ranksep:o,marginx:8,marginy:8}).setDefaultEdgeLabel((function(){return{}}));f.info(mi.getRootDocV2()),mi.extract(mi.getRootDocV2()),f.info(mi.getRootDocV2()),Li(c,void 0,mi.getRootDocV2(),!0);var u=Object(s.select)('[id="'.concat(e,'"]')),l=Object(s.select)("#"+e+" g");qe(l,c,["barb"],"statediagram",e);var h=u.node().getBBox(),d=h.width+16,p=h.height+16;u.attr("width",1.75*d),u.attr("class","statediagram");var g=u.node().getBBox();i.useMaxWidth?(u.attr("width","100%"),u.attr("style","max-width: ".concat(d,"px;"))):(u.attr("height",p),u.attr("width",d));var y="".concat(g.x-8," ").concat(g.y-8," ").concat(d," ").concat(p);if(f.debug("viewBox ".concat(y)),u.attr("viewBox",y),!i.htmlLabels)for(var v=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label'),m=0;m<v.length;m++){var b=v[m],x=b.getBBox(),_=document.createElementNS("http://www.w3.org/2000/svg","rect");_.setAttribute("rx",0),_.setAttribute("ry",0),_.setAttribute("width",x.width),_.setAttribute("height",x.height),b.insertBefore(_,b.firstChild)}},Ri={},Yi=null,zi={master:Yi},Ui="master",$i="LR",Wi=0;function Vi(){return F({length:7})}function Hi(t,e){for(f.debug("Entering isfastforwardable:",t.id,e.id);t.seq<=e.seq&&t!==e&&null!=e.parent;){if(Array.isArray(e.parent))return f.debug("In merge commit:",e.parent),Hi(t,Ri[e.parent[0]])||Hi(t,Ri[e.parent[1]]);e=Ri[e.parent]}return f.debug(t.id,e.id),t.id===e.id}var Gi={};function qi(t,e,n){var r=t.indexOf(e);-1===r?t.push(n):t.splice(r,1,n)}function Xi(t){var e=t.reduce((function(t,e){return t.seq>e.seq?t:e}),t[0]),n="";t.forEach((function(t){n+=t===e?"\t*":"\t|"}));var r,i,a,o=[n,e.id,e.seq];for(var s in zi)zi[s]===e.id&&o.push(s);if(f.debug(o.join(" ")),Array.isArray(e.parent)){var c=Ri[e.parent[0]];qi(t,e,c),t.push(Ri[e.parent[1]])}else{if(null==e.parent)return;var u=Ri[e.parent];qi(t,e,u)}r=t,i=function(t){return t.id},a=Object.create(null),Xi(t=r.reduce((function(t,e){var n=i(e);return a[n]||(a[n]=!0,t.push(e)),t}),[]))}var Zi,Ji=function(){var t=Object.keys(Ri).map((function(t){return Ri[t]}));return t.forEach((function(t){f.debug(t.id)})),t.sort((function(t,e){return e.seq-t.seq})),t},Qi={setDirection:function(t){$i=t},setOptions:function(t){f.debug("options str",t),t=(t=t&&t.trim())||"{}";try{Gi=JSON.parse(t)}catch(t){f.error("error while parsing gitGraph options",t.message)}},getOptions:function(){return Gi},commit:function(t){var e={id:Vi(),message:t,seq:Wi++,parent:null==Yi?null:Yi.id};Yi=e,Ri[e.id]=e,zi[Ui]=e.id,f.debug("in pushCommit "+e.id)},branch:function(t){zi[t]=null!=Yi?Yi.id:null,f.debug("in createBranch")},merge:function(t){var e=Ri[zi[Ui]],n=Ri[zi[t]];if(function(t,e){return t.seq>e.seq&&Hi(e,t)}(e,n))f.debug("Already merged");else{if(Hi(e,n))zi[Ui]=zi[t],Yi=Ri[zi[Ui]];else{var r={id:Vi(),message:"merged branch "+t+" into "+Ui,seq:Wi++,parent:[null==Yi?null:Yi.id,zi[t]]};Yi=r,Ri[r.id]=r,zi[Ui]=r.id}f.debug(zi),f.debug("in mergeBranch")}},checkout:function(t){f.debug("in checkout");var e=zi[Ui=t];Yi=Ri[e]},reset:function(t){f.debug("in reset",t);var e=t.split(":")[0],n=parseInt(t.split(":")[1]),r="HEAD"===e?Yi:Ri[zi[e]];for(f.debug(r,n);n>0;)if(n--,!(r=Ri[r.parent])){var i="Critical error - unique parent commit not found during reset";throw f.error(i),i}Yi=r,zi[Ui]=r.id},prettyPrint:function(){f.debug(Ri),Xi([Ji()[0]])},clear:function(){Ri={},zi={master:Yi=null},Ui="master",Wi=0},getBranchesAsObjArray:function(){var t=[];for(var e in zi)t.push({name:e,commit:Ri[zi[e]]});return t},getBranches:function(){return zi},getCommits:function(){return Ri},getCommitsArray:Ji,getCurrentBranch:function(){return Ui},getDirection:function(){return $i},getHead:function(){return Yi}},Ki=n(71),ta=n.n(Ki),ea={},na={nodeSpacing:150,nodeFillColor:"yellow",nodeStrokeWidth:2,nodeStrokeColor:"grey",lineStrokeWidth:4,branchOffset:50,lineColor:"grey",leftMargin:50,branchColors:["#442f74","#983351","#609732","#AA9A39"],nodeRadius:10,nodeLabel:{width:75,height:100,x:-25,y:0}},ra={};function ia(t,e,n,r){var i=O(r,s.curveBasis),a=na.branchColors[n%na.branchColors.length],o=Object(s.line)().x((function(t){return Math.round(t.x)})).y((function(t){return Math.round(t.y)})).curve(i);t.append("svg:path").attr("d",o(e)).style("stroke",a).style("stroke-width",na.lineStrokeWidth).style("fill","none")}function aa(t,e){e=e||t.node().getBBox();var n=t.node().getCTM();return{left:n.e+e.x*n.a,top:n.f+e.y*n.d,width:e.width,height:e.height}}function oa(t,e,n,r,i){f.debug("svgDrawLineForCommits: ",e,n);var a=aa(t.select("#node-"+e+" circle")),o=aa(t.select("#node-"+n+" circle"));switch(r){case"LR":if(a.left-o.left>na.nodeSpacing){var s={x:a.left-na.nodeSpacing,y:o.top+o.height/2};ia(t,[s,{x:o.left+o.width,y:o.top+o.height/2}],i,"linear"),ia(t,[{x:a.left,y:a.top+a.height/2},{x:a.left-na.nodeSpacing/2,y:a.top+a.height/2},{x:a.left-na.nodeSpacing/2,y:s.y},s],i)}else ia(t,[{x:a.left,y:a.top+a.height/2},{x:a.left-na.nodeSpacing/2,y:a.top+a.height/2},{x:a.left-na.nodeSpacing/2,y:o.top+o.height/2},{x:o.left+o.width,y:o.top+o.height/2}],i);break;case"BT":if(o.top-a.top>na.nodeSpacing){var c={x:o.left+o.width/2,y:a.top+a.height+na.nodeSpacing};ia(t,[c,{x:o.left+o.width/2,y:o.top}],i,"linear"),ia(t,[{x:a.left+a.width/2,y:a.top+a.height},{x:a.left+a.width/2,y:a.top+a.height+na.nodeSpacing/2},{x:o.left+o.width/2,y:c.y-na.nodeSpacing/2},c],i)}else ia(t,[{x:a.left+a.width/2,y:a.top+a.height},{x:a.left+a.width/2,y:a.top+na.nodeSpacing/2},{x:o.left+o.width/2,y:o.top-na.nodeSpacing/2},{x:o.left+o.width/2,y:o.top}],i)}}function sa(t,e){return t.select(e).node().cloneNode(!0)}function ca(t,e,n,r){var i,a=Object.keys(ea).length;if("string"==typeof e)do{if(i=ea[e],f.debug("in renderCommitHistory",i.id,i.seq),t.select("#node-"+e).size()>0)return;t.append((function(){return sa(t,"#def-commit")})).attr("class","commit").attr("id",(function(){return"node-"+i.id})).attr("transform",(function(){switch(r){case"LR":return"translate("+(i.seq*na.nodeSpacing+na.leftMargin)+", "+Zi*na.branchOffset+")";case"BT":return"translate("+(Zi*na.branchOffset+na.leftMargin)+", "+(a-i.seq)*na.nodeSpacing+")"}})).attr("fill",na.nodeFillColor).attr("stroke",na.nodeStrokeColor).attr("stroke-width",na.nodeStrokeWidth);var o=void 0;for(var s in n)if(n[s].commit===i){o=n[s];break}o&&(f.debug("found branch ",o.name),t.select("#node-"+i.id+" p").append("xhtml:span").attr("class","branch-label").text(o.name+", ")),t.select("#node-"+i.id+" p").append("xhtml:span").attr("class","commit-id").text(i.id),""!==i.message&&"BT"===r&&t.select("#node-"+i.id+" p").append("xhtml:span").attr("class","commit-msg").text(", "+i.message),e=i.parent}while(e&&ea[e]);Array.isArray(e)&&(f.debug("found merge commmit",e),ca(t,e[0],n,r),Zi++,ca(t,e[1],n,r),Zi--)}function ua(t,e,n,r){for(r=r||0;e.seq>0&&!e.lineDrawn;)"string"==typeof e.parent?(oa(t,e.id,e.parent,n,r),e.lineDrawn=!0,e=ea[e.parent]):Array.isArray(e.parent)&&(oa(t,e.id,e.parent[0],n,r),oa(t,e.id,e.parent[1],n,r+1),ua(t,ea[e.parent[1]],n,r+1),e.lineDrawn=!0,e=ea[e.parent[0]])}var la,ha=function(t){ra=t},fa=function(t,e,n){try{var r=ta.a.parser;r.yy=Qi,r.yy.clear(),f.debug("in gitgraph renderer",t+"\n","id:",e,n),r.parse(t+"\n"),na=Object.assign(na,ra,Qi.getOptions()),f.debug("effective options",na);var i=Qi.getDirection();ea=Qi.getCommits();var a=Qi.getBranchesAsObjArray();"BT"===i&&(na.nodeLabel.x=a.length*na.branchOffset,na.nodeLabel.width="100%",na.nodeLabel.y=-2*na.nodeRadius);var o=Object(s.select)('[id="'.concat(e,'"]'));for(var c in function(t){t.append("defs").append("g").attr("id","def-commit").append("circle").attr("r",na.nodeRadius).attr("cx",0).attr("cy",0),t.select("#def-commit").append("foreignObject").attr("width",na.nodeLabel.width).attr("height",na.nodeLabel.height).attr("x",na.nodeLabel.x).attr("y",na.nodeLabel.y).attr("class","node-label").attr("requiredFeatures","http://www.w3.org/TR/SVG11/feature#Extensibility").append("p").html("")}(o),Zi=1,a){var u=a[c];ca(o,u.commit.id,a,i),ua(o,u.commit,i),Zi++}o.attr("height",(function(){return"BT"===i?Object.keys(ea).length*na.nodeSpacing:(a.length+1)*na.branchOffset}))}catch(t){f.error("Error while rendering gitgraph"),f.error(t.message)}},da="",pa=!1,ga={setMessage:function(t){f.debug("Setting message to: "+t),da=t},getMessage:function(){return da},setInfo:function(t){pa=t},getInfo:function(){return pa}},ya=n(72),va=n.n(ya),ma={},ba=function(t){Object.keys(t).forEach((function(e){ma[e]=t[e]}))},xa=function(t,e,n){try{var r=va.a.parser;r.yy=ga,f.debug("Renering info diagram\n"+t),r.parse(t),f.debug("Parsed info diagram");var i=Object(s.select)("#"+e);i.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("v "+n),i.attr("height",100),i.attr("width",400)}catch(t){f.error("Error while rendering info diagram"),f.error(t.message)}},_a={},ka=function(t){Object.keys(t).forEach((function(e){_a[e]=t[e]}))},wa=function(t,e){try{f.debug("Renering svg for syntax error\n");var n=Object(s.select)("#"+t),r=n.append("g");r.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"),r.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"),r.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"),r.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"),r.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"),r.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"),r.append("text").attr("class","error-text").attr("x",1240).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in graph"),r.append("text").attr("class","error-text").attr("x",1050).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+e),n.attr("height",100),n.attr("width",400),n.attr("viewBox","768 0 512 512")}catch(t){f.error("Error while rendering info diagram"),f.error(t.message)}},Ea={},Ta="",Ca={parseDirective:function(t,e,n){Lo.parseDirective(this,t,e,n)},getConfig:function(){return mt().pie},addSection:function(t,e){void 0===Ea[t]&&(Ea[t]=e,f.debug("Added new section :",t))},getSections:function(){return Ea},cleanupValue:function(t){return":"===t.substring(0,1)?(t=t.substring(1).trim(),Number(t.trim())):Number(t.trim())},clear:function(){Ea={},Ta=""},setTitle:function(t){Ta=t},getTitle:function(){return Ta}},Aa=n(73),Sa=n.n(Aa),Ma={},Oa=function(t){Object.keys(t).forEach((function(e){Ma[e]=t[e]}))},Da=function(t,e){try{var n=Sa.a.parser;n.yy=Ca,f.debug("Rendering info diagram\n"+t),n.yy.clear(),n.parse(t),f.debug("Parsed info diagram");var r=document.getElementById(e);void 0===(la=r.parentElement.offsetWidth)&&(la=1200),void 0!==Ma.useWidth&&(la=Ma.useWidth);r.setAttribute("height","100%"),r.setAttribute("viewBox","0 0 "+la+" 450");var i=la,a=Math.min(i,450)/2-40,o=Object(s.select)("#"+e).append("svg").attr("width",i).attr("height",450).append("g").attr("transform","translate("+i/2+",225)"),c=Ca.getSections(),u=0;Object.keys(c).forEach((function(t){u+=c[t]})),f.info(c);var l=Object(s.scaleOrdinal)().domain(c).range(s.schemeSet2),h=Object(s.pie)().value((function(t){return t.value}))(Object(s.entries)(c)),d=Object(s.arc)().innerRadius(0).outerRadius(a);o.selectAll("mySlices").data(h).enter().append("path").attr("d",d).attr("fill",(function(t){return l(t.data.key)})).attr("stroke","black").style("stroke-width","2px").style("opacity",.7),o.selectAll("mySlices").data(h).enter().append("text").text((function(t){return(t.data.value/u*100).toFixed(0)+"%"})).attr("transform",(function(t){return"translate("+d.centroid(t)+")"})).style("text-anchor","middle").attr("class","slice").style("font-size",17),o.append("text").text(n.yy.getTitle()).attr("x",0).attr("y",-200).attr("class","pieTitleText");var p=o.selectAll(".legend").data(l.domain()).enter().append("g").attr("class","legend").attr("transform",(function(t,e){return"translate(216,"+(22*e-22*l.domain().length/2)+")"}));p.append("rect").attr("width",18).attr("height",18).style("fill",l).style("stroke",l),p.append("text").attr("x",22).attr("y",14).text((function(t){return t}))}catch(t){f.error("Error while rendering info diagram"),f.error(t)}},Na={},Ba=[],La="",Fa={Cardinality:{ZERO_OR_ONE:"ZERO_OR_ONE",ZERO_OR_MORE:"ZERO_OR_MORE",ONE_OR_MORE:"ONE_OR_MORE",ONLY_ONE:"ONLY_ONE"},Identification:{NON_IDENTIFYING:"NON_IDENTIFYING",IDENTIFYING:"IDENTIFYING"},parseDirective:function(t,e,n){Lo.parseDirective(this,t,e,n)},getConfig:function(){return mt().er},addEntity:function(t){void 0===Na[t]&&(Na[t]=t,f.debug("Added new entity :",t))},getEntities:function(){return Na},addRelationship:function(t,e,n,r){var i={entityA:t,roleA:e,entityB:n,relSpec:r};Ba.push(i),f.debug("Added new relationship :",i)},getRelationships:function(){return Ba},clear:function(){Na={},Ba=[],La=""},setTitle:function(t){La=t},getTitle:function(){return La}},Pa=n(74),Ia=n.n(Pa),ja={ONLY_ONE_START:"ONLY_ONE_START",ONLY_ONE_END:"ONLY_ONE_END",ZERO_OR_ONE_START:"ZERO_OR_ONE_START",ZERO_OR_ONE_END:"ZERO_OR_ONE_END",ONE_OR_MORE_START:"ONE_OR_MORE_START",ONE_OR_MORE_END:"ONE_OR_MORE_END",ZERO_OR_MORE_START:"ZERO_OR_MORE_START",ZERO_OR_MORE_END:"ZERO_OR_MORE_END"},Ra=ja,Ya=function(t,e){var n;t.append("defs").append("marker").attr("id",ja.ONLY_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18 M15,0 L15,18"),t.append("defs").append("marker").attr("id",ja.ONLY_ONE_END).attr("refX",18).attr("refY",9).attr("markerWidth",18).attr("markerHeight",18).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,0 L3,18 M9,0 L9,18"),(n=t.append("defs").append("marker").attr("id",ja.ZERO_OR_ONE_START).attr("refX",0).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",21).attr("cy",9).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M9,0 L9,18"),(n=t.append("defs").append("marker").attr("id",ja.ZERO_OR_ONE_END).attr("refX",30).attr("refY",9).attr("markerWidth",30).attr("markerHeight",18).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",9).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,0 L21,18"),t.append("defs").append("marker").attr("id",ja.ONE_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q 18,0 36,18 Q 18,36 0,18 M42,9 L42,27"),t.append("defs").append("marker").attr("id",ja.ONE_OR_MORE_END).attr("refX",27).attr("refY",18).attr("markerWidth",45).attr("markerHeight",36).attr("orient","auto").append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M3,9 L3,27 M9,18 Q27,0 45,18 Q27,36 9,18"),(n=t.append("defs").append("marker").attr("id",ja.ZERO_OR_MORE_START).attr("refX",18).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",48).attr("cy",18).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M0,18 Q18,0 36,18 Q18,36 0,18"),(n=t.append("defs").append("marker").attr("id",ja.ZERO_OR_MORE_END).attr("refX",39).attr("refY",18).attr("markerWidth",57).attr("markerHeight",36).attr("orient","auto")).append("circle").attr("stroke",e.stroke).attr("fill","white").attr("cx",9).attr("cy",18).attr("r",6),n.append("path").attr("stroke",e.stroke).attr("fill","none").attr("d","M21,18 Q39,0 57,18 Q39,36 21,18")},za={},Ua=function(t){return(t.entityA+t.roleA+t.entityB).replace(/\s/g,"")},$a=0,Wa=function(t){for(var e=Object.keys(t),n=0;n<e.length;n++)za[e[n]]=t[e[n]]},Va=function(t,e){f.info("Drawing ER diagram"),Fa.clear();var n=Ia.a.parser;n.yy=Fa;try{n.parse(t)}catch(t){f.debug("Parsing failed")}var r,i=Object(s.select)("[id='".concat(e,"']"));Ya(i,za),r=new W.a.Graph({multigraph:!0,directed:!0,compound:!1}).setGraph({rankdir:za.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel((function(){return{}}));var a,o,c,u,l=(a=i,o=Fa.getEntities(),c=r,Object.keys(o).forEach((function(t){var e=a.append("g").attr("id",t);u=void 0===u?t:u;var n="entity-"+t,r=e.append("text").attr("class","er entityLabel").attr("id",n).attr("x",0).attr("y",0).attr("dominant-baseline","middle").attr("text-anchor","middle").attr("style","font-family: "+mt().fontFamily+"; font-size: "+za.fontSize+"px").text(t),i=r.node().getBBox(),o=Math.max(za.minEntityWidth,i.width+2*za.entityPadding),s=Math.max(za.minEntityHeight,i.height+2*za.entityPadding);r.attr("transform","translate("+o/2+","+s/2+")");var l=e.insert("rect","#"+n).attr("class","er entityBox").attr("fill",za.fill).attr("fill-opacity","100%").attr("stroke",za.stroke).attr("x",0).attr("y",0).attr("width",o).attr("height",s).node().getBBox();c.setNode(t,{width:l.width,height:l.height,shape:"rect",id:t})})),u),h=function(t,e){return t.forEach((function(t){e.setEdge(t.entityA,t.entityB,{relationship:t},Ua(t))})),t}(Fa.getRelationships(),r);pe.a.layout(r),function(t,e){e.nodes().forEach((function(n){void 0!==n&&void 0!==e.node(n)&&t.select("#"+n).attr("transform","translate("+(e.node(n).x-e.node(n).width/2)+","+(e.node(n).y-e.node(n).height/2)+" )")}))}(i,r),h.forEach((function(t){!function(t,e,n,r){$a++;var i=n.edge(e.entityA,e.entityB,Ua(e)),a=Object(s.line)().x((function(t){return t.x})).y((function(t){return t.y})).curve(s.curveBasis),o=t.insert("path","#"+r).attr("class","er relationshipLine").attr("d",a(i.points)).attr("stroke",za.stroke).attr("fill","none");e.relSpec.relType===Fa.Identification.NON_IDENTIFYING&&o.attr("stroke-dasharray","8,8");var c="";switch(za.arrowMarkerAbsolute&&(c=(c=(c=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search).replace(/\(/g,"\\(")).replace(/\)/g,"\\)")),e.relSpec.cardA){case Fa.Cardinality.ZERO_OR_ONE:o.attr("marker-end","url("+c+"#"+Ra.ZERO_OR_ONE_END+")");break;case Fa.Cardinality.ZERO_OR_MORE:o.attr("marker-end","url("+c+"#"+Ra.ZERO_OR_MORE_END+")");break;case Fa.Cardinality.ONE_OR_MORE:o.attr("marker-end","url("+c+"#"+Ra.ONE_OR_MORE_END+")");break;case Fa.Cardinality.ONLY_ONE:o.attr("marker-end","url("+c+"#"+Ra.ONLY_ONE_END+")")}switch(e.relSpec.cardB){case Fa.Cardinality.ZERO_OR_ONE:o.attr("marker-start","url("+c+"#"+Ra.ZERO_OR_ONE_START+")");break;case Fa.Cardinality.ZERO_OR_MORE:o.attr("marker-start","url("+c+"#"+Ra.ZERO_OR_MORE_START+")");break;case Fa.Cardinality.ONE_OR_MORE:o.attr("marker-start","url("+c+"#"+Ra.ONE_OR_MORE_START+")");break;case Fa.Cardinality.ONLY_ONE:o.attr("marker-start","url("+c+"#"+Ra.ONLY_ONE_START+")")}var u=o.node().getTotalLength(),l=o.node().getPointAtLength(.5*u),h="rel"+$a,f=t.append("text").attr("class","er relationshipLabel").attr("id",h).attr("x",l.x).attr("y",l.y).attr("text-anchor","middle").attr("dominant-baseline","middle").attr("style","font-family: "+mt().fontFamily+"; font-size: "+za.fontSize+"px").text(e.roleA).node().getBBox();t.insert("rect","#"+h).attr("class","er relationshipLabelBox").attr("x",l.x-f.width/2).attr("y",l.y-f.height/2).attr("width",f.width).attr("height",f.height).attr("fill","white").attr("fill-opacity","85%")}(i,t,r,l)}));var d=za.diagramPadding,p=i.node().getBBox(),g=p.width+2*d,y=p.height+2*d;za.useMaxWidth?(i.attr("width","100%"),i.attr("style","max-width: ".concat(g,"px;"))):(i.attr("height",y),i.attr("width",g)),i.attr("viewBox","".concat(p.x-d," ").concat(p.y-d," ").concat(g," ").concat(y))},Ha=n(28),Ga=n.n(Ha);function qa(t){return function(t){if(Array.isArray(t)){for(var e=0,n=new Array(t.length);e<t.length;e++)n[e]=t[e];return n}}(t)||function(t){if(Symbol.iterator in Object(t)||"[object Arguments]"===Object.prototype.toString.call(t))return Array.from(t)}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance")}()}var Xa="",Za="",Ja=[],Qa=[],Ka=[],to=function(){for(var t=!0,e=0;e<Ka.length;e++)Ka[e].processed,t=t&&Ka[e].processed;return t},eo={parseDirective:function(t,e,n){Lo.parseDirective(this,t,e,n)},getConfig:function(){return mt().journey},clear:function(){Ja.length=0,Qa.length=0,Za="",Xa="",Ka.length=0},setTitle:function(t){Xa=t},getTitle:function(){return Xa},addSection:function(t){Za=t,Ja.push(t)},getSections:function(){return Ja},getTasks:function(){for(var t=to(),e=0;!t&&e<100;)t=to(),e++;return Qa.push.apply(Qa,Ka),Qa},addTask:function(t,e){var n=e.substr(1).split(":"),r=0,i=[];1===n.length?(r=Number(n[0]),i=[]):(r=Number(n[0]),i=n[1].split(","));var a=i.map((function(t){return t.trim()})),o={section:Za,type:Za,people:a,task:t,score:r};Ka.push(o)},addTaskOrg:function(t){var e={section:Za,type:Za,description:t,task:t,classes:[]};Qa.push(e)},getActors:function(){return t=[],Qa.forEach((function(e){e.people&&t.push.apply(t,qa(e.people))})),qa(new Set(t)).sort();var t}},no=function(t,e){var n=t.append("rect");return n.attr("x",e.x),n.attr("y",e.y),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("width",e.width),n.attr("height",e.height),n.attr("rx",e.rx),n.attr("ry",e.ry),void 0!==e.class&&n.attr("class",e.class),n},ro=function(t,e){var n=t.append("circle");return n.attr("cx",e.cx),n.attr("cy",e.cy),n.attr("fill",e.fill),n.attr("stroke",e.stroke),n.attr("r",e.r),void 0!==n.class&&n.attr("class",n.class),void 0!==e.title&&n.append("title").text(e.title),n},io=function(t,e){var n=e.text.replace(/<br\s*\/?>/gi," "),r=t.append("text");r.attr("x",e.x),r.attr("y",e.y),r.attr("class","legend"),r.style("text-anchor",e.anchor),void 0!==e.class&&r.attr("class",e.class);var i=r.append("tspan");return i.attr("x",e.x+2*e.textMargin),i.text(n),r},ao=-1,oo=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},so=function(){function t(t,e,n,i,a,o,s,c){r(e.append("text").attr("x",n+a/2).attr("y",i+o/2+5).style("font-color",c).style("text-anchor","middle").text(t),s)}function e(t,e,n,i,a,o,s,c,u){for(var l=c.taskFontSize,h=c.taskFontFamily,f=t.split(/<br\s*\/?>/gi),d=0;d<f.length;d++){var p=d*l-l*(f.length-1)/2,g=e.append("text").attr("x",n+a/2).attr("y",i).attr("fill",u).style("text-anchor","middle").style("font-size",l).style("font-family",h);g.append("tspan").attr("x",n+a/2).attr("dy",p).text(f[d]),g.attr("y",i+o/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),r(g,s)}}function n(t,n,i,a,o,s,c,u){var l=n.append("switch"),h=l.append("foreignObject").attr("x",i).attr("y",a).attr("width",o).attr("height",s).attr("position","fixed").append("div").style("display","table").style("height","100%").style("width","100%");h.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(t),e(t,l,i,a,o,s,c,u),r(h,c)}function r(t,e){for(var n in e)n in e&&t.attr(n,e[n])}return function(r){return"fo"===r.textPlacement?n:"old"===r.textPlacement?t:e}}(),co=ro,uo=function(t,e,n){var r=t.append("g"),i=oo();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=n.width,i.height=n.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,no(r,i),so(n)(e.text,r,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},n,e.colour)},lo=io,ho=function(t,e,n){var r=e.x+n.width/2,i=t.append("g");ao++;var a,o,c;i.append("line").attr("id","task"+ao).attr("x1",r).attr("y1",e.y).attr("x2",r).attr("y2",450).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),a=i,o={cx:r,cy:300+30*(5-e.score),score:e.score},a.append("circle").attr("cx",o.cx).attr("cy",o.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),(c=a.append("g")).append("circle").attr("cx",o.cx-5).attr("cy",o.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),c.append("circle").attr("cx",o.cx+5).attr("cy",o.cy-5).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),o.score>3?function(t){var e=Object(s.arc)().startAngle(Math.PI/2).endAngle(Math.PI/2*3).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+o.cx+","+(o.cy+2)+")")}(c):o.score<3?function(t){var e=Object(s.arc)().startAngle(3*Math.PI/2).endAngle(Math.PI/2*5).innerRadius(7.5).outerRadius(15/2.2);t.append("path").attr("class","mouth").attr("d",e).attr("transform","translate("+o.cx+","+(o.cy+7)+")")}(c):function(t){t.append("line").attr("class","mouth").attr("stroke",2).attr("x1",o.cx-5).attr("y1",o.cy+7).attr("x2",o.cx+5).attr("y2",o.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}(c);var u=oo();u.x=e.x,u.y=e.y,u.fill=e.fill,u.width=n.width,u.height=n.height,u.class="task task-type-"+e.num,u.rx=3,u.ry=3,no(i,u);var l=e.x+14;e.people.forEach((function(t){var n=e.actors[t],r={cx:l,cy:e.y,r:7,fill:n,stroke:"#000",title:t};ro(i,r),l+=10})),so(n)(e.task,i,u.x,u.y,u.width,u.height,{class:"task"},n,e.colour)},fo=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")};Ha.parser.yy=eo;var po={leftMargin:150,diagramMarginX:50,diagramMarginY:20,taskMargin:50,width:150,height:50,taskFontSize:14,taskFontFamily:'"Open-Sans", "sans-serif"',boxMargin:10,boxTextMargin:5,noteMargin:10,messageMargin:35,messageAlign:"center",bottomMarginAdj:1,activationWidth:10,textPlacement:"fo",actorColours:["#8FBC8F","#7CFC00","#00FFFF","#20B2AA","#B0E0E6","#FFFFE0"],sectionFills:["#191970","#8B008B","#4B0082","#2F4F4F","#800000","#8B4513","#00008B"],sectionColours:["#fff"]},go={};var yo=po.leftMargin,vo={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,n,r){void 0===t[e]?t[e]=n:t[e]=r(n,t[e])},updateBounds:function(t,e,n,r){var i,a=this,o=0;this.sequenceItems.forEach((function(s){o++;var c=a.sequenceItems.length-o+1;a.updateVal(s,"starty",e-c*po.boxMargin,Math.min),a.updateVal(s,"stopy",r+c*po.boxMargin,Math.max),a.updateVal(vo.data,"startx",t-c*po.boxMargin,Math.min),a.updateVal(vo.data,"stopx",n+c*po.boxMargin,Math.max),"activation"!==i&&(a.updateVal(s,"startx",t-c*po.boxMargin,Math.min),a.updateVal(s,"stopx",n+c*po.boxMargin,Math.max),a.updateVal(vo.data,"starty",e-c*po.boxMargin,Math.min),a.updateVal(vo.data,"stopy",r+c*po.boxMargin,Math.max))}))},insert:function(t,e,n,r){var i=Math.min(t,n),a=Math.max(t,n),o=Math.min(e,r),s=Math.max(e,r);this.updateVal(vo.data,"startx",i,Math.min),this.updateVal(vo.data,"starty",o,Math.min),this.updateVal(vo.data,"stopx",a,Math.max),this.updateVal(vo.data,"stopy",s,Math.max),this.updateBounds(i,o,a,s)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},mo=po.sectionFills,bo=po.sectionColours,xo=function(t,e,n){for(var r="",i=n+(2*po.height+po.diagramMarginY),a=0,o="#CCC",s="black",c=0,u=0;u<e.length;u++){var l=e[u];if(r!==l.section){o=mo[a%mo.length],c=a%mo.length,s=bo[a%bo.length];var h={x:u*po.taskMargin+u*po.width+yo,y:50,text:l.section,fill:o,num:c,colour:s};uo(t,h,po),r=l.section,a++}var f=l.people.reduce((function(t,e){return go[e]&&(t[e]=go[e]),t}),{});l.x=u*po.taskMargin+u*po.width+yo,l.y=i,l.width=po.diagramMarginX,l.height=po.diagramMarginY,l.colour=s,l.fill=o,l.num=c,l.actors=f,ho(t,l,po),vo.insert(l.x,l.y,l.x+l.width+po.taskMargin,450)}},_o=function(t){Object.keys(t).forEach((function(e){po[e]=t[e]}))},ko=function(t,e){Ha.parser.yy.clear(),Ha.parser.parse(t+"\n"),vo.init();var n=Object(s.select)("#"+e);n.attr("xmlns:xlink","http://www.w3.org/1999/xlink"),fo(n);var r=Ha.parser.yy.getTasks(),i=Ha.parser.yy.getTitle(),a=Ha.parser.yy.getActors();for(var o in go)delete go[o];var c=0;a.forEach((function(t){go[t]=po.actorColours[c%po.actorColours.length],c++})),function(t){var e=60;Object.keys(go).forEach((function(n){var r=go[n];co(t,{cx:20,cy:e,r:7,fill:r,stroke:"#000"});var i={x:40,y:e+7,fill:"#666",text:n,textMargin:5|po.boxTextMargin};lo(t,i),e+=20}))}(n),vo.insert(0,0,yo,50*Object.keys(go).length),xo(n,r,0);var u=vo.getBounds();i&&n.append("text").text(i).attr("x",yo).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);var l=u.stopy-u.starty+2*po.diagramMarginY,h=yo+u.stopx+2*po.diagramMarginX;po.useMaxWidth?(n.attr("height","100%"),n.attr("width","100%"),n.attr("style","max-width:"+h+"px;")):(n.attr("height",l),n.attr("width",h)),n.append("line").attr("x1",yo).attr("y1",4*po.height).attr("x2",h-yo-4).attr("y2",4*po.height).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");var f=i?70:0;n.attr("viewBox","".concat(u.startx," -25 ").concat(h," ").concat(l+f)),n.attr("preserveAspectRatio","xMinYMin meet")},wo=function(t){return"g.classGroup text {\n fill: ".concat(t.nodeBorder,";\n fill: ").concat(t.classText,";\n stroke: none;\n font-family: ").concat(t.fontFamily,";\n font-size: 10px;\n\n .title {\n font-weight: bolder;\n }\n}\n.node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n\n\n.divider {\n stroke: ").concat(t.nodeBorder,";\n stroke: 1;\n}\n\ng.clickable {\n cursor: pointer;\n}\n\ng.classGroup rect {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n}\n\ng.classGroup line {\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1;\n}\n\n.classLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ").concat(t.mainBkg,";\n opacity: 0.5;\n}\n\n.classLabel .label {\n fill: ").concat(t.nodeBorder,";\n font-size: 10px;\n}\n\n.relation {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n fill: none;\n}\n\n.dashed-line{\n stroke-dasharray: 3;\n}\n\n#compositionStart, .composition {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#compositionEnd, .composition {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#dependencyStart, .dependency {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#extensionStart, .extension {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#extensionEnd, .extension {\n fill: ").concat(t.lineColor," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#aggregationStart, .aggregation {\n fill: ").concat(t.mainBkg," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n\n#aggregationEnd, .aggregation {\n fill: ").concat(t.mainBkg," !important;\n stroke: ").concat(t.lineColor," !important;\n stroke-width: 1;\n}\n")},Eo=function(t){return".label {\n font-family: ".concat(t.fontFamily,";\n color: ").concat(t.nodeTextColor||t.textColor,";\n }\n\n .label text {\n fill: ").concat(t.nodeTextColor||t.textColor,";\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(t.arrowheadColor,";\n }\n\n .edgePath .path {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ").concat(t.lineColor,";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(t.edgeLabelBackground,";\n rect {\n opacity: 0.5;\n background-color: ").concat(t.edgeLabelBackground,";\n fill: ").concat(t.edgeLabelBackground,";\n }\n text-align: center;\n }\n\n .cluster rect {\n fill: ").concat(t.clusterBkg,";\n stroke: ").concat(t.clusterBorder,";\n stroke-width: 1px;\n }\n\n .cluster text {\n fill: ").concat(t.titleColor,";\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: ").concat(t.fontFamily,";\n font-size: 12px;\n background: ").concat(t.tertiaryColor,";\n border: 1px solid ").concat(t.border2,";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n")},To=function(t){return"g.stateGroup text {\n fill: ".concat(t.nodeBorder,";\n stroke: none;\n font-size: 10px;\n}\ng.stateGroup text {\n fill: ").concat(t.textColor,";\n stroke: none;\n font-size: 10px;\n\n}\ng.stateGroup .state-title {\n font-weight: bolder;\n fill: ").concat(t.labelColor,";\n}\n\ng.stateGroup rect {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n}\n\ng.stateGroup line {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n}\n\n.transition {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n fill: none;\n}\n\n.stateGroup .composit {\n fill: ").concat(t.background,";\n border-bottom: 1px\n}\n\n.stateGroup .alt-composit {\n fill: #e0e0e0;\n border-bottom: 1px\n}\n\n.state-note {\n stroke: ").concat(t.noteBorderColor,";\n fill: ").concat(t.noteBkgColor,";\n\n text {\n fill: black;\n stroke: none;\n font-size: 10px;\n }\n}\n\n.stateLabel .box {\n stroke: none;\n stroke-width: 0;\n fill: ").concat(t.mainBkg,";\n opacity: 0.5;\n}\n\n.edgeLabel .label rect {\n fill: ").concat(t.tertiaryColor,";\n opacity: 0.5;\n}\n.edgeLabel .label text {\n fill: ").concat(t.tertiaryTextColor,";\n}\n.label div .edgeLabel {\n color: ").concat(t.tertiaryTextColor,";\n}\n\n.stateLabel text {\n fill: ").concat(t.labelColor,";\n font-size: 10px;\n font-weight: bold;\n}\n\n.node circle.state-start {\n fill: ").concat(t.lineColor,";\n stroke: black;\n}\n.node circle.state-end {\n fill: ").concat(t.primaryBorderColor,";\n stroke: ").concat(t.background,";\n stroke-width: 1.5\n}\n.end-state-inner {\n fill: ").concat(t.background,";\n // stroke: ").concat(t.background,";\n stroke-width: 1.5\n}\n\n.node rect {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n}\n#statediagram-barbEnd {\n fill: ").concat(t.lineColor,";\n}\n\n.statediagram-cluster rect {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n}\n\n.cluster-label, .nodeLabel {\n color: ").concat(t.textColor,";\n}\n\n.statediagram-cluster rect.outer {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state .divider {\n stroke: ").concat(t.nodeBorder,";\n}\n\n.statediagram-state .title-state {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-cluster.statediagram-cluster .inner {\n fill: ").concat(t.background,";\n}\n.statediagram-cluster.statediagram-cluster-alt .inner {\n fill: #e0e0e0;\n}\n\n.statediagram-cluster .inner {\n rx:0;\n ry:0;\n}\n\n.statediagram-state rect.basic {\n rx: 5px;\n ry: 5px;\n}\n.statediagram-state rect.divider {\n stroke-dasharray: 10,10;\n fill: ").concat(t.altBackground?t.altBackground:"#efefef",";\n}\n\n.note-edge {\n stroke-dasharray: 5;\n}\n\n.statediagram-note rect {\n fill: ").concat(t.noteBkgColor,";\n stroke: ").concat(t.noteBorderColor,";\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n.statediagram-note rect {\n fill: ").concat(t.noteBkgColor,";\n stroke: ").concat(t.noteBorderColor,";\n stroke-width: 1px;\n rx: 0;\n ry: 0;\n}\n\n.statediagram-note text {\n fill: ").concat(t.noteTextColor,";\n}\n\n.statediagram-note .nodeLabel {\n color: ").concat(t.noteTextColor,";\n}\n\n#dependencyStart, #dependencyEnd {\n fill: ").concat(t.lineColor,";\n stroke: ").concat(t.lineColor,";\n stroke-width: 1;\n}\n")},Co={flowchart:Eo,"flowchart-v2":Eo,sequence:function(t){return".actor {\n stroke: ".concat(t.actorBorder,";\n fill: ").concat(t.actorBkg,";\n }\n\n text.actor > tspan {\n fill: ").concat(t.actorTextColor,";\n stroke: none;\n }\n\n .actor-line {\n stroke: ").concat(t.actorLineColor,";\n }\n\n .messageLine0 {\n stroke-width: 1.5;\n stroke-dasharray: none;\n stroke: ").concat(t.signalColor,";\n }\n\n .messageLine1 {\n stroke-width: 1.5;\n stroke-dasharray: 2, 2;\n stroke: ").concat(t.signalColor,";\n }\n\n #arrowhead path {\n fill: ").concat(t.signalColor,";\n stroke: ").concat(t.signalColor,";\n }\n\n .sequenceNumber {\n fill: ").concat(t.sequenceNumberColor,";\n }\n\n #sequencenumber {\n fill: ").concat(t.signalColor,";\n }\n\n #crosshead path {\n fill: ").concat(t.signalColor,";\n stroke: ").concat(t.signalColor,";\n }\n\n .messageText {\n fill: ").concat(t.signalTextColor,";\n stroke: ").concat(t.signalTextColor,";\n }\n\n .labelBox {\n stroke: ").concat(t.labelBoxBorderColor,";\n fill: ").concat(t.labelBoxBkgColor,";\n }\n\n .labelText, .labelText > tspan {\n fill: ").concat(t.labelTextColor,";\n stroke: none;\n }\n\n .loopText, .loopText > tspan {\n fill: ").concat(t.loopTextColor,";\n stroke: none;\n }\n\n .loopLine {\n stroke-width: 2px;\n stroke-dasharray: 2, 2;\n stroke: ").concat(t.labelBoxBorderColor,";\n fill: ").concat(t.labelBoxBorderColor,";\n }\n\n .note {\n //stroke: #decc93;\n stroke: ").concat(t.noteBorderColor,";\n fill: ").concat(t.noteBkgColor,";\n }\n\n .noteText, .noteText > tspan {\n fill: ").concat(t.noteTextColor,";\n stroke: none;\n }\n\n .activation0 {\n fill: ").concat(t.activationBkgColor,";\n stroke: ").concat(t.activationBorderColor,";\n }\n\n .activation1 {\n fill: ").concat(t.activationBkgColor,";\n stroke: ").concat(t.activationBorderColor,";\n }\n\n .activation2 {\n fill: ").concat(t.activationBkgColor,";\n stroke: ").concat(t.activationBorderColor,";\n }\n")},gantt:function(t){return'\n .mermaid-main-font {\n font-family: "trebuchet ms", verdana, arial;\n font-family: var(--mermaid-font-family);\n }\n\n .section {\n stroke: none;\n opacity: 0.2;\n }\n\n .section0 {\n fill: '.concat(t.sectionBkgColor,";\n }\n\n .section2 {\n fill: ").concat(t.sectionBkgColor2,";\n }\n\n .section1,\n .section3 {\n fill: ").concat(t.altSectionBkgColor,";\n opacity: 0.2;\n }\n\n .sectionTitle0 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle1 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle2 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle3 {\n fill: ").concat(t.titleColor,";\n }\n\n .sectionTitle {\n text-anchor: start;\n font-size: 11px;\n text-height: 14px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n\n }\n\n\n /* Grid and axis */\n\n .grid .tick {\n stroke: ").concat(t.gridColor,";\n opacity: 0.8;\n shape-rendering: crispEdges;\n text {\n font-family: ").concat(t.fontFamily,";\n fill: ").concat(t.textColor,";\n }\n }\n\n .grid path {\n stroke-width: 0;\n }\n\n\n /* Today line */\n\n .today {\n fill: none;\n stroke: ").concat(t.todayLineColor,";\n stroke-width: 2px;\n }\n\n\n /* Task styling */\n\n /* Default task */\n\n .task {\n stroke-width: 2;\n }\n\n .taskText {\n text-anchor: middle;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n }\n\n .taskText:not([font-size]) {\n font-size: 11px;\n }\n\n .taskTextOutsideRight {\n fill: ").concat(t.taskTextDarkColor,";\n text-anchor: start;\n font-size: 11px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n\n }\n\n .taskTextOutsideLeft {\n fill: ").concat(t.taskTextDarkColor,";\n text-anchor: end;\n font-size: 11px;\n }\n\n /* Special case clickable */\n .task.clickable {\n cursor: pointer;\n }\n .taskText.clickable {\n cursor: pointer;\n fill: ").concat(t.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n .taskTextOutsideLeft.clickable {\n cursor: pointer;\n fill: ").concat(t.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n .taskTextOutsideRight.clickable {\n cursor: pointer;\n fill: ").concat(t.taskTextClickableColor," !important;\n font-weight: bold;\n }\n\n /* Specific task settings for the sections*/\n\n .taskText0,\n .taskText1,\n .taskText2,\n .taskText3 {\n fill: ").concat(t.taskTextColor,";\n }\n\n .task0,\n .task1,\n .task2,\n .task3 {\n fill: ").concat(t.taskBkgColor,";\n stroke: ").concat(t.taskBorderColor,";\n }\n\n .taskTextOutside0,\n .taskTextOutside2\n {\n fill: ").concat(t.taskTextOutsideColor,";\n }\n\n .taskTextOutside1,\n .taskTextOutside3 {\n fill: ").concat(t.taskTextOutsideColor,";\n }\n\n\n /* Active task */\n\n .active0,\n .active1,\n .active2,\n .active3 {\n fill: ").concat(t.activeTaskBkgColor,";\n stroke: ").concat(t.activeTaskBorderColor,";\n }\n\n .activeText0,\n .activeText1,\n .activeText2,\n .activeText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n\n /* Completed task */\n\n .done0,\n .done1,\n .done2,\n .done3 {\n stroke: ").concat(t.doneTaskBorderColor,";\n fill: ").concat(t.doneTaskBkgColor,";\n stroke-width: 2;\n }\n\n .doneText0,\n .doneText1,\n .doneText2,\n .doneText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n\n /* Tasks on the critical line */\n\n .crit0,\n .crit1,\n .crit2,\n .crit3 {\n stroke: ").concat(t.critBorderColor,";\n fill: ").concat(t.critBkgColor,";\n stroke-width: 2;\n }\n\n .activeCrit0,\n .activeCrit1,\n .activeCrit2,\n .activeCrit3 {\n stroke: ").concat(t.critBorderColor,";\n fill: ").concat(t.activeTaskBkgColor,";\n stroke-width: 2;\n }\n\n .doneCrit0,\n .doneCrit1,\n .doneCrit2,\n .doneCrit3 {\n stroke: ").concat(t.critBorderColor,";\n fill: ").concat(t.doneTaskBkgColor,";\n stroke-width: 2;\n cursor: pointer;\n shape-rendering: crispEdges;\n }\n\n .milestone {\n transform: rotate(45deg) scale(0.8,0.8);\n }\n\n .milestoneText {\n font-style: italic;\n }\n .doneCritText0,\n .doneCritText1,\n .doneCritText2,\n .doneCritText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n .activeCritText0,\n .activeCritText1,\n .activeCritText2,\n .activeCritText3 {\n fill: ").concat(t.taskTextDarkColor," !important;\n }\n\n .titleText {\n text-anchor: middle;\n font-size: 18px;\n fill: ").concat(t.textColor," ;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n }\n")},classDiagram:wo,"classDiagram-v2":wo,class:wo,stateDiagram:To,state:To,git:function(){return"\n .commit-id,\n .commit-msg,\n .branch-label {\n fill: lightgrey;\n color: lightgrey;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n }\n"},info:function(){return""},pie:function(t){return".pieTitleText {\n text-anchor: middle;\n font-size: 25px;\n fill: ".concat(t.taskTextDarkColor,";\n font-family: ").concat(t.fontFamily,";\n }\n .slice {\n font-family: ").concat(t.fontFamily,";\n fill: ").concat(t.textColor,";\n // fill: white;\n }\n .legend text {\n fill: ").concat(t.taskTextDarkColor,";\n font-family: ").concat(t.fontFamily,";\n font-size: 17px;\n }\n")},er:function(t){return"\n .entityBox {\n fill: ".concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n }\n\n .relationshipLabelBox {\n fill: ").concat(t.tertiaryColor,";\n opacity: 0.7;\n background-color: ").concat(t.tertiaryColor,";\n rect {\n opacity: 0.5;\n }\n }\n\n .relationshipLine {\n stroke: ").concat(t.lineColor,";\n }\n")},journey:function(t){return".label {\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n color: ".concat(t.textColor,";\n }\n .mouth {\n stroke: #666;\n }\n\n line {\n stroke: ").concat(t.textColor,"\n }\n\n .legend {\n fill: ").concat(t.textColor,";\n }\n\n .label text {\n fill: #333;\n }\n .label {\n color: ").concat(t.textColor,"\n }\n\n .face {\n fill: #FFF8DC;\n stroke: #999;\n }\n\n .node rect,\n .node circle,\n .node ellipse,\n .node polygon,\n .node path {\n fill: ").concat(t.mainBkg,";\n stroke: ").concat(t.nodeBorder,";\n stroke-width: 1px;\n }\n\n .node .label {\n text-align: center;\n }\n .node.clickable {\n cursor: pointer;\n }\n\n .arrowheadPath {\n fill: ").concat(t.arrowheadColor,";\n }\n\n .edgePath .path {\n stroke: ").concat(t.lineColor,";\n stroke-width: 1.5px;\n }\n\n .flowchart-link {\n stroke: ").concat(t.lineColor,";\n fill: none;\n }\n\n .edgeLabel {\n background-color: ").concat(t.edgeLabelBackground,";\n rect {\n opacity: 0.5;\n }\n text-align: center;\n }\n\n .cluster rect {\n }\n\n .cluster text {\n fill: ").concat(t.titleColor,";\n }\n\n div.mermaidTooltip {\n position: absolute;\n text-align: center;\n max-width: 200px;\n padding: 2px;\n font-family: 'trebuchet ms', verdana, arial;\n font-family: var(--mermaid-font-family);\n font-size: 12px;\n background: ").concat(t.tertiaryColor,";\n border: 1px solid ").concat(t.border2,";\n border-radius: 2px;\n pointer-events: none;\n z-index: 100;\n }\n\n .task-type-0, .section-type-0 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType0):"",";\n }\n .task-type-1, .section-type-1 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType1):"",";\n }\n .task-type-2, .section-type-2 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType2):"",";\n }\n .task-type-3, .section-type-3 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType3):"",";\n }\n .task-type-4, .section-type-4 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType4):"",";\n }\n .task-type-5, .section-type-5 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType5):"",";\n }\n .task-type-6, .section-type-6 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType6):"",";\n }\n .task-type-7, .section-type-7 {\n ").concat(t.fillType0?"fill: ".concat(t.fillType7):"",";\n }\n")}},Ao=function(t,e,n){return" {\n font-family: ".concat(n.fontFamily,";\n font-size: ").concat(n.fontSize,";\n fill: ").concat(n.textColor,"\n }\n\n /* Classes common for multiple diagrams */\n\n .error-icon {\n fill: ").concat(n.errorBkgColor,";\n }\n .error-text {\n fill: ").concat(n.errorTextColor,";\n stroke: ").concat(n.errorTextColor,";\n }\n\n .edge-thickness-normal {\n stroke-width: 2px;\n }\n .edge-thickness-thick {\n stroke-width: 3.5px\n }\n .edge-pattern-solid {\n stroke-dasharray: 0;\n }\n\n .edge-pattern-dashed{\n stroke-dasharray: 3;\n }\n .edge-pattern-dotted {\n stroke-dasharray: 2;\n }\n\n .marker {\n fill: ").concat(n.lineColor,";\n }\n .marker.cross {\n stroke: ").concat(n.lineColor,";\n }\n\n svg {\n font-family: ").concat(n.fontFamily,";\n font-size: ").concat(n.fontSize,";\n }\n\n ").concat(Co[t](n),"\n\n ").concat(e,"\n\n ").concat(t," { fill: apa;}\n")};function So(t){return(So="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}var Mo={},Oo=function(t,e,n){switch(f.debug("Directive type=".concat(e.type," with args:"),e.args),e.type){case"init":case"initialize":["config"].forEach((function(t){void 0!==e.args[t]&&("flowchart-v2"===n&&(n="flowchart"),e.args[n]=e.args[t],delete e.args[t])})),e.args,xt(e.args);break;case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap("wrap"===e.type);break;default:f.warn("Unhandled directive: source: '%%{".concat(e.type,": ").concat(JSON.stringify(e.args?e.args:{}),"}%%"),e)}};function Do(t){ha(t.git),le(t.flowchart),Qe(t.flowchart),void 0!==t.sequenceDiagram&&Yn.setConf(P(t.sequence,t.sequenceDiagram)),Yn.setConf(t.sequence),kr(t.gantt),Kr(t.class),Oi(t.state),Ii(t.state),ba(t.class),Oa(t.class),Wa(t.er),_o(t.journey),ka(t.class)}function No(){}var Bo=Object.freeze({render:function(t,e,n,r){_t();var i=e,a=U.detectInit(i);a&&xt(a);var u=mt();if(console.warn("Render with config after adding new directives",u.sequence),e.length>u.maxTextSize&&(i="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa"),void 0!==r)r.innerHTML="",Object(s.select)(r).append("div").attr("id","d"+t).attr("style","font-family: "+u.fontFamily).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g");else{var l=document.getElementById(t);l&&l.remove();var h=document.querySelector("#d"+t);h&&h.remove(),Object(s.select)("body").append("div").attr("id","d"+t).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g")}window.txt=i,i=function(t){var e=t;return e=(e=(e=e.replace(/style.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)}))).replace(/classDef.*:\S*#.*;/g,(function(t){return t.substring(0,t.length-1)}))).replace(/#\w+;/g,(function(t){var e=t.substring(1,t.length-1);return/^\+?\d+$/.test(e)?"fl°°"+e+"¶ß":"fl°"+e+"¶ß"}))}(i);var d=Object(s.select)("#d"+t).node(),p=U.detectType(i),g=d.firstChild,y=g.firstChild,v="";if(void 0!==u.themeCSS&&(v+="\n".concat(u.themeCSS)),void 0!==u.fontFamily&&(v+="\n:root { --mermaid-font-family: ".concat(u.fontFamily,"}")),void 0!==u.altFontFamily&&(v+="\n:root { --mermaid-alt-font-family: ".concat(u.altFontFamily,"}")),"flowchart"===p||"flowchart-v2"===p||"graph"===p){var m=he(i);for(var b in m)v+="\n.".concat(b," > * { ").concat(m[b].styles.join(" !important; ")," !important; }"),m[b].textStyles&&(v+="\n.".concat(b," tspan { ").concat(m[b].textStyles.join(" !important; ")," !important; }"))}var x=(new o.a)("#".concat(t),Ao(p,v,u.themeVariables)),_=document.createElement("style");_.innerHTML=x,g.insertBefore(_,y);try{switch(p){case"git":u.flowchart.arrowMarkerAbsolute=u.arrowMarkerAbsolute,ha(u.git),fa(i,t,!1);break;case"flowchart":u.flowchart.arrowMarkerAbsolute=u.arrowMarkerAbsolute,le(u.flowchart),fe(i,t,!1);break;case"flowchart-v2":u.flowchart.arrowMarkerAbsolute=u.arrowMarkerAbsolute,Qe(u.flowchart),Ke(i,t,!1);break;case"sequence":u.sequence.arrowMarkerAbsolute=u.arrowMarkerAbsolute,u.sequenceDiagram?(Yn.setConf(Object.assign(u.sequence,u.sequenceDiagram)),console.error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.")):Yn.setConf(u.sequence),Yn.draw(i,t);break;case"gantt":u.gantt.arrowMarkerAbsolute=u.arrowMarkerAbsolute,kr(u.gantt),wr(i,t);break;case"class":u.class.arrowMarkerAbsolute=u.arrowMarkerAbsolute,Kr(u.class),ti(i,t);break;case"classDiagram":u.class.arrowMarkerAbsolute=u.arrowMarkerAbsolute,ni(u.class),ri(i,t);break;case"state":u.class.arrowMarkerAbsolute=u.arrowMarkerAbsolute,Oi(u.state),Di(i,t);break;case"stateDiagram":u.class.arrowMarkerAbsolute=u.arrowMarkerAbsolute,Ii(u.state),ji(i,t);break;case"info":u.class.arrowMarkerAbsolute=u.arrowMarkerAbsolute,ba(u.class),xa(i,t,c.version);break;case"pie":u.class.arrowMarkerAbsolute=u.arrowMarkerAbsolute,Oa(u.class),Da(i,t,c.version);break;case"er":Wa(u.er),Va(i,t,c.version);break;case"journey":_o(u.journey),ko(i,t,c.version)}}catch(e){throw wa(t,c.version),e}Object(s.select)('[id="'.concat(t,'"]')).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");var k=Object(s.select)("#d"+t).node().innerHTML;if(f.debug("cnf.arrowMarkerAbsolute",u.arrowMarkerAbsolute),u.arrowMarkerAbsolute&&"false"!==u.arrowMarkerAbsolute||(k=k.replace(/marker-end="url\(.*?#/g,'marker-end="url(#',"g")),k=function(t){var e=t;return e=(e=(e=e.replace(/fl°°/g,(function(){return"&#"}))).replace(/fl°/g,(function(){return"&"}))).replace(/¶ß/g,(function(){return";"}))}(k),void 0!==n)switch(p){case"flowchart":case"flowchart-v2":n(k,zt.bindFunctions);break;case"gantt":n(k,mr.bindFunctions);break;case"class":n(k,Ir.bindFunctions);break;default:n(k)}else f.debug("CB = undefined!");var w=Object(s.select)("#d"+t).node();return null!==w&&"function"==typeof w.remove&&Object(s.select)("#d"+t).node().remove(),k},parse:function(t){var e=U.detectInit(t);e&&f.debug("reinit ",e);var n,r=U.detectType(t);switch(f.debug("Type "+r),r){case"git":(n=ta.a).parser.yy=Qi;break;case"flowchart":case"flowchart-v2":zt.clear(),(n=$t.a).parser.yy=zt;break;case"sequence":(n=ln.a).parser.yy=Cn;break;case"gantt":(n=Un.a).parser.yy=mr;break;case"class":case"classDiagram":(n=Rr.a).parser.yy=Ir;break;case"state":case"stateDiagram":(n=xi.a).parser.yy=mi;break;case"info":f.debug("info info info"),(n=va.a).parser.yy=ga;break;case"pie":f.debug("pie"),(n=Sa.a).parser.yy=Ca;break;case"er":f.debug("er"),(n=Ia.a).parser.yy=Fa;break;case"journey":f.debug("Journey"),(n=Ga.a).parser.yy=eo}return n.parser.yy.graphType=r,n.parser.yy.parseError=function(t,e){throw{str:t,hash:e}},n.parse(t),n},parseDirective:function(t,e,n,r){try{if(void 0!==e)switch(e=e.trim(),n){case"open_directive":Mo={};break;case"type_directive":Mo.type=e.toLowerCase();break;case"arg_directive":Mo.args=JSON.parse(e);break;case"close_directive":Oo(t,Mo,r),Mo=null}}catch(t){f.error("Error while rendering sequenceDiagram directive: ".concat(e," jison context: ").concat(n)),f.error(t.message)}},initialize:function(t){t&&t.fontFamily&&(t.themeVariables&&t.themeVariables.fontFamily||(t.themeVariables={fontFamily:t.fontFamily})),lt=P({},t),t&&t.theme&&ct[t.theme]?t.themeVariables=ct[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=ct.default.getThemeVariables(t.themeVariables));var e="object"===So(t)?function(t){return dt=P({},ft),dt=P(dt,t),t.theme&&(dt.themeVariables=ct[t.theme].getThemeVariables(t.themeVariables)),gt=yt(dt,pt),dt}(t):vt();Do(e),d(e.logLevel)},reinitialize:No,getConfig:mt,setConfig:function(t){return P(gt,t),mt()},getSiteConfig:vt,updateSiteConfig:function(t){return dt=P(dt,t),yt(dt,pt),dt},reset:function(){_t()},globalReset:function(){_t(),Do(mt())},defaultConfig:ft});d(mt().logLevel),_t(mt());var Lo=Bo,Fo=function(){Po.startOnLoad?Lo.getConfig().startOnLoad&&Po.init():void 0===Po.startOnLoad&&(f.debug("In start, no config"),Lo.getConfig().startOnLoad&&Po.init())};"undefined"!=typeof document&&
-/*!
- * Wait for document loaded before starting the execution
- */
-window.addEventListener("load",(function(){Fo()}),!1);var Po={startOnLoad:!0,htmlLabels:!0,mermaidAPI:Lo,parse:Lo.parse,render:Lo.render,init:function(){var t,e,n,r=this,a=Lo.getConfig();arguments.length>=2?(
-/*! sequence config was passed as #1 */
-void 0!==arguments[0]&&(Po.sequenceConfig=arguments[0]),t=arguments[1]):t=arguments[0],"function"==typeof arguments[arguments.length-1]?(e=arguments[arguments.length-1],f.debug("Callback function found")):void 0!==a.mermaid&&("function"==typeof a.mermaid.callback?(e=a.mermaid.callback,f.debug("Callback function found")):f.debug("No Callback function found")),t=void 0===t?document.querySelectorAll(".mermaid"):"string"==typeof t?document.querySelectorAll(t):t instanceof window.Node?[t]:t,f.debug("Start On Load before: "+Po.startOnLoad),void 0!==Po.startOnLoad&&(f.debug("Start On Load inner: "+Po.startOnLoad),Lo.updateSiteConfig({startOnLoad:Po.startOnLoad})),void 0!==Po.ganttConfig&&Lo.updateSiteConfig({gantt:Po.ganttConfig});for(var o=function(a){var o=t[a];
-/*! Check if previously processed */if(o.getAttribute("data-processed"))return"continue";o.setAttribute("data-processed",!0);var s="mermaid-".concat(Date.now());n=i(n=o.innerHTML).trim().replace(/<br\s*\/?>/gi,"<br/>");var c=U.detectInit(n);c&&f.debug("Detected early reinit: ",c);try{Lo.render(s,n,(function(t,n){o.innerHTML=t,void 0!==e&&e(s),n&&n(o)}),o)}catch(t){f.warn("Syntax Error rendering"),f.warn(t),r.parseError&&r.parseError(t)}},s=0;s<t.length;s++)o(s)},initialize:function(t){void 0!==t.mermaid&&(void 0!==t.mermaid.startOnLoad&&(Po.startOnLoad=t.mermaid.startOnLoad),void 0!==t.mermaid.htmlLabels&&(Po.htmlLabels=t.mermaid.htmlLabels)),Lo.initialize(t)},contentLoaded:Fo};e.default=Po}]).default}));
-//# sourceMappingURL=mermaid.min.js.map \ No newline at end of file
+ */var An={graphlib:Brt,dagre:hM,intersect:Wrt,render:dnt,util:Gn,version:_nt};function LM(t,e,r){const n=e.width,i=e.height,a=(n+i)*.9,s=[{x:a/2,y:0},{x:a,y:-a/2},{x:a/2,y:-a},{x:0,y:-a/2}],o=da(t,a,a,s);return r.intersect=function(l){return An.intersect.polygon(r,s,l)},o}function RM(t,e,r){const i=e.height,a=i/4,s=e.width+2*a,o=[{x:a,y:0},{x:s-a,y:0},{x:s,y:-i/2},{x:s-a,y:-i},{x:a,y:-i},{x:0,y:-i/2}],l=da(t,s,i,o);return r.intersect=function(u){return An.intersect.polygon(r,o,u)},l}function IM(t,e,r){const n=e.width,i=e.height,a=[{x:-i/2,y:0},{x:n,y:0},{x:n,y:-i},{x:-i/2,y:-i},{x:0,y:-i/2}],s=da(t,n,i,a);return r.intersect=function(o){return An.intersect.polygon(r,a,o)},s}function NM(t,e,r){const n=e.width,i=e.height,a=[{x:-2*i/6,y:0},{x:n-i/6,y:0},{x:n+2*i/6,y:-i},{x:i/6,y:-i}],s=da(t,n,i,a);return r.intersect=function(o){return An.intersect.polygon(r,a,o)},s}function BM(t,e,r){const n=e.width,i=e.height,a=[{x:2*i/6,y:0},{x:n+i/6,y:0},{x:n-2*i/6,y:-i},{x:-i/6,y:-i}],s=da(t,n,i,a);return r.intersect=function(o){return An.intersect.polygon(r,a,o)},s}function DM(t,e,r){const n=e.width,i=e.height,a=[{x:-2*i/6,y:0},{x:n+2*i/6,y:0},{x:n-i/6,y:-i},{x:i/6,y:-i}],s=da(t,n,i,a);return r.intersect=function(o){return An.intersect.polygon(r,a,o)},s}function OM(t,e,r){const n=e.width,i=e.height,a=[{x:i/6,y:0},{x:n-i/6,y:0},{x:n+2*i/6,y:-i},{x:-2*i/6,y:-i}],s=da(t,n,i,a);return r.intersect=function(o){return An.intersect.polygon(r,a,o)},s}function FM(t,e,r){const n=e.width,i=e.height,a=[{x:0,y:0},{x:n+i/2,y:0},{x:n,y:-i/2},{x:n+i/2,y:-i},{x:0,y:-i}],s=da(t,n,i,a);return r.intersect=function(o){return An.intersect.polygon(r,a,o)},s}function PM(t,e,r){const n=e.height,i=e.width+n/4,a=t.insert("rect",":first-child").attr("rx",n/2).attr("ry",n/2).attr("x",-i/2).attr("y",-n/2).attr("width",i).attr("height",n);return r.intersect=function(s){return An.intersect.rect(r,s)},a}function qM(t,e,r){const n=e.width,i=e.height,a=[{x:0,y:0},{x:n,y:0},{x:n,y:-i},{x:0,y:-i},{x:0,y:0},{x:-8,y:0},{x:n+8,y:0},{x:n+8,y:-i},{x:-8,y:-i},{x:-8,y:0}],s=da(t,n,i,a);return r.intersect=function(o){return An.intersect.polygon(r,a,o)},s}function VM(t,e,r){const n=e.width,i=n/2,a=i/(2.5+n/50),s=e.height+a,o="M 0,"+a+" a "+i+","+a+" 0,0,0 "+n+" 0 a "+i+","+a+" 0,0,0 "+-n+" 0 l 0,"+s+" a "+i+","+a+" 0,0,0 "+n+" 0 l 0,"+-s,l=t.attr("label-offset-y",a).insert("path",":first-child").attr("d",o).attr("transform","translate("+-n/2+","+-(s/2+a)+")");return r.intersect=function(u){const h=An.intersect.rect(r,u),d=h.x-r.x;if(i!=0&&(Math.abs(d)<r.width/2||Math.abs(d)==r.width/2&&Math.abs(h.y-r.y)>r.height/2-a)){let f=a*a*(1-d*d/(i*i));f!=0&&(f=Math.sqrt(f)),f=a-f,u.y-r.y>0&&(f=-f),h.y+=f}return h},l}function vnt(t){t.shapes().question=LM,t.shapes().hexagon=RM,t.shapes().stadium=PM,t.shapes().subroutine=qM,t.shapes().cylinder=VM,t.shapes().rect_left_inv_arrow=IM,t.shapes().lean_right=NM,t.shapes().lean_left=BM,t.shapes().trapezoid=DM,t.shapes().inv_trapezoid=OM,t.shapes().rect_right_inv_arrow=FM}function xnt(t){t({question:LM}),t({hexagon:RM}),t({stadium:PM}),t({subroutine:qM}),t({cylinder:VM}),t({rect_left_inv_arrow:IM}),t({lean_right:NM}),t({lean_left:BM}),t({trapezoid:DM}),t({inv_trapezoid:OM}),t({rect_right_inv_arrow:FM})}function da(t,e,r,n){return t.insert("polygon",":first-child").attr("points",n.map(function(i){return i.x+","+i.y}).join(" ")).attr("transform","translate("+-e/2+","+r/2+")")}const knt={addToRender:vnt,addToRenderV2:xnt},zM={},wnt=function(t){const e=Object.keys(t);for(let r=0;r<e.length;r++)zM[e[r]]=t[e[r]]},YM=function(t,e,r,n,i,a){const s=n?n.select(`[id="${r}"]`):St(`[id="${r}"]`),o=i||document;Object.keys(t).forEach(function(u){const h=t[u];let d="default";h.classes.length>0&&(d=h.classes.join(" "));const f=Ka(h.styles);let p=h.text!==void 0?h.text:h.id,m;if(Mr(nt().flowchart.htmlLabels)){const b={label:p.replace(/fa[lrsb]?:fa-[\w-]+/g,x=>`<i class='${x.replace(":"," ")}'></i>`)};m=p4(s,b).node(),m.parentNode.removeChild(m)}else{const b=o.createElementNS("http://www.w3.org/2000/svg","text");b.setAttribute("style",f.labelStyle.replace("color:","fill:"));const x=p.split(pe.lineBreakRegex);for(let k=0;k<x.length;k++){const T=o.createElementNS("http://www.w3.org/2000/svg","tspan");T.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),T.setAttribute("dy","1em"),T.setAttribute("x","1"),T.textContent=x[k],b.appendChild(T)}m=b}let _=0,y="";switch(h.type){case"round":_=5,y="rect";break;case"square":y="rect";break;case"diamond":y="question";break;case"hexagon":y="hexagon";break;case"odd":y="rect_left_inv_arrow";break;case"lean_right":y="lean_right";break;case"lean_left":y="lean_left";break;case"trapezoid":y="trapezoid";break;case"inv_trapezoid":y="inv_trapezoid";break;case"odd_right":y="rect_left_inv_arrow";break;case"circle":y="circle";break;case"ellipse":y="ellipse";break;case"stadium":y="stadium";break;case"subroutine":y="subroutine";break;case"cylinder":y="cylinder";break;case"group":y="rect";break;default:y="rect"}H.warn("Adding node",h.id,h.domId),e.setNode(a.db.lookUpDomId(h.id),{labelType:"svg",labelStyle:f.labelStyle,shape:y,label:m,rx:_,ry:_,class:d,style:f.style,id:a.db.lookUpDomId(h.id)})})},UM=function(t,e,r){let n=0,i,a;if(typeof t.defaultStyle<"u"){const s=Ka(t.defaultStyle);i=s.style,a=s.labelStyle}t.forEach(function(s){n++;var o="L-"+s.start+"-"+s.end,l="LS-"+s.start,u="LE-"+s.end;const h={};s.type==="arrow_open"?h.arrowhead="none":h.arrowhead="normal";let d="",f="";if(typeof s.style<"u"){const p=Ka(s.style);d=p.style,f=p.labelStyle}else switch(s.stroke){case"normal":d="fill:none",typeof i<"u"&&(d=i),typeof a<"u"&&(f=a);break;case"dotted":d="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":d=" stroke-width: 3.5px;fill:none";break}h.style=d,h.labelStyle=f,typeof s.interpolate<"u"?h.curve=Ni(s.interpolate,yn):typeof t.defaultInterpolate<"u"?h.curve=Ni(t.defaultInterpolate,yn):h.curve=Ni(zM.curve,yn),typeof s.text>"u"?typeof s.style<"u"&&(h.arrowheadStyle="fill: #333"):(h.arrowheadStyle="fill: #333",h.labelpos="c",Mr(nt().flowchart.htmlLabels)?(h.labelType="html",h.label=`<span id="L-${o}" class="edgeLabel L-${l}' L-${u}" style="${h.labelStyle}">${s.text.replace(/fa[lrsb]?:fa-[\w-]+/g,p=>`<i class='${p.replace(":"," ")}'></i>`)}</span>`):(h.labelType="text",h.label=s.text.replace(pe.lineBreakRegex,`
+`),typeof s.style>"u"&&(h.style=h.style||"stroke: #333; stroke-width: 1.5px;fill:none"),h.labelStyle=h.labelStyle.replace("color:","fill:"))),h.id=o,h.class=l+" "+u,h.minlen=s.length||1,e.setEdge(r.db.lookUpDomId(s.start),r.db.lookUpDomId(s.end),h,n)})},S4={setConf:wnt,addVertices:YM,addEdges:UM,getClasses:function(t,e){H.info("Extracting classes"),e.db.clear();try{return e.parse(t),e.db.getClasses()}catch{return}},draw:function(t,e,r,n){H.info("Drawing flowchart"),n.db.clear();const{securityLevel:i,flowchart:a}=nt();let s;i==="sandbox"&&(s=St("#i"+e));const o=St(i==="sandbox"?s.nodes()[0].contentDocument.body:"body"),l=i==="sandbox"?s.nodes()[0].contentDocument:document;try{n.parser.parse(t)}catch{H.debug("Parsing failed")}let u=n.db.getDirection();typeof u>"u"&&(u="TD");const h=a.nodeSpacing||50,d=a.rankSpacing||50,f=new cr.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:u,nodesep:h,ranksep:d,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});let p;const m=n.db.getSubGraphs();for(let S=m.length-1;S>=0;S--)p=m[S],n.db.addVertex(p.id,p.title,"group",void 0,p.classes);const _=n.db.getVertices();H.warn("Get vertices",_);const y=n.db.getEdges();let b=0;for(b=m.length-1;b>=0;b--){p=m[b],Iu("cluster").append("text");for(let S=0;S<p.nodes.length;S++)H.warn("Setting subgraph",p.nodes[S],n.db.lookUpDomId(p.nodes[S]),n.db.lookUpDomId(p.id)),f.setParent(n.db.lookUpDomId(p.nodes[S]),n.db.lookUpDomId(p.id))}YM(_,f,e,o,l,n),UM(y,f,n);const x=An.render,k=new x;knt.addToRender(k),k.arrows().none=function(R,A,L,v){const w=R.append("marker").attr("id",A).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 0 0 L 0 0 z");An.util.applyStyle(w,L[v+"Style"])},k.arrows().normal=function(R,A){R.append("marker").attr("id",A).attr("viewBox","0 0 10 10").attr("refX",9).attr("refY",5).attr("markerUnits","strokeWidth").attr("markerWidth",8).attr("markerHeight",6).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z").attr("class","arrowheadPath").style("stroke-width",1).style("stroke-dasharray","1,0")};const T=o.select(`[id="${e}"]`);bn(n.db,T,e);const C=o.select("#"+e+" g");for(k(C,f),C.selectAll("g.node").attr("title",function(){return n.db.getTooltip(this.id)}),n.db.indexNodes("subGraph"+b),b=0;b<m.length;b++)if(p=m[b],p.title!=="undefined"){const S=l.querySelectorAll("#"+e+' [id="'+n.db.lookUpDomId(p.id)+'"] rect'),R=l.querySelectorAll("#"+e+' [id="'+n.db.lookUpDomId(p.id)+'"]'),A=S[0].x.baseVal.value,L=S[0].y.baseVal.value,v=S[0].width.baseVal.value,w=St(R[0]).select(".label");w.attr("transform",`translate(${A+v/2}, ${L+14})`),w.attr("id",e+"Text");for(let D=0;D<p.classes.length;D++)R[0].classList.add(p.classes[D])}if(!a.htmlLabels){const S=l.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(let R=0;R<S.length;R++){const A=S[R],L=A.getBBox(),v=l.createElementNS("http://www.w3.org/2000/svg","rect");v.setAttribute("rx",0),v.setAttribute("ry",0),v.setAttribute("width",L.width),v.setAttribute("height",L.height),A.insertBefore(v,A.firstChild)}}i1(f,T,a.diagramPadding,a.useMaxWidth),Object.keys(_).forEach(function(S){const R=_[S];if(R.link){const A=o.select("#"+e+' [id="'+n.db.lookUpDomId(S)+'"]');if(A){const L=l.createElementNS("http://www.w3.org/2000/svg","a");L.setAttributeNS("http://www.w3.org/2000/svg","class",R.classes.join(" ")),L.setAttributeNS("http://www.w3.org/2000/svg","href",R.link),L.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),i==="sandbox"?L.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):R.linkTarget&&L.setAttributeNS("http://www.w3.org/2000/svg","target",R.linkTarget);const v=A.insert(function(){return L},":first-child"),B=A.select(".label-container");B&&v.append(function(){return B.node()});const w=A.select(".label");w&&v.append(function(){return w.node()})}}})}},WM={},Tnt=function(t){const e=Object.keys(t);for(let r=0;r<e.length;r++)WM[e[r]]=t[e[r]]},HM=function(t,e,r,n,i,a){const s=n.select(`[id="${r}"]`);Object.keys(t).forEach(function(l){const u=t[l];let h="default";u.classes.length>0&&(h=u.classes.join(" "));const d=Ka(u.styles);let f=u.text!==void 0?u.text:u.id,p;if(Mr(nt().flowchart.htmlLabels)){const y={label:f.replace(/fa[lrsb]?:fa-[\w-]+/g,b=>`<i class='${b.replace(":"," ")}'></i>`)};p=p4(s,y).node(),p.parentNode.removeChild(p)}else{const y=i.createElementNS("http://www.w3.org/2000/svg","text");y.setAttribute("style",d.labelStyle.replace("color:","fill:"));const b=f.split(pe.lineBreakRegex);for(let x=0;x<b.length;x++){const k=i.createElementNS("http://www.w3.org/2000/svg","tspan");k.setAttributeNS("http://www.w3.org/XML/1998/namespace","xml:space","preserve"),k.setAttribute("dy","1em"),k.setAttribute("x","1"),k.textContent=b[x],y.appendChild(k)}p=y}let m=0,_="";switch(u.type){case"round":m=5,_="rect";break;case"square":_="rect";break;case"diamond":_="question";break;case"hexagon":_="hexagon";break;case"odd":_="rect_left_inv_arrow";break;case"lean_right":_="lean_right";break;case"lean_left":_="lean_left";break;case"trapezoid":_="trapezoid";break;case"inv_trapezoid":_="inv_trapezoid";break;case"odd_right":_="rect_left_inv_arrow";break;case"circle":_="circle";break;case"ellipse":_="ellipse";break;case"stadium":_="stadium";break;case"subroutine":_="subroutine";break;case"cylinder":_="cylinder";break;case"group":_="rect";break;case"doublecircle":_="doublecircle";break;default:_="rect"}e.setNode(u.id,{labelStyle:d.labelStyle,shape:_,labelText:f,rx:m,ry:m,class:h,style:d.style,id:u.id,link:u.link,linkTarget:u.linkTarget,tooltip:a.db.getTooltip(u.id)||"",domId:a.db.lookUpDomId(u.id),haveCallback:u.haveCallback,width:u.type==="group"?500:void 0,dir:u.dir,type:u.type,props:u.props,padding:nt().flowchart.padding}),H.info("setNode",{labelStyle:d.labelStyle,shape:_,labelText:f,rx:m,ry:m,class:h,style:d.style,id:u.id,domId:a.db.lookUpDomId(u.id),width:u.type==="group"?500:void 0,type:u.type,dir:u.dir,props:u.props,padding:nt().flowchart.padding})})},GM=function(t,e,r){H.info("abc78 edges = ",t);let n=0,i={},a,s;if(typeof t.defaultStyle<"u"){const o=Ka(t.defaultStyle);a=o.style,s=o.labelStyle}t.forEach(function(o){n++;var l="L-"+o.start+"-"+o.end;typeof i[l]>"u"?(i[l]=0,H.info("abc78 new entry",l,i[l])):(i[l]++,H.info("abc78 new entry",l,i[l]));let u=l+"-"+i[l];H.info("abc78 new link id to be used is",l,u,i[l]);var h="LS-"+o.start,d="LE-"+o.end;const f={style:"",labelStyle:""};switch(f.minlen=o.length||1,o.type==="arrow_open"?f.arrowhead="none":f.arrowhead="normal",f.arrowTypeStart="arrow_open",f.arrowTypeEnd="arrow_open",o.type){case"double_arrow_cross":f.arrowTypeStart="arrow_cross";case"arrow_cross":f.arrowTypeEnd="arrow_cross";break;case"double_arrow_point":f.arrowTypeStart="arrow_point";case"arrow_point":f.arrowTypeEnd="arrow_point";break;case"double_arrow_circle":f.arrowTypeStart="arrow_circle";case"arrow_circle":f.arrowTypeEnd="arrow_circle";break}let p="",m="";switch(o.stroke){case"normal":p="fill:none;",typeof a<"u"&&(p=a),typeof s<"u"&&(m=s),f.thickness="normal",f.pattern="solid";break;case"dotted":f.thickness="normal",f.pattern="dotted",f.style="fill:none;stroke-width:2px;stroke-dasharray:3;";break;case"thick":f.thickness="thick",f.pattern="solid",f.style="stroke-width: 3.5px;fill:none;";break;case"invisible":f.thickness="invisible",f.pattern="solid",f.style="stroke-width: 0;fill:none;";break}if(typeof o.style<"u"){const _=Ka(o.style);p=_.style,m=_.labelStyle}f.style=f.style+=p,f.labelStyle=f.labelStyle+=m,typeof o.interpolate<"u"?f.curve=Ni(o.interpolate,yn):typeof t.defaultInterpolate<"u"?f.curve=Ni(t.defaultInterpolate,yn):f.curve=Ni(WM.curve,yn),typeof o.text>"u"?typeof o.style<"u"&&(f.arrowheadStyle="fill: #333"):(f.arrowheadStyle="fill: #333",f.labelpos="c"),f.labelType="text",f.label=o.text.replace(pe.lineBreakRegex,`
+`),typeof o.style>"u"&&(f.style=f.style||"stroke: #333; stroke-width: 1.5px;fill:none;"),f.labelStyle=f.labelStyle.replace("color:","fill:"),f.id=u,f.classes="flowchart-link "+h+" "+d,e.setEdge(o.start,o.end,f,n)})},A4={setConf:Tnt,addVertices:HM,addEdges:GM,getClasses:function(t,e){H.info("Extracting classes"),e.db.clear();try{return e.parse(t),e.db.getClasses()}catch{return}},draw:function(t,e,r,n){H.info("Drawing flowchart"),n.db.clear(),fa.setGen("gen-2"),n.parser.parse(t);let i=n.db.getDirection();typeof i>"u"&&(i="TD");const{securityLevel:a,flowchart:s}=nt(),o=s.nodeSpacing||50,l=s.rankSpacing||50;let u;a==="sandbox"&&(u=St("#i"+e));const h=St(a==="sandbox"?u.nodes()[0].contentDocument.body:"body"),d=a==="sandbox"?u.nodes()[0].contentDocument:document,f=new cr.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:i,nodesep:o,ranksep:l,marginx:0,marginy:0}).setDefaultEdgeLabel(function(){return{}});let p;const m=n.db.getSubGraphs();H.info("Subgraphs - ",m);for(let C=m.length-1;C>=0;C--)p=m[C],H.info("Subgraph - ",p),n.db.addVertex(p.id,p.title,"group",void 0,p.classes,p.dir);const _=n.db.getVertices(),y=n.db.getEdges();H.info(y);let b=0;for(b=m.length-1;b>=0;b--){p=m[b],Iu("cluster").append("text");for(let C=0;C<p.nodes.length;C++)H.info("Setting up subgraphs",p.nodes[C],p.id),f.setParent(p.nodes[C],p.id)}HM(_,f,e,h,d,n),GM(y,f);const x=h.select(`[id="${e}"]`);bn(n.db,x,e);const k=h.select("#"+e+" g");if(i4(k,f,["point","circle","cross"],"flowchart",e),i1(f,x,s.diagramPadding,s.useMaxWidth),n.db.indexNodes("subGraph"+b),!s.htmlLabels){const C=d.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(let M=0;M<C.length;M++){const S=C[M],R=S.getBBox(),A=d.createElementNS("http://www.w3.org/2000/svg","rect");A.setAttribute("rx",0),A.setAttribute("ry",0),A.setAttribute("width",R.width),A.setAttribute("height",R.height),S.insertBefore(A,S.firstChild)}}Object.keys(_).forEach(function(C){const M=_[C];if(M.link){const S=St("#"+e+' [id="'+C+'"]');if(S){const R=d.createElementNS("http://www.w3.org/2000/svg","a");R.setAttributeNS("http://www.w3.org/2000/svg","class",M.classes.join(" ")),R.setAttributeNS("http://www.w3.org/2000/svg","href",M.link),R.setAttributeNS("http://www.w3.org/2000/svg","rel","noopener"),a==="sandbox"?R.setAttributeNS("http://www.w3.org/2000/svg","target","_top"):M.linkTarget&&R.setAttributeNS("http://www.w3.org/2000/svg","target",M.linkTarget);const A=S.insert(function(){return R},":first-child"),L=S.select(".label-container");L&&A.append(function(){return L.node()});const v=S.select(".label");v&&A.append(function(){return v.node()})}}})}};var M4=function(){var t=function(S,R,A,L){for(A=A||{},L=S.length;L--;A[S[L]]=R);return A},e=[1,3],r=[1,5],n=[7,9,11,12,13,14,15,16,17,18,19,20,22,24,25,27,34,39],i=[1,15],a=[1,16],s=[1,17],o=[1,18],l=[1,19],u=[1,20],h=[1,21],d=[1,22],f=[1,23],p=[1,24],m=[1,25],_=[1,26],y=[1,28],b=[1,30],x=[1,33],k=[5,7,9,11,12,13,14,15,16,17,18,19,20,22,24,25,27,34,39],T={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,gantt:5,document:6,EOF:7,line:8,SPACE:9,statement:10,NL:11,dateFormat:12,inclusiveEndDates:13,topAxis:14,axisFormat:15,excludes:16,includes:17,todayMarker:18,title:19,acc_title:20,acc_title_value:21,acc_descr:22,acc_descr_value:23,acc_descr_multiline_value:24,section:25,clickStatement:26,taskTxt:27,taskData:28,openDirective:29,typeDirective:30,closeDirective:31,":":32,argDirective:33,click:34,callbackname:35,callbackargs:36,href:37,clickStatementDebug:38,open_directive:39,type_directive:40,arg_directive:41,close_directive:42,$accept:0,$end:1},terminals_:{2:"error",5:"gantt",7:"EOF",9:"SPACE",11:"NL",12:"dateFormat",13:"inclusiveEndDates",14:"topAxis",15:"axisFormat",16:"excludes",17:"includes",18:"todayMarker",19:"title",20:"acc_title",21:"acc_title_value",22:"acc_descr",23:"acc_descr_value",24:"acc_descr_multiline_value",25:"section",27:"taskTxt",28:"taskData",32:":",34:"click",35:"callbackname",36:"callbackargs",37:"href",39:"open_directive",40:"type_directive",41:"arg_directive",42:"close_directive"},productions_:[0,[3,2],[3,3],[6,0],[6,2],[8,2],[8,1],[8,1],[8,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,1],[10,2],[10,2],[10,1],[10,1],[10,1],[10,2],[10,1],[4,4],[4,6],[26,2],[26,3],[26,3],[26,4],[26,3],[26,4],[26,2],[38,2],[38,3],[38,3],[38,4],[38,3],[38,4],[38,2],[29,1],[30,1],[33,1],[31,1]],performAction:function(R,A,L,v,B,w,D){var N=w.length-1;switch(B){case 2:return w[N-1];case 3:this.$=[];break;case 4:w[N-1].push(w[N]),this.$=w[N-1];break;case 5:case 6:this.$=w[N];break;case 7:case 8:this.$=[];break;case 9:v.setDateFormat(w[N].substr(11)),this.$=w[N].substr(11);break;case 10:v.enableInclusiveEndDates(),this.$=w[N].substr(18);break;case 11:v.TopAxis(),this.$=w[N].substr(8);break;case 12:v.setAxisFormat(w[N].substr(11)),this.$=w[N].substr(11);break;case 13:v.setExcludes(w[N].substr(9)),this.$=w[N].substr(9);break;case 14:v.setIncludes(w[N].substr(9)),this.$=w[N].substr(9);break;case 15:v.setTodayMarker(w[N].substr(12)),this.$=w[N].substr(12);break;case 16:v.setDiagramTitle(w[N].substr(6)),this.$=w[N].substr(6);break;case 17:this.$=w[N].trim(),v.setAccTitle(this.$);break;case 18:case 19:this.$=w[N].trim(),v.setAccDescription(this.$);break;case 20:v.addSection(w[N].substr(8)),this.$=w[N].substr(8);break;case 22:v.addTask(w[N-1],w[N]),this.$="task";break;case 26:this.$=w[N-1],v.setClickEvent(w[N-1],w[N],null);break;case 27:this.$=w[N-2],v.setClickEvent(w[N-2],w[N-1],w[N]);break;case 28:this.$=w[N-2],v.setClickEvent(w[N-2],w[N-1],null),v.setLink(w[N-2],w[N]);break;case 29:this.$=w[N-3],v.setClickEvent(w[N-3],w[N-2],w[N-1]),v.setLink(w[N-3],w[N]);break;case 30:this.$=w[N-2],v.setClickEvent(w[N-2],w[N],null),v.setLink(w[N-2],w[N-1]);break;case 31:this.$=w[N-3],v.setClickEvent(w[N-3],w[N-1],w[N]),v.setLink(w[N-3],w[N-2]);break;case 32:this.$=w[N-1],v.setLink(w[N-1],w[N]);break;case 33:case 39:this.$=w[N-1]+" "+w[N];break;case 34:case 35:case 37:this.$=w[N-2]+" "+w[N-1]+" "+w[N];break;case 36:case 38:this.$=w[N-3]+" "+w[N-2]+" "+w[N-1]+" "+w[N];break;case 40:v.parseDirective("%%{","open_directive");break;case 41:v.parseDirective(w[N],"type_directive");break;case 42:w[N]=w[N].trim().replace(/'/g,'"'),v.parseDirective(w[N],"arg_directive");break;case 43:v.parseDirective("}%%","close_directive","gantt");break}},table:[{3:1,4:2,5:e,29:4,39:r},{1:[3]},{3:6,4:2,5:e,29:4,39:r},t(n,[2,3],{6:7}),{30:8,40:[1,9]},{40:[2,40]},{1:[2,1]},{4:29,7:[1,10],8:11,9:[1,12],10:13,11:[1,14],12:i,13:a,14:s,15:o,16:l,17:u,18:h,19:d,20:f,22:p,24:m,25:_,26:27,27:y,29:4,34:b,39:r},{31:31,32:[1,32],42:x},t([32,42],[2,41]),t(n,[2,8],{1:[2,2]}),t(n,[2,4]),{4:29,10:34,12:i,13:a,14:s,15:o,16:l,17:u,18:h,19:d,20:f,22:p,24:m,25:_,26:27,27:y,29:4,34:b,39:r},t(n,[2,6]),t(n,[2,7]),t(n,[2,9]),t(n,[2,10]),t(n,[2,11]),t(n,[2,12]),t(n,[2,13]),t(n,[2,14]),t(n,[2,15]),t(n,[2,16]),{21:[1,35]},{23:[1,36]},t(n,[2,19]),t(n,[2,20]),t(n,[2,21]),{28:[1,37]},t(n,[2,23]),{35:[1,38],37:[1,39]},{11:[1,40]},{33:41,41:[1,42]},{11:[2,43]},t(n,[2,5]),t(n,[2,17]),t(n,[2,18]),t(n,[2,22]),t(n,[2,26],{36:[1,43],37:[1,44]}),t(n,[2,32],{35:[1,45]}),t(k,[2,24]),{31:46,42:x},{42:[2,42]},t(n,[2,27],{37:[1,47]}),t(n,[2,28]),t(n,[2,30],{36:[1,48]}),{11:[1,49]},t(n,[2,29]),t(n,[2,31]),t(k,[2,25])],defaultActions:{5:[2,40],6:[2,1],33:[2,43],42:[2,42]},parseError:function(R,A){if(A.recoverable)this.trace(R);else{var L=new Error(R);throw L.hash=A,L}},parse:function(R){var A=this,L=[0],v=[],B=[null],w=[],D=this.table,N="",z=0,X=0,ct=2,J=1,Y=w.slice.call(arguments,1),$=Object.create(this.lexer),lt={yy:{}};for(var ut in this.yy)Object.prototype.hasOwnProperty.call(this.yy,ut)&&(lt.yy[ut]=this.yy[ut]);$.setInput(R,lt.yy),lt.yy.lexer=$,lt.yy.parser=this,typeof $.yylloc>"u"&&($.yylloc={});var W=$.yylloc;w.push(W);var tt=$.options&&$.options.ranges;typeof lt.yy.parseError=="function"?this.parseError=lt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function K(){var at;return at=v.pop()||$.lex()||J,typeof at!="number"&&(at instanceof Array&&(v=at,at=v.pop()),at=A.symbols_[at]||at),at}for(var it,Z,V,Q,q={},U,F,j,P;;){if(Z=L[L.length-1],this.defaultActions[Z]?V=this.defaultActions[Z]:((it===null||typeof it>"u")&&(it=K()),V=D[Z]&&D[Z][it]),typeof V>"u"||!V.length||!V[0]){var et="";P=[];for(U in D[Z])this.terminals_[U]&&U>ct&&P.push("'"+this.terminals_[U]+"'");$.showPosition?et="Parse error on line "+(z+1)+`:
+`+$.showPosition()+`
+Expecting `+P.join(", ")+", got '"+(this.terminals_[it]||it)+"'":et="Parse error on line "+(z+1)+": Unexpected "+(it==J?"end of input":"'"+(this.terminals_[it]||it)+"'"),this.parseError(et,{text:$.match,token:this.terminals_[it]||it,line:$.yylineno,loc:W,expected:P})}if(V[0]instanceof Array&&V.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Z+", token: "+it);switch(V[0]){case 1:L.push(it),B.push($.yytext),w.push($.yylloc),L.push(V[1]),it=null,X=$.yyleng,N=$.yytext,z=$.yylineno,W=$.yylloc;break;case 2:if(F=this.productions_[V[1]][1],q.$=B[B.length-F],q._$={first_line:w[w.length-(F||1)].first_line,last_line:w[w.length-1].last_line,first_column:w[w.length-(F||1)].first_column,last_column:w[w.length-1].last_column},tt&&(q._$.range=[w[w.length-(F||1)].range[0],w[w.length-1].range[1]]),Q=this.performAction.apply(q,[N,X,z,lt.yy,V[1],B,w].concat(Y)),typeof Q<"u")return Q;F&&(L=L.slice(0,-1*F*2),B=B.slice(0,-1*F),w=w.slice(0,-1*F)),L.push(this.productions_[V[1]][0]),B.push(q.$),w.push(q._$),j=D[L[L.length-2]][L[L.length-1]],L.push(j);break;case 3:return!0}}return!0}},C=function(){var S={EOF:1,parseError:function(A,L){if(this.yy.parser)this.yy.parser.parseError(A,L);else throw new Error(A)},setInput:function(R,A){return this.yy=A||this.yy||{},this._input=R,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var R=this._input[0];this.yytext+=R,this.yyleng++,this.offset++,this.match+=R,this.matched+=R;var A=R.match(/(?:\r\n?|\n).*/g);return A?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),R},unput:function(R){var A=R.length,L=R.split(/(?:\r\n?|\n)/g);this._input=R+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-A),this.offset-=A;var v=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),L.length-1&&(this.yylineno-=L.length-1);var B=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:L?(L.length===v.length?this.yylloc.first_column:0)+v[v.length-L.length].length-L[0].length:this.yylloc.first_column-A},this.options.ranges&&(this.yylloc.range=[B[0],B[0]+this.yyleng-A]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
+`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(R){this.unput(this.match.slice(R))},pastInput:function(){var R=this.matched.substr(0,this.matched.length-this.match.length);return(R.length>20?"...":"")+R.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var R=this.match;return R.length<20&&(R+=this._input.substr(0,20-R.length)),(R.substr(0,20)+(R.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var R=this.pastInput(),A=new Array(R.length+1).join("-");return R+this.upcomingInput()+`
+`+A+"^"},test_match:function(R,A){var L,v,B;if(this.options.backtrack_lexer&&(B={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(B.yylloc.range=this.yylloc.range.slice(0))),v=R[0].match(/(?:\r\n?|\n).*/g),v&&(this.yylineno+=v.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:v?v[v.length-1].length-v[v.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+R[0].length},this.yytext+=R[0],this.match+=R[0],this.matches=R,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(R[0].length),this.matched+=R[0],L=this.performAction.call(this,this.yy,this,A,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),L)return L;if(this._backtrack){for(var w in B)this[w]=B[w];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var R,A,L,v;this._more||(this.yytext="",this.match="");for(var B=this._currentRules(),w=0;w<B.length;w++)if(L=this._input.match(this.rules[B[w]]),L&&(!A||L[0].length>A[0].length)){if(A=L,v=w,this.options.backtrack_lexer){if(R=this.test_match(L,B[w]),R!==!1)return R;if(this._backtrack){A=!1;continue}else return!1}else if(!this.options.flex)break}return A?(R=this.test_match(A,B[v]),R!==!1?R:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
+`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var A=this.next();return A||this.lex()},begin:function(A){this.conditionStack.push(A)},popState:function(){var A=this.conditionStack.length-1;return A>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(A){return A=this.conditionStack.length-1-Math.abs(A||0),A>=0?this.conditionStack[A]:"INITIAL"},pushState:function(A){this.begin(A)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(A,L,v,B){switch(v){case 0:return this.begin("open_directive"),39;case 1:return this.begin("type_directive"),40;case 2:return this.popState(),this.begin("arg_directive"),32;case 3:return this.popState(),this.popState(),42;case 4:return 41;case 5:return this.begin("acc_title"),20;case 6:return this.popState(),"acc_title_value";case 7:return this.begin("acc_descr"),22;case 8:return this.popState(),"acc_descr_value";case 9:this.begin("acc_descr_multiline");break;case 10:this.popState();break;case 11:return"acc_descr_multiline_value";case 12:break;case 13:break;case 14:break;case 15:return 11;case 16:break;case 17:break;case 18:break;case 19:this.begin("href");break;case 20:this.popState();break;case 21:return 37;case 22:this.begin("callbackname");break;case 23:this.popState();break;case 24:this.popState(),this.begin("callbackargs");break;case 25:return 35;case 26:this.popState();break;case 27:return 36;case 28:this.begin("click");break;case 29:this.popState();break;case 30:return 34;case 31:return 5;case 32:return 12;case 33:return 13;case 34:return 14;case 35:return 15;case 36:return 17;case 37:return 16;case 38:return 18;case 39:return"date";case 40:return 19;case 41:return"accDescription";case 42:return 25;case 43:return 27;case 44:return 28;case 45:return 32;case 46:return 7;case 47:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:%%(?!\{)*[^\n]*)/i,/^(?:[^\}]%%*[^\n]*)/i,/^(?:%%*[^\n]*[\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:href[\s]+["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:call[\s]+)/i,/^(?:\([\s]*\))/i,/^(?:\()/i,/^(?:[^(]*)/i,/^(?:\))/i,/^(?:[^)]*)/i,/^(?:click[\s]+)/i,/^(?:[\s\n])/i,/^(?:[^\s\n]*)/i,/^(?:gantt\b)/i,/^(?:dateFormat\s[^#\n;]+)/i,/^(?:inclusiveEndDates\b)/i,/^(?:topAxis\b)/i,/^(?:axisFormat\s[^#\n;]+)/i,/^(?:includes\s[^#\n;]+)/i,/^(?:excludes\s[^#\n;]+)/i,/^(?:todayMarker\s[^\n;]+)/i,/^(?:\d\d\d\d-\d\d-\d\d\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accDescription\s[^#\n;]+)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[10,11],inclusive:!1},acc_descr:{rules:[8],inclusive:!1},acc_title:{rules:[6],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},callbackargs:{rules:[26,27],inclusive:!1},callbackname:{rules:[23,24,25],inclusive:!1},href:{rules:[20,21],inclusive:!1},click:{rules:[29,30],inclusive:!1},INITIAL:{rules:[0,5,7,9,12,13,14,15,16,17,18,19,22,28,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47],inclusive:!0}}};return S}();T.lexer=C;function M(){this.yy={}}return M.prototype=T,T.Parser=M,new M}();M4.parser=M4;const Ent=t=>t.match(/^\s*gantt/)!==null;let zi="",L4="",R4="",iu=[],au=[],I4={},N4=[],a0=[],sl="";const jM=["active","done","crit","milestone"];let s0=[],su=!1,B4=!1,D4=0;const Cnt=function(t,e,r){He.parseDirective(this,t,e,r)},Snt=function(){N4=[],a0=[],sl="",s0=[],o0=0,F4=void 0,l0=void 0,yr=[],zi="",L4="",R4="",iu=[],au=[],su=!1,B4=!1,D4=0,I4={},ci()},Ant=function(t){L4=t},Mnt=function(){return L4},Lnt=function(t){R4=t},Rnt=function(){return R4},Int=function(t){zi=t},Nnt=function(){su=!0},Bnt=function(){return su},Dnt=function(){B4=!0},Ont=function(){return B4},Fnt=function(){return zi},Pnt=function(t){iu=t.toLowerCase().split(/[\s,]+/)},qnt=function(){return iu},Vnt=function(t){au=t.toLowerCase().split(/[\s,]+/)},znt=function(){return au},Ynt=function(){return I4},Unt=function(t){sl=t,N4.push(t)},Wnt=function(){return N4},Hnt=function(){let t=JM();const e=10;let r=0;for(;!t&&r<e;)t=JM(),r++;return a0=yr,a0},$M=function(t,e,r,n){return n.indexOf(t.format(e.trim()))>=0?!1:t.isoWeekday()>=6&&r.indexOf("weekends")>=0||r.indexOf(t.format("dddd").toLowerCase())>=0?!0:r.indexOf(t.format(e.trim()))>=0},XM=function(t,e,r,n){if(!r.length||t.manualEndTime)return;let i=Xn(t.startTime,e,!0);i.add(1,"d");let a=Xn(t.endTime,e,!0),s=Gnt(i,a,e,r,n);t.endTime=a.toDate(),t.renderEndTime=s},Gnt=function(t,e,r,n,i){let a=!1,s=null;for(;t<=e;)a||(s=e.toDate()),a=$M(t,r,n,i),a&&e.add(1,"d"),t.add(1,"d");return s},O4=function(t,e,r){r=r.trim();const i=/^after\s+([\d\w- ]+)/.exec(r.trim());if(i!==null){let s=null;if(i[1].split(" ").forEach(function(o){let l=ll(o);typeof l<"u"&&(s?l.endTime>s.endTime&&(s=l):s=l)}),s)return s.endTime;{const o=new Date;return o.setHours(0,0,0,0),o}}let a=Xn(r,e.trim(),!0);if(a.isValid())return a.toDate();{H.debug("Invalid date:"+r),H.debug("With date format:"+e.trim());const s=new Date(r);if(typeof s>"u"||isNaN(s.getTime()))throw new Error("Invalid date:"+r);return s}},KM=function(t){const e=/^(\d+(?:\.\d+)?)([yMwdhms]|ms)$/.exec(t.trim());return e!==null?Xn.duration(Number.parseFloat(e[1]),e[2]):Xn.duration.invalid()},ZM=function(t,e,r,n){n=n||!1,r=r.trim();let i=Xn(r,e.trim(),!0);if(i.isValid())return n&&i.add(1,"d"),i.toDate();const a=Xn(t),s=KM(r);return s.isValid()&&a.add(s),a.toDate()};let o0=0;const ol=function(t){return typeof t>"u"?(o0=o0+1,"task"+o0):t},jnt=function(t,e){let r;e.substr(0,1)===":"?r=e.substr(1,e.length):r=e;const n=r.split(","),i={};rL(n,i,jM);for(let s=0;s<n.length;s++)n[s]=n[s].trim();let a="";switch(n.length){case 1:i.id=ol(),i.startTime=t.endTime,a=n[0];break;case 2:i.id=ol(),i.startTime=O4(void 0,zi,n[0]),a=n[1];break;case 3:i.id=ol(n[0]),i.startTime=O4(void 0,zi,n[1]),a=n[2];break}return a&&(i.endTime=ZM(i.startTime,zi,a,su),i.manualEndTime=Xn(a,"YYYY-MM-DD",!0).isValid(),XM(i,zi,au,iu)),i},$nt=function(t,e){let r;e.substr(0,1)===":"?r=e.substr(1,e.length):r=e;const n=r.split(","),i={};rL(n,i,jM);for(let a=0;a<n.length;a++)n[a]=n[a].trim();switch(n.length){case 1:i.id=ol(),i.startTime={type:"prevTaskEnd",id:t},i.endTime={data:n[0]};break;case 2:i.id=ol(),i.startTime={type:"getStartDate",startData:n[0]},i.endTime={data:n[1]};break;case 3:i.id=ol(n[0]),i.startTime={type:"getStartDate",startData:n[1]},i.endTime={data:n[2]};break}return i};let F4,l0,yr=[];const QM={},Xnt=function(t,e){const r={section:sl,type:sl,processed:!1,manualEndTime:!1,renderEndTime:null,raw:{data:e},task:t,classes:[]},n=$nt(l0,e);r.raw.startTime=n.startTime,r.raw.endTime=n.endTime,r.id=n.id,r.prevTaskId=l0,r.active=n.active,r.done=n.done,r.crit=n.crit,r.milestone=n.milestone,r.order=D4,D4++;const i=yr.push(r);l0=r.id,QM[r.id]=i-1},ll=function(t){const e=QM[t];return yr[e]},Knt=function(t,e){const r={section:sl,type:sl,description:t,task:t,classes:[]},n=jnt(F4,e);r.startTime=n.startTime,r.endTime=n.endTime,r.id=n.id,r.active=n.active,r.done=n.done,r.crit=n.crit,r.milestone=n.milestone,F4=r,a0.push(r)},JM=function(){const t=function(r){const n=yr[r];let i="";switch(yr[r].raw.startTime.type){case"prevTaskEnd":{const a=ll(n.prevTaskId);n.startTime=a.endTime;break}case"getStartDate":i=O4(void 0,zi,yr[r].raw.startTime.startData),i&&(yr[r].startTime=i);break}return yr[r].startTime&&(yr[r].endTime=ZM(yr[r].startTime,zi,yr[r].raw.endTime.data,su),yr[r].endTime&&(yr[r].processed=!0,yr[r].manualEndTime=Xn(yr[r].raw.endTime.data,"YYYY-MM-DD",!0).isValid(),XM(yr[r],zi,au,iu))),yr[r].processed};let e=!0;for(let r=0;r<yr.length;r++)t(r),e=e&&yr[r].processed;return e},Znt=function(t,e){let r=e;nt().securityLevel!=="loose"&&(r=ki(e)),t.split(",").forEach(function(n){typeof ll(n)<"u"&&(eL(n,()=>{window.open(r,"_self")}),I4[n]=r)}),tL(t,"clickable")},tL=function(t,e){t.split(",").forEach(function(r){let n=ll(r);typeof n<"u"&&n.classes.push(e)})},Qnt=function(t,e,r){if(nt().securityLevel!=="loose"||typeof e>"u")return;let n=[];if(typeof r=="string"){n=r.split(/,(?=(?:(?:[^"]*"){2})*[^"]*$)/);for(let a=0;a<n.length;a++){let s=n[a].trim();s.charAt(0)==='"'&&s.charAt(s.length-1)==='"'&&(s=s.substr(1,s.length-2)),n[a]=s}}n.length===0&&n.push(t),typeof ll(t)<"u"&&eL(t,()=>{Se.runFunc(e,...n)})},eL=function(t,e){s0.push(function(){const r=document.querySelector(`[id="${t}"]`);r!==null&&r.addEventListener("click",function(){e()})}),s0.push(function(){const r=document.querySelector(`[id="${t}-text"]`);r!==null&&r.addEventListener("click",function(){e()})})},P4={parseDirective:Cnt,getConfig:()=>nt().gantt,clear:Snt,setDateFormat:Int,getDateFormat:Fnt,enableInclusiveEndDates:Nnt,endDatesAreInclusive:Bnt,enableTopAxis:Dnt,topAxisEnabled:Ont,setAxisFormat:Ant,getAxisFormat:Mnt,setTodayMarker:Lnt,getTodayMarker:Rnt,setAccTitle:Yn,getAccTitle:ui,setDiagramTitle:c1,getDiagramTitle:u1,setAccDescription:hi,getAccDescription:fi,addSection:Unt,getSections:Wnt,getTasks:Hnt,addTask:Xnt,findTaskById:ll,addTaskOrg:Knt,setIncludes:Pnt,getIncludes:qnt,setExcludes:Vnt,getExcludes:znt,setClickEvent:function(t,e,r){t.split(",").forEach(function(n){Qnt(n,e,r)}),tL(t,"clickable")},setLink:Znt,getLinks:Ynt,bindFunctions:function(t){s0.forEach(function(e){e(t)})},parseDuration:KM,isInvalidDate:$M};function rL(t,e,r){let n=!0;for(;n;)n=!1,r.forEach(function(i){const a="^\\s*"+i+"\\s*$",s=new RegExp(a);t[0].match(s)&&(e[i]=!0,t.shift(1),n=!0)})}const Jnt=function(){H.debug("Something is calling, setConf, remove the call")};let pa;const tit={setConf:Jnt,draw:function(t,e,r,n){const i=nt().gantt,a=nt().securityLevel;let s;a==="sandbox"&&(s=St("#i"+e));const o=St(a==="sandbox"?s.nodes()[0].contentDocument.body:"body"),l=a==="sandbox"?s.nodes()[0].contentDocument:document,u=l.getElementById(e);pa=u.parentElement.offsetWidth,typeof pa>"u"&&(pa=1200),typeof i.useWidth<"u"&&(pa=i.useWidth);const h=n.db.getTasks(),d=h.length*(i.barHeight+i.barGap)+2*i.topPadding;u.setAttribute("viewBox","0 0 "+pa+" "+d);const f=o.select(`[id="${e}"]`),p=Z8().domain([Tl(h,function(L){return L.startTime}),lo(h,function(L){return L.endTime})]).rangeRound([0,pa-i.leftPadding-i.rightPadding]);let m=[];for(let L=0;L<h.length;L++)m.push(h[L].type);const _=m;m=S(m);function y(L,v){const B=L.startTime,w=v.startTime;let D=0;return B>w?D=1:B<w&&(D=-1),D}h.sort(y),b(h,pa,d),li(f,d,pa,i.useMaxWidth),f.append("text").text(n.db.getDiagramTitle()).attr("x",pa/2).attr("y",i.titleTopMargin).attr("class","titleText"),bn(n.db,f,e);function b(L,v,B){const w=i.barHeight,D=w+i.barGap,N=i.topPadding,z=i.leftPadding,X=sp().domain([0,m.length]).range(["#00B9FA","#F95002"]).interpolate(K5);k(D,N,z,v,B,L,n.db.getExcludes(),n.db.getIncludes()),T(z,N,v,B),x(L,D,N,z,w,X,v),C(D,N),M(z,N,v,B)}function x(L,v,B,w,D,N,z){f.append("g").selectAll("rect").data(L).enter().append("rect").attr("x",0).attr("y",function(Y,$){return $=Y.order,$*v+B-2}).attr("width",function(){return z-i.rightPadding/2}).attr("height",v).attr("class",function(Y){for(let $=0;$<m.length;$++)if(Y.type===m[$])return"section section"+$%i.numberSectionStyles;return"section section0"});const X=f.append("g").selectAll("rect").data(L).enter(),ct=n.db.getLinks();if(X.append("rect").attr("id",function(Y){return Y.id}).attr("rx",3).attr("ry",3).attr("x",function(Y){return Y.milestone?p(Y.startTime)+w+.5*(p(Y.endTime)-p(Y.startTime))-.5*D:p(Y.startTime)+w}).attr("y",function(Y,$){return $=Y.order,$*v+B}).attr("width",function(Y){return Y.milestone?D:p(Y.renderEndTime||Y.endTime)-p(Y.startTime)}).attr("height",D).attr("transform-origin",function(Y,$){return $=Y.order,(p(Y.startTime)+w+.5*(p(Y.endTime)-p(Y.startTime))).toString()+"px "+($*v+B+.5*D).toString()+"px"}).attr("class",function(Y){const $="task";let lt="";Y.classes.length>0&&(lt=Y.classes.join(" "));let ut=0;for(let tt=0;tt<m.length;tt++)Y.type===m[tt]&&(ut=tt%i.numberSectionStyles);let W="";return Y.active?Y.crit?W+=" activeCrit":W=" active":Y.done?Y.crit?W=" doneCrit":W=" done":Y.crit&&(W+=" crit"),W.length===0&&(W=" task"),Y.milestone&&(W=" milestone "+W),W+=ut,W+=" "+lt,$+W}),X.append("text").attr("id",function(Y){return Y.id+"-text"}).text(function(Y){return Y.task}).attr("font-size",i.fontSize).attr("x",function(Y){let $=p(Y.startTime),lt=p(Y.renderEndTime||Y.endTime);Y.milestone&&($+=.5*(p(Y.endTime)-p(Y.startTime))-.5*D),Y.milestone&&(lt=$+D);const ut=this.getBBox().width;return ut>lt-$?lt+ut+1.5*i.leftPadding>z?$+w-5:lt+w+5:(lt-$)/2+$+w}).attr("y",function(Y,$){return $=Y.order,$*v+i.barHeight/2+(i.fontSize/2-2)+B}).attr("text-height",D).attr("class",function(Y){const $=p(Y.startTime);let lt=p(Y.endTime);Y.milestone&&(lt=$+D);const ut=this.getBBox().width;let W="";Y.classes.length>0&&(W=Y.classes.join(" "));let tt=0;for(let it=0;it<m.length;it++)Y.type===m[it]&&(tt=it%i.numberSectionStyles);let K="";return Y.active&&(Y.crit?K="activeCritText"+tt:K="activeText"+tt),Y.done?Y.crit?K=K+" doneCritText"+tt:K=K+" doneText"+tt:Y.crit&&(K=K+" critText"+tt),Y.milestone&&(K+=" milestoneText"),ut>lt-$?lt+ut+1.5*i.leftPadding>z?W+" taskTextOutsideLeft taskTextOutside"+tt+" "+K:W+" taskTextOutsideRight taskTextOutside"+tt+" "+K+" width-"+ut:W+" taskText taskText"+tt+" "+K+" width-"+ut}),nt().securityLevel==="sandbox"){let Y;Y=St("#i"+e);const $=Y.nodes()[0].contentDocument;X.filter(function(lt){return typeof ct[lt.id]<"u"}).each(function(lt){var ut=$.querySelector("#"+lt.id),W=$.querySelector("#"+lt.id+"-text");const tt=ut.parentNode;var K=$.createElement("a");K.setAttribute("xlink:href",ct[lt.id]),K.setAttribute("target","_top"),tt.appendChild(K),K.appendChild(ut),K.appendChild(W)})}}function k(L,v,B,w,D,N,z,X){const ct=N.reduce((tt,{startTime:K})=>tt?Math.min(tt,K):K,0),J=N.reduce((tt,{endTime:K})=>tt?Math.max(tt,K):K,0),Y=n.db.getDateFormat();if(!ct||!J)return;const $=[];let lt=null,ut=Xn(ct);for(;ut.valueOf()<=J;)n.db.isInvalidDate(ut,Y,z,X)?lt?lt.end=ut.clone():lt={start:ut.clone(),end:ut.clone()}:lt&&($.push(lt),lt=null),ut.add(1,"d");f.append("g").selectAll("rect").data($).enter().append("rect").attr("id",function(tt){return"exclude-"+tt.start.format("YYYY-MM-DD")}).attr("x",function(tt){return p(tt.start)+B}).attr("y",i.gridLineStartPadding).attr("width",function(tt){const K=tt.end.clone().add(1,"day");return p(K)-p(tt.start)}).attr("height",D-v-i.gridLineStartPadding).attr("transform-origin",function(tt,K){return(p(tt.start)+B+.5*(p(tt.end)-p(tt.start))).toString()+"px "+(K*L+.5*D).toString()+"px"}).attr("class","exclude-range")}function T(L,v,B,w){let D=K_(p).tickSize(-w+v+i.gridLineStartPadding).tickFormat(vc(n.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));if(f.append("g").attr("class","grid").attr("transform","translate("+L+", "+(w-50)+")").call(D).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10).attr("dy","1em"),n.db.topAxisEnabled()||i.topAxis){let N=X_(p).tickSize(-w+v+i.gridLineStartPadding).tickFormat(vc(n.db.getAxisFormat()||i.axisFormat||"%Y-%m-%d"));f.append("g").attr("class","grid").attr("transform","translate("+L+", "+v+")").call(N).selectAll("text").style("text-anchor","middle").attr("fill","#000").attr("stroke","none").attr("font-size",10)}}function C(L,v){const B=[];let w=0;for(let D=0;D<m.length;D++)B[D]=[m[D],A(m[D],_)];f.append("g").selectAll("text").data(B).enter().append(function(D){const N=D[0].split(pe.lineBreakRegex),z=-(N.length-1)/2,X=l.createElementNS("http://www.w3.org/2000/svg","text");X.setAttribute("dy",z+"em");for(let ct=0;ct<N.length;ct++){const J=l.createElementNS("http://www.w3.org/2000/svg","tspan");J.setAttribute("alignment-baseline","central"),J.setAttribute("x","10"),ct>0&&J.setAttribute("dy","1em"),J.textContent=N[ct],X.appendChild(J)}return X}).attr("x",10).attr("y",function(D,N){if(N>0)for(let z=0;z<N;z++)return w+=B[N-1][1],D[1]*L/2+w*L+v;else return D[1]*L/2+v}).attr("font-size",i.sectionFontSize).attr("font-size",i.sectionFontSize).attr("class",function(D){for(let N=0;N<m.length;N++)if(D[0]===m[N])return"sectionTitle sectionTitle"+N%i.numberSectionStyles;return"sectionTitle"})}function M(L,v,B,w){const D=n.db.getTodayMarker();if(D==="off")return;const N=f.append("g").attr("class","today"),z=new Date,X=N.append("line");X.attr("x1",p(z)+L).attr("x2",p(z)+L).attr("y1",i.titleTopMargin).attr("y2",w-i.titleTopMargin).attr("class","today"),D!==""&&X.attr("style",D.replace(/,/g,";"))}function S(L){const v={},B=[];for(let w=0,D=L.length;w<D;++w)Object.prototype.hasOwnProperty.call(v,L[w])||(v[L[w]]=!0,B.push(L[w]));return B}function R(L){let v=L.length;const B={};for(;v;)B[L[--v]]=(B[L[v]]||0)+1;return B}function A(L,v){return R(v)[L]||0}}};var q4=function(){var t=function(a,s,o,l){for(o=o||{},l=a.length;l--;o[a[l]]=s);return o},e=[6,9,10],r={trace:function(){},yy:{},symbols_:{error:2,start:3,info:4,document:5,EOF:6,line:7,statement:8,NL:9,showInfo:10,$accept:0,$end:1},terminals_:{2:"error",4:"info",6:"EOF",9:"NL",10:"showInfo"},productions_:[0,[3,3],[5,0],[5,2],[7,1],[7,1],[8,1]],performAction:function(s,o,l,u,h,d,f){switch(d.length-1,h){case 1:return u;case 4:break;case 6:u.setInfo(!0);break}},table:[{3:1,4:[1,2]},{1:[3]},t(e,[2,2],{5:3}),{6:[1,4],7:5,8:6,9:[1,7],10:[1,8]},{1:[2,1]},t(e,[2,3]),t(e,[2,4]),t(e,[2,5]),t(e,[2,6])],defaultActions:{4:[2,1]},parseError:function(s,o){if(o.recoverable)this.trace(s);else{var l=new Error(s);throw l.hash=o,l}},parse:function(s){var o=this,l=[0],u=[],h=[null],d=[],f=this.table,p="",m=0,_=0,y=2,b=1,x=d.slice.call(arguments,1),k=Object.create(this.lexer),T={yy:{}};for(var C in this.yy)Object.prototype.hasOwnProperty.call(this.yy,C)&&(T.yy[C]=this.yy[C]);k.setInput(s,T.yy),T.yy.lexer=k,T.yy.parser=this,typeof k.yylloc>"u"&&(k.yylloc={});var M=k.yylloc;d.push(M);var S=k.options&&k.options.ranges;typeof T.yy.parseError=="function"?this.parseError=T.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function R(){var J;return J=u.pop()||k.lex()||b,typeof J!="number"&&(J instanceof Array&&(u=J,J=u.pop()),J=o.symbols_[J]||J),J}for(var A,L,v,B,w={},D,N,z,X;;){if(L=l[l.length-1],this.defaultActions[L]?v=this.defaultActions[L]:((A===null||typeof A>"u")&&(A=R()),v=f[L]&&f[L][A]),typeof v>"u"||!v.length||!v[0]){var ct="";X=[];for(D in f[L])this.terminals_[D]&&D>y&&X.push("'"+this.terminals_[D]+"'");k.showPosition?ct="Parse error on line "+(m+1)+`:
+`+k.showPosition()+`
+Expecting `+X.join(", ")+", got '"+(this.terminals_[A]||A)+"'":ct="Parse error on line "+(m+1)+": Unexpected "+(A==b?"end of input":"'"+(this.terminals_[A]||A)+"'"),this.parseError(ct,{text:k.match,token:this.terminals_[A]||A,line:k.yylineno,loc:M,expected:X})}if(v[0]instanceof Array&&v.length>1)throw new Error("Parse Error: multiple actions possible at state: "+L+", token: "+A);switch(v[0]){case 1:l.push(A),h.push(k.yytext),d.push(k.yylloc),l.push(v[1]),A=null,_=k.yyleng,p=k.yytext,m=k.yylineno,M=k.yylloc;break;case 2:if(N=this.productions_[v[1]][1],w.$=h[h.length-N],w._$={first_line:d[d.length-(N||1)].first_line,last_line:d[d.length-1].last_line,first_column:d[d.length-(N||1)].first_column,last_column:d[d.length-1].last_column},S&&(w._$.range=[d[d.length-(N||1)].range[0],d[d.length-1].range[1]]),B=this.performAction.apply(w,[p,_,m,T.yy,v[1],h,d].concat(x)),typeof B<"u")return B;N&&(l=l.slice(0,-1*N*2),h=h.slice(0,-1*N),d=d.slice(0,-1*N)),l.push(this.productions_[v[1]][0]),h.push(w.$),d.push(w._$),z=f[l[l.length-2]][l[l.length-1]],l.push(z);break;case 3:return!0}}return!0}},n=function(){var a={EOF:1,parseError:function(o,l){if(this.yy.parser)this.yy.parser.parseError(o,l);else throw new Error(o)},setInput:function(s,o){return this.yy=o||this.yy||{},this._input=s,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var s=this._input[0];this.yytext+=s,this.yyleng++,this.offset++,this.match+=s,this.matched+=s;var o=s.match(/(?:\r\n?|\n).*/g);return o?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),s},unput:function(s){var o=s.length,l=s.split(/(?:\r\n?|\n)/g);this._input=s+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-o),this.offset-=o;var u=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),l.length-1&&(this.yylineno-=l.length-1);var h=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:l?(l.length===u.length?this.yylloc.first_column:0)+u[u.length-l.length].length-l[0].length:this.yylloc.first_column-o},this.options.ranges&&(this.yylloc.range=[h[0],h[0]+this.yyleng-o]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
+`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(s){this.unput(this.match.slice(s))},pastInput:function(){var s=this.matched.substr(0,this.matched.length-this.match.length);return(s.length>20?"...":"")+s.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var s=this.match;return s.length<20&&(s+=this._input.substr(0,20-s.length)),(s.substr(0,20)+(s.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var s=this.pastInput(),o=new Array(s.length+1).join("-");return s+this.upcomingInput()+`
+`+o+"^"},test_match:function(s,o){var l,u,h;if(this.options.backtrack_lexer&&(h={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(h.yylloc.range=this.yylloc.range.slice(0))),u=s[0].match(/(?:\r\n?|\n).*/g),u&&(this.yylineno+=u.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:u?u[u.length-1].length-u[u.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+s[0].length},this.yytext+=s[0],this.match+=s[0],this.matches=s,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(s[0].length),this.matched+=s[0],l=this.performAction.call(this,this.yy,this,o,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),l)return l;if(this._backtrack){for(var d in h)this[d]=h[d];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var s,o,l,u;this._more||(this.yytext="",this.match="");for(var h=this._currentRules(),d=0;d<h.length;d++)if(l=this._input.match(this.rules[h[d]]),l&&(!o||l[0].length>o[0].length)){if(o=l,u=d,this.options.backtrack_lexer){if(s=this.test_match(l,h[d]),s!==!1)return s;if(this._backtrack){o=!1;continue}else return!1}else if(!this.options.flex)break}return o?(s=this.test_match(o,h[u]),s!==!1?s:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
+`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var o=this.next();return o||this.lex()},begin:function(o){this.conditionStack.push(o)},popState:function(){var o=this.conditionStack.length-1;return o>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(o){return o=this.conditionStack.length-1-Math.abs(o||0),o>=0?this.conditionStack[o]:"INITIAL"},pushState:function(o){this.begin(o)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(o,l,u,h){switch(u){case 0:return 4;case 1:return 9;case 2:return"space";case 3:return 10;case 4:return 6;case 5:return"TXT"}},rules:[/^(?:info\b)/i,/^(?:[\s\n\r]+)/i,/^(?:[\s]+)/i,/^(?:showInfo\b)/i,/^(?:$)/i,/^(?:.)/i],conditions:{INITIAL:{rules:[0,1,2,3,4,5],inclusive:!0}}};return a}();r.lexer=n;function i(){this.yy={}}return i.prototype=r,r.Parser=i,new i}();q4.parser=q4;var nL="",iL=!1;const eit={setMessage:t=>{H.debug("Setting message to: "+t),nL=t},getMessage:()=>nL,setInfo:t=>{iL=t},getInfo:()=>iL,clear:ci},rit={draw:(t,e,r,n)=>{try{H.debug(`Rendering info diagram
+`+t);const i=nt().securityLevel;let a;i==="sandbox"&&(a=St("#i"+e));const o=St(i==="sandbox"?a.nodes()[0].contentDocument.body:"body").select("#"+e);o.append("g").append("text").attr("x",100).attr("y",40).attr("class","version").attr("font-size","32px").style("text-anchor","middle").text("v "+r),o.attr("height",100),o.attr("width",400)}catch(i){H.error("Error while rendering info diagram"),H.error(i.message)}}},nit=t=>t.match(/^\s*info/)!==null;var V4=function(){var t=function(M,S,R,A){for(R=R||{},A=M.length;A--;R[M[A]]=S);return R},e=[1,4],r=[1,5],n=[1,6],i=[1,7],a=[1,9],s=[1,11,13,15,17,19,20,26,27,28,29],o=[2,5],l=[1,6,11,13,15,17,19,20,26,27,28,29],u=[26,27,28],h=[2,8],d=[1,18],f=[1,19],p=[1,20],m=[1,21],_=[1,22],y=[1,23],b=[1,28],x=[6,26,27,28,29],k={trace:function(){},yy:{},symbols_:{error:2,start:3,eol:4,directive:5,PIE:6,document:7,showData:8,line:9,statement:10,txt:11,value:12,title:13,title_value:14,acc_title:15,acc_title_value:16,acc_descr:17,acc_descr_value:18,acc_descr_multiline_value:19,section:20,openDirective:21,typeDirective:22,closeDirective:23,":":24,argDirective:25,NEWLINE:26,";":27,EOF:28,open_directive:29,type_directive:30,arg_directive:31,close_directive:32,$accept:0,$end:1},terminals_:{2:"error",6:"PIE",8:"showData",11:"txt",12:"value",13:"title",14:"title_value",15:"acc_title",16:"acc_title_value",17:"acc_descr",18:"acc_descr_value",19:"acc_descr_multiline_value",20:"section",24:":",26:"NEWLINE",27:";",28:"EOF",29:"open_directive",30:"type_directive",31:"arg_directive",32:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,3],[7,0],[7,2],[9,2],[10,0],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,1],[5,3],[5,5],[4,1],[4,1],[4,1],[21,1],[22,1],[25,1],[23,1]],performAction:function(S,R,A,L,v,B,w){var D=B.length-1;switch(v){case 4:L.setShowData(!0);break;case 7:this.$=B[D-1];break;case 9:L.addSection(B[D-1],L.cleanupValue(B[D]));break;case 10:this.$=B[D].trim(),L.setDiagramTitle(this.$);break;case 11:this.$=B[D].trim(),L.setAccTitle(this.$);break;case 12:case 13:this.$=B[D].trim(),L.setAccDescription(this.$);break;case 14:L.addSection(B[D].substr(8)),this.$=B[D].substr(8);break;case 21:L.parseDirective("%%{","open_directive");break;case 22:L.parseDirective(B[D],"type_directive");break;case 23:B[D]=B[D].trim().replace(/'/g,'"'),L.parseDirective(B[D],"arg_directive");break;case 24:L.parseDirective("}%%","close_directive","pie");break}},table:[{3:1,4:2,5:3,6:e,21:8,26:r,27:n,28:i,29:a},{1:[3]},{3:10,4:2,5:3,6:e,21:8,26:r,27:n,28:i,29:a},{3:11,4:2,5:3,6:e,21:8,26:r,27:n,28:i,29:a},t(s,o,{7:12,8:[1,13]}),t(l,[2,18]),t(l,[2,19]),t(l,[2,20]),{22:14,30:[1,15]},{30:[2,21]},{1:[2,1]},{1:[2,2]},t(u,h,{21:8,9:16,10:17,5:24,1:[2,3],11:d,13:f,15:p,17:m,19:_,20:y,29:a}),t(s,o,{7:25}),{23:26,24:[1,27],32:b},t([24,32],[2,22]),t(s,[2,6]),{4:29,26:r,27:n,28:i},{12:[1,30]},{14:[1,31]},{16:[1,32]},{18:[1,33]},t(u,[2,13]),t(u,[2,14]),t(u,[2,15]),t(u,h,{21:8,9:16,10:17,5:24,1:[2,4],11:d,13:f,15:p,17:m,19:_,20:y,29:a}),t(x,[2,16]),{25:34,31:[1,35]},t(x,[2,24]),t(s,[2,7]),t(u,[2,9]),t(u,[2,10]),t(u,[2,11]),t(u,[2,12]),{23:36,32:b},{32:[2,23]},t(x,[2,17])],defaultActions:{9:[2,21],10:[2,1],11:[2,2],35:[2,23]},parseError:function(S,R){if(R.recoverable)this.trace(S);else{var A=new Error(S);throw A.hash=R,A}},parse:function(S){var R=this,A=[0],L=[],v=[null],B=[],w=this.table,D="",N=0,z=0,X=2,ct=1,J=B.slice.call(arguments,1),Y=Object.create(this.lexer),$={yy:{}};for(var lt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,lt)&&($.yy[lt]=this.yy[lt]);Y.setInput(S,$.yy),$.yy.lexer=Y,$.yy.parser=this,typeof Y.yylloc>"u"&&(Y.yylloc={});var ut=Y.yylloc;B.push(ut);var W=Y.options&&Y.options.ranges;typeof $.yy.parseError=="function"?this.parseError=$.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function tt(){var et;return et=L.pop()||Y.lex()||ct,typeof et!="number"&&(et instanceof Array&&(L=et,et=L.pop()),et=R.symbols_[et]||et),et}for(var K,it,Z,V,Q={},q,U,F,j;;){if(it=A[A.length-1],this.defaultActions[it]?Z=this.defaultActions[it]:((K===null||typeof K>"u")&&(K=tt()),Z=w[it]&&w[it][K]),typeof Z>"u"||!Z.length||!Z[0]){var P="";j=[];for(q in w[it])this.terminals_[q]&&q>X&&j.push("'"+this.terminals_[q]+"'");Y.showPosition?P="Parse error on line "+(N+1)+`:
+`+Y.showPosition()+`
+Expecting `+j.join(", ")+", got '"+(this.terminals_[K]||K)+"'":P="Parse error on line "+(N+1)+": Unexpected "+(K==ct?"end of input":"'"+(this.terminals_[K]||K)+"'"),this.parseError(P,{text:Y.match,token:this.terminals_[K]||K,line:Y.yylineno,loc:ut,expected:j})}if(Z[0]instanceof Array&&Z.length>1)throw new Error("Parse Error: multiple actions possible at state: "+it+", token: "+K);switch(Z[0]){case 1:A.push(K),v.push(Y.yytext),B.push(Y.yylloc),A.push(Z[1]),K=null,z=Y.yyleng,D=Y.yytext,N=Y.yylineno,ut=Y.yylloc;break;case 2:if(U=this.productions_[Z[1]][1],Q.$=v[v.length-U],Q._$={first_line:B[B.length-(U||1)].first_line,last_line:B[B.length-1].last_line,first_column:B[B.length-(U||1)].first_column,last_column:B[B.length-1].last_column},W&&(Q._$.range=[B[B.length-(U||1)].range[0],B[B.length-1].range[1]]),V=this.performAction.apply(Q,[D,z,N,$.yy,Z[1],v,B].concat(J)),typeof V<"u")return V;U&&(A=A.slice(0,-1*U*2),v=v.slice(0,-1*U),B=B.slice(0,-1*U)),A.push(this.productions_[Z[1]][0]),v.push(Q.$),B.push(Q._$),F=w[A[A.length-2]][A[A.length-1]],A.push(F);break;case 3:return!0}}return!0}},T=function(){var M={EOF:1,parseError:function(R,A){if(this.yy.parser)this.yy.parser.parseError(R,A);else throw new Error(R)},setInput:function(S,R){return this.yy=R||this.yy||{},this._input=S,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var S=this._input[0];this.yytext+=S,this.yyleng++,this.offset++,this.match+=S,this.matched+=S;var R=S.match(/(?:\r\n?|\n).*/g);return R?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),S},unput:function(S){var R=S.length,A=S.split(/(?:\r\n?|\n)/g);this._input=S+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-R),this.offset-=R;var L=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),A.length-1&&(this.yylineno-=A.length-1);var v=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:A?(A.length===L.length?this.yylloc.first_column:0)+L[L.length-A.length].length-A[0].length:this.yylloc.first_column-R},this.options.ranges&&(this.yylloc.range=[v[0],v[0]+this.yyleng-R]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
+`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(S){this.unput(this.match.slice(S))},pastInput:function(){var S=this.matched.substr(0,this.matched.length-this.match.length);return(S.length>20?"...":"")+S.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var S=this.match;return S.length<20&&(S+=this._input.substr(0,20-S.length)),(S.substr(0,20)+(S.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var S=this.pastInput(),R=new Array(S.length+1).join("-");return S+this.upcomingInput()+`
+`+R+"^"},test_match:function(S,R){var A,L,v;if(this.options.backtrack_lexer&&(v={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(v.yylloc.range=this.yylloc.range.slice(0))),L=S[0].match(/(?:\r\n?|\n).*/g),L&&(this.yylineno+=L.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:L?L[L.length-1].length-L[L.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+S[0].length},this.yytext+=S[0],this.match+=S[0],this.matches=S,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(S[0].length),this.matched+=S[0],A=this.performAction.call(this,this.yy,this,R,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),A)return A;if(this._backtrack){for(var B in v)this[B]=v[B];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var S,R,A,L;this._more||(this.yytext="",this.match="");for(var v=this._currentRules(),B=0;B<v.length;B++)if(A=this._input.match(this.rules[v[B]]),A&&(!R||A[0].length>R[0].length)){if(R=A,L=B,this.options.backtrack_lexer){if(S=this.test_match(A,v[B]),S!==!1)return S;if(this._backtrack){R=!1;continue}else return!1}else if(!this.options.flex)break}return R?(S=this.test_match(R,v[L]),S!==!1?S:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
+`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var R=this.next();return R||this.lex()},begin:function(R){this.conditionStack.push(R)},popState:function(){var R=this.conditionStack.length-1;return R>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(R){return R=this.conditionStack.length-1-Math.abs(R||0),R>=0?this.conditionStack[R]:"INITIAL"},pushState:function(R){this.begin(R)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(R,A,L,v){switch(L){case 0:return this.begin("open_directive"),29;case 1:return this.begin("type_directive"),30;case 2:return this.popState(),this.begin("arg_directive"),24;case 3:return this.popState(),this.popState(),32;case 4:return 31;case 5:break;case 6:break;case 7:return 26;case 8:break;case 9:break;case 10:return this.begin("title"),13;case 11:return this.popState(),"title_value";case 12:return this.begin("acc_title"),15;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),17;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:this.begin("string");break;case 20:this.popState();break;case 21:return"txt";case 22:return 6;case 23:return 8;case 24:return"value";case 25:return 28}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n\r]+)/i,/^(?:%%[^\n]*)/i,/^(?:[\s]+)/i,/^(?:title\b)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:pie\b)/i,/^(?:showData\b)/i,/^(?::[\s]*[\d]+(?:\.[\d]+)?)/i,/^(?:$)/i],conditions:{acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},title:{rules:[11],inclusive:!1},string:{rules:[20,21],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,12,14,16,19,22,23,24,25],inclusive:!0}}};return M}();k.lexer=T;function C(){this.yy={}}return C.prototype=k,k.Parser=C,new C}();V4.parser=V4;const iit=t=>t.match(/^\s*pie/)!==null;let c0={},z4=!1;const ait={parseDirective:function(t,e,r){He.parseDirective(this,t,e,r)},getConfig:()=>nt().pie,addSection:function(t,e){t=pe.sanitizeText(t,nt()),typeof c0[t]>"u"&&(c0[t]=e,H.debug("Added new section :",t))},getSections:()=>c0,cleanupValue:function(t){return t.substring(0,1)===":"&&(t=t.substring(1).trim()),Number(t.trim())},clear:function(){c0={},z4=!1,ci()},setAccTitle:Yn,getAccTitle:ui,setDiagramTitle:c1,getDiagramTitle:u1,setShowData:function(t){z4=t},getShowData:function(){return z4},getAccDescription:fi,setAccDescription:hi};let ga=nt(),ya;const ou=450,sit={draw:(t,e,r,n)=>{try{ga=nt(),H.debug(`Rendering info diagram
+`+t);const b=nt().securityLevel;let x;b==="sandbox"&&(x=St("#i"+e));const k=St(b==="sandbox"?x.nodes()[0].contentDocument.body:"body"),T=b==="sandbox"?x.nodes()[0].contentDocument:document;n.db.clear(),n.parser.parse(t),H.debug("Parsed info diagram");const C=T.getElementById(e);ya=C.parentElement.offsetWidth,typeof ya>"u"&&(ya=1200),typeof ga.useWidth<"u"&&(ya=ga.useWidth),typeof ga.pie.useWidth<"u"&&(ya=ga.pie.useWidth);const M=k.select("#"+e);li(M,ou,ya,ga.pie.useMaxWidth),bn(n.db,M,e),C.setAttribute("viewBox","0 0 "+ya+" "+ou);var i=40,a=18,s=4,o=Math.min(ya,ou)/2-i,l=M.append("g").attr("transform","translate("+ya/2+","+ou/2+")"),u=n.db.getSections(),h=0;Object.keys(u).forEach(function(R){h+=u[R]});const S=ga.themeVariables;var d=[S.pie1,S.pie2,S.pie3,S.pie4,S.pie5,S.pie6,S.pie7,S.pie8,S.pie9,S.pie10,S.pie11,S.pie12],f=rf().range(d),p=O7().value(function(R){return R[1]}),m=p(Object.entries(u)),_=gf().innerRadius(0).outerRadius(o);l.selectAll("mySlices").data(m).enter().append("path").attr("d",_).attr("fill",function(R){return f(R.data[0])}).attr("class","pieCircle"),l.selectAll("mySlices").data(m).enter().append("text").text(function(R){return(R.data[1]/h*100).toFixed(0)+"%"}).attr("transform",function(R){return"translate("+_.centroid(R)+")"}).style("text-anchor","middle").attr("class","slice"),l.append("text").text(n.db.getDiagramTitle()).attr("x",0).attr("y",-(ou-50)/2).attr("class","pieTitleText");var y=l.selectAll(".legend").data(f.domain()).enter().append("g").attr("class","legend").attr("transform",function(R,A){var L=a+s,v=L*f.domain().length/2,B=12*a,w=A*L-v;return"translate("+B+","+w+")"});y.append("rect").attr("width",a).attr("height",a).style("fill",f).style("stroke",f),y.data(m).append("text").attr("x",a+s).attr("y",a-s).text(function(R){return n.db.getShowData()||ga.showData||ga.pie.showData?R.data[0]+" ["+R.data[1]+"]":R.data[0]})}catch(b){H.error("Error while rendering info diagram"),H.error(b)}}};var Y4=function(){var t=function(it,Z,V,Q){for(V=V||{},Q=it.length;Q--;V[it[Q]]=Z);return V},e=[1,3],r=[1,5],n=[1,6],i=[1,7],a=[1,8],s=[5,6,8,14,16,18,19,40,41,42,43,44,45,53,71,72],o=[1,22],l=[2,13],u=[1,26],h=[1,27],d=[1,28],f=[1,29],p=[1,30],m=[1,31],_=[1,24],y=[1,32],b=[1,33],x=[1,36],k=[71,72],T=[5,8,14,16,18,19,40,41,42,43,44,45,53,60,62,71,72],C=[1,56],M=[1,57],S=[1,58],R=[1,59],A=[1,60],L=[1,61],v=[1,62],B=[62,63],w=[1,74],D=[1,70],N=[1,71],z=[1,72],X=[1,73],ct=[1,75],J=[1,79],Y=[1,80],$=[1,77],lt=[1,78],ut=[5,8,14,16,18,19,40,41,42,43,44,45,53,71,72],W={trace:function(){},yy:{},symbols_:{error:2,start:3,directive:4,NEWLINE:5,RD:6,diagram:7,EOF:8,openDirective:9,typeDirective:10,closeDirective:11,":":12,argDirective:13,acc_title:14,acc_title_value:15,acc_descr:16,acc_descr_value:17,acc_descr_multiline_value:18,open_directive:19,type_directive:20,arg_directive:21,close_directive:22,requirementDef:23,elementDef:24,relationshipDef:25,requirementType:26,requirementName:27,STRUCT_START:28,requirementBody:29,ID:30,COLONSEP:31,id:32,TEXT:33,text:34,RISK:35,riskLevel:36,VERIFYMTHD:37,verifyType:38,STRUCT_STOP:39,REQUIREMENT:40,FUNCTIONAL_REQUIREMENT:41,INTERFACE_REQUIREMENT:42,PERFORMANCE_REQUIREMENT:43,PHYSICAL_REQUIREMENT:44,DESIGN_CONSTRAINT:45,LOW_RISK:46,MED_RISK:47,HIGH_RISK:48,VERIFY_ANALYSIS:49,VERIFY_DEMONSTRATION:50,VERIFY_INSPECTION:51,VERIFY_TEST:52,ELEMENT:53,elementName:54,elementBody:55,TYPE:56,type:57,DOCREF:58,ref:59,END_ARROW_L:60,relationship:61,LINE:62,END_ARROW_R:63,CONTAINS:64,COPIES:65,DERIVES:66,SATISFIES:67,VERIFIES:68,REFINES:69,TRACES:70,unqString:71,qString:72,$accept:0,$end:1},terminals_:{2:"error",5:"NEWLINE",6:"RD",8:"EOF",12:":",14:"acc_title",15:"acc_title_value",16:"acc_descr",17:"acc_descr_value",18:"acc_descr_multiline_value",19:"open_directive",20:"type_directive",21:"arg_directive",22:"close_directive",28:"STRUCT_START",30:"ID",31:"COLONSEP",33:"TEXT",35:"RISK",37:"VERIFYMTHD",39:"STRUCT_STOP",40:"REQUIREMENT",41:"FUNCTIONAL_REQUIREMENT",42:"INTERFACE_REQUIREMENT",43:"PERFORMANCE_REQUIREMENT",44:"PHYSICAL_REQUIREMENT",45:"DESIGN_CONSTRAINT",46:"LOW_RISK",47:"MED_RISK",48:"HIGH_RISK",49:"VERIFY_ANALYSIS",50:"VERIFY_DEMONSTRATION",51:"VERIFY_INSPECTION",52:"VERIFY_TEST",53:"ELEMENT",56:"TYPE",58:"DOCREF",60:"END_ARROW_L",62:"LINE",63:"END_ARROW_R",64:"CONTAINS",65:"COPIES",66:"DERIVES",67:"SATISFIES",68:"VERIFIES",69:"REFINES",70:"TRACES",71:"unqString",72:"qString"},productions_:[0,[3,3],[3,2],[3,4],[4,3],[4,5],[4,2],[4,2],[4,1],[9,1],[10,1],[13,1],[11,1],[7,0],[7,2],[7,2],[7,2],[7,2],[7,2],[23,5],[29,5],[29,5],[29,5],[29,5],[29,2],[29,1],[26,1],[26,1],[26,1],[26,1],[26,1],[26,1],[36,1],[36,1],[36,1],[38,1],[38,1],[38,1],[38,1],[24,5],[55,5],[55,5],[55,2],[55,1],[25,5],[25,5],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[61,1],[27,1],[27,1],[32,1],[32,1],[34,1],[34,1],[54,1],[54,1],[57,1],[57,1],[59,1],[59,1]],performAction:function(Z,V,Q,q,U,F,j){var P=F.length-1;switch(U){case 6:this.$=F[P].trim(),q.setAccTitle(this.$);break;case 7:case 8:this.$=F[P].trim(),q.setAccDescription(this.$);break;case 9:q.parseDirective("%%{","open_directive");break;case 10:q.parseDirective(F[P],"type_directive");break;case 11:F[P]=F[P].trim().replace(/'/g,'"'),q.parseDirective(F[P],"arg_directive");break;case 12:q.parseDirective("}%%","close_directive","pie");break;case 13:this.$=[];break;case 19:q.addRequirement(F[P-3],F[P-4]);break;case 20:q.setNewReqId(F[P-2]);break;case 21:q.setNewReqText(F[P-2]);break;case 22:q.setNewReqRisk(F[P-2]);break;case 23:q.setNewReqVerifyMethod(F[P-2]);break;case 26:this.$=q.RequirementType.REQUIREMENT;break;case 27:this.$=q.RequirementType.FUNCTIONAL_REQUIREMENT;break;case 28:this.$=q.RequirementType.INTERFACE_REQUIREMENT;break;case 29:this.$=q.RequirementType.PERFORMANCE_REQUIREMENT;break;case 30:this.$=q.RequirementType.PHYSICAL_REQUIREMENT;break;case 31:this.$=q.RequirementType.DESIGN_CONSTRAINT;break;case 32:this.$=q.RiskLevel.LOW_RISK;break;case 33:this.$=q.RiskLevel.MED_RISK;break;case 34:this.$=q.RiskLevel.HIGH_RISK;break;case 35:this.$=q.VerifyType.VERIFY_ANALYSIS;break;case 36:this.$=q.VerifyType.VERIFY_DEMONSTRATION;break;case 37:this.$=q.VerifyType.VERIFY_INSPECTION;break;case 38:this.$=q.VerifyType.VERIFY_TEST;break;case 39:q.addElement(F[P-3]);break;case 40:q.setNewElementType(F[P-2]);break;case 41:q.setNewElementDocRef(F[P-2]);break;case 44:q.addRelationship(F[P-2],F[P],F[P-4]);break;case 45:q.addRelationship(F[P-2],F[P-4],F[P]);break;case 46:this.$=q.Relationships.CONTAINS;break;case 47:this.$=q.Relationships.COPIES;break;case 48:this.$=q.Relationships.DERIVES;break;case 49:this.$=q.Relationships.SATISFIES;break;case 50:this.$=q.Relationships.VERIFIES;break;case 51:this.$=q.Relationships.REFINES;break;case 52:this.$=q.Relationships.TRACES;break}},table:[{3:1,4:2,6:e,9:4,14:r,16:n,18:i,19:a},{1:[3]},{3:10,4:2,5:[1,9],6:e,9:4,14:r,16:n,18:i,19:a},{5:[1,11]},{10:12,20:[1,13]},{15:[1,14]},{17:[1,15]},t(s,[2,8]),{20:[2,9]},{3:16,4:2,6:e,9:4,14:r,16:n,18:i,19:a},{1:[2,2]},{4:21,5:o,7:17,8:l,9:4,14:r,16:n,18:i,19:a,23:18,24:19,25:20,26:23,32:25,40:u,41:h,42:d,43:f,44:p,45:m,53:_,71:y,72:b},{11:34,12:[1,35],22:x},t([12,22],[2,10]),t(s,[2,6]),t(s,[2,7]),{1:[2,1]},{8:[1,37]},{4:21,5:o,7:38,8:l,9:4,14:r,16:n,18:i,19:a,23:18,24:19,25:20,26:23,32:25,40:u,41:h,42:d,43:f,44:p,45:m,53:_,71:y,72:b},{4:21,5:o,7:39,8:l,9:4,14:r,16:n,18:i,19:a,23:18,24:19,25:20,26:23,32:25,40:u,41:h,42:d,43:f,44:p,45:m,53:_,71:y,72:b},{4:21,5:o,7:40,8:l,9:4,14:r,16:n,18:i,19:a,23:18,24:19,25:20,26:23,32:25,40:u,41:h,42:d,43:f,44:p,45:m,53:_,71:y,72:b},{4:21,5:o,7:41,8:l,9:4,14:r,16:n,18:i,19:a,23:18,24:19,25:20,26:23,32:25,40:u,41:h,42:d,43:f,44:p,45:m,53:_,71:y,72:b},{4:21,5:o,7:42,8:l,9:4,14:r,16:n,18:i,19:a,23:18,24:19,25:20,26:23,32:25,40:u,41:h,42:d,43:f,44:p,45:m,53:_,71:y,72:b},{27:43,71:[1,44],72:[1,45]},{54:46,71:[1,47],72:[1,48]},{60:[1,49],62:[1,50]},t(k,[2,26]),t(k,[2,27]),t(k,[2,28]),t(k,[2,29]),t(k,[2,30]),t(k,[2,31]),t(T,[2,55]),t(T,[2,56]),t(s,[2,4]),{13:51,21:[1,52]},t(s,[2,12]),{1:[2,3]},{8:[2,14]},{8:[2,15]},{8:[2,16]},{8:[2,17]},{8:[2,18]},{28:[1,53]},{28:[2,53]},{28:[2,54]},{28:[1,54]},{28:[2,59]},{28:[2,60]},{61:55,64:C,65:M,66:S,67:R,68:A,69:L,70:v},{61:63,64:C,65:M,66:S,67:R,68:A,69:L,70:v},{11:64,22:x},{22:[2,11]},{5:[1,65]},{5:[1,66]},{62:[1,67]},t(B,[2,46]),t(B,[2,47]),t(B,[2,48]),t(B,[2,49]),t(B,[2,50]),t(B,[2,51]),t(B,[2,52]),{63:[1,68]},t(s,[2,5]),{5:w,29:69,30:D,33:N,35:z,37:X,39:ct},{5:J,39:Y,55:76,56:$,58:lt},{32:81,71:y,72:b},{32:82,71:y,72:b},t(ut,[2,19]),{31:[1,83]},{31:[1,84]},{31:[1,85]},{31:[1,86]},{5:w,29:87,30:D,33:N,35:z,37:X,39:ct},t(ut,[2,25]),t(ut,[2,39]),{31:[1,88]},{31:[1,89]},{5:J,39:Y,55:90,56:$,58:lt},t(ut,[2,43]),t(ut,[2,44]),t(ut,[2,45]),{32:91,71:y,72:b},{34:92,71:[1,93],72:[1,94]},{36:95,46:[1,96],47:[1,97],48:[1,98]},{38:99,49:[1,100],50:[1,101],51:[1,102],52:[1,103]},t(ut,[2,24]),{57:104,71:[1,105],72:[1,106]},{59:107,71:[1,108],72:[1,109]},t(ut,[2,42]),{5:[1,110]},{5:[1,111]},{5:[2,57]},{5:[2,58]},{5:[1,112]},{5:[2,32]},{5:[2,33]},{5:[2,34]},{5:[1,113]},{5:[2,35]},{5:[2,36]},{5:[2,37]},{5:[2,38]},{5:[1,114]},{5:[2,61]},{5:[2,62]},{5:[1,115]},{5:[2,63]},{5:[2,64]},{5:w,29:116,30:D,33:N,35:z,37:X,39:ct},{5:w,29:117,30:D,33:N,35:z,37:X,39:ct},{5:w,29:118,30:D,33:N,35:z,37:X,39:ct},{5:w,29:119,30:D,33:N,35:z,37:X,39:ct},{5:J,39:Y,55:120,56:$,58:lt},{5:J,39:Y,55:121,56:$,58:lt},t(ut,[2,20]),t(ut,[2,21]),t(ut,[2,22]),t(ut,[2,23]),t(ut,[2,40]),t(ut,[2,41])],defaultActions:{8:[2,9],10:[2,2],16:[2,1],37:[2,3],38:[2,14],39:[2,15],40:[2,16],41:[2,17],42:[2,18],44:[2,53],45:[2,54],47:[2,59],48:[2,60],52:[2,11],93:[2,57],94:[2,58],96:[2,32],97:[2,33],98:[2,34],100:[2,35],101:[2,36],102:[2,37],103:[2,38],105:[2,61],106:[2,62],108:[2,63],109:[2,64]},parseError:function(Z,V){if(V.recoverable)this.trace(Z);else{var Q=new Error(Z);throw Q.hash=V,Q}},parse:function(Z){var V=this,Q=[0],q=[],U=[null],F=[],j=this.table,P="",et=0,at=0,It=2,Lt=1,Rt=F.slice.call(arguments,1),Ct=Object.create(this.lexer),pt={yy:{}};for(var mt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,mt)&&(pt.yy[mt]=this.yy[mt]);Ct.setInput(Z,pt.yy),pt.yy.lexer=Ct,pt.yy.parser=this,typeof Ct.yylloc>"u"&&(Ct.yylloc={});var vt=Ct.yylloc;F.push(vt);var Tt=Ct.options&&Ct.options.ranges;typeof pt.yy.parseError=="function"?this.parseError=pt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ft(){var bt;return bt=q.pop()||Ct.lex()||Lt,typeof bt!="number"&&(bt instanceof Array&&(q=bt,bt=q.pop()),bt=V.symbols_[bt]||bt),bt}for(var le,Dt,Gt,$t,Qt={},we,jt,Ft,zt;;){if(Dt=Q[Q.length-1],this.defaultActions[Dt]?Gt=this.defaultActions[Dt]:((le===null||typeof le>"u")&&(le=ft()),Gt=j[Dt]&&j[Dt][le]),typeof Gt>"u"||!Gt.length||!Gt[0]){var wt="";zt=[];for(we in j[Dt])this.terminals_[we]&&we>It&&zt.push("'"+this.terminals_[we]+"'");Ct.showPosition?wt="Parse error on line "+(et+1)+`:
+`+Ct.showPosition()+`
+Expecting `+zt.join(", ")+", got '"+(this.terminals_[le]||le)+"'":wt="Parse error on line "+(et+1)+": Unexpected "+(le==Lt?"end of input":"'"+(this.terminals_[le]||le)+"'"),this.parseError(wt,{text:Ct.match,token:this.terminals_[le]||le,line:Ct.yylineno,loc:vt,expected:zt})}if(Gt[0]instanceof Array&&Gt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Dt+", token: "+le);switch(Gt[0]){case 1:Q.push(le),U.push(Ct.yytext),F.push(Ct.yylloc),Q.push(Gt[1]),le=null,at=Ct.yyleng,P=Ct.yytext,et=Ct.yylineno,vt=Ct.yylloc;break;case 2:if(jt=this.productions_[Gt[1]][1],Qt.$=U[U.length-jt],Qt._$={first_line:F[F.length-(jt||1)].first_line,last_line:F[F.length-1].last_line,first_column:F[F.length-(jt||1)].first_column,last_column:F[F.length-1].last_column},Tt&&(Qt._$.range=[F[F.length-(jt||1)].range[0],F[F.length-1].range[1]]),$t=this.performAction.apply(Qt,[P,at,et,pt.yy,Gt[1],U,F].concat(Rt)),typeof $t<"u")return $t;jt&&(Q=Q.slice(0,-1*jt*2),U=U.slice(0,-1*jt),F=F.slice(0,-1*jt)),Q.push(this.productions_[Gt[1]][0]),U.push(Qt.$),F.push(Qt._$),Ft=j[Q[Q.length-2]][Q[Q.length-1]],Q.push(Ft);break;case 3:return!0}}return!0}},tt=function(){var it={EOF:1,parseError:function(V,Q){if(this.yy.parser)this.yy.parser.parseError(V,Q);else throw new Error(V)},setInput:function(Z,V){return this.yy=V||this.yy||{},this._input=Z,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var Z=this._input[0];this.yytext+=Z,this.yyleng++,this.offset++,this.match+=Z,this.matched+=Z;var V=Z.match(/(?:\r\n?|\n).*/g);return V?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Z},unput:function(Z){var V=Z.length,Q=Z.split(/(?:\r\n?|\n)/g);this._input=Z+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-V),this.offset-=V;var q=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Q.length-1&&(this.yylineno-=Q.length-1);var U=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Q?(Q.length===q.length?this.yylloc.first_column:0)+q[q.length-Q.length].length-Q[0].length:this.yylloc.first_column-V},this.options.ranges&&(this.yylloc.range=[U[0],U[0]+this.yyleng-V]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
+`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(Z){this.unput(this.match.slice(Z))},pastInput:function(){var Z=this.matched.substr(0,this.matched.length-this.match.length);return(Z.length>20?"...":"")+Z.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var Z=this.match;return Z.length<20&&(Z+=this._input.substr(0,20-Z.length)),(Z.substr(0,20)+(Z.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var Z=this.pastInput(),V=new Array(Z.length+1).join("-");return Z+this.upcomingInput()+`
+`+V+"^"},test_match:function(Z,V){var Q,q,U;if(this.options.backtrack_lexer&&(U={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(U.yylloc.range=this.yylloc.range.slice(0))),q=Z[0].match(/(?:\r\n?|\n).*/g),q&&(this.yylineno+=q.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:q?q[q.length-1].length-q[q.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Z[0].length},this.yytext+=Z[0],this.match+=Z[0],this.matches=Z,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Z[0].length),this.matched+=Z[0],Q=this.performAction.call(this,this.yy,this,V,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Q)return Q;if(this._backtrack){for(var F in U)this[F]=U[F];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Z,V,Q,q;this._more||(this.yytext="",this.match="");for(var U=this._currentRules(),F=0;F<U.length;F++)if(Q=this._input.match(this.rules[U[F]]),Q&&(!V||Q[0].length>V[0].length)){if(V=Q,q=F,this.options.backtrack_lexer){if(Z=this.test_match(Q,U[F]),Z!==!1)return Z;if(this._backtrack){V=!1;continue}else return!1}else if(!this.options.flex)break}return V?(Z=this.test_match(V,U[q]),Z!==!1?Z:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
+`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var V=this.next();return V||this.lex()},begin:function(V){this.conditionStack.push(V)},popState:function(){var V=this.conditionStack.length-1;return V>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(V){return V=this.conditionStack.length-1-Math.abs(V||0),V>=0?this.conditionStack[V]:"INITIAL"},pushState:function(V){this.begin(V)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(V,Q,q,U){switch(q){case 0:return this.begin("open_directive"),19;case 1:return this.begin("type_directive"),20;case 2:return this.popState(),this.begin("arg_directive"),12;case 3:return this.popState(),this.popState(),22;case 4:return 21;case 5:return"title";case 6:return this.begin("acc_title"),14;case 7:return this.popState(),"acc_title_value";case 8:return this.begin("acc_descr"),16;case 9:return this.popState(),"acc_descr_value";case 10:this.begin("acc_descr_multiline");break;case 11:this.popState();break;case 12:return"acc_descr_multiline_value";case 13:return 5;case 14:break;case 15:break;case 16:break;case 17:return 8;case 18:return 6;case 19:return 28;case 20:return 39;case 21:return 31;case 22:return 30;case 23:return 33;case 24:return 35;case 25:return 37;case 26:return 40;case 27:return 41;case 28:return 42;case 29:return 43;case 30:return 44;case 31:return 45;case 32:return 46;case 33:return 47;case 34:return 48;case 35:return 49;case 36:return 50;case 37:return 51;case 38:return 52;case 39:return 53;case 40:return 64;case 41:return 65;case 42:return 66;case 43:return 67;case 44:return 68;case 45:return 69;case 46:return 70;case 47:return 56;case 48:return 58;case 49:return 60;case 50:return 63;case 51:return 62;case 52:this.begin("string");break;case 53:this.popState();break;case 54:return"qString";case 55:return Q.yytext=Q.yytext.trim(),71}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:(\r?\n)+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:$)/i,/^(?:requirementDiagram\b)/i,/^(?:\{)/i,/^(?:\})/i,/^(?::)/i,/^(?:id\b)/i,/^(?:text\b)/i,/^(?:risk\b)/i,/^(?:verifyMethod\b)/i,/^(?:requirement\b)/i,/^(?:functionalRequirement\b)/i,/^(?:interfaceRequirement\b)/i,/^(?:performanceRequirement\b)/i,/^(?:physicalRequirement\b)/i,/^(?:designConstraint\b)/i,/^(?:low\b)/i,/^(?:medium\b)/i,/^(?:high\b)/i,/^(?:analysis\b)/i,/^(?:demonstration\b)/i,/^(?:inspection\b)/i,/^(?:test\b)/i,/^(?:element\b)/i,/^(?:contains\b)/i,/^(?:copies\b)/i,/^(?:derives\b)/i,/^(?:satisfies\b)/i,/^(?:verifies\b)/i,/^(?:refines\b)/i,/^(?:traces\b)/i,/^(?:type\b)/i,/^(?:docref\b)/i,/^(?:<-)/i,/^(?:->)/i,/^(?:-)/i,/^(?:["])/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[\w][^\r\n\{\<\>\-\=]*)/i],conditions:{acc_descr_multiline:{rules:[11,12],inclusive:!1},acc_descr:{rules:[9],inclusive:!1},acc_title:{rules:[7],inclusive:!1},close_directive:{rules:[],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},open_directive:{rules:[1],inclusive:!1},unqString:{rules:[],inclusive:!1},token:{rules:[],inclusive:!1},string:{rules:[53,54],inclusive:!1},INITIAL:{rules:[0,5,6,8,10,13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28,29,30,31,32,33,34,35,36,37,38,39,40,41,42,43,44,45,46,47,48,49,50,51,52,55],inclusive:!0}}};return it}();W.lexer=tt;function K(){this.yy={}}return K.prototype=W,W.Parser=K,new K}();Y4.parser=Y4;const oit=t=>t.match(/^\s*requirement(Diagram)?/)!==null;let U4=[],kn={},lu={},rs={},cu={};const lit={RequirementType:{REQUIREMENT:"Requirement",FUNCTIONAL_REQUIREMENT:"Functional Requirement",INTERFACE_REQUIREMENT:"Interface Requirement",PERFORMANCE_REQUIREMENT:"Performance Requirement",PHYSICAL_REQUIREMENT:"Physical Requirement",DESIGN_CONSTRAINT:"Design Constraint"},RiskLevel:{LOW_RISK:"Low",MED_RISK:"Medium",HIGH_RISK:"High"},VerifyType:{VERIFY_ANALYSIS:"Analysis",VERIFY_DEMONSTRATION:"Demonstration",VERIFY_INSPECTION:"Inspection",VERIFY_TEST:"Test"},Relationships:{CONTAINS:"contains",COPIES:"copies",DERIVES:"derives",SATISFIES:"satisfies",VERIFIES:"verifies",REFINES:"refines",TRACES:"traces"},parseDirective:function(t,e,r){He.parseDirective(this,t,e,r)},getConfig:()=>nt().req,addRequirement:(t,e)=>(typeof lu[t]>"u"&&(lu[t]={name:t,type:e,id:kn.id,text:kn.text,risk:kn.risk,verifyMethod:kn.verifyMethod}),kn={},lu[t]),getRequirements:()=>lu,setNewReqId:t=>{typeof kn<"u"&&(kn.id=t)},setNewReqText:t=>{typeof kn<"u"&&(kn.text=t)},setNewReqRisk:t=>{typeof kn<"u"&&(kn.risk=t)},setNewReqVerifyMethod:t=>{typeof kn<"u"&&(kn.verifyMethod=t)},setAccTitle:Yn,getAccTitle:ui,setAccDescription:hi,getAccDescription:fi,addElement:t=>(typeof cu[t]>"u"&&(cu[t]={name:t,type:rs.type,docRef:rs.docRef},H.info("Added new requirement: ",t)),rs={},cu[t]),getElements:()=>cu,setNewElementType:t=>{typeof rs<"u"&&(rs.type=t)},setNewElementDocRef:t=>{typeof rs<"u"&&(rs.docRef=t)},addRelationship:(t,e,r)=>{U4.push({type:t,src:e,dst:r})},getRelationships:()=>U4,clear:()=>{U4=[],kn={},lu={},rs={},cu={},ci()}},W4={CONTAINS:"contains",ARROW:"arrow"},aL={ReqMarkers:W4,insertLineEndings:(t,e)=>{let r=t.append("defs").append("marker").attr("id",W4.CONTAINS+"_line_ending").attr("refX",0).attr("refY",e.line_height/2).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("g");r.append("circle").attr("cx",e.line_height/2).attr("cy",e.line_height/2).attr("r",e.line_height/2).attr("fill","none"),r.append("line").attr("x1",0).attr("x2",e.line_height).attr("y1",e.line_height/2).attr("y2",e.line_height/2).attr("stroke-width",1),r.append("line").attr("y1",0).attr("y2",e.line_height).attr("x1",e.line_height/2).attr("x2",e.line_height/2).attr("stroke-width",1),t.append("defs").append("marker").attr("id",W4.ARROW+"_line_ending").attr("refX",e.line_height).attr("refY",.5*e.line_height).attr("markerWidth",e.line_height).attr("markerHeight",e.line_height).attr("orient","auto").append("path").attr("d",`M0,0
+ L${e.line_height},${e.line_height/2}
+ M${e.line_height},${e.line_height/2}
+ L0,${e.line_height}`).attr("stroke-width",1)}};let sr={},sL=0;const oL=(t,e)=>t.insert("rect","#"+e).attr("class","req reqBox").attr("x",0).attr("y",0).attr("width",sr.rect_min_width+"px").attr("height",sr.rect_min_height+"px"),lL=(t,e,r)=>{let n=sr.rect_min_width/2,i=t.append("text").attr("class","req reqLabel reqTitle").attr("id",e).attr("x",n).attr("y",sr.rect_padding).attr("dominant-baseline","hanging"),a=0;r.forEach(u=>{a==0?i.append("tspan").attr("text-anchor","middle").attr("x",sr.rect_min_width/2).attr("dy",0).text(u):i.append("tspan").attr("text-anchor","middle").attr("x",sr.rect_min_width/2).attr("dy",sr.line_height*.75).text(u),a++});let s=1.5*sr.rect_padding,o=a*sr.line_height*.75,l=s+o;return t.append("line").attr("class","req-title-line").attr("x1","0").attr("x2",sr.rect_min_width).attr("y1",l).attr("y2",l),{titleNode:i,y:l}},cL=(t,e,r,n)=>{let i=t.append("text").attr("class","req reqLabel").attr("id",e).attr("x",sr.rect_padding).attr("y",n).attr("dominant-baseline","hanging"),a=0;const s=30;let o=[];return r.forEach(l=>{let u=l.length;for(;u>s&&a<3;){let h=l.substring(0,s);l=l.substring(s,l.length),u=l.length,o[o.length]=h,a++}if(a==3){let h=o[o.length-1];o[o.length-1]=h.substring(0,h.length-4)+"..."}else o[o.length]=l;a=0}),o.forEach(l=>{i.append("tspan").attr("x",sr.rect_padding).attr("dy",sr.line_height).text(l)}),i},cit=(t,e,r,n)=>{const i=e.node().getTotalLength(),a=e.node().getPointAtLength(i*.5),s="rel"+sL;sL++;const l=t.append("text").attr("class","req relationshipLabel").attr("id",s).attr("x",a.x).attr("y",a.y).attr("text-anchor","middle").attr("dominant-baseline","middle").text(n).node().getBBox();t.insert("rect","#"+s).attr("class","req reqLabelBox").attr("x",a.x-l.width/2).attr("y",a.y-l.height/2).attr("width",l.width).attr("height",l.height).attr("fill","white").attr("fill-opacity","85%")},uit=function(t,e,r,n,i){const a=r.edge(cl(e.src),cl(e.dst)),s=Ua().x(function(l){return l.x}).y(function(l){return l.y}),o=t.insert("path","#"+n).attr("class","er relationshipLine").attr("d",s(a.points)).attr("fill","none");e.type==i.db.Relationships.CONTAINS?o.attr("marker-start","url("+pe.getUrl(sr.arrowMarkerAbsolute)+"#"+e.type+"_line_ending)"):(o.attr("stroke-dasharray","10,7"),o.attr("marker-end","url("+pe.getUrl(sr.arrowMarkerAbsolute)+"#"+aL.ReqMarkers.ARROW+"_line_ending)")),cit(t,o,sr,`<<${e.type}>>`)},hit=(t,e,r)=>{Object.keys(t).forEach(n=>{let i=t[n];n=cl(n),H.info("Added new requirement: ",n);const a=r.append("g").attr("id",n),s="req-"+n,o=oL(a,s);let l=lL(a,n+"_title",[`<<${i.type}>>`,`${i.name}`]);cL(a,n+"_body",[`Id: ${i.id}`,`Text: ${i.text}`,`Risk: ${i.risk}`,`Verification: ${i.verifyMethod}`],l.y);const u=o.node().getBBox();e.setNode(n,{width:u.width,height:u.height,shape:"rect",id:n})})},fit=(t,e,r)=>{Object.keys(t).forEach(n=>{let i=t[n];const a=cl(n),s=r.append("g").attr("id",a),o="element-"+a,l=oL(s,o);let u=lL(s,o+"_title",["<<Element>>",`${n}`]);cL(s,o+"_body",[`Type: ${i.type||"Not Specified"}`,`Doc Ref: ${i.docRef||"None"}`],u.y);const h=l.node().getBBox();e.setNode(a,{width:h.width,height:h.height,shape:"rect",id:a})})},dit=(t,e)=>(t.forEach(function(r){let n=cl(r.src),i=cl(r.dst);e.setEdge(n,i,{relationship:r})}),t),pit=function(t,e){e.nodes().forEach(function(r){typeof r<"u"&&typeof e.node(r)<"u"&&(t.select("#"+r),t.select("#"+r).attr("transform","translate("+(e.node(r).x-e.node(r).width/2)+","+(e.node(r).y-e.node(r).height/2)+" )"))})},cl=t=>t.replace(/\s/g,"").replace(/\./g,"_"),git={draw:(t,e,r,n)=>{sr=nt().requirement,n.db.clear(),n.parser.parse(t);const i=sr.securityLevel;let a;i==="sandbox"&&(a=St("#i"+e));const o=St(i==="sandbox"?a.nodes()[0].contentDocument.body:"body").select(`[id='${e}']`);aL.insertLineEndings(o,sr);const l=new cr.Graph({multigraph:!1,compound:!1,directed:!0}).setGraph({rankdir:sr.layoutDirection,marginx:20,marginy:20,nodesep:100,edgesep:100,ranksep:100}).setDefaultEdgeLabel(function(){return{}});let u=n.db.getRequirements(),h=n.db.getElements(),d=n.db.getRelationships();hit(u,l,o),fit(h,l,o),dit(d,l),Kc.layout(l),pit(o,l),d.forEach(function(y){uit(o,y,l,e,n)});const f=sr.rect_padding,p=o.node().getBBox(),m=p.width+f*2,_=p.height+f*2;li(o,_,m,sr.useMaxWidth),o.attr("viewBox",`${p.x-f} ${p.y-f} ${m} ${_}`),bn(n.db,o,e)}};var H4=function(){var t=function(it,Z,V,Q){for(V=V||{},Q=it.length;Q--;V[it[Q]]=Z);return V},e=[1,2],r=[1,3],n=[1,5],i=[1,7],a=[2,5],s=[1,15],o=[1,17],l=[1,18],u=[1,19],h=[1,21],d=[1,22],f=[1,23],p=[1,29],m=[1,30],_=[1,31],y=[1,32],b=[1,33],x=[1,34],k=[1,35],T=[1,36],C=[1,37],M=[1,38],S=[1,39],R=[1,40],A=[1,43],L=[1,44],v=[1,45],B=[1,46],w=[1,47],D=[1,48],N=[1,51],z=[1,4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,50,51,52,53,58,59,60,61,69,79],X=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,53,58,59,60,61,69,79],ct=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,52,53,58,59,60,61,69,79],J=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,51,53,58,59,60,61,69,79],Y=[4,5,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,50,53,58,59,60,61,69,79],$=[67,68,69],lt=[1,121],ut=[1,4,5,7,16,20,22,25,26,32,33,34,36,38,39,40,41,42,43,45,47,49,50,51,52,53,58,59,60,61,69,79],W={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NEWLINE:5,directive:6,SD:7,document:8,line:9,statement:10,openDirective:11,typeDirective:12,closeDirective:13,":":14,argDirective:15,participant:16,actor:17,AS:18,restOfLine:19,participant_actor:20,signal:21,autonumber:22,NUM:23,off:24,activate:25,deactivate:26,note_statement:27,links_statement:28,link_statement:29,properties_statement:30,details_statement:31,title:32,legacy_title:33,acc_title:34,acc_title_value:35,acc_descr:36,acc_descr_value:37,acc_descr_multiline_value:38,loop:39,end:40,rect:41,opt:42,alt:43,else_sections:44,par:45,par_sections:46,critical:47,option_sections:48,break:49,option:50,and:51,else:52,note:53,placement:54,text2:55,over:56,actor_pair:57,links:58,link:59,properties:60,details:61,spaceList:62,",":63,left_of:64,right_of:65,signaltype:66,"+":67,"-":68,ACTOR:69,SOLID_OPEN_ARROW:70,DOTTED_OPEN_ARROW:71,SOLID_ARROW:72,DOTTED_ARROW:73,SOLID_CROSS:74,DOTTED_CROSS:75,SOLID_POINT:76,DOTTED_POINT:77,TXT:78,open_directive:79,type_directive:80,arg_directive:81,close_directive:82,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NEWLINE",7:"SD",14:":",16:"participant",18:"AS",19:"restOfLine",20:"participant_actor",22:"autonumber",23:"NUM",24:"off",25:"activate",26:"deactivate",32:"title",33:"legacy_title",34:"acc_title",35:"acc_title_value",36:"acc_descr",37:"acc_descr_value",38:"acc_descr_multiline_value",39:"loop",40:"end",41:"rect",42:"opt",43:"alt",45:"par",47:"critical",49:"break",50:"option",51:"and",52:"else",53:"note",56:"over",58:"links",59:"link",60:"properties",61:"details",63:",",64:"left_of",65:"right_of",67:"+",68:"-",69:"ACTOR",70:"SOLID_OPEN_ARROW",71:"DOTTED_OPEN_ARROW",72:"SOLID_ARROW",73:"DOTTED_ARROW",74:"SOLID_CROSS",75:"DOTTED_CROSS",76:"SOLID_POINT",77:"DOTTED_POINT",78:"TXT",79:"open_directive",80:"type_directive",81:"arg_directive",82:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[6,4],[6,6],[10,5],[10,3],[10,5],[10,3],[10,2],[10,4],[10,3],[10,3],[10,2],[10,3],[10,3],[10,2],[10,2],[10,2],[10,2],[10,2],[10,1],[10,1],[10,2],[10,2],[10,1],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,4],[10,1],[48,1],[48,4],[46,1],[46,4],[44,1],[44,4],[27,4],[27,4],[28,3],[29,3],[30,3],[31,3],[62,2],[62,1],[57,3],[57,1],[54,1],[54,1],[21,5],[21,5],[21,4],[17,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[66,1],[55,1],[11,1],[12,1],[15,1],[13,1]],performAction:function(Z,V,Q,q,U,F,j){var P=F.length-1;switch(U){case 4:return q.apply(F[P]),F[P];case 5:this.$=[];break;case 6:F[P-1].push(F[P]),this.$=F[P-1];break;case 7:case 8:this.$=F[P];break;case 9:this.$=[];break;case 12:F[P-3].type="addParticipant",F[P-3].description=q.parseMessage(F[P-1]),this.$=F[P-3];break;case 13:F[P-1].type="addParticipant",this.$=F[P-1];break;case 14:F[P-3].type="addActor",F[P-3].description=q.parseMessage(F[P-1]),this.$=F[P-3];break;case 15:F[P-1].type="addActor",this.$=F[P-1];break;case 17:this.$={type:"sequenceIndex",sequenceIndex:Number(F[P-2]),sequenceIndexStep:Number(F[P-1]),sequenceVisible:!0,signalType:q.LINETYPE.AUTONUMBER};break;case 18:this.$={type:"sequenceIndex",sequenceIndex:Number(F[P-1]),sequenceIndexStep:1,sequenceVisible:!0,signalType:q.LINETYPE.AUTONUMBER};break;case 19:this.$={type:"sequenceIndex",sequenceVisible:!1,signalType:q.LINETYPE.AUTONUMBER};break;case 20:this.$={type:"sequenceIndex",sequenceVisible:!0,signalType:q.LINETYPE.AUTONUMBER};break;case 21:this.$={type:"activeStart",signalType:q.LINETYPE.ACTIVE_START,actor:F[P-1]};break;case 22:this.$={type:"activeEnd",signalType:q.LINETYPE.ACTIVE_END,actor:F[P-1]};break;case 28:q.setDiagramTitle(F[P].substring(6)),this.$=F[P].substring(6);break;case 29:q.setDiagramTitle(F[P].substring(7)),this.$=F[P].substring(7);break;case 30:this.$=F[P].trim(),q.setAccTitle(this.$);break;case 31:case 32:this.$=F[P].trim(),q.setAccDescription(this.$);break;case 33:F[P-1].unshift({type:"loopStart",loopText:q.parseMessage(F[P-2]),signalType:q.LINETYPE.LOOP_START}),F[P-1].push({type:"loopEnd",loopText:F[P-2],signalType:q.LINETYPE.LOOP_END}),this.$=F[P-1];break;case 34:F[P-1].unshift({type:"rectStart",color:q.parseMessage(F[P-2]),signalType:q.LINETYPE.RECT_START}),F[P-1].push({type:"rectEnd",color:q.parseMessage(F[P-2]),signalType:q.LINETYPE.RECT_END}),this.$=F[P-1];break;case 35:F[P-1].unshift({type:"optStart",optText:q.parseMessage(F[P-2]),signalType:q.LINETYPE.OPT_START}),F[P-1].push({type:"optEnd",optText:q.parseMessage(F[P-2]),signalType:q.LINETYPE.OPT_END}),this.$=F[P-1];break;case 36:F[P-1].unshift({type:"altStart",altText:q.parseMessage(F[P-2]),signalType:q.LINETYPE.ALT_START}),F[P-1].push({type:"altEnd",signalType:q.LINETYPE.ALT_END}),this.$=F[P-1];break;case 37:F[P-1].unshift({type:"parStart",parText:q.parseMessage(F[P-2]),signalType:q.LINETYPE.PAR_START}),F[P-1].push({type:"parEnd",signalType:q.LINETYPE.PAR_END}),this.$=F[P-1];break;case 38:F[P-1].unshift({type:"criticalStart",criticalText:q.parseMessage(F[P-2]),signalType:q.LINETYPE.CRITICAL_START}),F[P-1].push({type:"criticalEnd",signalType:q.LINETYPE.CRITICAL_END}),this.$=F[P-1];break;case 39:F[P-1].unshift({type:"breakStart",breakText:q.parseMessage(F[P-2]),signalType:q.LINETYPE.BREAK_START}),F[P-1].push({type:"breakEnd",optText:q.parseMessage(F[P-2]),signalType:q.LINETYPE.BREAK_END}),this.$=F[P-1];break;case 42:this.$=F[P-3].concat([{type:"option",optionText:q.parseMessage(F[P-1]),signalType:q.LINETYPE.CRITICAL_OPTION},F[P]]);break;case 44:this.$=F[P-3].concat([{type:"and",parText:q.parseMessage(F[P-1]),signalType:q.LINETYPE.PAR_AND},F[P]]);break;case 46:this.$=F[P-3].concat([{type:"else",altText:q.parseMessage(F[P-1]),signalType:q.LINETYPE.ALT_ELSE},F[P]]);break;case 47:this.$=[F[P-1],{type:"addNote",placement:F[P-2],actor:F[P-1].actor,text:F[P]}];break;case 48:F[P-2]=[].concat(F[P-1],F[P-1]).slice(0,2),F[P-2][0]=F[P-2][0].actor,F[P-2][1]=F[P-2][1].actor,this.$=[F[P-1],{type:"addNote",placement:q.PLACEMENT.OVER,actor:F[P-2].slice(0,2),text:F[P]}];break;case 49:this.$=[F[P-1],{type:"addLinks",actor:F[P-1].actor,text:F[P]}];break;case 50:this.$=[F[P-1],{type:"addALink",actor:F[P-1].actor,text:F[P]}];break;case 51:this.$=[F[P-1],{type:"addProperties",actor:F[P-1].actor,text:F[P]}];break;case 52:this.$=[F[P-1],{type:"addDetails",actor:F[P-1].actor,text:F[P]}];break;case 55:this.$=[F[P-2],F[P]];break;case 56:this.$=F[P];break;case 57:this.$=q.PLACEMENT.LEFTOF;break;case 58:this.$=q.PLACEMENT.RIGHTOF;break;case 59:this.$=[F[P-4],F[P-1],{type:"addMessage",from:F[P-4].actor,to:F[P-1].actor,signalType:F[P-3],msg:F[P]},{type:"activeStart",signalType:q.LINETYPE.ACTIVE_START,actor:F[P-1]}];break;case 60:this.$=[F[P-4],F[P-1],{type:"addMessage",from:F[P-4].actor,to:F[P-1].actor,signalType:F[P-3],msg:F[P]},{type:"activeEnd",signalType:q.LINETYPE.ACTIVE_END,actor:F[P-4]}];break;case 61:this.$=[F[P-3],F[P-1],{type:"addMessage",from:F[P-3].actor,to:F[P-1].actor,signalType:F[P-2],msg:F[P]}];break;case 62:this.$={type:"addParticipant",actor:F[P]};break;case 63:this.$=q.LINETYPE.SOLID_OPEN;break;case 64:this.$=q.LINETYPE.DOTTED_OPEN;break;case 65:this.$=q.LINETYPE.SOLID;break;case 66:this.$=q.LINETYPE.DOTTED;break;case 67:this.$=q.LINETYPE.SOLID_CROSS;break;case 68:this.$=q.LINETYPE.DOTTED_CROSS;break;case 69:this.$=q.LINETYPE.SOLID_POINT;break;case 70:this.$=q.LINETYPE.DOTTED_POINT;break;case 71:this.$=q.parseMessage(F[P].trim().substring(1));break;case 72:q.parseDirective("%%{","open_directive");break;case 73:q.parseDirective(F[P],"type_directive");break;case 74:F[P]=F[P].trim().replace(/'/g,'"'),q.parseDirective(F[P],"arg_directive");break;case 75:q.parseDirective("}%%","close_directive","sequence");break}},table:[{3:1,4:e,5:r,6:4,7:n,11:6,79:i},{1:[3]},{3:8,4:e,5:r,6:4,7:n,11:6,79:i},{3:9,4:e,5:r,6:4,7:n,11:6,79:i},{3:10,4:e,5:r,6:4,7:n,11:6,79:i},t([1,4,5,16,20,22,25,26,32,33,34,36,38,39,41,42,43,45,47,49,53,58,59,60,61,69,79],a,{8:11}),{12:12,80:[1,13]},{80:[2,72]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:s,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:h,25:d,26:f,27:24,28:25,29:26,30:27,31:28,32:p,33:m,34:_,36:y,38:b,39:x,41:k,42:T,43:C,45:M,47:S,49:R,53:A,58:L,59:v,60:B,61:w,69:D,79:i},{13:49,14:[1,50],82:N},t([14,82],[2,73]),t(z,[2,6]),{6:41,10:52,11:6,16:l,17:42,20:u,21:20,22:h,25:d,26:f,27:24,28:25,29:26,30:27,31:28,32:p,33:m,34:_,36:y,38:b,39:x,41:k,42:T,43:C,45:M,47:S,49:R,53:A,58:L,59:v,60:B,61:w,69:D,79:i},t(z,[2,8]),t(z,[2,9]),{17:53,69:D},{17:54,69:D},{5:[1,55]},{5:[1,58],23:[1,56],24:[1,57]},{17:59,69:D},{17:60,69:D},{5:[1,61]},{5:[1,62]},{5:[1,63]},{5:[1,64]},{5:[1,65]},t(z,[2,28]),t(z,[2,29]),{35:[1,66]},{37:[1,67]},t(z,[2,32]),{19:[1,68]},{19:[1,69]},{19:[1,70]},{19:[1,71]},{19:[1,72]},{19:[1,73]},{19:[1,74]},t(z,[2,40]),{66:75,70:[1,76],71:[1,77],72:[1,78],73:[1,79],74:[1,80],75:[1,81],76:[1,82],77:[1,83]},{54:84,56:[1,85],64:[1,86],65:[1,87]},{17:88,69:D},{17:89,69:D},{17:90,69:D},{17:91,69:D},t([5,18,63,70,71,72,73,74,75,76,77,78],[2,62]),{5:[1,92]},{15:93,81:[1,94]},{5:[2,75]},t(z,[2,7]),{5:[1,96],18:[1,95]},{5:[1,98],18:[1,97]},t(z,[2,16]),{5:[1,100],23:[1,99]},{5:[1,101]},t(z,[2,20]),{5:[1,102]},{5:[1,103]},t(z,[2,23]),t(z,[2,24]),t(z,[2,25]),t(z,[2,26]),t(z,[2,27]),t(z,[2,30]),t(z,[2,31]),t(X,a,{8:104}),t(X,a,{8:105}),t(X,a,{8:106}),t(ct,a,{44:107,8:108}),t(J,a,{46:109,8:110}),t(Y,a,{48:111,8:112}),t(X,a,{8:113}),{17:116,67:[1,114],68:[1,115],69:D},t($,[2,63]),t($,[2,64]),t($,[2,65]),t($,[2,66]),t($,[2,67]),t($,[2,68]),t($,[2,69]),t($,[2,70]),{17:117,69:D},{17:119,57:118,69:D},{69:[2,57]},{69:[2,58]},{55:120,78:lt},{55:122,78:lt},{55:123,78:lt},{55:124,78:lt},t(ut,[2,10]),{13:125,82:N},{82:[2,74]},{19:[1,126]},t(z,[2,13]),{19:[1,127]},t(z,[2,15]),{5:[1,128]},t(z,[2,18]),t(z,[2,19]),t(z,[2,21]),t(z,[2,22]),{4:s,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:h,25:d,26:f,27:24,28:25,29:26,30:27,31:28,32:p,33:m,34:_,36:y,38:b,39:x,40:[1,129],41:k,42:T,43:C,45:M,47:S,49:R,53:A,58:L,59:v,60:B,61:w,69:D,79:i},{4:s,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:h,25:d,26:f,27:24,28:25,29:26,30:27,31:28,32:p,33:m,34:_,36:y,38:b,39:x,40:[1,130],41:k,42:T,43:C,45:M,47:S,49:R,53:A,58:L,59:v,60:B,61:w,69:D,79:i},{4:s,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:h,25:d,26:f,27:24,28:25,29:26,30:27,31:28,32:p,33:m,34:_,36:y,38:b,39:x,40:[1,131],41:k,42:T,43:C,45:M,47:S,49:R,53:A,58:L,59:v,60:B,61:w,69:D,79:i},{40:[1,132]},{4:s,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:h,25:d,26:f,27:24,28:25,29:26,30:27,31:28,32:p,33:m,34:_,36:y,38:b,39:x,40:[2,45],41:k,42:T,43:C,45:M,47:S,49:R,52:[1,133],53:A,58:L,59:v,60:B,61:w,69:D,79:i},{40:[1,134]},{4:s,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:h,25:d,26:f,27:24,28:25,29:26,30:27,31:28,32:p,33:m,34:_,36:y,38:b,39:x,40:[2,43],41:k,42:T,43:C,45:M,47:S,49:R,51:[1,135],53:A,58:L,59:v,60:B,61:w,69:D,79:i},{40:[1,136]},{4:s,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:h,25:d,26:f,27:24,28:25,29:26,30:27,31:28,32:p,33:m,34:_,36:y,38:b,39:x,40:[2,41],41:k,42:T,43:C,45:M,47:S,49:R,50:[1,137],53:A,58:L,59:v,60:B,61:w,69:D,79:i},{4:s,5:o,6:41,9:14,10:16,11:6,16:l,17:42,20:u,21:20,22:h,25:d,26:f,27:24,28:25,29:26,30:27,31:28,32:p,33:m,34:_,36:y,38:b,39:x,40:[1,138],41:k,42:T,43:C,45:M,47:S,49:R,53:A,58:L,59:v,60:B,61:w,69:D,79:i},{17:139,69:D},{17:140,69:D},{55:141,78:lt},{55:142,78:lt},{55:143,78:lt},{63:[1,144],78:[2,56]},{5:[2,49]},{5:[2,71]},{5:[2,50]},{5:[2,51]},{5:[2,52]},{5:[1,145]},{5:[1,146]},{5:[1,147]},t(z,[2,17]),t(z,[2,33]),t(z,[2,34]),t(z,[2,35]),t(z,[2,36]),{19:[1,148]},t(z,[2,37]),{19:[1,149]},t(z,[2,38]),{19:[1,150]},t(z,[2,39]),{55:151,78:lt},{55:152,78:lt},{5:[2,61]},{5:[2,47]},{5:[2,48]},{17:153,69:D},t(ut,[2,11]),t(z,[2,12]),t(z,[2,14]),t(ct,a,{8:108,44:154}),t(J,a,{8:110,46:155}),t(Y,a,{8:112,48:156}),{5:[2,59]},{5:[2,60]},{78:[2,55]},{40:[2,46]},{40:[2,44]},{40:[2,42]}],defaultActions:{7:[2,72],8:[2,1],9:[2,2],10:[2,3],51:[2,75],86:[2,57],87:[2,58],94:[2,74],120:[2,49],121:[2,71],122:[2,50],123:[2,51],124:[2,52],141:[2,61],142:[2,47],143:[2,48],151:[2,59],152:[2,60],153:[2,55],154:[2,46],155:[2,44],156:[2,42]},parseError:function(Z,V){if(V.recoverable)this.trace(Z);else{var Q=new Error(Z);throw Q.hash=V,Q}},parse:function(Z){var V=this,Q=[0],q=[],U=[null],F=[],j=this.table,P="",et=0,at=0,It=2,Lt=1,Rt=F.slice.call(arguments,1),Ct=Object.create(this.lexer),pt={yy:{}};for(var mt in this.yy)Object.prototype.hasOwnProperty.call(this.yy,mt)&&(pt.yy[mt]=this.yy[mt]);Ct.setInput(Z,pt.yy),pt.yy.lexer=Ct,pt.yy.parser=this,typeof Ct.yylloc>"u"&&(Ct.yylloc={});var vt=Ct.yylloc;F.push(vt);var Tt=Ct.options&&Ct.options.ranges;typeof pt.yy.parseError=="function"?this.parseError=pt.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ft(){var bt;return bt=q.pop()||Ct.lex()||Lt,typeof bt!="number"&&(bt instanceof Array&&(q=bt,bt=q.pop()),bt=V.symbols_[bt]||bt),bt}for(var le,Dt,Gt,$t,Qt={},we,jt,Ft,zt;;){if(Dt=Q[Q.length-1],this.defaultActions[Dt]?Gt=this.defaultActions[Dt]:((le===null||typeof le>"u")&&(le=ft()),Gt=j[Dt]&&j[Dt][le]),typeof Gt>"u"||!Gt.length||!Gt[0]){var wt="";zt=[];for(we in j[Dt])this.terminals_[we]&&we>It&&zt.push("'"+this.terminals_[we]+"'");Ct.showPosition?wt="Parse error on line "+(et+1)+`:
+`+Ct.showPosition()+`
+Expecting `+zt.join(", ")+", got '"+(this.terminals_[le]||le)+"'":wt="Parse error on line "+(et+1)+": Unexpected "+(le==Lt?"end of input":"'"+(this.terminals_[le]||le)+"'"),this.parseError(wt,{text:Ct.match,token:this.terminals_[le]||le,line:Ct.yylineno,loc:vt,expected:zt})}if(Gt[0]instanceof Array&&Gt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Dt+", token: "+le);switch(Gt[0]){case 1:Q.push(le),U.push(Ct.yytext),F.push(Ct.yylloc),Q.push(Gt[1]),le=null,at=Ct.yyleng,P=Ct.yytext,et=Ct.yylineno,vt=Ct.yylloc;break;case 2:if(jt=this.productions_[Gt[1]][1],Qt.$=U[U.length-jt],Qt._$={first_line:F[F.length-(jt||1)].first_line,last_line:F[F.length-1].last_line,first_column:F[F.length-(jt||1)].first_column,last_column:F[F.length-1].last_column},Tt&&(Qt._$.range=[F[F.length-(jt||1)].range[0],F[F.length-1].range[1]]),$t=this.performAction.apply(Qt,[P,at,et,pt.yy,Gt[1],U,F].concat(Rt)),typeof $t<"u")return $t;jt&&(Q=Q.slice(0,-1*jt*2),U=U.slice(0,-1*jt),F=F.slice(0,-1*jt)),Q.push(this.productions_[Gt[1]][0]),U.push(Qt.$),F.push(Qt._$),Ft=j[Q[Q.length-2]][Q[Q.length-1]],Q.push(Ft);break;case 3:return!0}}return!0}},tt=function(){var it={EOF:1,parseError:function(V,Q){if(this.yy.parser)this.yy.parser.parseError(V,Q);else throw new Error(V)},setInput:function(Z,V){return this.yy=V||this.yy||{},this._input=Z,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var Z=this._input[0];this.yytext+=Z,this.yyleng++,this.offset++,this.match+=Z,this.matched+=Z;var V=Z.match(/(?:\r\n?|\n).*/g);return V?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),Z},unput:function(Z){var V=Z.length,Q=Z.split(/(?:\r\n?|\n)/g);this._input=Z+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-V),this.offset-=V;var q=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),Q.length-1&&(this.yylineno-=Q.length-1);var U=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:Q?(Q.length===q.length?this.yylloc.first_column:0)+q[q.length-Q.length].length-Q[0].length:this.yylloc.first_column-V},this.options.ranges&&(this.yylloc.range=[U[0],U[0]+this.yyleng-V]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
+`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(Z){this.unput(this.match.slice(Z))},pastInput:function(){var Z=this.matched.substr(0,this.matched.length-this.match.length);return(Z.length>20?"...":"")+Z.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var Z=this.match;return Z.length<20&&(Z+=this._input.substr(0,20-Z.length)),(Z.substr(0,20)+(Z.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var Z=this.pastInput(),V=new Array(Z.length+1).join("-");return Z+this.upcomingInput()+`
+`+V+"^"},test_match:function(Z,V){var Q,q,U;if(this.options.backtrack_lexer&&(U={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(U.yylloc.range=this.yylloc.range.slice(0))),q=Z[0].match(/(?:\r\n?|\n).*/g),q&&(this.yylineno+=q.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:q?q[q.length-1].length-q[q.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+Z[0].length},this.yytext+=Z[0],this.match+=Z[0],this.matches=Z,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(Z[0].length),this.matched+=Z[0],Q=this.performAction.call(this,this.yy,this,V,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),Q)return Q;if(this._backtrack){for(var F in U)this[F]=U[F];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var Z,V,Q,q;this._more||(this.yytext="",this.match="");for(var U=this._currentRules(),F=0;F<U.length;F++)if(Q=this._input.match(this.rules[U[F]]),Q&&(!V||Q[0].length>V[0].length)){if(V=Q,q=F,this.options.backtrack_lexer){if(Z=this.test_match(Q,U[F]),Z!==!1)return Z;if(this._backtrack){V=!1;continue}else return!1}else if(!this.options.flex)break}return V?(Z=this.test_match(V,U[q]),Z!==!1?Z:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
+`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var V=this.next();return V||this.lex()},begin:function(V){this.conditionStack.push(V)},popState:function(){var V=this.conditionStack.length-1;return V>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(V){return V=this.conditionStack.length-1-Math.abs(V||0),V>=0?this.conditionStack[V]:"INITIAL"},pushState:function(V){this.begin(V)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(V,Q,q,U){switch(q){case 0:return this.begin("open_directive"),79;case 1:return this.begin("type_directive"),80;case 2:return this.popState(),this.begin("arg_directive"),14;case 3:return this.popState(),this.popState(),82;case 4:return 81;case 5:return 5;case 6:break;case 7:break;case 8:break;case 9:break;case 10:break;case 11:return 23;case 12:return this.begin("ID"),16;case 13:return this.begin("ID"),20;case 14:return Q.yytext=Q.yytext.trim(),this.begin("ALIAS"),69;case 15:return this.popState(),this.popState(),this.begin("LINE"),18;case 16:return this.popState(),this.popState(),5;case 17:return this.begin("LINE"),39;case 18:return this.begin("LINE"),41;case 19:return this.begin("LINE"),42;case 20:return this.begin("LINE"),43;case 21:return this.begin("LINE"),52;case 22:return this.begin("LINE"),45;case 23:return this.begin("LINE"),51;case 24:return this.begin("LINE"),47;case 25:return this.begin("LINE"),50;case 26:return this.begin("LINE"),49;case 27:return this.popState(),19;case 28:return 40;case 29:return 64;case 30:return 65;case 31:return 58;case 32:return 59;case 33:return 60;case 34:return 61;case 35:return 56;case 36:return 53;case 37:return this.begin("ID"),25;case 38:return this.begin("ID"),26;case 39:return 32;case 40:return 33;case 41:return this.begin("acc_title"),34;case 42:return this.popState(),"acc_title_value";case 43:return this.begin("acc_descr"),36;case 44:return this.popState(),"acc_descr_value";case 45:this.begin("acc_descr_multiline");break;case 46:this.popState();break;case 47:return"acc_descr_multiline_value";case 48:return 7;case 49:return 22;case 50:return 24;case 51:return 63;case 52:return 5;case 53:return Q.yytext=Q.yytext.trim(),69;case 54:return 72;case 55:return 73;case 56:return 70;case 57:return 71;case 58:return 74;case 59:return 75;case 60:return 76;case 61:return 77;case 62:return 78;case 63:return 67;case 64:return 68;case 65:return 5;case 66:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[0-9]+(?=[ \n]+))/i,/^(?:participant\b)/i,/^(?:actor\b)/i,/^(?:[^\->:\n,;]+?([\-]*[^\->:\n,;]+?)*?(?=((?!\n)\s)+as(?!\n)\s|[#\n;]|$))/i,/^(?:as\b)/i,/^(?:(?:))/i,/^(?:loop\b)/i,/^(?:rect\b)/i,/^(?:opt\b)/i,/^(?:alt\b)/i,/^(?:else\b)/i,/^(?:par\b)/i,/^(?:and\b)/i,/^(?:critical\b)/i,/^(?:option\b)/i,/^(?:break\b)/i,/^(?:(?:[:]?(?:no)?wrap)?[^#\n;]*)/i,/^(?:end\b)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:links\b)/i,/^(?:link\b)/i,/^(?:properties\b)/i,/^(?:details\b)/i,/^(?:over\b)/i,/^(?:note\b)/i,/^(?:activate\b)/i,/^(?:deactivate\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:title:\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:sequenceDiagram\b)/i,/^(?:autonumber\b)/i,/^(?:off\b)/i,/^(?:,)/i,/^(?:;)/i,/^(?:[^\+\->:\n,;]+((?!(-x|--x|-\)|--\)))[\-]*[^\+\->:\n,;]+)*)/i,/^(?:->>)/i,/^(?:-->>)/i,/^(?:->)/i,/^(?:-->)/i,/^(?:-[x])/i,/^(?:--[x])/i,/^(?:-[\)])/i,/^(?:--[\)])/i,/^(?::(?:(?:no)?wrap)?[^#\n;]+)/i,/^(?:\+)/i,/^(?:-)/i,/^(?:$)/i,/^(?:.)/i],conditions:{acc_descr_multiline:{rules:[46,47],inclusive:!1},acc_descr:{rules:[44],inclusive:!1},acc_title:{rules:[42],inclusive:!1},open_directive:{rules:[1,8],inclusive:!1},type_directive:{rules:[2,3,8],inclusive:!1},arg_directive:{rules:[3,4,8],inclusive:!1},ID:{rules:[7,8,14],inclusive:!1},ALIAS:{rules:[7,8,15,16],inclusive:!1},LINE:{rules:[7,8,27],inclusive:!1},INITIAL:{rules:[0,5,6,8,9,10,11,12,13,17,18,19,20,21,22,23,24,25,26,28,29,30,31,32,33,34,35,36,37,38,39,40,41,43,45,48,49,50,51,52,53,54,55,56,57,58,59,60,61,62,63,64,65,66],inclusive:!0}}};return it}();W.lexer=tt;function K(){this.yy={}}return K.prototype=W,W.Parser=K,new K}();H4.parser=H4;const yit=t=>t.match(/^\s*sequenceDiagram/)!==null;let uu,ns={},bi=[],u0=!1,G4;const mit=function(t,e,r){He.parseDirective(this,t,e,r)},j4=function(t,e,r,n){const i=ns[t];i&&e===i.name&&r==null||((r==null||r.text==null)&&(r={text:e,wrap:null,type:n}),(n==null||r.text==null)&&(r={text:e,wrap:null,type:n}),ns[t]={name:e,description:r.text,wrap:r.wrap===void 0&&ul()||!!r.wrap,prevActor:uu,links:{},properties:{},actorCnt:null,rectData:null,type:n||"participant"},uu&&ns[uu]&&(ns[uu].nextActor=t),uu=t)},bit=t=>{let e,r=0;for(e=0;e<bi.length;e++)bi[e].type===fu.ACTIVE_START&&bi[e].from.actor===t&&r++,bi[e].type===fu.ACTIVE_END&&bi[e].from.actor===t&&r--;return r},_it=function(t,e,r,n){bi.push({from:t,to:e,message:r.text,wrap:r.wrap===void 0&&ul()||!!r.wrap,answer:n})},hr=function(t,e,r={text:void 0,wrap:void 0},n){if(n===fu.ACTIVE_END&&bit(t.actor)<1){let a=new Error("Trying to inactivate an inactive participant ("+t.actor+")");throw a.hash={text:"->>-",token:"->>-",line:"1",loc:{first_line:1,last_line:1,first_column:1,last_column:1},expected:["'ACTIVE_PARTICIPANT'"]},a}return bi.push({from:t,to:e,message:r.text,wrap:r.wrap===void 0&&ul()||!!r.wrap,type:n}),!0},vit=function(){return bi},xit=function(){return ns},hu=function(t){return ns[t]},kit=function(){return Object.keys(ns)},wit=function(){u0=!0},Tit=function(){u0=!1},Eit=()=>u0,Cit=function(t){G4=t},ul=()=>typeof G4<"u"?G4:nt().sequence.wrap,Sit=function(){ns={},bi=[],u0=!1,ci()},Ait=function(t){const e=t.trim(),r={text:e.replace(/^[:]?(?:no)?wrap:/,"").trim(),wrap:e.match(/^[:]?wrap:/)!==null?!0:e.match(/^[:]?nowrap:/)!==null?!1:void 0};return H.debug("parseMessage:",r),r},fu={SOLID:0,DOTTED:1,NOTE:2,SOLID_CROSS:3,DOTTED_CROSS:4,SOLID_OPEN:5,DOTTED_OPEN:6,LOOP_START:10,LOOP_END:11,ALT_START:12,ALT_ELSE:13,ALT_END:14,OPT_START:15,OPT_END:16,ACTIVE_START:17,ACTIVE_END:18,PAR_START:19,PAR_AND:20,PAR_END:21,RECT_START:22,RECT_END:23,SOLID_POINT:24,DOTTED_POINT:25,AUTONUMBER:26,CRITICAL_START:27,CRITICAL_OPTION:28,CRITICAL_END:29,BREAK_START:30,BREAK_END:31},Mit={FILLED:0,OPEN:1},Lit={LEFTOF:0,RIGHTOF:1,OVER:2},uL=function(t,e,r){r.text,r.wrap===void 0&&ul()||r.wrap;const n=[].concat(t,t);bi.push({from:n[0],to:n[1],message:r.text,wrap:r.wrap===void 0&&ul()||!!r.wrap,type:fu.NOTE,placement:e})},hL=function(t,e){const r=hu(t);try{let n=ai(e.text,nt());n=n.replace(/&amp;/g,"&"),n=n.replace(/&equals;/g,"=");const i=JSON.parse(n);$4(r,i)}catch(n){H.error("error while parsing actor link text",n)}},Rit=function(t,e){const r=hu(t);try{const s={};let o=ai(e.text,nt());var n=o.indexOf("@");o=o.replace(/&amp;/g,"&"),o=o.replace(/&equals;/g,"=");var i=o.slice(0,n-1).trim(),a=o.slice(n+1).trim();s[i]=a,$4(r,s)}catch(s){H.error("error while parsing actor link text",s)}};function $4(t,e){if(t.links==null)t.links=e;else for(let r in e)t.links[r]=e[r]}const fL=function(t,e){const r=hu(t);try{let n=ai(e.text,nt());const i=JSON.parse(n);dL(r,i)}catch(n){H.error("error while parsing actor properties text",n)}};function dL(t,e){if(t.properties==null)t.properties=e;else for(let r in e)t.properties[r]=e[r]}const pL=function(t,e){const r=hu(t),n=document.getElementById(e.text);try{const i=n.innerHTML,a=JSON.parse(i);a.properties&&dL(r,a.properties),a.links&&$4(r,a.links)}catch(i){H.error("error while parsing actor details text",i)}},Iit=function(t,e){if(typeof t<"u"&&typeof t.properties<"u")return t.properties[e]},gL=function(t){if(t instanceof Array)t.forEach(function(e){gL(e)});else switch(t.type){case"sequenceIndex":bi.push({from:void 0,to:void 0,message:{start:t.sequenceIndex,step:t.sequenceIndexStep,visible:t.sequenceVisible},wrap:!1,type:t.signalType});break;case"addParticipant":j4(t.actor,t.actor,t.description,"participant");break;case"addActor":j4(t.actor,t.actor,t.description,"actor");break;case"activeStart":hr(t.actor,void 0,void 0,t.signalType);break;case"activeEnd":hr(t.actor,void 0,void 0,t.signalType);break;case"addNote":uL(t.actor,t.placement,t.text);break;case"addLinks":hL(t.actor,t.text);break;case"addALink":Rit(t.actor,t.text);break;case"addProperties":fL(t.actor,t.text);break;case"addDetails":pL(t.actor,t.text);break;case"addMessage":hr(t.from,t.to,t.msg,t.signalType);break;case"loopStart":hr(void 0,void 0,t.loopText,t.signalType);break;case"loopEnd":hr(void 0,void 0,void 0,t.signalType);break;case"rectStart":hr(void 0,void 0,t.color,t.signalType);break;case"rectEnd":hr(void 0,void 0,void 0,t.signalType);break;case"optStart":hr(void 0,void 0,t.optText,t.signalType);break;case"optEnd":hr(void 0,void 0,void 0,t.signalType);break;case"altStart":hr(void 0,void 0,t.altText,t.signalType);break;case"else":hr(void 0,void 0,t.altText,t.signalType);break;case"altEnd":hr(void 0,void 0,void 0,t.signalType);break;case"setAccTitle":Yn(t.text);break;case"parStart":hr(void 0,void 0,t.parText,t.signalType);break;case"and":hr(void 0,void 0,t.parText,t.signalType);break;case"parEnd":hr(void 0,void 0,void 0,t.signalType);break;case"criticalStart":hr(void 0,void 0,t.criticalText,t.signalType);break;case"option":hr(void 0,void 0,t.optionText,t.signalType);break;case"criticalEnd":hr(void 0,void 0,void 0,t.signalType);break;case"breakStart":hr(void 0,void 0,t.breakText,t.signalType);break;case"breakEnd":hr(void 0,void 0,void 0,t.signalType);break}},yL={addActor:j4,addMessage:_it,addSignal:hr,addLinks:hL,addDetails:pL,addProperties:fL,autoWrap:ul,setWrap:Cit,enableSequenceNumbers:wit,disableSequenceNumbers:Tit,showSequenceNumbers:Eit,getMessages:vit,getActors:xit,getActor:hu,getActorKeys:kit,getActorProperty:Iit,getAccTitle:ui,getDiagramTitle:u1,setDiagramTitle:c1,parseDirective:mit,getConfig:()=>nt().sequence,clear:Sit,parseMessage:Ait,LINETYPE:fu,ARROWTYPE:Mit,PLACEMENT:Lit,addNote:uL,setAccTitle:Yn,apply:gL,setAccDescription:hi,getAccDescription:fi};let X4=[];const Nit=t=>{X4.push(t)},mL=()=>{X4.forEach(t=>{t()}),X4=[]},h0=function(t,e){const r=t.append("rect");return r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),typeof e.class<"u"&&r.attr("class",e.class),r},bL=(t,e)=>{Nit(()=>{const r=document.querySelectorAll(t);r.length!==0&&(r[0].addEventListener("mouseover",function(){Fit("actor"+e+"_popup")}),r[0].addEventListener("mouseout",function(){Pit("actor"+e+"_popup")}))})},Bit=function(t,e,r,n,i){if(e.links===void 0||e.links===null||Object.keys(e.links).length===0)return{height:0,width:0};const a=e.links,s=e.actorCnt,o=e.rectData;var l="none";i&&(l="block !important");const u=t.append("g");u.attr("id","actor"+s+"_popup"),u.attr("class","actorPopupMenu"),u.attr("display",l),bL("#actor"+s+"_popup",s);var h="";typeof o.class<"u"&&(h=" "+o.class);let d=o.width>r?o.width:r;const f=u.append("rect");if(f.attr("class","actorPopupMenuPanel"+h),f.attr("x",o.x),f.attr("y",o.height),f.attr("fill",o.fill),f.attr("stroke",o.stroke),f.attr("width",d),f.attr("height",o.height),f.attr("rx",o.rx),f.attr("ry",o.ry),a!=null){var p=20;for(let y in a){var m=u.append("a"),_=ki(a[y]);m.attr("xlink:href",_),m.attr("target","_blank"),Jit(n)(y,m,o.x+10,o.height+p,d,20,{class:"actor"},n),p+=30}}return f.attr("height",p),{height:o.height+p,width:d}},_L=function(t,e,r,n){const i=t.append("image");i.attr("x",e),i.attr("y",r);var a=ki(n);i.attr("xlink:href",a)},vL=function(t,e,r,n){const i=t.append("use");i.attr("x",e),i.attr("y",r);var a=ki(n);i.attr("xlink:href","#"+a)},Dit=function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = 'block'; }"},Oit=function(t){return"var pu = document.getElementById('"+t+"'); if (pu != null) { pu.style.display = 'none'; }"},Fit=function(t){var e=document.getElementById(t);e!=null&&(e.style.display="block")},Pit=function(t){var e=document.getElementById(t);e!=null&&(e.style.display="none")},hl=function(t,e){let r=0,n=0;const i=e.text.split(pe.lineBreakRegex);let a=[],s=0,o=()=>e.y;if(typeof e.valign<"u"&&typeof e.textMargin<"u"&&e.textMargin>0)switch(e.valign){case"top":case"start":o=()=>Math.round(e.y+e.textMargin);break;case"middle":case"center":o=()=>Math.round(e.y+(r+n+e.textMargin)/2);break;case"bottom":case"end":o=()=>Math.round(e.y+(r+n+2*e.textMargin)-e.textMargin);break}if(typeof e.anchor<"u"&&typeof e.textMargin<"u"&&typeof e.width<"u")switch(e.anchor){case"left":case"start":e.x=Math.round(e.x+e.textMargin),e.anchor="start",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"middle":case"center":e.x=Math.round(e.x+e.width/2),e.anchor="middle",e.dominantBaseline="middle",e.alignmentBaseline="middle";break;case"right":case"end":e.x=Math.round(e.x+e.width-e.textMargin),e.anchor="end",e.dominantBaseline="middle",e.alignmentBaseline="middle";break}for(let l=0;l<i.length;l++){let u=i[l];typeof e.textMargin<"u"&&e.textMargin===0&&typeof e.fontSize<"u"&&(s=l*e.fontSize);const h=t.append("text");if(h.attr("x",e.x),h.attr("y",o()),typeof e.anchor<"u"&&h.attr("text-anchor",e.anchor).attr("dominant-baseline",e.dominantBaseline).attr("alignment-baseline",e.alignmentBaseline),typeof e.fontFamily<"u"&&h.style("font-family",e.fontFamily),typeof e.fontSize<"u"&&h.style("font-size",e.fontSize),typeof e.fontWeight<"u"&&h.style("font-weight",e.fontWeight),typeof e.fill<"u"&&h.attr("fill",e.fill),typeof e.class<"u"&&h.attr("class",e.class),typeof e.dy<"u"?h.attr("dy",e.dy):s!==0&&h.attr("dy",s),e.tspan){const d=h.append("tspan");d.attr("x",e.x),typeof e.fill<"u"&&d.attr("fill",e.fill),d.text(u)}else h.text(u);typeof e.valign<"u"&&typeof e.textMargin<"u"&&e.textMargin>0&&(n+=(h._groups||h)[0][0].getBBox().height,r=n),a.push(h)}return a},xL=function(t,e){function r(i,a,s,o,l){return i+","+a+" "+(i+s)+","+a+" "+(i+s)+","+(a+o-l)+" "+(i+s-l*1.2)+","+(a+o)+" "+i+","+(a+o)}const n=t.append("polygon");return n.attr("points",r(e.x,e.y,e.width,e.height,7)),n.attr("class","labelBox"),e.y=e.y+e.height/2,hl(t,e),n};let Yi=-1;const kL=(t,e)=>{!t.selectAll||t.selectAll(".actor-line").attr("class","200").attr("y2",e-55)},qit=function(t,e,r){const n=e.x+e.width/2,i=t.append("g");var a=i;e.y===0&&(Yi++,a.append("line").attr("id","actor"+Yi).attr("x1",n).attr("y1",5).attr("x2",n).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"),a=i.append("g"),e.actorCnt=Yi,e.links!=null&&(a.attr("id","root-"+Yi),bL("#root-"+Yi,Yi)));const s=f0();var o="actor";e.properties!=null&&e.properties.class?o=e.properties.class:s.fill="#eaeaea",s.x=e.x,s.y=e.y,s.width=e.width,s.height=e.height,s.class=o,s.rx=3,s.ry=3;const l=h0(a,s);if(e.rectData=s,e.properties!=null&&e.properties.icon){const h=e.properties.icon.trim();h.charAt(0)==="@"?vL(a,s.x+s.width-20,s.y+10,h.substr(1)):_L(a,s.x+s.width-20,s.y+10,h)}wL(r)(e.description,a,s.x,s.y,s.width,s.height,{class:"actor"},r);let u=e.height;if(l.node){const h=l.node().getBBox();e.height=h.height,u=h.height}return u},Vit=function(t,e,r){const n=e.x+e.width/2;e.y===0&&(Yi++,t.append("line").attr("id","actor"+Yi).attr("x1",n).attr("y1",80).attr("x2",n).attr("y2",2e3).attr("class","actor-line").attr("stroke-width","0.5px").attr("stroke","#999"));const i=t.append("g");i.attr("class","actor-man");const a=f0();a.x=e.x,a.y=e.y,a.fill="#eaeaea",a.width=e.width,a.height=e.height,a.class="actor",a.rx=3,a.ry=3,i.append("line").attr("id","actor-man-torso"+Yi).attr("x1",n).attr("y1",e.y+25).attr("x2",n).attr("y2",e.y+45),i.append("line").attr("id","actor-man-arms"+Yi).attr("x1",n-18).attr("y1",e.y+33).attr("x2",n+18).attr("y2",e.y+33),i.append("line").attr("x1",n-18).attr("y1",e.y+60).attr("x2",n).attr("y2",e.y+45),i.append("line").attr("x1",n).attr("y1",e.y+45).attr("x2",n+16).attr("y2",e.y+60);const s=i.append("circle");s.attr("cx",e.x+e.width/2),s.attr("cy",e.y+10),s.attr("r",15),s.attr("width",e.width),s.attr("height",e.height);const o=i.node().getBBox();return e.height=o.height,wL(r)(e.description,i,a.x,a.y+35,a.width,a.height,{class:"actor"},r),e.height},zit=function(t,e,r){switch(e.type){case"actor":return Vit(t,e,r);case"participant":return qit(t,e,r)}},Yit=function(t){return t.append("g")},Uit=function(t,e,r,n,i){const a=f0(),s=e.anchored;a.x=e.startx,a.y=e.starty,a.class="activation"+i%3,a.width=e.stopx-e.startx,a.height=r-e.starty,h0(s,a)},Wit=function(t,e,r,n){const{boxMargin:i,boxTextMargin:a,labelBoxHeight:s,labelBoxWidth:o,messageFontFamily:l,messageFontSize:u,messageFontWeight:h}=n,d=t.append("g"),f=function(_,y,b,x){return d.append("line").attr("x1",_).attr("y1",y).attr("x2",b).attr("y2",x).attr("class","loopLine")};f(e.startx,e.starty,e.stopx,e.starty),f(e.stopx,e.starty,e.stopx,e.stopy),f(e.startx,e.stopy,e.stopx,e.stopy),f(e.startx,e.starty,e.startx,e.stopy),typeof e.sections<"u"&&e.sections.forEach(function(_){f(e.startx,_.y,e.stopx,_.y).style("stroke-dasharray","3, 3")});let p=K4();p.text=r,p.x=e.startx,p.y=e.starty,p.fontFamily=l,p.fontSize=u,p.fontWeight=h,p.anchor="middle",p.valign="middle",p.tspan=!1,p.width=o||50,p.height=s||20,p.textMargin=a,p.class="labelText",xL(d,p),p=K4(),p.text=e.title,p.x=e.startx+o/2+(e.stopx-e.startx)/2,p.y=e.starty+i+a,p.anchor="middle",p.valign="middle",p.textMargin=a,p.class="loopText",p.fontFamily=l,p.fontSize=u,p.fontWeight=h,p.wrap=!0;let m=hl(d,p);return typeof e.sectionTitles<"u"&&e.sectionTitles.forEach(function(_,y){if(_.message){p.text=_.message,p.x=e.startx+(e.stopx-e.startx)/2,p.y=e.sections[y].y+i+a,p.class="loopText",p.anchor="middle",p.valign="middle",p.tspan=!1,p.fontFamily=l,p.fontSize=u,p.fontWeight=h,p.wrap=e.wrap,m=hl(d,p);let b=Math.round(m.map(x=>(x._groups||x)[0][0].getBBox().height).reduce((x,k)=>x+k));e.sections[y].height+=b-(i+a)}}),e.height=Math.round(e.stopy-e.starty),d},Hit=function(t,e){h0(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},Git=function(t){t.append("defs").append("symbol").attr("id","database").attr("fill-rule","evenodd").attr("clip-rule","evenodd").append("path").attr("transform","scale(.5)").attr("d","M12.258.001l.256.004.255.005.253.008.251.01.249.012.247.015.246.016.242.019.241.02.239.023.236.024.233.027.231.028.229.031.225.032.223.034.22.036.217.038.214.04.211.041.208.043.205.045.201.046.198.048.194.05.191.051.187.053.183.054.18.056.175.057.172.059.168.06.163.061.16.063.155.064.15.066.074.033.073.033.071.034.07.034.069.035.068.035.067.035.066.035.064.036.064.036.062.036.06.036.06.037.058.037.058.037.055.038.055.038.053.038.052.038.051.039.05.039.048.039.047.039.045.04.044.04.043.04.041.04.04.041.039.041.037.041.036.041.034.041.033.042.032.042.03.042.029.042.027.042.026.043.024.043.023.043.021.043.02.043.018.044.017.043.015.044.013.044.012.044.011.045.009.044.007.045.006.045.004.045.002.045.001.045v17l-.001.045-.002.045-.004.045-.006.045-.007.045-.009.044-.011.045-.012.044-.013.044-.015.044-.017.043-.018.044-.02.043-.021.043-.023.043-.024.043-.026.043-.027.042-.029.042-.03.042-.032.042-.033.042-.034.041-.036.041-.037.041-.039.041-.04.041-.041.04-.043.04-.044.04-.045.04-.047.039-.048.039-.05.039-.051.039-.052.038-.053.038-.055.038-.055.038-.058.037-.058.037-.06.037-.06.036-.062.036-.064.036-.064.036-.066.035-.067.035-.068.035-.069.035-.07.034-.071.034-.073.033-.074.033-.15.066-.155.064-.16.063-.163.061-.168.06-.172.059-.175.057-.18.056-.183.054-.187.053-.191.051-.194.05-.198.048-.201.046-.205.045-.208.043-.211.041-.214.04-.217.038-.22.036-.223.034-.225.032-.229.031-.231.028-.233.027-.236.024-.239.023-.241.02-.242.019-.246.016-.247.015-.249.012-.251.01-.253.008-.255.005-.256.004-.258.001-.258-.001-.256-.004-.255-.005-.253-.008-.251-.01-.249-.012-.247-.015-.245-.016-.243-.019-.241-.02-.238-.023-.236-.024-.234-.027-.231-.028-.228-.031-.226-.032-.223-.034-.22-.036-.217-.038-.214-.04-.211-.041-.208-.043-.204-.045-.201-.046-.198-.048-.195-.05-.19-.051-.187-.053-.184-.054-.179-.056-.176-.057-.172-.059-.167-.06-.164-.061-.159-.063-.155-.064-.151-.066-.074-.033-.072-.033-.072-.034-.07-.034-.069-.035-.068-.035-.067-.035-.066-.035-.064-.036-.063-.036-.062-.036-.061-.036-.06-.037-.058-.037-.057-.037-.056-.038-.055-.038-.053-.038-.052-.038-.051-.039-.049-.039-.049-.039-.046-.039-.046-.04-.044-.04-.043-.04-.041-.04-.04-.041-.039-.041-.037-.041-.036-.041-.034-.041-.033-.042-.032-.042-.03-.042-.029-.042-.027-.042-.026-.043-.024-.043-.023-.043-.021-.043-.02-.043-.018-.044-.017-.043-.015-.044-.013-.044-.012-.044-.011-.045-.009-.044-.007-.045-.006-.045-.004-.045-.002-.045-.001-.045v-17l.001-.045.002-.045.004-.045.006-.045.007-.045.009-.044.011-.045.012-.044.013-.044.015-.044.017-.043.018-.044.02-.043.021-.043.023-.043.024-.043.026-.043.027-.042.029-.042.03-.042.032-.042.033-.042.034-.041.036-.041.037-.041.039-.041.04-.041.041-.04.043-.04.044-.04.046-.04.046-.039.049-.039.049-.039.051-.039.052-.038.053-.038.055-.038.056-.038.057-.037.058-.037.06-.037.061-.036.062-.036.063-.036.064-.036.066-.035.067-.035.068-.035.069-.035.07-.034.072-.034.072-.033.074-.033.151-.066.155-.064.159-.063.164-.061.167-.06.172-.059.176-.057.179-.056.184-.054.187-.053.19-.051.195-.05.198-.048.201-.046.204-.045.208-.043.211-.041.214-.04.217-.038.22-.036.223-.034.226-.032.228-.031.231-.028.234-.027.236-.024.238-.023.241-.02.243-.019.245-.016.247-.015.249-.012.251-.01.253-.008.255-.005.256-.004.258-.001.258.001zm-9.258 20.499v.01l.001.021.003.021.004.022.005.021.006.022.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.023.018.024.019.024.021.024.022.025.023.024.024.025.052.049.056.05.061.051.066.051.07.051.075.051.079.052.084.052.088.052.092.052.097.052.102.051.105.052.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.048.144.049.147.047.152.047.155.047.16.045.163.045.167.043.171.043.176.041.178.041.183.039.187.039.19.037.194.035.197.035.202.033.204.031.209.03.212.029.216.027.219.025.222.024.226.021.23.02.233.018.236.016.24.015.243.012.246.01.249.008.253.005.256.004.259.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.021.224-.024.22-.026.216-.027.212-.028.21-.031.205-.031.202-.034.198-.034.194-.036.191-.037.187-.039.183-.04.179-.04.175-.042.172-.043.168-.044.163-.045.16-.046.155-.046.152-.047.148-.048.143-.049.139-.049.136-.05.131-.05.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.053.083-.051.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.05.023-.024.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.023.01-.022.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.127l-.077.055-.08.053-.083.054-.085.053-.087.052-.09.052-.093.051-.095.05-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.045-.118.044-.12.043-.122.042-.124.042-.126.041-.128.04-.13.04-.132.038-.134.038-.135.037-.138.037-.139.035-.142.035-.143.034-.144.033-.147.032-.148.031-.15.03-.151.03-.153.029-.154.027-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.01-.179.008-.179.008-.181.006-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.006-.179-.008-.179-.008-.178-.01-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.027-.153-.029-.151-.03-.15-.03-.148-.031-.146-.032-.145-.033-.143-.034-.141-.035-.14-.035-.137-.037-.136-.037-.134-.038-.132-.038-.13-.04-.128-.04-.126-.041-.124-.042-.122-.042-.12-.044-.117-.043-.116-.045-.113-.045-.112-.046-.109-.047-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.05-.093-.052-.09-.051-.087-.052-.085-.053-.083-.054-.08-.054-.077-.054v4.127zm0-5.654v.011l.001.021.003.021.004.021.005.022.006.022.007.022.009.022.01.022.011.023.012.023.013.023.015.024.016.023.017.024.018.024.019.024.021.024.022.024.023.025.024.024.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.052.11.051.114.051.119.052.123.05.127.051.131.05.135.049.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.044.171.042.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.022.23.02.233.018.236.016.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.012.241-.015.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.048.139-.05.136-.049.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.051.051-.049.023-.025.023-.024.021-.025.02-.024.019-.024.018-.024.017-.024.015-.023.014-.023.013-.024.012-.022.01-.023.01-.023.008-.022.006-.022.006-.022.004-.021.004-.022.001-.021.001-.021v-4.139l-.077.054-.08.054-.083.054-.085.052-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.049-.105.048-.106.047-.109.047-.111.046-.114.045-.115.044-.118.044-.12.044-.122.042-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.035-.143.033-.144.033-.147.033-.148.031-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.025-.161.024-.162.023-.163.022-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.011-.178.009-.179.009-.179.007-.181.007-.182.005-.182.004-.184.003-.184.002h-.37l-.184-.002-.184-.003-.182-.004-.182-.005-.181-.007-.179-.007-.179-.009-.178-.009-.176-.011-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.022-.162-.023-.161-.024-.159-.025-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.031-.146-.033-.145-.033-.143-.033-.141-.035-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.04-.126-.041-.124-.042-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.047-.105-.048-.102-.049-.1-.049-.097-.05-.095-.051-.093-.051-.09-.051-.087-.053-.085-.052-.083-.054-.08-.054-.077-.054v4.139zm0-5.666v.011l.001.02.003.022.004.021.005.022.006.021.007.022.009.023.01.022.011.023.012.023.013.023.015.023.016.024.017.024.018.023.019.024.021.025.022.024.023.024.024.025.052.05.056.05.061.05.066.051.07.051.075.052.079.051.084.052.088.052.092.052.097.052.102.052.105.051.11.052.114.051.119.051.123.051.127.05.131.05.135.05.139.049.144.048.147.048.152.047.155.046.16.045.163.045.167.043.171.043.176.042.178.04.183.04.187.038.19.037.194.036.197.034.202.033.204.032.209.03.212.028.216.027.219.025.222.024.226.021.23.02.233.018.236.017.24.014.243.012.246.01.249.008.253.006.256.003.259.001.26-.001.257-.003.254-.006.25-.008.247-.01.244-.013.241-.014.237-.016.233-.018.231-.02.226-.022.224-.024.22-.025.216-.027.212-.029.21-.03.205-.032.202-.033.198-.035.194-.036.191-.037.187-.039.183-.039.179-.041.175-.042.172-.043.168-.044.163-.045.16-.045.155-.047.152-.047.148-.048.143-.049.139-.049.136-.049.131-.051.126-.05.123-.051.118-.052.114-.051.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.052.07-.051.065-.051.06-.051.056-.05.051-.049.023-.025.023-.025.021-.024.02-.024.019-.024.018-.024.017-.024.015-.023.014-.024.013-.023.012-.023.01-.022.01-.023.008-.022.006-.022.006-.022.004-.022.004-.021.001-.021.001-.021v-4.153l-.077.054-.08.054-.083.053-.085.053-.087.053-.09.051-.093.051-.095.051-.097.05-.1.049-.102.048-.105.048-.106.048-.109.046-.111.046-.114.046-.115.044-.118.044-.12.043-.122.043-.124.042-.126.041-.128.04-.13.039-.132.039-.134.038-.135.037-.138.036-.139.036-.142.034-.143.034-.144.033-.147.032-.148.032-.15.03-.151.03-.153.028-.154.028-.156.027-.158.026-.159.024-.161.024-.162.023-.163.023-.165.021-.166.02-.167.019-.169.018-.169.017-.171.016-.173.015-.173.014-.175.013-.175.012-.177.01-.178.01-.179.009-.179.007-.181.006-.182.006-.182.004-.184.003-.184.001-.185.001-.185-.001-.184-.001-.184-.003-.182-.004-.182-.006-.181-.006-.179-.007-.179-.009-.178-.01-.176-.01-.176-.012-.175-.013-.173-.014-.172-.015-.171-.016-.17-.017-.169-.018-.167-.019-.166-.02-.165-.021-.163-.023-.162-.023-.161-.024-.159-.024-.157-.026-.156-.027-.155-.028-.153-.028-.151-.03-.15-.03-.148-.032-.146-.032-.145-.033-.143-.034-.141-.034-.14-.036-.137-.036-.136-.037-.134-.038-.132-.039-.13-.039-.128-.041-.126-.041-.124-.041-.122-.043-.12-.043-.117-.044-.116-.044-.113-.046-.112-.046-.109-.046-.106-.048-.105-.048-.102-.048-.1-.05-.097-.049-.095-.051-.093-.051-.09-.052-.087-.052-.085-.053-.083-.053-.08-.054-.077-.054v4.153zm8.74-8.179l-.257.004-.254.005-.25.008-.247.011-.244.012-.241.014-.237.016-.233.018-.231.021-.226.022-.224.023-.22.026-.216.027-.212.028-.21.031-.205.032-.202.033-.198.034-.194.036-.191.038-.187.038-.183.04-.179.041-.175.042-.172.043-.168.043-.163.045-.16.046-.155.046-.152.048-.148.048-.143.048-.139.049-.136.05-.131.05-.126.051-.123.051-.118.051-.114.052-.11.052-.106.052-.101.052-.096.052-.092.052-.088.052-.083.052-.079.052-.074.051-.07.052-.065.051-.06.05-.056.05-.051.05-.023.025-.023.024-.021.024-.02.025-.019.024-.018.024-.017.023-.015.024-.014.023-.013.023-.012.023-.01.023-.01.022-.008.022-.006.023-.006.021-.004.022-.004.021-.001.021-.001.021.001.021.001.021.004.021.004.022.006.021.006.023.008.022.01.022.01.023.012.023.013.023.014.023.015.024.017.023.018.024.019.024.02.025.021.024.023.024.023.025.051.05.056.05.06.05.065.051.07.052.074.051.079.052.083.052.088.052.092.052.096.052.101.052.106.052.11.052.114.052.118.051.123.051.126.051.131.05.136.05.139.049.143.048.148.048.152.048.155.046.16.046.163.045.168.043.172.043.175.042.179.041.183.04.187.038.191.038.194.036.198.034.202.033.205.032.21.031.212.028.216.027.22.026.224.023.226.022.231.021.233.018.237.016.241.014.244.012.247.011.25.008.254.005.257.004.26.001.26-.001.257-.004.254-.005.25-.008.247-.011.244-.012.241-.014.237-.016.233-.018.231-.021.226-.022.224-.023.22-.026.216-.027.212-.028.21-.031.205-.032.202-.033.198-.034.194-.036.191-.038.187-.038.183-.04.179-.041.175-.042.172-.043.168-.043.163-.045.16-.046.155-.046.152-.048.148-.048.143-.048.139-.049.136-.05.131-.05.126-.051.123-.051.118-.051.114-.052.11-.052.106-.052.101-.052.096-.052.092-.052.088-.052.083-.052.079-.052.074-.051.07-.052.065-.051.06-.05.056-.05.051-.05.023-.025.023-.024.021-.024.02-.025.019-.024.018-.024.017-.023.015-.024.014-.023.013-.023.012-.023.01-.023.01-.022.008-.022.006-.023.006-.021.004-.022.004-.021.001-.021.001-.021-.001-.021-.001-.021-.004-.021-.004-.022-.006-.021-.006-.023-.008-.022-.01-.022-.01-.023-.012-.023-.013-.023-.014-.023-.015-.024-.017-.023-.018-.024-.019-.024-.02-.025-.021-.024-.023-.024-.023-.025-.051-.05-.056-.05-.06-.05-.065-.051-.07-.052-.074-.051-.079-.052-.083-.052-.088-.052-.092-.052-.096-.052-.101-.052-.106-.052-.11-.052-.114-.052-.118-.051-.123-.051-.126-.051-.131-.05-.136-.05-.139-.049-.143-.048-.148-.048-.152-.048-.155-.046-.16-.046-.163-.045-.168-.043-.172-.043-.175-.042-.179-.041-.183-.04-.187-.038-.191-.038-.194-.036-.198-.034-.202-.033-.205-.032-.21-.031-.212-.028-.216-.027-.22-.026-.224-.023-.226-.022-.231-.021-.233-.018-.237-.016-.241-.014-.244-.012-.247-.011-.25-.008-.254-.005-.257-.004-.26-.001-.26.001z")},jit=function(t){t.append("defs").append("symbol").attr("id","computer").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M2 2v13h20v-13h-20zm18 11h-16v-9h16v9zm-10.228 6l.466-1h3.524l.467 1h-4.457zm14.228 3h-24l2-6h2.104l-1.33 4h18.45l-1.297-4h2.073l2 6zm-5-10h-14v-7h14v7z")},$it=function(t){t.append("defs").append("symbol").attr("id","clock").attr("width","24").attr("height","24").append("path").attr("transform","scale(.5)").attr("d","M12 2c5.514 0 10 4.486 10 10s-4.486 10-10 10-10-4.486-10-10 4.486-10 10-10zm0-2c-6.627 0-12 5.373-12 12s5.373 12 12 12 12-5.373 12-12-5.373-12-12-12zm5.848 12.459c.202.038.202.333.001.372-1.907.361-6.045 1.111-6.547 1.111-.719 0-1.301-.582-1.301-1.301 0-.512.77-5.447 1.125-7.445.034-.192.312-.181.343.014l.985 6.238 5.394 1.011z")},Xit=function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",9).attr("refY",5).attr("markerUnits","userSpaceOnUse").attr("markerWidth",12).attr("markerHeight",12).attr("orient","auto").append("path").attr("d","M 0 0 L 10 5 L 0 10 z")},Kit=function(t){t.append("defs").append("marker").attr("id","filled-head").attr("refX",18).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 18,7 L9,13 L14,7 L9,1 Z")},Zit=function(t){t.append("defs").append("marker").attr("id","sequencenumber").attr("refX",15).attr("refY",15).attr("markerWidth",60).attr("markerHeight",40).attr("orient","auto").append("circle").attr("cx",15).attr("cy",15).attr("r",6)},Qit=function(t){const r=t.append("defs").append("marker").attr("id","crosshead").attr("markerWidth",15).attr("markerHeight",8).attr("orient","auto").attr("refX",16).attr("refY",4);r.append("path").attr("fill","black").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 9,2 V 6 L16,4 Z"),r.append("path").attr("fill","none").attr("stroke","#000000").style("stroke-dasharray","0, 0").attr("stroke-width","1px").attr("d","M 0,1 L 6,7 M 6,1 L 0,7")},K4=function(){return{x:0,y:0,fill:void 0,anchor:void 0,style:"#666",width:void 0,height:void 0,textMargin:0,rx:0,ry:0,tspan:!0,valign:void 0}},f0=function(){return{x:0,y:0,fill:"#EDF2AE",stroke:"#666",width:100,anchor:"start",height:100,rx:0,ry:0}},wL=function(){function t(i,a,s,o,l,u,h){const d=a.append("text").attr("x",s+l/2).attr("y",o+u/2+5).style("text-anchor","middle").text(i);n(d,h)}function e(i,a,s,o,l,u,h,d){const{actorFontSize:f,actorFontFamily:p,actorFontWeight:m}=d;let _=f&&f.replace?f.replace("px",""):f;const y=i.split(pe.lineBreakRegex);for(let b=0;b<y.length;b++){const x=b*_-_*(y.length-1)/2,k=a.append("text").attr("x",s+l/2).attr("y",o).style("text-anchor","middle").style("font-size",f).style("font-weight",m).style("font-family",p);k.append("tspan").attr("x",s+l/2).attr("dy",x).text(y[b]),k.attr("y",o+u/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(k,h)}}function r(i,a,s,o,l,u,h,d){const f=a.append("switch"),m=f.append("foreignObject").attr("x",s).attr("y",o).attr("width",l).attr("height",u).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");m.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,f,s,o,l,u,h,d),n(m,h)}function n(i,a){for(const s in a)a.hasOwnProperty(s)&&i.attr(s,a[s])}return function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?t:e}}(),Jit=function(){function t(i,a,s,o,l,u,h){const d=a.append("text").attr("x",s).attr("y",o).style("text-anchor","start").text(i);n(d,h)}function e(i,a,s,o,l,u,h,d){const{actorFontSize:f,actorFontFamily:p,actorFontWeight:m}=d,_=i.split(pe.lineBreakRegex);for(let y=0;y<_.length;y++){const b=y*f-f*(_.length-1)/2,x=a.append("text").attr("x",s).attr("y",o).style("text-anchor","start").style("font-size",f).style("font-weight",m).style("font-family",p);x.append("tspan").attr("x",s).attr("dy",b).text(_[y]),x.attr("y",o+u/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(x,h)}}function r(i,a,s,o,l,u,h,d){const f=a.append("switch"),m=f.append("foreignObject").attr("x",s).attr("y",o).attr("width",l).attr("height",u).append("xhtml:div").style("display","table").style("height","100%").style("width","100%");m.append("div").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,f,s,o,l,u,h,d),n(m,h)}function n(i,a){for(const s in a)a.hasOwnProperty(s)&&i.attr(s,a[s])}return function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?t:e}}(),or={drawRect:h0,drawText:hl,drawLabel:xL,drawActor:zit,drawPopup:Bit,drawImage:_L,drawEmbeddedImage:vL,anchorElement:Yit,drawActivation:Uit,drawLoop:Wit,drawBackgroundRect:Hit,insertArrowHead:Xit,insertArrowFilledHead:Kit,insertSequenceNumber:Zit,insertArrowCrossHead:Qit,insertDatabaseIcon:Git,insertComputerIcon:jit,insertClockIcon:$it,getTextObj:K4,getNoteRect:f0,popupMenu:Dit,popdownMenu:Oit,fixLifeLineHeights:kL,sanitizeUrl:ki};let dt={};const Bt={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],activations:[],models:{getHeight:function(){return Math.max.apply(null,this.actors.length===0?[0]:this.actors.map(t=>t.height||0))+(this.loops.length===0?0:this.loops.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.messages.length===0?0:this.messages.map(t=>t.height||0).reduce((t,e)=>t+e))+(this.notes.length===0?0:this.notes.map(t=>t.height||0).reduce((t,e)=>t+e))},clear:function(){this.actors=[],this.loops=[],this.messages=[],this.notes=[]},addActor:function(t){this.actors.push(t)},addLoop:function(t){this.loops.push(t)},addMessage:function(t){this.messages.push(t)},addNote:function(t){this.notes.push(t)},lastActor:function(){return this.actors[this.actors.length-1]},lastLoop:function(){return this.loops[this.loops.length-1]},lastMessage:function(){return this.messages[this.messages.length-1]},lastNote:function(){return this.notes[this.notes.length-1]},actors:[],loops:[],messages:[],notes:[]},init:function(){this.sequenceItems=[],this.activations=[],this.models.clear(),this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0,EL(nt())},updateVal:function(t,e,r,n){typeof t[e]>"u"?t[e]=r:t[e]=n(r,t[e])},updateBounds:function(t,e,r,n){const i=this;let a=0;function s(o){return function(u){a++;const h=i.sequenceItems.length-a+1;i.updateVal(u,"starty",e-h*dt.boxMargin,Math.min),i.updateVal(u,"stopy",n+h*dt.boxMargin,Math.max),i.updateVal(Bt.data,"startx",t-h*dt.boxMargin,Math.min),i.updateVal(Bt.data,"stopx",r+h*dt.boxMargin,Math.max),o!=="activation"&&(i.updateVal(u,"startx",t-h*dt.boxMargin,Math.min),i.updateVal(u,"stopx",r+h*dt.boxMargin,Math.max),i.updateVal(Bt.data,"starty",e-h*dt.boxMargin,Math.min),i.updateVal(Bt.data,"stopy",n+h*dt.boxMargin,Math.max))}}this.sequenceItems.forEach(s()),this.activations.forEach(s("activation"))},insert:function(t,e,r,n){const i=Math.min(t,r),a=Math.max(t,r),s=Math.min(e,n),o=Math.max(e,n);this.updateVal(Bt.data,"startx",i,Math.min),this.updateVal(Bt.data,"starty",s,Math.min),this.updateVal(Bt.data,"stopx",a,Math.max),this.updateVal(Bt.data,"stopy",o,Math.max),this.updateBounds(i,s,a,o)},newActivation:function(t,e,r){const n=r[t.from.actor],i=d0(t.from.actor).length||0,a=n.x+n.width/2+(i-1)*dt.activationWidth/2;this.activations.push({startx:a,starty:this.verticalPos+2,stopx:a+dt.activationWidth,stopy:void 0,actor:t.from.actor,anchored:or.anchorElement(e)})},endActivation:function(t){const e=this.activations.map(function(r){return r.actor}).lastIndexOf(t.from.actor);return this.activations.splice(e,1)[0]},createLoop:function(t={message:void 0,wrap:!1,width:void 0},e){return{startx:void 0,starty:this.verticalPos,stopx:void 0,stopy:void 0,title:t.message,wrap:t.wrap,width:t.width,height:0,fill:e}},newLoop:function(t={message:void 0,wrap:!1,width:void 0},e){this.sequenceItems.push(this.createLoop(t,e))},endLoop:function(){return this.sequenceItems.pop()},addSectionToLoop:function(t){const e=this.sequenceItems.pop();e.sections=e.sections||[],e.sectionTitles=e.sectionTitles||[],e.sections.push({y:Bt.getVerticalPos(),height:0}),e.sectionTitles.push(t),this.sequenceItems.push(e)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return{bounds:this.data,models:this.models}}},tat=function(t,e){Bt.bumpVerticalPos(dt.boxMargin),e.height=dt.boxMargin,e.starty=Bt.getVerticalPos();const r=or.getNoteRect();r.x=e.startx,r.y=e.starty,r.width=e.width||dt.width,r.class="note";const n=t.append("g"),i=or.drawRect(n,r),a=or.getTextObj();a.x=e.startx,a.y=e.starty,a.width=r.width,a.dy="1em",a.text=e.message,a.class="noteText",a.fontFamily=dt.noteFontFamily,a.fontSize=dt.noteFontSize,a.fontWeight=dt.noteFontWeight,a.anchor=dt.noteAlign,a.textMargin=dt.noteMargin,a.valign="center";const s=hl(n,a),o=Math.round(s.map(l=>(l._groups||l)[0][0].getBBox().height).reduce((l,u)=>l+u));i.attr("height",o+2*dt.noteMargin),e.height+=o+2*dt.noteMargin,Bt.bumpVerticalPos(o+2*dt.noteMargin),e.stopy=e.starty+o+2*dt.noteMargin,e.stopx=e.startx+r.width,Bt.insert(e.startx,e.starty,e.stopx,e.stopy),Bt.models.addNote(e)},fl=t=>({fontFamily:t.messageFontFamily,fontSize:t.messageFontSize,fontWeight:t.messageFontWeight}),dl=t=>({fontFamily:t.noteFontFamily,fontSize:t.noteFontSize,fontWeight:t.noteFontWeight}),Z4=t=>({fontFamily:t.actorFontFamily,fontSize:t.actorFontSize,fontWeight:t.actorFontWeight}),eat=function(t,e){Bt.bumpVerticalPos(10);const{startx:r,stopx:n,message:i}=e,a=pe.splitBreaks(i).length,s=Se.calculateTextDimensions(i,fl(dt)),o=s.height/a;e.height+=o,Bt.bumpVerticalPos(o);let l,u=s.height-10;const h=s.width;if(r===n){l=Bt.getVerticalPos()+u,dt.rightAngles||(u+=dt.boxMargin,l=Bt.getVerticalPos()+u),u+=30;const d=Math.max(h/2,dt.width/2);Bt.insert(r-d,Bt.getVerticalPos()-10+u,n+d,Bt.getVerticalPos()+30+u)}else u+=dt.boxMargin,l=Bt.getVerticalPos()+u,Bt.insert(r,l-10,n,l);return Bt.bumpVerticalPos(u),e.height+=u,e.stopy=e.starty+e.height,Bt.insert(e.fromBounds,e.starty,e.toBounds,e.stopy),l},rat=function(t,e,r,n){const{startx:i,stopx:a,starty:s,message:o,type:l,sequenceIndex:u,sequenceVisible:h}=e,d=Se.calculateTextDimensions(o,fl(dt)),f=or.getTextObj();f.x=i,f.y=s+10,f.width=a-i,f.class="messageText",f.dy="1em",f.text=o,f.fontFamily=dt.messageFontFamily,f.fontSize=dt.messageFontSize,f.fontWeight=dt.messageFontWeight,f.anchor=dt.messageAlign,f.valign="center",f.textMargin=dt.wrapPadding,f.tspan=!1,hl(t,f);const p=d.width;let m;i===a?dt.rightAngles?m=t.append("path").attr("d",`M ${i},${r} H ${i+Math.max(dt.width/2,p/2)} V ${r+25} H ${i}`):m=t.append("path").attr("d","M "+i+","+r+" C "+(i+60)+","+(r-10)+" "+(i+60)+","+(r+30)+" "+i+","+(r+20)):(m=t.append("line"),m.attr("x1",i),m.attr("y1",r),m.attr("x2",a),m.attr("y2",r)),l===n.db.LINETYPE.DOTTED||l===n.db.LINETYPE.DOTTED_CROSS||l===n.db.LINETYPE.DOTTED_POINT||l===n.db.LINETYPE.DOTTED_OPEN?(m.style("stroke-dasharray","3, 3"),m.attr("class","messageLine1")):m.attr("class","messageLine0");let _="";dt.arrowMarkerAbsolute&&(_=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,_=_.replace(/\(/g,"\\("),_=_.replace(/\)/g,"\\)")),m.attr("stroke-width",2),m.attr("stroke","none"),m.style("fill","none"),(l===n.db.LINETYPE.SOLID||l===n.db.LINETYPE.DOTTED)&&m.attr("marker-end","url("+_+"#arrowhead)"),(l===n.db.LINETYPE.SOLID_POINT||l===n.db.LINETYPE.DOTTED_POINT)&&m.attr("marker-end","url("+_+"#filled-head)"),(l===n.db.LINETYPE.SOLID_CROSS||l===n.db.LINETYPE.DOTTED_CROSS)&&m.attr("marker-end","url("+_+"#crosshead)"),(h||dt.showSequenceNumbers)&&(m.attr("marker-start","url("+_+"#sequencenumber)"),t.append("text").attr("x",i).attr("y",r+4).attr("font-family","sans-serif").attr("font-size","12px").attr("text-anchor","middle").attr("class","sequenceNumber").text(u))},Q4=function(t,e,r,n,i,a){if(i.hideUnusedParticipants===!0){const u=new Set;a.forEach(h=>{u.add(h.from),u.add(h.to)}),r=r.filter(h=>u.has(h))}let s=0,o=0,l=0;for(let u=0;u<r.length;u++){const h=e[r[u]];h.width=h.width||dt.width,h.height=Math.max(h.height||dt.height,dt.height),h.margin=h.margin||dt.actorMargin,h.x=s+o,h.y=n;const d=or.drawActor(t,h,dt);l=Math.max(l,d),Bt.insert(h.x,n,h.x+h.width,h.height),s+=h.width,o+=h.margin,Bt.models.addActor(h)}Bt.bumpVerticalPos(l)},TL=function(t,e,r,n){let i=0,a=0;for(let s=0;s<r.length;s++){const o=e[r[s]],l=aat(o),u=or.drawPopup(t,o,l,dt,dt.forceMenus,n);u.height>i&&(i=u.height),u.width+o.x>a&&(a=u.width+o.x)}return{maxHeight:i,maxWidth:a}},EL=function(t){fr(dt,t),t.fontFamily&&(dt.actorFontFamily=dt.noteFontFamily=dt.messageFontFamily=t.fontFamily),t.fontSize&&(dt.actorFontSize=dt.noteFontSize=dt.messageFontSize=t.fontSize),t.fontWeight&&(dt.actorFontWeight=dt.noteFontWeight=dt.messageFontWeight=t.fontWeight)},d0=function(t){return Bt.activations.filter(function(e){return e.actor===t})},CL=function(t,e){const r=e[t],n=d0(t),i=n.reduce(function(s,o){return Math.min(s,o.startx)},r.x+r.width/2),a=n.reduce(function(s,o){return Math.max(s,o.stopx)},r.x+r.width/2);return[i,a]};function Ui(t,e,r,n,i){Bt.bumpVerticalPos(r);let a=n;if(e.id&&e.message&&t[e.id]){const s=t[e.id].width,o=fl(dt);e.message=Se.wrapLabel(`[${e.message}]`,s-2*dt.wrapPadding,o),e.width=s,e.wrap=!0;const l=Se.calculateTextDimensions(e.message,o),u=Math.max(l.height,dt.labelBoxHeight);a=n+u,H.debug(`${u} - ${e.message}`)}i(e),Bt.bumpVerticalPos(a)}const nat=function(t,e,r,n){const{securityLevel:i,sequence:a}=nt();dt=a;let s;i==="sandbox"&&(s=St("#i"+e));const o=St(i==="sandbox"?s.nodes()[0].contentDocument.body:"body"),l=i==="sandbox"?s.nodes()[0].contentDocument:document;Bt.init(),H.debug(n.db);const u=i==="sandbox"?o.select(`[id="${e}"]`):St(`[id="${e}"]`),h=n.db.getActors(),d=n.db.getActorKeys(),f=n.db.getMessages(),p=n.db.getDiagramTitle(),m=iat(h,f,n);dt.height=sat(h,m),or.insertComputerIcon(u),or.insertDatabaseIcon(u),or.insertClockIcon(u),Q4(u,h,d,0,dt,f);const _=cat(f,h,m,n);or.insertArrowHead(u),or.insertArrowCrossHead(u),or.insertArrowFilledHead(u),or.insertSequenceNumber(u);function y(B,w){const D=Bt.endActivation(B);D.starty+18>w&&(D.starty=w-6,w+=12),or.drawActivation(u,D,w,dt,d0(B.from.actor).length),Bt.insert(D.startx,w-10,D.stopx,w)}let b=1,x=1;const k=[];f.forEach(function(B){let w,D,N;switch(B.type){case n.db.LINETYPE.NOTE:D=B.noteModel,tat(u,D);break;case n.db.LINETYPE.ACTIVE_START:Bt.newActivation(B,u,h);break;case n.db.LINETYPE.ACTIVE_END:y(B,Bt.getVerticalPos());break;case n.db.LINETYPE.LOOP_START:Ui(_,B,dt.boxMargin,dt.boxMargin+dt.boxTextMargin,z=>Bt.newLoop(z));break;case n.db.LINETYPE.LOOP_END:w=Bt.endLoop(),or.drawLoop(u,w,"loop",dt),Bt.bumpVerticalPos(w.stopy-Bt.getVerticalPos()),Bt.models.addLoop(w);break;case n.db.LINETYPE.RECT_START:Ui(_,B,dt.boxMargin,dt.boxMargin,z=>Bt.newLoop(void 0,z.message));break;case n.db.LINETYPE.RECT_END:w=Bt.endLoop(),or.drawBackgroundRect(u,w),Bt.models.addLoop(w),Bt.bumpVerticalPos(w.stopy-Bt.getVerticalPos());break;case n.db.LINETYPE.OPT_START:Ui(_,B,dt.boxMargin,dt.boxMargin+dt.boxTextMargin,z=>Bt.newLoop(z));break;case n.db.LINETYPE.OPT_END:w=Bt.endLoop(),or.drawLoop(u,w,"opt",dt),Bt.bumpVerticalPos(w.stopy-Bt.getVerticalPos()),Bt.models.addLoop(w);break;case n.db.LINETYPE.ALT_START:Ui(_,B,dt.boxMargin,dt.boxMargin+dt.boxTextMargin,z=>Bt.newLoop(z));break;case n.db.LINETYPE.ALT_ELSE:Ui(_,B,dt.boxMargin+dt.boxTextMargin,dt.boxMargin,z=>Bt.addSectionToLoop(z));break;case n.db.LINETYPE.ALT_END:w=Bt.endLoop(),or.drawLoop(u,w,"alt",dt),Bt.bumpVerticalPos(w.stopy-Bt.getVerticalPos()),Bt.models.addLoop(w);break;case n.db.LINETYPE.PAR_START:Ui(_,B,dt.boxMargin,dt.boxMargin+dt.boxTextMargin,z=>Bt.newLoop(z));break;case n.db.LINETYPE.PAR_AND:Ui(_,B,dt.boxMargin+dt.boxTextMargin,dt.boxMargin,z=>Bt.addSectionToLoop(z));break;case n.db.LINETYPE.PAR_END:w=Bt.endLoop(),or.drawLoop(u,w,"par",dt),Bt.bumpVerticalPos(w.stopy-Bt.getVerticalPos()),Bt.models.addLoop(w);break;case n.db.LINETYPE.AUTONUMBER:b=B.message.start||b,x=B.message.step||x,B.message.visible?n.db.enableSequenceNumbers():n.db.disableSequenceNumbers();break;case n.db.LINETYPE.CRITICAL_START:Ui(_,B,dt.boxMargin,dt.boxMargin+dt.boxTextMargin,z=>Bt.newLoop(z));break;case n.db.LINETYPE.CRITICAL_OPTION:Ui(_,B,dt.boxMargin+dt.boxTextMargin,dt.boxMargin,z=>Bt.addSectionToLoop(z));break;case n.db.LINETYPE.CRITICAL_END:w=Bt.endLoop(),or.drawLoop(u,w,"critical",dt),Bt.bumpVerticalPos(w.stopy-Bt.getVerticalPos()),Bt.models.addLoop(w);break;case n.db.LINETYPE.BREAK_START:Ui(_,B,dt.boxMargin,dt.boxMargin+dt.boxTextMargin,z=>Bt.newLoop(z));break;case n.db.LINETYPE.BREAK_END:w=Bt.endLoop(),or.drawLoop(u,w,"break",dt),Bt.bumpVerticalPos(w.stopy-Bt.getVerticalPos()),Bt.models.addLoop(w);break;default:try{N=B.msgModel,N.starty=Bt.getVerticalPos(),N.sequenceIndex=b,N.sequenceVisible=n.db.showSequenceNumbers();const z=eat(u,N);k.push({messageModel:N,lineStarty:z}),Bt.models.addMessage(N)}catch(z){H.error("error while drawing message",z)}}[n.db.LINETYPE.SOLID_OPEN,n.db.LINETYPE.DOTTED_OPEN,n.db.LINETYPE.SOLID,n.db.LINETYPE.DOTTED,n.db.LINETYPE.SOLID_CROSS,n.db.LINETYPE.DOTTED_CROSS,n.db.LINETYPE.SOLID_POINT,n.db.LINETYPE.DOTTED_POINT].includes(B.type)&&(b=b+x)}),k.forEach(B=>rat(u,B.messageModel,B.lineStarty,n)),dt.mirrorActors&&(Bt.bumpVerticalPos(dt.boxMargin*2),Q4(u,h,d,Bt.getVerticalPos(),dt,f),Bt.bumpVerticalPos(dt.boxMargin),kL(u,Bt.getVerticalPos()));const T=TL(u,h,d,l),{bounds:C}=Bt.getBounds();H.debug("For line height fix Querying: #"+e+" .actor-line"),Iu("#"+e+" .actor-line").attr("y2",C.stopy);let S=C.stopy-C.starty;S<T.maxHeight&&(S=T.maxHeight);let R=S+2*dt.diagramMarginY;dt.mirrorActors&&(R=R-dt.boxMargin+dt.bottomMarginAdj);let A=C.stopx-C.startx;A<T.maxWidth&&(A=T.maxWidth);const L=A+2*dt.diagramMarginX;p&&u.append("text").text(p).attr("x",(C.stopx-C.startx)/2-2*dt.diagramMarginX).attr("y",-25),li(u,R,L,dt.useMaxWidth);const v=p?40:0;u.attr("viewBox",C.startx-dt.diagramMarginX+" -"+(dt.diagramMarginY+v)+" "+L+" "+(R+v)),bn(n.db,u,e),H.debug("models:",Bt.models)},iat=function(t,e,r){const n={};return e.forEach(function(i){if(t[i.to]&&t[i.from]){const a=t[i.to];if(i.placement===r.db.PLACEMENT.LEFTOF&&!a.prevActor||i.placement===r.db.PLACEMENT.RIGHTOF&&!a.nextActor)return;const s=i.placement!==void 0,o=!s,l=s?dl(dt):fl(dt),u=i.wrap?Se.wrapLabel(i.message,dt.width-2*dt.wrapPadding,l):i.message,d=Se.calculateTextDimensions(u,l).width+2*dt.wrapPadding;o&&i.from===a.nextActor?n[i.to]=Math.max(n[i.to]||0,d):o&&i.from===a.prevActor?n[i.from]=Math.max(n[i.from]||0,d):o&&i.from===i.to?(n[i.from]=Math.max(n[i.from]||0,d/2),n[i.to]=Math.max(n[i.to]||0,d/2)):i.placement===r.db.PLACEMENT.RIGHTOF?n[i.from]=Math.max(n[i.from]||0,d):i.placement===r.db.PLACEMENT.LEFTOF?n[a.prevActor]=Math.max(n[a.prevActor]||0,d):i.placement===r.db.PLACEMENT.OVER&&(a.prevActor&&(n[a.prevActor]=Math.max(n[a.prevActor]||0,d/2)),a.nextActor&&(n[i.from]=Math.max(n[i.from]||0,d/2)))}}),H.debug("maxMessageWidthPerActor:",n),n},aat=function(t){let e=0;const r=Z4(dt);for(const n in t.links){const a=Se.calculateTextDimensions(n,r).width+2*dt.wrapPadding+2*dt.boxMargin;e<a&&(e=a)}return e},sat=function(t,e){let r=0;Object.keys(t).forEach(n=>{const i=t[n];i.wrap&&(i.description=Se.wrapLabel(i.description,dt.width-2*dt.wrapPadding,Z4(dt)));const a=Se.calculateTextDimensions(i.description,Z4(dt));i.width=i.wrap?dt.width:Math.max(dt.width,a.width+2*dt.wrapPadding),i.height=i.wrap?Math.max(a.height,dt.height):dt.height,r=Math.max(r,i.height)});for(const n in e){const i=t[n];if(!i)continue;const a=t[i.nextActor];if(!a)continue;const o=e[n]+dt.actorMargin-i.width/2-a.width/2;i.margin=Math.max(o,dt.actorMargin)}return Math.max(r,dt.height)},oat=function(t,e,r){const n=e[t.from].x,i=e[t.to].x,a=t.wrap&&t.message;let s=Se.calculateTextDimensions(a?Se.wrapLabel(t.message,dt.width,dl(dt)):t.message,dl(dt));const o={width:a?dt.width:Math.max(dt.width,s.width+2*dt.noteMargin),height:0,startx:e[t.from].x,stopx:0,starty:0,stopy:0,message:t.message};return t.placement===r.db.PLACEMENT.RIGHTOF?(o.width=a?Math.max(dt.width,s.width):Math.max(e[t.from].width/2+e[t.to].width/2,s.width+2*dt.noteMargin),o.startx=n+(e[t.from].width+dt.actorMargin)/2):t.placement===r.db.PLACEMENT.LEFTOF?(o.width=Math.max(a?dt.width:e[t.from].width/2+e[t.to].width/2,s.width+2*dt.noteMargin),o.startx=n-o.width+(e[t.from].width-dt.actorMargin)/2):t.to===t.from?(s=Se.calculateTextDimensions(a?Se.wrapLabel(t.message,Math.max(dt.width,e[t.from].width),dl(dt)):t.message,dl(dt)),o.width=a?Math.max(dt.width,e[t.from].width):Math.max(e[t.from].width,dt.width,s.width+2*dt.noteMargin),o.startx=n+(e[t.from].width-o.width)/2):(o.width=Math.abs(n+e[t.from].width/2-(i+e[t.to].width/2))+dt.actorMargin,o.startx=n<i?n+e[t.from].width/2-dt.actorMargin/2:i+e[t.to].width/2-dt.actorMargin/2),a&&(o.message=Se.wrapLabel(t.message,o.width-2*dt.wrapPadding,dl(dt))),H.debug(`NM:[${o.startx},${o.stopx},${o.starty},${o.stopy}:${o.width},${o.height}=${t.message}]`),o},lat=function(t,e,r){let n=!1;if([r.db.LINETYPE.SOLID_OPEN,r.db.LINETYPE.DOTTED_OPEN,r.db.LINETYPE.SOLID,r.db.LINETYPE.DOTTED,r.db.LINETYPE.SOLID_CROSS,r.db.LINETYPE.DOTTED_CROSS,r.db.LINETYPE.SOLID_POINT,r.db.LINETYPE.DOTTED_POINT].includes(t.type)&&(n=!0),!n)return{};const i=CL(t.from,e),a=CL(t.to,e),s=i[0]<=a[0]?1:0,o=i[0]<a[0]?0:1,l=i.concat(a),u=Math.abs(a[o]-i[s]);t.wrap&&t.message&&(t.message=Se.wrapLabel(t.message,Math.max(u+2*dt.wrapPadding,dt.width),fl(dt)));const h=Se.calculateTextDimensions(t.message,fl(dt));return{width:Math.max(t.wrap?0:h.width+2*dt.wrapPadding,u+2*dt.wrapPadding,dt.width),height:0,startx:i[s],stopx:a[o],starty:0,stopy:0,message:t.message,type:t.type,wrap:t.wrap,fromBounds:Math.min.apply(null,l),toBounds:Math.max.apply(null,l)}},cat=function(t,e,r,n){const i={},a=[];let s,o,l;return t.forEach(function(u){switch(u.id=Se.random({length:10}),u.type){case n.db.LINETYPE.LOOP_START:case n.db.LINETYPE.ALT_START:case n.db.LINETYPE.OPT_START:case n.db.LINETYPE.PAR_START:case n.db.LINETYPE.CRITICAL_START:case n.db.LINETYPE.BREAK_START:a.push({id:u.id,msg:u.message,from:Number.MAX_SAFE_INTEGER,to:Number.MIN_SAFE_INTEGER,width:0});break;case n.db.LINETYPE.ALT_ELSE:case n.db.LINETYPE.PAR_AND:case n.db.LINETYPE.CRITICAL_OPTION:u.message&&(s=a.pop(),i[s.id]=s,i[u.id]=s,a.push(s));break;case n.db.LINETYPE.LOOP_END:case n.db.LINETYPE.ALT_END:case n.db.LINETYPE.OPT_END:case n.db.LINETYPE.PAR_END:case n.db.LINETYPE.CRITICAL_END:case n.db.LINETYPE.BREAK_END:s=a.pop(),i[s.id]=s;break;case n.db.LINETYPE.ACTIVE_START:{const d=e[u.from?u.from.actor:u.to.actor],f=d0(u.from?u.from.actor:u.to.actor).length,p=d.x+d.width/2+(f-1)*dt.activationWidth/2,m={startx:p,stopx:p+dt.activationWidth,actor:u.from.actor,enabled:!0};Bt.activations.push(m)}break;case n.db.LINETYPE.ACTIVE_END:{const d=Bt.activations.map(f=>f.actor).lastIndexOf(u.from.actor);delete Bt.activations.splice(d,1)[0]}break}u.placement!==void 0?(o=oat(u,e,n),u.noteModel=o,a.forEach(d=>{s=d,s.from=Math.min(s.from,o.startx),s.to=Math.max(s.to,o.startx+o.width),s.width=Math.max(s.width,Math.abs(s.from-s.to))-dt.labelBoxWidth})):(l=lat(u,e,n),u.msgModel=l,l.startx&&l.stopx&&a.length>0&&a.forEach(d=>{if(s=d,l.startx===l.stopx){const f=e[u.from],p=e[u.to];s.from=Math.min(f.x-l.width/2,f.x-f.width/2,s.from),s.to=Math.max(p.x+l.width/2,p.x+f.width/2,s.to),s.width=Math.max(s.width,Math.abs(s.to-s.from))-dt.labelBoxWidth}else s.from=Math.min(l.startx,s.from),s.to=Math.max(l.stopx,s.to),s.width=Math.max(s.width,l.width)-dt.labelBoxWidth}))}),Bt.activations=[],H.debug("Loop type widths:",i),i},SL={bounds:Bt,drawActors:Q4,drawActorsPopup:TL,setConf:EL,draw:nat};var p0=function(){var t=function(ct,J,Y,$){for(Y=Y||{},$=ct.length;$--;Y[ct[$]]=J);return Y},e=[1,2],r=[1,3],n=[1,5],i=[1,7],a=[2,5],s=[1,15],o=[1,17],l=[1,19],u=[1,20],h=[1,21],d=[1,22],f=[1,33],p=[1,23],m=[1,24],_=[1,25],y=[1,26],b=[1,27],x=[1,30],k=[1,31],T=[1,32],C=[1,35],M=[1,36],S=[1,37],R=[1,38],A=[1,34],L=[1,41],v=[1,4,5,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],B=[1,4,5,12,13,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],w=[1,4,5,7,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],D=[4,5,14,15,17,19,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],N={trace:function(){},yy:{},symbols_:{error:2,start:3,SPACE:4,NL:5,directive:6,SD:7,document:8,line:9,statement:10,idStatement:11,DESCR:12,"-->":13,HIDE_EMPTY:14,scale:15,WIDTH:16,COMPOSIT_STATE:17,STRUCT_START:18,STRUCT_STOP:19,STATE_DESCR:20,AS:21,ID:22,FORK:23,JOIN:24,CHOICE:25,CONCURRENT:26,note:27,notePosition:28,NOTE_TEXT:29,direction:30,acc_title:31,acc_title_value:32,acc_descr:33,acc_descr_value:34,acc_descr_multiline_value:35,openDirective:36,typeDirective:37,closeDirective:38,":":39,argDirective:40,direction_tb:41,direction_bt:42,direction_rl:43,direction_lr:44,eol:45,";":46,EDGE_STATE:47,left_of:48,right_of:49,open_directive:50,type_directive:51,arg_directive:52,close_directive:53,$accept:0,$end:1},terminals_:{2:"error",4:"SPACE",5:"NL",7:"SD",12:"DESCR",13:"-->",14:"HIDE_EMPTY",15:"scale",16:"WIDTH",17:"COMPOSIT_STATE",18:"STRUCT_START",19:"STRUCT_STOP",20:"STATE_DESCR",21:"AS",22:"ID",23:"FORK",24:"JOIN",25:"CHOICE",26:"CONCURRENT",27:"note",29:"NOTE_TEXT",31:"acc_title",32:"acc_title_value",33:"acc_descr",34:"acc_descr_value",35:"acc_descr_multiline_value",39:":",41:"direction_tb",42:"direction_bt",43:"direction_rl",44:"direction_lr",46:";",47:"EDGE_STATE",48:"left_of",49:"right_of",50:"open_directive",51:"type_directive",52:"arg_directive",53:"close_directive"},productions_:[0,[3,2],[3,2],[3,2],[3,2],[8,0],[8,2],[9,2],[9,1],[9,1],[10,1],[10,2],[10,3],[10,4],[10,1],[10,2],[10,1],[10,4],[10,3],[10,6],[10,1],[10,1],[10,1],[10,1],[10,4],[10,4],[10,1],[10,1],[10,2],[10,2],[10,1],[6,3],[6,5],[30,1],[30,1],[30,1],[30,1],[45,1],[45,1],[11,1],[11,1],[28,1],[28,1],[36,1],[37,1],[40,1],[38,1]],performAction:function(J,Y,$,lt,ut,W,tt){var K=W.length-1;switch(ut){case 4:return lt.setRootDoc(W[K]),W[K];case 5:this.$=[];break;case 6:W[K]!="nl"&&(W[K-1].push(W[K]),this.$=W[K-1]);break;case 7:case 8:this.$=W[K];break;case 9:this.$="nl";break;case 10:this.$={stmt:"state",id:W[K],type:"default",description:""};break;case 11:this.$={stmt:"state",id:W[K-1],type:"default",description:lt.trimColon(W[K])};break;case 12:this.$={stmt:"relation",state1:{stmt:"state",id:W[K-2],type:"default",description:""},state2:{stmt:"state",id:W[K],type:"default",description:""}};break;case 13:this.$={stmt:"relation",state1:{stmt:"state",id:W[K-3],type:"default",description:""},state2:{stmt:"state",id:W[K-1],type:"default",description:""},description:W[K].substr(1).trim()};break;case 17:this.$={stmt:"state",id:W[K-3],type:"default",description:"",doc:W[K-1]};break;case 18:var it=W[K],Z=W[K-2].trim();if(W[K].match(":")){var V=W[K].split(":");it=V[0],Z=[Z,V[1]]}this.$={stmt:"state",id:it,type:"default",description:Z};break;case 19:this.$={stmt:"state",id:W[K-3],type:"default",description:W[K-5],doc:W[K-1]};break;case 20:this.$={stmt:"state",id:W[K],type:"fork"};break;case 21:this.$={stmt:"state",id:W[K],type:"join"};break;case 22:this.$={stmt:"state",id:W[K],type:"choice"};break;case 23:this.$={stmt:"state",id:lt.getDividerId(),type:"divider"};break;case 24:this.$={stmt:"state",id:W[K-1].trim(),note:{position:W[K-2].trim(),text:W[K].trim()}};break;case 28:this.$=W[K].trim(),lt.setAccTitle(this.$);break;case 29:case 30:this.$=W[K].trim(),lt.setAccDescription(this.$);break;case 33:lt.setDirection("TB"),this.$={stmt:"dir",value:"TB"};break;case 34:lt.setDirection("BT"),this.$={stmt:"dir",value:"BT"};break;case 35:lt.setDirection("RL"),this.$={stmt:"dir",value:"RL"};break;case 36:lt.setDirection("LR"),this.$={stmt:"dir",value:"LR"};break;case 39:case 40:this.$=W[K];break;case 43:lt.parseDirective("%%{","open_directive");break;case 44:lt.parseDirective(W[K],"type_directive");break;case 45:W[K]=W[K].trim().replace(/'/g,'"'),lt.parseDirective(W[K],"arg_directive");break;case 46:lt.parseDirective("}%%","close_directive","state");break}},table:[{3:1,4:e,5:r,6:4,7:n,36:6,50:i},{1:[3]},{3:8,4:e,5:r,6:4,7:n,36:6,50:i},{3:9,4:e,5:r,6:4,7:n,36:6,50:i},{3:10,4:e,5:r,6:4,7:n,36:6,50:i},t([1,4,5,14,15,17,20,22,23,24,25,26,27,31,33,35,41,42,43,44,47,50],a,{8:11}),{37:12,51:[1,13]},{51:[2,43]},{1:[2,1]},{1:[2,2]},{1:[2,3]},{1:[2,4],4:s,5:o,6:28,9:14,10:16,11:18,14:l,15:u,17:h,20:d,22:f,23:p,24:m,25:_,26:y,27:b,30:29,31:x,33:k,35:T,36:6,41:C,42:M,43:S,44:R,47:A,50:i},{38:39,39:[1,40],53:L},t([39,53],[2,44]),t(v,[2,6]),{6:28,10:42,11:18,14:l,15:u,17:h,20:d,22:f,23:p,24:m,25:_,26:y,27:b,30:29,31:x,33:k,35:T,36:6,41:C,42:M,43:S,44:R,47:A,50:i},t(v,[2,8]),t(v,[2,9]),t(v,[2,10],{12:[1,43],13:[1,44]}),t(v,[2,14]),{16:[1,45]},t(v,[2,16],{18:[1,46]}),{21:[1,47]},t(v,[2,20]),t(v,[2,21]),t(v,[2,22]),t(v,[2,23]),{28:48,29:[1,49],48:[1,50],49:[1,51]},t(v,[2,26]),t(v,[2,27]),{32:[1,52]},{34:[1,53]},t(v,[2,30]),t(B,[2,39]),t(B,[2,40]),t(v,[2,33]),t(v,[2,34]),t(v,[2,35]),t(v,[2,36]),t(w,[2,31]),{40:54,52:[1,55]},t(w,[2,46]),t(v,[2,7]),t(v,[2,11]),{11:56,22:f,47:A},t(v,[2,15]),t(D,a,{8:57}),{22:[1,58]},{22:[1,59]},{21:[1,60]},{22:[2,41]},{22:[2,42]},t(v,[2,28]),t(v,[2,29]),{38:61,53:L},{53:[2,45]},t(v,[2,12],{12:[1,62]}),{4:s,5:o,6:28,9:14,10:16,11:18,14:l,15:u,17:h,19:[1,63],20:d,22:f,23:p,24:m,25:_,26:y,27:b,30:29,31:x,33:k,35:T,36:6,41:C,42:M,43:S,44:R,47:A,50:i},t(v,[2,18],{18:[1,64]}),{29:[1,65]},{22:[1,66]},t(w,[2,32]),t(v,[2,13]),t(v,[2,17]),t(D,a,{8:67}),t(v,[2,24]),t(v,[2,25]),{4:s,5:o,6:28,9:14,10:16,11:18,14:l,15:u,17:h,19:[1,68],20:d,22:f,23:p,24:m,25:_,26:y,27:b,30:29,31:x,33:k,35:T,36:6,41:C,42:M,43:S,44:R,47:A,50:i},t(v,[2,19])],defaultActions:{7:[2,43],8:[2,1],9:[2,2],10:[2,3],50:[2,41],51:[2,42],55:[2,45]},parseError:function(J,Y){if(Y.recoverable)this.trace(J);else{var $=new Error(J);throw $.hash=Y,$}},parse:function(J){var Y=this,$=[0],lt=[],ut=[null],W=[],tt=this.table,K="",it=0,Z=0,V=2,Q=1,q=W.slice.call(arguments,1),U=Object.create(this.lexer),F={yy:{}};for(var j in this.yy)Object.prototype.hasOwnProperty.call(this.yy,j)&&(F.yy[j]=this.yy[j]);U.setInput(J,F.yy),F.yy.lexer=U,F.yy.parser=this,typeof U.yylloc>"u"&&(U.yylloc={});var P=U.yylloc;W.push(P);var et=U.options&&U.options.ranges;typeof F.yy.parseError=="function"?this.parseError=F.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function at(){var Dt;return Dt=lt.pop()||U.lex()||Q,typeof Dt!="number"&&(Dt instanceof Array&&(lt=Dt,Dt=lt.pop()),Dt=Y.symbols_[Dt]||Dt),Dt}for(var It,Lt,Rt,Ct,pt={},mt,vt,Tt,ft;;){if(Lt=$[$.length-1],this.defaultActions[Lt]?Rt=this.defaultActions[Lt]:((It===null||typeof It>"u")&&(It=at()),Rt=tt[Lt]&&tt[Lt][It]),typeof Rt>"u"||!Rt.length||!Rt[0]){var le="";ft=[];for(mt in tt[Lt])this.terminals_[mt]&&mt>V&&ft.push("'"+this.terminals_[mt]+"'");U.showPosition?le="Parse error on line "+(it+1)+`:
+`+U.showPosition()+`
+Expecting `+ft.join(", ")+", got '"+(this.terminals_[It]||It)+"'":le="Parse error on line "+(it+1)+": Unexpected "+(It==Q?"end of input":"'"+(this.terminals_[It]||It)+"'"),this.parseError(le,{text:U.match,token:this.terminals_[It]||It,line:U.yylineno,loc:P,expected:ft})}if(Rt[0]instanceof Array&&Rt.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Lt+", token: "+It);switch(Rt[0]){case 1:$.push(It),ut.push(U.yytext),W.push(U.yylloc),$.push(Rt[1]),It=null,Z=U.yyleng,K=U.yytext,it=U.yylineno,P=U.yylloc;break;case 2:if(vt=this.productions_[Rt[1]][1],pt.$=ut[ut.length-vt],pt._$={first_line:W[W.length-(vt||1)].first_line,last_line:W[W.length-1].last_line,first_column:W[W.length-(vt||1)].first_column,last_column:W[W.length-1].last_column},et&&(pt._$.range=[W[W.length-(vt||1)].range[0],W[W.length-1].range[1]]),Ct=this.performAction.apply(pt,[K,Z,it,F.yy,Rt[1],ut,W].concat(q)),typeof Ct<"u")return Ct;vt&&($=$.slice(0,-1*vt*2),ut=ut.slice(0,-1*vt),W=W.slice(0,-1*vt)),$.push(this.productions_[Rt[1]][0]),ut.push(pt.$),W.push(pt._$),Tt=tt[$[$.length-2]][$[$.length-1]],$.push(Tt);break;case 3:return!0}}return!0}},z=function(){var ct={EOF:1,parseError:function(Y,$){if(this.yy.parser)this.yy.parser.parseError(Y,$);else throw new Error(Y)},setInput:function(J,Y){return this.yy=Y||this.yy||{},this._input=J,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var J=this._input[0];this.yytext+=J,this.yyleng++,this.offset++,this.match+=J,this.matched+=J;var Y=J.match(/(?:\r\n?|\n).*/g);return Y?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),J},unput:function(J){var Y=J.length,$=J.split(/(?:\r\n?|\n)/g);this._input=J+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-Y),this.offset-=Y;var lt=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),$.length-1&&(this.yylineno-=$.length-1);var ut=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:$?($.length===lt.length?this.yylloc.first_column:0)+lt[lt.length-$.length].length-$[0].length:this.yylloc.first_column-Y},this.options.ranges&&(this.yylloc.range=[ut[0],ut[0]+this.yyleng-Y]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
+`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(J){this.unput(this.match.slice(J))},pastInput:function(){var J=this.matched.substr(0,this.matched.length-this.match.length);return(J.length>20?"...":"")+J.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var J=this.match;return J.length<20&&(J+=this._input.substr(0,20-J.length)),(J.substr(0,20)+(J.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var J=this.pastInput(),Y=new Array(J.length+1).join("-");return J+this.upcomingInput()+`
+`+Y+"^"},test_match:function(J,Y){var $,lt,ut;if(this.options.backtrack_lexer&&(ut={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(ut.yylloc.range=this.yylloc.range.slice(0))),lt=J[0].match(/(?:\r\n?|\n).*/g),lt&&(this.yylineno+=lt.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:lt?lt[lt.length-1].length-lt[lt.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+J[0].length},this.yytext+=J[0],this.match+=J[0],this.matches=J,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(J[0].length),this.matched+=J[0],$=this.performAction.call(this,this.yy,this,Y,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),$)return $;if(this._backtrack){for(var W in ut)this[W]=ut[W];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var J,Y,$,lt;this._more||(this.yytext="",this.match="");for(var ut=this._currentRules(),W=0;W<ut.length;W++)if($=this._input.match(this.rules[ut[W]]),$&&(!Y||$[0].length>Y[0].length)){if(Y=$,lt=W,this.options.backtrack_lexer){if(J=this.test_match($,ut[W]),J!==!1)return J;if(this._backtrack){Y=!1;continue}else return!1}else if(!this.options.flex)break}return Y?(J=this.test_match(Y,ut[lt]),J!==!1?J:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
+`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var Y=this.next();return Y||this.lex()},begin:function(Y){this.conditionStack.push(Y)},popState:function(){var Y=this.conditionStack.length-1;return Y>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(Y){return Y=this.conditionStack.length-1-Math.abs(Y||0),Y>=0?this.conditionStack[Y]:"INITIAL"},pushState:function(Y){this.begin(Y)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(Y,$,lt,ut){switch(lt){case 0:return 41;case 1:return 42;case 2:return 43;case 3:return 44;case 4:return this.begin("open_directive"),50;case 5:return this.begin("type_directive"),51;case 6:return this.popState(),this.begin("arg_directive"),39;case 7:return this.popState(),this.popState(),53;case 8:return 52;case 9:break;case 10:break;case 11:return 5;case 12:break;case 13:break;case 14:break;case 15:break;case 16:return this.pushState("SCALE"),15;case 17:return 16;case 18:this.popState();break;case 19:return this.begin("acc_title"),31;case 20:return this.popState(),"acc_title_value";case 21:return this.begin("acc_descr"),33;case 22:return this.popState(),"acc_descr_value";case 23:this.begin("acc_descr_multiline");break;case 24:this.popState();break;case 25:return"acc_descr_multiline_value";case 26:this.pushState("STATE");break;case 27:return this.popState(),$.yytext=$.yytext.slice(0,-8).trim(),23;case 28:return this.popState(),$.yytext=$.yytext.slice(0,-8).trim(),24;case 29:return this.popState(),$.yytext=$.yytext.slice(0,-10).trim(),25;case 30:return this.popState(),$.yytext=$.yytext.slice(0,-8).trim(),23;case 31:return this.popState(),$.yytext=$.yytext.slice(0,-8).trim(),24;case 32:return this.popState(),$.yytext=$.yytext.slice(0,-10).trim(),25;case 33:return 41;case 34:return 42;case 35:return 43;case 36:return 44;case 37:this.begin("STATE_STRING");break;case 38:return this.popState(),this.pushState("STATE_ID"),"AS";case 39:return this.popState(),"ID";case 40:this.popState();break;case 41:return"STATE_DESCR";case 42:return 17;case 43:this.popState();break;case 44:return this.popState(),this.pushState("struct"),18;case 45:return this.popState(),19;case 46:break;case 47:return this.begin("NOTE"),27;case 48:return this.popState(),this.pushState("NOTE_ID"),48;case 49:return this.popState(),this.pushState("NOTE_ID"),49;case 50:this.popState(),this.pushState("FLOATING_NOTE");break;case 51:return this.popState(),this.pushState("FLOATING_NOTE_ID"),"AS";case 52:break;case 53:return"NOTE_TEXT";case 54:return this.popState(),"ID";case 55:return this.popState(),this.pushState("NOTE_TEXT"),22;case 56:return this.popState(),$.yytext=$.yytext.substr(2).trim(),29;case 57:return this.popState(),$.yytext=$.yytext.slice(0,-8).trim(),29;case 58:return 7;case 59:return 7;case 60:return 14;case 61:return 47;case 62:return 22;case 63:return $.yytext=$.yytext.trim(),12;case 64:return 13;case 65:return 26;case 66:return 5;case 67:return"INVALID"}},rules:[/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:[\s]+)/i,/^(?:((?!\n)\s)+)/i,/^(?:#[^\n]*)/i,/^(?:%[^\n]*)/i,/^(?:scale\s+)/i,/^(?:\d+)/i,/^(?:\s+width\b)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:state\s+)/i,/^(?:.*<<fork>>)/i,/^(?:.*<<join>>)/i,/^(?:.*<<choice>>)/i,/^(?:.*\[\[fork\]\])/i,/^(?:.*\[\[join\]\])/i,/^(?:.*\[\[choice\]\])/i,/^(?:.*direction\s+TB[^\n]*)/i,/^(?:.*direction\s+BT[^\n]*)/i,/^(?:.*direction\s+RL[^\n]*)/i,/^(?:.*direction\s+LR[^\n]*)/i,/^(?:["])/i,/^(?:\s*as\s+)/i,/^(?:[^\n\{]*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n\s\{]+)/i,/^(?:\n)/i,/^(?:\{)/i,/^(?:\})/i,/^(?:[\n])/i,/^(?:note\s+)/i,/^(?:left of\b)/i,/^(?:right of\b)/i,/^(?:")/i,/^(?:\s*as\s*)/i,/^(?:["])/i,/^(?:[^"]*)/i,/^(?:[^\n]*)/i,/^(?:\s*[^:\n\s\-]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:[\s\S]*?end note\b)/i,/^(?:stateDiagram\s+)/i,/^(?:stateDiagram-v2\s+)/i,/^(?:hide empty description\b)/i,/^(?:\[\*\])/i,/^(?:[^:\n\s\-\{]+)/i,/^(?:\s*:[^:\n;]+)/i,/^(?:-->)/i,/^(?:--)/i,/^(?:$)/i,/^(?:.)/i],conditions:{LINE:{rules:[13,14],inclusive:!1},close_directive:{rules:[13,14],inclusive:!1},arg_directive:{rules:[7,8,13,14],inclusive:!1},type_directive:{rules:[6,7,13,14],inclusive:!1},open_directive:{rules:[5,13,14],inclusive:!1},struct:{rules:[13,14,26,33,34,35,36,45,46,47,61,62,63,64,65],inclusive:!1},FLOATING_NOTE_ID:{rules:[54],inclusive:!1},FLOATING_NOTE:{rules:[51,52,53],inclusive:!1},NOTE_TEXT:{rules:[56,57],inclusive:!1},NOTE_ID:{rules:[55],inclusive:!1},NOTE:{rules:[48,49,50],inclusive:!1},acc_descr_multiline:{rules:[24,25],inclusive:!1},acc_descr:{rules:[22],inclusive:!1},acc_title:{rules:[20],inclusive:!1},SCALE:{rules:[17,18],inclusive:!1},ALIAS:{rules:[],inclusive:!1},STATE_ID:{rules:[39],inclusive:!1},STATE_STRING:{rules:[40,41],inclusive:!1},FORK_STATE:{rules:[],inclusive:!1},STATE:{rules:[13,14,27,28,29,30,31,32,37,38,42,43,44],inclusive:!1},ID:{rules:[13,14],inclusive:!1},INITIAL:{rules:[0,1,2,3,4,9,10,11,12,14,15,16,19,21,23,26,44,47,58,59,60,61,62,63,64,66,67],inclusive:!0}}};return ct}();N.lexer=z;function X(){this.yy={}}return X.prototype=N,N.Parser=X,new X}();p0.parser=p0;const uat=(t,e)=>{var r;return((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper"?!1:t.match(/^\s*stateDiagram/)!==null},hat=(t,e)=>{var r;return!!(t.match(/^\s*stateDiagram-v2/)!==null||t.match(/^\s*stateDiagram/)&&((r=e==null?void 0:e.state)==null?void 0:r.defaultRenderer)==="dagre-wrapper")},g0=t=>JSON.parse(JSON.stringify(t));let y0=[];const fat=function(t,e,r){He.parseDirective(this,t,e,r)},dat=t=>{H.info("Setting root doc",t),y0=t},pat=()=>y0,m0=(t,e,r)=>{if(e.stmt==="relation")m0(t,e.state1,!0),m0(t,e.state2,!1);else if(e.stmt==="state"&&e.id==="[*]"&&(e.id=r?t.id+"_start":t.id+"_end",e.start=r),e.doc){const n=[];let i=0,a=[];for(i=0;i<e.doc.length;i++)if(e.doc[i].type==="divider"){const s=g0(e.doc[i]);s.doc=g0(a),n.push(s),a=[]}else a.push(e.doc[i]);if(n.length>0&&a.length>0){const s={stmt:"state",id:cw(),type:"divider",doc:g0(a)};n.push(g0(s)),e.doc=n}e.doc.forEach(s=>m0(e,s,!0))}},gat=()=>(m0({id:"root"},{id:"root",doc:y0},!0),{id:"root",doc:y0}),yat=t=>{let e;t.doc?e=t.doc:e=t,H.info(e),ML(!0),H.info("Extract",e),e.forEach(r=>{r.stmt==="state"&&_0(r.id,r.type,r.doc,r.description,r.note),r.stmt==="relation"&&LL(r.state1.id,r.state2.id,r.description)})},AL=()=>({relations:[],states:{},documents:{}});let du={root:AL()},Wr=du.root,b0=0;const _0=function(t,e,r,n,i){typeof Wr.states[t]>"u"?Wr.states[t]={id:t,descriptions:[],type:e,doc:r,note:i}:(Wr.states[t].doc||(Wr.states[t].doc=r),Wr.states[t].type||(Wr.states[t].type=e)),n&&(H.info("Adding state ",t,n),typeof n=="string"&&RL(t,n.trim()),typeof n=="object"&&n.forEach(a=>RL(t,a.trim()))),i&&(Wr.states[t].note=i,Wr.states[t].note.text=pe.sanitizeText(Wr.states[t].note.text,nt()))},ML=function(t){du={root:AL()},Wr=du.root,Wr=du.root,b0=0,NL=[],t||ci()},mat=function(t){return Wr.states[t]},bat=function(){return Wr.states},_at=function(){H.info("Documents = ",du)},vat=function(){return Wr.relations},LL=function(t,e,r){let n=t,i=e,a="default",s="default";t==="[*]"&&(b0++,n="start"+b0,a="start"),e==="[*]"&&(i="end"+b0,s="end"),_0(n,a),_0(i,s),Wr.relations.push({id1:n,id2:i,title:pe.sanitizeText(r,nt())})},RL=function(t,e){const r=Wr.states[t];let n=e;n[0]===":"&&(n=n.substr(1).trim()),r.descriptions.push(pe.sanitizeText(n,nt()))},xat=function(t){return t.substring(0,1)===":"?t.substr(2).trim():t.trim()},kat={LINE:0,DOTTED_LINE:1};let IL=0;const wat=()=>(IL++,"divider-id-"+IL);let NL=[];const Tat=()=>NL;let BL="TB";const ma={parseDirective:fat,getConfig:()=>nt().state,addState:_0,clear:ML,getState:mat,getStates:bat,getRelations:vat,getClasses:Tat,getDirection:()=>BL,addRelation:LL,getDividerId:wat,setDirection:t=>{BL=t},cleanupLabel:xat,lineType:kat,relationType:{AGGREGATION:0,EXTENSION:1,COMPOSITION:2,DEPENDENCY:3},logDocuments:_at,getRootDoc:pat,setRootDoc:dat,getRootDocV2:gat,extract:yat,trimColon:t=>t&&t[0]===":"?t.substr(1).trim():t.trim(),getAccTitle:ui,setAccTitle:Yn,getAccDescription:fi,setAccDescription:hi},Eat=t=>t.append("circle").attr("class","start-state").attr("r",nt().state.sizeUnit).attr("cx",nt().state.padding+nt().state.sizeUnit).attr("cy",nt().state.padding+nt().state.sizeUnit),Cat=t=>t.append("line").style("stroke","grey").style("stroke-dasharray","3").attr("x1",nt().state.textHeight).attr("class","divider").attr("x2",nt().state.textHeight*2).attr("y1",0).attr("y2",0),Sat=(t,e)=>{const r=t.append("text").attr("x",2*nt().state.padding).attr("y",nt().state.textHeight+2*nt().state.padding).attr("font-size",nt().state.fontSize).attr("class","state-title").text(e.id),n=r.node().getBBox();return t.insert("rect",":first-child").attr("x",nt().state.padding).attr("y",nt().state.padding).attr("width",n.width+2*nt().state.padding).attr("height",n.height+2*nt().state.padding).attr("rx",nt().state.radius),r},Aat=(t,e)=>{const r=function(f,p,m){const _=f.append("tspan").attr("x",2*nt().state.padding).text(p);m||_.attr("dy",nt().state.textHeight)},i=t.append("text").attr("x",2*nt().state.padding).attr("y",nt().state.textHeight+1.3*nt().state.padding).attr("font-size",nt().state.fontSize).attr("class","state-title").text(e.descriptions[0]).node().getBBox(),a=i.height,s=t.append("text").attr("x",nt().state.padding).attr("y",a+nt().state.padding*.4+nt().state.dividerMargin+nt().state.textHeight).attr("class","state-description");let o=!0,l=!0;e.descriptions.forEach(function(f){o||(r(s,f,l),l=!1),o=!1});const u=t.append("line").attr("x1",nt().state.padding).attr("y1",nt().state.padding+a+nt().state.dividerMargin/2).attr("y2",nt().state.padding+a+nt().state.dividerMargin/2).attr("class","descr-divider"),h=s.node().getBBox(),d=Math.max(h.width,i.width);return u.attr("x2",d+3*nt().state.padding),t.insert("rect",":first-child").attr("x",nt().state.padding).attr("y",nt().state.padding).attr("width",d+2*nt().state.padding).attr("height",h.height+a+2*nt().state.padding).attr("rx",nt().state.radius),t},Mat=(t,e,r)=>{const n=nt().state.padding,i=2*nt().state.padding,a=t.node().getBBox(),s=a.width,o=a.x,l=t.append("text").attr("x",0).attr("y",nt().state.titleShift).attr("font-size",nt().state.fontSize).attr("class","state-title").text(e.id),h=l.node().getBBox().width+i;let d=Math.max(h,s);d===s&&(d=d+i);let f;const p=t.node().getBBox();e.doc,f=o-n,h>s&&(f=(s-d)/2+n),Math.abs(o-p.x)<n&&h>s&&(f=o-(h-s)/2);const m=1-nt().state.textHeight;return t.insert("rect",":first-child").attr("x",f).attr("y",m).attr("class",r?"alt-composit":"composit").attr("width",d).attr("height",p.height+nt().state.textHeight+nt().state.titleShift+1).attr("rx","0"),l.attr("x",f+n),h<=s&&l.attr("x",o+(d-i)/2-h/2+n),t.insert("rect",":first-child").attr("x",f).attr("y",nt().state.titleShift-nt().state.textHeight-nt().state.padding).attr("width",d).attr("height",nt().state.textHeight*3).attr("rx",nt().state.radius),t.insert("rect",":first-child").attr("x",f).attr("y",nt().state.titleShift-nt().state.textHeight-nt().state.padding).attr("width",d).attr("height",p.height+3+2*nt().state.textHeight).attr("rx",nt().state.radius),t},Lat=t=>(t.append("circle").attr("class","end-state-outer").attr("r",nt().state.sizeUnit+nt().state.miniPadding).attr("cx",nt().state.padding+nt().state.sizeUnit+nt().state.miniPadding).attr("cy",nt().state.padding+nt().state.sizeUnit+nt().state.miniPadding),t.append("circle").attr("class","end-state-inner").attr("r",nt().state.sizeUnit).attr("cx",nt().state.padding+nt().state.sizeUnit+2).attr("cy",nt().state.padding+nt().state.sizeUnit+2)),Rat=(t,e)=>{let r=nt().state.forkWidth,n=nt().state.forkHeight;if(e.parentId){let i=r;r=n,n=i}return t.append("rect").style("stroke","black").style("fill","black").attr("width",r).attr("height",n).attr("x",nt().state.padding).attr("y",nt().state.padding)},Iat=(t,e,r,n)=>{let i=0;const a=n.append("text");a.style("text-anchor","start"),a.attr("class","noteText");let s=t.replace(/\r\n/g,"<br/>");s=s.replace(/\n/g,"<br/>");const o=s.split(pe.lineBreakRegex);let l=1.25*nt().state.noteMargin;for(const u of o){const h=u.trim();if(h.length>0){const d=a.append("tspan");d.text(h),l===0&&(l+=d.node().getBBox().height),i+=l,d.attr("x",e+nt().state.noteMargin),d.attr("y",r+i+1.25*nt().state.noteMargin)}}return{textWidth:a.node().getBBox().width,textHeight:i}},Nat=(t,e)=>{e.attr("class","state-note");const r=e.append("rect").attr("x",0).attr("y",nt().state.padding),n=e.append("g"),{textWidth:i,textHeight:a}=Iat(t,0,0,n);return r.attr("height",a+2*nt().state.noteMargin),r.attr("width",i+nt().state.noteMargin*2),r},DL=function(t,e){const r=e.id,n={id:r,label:e.id,width:0,height:0},i=t.append("g").attr("id",r).attr("class","stateGroup");e.type==="start"&&Eat(i),e.type==="end"&&Lat(i),(e.type==="fork"||e.type==="join")&&Rat(i,e),e.type==="note"&&Nat(e.note.text,i),e.type==="divider"&&Cat(i),e.type==="default"&&e.descriptions.length===0&&Sat(i,e),e.type==="default"&&e.descriptions.length>0&&Aat(i,e);const a=i.node().getBBox();return n.width=a.width+2*nt().state.padding,n.height=a.height+2*nt().state.padding,n};let OL=0;const Bat=function(t,e,r){const n=function(l){switch(l){case ma.relationType.AGGREGATION:return"aggregation";case ma.relationType.EXTENSION:return"extension";case ma.relationType.COMPOSITION:return"composition";case ma.relationType.DEPENDENCY:return"dependency"}};e.points=e.points.filter(l=>!Number.isNaN(l.y));const i=e.points,a=Ua().x(function(l){return l.x}).y(function(l){return l.y}).curve(Os),s=t.append("path").attr("d",a(i)).attr("id","edge"+OL).attr("class","transition");let o="";if(nt().state.arrowMarkerAbsolute&&(o=window.location.protocol+"//"+window.location.host+window.location.pathname+window.location.search,o=o.replace(/\(/g,"\\("),o=o.replace(/\)/g,"\\)")),s.attr("marker-end","url("+o+"#"+n(ma.relationType.DEPENDENCY)+"End)"),typeof r.title<"u"){const l=t.append("g").attr("class","stateLabel"),{x:u,y:h}=Se.calcLabelPosition(e.points),d=pe.getRows(r.title);let f=0;const p=[];let m=0,_=0;for(let x=0;x<=d.length;x++){const k=l.append("text").attr("text-anchor","middle").text(d[x]).attr("x",u).attr("y",h+f),T=k.node().getBBox();m=Math.max(m,T.width),_=Math.min(_,T.x),H.info(T.x,u,h+f),f===0&&(f=k.node().getBBox().height,H.info("Title height",f,h)),p.push(k)}let y=f*d.length;if(d.length>1){const x=(d.length-1)*f*.5;p.forEach((k,T)=>k.attr("y",h+T*f-x)),y=f*d.length}const b=l.node().getBBox();l.insert("rect",":first-child").attr("class","box").attr("x",u-m/2-nt().state.padding/2).attr("y",h-y/2-nt().state.padding/2-3.5).attr("width",m+nt().state.padding).attr("height",y+nt().state.padding),H.info(b)}OL++};let Mn;const J4={},Dat=function(){},Oat=function(t){t.append("defs").append("marker").attr("id","dependencyEnd").attr("refX",19).attr("refY",7).attr("markerWidth",20).attr("markerHeight",28).attr("orient","auto").append("path").attr("d","M 19,7 L9,13 L14,7 L9,1 Z")},Fat=function(t,e,r,n){Mn=nt().state;const i=nt().securityLevel;let a;i==="sandbox"&&(a=St("#i"+e));const s=St(i==="sandbox"?a.nodes()[0].contentDocument.body:"body"),o=i==="sandbox"?a.nodes()[0].contentDocument:document;H.debug("Rendering diagram "+t);const l=s.select(`[id='${e}']`);Oat(l),new cr.Graph({multigraph:!0,compound:!0,rankdir:"RL"}).setDefaultEdgeLabel(function(){return{}});const h=n.db.getRootDoc();FL(h,l,void 0,!1,s,o,n);const d=Mn.padding,f=l.node().getBBox(),p=f.width+d*2,m=f.height+d*2,_=p*1.75;li(l,m,_,Mn.useMaxWidth),l.attr("viewBox",`${f.x-Mn.padding} ${f.y-Mn.padding} `+p+" "+m),bn(n.db,l,e)},Pat=t=>t?t.length*Mn.fontSizeFactor:1,FL=(t,e,r,n,i,a,s)=>{const o=new cr.Graph({compound:!0,multigraph:!0});let l,u=!0;for(l=0;l<t.length;l++)if(t[l].stmt==="relation"){u=!1;break}r?o.setGraph({rankdir:"LR",multigraph:!0,compound:!0,ranker:"tight-tree",ranksep:u?1:Mn.edgeLengthFactor,nodeSep:u?1:50,isMultiGraph:!0}):o.setGraph({rankdir:"TB",multigraph:!0,compound:!0,ranksep:u?1:Mn.edgeLengthFactor,nodeSep:u?1:50,ranker:"tight-tree",isMultiGraph:!0}),o.setDefaultEdgeLabel(function(){return{}}),s.db.extract(t);const h=s.db.getStates(),d=s.db.getRelations(),f=Object.keys(h);for(let b=0;b<f.length;b++){const x=h[f[b]];r&&(x.parentId=r);let k;if(x.doc){let T=e.append("g").attr("id",x.id).attr("class","stateGroup");k=FL(x.doc,T,x.id,!n,i,a,s);{T=Mat(T,x,n);let C=T.node().getBBox();k.width=C.width,k.height=C.height+Mn.padding/2,J4[x.id]={y:Mn.compositTitleSize}}}else k=DL(e,x);if(x.note){const T={descriptions:[],id:x.id+"-note",note:x.note,type:"note"},C=DL(e,T);x.note.position==="left of"?(o.setNode(k.id+"-note",C),o.setNode(k.id,k)):(o.setNode(k.id,k),o.setNode(k.id+"-note",C)),o.setParent(k.id,k.id+"-group"),o.setParent(k.id+"-note",k.id+"-group")}else o.setNode(k.id,k)}H.debug("Count=",o.nodeCount(),o);let p=0;d.forEach(function(b){p++,H.debug("Setting edge",b),o.setEdge(b.id1,b.id2,{relation:b,width:Pat(b.title),height:Mn.labelHeight*pe.getRows(b.title).length,labelpos:"c"},"id"+p)}),Kc.layout(o),H.debug("Graph after layout",o.nodes());const m=e.node();o.nodes().forEach(function(b){typeof b<"u"&&typeof o.node(b)<"u"?(H.warn("Node "+b+": "+JSON.stringify(o.node(b))),i.select("#"+m.id+" #"+b).attr("transform","translate("+(o.node(b).x-o.node(b).width/2)+","+(o.node(b).y+(J4[b]?J4[b].y:0)-o.node(b).height/2)+" )"),i.select("#"+m.id+" #"+b).attr("data-x-shift",o.node(b).x-o.node(b).width/2),a.querySelectorAll("#"+m.id+" #"+b+" .divider").forEach(k=>{const T=k.parentElement;let C=0,M=0;T&&(T.parentElement&&(C=T.parentElement.getBBox().width),M=parseInt(T.getAttribute("data-x-shift"),10),Number.isNaN(M)&&(M=0)),k.setAttribute("x1",0-M+8),k.setAttribute("x2",C-M-8)})):H.debug("No Node "+b+": "+JSON.stringify(o.node(b)))});let _=m.getBBox();o.edges().forEach(function(b){typeof b<"u"&&typeof o.edge(b)<"u"&&(H.debug("Edge "+b.v+" -> "+b.w+": "+JSON.stringify(o.edge(b))),Bat(e,o.edge(b),o.edge(b).relation))}),_=m.getBBox();const y={id:r||"root",label:r||"root",width:0,height:0};return y.width=_.width+2*Mn.padding,y.height=_.height+2*Mn.padding,H.debug("Doc rendered",y,o),y},qat={setConf:Dat,draw:Fat},Vat={},zat=function(t){const e=Object.keys(t);for(let r=0;r<e.length;r++)Vat[e[r]]=t[e[r]]};let Fe={};const Yat=function(t,e){return H.trace("Extracting classes"),e.sb.clear(),e.parser.parse(t),e.sb.getClasses()},v0=(t,e,r,n)=>{if(r.id!=="root"){let i="rect";r.start===!0&&(i="start"),r.start===!1&&(i="end"),r.type!=="default"&&(i=r.type),Fe[r.id]||(Fe[r.id]={id:r.id,shape:i,description:pe.sanitizeText(r.id,nt()),classes:"statediagram-state"}),r.description&&(Array.isArray(Fe[r.id].description)?(Fe[r.id].shape="rectWithTitle",Fe[r.id].description.push(r.description)):Fe[r.id].description.length>0?(Fe[r.id].shape="rectWithTitle",Fe[r.id].description===r.id?Fe[r.id].description=[r.description]:Fe[r.id].description=[Fe[r.id].description,r.description]):(Fe[r.id].shape="rect",Fe[r.id].description=r.description),Fe[r.id].description=pe.sanitizeTextOrArray(Fe[r.id].description,nt())),Fe[r.id].description.length===1&&Fe[r.id].shape==="rectWithTitle"&&(Fe[r.id].shape="rect"),!Fe[r.id].type&&r.doc&&(H.info("Setting cluster for ",r.id,t_(r)),Fe[r.id].type="group",Fe[r.id].dir=t_(r),Fe[r.id].shape=r.type==="divider"?"divider":"roundedWithTitle",Fe[r.id].classes=Fe[r.id].classes+" "+(n?"statediagram-cluster statediagram-cluster-alt":"statediagram-cluster"));const a={labelStyle:"",shape:Fe[r.id].shape,labelText:Fe[r.id].description,classes:Fe[r.id].classes,style:"",id:r.id,dir:Fe[r.id].dir,domId:"state-"+r.id+"-"+is,type:Fe[r.id].type,padding:15};if(r.note){const s={labelStyle:"",shape:"note",labelText:r.note.text,classes:"statediagram-note",style:"",id:r.id+"----note-"+is,domId:"state-"+r.id+"----note-"+is,type:Fe[r.id].type,padding:15},o={labelStyle:"",shape:"noteGroup",labelText:r.note.text,classes:Fe[r.id].classes,style:"",id:r.id+"----parent",domId:"state-"+r.id+"----parent-"+is,type:"group",padding:0};is++,t.setNode(r.id+"----parent",o),t.setNode(s.id,s),t.setNode(r.id,a),t.setParent(r.id,r.id+"----parent"),t.setParent(s.id,r.id+"----parent");let l=r.id,u=s.id;r.note.position==="left of"&&(l=s.id,u=r.id),t.setEdge(l,u,{arrowhead:"none",arrowType:"",style:"fill:none",labelStyle:"",classes:"transition note-edge",arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text",thickness:"normal"})}else t.setNode(r.id,a)}e&&e.id!=="root"&&(H.trace("Setting node ",r.id," to be child of its parent ",e.id),t.setParent(r.id,e.id)),r.doc&&(H.trace("Adding nodes children "),Uat(t,r,r.doc,!n))};let is=0;const Uat=(t,e,r,n)=>{H.trace("items",r),r.forEach(i=>{if(i.stmt==="state"||i.stmt==="default")v0(t,e,i,n);else if(i.stmt==="relation"){v0(t,e,i.state1,n),v0(t,e,i.state2,n);const a={id:"edge"+is,arrowhead:"normal",arrowTypeEnd:"arrow_barb",style:"fill:none",labelStyle:"",label:pe.sanitizeText(i.description,nt()),arrowheadStyle:"fill: #333",labelpos:"c",labelType:"text",thickness:"normal",classes:"transition"};let s=i.state1.id,o=i.state2.id;t.setEdge(s,o,a,is),is++}})},t_=(t,e)=>{let r=e||"TB";if(t.doc)for(let n=0;n<t.doc.length;n++){const i=t.doc[n];i.stmt==="dir"&&(r=i.value)}return r},Wat={setConf:zat,getClasses:Yat,draw:function(t,e,r,n){H.info("Drawing state diagram (v2)",e),Fe={},n.db.getDirection();const{securityLevel:i,state:a}=nt(),s=a.nodeSpacing||50,o=a.rankSpacing||50;H.info(n.db.getRootDocV2()),n.db.extract(n.db.getRootDocV2()),H.info(n.db.getRootDocV2());const l=new cr.Graph({multigraph:!0,compound:!0}).setGraph({rankdir:t_(n.db.getRootDocV2()),nodesep:s,ranksep:o,marginx:8,marginy:8}).setDefaultEdgeLabel(function(){return{}});v0(l,void 0,n.db.getRootDocV2(),!0);let u;i==="sandbox"&&(u=St("#i"+e));const h=St(i==="sandbox"?u.nodes()[0].contentDocument.body:"body"),d=h.select(`[id="${e}"]`),f=h.select("#"+e+" g");i4(f,l,["barb"],"statediagram",e);const p=8,m=d.node().getBBox(),_=m.width+p*2,y=m.height+p*2;d.attr("class","statediagram");const b=d.node().getBBox();li(d,y,_,a.useMaxWidth);const x=`${b.x-p} ${b.y-p} ${_} ${y}`;H.debug(`viewBox ${x}`),d.attr("viewBox",x);const k=document.querySelectorAll('[id="'+e+'"] .edgeLabel .label');for(let T=0;T<k.length;T++){const C=k[T],M=C.getBBox(),S=document.createElementNS("http://www.w3.org/2000/svg","rect");S.setAttribute("rx",0),S.setAttribute("ry",0),S.setAttribute("width",M.width),S.setAttribute("height",M.height),C.insertBefore(S,C.firstChild)}bn(n.db,d,e)}};var e_=function(){var t=function(_,y,b,x){for(b=b||{},x=_.length;x--;b[_[x]]=y);return b},e=[1,2],r=[1,5],n=[6,9,11,17,18,20,22,23,24,26],i=[1,15],a=[1,16],s=[1,17],o=[1,18],l=[1,19],u=[1,20],h=[1,24],d=[4,6,9,11,17,18,20,22,23,24,26],f={trace:function(){},yy:{},symbols_:{error:2,start:3,journey:4,document:5,EOF:6,directive:7,line:8,SPACE:9,statement:10,NEWLINE:11,openDirective:12,typeDirective:13,closeDirective:14,":":15,argDirective:16,title:17,acc_title:18,acc_title_value:19,acc_descr:20,acc_descr_value:21,acc_descr_multiline_value:22,section:23,taskName:24,taskData:25,open_directive:26,type_directive:27,arg_directive:28,close_directive:29,$accept:0,$end:1},terminals_:{2:"error",4:"journey",6:"EOF",9:"SPACE",11:"NEWLINE",15:":",17:"title",18:"acc_title",19:"acc_title_value",20:"acc_descr",21:"acc_descr_value",22:"acc_descr_multiline_value",23:"section",24:"taskName",25:"taskData",26:"open_directive",27:"type_directive",28:"arg_directive",29:"close_directive"},productions_:[0,[3,3],[3,2],[5,0],[5,2],[8,2],[8,1],[8,1],[8,1],[7,4],[7,6],[10,1],[10,2],[10,2],[10,1],[10,1],[10,2],[10,1],[12,1],[13,1],[16,1],[14,1]],performAction:function(y,b,x,k,T,C,M){var S=C.length-1;switch(T){case 1:return C[S-1];case 3:this.$=[];break;case 4:C[S-1].push(C[S]),this.$=C[S-1];break;case 5:case 6:this.$=C[S];break;case 7:case 8:this.$=[];break;case 11:k.setDiagramTitle(C[S].substr(6)),this.$=C[S].substr(6);break;case 12:this.$=C[S].trim(),k.setAccTitle(this.$);break;case 13:case 14:this.$=C[S].trim(),k.setAccDescription(this.$);break;case 15:k.addSection(C[S].substr(8)),this.$=C[S].substr(8);break;case 16:k.addTask(C[S-1],C[S]),this.$="task";break;case 18:k.parseDirective("%%{","open_directive");break;case 19:k.parseDirective(C[S],"type_directive");break;case 20:C[S]=C[S].trim().replace(/'/g,'"'),k.parseDirective(C[S],"arg_directive");break;case 21:k.parseDirective("}%%","close_directive","journey");break}},table:[{3:1,4:e,7:3,12:4,26:r},{1:[3]},t(n,[2,3],{5:6}),{3:7,4:e,7:3,12:4,26:r},{13:8,27:[1,9]},{27:[2,18]},{6:[1,10],7:21,8:11,9:[1,12],10:13,11:[1,14],12:4,17:i,18:a,20:s,22:o,23:l,24:u,26:r},{1:[2,2]},{14:22,15:[1,23],29:h},t([15,29],[2,19]),t(n,[2,8],{1:[2,1]}),t(n,[2,4]),{7:21,10:25,12:4,17:i,18:a,20:s,22:o,23:l,24:u,26:r},t(n,[2,6]),t(n,[2,7]),t(n,[2,11]),{19:[1,26]},{21:[1,27]},t(n,[2,14]),t(n,[2,15]),{25:[1,28]},t(n,[2,17]),{11:[1,29]},{16:30,28:[1,31]},{11:[2,21]},t(n,[2,5]),t(n,[2,12]),t(n,[2,13]),t(n,[2,16]),t(d,[2,9]),{14:32,29:h},{29:[2,20]},{11:[1,33]},t(d,[2,10])],defaultActions:{5:[2,18],7:[2,2],24:[2,21],31:[2,20]},parseError:function(y,b){if(b.recoverable)this.trace(y);else{var x=new Error(y);throw x.hash=b,x}},parse:function(y){var b=this,x=[0],k=[],T=[null],C=[],M=this.table,S="",R=0,A=0,L=2,v=1,B=C.slice.call(arguments,1),w=Object.create(this.lexer),D={yy:{}};for(var N in this.yy)Object.prototype.hasOwnProperty.call(this.yy,N)&&(D.yy[N]=this.yy[N]);w.setInput(y,D.yy),D.yy.lexer=w,D.yy.parser=this,typeof w.yylloc>"u"&&(w.yylloc={});var z=w.yylloc;C.push(z);var X=w.options&&w.options.ranges;typeof D.yy.parseError=="function"?this.parseError=D.yy.parseError:this.parseError=Object.getPrototypeOf(this).parseError;function ct(){var V;return V=k.pop()||w.lex()||v,typeof V!="number"&&(V instanceof Array&&(k=V,V=k.pop()),V=b.symbols_[V]||V),V}for(var J,Y,$,lt,ut={},W,tt,K,it;;){if(Y=x[x.length-1],this.defaultActions[Y]?$=this.defaultActions[Y]:((J===null||typeof J>"u")&&(J=ct()),$=M[Y]&&M[Y][J]),typeof $>"u"||!$.length||!$[0]){var Z="";it=[];for(W in M[Y])this.terminals_[W]&&W>L&&it.push("'"+this.terminals_[W]+"'");w.showPosition?Z="Parse error on line "+(R+1)+`:
+`+w.showPosition()+`
+Expecting `+it.join(", ")+", got '"+(this.terminals_[J]||J)+"'":Z="Parse error on line "+(R+1)+": Unexpected "+(J==v?"end of input":"'"+(this.terminals_[J]||J)+"'"),this.parseError(Z,{text:w.match,token:this.terminals_[J]||J,line:w.yylineno,loc:z,expected:it})}if($[0]instanceof Array&&$.length>1)throw new Error("Parse Error: multiple actions possible at state: "+Y+", token: "+J);switch($[0]){case 1:x.push(J),T.push(w.yytext),C.push(w.yylloc),x.push($[1]),J=null,A=w.yyleng,S=w.yytext,R=w.yylineno,z=w.yylloc;break;case 2:if(tt=this.productions_[$[1]][1],ut.$=T[T.length-tt],ut._$={first_line:C[C.length-(tt||1)].first_line,last_line:C[C.length-1].last_line,first_column:C[C.length-(tt||1)].first_column,last_column:C[C.length-1].last_column},X&&(ut._$.range=[C[C.length-(tt||1)].range[0],C[C.length-1].range[1]]),lt=this.performAction.apply(ut,[S,A,R,D.yy,$[1],T,C].concat(B)),typeof lt<"u")return lt;tt&&(x=x.slice(0,-1*tt*2),T=T.slice(0,-1*tt),C=C.slice(0,-1*tt)),x.push(this.productions_[$[1]][0]),T.push(ut.$),C.push(ut._$),K=M[x[x.length-2]][x[x.length-1]],x.push(K);break;case 3:return!0}}return!0}},p=function(){var _={EOF:1,parseError:function(b,x){if(this.yy.parser)this.yy.parser.parseError(b,x);else throw new Error(b)},setInput:function(y,b){return this.yy=b||this.yy||{},this._input=y,this._more=this._backtrack=this.done=!1,this.yylineno=this.yyleng=0,this.yytext=this.matched=this.match="",this.conditionStack=["INITIAL"],this.yylloc={first_line:1,first_column:0,last_line:1,last_column:0},this.options.ranges&&(this.yylloc.range=[0,0]),this.offset=0,this},input:function(){var y=this._input[0];this.yytext+=y,this.yyleng++,this.offset++,this.match+=y,this.matched+=y;var b=y.match(/(?:\r\n?|\n).*/g);return b?(this.yylineno++,this.yylloc.last_line++):this.yylloc.last_column++,this.options.ranges&&this.yylloc.range[1]++,this._input=this._input.slice(1),y},unput:function(y){var b=y.length,x=y.split(/(?:\r\n?|\n)/g);this._input=y+this._input,this.yytext=this.yytext.substr(0,this.yytext.length-b),this.offset-=b;var k=this.match.split(/(?:\r\n?|\n)/g);this.match=this.match.substr(0,this.match.length-1),this.matched=this.matched.substr(0,this.matched.length-1),x.length-1&&(this.yylineno-=x.length-1);var T=this.yylloc.range;return this.yylloc={first_line:this.yylloc.first_line,last_line:this.yylineno+1,first_column:this.yylloc.first_column,last_column:x?(x.length===k.length?this.yylloc.first_column:0)+k[k.length-x.length].length-x[0].length:this.yylloc.first_column-b},this.options.ranges&&(this.yylloc.range=[T[0],T[0]+this.yyleng-b]),this.yyleng=this.yytext.length,this},more:function(){return this._more=!0,this},reject:function(){if(this.options.backtrack_lexer)this._backtrack=!0;else return this.parseError("Lexical error on line "+(this.yylineno+1)+`. You can only invoke reject() in the lexer when the lexer is of the backtracking persuasion (options.backtrack_lexer = true).
+`+this.showPosition(),{text:"",token:null,line:this.yylineno});return this},less:function(y){this.unput(this.match.slice(y))},pastInput:function(){var y=this.matched.substr(0,this.matched.length-this.match.length);return(y.length>20?"...":"")+y.substr(-20).replace(/\n/g,"")},upcomingInput:function(){var y=this.match;return y.length<20&&(y+=this._input.substr(0,20-y.length)),(y.substr(0,20)+(y.length>20?"...":"")).replace(/\n/g,"")},showPosition:function(){var y=this.pastInput(),b=new Array(y.length+1).join("-");return y+this.upcomingInput()+`
+`+b+"^"},test_match:function(y,b){var x,k,T;if(this.options.backtrack_lexer&&(T={yylineno:this.yylineno,yylloc:{first_line:this.yylloc.first_line,last_line:this.last_line,first_column:this.yylloc.first_column,last_column:this.yylloc.last_column},yytext:this.yytext,match:this.match,matches:this.matches,matched:this.matched,yyleng:this.yyleng,offset:this.offset,_more:this._more,_input:this._input,yy:this.yy,conditionStack:this.conditionStack.slice(0),done:this.done},this.options.ranges&&(T.yylloc.range=this.yylloc.range.slice(0))),k=y[0].match(/(?:\r\n?|\n).*/g),k&&(this.yylineno+=k.length),this.yylloc={first_line:this.yylloc.last_line,last_line:this.yylineno+1,first_column:this.yylloc.last_column,last_column:k?k[k.length-1].length-k[k.length-1].match(/\r?\n?/)[0].length:this.yylloc.last_column+y[0].length},this.yytext+=y[0],this.match+=y[0],this.matches=y,this.yyleng=this.yytext.length,this.options.ranges&&(this.yylloc.range=[this.offset,this.offset+=this.yyleng]),this._more=!1,this._backtrack=!1,this._input=this._input.slice(y[0].length),this.matched+=y[0],x=this.performAction.call(this,this.yy,this,b,this.conditionStack[this.conditionStack.length-1]),this.done&&this._input&&(this.done=!1),x)return x;if(this._backtrack){for(var C in T)this[C]=T[C];return!1}return!1},next:function(){if(this.done)return this.EOF;this._input||(this.done=!0);var y,b,x,k;this._more||(this.yytext="",this.match="");for(var T=this._currentRules(),C=0;C<T.length;C++)if(x=this._input.match(this.rules[T[C]]),x&&(!b||x[0].length>b[0].length)){if(b=x,k=C,this.options.backtrack_lexer){if(y=this.test_match(x,T[C]),y!==!1)return y;if(this._backtrack){b=!1;continue}else return!1}else if(!this.options.flex)break}return b?(y=this.test_match(b,T[k]),y!==!1?y:!1):this._input===""?this.EOF:this.parseError("Lexical error on line "+(this.yylineno+1)+`. Unrecognized text.
+`+this.showPosition(),{text:"",token:null,line:this.yylineno})},lex:function(){var b=this.next();return b||this.lex()},begin:function(b){this.conditionStack.push(b)},popState:function(){var b=this.conditionStack.length-1;return b>0?this.conditionStack.pop():this.conditionStack[0]},_currentRules:function(){return this.conditionStack.length&&this.conditionStack[this.conditionStack.length-1]?this.conditions[this.conditionStack[this.conditionStack.length-1]].rules:this.conditions.INITIAL.rules},topState:function(b){return b=this.conditionStack.length-1-Math.abs(b||0),b>=0?this.conditionStack[b]:"INITIAL"},pushState:function(b){this.begin(b)},stateStackSize:function(){return this.conditionStack.length},options:{"case-insensitive":!0},performAction:function(b,x,k,T){switch(k){case 0:return this.begin("open_directive"),26;case 1:return this.begin("type_directive"),27;case 2:return this.popState(),this.begin("arg_directive"),15;case 3:return this.popState(),this.popState(),29;case 4:return 28;case 5:break;case 6:break;case 7:return 11;case 8:break;case 9:break;case 10:return 4;case 11:return 17;case 12:return this.begin("acc_title"),18;case 13:return this.popState(),"acc_title_value";case 14:return this.begin("acc_descr"),20;case 15:return this.popState(),"acc_descr_value";case 16:this.begin("acc_descr_multiline");break;case 17:this.popState();break;case 18:return"acc_descr_multiline_value";case 19:return 23;case 20:return 24;case 21:return 25;case 22:return 15;case 23:return 6;case 24:return"INVALID"}},rules:[/^(?:%%\{)/i,/^(?:((?:(?!\}%%)[^:.])*))/i,/^(?::)/i,/^(?:\}%%)/i,/^(?:((?:(?!\}%%).|\n)*))/i,/^(?:%(?!\{)[^\n]*)/i,/^(?:[^\}]%%[^\n]*)/i,/^(?:[\n]+)/i,/^(?:\s+)/i,/^(?:#[^\n]*)/i,/^(?:journey\b)/i,/^(?:title\s[^#\n;]+)/i,/^(?:accTitle\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*:\s*)/i,/^(?:(?!\n||)*[^\n]*)/i,/^(?:accDescr\s*\{\s*)/i,/^(?:[\}])/i,/^(?:[^\}]*)/i,/^(?:section\s[^#:\n;]+)/i,/^(?:[^#:\n;]+)/i,/^(?::[^#\n;]+)/i,/^(?::)/i,/^(?:$)/i,/^(?:.)/i],conditions:{open_directive:{rules:[1],inclusive:!1},type_directive:{rules:[2,3],inclusive:!1},arg_directive:{rules:[3,4],inclusive:!1},acc_descr_multiline:{rules:[17,18],inclusive:!1},acc_descr:{rules:[15],inclusive:!1},acc_title:{rules:[13],inclusive:!1},INITIAL:{rules:[0,5,6,7,8,9,10,11,12,14,16,19,20,21,22,23,24],inclusive:!0}}};return _}();f.lexer=p;function m(){this.yy={}}return m.prototype=f,f.Parser=m,new m}();e_.parser=e_;const Hat=t=>t.match(/^\s*journey/)!==null;let pl="";const r_=[],pu=[],gl=[],Gat=function(t,e,r){He.parseDirective(this,t,e,r)},jat=function(){r_.length=0,pu.length=0,pl="",gl.length=0,ci()},$at=function(t){pl=t,r_.push(t)},Xat=function(){return r_},Kat=function(){let t=PL();const e=100;let r=0;for(;!t&&r<e;)t=PL(),r++;return pu.push(...gl),pu},Zat=function(){const t=[];return pu.forEach(r=>{r.people&&t.push(...r.people)}),[...new Set(t)].sort()},Qat=function(t,e){const r=e.substr(1).split(":");let n=0,i=[];r.length===1?(n=Number(r[0]),i=[]):(n=Number(r[0]),i=r[1].split(","));const a=i.map(o=>o.trim()),s={section:pl,type:pl,people:a,task:t,score:n};gl.push(s)},Jat=function(t){const e={section:pl,type:pl,description:t,task:t,classes:[]};pu.push(e)},PL=function(){const t=function(r){return gl[r].processed};let e=!0;for(let r=0;r<gl.length;r++)t(r),e=e&&gl[r].processed;return e},qL={parseDirective:Gat,getConfig:()=>nt().journey,clear:jat,setDiagramTitle:c1,getDiagramTitle:u1,setAccTitle:Yn,getAccTitle:ui,setAccDescription:hi,getAccDescription:fi,addSection:$at,getSections:Xat,getTasks:Kat,addTask:Qat,addTaskOrg:Jat,getActors:function(){return Zat()}},x0=function(t,e){const r=t.append("rect");return r.attr("x",e.x),r.attr("y",e.y),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("width",e.width),r.attr("height",e.height),r.attr("rx",e.rx),r.attr("ry",e.ry),typeof e.class<"u"&&r.attr("class",e.class),r},tst=function(t,e){const n=t.append("circle").attr("cx",e.cx).attr("cy",e.cy).attr("class","face").attr("r",15).attr("stroke-width",2).attr("overflow","visible"),i=t.append("g");i.append("circle").attr("cx",e.cx-15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666"),i.append("circle").attr("cx",e.cx+15/3).attr("cy",e.cy-15/3).attr("r",1.5).attr("stroke-width",2).attr("fill","#666").attr("stroke","#666");function a(l){const u=gf().startAngle(Math.PI/2).endAngle(3*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+e.cx+","+(e.cy+2)+")")}function s(l){const u=gf().startAngle(3*Math.PI/2).endAngle(5*(Math.PI/2)).innerRadius(7.5).outerRadius(6.8181818181818175);l.append("path").attr("class","mouth").attr("d",u).attr("transform","translate("+e.cx+","+(e.cy+7)+")")}function o(l){l.append("line").attr("class","mouth").attr("stroke",2).attr("x1",e.cx-5).attr("y1",e.cy+7).attr("x2",e.cx+5).attr("y2",e.cy+7).attr("class","mouth").attr("stroke-width","1px").attr("stroke","#666")}return e.score>3?a(i):e.score<3?s(i):o(i),n},VL=function(t,e){const r=t.append("circle");return r.attr("cx",e.cx),r.attr("cy",e.cy),r.attr("class","actor-"+e.pos),r.attr("fill",e.fill),r.attr("stroke",e.stroke),r.attr("r",e.r),typeof r.class<"u"&&r.attr("class",r.class),typeof e.title<"u"&&r.append("title").text(e.title),r},zL=function(t,e){const r=e.text.replace(/<br\s*\/?>/gi," "),n=t.append("text");n.attr("x",e.x),n.attr("y",e.y),n.attr("class","legend"),n.style("text-anchor",e.anchor),typeof e.class<"u"&&n.attr("class",e.class);const i=n.append("tspan");return i.attr("x",e.x+e.textMargin*2),i.text(r),n},est=function(t,e){function r(i,a,s,o,l){return i+","+a+" "+(i+s)+","+a+" "+(i+s)+","+(a+o-l)+" "+(i+s-l*1.2)+","+(a+o)+" "+i+","+(a+o)}const n=t.append("polygon");n.attr("points",r(e.x,e.y,50,20,7)),n.attr("class","labelBox"),e.y=e.y+e.labelMargin,e.x=e.x+.5*e.labelMargin,zL(t,e)},rst=function(t,e,r){const n=t.append("g"),i=n_();i.x=e.x,i.y=e.y,i.fill=e.fill,i.width=r.width,i.height=r.height,i.class="journey-section section-type-"+e.num,i.rx=3,i.ry=3,x0(n,i),UL(r)(e.text,n,i.x,i.y,i.width,i.height,{class:"journey-section section-type-"+e.num},r,e.colour)};let YL=-1;const nst=function(t,e,r){const n=e.x+r.width/2,i=t.append("g");YL++;const a=300+5*30;i.append("line").attr("id","task"+YL).attr("x1",n).attr("y1",e.y).attr("x2",n).attr("y2",a).attr("class","task-line").attr("stroke-width","1px").attr("stroke-dasharray","4 2").attr("stroke","#666"),tst(i,{cx:n,cy:300+(5-e.score)*30,score:e.score});const s=n_();s.x=e.x,s.y=e.y,s.fill=e.fill,s.width=r.width,s.height=r.height,s.class="task task-type-"+e.num,s.rx=3,s.ry=3,x0(i,s);let o=e.x+14;e.people.forEach(l=>{const u=e.actors[l].color,h={cx:o,cy:e.y,r:7,fill:u,stroke:"#000",title:l,pos:e.actors[l].position};VL(i,h),o+=10}),UL(r)(e.task,i,s.x,s.y,s.width,s.height,{class:"task"},r,e.colour)},ist=function(t,e){x0(t,{x:e.startx,y:e.starty,width:e.stopx-e.startx,height:e.stopy-e.starty,fill:e.fill,class:"rect"}).lower()},ast=function(){return{x:0,y:0,fill:void 0,"text-anchor":"start",width:100,height:100,textMargin:0,rx:0,ry:0}},n_=function(){return{x:0,y:0,width:100,anchor:"start",height:100,rx:0,ry:0}},UL=function(){function t(i,a,s,o,l,u,h,d){const f=a.append("text").attr("x",s+l/2).attr("y",o+u/2+5).style("font-color",d).style("text-anchor","middle").text(i);n(f,h)}function e(i,a,s,o,l,u,h,d,f){const{taskFontSize:p,taskFontFamily:m}=d,_=i.split(/<br\s*\/?>/gi);for(let y=0;y<_.length;y++){const b=y*p-p*(_.length-1)/2,x=a.append("text").attr("x",s+l/2).attr("y",o).attr("fill",f).style("text-anchor","middle").style("font-size",p).style("font-family",m);x.append("tspan").attr("x",s+l/2).attr("dy",b).text(_[y]),x.attr("y",o+u/2).attr("dominant-baseline","central").attr("alignment-baseline","central"),n(x,h)}}function r(i,a,s,o,l,u,h,d){const f=a.append("switch"),m=f.append("foreignObject").attr("x",s).attr("y",o).attr("width",l).attr("height",u).attr("position","fixed").append("xhtml:div").style("display","table").style("height","100%").style("width","100%");m.append("div").attr("class","label").style("display","table-cell").style("text-align","center").style("vertical-align","middle").text(i),e(i,f,s,o,l,u,h,d),n(m,h)}function n(i,a){for(const s in a)s in a&&i.attr(s,a[s])}return function(i){return i.textPlacement==="fo"?r:i.textPlacement==="old"?t:e}}(),gu={drawRect:x0,drawCircle:VL,drawSection:rst,drawText:zL,drawLabel:est,drawTask:nst,drawBackgroundRect:ist,getTextObj:ast,getNoteRect:n_,initGraphics:function(t){t.append("defs").append("marker").attr("id","arrowhead").attr("refX",5).attr("refY",2).attr("markerWidth",6).attr("markerHeight",4).attr("orient","auto").append("path").attr("d","M 0,0 V 4 L6,2 Z")}},sst=function(t){Object.keys(t).forEach(function(r){k0[r]=t[r]})},ba={};function ost(t){const e=nt().journey;let r=60;Object.keys(ba).forEach(n=>{const i=ba[n].color,a={cx:20,cy:r,r:7,fill:i,stroke:"#000",pos:ba[n].position};gu.drawCircle(t,a);const s={x:40,y:r+7,fill:"#666",text:n,textMargin:e.boxTextMargin|5};gu.drawText(t,s),r+=20})}const k0=nt().journey,$s=k0.leftMargin,lst=function(t,e,r,n){const i=nt().journey;n.db.clear(),n.parser.parse(t+`
+`);const a=nt().securityLevel;let s;a==="sandbox"&&(s=St("#i"+e));const o=St(a==="sandbox"?s.nodes()[0].contentDocument.body:"body");jn.init();const l=o.select("#"+e);gu.initGraphics(l);const u=n.db.getTasks(),h=n.db.getDiagramTitle(),d=n.db.getActors();for(const b in ba)delete ba[b];let f=0;d.forEach(b=>{ba[b]={color:i.actorColours[f%i.actorColours.length],position:f},f++}),ost(l),jn.insert(0,0,$s,Object.keys(ba).length*50),cst(l,u,0);const p=jn.getBounds();h&&l.append("text").text(h).attr("x",$s).attr("font-size","4ex").attr("font-weight","bold").attr("y",25);const m=p.stopy-p.starty+2*i.diagramMarginY,_=$s+p.stopx+2*i.diagramMarginX;li(l,m,_,i.useMaxWidth),l.append("line").attr("x1",$s).attr("y1",i.height*4).attr("x2",_-$s-4).attr("y2",i.height*4).attr("stroke-width",4).attr("stroke","black").attr("marker-end","url(#arrowhead)");const y=h?70:0;l.attr("viewBox",`${p.startx} -25 ${_} ${m+y}`),l.attr("preserveAspectRatio","xMinYMin meet"),l.attr("height",m+y+25),bn(n.db,l,e)},jn={data:{startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},verticalPos:0,sequenceItems:[],init:function(){this.sequenceItems=[],this.data={startx:void 0,stopx:void 0,starty:void 0,stopy:void 0},this.verticalPos=0},updateVal:function(t,e,r,n){typeof t[e]>"u"?t[e]=r:t[e]=n(r,t[e])},updateBounds:function(t,e,r,n){const i=nt().journey,a=this;let s=0;function o(l){return function(h){s++;const d=a.sequenceItems.length-s+1;a.updateVal(h,"starty",e-d*i.boxMargin,Math.min),a.updateVal(h,"stopy",n+d*i.boxMargin,Math.max),a.updateVal(jn.data,"startx",t-d*i.boxMargin,Math.min),a.updateVal(jn.data,"stopx",r+d*i.boxMargin,Math.max),l!=="activation"&&(a.updateVal(h,"startx",t-d*i.boxMargin,Math.min),a.updateVal(h,"stopx",r+d*i.boxMargin,Math.max),a.updateVal(jn.data,"starty",e-d*i.boxMargin,Math.min),a.updateVal(jn.data,"stopy",n+d*i.boxMargin,Math.max))}}this.sequenceItems.forEach(o())},insert:function(t,e,r,n){const i=Math.min(t,r),a=Math.max(t,r),s=Math.min(e,n),o=Math.max(e,n);this.updateVal(jn.data,"startx",i,Math.min),this.updateVal(jn.data,"starty",s,Math.min),this.updateVal(jn.data,"stopx",a,Math.max),this.updateVal(jn.data,"stopy",o,Math.max),this.updateBounds(i,s,a,o)},bumpVerticalPos:function(t){this.verticalPos=this.verticalPos+t,this.data.stopy=this.verticalPos},getVerticalPos:function(){return this.verticalPos},getBounds:function(){return this.data}},i_=k0.sectionFills,WL=k0.sectionColours,cst=function(t,e,r){const n=nt().journey;let i="";const a=n.height*2+n.diagramMarginY,s=r+a;let o=0,l="#CCC",u="black",h=0;for(let d=0;d<e.length;d++){const f=e[d];if(i!==f.section){l=i_[o%i_.length],h=o%i_.length,u=WL[o%WL.length];const m={x:d*n.taskMargin+d*n.width+$s,y:50,text:f.section,fill:l,num:h,colour:u};gu.drawSection(t,m,n),i=f.section,o++}const p=f.people.reduce((m,_)=>(ba[_]&&(m[_]=ba[_]),m),{});f.x=d*n.taskMargin+d*n.width+$s,f.y=s,f.width=n.diagramMarginX,f.height=n.diagramMarginY,f.colour=u,f.fill=l,f.num=h,f.actors=p,gu.drawTask(t,f,n),jn.insert(f.x,f.y,f.x+f.width+n.taskMargin,300+5*30)}},HL={setConf:sst,draw:lst};let GL={};const a_={setConf:function(t){GL={...GL,...t}},draw:(t,e,r)=>{try{H.debug(`Renering svg for syntax error
+`);const n=St("#"+e),i=n.append("g");i.append("path").attr("class","error-icon").attr("d","m411.313,123.313c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32-9.375,9.375-20.688-20.688c-12.484-12.5-32.766-12.5-45.25,0l-16,16c-1.261,1.261-2.304,2.648-3.31,4.051-21.739-8.561-45.324-13.426-70.065-13.426-105.867,0-192,86.133-192,192s86.133,192 192,192 192-86.133 192-192c0-24.741-4.864-48.327-13.426-70.065 1.402-1.007 2.79-2.049 4.051-3.31l16-16c12.5-12.492 12.5-32.758 0-45.25l-20.688-20.688 9.375-9.375 32.001-31.999zm-219.313,100.687c-52.938,0-96,43.063-96,96 0,8.836-7.164,16-16,16s-16-7.164-16-16c0-70.578 57.422-128 128-128 8.836,0 16,7.164 16,16s-7.164,16-16,16z"),i.append("path").attr("class","error-icon").attr("d","m459.02,148.98c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l16,16c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16.001-16z"),i.append("path").attr("class","error-icon").attr("d","m340.395,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688 6.25-6.25 6.25-16.375 0-22.625l-16-16c-6.25-6.25-16.375-6.25-22.625,0s-6.25,16.375 0,22.625l15.999,16z"),i.append("path").attr("class","error-icon").attr("d","m400,64c8.844,0 16-7.164 16-16v-32c0-8.836-7.156-16-16-16-8.844,0-16,7.164-16,16v32c0,8.836 7.156,16 16,16z"),i.append("path").attr("class","error-icon").attr("d","m496,96.586h-32c-8.844,0-16,7.164-16,16 0,8.836 7.156,16 16,16h32c8.844,0 16-7.164 16-16 0-8.836-7.156-16-16-16z"),i.append("path").attr("class","error-icon").attr("d","m436.98,75.605c3.125,3.125 7.219,4.688 11.313,4.688 4.094,0 8.188-1.563 11.313-4.688l32-32c6.25-6.25 6.25-16.375 0-22.625s-16.375-6.25-22.625,0l-32,32c-6.251,6.25-6.251,16.375-0.001,22.625z"),i.append("text").attr("class","error-text").attr("x",1440).attr("y",250).attr("font-size","150px").style("text-anchor","middle").text("Syntax error in graph"),i.append("text").attr("class","error-text").attr("x",1250).attr("y",400).attr("font-size","100px").style("text-anchor","middle").text("mermaid version "+r),n.attr("height",100),n.attr("width",500),n.attr("viewBox","768 0 912 512")}catch(n){H.error("Error while rendering info diagram"),H.error(uX(n))}}};let jL=!1;const yu=()=>{jL||(jL=!0,Lr("error",{db:{clear:()=>{}},styles:Sw,renderer:a_,parser:{parser:{yy:{}},parse:()=>{}},init:()=>{}},t=>t.toLowerCase().trim()==="error"),Lr("c4",{parser:Pc,db:$w,renderer:i9,styles:Bw,init:t=>{i9.setConf(t.c4)}},sK),Lr("class",{parser:_1,db:Jo,renderer:Ftt,styles:Ic,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Jo.clear()}},XK),Lr("classDiagram",{parser:_1,db:Jo,renderer:Bet,styles:Ic,init:t=>{t.class||(t.class={}),t.class.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Jo.clear()}},KK),Lr("er",{parser:a4,db:qet,renderer:Jet,styles:Cw},Det),Lr("gantt",{parser:M4,db:P4,renderer:tit,styles:Aw},Ent),Lr("info",{parser:q4,db:eit,renderer:rit,styles:Mw},nit),Lr("pie",{parser:V4,db:ait,renderer:sit,styles:Lw},iit),Lr("requirement",{parser:Y4,db:lit,renderer:git,styles:Rw},oit),Lr("sequence",{parser:H4,db:yL,renderer:SL,styles:Iw,init:t=>{if(t.sequence||(t.sequence={}),t.sequence.arrowMarkerAbsolute=t.arrowMarkerAbsolute,"sequenceDiagram"in t)throw new Error("`mermaid config.sequenceDiagram` has been renamed to `config.sequence`. Please update your mermaid config.");yL.setWrap(t.wrap),SL.setConf(t.sequence)}},yit),Lr("state",{parser:p0,db:ma,renderer:qat,styles:s1,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,ma.clear()}},uat),Lr("stateDiagram",{parser:p0,db:ma,renderer:Wat,styles:s1,init:t=>{t.state||(t.state={}),t.state.arrowMarkerAbsolute=t.arrowMarkerAbsolute,ma.clear()}},hat),Lr("journey",{parser:e_,db:qL,renderer:HL,styles:Nw,init:t=>{HL.setConf(t.journey),qL.clear()}},Hat),Lr("flowchart",{parser:X1,db:fa,renderer:A4,styles:a1,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,S4.setConf(t.flowchart),fa.clear(),fa.setGen("gen-1")}},trt),Lr("flowchart-v2",{parser:X1,db:fa,renderer:A4,styles:a1,init:t=>{t.flowchart||(t.flowchart={}),t.flowchart.arrowMarkerAbsolute=t.arrowMarkerAbsolute,Tw({flowchart:{arrowMarkerAbsolute:t.arrowMarkerAbsolute}}),A4.setConf(t.flowchart),fa.clear(),fa.setGen("gen-2")}},ert),Lr("gitGraph",{parser:hg,db:ZX,renderer:iK,styles:aK},IX))};class mu{constructor(e,r){vl(this,"type","graph");vl(this,"parser");vl(this,"renderer");vl(this,"db");vl(this,"detectTypeFailed",!1);var a,s;this.txt=e;const n=nt();this.txt=e;try{this.type=Xp(e,n)}catch(o){this.handleError(o,r),this.type="error",this.detectTypeFailed=!0}const i=Fw(this.type);H.debug("Type "+this.type),this.db=i.db,(s=(a=this.db).clear)==null||s.call(a),this.renderer=i.renderer,this.parser=i.parser,this.parser.parser.yy=this.db,i.init&&(i.init(n),H.debug("Initialized diagram "+this.type,n)),this.txt+=`
+`,this.parse(this.txt,r)}parse(e,r){if(this.detectTypeFailed)return!1;try{return e=e+`
+`,this.db.clear(),this.parser.parse(e),!0}catch(n){this.handleError(n,r)}return!1}handleError(e,r){if(r)ng(e)?r(e.str,e.hash):r(e);else throw e}getParser(){return this.parser}getType(){return this.type}}const s_=(t,e)=>{const r=Xp(t,nt());try{return Fw(r),new mu(t,e)}catch(n){if(!(n instanceof Pw))throw H.error(n),n;const i=kG(r);if(!i)throw new Error(`Loader for ${r} not found.`);return i().then(({diagram:a})=>(Lr(r,a,void 0,a.injectUtils),new mu(t,e)))}};function ust(t,e){return yu(),new mu(t,e).parse(t,e)}async function hst(t,e){return yu(),(await s_(t,e)).parse(t,e)}const $L=function(t){let e=t;return e=e.replace(/style.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/classDef.*:\S*#.*;/g,function(r){return r.substring(0,r.length-1)}),e=e.replace(/#\w+;/g,function(r){const n=r.substring(1,r.length-1);return/^\+?\d+$/.test(n)?"\uFB02\xB0\xB0"+n+"\xB6\xDF":"\uFB02\xB0"+n+"\xB6\xDF"}),e},w0=function(t){let e=t;return e=e.replace(/fl°°/g,function(){return"&#"}),e=e.replace(/fl°/g,function(){return"&"}),e=e.replace(/¶ß/g,function(){return";"}),e},fst=function(t,e,r,n){var T;yu(),Rc(),e=e.replace(/\r\n?/g,`
+`);const i=Se.detectInit(e);i&&(Vs(i),ug(i));const a=nt();H.debug(a),e.length>a.maxTextSize&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");let s=St("body");if(typeof n<"u"){if(n&&(n.innerHTML=""),a.securityLevel==="sandbox"){const C=St(n).append("iframe").attr("id","i"+t).attr("style","width: 100%; height: 100%;").attr("sandbox","");s=St(C.nodes()[0].contentDocument.body),s.node().style.margin=0}else s=St(n);s.append("div").attr("id","d"+t).attr("style","font-family: "+a.fontFamily).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").attr("xmlns:xlink","http://www.w3.org/1999/xlink").append("g")}else{const C=document.getElementById(t);C&&C.remove();let M;if(a.securityLevel==="sandbox"?M=document.querySelector("#i"+t):M=document.querySelector("#d"+t),M&&M.remove(),a.securityLevel==="sandbox"){const S=St("body").append("iframe").attr("id","i"+t).attr("style","width: 100%; height: 100%;").attr("sandbox","");s=St(S.nodes()[0].contentDocument.body),s.node().style.margin=0}else s=St("body");s.append("div").attr("id","d"+t).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g")}e=$L(e);let o,l;try{if(o=s_(e),"then"in o)throw new Error("Diagram is a promise")}catch(C){o=new mu("error"),l=C}const u=s.select("#d"+t).node(),h=o.type,d=u.firstChild,f=d.firstChild;let p="";if(a.themeCSS!==void 0&&(p+=`
+${a.themeCSS}`),a.fontFamily!==void 0&&(p+=`
+:root { --mermaid-font-family: ${a.fontFamily}}`),a.altFontFamily!==void 0&&(p+=`
+:root { --mermaid-alt-font-family: ${a.altFontFamily}}`),h==="flowchart"||h==="flowchart-v2"||h==="graph"){const C=S4.getClasses(e,o),M=a.htmlLabels||((T=a.flowchart)==null?void 0:T.htmlLabels);for(const S in C)M?(p+=`
+.${S} > * { ${C[S].styles.join(" !important; ")} !important; }`,p+=`
+.${S} span { ${C[S].styles.join(" !important; ")} !important; }`):(p+=`
+.${S} path { ${C[S].styles.join(" !important; ")} !important; }`,p+=`
+.${S} rect { ${C[S].styles.join(" !important; ")} !important; }`,p+=`
+.${S} polygon { ${C[S].styles.join(" !important; ")} !important; }`,p+=`
+.${S} ellipse { ${C[S].styles.join(" !important; ")} !important; }`,p+=`
+.${S} circle { ${C[S].styles.join(" !important; ")} !important; }`,C[S].textStyles&&(p+=`
+.${S} tspan { ${C[S].textStyles.join(" !important; ")} !important; }`))}const _=((C,M)=>t1(bw(`${C}{${M}}`),xw))(`#${t}`,Dw(h,p,a.themeVariables)),y=document.createElement("style");y.innerHTML=`#${t} `+_,d.insertBefore(y,f);try{o.renderer.draw(e,t,e1.version,o)}catch(C){throw a_.draw(e,t,e1.version),C}s.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let b=s.select("#d"+t).node().innerHTML;if(H.debug("cnf.arrowMarkerAbsolute",a.arrowMarkerAbsolute),!Mr(a.arrowMarkerAbsolute)&&a.securityLevel!=="sandbox"&&(b=b.replace(/marker-end="url\(.*?#/g,'marker-end="url(#',"g")),b=w0(b),b=b.replace(/<br>/g,"<br/>"),a.securityLevel==="sandbox"){const C=s.select("#d"+t+" svg").node(),M="100%";let S="100%";C&&(S=C.viewBox.baseVal.height+"px"),b=`<iframe style="width:${M};height:${S};border:0;margin:0;" src="data:text/html;base64,${btoa('<body style="margin:0">'+b+"</body>")}" sandbox="allow-top-navigation-by-user-activation allow-popups">
+ The \u201Ciframe\u201D tag is not supported by your browser.
+</iframe>`}else a.securityLevel!=="loose"&&(b=Ec.sanitize(b,{ADD_TAGS:["foreignobject"],ADD_ATTR:["dominant-baseline"]}));if(typeof r<"u")switch(h){case"flowchart":case"flowchart-v2":r(b,fa.bindFunctions);break;case"gantt":r(b,P4.bindFunctions);break;case"class":case"classDiagram":r(b,Jo.bindFunctions);break;default:r(b)}else H.debug("CB = undefined!");mL();const x=a.securityLevel==="sandbox"?"#i"+t:"#d"+t,k=St(x).node();if(k&&"remove"in k&&k.remove(),l)throw l;return b},dst=async function(t,e,r,n){var T;yu(),Rc(),e=e.replace(/\r\n?/g,`
+`);const i=Se.detectInit(e);i&&(Vs(i),ug(i));const a=nt();H.debug(a),e.length>a.maxTextSize&&(e="graph TB;a[Maximum text size in diagram exceeded];style a fill:#faa");let s=St("body");if(typeof n<"u"){if(n&&(n.innerHTML=""),a.securityLevel==="sandbox"){const C=St(n).append("iframe").attr("id","i"+t).attr("style","width: 100%; height: 100%;").attr("sandbox","");s=St(C.nodes()[0].contentDocument.body),s.node().style.margin=0}else s=St(n);s.append("div").attr("id","d"+t).attr("style","font-family: "+a.fontFamily).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").attr("xmlns:xlink","http://www.w3.org/1999/xlink").append("g")}else{const C=document.getElementById(t);C&&C.remove();let M;if(a.securityLevel==="sandbox"?M=document.querySelector("#i"+t):M=document.querySelector("#d"+t),M&&M.remove(),a.securityLevel==="sandbox"){const S=St("body").append("iframe").attr("id","i"+t).attr("style","width: 100%; height: 100%;").attr("sandbox","");s=St(S.nodes()[0].contentDocument.body),s.node().style.margin=0}else s=St("body");s.append("div").attr("id","d"+t).append("svg").attr("id",t).attr("width","100%").attr("xmlns","http://www.w3.org/2000/svg").append("g")}e=$L(e);let o,l;try{o=await s_(e)}catch(C){o=new mu("error"),l=C}const u=s.select("#d"+t).node(),h=o.type,d=u.firstChild,f=d.firstChild;let p="";if(a.themeCSS!==void 0&&(p+=`
+${a.themeCSS}`),a.fontFamily!==void 0&&(p+=`
+:root { --mermaid-font-family: ${a.fontFamily}}`),a.altFontFamily!==void 0&&(p+=`
+:root { --mermaid-alt-font-family: ${a.altFontFamily}}`),h==="flowchart"||h==="flowchart-v2"||h==="graph"){const C=S4.getClasses(e,o),M=a.htmlLabels||((T=a.flowchart)==null?void 0:T.htmlLabels);for(const S in C)M?(p+=`
+.${S} > * { ${C[S].styles.join(" !important; ")} !important; }`,p+=`
+.${S} span { ${C[S].styles.join(" !important; ")} !important; }`):(p+=`
+.${S} path { ${C[S].styles.join(" !important; ")} !important; }`,p+=`
+.${S} rect { ${C[S].styles.join(" !important; ")} !important; }`,p+=`
+.${S} polygon { ${C[S].styles.join(" !important; ")} !important; }`,p+=`
+.${S} ellipse { ${C[S].styles.join(" !important; ")} !important; }`,p+=`
+.${S} circle { ${C[S].styles.join(" !important; ")} !important; }`,C[S].textStyles&&(p+=`
+.${S} tspan { ${C[S].textStyles.join(" !important; ")} !important; }`))}const _=((C,M)=>t1(bw(`${C}{${M}}`),xw))(`#${t}`,Dw(h,p,a.themeVariables)),y=document.createElement("style");y.innerHTML=`#${t} `+_,d.insertBefore(y,f);try{await o.renderer.draw(e,t,e1.version,o)}catch(C){throw a_.draw(e,t,e1.version),C}s.select(`[id="${t}"]`).selectAll("foreignobject > *").attr("xmlns","http://www.w3.org/1999/xhtml");let b=s.select("#d"+t).node().innerHTML;if(H.debug("cnf.arrowMarkerAbsolute",a.arrowMarkerAbsolute),!Mr(a.arrowMarkerAbsolute)&&a.securityLevel!=="sandbox"&&(b=b.replace(/marker-end="url\(.*?#/g,'marker-end="url(#',"g")),b=w0(b),b=b.replace(/<br>/g,"<br/>"),a.securityLevel==="sandbox"){const C=s.select("#d"+t+" svg").node(),M="100%";let S="100%";C&&(S=C.viewBox.baseVal.height+"px"),b=`<iframe style="width:${M};height:${S};border:0;margin:0;" src="data:text/html;base64,${btoa('<body style="margin:0">'+b+"</body>")}" sandbox="allow-top-navigation-by-user-activation allow-popups">
+ The \u201Ciframe\u201D tag is not supported by your browser.
+</iframe>`}else a.securityLevel!=="loose"&&(b=Ec.sanitize(b,{ADD_TAGS:["foreignobject"],ADD_ATTR:["dominant-baseline"]}));if(typeof r<"u")switch(h){case"flowchart":case"flowchart-v2":r(b,fa.bindFunctions);break;case"gantt":r(b,P4.bindFunctions);break;case"class":case"classDiagram":r(b,Jo.bindFunctions);break;default:r(b)}else H.debug("CB = undefined!");mL();const x=a.securityLevel==="sandbox"?"#i"+t:"#d"+t,k=St(x).node();if(k&&"remove"in k&&k.remove(),l)throw l;return b};let Xs={};const pst=function(t,e,r,n){try{if(e!==void 0)switch(e=e.trim(),r){case"open_directive":Xs={};break;case"type_directive":if(!Xs)throw new Error("currentDirective is undefined");Xs.type=e.toLowerCase();break;case"arg_directive":if(!Xs)throw new Error("currentDirective is undefined");Xs.args=JSON.parse(e);break;case"close_directive":gst(t,Xs,n),Xs=void 0;break}}catch(i){H.error(`Error while rendering sequenceDiagram directive: ${e} jison context: ${r}`),H.error(i.message)}},gst=function(t,e,r){switch(H.debug(`Directive type=${e.type} with args:`,e.args),e.type){case"init":case"initialize":{["config"].forEach(n=>{typeof e.args[n]<"u"&&(r==="flowchart-v2"&&(r="flowchart"),e.args[r]=e.args[n],delete e.args[n])}),H.debug("sanitize in handleDirective",e.args),Vs(e.args),H.debug("sanitize in handleDirective (done)",e.args),ug(e.args);break}case"wrap":case"nowrap":t&&t.setWrap&&t.setWrap(e.type==="wrap");break;case"themeCss":H.warn("themeCss encountered");break;default:H.warn(`Unhandled directive: source: '%%{${e.type}: ${JSON.stringify(e.args?e.args:{})}}%%`,e);break}};function yst(t={}){t.fontFamily&&(t.themeVariables||(t.themeVariables={}),t.themeVariables.fontFamily=t.fontFamily),EX(t),(t==null?void 0:t.theme)&&t.theme in aa?t.themeVariables=aa[t.theme].getThemeVariables(t.themeVariables):t&&(t.themeVariables=aa.default.getThemeVariables(t.themeVariables));const e=typeof t=="object"?TX(t):ww();D0(e.logLevel),yu()}const He=Object.freeze({render:fst,renderAsync:dst,parse:ust,parseAsync:hst,parseDirective:pst,initialize:yst,getConfig:nt,setConfig:Tw,getSiteConfig:ww,updateSiteConfig:CX,reset:()=>{Rc()},globalReset:()=>{Rc(Xo)},defaultConfig:Xo});D0(nt().logLevel),Rc(nt());const mst=async function(t,e,r){try{const n=He.getConfig();(n==null?void 0:n.lazyLoadedDiagrams)&&n.lazyLoadedDiagrams.length>0?await QL(t,e,r):KL(t,e,r)}catch(n){H.warn("Syntax Error rendering"),ng(n)&&H.warn(n.str),$n.parseError&&$n.parseError(n)}},XL=(t,e,r)=>{H.warn(t),ng(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}))},KL=function(t,e,r){const n=He.getConfig();t&&($n.sequenceConfig=t),H.debug(`${r?"":"No "}Callback function found`);let i;if(typeof e>"u")i=document.querySelectorAll(".mermaid");else if(typeof e=="string")i=document.querySelectorAll(e);else if(e instanceof HTMLElement)i=[e];else if(e instanceof NodeList)i=e;else throw new Error("Invalid argument nodes for mermaid.init");H.debug(`Found ${i.length} diagrams`),typeof(t==null?void 0:t.startOnLoad)<"u"&&(H.debug("Start On Load: "+(t==null?void 0:t.startOnLoad)),He.updateSiteConfig({startOnLoad:t==null?void 0:t.startOnLoad}));const a=new Se.initIdGenerator(n.deterministicIds,n.deterministicIDSeed);let s;const o=[];for(const l of Array.from(i)){H.info("Rendering diagram: "+l.id);/*! Check if previously processed */if(l.getAttribute("data-processed"))continue;l.setAttribute("data-processed","true");const u=`mermaid-${a.next()}`;s=l.innerHTML,s=Se.entityDecode(s).trim().replace(/<br\s*\/?>/gi,"<br/>");const h=Se.detectInit(s);h&&H.debug("Detected early reinit: ",h);try{He.render(u,s,(d,f)=>{l.innerHTML=d,typeof r<"u"&&r(u),f&&f(l)},l)}catch(d){XL(d,o,$n.parseError)}}if(o.length>0)throw o[0]};let o_;const ZL=async t=>{var e;return o_===void 0&&(o_=Promise.allSettled(((e=t==null?void 0:t.lazyLoadedDiagrams)!=null?e:[]).map(async r=>{const{id:n,detector:i,loadDiagram:a}=await import(r);Kk(n,i,a)}))),await o_};let l_;const bst=async t=>{var e,r;l_===void 0&&(H.debug(`Loading ${(e=t==null?void 0:t.lazyLoadedDiagrams)==null?void 0:e.length} external diagrams`),l_=Promise.allSettled(((r=t==null?void 0:t.lazyLoadedDiagrams)!=null?r:[]).map(async n=>{const{id:i,detector:a,loadDiagram:s}=await import(n),{diagram:o}=await s();Lr(i,o,a,o.injectUtils)}))),await l_},QL=async function(t,e,r){const n=He.getConfig(),i=[];for(const h of await ZL(n))h.status=="rejected"&&i.push(h.reason);t&&($n.sequenceConfig=t),H.debug(`${r?"":"No "}Callback function found`);let a;if(typeof e>"u")a=document.querySelectorAll(".mermaid");else if(typeof e=="string")a=document.querySelectorAll(e);else if(e instanceof HTMLElement)a=[e];else if(e instanceof NodeList)a=e;else throw new Error("Invalid argument nodes for mermaid.init");H.debug(`Found ${a.length} diagrams`),typeof(t==null?void 0:t.startOnLoad)<"u"&&(H.debug("Start On Load: "+(t==null?void 0:t.startOnLoad)),He.updateSiteConfig({startOnLoad:t==null?void 0:t.startOnLoad}));const s=new Se.initIdGenerator(n.deterministicIds,n.deterministicIDSeed);let o;const l=[];for(const h of Array.from(a)){H.info("Rendering diagram: "+h.id);/*! Check if previously processed */if(h.getAttribute("data-processed"))continue;h.setAttribute("data-processed","true");const d=`mermaid-${s.next()}`;o=h.innerHTML,o=Se.entityDecode(o).trim().replace(/<br\s*\/?>/gi,"<br/>");const f=Se.detectInit(o);f&&H.debug("Detected early reinit: ",f);try{await He.renderAsync(d,o,(p,m)=>{h.innerHTML=p,typeof r<"u"&&r(d),m&&m(h)},h)}catch(p){XL(p,l,$n.parseError)}}const u=[...i,...l];if(u.length>0)throw u[0]},_st=function(t){He.initialize(t)},vst=async function(t){t.loadExternalDiagramsAtStartup?await bst(t):await ZL(t),He.initialize(t)},JL=function(){if($n.startOnLoad){const{startOnLoad:t}=He.getConfig();t&&$n.init()}};if(typeof document<"u"){/*!
+ * Wait for document loaded before starting the execution
+ */window.addEventListener("load",JL,!1)}const xst=function(t){$n.parseError=t},kst=t=>He.parse(t,$n.parseError),T0=[];let c_=!1;const tR=async()=>{if(!c_){for(c_=!0;T0.length>0;){const t=T0.shift();if(t)try{await t()}catch(e){H.error("Error executing queue",e)}}c_=!1}},wst=t=>new Promise((e,r)=>{const n=()=>new Promise((i,a)=>{He.parseAsync(t,$n.parseError).then(s=>{i(s),e(s)},s=>{H.error("Error parsing",s),a(s),r(s)})});T0.push(n),tR()}),Tst=(t,e,r,n)=>new Promise((i,a)=>{const s=()=>new Promise((o,l)=>{He.renderAsync(t,e,r,n).then(u=>{o(u),i(u)},u=>{H.error("Error parsing",u),l(u),a(u)})});T0.push(s),tR()}),$n={startOnLoad:!0,diagrams:{},mermaidAPI:He,parse:kst,parseAsync:wst,render:He.render,renderAsync:Tst,init:mst,initThrowsErrors:KL,initThrowsErrorsAsync:QL,initialize:_st,initializeAsync:vst,parseError:void 0,contentLoaded:JL,setParseErrorHandler:xst};return $n});
+//# sourceMappingURL=mermaid.min.js.map