apexsankey 1.1.2 → 1.1.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/apexsankey.min.js CHANGED
@@ -1,4 +1,4 @@
1
- !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t="undefined"!=typeof globalThis?globalThis:t||self).ApexSankey=n()}(this,(function(){"use strict";const t={},n=[];function e(n,r){if(Array.isArray(n))for(const t of n)e(t,r);else if("object"!=typeof n)i(Object.getOwnPropertyNames(r)),t[n]=Object.assign(t[n]||{},r);else for(const t in n)e(t,n[t])}function r(n){return t[n]||{}}function i(t){n.push(...t)}function o(t,n){let e;const r=t.length,i=[];for(e=0;e<r;e++)i.push(n(t[e]));return i}function u(t){return t%360*Math.PI/180}function s(t){return t.charAt(0).toUpperCase()+t.slice(1)}function a(t,n,e,r){return null!=n&&null!=e||(r=r||t.bbox(),null==n?n=r.width/r.height*e:null==e&&(e=r.height/r.width*n)),{width:n,height:e}}function c(t,n){const e=t.origin;let r=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",i=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=e&&([r,i]=Array.isArray(e)?e:"object"==typeof e?[e.x,e.y]:[e,e]);const o="string"==typeof r,u="string"==typeof i;if(o||u){const{height:t,width:e,x:s,y:a}=n.bbox();o&&(r=r.includes("left")?s:r.includes("right")?s+e:s+e/2),u&&(i=i.includes("top")?a:i.includes("bottom")?a+t:a+t/2)}return[r,i]}const h=new Set(["desc","metadata","title"]),f=t=>h.has(t.nodeName),l=(t,n,e={})=>{const r={...n};for(const i in r)r[i].valueOf()===e[i]&&delete r[i];Object.keys(r).length?t.node.setAttribute("data-svgjs",JSON.stringify(r)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},d="http://www.w3.org/2000/svg",p="http://www.w3.org/2000/xmlns/",v="http://www.w3.org/1999/xlink",g={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};class y{}const _={},m="___SYMBOL___ROOT___";function w(t,n=d){return g.document.createElementNS(n,t)}function b(t,n=!1){if(t instanceof y)return t;if("object"==typeof t)return j(t);if(null==t)return new _[m];if("string"==typeof t&&"<"!==t.charAt(0))return j(g.document.querySelector(t));const e=n?g.document.createElement("div"):w("svg");return e.innerHTML=t,t=j(e.firstChild),e.removeChild(e.firstChild),t}function x(t,n){return n&&(n instanceof g.window.Node||n.ownerDocument&&n instanceof n.ownerDocument.defaultView.Node)?n:w(t)}function E(t){if(!t)return null;if(t.instance instanceof y)return t.instance;if("#document-fragment"===t.nodeName)return new _.Fragment(t);let n=s(t.nodeName||"Dom");return"LinearGradient"===n||"RadialGradient"===n?n="Gradient":_[n]||(n="Dom"),new _[n](t)}let j=E;function A(t,n=t.name,e=!1){return _[n]=t,e&&(_[m]=t),i(Object.getOwnPropertyNames(t.prototype)),t}let O=1e3;function M(t){return"Svgjs"+s(t)+O++}function S(t){for(let n=t.children.length-1;n>=0;n--)S(t.children[n]);return t.id?(t.id=M(t.nodeName),t):t}function k(t,n){let e,r;for(r=(t=Array.isArray(t)?t:[t]).length-1;r>=0;r--)for(e in n)t[r].prototype[e]=n[e]}function C(t){return function(...n){const e=n[n.length-1];return!e||e.constructor!==Object||e instanceof Array?t.apply(this,n):t.apply(this,n.slice(0,-1)).attr(e)}}e("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=b(t)).remove();const n=this.position();return this.parent().add(t,n),this},after:function(t){(t=b(t)).remove();const n=this.position();return this.parent().add(t,n+1),this},insertBefore:function(t){return(t=b(t)).before(this),this},insertAfter:function(t){return(t=b(t)).after(this),this}});const T=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,I=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,N=/rgb\((\d+),(\d+),(\d+)\)/,R=/(#[a-z_][a-z0-9\-_]*)/i,z=/\)\s*,?\s*/,P=/\s/g,D=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,L=/^rgb\(/,F=/^(\s+)?$/,B=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,$=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,V=/[\s,]+/,X=/[MLHVCSQTAZ]/i;function Y(t){const n=Math.round(t),e=Math.max(0,Math.min(255,n)).toString(16);return 1===e.length?"0"+e:e}function U(t,n){for(let e=n.length;e--;)if(null==t[n[e]])return!1;return!0}function q(t,n,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(n-t)*e:e<.5?n:e<2/3?t+(n-t)*(2/3-e)*6:t}e("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(V)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const n=this.classes();n.push(t),this.attr("class",n.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(n){return n!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),e("Dom",{css:function(t,n){const e={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const n=t.split(/\s*:\s*/);e[n[0]]=n[1]})),e;if(arguments.length<2){if(Array.isArray(t)){for(const n of t){const t=n;e[n]=this.node.style.getPropertyValue(t)}return e}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const n in t)this.node.style.setProperty(n,null==t[n]||F.test(t[n])?"":t[n])}return 2===arguments.length&&this.node.style.setProperty(t,null==n||F.test(n)?"":n),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),e("Dom",{data:function(t,n,e){if(null==t)return this.data(o(function(t,n){let e;const r=t.length,i=[];for(e=0;e<r;e++)n(t[e])&&i.push(t[e]);return i}(this.node.attributes,(t=>0===t.nodeName.indexOf("data-"))),(t=>t.nodeName.slice(5))));if(t instanceof Array){const n={};for(const e of t)n[e]=this.data(e);return n}if("object"==typeof t)for(n in t)this.data(n,t[n]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(r){return this.attr("data-"+t)}else this.attr("data-"+t,null===n?null:!0===e||"string"==typeof n||"number"==typeof n?n:JSON.stringify(n));return this}}),e("Dom",{remember:function(t,n){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=n}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class W{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof W||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",n){const{random:e,round:r,sin:i,PI:o}=Math;if("vibrant"===t){const t=24*e()+57,n=38*e()+45,r=360*e();return new W(t,n,r,"lch")}if("sine"===t){const t=r(80*i(2*o*(n=null==n?e():n)/.5+.01)+150),u=r(50*i(2*o*n/.5+4.6)+200),s=r(100*i(2*o*n/.5+2.3)+150);return new W(t,u,s)}if("pastel"===t){const t=8*e()+86,n=17*e()+9,r=360*e();return new W(t,n,r,"lch")}if("dark"===t){const t=10+10*e(),n=50*e()+86,r=360*e();return new W(t,n,r,"lch")}if("rgb"===t){const t=255*e(),n=255*e(),r=255*e();return new W(t,n,r)}if("lab"===t){const t=100*e(),n=256*e()-128,r=256*e()-128;return new W(t,n,r,"lab")}if("grey"===t){const t=255*e();return new W(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(D.test(t)||L.test(t))}cmyk(){const{_a:t,_b:n,_c:e}=this.rgb(),[r,i,o]=[t,n,e].map((t=>t/255)),u=Math.min(1-r,1-i,1-o);if(1===u)return new W(0,0,0,1,"cmyk");return new W((1-r-u)/(1-u),(1-i-u)/(1-u),(1-o-u)/(1-u),u,"cmyk")}hsl(){const{_a:t,_b:n,_c:e}=this.rgb(),[r,i,o]=[t,n,e].map((t=>t/255)),u=Math.max(r,i,o),s=Math.min(r,i,o),a=(u+s)/2,c=u===s,h=u-s;return new W(360*(c?0:u===r?((i-o)/h+(i<o?6:0))/6:u===i?((o-r)/h+2)/6:u===o?((r-i)/h+4)/6:0),100*(c?0:a>.5?h/(2-u-s):h/(u+s)),100*a,"hsl")}init(t=0,n=0,e=0,r=0,i="rgb"){if(t=t||0,this.space)for(const f in this.space)delete this[this.space[f]];if("number"==typeof t)i="string"==typeof r?r:i,r="string"==typeof r?0:r,Object.assign(this,{_a:t,_b:n,_c:e,_d:r,space:i});else if(t instanceof Array)this.space=n||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const e=function(t,n){const e=U(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:U(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:U(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:U(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:U(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:U(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return e.space=n||e.space,e}(t,n);Object.assign(this,e)}else if("string"==typeof t)if(L.test(t)){const n=t.replace(P,""),[e,r,i]=N.exec(n).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:e,_b:r,_c:i,_d:0,space:"rgb"})}else{if(!D.test(t))throw Error("Unsupported string format, can't construct Color");{const n=t=>parseInt(t,16),[,e,r,i]=I.exec((o=t,4===o.length?["#",o.substring(1,2),o.substring(1,2),o.substring(2,3),o.substring(2,3),o.substring(3,4),o.substring(3,4)].join(""):o)).map(n);Object.assign(this,{_a:e,_b:r,_c:i,_d:0,space:"rgb"})}}var o;const{_a:u,_b:s,_c:a,_d:c}=this,h="rgb"===this.space?{r:u,g:s,b:a}:"xyz"===this.space?{x:u,y:s,z:a}:"hsl"===this.space?{h:u,s:s,l:a}:"lab"===this.space?{l:u,a:s,b:a}:"lch"===this.space?{l:u,c:s,h:a}:"cmyk"===this.space?{c:u,m:s,y:a,k:c}:{};Object.assign(this,h)}lab(){const{x:t,y:n,z:e}=this.xyz();return new W(116*n-16,500*(t-n),200*(n-e),"lab")}lch(){const{l:t,a:n,b:e}=this.lab(),r=Math.sqrt(n**2+e**2);let i=180*Math.atan2(e,n)/Math.PI;i<0&&(i*=-1,i=360-i);return new W(t,r,i,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:n,z:e}=this;if("lab"===this.space||"lch"===this.space){let{l:r,a:i,b:o}=this;if("lch"===this.space){const{c:t,h:n}=this,e=Math.PI/180;i=t*Math.cos(e*n),o=t*Math.sin(e*n)}const u=(r+16)/116,s=i/500+u,a=u-o/200,c=16/116,h=.008856,f=7.787;t=.95047*(s**3>h?s**3:(s-c)/f),n=1*(u**3>h?u**3:(u-c)/f),e=1.08883*(a**3>h?a**3:(a-c)/f)}const r=3.2406*t+-1.5372*n+-.4986*e,i=-.9689*t+1.8758*n+.0415*e,o=.0557*t+-.204*n+1.057*e,u=Math.pow,s=.0031308,a=r>s?1.055*u(r,1/2.4)-.055:12.92*r,c=i>s?1.055*u(i,1/2.4)-.055:12.92*i,h=o>s?1.055*u(o,1/2.4)-.055:12.92*o;return new W(255*a,255*c,255*h)}if("hsl"===this.space){let{h:t,s:n,l:e}=this;if(t/=360,n/=100,e/=100,0===n){e*=255;return new W(e,e,e)}const r=e<.5?e*(1+n):e+n-e*n,i=2*e-r,o=255*q(i,r,t+1/3),u=255*q(i,r,t),s=255*q(i,r,t-1/3);return new W(o,u,s)}if("cmyk"===this.space){const{c:t,m:n,y:e,k:r}=this,i=255*(1-Math.min(1,t*(1-r)+r)),o=255*(1-Math.min(1,n*(1-r)+r)),u=255*(1-Math.min(1,e*(1-r)+r));return new W(i,o,u)}return this;var t}toArray(){const{_a:t,_b:n,_c:e,_d:r,space:i}=this;return[t,n,e,r,i]}toHex(){const[t,n,e]=this._clamped().map(Y);return`#${t}${n}${e}`}toRgb(){const[t,n,e]=this._clamped();return`rgb(${t},${n},${e})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:n,_c:e}=this.rgb(),[r,i,o]=[t,n,e].map((t=>t/255)),u=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,s=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,a=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92,c=(.4124*u+.3576*s+.1805*a)/.95047,h=(.2126*u+.7152*s+.0722*a)/1,f=(.0193*u+.1192*s+.9505*a)/1.08883,l=c>.008856?Math.pow(c,1/3):7.787*c+16/116,d=h>.008856?Math.pow(h,1/3):7.787*h+16/116,p=f>.008856?Math.pow(f,1/3):7.787*f+16/116;return new W(l,d,p,"xyz")}_clamped(){const{_a:t,_b:n,_c:e}=this.rgb(),{max:r,min:i,round:o}=Math;return[t,n,e].map((t=>r(0,i(o(t),255))))}}class G{constructor(...t){this.init(...t)}clone(){return new G(this)}init(t,n){const e=0,r=0,i=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:n};return this.x=null==i.x?e:i.x,this.y=null==i.y?r:i.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){H.isMatrixLike(t)||(t=new H(t));const{x:n,y:e}=this;return this.x=t.a*n+t.c*e+t.e,this.y=t.b*n+t.d*e+t.f,this}}function Z(t,n,e){return Math.abs(n-t)<1e-6}class H{constructor(...t){this.init(...t)}static formatTransforms(t){const n="both"===t.flip||!0===t.flip,e=t.flip&&(n||"x"===t.flip)?-1:1,r=t.flip&&(n||"y"===t.flip)?-1:1,i=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,o=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,u=t.scale&&t.scale.length?t.scale[0]*e:isFinite(t.scale)?t.scale*e:isFinite(t.scaleX)?t.scaleX*e:e,s=t.scale&&t.scale.length?t.scale[1]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleY)?t.scaleY*r:r,a=t.shear||0,c=t.rotate||t.theta||0,h=new G(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),f=h.x,l=h.y,d=new G(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),p=d.x,v=d.y,g=new G(t.translate||t.tx||t.translateX,t.ty||t.translateY),y=g.x,_=g.y,m=new G(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:u,scaleY:s,skewX:i,skewY:o,shear:a,theta:c,rx:m.x,ry:m.y,tx:y,ty:_,ox:f,oy:l,px:p,py:v}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,n,e){const r=t.a*n.a+t.c*n.b,i=t.b*n.a+t.d*n.b,o=t.a*n.c+t.c*n.d,u=t.b*n.c+t.d*n.d,s=t.e+t.a*n.e+t.c*n.f,a=t.f+t.b*n.e+t.d*n.f;return e.a=r,e.b=i,e.c=o,e.d=u,e.e=s,e.f=a,e}around(t,n,e){return this.clone().aroundO(t,n,e)}aroundO(t,n,e){const r=t||0,i=n||0;return this.translateO(-r,-i).lmultiplyO(e).translateO(r,i)}clone(){return new H(this)}decompose(t=0,n=0){const e=this.a,r=this.b,i=this.c,o=this.d,u=this.e,s=this.f,a=e*o-r*i,c=a>0?1:-1,h=c*Math.sqrt(e*e+r*r),f=Math.atan2(c*r,c*e),l=180/Math.PI*f,d=Math.cos(f),p=Math.sin(f),v=(e*i+r*o)/a,g=i*h/(v*e-r)||o*h/(v*r+e);return{scaleX:h,scaleY:g,shear:v,rotate:l,translateX:u-t+t*d*h+n*(v*d*h-p*g),translateY:s-n+t*p*h+n*(v*p*h+d*g),originX:t,originY:n,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const n=new H(t);return Z(this.a,n.a)&&Z(this.b,n.b)&&Z(this.c,n.c)&&Z(this.d,n.d)&&Z(this.e,n.e)&&Z(this.f,n.f)}flip(t,n){return this.clone().flipO(t,n)}flipO(t,n){return"x"===t?this.scaleO(-1,1,n,0):"y"===t?this.scaleO(1,-1,0,n):this.scaleO(-1,-1,t,n||t)}init(t){const n=H.fromArray([1,0,0,1,0,0]);return t=t instanceof bt?t.matrixify():"string"==typeof t?H.fromArray(t.split(V).map(parseFloat)):Array.isArray(t)?H.fromArray(t):"object"==typeof t&&H.isMatrixLike(t)?t:"object"==typeof t?(new H).transform(t):6===arguments.length?H.fromArray([].slice.call(arguments)):n,this.a=null!=t.a?t.a:n.a,this.b=null!=t.b?t.b:n.b,this.c=null!=t.c?t.c:n.c,this.d=null!=t.d?t.d:n.d,this.e=null!=t.e?t.e:n.e,this.f=null!=t.f?t.f:n.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,n=this.b,e=this.c,r=this.d,i=this.e,o=this.f,u=t*r-n*e;if(!u)throw new Error("Cannot invert "+this);const s=r/u,a=-n/u,c=-e/u,h=t/u,f=-(s*i+c*o),l=-(a*i+h*o);return this.a=s,this.b=a,this.c=c,this.d=h,this.e=f,this.f=l,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const n=t instanceof H?t:new H(t);return H.matrixMultiply(n,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const n=t instanceof H?t:new H(t);return H.matrixMultiply(this,n,this)}rotate(t,n,e){return this.clone().rotateO(t,n,e)}rotateO(t,n=0,e=0){t=u(t);const r=Math.cos(t),i=Math.sin(t),{a:o,b:s,c:a,d:c,e:h,f:f}=this;return this.a=o*r-s*i,this.b=s*r+o*i,this.c=a*r-c*i,this.d=c*r+a*i,this.e=h*r-f*i+e*i-n*r+n,this.f=f*r+h*i-n*i-e*r+e,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,n=t,e=0,r=0){3===arguments.length&&(r=e,e=n,n=t);const{a:i,b:o,c:u,d:s,e:a,f:c}=this;return this.a=i*t,this.b=o*n,this.c=u*t,this.d=s*n,this.e=a*t-e*t+e,this.f=c*n-r*n+r,this}shear(t,n,e){return this.clone().shearO(t,n,e)}shearO(t,n=0,e=0){const{a:r,b:i,c:o,d:u,e:s,f:a}=this;return this.a=r+i*t,this.c=o+u*t,this.e=s+a*t-e*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,n=t,e=0,r=0){3===arguments.length&&(r=e,e=n,n=t),t=u(t),n=u(n);const i=Math.tan(t),o=Math.tan(n),{a:s,b:a,c:c,d:h,e:f,f:l}=this;return this.a=s+a*i,this.b=a+s*o,this.c=c+h*i,this.d=h+c*o,this.e=f+l*i-r*i,this.f=l+f*o-e*o,this}skewX(t,n,e){return this.skew(t,0,n,e)}skewY(t,n,e){return this.skew(0,t,n,e)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(H.isMatrixLike(t)){return new H(t).multiplyO(this)}const n=H.formatTransforms(t),{x:e,y:r}=new G(n.ox,n.oy).transform(this),i=(new H).translateO(n.rx,n.ry).lmultiplyO(this).translateO(-e,-r).scaleO(n.scaleX,n.scaleY).skewO(n.skewX,n.skewY).shearO(n.shear).rotateO(n.theta).translateO(e,r);if(isFinite(n.px)||isFinite(n.py)){const t=new G(e,r).transform(i),o=isFinite(n.px)?n.px-t.x:0,u=isFinite(n.py)?n.py-t.y:0;i.translateO(o,u)}return i.translateO(n.tx,n.ty),i}translate(t,n){return this.clone().translateO(t,n)}translateO(t,n){return this.e+=t||0,this.f+=n||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function Q(){if(!Q.nodes){const t=b().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const n=t.path().node;Q.nodes={svg:t,path:n}}if(!Q.nodes.svg.node.parentNode){const t=g.document.body||g.document.documentElement;Q.nodes.svg.addTo(t)}return Q.nodes}function J(t){return!(t.width||t.height||t.x||t.y)}A(H,"Matrix");class K{constructor(...t){this.init(...t)}addOffset(){return this.x+=g.window.pageXOffset,this.y+=g.window.pageYOffset,new K(this)}init(t){return t="string"==typeof t?t.split(V).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return J(this)}merge(t){const n=Math.min(this.x,t.x),e=Math.min(this.y,t.y),r=Math.max(this.x+this.width,t.x+t.width)-n,i=Math.max(this.y+this.height,t.y+t.height)-e;return new K(n,e,r,i)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof H||(t=new H(t));let n=1/0,e=-1/0,r=1/0,i=-1/0;return[new G(this.x,this.y),new G(this.x2,this.y),new G(this.x,this.y2),new G(this.x2,this.y2)].forEach((function(o){o=o.transform(t),n=Math.min(n,o.x),e=Math.max(e,o.x),r=Math.min(r,o.y),i=Math.max(i,o.y)})),new K(n,r,e-n,i-r)}}function tt(t,n,e){let r;try{if(r=n(t.node),J(r)&&((i=t.node)!==g.document&&!(g.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===g.document}).call(g.document.documentElement,i)))throw new Error("Element not in the dom")}catch(o){r=e(t)}var i;return r}e({viewbox:{viewbox(t,n,e,r){return null==t?new K(this.attr("viewBox")):this.attr("viewBox",new K(t,n,e,r))},zoom(t,n){let{width:e,height:r}=this.attr(["width","height"]);if((e||r)&&"string"!=typeof e&&"string"!=typeof r||(e=this.node.clientWidth,r=this.node.clientHeight),!e||!r)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const i=this.viewbox(),o=e/i.width,u=r/i.height,s=Math.min(o,u);if(null==t)return s;let a=s/t;a===1/0&&(a=Number.MAX_SAFE_INTEGER/100),n=n||new G(e/2/o+i.x,r/2/u+i.y);const c=new K(i).transform(new H({scale:a,origin:n}));return this.viewbox(c)}}}),A(K,"Box");class nt extends Array{constructor(t=[],...n){if(super(t,...n),"number"==typeof t)return this;this.length=0,this.push(...t)}}k([nt],{each(t,...n){return"function"==typeof t?this.map(((n,e,r)=>t.call(n,n,e,r))):this.map((e=>e[t](...n)))},toArray(){return Array.prototype.concat.apply([],this)}});const et=["toArray","constructor","each"];function rt(t,n){return new nt(o((n||g.document).querySelectorAll(t),(function(t){return E(t)})))}nt.extend=function(t){t=t.reduce(((t,n)=>(et.includes(n)||"_"===n[0]||(n in Array.prototype&&(t["$"+n]=Array.prototype[n]),t[n]=function(...t){return this.each(n,...t)}),t)),{}),k([nt],t)};let it=0;const ot={};function ut(t){let n=t.getEventHolder();return n===g.window&&(n=ot),n.events||(n.events={}),n.events}function st(t){return t.getEventTarget()}function at(t,n,e,r,i){const o=e.bind(r||t),u=b(t),s=ut(u),a=st(u);n=Array.isArray(n)?n:n.split(V),e._svgjsListenerId||(e._svgjsListenerId=++it),n.forEach((function(t){const n=t.split(".")[0],r=t.split(".")[1]||"*";s[n]=s[n]||{},s[n][r]=s[n][r]||{},s[n][r][e._svgjsListenerId]=o,a.addEventListener(n,o,i||!1)}))}function ct(t,n,e,r){const i=b(t),o=ut(i),u=st(i);("function"!=typeof e||(e=e._svgjsListenerId))&&(n=Array.isArray(n)?n:(n||"").split(V)).forEach((function(t){const n=t&&t.split(".")[0],s=t&&t.split(".")[1];let a,c;if(e)o[n]&&o[n][s||"*"]&&(u.removeEventListener(n,o[n][s||"*"][e],r||!1),delete o[n][s||"*"][e]);else if(n&&s){if(o[n]&&o[n][s]){for(c in o[n][s])ct(u,[n,s].join("."),c);delete o[n][s]}}else if(s)for(t in o)for(a in o[t])s===a&&ct(u,[t,s].join("."));else if(n){if(o[n]){for(a in o[n])ct(u,[n,a].join("."));delete o[n]}}else{for(t in o)ct(u,t);!function(t){let n=t.getEventHolder();n===g.window&&(n=ot),n.events&&(n.events={})}(i)}}))}class ht extends y{addEventListener(){}dispatch(t,n,e){return function(t,n,e,r){const i=st(t);return n instanceof g.window.Event||(n=new g.window.CustomEvent(n,{detail:e,cancelable:!0,...r})),i.dispatchEvent(n),n}(this,t,n,e)}dispatchEvent(t){const n=this.getEventHolder().events;if(!n)return!0;const e=n[t.type];for(const r in e)for(const n in e[r])e[r][n](t);return!t.defaultPrevented}fire(t,n,e){return this.dispatch(t,n,e),this}getEventHolder(){return this}getEventTarget(){return this}off(t,n,e){return ct(this,t,n,e),this}on(t,n,e,r){return at(this,t,n,e,r),this}removeEventListener(){}}function ft(){}A(ht,"EventTarget");const lt=400,dt=">",pt=0,vt={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class gt extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(V).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class yt{constructor(...t){this.init(...t)}convert(t){return new yt(this.value,t)}divide(t){return t=new yt(t),new yt(this/t,this.unit||t.unit)}init(t,n){return n=Array.isArray(t)?t[1]:n,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=n||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(n=t.match(T))&&(this.value=parseFloat(n[1]),"%"===n[5]?this.value/=100:"s"===n[5]&&(this.value*=1e3),this.unit=n[5]):t instanceof yt&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new yt(t),new yt(this-t,this.unit||t.unit)}plus(t){return t=new yt(t),new yt(this+t,this.unit||t.unit)}times(t){return t=new yt(t),new yt(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const _t=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),mt=[];class wt extends ht{constructor(t,n){super(),this.node=t,this.type=t.nodeName,n&&t!==n&&this.attr(n)}add(t,n){return(t=b(t)).removeNamespace&&this.node instanceof g.window.SVGElement&&t.removeNamespace(),null==n?this.node.appendChild(t.node):t.node!==this.node.childNodes[n]&&this.node.insertBefore(t.node,this.node.childNodes[n]),this}addTo(t,n){return b(t).put(this,n)}children(){return new nt(o(this.node.children,(function(t){return E(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,n=!0){this.writeDataToDom();let e=this.node.cloneNode(t);return n&&(e=S(e)),new this.constructor(e)}each(t,n){const e=this.children();let r,i;for(r=0,i=e.length;r<i;r++)t.apply(e[r],[r,e]),n&&e[r].each(t,n);return this}element(t,n){return this.put(new wt(w(t),n))}first(){return E(this.node.firstChild)}get(t){return E(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,n){return this.xml(t,n,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=M(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return E(this.node.lastChild)}matches(t){const n=this.node,e=n.matches||n.matchesSelector||n.msMatchesSelector||n.mozMatchesSelector||n.webkitMatchesSelector||n.oMatchesSelector||null;return e&&e.call(n,t)}parent(t){let n=this;if(!n.node.parentNode)return null;if(n=E(n.node.parentNode),!t)return n;do{if("string"==typeof t?n.matches(t):n instanceof t)return n}while(n=E(n.node.parentNode));return n}put(t,n){return t=b(t),this.add(t,n),t}putIn(t,n){return b(t).add(this,n)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=b(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,n=null){const e=10**t,r=this.attr(n);for(const i in r)"number"==typeof r[i]&&(r[i]=Math.round(r[i]*e)/e);return this.attr(r),this}svg(t,n){return this.xml(t,n,d)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const n=this.parent();if(!n)return this.addTo(t);const e=n.index(this);return n.put(t,e).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,n,e){if("boolean"==typeof t&&(e=n,n=t,t=null),null==t||"function"==typeof t){n=null==n||n,this.writeDataToDom();let e=this;if(null!=t){if(e=E(e.node.cloneNode(!0)),n){const n=t(e);if(e=n||e,!1===n)return""}e.each((function(){const n=t(this),e=n||this;!1===n?this.remove():n&&this!==e&&this.replace(e)}),!0)}return n?e.node.outerHTML:e.node.innerHTML}n=null!=n&&n;const r=w("wrapper",e),i=g.document.createDocumentFragment();r.innerHTML=t;for(let u=r.children.length;u--;)i.appendChild(r.firstElementChild);const o=this.parent();return n?this.replace(i)&&o:this.add(i)}}k(wt,{attr:function(t,n,e){if(null==t){t={},n=this.node.attributes;for(const e of n)t[e.nodeName]=B.test(e.nodeValue)?parseFloat(e.nodeValue):e.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,n)=>(t[n]=this.attr(n),t)),{});if("object"==typeof t&&t.constructor===Object)for(n in t)this.attr(n,t[n]);else if(null===n)this.node.removeAttribute(t);else{if(null==n)return null==(n=this.node.getAttribute(t))?vt[t]:B.test(n)?parseFloat(n):n;"number"==typeof(n=mt.reduce(((n,e)=>e(t,n,this)),n))?n=new yt(n):_t.has(t)&&W.isColor(n)?n=new W(n):n.constructor===Array&&(n=new gt(n)),"leading"===t?this.leading&&this.leading(n):"string"==typeof e?this.node.setAttributeNS(e,t,n.toString()):this.node.setAttribute(t,n.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return rt(t,this.node)},findOne:function(t){return E(this.node.querySelector(t))}}),A(wt,"Dom");class bt extends wt{constructor(t,n){super(t,n),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,n){return this.cx(t).cy(n)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,n){return this.dx(t).dy(n)}dx(t=0){return this.x(new yt(t).plus(this.x()))}dy(t=0){return this.y(new yt(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,n){return this.x(t).y(n)}parents(t=this.root()){const n="string"==typeof t;n||(t=b(t));const e=new nt;let r=this;for(;(r=r.parent())&&r.node!==g.document&&"#document-fragment"!==r.nodeName&&(e.push(r),n||r.node!==t.node)&&(!n||!r.matches(t));)if(r.node===this.root().node)return null;return e}reference(t){if(!(t=this.attr(t)))return null;const n=(t+"").match(R);return n?b(n[1]):null}root(){const t=this.parent(_[m]);return t&&t.root()}setData(t){return this.dom=t,this}size(t,n){const e=a(this,t,n);return this.width(new yt(e.width)).height(new yt(e.height))}width(t){return this.attr("width",t)}writeDataToDom(){return l(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}k(bt,{bbox:function(){const t=tt(this,(t=>t.getBBox()),(t=>{try{const n=t.clone().addTo(Q().svg).show(),e=n.node.getBBox();return n.remove(),e}catch(n){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${n.toString()}`)}}));return new K(t)},rbox:function(t){const n=tt(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),e=new K(n);return t?e.transform(t.screenCTM().inverseO()):e.addOffset()},inside:function(t,n){const e=this.bbox();return t>e.x&&n>e.y&&t<e.x+e.width&&n<e.y+e.height},point:function(t,n){return new G(t,n).transformO(this.screenCTM().inverseO())},ctm:function(){return new H(this.node.getCTM())},screenCTM:function(){try{if("function"==typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),n=t.node.getScreenCTM();return t.remove(),new H(n)}return new H(this.node.getScreenCTM())}catch(t){return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new H}}}),A(bt,"Element");const xt={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,n){return"color"===n?t:t+"-"+n}};["fill","stroke"].forEach((function(t){const n={};let r;n[t]=function(n){if(void 0===n)return this.attr(t);if("string"==typeof n||n instanceof W||W.isRgb(n)||n instanceof bt)this.attr(t,n);else for(r=xt[t].length-1;r>=0;r--)null!=n[xt[t][r]]&&this.attr(xt.prefix(t,xt[t][r]),n[xt[t][r]]);return this},e(["Element","Runner"],n)})),e(["Element","Runner"],{matrix:function(t,n,e,r,i,o){return null==t?new H(this):this.attr("transform",new H(t,n,e,r,i,o))},rotate:function(t,n,e){return this.transform({rotate:t,ox:n,oy:e},!0)},skew:function(t,n,e,r){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:n,oy:e},!0):this.transform({skew:[t,n],ox:e,oy:r},!0)},shear:function(t,n,e){return this.transform({shear:t,ox:n,oy:e},!0)},scale:function(t,n,e,r){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:n,oy:e},!0):this.transform({scale:[t,n],ox:e,oy:r},!0)},translate:function(t,n){return this.transform({translate:[t,n]},!0)},relative:function(t,n){return this.transform({relative:[t,n]},!0)},flip:function(t="both",n="center"){return-1==="xybothtrue".indexOf(t)&&(n=t,t="both"),this.transform({flip:t,origin:n},!0)},opacity:function(t){return this.attr("opacity",t)}}),e("radius",{radius:function(t,n=t){return"radialGradient"===(this._element||this).type?this.attr("r",new yt(t)):this.rx(t).ry(n)}}),e("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new G(this.node.getPointAtLength(t))}}),e(["Element","Runner"],{font:function(t,n){if("object"==typeof t){for(n in t)this.font(n,t[n]);return this}return"leading"===t?this.leading(n):"anchor"===t?this.attr("text-anchor",n):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,n):this.attr(t,n)}});e("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,n){return t[n]=function(t){return null===t?this.off(n):this.on(n,t),this},t}),{})),e("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(z).slice(0,-1).map((function(t){const n=t.trim().split("(");return[n[0],n[1].split(V).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,n){return"matrix"===n[0]?t.lmultiply(H.fromArray(n[1])):t[n[0]].apply(t,n[1])}),new H)},toParent:function(t,n){if(this===t)return this;if(f(this.node))return this.addTo(t,n);const e=this.screenCTM(),r=t.screenCTM().inverse();return this.addTo(t,n).untransform().transform(r.multiply(e)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,n){if(null==t||"string"==typeof t){const n=new H(this).decompose();return null==t?n:n[t]}H.isMatrixLike(t)||(t={...t,origin:c(t,this)});const e=new H(!0===n?this:n||!1).transform(t);return this.attr("transform",e)}});class Et extends bt{flatten(){return this.each((function(){if(this instanceof Et)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),n=t.index(this)){return n=-1===n?t.children().length:n,this.each((function(e,r){return r[r.length-e-1].toParent(t,n)})),this.remove()}}A(Et,"Container");class jt extends Et{constructor(t,n=t){super(x("defs",t),n)}flatten(){return this}ungroup(){return this}}A(jt,"Defs");class At extends bt{}function Ot(t){return this.attr("rx",t)}function Mt(t){return this.attr("ry",t)}function St(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function kt(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Ct(t){return this.attr("cx",t)}function Tt(t){return this.attr("cy",t)}function It(t){return null==t?2*this.rx():this.rx(new yt(t).divide(2))}function Nt(t){return null==t?2*this.ry():this.ry(new yt(t).divide(2))}A(At,"Shape");const Rt=Object.freeze(Object.defineProperty({__proto__:null,cx:Ct,cy:Tt,height:Nt,rx:Ot,ry:Mt,width:It,x:St,y:kt},Symbol.toStringTag,{value:"Module"}));class zt extends At{constructor(t,n=t){super(x("ellipse",t),n)}size(t,n){const e=a(this,t,n);return this.rx(new yt(e.width).divide(2)).ry(new yt(e.height).divide(2))}}k(zt,Rt),e("Container",{ellipse:C((function(t=0,n=t){return this.put(new zt).size(t,n).move(0,0)}))}),A(zt,"Ellipse");class Pt extends wt{constructor(t=g.document.createDocumentFragment()){super(t)}xml(t,n,e){if("boolean"==typeof t&&(e=n,n=t,t=null),null==t||"function"==typeof t){const t=new wt(w("wrapper",e));return t.add(this.node.cloneNode(!0)),t.xml(!1,e)}return super.xml(t,!1,e)}}function Dt(t,n){return"radialGradient"===(this._element||this).type?this.attr({fx:new yt(t),fy:new yt(n)}):this.attr({x1:new yt(t),y1:new yt(n)})}function Lt(t,n){return"radialGradient"===(this._element||this).type?this.attr({cx:new yt(t),cy:new yt(n)}):this.attr({x2:new yt(t),y2:new yt(n)})}A(Pt,"Fragment");const Ft=Object.freeze(Object.defineProperty({__proto__:null,from:Dt,to:Lt},Symbol.toStringTag,{value:"Module"}));class Bt extends Et{constructor(t,n){super(x(t+"Gradient","string"==typeof t?null:t),n)}attr(t,n,e){return"transform"===t&&(t="gradientTransform"),super.attr(t,n,e)}bbox(){return new K}targets(){return rt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}k(Bt,Ft),e({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:C((function(t,n){return this.put(new Bt(t)).update(n)}))}}),A(Bt,"Gradient");class $t extends Et{constructor(t,n=t){super(x("pattern",t),n)}attr(t,n,e){return"transform"===t&&(t="patternTransform"),super.attr(t,n,e)}bbox(){return new K}targets(){return rt("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}e({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:C((function(t,n,e){return this.put(new $t).update(e).attr({x:0,y:0,width:t,height:n,patternUnits:"userSpaceOnUse"})}))}}),A($t,"Pattern");class Vt extends At{constructor(t,n=t){super(x("image",t),n)}load(t,n){if(!t)return this;const e=new g.window.Image;return at(e,"load",(function(t){const r=this.parent($t);0===this.width()&&0===this.height()&&this.size(e.width,e.height),r instanceof $t&&0===r.width()&&0===r.height()&&r.size(this.width(),this.height()),"function"==typeof n&&n.call(this,t)}),this),at(e,"load error",(function(){ct(e)})),this.attr("href",e.src=t,v)}}var Xt;Xt=function(t,n,e){return"fill"!==t&&"stroke"!==t||$.test(n)&&(n=e.root().defs().image(n)),n instanceof Vt&&(n=e.root().defs().pattern(0,0,(t=>{t.add(n)}))),n},mt.push(Xt),e({Container:{image:C((function(t,n){return this.put(new Vt).size(0,0).load(t,n)}))}}),A(Vt,"Image");class Yt extends gt{bbox(){let t=-1/0,n=-1/0,e=1/0,r=1/0;return this.forEach((function(i){t=Math.max(i[0],t),n=Math.max(i[1],n),e=Math.min(i[0],e),r=Math.min(i[1],r)})),new K(e,r,t-e,n-r)}move(t,n){const e=this.bbox();if(t-=e.x,n-=e.y,!isNaN(t)&&!isNaN(n))for(let r=this.length-1;r>=0;r--)this[r]=[this[r][0]+t,this[r][1]+n];return this}parse(t=[0,0]){const n=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(V).map(parseFloat)).length%2!=0&&t.pop();for(let e=0,r=t.length;e<r;e+=2)n.push([t[e],t[e+1]]);return n}size(t,n){let e;const r=this.bbox();for(e=this.length-1;e>=0;e--)r.width&&(this[e][0]=(this[e][0]-r.x)*t/r.width+r.x),r.height&&(this[e][1]=(this[e][1]-r.y)*n/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let n=0,e=this.length;n<e;n++)t.push(this[n].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){H.isMatrixLike(t)||(t=new H(t));for(let n=this.length;n--;){const[e,r]=this[n];this[n][0]=t.a*e+t.c*r+t.e,this[n][1]=t.b*e+t.d*r+t.f}return this}}const Ut=Yt;const qt=Object.freeze(Object.defineProperty({__proto__:null,MorphArray:Ut,height:function(t){const n=this.bbox();return null==t?n.height:this.size(n.width,t)},width:function(t){const n=this.bbox();return null==t?n.width:this.size(t,n.height)},x:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)},y:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}},Symbol.toStringTag,{value:"Module"}));class Wt extends At{constructor(t,n=t){super(x("line",t),n)}array(){return new Yt([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,n){return this.attr(this.array().move(t,n).toLine())}plot(t,n,e,r){return null==t?this.array():(t=void 0!==n?{x1:t,y1:n,x2:e,y2:r}:new Yt(t).toLine(),this.attr(t))}size(t,n){const e=a(this,t,n);return this.attr(this.array().size(e.width,e.height).toLine())}}k(Wt,qt),e({Container:{line:C((function(...t){return Wt.prototype.plot.apply(this.put(new Wt),null!=t[0]?t:[0,0,0,0])}))}}),A(Wt,"Line");class Gt extends Et{constructor(t,n=t){super(x("marker",t),n)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,n){return this.attr("refX",t).attr("refY",n)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}}function Zt(t,n){return function(e){return null==e?this[t]:(this[t]=e,n&&n.call(this),this)}}e({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:C((function(t,n,e){return this.put(new Gt).size(t,n).ref(t/2,n/2).viewbox(0,0,t,n).attr("orient","auto").update(e)}))},marker:{marker(t,n,e,r){let i=["marker"];return"all"!==t&&i.push(t),i=i.join("-"),t=arguments[1]instanceof Gt?arguments[1]:this.defs().marker(n,e,r),this.attr(i,t)}}}),A(Gt,"Marker");const Ht={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,n,e,r){return function(i){return i<0?t>0?n/t*i:e>0?r/e*i:0:i>1?e<1?(1-r)/(1-e)*i+(r-e)/(1-e):t<1?(1-n)/(1-t)*i+(n-t)/(1-t):1:3*i*(1-i)**2*n+3*i**2*(1-i)*r+i**3}},steps:function(t,n="end"){n=n.split("-").reverse()[0];let e=t;return"none"===n?--e:"both"===n&&++e,(r,i=!1)=>{let o=Math.floor(r*t);const u=r*o%1==0;return"start"!==n&&"both"!==n||++o,i&&u&&--o,r>=0&&o<0&&(o=0),r<=1&&o>e&&(o=e),o/e}}};class Qt{done(){return!1}}class Jt extends Qt{constructor(t=dt){super(),this.ease=Ht[t]||t}step(t,n,e){return"number"!=typeof t?e<1?t:n:t+(n-t)*this.ease(e)}}class Kt extends Qt{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,n,e,r){return this.stepper(t,n,e,r)}}function tn(){const t=(this._duration||500)/1e3,n=this._overshoot||0,e=Math.PI,r=Math.log(n/100+1e-10),i=-r/Math.sqrt(e*e+r*r),o=3.9/(i*t);this.d=2*i*o,this.k=o*o}k(class extends Kt{constructor(t=500,n=0){super(),this.duration(t).overshoot(n)}step(t,n,e,r){if("string"==typeof t)return t;if(r.done=e===1/0,e===1/0)return n;if(0===e)return t;e>100&&(e=16),e/=1e3;const i=r.velocity||0,o=-this.d*i-this.k*(t-n),u=t+i*e+o*e*e/2;return r.velocity=i+o*e,r.done=Math.abs(n-u)+Math.abs(i)<.002,r.done?n:u}},{duration:Zt("_duration",tn),overshoot:Zt("_overshoot",tn)});k(class extends Kt{constructor(t=.1,n=.01,e=0,r=1e3){super(),this.p(t).i(n).d(e).windup(r)}step(t,n,e,r){if("string"==typeof t)return t;if(r.done=e===1/0,e===1/0)return n;if(0===e)return t;const i=n-t;let o=(r.integral||0)+i*e;const u=(i-(r.error||0))/e,s=this._windup;return!1!==s&&(o=Math.max(-s,Math.min(o,s))),r.error=i,r.integral=o,r.done=Math.abs(i)<.001,r.done?n:t+(this.P*i+this.I*o+this.D*u)}},{windup:Zt("_windup"),p:Zt("P"),i:Zt("I"),d:Zt("D")});const nn={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},en={M:function(t,n,e){return n.x=e.x=t[0],n.y=e.y=t[1],["M",n.x,n.y]},L:function(t,n){return n.x=t[0],n.y=t[1],["L",t[0],t[1]]},H:function(t,n){return n.x=t[0],["H",t[0]]},V:function(t,n){return n.y=t[0],["V",t[0]]},C:function(t,n){return n.x=t[4],n.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,n){return n.x=t[2],n.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,n){return n.x=t[2],n.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,n){return n.x=t[0],n.y=t[1],["T",t[0],t[1]]},Z:function(t,n,e){return n.x=e.x,n.y=e.y,["Z"]},A:function(t,n){return n.x=t[5],n.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},rn="mlhvqtcsaz".split("");for(let $l=0,Vl=rn.length;$l<Vl;++$l)en[rn[$l]]=function(t){return function(n,e,r){if("H"===t)n[0]=n[0]+e.x;else if("V"===t)n[0]=n[0]+e.y;else if("A"===t)n[5]=n[5]+e.x,n[6]=n[6]+e.y;else for(let t=0,i=n.length;t<i;++t)n[t]=n[t]+(t%2?e.y:e.x);return en[t](n,e,r)}}(rn[$l].toUpperCase());function on(t){return t.segment.length&&t.segment.length-1===nn[t.segment[0].toUpperCase()]}function un(t,n){t.inNumber&&sn(t,!1);const e=X.test(n);if(e)t.segment=[n];else{const n=t.lastCommand,e=n.toLowerCase(),r=n===e;t.segment=["m"===e?r?"l":"L":n]}return t.inSegment=!0,t.lastCommand=t.segment[0],e}function sn(t,n){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=n,t.number="",t.pointSeen=!1,t.hasExponent=!1,on(t)&&an(t)}function an(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){const n=t.segment[0];return en[n](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function cn(t){if(!t.segment.length)return!1;const n="A"===t.segment[0].toUpperCase(),e=t.segment.length;return n&&(4===e||5===e)}function hn(t){return"E"===t.lastToken.toUpperCase()}const fn=new Set([" ",",","\t","\n","\r","\f"]);class ln extends gt{bbox(){return Q().path.setAttribute("d",this.toString()),new K(Q.nodes.path.getBBox())}move(t,n){const e=this.bbox();if(t-=e.x,n-=e.y,!isNaN(t)&&!isNaN(n))for(let r,i=this.length-1;i>=0;i--)r=this[i][0],"M"===r||"L"===r||"T"===r?(this[i][1]+=t,this[i][2]+=n):"H"===r?this[i][1]+=t:"V"===r?this[i][1]+=n:"C"===r||"S"===r||"Q"===r?(this[i][1]+=t,this[i][2]+=n,this[i][3]+=t,this[i][4]+=n,"C"===r&&(this[i][5]+=t,this[i][6]+=n)):"A"===r&&(this[i][6]+=t,this[i][7]+=n);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,n=!0){let e=0,r="";const i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:n,p0:new G,p:new G};for(;i.lastToken=r,r=t.charAt(e++);)if(i.inSegment||!un(i,r))if("."!==r)if(isNaN(parseInt(r)))if(fn.has(r))i.inNumber&&sn(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(X.test(r)){if(i.inNumber)sn(i,!1);else{if(!on(i))throw new Error("parser Error");an(i)}--e}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!hn(i)){sn(i,!1),--e;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||cn(i)){i.inNumber=!0,i.number=r,sn(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){sn(i,!1),--e;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&sn(i,!1),i.inSegment&&on(i)&&an(i),i.segments}(t)}size(t,n){const e=this.bbox();let r,i;for(e.width=0===e.width?1:e.width,e.height=0===e.height?1:e.height,r=this.length-1;r>=0;r--)i=this[r][0],"M"===i||"L"===i||"T"===i?(this[r][1]=(this[r][1]-e.x)*t/e.width+e.x,this[r][2]=(this[r][2]-e.y)*n/e.height+e.y):"H"===i?this[r][1]=(this[r][1]-e.x)*t/e.width+e.x:"V"===i?this[r][1]=(this[r][1]-e.y)*n/e.height+e.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-e.x)*t/e.width+e.x,this[r][2]=(this[r][2]-e.y)*n/e.height+e.y,this[r][3]=(this[r][3]-e.x)*t/e.width+e.x,this[r][4]=(this[r][4]-e.y)*n/e.height+e.y,"C"===i&&(this[r][5]=(this[r][5]-e.x)*t/e.width+e.x,this[r][6]=(this[r][6]-e.y)*n/e.height+e.y)):"A"===i&&(this[r][1]=this[r][1]*t/e.width,this[r][2]=this[r][2]*n/e.height,this[r][6]=(this[r][6]-e.x)*t/e.width+e.x,this[r][7]=(this[r][7]-e.y)*n/e.height+e.y);return this}toString(){return function(t){let n="";for(let e=0,r=t.length;e<r;e++)n+=t[e][0],null!=t[e][1]&&(n+=t[e][1],null!=t[e][2]&&(n+=" ",n+=t[e][2],null!=t[e][3]&&(n+=" ",n+=t[e][3],n+=" ",n+=t[e][4],null!=t[e][5]&&(n+=" ",n+=t[e][5],n+=" ",n+=t[e][6],null!=t[e][7]&&(n+=" ",n+=t[e][7])))));return n+" "}(this)}}const dn=t=>{const n=typeof t;return"number"===n?yt:"string"===n?W.isColor(t)?W:V.test(t)?X.test(t)?ln:gt:T.test(t)?yt:vn:mn.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?gt:"object"===n?_n:vn};class pn{constructor(t){this._stepper=t||new Jt("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,n){return t&&n}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(dn(t));let n=new this._type(t);return this._type===W&&(n=this._to?n[this._to[4]]():this._from?n[this._from[4]]():n),this._type===_n&&(n=this._to?n.align(this._to):this._from?n.align(this._from):n),n=n.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(n.length)).map(Object).map((function(t){return t.done=!0,t})),n}}class vn{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class gn{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,gn.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}gn.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const yn=(t,n)=>t[0]<n[0]?-1:t[0]>n[0]?1:0;class _n{constructor(...t){this.init(...t)}align(t){const n=this.values;for(let e=0,r=n.length;e<r;++e){if(n[e+1]===t[e+1]){if(n[e+1]===W&&t[e+7]!==n[e+7]){const n=t[e+7],r=new W(this.values.splice(e+3,5))[n]().toArray();this.values.splice(e+3,0,...r)}e+=n[e+2]+2;continue}if(!t[e+1])return this;const r=(new t[e+1]).toArray(),i=n[e+2]+3;n.splice(e,i,t[e],t[e+1],t[e+2],...r),e+=n[e+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const n=[];for(const e in t){const r=dn(t[e]),i=new r(t[e]).toArray();n.push([e,r,i.length,...i])}return n.sort(yn),this.values=n.reduce(((t,n)=>t.concat(n)),[]),this}toArray(){return this.values}valueOf(){const t={},n=this.values;for(;n.length;){const e=n.shift(),r=n.shift(),i=n.shift(),o=n.splice(0,i);t[e]=new r(o)}return t}}const mn=[vn,gn,_n];class wn extends At{constructor(t,n=t){super(x("path",t),n)}array(){return this._array||(this._array=new ln(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,n){return this.attr("d",this.array().move(t,n))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new ln(t))}size(t,n){const e=a(this,t,n);return this.attr("d",this.array().size(e.width,e.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}wn.prototype.MorphArray=ln,e({Container:{path:C((function(t){return this.put(new wn).plot(t||new ln)}))}}),A(wn,"Path");const bn=Object.freeze(Object.defineProperty({__proto__:null,array:function(){return this._array||(this._array=new Yt(this.attr("points")))},clear:function(){return delete this._array,this},move:function(t,n){return this.attr("points",this.array().move(t,n))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new Yt(t))},size:function(t,n){const e=a(this,t,n);return this.attr("points",this.array().size(e.width,e.height))}},Symbol.toStringTag,{value:"Module"}));class xn extends At{constructor(t,n=t){super(x("polygon",t),n)}}e({Container:{polygon:C((function(t){return this.put(new xn).plot(t||new Yt)}))}}),k(xn,qt),k(xn,bn),A(xn,"Polygon");class En extends At{constructor(t,n=t){super(x("polyline",t),n)}}e({Container:{polyline:C((function(t){return this.put(new En).plot(t||new Yt)}))}}),k(En,qt),k(En,bn),A(En,"Polyline");class jn extends At{constructor(t,n=t){super(x("rect",t),n)}}k(jn,{rx:Ot,ry:Mt}),e({Container:{rect:C((function(t,n){return this.put(new jn).size(t,n)}))}}),A(jn,"Rect");class An{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const n=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(n.prev=this._last,this._last.next=n,this._last=n):(this._last=n,this._first=n),n}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const On={nextDraw:null,frames:new An,timeouts:new An,immediates:new An,timer:()=>g.window.performance||g.window.Date,transforms:[],frame(t){const n=On.frames.push({run:t});return null===On.nextDraw&&(On.nextDraw=g.window.requestAnimationFrame(On._draw)),n},timeout(t,n){n=n||0;const e=On.timer().now()+n,r=On.timeouts.push({run:t,time:e});return null===On.nextDraw&&(On.nextDraw=g.window.requestAnimationFrame(On._draw)),r},immediate(t){const n=On.immediates.push(t);return null===On.nextDraw&&(On.nextDraw=g.window.requestAnimationFrame(On._draw)),n},cancelFrame(t){null!=t&&On.frames.remove(t)},clearTimeout(t){null!=t&&On.timeouts.remove(t)},cancelImmediate(t){null!=t&&On.immediates.remove(t)},_draw(t){let n=null;const e=On.timeouts.last();for(;(n=On.timeouts.shift())&&(t>=n.time?n.run():On.timeouts.push(n),n!==e););let r=null;const i=On.frames.last();for(;r!==i&&(r=On.frames.shift());)r.run(t);let o=null;for(;o=On.immediates.shift();)o();On.nextDraw=On.timeouts.first()||On.frames.first()?g.window.requestAnimationFrame(On._draw):null}},Mn=function(t){const n=t.start,e=t.runner.duration();return{start:n,duration:e,end:n+e,runner:t.runner}},Sn=function(){const t=g.window;return(t.performance||t.Date).now()};class kn extends ht{constructor(t=Sn){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),n=t?t.runner.duration():0;return(t?t.start:this._time)+n}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const n=this.speed();if(null==t)return this.speed(-n);const e=Math.abs(n);return this.speed(t?-e:e)}schedule(t,n,e){if(null==t)return this._runners.map(Mn);let r=0;const i=this.getEndTime();if(n=n||0,null==e||"last"===e||"after"===e)r=i;else if("absolute"===e||"start"===e)r=n,n=0;else if("now"===e)r=this._time;else if("relative"===e){const e=this.getRunnerInfoById(t.id);e&&(r=e.start+n,n=0)}else{if("with-last"!==e)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();r=t?t.start:this._time}}t.unschedule(),t.timeline(this);const o=t.persist(),u={persist:null===o?this._persist:o,start:r+n,runner:t};return this._lastRunnerId=t.id,this._runners.push(u),this._runners.sort(((t,n)=>t.start-n.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const n=this._runnerIds.indexOf(t.id);return n<0||(this._runners.splice(n,1),this._runnerIds.splice(n,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return On.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=On.frame(this._step)),this)}_stepFn(t=!1){const n=this._timeSource();let e=n-this._lastSourceTime;t&&(e=0);const r=this._speed*e+(this._time-this._lastStepTime);this._lastSourceTime=n,t||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let o=this._runners.length;o--;){const t=this._runners[o],n=t.runner;this._time-t.start<=0&&n.reset()}let i=!1;for(let o=0,u=this._runners.length;o<u;o++){const t=this._runners[o],n=t.runner;let e=r;const s=this._time-t.start;if(s<=0){i=!0;continue}if(s<e&&(e=s),!n.active())continue;if(n.step(e).done){if(!0!==t.persist){n.duration()-n.time()+this._time+t.persist<this._time&&(n.unschedule(),--o,--u)}}else i=!0}return i&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}e({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new kn,this._timeline):(this._timeline=t,this)}}});class Cn extends ht{constructor(t){super(),this.id=Cn.id++,t="function"==typeof(t=null==t?lt:t)?new Kt(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof Kt,this._stepper=this._isDeclarative?t:new Jt,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new H,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,n,e){let r=1,i=!1,o=0;return n=n??pt,e=e||"last","object"!=typeof(t=t??lt)||t instanceof Qt||(n=t.delay??n,e=t.when??e,i=t.swing||i,r=t.times??r,o=t.wait??o,t=t.duration??lt),{duration:t,delay:n,swing:i,times:r,wait:o,when:e}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,n,e){const r=Cn.sanitise(t,n,e),i=new Cn(r.duration);return this._timeline&&i.timeline(this._timeline),this._element&&i.element(this._element),i.loop(r).schedule(r.delay,r.when)}clearTransform(){return this.transforms=new H,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new Jt(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,n,e){return"object"==typeof t&&(n=t.swing,e=t.wait,t=t.times),this._times=t||1/0,this._swing=n||!1,this._wait=e||0,!0===this._times&&(this._times=1/0),this}loops(t){const n=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/n),e=(this._time-t*n)/this._duration;return Math.min(t+e,this._times)}const e=t%1,r=n*Math.floor(t)+this._duration*e;return this.time(r)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const n=this._time,e=this._duration,r=this._wait,i=this._times,o=this._swing,u=this._reverse;let s;if(null==t){const t=function(t){const n=o*Math.floor(t%(2*(r+e))/(r+e)),i=n&&!u||!n&&u,s=Math.pow(-1,i)*(t%(r+e))/e+i;return Math.max(Math.min(s,1),0)},a=i*(r+e)-r;return s=n<=0?Math.round(t(1e-5)):n<a?t(n):Math.round(t(a-1e-5)),s}const a=Math.floor(this.loops()),c=o&&a%2==0;return s=a+(c&&!u||u&&c?t:1-t),this.loops(s)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,n,e,r){this._queue.push({initialiser:t||ft,runner:n||ft,retarget:e,isTransform:r,initialised:!1,finished:!1});return this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(t){return this._reverse=null==t?!this._reverse:t,this}schedule(t,n,e){if(t instanceof kn||(e=n,n=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,n,e),this}step(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;const n=this.position(),e=this._lastPosition!==n&&this._time>=0;this._lastPosition=n;const r=this.duration(),i=this._lastTime<=0&&this._time>0,o=this._lastTime<r&&this._time>=r;this._lastTime=this._time,i&&this.fire("start",this);const u=this._isDeclarative;this.done=!u&&!o&&this._time>=r,this._reseted=!1;let s=!1;return(e||u)&&(this._initialise(e),this.transforms=new H,s=this._run(u?t:n),this.fire("step",this)),this.done=this.done||s&&u,o&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const n=t-this._time;return this.step(n),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let n=0,e=this._queue.length;n<e;++n){const e=this._queue[n],r=this._isDeclarative||!e.initialised&&t;t=!e.finished,r&&t&&(e.initialiser.call(this),e.initialised=!0)}}_rememberMorpher(t,n){if(this._history[t]={morpher:n,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let n=!0;for(let e=0,r=this._queue.length;e<r;++e){const r=this._queue[e],i=r.runner.call(this,t);r.finished=r.finished||!0===i,n=n&&r.finished}return n}_tryRetarget(t,n,e){if(this._history[t]){if(!this._history[t].caller.initialised){const n=this._queue.indexOf(this._history[t].caller);return this._queue.splice(n,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,n,e):this._history[t].morpher.to(n),this._history[t].caller.finished=!1;const r=this.timeline();return r&&r.play(),!0}return!1}}Cn.id=0;class Tn{constructor(t=new H,n=-1,e=!0){this.transforms=t,this.id=n,this.done=e}clearTransformsFromQueue(){}}k([Cn,Tn],{mergeWith(t){return new Tn(t.transforms.lmultiply(this.transforms),t.id)}});const In=(t,n)=>t.lmultiplyO(n),Nn=t=>t.transforms;function Rn(){const t=this._transformationRunners.runners.map(Nn).reduce(In,new H);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class zn{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const n=t.id+1;return this.runners.push(t),this.ids.push(n),this}clearBefore(t){const n=this.ids.indexOf(t+1)||1;return this.ids.splice(0,n,0),this.runners.splice(0,n,new Tn).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,n){const e=this.ids.indexOf(t+1);return this.ids.splice(e,1,t+1),this.runners.splice(e,1,n),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let n=0;n<this.runners.length;++n){const e=this.runners[n];if(t&&e.done&&t.done&&(!e._timeline||!e._timeline._runnerIds.includes(e.id))&&(!t._timeline||!t._timeline._runnerIds.includes(t.id))){this.remove(e.id);const r=e.mergeWith(t);this.edit(t.id,r),t=r,--n}else t=e}return this}remove(t){const n=this.ids.indexOf(t+1);return this.ids.splice(n,1),this.runners.splice(n,1),this}}e({Element:{animate(t,n,e){const r=Cn.sanitise(t,n,e),i=this.timeline();return new Cn(r.duration).loop(r).element(this).timeline(i.play()).schedule(r.delay,r.when)},delay(t,n){return this.animate(0,t,n)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter((n=>n.id<=t.id)).map(Nn).reduce(In,new H)},_addRunner(t){this._transformationRunners.add(t),On.cancelImmediate(this._frameId),this._frameId=On.immediate(Rn.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new zn).add(new Tn(new H(this))))}}});k(Cn,{attr(t,n){return this.styleAttr("attr",t,n)},css(t,n){return this.styleAttr("css",t,n)},styleAttr(t,n,e){if("string"==typeof n)return this.styleAttr(t,{[n]:e});let r=n;if(this._tryRetarget(t,r))return this;let i=new pn(this._stepper).to(r),o=Object.keys(r);return this.queue((function(){i=i.from(this.element()[t](o))}),(function(n){return this.element()[t](i.at(n).valueOf()),i.done()}),(function(n){const e=Object.keys(n),u=(s=o,e.filter((t=>!s.includes(t))));var s;if(u.length){const n=this.element()[t](u),e=new _n(i.from()).valueOf();Object.assign(e,n),i.from(e)}const a=new _n(i.to()).valueOf();Object.assign(a,n),i.to(a),o=e,r=n})),this._rememberMorpher(t,i),this},zoom(t,n){if(this._tryRetarget("zoom",t,n))return this;let e=new pn(this._stepper).to(new yt(t));return this.queue((function(){e=e.from(this.element().zoom())}),(function(t){return this.element().zoom(e.at(t),n),e.done()}),(function(t,r){n=r,e.to(t)})),this._rememberMorpher("zoom",e),this},transform(t,n,e){if(n=t.relative||n,this._isDeclarative&&!n&&this._tryRetarget("transform",t))return this;const r=H.isMatrixLike(t);e=null!=t.affine?t.affine:null!=e?e:!r;const i=new pn(this._stepper).type(e?gn:H);let o,u,s,a,h;return this.queue((function(){u=u||this.element(),o=o||c(t,u),h=new H(n?void 0:u),u._addRunner(this),n||u._clearTransformRunnersBefore(this)}),(function(c){n||this.clearTransform();const{x:f,y:l}=new G(o).transform(u._currentTransform(this));let d=new H({...t,origin:[f,l]}),p=this._isDeclarative&&s?s:h;if(e){d=d.decompose(f,l),p=p.decompose(f,l);const t=d.rotate,n=p.rotate,e=[t-360,t,t+360],r=e.map((t=>Math.abs(t-n))),i=Math.min(...r),o=r.indexOf(i);d.rotate=e[o]}n&&(r||(d.rotate=t.rotate||0),this._isDeclarative&&a&&(p.rotate=a)),i.from(p),i.to(d);const v=i.at(c);return a=v.rotate,s=new H(v),this.addTransform(s),u._addRunner(this),i.done()}),(function(n){(n.origin||"center").toString()!==(t.origin||"center").toString()&&(o=c(n,u)),t={...n,origin:o}}),!0),this._isDeclarative&&this._rememberMorpher("transform",i),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,n){return this.dx(t).dy(n)},_queueNumberDelta(t,n){if(n=new yt(n),this._tryRetarget(t,n))return this;const e=new pn(this._stepper).to(n);let r=null;return this.queue((function(){r=this.element()[t](),e.from(r),e.to(r+n)}),(function(n){return this.element()[t](e.at(n)),e.done()}),(function(t){e.to(r+new yt(t))})),this._rememberMorpher(t,e),this},_queueObject(t,n){if(this._tryRetarget(t,n))return this;const e=new pn(this._stepper).to(n);return this.queue((function(){e.from(this.element()[t]())}),(function(n){return this.element()[t](e.at(n)),e.done()})),this._rememberMorpher(t,e),this},_queueNumber(t,n){return this._queueObject(t,new yt(n))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,n){return this.x(t).y(n)},amove(t,n){return this.ax(t).ay(n)},center(t,n){return this.cx(t).cy(n)},size(t,n){let e;return t&&n||(e=this._element.bbox()),t||(t=e.width/e.height*n),n||(n=e.height/e.width*t),this.width(t).height(n)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,n,e,r){if(4===arguments.length)return this.plot([t,n,e,r]);if(this._tryRetarget("plot",t))return this;const i=new pn(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){i.from(this._element.array())}),(function(t){return this._element.plot(i.at(t)),i.done()})),this._rememberMorpher("plot",i),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,n,e,r){return this._queueObject("viewbox",new K(t,n,e,r))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),k(Cn,{rx:Ot,ry:Mt,from:Dt,to:Lt}),A(Cn,"Runner");class Pn extends Et{constructor(t,n=t){super(x("svg",t),n),this.namespace()}defs(){return this.isRoot()?E(this.node.querySelector("defs"))||this.put(new jt):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof g.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:d,version:"1.1"}).attr("xmlns:xlink",v,p):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,p).attr("xmlns:svgjs",null,p)}root(){return this.isRoot()?this:super.root()}}e({Container:{nested:C((function(){return this.put(new Pn)}))}}),A(Pn,"Svg",!0);let Dn=class extends Et{constructor(t,n=t){super(x("symbol",t),n)}};e({Container:{symbol:C((function(){return this.put(new Dn)}))}}),A(Dn,"Symbol");const Ln=Object.freeze(Object.defineProperty({__proto__:null,amove:function(t,n){return this.ax(t).ay(n)},ax:function(t){return this.attr("x",t)},ay:function(t){return this.attr("y",t)},build:function(t){return this._build=!!t,this},center:function(t,n,e=this.bbox()){return this.cx(t,e).cy(n,e)},cx:function(t,n=this.bbox()){return null==t?n.cx:this.attr("x",this.attr("x")+t-n.cx)},cy:function(t,n=this.bbox()){return null==t?n.cy:this.attr("y",this.attr("y")+t-n.cy)},length:function(){return this.node.getComputedTextLength()},move:function(t,n,e=this.bbox()){return this.x(t,e).y(n,e)},plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(g.document.createTextNode(t)),this},x:function(t,n=this.bbox()){return null==t?n.x:this.attr("x",this.attr("x")+t-n.x)},y:function(t,n=this.bbox()){return null==t?n.y:this.attr("y",this.attr("y")+t-n.y)}},Symbol.toStringTag,{value:"Module"}));class Fn extends At{constructor(t,n=t){super(x("text",t),n),this.dom.leading=this.dom.leading??new yt(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new yt(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let n=0;const e=this.dom.leading;this.each((function(r){if(f(this.node))return;const i=g.window.getComputedStyle(this.node).getPropertyValue("font-size"),o=e*new yt(i);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?n+=o:(this.attr("dy",r?o+n:0),n=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new yt(t.leading||1.3),this}writeDataToDom(){return l(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const n=this.node.childNodes;let e=0;t="";for(let r=0,i=n.length;r<i;++r)"textPath"===n[r].nodeName||f(n[r])?0===r&&(e=r+1):(r!==e&&3!==n[r].nodeType&&!0===E(n[r]).dom.newLined&&(t+="\n"),t+=n[r].textContent);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(let n=0,e=(t=(t+"").split("\n")).length;n<e;n++)this.newLine(t[n]);return this.build(!1).rebuild()}}k(Fn,Ln),e({Container:{text:C((function(t=""){return this.put(new Fn).text(t)})),plain:C((function(t=""){return this.put(new Fn).plain(t)}))}}),A(Fn,"Text");class Bn extends At{constructor(t,n=t){super(x("tspan",t),n),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;const t=this.parent();if(!(t instanceof Fn))return this;const n=t.index(this),e=g.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=t.dom.leading*new yt(e);return this.dy(n?r:0).attr("x",t.x())}text(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}k(Bn,Ln),e({Tspan:{tspan:C((function(t=""){const n=new Bn;return this._build||this.clear(),this.put(n).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),A(Bn,"Tspan");class $n extends At{constructor(t,n=t){super(x("circle",t),n)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new yt(t).divide(2))}}k($n,{x:St,y:kt,cx:Ct,cy:Tt,width:It,height:Nt}),e({Container:{circle:C((function(t=0){return this.put(new $n).size(t).move(0,0)}))}}),A($n,"Circle");class Vn extends Et{constructor(t,n=t){super(x("clipPath",t),n)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return rt("svg [clip-path*="+this.id()+"]")}}e({Container:{clip:C((function(){return this.defs().put(new Vn)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const n=t instanceof Vn?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+n.id()+")")},unclip(){return this.attr("clip-path",null)}}}),A(Vn,"ClipPath");class Xn extends bt{constructor(t,n=t){super(x("foreignObject",t),n)}}e({Container:{foreignObject:C((function(t,n){return this.put(new Xn).size(t,n)}))}}),A(Xn,"ForeignObject");const Yn=Object.freeze(Object.defineProperty({__proto__:null,dmove:function(t,n){return this.children().forEach((e=>{let r;try{r=e.node instanceof g.window.SVGSVGElement?new K(e.attr(["x","y","width","height"])):e.bbox()}catch(s){return}const i=new H(e),o=i.translate(t,n).transform(i.inverse()),u=new G(r.x,r.y).transform(o);e.move(u.x,u.y)})),this},dx:function(t){return this.dmove(t,0)},dy:function(t){return this.dmove(0,t)},height:function(t,n=this.bbox()){return null==t?n.height:this.size(n.width,t,n)},move:function(t=0,n=0,e=this.bbox()){const r=t-e.x,i=n-e.y;return this.dmove(r,i)},size:function(t,n,e=this.bbox()){const r=a(this,t,n,e),i=r.width/e.width,o=r.height/e.height;return this.children().forEach((t=>{const n=new G(e).transform(new H(t).inverse());t.scale(i,o,n.x,n.y)})),this},width:function(t,n=this.bbox()){return null==t?n.width:this.size(t,n.height,n)},x:function(t,n=this.bbox()){return null==t?n.x:this.move(t,n.y,n)},y:function(t,n=this.bbox()){return null==t?n.y:this.move(n.x,t,n)}},Symbol.toStringTag,{value:"Module"}));class Un extends Et{constructor(t,n=t){super(x("g",t),n)}}k(Un,Yn),e({Container:{group:C((function(){return this.put(new Un)}))}}),A(Un,"G");class qn extends Et{constructor(t,n=t){super(x("a",t),n)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,v)}}k(qn,Yn),e({Container:{link:C((function(t){return this.put(new qn).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const n=t.parent();if(!n)return this.remove();const e=n.index(t);return n.add(this,e),t.remove(),this},linkTo(t){let n=this.linker();return n||(n=new qn,this.wrap(n)),"function"==typeof t?t.call(n,n):n.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),A(qn,"A");class Wn extends Et{constructor(t,n=t){super(x("mask",t),n)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return rt("svg [mask*="+this.id()+"]")}}e({Container:{mask:C((function(){return this.defs().put(new Wn)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const n=t instanceof Wn?t:this.parent().mask().add(t);return this.attr("mask","url(#"+n.id()+")")},unmask(){return this.attr("mask",null)}}}),A(Wn,"Mask");class Gn extends bt{constructor(t,n=t){super(x("stop",t),n)}update(t){return("number"==typeof t||t instanceof yt)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new yt(t.offset)),this}}e({Gradient:{stop:function(t,n,e){return this.put(new Gn).update(t,n,e)}}}),A(Gn,"Stop");class Zn extends bt{constructor(t,n=t){super(x("style",t),n)}addText(t=""){return this.node.textContent+=t,this}font(t,n,e={}){return this.rule("@font-face",{fontFamily:t,src:n,...e})}rule(t,n){return this.addText(function(t,n){if(!t)return"";if(!n)return t;let e=t+"{";for(const r in n)e+=r.replace(/([A-Z])/g,(function(t,n){return"-"+n.toLowerCase()}))+":"+n[r]+";";return e+="}",e}(t,n))}}e("Dom",{style(t,n){return this.put(new Zn).rule(t,n)},fontface(t,n,e){return this.put(new Zn).font(t,n,e)}}),A(Zn,"Style");class Hn extends Fn{constructor(t,n=t){super(x("textPath",t),n)}array(){const t=this.track();return t?t.array():null}plot(t){const n=this.track();let e=null;return n&&(e=n.plot(t)),null==t?e:this}track(){return this.reference("href")}}e({Container:{textPath:C((function(t,n){return t instanceof Fn||(t=this.text(t)),t.path(n)}))},Text:{path:C((function(t,n=!0){const e=new Hn;let r;if(t instanceof wn||(t=this.defs().path(t)),e.attr("href","#"+t,v),n)for(;r=this.node.firstChild;)e.node.appendChild(r);return this.put(e)})),textPath(){return this.findOne("textPath")}},Path:{text:C((function(t){return t instanceof Fn||(t=(new Fn).addTo(this.parent()).text(t)),t.path(this)})),targets(){return rt("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),Hn.prototype.MorphArray=ln,A(Hn,"TextPath");class Qn extends At{constructor(t,n=t){super(x("use",t),n)}use(t,n){return this.attr("href",(n||"")+"#"+t,v)}}e({Container:{use:C((function(t,n){return this.put(new Qn).use(t,n)}))}}),A(Qn,"Use");const Jn=b;k([Pn,Dn,Vt,$t,Gt],r("viewbox")),k([Wt,En,xn,wn],r("marker")),k(Fn,r("Text")),k(wn,r("Path")),k(jt,r("Defs")),k([Fn,Bn],r("Tspan")),k([jn,zt,Bt,Cn],r("radius")),k(ht,r("EventTarget")),k(wt,r("Dom")),k(bt,r("Element")),k(At,r("Shape")),k([Et,Pt],r("Container")),k(Bt,r("Gradient")),k(Cn,r("Runner")),nt.extend([...new Set(n)]),function(t=[]){mn.push(...[].concat(t))}([yt,W,K,H,gt,Yt,ln,G]),k(mn,{to(t){return(new pn).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,n,e,r,i){return this.fromArray(t.map((function(t,o){return r.step(t,n[o],e,i[o],i)})))}});var Kn=function(t){return t.touches||[{clientX:t.clientX,clientY:t.clientY}]};k(Pn,{panZoom:function(t){var n,e,r,i,o,u,s,a,c,h,f,l,d=this;if(this.off(".panZoom"),!1===t)return this;var p,v,g=null!=(e=(t=null!=(n=t)?n:{}).zoomFactor)?e:2,y=null!=(r=t.zoomMin)?r:Number.MIN_VALUE,_=null!=(i=t.zoomMax)?i:Number.MAX_VALUE,m=null==(o=t.wheelZoom)||o,w=null==(u=t.pinchZoom)||u,b=null==(s=t.panning)||s,x=null!=(a=t.panButton)?a:0,E=null!=(c=t.oneFingerPan)&&c,j=null!=(h=t.margins)&&h,A=null!=(f=t.wheelZoomDeltaModeLinePixels)?f:17,O=null!=(l=t.wheelZoomDeltaModeScreenPixels)?l:53,M=!1,S=this.viewbox(),k=function(t){if(!j)return t;var n=j.top,e=j.left,r=j.bottom,i=j.right,o=d.attr(["width","height"]),u=o.width,s=o.height,a=d.node.preserveAspectRatio.baseVal,c=0,h=0,f=0,l=0;if(a.align!==a.SVG_PRESERVEASPECTRATIO_NONE){var p=u/s,v=S.width/S.height;if(v!==p){var g=a.meetOrSlice!==a.SVG_MEETORSLICE_SLICE,y=p>v?"width":"height",_="width"===y,m=g&&_||!g&&!_,w=m?p/v:v/p,b=t[y]-t[y]*w;m?a.align===a.SVG_PRESERVEASPECTRATIO_XMIDYMIN||a.align===a.SVG_PRESERVEASPECTRATIO_XMIDYMID||a.align===a.SVG_PRESERVEASPECTRATIO_XMIDYMAX?(c=b/2,h=-b/2):a.align===a.SVG_PRESERVEASPECTRATIO_XMINYMIN||a.align===a.SVG_PRESERVEASPECTRATIO_XMINYMID||a.align===a.SVG_PRESERVEASPECTRATIO_XMINYMAX?h=-b:a.align!==a.SVG_PRESERVEASPECTRATIO_XMAXYMIN&&a.align!==a.SVG_PRESERVEASPECTRATIO_XMAXYMID&&a.align!==a.SVG_PRESERVEASPECTRATIO_XMAXYMAX||(c=b):a.align===a.SVG_PRESERVEASPECTRATIO_XMINYMID||a.align===a.SVG_PRESERVEASPECTRATIO_XMIDYMID||a.align===a.SVG_PRESERVEASPECTRATIO_XMAXYMID?(f=b/2,l=-b/2):a.align===a.SVG_PRESERVEASPECTRATIO_XMINYMIN||a.align===a.SVG_PRESERVEASPECTRATIO_XMIDYMIN||a.align===a.SVG_PRESERVEASPECTRATIO_XMAXYMIN?l=-b:a.align!==a.SVG_PRESERVEASPECTRATIO_XMINYMAX&&a.align!==a.SVG_PRESERVEASPECTRATIO_XMIDYMAX&&a.align!==a.SVG_PRESERVEASPECTRATIO_XMAXYMAX||(f=b)}}var x=S.width+S.x-e-c,E=S.x+i-t.width-h,A=S.height+S.y-n-f,O=S.y+r-t.height-l;return t.x=Math.min(x,Math.max(E,t.x)),t.y=Math.min(A,Math.max(O,t.y)),t},C=function t(n){(v=Kn(n)).length<2?b&&E&&N.call(this,n):(b&&E&&R.call(this,n),n.preventDefault(),this.dispatch("pinchZoomStart",{event:n}).defaultPrevented||(this.off("touchstart.panZoom",t),M=!0,at(document,"touchmove.panZoom",I,this,{passive:!1}),at(document,"touchend.panZoom",T,this,{passive:!1})))},T=function t(n){n.preventDefault();var e=Kn(n);e.length>1||(M=!1,this.dispatch("pinchZoomEnd",{event:n}),ct(document,"touchmove.panZoom",I),ct(document,"touchend.panZoom",t),this.on("touchstart.panZoom",C),e.length&&b&&E&&N.call(this,n))},I=function(t){t.preventDefault();var n=Kn(t),e=this.zoom(),r=Math.sqrt(Math.pow(v[0].clientX-v[1].clientX,2)+Math.pow(v[0].clientY-v[1].clientY,2))/Math.sqrt(Math.pow(n[0].clientX-n[1].clientX,2)+Math.pow(n[0].clientY-n[1].clientY,2));(e<y&&r>1||e>_&&r<1)&&(r=1);var i={x:n[0].clientX+.5*(n[1].clientX-n[0].clientX),y:n[0].clientY+.5*(n[1].clientY-n[0].clientY)},o=v[0].clientX+.5*(v[1].clientX-v[0].clientX),u=v[0].clientY+.5*(v[1].clientY-v[0].clientY),s=this.point(i.x,i.y),a=this.point(2*i.x-o,2*i.y-u),c=new K(this.viewbox()).transform((new H).translate(-a.x,-a.y).scale(r,0,0).translate(s.x,s.y));k(c),this.viewbox(c),v=n,this.dispatch("zoom",{box:c,focus:a})},N=function t(n){n.type.indexOf("mouse")>-1&&n.button!==x&&n.which!==x+1||(n.preventDefault(),this.off("mousedown.panZoom",t),v=Kn(n),M||(this.dispatch("panStart",{event:n}),p={x:v[0].clientX,y:v[0].clientY},at(document,"touchmove.panZoom mousemove.panZoom",z,this,{passive:!1}),at(document,"touchend.panZoom mouseup.panZoom",R,this,{passive:!1})))},R=function t(n){n.preventDefault(),ct(document,"touchmove.panZoom mousemove.panZoom",z),ct(document,"touchend.panZoom mouseup.panZoom",t),this.on("mousedown.panZoom",N),this.dispatch("panEnd",{event:n})},z=function(t){t.preventDefault();var n=Kn(t),e={x:n[0].clientX,y:n[0].clientY},r=this.point(e.x,e.y),i=this.point(p.x,p.y),o=[i.x-r.x,i.y-r.y];if(o[0]||o[1]){var u=new K(this.viewbox()).transform((new H).translate(o[0],o[1]));p=e,k(u),this.dispatch("panning",{box:u,event:t}).defaultPrevented||this.viewbox(u)}};return m&&this.on("wheel.panZoom",(function(t){var n;switch(t.preventDefault(),t.deltaMode){case 1:n=t.deltaY*A;break;case 2:n=t.deltaY*O;break;default:n=t.deltaY}var e=Math.pow(1+g,-1*n/100)*this.zoom(),r=this.point(t.clientX,t.clientY);if(e>_&&(e=_),e<y&&(e=y),this.dispatch("zoom",{level:e,focus:r}).defaultPrevented)return this;if(this.zoom(e,r),j){var i=k(this.viewbox());this.viewbox(i)}}),this,{passive:!1}),w&&this.on("touchstart.panZoom",C,this,{passive:!1}),b&&this.on("mousedown.panZoom",N,this,{passive:!1}),this}});class te{constructor(t,n,e,r,i){this.width=n,this.height=e,this.spacing=i,this.canvas=Jn().addTo(t).size("100%","100%").viewbox(`-${i} -${i} ${n+2*i} ${e+i}`).attr({style:r,preserveAspectRatio:"xMinYMin meet"})}add(t){this.canvas.add(t)}resetViewBox(){this.canvas.viewbox(`-${this.spacing} -${this.spacing} ${this.width+2*this.spacing} ${this.height+this.spacing}`)}updateViewBox(t,n,e,r){this.canvas.viewbox(`${t} ${n} ${e} ${r}`)}zoom(t){const n=this.canvas.zoom()+t;n>=.1&&this.canvas.zoom(n)}clear(){this.canvas.clear().viewbox(`-${this.spacing} -${this.spacing} ${this.width+2*this.spacing} ${this.height+this.spacing}`)}}var ne,ee,re,ie,oe,ue,se,ae,ce,he,fe,le,de,pe,ve,ge,ye,_e,me,we,be,xe,Ee,je,Ae,Oe,Me,Se,ke,Ce,Te,Ie,Ne,Re,ze,Pe,De,Le,Fe,Be,$e,Ve,Xe,Ye,Ue,qe,We,Ge,Ze,He,Qe,Je,Ke,tr,nr,er,rr,ir,or,ur,sr,ar,cr,hr,fr,lr,dr,pr,vr,gr,yr,_r,mr,wr,br,xr,Er,jr,Ar,Or,Mr,Sr,kr,Cr,Tr,Ir,Nr,Rr,zr,Pr,Dr,Lr,Fr,Br,$r,Vr,Xr,Yr,Ur,qr,Wr,Gr,Zr,Hr,Qr,Jr,Kr,ti,ni="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function ei(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}function ri(){if(ie)return re;return ie=1,re=function(t,n){return t===n||t!=t&&n!=n}}function ii(){if(ue)return oe;ue=1;var t=ri();return oe=function(n,e){for(var r=n.length;r--;)if(t(n[r][0],e))return r;return-1}}function oi(){if(ge)return ve;ge=1;var t=ee?ne:(ee=1,ne=function(){this.__data__=[],this.size=0}),n=function(){if(ae)return se;ae=1;var t=ii(),n=Array.prototype.splice;return se=function(e){var r=this.__data__,i=t(r,e);return!(i<0||(i==r.length-1?r.pop():n.call(r,i,1),--this.size,0))}}(),e=function(){if(he)return ce;he=1;var t=ii();return ce=function(n){var e=this.__data__,r=t(e,n);return r<0?void 0:e[r][1]}}(),r=function(){if(le)return fe;le=1;var t=ii();return fe=function(n){return t(this.__data__,n)>-1}}(),i=function(){if(pe)return de;pe=1;var t=ii();return de=function(n,e){var r=this.__data__,i=t(r,n);return i<0?(++this.size,r.push([n,e])):r[i][1]=e,this}}();function o(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}return o.prototype.clear=t,o.prototype.delete=n,o.prototype.get=e,o.prototype.has=r,o.prototype.set=i,ve=o}function ui(){if(Oe)return Ae;Oe=1;var t="object"==typeof ni&&ni&&ni.Object===Object&&ni;return Ae=t}function si(){if(Se)return Me;Se=1;var t=ui(),n="object"==typeof self&&self&&self.Object===Object&&self,e=t||n||Function("return this")();return Me=e}function ai(){if(Ce)return ke;Ce=1;var t=si().Symbol;return ke=t}function ci(){if(Pe)return ze;Pe=1;var t=ai(),n=function(){if(Ie)return Te;Ie=1;var t=ai(),n=Object.prototype,e=n.hasOwnProperty,r=n.toString,i=t?t.toStringTag:void 0;return Te=function(t){var n=e.call(t,i),o=t[i];try{t[i]=void 0;var u=!0}catch(a){}var s=r.call(t);return u&&(n?t[i]=o:delete t[i]),s}}(),e=function(){if(Re)return Ne;Re=1;var t=Object.prototype.toString;return Ne=function(n){return t.call(n)}}(),r=t?t.toStringTag:void 0;return ze=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":r&&r in Object(t)?n(t):e(t)}}function hi(){if(Le)return De;return Le=1,De=function(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}}function fi(){if(Be)return Fe;Be=1;var t=ci(),n=hi();return Fe=function(e){if(!n(e))return!1;var r=t(e);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}}function li(){if(Ye)return Xe;Ye=1;var t,n=function(){if(Ve)return $e;Ve=1;var t=si()["__core-js_shared__"];return $e=t}(),e=(t=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"";return Xe=function(t){return!!e&&e in t}}function di(){if(qe)return Ue;qe=1;var t=Function.prototype.toString;return Ue=function(n){if(null!=n){try{return t.call(n)}catch(e){}try{return n+""}catch(e){}}return""}}function pi(){if(Je)return Qe;Je=1;var t=function(){if(Ge)return We;Ge=1;var t=fi(),n=li(),e=hi(),r=di(),i=/^\[object .+?Constructor\]$/,o=Function.prototype,u=Object.prototype,s=o.toString,a=u.hasOwnProperty,c=RegExp("^"+s.call(a).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return We=function(o){return!(!e(o)||n(o))&&(t(o)?c:i).test(r(o))}}(),n=He?Ze:(He=1,Ze=function(t,n){return null==t?void 0:t[n]});return Qe=function(e,r){var i=n(e,r);return t(i)?i:void 0}}function vi(){if(tr)return Ke;tr=1;var t=pi()(si(),"Map");return Ke=t}function gi(){if(er)return nr;er=1;var t=pi()(Object,"create");return nr=t}function yi(){if(pr)return dr;pr=1;var t=function(){if(ir)return rr;ir=1;var t=gi();return rr=function(){this.__data__=t?t(null):{},this.size=0}}(),n=ur?or:(ur=1,or=function(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}),e=function(){if(ar)return sr;ar=1;var t=gi(),n=Object.prototype.hasOwnProperty;return sr=function(e){var r=this.__data__;if(t){var i=r[e];return"__lodash_hash_undefined__"===i?void 0:i}return n.call(r,e)?r[e]:void 0}}(),r=function(){if(hr)return cr;hr=1;var t=gi(),n=Object.prototype.hasOwnProperty;return cr=function(e){var r=this.__data__;return t?void 0!==r[e]:n.call(r,e)}}(),i=function(){if(lr)return fr;lr=1;var t=gi();return fr=function(n,e){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=t&&void 0===e?"__lodash_hash_undefined__":e,this}}();function o(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}return o.prototype.clear=t,o.prototype.delete=n,o.prototype.get=e,o.prototype.has=r,o.prototype.set=i,dr=o}function _i(){if(wr)return mr;wr=1;var t=_r?yr:(_r=1,yr=function(t){var n=typeof t;return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t});return mr=function(n,e){var r=n.__data__;return t(e)?r["string"==typeof e?"string":"hash"]:r.map}}function mi(){if(Cr)return kr;Cr=1;var t=function(){if(gr)return vr;gr=1;var t=yi(),n=oi(),e=vi();return vr=function(){this.size=0,this.__data__={hash:new t,map:new(e||n),string:new t}}}(),n=function(){if(xr)return br;xr=1;var t=_i();return br=function(n){var e=t(this,n).delete(n);return this.size-=e?1:0,e}}(),e=function(){if(jr)return Er;jr=1;var t=_i();return Er=function(n){return t(this,n).get(n)}}(),r=function(){if(Or)return Ar;Or=1;var t=_i();return Ar=function(n){return t(this,n).has(n)}}(),i=function(){if(Sr)return Mr;Sr=1;var t=_i();return Mr=function(n,e){var r=t(this,n),i=r.size;return r.set(n,e),this.size+=r.size==i?0:1,this}}();function o(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}return o.prototype.clear=t,o.prototype.delete=n,o.prototype.get=e,o.prototype.has=r,o.prototype.set=i,kr=o}function wi(){if(Rr)return Nr;Rr=1;var t=oi(),n=function(){if(_e)return ye;_e=1;var t=oi();return ye=function(){this.__data__=new t,this.size=0}}(),e=we?me:(we=1,me=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e}),r=xe?be:(xe=1,be=function(t){return this.__data__.get(t)}),i=je?Ee:(je=1,Ee=function(t){return this.__data__.has(t)}),o=function(){if(Ir)return Tr;Ir=1;var t=oi(),n=vi(),e=mi();return Tr=function(r,i){var o=this.__data__;if(o instanceof t){var u=o.__data__;if(!n||u.length<199)return u.push([r,i]),this.size=++o.size,this;o=this.__data__=new e(u)}return o.set(r,i),this.size=o.size,this}}();function u(n){var e=this.__data__=new t(n);this.size=e.size}return u.prototype.clear=n,u.prototype.delete=e,u.prototype.get=r,u.prototype.has=i,u.prototype.set=o,Nr=u}function bi(){if(Pr)return zr;return Pr=1,zr=function(t,n){for(var e=-1,r=null==t?0:t.length;++e<r&&!1!==n(t[e],e,t););return t}}function xi(){if(Lr)return Dr;Lr=1;var t=pi(),n=function(){try{var n=t(Object,"defineProperty");return n({},"",{}),n}catch(e){}}();return Dr=n}function Ei(){if(Br)return Fr;Br=1;var t=xi();return Fr=function(n,e,r){"__proto__"==e&&t?t(n,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):n[e]=r}}function ji(){if(Vr)return $r;Vr=1;var t=Ei(),n=ri(),e=Object.prototype.hasOwnProperty;return $r=function(r,i,o){var u=r[i];e.call(r,i)&&n(u,o)&&(void 0!==o||i in r)||t(r,i,o)}}function Ai(){if(Yr)return Xr;Yr=1;var t=ji(),n=Ei();return Xr=function(e,r,i,o){var u=!i;i||(i={});for(var s=-1,a=r.length;++s<a;){var c=r[s],h=o?o(i[c],e[c],c,i,e):void 0;void 0===h&&(h=e[c]),u?n(i,c,h):t(i,c,h)}return i}}function Oi(){if(Gr)return Wr;return Gr=1,Wr=function(t){return null!=t&&"object"==typeof t}}function Mi(){if(Jr)return Qr;Jr=1;var t=function(){if(Hr)return Zr;Hr=1;var t=ci(),n=Oi();return Zr=function(e){return n(e)&&"[object Arguments]"==t(e)}}(),n=Oi(),e=Object.prototype,r=e.hasOwnProperty,i=e.propertyIsEnumerable,o=t(function(){return arguments}())?t:function(t){return n(t)&&r.call(t,"callee")&&!i.call(t,"callee")};return Qr=o}function Si(){if(ti)return Kr;ti=1;var t=Array.isArray;return Kr=t}var ki,Ci,Ti,Ii,Ni,Ri,zi,Pi,Di,Li,Fi,Bi={exports:{}};function $i(){return Ti||(Ti=1,t=Bi,n=Bi.exports,e=si(),r=Ci?ki:(Ci=1,ki=function(){return!1}),i=n&&!n.nodeType&&n,o=i&&t&&!t.nodeType&&t,u=o&&o.exports===i?e.Buffer:void 0,s=(u?u.isBuffer:void 0)||r,t.exports=s),Bi.exports;var t,n,e,r,i,o,u,s}function Vi(){if(Ni)return Ii;Ni=1;var t=/^(?:0|[1-9]\d*)$/;return Ii=function(n,e){var r=typeof n;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&t.test(n))&&n>-1&&n%1==0&&n<e}}function Xi(){if(zi)return Ri;zi=1;return Ri=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}}function Yi(){if(Fi)return Li;return Fi=1,Li=function(t){return function(n){return t(n)}}}Bi.exports;var Ui,qi,Wi,Gi,Zi,Hi,Qi,Ji,Ki,to,no,eo,ro,io,oo,uo,so,ao,co,ho,fo,lo,po,vo,go,yo,_o,mo={exports:{}};function wo(){return Ui||(Ui=1,t=mo,n=mo.exports,e=ui(),r=n&&!n.nodeType&&n,i=r&&t&&!t.nodeType&&t,o=i&&i.exports===r&&e.process,u=function(){try{var t=i&&i.require&&i.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(n){}}(),t.exports=u),mo.exports;var t,n,e,r,i,o,u}function bo(){if(Wi)return qi;Wi=1;var t=function(){if(Di)return Pi;Di=1;var t=ci(),n=Xi(),e=Oi(),r={};return r["[object Float32Array]"]=r["[object Float64Array]"]=r["[object Int8Array]"]=r["[object Int16Array]"]=r["[object Int32Array]"]=r["[object Uint8Array]"]=r["[object Uint8ClampedArray]"]=r["[object Uint16Array]"]=r["[object Uint32Array]"]=!0,r["[object Arguments]"]=r["[object Array]"]=r["[object ArrayBuffer]"]=r["[object Boolean]"]=r["[object DataView]"]=r["[object Date]"]=r["[object Error]"]=r["[object Function]"]=r["[object Map]"]=r["[object Number]"]=r["[object Object]"]=r["[object RegExp]"]=r["[object Set]"]=r["[object String]"]=r["[object WeakMap]"]=!1,Pi=function(i){return e(i)&&n(i.length)&&!!r[t(i)]}}(),n=Yi(),e=wo(),r=e&&e.isTypedArray,i=r?n(r):t;return qi=i}function xo(){if(Zi)return Gi;Zi=1;var t=qr?Ur:(qr=1,Ur=function(t,n){for(var e=-1,r=Array(t);++e<t;)r[e]=n(e);return r}),n=Mi(),e=Si(),r=$i(),i=Vi(),o=bo(),u=Object.prototype.hasOwnProperty;return Gi=function(s,a){var c=e(s),h=!c&&n(s),f=!c&&!h&&r(s),l=!c&&!h&&!f&&o(s),d=c||h||f||l,p=d?t(s.length,String):[],v=p.length;for(var g in s)!a&&!u.call(s,g)||d&&("length"==g||f&&("offset"==g||"parent"==g)||l&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||i(g,v))||p.push(g);return p}}function Eo(){if(Qi)return Hi;Qi=1;var t=Object.prototype;return Hi=function(n){var e=n&&n.constructor;return n===("function"==typeof e&&e.prototype||t)}}function jo(){if(Ki)return Ji;return Ki=1,Ji=function(t,n){return function(e){return t(n(e))}}}function Ao(){if(ro)return eo;ro=1;var t=Eo(),n=function(){if(no)return to;no=1;var t=jo()(Object.keys,Object);return to=t}(),e=Object.prototype.hasOwnProperty;return eo=function(r){if(!t(r))return n(r);var i=[];for(var o in Object(r))e.call(r,o)&&"constructor"!=o&&i.push(o);return i}}function Oo(){if(oo)return io;oo=1;var t=fi(),n=Xi();return io=function(e){return null!=e&&n(e.length)&&!t(e)}}function Mo(){if(so)return uo;so=1;var t=xo(),n=Ao(),e=Oo();return uo=function(r){return e(r)?t(r):n(r)}}function So(){if(po)return lo;po=1;var t=hi(),n=Eo(),e=fo?ho:(fo=1,ho=function(t){var n=[];if(null!=t)for(var e in Object(t))n.push(e);return n}),r=Object.prototype.hasOwnProperty;return lo=function(i){if(!t(i))return e(i);var o=n(i),u=[];for(var s in i)("constructor"!=s||!o&&r.call(i,s))&&u.push(s);return u}}function ko(){if(go)return vo;go=1;var t=xo(),n=So(),e=Oo();return vo=function(r){return e(r)?t(r,!0):n(r)}}mo.exports;var Co,To,Io,No,Ro,zo,Po,Do,Lo,Fo,Bo,$o,Vo,Xo,Yo,Uo,qo,Wo,Go,Zo,Ho,Qo,Jo,Ko,tu,nu,eu,ru,iu,ou,uu,su,au,cu,hu,fu,lu,du,pu,vu,gu,yu,_u,mu,wu,bu,xu,Eu,ju,Au,Ou,Mu,Su,ku,Cu,Tu,Iu,Nu,Ru,zu,Pu,Du,Lu,Fu,Bu,$u,Vu,Xu,Yu,Uu,qu,Wu,Gu,Zu,Hu,Qu,Ju,Ku,ts,ns,es,rs,is,os,us,ss,as,cs,hs,fs,ls,ds,ps,vs,gs,ys,_s,ms,ws,bs,xs,Es,js,As,Os,Ms,Ss,ks,Cs,Ts,Is,Ns,Rs,zs,Ps,Ds,Ls,Fs,Bs,$s,Vs,Xs,Ys,Us,qs,Ws,Gs,Zs,Hs,Qs,Js,Ks,ta,na,ea,ra,ia,oa,ua,sa,aa,ca,ha,fa,la,da,pa,va,ga,ya,_a,ma,wa,ba,xa,Ea,ja,Aa,Oa,Ma,Sa,ka,Ca,Ta,Ia,Na,Ra,za,Pa,Da,La,Fa,Ba,$a,Va,Xa,Ya,Ua,qa,Wa,Ga,Za,Ha,Qa,Ja,Ka,tc,nc,ec,rc,ic,oc,uc,sc,ac,cc,hc,fc,lc,dc,pc,vc,gc,yc,_c,mc,wc,bc,xc,Ec,jc,Ac,Oc,Mc,Sc,kc,Cc,Tc,Ic,Nc,Rc,zc,Pc,Dc,Lc,Fc,Bc,$c,Vc,Xc,Yc,Uc,qc,Wc,Gc,Zc,Hc,Qc,Jc,Kc,th={exports:{}};function nh(){if(Ro)return No;return Ro=1,No=function(t,n){for(var e=-1,r=null==t?0:t.length,i=0,o=[];++e<r;){var u=t[e];n(u,e,t)&&(o[i++]=u)}return o}}function eh(){if(Po)return zo;return Po=1,zo=function(){return[]}}function rh(){if(Lo)return Do;Lo=1;var t=nh(),n=eh(),e=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols;return Do=r?function(n){return null==n?[]:(n=Object(n),t(r(n),(function(t){return e.call(n,t)})))}:n}function ih(){if(Vo)return $o;return Vo=1,$o=function(t,n){for(var e=-1,r=n.length,i=t.length;++e<r;)t[i+e]=n[e];return t}}function oh(){if(Yo)return Xo;Yo=1;var t=jo()(Object.getPrototypeOf,Object);return Xo=t}function uh(){if(qo)return Uo;qo=1;var t=ih(),n=oh(),e=rh(),r=eh(),i=Object.getOwnPropertySymbols;return Uo=i?function(r){for(var i=[];r;)t(i,e(r)),r=n(r);return i}:r}function sh(){if(Ho)return Zo;Ho=1;var t=ih(),n=Si();return Zo=function(e,r,i){var o=r(e);return n(e)?o:t(o,i(e))}}function ah(){if(Jo)return Qo;Jo=1;var t=sh(),n=rh(),e=Mo();return Qo=function(r){return t(r,e,n)}}function ch(){if(uu)return ou;uu=1;var t=pi()(si(),"Set");return ou=t}function hh(){if(hu)return cu;hu=1;var t=function(){if(eu)return nu;eu=1;var t=pi()(si(),"DataView");return nu=t}(),n=vi(),e=function(){if(iu)return ru;iu=1;var t=pi()(si(),"Promise");return ru=t}(),r=ch(),i=function(){if(au)return su;au=1;var t=pi()(si(),"WeakMap");return su=t}(),o=ci(),u=di(),s="[object Map]",a="[object Promise]",c="[object Set]",h="[object WeakMap]",f="[object DataView]",l=u(t),d=u(n),p=u(e),v=u(r),g=u(i),y=o;return(t&&y(new t(new ArrayBuffer(1)))!=f||n&&y(new n)!=s||e&&y(e.resolve())!=a||r&&y(new r)!=c||i&&y(new i)!=h)&&(y=function(t){var n=o(t),e="[object Object]"==n?t.constructor:void 0,r=e?u(e):"";if(r)switch(r){case l:return f;case d:return s;case p:return a;case v:return c;case g:return h}return n}),cu=y}function fh(){if(pu)return du;pu=1;var t=si().Uint8Array;return du=t}function lh(){if(gu)return vu;gu=1;var t=fh();return vu=function(n){var e=new n.constructor(n.byteLength);return new t(e).set(new t(n)),e}}function dh(){if(Ou)return Au;Ou=1;var t=lh(),n=function(){if(_u)return yu;_u=1;var t=lh();return yu=function(n,e){var r=e?t(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.byteLength)}}(),e=function(){if(wu)return mu;wu=1;var t=/\w*$/;return mu=function(n){var e=new n.constructor(n.source,t.exec(n));return e.lastIndex=n.lastIndex,e}}(),r=function(){if(xu)return bu;xu=1;var t=ai(),n=t?t.prototype:void 0,e=n?n.valueOf:void 0;return bu=function(t){return e?Object(e.call(t)):{}}}(),i=function(){if(ju)return Eu;ju=1;var t=lh();return Eu=function(n,e){var r=e?t(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.length)}}();return Au=function(o,u,s){var a=o.constructor;switch(u){case"[object ArrayBuffer]":return t(o);case"[object Boolean]":case"[object Date]":return new a(+o);case"[object DataView]":return n(o,s);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 i(o,s);case"[object Map]":case"[object Set]":return new a;case"[object Number]":case"[object String]":return new a(o);case"[object RegExp]":return e(o);case"[object Symbol]":return r(o)}}}function ph(){if(Su)return Mu;Su=1;var t=hi(),n=Object.create;return Mu=function(){function e(){}return function(r){if(!t(r))return{};if(n)return n(r);e.prototype=r;var i=new e;return e.prototype=void 0,i}}()}function vh(){if(Ru)return Nu;Ru=1;var t=function(){if(Iu)return Tu;Iu=1;var t=hh(),n=Oi();return Tu=function(e){return n(e)&&"[object Map]"==t(e)}}(),n=Yi(),e=wo(),r=e&&e.isMap,i=r?n(r):t;return Nu=i}function gh(){if(Lu)return Du;Lu=1;var t=function(){if(Pu)return zu;Pu=1;var t=hh(),n=Oi();return zu=function(e){return n(e)&&"[object Set]"==t(e)}}(),n=Yi(),e=wo(),r=e&&e.isSet,i=r?n(r):t;return Du=i}function yh(){if(Bu)return Fu;Bu=1;var t,n,e,r,i,o,u,s=wi(),a=bi(),c=ji(),h=function(){if(co)return ao;co=1;var t=Ai(),n=Mo();return ao=function(e,r){return e&&t(r,n(r),e)}}(),f=function(){if(_o)return yo;_o=1;var t=Ai(),n=ko();return yo=function(e,r){return e&&t(r,n(r),e)}}(),l=(Co||(Co=1,t=th,n=th.exports,e=si(),r=n&&!n.nodeType&&n,i=r&&t&&!t.nodeType&&t,o=i&&i.exports===r?e.Buffer:void 0,u=o?o.allocUnsafe:void 0,t.exports=function(t,n){if(n)return t.slice();var e=t.length,r=u?u(e):new t.constructor(e);return t.copy(r),r}),th.exports),d=Io?To:(Io=1,To=function(t,n){var e=-1,r=t.length;for(n||(n=Array(r));++e<r;)n[e]=t[e];return n}),p=function(){if(Bo)return Fo;Bo=1;var t=Ai(),n=rh();return Fo=function(e,r){return t(e,n(e),r)}}(),v=function(){if(Go)return Wo;Go=1;var t=Ai(),n=uh();return Wo=function(e,r){return t(e,n(e),r)}}(),g=ah(),y=function(){if(tu)return Ko;tu=1;var t=sh(),n=uh(),e=ko();return Ko=function(r){return t(r,e,n)}}(),_=hh(),m=function(){if(lu)return fu;lu=1;var t=Object.prototype.hasOwnProperty;return fu=function(n){var e=n.length,r=new n.constructor(e);return e&&"string"==typeof n[0]&&t.call(n,"index")&&(r.index=n.index,r.input=n.input),r}}(),w=dh(),b=function(){if(Cu)return ku;Cu=1;var t=ph(),n=oh(),e=Eo();return ku=function(r){return"function"!=typeof r.constructor||e(r)?{}:t(n(r))}}(),x=Si(),E=$i(),j=vh(),A=hi(),O=gh(),M=Mo(),S=ko(),k="[object Arguments]",C="[object Function]",T="[object Object]",I={};return I[k]=I["[object Array]"]=I["[object ArrayBuffer]"]=I["[object DataView]"]=I["[object Boolean]"]=I["[object Date]"]=I["[object Float32Array]"]=I["[object Float64Array]"]=I["[object Int8Array]"]=I["[object Int16Array]"]=I["[object Int32Array]"]=I["[object Map]"]=I["[object Number]"]=I[T]=I["[object RegExp]"]=I["[object Set]"]=I["[object String]"]=I["[object Symbol]"]=I["[object Uint8Array]"]=I["[object Uint8ClampedArray]"]=I["[object Uint16Array]"]=I["[object Uint32Array]"]=!0,I["[object Error]"]=I[C]=I["[object WeakMap]"]=!1,Fu=function t(n,e,r,i,o,u){var N,R=1&e,z=2&e,P=4&e;if(r&&(N=o?r(n,i,o,u):r(n)),void 0!==N)return N;if(!A(n))return n;var D=x(n);if(D){if(N=m(n),!R)return d(n,N)}else{var L=_(n),F=L==C||"[object GeneratorFunction]"==L;if(E(n))return l(n,R);if(L==T||L==k||F&&!o){if(N=z||F?{}:b(n),!R)return z?v(n,f(N,n)):p(n,h(N,n))}else{if(!I[L])return o?n:{};N=w(n,L,R)}}u||(u=new s);var B=u.get(n);if(B)return B;u.set(n,N),O(n)?n.forEach((function(i){N.add(t(i,e,r,i,n,u))})):j(n)&&n.forEach((function(i,o){N.set(o,t(i,e,r,o,n,u))}));var $=D?void 0:(P?z?y:g:z?S:M)(n);return a($||n,(function(i,o){$&&(i=n[o=i]),c(N,o,t(i,e,r,o,n,u))})),N},Fu}function _h(){if(Yu)return Xu;return Yu=1,Xu=function(t){return function(){return t}}}function mh(){if(Gu)return Wu;Gu=1;var t=(qu?Uu:(qu=1,Uu=function(t){return function(n,e,r){for(var i=-1,o=Object(n),u=r(n),s=u.length;s--;){var a=u[t?s:++i];if(!1===e(o[a],a,o))break}return n}}))();return Wu=t}function wh(){if(Hu)return Zu;Hu=1;var t=mh(),n=Mo();return Zu=function(e,r){return e&&t(e,r,n)}}function bh(){if(ts)return Ku;ts=1;var t=wh(),n=function(){if(Ju)return Qu;Ju=1;var t=Oo();return Qu=function(n,e){return function(r,i){if(null==r)return r;if(!t(r))return n(r,i);for(var o=r.length,u=e?o:-1,s=Object(r);(e?u--:++u<o)&&!1!==i(s[u],u,s););return r}}}()(t);return Ku=n}function xh(){if(es)return ns;return es=1,ns=function(t){return t}}function Eh(){if(us)return os;us=1;var t=bi(),n=bh(),e=function(){if(is)return rs;is=1;var t=xh();return rs=function(n){return"function"==typeof n?n:t}}(),r=Si();return os=function(i,o){return(r(i)?t:n)(i,e(o))}}function jh(){if(gs)return vs;gs=1;var t=mi(),n=ls?fs:(ls=1,fs=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}),e=ps?ds:(ps=1,ds=function(t){return this.__data__.has(t)});function r(n){var e=-1,r=null==n?0:n.length;for(this.__data__=new t;++e<r;)this.add(n[e])}return r.prototype.add=r.prototype.push=n,r.prototype.has=e,vs=r}function Ah(){if(ws)return ms;return ws=1,ms=function(t,n){return t.has(n)}}function Oh(){if(xs)return bs;xs=1;var t=jh(),n=_s?ys:(_s=1,ys=function(t,n){for(var e=-1,r=null==t?0:t.length;++e<r;)if(n(t[e],e,t))return!0;return!1}),e=Ah();return bs=function(r,i,o,u,s,a){var c=1&o,h=r.length,f=i.length;if(h!=f&&!(c&&f>h))return!1;var l=a.get(r),d=a.get(i);if(l&&d)return l==i&&d==r;var p=-1,v=!0,g=2&o?new t:void 0;for(a.set(r,i),a.set(i,r);++p<h;){var y=r[p],_=i[p];if(u)var m=c?u(_,y,p,i,r,a):u(y,_,p,r,i,a);if(void 0!==m){if(m)continue;v=!1;break}if(g){if(!n(i,(function(t,n){if(!e(g,n)&&(y===t||s(y,t,o,u,a)))return g.push(n)}))){v=!1;break}}else if(y!==_&&!s(y,_,o,u,a)){v=!1;break}}return a.delete(r),a.delete(i),v}}function Mh(){if(Os)return As;return Os=1,As=function(t){var n=-1,e=Array(t.size);return t.forEach((function(t){e[++n]=t})),e}}function Sh(){if(Ss)return Ms;Ss=1;var t=ai(),n=fh(),e=ri(),r=Oh(),i=js?Es:(js=1,Es=function(t){var n=-1,e=Array(t.size);return t.forEach((function(t,r){e[++n]=[r,t]})),e}),o=Mh(),u=t?t.prototype:void 0,s=u?u.valueOf:void 0;return Ms=function(t,u,a,c,h,f,l){switch(a){case"[object DataView]":if(t.byteLength!=u.byteLength||t.byteOffset!=u.byteOffset)return!1;t=t.buffer,u=u.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=u.byteLength||!f(new n(t),new n(u)));case"[object Boolean]":case"[object Date]":case"[object Number]":return e(+t,+u);case"[object Error]":return t.name==u.name&&t.message==u.message;case"[object RegExp]":case"[object String]":return t==u+"";case"[object Map]":var d=i;case"[object Set]":var p=1&c;if(d||(d=o),t.size!=u.size&&!p)return!1;var v=l.get(t);if(v)return v==u;c|=2,l.set(t,u);var g=r(d(t),d(u),c,h,f,l);return l.delete(t),g;case"[object Symbol]":if(s)return s.call(t)==s.call(u)}return!1}}function kh(){if(Is)return Ts;Is=1;var t=wi(),n=Oh(),e=Sh(),r=function(){if(Cs)return ks;Cs=1;var t=ah(),n=Object.prototype.hasOwnProperty;return ks=function(e,r,i,o,u,s){var a=1&i,c=t(e),h=c.length;if(h!=t(r).length&&!a)return!1;for(var f=h;f--;){var l=c[f];if(!(a?l in r:n.call(r,l)))return!1}var d=s.get(e),p=s.get(r);if(d&&p)return d==r&&p==e;var v=!0;s.set(e,r),s.set(r,e);for(var g=a;++f<h;){var y=e[l=c[f]],_=r[l];if(o)var m=a?o(_,y,l,r,e,s):o(y,_,l,e,r,s);if(!(void 0===m?y===_||u(y,_,i,o,s):m)){v=!1;break}g||(g="constructor"==l)}if(v&&!g){var w=e.constructor,b=r.constructor;w==b||!("constructor"in e)||!("constructor"in r)||"function"==typeof w&&w instanceof w&&"function"==typeof b&&b instanceof b||(v=!1)}return s.delete(e),s.delete(r),v}}(),i=hh(),o=Si(),u=$i(),s=bo(),a="[object Arguments]",c="[object Array]",h="[object Object]",f=Object.prototype.hasOwnProperty;return Ts=function(l,d,p,v,g,y){var _=o(l),m=o(d),w=_?c:i(l),b=m?c:i(d),x=(w=w==a?h:w)==h,E=(b=b==a?h:b)==h,j=w==b;if(j&&u(l)){if(!u(d))return!1;_=!0,x=!1}if(j&&!x)return y||(y=new t),_||s(l)?n(l,d,p,v,g,y):e(l,d,w,p,v,g,y);if(!(1&p)){var A=x&&f.call(l,"__wrapped__"),O=E&&f.call(d,"__wrapped__");if(A||O){var M=A?l.value():l,S=O?d.value():d;return y||(y=new t),g(M,S,p,v,y)}}return!!j&&(y||(y=new t),r(l,d,p,v,g,y))}}function Ch(){if(Rs)return Ns;Rs=1;var t=kh(),n=Oi();return Ns=function e(r,i,o,u,s){return r===i||(null==r||null==i||!n(r)&&!n(i)?r!=r&&i!=i:t(r,i,o,u,e,s))},Ns}function Th(){if(Ls)return Ds;Ls=1;var t=hi();return Ds=function(n){return n==n&&!t(n)}}function Ih(){if(Vs)return $s;return Vs=1,$s=function(t,n){return function(e){return null!=e&&(e[t]===n&&(void 0!==n||t in Object(e)))}}}function Nh(){if(Ys)return Xs;Ys=1;var t=function(){if(Ps)return zs;Ps=1;var t=wi(),n=Ch();return zs=function(e,r,i,o){var u=i.length,s=u,a=!o;if(null==e)return!s;for(e=Object(e);u--;){var c=i[u];if(a&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++u<s;){var h=(c=i[u])[0],f=e[h],l=c[1];if(a&&c[2]){if(void 0===f&&!(h in e))return!1}else{var d=new t;if(o)var p=o(f,l,h,e,r,d);if(!(void 0===p?n(l,f,3,o,d):p))return!1}}return!0}}(),n=function(){if(Bs)return Fs;Bs=1;var t=Th(),n=Mo();return Fs=function(e){for(var r=n(e),i=r.length;i--;){var o=r[i],u=e[o];r[i]=[o,u,t(u)]}return r}}(),e=Ih();return Xs=function(r){var i=n(r);return 1==i.length&&i[0][2]?e(i[0][0],i[0][1]):function(n){return n===r||t(n,r,i)}}}function Rh(){if(qs)return Us;qs=1;var t=ci(),n=Oi();return Us=function(e){return"symbol"==typeof e||n(e)&&"[object Symbol]"==t(e)}}function zh(){if(Gs)return Ws;Gs=1;var t=Si(),n=Rh(),e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;return Ws=function(i,o){if(t(i))return!1;var u=typeof i;return!("number"!=u&&"symbol"!=u&&"boolean"!=u&&null!=i&&!n(i))||(r.test(i)||!e.test(i)||null!=o&&i in Object(o))}}function Ph(){if(Js)return Qs;Js=1;var t=function(){if(Hs)return Zs;Hs=1;var t=mi();function n(e,r){if("function"!=typeof e||null!=r&&"function"!=typeof r)throw new TypeError("Expected a function");var i=function(){var t=arguments,n=r?r.apply(this,t):t[0],o=i.cache;if(o.has(n))return o.get(n);var u=e.apply(this,t);return i.cache=o.set(n,u)||o,u};return i.cache=new(n.Cache||t),i}return n.Cache=t,Zs=n}();return Qs=function(n){var e=t(n,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}}function Dh(){if(ea)return na;return ea=1,na=function(t,n){for(var e=-1,r=null==t?0:t.length,i=Array(r);++e<r;)i[e]=n(t[e],e,t);return i}}function Lh(){if(ua)return oa;ua=1;var t=function(){if(ia)return ra;ia=1;var t=ai(),n=Dh(),e=Si(),r=Rh(),i=t?t.prototype:void 0,o=i?i.toString:void 0;return ra=function t(i){if("string"==typeof i)return i;if(e(i))return n(i,t)+"";if(r(i))return o?o.call(i):"";var u=i+"";return"0"==u&&1/i==-1/0?"-0":u},ra}();return oa=function(n){return null==n?"":t(n)}}function Fh(){if(aa)return sa;aa=1;var t=Si(),n=zh(),e=function(){if(ta)return Ks;ta=1;var t=Ph(),n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,e=/\\(\\)?/g,r=t((function(t){var r=[];return 46===t.charCodeAt(0)&&r.push(""),t.replace(n,(function(t,n,i,o){r.push(i?o.replace(e,"$1"):n||t)})),r}));return Ks=r}(),r=Lh();return sa=function(i,o){return t(i)?i:n(i,o)?[i]:e(r(i))}}function Bh(){if(ha)return ca;ha=1;var t=Rh();return ca=function(n){if("string"==typeof n||t(n))return n;var e=n+"";return"0"==e&&1/n==-1/0?"-0":e}}function $h(){if(la)return fa;la=1;var t=Fh(),n=Bh();return fa=function(e,r){for(var i=0,o=(r=t(r,e)).length;null!=e&&i<o;)e=e[n(r[i++])];return i&&i==o?e:void 0}}function Vh(){if(_a)return ya;_a=1;var t=Fh(),n=Mi(),e=Si(),r=Vi(),i=Xi(),o=Bh();return ya=function(u,s,a){for(var c=-1,h=(s=t(s,u)).length,f=!1;++c<h;){var l=o(s[c]);if(!(f=null!=u&&a(u,l)))break;u=u[l]}return f||++c!=h?f:!!(h=null==u?0:u.length)&&i(h)&&r(l,h)&&(e(u)||n(u))}}function Xh(){if(wa)return ma;wa=1;var t=ga?va:(ga=1,va=function(t,n){return null!=t&&n in Object(t)}),n=Vh();return ma=function(e,r){return null!=e&&n(e,r,t)}}function Yh(){if(xa)return ba;xa=1;var t=Ch(),n=function(){if(pa)return da;pa=1;var t=$h();return da=function(n,e,r){var i=null==n?void 0:t(n,e);return void 0===i?r:i}}(),e=Xh(),r=zh(),i=Th(),o=Ih(),u=Bh();return ba=function(s,a){return r(s)&&i(a)?o(u(s),a):function(r){var i=n(r,s);return void 0===i&&i===a?e(r,s):t(a,i,3)}}}function Uh(){if(ja)return Ea;return ja=1,Ea=function(t){return function(n){return null==n?void 0:n[t]}}}function qh(){if(Sa)return Ma;Sa=1;var t=Uh(),n=function(){if(Oa)return Aa;Oa=1;var t=$h();return Aa=function(n){return function(e){return t(e,n)}}}(),e=zh(),r=Bh();return Ma=function(i){return e(i)?t(r(i)):n(i)}}function Wh(){if(Ca)return ka;Ca=1;var t=Nh(),n=Yh(),e=xh(),r=Si(),i=qh();return ka=function(o){return"function"==typeof o?o:null==o?e:"object"==typeof o?r(o)?n(o[0],o[1]):t(o):i(o)}}function Gh(){if(uc)return oc;uc=1;var t=function(){if(tc)return Ka;tc=1;var t=Uh()("length");return Ka=t}(),n=function(){if(ec)return nc;ec=1;var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");return nc=function(n){return t.test(n)}}(),e=function(){if(ic)return rc;ic=1;var t="\\ud800-\\udfff",n="["+t+"]",e="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",i="[^"+t+"]",o="(?:\\ud83c[\\udde6-\\uddff]){2}",u="[\\ud800-\\udbff][\\udc00-\\udfff]",s="(?:"+e+"|"+r+")?",a="[\\ufe0e\\ufe0f]?",c=a+s+"(?:\\u200d(?:"+[i,o,u].join("|")+")"+a+s+")*",h="(?:"+[i+e+"?",e,o,u,n].join("|")+")",f=RegExp(r+"(?="+r+")|"+h+c,"g");return rc=function(t){for(var n=f.lastIndex=0;f.test(t);)++n;return n}}();return oc=function(r){return n(r)?e(r):t(r)}}function Zh(){if(pc)return dc;pc=1;var t=ih(),n=function(){if(lc)return fc;lc=1;var t=ai(),n=Mi(),e=Si(),r=t?t.isConcatSpreadable:void 0;return fc=function(t){return e(t)||n(t)||!!(r&&t&&t[r])}}();return dc=function e(r,i,o,u,s){var a=-1,c=r.length;for(o||(o=n),s||(s=[]);++a<c;){var h=r[a];i>0&&o(h)?i>1?e(h,i-1,o,u,s):t(s,h):u||(s[s.length]=h)}return s},dc}function Hh(){if(_c)return yc;_c=1;var t=gc?vc:(gc=1,vc=function(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}),n=Math.max;return yc=function(e,r,i){return r=n(void 0===r?e.length-1:r,0),function(){for(var o=arguments,u=-1,s=n(o.length-r,0),a=Array(s);++u<s;)a[u]=o[r+u];u=-1;for(var c=Array(r+1);++u<r;)c[u]=o[u];return c[r]=i(a),t(e,this,c)}},yc}function Qh(){if(jc)return Ec;jc=1;var t=function(){if(wc)return mc;wc=1;var t=_h(),n=xi(),e=xh();return mc=n?function(e,r){return n(e,"toString",{configurable:!0,enumerable:!1,value:t(r),writable:!0})}:e}(),n=function(){if(xc)return bc;xc=1;var t=Date.now;return bc=function(n){var e=0,r=0;return function(){var i=t(),o=16-(i-r);if(r=i,o>0){if(++e>=800)return arguments[0]}else e=0;return n.apply(void 0,arguments)}},bc}(),e=n(t);return Ec=e}function Jh(){if(Rc)return Nc;Rc=1;var t=Sc?Mc:(Sc=1,Mc=function(t,n,e,r){for(var i=t.length,o=e+(r?1:-1);r?o--:++o<i;)if(n(t[o],o,t))return o;return-1}),n=Cc?kc:(Cc=1,kc=function(t){return t!=t}),e=Ic?Tc:(Ic=1,Tc=function(t,n,e){for(var r=e-1,i=t.length;++r<i;)if(t[r]===n)return r;return-1});return Nc=function(r,i,o){return i==i?e(r,i,o):t(r,n,o)}}function Kh(){if(Vc)return $c;Vc=1;var t=ch(),n=Bc?Fc:(Bc=1,Fc=function(){}),e=Mh(),r=t&&1/e(new t([,-0]))[1]==1/0?function(n){return new t(n)}:n;return $c=r}function tf(){if(Yc)return Xc;Yc=1;var t=jh(),n=function(){if(Pc)return zc;Pc=1;var t=Jh();return zc=function(n,e){return!(null==n||!n.length)&&t(n,e,0)>-1}}(),e=Lc?Dc:(Lc=1,Dc=function(t,n,e){for(var r=-1,i=null==t?0:t.length;++r<i;)if(e(n,t[r]))return!0;return!1}),r=Ah(),i=Kh(),o=Mh();return Xc=function(u,s,a){var c=-1,h=n,f=u.length,l=!0,d=[],p=d;if(a)l=!1,h=e;else if(f>=200){var v=s?null:i(u);if(v)return o(v);l=!1,h=r,p=new t}else p=s?[]:d;t:for(;++c<f;){var g=u[c],y=s?s(g):g;if(g=a||0!==g?g:0,l&&y==y){for(var _=p.length;_--;)if(p[_]===y)continue t;s&&p.push(y),d.push(g)}else h(p,y,a)||(p!==d&&p.push(y),d.push(g))}return d}}th.exports;try{Kc={clone:function(){if(Vu)return $u;Vu=1;var t=yh();return $u=function(n){return t(n,4)}}(),constant:_h(),each:as?ss:(as=1,ss=Eh()),filter:function(){if(Ia)return Ta;Ia=1;var t=nh(),n=function(){if(hs)return cs;hs=1;var t=bh();return cs=function(n,e){var r=[];return t(n,(function(t,n,i){e(t,n,i)&&r.push(t)})),r}}(),e=Wh(),r=Si();return Ta=function(i,o){return(r(i)?t:n)(i,e(o,3))}}(),has:function(){if(Pa)return za;Pa=1;var t=function(){if(Ra)return Na;Ra=1;var t=Object.prototype.hasOwnProperty;return Na=function(n,e){return null!=n&&t.call(n,e)}}(),n=Vh();return za=function(e,r){return null!=e&&n(e,r,t)}}(),isArray:Si(),isEmpty:function(){if(La)return Da;La=1;var t=Ao(),n=hh(),e=Mi(),r=Si(),i=Oo(),o=$i(),u=Eo(),s=bo(),a=Object.prototype.hasOwnProperty;return Da=function(c){if(null==c)return!0;if(i(c)&&(r(c)||"string"==typeof c||"function"==typeof c.splice||o(c)||s(c)||e(c)))return!c.length;var h=n(c);if("[object Map]"==h||"[object Set]"==h)return!c.size;if(u(c))return!t(c).length;for(var f in c)if(a.call(c,f))return!1;return!0}}(),isFunction:fi(),isUndefined:Ba?Fa:(Ba=1,Fa=function(t){return void 0===t}),keys:Mo(),map:function(){if(Ya)return Xa;Ya=1;var t=Dh(),n=Wh(),e=function(){if(Va)return $a;Va=1;var t=bh(),n=Oo();return $a=function(e,r){var i=-1,o=n(e)?Array(e.length):[];return t(e,(function(t,n,e){o[++i]=r(t,n,e)})),o}}(),r=Si();return Xa=function(i,o){return(r(i)?t:e)(i,n(o,3))}}(),reduce:function(){if(Ha)return Za;Ha=1;var t=qa?Ua:(qa=1,Ua=function(t,n,e,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(e=t[++i]);++i<o;)e=n(e,t[i],i,t);return e}),n=bh(),e=Wh(),r=Ga?Wa:(Ga=1,Wa=function(t,n,e,r,i){return i(t,(function(t,i,o){e=r?(r=!1,t):n(e,t,i,o)})),e}),i=Si();return Za=function(o,u,s){var a=i(o)?t:r,c=arguments.length<3;return a(o,e(u,4),s,c,n)},Za}(),size:function(){if(ac)return sc;ac=1;var t=Ao(),n=hh(),e=Oo(),r=function(){if(Ja)return Qa;Ja=1;var t=ci(),n=Si(),e=Oi();return Qa=function(r){return"string"==typeof r||!n(r)&&e(r)&&"[object String]"==t(r)}}(),i=Gh();return sc=function(o){if(null==o)return 0;if(e(o))return r(o)?i(o):o.length;var u=n(o);return"[object Map]"==u||"[object Set]"==u?o.size:t(o).length}}(),transform:function(){if(hc)return cc;hc=1;var t=bi(),n=ph(),e=wh(),r=Wh(),i=oh(),o=Si(),u=$i(),s=fi(),a=hi(),c=bo();return cc=function(h,f,l){var d=o(h),p=d||u(h)||c(h);if(f=r(f,4),null==l){var v=h&&h.constructor;l=p?d?new v:[]:a(h)&&s(v)?n(i(h)):{}}return(p?t:e)(h,(function(t,n,e){return f(l,t,n,e)})),l}}(),union:function(){if(Gc)return Wc;Gc=1;var t=Zh(),n=function(){if(Oc)return Ac;Oc=1;var t=xh(),n=Hh(),e=Qh();return Ac=function(r,i){return e(n(r,i,t),r+"")}}(),e=tf(),r=function(){if(qc)return Uc;qc=1;var t=Oo(),n=Oi();return Uc=function(e){return n(e)&&t(e)}}(),i=n((function(n){return e(t(n,1,r,!0))}));return Wc=i}(),values:function(){if(Jc)return Qc;Jc=1;var t=function(){if(Hc)return Zc;Hc=1;var t=Dh();return Zc=function(n,e){return t(e,(function(t){return n[t]}))}}(),n=Mo();return Qc=function(e){return null==e?[]:t(e,n(e))}}()}}catch(Bl){}Kc||(Kc=window._);var nf=Kc,ef=nf,rf=af,of="\0",uf="\0",sf="";function af(t){this._isDirected=!ef.has(t,"directed")||t.directed,this._isMultigraph=!!ef.has(t,"multigraph")&&t.multigraph,this._isCompound=!!ef.has(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=ef.constant(void 0),this._defaultEdgeLabelFn=ef.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[uf]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function cf(t,n){t[n]?t[n]++:t[n]=1}function hf(t,n){--t[n]||delete t[n]}function ff(t,n,e,r){var i=""+n,o=""+e;if(!t&&i>o){var u=i;i=o,o=u}return i+sf+o+sf+(ef.isUndefined(r)?of:r)}function lf(t,n){return ff(t,n.v,n.w,n.name)}af.prototype._nodeCount=0,af.prototype._edgeCount=0,af.prototype.isDirected=function(){return this._isDirected},af.prototype.isMultigraph=function(){return this._isMultigraph},af.prototype.isCompound=function(){return this._isCompound},af.prototype.setGraph=function(t){return this._label=t,this},af.prototype.graph=function(){return this._label},af.prototype.setDefaultNodeLabel=function(t){return ef.isFunction(t)||(t=ef.constant(t)),this._defaultNodeLabelFn=t,this},af.prototype.nodeCount=function(){return this._nodeCount},af.prototype.nodes=function(){return ef.keys(this._nodes)},af.prototype.sources=function(){var t=this;return ef.filter(this.nodes(),(function(n){return ef.isEmpty(t._in[n])}))},af.prototype.sinks=function(){var t=this;return ef.filter(this.nodes(),(function(n){return ef.isEmpty(t._out[n])}))},af.prototype.setNodes=function(t,n){var e=arguments,r=this;return ef.each(t,(function(t){e.length>1?r.setNode(t,n):r.setNode(t)})),this},af.prototype.setNode=function(t,n){return ef.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=n),this):(this._nodes[t]=arguments.length>1?n:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=uf,this._children[t]={},this._children[uf][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},af.prototype.node=function(t){return this._nodes[t]},af.prototype.hasNode=function(t){return ef.has(this._nodes,t)},af.prototype.removeNode=function(t){var n=this;if(ef.has(this._nodes,t)){var e=function(t){n.removeEdge(n._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],ef.each(this.children(t),(function(t){n.setParent(t)})),delete this._children[t]),ef.each(ef.keys(this._in[t]),e),delete this._in[t],delete this._preds[t],ef.each(ef.keys(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},af.prototype.setParent=function(t,n){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(ef.isUndefined(n))n=uf;else{for(var e=n+="";!ef.isUndefined(e);e=this.parent(e))if(e===t)throw new Error("Setting "+n+" as parent of "+t+" would create a cycle");this.setNode(n)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=n,this._children[n][t]=!0,this},af.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},af.prototype.parent=function(t){if(this._isCompound){var n=this._parent[t];if(n!==uf)return n}},af.prototype.children=function(t){if(ef.isUndefined(t)&&(t=uf),this._isCompound){var n=this._children[t];if(n)return ef.keys(n)}else{if(t===uf)return this.nodes();if(this.hasNode(t))return[]}},af.prototype.predecessors=function(t){var n=this._preds[t];if(n)return ef.keys(n)},af.prototype.successors=function(t){var n=this._sucs[t];if(n)return ef.keys(n)},af.prototype.neighbors=function(t){var n=this.predecessors(t);if(n)return ef.union(n,this.successors(t))},af.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},af.prototype.filterNodes=function(t){var n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});n.setGraph(this.graph());var e=this;ef.each(this._nodes,(function(e,r){t(r)&&n.setNode(r,e)})),ef.each(this._edgeObjs,(function(t){n.hasNode(t.v)&&n.hasNode(t.w)&&n.setEdge(t,e.edge(t))}));var r={};function i(t){var o=e.parent(t);return void 0===o||n.hasNode(o)?(r[t]=o,o):o in r?r[o]:i(o)}return this._isCompound&&ef.each(n.nodes(),(function(t){n.setParent(t,i(t))})),n},af.prototype.setDefaultEdgeLabel=function(t){return ef.isFunction(t)||(t=ef.constant(t)),this._defaultEdgeLabelFn=t,this},af.prototype.edgeCount=function(){return this._edgeCount},af.prototype.edges=function(){return ef.values(this._edgeObjs)},af.prototype.setPath=function(t,n){var e=this,r=arguments;return ef.reduce(t,(function(t,i){return r.length>1?e.setEdge(t,i,n):e.setEdge(t,i),i})),this},af.prototype.setEdge=function(){var t,n,e,r,i=!1,o=arguments[0];"object"==typeof o&&null!==o&&"v"in o?(t=o.v,n=o.w,e=o.name,2===arguments.length&&(r=arguments[1],i=!0)):(t=o,n=arguments[1],e=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),t=""+t,n=""+n,ef.isUndefined(e)||(e=""+e);var u=ff(this._isDirected,t,n,e);if(ef.has(this._edgeLabels,u))return i&&(this._edgeLabels[u]=r),this;if(!ef.isUndefined(e)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(n),this._edgeLabels[u]=i?r:this._defaultEdgeLabelFn(t,n,e);var s=function(t,n,e,r){var i=""+n,o=""+e;if(!t&&i>o){var u=i;i=o,o=u}var s={v:i,w:o};r&&(s.name=r);return s}(this._isDirected,t,n,e);return t=s.v,n=s.w,Object.freeze(s),this._edgeObjs[u]=s,cf(this._preds[n],t),cf(this._sucs[t],n),this._in[n][u]=s,this._out[t][u]=s,this._edgeCount++,this},af.prototype.edge=function(t,n,e){var r=1===arguments.length?lf(this._isDirected,arguments[0]):ff(this._isDirected,t,n,e);return this._edgeLabels[r]},af.prototype.hasEdge=function(t,n,e){var r=1===arguments.length?lf(this._isDirected,arguments[0]):ff(this._isDirected,t,n,e);return ef.has(this._edgeLabels,r)},af.prototype.removeEdge=function(t,n,e){var r=1===arguments.length?lf(this._isDirected,arguments[0]):ff(this._isDirected,t,n,e),i=this._edgeObjs[r];return i&&(t=i.v,n=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],hf(this._preds[n],t),hf(this._sucs[t],n),delete this._in[n][r],delete this._out[t][r],this._edgeCount--),this},af.prototype.inEdges=function(t,n){var e=this._in[t];if(e){var r=ef.values(e);return n?ef.filter(r,(function(t){return t.v===n})):r}},af.prototype.outEdges=function(t,n){var e=this._out[t];if(e){var r=ef.values(e);return n?ef.filter(r,(function(t){return t.w===n})):r}},af.prototype.nodeEdges=function(t,n){var e=this.inEdges(t,n);if(e)return e.concat(this.outEdges(t,n))};var df={Graph:rf,version:"2.1.8"},pf=nf,vf=rf,gf={write:function(t){var n={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:yf(t),edges:_f(t)};pf.isUndefined(t.graph())||(n.value=pf.clone(t.graph()));return n},read:function(t){var n=new vf(t.options).setGraph(t.value);return pf.each(t.nodes,(function(t){n.setNode(t.v,t.value),t.parent&&n.setParent(t.v,t.parent)})),pf.each(t.edges,(function(t){n.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),n}};function yf(t){return pf.map(t.nodes(),(function(n){var e=t.node(n),r=t.parent(n),i={v:n};return pf.isUndefined(e)||(i.value=e),pf.isUndefined(r)||(i.parent=r),i}))}function _f(t){return pf.map(t.edges(),(function(n){var e=t.edge(n),r={v:n.v,w:n.w};return pf.isUndefined(n.name)||(r.name=n.name),pf.isUndefined(e)||(r.value=e),r}))}var mf=nf,wf=function(t){var n,e={},r=[];function i(r){mf.has(e,r)||(e[r]=!0,n.push(r),mf.each(t.successors(r),i),mf.each(t.predecessors(r),i))}return mf.each(t.nodes(),(function(t){n=[],i(t),n.length&&r.push(n)})),r};var bf=nf,xf=Ef;function Ef(){this._arr=[],this._keyIndices={}}Ef.prototype.size=function(){return this._arr.length},Ef.prototype.keys=function(){return this._arr.map((function(t){return t.key}))},Ef.prototype.has=function(t){return bf.has(this._keyIndices,t)},Ef.prototype.priority=function(t){var n=this._keyIndices[t];if(void 0!==n)return this._arr[n].priority},Ef.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},Ef.prototype.add=function(t,n){var e=this._keyIndices;if(t=String(t),!bf.has(e,t)){var r=this._arr,i=r.length;return e[t]=i,r.push({key:t,priority:n}),this._decrease(i),!0}return!1},Ef.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},Ef.prototype.decrease=function(t,n){var e=this._keyIndices[t];if(n>this._arr[e].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[e].priority+" New: "+n);this._arr[e].priority=n,this._decrease(e)},Ef.prototype._heapify=function(t){var n=this._arr,e=2*t,r=e+1,i=t;e<n.length&&(i=n[e].priority<n[i].priority?e:i,r<n.length&&(i=n[r].priority<n[i].priority?r:i),i!==t&&(this._swap(t,i),this._heapify(i)))},Ef.prototype._decrease=function(t){for(var n,e=this._arr,r=e[t].priority;0!==t&&!(e[n=t>>1].priority<r);)this._swap(t,n),t=n},Ef.prototype._swap=function(t,n){var e=this._arr,r=this._keyIndices,i=e[t],o=e[n];e[t]=o,e[n]=i,r[o.key]=t,r[i.key]=n};var jf=xf,Af=function(t,n,e,r){return function(t,n,e,r){var i,o,u={},s=new jf,a=function(t){var n=t.v!==i?t.v:t.w,r=u[n],a=e(t),c=o.distance+a;if(a<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+a);c<r.distance&&(r.distance=c,r.predecessor=i,s.decrease(n,c))};t.nodes().forEach((function(t){var e=t===n?0:Number.POSITIVE_INFINITY;u[t]={distance:e},s.add(t,e)}));for(;s.size()>0&&(i=s.removeMin(),(o=u[i]).distance!==Number.POSITIVE_INFINITY);)r(i).forEach(a);return u}(t,String(n),e||Of,r||function(n){return t.outEdges(n)})},Of=nf.constant(1);var Mf=Af,Sf=nf,kf=function(t,n,e){return Sf.transform(t.nodes(),(function(r,i){r[i]=Mf(t,i,n,e)}),{})};var Cf=nf,Tf=function(t){var n=0,e=[],r={},i=[];function o(u){var s=r[u]={onStack:!0,lowlink:n,index:n++};if(e.push(u),t.successors(u).forEach((function(t){Cf.has(r,t)?r[t].onStack&&(s.lowlink=Math.min(s.lowlink,r[t].index)):(o(t),s.lowlink=Math.min(s.lowlink,r[t].lowlink))})),s.lowlink===s.index){var a,c=[];do{a=e.pop(),r[a].onStack=!1,c.push(a)}while(u!==a);i.push(c)}}return t.nodes().forEach((function(t){Cf.has(r,t)||o(t)})),i};var If=nf,Nf=Tf,Rf=function(t){return If.filter(Nf(t),(function(n){return n.length>1||1===n.length&&t.hasEdge(n[0],n[0])}))};var zf=function(t,n,e){return function(t,n,e){var r={},i=t.nodes();return i.forEach((function(t){r[t]={},r[t][t]={distance:0},i.forEach((function(n){t!==n&&(r[t][n]={distance:Number.POSITIVE_INFINITY})})),e(t).forEach((function(e){var i=e.v===t?e.w:e.v,o=n(e);r[t][i]={distance:o,predecessor:t}}))})),i.forEach((function(t){var n=r[t];i.forEach((function(e){var o=r[e];i.forEach((function(e){var r=o[t],i=n[e],u=o[e],s=r.distance+i.distance;s<u.distance&&(u.distance=s,u.predecessor=i.predecessor)}))}))})),r}(t,n||Pf,e||function(n){return t.outEdges(n)})},Pf=nf.constant(1);var Df=nf,Lf=Ff;function Ff(t){var n={},e={},r=[];if(Df.each(t.sinks(),(function i(o){if(Df.has(e,o))throw new Bf;Df.has(n,o)||(e[o]=!0,n[o]=!0,Df.each(t.predecessors(o),i),delete e[o],r.push(o))})),Df.size(n)!==t.nodeCount())throw new Bf;return r}function Bf(){}Ff.CycleException=Bf,Bf.prototype=new Error;var $f=Lf;var Vf=nf,Xf=function(t,n,e){Vf.isArray(n)||(n=[n]);var r=(t.isDirected()?t.successors:t.neighbors).bind(t),i=[],o={};return Vf.each(n,(function(n){if(!t.hasNode(n))throw new Error("Graph does not have node: "+n);Yf(t,n,"post"===e,o,r,i)})),i};function Yf(t,n,e,r,i,o){Vf.has(r,n)||(r[n]=!0,e||o.push(n),Vf.each(i(n),(function(n){Yf(t,n,e,r,i,o)})),e&&o.push(n))}var Uf=Xf;var qf=Xf;var Wf=nf,Gf=rf,Zf=xf;var Hf={Graph:df.Graph,json:gf,alg:{components:wf,dijkstra:Af,dijkstraAll:kf,findCycles:Rf,floydWarshall:zf,isAcyclic:function(t){try{$f(t)}catch(Bl){if(Bl instanceof $f.CycleException)return!1;throw Bl}return!0},postorder:function(t,n){return Uf(t,n,"post")},preorder:function(t,n){return qf(t,n,"pre")},prim:function(t,n){var e,r=new Gf,i={},o=new Zf;function u(t){var r=t.v===e?t.w:t.v,u=o.priority(r);if(void 0!==u){var s=n(t);s<u&&(i[r]=e,o.decrease(r,s))}}if(0===t.nodeCount())return r;Wf.each(t.nodes(),(function(t){o.add(t,Number.POSITIVE_INFINITY),r.setNode(t)})),o.decrease(t.nodes()[0],0);var s=!1;for(;o.size()>0;){if(e=o.removeMin(),Wf.has(i,e))r.setEdge(e,i[e]);else{if(s)throw new Error("Input graph is not connected: "+t);s=!0}t.nodeEdges(e).forEach(u)}return r},tarjan:Tf,topsort:Lf},version:df.version};var Qf,Jf,Kf={exports:{}};
1
+ !function(t,n){"object"==typeof exports&&"undefined"!=typeof module?module.exports=n():"function"==typeof define&&define.amd?define(n):(t="undefined"!=typeof globalThis?globalThis:t||self).ApexSankey=n()}(this,(function(){"use strict";class t{constructor(t,n="apex"){this.canvas=t,this.prefix=n}getSvgString(){return this.canvas.svg().replace(/(<img [\w\W]+?)(>)/g,"$1 />").replace(/(<br)(>)/g,"$1 />").replace(/(<hr)(>)/g,"$1 />")}svgUrl(){const t=this.getSvgString(),n=new Blob([t],{type:"image/svg+xml;charset=utf-8"});return URL.createObjectURL(n)}triggerDownload(t,n){const e=document.createElement("a");e.href=t,e.download=n,document.body.appendChild(e),e.click(),document.body.removeChild(e)}exportToSVG(){this.triggerDownload(this.svgUrl(),`${this.prefix}-${(new Date).getTime()}.svg`)}}var n="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{};function e(t){return t&&t.__esModule&&Object.prototype.hasOwnProperty.call(t,"default")?t.default:t}var r,i,o={exports:{}};
2
2
  /**
3
3
  * @license
4
4
  * Lodash <https://lodash.com/>
@@ -6,4 +6,12 @@
6
6
  * Released under MIT license <https://lodash.com/license>
7
7
  * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
8
8
  * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
9
- */Qf=Kf,Jf=Kf.exports,function(){var t,n="Expected a function",e="__lodash_hash_undefined__",r="__lodash_placeholder__",i=16,o=32,u=64,s=128,a=256,c=1/0,h=9007199254740991,f=NaN,l=4294967295,d=[["ary",s],["bind",1],["bindKey",2],["curry",8],["curryRight",i],["flip",512],["partial",o],["partialRight",u],["rearg",a]],p="[object Arguments]",v="[object Array]",g="[object Boolean]",y="[object Date]",_="[object Error]",m="[object Function]",w="[object GeneratorFunction]",b="[object Map]",x="[object Number]",E="[object Object]",j="[object Promise]",A="[object RegExp]",O="[object Set]",M="[object String]",S="[object Symbol]",k="[object WeakMap]",C="[object ArrayBuffer]",T="[object DataView]",I="[object Float32Array]",N="[object Float64Array]",R="[object Int8Array]",z="[object Int16Array]",P="[object Int32Array]",D="[object Uint8Array]",L="[object Uint8ClampedArray]",F="[object Uint16Array]",B="[object Uint32Array]",$=/\b__p \+= '';/g,V=/\b(__p \+=) '' \+/g,X=/(__e\(.*?\)|\b__t\)) \+\n'';/g,Y=/&(?:amp|lt|gt|quot|#39);/g,U=/[&<>"']/g,q=RegExp(Y.source),W=RegExp(U.source),G=/<%-([\s\S]+?)%>/g,Z=/<%([\s\S]+?)%>/g,H=/<%=([\s\S]+?)%>/g,Q=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,J=/^\w*$/,K=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,tt=/[\\^$.*+?()[\]{}|]/g,nt=RegExp(tt.source),et=/^\s+/,rt=/\s/,it=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,ot=/\{\n\/\* \[wrapped with (.+)\] \*/,ut=/,? & /,st=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,at=/[()=,{}\[\]\/\s]/,ct=/\\(\\)?/g,ht=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,ft=/\w*$/,lt=/^[-+]0x[0-9a-f]+$/i,dt=/^0b[01]+$/i,pt=/^\[object .+?Constructor\]$/,vt=/^0o[0-7]+$/i,gt=/^(?:0|[1-9]\d*)$/,yt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,_t=/($^)/,mt=/['\n\r\u2028\u2029\\]/g,wt="\\ud800-\\udfff",bt="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",xt="\\u2700-\\u27bf",Et="a-z\\xdf-\\xf6\\xf8-\\xff",jt="A-Z\\xc0-\\xd6\\xd8-\\xde",At="\\ufe0e\\ufe0f",Ot="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Mt="['’]",St="["+wt+"]",kt="["+Ot+"]",Ct="["+bt+"]",Tt="\\d+",It="["+xt+"]",Nt="["+Et+"]",Rt="[^"+wt+Ot+Tt+xt+Et+jt+"]",zt="\\ud83c[\\udffb-\\udfff]",Pt="[^"+wt+"]",Dt="(?:\\ud83c[\\udde6-\\uddff]){2}",Lt="[\\ud800-\\udbff][\\udc00-\\udfff]",Ft="["+jt+"]",Bt="\\u200d",$t="(?:"+Nt+"|"+Rt+")",Vt="(?:"+Ft+"|"+Rt+")",Xt="(?:['’](?:d|ll|m|re|s|t|ve))?",Yt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Ut="(?:"+Ct+"|"+zt+")?",qt="["+At+"]?",Wt=qt+Ut+"(?:"+Bt+"(?:"+[Pt,Dt,Lt].join("|")+")"+qt+Ut+")*",Gt="(?:"+[It,Dt,Lt].join("|")+")"+Wt,Zt="(?:"+[Pt+Ct+"?",Ct,Dt,Lt,St].join("|")+")",Ht=RegExp(Mt,"g"),Qt=RegExp(Ct,"g"),Jt=RegExp(zt+"(?="+zt+")|"+Zt+Wt,"g"),Kt=RegExp([Ft+"?"+Nt+"+"+Xt+"(?="+[kt,Ft,"$"].join("|")+")",Vt+"+"+Yt+"(?="+[kt,Ft+$t,"$"].join("|")+")",Ft+"?"+$t+"+"+Xt,Ft+"+"+Yt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",Tt,Gt].join("|"),"g"),tn=RegExp("["+Bt+wt+bt+At+"]"),nn=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,en=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],rn=-1,on={};on[I]=on[N]=on[R]=on[z]=on[P]=on[D]=on[L]=on[F]=on[B]=!0,on[p]=on[v]=on[C]=on[g]=on[T]=on[y]=on[_]=on[m]=on[b]=on[x]=on[E]=on[A]=on[O]=on[M]=on[k]=!1;var un={};un[p]=un[v]=un[C]=un[T]=un[g]=un[y]=un[I]=un[N]=un[R]=un[z]=un[P]=un[b]=un[x]=un[E]=un[A]=un[O]=un[M]=un[S]=un[D]=un[L]=un[F]=un[B]=!0,un[_]=un[m]=un[k]=!1;var sn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},an=parseFloat,cn=parseInt,hn="object"==typeof ni&&ni&&ni.Object===Object&&ni,fn="object"==typeof self&&self&&self.Object===Object&&self,ln=hn||fn||Function("return this")(),dn=Jf&&!Jf.nodeType&&Jf,pn=dn&&Qf&&!Qf.nodeType&&Qf,vn=pn&&pn.exports===dn,gn=vn&&hn.process,yn=function(){try{var t=pn&&pn.require&&pn.require("util").types;return t||gn&&gn.binding&&gn.binding("util")}catch(Bl){}}(),_n=yn&&yn.isArrayBuffer,mn=yn&&yn.isDate,wn=yn&&yn.isMap,bn=yn&&yn.isRegExp,xn=yn&&yn.isSet,En=yn&&yn.isTypedArray;function jn(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}function An(t,n,e,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var u=t[i];n(r,u,e(u),t)}return r}function On(t,n){for(var e=-1,r=null==t?0:t.length;++e<r&&!1!==n(t[e],e,t););return t}function Mn(t,n){for(var e=null==t?0:t.length;e--&&!1!==n(t[e],e,t););return t}function Sn(t,n){for(var e=-1,r=null==t?0:t.length;++e<r;)if(!n(t[e],e,t))return!1;return!0}function kn(t,n){for(var e=-1,r=null==t?0:t.length,i=0,o=[];++e<r;){var u=t[e];n(u,e,t)&&(o[i++]=u)}return o}function Cn(t,n){return!(null==t||!t.length)&&Bn(t,n,0)>-1}function Tn(t,n,e){for(var r=-1,i=null==t?0:t.length;++r<i;)if(e(n,t[r]))return!0;return!1}function In(t,n){for(var e=-1,r=null==t?0:t.length,i=Array(r);++e<r;)i[e]=n(t[e],e,t);return i}function Nn(t,n){for(var e=-1,r=n.length,i=t.length;++e<r;)t[i+e]=n[e];return t}function Rn(t,n,e,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(e=t[++i]);++i<o;)e=n(e,t[i],i,t);return e}function zn(t,n,e,r){var i=null==t?0:t.length;for(r&&i&&(e=t[--i]);i--;)e=n(e,t[i],i,t);return e}function Pn(t,n){for(var e=-1,r=null==t?0:t.length;++e<r;)if(n(t[e],e,t))return!0;return!1}var Dn=Yn("length");function Ln(t,n,e){var r;return e(t,(function(t,e,i){if(n(t,e,i))return r=e,!1})),r}function Fn(t,n,e,r){for(var i=t.length,o=e+(r?1:-1);r?o--:++o<i;)if(n(t[o],o,t))return o;return-1}function Bn(t,n,e){return n==n?function(t,n,e){for(var r=e-1,i=t.length;++r<i;)if(t[r]===n)return r;return-1}(t,n,e):Fn(t,Vn,e)}function $n(t,n,e,r){for(var i=e-1,o=t.length;++i<o;)if(r(t[i],n))return i;return-1}function Vn(t){return t!=t}function Xn(t,n){var e=null==t?0:t.length;return e?Wn(t,n)/e:f}function Yn(n){return function(e){return null==e?t:e[n]}}function Un(n){return function(e){return null==n?t:n[e]}}function qn(t,n,e,r,i){return i(t,(function(t,i,o){e=r?(r=!1,t):n(e,t,i,o)})),e}function Wn(n,e){for(var r,i=-1,o=n.length;++i<o;){var u=e(n[i]);u!==t&&(r=r===t?u:r+u)}return r}function Gn(t,n){for(var e=-1,r=Array(t);++e<t;)r[e]=n(e);return r}function Zn(t){return t?t.slice(0,fe(t)+1).replace(et,""):t}function Hn(t){return function(n){return t(n)}}function Qn(t,n){return In(n,(function(n){return t[n]}))}function Jn(t,n){return t.has(n)}function Kn(t,n){for(var e=-1,r=t.length;++e<r&&Bn(n,t[e],0)>-1;);return e}function te(t,n){for(var e=t.length;e--&&Bn(n,t[e],0)>-1;);return e}var ne=Un({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),ee=Un({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function re(t){return"\\"+sn[t]}function ie(t){return tn.test(t)}function oe(t){var n=-1,e=Array(t.size);return t.forEach((function(t,r){e[++n]=[r,t]})),e}function ue(t,n){return function(e){return t(n(e))}}function se(t,n){for(var e=-1,i=t.length,o=0,u=[];++e<i;){var s=t[e];s!==n&&s!==r||(t[e]=r,u[o++]=e)}return u}function ae(t){var n=-1,e=Array(t.size);return t.forEach((function(t){e[++n]=t})),e}function ce(t){return ie(t)?function(t){for(var n=Jt.lastIndex=0;Jt.test(t);)++n;return n}(t):Dn(t)}function he(t){return ie(t)?function(t){return t.match(Jt)||[]}(t):function(t){return t.split("")}(t)}function fe(t){for(var n=t.length;n--&&rt.test(t.charAt(n)););return n}var le=Un({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),de=function rt(wt){var bt,xt=(wt=null==wt?ln:de.defaults(ln.Object(),wt,de.pick(ln,en))).Array,Et=wt.Date,jt=wt.Error,At=wt.Function,Ot=wt.Math,Mt=wt.Object,St=wt.RegExp,kt=wt.String,Ct=wt.TypeError,Tt=xt.prototype,It=At.prototype,Nt=Mt.prototype,Rt=wt["__core-js_shared__"],zt=It.toString,Pt=Nt.hasOwnProperty,Dt=0,Lt=(bt=/[^.]+$/.exec(Rt&&Rt.keys&&Rt.keys.IE_PROTO||""))?"Symbol(src)_1."+bt:"",Ft=Nt.toString,Bt=zt.call(Mt),$t=ln._,Vt=St("^"+zt.call(Pt).replace(tt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Xt=vn?wt.Buffer:t,Yt=wt.Symbol,Ut=wt.Uint8Array,qt=Xt?Xt.allocUnsafe:t,Wt=ue(Mt.getPrototypeOf,Mt),Gt=Mt.create,Zt=Nt.propertyIsEnumerable,Jt=Tt.splice,tn=Yt?Yt.isConcatSpreadable:t,sn=Yt?Yt.iterator:t,hn=Yt?Yt.toStringTag:t,fn=function(){try{var t=fo(Mt,"defineProperty");return t({},"",{}),t}catch(Bl){}}(),dn=wt.clearTimeout!==ln.clearTimeout&&wt.clearTimeout,pn=Et&&Et.now!==ln.Date.now&&Et.now,gn=wt.setTimeout!==ln.setTimeout&&wt.setTimeout,yn=Ot.ceil,Dn=Ot.floor,Un=Mt.getOwnPropertySymbols,pe=Xt?Xt.isBuffer:t,ve=wt.isFinite,ge=Tt.join,ye=ue(Mt.keys,Mt),_e=Ot.max,me=Ot.min,we=Et.now,be=wt.parseInt,xe=Ot.random,Ee=Tt.reverse,je=fo(wt,"DataView"),Ae=fo(wt,"Map"),Oe=fo(wt,"Promise"),Me=fo(wt,"Set"),Se=fo(wt,"WeakMap"),ke=fo(Mt,"create"),Ce=Se&&new Se,Te={},Ie=$o(je),Ne=$o(Ae),Re=$o(Oe),ze=$o(Me),Pe=$o(Se),De=Yt?Yt.prototype:t,Le=De?De.valueOf:t,Fe=De?De.toString:t;function Be(t){if(is(t)&&!Wu(t)&&!(t instanceof Ye)){if(t instanceof Xe)return t;if(Pt.call(t,"__wrapped__"))return Vo(t)}return new Xe(t)}var $e=function(){function n(){}return function(e){if(!rs(e))return{};if(Gt)return Gt(e);n.prototype=e;var r=new n;return n.prototype=t,r}}();function Ve(){}function Xe(n,e){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=t}function Ye(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=l,this.__views__=[]}function Ue(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function qe(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function We(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function Ge(t){var n=-1,e=null==t?0:t.length;for(this.__data__=new We;++n<e;)this.add(t[n])}function Ze(t){var n=this.__data__=new qe(t);this.size=n.size}function He(t,n){var e=Wu(t),r=!e&&qu(t),i=!e&&!r&&Qu(t),o=!e&&!r&&!i&&ls(t),u=e||r||i||o,s=u?Gn(t.length,kt):[],a=s.length;for(var c in t)!n&&!Pt.call(t,c)||u&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||mo(c,a))||s.push(c);return s}function Qe(n){var e=n.length;return e?n[Gr(0,e-1)]:t}function Je(t,n){return zo(ki(t),sr(n,0,t.length))}function Ke(t){return zo(ki(t))}function tr(n,e,r){(r!==t&&!Xu(n[e],r)||r===t&&!(e in n))&&or(n,e,r)}function nr(n,e,r){var i=n[e];Pt.call(n,e)&&Xu(i,r)&&(r!==t||e in n)||or(n,e,r)}function er(t,n){for(var e=t.length;e--;)if(Xu(t[e][0],n))return e;return-1}function rr(t,n,e,r){return lr(t,(function(t,i,o){n(r,t,e(t),o)})),r}function ir(t,n){return t&&Ci(n,Rs(n),t)}function or(t,n,e){"__proto__"==n&&fn?fn(t,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[n]=e}function ur(n,e){for(var r=-1,i=e.length,o=xt(i),u=null==n;++r<i;)o[r]=u?t:ks(n,e[r]);return o}function sr(n,e,r){return n==n&&(r!==t&&(n=n<=r?n:r),e!==t&&(n=n>=e?n:e)),n}function ar(n,e,r,i,o,u){var s,a=1&e,c=2&e,h=4&e;if(r&&(s=o?r(n,i,o,u):r(n)),s!==t)return s;if(!rs(n))return n;var f=Wu(n);if(f){if(s=function(t){var n=t.length,e=new t.constructor(n);return n&&"string"==typeof t[0]&&Pt.call(t,"index")&&(e.index=t.index,e.input=t.input),e}(n),!a)return ki(n,s)}else{var l=vo(n),d=l==m||l==w;if(Qu(n))return Ei(n,a);if(l==E||l==p||d&&!o){if(s=c||d?{}:yo(n),!a)return c?function(t,n){return Ci(t,po(t),n)}(n,function(t,n){return t&&Ci(n,zs(n),t)}(s,n)):function(t,n){return Ci(t,lo(t),n)}(n,ir(s,n))}else{if(!un[l])return o?n:{};s=function(t,n,e){var r,i=t.constructor;switch(n){case C:return ji(t);case g:case y:return new i(+t);case T:return function(t,n){var e=n?ji(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}(t,e);case I:case N:case R:case z:case P:case D:case L:case F:case B:return Ai(t,e);case b:return new i;case x:case M:return new i(t);case A:return function(t){var n=new t.constructor(t.source,ft.exec(t));return n.lastIndex=t.lastIndex,n}(t);case O:return new i;case S:return r=t,Le?Mt(Le.call(r)):{}}}(n,l,a)}}u||(u=new Ze);var v=u.get(n);if(v)return v;u.set(n,s),cs(n)?n.forEach((function(t){s.add(ar(t,e,r,t,n,u))})):os(n)&&n.forEach((function(t,i){s.set(i,ar(t,e,r,i,n,u))}));var _=f?t:(h?c?io:ro:c?zs:Rs)(n);return On(_||n,(function(t,i){_&&(t=n[i=t]),nr(s,i,ar(t,e,r,i,n,u))})),s}function cr(n,e,r){var i=r.length;if(null==n)return!i;for(n=Mt(n);i--;){var o=r[i],u=e[o],s=n[o];if(s===t&&!(o in n)||!u(s))return!1}return!0}function hr(e,r,i){if("function"!=typeof e)throw new Ct(n);return To((function(){e.apply(t,i)}),r)}function fr(t,n,e,r){var i=-1,o=Cn,u=!0,s=t.length,a=[],c=n.length;if(!s)return a;e&&(n=In(n,Hn(e))),r?(o=Tn,u=!1):n.length>=200&&(o=Jn,u=!1,n=new Ge(n));t:for(;++i<s;){var h=t[i],f=null==e?h:e(h);if(h=r||0!==h?h:0,u&&f==f){for(var l=c;l--;)if(n[l]===f)continue t;a.push(h)}else o(n,f,r)||a.push(h)}return a}Be.templateSettings={escape:G,evaluate:Z,interpolate:H,variable:"",imports:{_:Be}},Be.prototype=Ve.prototype,Be.prototype.constructor=Be,Xe.prototype=$e(Ve.prototype),Xe.prototype.constructor=Xe,Ye.prototype=$e(Ve.prototype),Ye.prototype.constructor=Ye,Ue.prototype.clear=function(){this.__data__=ke?ke(null):{},this.size=0},Ue.prototype.delete=function(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n},Ue.prototype.get=function(n){var r=this.__data__;if(ke){var i=r[n];return i===e?t:i}return Pt.call(r,n)?r[n]:t},Ue.prototype.has=function(n){var e=this.__data__;return ke?e[n]!==t:Pt.call(e,n)},Ue.prototype.set=function(n,r){var i=this.__data__;return this.size+=this.has(n)?0:1,i[n]=ke&&r===t?e:r,this},qe.prototype.clear=function(){this.__data__=[],this.size=0},qe.prototype.delete=function(t){var n=this.__data__,e=er(n,t);return!(e<0||(e==n.length-1?n.pop():Jt.call(n,e,1),--this.size,0))},qe.prototype.get=function(n){var e=this.__data__,r=er(e,n);return r<0?t:e[r][1]},qe.prototype.has=function(t){return er(this.__data__,t)>-1},qe.prototype.set=function(t,n){var e=this.__data__,r=er(e,t);return r<0?(++this.size,e.push([t,n])):e[r][1]=n,this},We.prototype.clear=function(){this.size=0,this.__data__={hash:new Ue,map:new(Ae||qe),string:new Ue}},We.prototype.delete=function(t){var n=co(this,t).delete(t);return this.size-=n?1:0,n},We.prototype.get=function(t){return co(this,t).get(t)},We.prototype.has=function(t){return co(this,t).has(t)},We.prototype.set=function(t,n){var e=co(this,t),r=e.size;return e.set(t,n),this.size+=e.size==r?0:1,this},Ge.prototype.add=Ge.prototype.push=function(t){return this.__data__.set(t,e),this},Ge.prototype.has=function(t){return this.__data__.has(t)},Ze.prototype.clear=function(){this.__data__=new qe,this.size=0},Ze.prototype.delete=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e},Ze.prototype.get=function(t){return this.__data__.get(t)},Ze.prototype.has=function(t){return this.__data__.has(t)},Ze.prototype.set=function(t,n){var e=this.__data__;if(e instanceof qe){var r=e.__data__;if(!Ae||r.length<199)return r.push([t,n]),this.size=++e.size,this;e=this.__data__=new We(r)}return e.set(t,n),this.size=e.size,this};var lr=Ni(wr),dr=Ni(br,!0);function pr(t,n){var e=!0;return lr(t,(function(t,r,i){return e=!!n(t,r,i)})),e}function vr(n,e,r){for(var i=-1,o=n.length;++i<o;){var u=n[i],s=e(u);if(null!=s&&(a===t?s==s&&!fs(s):r(s,a)))var a=s,c=u}return c}function gr(t,n){var e=[];return lr(t,(function(t,r,i){n(t,r,i)&&e.push(t)})),e}function yr(t,n,e,r,i){var o=-1,u=t.length;for(e||(e=_o),i||(i=[]);++o<u;){var s=t[o];n>0&&e(s)?n>1?yr(s,n-1,e,r,i):Nn(i,s):r||(i[i.length]=s)}return i}var _r=Ri(),mr=Ri(!0);function wr(t,n){return t&&_r(t,n,Rs)}function br(t,n){return t&&mr(t,n,Rs)}function xr(t,n){return kn(n,(function(n){return ts(t[n])}))}function Er(n,e){for(var r=0,i=(e=mi(e,n)).length;null!=n&&r<i;)n=n[Bo(e[r++])];return r&&r==i?n:t}function jr(t,n,e){var r=n(t);return Wu(t)?r:Nn(r,e(t))}function Ar(n){return null==n?n===t?"[object Undefined]":"[object Null]":hn&&hn in Mt(n)?function(n){var e=Pt.call(n,hn),r=n[hn];try{n[hn]=t;var i=!0}catch(Bl){}var o=Ft.call(n);return i&&(e?n[hn]=r:delete n[hn]),o}(n):function(t){return Ft.call(t)}(n)}function Or(t,n){return t>n}function Mr(t,n){return null!=t&&Pt.call(t,n)}function Sr(t,n){return null!=t&&n in Mt(t)}function kr(n,e,r){for(var i=r?Tn:Cn,o=n[0].length,u=n.length,s=u,a=xt(u),c=1/0,h=[];s--;){var f=n[s];s&&e&&(f=In(f,Hn(e))),c=me(f.length,c),a[s]=!r&&(e||o>=120&&f.length>=120)?new Ge(s&&f):t}f=n[0];var l=-1,d=a[0];t:for(;++l<o&&h.length<c;){var p=f[l],v=e?e(p):p;if(p=r||0!==p?p:0,!(d?Jn(d,v):i(h,v,r))){for(s=u;--s;){var g=a[s];if(!(g?Jn(g,v):i(n[s],v,r)))continue t}d&&d.push(v),h.push(p)}}return h}function Cr(n,e,r){var i=null==(n=So(n,e=mi(e,n)))?n:n[Bo(Ko(e))];return null==i?t:jn(i,n,r)}function Tr(t){return is(t)&&Ar(t)==p}function Ir(n,e,r,i,o){return n===e||(null==n||null==e||!is(n)&&!is(e)?n!=n&&e!=e:function(n,e,r,i,o,u){var s=Wu(n),a=Wu(e),c=s?v:vo(n),h=a?v:vo(e),f=(c=c==p?E:c)==E,l=(h=h==p?E:h)==E,d=c==h;if(d&&Qu(n)){if(!Qu(e))return!1;s=!0,f=!1}if(d&&!f)return u||(u=new Ze),s||ls(n)?no(n,e,r,i,o,u):function(t,n,e,r,i,o,u){switch(e){case T:if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case C:return!(t.byteLength!=n.byteLength||!o(new Ut(t),new Ut(n)));case g:case y:case x:return Xu(+t,+n);case _:return t.name==n.name&&t.message==n.message;case A:case M:return t==n+"";case b:var s=oe;case O:var a=1&r;if(s||(s=ae),t.size!=n.size&&!a)return!1;var c=u.get(t);if(c)return c==n;r|=2,u.set(t,n);var h=no(s(t),s(n),r,i,o,u);return u.delete(t),h;case S:if(Le)return Le.call(t)==Le.call(n)}return!1}(n,e,c,r,i,o,u);if(!(1&r)){var m=f&&Pt.call(n,"__wrapped__"),w=l&&Pt.call(e,"__wrapped__");if(m||w){var j=m?n.value():n,k=w?e.value():e;return u||(u=new Ze),o(j,k,r,i,u)}}return!!d&&(u||(u=new Ze),function(n,e,r,i,o,u){var s=1&r,a=ro(n),c=a.length,h=ro(e),f=h.length;if(c!=f&&!s)return!1;for(var l=c;l--;){var d=a[l];if(!(s?d in e:Pt.call(e,d)))return!1}var p=u.get(n),v=u.get(e);if(p&&v)return p==e&&v==n;var g=!0;u.set(n,e),u.set(e,n);for(var y=s;++l<c;){var _=n[d=a[l]],m=e[d];if(i)var w=s?i(m,_,d,e,n,u):i(_,m,d,n,e,u);if(!(w===t?_===m||o(_,m,r,i,u):w)){g=!1;break}y||(y="constructor"==d)}if(g&&!y){var b=n.constructor,x=e.constructor;b==x||!("constructor"in n)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof x&&x instanceof x||(g=!1)}return u.delete(n),u.delete(e),g}(n,e,r,i,o,u))}(n,e,r,i,Ir,o))}function Nr(n,e,r,i){var o=r.length,u=o,s=!i;if(null==n)return!u;for(n=Mt(n);o--;){var a=r[o];if(s&&a[2]?a[1]!==n[a[0]]:!(a[0]in n))return!1}for(;++o<u;){var c=(a=r[o])[0],h=n[c],f=a[1];if(s&&a[2]){if(h===t&&!(c in n))return!1}else{var l=new Ze;if(i)var d=i(h,f,c,n,e,l);if(!(d===t?Ir(f,h,3,i,l):d))return!1}}return!0}function Rr(t){return!(!rs(t)||(n=t,Lt&&Lt in n))&&(ts(t)?Vt:pt).test($o(t));var n}function zr(t){return"function"==typeof t?t:null==t?ua:"object"==typeof t?Wu(t)?$r(t[0],t[1]):Br(t):va(t)}function Pr(t){if(!jo(t))return ye(t);var n=[];for(var e in Mt(t))Pt.call(t,e)&&"constructor"!=e&&n.push(e);return n}function Dr(t){if(!rs(t))return function(t){var n=[];if(null!=t)for(var e in Mt(t))n.push(e);return n}(t);var n=jo(t),e=[];for(var r in t)("constructor"!=r||!n&&Pt.call(t,r))&&e.push(r);return e}function Lr(t,n){return t<n}function Fr(t,n){var e=-1,r=Zu(t)?xt(t.length):[];return lr(t,(function(t,i,o){r[++e]=n(t,i,o)})),r}function Br(t){var n=ho(t);return 1==n.length&&n[0][2]?Oo(n[0][0],n[0][1]):function(e){return e===t||Nr(e,t,n)}}function $r(n,e){return bo(n)&&Ao(e)?Oo(Bo(n),e):function(r){var i=ks(r,n);return i===t&&i===e?Cs(r,n):Ir(e,i,3)}}function Vr(n,e,r,i,o){n!==e&&_r(e,(function(u,s){if(o||(o=new Ze),rs(u))!function(n,e,r,i,o,u,s){var a=ko(n,r),c=ko(e,r),h=s.get(c);if(h)tr(n,r,h);else{var f=u?u(a,c,r+"",n,e,s):t,l=f===t;if(l){var d=Wu(c),p=!d&&Qu(c),v=!d&&!p&&ls(c);f=c,d||p||v?Wu(a)?f=a:Hu(a)?f=ki(a):p?(l=!1,f=Ei(c,!0)):v?(l=!1,f=Ai(c,!0)):f=[]:ss(c)||qu(c)?(f=a,qu(a)?f=ws(a):rs(a)&&!ts(a)||(f=yo(c))):l=!1}l&&(s.set(c,f),o(f,c,i,u,s),s.delete(c)),tr(n,r,f)}}(n,e,s,r,Vr,i,o);else{var a=i?i(ko(n,s),u,s+"",n,e,o):t;a===t&&(a=u),tr(n,s,a)}}),zs)}function Xr(n,e){var r=n.length;if(r)return mo(e+=e<0?r:0,r)?n[e]:t}function Yr(t,n,e){n=n.length?In(n,(function(t){return Wu(t)?function(n){return Er(n,1===t.length?t[0]:t)}:t})):[ua];var r=-1;return n=In(n,Hn(ao())),function(t,n){var e=t.length;for(t.sort(n);e--;)t[e]=t[e].value;return t}(Fr(t,(function(t,e,i){return{criteria:In(n,(function(n){return n(t)})),index:++r,value:t}})),(function(t,n){return function(t,n,e){for(var r=-1,i=t.criteria,o=n.criteria,u=i.length,s=e.length;++r<u;){var a=Oi(i[r],o[r]);if(a)return r>=s?a:a*("desc"==e[r]?-1:1)}return t.index-n.index}(t,n,e)}))}function Ur(t,n,e){for(var r=-1,i=n.length,o={};++r<i;){var u=n[r],s=Er(t,u);e(s,u)&&Kr(o,mi(u,t),s)}return o}function qr(t,n,e,r){var i=r?$n:Bn,o=-1,u=n.length,s=t;for(t===n&&(n=ki(n)),e&&(s=In(t,Hn(e)));++o<u;)for(var a=0,c=n[o],h=e?e(c):c;(a=i(s,h,a,r))>-1;)s!==t&&Jt.call(s,a,1),Jt.call(t,a,1);return t}function Wr(t,n){for(var e=t?n.length:0,r=e-1;e--;){var i=n[e];if(e==r||i!==o){var o=i;mo(i)?Jt.call(t,i,1):fi(t,i)}}return t}function Gr(t,n){return t+Dn(xe()*(n-t+1))}function Zr(t,n){var e="";if(!t||n<1||n>h)return e;do{n%2&&(e+=t),(n=Dn(n/2))&&(t+=t)}while(n);return e}function Hr(t,n){return Io(Mo(t,n,ua),t+"")}function Qr(t){return Qe(Xs(t))}function Jr(t,n){var e=Xs(t);return zo(e,sr(n,0,e.length))}function Kr(n,e,r,i){if(!rs(n))return n;for(var o=-1,u=(e=mi(e,n)).length,s=u-1,a=n;null!=a&&++o<u;){var c=Bo(e[o]),h=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return n;if(o!=s){var f=a[c];(h=i?i(f,c,a):t)===t&&(h=rs(f)?f:mo(e[o+1])?[]:{})}nr(a,c,h),a=a[c]}return n}var ti=Ce?function(t,n){return Ce.set(t,n),t}:ua,ni=fn?function(t,n){return fn(t,"toString",{configurable:!0,enumerable:!1,value:ra(n),writable:!0})}:ua;function ei(t){return zo(Xs(t))}function ri(t,n,e){var r=-1,i=t.length;n<0&&(n=-n>i?0:i+n),(e=e>i?i:e)<0&&(e+=i),i=n>e?0:e-n>>>0,n>>>=0;for(var o=xt(i);++r<i;)o[r]=t[r+n];return o}function ii(t,n){var e;return lr(t,(function(t,r,i){return!(e=n(t,r,i))})),!!e}function oi(t,n,e){var r=0,i=null==t?r:t.length;if("number"==typeof n&&n==n&&i<=2147483647){for(;r<i;){var o=r+i>>>1,u=t[o];null!==u&&!fs(u)&&(e?u<=n:u<n)?r=o+1:i=o}return i}return ui(t,n,ua,e)}function ui(n,e,r,i){var o=0,u=null==n?0:n.length;if(0===u)return 0;for(var s=(e=r(e))!=e,a=null===e,c=fs(e),h=e===t;o<u;){var f=Dn((o+u)/2),l=r(n[f]),d=l!==t,p=null===l,v=l==l,g=fs(l);if(s)var y=i||v;else y=h?v&&(i||d):a?v&&d&&(i||!p):c?v&&d&&!p&&(i||!g):!p&&!g&&(i?l<=e:l<e);y?o=f+1:u=f}return me(u,4294967294)}function si(t,n){for(var e=-1,r=t.length,i=0,o=[];++e<r;){var u=t[e],s=n?n(u):u;if(!e||!Xu(s,a)){var a=s;o[i++]=0===u?0:u}}return o}function ai(t){return"number"==typeof t?t:fs(t)?f:+t}function ci(t){if("string"==typeof t)return t;if(Wu(t))return In(t,ci)+"";if(fs(t))return Fe?Fe.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}function hi(t,n,e){var r=-1,i=Cn,o=t.length,u=!0,s=[],a=s;if(e)u=!1,i=Tn;else if(o>=200){var c=n?null:Zi(t);if(c)return ae(c);u=!1,i=Jn,a=new Ge}else a=n?[]:s;t:for(;++r<o;){var h=t[r],f=n?n(h):h;if(h=e||0!==h?h:0,u&&f==f){for(var l=a.length;l--;)if(a[l]===f)continue t;n&&a.push(f),s.push(h)}else i(a,f,e)||(a!==s&&a.push(f),s.push(h))}return s}function fi(t,n){return null==(t=So(t,n=mi(n,t)))||delete t[Bo(Ko(n))]}function li(t,n,e,r){return Kr(t,n,e(Er(t,n)),r)}function di(t,n,e,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&n(t[o],o,t););return e?ri(t,r?0:o,r?o+1:i):ri(t,r?o+1:0,r?i:o)}function pi(t,n){var e=t;return e instanceof Ye&&(e=e.value()),Rn(n,(function(t,n){return n.func.apply(n.thisArg,Nn([t],n.args))}),e)}function vi(t,n,e){var r=t.length;if(r<2)return r?hi(t[0]):[];for(var i=-1,o=xt(r);++i<r;)for(var u=t[i],s=-1;++s<r;)s!=i&&(o[i]=fr(o[i]||u,t[s],n,e));return hi(yr(o,1),n,e)}function gi(n,e,r){for(var i=-1,o=n.length,u=e.length,s={};++i<o;){var a=i<u?e[i]:t;r(s,n[i],a)}return s}function yi(t){return Hu(t)?t:[]}function _i(t){return"function"==typeof t?t:ua}function mi(t,n){return Wu(t)?t:bo(t,n)?[t]:Fo(bs(t))}var wi=Hr;function bi(n,e,r){var i=n.length;return r=r===t?i:r,!e&&r>=i?n:ri(n,e,r)}var xi=dn||function(t){return ln.clearTimeout(t)};function Ei(t,n){if(n)return t.slice();var e=t.length,r=qt?qt(e):new t.constructor(e);return t.copy(r),r}function ji(t){var n=new t.constructor(t.byteLength);return new Ut(n).set(new Ut(t)),n}function Ai(t,n){var e=n?ji(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}function Oi(n,e){if(n!==e){var r=n!==t,i=null===n,o=n==n,u=fs(n),s=e!==t,a=null===e,c=e==e,h=fs(e);if(!a&&!h&&!u&&n>e||u&&s&&c&&!a&&!h||i&&s&&c||!r&&c||!o)return 1;if(!i&&!u&&!h&&n<e||h&&r&&o&&!i&&!u||a&&r&&o||!s&&o||!c)return-1}return 0}function Mi(t,n,e,r){for(var i=-1,o=t.length,u=e.length,s=-1,a=n.length,c=_e(o-u,0),h=xt(a+c),f=!r;++s<a;)h[s]=n[s];for(;++i<u;)(f||i<o)&&(h[e[i]]=t[i]);for(;c--;)h[s++]=t[i++];return h}function Si(t,n,e,r){for(var i=-1,o=t.length,u=-1,s=e.length,a=-1,c=n.length,h=_e(o-s,0),f=xt(h+c),l=!r;++i<h;)f[i]=t[i];for(var d=i;++a<c;)f[d+a]=n[a];for(;++u<s;)(l||i<o)&&(f[d+e[u]]=t[i++]);return f}function ki(t,n){var e=-1,r=t.length;for(n||(n=xt(r));++e<r;)n[e]=t[e];return n}function Ci(n,e,r,i){var o=!r;r||(r={});for(var u=-1,s=e.length;++u<s;){var a=e[u],c=i?i(r[a],n[a],a,r,n):t;c===t&&(c=n[a]),o?or(r,a,c):nr(r,a,c)}return r}function Ti(t,n){return function(e,r){var i=Wu(e)?An:rr,o=n?n():{};return i(e,t,ao(r,2),o)}}function Ii(n){return Hr((function(e,r){var i=-1,o=r.length,u=o>1?r[o-1]:t,s=o>2?r[2]:t;for(u=n.length>3&&"function"==typeof u?(o--,u):t,s&&wo(r[0],r[1],s)&&(u=o<3?t:u,o=1),e=Mt(e);++i<o;){var a=r[i];a&&n(e,a,i,u)}return e}))}function Ni(t,n){return function(e,r){if(null==e)return e;if(!Zu(e))return t(e,r);for(var i=e.length,o=n?i:-1,u=Mt(e);(n?o--:++o<i)&&!1!==r(u[o],o,u););return e}}function Ri(t){return function(n,e,r){for(var i=-1,o=Mt(n),u=r(n),s=u.length;s--;){var a=u[t?s:++i];if(!1===e(o[a],a,o))break}return n}}function zi(n){return function(e){var r=ie(e=bs(e))?he(e):t,i=r?r[0]:e.charAt(0),o=r?bi(r,1).join(""):e.slice(1);return i[n]()+o}}function Pi(t){return function(n){return Rn(ta(qs(n).replace(Ht,"")),t,"")}}function Di(t){return function(){var n=arguments;switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3]);case 5:return new t(n[0],n[1],n[2],n[3],n[4]);case 6:return new t(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new t(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var e=$e(t.prototype),r=t.apply(e,n);return rs(r)?r:e}}function Li(n){return function(e,r,i){var o=Mt(e);if(!Zu(e)){var u=ao(r,3);e=Rs(e),r=function(t){return u(o[t],t,o)}}var s=n(e,r,i);return s>-1?o[u?e[s]:s]:t}}function Fi(e){return eo((function(r){var i=r.length,o=i,u=Xe.prototype.thru;for(e&&r.reverse();o--;){var s=r[o];if("function"!=typeof s)throw new Ct(n);if(u&&!a&&"wrapper"==uo(s))var a=new Xe([],!0)}for(o=a?o:i;++o<i;){var c=uo(s=r[o]),h="wrapper"==c?oo(s):t;a=h&&xo(h[0])&&424==h[1]&&!h[4].length&&1==h[9]?a[uo(h[0])].apply(a,h[3]):1==s.length&&xo(s)?a[c]():a.thru(s)}return function(){var t=arguments,n=t[0];if(a&&1==t.length&&Wu(n))return a.plant(n).value();for(var e=0,o=i?r[e].apply(this,t):n;++e<i;)o=r[e].call(this,o);return o}}))}function Bi(n,e,r,i,o,u,a,c,h,f){var l=e&s,d=1&e,p=2&e,v=24&e,g=512&e,y=p?t:Di(n);return function s(){for(var _=arguments.length,m=xt(_),w=_;w--;)m[w]=arguments[w];if(v)var b=so(s),x=function(t,n){for(var e=t.length,r=0;e--;)t[e]===n&&++r;return r}(m,b);if(i&&(m=Mi(m,i,o,v)),u&&(m=Si(m,u,a,v)),_-=x,v&&_<f){var E=se(m,b);return Wi(n,e,Bi,s.placeholder,r,m,E,c,h,f-_)}var j=d?r:this,A=p?j[n]:n;return _=m.length,c?m=function(n,e){for(var r=n.length,i=me(e.length,r),o=ki(n);i--;){var u=e[i];n[i]=mo(u,r)?o[u]:t}return n}(m,c):g&&_>1&&m.reverse(),l&&h<_&&(m.length=h),this&&this!==ln&&this instanceof s&&(A=y||Di(A)),A.apply(j,m)}}function $i(t,n){return function(e,r){return function(t,n,e,r){return wr(t,(function(t,i,o){n(r,e(t),i,o)})),r}(e,t,n(r),{})}}function Vi(n,e){return function(r,i){var o;if(r===t&&i===t)return e;if(r!==t&&(o=r),i!==t){if(o===t)return i;"string"==typeof r||"string"==typeof i?(r=ci(r),i=ci(i)):(r=ai(r),i=ai(i)),o=n(r,i)}return o}}function Xi(t){return eo((function(n){return n=In(n,Hn(ao())),Hr((function(e){var r=this;return t(n,(function(t){return jn(t,r,e)}))}))}))}function Yi(n,e){var r=(e=e===t?" ":ci(e)).length;if(r<2)return r?Zr(e,n):e;var i=Zr(e,yn(n/ce(e)));return ie(e)?bi(he(i),0,n).join(""):i.slice(0,n)}function Ui(n){return function(e,r,i){return i&&"number"!=typeof i&&wo(e,r,i)&&(r=i=t),e=gs(e),r===t?(r=e,e=0):r=gs(r),function(t,n,e,r){for(var i=-1,o=_e(yn((n-t)/(e||1)),0),u=xt(o);o--;)u[r?o:++i]=t,t+=e;return u}(e,r,i=i===t?e<r?1:-1:gs(i),n)}}function qi(t){return function(n,e){return"string"==typeof n&&"string"==typeof e||(n=ms(n),e=ms(e)),t(n,e)}}function Wi(n,e,r,i,s,a,c,h,f,l){var d=8&e;e|=d?o:u,4&(e&=~(d?u:o))||(e&=-4);var p=[n,e,s,d?a:t,d?c:t,d?t:a,d?t:c,h,f,l],v=r.apply(t,p);return xo(n)&&Co(v,p),v.placeholder=i,No(v,n,e)}function Gi(t){var n=Ot[t];return function(t,e){if(t=ms(t),(e=null==e?0:me(ys(e),292))&&ve(t)){var r=(bs(t)+"e").split("e");return+((r=(bs(n(r[0]+"e"+(+r[1]+e)))+"e").split("e"))[0]+"e"+(+r[1]-e))}return n(t)}}var Zi=Me&&1/ae(new Me([,-0]))[1]==c?function(t){return new Me(t)}:fa;function Hi(t){return function(n){var e=vo(n);return e==b?oe(n):e==O?function(t){var n=-1,e=Array(t.size);return t.forEach((function(t){e[++n]=[t,t]})),e}(n):function(t,n){return In(n,(function(n){return[n,t[n]]}))}(n,t(n))}}function Qi(e,c,h,f,l,d,p,v){var g=2&c;if(!g&&"function"!=typeof e)throw new Ct(n);var y=f?f.length:0;if(y||(c&=-97,f=l=t),p=p===t?p:_e(ys(p),0),v=v===t?v:ys(v),y-=l?l.length:0,c&u){var _=f,m=l;f=l=t}var w=g?t:oo(e),b=[e,c,h,f,l,_,m,d,p,v];if(w&&function(t,n){var e=t[1],i=n[1],o=e|i,u=o<131,c=i==s&&8==e||i==s&&e==a&&t[7].length<=n[8]||384==i&&n[7].length<=n[8]&&8==e;if(!u&&!c)return t;1&i&&(t[2]=n[2],o|=1&e?0:4);var h=n[3];if(h){var f=t[3];t[3]=f?Mi(f,h,n[4]):h,t[4]=f?se(t[3],r):n[4]}(h=n[5])&&(f=t[5],t[5]=f?Si(f,h,n[6]):h,t[6]=f?se(t[5],r):n[6]),(h=n[7])&&(t[7]=h),i&s&&(t[8]=null==t[8]?n[8]:me(t[8],n[8])),null==t[9]&&(t[9]=n[9]),t[0]=n[0],t[1]=o}(b,w),e=b[0],c=b[1],h=b[2],f=b[3],l=b[4],!(v=b[9]=b[9]===t?g?0:e.length:_e(b[9]-y,0))&&24&c&&(c&=-25),c&&1!=c)x=8==c||c==i?function(n,e,r){var i=Di(n);return function o(){for(var u=arguments.length,s=xt(u),a=u,c=so(o);a--;)s[a]=arguments[a];var h=u<3&&s[0]!==c&&s[u-1]!==c?[]:se(s,c);return(u-=h.length)<r?Wi(n,e,Bi,o.placeholder,t,s,h,t,t,r-u):jn(this&&this!==ln&&this instanceof o?i:n,this,s)}}(e,c,v):c!=o&&33!=c||l.length?Bi.apply(t,b):function(t,n,e,r){var i=1&n,o=Di(t);return function n(){for(var u=-1,s=arguments.length,a=-1,c=r.length,h=xt(c+s),f=this&&this!==ln&&this instanceof n?o:t;++a<c;)h[a]=r[a];for(;s--;)h[a++]=arguments[++u];return jn(f,i?e:this,h)}}(e,c,h,f);else var x=function(t,n,e){var r=1&n,i=Di(t);return function n(){return(this&&this!==ln&&this instanceof n?i:t).apply(r?e:this,arguments)}}(e,c,h);return No((w?ti:Co)(x,b),e,c)}function Ji(n,e,r,i){return n===t||Xu(n,Nt[r])&&!Pt.call(i,r)?e:n}function Ki(n,e,r,i,o,u){return rs(n)&&rs(e)&&(u.set(e,n),Vr(n,e,t,Ki,u),u.delete(e)),n}function to(n){return ss(n)?t:n}function no(n,e,r,i,o,u){var s=1&r,a=n.length,c=e.length;if(a!=c&&!(s&&c>a))return!1;var h=u.get(n),f=u.get(e);if(h&&f)return h==e&&f==n;var l=-1,d=!0,p=2&r?new Ge:t;for(u.set(n,e),u.set(e,n);++l<a;){var v=n[l],g=e[l];if(i)var y=s?i(g,v,l,e,n,u):i(v,g,l,n,e,u);if(y!==t){if(y)continue;d=!1;break}if(p){if(!Pn(e,(function(t,n){if(!Jn(p,n)&&(v===t||o(v,t,r,i,u)))return p.push(n)}))){d=!1;break}}else if(v!==g&&!o(v,g,r,i,u)){d=!1;break}}return u.delete(n),u.delete(e),d}function eo(n){return Io(Mo(n,t,Go),n+"")}function ro(t){return jr(t,Rs,lo)}function io(t){return jr(t,zs,po)}var oo=Ce?function(t){return Ce.get(t)}:fa;function uo(t){for(var n=t.name+"",e=Te[n],r=Pt.call(Te,n)?e.length:0;r--;){var i=e[r],o=i.func;if(null==o||o==t)return i.name}return n}function so(t){return(Pt.call(Be,"placeholder")?Be:t).placeholder}function ao(){var t=Be.iteratee||sa;return t=t===sa?zr:t,arguments.length?t(arguments[0],arguments[1]):t}function co(t,n){var e,r,i=t.__data__;return("string"==(r=typeof(e=n))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==e:null===e)?i["string"==typeof n?"string":"hash"]:i.map}function ho(t){for(var n=Rs(t),e=n.length;e--;){var r=n[e],i=t[r];n[e]=[r,i,Ao(i)]}return n}function fo(n,e){var r=function(n,e){return null==n?t:n[e]}(n,e);return Rr(r)?r:t}var lo=Un?function(t){return null==t?[]:(t=Mt(t),kn(Un(t),(function(n){return Zt.call(t,n)})))}:_a,po=Un?function(t){for(var n=[];t;)Nn(n,lo(t)),t=Wt(t);return n}:_a,vo=Ar;function go(t,n,e){for(var r=-1,i=(n=mi(n,t)).length,o=!1;++r<i;){var u=Bo(n[r]);if(!(o=null!=t&&e(t,u)))break;t=t[u]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&es(i)&&mo(u,i)&&(Wu(t)||qu(t))}function yo(t){return"function"!=typeof t.constructor||jo(t)?{}:$e(Wt(t))}function _o(t){return Wu(t)||qu(t)||!!(tn&&t&&t[tn])}function mo(t,n){var e=typeof t;return!!(n=null==n?h:n)&&("number"==e||"symbol"!=e&&gt.test(t))&&t>-1&&t%1==0&&t<n}function wo(t,n,e){if(!rs(e))return!1;var r=typeof n;return!!("number"==r?Zu(e)&&mo(n,e.length):"string"==r&&n in e)&&Xu(e[n],t)}function bo(t,n){if(Wu(t))return!1;var e=typeof t;return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!fs(t))||J.test(t)||!Q.test(t)||null!=n&&t in Mt(n)}function xo(t){var n=uo(t),e=Be[n];if("function"!=typeof e||!(n in Ye.prototype))return!1;if(t===e)return!0;var r=oo(e);return!!r&&t===r[0]}(je&&vo(new je(new ArrayBuffer(1)))!=T||Ae&&vo(new Ae)!=b||Oe&&vo(Oe.resolve())!=j||Me&&vo(new Me)!=O||Se&&vo(new Se)!=k)&&(vo=function(n){var e=Ar(n),r=e==E?n.constructor:t,i=r?$o(r):"";if(i)switch(i){case Ie:return T;case Ne:return b;case Re:return j;case ze:return O;case Pe:return k}return e});var Eo=Rt?ts:ma;function jo(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||Nt)}function Ao(t){return t==t&&!rs(t)}function Oo(n,e){return function(r){return null!=r&&r[n]===e&&(e!==t||n in Mt(r))}}function Mo(n,e,r){return e=_e(e===t?n.length-1:e,0),function(){for(var t=arguments,i=-1,o=_e(t.length-e,0),u=xt(o);++i<o;)u[i]=t[e+i];i=-1;for(var s=xt(e+1);++i<e;)s[i]=t[i];return s[e]=r(u),jn(n,this,s)}}function So(t,n){return n.length<2?t:Er(t,ri(n,0,-1))}function ko(t,n){if(("constructor"!==n||"function"!=typeof t[n])&&"__proto__"!=n)return t[n]}var Co=Ro(ti),To=gn||function(t,n){return ln.setTimeout(t,n)},Io=Ro(ni);function No(t,n,e){var r=n+"";return Io(t,function(t,n){var e=n.length;if(!e)return t;var r=e-1;return n[r]=(e>1?"& ":"")+n[r],n=n.join(e>2?", ":" "),t.replace(it,"{\n/* [wrapped with "+n+"] */\n")}(r,function(t,n){return On(d,(function(e){var r="_."+e[0];n&e[1]&&!Cn(t,r)&&t.push(r)})),t.sort()}(function(t){var n=t.match(ot);return n?n[1].split(ut):[]}(r),e)))}function Ro(n){var e=0,r=0;return function(){var i=we(),o=16-(i-r);if(r=i,o>0){if(++e>=800)return arguments[0]}else e=0;return n.apply(t,arguments)}}function zo(n,e){var r=-1,i=n.length,o=i-1;for(e=e===t?i:e;++r<e;){var u=Gr(r,o),s=n[u];n[u]=n[r],n[r]=s}return n.length=e,n}var Po,Do,Lo,Fo=(Po=function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(K,(function(t,e,r,i){n.push(r?i.replace(ct,"$1"):e||t)})),n},Do=Du(Po,(function(t){return 500===Lo.size&&Lo.clear(),t})),Lo=Do.cache,Do);function Bo(t){if("string"==typeof t||fs(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}function $o(t){if(null!=t){try{return zt.call(t)}catch(Bl){}try{return t+""}catch(Bl){}}return""}function Vo(t){if(t instanceof Ye)return t.clone();var n=new Xe(t.__wrapped__,t.__chain__);return n.__actions__=ki(t.__actions__),n.__index__=t.__index__,n.__values__=t.__values__,n}var Xo=Hr((function(t,n){return Hu(t)?fr(t,yr(n,1,Hu,!0)):[]})),Yo=Hr((function(n,e){var r=Ko(e);return Hu(r)&&(r=t),Hu(n)?fr(n,yr(e,1,Hu,!0),ao(r,2)):[]})),Uo=Hr((function(n,e){var r=Ko(e);return Hu(r)&&(r=t),Hu(n)?fr(n,yr(e,1,Hu,!0),t,r):[]}));function qo(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var i=null==e?0:ys(e);return i<0&&(i=_e(r+i,0)),Fn(t,ao(n,3),i)}function Wo(n,e,r){var i=null==n?0:n.length;if(!i)return-1;var o=i-1;return r!==t&&(o=ys(r),o=r<0?_e(i+o,0):me(o,i-1)),Fn(n,ao(e,3),o,!0)}function Go(t){return null!=t&&t.length?yr(t,1):[]}function Zo(n){return n&&n.length?n[0]:t}var Ho=Hr((function(t){var n=In(t,yi);return n.length&&n[0]===t[0]?kr(n):[]})),Qo=Hr((function(n){var e=Ko(n),r=In(n,yi);return e===Ko(r)?e=t:r.pop(),r.length&&r[0]===n[0]?kr(r,ao(e,2)):[]})),Jo=Hr((function(n){var e=Ko(n),r=In(n,yi);return(e="function"==typeof e?e:t)&&r.pop(),r.length&&r[0]===n[0]?kr(r,t,e):[]}));function Ko(n){var e=null==n?0:n.length;return e?n[e-1]:t}var tu=Hr(nu);function nu(t,n){return t&&t.length&&n&&n.length?qr(t,n):t}var eu=eo((function(t,n){var e=null==t?0:t.length,r=ur(t,n);return Wr(t,In(n,(function(t){return mo(t,e)?+t:t})).sort(Oi)),r}));function ru(t){return null==t?t:Ee.call(t)}var iu=Hr((function(t){return hi(yr(t,1,Hu,!0))})),ou=Hr((function(n){var e=Ko(n);return Hu(e)&&(e=t),hi(yr(n,1,Hu,!0),ao(e,2))})),uu=Hr((function(n){var e=Ko(n);return e="function"==typeof e?e:t,hi(yr(n,1,Hu,!0),t,e)}));function su(t){if(!t||!t.length)return[];var n=0;return t=kn(t,(function(t){if(Hu(t))return n=_e(t.length,n),!0})),Gn(n,(function(n){return In(t,Yn(n))}))}function au(n,e){if(!n||!n.length)return[];var r=su(n);return null==e?r:In(r,(function(n){return jn(e,t,n)}))}var cu=Hr((function(t,n){return Hu(t)?fr(t,n):[]})),hu=Hr((function(t){return vi(kn(t,Hu))})),fu=Hr((function(n){var e=Ko(n);return Hu(e)&&(e=t),vi(kn(n,Hu),ao(e,2))})),lu=Hr((function(n){var e=Ko(n);return e="function"==typeof e?e:t,vi(kn(n,Hu),t,e)})),du=Hr(su),pu=Hr((function(n){var e=n.length,r=e>1?n[e-1]:t;return r="function"==typeof r?(n.pop(),r):t,au(n,r)}));function vu(t){var n=Be(t);return n.__chain__=!0,n}function gu(t,n){return n(t)}var yu=eo((function(n){var e=n.length,r=e?n[0]:0,i=this.__wrapped__,o=function(t){return ur(t,n)};return!(e>1||this.__actions__.length)&&i instanceof Ye&&mo(r)?((i=i.slice(r,+r+(e?1:0))).__actions__.push({func:gu,args:[o],thisArg:t}),new Xe(i,this.__chain__).thru((function(n){return e&&!n.length&&n.push(t),n}))):this.thru(o)})),_u=Ti((function(t,n,e){Pt.call(t,e)?++t[e]:or(t,e,1)})),mu=Li(qo),wu=Li(Wo);function bu(t,n){return(Wu(t)?On:lr)(t,ao(n,3))}function xu(t,n){return(Wu(t)?Mn:dr)(t,ao(n,3))}var Eu=Ti((function(t,n,e){Pt.call(t,e)?t[e].push(n):or(t,e,[n])})),ju=Hr((function(t,n,e){var r=-1,i="function"==typeof n,o=Zu(t)?xt(t.length):[];return lr(t,(function(t){o[++r]=i?jn(n,t,e):Cr(t,n,e)})),o})),Au=Ti((function(t,n,e){or(t,e,n)}));function Ou(t,n){return(Wu(t)?In:Fr)(t,ao(n,3))}var Mu=Ti((function(t,n,e){t[e?0:1].push(n)}),(function(){return[[],[]]})),Su=Hr((function(t,n){if(null==t)return[];var e=n.length;return e>1&&wo(t,n[0],n[1])?n=[]:e>2&&wo(n[0],n[1],n[2])&&(n=[n[0]]),Yr(t,yr(n,1),[])})),ku=pn||function(){return ln.Date.now()};function Cu(n,e,r){return e=r?t:e,e=n&&null==e?n.length:e,Qi(n,s,t,t,t,t,e)}function Tu(e,r){var i;if("function"!=typeof r)throw new Ct(n);return e=ys(e),function(){return--e>0&&(i=r.apply(this,arguments)),e<=1&&(r=t),i}}var Iu=Hr((function(t,n,e){var r=1;if(e.length){var i=se(e,so(Iu));r|=o}return Qi(t,r,n,e,i)})),Nu=Hr((function(t,n,e){var r=3;if(e.length){var i=se(e,so(Nu));r|=o}return Qi(n,r,t,e,i)}));function Ru(e,r,i){var o,u,s,a,c,h,f=0,l=!1,d=!1,p=!0;if("function"!=typeof e)throw new Ct(n);function v(n){var r=o,i=u;return o=u=t,f=n,a=e.apply(i,r)}function g(n){var e=n-h;return h===t||e>=r||e<0||d&&n-f>=s}function y(){var t=ku();if(g(t))return _(t);c=To(y,function(t){var n=r-(t-h);return d?me(n,s-(t-f)):n}(t))}function _(n){return c=t,p&&o?v(n):(o=u=t,a)}function m(){var n=ku(),e=g(n);if(o=arguments,u=this,h=n,e){if(c===t)return function(t){return f=t,c=To(y,r),l?v(t):a}(h);if(d)return xi(c),c=To(y,r),v(h)}return c===t&&(c=To(y,r)),a}return r=ms(r)||0,rs(i)&&(l=!!i.leading,s=(d="maxWait"in i)?_e(ms(i.maxWait)||0,r):s,p="trailing"in i?!!i.trailing:p),m.cancel=function(){c!==t&&xi(c),f=0,o=h=u=c=t},m.flush=function(){return c===t?a:_(ku())},m}var zu=Hr((function(t,n){return hr(t,1,n)})),Pu=Hr((function(t,n,e){return hr(t,ms(n)||0,e)}));function Du(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw new Ct(n);var r=function(){var n=arguments,i=e?e.apply(this,n):n[0],o=r.cache;if(o.has(i))return o.get(i);var u=t.apply(this,n);return r.cache=o.set(i,u)||o,u};return r.cache=new(Du.Cache||We),r}function Lu(t){if("function"!=typeof t)throw new Ct(n);return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}Du.Cache=We;var Fu=wi((function(t,n){var e=(n=1==n.length&&Wu(n[0])?In(n[0],Hn(ao())):In(yr(n,1),Hn(ao()))).length;return Hr((function(r){for(var i=-1,o=me(r.length,e);++i<o;)r[i]=n[i].call(this,r[i]);return jn(t,this,r)}))})),Bu=Hr((function(n,e){var r=se(e,so(Bu));return Qi(n,o,t,e,r)})),$u=Hr((function(n,e){var r=se(e,so($u));return Qi(n,u,t,e,r)})),Vu=eo((function(n,e){return Qi(n,a,t,t,t,e)}));function Xu(t,n){return t===n||t!=t&&n!=n}var Yu=qi(Or),Uu=qi((function(t,n){return t>=n})),qu=Tr(function(){return arguments}())?Tr:function(t){return is(t)&&Pt.call(t,"callee")&&!Zt.call(t,"callee")},Wu=xt.isArray,Gu=_n?Hn(_n):function(t){return is(t)&&Ar(t)==C};function Zu(t){return null!=t&&es(t.length)&&!ts(t)}function Hu(t){return is(t)&&Zu(t)}var Qu=pe||ma,Ju=mn?Hn(mn):function(t){return is(t)&&Ar(t)==y};function Ku(t){if(!is(t))return!1;var n=Ar(t);return n==_||"[object DOMException]"==n||"string"==typeof t.message&&"string"==typeof t.name&&!ss(t)}function ts(t){if(!rs(t))return!1;var n=Ar(t);return n==m||n==w||"[object AsyncFunction]"==n||"[object Proxy]"==n}function ns(t){return"number"==typeof t&&t==ys(t)}function es(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=h}function rs(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}function is(t){return null!=t&&"object"==typeof t}var os=wn?Hn(wn):function(t){return is(t)&&vo(t)==b};function us(t){return"number"==typeof t||is(t)&&Ar(t)==x}function ss(t){if(!is(t)||Ar(t)!=E)return!1;var n=Wt(t);if(null===n)return!0;var e=Pt.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&zt.call(e)==Bt}var as=bn?Hn(bn):function(t){return is(t)&&Ar(t)==A},cs=xn?Hn(xn):function(t){return is(t)&&vo(t)==O};function hs(t){return"string"==typeof t||!Wu(t)&&is(t)&&Ar(t)==M}function fs(t){return"symbol"==typeof t||is(t)&&Ar(t)==S}var ls=En?Hn(En):function(t){return is(t)&&es(t.length)&&!!on[Ar(t)]},ds=qi(Lr),ps=qi((function(t,n){return t<=n}));function vs(t){if(!t)return[];if(Zu(t))return hs(t)?he(t):ki(t);if(sn&&t[sn])return function(t){for(var n,e=[];!(n=t.next()).done;)e.push(n.value);return e}(t[sn]());var n=vo(t);return(n==b?oe:n==O?ae:Xs)(t)}function gs(t){return t?(t=ms(t))===c||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function ys(t){var n=gs(t),e=n%1;return n==n?e?n-e:n:0}function _s(t){return t?sr(ys(t),0,l):0}function ms(t){if("number"==typeof t)return t;if(fs(t))return f;if(rs(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=rs(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=Zn(t);var e=dt.test(t);return e||vt.test(t)?cn(t.slice(2),e?2:8):lt.test(t)?f:+t}function ws(t){return Ci(t,zs(t))}function bs(t){return null==t?"":ci(t)}var xs=Ii((function(t,n){if(jo(n)||Zu(n))Ci(n,Rs(n),t);else for(var e in n)Pt.call(n,e)&&nr(t,e,n[e])})),Es=Ii((function(t,n){Ci(n,zs(n),t)})),js=Ii((function(t,n,e,r){Ci(n,zs(n),t,r)})),As=Ii((function(t,n,e,r){Ci(n,Rs(n),t,r)})),Os=eo(ur),Ms=Hr((function(n,e){n=Mt(n);var r=-1,i=e.length,o=i>2?e[2]:t;for(o&&wo(e[0],e[1],o)&&(i=1);++r<i;)for(var u=e[r],s=zs(u),a=-1,c=s.length;++a<c;){var h=s[a],f=n[h];(f===t||Xu(f,Nt[h])&&!Pt.call(n,h))&&(n[h]=u[h])}return n})),Ss=Hr((function(n){return n.push(t,Ki),jn(Ds,t,n)}));function ks(n,e,r){var i=null==n?t:Er(n,e);return i===t?r:i}function Cs(t,n){return null!=t&&go(t,n,Sr)}var Ts=$i((function(t,n,e){null!=n&&"function"!=typeof n.toString&&(n=Ft.call(n)),t[n]=e}),ra(ua)),Is=$i((function(t,n,e){null!=n&&"function"!=typeof n.toString&&(n=Ft.call(n)),Pt.call(t,n)?t[n].push(e):t[n]=[e]}),ao),Ns=Hr(Cr);function Rs(t){return Zu(t)?He(t):Pr(t)}function zs(t){return Zu(t)?He(t,!0):Dr(t)}var Ps=Ii((function(t,n,e){Vr(t,n,e)})),Ds=Ii((function(t,n,e,r){Vr(t,n,e,r)})),Ls=eo((function(t,n){var e={};if(null==t)return e;var r=!1;n=In(n,(function(n){return n=mi(n,t),r||(r=n.length>1),n})),Ci(t,io(t),e),r&&(e=ar(e,7,to));for(var i=n.length;i--;)fi(e,n[i]);return e})),Fs=eo((function(t,n){return null==t?{}:function(t,n){return Ur(t,n,(function(n,e){return Cs(t,e)}))}(t,n)}));function Bs(t,n){if(null==t)return{};var e=In(io(t),(function(t){return[t]}));return n=ao(n),Ur(t,e,(function(t,e){return n(t,e[0])}))}var $s=Hi(Rs),Vs=Hi(zs);function Xs(t){return null==t?[]:Qn(t,Rs(t))}var Ys=Pi((function(t,n,e){return n=n.toLowerCase(),t+(e?Us(n):n)}));function Us(t){return Ks(bs(t).toLowerCase())}function qs(t){return(t=bs(t))&&t.replace(yt,ne).replace(Qt,"")}var Ws=Pi((function(t,n,e){return t+(e?"-":"")+n.toLowerCase()})),Gs=Pi((function(t,n,e){return t+(e?" ":"")+n.toLowerCase()})),Zs=zi("toLowerCase"),Hs=Pi((function(t,n,e){return t+(e?"_":"")+n.toLowerCase()})),Qs=Pi((function(t,n,e){return t+(e?" ":"")+Ks(n)})),Js=Pi((function(t,n,e){return t+(e?" ":"")+n.toUpperCase()})),Ks=zi("toUpperCase");function ta(n,e,r){return n=bs(n),(e=r?t:e)===t?function(t){return nn.test(t)}(n)?function(t){return t.match(Kt)||[]}(n):function(t){return t.match(st)||[]}(n):n.match(e)||[]}var na=Hr((function(n,e){try{return jn(n,t,e)}catch(Bl){return Ku(Bl)?Bl:new jt(Bl)}})),ea=eo((function(t,n){return On(n,(function(n){n=Bo(n),or(t,n,Iu(t[n],t))})),t}));function ra(t){return function(){return t}}var ia=Fi(),oa=Fi(!0);function ua(t){return t}function sa(t){return zr("function"==typeof t?t:ar(t,1))}var aa=Hr((function(t,n){return function(e){return Cr(e,t,n)}})),ca=Hr((function(t,n){return function(e){return Cr(t,e,n)}}));function ha(t,n,e){var r=Rs(n),i=xr(n,r);null!=e||rs(n)&&(i.length||!r.length)||(e=n,n=t,t=this,i=xr(n,Rs(n)));var o=!(rs(e)&&"chain"in e&&!e.chain),u=ts(t);return On(i,(function(e){var r=n[e];t[e]=r,u&&(t.prototype[e]=function(){var n=this.__chain__;if(o||n){var e=t(this.__wrapped__);return(e.__actions__=ki(this.__actions__)).push({func:r,args:arguments,thisArg:t}),e.__chain__=n,e}return r.apply(t,Nn([this.value()],arguments))})})),t}function fa(){}var la=Xi(In),da=Xi(Sn),pa=Xi(Pn);function va(t){return bo(t)?Yn(Bo(t)):function(t){return function(n){return Er(n,t)}}(t)}var ga=Ui(),ya=Ui(!0);function _a(){return[]}function ma(){return!1}var wa,ba=Vi((function(t,n){return t+n}),0),xa=Gi("ceil"),Ea=Vi((function(t,n){return t/n}),1),ja=Gi("floor"),Aa=Vi((function(t,n){return t*n}),1),Oa=Gi("round"),Ma=Vi((function(t,n){return t-n}),0);return Be.after=function(t,e){if("function"!=typeof e)throw new Ct(n);return t=ys(t),function(){if(--t<1)return e.apply(this,arguments)}},Be.ary=Cu,Be.assign=xs,Be.assignIn=Es,Be.assignInWith=js,Be.assignWith=As,Be.at=Os,Be.before=Tu,Be.bind=Iu,Be.bindAll=ea,Be.bindKey=Nu,Be.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Wu(t)?t:[t]},Be.chain=vu,Be.chunk=function(n,e,r){e=(r?wo(n,e,r):e===t)?1:_e(ys(e),0);var i=null==n?0:n.length;if(!i||e<1)return[];for(var o=0,u=0,s=xt(yn(i/e));o<i;)s[u++]=ri(n,o,o+=e);return s},Be.compact=function(t){for(var n=-1,e=null==t?0:t.length,r=0,i=[];++n<e;){var o=t[n];o&&(i[r++]=o)}return i},Be.concat=function(){var t=arguments.length;if(!t)return[];for(var n=xt(t-1),e=arguments[0],r=t;r--;)n[r-1]=arguments[r];return Nn(Wu(e)?ki(e):[e],yr(n,1))},Be.cond=function(t){var e=null==t?0:t.length,r=ao();return t=e?In(t,(function(t){if("function"!=typeof t[1])throw new Ct(n);return[r(t[0]),t[1]]})):[],Hr((function(n){for(var r=-1;++r<e;){var i=t[r];if(jn(i[0],this,n))return jn(i[1],this,n)}}))},Be.conforms=function(t){return function(t){var n=Rs(t);return function(e){return cr(e,t,n)}}(ar(t,1))},Be.constant=ra,Be.countBy=_u,Be.create=function(t,n){var e=$e(t);return null==n?e:ir(e,n)},Be.curry=function n(e,r,i){var o=Qi(e,8,t,t,t,t,t,r=i?t:r);return o.placeholder=n.placeholder,o},Be.curryRight=function n(e,r,o){var u=Qi(e,i,t,t,t,t,t,r=o?t:r);return u.placeholder=n.placeholder,u},Be.debounce=Ru,Be.defaults=Ms,Be.defaultsDeep=Ss,Be.defer=zu,Be.delay=Pu,Be.difference=Xo,Be.differenceBy=Yo,Be.differenceWith=Uo,Be.drop=function(n,e,r){var i=null==n?0:n.length;return i?ri(n,(e=r||e===t?1:ys(e))<0?0:e,i):[]},Be.dropRight=function(n,e,r){var i=null==n?0:n.length;return i?ri(n,0,(e=i-(e=r||e===t?1:ys(e)))<0?0:e):[]},Be.dropRightWhile=function(t,n){return t&&t.length?di(t,ao(n,3),!0,!0):[]},Be.dropWhile=function(t,n){return t&&t.length?di(t,ao(n,3),!0):[]},Be.fill=function(n,e,r,i){var o=null==n?0:n.length;return o?(r&&"number"!=typeof r&&wo(n,e,r)&&(r=0,i=o),function(n,e,r,i){var o=n.length;for((r=ys(r))<0&&(r=-r>o?0:o+r),(i=i===t||i>o?o:ys(i))<0&&(i+=o),i=r>i?0:_s(i);r<i;)n[r++]=e;return n}(n,e,r,i)):[]},Be.filter=function(t,n){return(Wu(t)?kn:gr)(t,ao(n,3))},Be.flatMap=function(t,n){return yr(Ou(t,n),1)},Be.flatMapDeep=function(t,n){return yr(Ou(t,n),c)},Be.flatMapDepth=function(n,e,r){return r=r===t?1:ys(r),yr(Ou(n,e),r)},Be.flatten=Go,Be.flattenDeep=function(t){return null!=t&&t.length?yr(t,c):[]},Be.flattenDepth=function(n,e){return null!=n&&n.length?yr(n,e=e===t?1:ys(e)):[]},Be.flip=function(t){return Qi(t,512)},Be.flow=ia,Be.flowRight=oa,Be.fromPairs=function(t){for(var n=-1,e=null==t?0:t.length,r={};++n<e;){var i=t[n];r[i[0]]=i[1]}return r},Be.functions=function(t){return null==t?[]:xr(t,Rs(t))},Be.functionsIn=function(t){return null==t?[]:xr(t,zs(t))},Be.groupBy=Eu,Be.initial=function(t){return null!=t&&t.length?ri(t,0,-1):[]},Be.intersection=Ho,Be.intersectionBy=Qo,Be.intersectionWith=Jo,Be.invert=Ts,Be.invertBy=Is,Be.invokeMap=ju,Be.iteratee=sa,Be.keyBy=Au,Be.keys=Rs,Be.keysIn=zs,Be.map=Ou,Be.mapKeys=function(t,n){var e={};return n=ao(n,3),wr(t,(function(t,r,i){or(e,n(t,r,i),t)})),e},Be.mapValues=function(t,n){var e={};return n=ao(n,3),wr(t,(function(t,r,i){or(e,r,n(t,r,i))})),e},Be.matches=function(t){return Br(ar(t,1))},Be.matchesProperty=function(t,n){return $r(t,ar(n,1))},Be.memoize=Du,Be.merge=Ps,Be.mergeWith=Ds,Be.method=aa,Be.methodOf=ca,Be.mixin=ha,Be.negate=Lu,Be.nthArg=function(t){return t=ys(t),Hr((function(n){return Xr(n,t)}))},Be.omit=Ls,Be.omitBy=function(t,n){return Bs(t,Lu(ao(n)))},Be.once=function(t){return Tu(2,t)},Be.orderBy=function(n,e,r,i){return null==n?[]:(Wu(e)||(e=null==e?[]:[e]),Wu(r=i?t:r)||(r=null==r?[]:[r]),Yr(n,e,r))},Be.over=la,Be.overArgs=Fu,Be.overEvery=da,Be.overSome=pa,Be.partial=Bu,Be.partialRight=$u,Be.partition=Mu,Be.pick=Fs,Be.pickBy=Bs,Be.property=va,Be.propertyOf=function(n){return function(e){return null==n?t:Er(n,e)}},Be.pull=tu,Be.pullAll=nu,Be.pullAllBy=function(t,n,e){return t&&t.length&&n&&n.length?qr(t,n,ao(e,2)):t},Be.pullAllWith=function(n,e,r){return n&&n.length&&e&&e.length?qr(n,e,t,r):n},Be.pullAt=eu,Be.range=ga,Be.rangeRight=ya,Be.rearg=Vu,Be.reject=function(t,n){return(Wu(t)?kn:gr)(t,Lu(ao(n,3)))},Be.remove=function(t,n){var e=[];if(!t||!t.length)return e;var r=-1,i=[],o=t.length;for(n=ao(n,3);++r<o;){var u=t[r];n(u,r,t)&&(e.push(u),i.push(r))}return Wr(t,i),e},Be.rest=function(e,r){if("function"!=typeof e)throw new Ct(n);return Hr(e,r=r===t?r:ys(r))},Be.reverse=ru,Be.sampleSize=function(n,e,r){return e=(r?wo(n,e,r):e===t)?1:ys(e),(Wu(n)?Je:Jr)(n,e)},Be.set=function(t,n,e){return null==t?t:Kr(t,n,e)},Be.setWith=function(n,e,r,i){return i="function"==typeof i?i:t,null==n?n:Kr(n,e,r,i)},Be.shuffle=function(t){return(Wu(t)?Ke:ei)(t)},Be.slice=function(n,e,r){var i=null==n?0:n.length;return i?(r&&"number"!=typeof r&&wo(n,e,r)?(e=0,r=i):(e=null==e?0:ys(e),r=r===t?i:ys(r)),ri(n,e,r)):[]},Be.sortBy=Su,Be.sortedUniq=function(t){return t&&t.length?si(t):[]},Be.sortedUniqBy=function(t,n){return t&&t.length?si(t,ao(n,2)):[]},Be.split=function(n,e,r){return r&&"number"!=typeof r&&wo(n,e,r)&&(e=r=t),(r=r===t?l:r>>>0)?(n=bs(n))&&("string"==typeof e||null!=e&&!as(e))&&!(e=ci(e))&&ie(n)?bi(he(n),0,r):n.split(e,r):[]},Be.spread=function(t,e){if("function"!=typeof t)throw new Ct(n);return e=null==e?0:_e(ys(e),0),Hr((function(n){var r=n[e],i=bi(n,0,e);return r&&Nn(i,r),jn(t,this,i)}))},Be.tail=function(t){var n=null==t?0:t.length;return n?ri(t,1,n):[]},Be.take=function(n,e,r){return n&&n.length?ri(n,0,(e=r||e===t?1:ys(e))<0?0:e):[]},Be.takeRight=function(n,e,r){var i=null==n?0:n.length;return i?ri(n,(e=i-(e=r||e===t?1:ys(e)))<0?0:e,i):[]},Be.takeRightWhile=function(t,n){return t&&t.length?di(t,ao(n,3),!1,!0):[]},Be.takeWhile=function(t,n){return t&&t.length?di(t,ao(n,3)):[]},Be.tap=function(t,n){return n(t),t},Be.throttle=function(t,e,r){var i=!0,o=!0;if("function"!=typeof t)throw new Ct(n);return rs(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),Ru(t,e,{leading:i,maxWait:e,trailing:o})},Be.thru=gu,Be.toArray=vs,Be.toPairs=$s,Be.toPairsIn=Vs,Be.toPath=function(t){return Wu(t)?In(t,Bo):fs(t)?[t]:ki(Fo(bs(t)))},Be.toPlainObject=ws,Be.transform=function(t,n,e){var r=Wu(t),i=r||Qu(t)||ls(t);if(n=ao(n,4),null==e){var o=t&&t.constructor;e=i?r?new o:[]:rs(t)&&ts(o)?$e(Wt(t)):{}}return(i?On:wr)(t,(function(t,r,i){return n(e,t,r,i)})),e},Be.unary=function(t){return Cu(t,1)},Be.union=iu,Be.unionBy=ou,Be.unionWith=uu,Be.uniq=function(t){return t&&t.length?hi(t):[]},Be.uniqBy=function(t,n){return t&&t.length?hi(t,ao(n,2)):[]},Be.uniqWith=function(n,e){return e="function"==typeof e?e:t,n&&n.length?hi(n,t,e):[]},Be.unset=function(t,n){return null==t||fi(t,n)},Be.unzip=su,Be.unzipWith=au,Be.update=function(t,n,e){return null==t?t:li(t,n,_i(e))},Be.updateWith=function(n,e,r,i){return i="function"==typeof i?i:t,null==n?n:li(n,e,_i(r),i)},Be.values=Xs,Be.valuesIn=function(t){return null==t?[]:Qn(t,zs(t))},Be.without=cu,Be.words=ta,Be.wrap=function(t,n){return Bu(_i(n),t)},Be.xor=hu,Be.xorBy=fu,Be.xorWith=lu,Be.zip=du,Be.zipObject=function(t,n){return gi(t||[],n||[],nr)},Be.zipObjectDeep=function(t,n){return gi(t||[],n||[],Kr)},Be.zipWith=pu,Be.entries=$s,Be.entriesIn=Vs,Be.extend=Es,Be.extendWith=js,ha(Be,Be),Be.add=ba,Be.attempt=na,Be.camelCase=Ys,Be.capitalize=Us,Be.ceil=xa,Be.clamp=function(n,e,r){return r===t&&(r=e,e=t),r!==t&&(r=(r=ms(r))==r?r:0),e!==t&&(e=(e=ms(e))==e?e:0),sr(ms(n),e,r)},Be.clone=function(t){return ar(t,4)},Be.cloneDeep=function(t){return ar(t,5)},Be.cloneDeepWith=function(n,e){return ar(n,5,e="function"==typeof e?e:t)},Be.cloneWith=function(n,e){return ar(n,4,e="function"==typeof e?e:t)},Be.conformsTo=function(t,n){return null==n||cr(t,n,Rs(n))},Be.deburr=qs,Be.defaultTo=function(t,n){return null==t||t!=t?n:t},Be.divide=Ea,Be.endsWith=function(n,e,r){n=bs(n),e=ci(e);var i=n.length,o=r=r===t?i:sr(ys(r),0,i);return(r-=e.length)>=0&&n.slice(r,o)==e},Be.eq=Xu,Be.escape=function(t){return(t=bs(t))&&W.test(t)?t.replace(U,ee):t},Be.escapeRegExp=function(t){return(t=bs(t))&&nt.test(t)?t.replace(tt,"\\$&"):t},Be.every=function(n,e,r){var i=Wu(n)?Sn:pr;return r&&wo(n,e,r)&&(e=t),i(n,ao(e,3))},Be.find=mu,Be.findIndex=qo,Be.findKey=function(t,n){return Ln(t,ao(n,3),wr)},Be.findLast=wu,Be.findLastIndex=Wo,Be.findLastKey=function(t,n){return Ln(t,ao(n,3),br)},Be.floor=ja,Be.forEach=bu,Be.forEachRight=xu,Be.forIn=function(t,n){return null==t?t:_r(t,ao(n,3),zs)},Be.forInRight=function(t,n){return null==t?t:mr(t,ao(n,3),zs)},Be.forOwn=function(t,n){return t&&wr(t,ao(n,3))},Be.forOwnRight=function(t,n){return t&&br(t,ao(n,3))},Be.get=ks,Be.gt=Yu,Be.gte=Uu,Be.has=function(t,n){return null!=t&&go(t,n,Mr)},Be.hasIn=Cs,Be.head=Zo,Be.identity=ua,Be.includes=function(t,n,e,r){t=Zu(t)?t:Xs(t),e=e&&!r?ys(e):0;var i=t.length;return e<0&&(e=_e(i+e,0)),hs(t)?e<=i&&t.indexOf(n,e)>-1:!!i&&Bn(t,n,e)>-1},Be.indexOf=function(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var i=null==e?0:ys(e);return i<0&&(i=_e(r+i,0)),Bn(t,n,i)},Be.inRange=function(n,e,r){return e=gs(e),r===t?(r=e,e=0):r=gs(r),function(t,n,e){return t>=me(n,e)&&t<_e(n,e)}(n=ms(n),e,r)},Be.invoke=Ns,Be.isArguments=qu,Be.isArray=Wu,Be.isArrayBuffer=Gu,Be.isArrayLike=Zu,Be.isArrayLikeObject=Hu,Be.isBoolean=function(t){return!0===t||!1===t||is(t)&&Ar(t)==g},Be.isBuffer=Qu,Be.isDate=Ju,Be.isElement=function(t){return is(t)&&1===t.nodeType&&!ss(t)},Be.isEmpty=function(t){if(null==t)return!0;if(Zu(t)&&(Wu(t)||"string"==typeof t||"function"==typeof t.splice||Qu(t)||ls(t)||qu(t)))return!t.length;var n=vo(t);if(n==b||n==O)return!t.size;if(jo(t))return!Pr(t).length;for(var e in t)if(Pt.call(t,e))return!1;return!0},Be.isEqual=function(t,n){return Ir(t,n)},Be.isEqualWith=function(n,e,r){var i=(r="function"==typeof r?r:t)?r(n,e):t;return i===t?Ir(n,e,t,r):!!i},Be.isError=Ku,Be.isFinite=function(t){return"number"==typeof t&&ve(t)},Be.isFunction=ts,Be.isInteger=ns,Be.isLength=es,Be.isMap=os,Be.isMatch=function(t,n){return t===n||Nr(t,n,ho(n))},Be.isMatchWith=function(n,e,r){return r="function"==typeof r?r:t,Nr(n,e,ho(e),r)},Be.isNaN=function(t){return us(t)&&t!=+t},Be.isNative=function(t){if(Eo(t))throw new jt("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return Rr(t)},Be.isNil=function(t){return null==t},Be.isNull=function(t){return null===t},Be.isNumber=us,Be.isObject=rs,Be.isObjectLike=is,Be.isPlainObject=ss,Be.isRegExp=as,Be.isSafeInteger=function(t){return ns(t)&&t>=-9007199254740991&&t<=h},Be.isSet=cs,Be.isString=hs,Be.isSymbol=fs,Be.isTypedArray=ls,Be.isUndefined=function(n){return n===t},Be.isWeakMap=function(t){return is(t)&&vo(t)==k},Be.isWeakSet=function(t){return is(t)&&"[object WeakSet]"==Ar(t)},Be.join=function(t,n){return null==t?"":ge.call(t,n)},Be.kebabCase=Ws,Be.last=Ko,Be.lastIndexOf=function(n,e,r){var i=null==n?0:n.length;if(!i)return-1;var o=i;return r!==t&&(o=(o=ys(r))<0?_e(i+o,0):me(o,i-1)),e==e?function(t,n,e){for(var r=e+1;r--;)if(t[r]===n)return r;return r}(n,e,o):Fn(n,Vn,o,!0)},Be.lowerCase=Gs,Be.lowerFirst=Zs,Be.lt=ds,Be.lte=ps,Be.max=function(n){return n&&n.length?vr(n,ua,Or):t},Be.maxBy=function(n,e){return n&&n.length?vr(n,ao(e,2),Or):t},Be.mean=function(t){return Xn(t,ua)},Be.meanBy=function(t,n){return Xn(t,ao(n,2))},Be.min=function(n){return n&&n.length?vr(n,ua,Lr):t},Be.minBy=function(n,e){return n&&n.length?vr(n,ao(e,2),Lr):t},Be.stubArray=_a,Be.stubFalse=ma,Be.stubObject=function(){return{}},Be.stubString=function(){return""},Be.stubTrue=function(){return!0},Be.multiply=Aa,Be.nth=function(n,e){return n&&n.length?Xr(n,ys(e)):t},Be.noConflict=function(){return ln._===this&&(ln._=$t),this},Be.noop=fa,Be.now=ku,Be.pad=function(t,n,e){t=bs(t);var r=(n=ys(n))?ce(t):0;if(!n||r>=n)return t;var i=(n-r)/2;return Yi(Dn(i),e)+t+Yi(yn(i),e)},Be.padEnd=function(t,n,e){t=bs(t);var r=(n=ys(n))?ce(t):0;return n&&r<n?t+Yi(n-r,e):t},Be.padStart=function(t,n,e){t=bs(t);var r=(n=ys(n))?ce(t):0;return n&&r<n?Yi(n-r,e)+t:t},Be.parseInt=function(t,n,e){return e||null==n?n=0:n&&(n=+n),be(bs(t).replace(et,""),n||0)},Be.random=function(n,e,r){if(r&&"boolean"!=typeof r&&wo(n,e,r)&&(e=r=t),r===t&&("boolean"==typeof e?(r=e,e=t):"boolean"==typeof n&&(r=n,n=t)),n===t&&e===t?(n=0,e=1):(n=gs(n),e===t?(e=n,n=0):e=gs(e)),n>e){var i=n;n=e,e=i}if(r||n%1||e%1){var o=xe();return me(n+o*(e-n+an("1e-"+((o+"").length-1))),e)}return Gr(n,e)},Be.reduce=function(t,n,e){var r=Wu(t)?Rn:qn,i=arguments.length<3;return r(t,ao(n,4),e,i,lr)},Be.reduceRight=function(t,n,e){var r=Wu(t)?zn:qn,i=arguments.length<3;return r(t,ao(n,4),e,i,dr)},Be.repeat=function(n,e,r){return e=(r?wo(n,e,r):e===t)?1:ys(e),Zr(bs(n),e)},Be.replace=function(){var t=arguments,n=bs(t[0]);return t.length<3?n:n.replace(t[1],t[2])},Be.result=function(n,e,r){var i=-1,o=(e=mi(e,n)).length;for(o||(o=1,n=t);++i<o;){var u=null==n?t:n[Bo(e[i])];u===t&&(i=o,u=r),n=ts(u)?u.call(n):u}return n},Be.round=Oa,Be.runInContext=rt,Be.sample=function(t){return(Wu(t)?Qe:Qr)(t)},Be.size=function(t){if(null==t)return 0;if(Zu(t))return hs(t)?ce(t):t.length;var n=vo(t);return n==b||n==O?t.size:Pr(t).length},Be.snakeCase=Hs,Be.some=function(n,e,r){var i=Wu(n)?Pn:ii;return r&&wo(n,e,r)&&(e=t),i(n,ao(e,3))},Be.sortedIndex=function(t,n){return oi(t,n)},Be.sortedIndexBy=function(t,n,e){return ui(t,n,ao(e,2))},Be.sortedIndexOf=function(t,n){var e=null==t?0:t.length;if(e){var r=oi(t,n);if(r<e&&Xu(t[r],n))return r}return-1},Be.sortedLastIndex=function(t,n){return oi(t,n,!0)},Be.sortedLastIndexBy=function(t,n,e){return ui(t,n,ao(e,2),!0)},Be.sortedLastIndexOf=function(t,n){if(null!=t&&t.length){var e=oi(t,n,!0)-1;if(Xu(t[e],n))return e}return-1},Be.startCase=Qs,Be.startsWith=function(t,n,e){return t=bs(t),e=null==e?0:sr(ys(e),0,t.length),n=ci(n),t.slice(e,e+n.length)==n},Be.subtract=Ma,Be.sum=function(t){return t&&t.length?Wn(t,ua):0},Be.sumBy=function(t,n){return t&&t.length?Wn(t,ao(n,2)):0},Be.template=function(n,e,r){var i=Be.templateSettings;r&&wo(n,e,r)&&(e=t),n=bs(n),e=js({},e,i,Ji);var o,u,s=js({},e.imports,i.imports,Ji),a=Rs(s),c=Qn(s,a),h=0,f=e.interpolate||_t,l="__p += '",d=St((e.escape||_t).source+"|"+f.source+"|"+(f===H?ht:_t).source+"|"+(e.evaluate||_t).source+"|$","g"),p="//# sourceURL="+(Pt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++rn+"]")+"\n";n.replace(d,(function(t,e,r,i,s,a){return r||(r=i),l+=n.slice(h,a).replace(mt,re),e&&(o=!0,l+="' +\n__e("+e+") +\n'"),s&&(u=!0,l+="';\n"+s+";\n__p += '"),r&&(l+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),h=a+t.length,t})),l+="';\n";var v=Pt.call(e,"variable")&&e.variable;if(v){if(at.test(v))throw new jt("Invalid `variable` option passed into `_.template`")}else l="with (obj) {\n"+l+"\n}\n";l=(u?l.replace($,""):l).replace(V,"$1").replace(X,"$1;"),l="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(u?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+l+"return __p\n}";var g=na((function(){return At(a,p+"return "+l).apply(t,c)}));if(g.source=l,Ku(g))throw g;return g},Be.times=function(t,n){if((t=ys(t))<1||t>h)return[];var e=l,r=me(t,l);n=ao(n),t-=l;for(var i=Gn(r,n);++e<t;)n(e);return i},Be.toFinite=gs,Be.toInteger=ys,Be.toLength=_s,Be.toLower=function(t){return bs(t).toLowerCase()},Be.toNumber=ms,Be.toSafeInteger=function(t){return t?sr(ys(t),-9007199254740991,h):0===t?t:0},Be.toString=bs,Be.toUpper=function(t){return bs(t).toUpperCase()},Be.trim=function(n,e,r){if((n=bs(n))&&(r||e===t))return Zn(n);if(!n||!(e=ci(e)))return n;var i=he(n),o=he(e);return bi(i,Kn(i,o),te(i,o)+1).join("")},Be.trimEnd=function(n,e,r){if((n=bs(n))&&(r||e===t))return n.slice(0,fe(n)+1);if(!n||!(e=ci(e)))return n;var i=he(n);return bi(i,0,te(i,he(e))+1).join("")},Be.trimStart=function(n,e,r){if((n=bs(n))&&(r||e===t))return n.replace(et,"");if(!n||!(e=ci(e)))return n;var i=he(n);return bi(i,Kn(i,he(e))).join("")},Be.truncate=function(n,e){var r=30,i="...";if(rs(e)){var o="separator"in e?e.separator:o;r="length"in e?ys(e.length):r,i="omission"in e?ci(e.omission):i}var u=(n=bs(n)).length;if(ie(n)){var s=he(n);u=s.length}if(r>=u)return n;var a=r-ce(i);if(a<1)return i;var c=s?bi(s,0,a).join(""):n.slice(0,a);if(o===t)return c+i;if(s&&(a+=c.length-a),as(o)){if(n.slice(a).search(o)){var h,f=c;for(o.global||(o=St(o.source,bs(ft.exec(o))+"g")),o.lastIndex=0;h=o.exec(f);)var l=h.index;c=c.slice(0,l===t?a:l)}}else if(n.indexOf(ci(o),a)!=a){var d=c.lastIndexOf(o);d>-1&&(c=c.slice(0,d))}return c+i},Be.unescape=function(t){return(t=bs(t))&&q.test(t)?t.replace(Y,le):t},Be.uniqueId=function(t){var n=++Dt;return bs(t)+n},Be.upperCase=Js,Be.upperFirst=Ks,Be.each=bu,Be.eachRight=xu,Be.first=Zo,ha(Be,(wa={},wr(Be,(function(t,n){Pt.call(Be.prototype,n)||(wa[n]=t)})),wa),{chain:!1}),Be.VERSION="4.17.21",On(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){Be[t].placeholder=Be})),On(["drop","take"],(function(n,e){Ye.prototype[n]=function(r){r=r===t?1:_e(ys(r),0);var i=this.__filtered__&&!e?new Ye(this):this.clone();return i.__filtered__?i.__takeCount__=me(r,i.__takeCount__):i.__views__.push({size:me(r,l),type:n+(i.__dir__<0?"Right":"")}),i},Ye.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}})),On(["filter","map","takeWhile"],(function(t,n){var e=n+1,r=1==e||3==e;Ye.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:ao(t,3),type:e}),n.__filtered__=n.__filtered__||r,n}})),On(["head","last"],(function(t,n){var e="take"+(n?"Right":"");Ye.prototype[t]=function(){return this[e](1).value()[0]}})),On(["initial","tail"],(function(t,n){var e="drop"+(n?"":"Right");Ye.prototype[t]=function(){return this.__filtered__?new Ye(this):this[e](1)}})),Ye.prototype.compact=function(){return this.filter(ua)},Ye.prototype.find=function(t){return this.filter(t).head()},Ye.prototype.findLast=function(t){return this.reverse().find(t)},Ye.prototype.invokeMap=Hr((function(t,n){return"function"==typeof t?new Ye(this):this.map((function(e){return Cr(e,t,n)}))})),Ye.prototype.reject=function(t){return this.filter(Lu(ao(t)))},Ye.prototype.slice=function(n,e){n=ys(n);var r=this;return r.__filtered__&&(n>0||e<0)?new Ye(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),e!==t&&(r=(e=ys(e))<0?r.dropRight(-e):r.take(e-n)),r)},Ye.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},Ye.prototype.toArray=function(){return this.take(l)},wr(Ye.prototype,(function(n,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),i=/^(?:head|last)$/.test(e),o=Be[i?"take"+("last"==e?"Right":""):e],u=i||/^find/.test(e);o&&(Be.prototype[e]=function(){var e=this.__wrapped__,s=i?[1]:arguments,a=e instanceof Ye,c=s[0],h=a||Wu(e),f=function(t){var n=o.apply(Be,Nn([t],s));return i&&l?n[0]:n};h&&r&&"function"==typeof c&&1!=c.length&&(a=h=!1);var l=this.__chain__,d=!!this.__actions__.length,p=u&&!l,v=a&&!d;if(!u&&h){e=v?e:new Ye(this);var g=n.apply(e,s);return g.__actions__.push({func:gu,args:[f],thisArg:t}),new Xe(g,l)}return p&&v?n.apply(this,s):(g=this.thru(f),p?i?g.value()[0]:g.value():g)})})),On(["pop","push","shift","sort","splice","unshift"],(function(t){var n=Tt[t],e=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);Be.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return n.apply(Wu(i)?i:[],t)}return this[e]((function(e){return n.apply(Wu(e)?e:[],t)}))}})),wr(Ye.prototype,(function(t,n){var e=Be[n];if(e){var r=e.name+"";Pt.call(Te,r)||(Te[r]=[]),Te[r].push({name:n,func:e})}})),Te[Bi(t,2).name]=[{name:"wrapper",func:t}],Ye.prototype.clone=function(){var t=new Ye(this.__wrapped__);return t.__actions__=ki(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=ki(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=ki(this.__views__),t},Ye.prototype.reverse=function(){if(this.__filtered__){var t=new Ye(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},Ye.prototype.value=function(){var t=this.__wrapped__.value(),n=this.__dir__,e=Wu(t),r=n<0,i=e?t.length:0,o=function(t,n,e){for(var r=-1,i=e.length;++r<i;){var o=e[r],u=o.size;switch(o.type){case"drop":t+=u;break;case"dropRight":n-=u;break;case"take":n=me(n,t+u);break;case"takeRight":t=_e(t,n-u)}}return{start:t,end:n}}(0,i,this.__views__),u=o.start,s=o.end,a=s-u,c=r?s:u-1,h=this.__iteratees__,f=h.length,l=0,d=me(a,this.__takeCount__);if(!e||!r&&i==a&&d==a)return pi(t,this.__actions__);var p=[];t:for(;a--&&l<d;){for(var v=-1,g=t[c+=n];++v<f;){var y=h[v],_=y.iteratee,m=y.type,w=_(g);if(2==m)g=w;else if(!w){if(1==m)continue t;break t}}p[l++]=g}return p},Be.prototype.at=yu,Be.prototype.chain=function(){return vu(this)},Be.prototype.commit=function(){return new Xe(this.value(),this.__chain__)},Be.prototype.next=function(){this.__values__===t&&(this.__values__=vs(this.value()));var n=this.__index__>=this.__values__.length;return{done:n,value:n?t:this.__values__[this.__index__++]}},Be.prototype.plant=function(n){for(var e,r=this;r instanceof Ve;){var i=Vo(r);i.__index__=0,i.__values__=t,e?o.__wrapped__=i:e=i;var o=i;r=r.__wrapped__}return o.__wrapped__=n,e},Be.prototype.reverse=function(){var n=this.__wrapped__;if(n instanceof Ye){var e=n;return this.__actions__.length&&(e=new Ye(this)),(e=e.reverse()).__actions__.push({func:gu,args:[ru],thisArg:t}),new Xe(e,this.__chain__)}return this.thru(ru)},Be.prototype.toJSON=Be.prototype.valueOf=Be.prototype.value=function(){return pi(this.__wrapped__,this.__actions__)},Be.prototype.first=Be.prototype.head,sn&&(Be.prototype[sn]=function(){return this}),Be}();pn?((pn.exports=de)._=de,dn._=de):ln._=de}.call(ni);var tl=Kf.exports;function nl(t,n){const e=function(t,n){const e=new Set,r=new Hf.Graph({directed:!0}),i=[];if(!t.hasNode(n))throw Error("node not in graph");return el(t,n,e,r,i),t.nodes().forEach((n=>{e.has(n)||el(t,n,e,r,i)})),i.forEach(((t,n)=>{r.node(t).thread=n+1<i.length?i[n+1]:i[0]})),r}(t,n);return t.edges().forEach((n=>{const r=function(t,n,e){const r=t.node(n),i=t.node(e);if(r.depth<i.depth){let n=r.thread;for(;t.node(n).depth>r.depth;){if(n===e)return 1;n=t.node(n).thread}}else if(i.depth<r.depth){let e=i.thread;for(;t.node(e).depth>i.depth;){if(e===n)return-1;e=t.node(e).thread}}return 0}(e,n.v,n.w);if(r<0){const e=t.edge(n)||{};e.reversed=!0,t.removeEdge(n),t.setEdge(n.w,n.v,e)}})),t}function el(t,n,e,r,i,o=0){if(!e.has(n)){e.add(n),i.push(n),r.setNode(n,{depth:o});t.outEdges(n).map((t=>t.w)).forEach((u=>{e.has(u)||r.setEdge(n,u,{delta:1}),el(t,u,e,r,i,o+1)}))}}var rl=function(){for(var t=0;t<arguments.length;t++)if(void 0!==arguments[t])return arguments[t]};const il=ei(rl);function ol(t,n){if(0===t.nodes().length)return;const e=function(t,n){const e=new Hf.Graph({directed:!0});let r=!1;for(const u of n)if("min"===u.type){r=!0;break}if(!r){const e=t.sources();n=e.length>0?[{type:"min",nodes:[e[0]]},...n]:[{type:"min",nodes:[t.nodes()[0]]},...n]}const i=new Map;let o=0;return n.forEach((t=>{if(!t.nodes||0===t.nodes.length)return;const n=""+o++;t.nodes.forEach((t=>{i.set(t,n)})),e.setNode(n,{type:t.type,nodes:t.nodes})})),t.nodes().forEach((t=>{if(!i.has(t)){const n=""+o++,r={type:"same",nodes:[t]};i.set(t,n),e.setNode(n,r)}})),t.edges().forEach((n=>{const r=i.has(n.v)?i.get(n.v):n.v,o=i.has(n.w)?i.get(n.w):n.w,u=t.node(n.v)||{},s=t.node(n.w)||{},a=e.edge(r,o)||{delta:0};r===o?(a.delta=0,e.setEdge(r,o,a)):"l"===u.direction?(a.delta=Math.max(a.delta,"l"===s.direction?1:0),e.setEdge(o,r,a)):(a.delta=Math.max(a.delta,"l"===s.direction?0:1),e.setEdge(r,o,a))})),e}(t,n);!function(t){t.sources().forEach((n=>{"0"!==n&&t.setEdge("0",n,{temp:!0,delta:0})}))}(e),nl(e,"0"),function(t){const n=t.sources(),e=new Set,r=new Set;for(t.edges().forEach((t=>{t.v===t.w&&r.add(t)}));n.length>0;){const i=n.shift();e.add(i);let o=t.node(i);o||t.setNode(i,o={}),o.rank=0;for(const n of t.inEdges(i)){const e=il((t.edge(n)||{}).delta,1);o.rank=Math.max(o.rank,t.node(n.v).rank+e)}for(const n of t.outEdges(i))r.add(n);for(const u of t.nodes())n.indexOf(u)<0&&!e.has(u)&&!t.inEdges(u).some((t=>!r.has(t)))&&n.push(u)}}(e),function(t){function n(n){const e=t.node(n),r=tl.min(t.outEdges(n).map((n=>t.node(n.w).rank-t.edge(n).delta)));void 0!==r&&(e.rank=r)}t.edges().forEach((e=>{t.edge(e).temp&&n(e.w)}))}(e),t.nodes().forEach((n=>{t.node(n)||t.setNode(n,{})})),e.nodes().forEach((n=>{const r=e.node(n);r.nodes.forEach((n=>{t.node(n).rank=r.rank}))}))}function ul(t,n,e){return function(t,n,e){let r,i,o;n.length>e.length?(r=n,i=e):(r=e,i=n);const u=[];r.forEach((n=>{i.forEach(((e,r)=>{(t.hasEdge(n,e)||t.hasEdge(e,n))&&u.push(r)}))}));let s=1;for(;s<o;)s*=2;const a=2*s-1;s-=1;const c=new Array(a);for(let f=0;f<a;f++)c[f]=0;let h=0;return u.forEach((t=>{let n=t+s;for(c[n]++;n>0;)n%2&&(h+=c[n+1]),n=Math.floor((n-1)/2),c[n]++})),h}(t,n,e)}function sl(t,n){let e=!0;for(;e;){e=!1;for(let r=0;r<n.length;++r)for(let i=0;i<n[r].length-1;++i){const o=al(t,n,r);cl(n[r],i,i+1);al(t,n,r)<o?e=!0:cl(n[r],i,i+1)}}}function al(t,n,e){let r=0;return e>0&&(r+=ul(t,n[e-1],n[e])),e+1<n.length&&(r+=ul(t,n[e],n[e+1])),r}function cl(t,n,e){const r=t[n];t[n]=t[e],t[e]=r}function hl(t){const n=Math.floor(t.length/2);if(0===t.length)return-1;if(t.length%2==1)return t[n];if(2===t.length)return(t[0]+t[1])/2;{const e=t[n-1]-t[0],r=t[t.length-1]-t[n];return(t[n-1]*r+t[n]*e)/(e+r)}}function fl(t,n,e=1,r=!1){if(e>0)for(let i=1;i<n.length;++i){const e=new Map;n[i].forEach((o=>{const u=hl(ll(t,n,i,i-1,o,r));e.set(o,u)})),dl(n[i],e)}else for(let i=n.length-2;i>=0;--i){const e=new Map;n[i].forEach((o=>{const u=hl(ll(t,n,i,i+1,o,r));e.set(o,u)})),dl(n[i],e)}}function ll(t,n,e,r,i,o=!1){const u=n[e],s=n[r],a=[];return s.forEach(((n,e)=>{t.nodeEdges(n,i).length>0&&a.push(e)})),0===a.length&&o&&u.forEach(((n,e)=>{t.nodeEdges(n,i).length>0&&a.push(e+.5)})),a.sort(((t,n)=>t-n)),a}function dl(t,n){const e=new Map(t.map(((t,n)=>[t,n])));for(let r=1;r<t.length;++r)for(let i=r;i>0;--i){let r=i-1,o=n.get(t[r]),u=n.get(t[i]);for(;-1===(o=n.get(t[r]))&&r>0;)r--;if(-1===u||-1===o)break;if(o===u&&(o=e.get(t[r]),u=e.get(t[i])),u>=o)break;[t[i],t[r]]=[t[r],t[i]]}}function pl(t,n=25){const e=function(t){const n=[];let e=t.nodes().filter((n=>0===t.node(n).rank)).concat(t.sources());return 0===e.length&&(e=t.nodes().slice(0,1)),Hf.alg.preorder(t,e).forEach((e=>{const r=t.node(e).rank;for(;r>=n.length;)n.push([]);n[r].push(e)})),n}(t);let r=e,i=0;for(;i++<n;)fl(t,e,i%2==0?1:0),sl(t,e),vl(t,e)<vl(t,r)&&(r=gl(e));return r=r.map((t=>[t])),r}function vl(t,n){let e=0;for(let r=0;r<n.length-1;++r)e+=ul(t,n[r],n[r+1]);return e}function gl(t){const n=[];for(const e of t){const t=[];n.push(t);for(const n of e)t.push(n)}return n}function yl(t,n,e,r){if(0===e.length)return;const i=e.map((e=>{const i=`__${n.v}_${n.w}_${e}`;return t.setNode(i,{rank:e,dummy:!0,data:null,direction:r}),i})),o=[n.v,...i,n.w];o.forEach(((e,r)=>{r+1<o.length&&t.setEdge(o[r],o[r+1],{source:t.node(n.v),target:t.node(n.w),data:t.edge(n).data},n.name)})),t.removeEdge(n)}function _l(){let t=[100,100],n=null,e=.5,r=function(t,n,e){return 1};const i=function(t){return t.data.value},o=function(t){return t.data?t.data.direction:"r"};function u(s,a){null===n&&u.scaleToFit(s,a),ml(s,i,o),function(t,n,e){t.nodes().forEach((n=>{const r=t.node(n);r.dy=r.value*e})),t.edges().forEach((r=>{const i=t.edge(r);i.value=n(i),i.dy=i.value*e}))}(s,i,n);const c=wl(s,a);a.forEach((n=>{let i=0;n.forEach(((n,o)=>{const u=c[o]/tl.sumBy(c)*t[1],a=0===i?0:e*u/5,h=u-2*a,f=tl.sumBy(n,(t=>s.node(t).dy)),l=n.map(((t,e)=>s.node(t).value&&n[e+1]?r(n[e],n[e+1],s):0)),d=Math.max(0,h-f),p=tl.sumBy(l)?d/tl.sumBy(l):0;let v=i+a;1===n.length&&(v+=(h-s.node(n[0]).dy)/2);let g=Number.MAX_VALUE;n.forEach(((t,n)=>{const e=s.node(t);e.y=v,e.spaceAbove=g,e.spaceBelow=l[n]*p,v+=e.dy+e.spaceBelow,g=e.spaceBelow,e.data&&void 0!==e.data.forceY&&(e.y=a+e.data.forceY*(h-e.dy))})),n.length>0&&(s.node(n[n.length-1]).spaceBelow=Number.MAX_VALUE),i+=u}))}));const h=function(t,n){const e=[];return n.forEach(((r,i)=>{if(i===n.length-1)return;let o=0;r.forEach((n=>{n.forEach((n=>{t.outEdges(n).forEach((n=>{const e=t.edge(n).dy,r=t.node(n.w).y-t.node(n.v).y,i=Math.abs(r)-e,u=e*e-i*i,s=u>=0?Math.sqrt(u):e;s>o&&(o=s)}))}))})),e.push(o)})),e}(s,a);!function(t,n,e,r){const i=tl.sumBy(r);let o;if(i>e)o=r.map((t=>e*t/i));else{const t=e-i;o=r.map((e=>e+t/(n.length-1)))}let u=0;n.forEach(((n,e)=>{n.forEach((n=>{n.forEach((n=>{t.node(n).x=u}))})),u+=o[e]}))}(s,a,t[0],h);const f=[];return s.nodes().forEach((t=>{const n=s.node(t);n.id=t,f.push(n)})),f}return u.scaleToFit=function(r,u){ml(r,i,o);const s=tl.sumBy(wl(r,u));s<=0?n=1:(n=t[1]/s,1!=e&&(n*=1-e))},u.size=function(n){return arguments.length?(t=n,u):t},u.separation=function(t){return arguments.length?(r=tl.isFunction(t)?t:()=>t,u):r},u.whitespace=function(t){return arguments.length?(e=t,u):e},u.scale=function(t){return arguments.length?(n=t,u):n},u}function ml(t,n,e){t.nodes().forEach((r=>{const i=tl.sumBy(t.inEdges(r),(e=>n(t.edge(e)))),o=tl.sumBy(t.outEdges(r),(e=>n(t.edge(e))));let u=t.node(r);u||t.setNode(r,u={}),u.value=Math.max(i,o),void 0===u.direction&&(u.direction=e(u)||"r")}))}function wl(t,n){if(0===n.length||0===n[0].length)return[];const e=n[0].length,r=new Array(e);for(let i=0;i<e;i++)r[i]=0;return n.forEach((n=>{n.forEach(((n,e)=>{const i=tl.sumBy(n,(n=>t.node(n).value));r[e]=Math.max(r[e],i)}))})),r}function bl(t,n){const e=t.inEdges(n),r=t.outEdges(n),i=new Map;[...e,...r].forEach((t=>{i.has(t.name)||i.set(t.name,[]),i.get(t.name).push(t)}));const o=new Map(Array.from(i.entries()).map((([e,r])=>{const i=tl.sumBy(r,(n=>t.edge(n).value));return[e,tl.sumBy(r,(e=>t.edge(e).value*function(e){if(e.v===n)return t.node(e.w).y;if(e.w===n)return t.node(e.v).y;throw new Error}(e)))/i]}))),u=Array.from(o.keys());return u.sort(),u}function xl(t,n){if(null===n.w)return 0;if(null===n.v)return 0;if(n.w===n.v)return Math.PI/2;{const e=t.node(n.v),r=t.node(n.w);return Math.atan2(r.y-e.y,r.x-e.x)}}function El(t,n=!0){return function(e,r){const i=xl(t,e),o=xl(t,r),u=n?1:-1;return e.v===r.v&&e.w===r.w?"number"==typeof e.name&&"number"==typeof r.name?e.name-r.name:"string"==typeof e.name&&"string"==typeof r.name?e.name.localeCompare(r.name):0:Math.abs(i-o)<.001?e.v&&e.w&&r.v&&r.w?e.w===r.w?-1*(t.node(e.v).y-t.node(r.v).y):e.v===r.v?-1*(t.node(e.w).y-t.node(r.w).y):0:0:u*(i-o)}}function jl(t,n,e=!0){return function(r,i){if(r.name!==i.name)return n.indexOf(r.name)-n.indexOf(i.name);const o=xl(t,r),u=xl(t,i),s=e?1:-1;return Math.abs(o-u)<.001?r.v&&r.w&&i.v&&i.w?r.w===i.w?s*(o>0?-1:1)*(t.node(r.v).y-t.node(i.v).y):r.v===i.v?s*(o>0?-1:1)*(t.node(r.w).y-t.node(i.w).y):0:0:s*(o-u)}}function Al(t,n){let e=null;for(let r=0;r<t.length;++r)if(n(t[r])){e=r;break}return e}function Ol(t,n){if(0===t.length)return;let e,r=0;for(let o=t.length-1;o>=0;--o)e=t[o].dy/2,t[o][n]-e<r&&(t[o][n]=Math.min(t[o].Rmax,r+e)),r=t[o][n]+e;let i=t[0].Rmax+t[0].dy/2;for(let o=0;o<t.length;++o)e=t[o].dy/2,t[o][n]+e>i&&(t[o][n]=Math.max(e,i-e)),i=t[o][n]-e}function Ml(t){return function(n){!function(t,n){t.nodes().forEach((e=>{const r=t.node(e);let i=0,o=0;r.outgoing.forEach((e=>{const o=t.edge(e);o.x0=r.x+n.nodeWidth/2,o.y0=r.y+i+o.dy/2,o.d0=r.direction||"r",i+=o.dy})),r.incoming.forEach((e=>{const i=t.edge(e);i.x1=r.x-n.nodeWidth/2,i.y1=r.y+o+i.dy/2,i.d1=r.direction||"r",o+=i.dy}))}))}(n,t),function(t){t.nodes().forEach((n=>{const e=t.node(n),r=e.outgoing.map((n=>t.edge(n))),i=e.incoming.map((n=>t.edge(n)));r.sort(((t,n)=>t.y0-n.y0)),i.sort(((t,n)=>t.y1-n.y1)),Sl(r,"r0"),Sl(i,"r1")}))}(n);const e=[];return n.edges().forEach((t=>{const r=n.edge(t);r.id=`${t.v}-${t.w}-${t.name}`,e.push(r)})),e}}function Sl(t,n){t.forEach((t=>{t.Rmax=function(t){const n=t.x1-t.x0,e=t.y1-t.y0;return t.d0!==t.d1?Math.abs(e)/2.1:0!==e?(n*n+e*e)/Math.abs(4*e):1/0}(t),t[n]=Math.max(t.dy/2,t.d0===t.d1?.6*t.Rmax:5+t.dy/2)}));let e=Al(t,"r0"===n?t=>t.y1>t.y0:t=>t.y0>t.y1);if(null===e&&(e=t.length),Ol(t.slice(e),n),e>0){const r=[];for(let n=e-1;n>=0;n--)r.push(t[n]);Ol(r,n)}}function kl(t){const n=_l(),e=Ml(t);let r=[],i=[],o=null;function u(t=[],u=[],s={}){const a=function(t=[],n=[]){const e=new Hf.Graph({directed:!0,multigraph:!0});return n.forEach((t=>{e.setEdge(t.source,t.target,{data:t},t.type)})),e.nodes().forEach((t=>e.setNode(t,{data:{}}))),t.forEach((t=>{e.hasNode(t.id)&&(e.node(t.id).data=t,void 0!==t.direction&&(e.node(t.id).direction=t.direction))})),e.edges().forEach((t=>{e.edge(t).source=e.node(t.v),e.edge(t).target=e.node(t.w)})),e}(u,t);var c;return s.order?(ol(a,s.rankSets||[]),o=s.order,o.length>0&&o[0].length>0&&!tl.isArray(o[0][0])&&(o=o.map((t=>[t]))),o=o.map((t=>t.map((t=>t.filter((t=>void 0!==a.node(t)))))))):(ol(a,s.rankSets||[]),(c=a).edges().forEach((t=>{const n=c.node(t.v),e=c.node(t.w);let r=n.rank;const i=[];if(r+1<=e.rank){for("l"===n.direction&&i.push(r);++r<e.rank;)i.push(r);"l"===e.direction&&i.push(r),yl(c,t,i,"r")}else if(r>e.rank){for("l"!==n.direction&&i.push(r);r-- >e.rank+1;)i.push(r);"l"!==e.direction&&i.push(r),yl(c,t,i,"l")}})),o=pl(a)),r=n(a,o),function(t,{alignLinkTypes:n=!1}={}){t.nodes().forEach((e=>{const r=t.node(e);if(r.incoming=t.inEdges(e),r.outgoing=t.outEdges(e),n){const n=bl(t,e);r.incoming.sort(jl(t,n,!1)),r.outgoing.sort(jl(t,n,!0))}else r.incoming.sort(El(t,!1)),r.outgoing.sort(El(t,!0))}))}(a,{alignLinkTypes:s.alignLinkTypes||!1}),i=e(a),a}return u.nodes=function(){return r},u.links=function(){return i},u.order=function(){return o},u.size=function(t){return arguments.length?(n.size(t),u):n.size()},u.separation=function(t){return arguments.length?(n.separation(t),u):n.separation()},u.whitespace=function(t){return arguments.length?(n.whitespace(t),u):n.whitespace()},u.edgeValue=function(t){return u},u.scale=function(t){return arguments.length?(n.scale(t),u):n.scale()},u}function Cl(t){const n=Math.max(0===t.dy?0:2,t.dy)/2;let e=t.x0,r=t.x1,i=t.y0,o=t.y1;r<e&&([e,r]=[r,e],[i,o]=[o,i]);const u=o>i?1:-1,s=function(t){const n=t.x1-t.x0,e=t.y1-t.y0;return[t.dy/2,(n*n+e*e)/Math.abs(4*e)]}(t),a=Math.max(s[0],Math.min(s[1],(r-e)/3));let c=Math.max(s[0],Math.min(s[1],t.r0||a)),h=Math.max(s[0],Math.min(s[1],t.r1||a));const f=r-e,l=o-i-u*(c+h),d=Math.sqrt(f*f+l*l),p=-u*Math.acos(Math.min(1,(c+h)/d)),v=Math.atan2(l,f);let g=Math.PI/2+u*(v+p),y=n*u*Math.sin(g),_=n*Math.cos(g),m=e+1*c*Math.sin(Math.abs(g)),w=r-1*h*Math.sin(Math.abs(g)),b=i+c*u*(1-Math.cos(g)),x=o-h*u*(1-Math.cos(g));function E(t,e){const r=t*(o-i)>0?1:0;let u=1*t*(o-i)>0?e+n:e-n;return 0===g&&(u=e),"A"+u+" "+u+" "+Math.abs(g)+" 0 "+r+" "}(isNaN(g)||Math.abs(g)<.001)&&(g=c=h=0,m=e,w=r,b=i,x=o,y=0,_=n);const j="M"+[e,i-n]+" "+E(1,c)+[m+y,b-_]+" L"+[w+y,x-_]+" "+E(-1,h)+[r,o-n]+" L"+[r,o+n]+" "+E(1,h)+[w-y,x+_]+" L"+[m-y,b+_]+" "+E(-1,c)+[e,i+n]+" Z";return/NaN/.test(j)&&console.error("path NaN",t,j),j}function Tl(t,n,e,r){const i=new Un;return i.attr({transform:void 0!==t&&void 0!==n?`translate(${t}, ${n})`:void 0,"data-self":e,"data-parent":r}),i}const Il=(t,n)=>{const e=void 0!==t.title?t.title:t.id;return n&&e.length>n?`${e.substr(0,15)}...`:e};function Nl(t,{fontColor:n,nodeWidth:e,maxRank:r}){const{data:i}=t,o=function(t,n){let e=!1,r=!1;return t.rank<n/2&&(r=!0,e=!1),{top:e,right:r}}(t,r),{x:u,y:s}=function(t,n,e){const r=n.top?-25:t.dy/2-10;let i;return i=n.top?n.right?4:-4:n.right?10+e/2:-e/2-10,{x:t.x+i,y:t.y+r}}(t,o,e),a=function(t="",{x:n,y:e,fontColor:r="#666767",textAnchor:i="start",pointerEvents:o="all"}){const u=new Fn;return u.font({fill:r}),u.tspan(t),void 0!==n&&void 0!==e&&u.move(n,e),u.attr({"text-anchor":i,"pointer-events":o}),u}(Il(i,o.top?25:15),{x:u,y:s,textAnchor:o.top?"middle":o.right?"start":"end",fontColor:n,pointerEvents:"none"});return a}function Rl(t,n,e){var r,i;const{x:o,y:u,dy:s}=t,{nodeWidth:a,nodeBorderWidth:c,nodeBorderColor:h,onNodeClick:f,fontColor:l}=e,d=new Un({class:"node"}),p=function({x:t=0,y:n=0,width:e=0,height:r=0,radius:i=0,color:o="#97cbe6",borderColor:u="#caced0",opacity:s=1}={}){const a=new jn;return a.attr({x:t,y:n,width:e,height:r,rx:i,ry:i,opacity:s}),a.fill(o),a.stroke({color:u,width:1}),a}({x:o-a/2,y:u,width:a,height:s});if(p.fill(null==(r=t.data)?void 0:r.color),p.stroke({width:c,color:h??(null==(i=t.data)?void 0:i.color)}),p.on("click",(()=>{"function"==typeof f&&f(t)})),d.add(p),t.data){const e=Nl(t,{fontColor:l,nodeWidth:a,maxRank:n});d.add(e)}return d}const zl=["#ACD5FC","#E37816","#07CC80","#0871D4","#CB8E55","#9FAE29","#427565","#6D55A6","#FEF445","#E177C2","#F48B7B","#D74B05","#AA896F","#14A14D","#C5114D"],Pl=(t="",n,e="")=>{const r=document.getElementById(t);n?null==r||r.setAttribute("style",n):null==r||r.removeAttribute("style"),(null==r?void 0:r.innerHTML.replaceAll("'",'"'))!==e.replaceAll("'",'"')&&r&&(r.innerHTML=e)},Dl=t=>t.replace(/[A-Z]+(?![a-z])|[A-Z]/g,((t,n)=>(n?"-":"")+t.toLowerCase()));class Ll extends te{constructor(t,n){super(t,n.width,n.height,n.canvasStyle,n.spacing),this.element=t,this.options=n}construct(t){const{width:n,height:e,spacing:r,nodeWidth:i}=this.options,o=kl({nodeWidth:i});o.size([n-i,e-r]);const u=t.nodes.map(((t,n)=>{const e=n%zl.length;return{...t,color:t.color??zl[e],colorIndex:e}})),s=o(t.edges,u,t.options);this.maxRank=o.order().length-1,this.graph=s}renderEdge(t,n){const{enableTooltip:e,tooltipId:r,tooltipBGColor:i,tooltipBorderColor:o,edgeOpacity:u,edgeGradientFill:s,tooltipTemplate:a}=this.options,c=this.graph.edge(t.v,t.w,t.name),h=this.graph.node(t.v),f=this.graph.node(t.w),l=Cl(c),d=this.canvas.gradient("linear",(function(t){var n,e,r;t.stop(0,null==(n=h.data)?void 0:n.color),t.stop(1,s?null==(e=f.data)?void 0:e.color:null==(r=h.data)?void 0:r.color)})),p=function(t,{id:n="",edgeColor:e,opacity:r=1}={}){const i=new wn({d:t});return i.id(n),i.fill(e).opacity(r),i}(l,{id:`${t.v}-${t.w}`,edgeColor:d,opacity:u});if(e&&h.data&&f.data){const t=a?a({source:h.data,target:f.data,value:c.value}):null;p.on("mousemove",(function(n){var e;const u=(s=n.pageX,a=n.pageY,["position: absolute;",`left: ${s+20}px;`,`top: ${a+20}px;`,`border: 1px solid ${o};`,"border-radius: 5px;",`background-color: ${i};`,"padding: 10px"]);var s,a;null==(e=Jn(`[id="${n.target.id}"]`))||e.front().opacity(1),Pl(r,u.join(" "),t)})),p.on("mouseout",(function(t){var n;Pl(r),null==(n=Jn(`[id="${t.target.id}"]`))||n.front().opacity(u)}))}n.add(p)}render({keepOldPosition:t=!1}={}){var n,e;const{nodeWidth:r,nodeBorderWidth:i,nodeBorderColor:o,enableTooltip:u,tooltipId:s,onNodeClick:a,fontColor:c,fontFamily:h,fontSize:f,fontWeight:l}=this.options,d=this.canvas.viewbox();this.clear();const p=((t={})=>{const n=[];for(const e in t){const r=`${Dl(e)}: ${t[e]};`;n.push(r)}return n.join(" ")})({fontSize:f,fontWeight:l,fontFamily:h,color:c}),v=Tl(r/2,0);v.attr("style",p);const g=(null==(n=this.graph)?void 0:n.nodes())||[],y=(null==(e=this.graph)?void 0:e.edges())||[],_=Tl();y.forEach((t=>{this.renderEdge(t,_)})),v.add(_);const m=Tl();if(g.forEach((t=>{const n=Rl(this.graph.node(t),this.maxRank,{nodeWidth:r,nodeBorderWidth:i,nodeBorderColor:o,onNodeClick:a,fontColor:c});m.add(n)})),v.add(m),this.add(v),t&&this.updateViewBox(d.x,d.y,d.width,d.height),u){const t=((t="apexsankey-tooltip-container")=>{const n=document.getElementById(t)||document.createElement("div");return n.id=t,n})(s);(document.body||document.getElementsByTagName("body")[0]).append(t)}}}const Fl={width:800,height:650,canvasStyle:"border: 1px solid #caced0",spacing:20,nodeWidth:20,nodeBorderWidth:1,nodeBorderColor:null,onNodeClick:void 0,edgeOpacity:.4,edgeGradientFill:!0,fontSize:"14px",fontFamily:"",fontWeight:400,fontColor:"#212121",enableTooltip:!0,tooltipId:"sankey-tooltip-container",tooltipBorderColor:"#BCBCBC",tooltipBGColor:"#FFFFFF",tooltipTemplate:({source:t,target:n,value:e})=>`\n <div style='display:flex;align-items:center;gap:5px;'>\n <div style='width:12px;height:12px;background-color:${t.color}'></div>\n <div>${t.title}</div>\n <div>=></div>\n <div style='width:12px;height:12px;background-color:${n.color}'></div>\n <div>${n.title}</div>\n <div>: ${e}</div> \n </div>\n `};return class{constructor(t,n){this.element=t,this.options={...Fl,...n};const e=document.createElement("div");e.id="apexSankeyWrapper",e.style.position="relative",this.graph=new Ll(e,this.options),this.element.append(e)}render(t){if(!this.element)throw new Error("Element not found");return this.graph.construct(t),this.graph.render(),this.graph}}}));
9
+ */r=o,i=o.exports,function(){var t,e="Expected a function",o="__lodash_hash_undefined__",s="__lodash_placeholder__",u=16,a=32,c=64,h=128,l=256,f=1/0,p=9007199254740991,d=NaN,v=4294967295,g=[["ary",h],["bind",1],["bindKey",2],["curry",8],["curryRight",u],["flip",512],["partial",a],["partialRight",c],["rearg",l]],_="[object Arguments]",m="[object Array]",y="[object Boolean]",w="[object Date]",b="[object Error]",x="[object Function]",E="[object GeneratorFunction]",A="[object Map]",j="[object Number]",O="[object Object]",M="[object Promise]",k="[object RegExp]",S="[object Set]",C="[object String]",T="[object Symbol]",I="[object WeakMap]",N="[object ArrayBuffer]",z="[object DataView]",R="[object Float32Array]",L="[object Float64Array]",D="[object Int8Array]",P="[object Int16Array]",F="[object Int32Array]",$="[object Uint8Array]",B="[object Uint8ClampedArray]",q="[object Uint16Array]",U="[object Uint32Array]",W=/\b__p \+= '';/g,Y=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,X=/&(?:amp|lt|gt|quot|#39);/g,G=/[&<>"']/g,Z=RegExp(X.source),H=RegExp(G.source),Q=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,K=/<%=([\s\S]+?)%>/g,tt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nt=/^\w*$/,et=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rt=/[\\^$.*+?()[\]{}|]/g,it=RegExp(rt.source),ot=/^\s+/,st=/\s/,ut=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,at=/\{\n\/\* \[wrapped with (.+)\] \*/,ct=/,? & /,ht=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,lt=/[()=,{}\[\]\/\s]/,ft=/\\(\\)?/g,pt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dt=/\w*$/,vt=/^[-+]0x[0-9a-f]+$/i,gt=/^0b[01]+$/i,_t=/^\[object .+?Constructor\]$/,mt=/^0o[0-7]+$/i,yt=/^(?:0|[1-9]\d*)$/,wt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bt=/($^)/,xt=/['\n\r\u2028\u2029\\]/g,Et="\\ud800-\\udfff",At="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",jt="\\u2700-\\u27bf",Ot="a-z\\xdf-\\xf6\\xf8-\\xff",Mt="A-Z\\xc0-\\xd6\\xd8-\\xde",kt="\\ufe0e\\ufe0f",St="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ct="['’]",Tt="["+Et+"]",It="["+St+"]",Nt="["+At+"]",zt="\\d+",Rt="["+jt+"]",Lt="["+Ot+"]",Dt="[^"+Et+St+zt+jt+Ot+Mt+"]",Pt="\\ud83c[\\udffb-\\udfff]",Ft="[^"+Et+"]",$t="(?:\\ud83c[\\udde6-\\uddff]){2}",Bt="[\\ud800-\\udbff][\\udc00-\\udfff]",qt="["+Mt+"]",Ut="\\u200d",Wt="(?:"+Lt+"|"+Dt+")",Yt="(?:"+qt+"|"+Dt+")",Vt="(?:['’](?:d|ll|m|re|s|t|ve))?",Xt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Gt="(?:"+Nt+"|"+Pt+")?",Zt="["+kt+"]?",Ht=Zt+Gt+"(?:"+Ut+"(?:"+[Ft,$t,Bt].join("|")+")"+Zt+Gt+")*",Qt="(?:"+[Rt,$t,Bt].join("|")+")"+Ht,Jt="(?:"+[Ft+Nt+"?",Nt,$t,Bt,Tt].join("|")+")",Kt=RegExp(Ct,"g"),tn=RegExp(Nt,"g"),nn=RegExp(Pt+"(?="+Pt+")|"+Jt+Ht,"g"),en=RegExp([qt+"?"+Lt+"+"+Vt+"(?="+[It,qt,"$"].join("|")+")",Yt+"+"+Xt+"(?="+[It,qt+Wt,"$"].join("|")+")",qt+"?"+Wt+"+"+Vt,qt+"+"+Xt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",zt,Qt].join("|"),"g"),rn=RegExp("["+Ut+Et+At+kt+"]"),on=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,sn=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],un=-1,an={};an[R]=an[L]=an[D]=an[P]=an[F]=an[$]=an[B]=an[q]=an[U]=!0,an[_]=an[m]=an[N]=an[y]=an[z]=an[w]=an[b]=an[x]=an[A]=an[j]=an[O]=an[k]=an[S]=an[C]=an[I]=!1;var cn={};cn[_]=cn[m]=cn[N]=cn[z]=cn[y]=cn[w]=cn[R]=cn[L]=cn[D]=cn[P]=cn[F]=cn[A]=cn[j]=cn[O]=cn[k]=cn[S]=cn[C]=cn[T]=cn[$]=cn[B]=cn[q]=cn[U]=!0,cn[b]=cn[x]=cn[I]=!1;var hn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ln=parseFloat,fn=parseInt,pn="object"==typeof n&&n&&n.Object===Object&&n,dn="object"==typeof self&&self&&self.Object===Object&&self,vn=pn||dn||Function("return this")(),gn=i&&!i.nodeType&&i,_n=gn&&r&&!r.nodeType&&r,mn=_n&&_n.exports===gn,yn=mn&&pn.process,wn=function(){try{var t=_n&&_n.require&&_n.require("util").types;return t||yn&&yn.binding&&yn.binding("util")}catch(n){}}(),bn=wn&&wn.isArrayBuffer,xn=wn&&wn.isDate,En=wn&&wn.isMap,An=wn&&wn.isRegExp,jn=wn&&wn.isSet,On=wn&&wn.isTypedArray;function Mn(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}function kn(t,n,e,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var s=t[i];n(r,s,e(s),t)}return r}function Sn(t,n){for(var e=-1,r=null==t?0:t.length;++e<r&&!1!==n(t[e],e,t););return t}function Cn(t,n){for(var e=null==t?0:t.length;e--&&!1!==n(t[e],e,t););return t}function Tn(t,n){for(var e=-1,r=null==t?0:t.length;++e<r;)if(!n(t[e],e,t))return!1;return!0}function In(t,n){for(var e=-1,r=null==t?0:t.length,i=0,o=[];++e<r;){var s=t[e];n(s,e,t)&&(o[i++]=s)}return o}function Nn(t,n){return!(null==t||!t.length)&&Un(t,n,0)>-1}function zn(t,n,e){for(var r=-1,i=null==t?0:t.length;++r<i;)if(e(n,t[r]))return!0;return!1}function Rn(t,n){for(var e=-1,r=null==t?0:t.length,i=Array(r);++e<r;)i[e]=n(t[e],e,t);return i}function Ln(t,n){for(var e=-1,r=n.length,i=t.length;++e<r;)t[i+e]=n[e];return t}function Dn(t,n,e,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(e=t[++i]);++i<o;)e=n(e,t[i],i,t);return e}function Pn(t,n,e,r){var i=null==t?0:t.length;for(r&&i&&(e=t[--i]);i--;)e=n(e,t[i],i,t);return e}function Fn(t,n){for(var e=-1,r=null==t?0:t.length;++e<r;)if(n(t[e],e,t))return!0;return!1}var $n=Xn("length");function Bn(t,n,e){var r;return e(t,(function(t,e,i){if(n(t,e,i))return r=e,!1})),r}function qn(t,n,e,r){for(var i=t.length,o=e+(r?1:-1);r?o--:++o<i;)if(n(t[o],o,t))return o;return-1}function Un(t,n,e){return n==n?function(t,n,e){for(var r=e-1,i=t.length;++r<i;)if(t[r]===n)return r;return-1}(t,n,e):qn(t,Yn,e)}function Wn(t,n,e,r){for(var i=e-1,o=t.length;++i<o;)if(r(t[i],n))return i;return-1}function Yn(t){return t!=t}function Vn(t,n){var e=null==t?0:t.length;return e?Hn(t,n)/e:d}function Xn(n){return function(e){return null==e?t:e[n]}}function Gn(n){return function(e){return null==n?t:n[e]}}function Zn(t,n,e,r,i){return i(t,(function(t,i,o){e=r?(r=!1,t):n(e,t,i,o)})),e}function Hn(n,e){for(var r,i=-1,o=n.length;++i<o;){var s=e(n[i]);s!==t&&(r=r===t?s:r+s)}return r}function Qn(t,n){for(var e=-1,r=Array(t);++e<t;)r[e]=n(e);return r}function Jn(t){return t?t.slice(0,de(t)+1).replace(ot,""):t}function Kn(t){return function(n){return t(n)}}function te(t,n){return Rn(n,(function(n){return t[n]}))}function ne(t,n){return t.has(n)}function ee(t,n){for(var e=-1,r=t.length;++e<r&&Un(n,t[e],0)>-1;);return e}function re(t,n){for(var e=t.length;e--&&Un(n,t[e],0)>-1;);return e}var ie=Gn({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),oe=Gn({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function se(t){return"\\"+hn[t]}function ue(t){return rn.test(t)}function ae(t){var n=-1,e=Array(t.size);return t.forEach((function(t,r){e[++n]=[r,t]})),e}function ce(t,n){return function(e){return t(n(e))}}function he(t,n){for(var e=-1,r=t.length,i=0,o=[];++e<r;){var u=t[e];u!==n&&u!==s||(t[e]=s,o[i++]=e)}return o}function le(t){var n=-1,e=Array(t.size);return t.forEach((function(t){e[++n]=t})),e}function fe(t){return ue(t)?function(t){for(var n=nn.lastIndex=0;nn.test(t);)++n;return n}(t):$n(t)}function pe(t){return ue(t)?function(t){return t.match(nn)||[]}(t):function(t){return t.split("")}(t)}function de(t){for(var n=t.length;n--&&st.test(t.charAt(n)););return n}var ve=Gn({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"}),ge=function n(r){var i,st=(r=null==r?vn:ge.defaults(vn.Object(),r,ge.pick(vn,sn))).Array,Et=r.Date,At=r.Error,jt=r.Function,Ot=r.Math,Mt=r.Object,kt=r.RegExp,St=r.String,Ct=r.TypeError,Tt=st.prototype,It=jt.prototype,Nt=Mt.prototype,zt=r["__core-js_shared__"],Rt=It.toString,Lt=Nt.hasOwnProperty,Dt=0,Pt=(i=/[^.]+$/.exec(zt&&zt.keys&&zt.keys.IE_PROTO||""))?"Symbol(src)_1."+i:"",Ft=Nt.toString,$t=Rt.call(Mt),Bt=vn._,qt=kt("^"+Rt.call(Lt).replace(rt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ut=mn?r.Buffer:t,Wt=r.Symbol,Yt=r.Uint8Array,Vt=Ut?Ut.allocUnsafe:t,Xt=ce(Mt.getPrototypeOf,Mt),Gt=Mt.create,Zt=Nt.propertyIsEnumerable,Ht=Tt.splice,Qt=Wt?Wt.isConcatSpreadable:t,Jt=Wt?Wt.iterator:t,nn=Wt?Wt.toStringTag:t,rn=function(){try{var t=lo(Mt,"defineProperty");return t({},"",{}),t}catch(n){}}(),hn=r.clearTimeout!==vn.clearTimeout&&r.clearTimeout,pn=Et&&Et.now!==vn.Date.now&&Et.now,dn=r.setTimeout!==vn.setTimeout&&r.setTimeout,gn=Ot.ceil,_n=Ot.floor,yn=Mt.getOwnPropertySymbols,wn=Ut?Ut.isBuffer:t,$n=r.isFinite,Gn=Tt.join,_e=ce(Mt.keys,Mt),me=Ot.max,ye=Ot.min,we=Et.now,be=r.parseInt,xe=Ot.random,Ee=Tt.reverse,Ae=lo(r,"DataView"),je=lo(r,"Map"),Oe=lo(r,"Promise"),Me=lo(r,"Set"),ke=lo(r,"WeakMap"),Se=lo(Mt,"create"),Ce=ke&&new ke,Te={},Ie=Bo(Ae),Ne=Bo(je),ze=Bo(Oe),Re=Bo(Me),Le=Bo(ke),De=Wt?Wt.prototype:t,Pe=De?De.valueOf:t,Fe=De?De.toString:t;function $e(t){if(iu(t)&&!Xs(t)&&!(t instanceof We)){if(t instanceof Ue)return t;if(Lt.call(t,"__wrapped__"))return qo(t)}return new Ue(t)}var Be=function(){function n(){}return function(e){if(!ru(e))return{};if(Gt)return Gt(e);n.prototype=e;var r=new n;return n.prototype=t,r}}();function qe(){}function Ue(n,e){this.__wrapped__=n,this.__actions__=[],this.__chain__=!!e,this.__index__=0,this.__values__=t}function We(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=v,this.__views__=[]}function Ye(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function Ve(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function Xe(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function Ge(t){var n=-1,e=null==t?0:t.length;for(this.__data__=new Xe;++n<e;)this.add(t[n])}function Ze(t){var n=this.__data__=new Ve(t);this.size=n.size}function He(t,n){var e=Xs(t),r=!e&&Vs(t),i=!e&&!r&&Qs(t),o=!e&&!r&&!i&&fu(t),s=e||r||i||o,u=s?Qn(t.length,St):[],a=u.length;for(var c in t)!n&&!Lt.call(t,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||yo(c,a))||u.push(c);return u}function Qe(n){var e=n.length;return e?n[Gr(0,e-1)]:t}function Je(t,n){return Ro(Si(t),ur(n,0,t.length))}function Ke(t){return Ro(Si(t))}function tr(n,e,r){(r!==t&&!Us(n[e],r)||r===t&&!(e in n))&&or(n,e,r)}function nr(n,e,r){var i=n[e];Lt.call(n,e)&&Us(i,r)&&(r!==t||e in n)||or(n,e,r)}function er(t,n){for(var e=t.length;e--;)if(Us(t[e][0],n))return e;return-1}function rr(t,n,e,r){return fr(t,(function(t,i,o){n(r,t,e(t),o)})),r}function ir(t,n){return t&&Ci(n,zu(n),t)}function or(t,n,e){"__proto__"==n&&rn?rn(t,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[n]=e}function sr(n,e){for(var r=-1,i=e.length,o=st(i),s=null==n;++r<i;)o[r]=s?t:Su(n,e[r]);return o}function ur(n,e,r){return n==n&&(r!==t&&(n=n<=r?n:r),e!==t&&(n=n>=e?n:e)),n}function ar(n,e,r,i,o,s){var u,a=1&e,c=2&e,h=4&e;if(r&&(u=o?r(n,i,o,s):r(n)),u!==t)return u;if(!ru(n))return n;var l=Xs(n);if(l){if(u=function(t){var n=t.length,e=new t.constructor(n);return n&&"string"==typeof t[0]&&Lt.call(t,"index")&&(e.index=t.index,e.input=t.input),e}(n),!a)return Si(n,u)}else{var f=vo(n),p=f==x||f==E;if(Qs(n))return Ei(n,a);if(f==O||f==_||p&&!o){if(u=c||p?{}:_o(n),!a)return c?function(t,n){return Ci(t,po(t),n)}(n,function(t,n){return t&&Ci(n,Ru(n),t)}(u,n)):function(t,n){return Ci(t,fo(t),n)}(n,ir(u,n))}else{if(!cn[f])return o?n:{};u=function(t,n,e){var r,i=t.constructor;switch(n){case N:return Ai(t);case y:case w:return new i(+t);case z:return function(t,n){var e=n?Ai(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}(t,e);case R:case L:case D:case P:case F:case $:case B:case q:case U:return ji(t,e);case A:return new i;case j:case C:return new i(t);case k:return function(t){var n=new t.constructor(t.source,dt.exec(t));return n.lastIndex=t.lastIndex,n}(t);case S:return new i;case T:return r=t,Pe?Mt(Pe.call(r)):{}}}(n,f,a)}}s||(s=new Ze);var d=s.get(n);if(d)return d;s.set(n,u),cu(n)?n.forEach((function(t){u.add(ar(t,e,r,t,n,s))})):ou(n)&&n.forEach((function(t,i){u.set(i,ar(t,e,r,i,n,s))}));var v=l?t:(h?c?io:ro:c?Ru:zu)(n);return Sn(v||n,(function(t,i){v&&(t=n[i=t]),nr(u,i,ar(t,e,r,i,n,s))})),u}function cr(n,e,r){var i=r.length;if(null==n)return!i;for(n=Mt(n);i--;){var o=r[i],s=e[o],u=n[o];if(u===t&&!(o in n)||!s(u))return!1}return!0}function hr(n,r,i){if("function"!=typeof n)throw new Ct(e);return To((function(){n.apply(t,i)}),r)}function lr(t,n,e,r){var i=-1,o=Nn,s=!0,u=t.length,a=[],c=n.length;if(!u)return a;e&&(n=Rn(n,Kn(e))),r?(o=zn,s=!1):n.length>=200&&(o=ne,s=!1,n=new Ge(n));t:for(;++i<u;){var h=t[i],l=null==e?h:e(h);if(h=r||0!==h?h:0,s&&l==l){for(var f=c;f--;)if(n[f]===l)continue t;a.push(h)}else o(n,l,r)||a.push(h)}return a}$e.templateSettings={escape:Q,evaluate:J,interpolate:K,variable:"",imports:{_:$e}},$e.prototype=qe.prototype,$e.prototype.constructor=$e,Ue.prototype=Be(qe.prototype),Ue.prototype.constructor=Ue,We.prototype=Be(qe.prototype),We.prototype.constructor=We,Ye.prototype.clear=function(){this.__data__=Se?Se(null):{},this.size=0},Ye.prototype.delete=function(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n},Ye.prototype.get=function(n){var e=this.__data__;if(Se){var r=e[n];return r===o?t:r}return Lt.call(e,n)?e[n]:t},Ye.prototype.has=function(n){var e=this.__data__;return Se?e[n]!==t:Lt.call(e,n)},Ye.prototype.set=function(n,e){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=Se&&e===t?o:e,this},Ve.prototype.clear=function(){this.__data__=[],this.size=0},Ve.prototype.delete=function(t){var n=this.__data__,e=er(n,t);return!(e<0||(e==n.length-1?n.pop():Ht.call(n,e,1),--this.size,0))},Ve.prototype.get=function(n){var e=this.__data__,r=er(e,n);return r<0?t:e[r][1]},Ve.prototype.has=function(t){return er(this.__data__,t)>-1},Ve.prototype.set=function(t,n){var e=this.__data__,r=er(e,t);return r<0?(++this.size,e.push([t,n])):e[r][1]=n,this},Xe.prototype.clear=function(){this.size=0,this.__data__={hash:new Ye,map:new(je||Ve),string:new Ye}},Xe.prototype.delete=function(t){var n=co(this,t).delete(t);return this.size-=n?1:0,n},Xe.prototype.get=function(t){return co(this,t).get(t)},Xe.prototype.has=function(t){return co(this,t).has(t)},Xe.prototype.set=function(t,n){var e=co(this,t),r=e.size;return e.set(t,n),this.size+=e.size==r?0:1,this},Ge.prototype.add=Ge.prototype.push=function(t){return this.__data__.set(t,o),this},Ge.prototype.has=function(t){return this.__data__.has(t)},Ze.prototype.clear=function(){this.__data__=new Ve,this.size=0},Ze.prototype.delete=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e},Ze.prototype.get=function(t){return this.__data__.get(t)},Ze.prototype.has=function(t){return this.__data__.has(t)},Ze.prototype.set=function(t,n){var e=this.__data__;if(e instanceof Ve){var r=e.__data__;if(!je||r.length<199)return r.push([t,n]),this.size=++e.size,this;e=this.__data__=new Xe(r)}return e.set(t,n),this.size=e.size,this};var fr=Ni(wr),pr=Ni(br,!0);function dr(t,n){var e=!0;return fr(t,(function(t,r,i){return e=!!n(t,r,i)})),e}function vr(n,e,r){for(var i=-1,o=n.length;++i<o;){var s=n[i],u=e(s);if(null!=u&&(a===t?u==u&&!lu(u):r(u,a)))var a=u,c=s}return c}function gr(t,n){var e=[];return fr(t,(function(t,r,i){n(t,r,i)&&e.push(t)})),e}function _r(t,n,e,r,i){var o=-1,s=t.length;for(e||(e=mo),i||(i=[]);++o<s;){var u=t[o];n>0&&e(u)?n>1?_r(u,n-1,e,r,i):Ln(i,u):r||(i[i.length]=u)}return i}var mr=zi(),yr=zi(!0);function wr(t,n){return t&&mr(t,n,zu)}function br(t,n){return t&&yr(t,n,zu)}function xr(t,n){return In(n,(function(n){return tu(t[n])}))}function Er(n,e){for(var r=0,i=(e=yi(e,n)).length;null!=n&&r<i;)n=n[$o(e[r++])];return r&&r==i?n:t}function Ar(t,n,e){var r=n(t);return Xs(t)?r:Ln(r,e(t))}function jr(n){return null==n?n===t?"[object Undefined]":"[object Null]":nn&&nn in Mt(n)?function(n){var e=Lt.call(n,nn),r=n[nn];try{n[nn]=t;var i=!0}catch(s){}var o=Ft.call(n);return i&&(e?n[nn]=r:delete n[nn]),o}(n):function(t){return Ft.call(t)}(n)}function Or(t,n){return t>n}function Mr(t,n){return null!=t&&Lt.call(t,n)}function kr(t,n){return null!=t&&n in Mt(t)}function Sr(n,e,r){for(var i=r?zn:Nn,o=n[0].length,s=n.length,u=s,a=st(s),c=1/0,h=[];u--;){var l=n[u];u&&e&&(l=Rn(l,Kn(e))),c=ye(l.length,c),a[u]=!r&&(e||o>=120&&l.length>=120)?new Ge(u&&l):t}l=n[0];var f=-1,p=a[0];t:for(;++f<o&&h.length<c;){var d=l[f],v=e?e(d):d;if(d=r||0!==d?d:0,!(p?ne(p,v):i(h,v,r))){for(u=s;--u;){var g=a[u];if(!(g?ne(g,v):i(n[u],v,r)))continue t}p&&p.push(v),h.push(d)}}return h}function Cr(n,e,r){var i=null==(n=ko(n,e=yi(e,n)))?n:n[$o(Ko(e))];return null==i?t:Mn(i,n,r)}function Tr(t){return iu(t)&&jr(t)==_}function Ir(n,e,r,i,o){return n===e||(null==n||null==e||!iu(n)&&!iu(e)?n!=n&&e!=e:function(n,e,r,i,o,s){var u=Xs(n),a=Xs(e),c=u?m:vo(n),h=a?m:vo(e),l=(c=c==_?O:c)==O,f=(h=h==_?O:h)==O,p=c==h;if(p&&Qs(n)){if(!Qs(e))return!1;u=!0,l=!1}if(p&&!l)return s||(s=new Ze),u||fu(n)?no(n,e,r,i,o,s):function(t,n,e,r,i,o,s){switch(e){case z:if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case N:return!(t.byteLength!=n.byteLength||!o(new Yt(t),new Yt(n)));case y:case w:case j:return Us(+t,+n);case b:return t.name==n.name&&t.message==n.message;case k:case C:return t==n+"";case A:var u=ae;case S:var a=1&r;if(u||(u=le),t.size!=n.size&&!a)return!1;var c=s.get(t);if(c)return c==n;r|=2,s.set(t,n);var h=no(u(t),u(n),r,i,o,s);return s.delete(t),h;case T:if(Pe)return Pe.call(t)==Pe.call(n)}return!1}(n,e,c,r,i,o,s);if(!(1&r)){var d=l&&Lt.call(n,"__wrapped__"),v=f&&Lt.call(e,"__wrapped__");if(d||v){var g=d?n.value():n,x=v?e.value():e;return s||(s=new Ze),o(g,x,r,i,s)}}return!!p&&(s||(s=new Ze),function(n,e,r,i,o,s){var u=1&r,a=ro(n),c=a.length,h=ro(e),l=h.length;if(c!=l&&!u)return!1;for(var f=c;f--;){var p=a[f];if(!(u?p in e:Lt.call(e,p)))return!1}var d=s.get(n),v=s.get(e);if(d&&v)return d==e&&v==n;var g=!0;s.set(n,e),s.set(e,n);for(var _=u;++f<c;){var m=n[p=a[f]],y=e[p];if(i)var w=u?i(y,m,p,e,n,s):i(m,y,p,n,e,s);if(!(w===t?m===y||o(m,y,r,i,s):w)){g=!1;break}_||(_="constructor"==p)}if(g&&!_){var b=n.constructor,x=e.constructor;b==x||!("constructor"in n)||!("constructor"in e)||"function"==typeof b&&b instanceof b&&"function"==typeof x&&x instanceof x||(g=!1)}return s.delete(n),s.delete(e),g}(n,e,r,i,o,s))}(n,e,r,i,Ir,o))}function Nr(n,e,r,i){var o=r.length,s=o,u=!i;if(null==n)return!s;for(n=Mt(n);o--;){var a=r[o];if(u&&a[2]?a[1]!==n[a[0]]:!(a[0]in n))return!1}for(;++o<s;){var c=(a=r[o])[0],h=n[c],l=a[1];if(u&&a[2]){if(h===t&&!(c in n))return!1}else{var f=new Ze;if(i)var p=i(h,l,c,n,e,f);if(!(p===t?Ir(l,h,3,i,f):p))return!1}}return!0}function zr(t){return!(!ru(t)||(n=t,Pt&&Pt in n))&&(tu(t)?qt:_t).test(Bo(t));var n}function Rr(t){return"function"==typeof t?t:null==t?sa:"object"==typeof t?Xs(t)?Br(t[0],t[1]):$r(t):va(t)}function Lr(t){if(!Ao(t))return _e(t);var n=[];for(var e in Mt(t))Lt.call(t,e)&&"constructor"!=e&&n.push(e);return n}function Dr(t){if(!ru(t))return function(t){var n=[];if(null!=t)for(var e in Mt(t))n.push(e);return n}(t);var n=Ao(t),e=[];for(var r in t)("constructor"!=r||!n&&Lt.call(t,r))&&e.push(r);return e}function Pr(t,n){return t<n}function Fr(t,n){var e=-1,r=Zs(t)?st(t.length):[];return fr(t,(function(t,i,o){r[++e]=n(t,i,o)})),r}function $r(t){var n=ho(t);return 1==n.length&&n[0][2]?Oo(n[0][0],n[0][1]):function(e){return e===t||Nr(e,t,n)}}function Br(n,e){return bo(n)&&jo(e)?Oo($o(n),e):function(r){var i=Su(r,n);return i===t&&i===e?Cu(r,n):Ir(e,i,3)}}function qr(n,e,r,i,o){n!==e&&mr(e,(function(s,u){if(o||(o=new Ze),ru(s))!function(n,e,r,i,o,s,u){var a=So(n,r),c=So(e,r),h=u.get(c);if(h)tr(n,r,h);else{var l=s?s(a,c,r+"",n,e,u):t,f=l===t;if(f){var p=Xs(c),d=!p&&Qs(c),v=!p&&!d&&fu(c);l=c,p||d||v?Xs(a)?l=a:Hs(a)?l=Si(a):d?(f=!1,l=Ei(c,!0)):v?(f=!1,l=ji(c,!0)):l=[]:uu(c)||Vs(c)?(l=a,Vs(a)?l=wu(a):ru(a)&&!tu(a)||(l=_o(c))):f=!1}f&&(u.set(c,l),o(l,c,i,s,u),u.delete(c)),tr(n,r,l)}}(n,e,u,r,qr,i,o);else{var a=i?i(So(n,u),s,u+"",n,e,o):t;a===t&&(a=s),tr(n,u,a)}}),Ru)}function Ur(n,e){var r=n.length;if(r)return yo(e+=e<0?r:0,r)?n[e]:t}function Wr(t,n,e){n=n.length?Rn(n,(function(t){return Xs(t)?function(n){return Er(n,1===t.length?t[0]:t)}:t})):[sa];var r=-1;return n=Rn(n,Kn(ao())),function(t,n){var e=t.length;for(t.sort(n);e--;)t[e]=t[e].value;return t}(Fr(t,(function(t,e,i){return{criteria:Rn(n,(function(n){return n(t)})),index:++r,value:t}})),(function(t,n){return function(t,n,e){for(var r=-1,i=t.criteria,o=n.criteria,s=i.length,u=e.length;++r<s;){var a=Oi(i[r],o[r]);if(a)return r>=u?a:a*("desc"==e[r]?-1:1)}return t.index-n.index}(t,n,e)}))}function Yr(t,n,e){for(var r=-1,i=n.length,o={};++r<i;){var s=n[r],u=Er(t,s);e(u,s)&&Kr(o,yi(s,t),u)}return o}function Vr(t,n,e,r){var i=r?Wn:Un,o=-1,s=n.length,u=t;for(t===n&&(n=Si(n)),e&&(u=Rn(t,Kn(e)));++o<s;)for(var a=0,c=n[o],h=e?e(c):c;(a=i(u,h,a,r))>-1;)u!==t&&Ht.call(u,a,1),Ht.call(t,a,1);return t}function Xr(t,n){for(var e=t?n.length:0,r=e-1;e--;){var i=n[e];if(e==r||i!==o){var o=i;yo(i)?Ht.call(t,i,1):li(t,i)}}return t}function Gr(t,n){return t+_n(xe()*(n-t+1))}function Zr(t,n){var e="";if(!t||n<1||n>p)return e;do{n%2&&(e+=t),(n=_n(n/2))&&(t+=t)}while(n);return e}function Hr(t,n){return Io(Mo(t,n,sa),t+"")}function Qr(t){return Qe(Uu(t))}function Jr(t,n){var e=Uu(t);return Ro(e,ur(n,0,e.length))}function Kr(n,e,r,i){if(!ru(n))return n;for(var o=-1,s=(e=yi(e,n)).length,u=s-1,a=n;null!=a&&++o<s;){var c=$o(e[o]),h=r;if("__proto__"===c||"constructor"===c||"prototype"===c)return n;if(o!=u){var l=a[c];(h=i?i(l,c,a):t)===t&&(h=ru(l)?l:yo(e[o+1])?[]:{})}nr(a,c,h),a=a[c]}return n}var ti=Ce?function(t,n){return Ce.set(t,n),t}:sa,ni=rn?function(t,n){return rn(t,"toString",{configurable:!0,enumerable:!1,value:ra(n),writable:!0})}:sa;function ei(t){return Ro(Uu(t))}function ri(t,n,e){var r=-1,i=t.length;n<0&&(n=-n>i?0:i+n),(e=e>i?i:e)<0&&(e+=i),i=n>e?0:e-n>>>0,n>>>=0;for(var o=st(i);++r<i;)o[r]=t[r+n];return o}function ii(t,n){var e;return fr(t,(function(t,r,i){return!(e=n(t,r,i))})),!!e}function oi(t,n,e){var r=0,i=null==t?r:t.length;if("number"==typeof n&&n==n&&i<=2147483647){for(;r<i;){var o=r+i>>>1,s=t[o];null!==s&&!lu(s)&&(e?s<=n:s<n)?r=o+1:i=o}return i}return si(t,n,sa,e)}function si(n,e,r,i){var o=0,s=null==n?0:n.length;if(0===s)return 0;for(var u=(e=r(e))!=e,a=null===e,c=lu(e),h=e===t;o<s;){var l=_n((o+s)/2),f=r(n[l]),p=f!==t,d=null===f,v=f==f,g=lu(f);if(u)var _=i||v;else _=h?v&&(i||p):a?v&&p&&(i||!d):c?v&&p&&!d&&(i||!g):!d&&!g&&(i?f<=e:f<e);_?o=l+1:s=l}return ye(s,4294967294)}function ui(t,n){for(var e=-1,r=t.length,i=0,o=[];++e<r;){var s=t[e],u=n?n(s):s;if(!e||!Us(u,a)){var a=u;o[i++]=0===s?0:s}}return o}function ai(t){return"number"==typeof t?t:lu(t)?d:+t}function ci(t){if("string"==typeof t)return t;if(Xs(t))return Rn(t,ci)+"";if(lu(t))return Fe?Fe.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}function hi(t,n,e){var r=-1,i=Nn,o=t.length,s=!0,u=[],a=u;if(e)s=!1,i=zn;else if(o>=200){var c=n?null:Zi(t);if(c)return le(c);s=!1,i=ne,a=new Ge}else a=n?[]:u;t:for(;++r<o;){var h=t[r],l=n?n(h):h;if(h=e||0!==h?h:0,s&&l==l){for(var f=a.length;f--;)if(a[f]===l)continue t;n&&a.push(l),u.push(h)}else i(a,l,e)||(a!==u&&a.push(l),u.push(h))}return u}function li(t,n){return null==(t=ko(t,n=yi(n,t)))||delete t[$o(Ko(n))]}function fi(t,n,e,r){return Kr(t,n,e(Er(t,n)),r)}function pi(t,n,e,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&n(t[o],o,t););return e?ri(t,r?0:o,r?o+1:i):ri(t,r?o+1:0,r?i:o)}function di(t,n){var e=t;return e instanceof We&&(e=e.value()),Dn(n,(function(t,n){return n.func.apply(n.thisArg,Ln([t],n.args))}),e)}function vi(t,n,e){var r=t.length;if(r<2)return r?hi(t[0]):[];for(var i=-1,o=st(r);++i<r;)for(var s=t[i],u=-1;++u<r;)u!=i&&(o[i]=lr(o[i]||s,t[u],n,e));return hi(_r(o,1),n,e)}function gi(n,e,r){for(var i=-1,o=n.length,s=e.length,u={};++i<o;){var a=i<s?e[i]:t;r(u,n[i],a)}return u}function _i(t){return Hs(t)?t:[]}function mi(t){return"function"==typeof t?t:sa}function yi(t,n){return Xs(t)?t:bo(t,n)?[t]:Fo(bu(t))}var wi=Hr;function bi(n,e,r){var i=n.length;return r=r===t?i:r,!e&&r>=i?n:ri(n,e,r)}var xi=hn||function(t){return vn.clearTimeout(t)};function Ei(t,n){if(n)return t.slice();var e=t.length,r=Vt?Vt(e):new t.constructor(e);return t.copy(r),r}function Ai(t){var n=new t.constructor(t.byteLength);return new Yt(n).set(new Yt(t)),n}function ji(t,n){var e=n?Ai(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}function Oi(n,e){if(n!==e){var r=n!==t,i=null===n,o=n==n,s=lu(n),u=e!==t,a=null===e,c=e==e,h=lu(e);if(!a&&!h&&!s&&n>e||s&&u&&c&&!a&&!h||i&&u&&c||!r&&c||!o)return 1;if(!i&&!s&&!h&&n<e||h&&r&&o&&!i&&!s||a&&r&&o||!u&&o||!c)return-1}return 0}function Mi(t,n,e,r){for(var i=-1,o=t.length,s=e.length,u=-1,a=n.length,c=me(o-s,0),h=st(a+c),l=!r;++u<a;)h[u]=n[u];for(;++i<s;)(l||i<o)&&(h[e[i]]=t[i]);for(;c--;)h[u++]=t[i++];return h}function ki(t,n,e,r){for(var i=-1,o=t.length,s=-1,u=e.length,a=-1,c=n.length,h=me(o-u,0),l=st(h+c),f=!r;++i<h;)l[i]=t[i];for(var p=i;++a<c;)l[p+a]=n[a];for(;++s<u;)(f||i<o)&&(l[p+e[s]]=t[i++]);return l}function Si(t,n){var e=-1,r=t.length;for(n||(n=st(r));++e<r;)n[e]=t[e];return n}function Ci(n,e,r,i){var o=!r;r||(r={});for(var s=-1,u=e.length;++s<u;){var a=e[s],c=i?i(r[a],n[a],a,r,n):t;c===t&&(c=n[a]),o?or(r,a,c):nr(r,a,c)}return r}function Ti(t,n){return function(e,r){var i=Xs(e)?kn:rr,o=n?n():{};return i(e,t,ao(r,2),o)}}function Ii(n){return Hr((function(e,r){var i=-1,o=r.length,s=o>1?r[o-1]:t,u=o>2?r[2]:t;for(s=n.length>3&&"function"==typeof s?(o--,s):t,u&&wo(r[0],r[1],u)&&(s=o<3?t:s,o=1),e=Mt(e);++i<o;){var a=r[i];a&&n(e,a,i,s)}return e}))}function Ni(t,n){return function(e,r){if(null==e)return e;if(!Zs(e))return t(e,r);for(var i=e.length,o=n?i:-1,s=Mt(e);(n?o--:++o<i)&&!1!==r(s[o],o,s););return e}}function zi(t){return function(n,e,r){for(var i=-1,o=Mt(n),s=r(n),u=s.length;u--;){var a=s[t?u:++i];if(!1===e(o[a],a,o))break}return n}}function Ri(n){return function(e){var r=ue(e=bu(e))?pe(e):t,i=r?r[0]:e.charAt(0),o=r?bi(r,1).join(""):e.slice(1);return i[n]()+o}}function Li(t){return function(n){return Dn(ta(Vu(n).replace(Kt,"")),t,"")}}function Di(t){return function(){var n=arguments;switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3]);case 5:return new t(n[0],n[1],n[2],n[3],n[4]);case 6:return new t(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new t(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var e=Be(t.prototype),r=t.apply(e,n);return ru(r)?r:e}}function Pi(n){return function(e,r,i){var o=Mt(e);if(!Zs(e)){var s=ao(r,3);e=zu(e),r=function(t){return s(o[t],t,o)}}var u=n(e,r,i);return u>-1?o[s?e[u]:u]:t}}function Fi(n){return eo((function(r){var i=r.length,o=i,s=Ue.prototype.thru;for(n&&r.reverse();o--;){var u=r[o];if("function"!=typeof u)throw new Ct(e);if(s&&!a&&"wrapper"==so(u))var a=new Ue([],!0)}for(o=a?o:i;++o<i;){var c=so(u=r[o]),h="wrapper"==c?oo(u):t;a=h&&xo(h[0])&&424==h[1]&&!h[4].length&&1==h[9]?a[so(h[0])].apply(a,h[3]):1==u.length&&xo(u)?a[c]():a.thru(u)}return function(){var t=arguments,n=t[0];if(a&&1==t.length&&Xs(n))return a.plant(n).value();for(var e=0,o=i?r[e].apply(this,t):n;++e<i;)o=r[e].call(this,o);return o}}))}function $i(n,e,r,i,o,s,u,a,c,l){var f=e&h,p=1&e,d=2&e,v=24&e,g=512&e,_=d?t:Di(n);return function h(){for(var m=arguments.length,y=st(m),w=m;w--;)y[w]=arguments[w];if(v)var b=uo(h),x=function(t,n){for(var e=t.length,r=0;e--;)t[e]===n&&++r;return r}(y,b);if(i&&(y=Mi(y,i,o,v)),s&&(y=ki(y,s,u,v)),m-=x,v&&m<l){var E=he(y,b);return Xi(n,e,$i,h.placeholder,r,y,E,a,c,l-m)}var A=p?r:this,j=d?A[n]:n;return m=y.length,a?y=function(n,e){for(var r=n.length,i=ye(e.length,r),o=Si(n);i--;){var s=e[i];n[i]=yo(s,r)?o[s]:t}return n}(y,a):g&&m>1&&y.reverse(),f&&c<m&&(y.length=c),this&&this!==vn&&this instanceof h&&(j=_||Di(j)),j.apply(A,y)}}function Bi(t,n){return function(e,r){return function(t,n,e,r){return wr(t,(function(t,i,o){n(r,e(t),i,o)})),r}(e,t,n(r),{})}}function qi(n,e){return function(r,i){var o;if(r===t&&i===t)return e;if(r!==t&&(o=r),i!==t){if(o===t)return i;"string"==typeof r||"string"==typeof i?(r=ci(r),i=ci(i)):(r=ai(r),i=ai(i)),o=n(r,i)}return o}}function Ui(t){return eo((function(n){return n=Rn(n,Kn(ao())),Hr((function(e){var r=this;return t(n,(function(t){return Mn(t,r,e)}))}))}))}function Wi(n,e){var r=(e=e===t?" ":ci(e)).length;if(r<2)return r?Zr(e,n):e;var i=Zr(e,gn(n/fe(e)));return ue(e)?bi(pe(i),0,n).join(""):i.slice(0,n)}function Yi(n){return function(e,r,i){return i&&"number"!=typeof i&&wo(e,r,i)&&(r=i=t),e=gu(e),r===t?(r=e,e=0):r=gu(r),function(t,n,e,r){for(var i=-1,o=me(gn((n-t)/(e||1)),0),s=st(o);o--;)s[r?o:++i]=t,t+=e;return s}(e,r,i=i===t?e<r?1:-1:gu(i),n)}}function Vi(t){return function(n,e){return"string"==typeof n&&"string"==typeof e||(n=yu(n),e=yu(e)),t(n,e)}}function Xi(n,e,r,i,o,s,u,h,l,f){var p=8&e;e|=p?a:c,4&(e&=~(p?c:a))||(e&=-4);var d=[n,e,o,p?s:t,p?u:t,p?t:s,p?t:u,h,l,f],v=r.apply(t,d);return xo(n)&&Co(v,d),v.placeholder=i,No(v,n,e)}function Gi(t){var n=Ot[t];return function(t,e){if(t=yu(t),(e=null==e?0:ye(_u(e),292))&&$n(t)){var r=(bu(t)+"e").split("e");return+((r=(bu(n(r[0]+"e"+(+r[1]+e)))+"e").split("e"))[0]+"e"+(+r[1]-e))}return n(t)}}var Zi=Me&&1/le(new Me([,-0]))[1]==f?function(t){return new Me(t)}:la;function Hi(t){return function(n){var e=vo(n);return e==A?ae(n):e==S?function(t){var n=-1,e=Array(t.size);return t.forEach((function(t){e[++n]=[t,t]})),e}(n):function(t,n){return Rn(n,(function(n){return[n,t[n]]}))}(n,t(n))}}function Qi(n,r,i,o,f,p,d,v){var g=2&r;if(!g&&"function"!=typeof n)throw new Ct(e);var _=o?o.length:0;if(_||(r&=-97,o=f=t),d=d===t?d:me(_u(d),0),v=v===t?v:_u(v),_-=f?f.length:0,r&c){var m=o,y=f;o=f=t}var w=g?t:oo(n),b=[n,r,i,o,f,m,y,p,d,v];if(w&&function(t,n){var e=t[1],r=n[1],i=e|r,o=i<131,u=r==h&&8==e||r==h&&e==l&&t[7].length<=n[8]||384==r&&n[7].length<=n[8]&&8==e;if(!o&&!u)return t;1&r&&(t[2]=n[2],i|=1&e?0:4);var a=n[3];if(a){var c=t[3];t[3]=c?Mi(c,a,n[4]):a,t[4]=c?he(t[3],s):n[4]}(a=n[5])&&(c=t[5],t[5]=c?ki(c,a,n[6]):a,t[6]=c?he(t[5],s):n[6]),(a=n[7])&&(t[7]=a),r&h&&(t[8]=null==t[8]?n[8]:ye(t[8],n[8])),null==t[9]&&(t[9]=n[9]),t[0]=n[0],t[1]=i}(b,w),n=b[0],r=b[1],i=b[2],o=b[3],f=b[4],!(v=b[9]=b[9]===t?g?0:n.length:me(b[9]-_,0))&&24&r&&(r&=-25),r&&1!=r)x=8==r||r==u?function(n,e,r){var i=Di(n);return function o(){for(var s=arguments.length,u=st(s),a=s,c=uo(o);a--;)u[a]=arguments[a];var h=s<3&&u[0]!==c&&u[s-1]!==c?[]:he(u,c);return(s-=h.length)<r?Xi(n,e,$i,o.placeholder,t,u,h,t,t,r-s):Mn(this&&this!==vn&&this instanceof o?i:n,this,u)}}(n,r,v):r!=a&&33!=r||f.length?$i.apply(t,b):function(t,n,e,r){var i=1&n,o=Di(t);return function n(){for(var s=-1,u=arguments.length,a=-1,c=r.length,h=st(c+u),l=this&&this!==vn&&this instanceof n?o:t;++a<c;)h[a]=r[a];for(;u--;)h[a++]=arguments[++s];return Mn(l,i?e:this,h)}}(n,r,i,o);else var x=function(t,n,e){var r=1&n,i=Di(t);return function n(){return(this&&this!==vn&&this instanceof n?i:t).apply(r?e:this,arguments)}}(n,r,i);return No((w?ti:Co)(x,b),n,r)}function Ji(n,e,r,i){return n===t||Us(n,Nt[r])&&!Lt.call(i,r)?e:n}function Ki(n,e,r,i,o,s){return ru(n)&&ru(e)&&(s.set(e,n),qr(n,e,t,Ki,s),s.delete(e)),n}function to(n){return uu(n)?t:n}function no(n,e,r,i,o,s){var u=1&r,a=n.length,c=e.length;if(a!=c&&!(u&&c>a))return!1;var h=s.get(n),l=s.get(e);if(h&&l)return h==e&&l==n;var f=-1,p=!0,d=2&r?new Ge:t;for(s.set(n,e),s.set(e,n);++f<a;){var v=n[f],g=e[f];if(i)var _=u?i(g,v,f,e,n,s):i(v,g,f,n,e,s);if(_!==t){if(_)continue;p=!1;break}if(d){if(!Fn(e,(function(t,n){if(!ne(d,n)&&(v===t||o(v,t,r,i,s)))return d.push(n)}))){p=!1;break}}else if(v!==g&&!o(v,g,r,i,s)){p=!1;break}}return s.delete(n),s.delete(e),p}function eo(n){return Io(Mo(n,t,Go),n+"")}function ro(t){return Ar(t,zu,fo)}function io(t){return Ar(t,Ru,po)}var oo=Ce?function(t){return Ce.get(t)}:la;function so(t){for(var n=t.name+"",e=Te[n],r=Lt.call(Te,n)?e.length:0;r--;){var i=e[r],o=i.func;if(null==o||o==t)return i.name}return n}function uo(t){return(Lt.call($e,"placeholder")?$e:t).placeholder}function ao(){var t=$e.iteratee||ua;return t=t===ua?Rr:t,arguments.length?t(arguments[0],arguments[1]):t}function co(t,n){var e,r,i=t.__data__;return("string"==(r=typeof(e=n))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==e:null===e)?i["string"==typeof n?"string":"hash"]:i.map}function ho(t){for(var n=zu(t),e=n.length;e--;){var r=n[e],i=t[r];n[e]=[r,i,jo(i)]}return n}function lo(n,e){var r=function(n,e){return null==n?t:n[e]}(n,e);return zr(r)?r:t}var fo=yn?function(t){return null==t?[]:(t=Mt(t),In(yn(t),(function(n){return Zt.call(t,n)})))}:ma,po=yn?function(t){for(var n=[];t;)Ln(n,fo(t)),t=Xt(t);return n}:ma,vo=jr;function go(t,n,e){for(var r=-1,i=(n=yi(n,t)).length,o=!1;++r<i;){var s=$o(n[r]);if(!(o=null!=t&&e(t,s)))break;t=t[s]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&eu(i)&&yo(s,i)&&(Xs(t)||Vs(t))}function _o(t){return"function"!=typeof t.constructor||Ao(t)?{}:Be(Xt(t))}function mo(t){return Xs(t)||Vs(t)||!!(Qt&&t&&t[Qt])}function yo(t,n){var e=typeof t;return!!(n=null==n?p:n)&&("number"==e||"symbol"!=e&&yt.test(t))&&t>-1&&t%1==0&&t<n}function wo(t,n,e){if(!ru(e))return!1;var r=typeof n;return!!("number"==r?Zs(e)&&yo(n,e.length):"string"==r&&n in e)&&Us(e[n],t)}function bo(t,n){if(Xs(t))return!1;var e=typeof t;return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!lu(t))||nt.test(t)||!tt.test(t)||null!=n&&t in Mt(n)}function xo(t){var n=so(t),e=$e[n];if("function"!=typeof e||!(n in We.prototype))return!1;if(t===e)return!0;var r=oo(e);return!!r&&t===r[0]}(Ae&&vo(new Ae(new ArrayBuffer(1)))!=z||je&&vo(new je)!=A||Oe&&vo(Oe.resolve())!=M||Me&&vo(new Me)!=S||ke&&vo(new ke)!=I)&&(vo=function(n){var e=jr(n),r=e==O?n.constructor:t,i=r?Bo(r):"";if(i)switch(i){case Ie:return z;case Ne:return A;case ze:return M;case Re:return S;case Le:return I}return e});var Eo=zt?tu:ya;function Ao(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||Nt)}function jo(t){return t==t&&!ru(t)}function Oo(n,e){return function(r){return null!=r&&r[n]===e&&(e!==t||n in Mt(r))}}function Mo(n,e,r){return e=me(e===t?n.length-1:e,0),function(){for(var t=arguments,i=-1,o=me(t.length-e,0),s=st(o);++i<o;)s[i]=t[e+i];i=-1;for(var u=st(e+1);++i<e;)u[i]=t[i];return u[e]=r(s),Mn(n,this,u)}}function ko(t,n){return n.length<2?t:Er(t,ri(n,0,-1))}function So(t,n){if(("constructor"!==n||"function"!=typeof t[n])&&"__proto__"!=n)return t[n]}var Co=zo(ti),To=dn||function(t,n){return vn.setTimeout(t,n)},Io=zo(ni);function No(t,n,e){var r=n+"";return Io(t,function(t,n){var e=n.length;if(!e)return t;var r=e-1;return n[r]=(e>1?"& ":"")+n[r],n=n.join(e>2?", ":" "),t.replace(ut,"{\n/* [wrapped with "+n+"] */\n")}(r,function(t,n){return Sn(g,(function(e){var r="_."+e[0];n&e[1]&&!Nn(t,r)&&t.push(r)})),t.sort()}(function(t){var n=t.match(at);return n?n[1].split(ct):[]}(r),e)))}function zo(n){var e=0,r=0;return function(){var i=we(),o=16-(i-r);if(r=i,o>0){if(++e>=800)return arguments[0]}else e=0;return n.apply(t,arguments)}}function Ro(n,e){var r=-1,i=n.length,o=i-1;for(e=e===t?i:e;++r<e;){var s=Gr(r,o),u=n[s];n[s]=n[r],n[r]=u}return n.length=e,n}var Lo,Do,Po,Fo=(Lo=function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(et,(function(t,e,r,i){n.push(r?i.replace(ft,"$1"):e||t)})),n},Do=Ds(Lo,(function(t){return 500===Po.size&&Po.clear(),t})),Po=Do.cache,Do);function $o(t){if("string"==typeof t||lu(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}function Bo(t){if(null!=t){try{return Rt.call(t)}catch(n){}try{return t+""}catch(n){}}return""}function qo(t){if(t instanceof We)return t.clone();var n=new Ue(t.__wrapped__,t.__chain__);return n.__actions__=Si(t.__actions__),n.__index__=t.__index__,n.__values__=t.__values__,n}var Uo=Hr((function(t,n){return Hs(t)?lr(t,_r(n,1,Hs,!0)):[]})),Wo=Hr((function(n,e){var r=Ko(e);return Hs(r)&&(r=t),Hs(n)?lr(n,_r(e,1,Hs,!0),ao(r,2)):[]})),Yo=Hr((function(n,e){var r=Ko(e);return Hs(r)&&(r=t),Hs(n)?lr(n,_r(e,1,Hs,!0),t,r):[]}));function Vo(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var i=null==e?0:_u(e);return i<0&&(i=me(r+i,0)),qn(t,ao(n,3),i)}function Xo(n,e,r){var i=null==n?0:n.length;if(!i)return-1;var o=i-1;return r!==t&&(o=_u(r),o=r<0?me(i+o,0):ye(o,i-1)),qn(n,ao(e,3),o,!0)}function Go(t){return null!=t&&t.length?_r(t,1):[]}function Zo(n){return n&&n.length?n[0]:t}var Ho=Hr((function(t){var n=Rn(t,_i);return n.length&&n[0]===t[0]?Sr(n):[]})),Qo=Hr((function(n){var e=Ko(n),r=Rn(n,_i);return e===Ko(r)?e=t:r.pop(),r.length&&r[0]===n[0]?Sr(r,ao(e,2)):[]})),Jo=Hr((function(n){var e=Ko(n),r=Rn(n,_i);return(e="function"==typeof e?e:t)&&r.pop(),r.length&&r[0]===n[0]?Sr(r,t,e):[]}));function Ko(n){var e=null==n?0:n.length;return e?n[e-1]:t}var ts=Hr(ns);function ns(t,n){return t&&t.length&&n&&n.length?Vr(t,n):t}var es=eo((function(t,n){var e=null==t?0:t.length,r=sr(t,n);return Xr(t,Rn(n,(function(t){return yo(t,e)?+t:t})).sort(Oi)),r}));function rs(t){return null==t?t:Ee.call(t)}var is=Hr((function(t){return hi(_r(t,1,Hs,!0))})),os=Hr((function(n){var e=Ko(n);return Hs(e)&&(e=t),hi(_r(n,1,Hs,!0),ao(e,2))})),ss=Hr((function(n){var e=Ko(n);return e="function"==typeof e?e:t,hi(_r(n,1,Hs,!0),t,e)}));function us(t){if(!t||!t.length)return[];var n=0;return t=In(t,(function(t){if(Hs(t))return n=me(t.length,n),!0})),Qn(n,(function(n){return Rn(t,Xn(n))}))}function as(n,e){if(!n||!n.length)return[];var r=us(n);return null==e?r:Rn(r,(function(n){return Mn(e,t,n)}))}var cs=Hr((function(t,n){return Hs(t)?lr(t,n):[]})),hs=Hr((function(t){return vi(In(t,Hs))})),ls=Hr((function(n){var e=Ko(n);return Hs(e)&&(e=t),vi(In(n,Hs),ao(e,2))})),fs=Hr((function(n){var e=Ko(n);return e="function"==typeof e?e:t,vi(In(n,Hs),t,e)})),ps=Hr(us),ds=Hr((function(n){var e=n.length,r=e>1?n[e-1]:t;return r="function"==typeof r?(n.pop(),r):t,as(n,r)}));function vs(t){var n=$e(t);return n.__chain__=!0,n}function gs(t,n){return n(t)}var _s=eo((function(n){var e=n.length,r=e?n[0]:0,i=this.__wrapped__,o=function(t){return sr(t,n)};return!(e>1||this.__actions__.length)&&i instanceof We&&yo(r)?((i=i.slice(r,+r+(e?1:0))).__actions__.push({func:gs,args:[o],thisArg:t}),new Ue(i,this.__chain__).thru((function(n){return e&&!n.length&&n.push(t),n}))):this.thru(o)})),ms=Ti((function(t,n,e){Lt.call(t,e)?++t[e]:or(t,e,1)})),ys=Pi(Vo),ws=Pi(Xo);function bs(t,n){return(Xs(t)?Sn:fr)(t,ao(n,3))}function xs(t,n){return(Xs(t)?Cn:pr)(t,ao(n,3))}var Es=Ti((function(t,n,e){Lt.call(t,e)?t[e].push(n):or(t,e,[n])})),As=Hr((function(t,n,e){var r=-1,i="function"==typeof n,o=Zs(t)?st(t.length):[];return fr(t,(function(t){o[++r]=i?Mn(n,t,e):Cr(t,n,e)})),o})),js=Ti((function(t,n,e){or(t,e,n)}));function Os(t,n){return(Xs(t)?Rn:Fr)(t,ao(n,3))}var Ms=Ti((function(t,n,e){t[e?0:1].push(n)}),(function(){return[[],[]]})),ks=Hr((function(t,n){if(null==t)return[];var e=n.length;return e>1&&wo(t,n[0],n[1])?n=[]:e>2&&wo(n[0],n[1],n[2])&&(n=[n[0]]),Wr(t,_r(n,1),[])})),Ss=pn||function(){return vn.Date.now()};function Cs(n,e,r){return e=r?t:e,e=n&&null==e?n.length:e,Qi(n,h,t,t,t,t,e)}function Ts(n,r){var i;if("function"!=typeof r)throw new Ct(e);return n=_u(n),function(){return--n>0&&(i=r.apply(this,arguments)),n<=1&&(r=t),i}}var Is=Hr((function(t,n,e){var r=1;if(e.length){var i=he(e,uo(Is));r|=a}return Qi(t,r,n,e,i)})),Ns=Hr((function(t,n,e){var r=3;if(e.length){var i=he(e,uo(Ns));r|=a}return Qi(n,r,t,e,i)}));function zs(n,r,i){var o,s,u,a,c,h,l=0,f=!1,p=!1,d=!0;if("function"!=typeof n)throw new Ct(e);function v(e){var r=o,i=s;return o=s=t,l=e,a=n.apply(i,r)}function g(n){var e=n-h;return h===t||e>=r||e<0||p&&n-l>=u}function _(){var t=Ss();if(g(t))return m(t);c=To(_,function(t){var n=r-(t-h);return p?ye(n,u-(t-l)):n}(t))}function m(n){return c=t,d&&o?v(n):(o=s=t,a)}function y(){var n=Ss(),e=g(n);if(o=arguments,s=this,h=n,e){if(c===t)return function(t){return l=t,c=To(_,r),f?v(t):a}(h);if(p)return xi(c),c=To(_,r),v(h)}return c===t&&(c=To(_,r)),a}return r=yu(r)||0,ru(i)&&(f=!!i.leading,u=(p="maxWait"in i)?me(yu(i.maxWait)||0,r):u,d="trailing"in i?!!i.trailing:d),y.cancel=function(){c!==t&&xi(c),l=0,o=h=s=c=t},y.flush=function(){return c===t?a:m(Ss())},y}var Rs=Hr((function(t,n){return hr(t,1,n)})),Ls=Hr((function(t,n,e){return hr(t,yu(n)||0,e)}));function Ds(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new Ct(e);var r=function(){var e=arguments,i=n?n.apply(this,e):e[0],o=r.cache;if(o.has(i))return o.get(i);var s=t.apply(this,e);return r.cache=o.set(i,s)||o,s};return r.cache=new(Ds.Cache||Xe),r}function Ps(t){if("function"!=typeof t)throw new Ct(e);return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}Ds.Cache=Xe;var Fs=wi((function(t,n){var e=(n=1==n.length&&Xs(n[0])?Rn(n[0],Kn(ao())):Rn(_r(n,1),Kn(ao()))).length;return Hr((function(r){for(var i=-1,o=ye(r.length,e);++i<o;)r[i]=n[i].call(this,r[i]);return Mn(t,this,r)}))})),$s=Hr((function(n,e){var r=he(e,uo($s));return Qi(n,a,t,e,r)})),Bs=Hr((function(n,e){var r=he(e,uo(Bs));return Qi(n,c,t,e,r)})),qs=eo((function(n,e){return Qi(n,l,t,t,t,e)}));function Us(t,n){return t===n||t!=t&&n!=n}var Ws=Vi(Or),Ys=Vi((function(t,n){return t>=n})),Vs=Tr(function(){return arguments}())?Tr:function(t){return iu(t)&&Lt.call(t,"callee")&&!Zt.call(t,"callee")},Xs=st.isArray,Gs=bn?Kn(bn):function(t){return iu(t)&&jr(t)==N};function Zs(t){return null!=t&&eu(t.length)&&!tu(t)}function Hs(t){return iu(t)&&Zs(t)}var Qs=wn||ya,Js=xn?Kn(xn):function(t){return iu(t)&&jr(t)==w};function Ks(t){if(!iu(t))return!1;var n=jr(t);return n==b||"[object DOMException]"==n||"string"==typeof t.message&&"string"==typeof t.name&&!uu(t)}function tu(t){if(!ru(t))return!1;var n=jr(t);return n==x||n==E||"[object AsyncFunction]"==n||"[object Proxy]"==n}function nu(t){return"number"==typeof t&&t==_u(t)}function eu(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=p}function ru(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}function iu(t){return null!=t&&"object"==typeof t}var ou=En?Kn(En):function(t){return iu(t)&&vo(t)==A};function su(t){return"number"==typeof t||iu(t)&&jr(t)==j}function uu(t){if(!iu(t)||jr(t)!=O)return!1;var n=Xt(t);if(null===n)return!0;var e=Lt.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&Rt.call(e)==$t}var au=An?Kn(An):function(t){return iu(t)&&jr(t)==k},cu=jn?Kn(jn):function(t){return iu(t)&&vo(t)==S};function hu(t){return"string"==typeof t||!Xs(t)&&iu(t)&&jr(t)==C}function lu(t){return"symbol"==typeof t||iu(t)&&jr(t)==T}var fu=On?Kn(On):function(t){return iu(t)&&eu(t.length)&&!!an[jr(t)]},pu=Vi(Pr),du=Vi((function(t,n){return t<=n}));function vu(t){if(!t)return[];if(Zs(t))return hu(t)?pe(t):Si(t);if(Jt&&t[Jt])return function(t){for(var n,e=[];!(n=t.next()).done;)e.push(n.value);return e}(t[Jt]());var n=vo(t);return(n==A?ae:n==S?le:Uu)(t)}function gu(t){return t?(t=yu(t))===f||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function _u(t){var n=gu(t),e=n%1;return n==n?e?n-e:n:0}function mu(t){return t?ur(_u(t),0,v):0}function yu(t){if("number"==typeof t)return t;if(lu(t))return d;if(ru(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=ru(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=Jn(t);var e=gt.test(t);return e||mt.test(t)?fn(t.slice(2),e?2:8):vt.test(t)?d:+t}function wu(t){return Ci(t,Ru(t))}function bu(t){return null==t?"":ci(t)}var xu=Ii((function(t,n){if(Ao(n)||Zs(n))Ci(n,zu(n),t);else for(var e in n)Lt.call(n,e)&&nr(t,e,n[e])})),Eu=Ii((function(t,n){Ci(n,Ru(n),t)})),Au=Ii((function(t,n,e,r){Ci(n,Ru(n),t,r)})),ju=Ii((function(t,n,e,r){Ci(n,zu(n),t,r)})),Ou=eo(sr),Mu=Hr((function(n,e){n=Mt(n);var r=-1,i=e.length,o=i>2?e[2]:t;for(o&&wo(e[0],e[1],o)&&(i=1);++r<i;)for(var s=e[r],u=Ru(s),a=-1,c=u.length;++a<c;){var h=u[a],l=n[h];(l===t||Us(l,Nt[h])&&!Lt.call(n,h))&&(n[h]=s[h])}return n})),ku=Hr((function(n){return n.push(t,Ki),Mn(Du,t,n)}));function Su(n,e,r){var i=null==n?t:Er(n,e);return i===t?r:i}function Cu(t,n){return null!=t&&go(t,n,kr)}var Tu=Bi((function(t,n,e){null!=n&&"function"!=typeof n.toString&&(n=Ft.call(n)),t[n]=e}),ra(sa)),Iu=Bi((function(t,n,e){null!=n&&"function"!=typeof n.toString&&(n=Ft.call(n)),Lt.call(t,n)?t[n].push(e):t[n]=[e]}),ao),Nu=Hr(Cr);function zu(t){return Zs(t)?He(t):Lr(t)}function Ru(t){return Zs(t)?He(t,!0):Dr(t)}var Lu=Ii((function(t,n,e){qr(t,n,e)})),Du=Ii((function(t,n,e,r){qr(t,n,e,r)})),Pu=eo((function(t,n){var e={};if(null==t)return e;var r=!1;n=Rn(n,(function(n){return n=yi(n,t),r||(r=n.length>1),n})),Ci(t,io(t),e),r&&(e=ar(e,7,to));for(var i=n.length;i--;)li(e,n[i]);return e})),Fu=eo((function(t,n){return null==t?{}:function(t,n){return Yr(t,n,(function(n,e){return Cu(t,e)}))}(t,n)}));function $u(t,n){if(null==t)return{};var e=Rn(io(t),(function(t){return[t]}));return n=ao(n),Yr(t,e,(function(t,e){return n(t,e[0])}))}var Bu=Hi(zu),qu=Hi(Ru);function Uu(t){return null==t?[]:te(t,zu(t))}var Wu=Li((function(t,n,e){return n=n.toLowerCase(),t+(e?Yu(n):n)}));function Yu(t){return Ku(bu(t).toLowerCase())}function Vu(t){return(t=bu(t))&&t.replace(wt,ie).replace(tn,"")}var Xu=Li((function(t,n,e){return t+(e?"-":"")+n.toLowerCase()})),Gu=Li((function(t,n,e){return t+(e?" ":"")+n.toLowerCase()})),Zu=Ri("toLowerCase"),Hu=Li((function(t,n,e){return t+(e?"_":"")+n.toLowerCase()})),Qu=Li((function(t,n,e){return t+(e?" ":"")+Ku(n)})),Ju=Li((function(t,n,e){return t+(e?" ":"")+n.toUpperCase()})),Ku=Ri("toUpperCase");function ta(n,e,r){return n=bu(n),(e=r?t:e)===t?function(t){return on.test(t)}(n)?function(t){return t.match(en)||[]}(n):function(t){return t.match(ht)||[]}(n):n.match(e)||[]}var na=Hr((function(n,e){try{return Mn(n,t,e)}catch(r){return Ks(r)?r:new At(r)}})),ea=eo((function(t,n){return Sn(n,(function(n){n=$o(n),or(t,n,Is(t[n],t))})),t}));function ra(t){return function(){return t}}var ia=Fi(),oa=Fi(!0);function sa(t){return t}function ua(t){return Rr("function"==typeof t?t:ar(t,1))}var aa=Hr((function(t,n){return function(e){return Cr(e,t,n)}})),ca=Hr((function(t,n){return function(e){return Cr(t,e,n)}}));function ha(t,n,e){var r=zu(n),i=xr(n,r);null!=e||ru(n)&&(i.length||!r.length)||(e=n,n=t,t=this,i=xr(n,zu(n)));var o=!(ru(e)&&"chain"in e&&!e.chain),s=tu(t);return Sn(i,(function(e){var r=n[e];t[e]=r,s&&(t.prototype[e]=function(){var n=this.__chain__;if(o||n){var e=t(this.__wrapped__);return(e.__actions__=Si(this.__actions__)).push({func:r,args:arguments,thisArg:t}),e.__chain__=n,e}return r.apply(t,Ln([this.value()],arguments))})})),t}function la(){}var fa=Ui(Rn),pa=Ui(Tn),da=Ui(Fn);function va(t){return bo(t)?Xn($o(t)):function(t){return function(n){return Er(n,t)}}(t)}var ga=Yi(),_a=Yi(!0);function ma(){return[]}function ya(){return!1}var wa,ba=qi((function(t,n){return t+n}),0),xa=Gi("ceil"),Ea=qi((function(t,n){return t/n}),1),Aa=Gi("floor"),ja=qi((function(t,n){return t*n}),1),Oa=Gi("round"),Ma=qi((function(t,n){return t-n}),0);return $e.after=function(t,n){if("function"!=typeof n)throw new Ct(e);return t=_u(t),function(){if(--t<1)return n.apply(this,arguments)}},$e.ary=Cs,$e.assign=xu,$e.assignIn=Eu,$e.assignInWith=Au,$e.assignWith=ju,$e.at=Ou,$e.before=Ts,$e.bind=Is,$e.bindAll=ea,$e.bindKey=Ns,$e.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Xs(t)?t:[t]},$e.chain=vs,$e.chunk=function(n,e,r){e=(r?wo(n,e,r):e===t)?1:me(_u(e),0);var i=null==n?0:n.length;if(!i||e<1)return[];for(var o=0,s=0,u=st(gn(i/e));o<i;)u[s++]=ri(n,o,o+=e);return u},$e.compact=function(t){for(var n=-1,e=null==t?0:t.length,r=0,i=[];++n<e;){var o=t[n];o&&(i[r++]=o)}return i},$e.concat=function(){var t=arguments.length;if(!t)return[];for(var n=st(t-1),e=arguments[0],r=t;r--;)n[r-1]=arguments[r];return Ln(Xs(e)?Si(e):[e],_r(n,1))},$e.cond=function(t){var n=null==t?0:t.length,r=ao();return t=n?Rn(t,(function(t){if("function"!=typeof t[1])throw new Ct(e);return[r(t[0]),t[1]]})):[],Hr((function(e){for(var r=-1;++r<n;){var i=t[r];if(Mn(i[0],this,e))return Mn(i[1],this,e)}}))},$e.conforms=function(t){return function(t){var n=zu(t);return function(e){return cr(e,t,n)}}(ar(t,1))},$e.constant=ra,$e.countBy=ms,$e.create=function(t,n){var e=Be(t);return null==n?e:ir(e,n)},$e.curry=function n(e,r,i){var o=Qi(e,8,t,t,t,t,t,r=i?t:r);return o.placeholder=n.placeholder,o},$e.curryRight=function n(e,r,i){var o=Qi(e,u,t,t,t,t,t,r=i?t:r);return o.placeholder=n.placeholder,o},$e.debounce=zs,$e.defaults=Mu,$e.defaultsDeep=ku,$e.defer=Rs,$e.delay=Ls,$e.difference=Uo,$e.differenceBy=Wo,$e.differenceWith=Yo,$e.drop=function(n,e,r){var i=null==n?0:n.length;return i?ri(n,(e=r||e===t?1:_u(e))<0?0:e,i):[]},$e.dropRight=function(n,e,r){var i=null==n?0:n.length;return i?ri(n,0,(e=i-(e=r||e===t?1:_u(e)))<0?0:e):[]},$e.dropRightWhile=function(t,n){return t&&t.length?pi(t,ao(n,3),!0,!0):[]},$e.dropWhile=function(t,n){return t&&t.length?pi(t,ao(n,3),!0):[]},$e.fill=function(n,e,r,i){var o=null==n?0:n.length;return o?(r&&"number"!=typeof r&&wo(n,e,r)&&(r=0,i=o),function(n,e,r,i){var o=n.length;for((r=_u(r))<0&&(r=-r>o?0:o+r),(i=i===t||i>o?o:_u(i))<0&&(i+=o),i=r>i?0:mu(i);r<i;)n[r++]=e;return n}(n,e,r,i)):[]},$e.filter=function(t,n){return(Xs(t)?In:gr)(t,ao(n,3))},$e.flatMap=function(t,n){return _r(Os(t,n),1)},$e.flatMapDeep=function(t,n){return _r(Os(t,n),f)},$e.flatMapDepth=function(n,e,r){return r=r===t?1:_u(r),_r(Os(n,e),r)},$e.flatten=Go,$e.flattenDeep=function(t){return null!=t&&t.length?_r(t,f):[]},$e.flattenDepth=function(n,e){return null!=n&&n.length?_r(n,e=e===t?1:_u(e)):[]},$e.flip=function(t){return Qi(t,512)},$e.flow=ia,$e.flowRight=oa,$e.fromPairs=function(t){for(var n=-1,e=null==t?0:t.length,r={};++n<e;){var i=t[n];r[i[0]]=i[1]}return r},$e.functions=function(t){return null==t?[]:xr(t,zu(t))},$e.functionsIn=function(t){return null==t?[]:xr(t,Ru(t))},$e.groupBy=Es,$e.initial=function(t){return null!=t&&t.length?ri(t,0,-1):[]},$e.intersection=Ho,$e.intersectionBy=Qo,$e.intersectionWith=Jo,$e.invert=Tu,$e.invertBy=Iu,$e.invokeMap=As,$e.iteratee=ua,$e.keyBy=js,$e.keys=zu,$e.keysIn=Ru,$e.map=Os,$e.mapKeys=function(t,n){var e={};return n=ao(n,3),wr(t,(function(t,r,i){or(e,n(t,r,i),t)})),e},$e.mapValues=function(t,n){var e={};return n=ao(n,3),wr(t,(function(t,r,i){or(e,r,n(t,r,i))})),e},$e.matches=function(t){return $r(ar(t,1))},$e.matchesProperty=function(t,n){return Br(t,ar(n,1))},$e.memoize=Ds,$e.merge=Lu,$e.mergeWith=Du,$e.method=aa,$e.methodOf=ca,$e.mixin=ha,$e.negate=Ps,$e.nthArg=function(t){return t=_u(t),Hr((function(n){return Ur(n,t)}))},$e.omit=Pu,$e.omitBy=function(t,n){return $u(t,Ps(ao(n)))},$e.once=function(t){return Ts(2,t)},$e.orderBy=function(n,e,r,i){return null==n?[]:(Xs(e)||(e=null==e?[]:[e]),Xs(r=i?t:r)||(r=null==r?[]:[r]),Wr(n,e,r))},$e.over=fa,$e.overArgs=Fs,$e.overEvery=pa,$e.overSome=da,$e.partial=$s,$e.partialRight=Bs,$e.partition=Ms,$e.pick=Fu,$e.pickBy=$u,$e.property=va,$e.propertyOf=function(n){return function(e){return null==n?t:Er(n,e)}},$e.pull=ts,$e.pullAll=ns,$e.pullAllBy=function(t,n,e){return t&&t.length&&n&&n.length?Vr(t,n,ao(e,2)):t},$e.pullAllWith=function(n,e,r){return n&&n.length&&e&&e.length?Vr(n,e,t,r):n},$e.pullAt=es,$e.range=ga,$e.rangeRight=_a,$e.rearg=qs,$e.reject=function(t,n){return(Xs(t)?In:gr)(t,Ps(ao(n,3)))},$e.remove=function(t,n){var e=[];if(!t||!t.length)return e;var r=-1,i=[],o=t.length;for(n=ao(n,3);++r<o;){var s=t[r];n(s,r,t)&&(e.push(s),i.push(r))}return Xr(t,i),e},$e.rest=function(n,r){if("function"!=typeof n)throw new Ct(e);return Hr(n,r=r===t?r:_u(r))},$e.reverse=rs,$e.sampleSize=function(n,e,r){return e=(r?wo(n,e,r):e===t)?1:_u(e),(Xs(n)?Je:Jr)(n,e)},$e.set=function(t,n,e){return null==t?t:Kr(t,n,e)},$e.setWith=function(n,e,r,i){return i="function"==typeof i?i:t,null==n?n:Kr(n,e,r,i)},$e.shuffle=function(t){return(Xs(t)?Ke:ei)(t)},$e.slice=function(n,e,r){var i=null==n?0:n.length;return i?(r&&"number"!=typeof r&&wo(n,e,r)?(e=0,r=i):(e=null==e?0:_u(e),r=r===t?i:_u(r)),ri(n,e,r)):[]},$e.sortBy=ks,$e.sortedUniq=function(t){return t&&t.length?ui(t):[]},$e.sortedUniqBy=function(t,n){return t&&t.length?ui(t,ao(n,2)):[]},$e.split=function(n,e,r){return r&&"number"!=typeof r&&wo(n,e,r)&&(e=r=t),(r=r===t?v:r>>>0)?(n=bu(n))&&("string"==typeof e||null!=e&&!au(e))&&!(e=ci(e))&&ue(n)?bi(pe(n),0,r):n.split(e,r):[]},$e.spread=function(t,n){if("function"!=typeof t)throw new Ct(e);return n=null==n?0:me(_u(n),0),Hr((function(e){var r=e[n],i=bi(e,0,n);return r&&Ln(i,r),Mn(t,this,i)}))},$e.tail=function(t){var n=null==t?0:t.length;return n?ri(t,1,n):[]},$e.take=function(n,e,r){return n&&n.length?ri(n,0,(e=r||e===t?1:_u(e))<0?0:e):[]},$e.takeRight=function(n,e,r){var i=null==n?0:n.length;return i?ri(n,(e=i-(e=r||e===t?1:_u(e)))<0?0:e,i):[]},$e.takeRightWhile=function(t,n){return t&&t.length?pi(t,ao(n,3),!1,!0):[]},$e.takeWhile=function(t,n){return t&&t.length?pi(t,ao(n,3)):[]},$e.tap=function(t,n){return n(t),t},$e.throttle=function(t,n,r){var i=!0,o=!0;if("function"!=typeof t)throw new Ct(e);return ru(r)&&(i="leading"in r?!!r.leading:i,o="trailing"in r?!!r.trailing:o),zs(t,n,{leading:i,maxWait:n,trailing:o})},$e.thru=gs,$e.toArray=vu,$e.toPairs=Bu,$e.toPairsIn=qu,$e.toPath=function(t){return Xs(t)?Rn(t,$o):lu(t)?[t]:Si(Fo(bu(t)))},$e.toPlainObject=wu,$e.transform=function(t,n,e){var r=Xs(t),i=r||Qs(t)||fu(t);if(n=ao(n,4),null==e){var o=t&&t.constructor;e=i?r?new o:[]:ru(t)&&tu(o)?Be(Xt(t)):{}}return(i?Sn:wr)(t,(function(t,r,i){return n(e,t,r,i)})),e},$e.unary=function(t){return Cs(t,1)},$e.union=is,$e.unionBy=os,$e.unionWith=ss,$e.uniq=function(t){return t&&t.length?hi(t):[]},$e.uniqBy=function(t,n){return t&&t.length?hi(t,ao(n,2)):[]},$e.uniqWith=function(n,e){return e="function"==typeof e?e:t,n&&n.length?hi(n,t,e):[]},$e.unset=function(t,n){return null==t||li(t,n)},$e.unzip=us,$e.unzipWith=as,$e.update=function(t,n,e){return null==t?t:fi(t,n,mi(e))},$e.updateWith=function(n,e,r,i){return i="function"==typeof i?i:t,null==n?n:fi(n,e,mi(r),i)},$e.values=Uu,$e.valuesIn=function(t){return null==t?[]:te(t,Ru(t))},$e.without=cs,$e.words=ta,$e.wrap=function(t,n){return $s(mi(n),t)},$e.xor=hs,$e.xorBy=ls,$e.xorWith=fs,$e.zip=ps,$e.zipObject=function(t,n){return gi(t||[],n||[],nr)},$e.zipObjectDeep=function(t,n){return gi(t||[],n||[],Kr)},$e.zipWith=ds,$e.entries=Bu,$e.entriesIn=qu,$e.extend=Eu,$e.extendWith=Au,ha($e,$e),$e.add=ba,$e.attempt=na,$e.camelCase=Wu,$e.capitalize=Yu,$e.ceil=xa,$e.clamp=function(n,e,r){return r===t&&(r=e,e=t),r!==t&&(r=(r=yu(r))==r?r:0),e!==t&&(e=(e=yu(e))==e?e:0),ur(yu(n),e,r)},$e.clone=function(t){return ar(t,4)},$e.cloneDeep=function(t){return ar(t,5)},$e.cloneDeepWith=function(n,e){return ar(n,5,e="function"==typeof e?e:t)},$e.cloneWith=function(n,e){return ar(n,4,e="function"==typeof e?e:t)},$e.conformsTo=function(t,n){return null==n||cr(t,n,zu(n))},$e.deburr=Vu,$e.defaultTo=function(t,n){return null==t||t!=t?n:t},$e.divide=Ea,$e.endsWith=function(n,e,r){n=bu(n),e=ci(e);var i=n.length,o=r=r===t?i:ur(_u(r),0,i);return(r-=e.length)>=0&&n.slice(r,o)==e},$e.eq=Us,$e.escape=function(t){return(t=bu(t))&&H.test(t)?t.replace(G,oe):t},$e.escapeRegExp=function(t){return(t=bu(t))&&it.test(t)?t.replace(rt,"\\$&"):t},$e.every=function(n,e,r){var i=Xs(n)?Tn:dr;return r&&wo(n,e,r)&&(e=t),i(n,ao(e,3))},$e.find=ys,$e.findIndex=Vo,$e.findKey=function(t,n){return Bn(t,ao(n,3),wr)},$e.findLast=ws,$e.findLastIndex=Xo,$e.findLastKey=function(t,n){return Bn(t,ao(n,3),br)},$e.floor=Aa,$e.forEach=bs,$e.forEachRight=xs,$e.forIn=function(t,n){return null==t?t:mr(t,ao(n,3),Ru)},$e.forInRight=function(t,n){return null==t?t:yr(t,ao(n,3),Ru)},$e.forOwn=function(t,n){return t&&wr(t,ao(n,3))},$e.forOwnRight=function(t,n){return t&&br(t,ao(n,3))},$e.get=Su,$e.gt=Ws,$e.gte=Ys,$e.has=function(t,n){return null!=t&&go(t,n,Mr)},$e.hasIn=Cu,$e.head=Zo,$e.identity=sa,$e.includes=function(t,n,e,r){t=Zs(t)?t:Uu(t),e=e&&!r?_u(e):0;var i=t.length;return e<0&&(e=me(i+e,0)),hu(t)?e<=i&&t.indexOf(n,e)>-1:!!i&&Un(t,n,e)>-1},$e.indexOf=function(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var i=null==e?0:_u(e);return i<0&&(i=me(r+i,0)),Un(t,n,i)},$e.inRange=function(n,e,r){return e=gu(e),r===t?(r=e,e=0):r=gu(r),function(t,n,e){return t>=ye(n,e)&&t<me(n,e)}(n=yu(n),e,r)},$e.invoke=Nu,$e.isArguments=Vs,$e.isArray=Xs,$e.isArrayBuffer=Gs,$e.isArrayLike=Zs,$e.isArrayLikeObject=Hs,$e.isBoolean=function(t){return!0===t||!1===t||iu(t)&&jr(t)==y},$e.isBuffer=Qs,$e.isDate=Js,$e.isElement=function(t){return iu(t)&&1===t.nodeType&&!uu(t)},$e.isEmpty=function(t){if(null==t)return!0;if(Zs(t)&&(Xs(t)||"string"==typeof t||"function"==typeof t.splice||Qs(t)||fu(t)||Vs(t)))return!t.length;var n=vo(t);if(n==A||n==S)return!t.size;if(Ao(t))return!Lr(t).length;for(var e in t)if(Lt.call(t,e))return!1;return!0},$e.isEqual=function(t,n){return Ir(t,n)},$e.isEqualWith=function(n,e,r){var i=(r="function"==typeof r?r:t)?r(n,e):t;return i===t?Ir(n,e,t,r):!!i},$e.isError=Ks,$e.isFinite=function(t){return"number"==typeof t&&$n(t)},$e.isFunction=tu,$e.isInteger=nu,$e.isLength=eu,$e.isMap=ou,$e.isMatch=function(t,n){return t===n||Nr(t,n,ho(n))},$e.isMatchWith=function(n,e,r){return r="function"==typeof r?r:t,Nr(n,e,ho(e),r)},$e.isNaN=function(t){return su(t)&&t!=+t},$e.isNative=function(t){if(Eo(t))throw new At("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return zr(t)},$e.isNil=function(t){return null==t},$e.isNull=function(t){return null===t},$e.isNumber=su,$e.isObject=ru,$e.isObjectLike=iu,$e.isPlainObject=uu,$e.isRegExp=au,$e.isSafeInteger=function(t){return nu(t)&&t>=-9007199254740991&&t<=p},$e.isSet=cu,$e.isString=hu,$e.isSymbol=lu,$e.isTypedArray=fu,$e.isUndefined=function(n){return n===t},$e.isWeakMap=function(t){return iu(t)&&vo(t)==I},$e.isWeakSet=function(t){return iu(t)&&"[object WeakSet]"==jr(t)},$e.join=function(t,n){return null==t?"":Gn.call(t,n)},$e.kebabCase=Xu,$e.last=Ko,$e.lastIndexOf=function(n,e,r){var i=null==n?0:n.length;if(!i)return-1;var o=i;return r!==t&&(o=(o=_u(r))<0?me(i+o,0):ye(o,i-1)),e==e?function(t,n,e){for(var r=e+1;r--;)if(t[r]===n)return r;return r}(n,e,o):qn(n,Yn,o,!0)},$e.lowerCase=Gu,$e.lowerFirst=Zu,$e.lt=pu,$e.lte=du,$e.max=function(n){return n&&n.length?vr(n,sa,Or):t},$e.maxBy=function(n,e){return n&&n.length?vr(n,ao(e,2),Or):t},$e.mean=function(t){return Vn(t,sa)},$e.meanBy=function(t,n){return Vn(t,ao(n,2))},$e.min=function(n){return n&&n.length?vr(n,sa,Pr):t},$e.minBy=function(n,e){return n&&n.length?vr(n,ao(e,2),Pr):t},$e.stubArray=ma,$e.stubFalse=ya,$e.stubObject=function(){return{}},$e.stubString=function(){return""},$e.stubTrue=function(){return!0},$e.multiply=ja,$e.nth=function(n,e){return n&&n.length?Ur(n,_u(e)):t},$e.noConflict=function(){return vn._===this&&(vn._=Bt),this},$e.noop=la,$e.now=Ss,$e.pad=function(t,n,e){t=bu(t);var r=(n=_u(n))?fe(t):0;if(!n||r>=n)return t;var i=(n-r)/2;return Wi(_n(i),e)+t+Wi(gn(i),e)},$e.padEnd=function(t,n,e){t=bu(t);var r=(n=_u(n))?fe(t):0;return n&&r<n?t+Wi(n-r,e):t},$e.padStart=function(t,n,e){t=bu(t);var r=(n=_u(n))?fe(t):0;return n&&r<n?Wi(n-r,e)+t:t},$e.parseInt=function(t,n,e){return e||null==n?n=0:n&&(n=+n),be(bu(t).replace(ot,""),n||0)},$e.random=function(n,e,r){if(r&&"boolean"!=typeof r&&wo(n,e,r)&&(e=r=t),r===t&&("boolean"==typeof e?(r=e,e=t):"boolean"==typeof n&&(r=n,n=t)),n===t&&e===t?(n=0,e=1):(n=gu(n),e===t?(e=n,n=0):e=gu(e)),n>e){var i=n;n=e,e=i}if(r||n%1||e%1){var o=xe();return ye(n+o*(e-n+ln("1e-"+((o+"").length-1))),e)}return Gr(n,e)},$e.reduce=function(t,n,e){var r=Xs(t)?Dn:Zn,i=arguments.length<3;return r(t,ao(n,4),e,i,fr)},$e.reduceRight=function(t,n,e){var r=Xs(t)?Pn:Zn,i=arguments.length<3;return r(t,ao(n,4),e,i,pr)},$e.repeat=function(n,e,r){return e=(r?wo(n,e,r):e===t)?1:_u(e),Zr(bu(n),e)},$e.replace=function(){var t=arguments,n=bu(t[0]);return t.length<3?n:n.replace(t[1],t[2])},$e.result=function(n,e,r){var i=-1,o=(e=yi(e,n)).length;for(o||(o=1,n=t);++i<o;){var s=null==n?t:n[$o(e[i])];s===t&&(i=o,s=r),n=tu(s)?s.call(n):s}return n},$e.round=Oa,$e.runInContext=n,$e.sample=function(t){return(Xs(t)?Qe:Qr)(t)},$e.size=function(t){if(null==t)return 0;if(Zs(t))return hu(t)?fe(t):t.length;var n=vo(t);return n==A||n==S?t.size:Lr(t).length},$e.snakeCase=Hu,$e.some=function(n,e,r){var i=Xs(n)?Fn:ii;return r&&wo(n,e,r)&&(e=t),i(n,ao(e,3))},$e.sortedIndex=function(t,n){return oi(t,n)},$e.sortedIndexBy=function(t,n,e){return si(t,n,ao(e,2))},$e.sortedIndexOf=function(t,n){var e=null==t?0:t.length;if(e){var r=oi(t,n);if(r<e&&Us(t[r],n))return r}return-1},$e.sortedLastIndex=function(t,n){return oi(t,n,!0)},$e.sortedLastIndexBy=function(t,n,e){return si(t,n,ao(e,2),!0)},$e.sortedLastIndexOf=function(t,n){if(null!=t&&t.length){var e=oi(t,n,!0)-1;if(Us(t[e],n))return e}return-1},$e.startCase=Qu,$e.startsWith=function(t,n,e){return t=bu(t),e=null==e?0:ur(_u(e),0,t.length),n=ci(n),t.slice(e,e+n.length)==n},$e.subtract=Ma,$e.sum=function(t){return t&&t.length?Hn(t,sa):0},$e.sumBy=function(t,n){return t&&t.length?Hn(t,ao(n,2)):0},$e.template=function(n,e,r){var i=$e.templateSettings;r&&wo(n,e,r)&&(e=t),n=bu(n),e=Au({},e,i,Ji);var o,s,u=Au({},e.imports,i.imports,Ji),a=zu(u),c=te(u,a),h=0,l=e.interpolate||bt,f="__p += '",p=kt((e.escape||bt).source+"|"+l.source+"|"+(l===K?pt:bt).source+"|"+(e.evaluate||bt).source+"|$","g"),d="//# sourceURL="+(Lt.call(e,"sourceURL")?(e.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++un+"]")+"\n";n.replace(p,(function(t,e,r,i,u,a){return r||(r=i),f+=n.slice(h,a).replace(xt,se),e&&(o=!0,f+="' +\n__e("+e+") +\n'"),u&&(s=!0,f+="';\n"+u+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),h=a+t.length,t})),f+="';\n";var v=Lt.call(e,"variable")&&e.variable;if(v){if(lt.test(v))throw new At("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(s?f.replace(W,""):f).replace(Y,"$1").replace(V,"$1;"),f="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var g=na((function(){return jt(a,d+"return "+f).apply(t,c)}));if(g.source=f,Ks(g))throw g;return g},$e.times=function(t,n){if((t=_u(t))<1||t>p)return[];var e=v,r=ye(t,v);n=ao(n),t-=v;for(var i=Qn(r,n);++e<t;)n(e);return i},$e.toFinite=gu,$e.toInteger=_u,$e.toLength=mu,$e.toLower=function(t){return bu(t).toLowerCase()},$e.toNumber=yu,$e.toSafeInteger=function(t){return t?ur(_u(t),-9007199254740991,p):0===t?t:0},$e.toString=bu,$e.toUpper=function(t){return bu(t).toUpperCase()},$e.trim=function(n,e,r){if((n=bu(n))&&(r||e===t))return Jn(n);if(!n||!(e=ci(e)))return n;var i=pe(n),o=pe(e);return bi(i,ee(i,o),re(i,o)+1).join("")},$e.trimEnd=function(n,e,r){if((n=bu(n))&&(r||e===t))return n.slice(0,de(n)+1);if(!n||!(e=ci(e)))return n;var i=pe(n);return bi(i,0,re(i,pe(e))+1).join("")},$e.trimStart=function(n,e,r){if((n=bu(n))&&(r||e===t))return n.replace(ot,"");if(!n||!(e=ci(e)))return n;var i=pe(n);return bi(i,ee(i,pe(e))).join("")},$e.truncate=function(n,e){var r=30,i="...";if(ru(e)){var o="separator"in e?e.separator:o;r="length"in e?_u(e.length):r,i="omission"in e?ci(e.omission):i}var s=(n=bu(n)).length;if(ue(n)){var u=pe(n);s=u.length}if(r>=s)return n;var a=r-fe(i);if(a<1)return i;var c=u?bi(u,0,a).join(""):n.slice(0,a);if(o===t)return c+i;if(u&&(a+=c.length-a),au(o)){if(n.slice(a).search(o)){var h,l=c;for(o.global||(o=kt(o.source,bu(dt.exec(o))+"g")),o.lastIndex=0;h=o.exec(l);)var f=h.index;c=c.slice(0,f===t?a:f)}}else if(n.indexOf(ci(o),a)!=a){var p=c.lastIndexOf(o);p>-1&&(c=c.slice(0,p))}return c+i},$e.unescape=function(t){return(t=bu(t))&&Z.test(t)?t.replace(X,ve):t},$e.uniqueId=function(t){var n=++Dt;return bu(t)+n},$e.upperCase=Ju,$e.upperFirst=Ku,$e.each=bs,$e.eachRight=xs,$e.first=Zo,ha($e,(wa={},wr($e,(function(t,n){Lt.call($e.prototype,n)||(wa[n]=t)})),wa),{chain:!1}),$e.VERSION="4.17.21",Sn(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){$e[t].placeholder=$e})),Sn(["drop","take"],(function(n,e){We.prototype[n]=function(r){r=r===t?1:me(_u(r),0);var i=this.__filtered__&&!e?new We(this):this.clone();return i.__filtered__?i.__takeCount__=ye(r,i.__takeCount__):i.__views__.push({size:ye(r,v),type:n+(i.__dir__<0?"Right":"")}),i},We.prototype[n+"Right"]=function(t){return this.reverse()[n](t).reverse()}})),Sn(["filter","map","takeWhile"],(function(t,n){var e=n+1,r=1==e||3==e;We.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:ao(t,3),type:e}),n.__filtered__=n.__filtered__||r,n}})),Sn(["head","last"],(function(t,n){var e="take"+(n?"Right":"");We.prototype[t]=function(){return this[e](1).value()[0]}})),Sn(["initial","tail"],(function(t,n){var e="drop"+(n?"":"Right");We.prototype[t]=function(){return this.__filtered__?new We(this):this[e](1)}})),We.prototype.compact=function(){return this.filter(sa)},We.prototype.find=function(t){return this.filter(t).head()},We.prototype.findLast=function(t){return this.reverse().find(t)},We.prototype.invokeMap=Hr((function(t,n){return"function"==typeof t?new We(this):this.map((function(e){return Cr(e,t,n)}))})),We.prototype.reject=function(t){return this.filter(Ps(ao(t)))},We.prototype.slice=function(n,e){n=_u(n);var r=this;return r.__filtered__&&(n>0||e<0)?new We(r):(n<0?r=r.takeRight(-n):n&&(r=r.drop(n)),e!==t&&(r=(e=_u(e))<0?r.dropRight(-e):r.take(e-n)),r)},We.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},We.prototype.toArray=function(){return this.take(v)},wr(We.prototype,(function(n,e){var r=/^(?:filter|find|map|reject)|While$/.test(e),i=/^(?:head|last)$/.test(e),o=$e[i?"take"+("last"==e?"Right":""):e],s=i||/^find/.test(e);o&&($e.prototype[e]=function(){var e=this.__wrapped__,u=i?[1]:arguments,a=e instanceof We,c=u[0],h=a||Xs(e),l=function(t){var n=o.apply($e,Ln([t],u));return i&&f?n[0]:n};h&&r&&"function"==typeof c&&1!=c.length&&(a=h=!1);var f=this.__chain__,p=!!this.__actions__.length,d=s&&!f,v=a&&!p;if(!s&&h){e=v?e:new We(this);var g=n.apply(e,u);return g.__actions__.push({func:gs,args:[l],thisArg:t}),new Ue(g,f)}return d&&v?n.apply(this,u):(g=this.thru(l),d?i?g.value()[0]:g.value():g)})})),Sn(["pop","push","shift","sort","splice","unshift"],(function(t){var n=Tt[t],e=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);$e.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return n.apply(Xs(i)?i:[],t)}return this[e]((function(e){return n.apply(Xs(e)?e:[],t)}))}})),wr(We.prototype,(function(t,n){var e=$e[n];if(e){var r=e.name+"";Lt.call(Te,r)||(Te[r]=[]),Te[r].push({name:n,func:e})}})),Te[$i(t,2).name]=[{name:"wrapper",func:t}],We.prototype.clone=function(){var t=new We(this.__wrapped__);return t.__actions__=Si(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Si(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Si(this.__views__),t},We.prototype.reverse=function(){if(this.__filtered__){var t=new We(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},We.prototype.value=function(){var t=this.__wrapped__.value(),n=this.__dir__,e=Xs(t),r=n<0,i=e?t.length:0,o=function(t,n,e){for(var r=-1,i=e.length;++r<i;){var o=e[r],s=o.size;switch(o.type){case"drop":t+=s;break;case"dropRight":n-=s;break;case"take":n=ye(n,t+s);break;case"takeRight":t=me(t,n-s)}}return{start:t,end:n}}(0,i,this.__views__),s=o.start,u=o.end,a=u-s,c=r?u:s-1,h=this.__iteratees__,l=h.length,f=0,p=ye(a,this.__takeCount__);if(!e||!r&&i==a&&p==a)return di(t,this.__actions__);var d=[];t:for(;a--&&f<p;){for(var v=-1,g=t[c+=n];++v<l;){var _=h[v],m=_.iteratee,y=_.type,w=m(g);if(2==y)g=w;else if(!w){if(1==y)continue t;break t}}d[f++]=g}return d},$e.prototype.at=_s,$e.prototype.chain=function(){return vs(this)},$e.prototype.commit=function(){return new Ue(this.value(),this.__chain__)},$e.prototype.next=function(){this.__values__===t&&(this.__values__=vu(this.value()));var n=this.__index__>=this.__values__.length;return{done:n,value:n?t:this.__values__[this.__index__++]}},$e.prototype.plant=function(n){for(var e,r=this;r instanceof qe;){var i=qo(r);i.__index__=0,i.__values__=t,e?o.__wrapped__=i:e=i;var o=i;r=r.__wrapped__}return o.__wrapped__=n,e},$e.prototype.reverse=function(){var n=this.__wrapped__;if(n instanceof We){var e=n;return this.__actions__.length&&(e=new We(this)),(e=e.reverse()).__actions__.push({func:gs,args:[rs],thisArg:t}),new Ue(e,this.__chain__)}return this.thru(rs)},$e.prototype.toJSON=$e.prototype.valueOf=$e.prototype.value=function(){return di(this.__wrapped__,this.__actions__)},$e.prototype.first=$e.prototype.head,Jt&&($e.prototype[Jt]=function(){return this}),$e}();_n?((_n.exports=ge)._=ge,gn._=ge):vn._=ge}.call(n);var s=o.exports;const u=(t="",n,e="")=>{const r=document.getElementById(t);n?null==r||r.setAttribute("style",n):null==r||r.removeAttribute("style"),(null==r?void 0:r.innerHTML.replaceAll("'",'"'))!==e.replaceAll("'",'"')&&r&&(r.innerHTML=e)},a=(t={})=>{const n=[];for(const e in t){const r=`${s.kebabCase(e)}: ${t[e]};`;n.push(r)}return n.join(" ")},c={},h=[];function l(t,n){if(Array.isArray(t))for(const e of t)l(e,n);else if("object"!=typeof t)p(Object.getOwnPropertyNames(n)),c[t]=Object.assign(c[t]||{},n);else for(const e in t)l(e,t[e])}function f(t){return c[t]||{}}function p(t){h.push(...t)}function d(t,n){let e;const r=t.length,i=[];for(e=0;e<r;e++)i.push(n(t[e]));return i}function v(t){return t%360*Math.PI/180}function g(t){return t.charAt(0).toUpperCase()+t.slice(1)}function _(t,n,e,r){return null!=n&&null!=e||(r=r||t.bbox(),null==n?n=r.width/r.height*e:null==e&&(e=r.height/r.width*n)),{width:n,height:e}}function m(t,n){const e=t.origin;let r=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",i=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=e&&([r,i]=Array.isArray(e)?e:"object"==typeof e?[e.x,e.y]:[e,e]);const o="string"==typeof r,s="string"==typeof i;if(o||s){const{height:t,width:e,x:u,y:a}=n.bbox();o&&(r=r.includes("left")?u:r.includes("right")?u+e:u+e/2),s&&(i=i.includes("top")?a:i.includes("bottom")?a+t:a+t/2)}return[r,i]}const y=new Set(["desc","metadata","title"]),w=t=>y.has(t.nodeName),b=(t,n,e={})=>{const r={...n};for(const i in r)r[i].valueOf()===e[i]&&delete r[i];Object.keys(r).length?t.node.setAttribute("data-svgjs",JSON.stringify(r)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},x="http://www.w3.org/2000/svg",E="http://www.w3.org/2000/xmlns/",A="http://www.w3.org/1999/xlink",j={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};let O=class{};const M={},k="___SYMBOL___ROOT___";function S(t,n=x){return j.document.createElementNS(n,t)}function C(t,n=!1){if(t instanceof O)return t;if("object"==typeof t)return N(t);if(null==t)return new M[k];if("string"==typeof t&&"<"!==t.charAt(0))return N(j.document.querySelector(t));const e=n?j.document.createElement("div"):S("svg");return e.innerHTML=t,t=N(e.firstChild),e.removeChild(e.firstChild),t}function T(t,n){return n&&(n instanceof j.window.Node||n.ownerDocument&&n instanceof n.ownerDocument.defaultView.Node)?n:S(t)}function I(t){if(!t)return null;if(t.instance instanceof O)return t.instance;if("#document-fragment"===t.nodeName)return new M.Fragment(t);let n=g(t.nodeName||"Dom");return"LinearGradient"===n||"RadialGradient"===n?n="Gradient":M[n]||(n="Dom"),new M[n](t)}let N=I;function z(t,n=t.name,e=!1){return M[n]=t,e&&(M[k]=t),p(Object.getOwnPropertyNames(t.prototype)),t}let R=1e3;function L(t){return"Svgjs"+g(t)+R++}function D(t){for(let n=t.children.length-1;n>=0;n--)D(t.children[n]);return t.id?(t.id=L(t.nodeName),t):t}function P(t,n){let e,r;for(r=(t=Array.isArray(t)?t:[t]).length-1;r>=0;r--)for(e in n)t[r].prototype[e]=n[e]}function F(t){return function(...n){const e=n[n.length-1];return!e||e.constructor!==Object||e instanceof Array?t.apply(this,n):t.apply(this,n.slice(0,-1)).attr(e)}}l("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=C(t)).remove();const n=this.position();return this.parent().add(t,n),this},after:function(t){(t=C(t)).remove();const n=this.position();return this.parent().add(t,n+1),this},insertBefore:function(t){return(t=C(t)).before(this),this},insertAfter:function(t){return(t=C(t)).after(this),this}});const $=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,B=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,q=/rgb\((\d+),(\d+),(\d+)\)/,U=/(#[a-z_][a-z0-9\-_]*)/i,W=/\)\s*,?\s*/,Y=/\s/g,V=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,X=/^rgb\(/,G=/^(\s+)?$/,Z=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,H=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,Q=/[\s,]+/,J=/[MLHVCSQTAZ]/i;function K(t){const n=Math.round(t),e=Math.max(0,Math.min(255,n)).toString(16);return 1===e.length?"0"+e:e}function tt(t,n){for(let e=n.length;e--;)if(null==t[n[e]])return!1;return!0}function nt(t,n,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(n-t)*e:e<.5?n:e<2/3?t+(n-t)*(2/3-e)*6:t}l("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(Q)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const n=this.classes();n.push(t),this.attr("class",n.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(n){return n!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),l("Dom",{css:function(t,n){const e={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const n=t.split(/\s*:\s*/);e[n[0]]=n[1]})),e;if(arguments.length<2){if(Array.isArray(t)){for(const n of t){const t=n;e[n]=this.node.style.getPropertyValue(t)}return e}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const n in t)this.node.style.setProperty(n,null==t[n]||G.test(t[n])?"":t[n])}return 2===arguments.length&&this.node.style.setProperty(t,null==n||G.test(n)?"":n),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),l("Dom",{data:function(t,n,e){if(null==t)return this.data(d(function(t,n){let e;const r=t.length,i=[];for(e=0;e<r;e++)n(t[e])&&i.push(t[e]);return i}(this.node.attributes,(t=>0===t.nodeName.indexOf("data-"))),(t=>t.nodeName.slice(5))));if(t instanceof Array){const n={};for(const e of t)n[e]=this.data(e);return n}if("object"==typeof t)for(n in t)this.data(n,t[n]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(r){return this.attr("data-"+t)}else this.attr("data-"+t,null===n?null:!0===e||"string"==typeof n||"number"==typeof n?n:JSON.stringify(n));return this}}),l("Dom",{remember:function(t,n){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=n}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});let et=class t{constructor(...t){this.init(...t)}static isColor(n){return n&&(n instanceof t||this.isRgb(n)||this.test(n))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(n="vibrant",e){const{random:r,round:i,sin:o,PI:s}=Math;if("vibrant"===n){const n=24*r()+57,e=38*r()+45,i=360*r();return new t(n,e,i,"lch")}if("sine"===n){const n=i(80*o(2*s*(e=null==e?r():e)/.5+.01)+150),u=i(50*o(2*s*e/.5+4.6)+200),a=i(100*o(2*s*e/.5+2.3)+150);return new t(n,u,a)}if("pastel"===n){const n=8*r()+86,e=17*r()+9,i=360*r();return new t(n,e,i,"lch")}if("dark"===n){const n=10+10*r(),e=50*r()+86,i=360*r();return new t(n,e,i,"lch")}if("rgb"===n){const n=255*r(),e=255*r(),i=255*r();return new t(n,e,i)}if("lab"===n){const n=100*r(),e=256*r()-128,i=256*r()-128;return new t(n,e,i,"lab")}if("grey"===n){const n=255*r();return new t(n,n,n)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(V.test(t)||X.test(t))}cmyk(){const{_a:n,_b:e,_c:r}=this.rgb(),[i,o,s]=[n,e,r].map((t=>t/255)),u=Math.min(1-i,1-o,1-s);if(1===u)return new t(0,0,0,1,"cmyk");return new t((1-i-u)/(1-u),(1-o-u)/(1-u),(1-s-u)/(1-u),u,"cmyk")}hsl(){const{_a:n,_b:e,_c:r}=this.rgb(),[i,o,s]=[n,e,r].map((t=>t/255)),u=Math.max(i,o,s),a=Math.min(i,o,s),c=(u+a)/2,h=u===a,l=u-a;return new t(360*(h?0:u===i?((o-s)/l+(o<s?6:0))/6:u===o?((s-i)/l+2)/6:u===s?((i-o)/l+4)/6:0),100*(h?0:c>.5?l/(2-u-a):l/(u+a)),100*c,"hsl")}init(t=0,n=0,e=0,r=0,i="rgb"){if(t=t||0,this.space)for(const l in this.space)delete this[this.space[l]];if("number"==typeof t)i="string"==typeof r?r:i,r="string"==typeof r?0:r,Object.assign(this,{_a:t,_b:n,_c:e,_d:r,space:i});else if(t instanceof Array)this.space=n||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const e=function(t,n){const e=tt(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:tt(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:tt(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:tt(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:tt(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:tt(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return e.space=n||e.space,e}(t,n);Object.assign(this,e)}else if("string"==typeof t)if(X.test(t)){const n=t.replace(Y,""),[e,r,i]=q.exec(n).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:e,_b:r,_c:i,_d:0,space:"rgb"})}else{if(!V.test(t))throw Error("Unsupported string format, can't construct Color");{const n=t=>parseInt(t,16),[,e,r,i]=B.exec((o=t,4===o.length?["#",o.substring(1,2),o.substring(1,2),o.substring(2,3),o.substring(2,3),o.substring(3,4),o.substring(3,4)].join(""):o)).map(n);Object.assign(this,{_a:e,_b:r,_c:i,_d:0,space:"rgb"})}}var o;const{_a:s,_b:u,_c:a,_d:c}=this,h="rgb"===this.space?{r:s,g:u,b:a}:"xyz"===this.space?{x:s,y:u,z:a}:"hsl"===this.space?{h:s,s:u,l:a}:"lab"===this.space?{l:s,a:u,b:a}:"lch"===this.space?{l:s,c:u,h:a}:"cmyk"===this.space?{c:s,m:u,y:a,k:c}:{};Object.assign(this,h)}lab(){const{x:n,y:e,z:r}=this.xyz();return new t(116*e-16,500*(n-e),200*(e-r),"lab")}lch(){const{l:n,a:e,b:r}=this.lab(),i=Math.sqrt(e**2+r**2);let o=180*Math.atan2(r,e)/Math.PI;o<0&&(o*=-1,o=360-o);return new t(n,i,o,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(n=this.space)||"xyz"===n||"lch"===n){let{x:n,y:e,z:r}=this;if("lab"===this.space||"lch"===this.space){let{l:t,a:i,b:o}=this;if("lch"===this.space){const{c:t,h:n}=this,e=Math.PI/180;i=t*Math.cos(e*n),o=t*Math.sin(e*n)}const s=(t+16)/116,u=i/500+s,a=s-o/200,c=16/116,h=.008856,l=7.787;n=.95047*(u**3>h?u**3:(u-c)/l),e=1*(s**3>h?s**3:(s-c)/l),r=1.08883*(a**3>h?a**3:(a-c)/l)}const i=3.2406*n+-1.5372*e+-.4986*r,o=-.9689*n+1.8758*e+.0415*r,s=.0557*n+-.204*e+1.057*r,u=Math.pow,a=.0031308,c=i>a?1.055*u(i,1/2.4)-.055:12.92*i,h=o>a?1.055*u(o,1/2.4)-.055:12.92*o,l=s>a?1.055*u(s,1/2.4)-.055:12.92*s;return new t(255*c,255*h,255*l)}if("hsl"===this.space){let{h:n,s:e,l:r}=this;if(n/=360,e/=100,r/=100,0===e){r*=255;return new t(r,r,r)}const i=r<.5?r*(1+e):r+e-r*e,o=2*r-i,s=255*nt(o,i,n+1/3),u=255*nt(o,i,n),a=255*nt(o,i,n-1/3);return new t(s,u,a)}if("cmyk"===this.space){const{c:n,m:e,y:r,k:i}=this,o=255*(1-Math.min(1,n*(1-i)+i)),s=255*(1-Math.min(1,e*(1-i)+i)),u=255*(1-Math.min(1,r*(1-i)+i));return new t(o,s,u)}return this;var n}toArray(){const{_a:t,_b:n,_c:e,_d:r,space:i}=this;return[t,n,e,r,i]}toHex(){const[t,n,e]=this._clamped().map(K);return`#${t}${n}${e}`}toRgb(){const[t,n,e]=this._clamped();return`rgb(${t},${n},${e})`}toString(){return this.toHex()}xyz(){const{_a:n,_b:e,_c:r}=this.rgb(),[i,o,s]=[n,e,r].map((t=>t/255)),u=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,a=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92,c=s>.04045?Math.pow((s+.055)/1.055,2.4):s/12.92,h=(.4124*u+.3576*a+.1805*c)/.95047,l=(.2126*u+.7152*a+.0722*c)/1,f=(.0193*u+.1192*a+.9505*c)/1.08883,p=h>.008856?Math.pow(h,1/3):7.787*h+16/116,d=l>.008856?Math.pow(l,1/3):7.787*l+16/116,v=f>.008856?Math.pow(f,1/3):7.787*f+16/116;return new t(p,d,v,"xyz")}_clamped(){const{_a:t,_b:n,_c:e}=this.rgb(),{max:r,min:i,round:o}=Math;return[t,n,e].map((t=>r(0,i(o(t),255))))}},rt=class t{constructor(...t){this.init(...t)}clone(){return new t(this)}init(t,n){const e=0,r=0,i=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:n};return this.x=null==i.x?e:i.x,this.y=null==i.y?r:i.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){ot.isMatrixLike(t)||(t=new ot(t));const{x:n,y:e}=this;return this.x=t.a*n+t.c*e+t.e,this.y=t.b*n+t.d*e+t.f,this}};function it(t,n,e){return Math.abs(n-t)<1e-6}let ot=class t{constructor(...t){this.init(...t)}static formatTransforms(t){const n="both"===t.flip||!0===t.flip,e=t.flip&&(n||"x"===t.flip)?-1:1,r=t.flip&&(n||"y"===t.flip)?-1:1,i=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,o=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,s=t.scale&&t.scale.length?t.scale[0]*e:isFinite(t.scale)?t.scale*e:isFinite(t.scaleX)?t.scaleX*e:e,u=t.scale&&t.scale.length?t.scale[1]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleY)?t.scaleY*r:r,a=t.shear||0,c=t.rotate||t.theta||0,h=new rt(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),l=h.x,f=h.y,p=new rt(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),d=p.x,v=p.y,g=new rt(t.translate||t.tx||t.translateX,t.ty||t.translateY),_=g.x,m=g.y,y=new rt(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:s,scaleY:u,skewX:i,skewY:o,shear:a,theta:c,rx:y.x,ry:y.y,tx:_,ty:m,ox:l,oy:f,px:d,py:v}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,n,e){const r=t.a*n.a+t.c*n.b,i=t.b*n.a+t.d*n.b,o=t.a*n.c+t.c*n.d,s=t.b*n.c+t.d*n.d,u=t.e+t.a*n.e+t.c*n.f,a=t.f+t.b*n.e+t.d*n.f;return e.a=r,e.b=i,e.c=o,e.d=s,e.e=u,e.f=a,e}around(t,n,e){return this.clone().aroundO(t,n,e)}aroundO(t,n,e){const r=t||0,i=n||0;return this.translateO(-r,-i).lmultiplyO(e).translateO(r,i)}clone(){return new t(this)}decompose(t=0,n=0){const e=this.a,r=this.b,i=this.c,o=this.d,s=this.e,u=this.f,a=e*o-r*i,c=a>0?1:-1,h=c*Math.sqrt(e*e+r*r),l=Math.atan2(c*r,c*e),f=180/Math.PI*l,p=Math.cos(l),d=Math.sin(l),v=(e*i+r*o)/a,g=i*h/(v*e-r)||o*h/(v*r+e);return{scaleX:h,scaleY:g,shear:v,rotate:f,translateX:s-t+t*p*h+n*(v*p*h-d*g),translateY:u-n+t*d*h+n*(v*d*h+p*g),originX:t,originY:n,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(n){if(n===this)return!0;const e=new t(n);return it(this.a,e.a)&&it(this.b,e.b)&&it(this.c,e.c)&&it(this.d,e.d)&&it(this.e,e.e)&&it(this.f,e.f)}flip(t,n){return this.clone().flipO(t,n)}flipO(t,n){return"x"===t?this.scaleO(-1,1,n,0):"y"===t?this.scaleO(1,-1,0,n):this.scaleO(-1,-1,t,n||t)}init(n){const e=t.fromArray([1,0,0,1,0,0]);return n=n instanceof Ct?n.matrixify():"string"==typeof n?t.fromArray(n.split(Q).map(parseFloat)):Array.isArray(n)?t.fromArray(n):"object"==typeof n&&t.isMatrixLike(n)?n:"object"==typeof n?(new t).transform(n):6===arguments.length?t.fromArray([].slice.call(arguments)):e,this.a=null!=n.a?n.a:e.a,this.b=null!=n.b?n.b:e.b,this.c=null!=n.c?n.c:e.c,this.d=null!=n.d?n.d:e.d,this.e=null!=n.e?n.e:e.e,this.f=null!=n.f?n.f:e.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,n=this.b,e=this.c,r=this.d,i=this.e,o=this.f,s=t*r-n*e;if(!s)throw new Error("Cannot invert "+this);const u=r/s,a=-n/s,c=-e/s,h=t/s,l=-(u*i+c*o),f=-(a*i+h*o);return this.a=u,this.b=a,this.c=c,this.d=h,this.e=l,this.f=f,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(n){const e=n instanceof t?n:new t(n);return t.matrixMultiply(e,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(n){const e=n instanceof t?n:new t(n);return t.matrixMultiply(this,e,this)}rotate(t,n,e){return this.clone().rotateO(t,n,e)}rotateO(t,n=0,e=0){t=v(t);const r=Math.cos(t),i=Math.sin(t),{a:o,b:s,c:u,d:a,e:c,f:h}=this;return this.a=o*r-s*i,this.b=s*r+o*i,this.c=u*r-a*i,this.d=a*r+u*i,this.e=c*r-h*i+e*i-n*r+n,this.f=h*r+c*i-n*i-e*r+e,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,n=t,e=0,r=0){3===arguments.length&&(r=e,e=n,n=t);const{a:i,b:o,c:s,d:u,e:a,f:c}=this;return this.a=i*t,this.b=o*n,this.c=s*t,this.d=u*n,this.e=a*t-e*t+e,this.f=c*n-r*n+r,this}shear(t,n,e){return this.clone().shearO(t,n,e)}shearO(t,n=0,e=0){const{a:r,b:i,c:o,d:s,e:u,f:a}=this;return this.a=r+i*t,this.c=o+s*t,this.e=u+a*t-e*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,n=t,e=0,r=0){3===arguments.length&&(r=e,e=n,n=t),t=v(t),n=v(n);const i=Math.tan(t),o=Math.tan(n),{a:s,b:u,c:a,d:c,e:h,f:l}=this;return this.a=s+u*i,this.b=u+s*o,this.c=a+c*i,this.d=c+a*o,this.e=h+l*i-r*i,this.f=l+h*o-e*o,this}skewX(t,n,e){return this.skew(t,0,n,e)}skewY(t,n,e){return this.skew(0,t,n,e)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(n){if(t.isMatrixLike(n)){return new t(n).multiplyO(this)}const e=t.formatTransforms(n),{x:r,y:i}=new rt(e.ox,e.oy).transform(this),o=(new t).translateO(e.rx,e.ry).lmultiplyO(this).translateO(-r,-i).scaleO(e.scaleX,e.scaleY).skewO(e.skewX,e.skewY).shearO(e.shear).rotateO(e.theta).translateO(r,i);if(isFinite(e.px)||isFinite(e.py)){const t=new rt(r,i).transform(o),n=isFinite(e.px)?e.px-t.x:0,s=isFinite(e.py)?e.py-t.y:0;o.translateO(n,s)}return o.translateO(e.tx,e.ty),o}translate(t,n){return this.clone().translateO(t,n)}translateO(t,n){return this.e+=t||0,this.f+=n||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}};function st(){if(!st.nodes){const t=C().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const n=t.path().node;st.nodes={svg:t,path:n}}if(!st.nodes.svg.node.parentNode){const t=j.document.body||j.document.documentElement;st.nodes.svg.addTo(t)}return st.nodes}function ut(t){return!(t.width||t.height||t.x||t.y)}z(ot,"Matrix");let at=class t{constructor(...t){this.init(...t)}addOffset(){return this.x+=j.window.pageXOffset,this.y+=j.window.pageYOffset,new t(this)}init(t){return t="string"==typeof t?t.split(Q).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return ut(this)}merge(n){const e=Math.min(this.x,n.x),r=Math.min(this.y,n.y),i=Math.max(this.x+this.width,n.x+n.width)-e,o=Math.max(this.y+this.height,n.y+n.height)-r;return new t(e,r,i,o)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(n){n instanceof ot||(n=new ot(n));let e=1/0,r=-1/0,i=1/0,o=-1/0;return[new rt(this.x,this.y),new rt(this.x2,this.y),new rt(this.x,this.y2),new rt(this.x2,this.y2)].forEach((function(t){t=t.transform(n),e=Math.min(e,t.x),r=Math.max(r,t.x),i=Math.min(i,t.y),o=Math.max(o,t.y)})),new t(e,i,r-e,o-i)}};function ct(t,n,e){let r;try{if(r=n(t.node),ut(r)&&((i=t.node)!==j.document&&!(j.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===j.document}).call(j.document.documentElement,i)))throw new Error("Element not in the dom")}catch(o){r=e(t)}var i;return r}l({viewbox:{viewbox(t,n,e,r){return null==t?new at(this.attr("viewBox")):this.attr("viewBox",new at(t,n,e,r))},zoom(t,n){let{width:e,height:r}=this.attr(["width","height"]);if((e||r)&&"string"!=typeof e&&"string"!=typeof r||(e=this.node.clientWidth,r=this.node.clientHeight),!e||!r)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const i=this.viewbox(),o=e/i.width,s=r/i.height,u=Math.min(o,s);if(null==t)return u;let a=u/t;a===1/0&&(a=Number.MAX_SAFE_INTEGER/100),n=n||new rt(e/2/o+i.x,r/2/s+i.y);const c=new at(i).transform(new ot({scale:a,origin:n}));return this.viewbox(c)}}}),z(at,"Box");let ht=class extends Array{constructor(t=[],...n){if(super(t,...n),"number"==typeof t)return this;this.length=0,this.push(...t)}};P([ht],{each(t,...n){return"function"==typeof t?this.map(((n,e,r)=>t.call(n,n,e,r))):this.map((e=>e[t](...n)))},toArray(){return Array.prototype.concat.apply([],this)}});const lt=["toArray","constructor","each"];function ft(t,n){return new ht(d((n||j.document).querySelectorAll(t),(function(t){return I(t)})))}ht.extend=function(t){t=t.reduce(((t,n)=>(lt.includes(n)||"_"===n[0]||(n in Array.prototype&&(t["$"+n]=Array.prototype[n]),t[n]=function(...t){return this.each(n,...t)}),t)),{}),P([ht],t)};let pt=0;const dt={};function vt(t){let n=t.getEventHolder();return n===j.window&&(n=dt),n.events||(n.events={}),n.events}function gt(t){return t.getEventTarget()}function _t(t,n,e,r,i){const o=e.bind(r||t),s=C(t),u=vt(s),a=gt(s);n=Array.isArray(n)?n:n.split(Q),e._svgjsListenerId||(e._svgjsListenerId=++pt),n.forEach((function(t){const n=t.split(".")[0],r=t.split(".")[1]||"*";u[n]=u[n]||{},u[n][r]=u[n][r]||{},u[n][r][e._svgjsListenerId]=o,a.addEventListener(n,o,i||!1)}))}function mt(t,n,e,r){const i=C(t),o=vt(i),s=gt(i);("function"!=typeof e||(e=e._svgjsListenerId))&&(n=Array.isArray(n)?n:(n||"").split(Q)).forEach((function(t){const n=t&&t.split(".")[0],u=t&&t.split(".")[1];let a,c;if(e)o[n]&&o[n][u||"*"]&&(s.removeEventListener(n,o[n][u||"*"][e],r||!1),delete o[n][u||"*"][e]);else if(n&&u){if(o[n]&&o[n][u]){for(c in o[n][u])mt(s,[n,u].join("."),c);delete o[n][u]}}else if(u)for(t in o)for(a in o[t])u===a&&mt(s,[t,u].join("."));else if(n){if(o[n]){for(a in o[n])mt(s,[n,a].join("."));delete o[n]}}else{for(t in o)mt(s,t);!function(t){let n=t.getEventHolder();n===j.window&&(n=dt),n.events&&(n.events={})}(i)}}))}let yt=class extends O{addEventListener(){}dispatch(t,n,e){return function(t,n,e,r){const i=gt(t);return n instanceof j.window.Event||(n=new j.window.CustomEvent(n,{detail:e,cancelable:!0,...r})),i.dispatchEvent(n),n}(this,t,n,e)}dispatchEvent(t){const n=this.getEventHolder().events;if(!n)return!0;const e=n[t.type];for(const r in e)for(const n in e[r])e[r][n](t);return!t.defaultPrevented}fire(t,n,e){return this.dispatch(t,n,e),this}getEventHolder(){return this}getEventTarget(){return this}off(t,n,e){return mt(this,t,n,e),this}on(t,n,e,r){return _t(this,t,n,e,r),this}removeEventListener(){}};function wt(){}z(yt,"EventTarget");const bt=400,xt=">",Et=0,At={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};let jt=class extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(Q).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}},Ot=class t{constructor(...t){this.init(...t)}convert(n){return new t(this.value,n)}divide(n){return n=new t(n),new t(this/n,this.unit||n.unit)}init(n,e){return e=Array.isArray(n)?n[1]:e,n=Array.isArray(n)?n[0]:n,this.value=0,this.unit=e||"","number"==typeof n?this.value=isNaN(n)?0:isFinite(n)?n:n<0?-34e37:34e37:"string"==typeof n?(e=n.match($))&&(this.value=parseFloat(e[1]),"%"===e[5]?this.value/=100:"s"===e[5]&&(this.value*=1e3),this.unit=e[5]):n instanceof t&&(this.value=n.valueOf(),this.unit=n.unit),this}minus(n){return n=new t(n),new t(this-n,this.unit||n.unit)}plus(n){return n=new t(n),new t(this+n,this.unit||n.unit)}times(n){return n=new t(n),new t(this*n,this.unit||n.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}};const Mt=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),kt=[];let St=class t extends yt{constructor(t,n){super(),this.node=t,this.type=t.nodeName,n&&t!==n&&this.attr(n)}add(t,n){return(t=C(t)).removeNamespace&&this.node instanceof j.window.SVGElement&&t.removeNamespace(),null==n?this.node.appendChild(t.node):t.node!==this.node.childNodes[n]&&this.node.insertBefore(t.node,this.node.childNodes[n]),this}addTo(t,n){return C(t).put(this,n)}children(){return new ht(d(this.node.children,(function(t){return I(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,n=!0){this.writeDataToDom();let e=this.node.cloneNode(t);return n&&(e=D(e)),new this.constructor(e)}each(t,n){const e=this.children();let r,i;for(r=0,i=e.length;r<i;r++)t.apply(e[r],[r,e]),n&&e[r].each(t,n);return this}element(n,e){return this.put(new t(S(n),e))}first(){return I(this.node.firstChild)}get(t){return I(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,n){return this.xml(t,n,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=L(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return I(this.node.lastChild)}matches(t){const n=this.node,e=n.matches||n.matchesSelector||n.msMatchesSelector||n.mozMatchesSelector||n.webkitMatchesSelector||n.oMatchesSelector||null;return e&&e.call(n,t)}parent(t){let n=this;if(!n.node.parentNode)return null;if(n=I(n.node.parentNode),!t)return n;do{if("string"==typeof t?n.matches(t):n instanceof t)return n}while(n=I(n.node.parentNode));return n}put(t,n){return t=C(t),this.add(t,n),t}putIn(t,n){return C(t).add(this,n)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=C(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,n=null){const e=10**t,r=this.attr(n);for(const i in r)"number"==typeof r[i]&&(r[i]=Math.round(r[i]*e)/e);return this.attr(r),this}svg(t,n){return this.xml(t,n,x)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const n=this.parent();if(!n)return this.addTo(t);const e=n.index(this);return n.put(t,e).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,n,e){if("boolean"==typeof t&&(e=n,n=t,t=null),null==t||"function"==typeof t){n=null==n||n,this.writeDataToDom();let e=this;if(null!=t){if(e=I(e.node.cloneNode(!0)),n){const n=t(e);if(e=n||e,!1===n)return""}e.each((function(){const n=t(this),e=n||this;!1===n?this.remove():n&&this!==e&&this.replace(e)}),!0)}return n?e.node.outerHTML:e.node.innerHTML}n=null!=n&&n;const r=S("wrapper",e),i=j.document.createDocumentFragment();r.innerHTML=t;for(let s=r.children.length;s--;)i.appendChild(r.firstElementChild);const o=this.parent();return n?this.replace(i)&&o:this.add(i)}};P(St,{attr:function(t,n,e){if(null==t){t={},n=this.node.attributes;for(const e of n)t[e.nodeName]=Z.test(e.nodeValue)?parseFloat(e.nodeValue):e.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,n)=>(t[n]=this.attr(n),t)),{});if("object"==typeof t&&t.constructor===Object)for(n in t)this.attr(n,t[n]);else if(null===n)this.node.removeAttribute(t);else{if(null==n)return null==(n=this.node.getAttribute(t))?At[t]:Z.test(n)?parseFloat(n):n;"number"==typeof(n=kt.reduce(((n,e)=>e(t,n,this)),n))?n=new Ot(n):Mt.has(t)&&et.isColor(n)?n=new et(n):n.constructor===Array&&(n=new jt(n)),"leading"===t?this.leading&&this.leading(n):"string"==typeof e?this.node.setAttributeNS(e,t,n.toString()):this.node.setAttribute(t,n.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return ft(t,this.node)},findOne:function(t){return I(this.node.querySelector(t))}}),z(St,"Dom");let Ct=class extends St{constructor(t,n){super(t,n),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,n){return this.cx(t).cy(n)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,n){return this.dx(t).dy(n)}dx(t=0){return this.x(new Ot(t).plus(this.x()))}dy(t=0){return this.y(new Ot(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,n){return this.x(t).y(n)}parents(t=this.root()){const n="string"==typeof t;n||(t=C(t));const e=new ht;let r=this;for(;(r=r.parent())&&r.node!==j.document&&"#document-fragment"!==r.nodeName&&(e.push(r),n||r.node!==t.node)&&(!n||!r.matches(t));)if(r.node===this.root().node)return null;return e}reference(t){if(!(t=this.attr(t)))return null;const n=(t+"").match(U);return n?C(n[1]):null}root(){const t=this.parent(M[k]);return t&&t.root()}setData(t){return this.dom=t,this}size(t,n){const e=_(this,t,n);return this.width(new Ot(e.width)).height(new Ot(e.height))}width(t){return this.attr("width",t)}writeDataToDom(){return b(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}};P(Ct,{bbox:function(){const t=ct(this,(t=>t.getBBox()),(t=>{try{const n=t.clone().addTo(st().svg).show(),e=n.node.getBBox();return n.remove(),e}catch(n){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${n.toString()}`)}}));return new at(t)},rbox:function(t){const n=ct(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),e=new at(n);return t?e.transform(t.screenCTM().inverseO()):e.addOffset()},inside:function(t,n){const e=this.bbox();return t>e.x&&n>e.y&&t<e.x+e.width&&n<e.y+e.height},point:function(t,n){return new rt(t,n).transformO(this.screenCTM().inverseO())},ctm:function(){return new ot(this.node.getCTM())},screenCTM:function(){try{if("function"==typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),n=t.node.getScreenCTM();return t.remove(),new ot(n)}return new ot(this.node.getScreenCTM())}catch(t){return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new ot}}}),z(Ct,"Element");const Tt={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,n){return"color"===n?t:t+"-"+n}};["fill","stroke"].forEach((function(t){const n={};let e;n[t]=function(n){if(void 0===n)return this.attr(t);if("string"==typeof n||n instanceof et||et.isRgb(n)||n instanceof Ct)this.attr(t,n);else for(e=Tt[t].length-1;e>=0;e--)null!=n[Tt[t][e]]&&this.attr(Tt.prefix(t,Tt[t][e]),n[Tt[t][e]]);return this},l(["Element","Runner"],n)})),l(["Element","Runner"],{matrix:function(t,n,e,r,i,o){return null==t?new ot(this):this.attr("transform",new ot(t,n,e,r,i,o))},rotate:function(t,n,e){return this.transform({rotate:t,ox:n,oy:e},!0)},skew:function(t,n,e,r){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:n,oy:e},!0):this.transform({skew:[t,n],ox:e,oy:r},!0)},shear:function(t,n,e){return this.transform({shear:t,ox:n,oy:e},!0)},scale:function(t,n,e,r){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:n,oy:e},!0):this.transform({scale:[t,n],ox:e,oy:r},!0)},translate:function(t,n){return this.transform({translate:[t,n]},!0)},relative:function(t,n){return this.transform({relative:[t,n]},!0)},flip:function(t="both",n="center"){return-1==="xybothtrue".indexOf(t)&&(n=t,t="both"),this.transform({flip:t,origin:n},!0)},opacity:function(t){return this.attr("opacity",t)}}),l("radius",{radius:function(t,n=t){return"radialGradient"===(this._element||this).type?this.attr("r",new Ot(t)):this.rx(t).ry(n)}}),l("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new rt(this.node.getPointAtLength(t))}}),l(["Element","Runner"],{font:function(t,n){if("object"==typeof t){for(n in t)this.font(n,t[n]);return this}return"leading"===t?this.leading(n):"anchor"===t?this.attr("text-anchor",n):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,n):this.attr(t,n)}});l("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,n){return t[n]=function(t){return null===t?this.off(n):this.on(n,t),this},t}),{})),l("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(W).slice(0,-1).map((function(t){const n=t.trim().split("(");return[n[0],n[1].split(Q).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,n){return"matrix"===n[0]?t.lmultiply(ot.fromArray(n[1])):t[n[0]].apply(t,n[1])}),new ot)},toParent:function(t,n){if(this===t)return this;if(w(this.node))return this.addTo(t,n);const e=this.screenCTM(),r=t.screenCTM().inverse();return this.addTo(t,n).untransform().transform(r.multiply(e)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,n){if(null==t||"string"==typeof t){const n=new ot(this).decompose();return null==t?n:n[t]}ot.isMatrixLike(t)||(t={...t,origin:m(t,this)});const e=new ot(!0===n?this:n||!1).transform(t);return this.attr("transform",e)}});let It=class t extends Ct{flatten(){return this.each((function(){if(this instanceof t)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),n=t.index(this)){return n=-1===n?t.children().length:n,this.each((function(e,r){return r[r.length-e-1].toParent(t,n)})),this.remove()}};z(It,"Container");let Nt=class extends It{constructor(t,n=t){super(T("defs",t),n)}flatten(){return this}ungroup(){return this}};z(Nt,"Defs");let zt=class extends Ct{};function Rt(t){return this.attr("rx",t)}function Lt(t){return this.attr("ry",t)}function Dt(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Pt(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function Ft(t){return this.attr("cx",t)}function $t(t){return this.attr("cy",t)}function Bt(t){return null==t?2*this.rx():this.rx(new Ot(t).divide(2))}function qt(t){return null==t?2*this.ry():this.ry(new Ot(t).divide(2))}z(zt,"Shape");const Ut=Object.freeze(Object.defineProperty({__proto__:null,cx:Ft,cy:$t,height:qt,rx:Rt,ry:Lt,width:Bt,x:Dt,y:Pt},Symbol.toStringTag,{value:"Module"}));let Wt=class extends zt{constructor(t,n=t){super(T("ellipse",t),n)}size(t,n){const e=_(this,t,n);return this.rx(new Ot(e.width).divide(2)).ry(new Ot(e.height).divide(2))}};P(Wt,Ut),l("Container",{ellipse:F((function(t=0,n=t){return this.put(new Wt).size(t,n).move(0,0)}))}),z(Wt,"Ellipse");let Yt=class extends St{constructor(t=j.document.createDocumentFragment()){super(t)}xml(t,n,e){if("boolean"==typeof t&&(e=n,n=t,t=null),null==t||"function"==typeof t){const t=new St(S("wrapper",e));return t.add(this.node.cloneNode(!0)),t.xml(!1,e)}return super.xml(t,!1,e)}};function Vt(t,n){return"radialGradient"===(this._element||this).type?this.attr({fx:new Ot(t),fy:new Ot(n)}):this.attr({x1:new Ot(t),y1:new Ot(n)})}function Xt(t,n){return"radialGradient"===(this._element||this).type?this.attr({cx:new Ot(t),cy:new Ot(n)}):this.attr({x2:new Ot(t),y2:new Ot(n)})}z(Yt,"Fragment");const Gt=Object.freeze(Object.defineProperty({__proto__:null,from:Vt,to:Xt},Symbol.toStringTag,{value:"Module"}));let Zt=class extends It{constructor(t,n){super(T(t+"Gradient","string"==typeof t?null:t),n)}attr(t,n,e){return"transform"===t&&(t="gradientTransform"),super.attr(t,n,e)}bbox(){return new at}targets(){return ft("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}};P(Zt,Gt),l({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:F((function(t,n){return this.put(new Zt(t)).update(n)}))}}),z(Zt,"Gradient");let Ht=class extends It{constructor(t,n=t){super(T("pattern",t),n)}attr(t,n,e){return"transform"===t&&(t="patternTransform"),super.attr(t,n,e)}bbox(){return new at}targets(){return ft("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}};l({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:F((function(t,n,e){return this.put(new Ht).update(e).attr({x:0,y:0,width:t,height:n,patternUnits:"userSpaceOnUse"})}))}}),z(Ht,"Pattern");let Qt=class extends zt{constructor(t,n=t){super(T("image",t),n)}load(t,n){if(!t)return this;const e=new j.window.Image;return _t(e,"load",(function(t){const r=this.parent(Ht);0===this.width()&&0===this.height()&&this.size(e.width,e.height),r instanceof Ht&&0===r.width()&&0===r.height()&&r.size(this.width(),this.height()),"function"==typeof n&&n.call(this,t)}),this),_t(e,"load error",(function(){mt(e)})),this.attr("href",e.src=t,A)}};var Jt;Jt=function(t,n,e){return"fill"!==t&&"stroke"!==t||H.test(n)&&(n=e.root().defs().image(n)),n instanceof Qt&&(n=e.root().defs().pattern(0,0,(t=>{t.add(n)}))),n},kt.push(Jt),l({Container:{image:F((function(t,n){return this.put(new Qt).size(0,0).load(t,n)}))}}),z(Qt,"Image");let Kt=class extends jt{bbox(){let t=-1/0,n=-1/0,e=1/0,r=1/0;return this.forEach((function(i){t=Math.max(i[0],t),n=Math.max(i[1],n),e=Math.min(i[0],e),r=Math.min(i[1],r)})),new at(e,r,t-e,n-r)}move(t,n){const e=this.bbox();if(t-=e.x,n-=e.y,!isNaN(t)&&!isNaN(n))for(let r=this.length-1;r>=0;r--)this[r]=[this[r][0]+t,this[r][1]+n];return this}parse(t=[0,0]){const n=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(Q).map(parseFloat)).length%2!=0&&t.pop();for(let e=0,r=t.length;e<r;e+=2)n.push([t[e],t[e+1]]);return n}size(t,n){let e;const r=this.bbox();for(e=this.length-1;e>=0;e--)r.width&&(this[e][0]=(this[e][0]-r.x)*t/r.width+r.x),r.height&&(this[e][1]=(this[e][1]-r.y)*n/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let n=0,e=this.length;n<e;n++)t.push(this[n].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){ot.isMatrixLike(t)||(t=new ot(t));for(let n=this.length;n--;){const[e,r]=this[n];this[n][0]=t.a*e+t.c*r+t.e,this[n][1]=t.b*e+t.d*r+t.f}return this}};const tn=Kt;const nn=Object.freeze(Object.defineProperty({__proto__:null,MorphArray:tn,height:function(t){const n=this.bbox();return null==t?n.height:this.size(n.width,t)},width:function(t){const n=this.bbox();return null==t?n.width:this.size(t,n.height)},x:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)},y:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}},Symbol.toStringTag,{value:"Module"}));let en=class extends zt{constructor(t,n=t){super(T("line",t),n)}array(){return new Kt([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,n){return this.attr(this.array().move(t,n).toLine())}plot(t,n,e,r){return null==t?this.array():(t=void 0!==n?{x1:t,y1:n,x2:e,y2:r}:new Kt(t).toLine(),this.attr(t))}size(t,n){const e=_(this,t,n);return this.attr(this.array().size(e.width,e.height).toLine())}};P(en,nn),l({Container:{line:F((function(...t){return en.prototype.plot.apply(this.put(new en),null!=t[0]?t:[0,0,0,0])}))}}),z(en,"Line");let rn=class extends It{constructor(t,n=t){super(T("marker",t),n)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,n){return this.attr("refX",t).attr("refY",n)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}};function on(t,n){return function(e){return null==e?this[t]:(this[t]=e,n&&n.call(this),this)}}l({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:F((function(t,n,e){return this.put(new rn).size(t,n).ref(t/2,n/2).viewbox(0,0,t,n).attr("orient","auto").update(e)}))},marker:{marker(t,n,e,r){let i=["marker"];return"all"!==t&&i.push(t),i=i.join("-"),t=arguments[1]instanceof rn?arguments[1]:this.defs().marker(n,e,r),this.attr(i,t)}}}),z(rn,"Marker");const sn={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,n,e,r){return function(i){return i<0?t>0?n/t*i:e>0?r/e*i:0:i>1?e<1?(1-r)/(1-e)*i+(r-e)/(1-e):t<1?(1-n)/(1-t)*i+(n-t)/(1-t):1:3*i*(1-i)**2*n+3*i**2*(1-i)*r+i**3}},steps:function(t,n="end"){n=n.split("-").reverse()[0];let e=t;return"none"===n?--e:"both"===n&&++e,(r,i=!1)=>{let o=Math.floor(r*t);const s=r*o%1==0;return"start"!==n&&"both"!==n||++o,i&&s&&--o,r>=0&&o<0&&(o=0),r<=1&&o>e&&(o=e),o/e}}};let un=class{done(){return!1}},an=class extends un{constructor(t=xt){super(),this.ease=sn[t]||t}step(t,n,e){return"number"!=typeof t?e<1?t:n:t+(n-t)*this.ease(e)}},cn=class extends un{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,n,e,r){return this.stepper(t,n,e,r)}};function hn(){const t=(this._duration||500)/1e3,n=this._overshoot||0,e=Math.PI,r=Math.log(n/100+1e-10),i=-r/Math.sqrt(e*e+r*r),o=3.9/(i*t);this.d=2*i*o,this.k=o*o}P(class extends cn{constructor(t=500,n=0){super(),this.duration(t).overshoot(n)}step(t,n,e,r){if("string"==typeof t)return t;if(r.done=e===1/0,e===1/0)return n;if(0===e)return t;e>100&&(e=16),e/=1e3;const i=r.velocity||0,o=-this.d*i-this.k*(t-n),s=t+i*e+o*e*e/2;return r.velocity=i+o*e,r.done=Math.abs(n-s)+Math.abs(i)<.002,r.done?n:s}},{duration:on("_duration",hn),overshoot:on("_overshoot",hn)});P(class extends cn{constructor(t=.1,n=.01,e=0,r=1e3){super(),this.p(t).i(n).d(e).windup(r)}step(t,n,e,r){if("string"==typeof t)return t;if(r.done=e===1/0,e===1/0)return n;if(0===e)return t;const i=n-t;let o=(r.integral||0)+i*e;const s=(i-(r.error||0))/e,u=this._windup;return!1!==u&&(o=Math.max(-u,Math.min(o,u))),r.error=i,r.integral=o,r.done=Math.abs(i)<.001,r.done?n:t+(this.P*i+this.I*o+this.D*s)}},{windup:on("_windup"),p:on("P"),i:on("I"),d:on("D")});const ln={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},fn={M:function(t,n,e){return n.x=e.x=t[0],n.y=e.y=t[1],["M",n.x,n.y]},L:function(t,n){return n.x=t[0],n.y=t[1],["L",t[0],t[1]]},H:function(t,n){return n.x=t[0],["H",t[0]]},V:function(t,n){return n.y=t[0],["V",t[0]]},C:function(t,n){return n.x=t[4],n.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,n){return n.x=t[2],n.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,n){return n.x=t[2],n.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,n){return n.x=t[0],n.y=t[1],["T",t[0],t[1]]},Z:function(t,n,e){return n.x=e.x,n.y=e.y,["Z"]},A:function(t,n){return n.x=t[5],n.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},pn="mlhvqtcsaz".split("");for(let Wv=0,Yv=pn.length;Wv<Yv;++Wv)fn[pn[Wv]]=function(t){return function(n,e,r){if("H"===t)n[0]=n[0]+e.x;else if("V"===t)n[0]=n[0]+e.y;else if("A"===t)n[5]=n[5]+e.x,n[6]=n[6]+e.y;else for(let t=0,i=n.length;t<i;++t)n[t]=n[t]+(t%2?e.y:e.x);return fn[t](n,e,r)}}(pn[Wv].toUpperCase());function dn(t){return t.segment.length&&t.segment.length-1===ln[t.segment[0].toUpperCase()]}function vn(t,n){t.inNumber&&gn(t,!1);const e=J.test(n);if(e)t.segment=[n];else{const n=t.lastCommand,e=n.toLowerCase(),r=n===e;t.segment=["m"===e?r?"l":"L":n]}return t.inSegment=!0,t.lastCommand=t.segment[0],e}function gn(t,n){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=n,t.number="",t.pointSeen=!1,t.hasExponent=!1,dn(t)&&_n(t)}function _n(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){const n=t.segment[0];return fn[n](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function mn(t){if(!t.segment.length)return!1;const n="A"===t.segment[0].toUpperCase(),e=t.segment.length;return n&&(4===e||5===e)}function yn(t){return"E"===t.lastToken.toUpperCase()}const wn=new Set([" ",",","\t","\n","\r","\f"]);let bn=class extends jt{bbox(){return st().path.setAttribute("d",this.toString()),new at(st.nodes.path.getBBox())}move(t,n){const e=this.bbox();if(t-=e.x,n-=e.y,!isNaN(t)&&!isNaN(n))for(let r,i=this.length-1;i>=0;i--)r=this[i][0],"M"===r||"L"===r||"T"===r?(this[i][1]+=t,this[i][2]+=n):"H"===r?this[i][1]+=t:"V"===r?this[i][1]+=n:"C"===r||"S"===r||"Q"===r?(this[i][1]+=t,this[i][2]+=n,this[i][3]+=t,this[i][4]+=n,"C"===r&&(this[i][5]+=t,this[i][6]+=n)):"A"===r&&(this[i][6]+=t,this[i][7]+=n);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,n=!0){let e=0,r="";const i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:n,p0:new rt,p:new rt};for(;i.lastToken=r,r=t.charAt(e++);)if(i.inSegment||!vn(i,r))if("."!==r)if(isNaN(parseInt(r)))if(wn.has(r))i.inNumber&&gn(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(J.test(r)){if(i.inNumber)gn(i,!1);else{if(!dn(i))throw new Error("parser Error");_n(i)}--e}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!yn(i)){gn(i,!1),--e;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||mn(i)){i.inNumber=!0,i.number=r,gn(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){gn(i,!1),--e;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&gn(i,!1),i.inSegment&&dn(i)&&_n(i),i.segments}(t)}size(t,n){const e=this.bbox();let r,i;for(e.width=0===e.width?1:e.width,e.height=0===e.height?1:e.height,r=this.length-1;r>=0;r--)i=this[r][0],"M"===i||"L"===i||"T"===i?(this[r][1]=(this[r][1]-e.x)*t/e.width+e.x,this[r][2]=(this[r][2]-e.y)*n/e.height+e.y):"H"===i?this[r][1]=(this[r][1]-e.x)*t/e.width+e.x:"V"===i?this[r][1]=(this[r][1]-e.y)*n/e.height+e.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-e.x)*t/e.width+e.x,this[r][2]=(this[r][2]-e.y)*n/e.height+e.y,this[r][3]=(this[r][3]-e.x)*t/e.width+e.x,this[r][4]=(this[r][4]-e.y)*n/e.height+e.y,"C"===i&&(this[r][5]=(this[r][5]-e.x)*t/e.width+e.x,this[r][6]=(this[r][6]-e.y)*n/e.height+e.y)):"A"===i&&(this[r][1]=this[r][1]*t/e.width,this[r][2]=this[r][2]*n/e.height,this[r][6]=(this[r][6]-e.x)*t/e.width+e.x,this[r][7]=(this[r][7]-e.y)*n/e.height+e.y);return this}toString(){return function(t){let n="";for(let e=0,r=t.length;e<r;e++)n+=t[e][0],null!=t[e][1]&&(n+=t[e][1],null!=t[e][2]&&(n+=" ",n+=t[e][2],null!=t[e][3]&&(n+=" ",n+=t[e][3],n+=" ",n+=t[e][4],null!=t[e][5]&&(n+=" ",n+=t[e][5],n+=" ",n+=t[e][6],null!=t[e][7]&&(n+=" ",n+=t[e][7])))));return n+" "}(this)}};const xn=t=>{const n=typeof t;return"number"===n?Ot:"string"===n?et.isColor(t)?et:Q.test(t)?J.test(t)?bn:jt:$.test(t)?Ot:An:kn.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?jt:"object"===n?Mn:An};let En=class{constructor(t){this._stepper=t||new an("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,n){return t&&n}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(xn(t));let n=new this._type(t);return this._type===et&&(n=this._to?n[this._to[4]]():this._from?n[this._from[4]]():n),this._type===Mn&&(n=this._to?n.align(this._to):this._from?n.align(this._from):n),n=n.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(n.length)).map(Object).map((function(t){return t.done=!0,t})),n}},An=class{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}},jn=class t{constructor(...t){this.init(...t)}init(n){return Array.isArray(n)&&(n={scaleX:n[0],scaleY:n[1],shear:n[2],rotate:n[3],translateX:n[4],translateY:n[5],originX:n[6],originY:n[7]}),Object.assign(this,t.defaults,n),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}};jn.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const On=(t,n)=>t[0]<n[0]?-1:t[0]>n[0]?1:0;let Mn=class{constructor(...t){this.init(...t)}align(t){const n=this.values;for(let e=0,r=n.length;e<r;++e){if(n[e+1]===t[e+1]){if(n[e+1]===et&&t[e+7]!==n[e+7]){const n=t[e+7],r=new et(this.values.splice(e+3,5))[n]().toArray();this.values.splice(e+3,0,...r)}e+=n[e+2]+2;continue}if(!t[e+1])return this;const r=(new t[e+1]).toArray(),i=n[e+2]+3;n.splice(e,i,t[e],t[e+1],t[e+2],...r),e+=n[e+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const n=[];for(const e in t){const r=xn(t[e]),i=new r(t[e]).toArray();n.push([e,r,i.length,...i])}return n.sort(On),this.values=n.reduce(((t,n)=>t.concat(n)),[]),this}toArray(){return this.values}valueOf(){const t={},n=this.values;for(;n.length;){const e=n.shift(),r=n.shift(),i=n.shift(),o=n.splice(0,i);t[e]=new r(o)}return t}};const kn=[An,jn,Mn];let Sn=class extends zt{constructor(t,n=t){super(T("path",t),n)}array(){return this._array||(this._array=new bn(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,n){return this.attr("d",this.array().move(t,n))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new bn(t))}size(t,n){const e=_(this,t,n);return this.attr("d",this.array().size(e.width,e.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}};Sn.prototype.MorphArray=bn,l({Container:{path:F((function(t){return this.put(new Sn).plot(t||new bn)}))}}),z(Sn,"Path");const Cn=Object.freeze(Object.defineProperty({__proto__:null,array:function(){return this._array||(this._array=new Kt(this.attr("points")))},clear:function(){return delete this._array,this},move:function(t,n){return this.attr("points",this.array().move(t,n))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new Kt(t))},size:function(t,n){const e=_(this,t,n);return this.attr("points",this.array().size(e.width,e.height))}},Symbol.toStringTag,{value:"Module"}));let Tn=class extends zt{constructor(t,n=t){super(T("polygon",t),n)}};l({Container:{polygon:F((function(t){return this.put(new Tn).plot(t||new Kt)}))}}),P(Tn,nn),P(Tn,Cn),z(Tn,"Polygon");let In=class extends zt{constructor(t,n=t){super(T("polyline",t),n)}};l({Container:{polyline:F((function(t){return this.put(new In).plot(t||new Kt)}))}}),P(In,nn),P(In,Cn),z(In,"Polyline");let Nn=class extends zt{constructor(t,n=t){super(T("rect",t),n)}};P(Nn,{rx:Rt,ry:Lt}),l({Container:{rect:F((function(t,n){return this.put(new Nn).size(t,n)}))}}),z(Nn,"Rect");let zn=class{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const n=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(n.prev=this._last,this._last.next=n,this._last=n):(this._last=n,this._first=n),n}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}};const Rn={nextDraw:null,frames:new zn,timeouts:new zn,immediates:new zn,timer:()=>j.window.performance||j.window.Date,transforms:[],frame(t){const n=Rn.frames.push({run:t});return null===Rn.nextDraw&&(Rn.nextDraw=j.window.requestAnimationFrame(Rn._draw)),n},timeout(t,n){n=n||0;const e=Rn.timer().now()+n,r=Rn.timeouts.push({run:t,time:e});return null===Rn.nextDraw&&(Rn.nextDraw=j.window.requestAnimationFrame(Rn._draw)),r},immediate(t){const n=Rn.immediates.push(t);return null===Rn.nextDraw&&(Rn.nextDraw=j.window.requestAnimationFrame(Rn._draw)),n},cancelFrame(t){null!=t&&Rn.frames.remove(t)},clearTimeout(t){null!=t&&Rn.timeouts.remove(t)},cancelImmediate(t){null!=t&&Rn.immediates.remove(t)},_draw(t){let n=null;const e=Rn.timeouts.last();for(;(n=Rn.timeouts.shift())&&(t>=n.time?n.run():Rn.timeouts.push(n),n!==e););let r=null;const i=Rn.frames.last();for(;r!==i&&(r=Rn.frames.shift());)r.run(t);let o=null;for(;o=Rn.immediates.shift();)o();Rn.nextDraw=Rn.timeouts.first()||Rn.frames.first()?j.window.requestAnimationFrame(Rn._draw):null}},Ln=function(t){const n=t.start,e=t.runner.duration();return{start:n,duration:e,end:n+e,runner:t.runner}},Dn=function(){const t=j.window;return(t.performance||t.Date).now()};let Pn=class extends yt{constructor(t=Dn){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),n=t?t.runner.duration():0;return(t?t.start:this._time)+n}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const n=this.speed();if(null==t)return this.speed(-n);const e=Math.abs(n);return this.speed(t?-e:e)}schedule(t,n,e){if(null==t)return this._runners.map(Ln);let r=0;const i=this.getEndTime();if(n=n||0,null==e||"last"===e||"after"===e)r=i;else if("absolute"===e||"start"===e)r=n,n=0;else if("now"===e)r=this._time;else if("relative"===e){const e=this.getRunnerInfoById(t.id);e&&(r=e.start+n,n=0)}else{if("with-last"!==e)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();r=t?t.start:this._time}}t.unschedule(),t.timeline(this);const o=t.persist(),s={persist:null===o?this._persist:o,start:r+n,runner:t};return this._lastRunnerId=t.id,this._runners.push(s),this._runners.sort(((t,n)=>t.start-n.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const n=this._runnerIds.indexOf(t.id);return n<0||(this._runners.splice(n,1),this._runnerIds.splice(n,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return Rn.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=Rn.frame(this._step)),this)}_stepFn(t=!1){const n=this._timeSource();let e=n-this._lastSourceTime;t&&(e=0);const r=this._speed*e+(this._time-this._lastStepTime);this._lastSourceTime=n,t||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let o=this._runners.length;o--;){const t=this._runners[o],n=t.runner;this._time-t.start<=0&&n.reset()}let i=!1;for(let o=0,s=this._runners.length;o<s;o++){const t=this._runners[o],n=t.runner;let e=r;const u=this._time-t.start;if(u<=0){i=!0;continue}if(u<e&&(e=u),!n.active())continue;if(n.step(e).done){if(!0!==t.persist){n.duration()-n.time()+this._time+t.persist<this._time&&(n.unschedule(),--o,--s)}}else i=!0}return i&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}};l({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new Pn,this._timeline):(this._timeline=t,this)}}});let Fn=class t extends yt{constructor(n){super(),this.id=t.id++,n="function"==typeof(n=null==n?bt:n)?new cn(n):n,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof n&&n,this._isDeclarative=n instanceof cn,this._stepper=this._isDeclarative?n:new an,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new ot,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,n,e){let r=1,i=!1,o=0;return n=n??Et,e=e||"last","object"!=typeof(t=t??bt)||t instanceof un||(n=t.delay??n,e=t.when??e,i=t.swing||i,r=t.times??r,o=t.wait??o,t=t.duration??bt),{duration:t,delay:n,swing:i,times:r,wait:o,when:e}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(n,e,r){const i=t.sanitise(n,e,r),o=new t(i.duration);return this._timeline&&o.timeline(this._timeline),this._element&&o.element(this._element),o.loop(i).schedule(i.delay,i.when)}clearTransform(){return this.transforms=new ot,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new an(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,n,e){return"object"==typeof t&&(n=t.swing,e=t.wait,t=t.times),this._times=t||1/0,this._swing=n||!1,this._wait=e||0,!0===this._times&&(this._times=1/0),this}loops(t){const n=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/n),e=(this._time-t*n)/this._duration;return Math.min(t+e,this._times)}const e=t%1,r=n*Math.floor(t)+this._duration*e;return this.time(r)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const n=this._time,e=this._duration,r=this._wait,i=this._times,o=this._swing,s=this._reverse;let u;if(null==t){const t=function(t){const n=o*Math.floor(t%(2*(r+e))/(r+e)),i=n&&!s||!n&&s,u=Math.pow(-1,i)*(t%(r+e))/e+i;return Math.max(Math.min(u,1),0)},a=i*(r+e)-r;return u=n<=0?Math.round(t(1e-5)):n<a?t(n):Math.round(t(a-1e-5)),u}const a=Math.floor(this.loops()),c=o&&a%2==0;return u=a+(c&&!s||s&&c?t:1-t),this.loops(u)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,n,e,r){this._queue.push({initialiser:t||wt,runner:n||wt,retarget:e,isTransform:r,initialised:!1,finished:!1});return this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(t){return this._reverse=null==t?!this._reverse:t,this}schedule(t,n,e){if(t instanceof Pn||(e=n,n=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,n,e),this}step(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;const n=this.position(),e=this._lastPosition!==n&&this._time>=0;this._lastPosition=n;const r=this.duration(),i=this._lastTime<=0&&this._time>0,o=this._lastTime<r&&this._time>=r;this._lastTime=this._time,i&&this.fire("start",this);const s=this._isDeclarative;this.done=!s&&!o&&this._time>=r,this._reseted=!1;let u=!1;return(e||s)&&(this._initialise(e),this.transforms=new ot,u=this._run(s?t:n),this.fire("step",this)),this.done=this.done||u&&s,o&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const n=t-this._time;return this.step(n),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let n=0,e=this._queue.length;n<e;++n){const e=this._queue[n],r=this._isDeclarative||!e.initialised&&t;t=!e.finished,r&&t&&(e.initialiser.call(this),e.initialised=!0)}}_rememberMorpher(t,n){if(this._history[t]={morpher:n,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let n=!0;for(let e=0,r=this._queue.length;e<r;++e){const r=this._queue[e],i=r.runner.call(this,t);r.finished=r.finished||!0===i,n=n&&r.finished}return n}_tryRetarget(t,n,e){if(this._history[t]){if(!this._history[t].caller.initialised){const n=this._queue.indexOf(this._history[t].caller);return this._queue.splice(n,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,n,e):this._history[t].morpher.to(n),this._history[t].caller.finished=!1;const r=this.timeline();return r&&r.play(),!0}return!1}};Fn.id=0;let $n=class{constructor(t=new ot,n=-1,e=!0){this.transforms=t,this.id=n,this.done=e}clearTransformsFromQueue(){}};P([Fn,$n],{mergeWith(t){return new $n(t.transforms.lmultiply(this.transforms),t.id)}});const Bn=(t,n)=>t.lmultiplyO(n),qn=t=>t.transforms;function Un(){const t=this._transformationRunners.runners.map(qn).reduce(Bn,new ot);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}let Wn=class{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const n=t.id+1;return this.runners.push(t),this.ids.push(n),this}clearBefore(t){const n=this.ids.indexOf(t+1)||1;return this.ids.splice(0,n,0),this.runners.splice(0,n,new $n).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,n){const e=this.ids.indexOf(t+1);return this.ids.splice(e,1,t+1),this.runners.splice(e,1,n),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let n=0;n<this.runners.length;++n){const e=this.runners[n];if(t&&e.done&&t.done&&(!e._timeline||!e._timeline._runnerIds.includes(e.id))&&(!t._timeline||!t._timeline._runnerIds.includes(t.id))){this.remove(e.id);const r=e.mergeWith(t);this.edit(t.id,r),t=r,--n}else t=e}return this}remove(t){const n=this.ids.indexOf(t+1);return this.ids.splice(n,1),this.runners.splice(n,1),this}};l({Element:{animate(t,n,e){const r=Fn.sanitise(t,n,e),i=this.timeline();return new Fn(r.duration).loop(r).element(this).timeline(i.play()).schedule(r.delay,r.when)},delay(t,n){return this.animate(0,t,n)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter((n=>n.id<=t.id)).map(qn).reduce(Bn,new ot)},_addRunner(t){this._transformationRunners.add(t),Rn.cancelImmediate(this._frameId),this._frameId=Rn.immediate(Un.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new Wn).add(new $n(new ot(this))))}}});P(Fn,{attr(t,n){return this.styleAttr("attr",t,n)},css(t,n){return this.styleAttr("css",t,n)},styleAttr(t,n,e){if("string"==typeof n)return this.styleAttr(t,{[n]:e});let r=n;if(this._tryRetarget(t,r))return this;let i=new En(this._stepper).to(r),o=Object.keys(r);return this.queue((function(){i=i.from(this.element()[t](o))}),(function(n){return this.element()[t](i.at(n).valueOf()),i.done()}),(function(n){const e=Object.keys(n),s=(u=o,e.filter((t=>!u.includes(t))));var u;if(s.length){const n=this.element()[t](s),e=new Mn(i.from()).valueOf();Object.assign(e,n),i.from(e)}const a=new Mn(i.to()).valueOf();Object.assign(a,n),i.to(a),o=e,r=n})),this._rememberMorpher(t,i),this},zoom(t,n){if(this._tryRetarget("zoom",t,n))return this;let e=new En(this._stepper).to(new Ot(t));return this.queue((function(){e=e.from(this.element().zoom())}),(function(t){return this.element().zoom(e.at(t),n),e.done()}),(function(t,r){n=r,e.to(t)})),this._rememberMorpher("zoom",e),this},transform(t,n,e){if(n=t.relative||n,this._isDeclarative&&!n&&this._tryRetarget("transform",t))return this;const r=ot.isMatrixLike(t);e=null!=t.affine?t.affine:null!=e?e:!r;const i=new En(this._stepper).type(e?jn:ot);let o,s,u,a,c;return this.queue((function(){s=s||this.element(),o=o||m(t,s),c=new ot(n?void 0:s),s._addRunner(this),n||s._clearTransformRunnersBefore(this)}),(function(h){n||this.clearTransform();const{x:l,y:f}=new rt(o).transform(s._currentTransform(this));let p=new ot({...t,origin:[l,f]}),d=this._isDeclarative&&u?u:c;if(e){p=p.decompose(l,f),d=d.decompose(l,f);const t=p.rotate,n=d.rotate,e=[t-360,t,t+360],r=e.map((t=>Math.abs(t-n))),i=Math.min(...r),o=r.indexOf(i);p.rotate=e[o]}n&&(r||(p.rotate=t.rotate||0),this._isDeclarative&&a&&(d.rotate=a)),i.from(d),i.to(p);const v=i.at(h);return a=v.rotate,u=new ot(v),this.addTransform(u),s._addRunner(this),i.done()}),(function(n){(n.origin||"center").toString()!==(t.origin||"center").toString()&&(o=m(n,s)),t={...n,origin:o}}),!0),this._isDeclarative&&this._rememberMorpher("transform",i),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,n){return this.dx(t).dy(n)},_queueNumberDelta(t,n){if(n=new Ot(n),this._tryRetarget(t,n))return this;const e=new En(this._stepper).to(n);let r=null;return this.queue((function(){r=this.element()[t](),e.from(r),e.to(r+n)}),(function(n){return this.element()[t](e.at(n)),e.done()}),(function(t){e.to(r+new Ot(t))})),this._rememberMorpher(t,e),this},_queueObject(t,n){if(this._tryRetarget(t,n))return this;const e=new En(this._stepper).to(n);return this.queue((function(){e.from(this.element()[t]())}),(function(n){return this.element()[t](e.at(n)),e.done()})),this._rememberMorpher(t,e),this},_queueNumber(t,n){return this._queueObject(t,new Ot(n))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,n){return this.x(t).y(n)},amove(t,n){return this.ax(t).ay(n)},center(t,n){return this.cx(t).cy(n)},size(t,n){let e;return t&&n||(e=this._element.bbox()),t||(t=e.width/e.height*n),n||(n=e.height/e.width*t),this.width(t).height(n)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,n,e,r){if(4===arguments.length)return this.plot([t,n,e,r]);if(this._tryRetarget("plot",t))return this;const i=new En(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){i.from(this._element.array())}),(function(t){return this._element.plot(i.at(t)),i.done()})),this._rememberMorpher("plot",i),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,n,e,r){return this._queueObject("viewbox",new at(t,n,e,r))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),P(Fn,{rx:Rt,ry:Lt,from:Vt,to:Xt}),z(Fn,"Runner");let Yn=class extends It{constructor(t,n=t){super(T("svg",t),n),this.namespace()}defs(){return this.isRoot()?I(this.node.querySelector("defs"))||this.put(new Nt):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof j.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:x,version:"1.1"}).attr("xmlns:xlink",A,E):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,E).attr("xmlns:svgjs",null,E)}root(){return this.isRoot()?this:super.root()}};l({Container:{nested:F((function(){return this.put(new Yn)}))}}),z(Yn,"Svg",!0);let Vn=class extends It{constructor(t,n=t){super(T("symbol",t),n)}};l({Container:{symbol:F((function(){return this.put(new Vn)}))}}),z(Vn,"Symbol");const Xn=Object.freeze(Object.defineProperty({__proto__:null,amove:function(t,n){return this.ax(t).ay(n)},ax:function(t){return this.attr("x",t)},ay:function(t){return this.attr("y",t)},build:function(t){return this._build=!!t,this},center:function(t,n,e=this.bbox()){return this.cx(t,e).cy(n,e)},cx:function(t,n=this.bbox()){return null==t?n.cx:this.attr("x",this.attr("x")+t-n.cx)},cy:function(t,n=this.bbox()){return null==t?n.cy:this.attr("y",this.attr("y")+t-n.cy)},length:function(){return this.node.getComputedTextLength()},move:function(t,n,e=this.bbox()){return this.x(t,e).y(n,e)},plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(j.document.createTextNode(t)),this},x:function(t,n=this.bbox()){return null==t?n.x:this.attr("x",this.attr("x")+t-n.x)},y:function(t,n=this.bbox()){return null==t?n.y:this.attr("y",this.attr("y")+t-n.y)}},Symbol.toStringTag,{value:"Module"}));let Gn=class extends zt{constructor(t,n=t){super(T("text",t),n),this.dom.leading=this.dom.leading??new Ot(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new Ot(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let n=0;const e=this.dom.leading;this.each((function(r){if(w(this.node))return;const i=j.window.getComputedStyle(this.node).getPropertyValue("font-size"),o=e*new Ot(i);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?n+=o:(this.attr("dy",r?o+n:0),n=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new Ot(t.leading||1.3),this}writeDataToDom(){return b(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const n=this.node.childNodes;let e=0;t="";for(let r=0,i=n.length;r<i;++r)"textPath"===n[r].nodeName||w(n[r])?0===r&&(e=r+1):(r!==e&&3!==n[r].nodeType&&!0===I(n[r]).dom.newLined&&(t+="\n"),t+=n[r].textContent);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(let n=0,e=(t=(t+"").split("\n")).length;n<e;n++)this.newLine(t[n]);return this.build(!1).rebuild()}};P(Gn,Xn),l({Container:{text:F((function(t=""){return this.put(new Gn).text(t)})),plain:F((function(t=""){return this.put(new Gn).plain(t)}))}}),z(Gn,"Text");let Zn=class extends zt{constructor(t,n=t){super(T("tspan",t),n),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;const t=this.parent();if(!(t instanceof Gn))return this;const n=t.index(this),e=j.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=t.dom.leading*new Ot(e);return this.dy(n?r:0).attr("x",t.x())}text(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}};P(Zn,Xn),l({Tspan:{tspan:F((function(t=""){const n=new Zn;return this._build||this.clear(),this.put(n).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),z(Zn,"Tspan");let Hn=class extends zt{constructor(t,n=t){super(T("circle",t),n)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new Ot(t).divide(2))}};P(Hn,{x:Dt,y:Pt,cx:Ft,cy:$t,width:Bt,height:qt}),l({Container:{circle:F((function(t=0){return this.put(new Hn).size(t).move(0,0)}))}}),z(Hn,"Circle");let Qn=class extends It{constructor(t,n=t){super(T("clipPath",t),n)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return ft("svg [clip-path*="+this.id()+"]")}};l({Container:{clip:F((function(){return this.defs().put(new Qn)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const n=t instanceof Qn?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+n.id()+")")},unclip(){return this.attr("clip-path",null)}}}),z(Qn,"ClipPath");let Jn=class extends Ct{constructor(t,n=t){super(T("foreignObject",t),n)}};l({Container:{foreignObject:F((function(t,n){return this.put(new Jn).size(t,n)}))}}),z(Jn,"ForeignObject");const Kn=Object.freeze(Object.defineProperty({__proto__:null,dmove:function(t,n){return this.children().forEach((e=>{let r;try{r=e.bbox()}catch(u){return}const i=new ot(e),o=i.translate(t,n).transform(i.inverse()),s=new rt(r.x,r.y).transform(o);e.move(s.x,s.y)})),this},dx:function(t){return this.dmove(t,0)},dy:function(t){return this.dmove(0,t)},height:function(t,n=this.bbox()){return null==t?n.height:this.size(n.width,t,n)},move:function(t=0,n=0,e=this.bbox()){const r=t-e.x,i=n-e.y;return this.dmove(r,i)},size:function(t,n,e=this.bbox()){const r=_(this,t,n,e),i=r.width/e.width,o=r.height/e.height;return this.children().forEach((t=>{const n=new rt(e).transform(new ot(t).inverse());t.scale(i,o,n.x,n.y)})),this},width:function(t,n=this.bbox()){return null==t?n.width:this.size(t,n.height,n)},x:function(t,n=this.bbox()){return null==t?n.x:this.move(t,n.y,n)},y:function(t,n=this.bbox()){return null==t?n.y:this.move(n.x,t,n)}},Symbol.toStringTag,{value:"Module"}));let te=class extends It{constructor(t,n=t){super(T("g",t),n)}};P(te,Kn),l({Container:{group:F((function(){return this.put(new te)}))}}),z(te,"G");let ne=class extends It{constructor(t,n=t){super(T("a",t),n)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,A)}};P(ne,Kn),l({Container:{link:F((function(t){return this.put(new ne).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const n=t.parent();if(!n)return this.remove();const e=n.index(t);return n.add(this,e),t.remove(),this},linkTo(t){let n=this.linker();return n||(n=new ne,this.wrap(n)),"function"==typeof t?t.call(n,n):n.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),z(ne,"A");let ee=class extends It{constructor(t,n=t){super(T("mask",t),n)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return ft("svg [mask*="+this.id()+"]")}};l({Container:{mask:F((function(){return this.defs().put(new ee)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const n=t instanceof ee?t:this.parent().mask().add(t);return this.attr("mask","url(#"+n.id()+")")},unmask(){return this.attr("mask",null)}}}),z(ee,"Mask");let re=class extends Ct{constructor(t,n=t){super(T("stop",t),n)}update(t){return("number"==typeof t||t instanceof Ot)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new Ot(t.offset)),this}};l({Gradient:{stop:function(t,n,e){return this.put(new re).update(t,n,e)}}}),z(re,"Stop");let ie=class extends Ct{constructor(t,n=t){super(T("style",t),n)}addText(t=""){return this.node.textContent+=t,this}font(t,n,e={}){return this.rule("@font-face",{fontFamily:t,src:n,...e})}rule(t,n){return this.addText(function(t,n){if(!t)return"";if(!n)return t;let e=t+"{";for(const r in n)e+=r.replace(/([A-Z])/g,(function(t,n){return"-"+n.toLowerCase()}))+":"+n[r]+";";return e+="}",e}(t,n))}};l("Dom",{style(t,n){return this.put(new ie).rule(t,n)},fontface(t,n,e){return this.put(new ie).font(t,n,e)}}),z(ie,"Style");let oe=class extends Gn{constructor(t,n=t){super(T("textPath",t),n)}array(){const t=this.track();return t?t.array():null}plot(t){const n=this.track();let e=null;return n&&(e=n.plot(t)),null==t?e:this}track(){return this.reference("href")}};l({Container:{textPath:F((function(t,n){return t instanceof Gn||(t=this.text(t)),t.path(n)}))},Text:{path:F((function(t,n=!0){const e=new oe;let r;if(t instanceof Sn||(t=this.defs().path(t)),e.attr("href","#"+t,A),n)for(;r=this.node.firstChild;)e.node.appendChild(r);return this.put(e)})),textPath(){return this.findOne("textPath")}},Path:{text:F((function(t){return t instanceof Gn||(t=(new Gn).addTo(this.parent()).text(t)),t.path(this)})),targets(){return ft("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),oe.prototype.MorphArray=bn,z(oe,"TextPath");let se=class extends zt{constructor(t,n=t){super(T("use",t),n)}use(t,n){return this.attr("href",(n||"")+"#"+t,A)}};function ue(t,n,e,r){const i=new te;return i.attr({"data-parent":r,"data-self":e,transform:void 0!==t&&void 0!==n?`translate(${t}, ${n})`:void 0}),i}l({Container:{use:F((function(t,n){return this.put(new se).use(t,n)}))}}),z(se,"Use"),P([Yn,Vn,Qt,Ht,rn],f("viewbox")),P([en,In,Tn,Sn],f("marker")),P(Gn,f("Text")),P(Sn,f("Path")),P(Nt,f("Defs")),P([Gn,Zn],f("Tspan")),P([Nn,Wt,Zt,Fn],f("radius")),P(yt,f("EventTarget")),P(St,f("Dom")),P(Ct,f("Element")),P(zt,f("Shape")),P([It,Yt],f("Container")),P(Zt,f("Gradient")),P(Fn,f("Runner")),ht.extend([...new Set(h)]),function(t=[]){kn.push(...[].concat(t))}([Ot,et,at,ot,jt,Kt,bn,rt]),P(kn,{to(t){return(new En).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,n,e,r,i){return this.fromArray(t.map((function(t,o){return r.step(t,n[o],e,i[o],i)})))}});const ae={export:"data:image/svg+xml,%3csvg%20fill='%23000000'%20width='20px'%20height='20px'%20viewBox='0%200%2024%2024'%20id='export-2'%20xmlns='http://www.w3.org/2000/svg'%20class='icon%20line'%3e%3cpolyline%20id='primary'%20points='15%203%2021%203%2021%209'%20style='fill:%20none;%20stroke:%20rgb(0,%200,%200);%20stroke-linecap:%20round;%20stroke-linejoin:%20round;%20stroke-width:%201.5;'%3e%3c/polyline%3e%3cpath%20id='primary-2'%20data-name='primary'%20d='M21,13v7a1,1,0,0,1-1,1H4a1,1,0,0,1-1-1V4A1,1,0,0,1,4,3h7'%20style='fill:%20none;%20stroke:%20rgb(0,%200,%200);%20stroke-linecap:%20round;%20stroke-linejoin:%20round;%20stroke-width:%201.5;'%3e%3c/path%3e%3cline%20id='primary-3'%20data-name='primary'%20x1='11'%20y1='13'%20x2='21'%20y2='3'%20style='fill:%20none;%20stroke:%20rgb(0,%200,%200);%20stroke-linecap:%20round;%20stroke-linejoin:%20round;%20stroke-width:%201.5;'%3e%3c/line%3e%3c/svg%3e","fit-screen":"data:image/svg+xml,%3csvg%20width='20px'%20height='20px'%20viewBox='0%200%2032%2032'%20id='icon'%20xmlns='http://www.w3.org/2000/svg'%3e%3cpolygon%20points='8%202%202%202%202%208%204%208%204%204%208%204%208%202'/%3e%3cpolygon%20points='24%202%2030%202%2030%208%2028%208%2028%204%2024%204%2024%202'/%3e%3cpolygon%20points='8%2030%202%2030%202%2024%204%2024%204%2028%208%2028%208%2030'/%3e%3cpolygon%20points='24%2030%2030%2030%2030%2024%2028%2024%2028%2028%2024%2028%2024%2030'/%3e%3cpath%20d='M24,24H8a2.0023,2.0023,0,0,1-2-2V10A2.0023,2.0023,0,0,1,8,8H24a2.0023,2.0023,0,0,1,2,2V22A2.0023,2.0023,0,0,1,24,24ZM8,10V22H24V10Z'/%3e%3crect%20fill='none'%20width='32'%20height='32'/%3e%3c/svg%3e","zoom-in":"data:image/svg+xml,%3csvg%20width='20px'%20height='20px'%20viewBox='0%200%2032%2032'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xmlns:sketch='http://www.bohemiancoding.com/sketch/ns'%3e%3cg%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%3e%3cg%20transform='translate(-308.000000,%20-1139.000000)'%20fill='%23000000'%3e%3cpath%20d='M321.46,1163.45%20C315.17,1163.45%20310.07,1158.44%20310.07,1152.25%20C310.07,1146.06%20315.17,1141.04%20321.46,1141.04%20C327.75,1141.04%20332.85,1146.06%20332.85,1152.25%20C332.85,1158.44%20327.75,1163.45%20321.46,1163.45%20L321.46,1163.45%20Z%20M339.688,1169.25%20L331.429,1161.12%20C333.592,1158.77%20334.92,1155.67%20334.92,1152.25%20C334.92,1144.93%20328.894,1139%20321.46,1139%20C314.026,1139%20308,1144.93%20308,1152.25%20C308,1159.56%20314.026,1165.49%20321.46,1165.49%20C324.672,1165.49%20327.618,1164.38%20329.932,1162.53%20L338.225,1170.69%20C338.629,1171.09%20339.284,1171.09%20339.688,1170.69%20C340.093,1170.3%20340.093,1169.65%20339.688,1169.25%20L339.688,1169.25%20Z%20M326.519,1151.41%20L322.522,1151.41%20L322.522,1147.41%20C322.522,1146.85%20322.075,1146.41%20321.523,1146.41%20C320.972,1146.41%20320.524,1146.85%20320.524,1147.41%20L320.524,1151.41%20L316.529,1151.41%20C315.978,1151.41%20315.53,1151.59%20315.53,1152.14%20C315.53,1152.7%20315.978,1153.41%20316.529,1153.41%20L320.524,1153.41%20L320.524,1157.41%20C320.524,1157.97%20320.972,1158.41%20321.523,1158.41%20C322.075,1158.41%20322.522,1157.97%20322.522,1157.41%20L322.522,1153.41%20L326.519,1153.41%20C327.07,1153.41%20327.518,1152.96%20327.518,1152.41%20C327.518,1151.86%20327.07,1151.41%20326.519,1151.41%20L326.519,1151.41%20Z'%20/%3e%3c/g%3e%3c/g%3e%3c/svg%3e","zoom-out":"data:image/svg+xml,%3csvg%20width='20px'%20height='20px'%20viewBox='0%200%2032%2032'%20version='1.1'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cg%20stroke='none'%20stroke-width='1'%20fill='none'%20fill-rule='evenodd'%20%3e%3cg%20transform='translate(-360.000000,%20-1139.000000)'%20fill='%23000000'%3e%3cpath%20d='M373.46,1163.45%20C367.17,1163.45%20362.071,1158.44%20362.071,1152.25%20C362.071,1146.06%20367.17,1141.04%20373.46,1141.04%20C379.75,1141.04%20384.85,1146.06%20384.85,1152.25%20C384.85,1158.44%20379.75,1163.45%20373.46,1163.45%20L373.46,1163.45%20Z%20M391.688,1169.25%20L383.429,1161.12%20C385.592,1158.77%20386.92,1155.67%20386.92,1152.25%20C386.92,1144.93%20380.894,1139%20373.46,1139%20C366.026,1139%20360,1144.93%20360,1152.25%20C360,1159.56%20366.026,1165.49%20373.46,1165.49%20C376.672,1165.49%20379.618,1164.38%20381.932,1162.53%20L390.225,1170.69%20C390.629,1171.09%20391.284,1171.09%20391.688,1170.69%20C392.093,1170.3%20392.093,1169.65%20391.688,1169.25%20L391.688,1169.25%20Z%20M378.689,1151.41%20L368.643,1151.41%20C368.102,1151.41%20367.663,1151.84%20367.663,1152.37%20C367.663,1152.9%20368.102,1153.33%20368.643,1153.33%20L378.689,1153.33%20C379.23,1153.33%20379.669,1152.9%20379.669,1152.37%20C379.669,1151.84%20379.23,1151.41%20378.689,1151.41%20L378.689,1151.41%20Z'%20/%3e%3c/g%3e%3c/g%3e%3c/svg%3e"};class ce{constructor(n,e,r="apex"){this.element=n,this.canvas=e,this.prefix=r,this.export=new t(e,r)}createToolbarItem(t,n){const e=document.createElement("div"),r=new Image;r.src=n,e.id=t,e.append(r);const i=a({alignItems:"center",backgroundColor:"#FFFFFF",border:"1px solid #BCBCBC",cursor:"pointer",display:"flex",height:"30px",justifyContent:"center",width:"30px"});return e.setAttribute("style",i),e}render({enableExport:t=!1,enableFitscreen:n=!1,enableZoom:e=!1,onFitscreen:r=s.noop,onZoom:i=s.noop}){var o;const u=document.createElement("div");u.id="toolbar";const c=a({display:"flex",gap:"5px",position:"absolute",right:"10px",top:"10px"});if(u.setAttribute("style",c),t){const t=this.createToolbarItem("export",ae.export);t.addEventListener("click",(()=>{this.export.exportToSVG()})),u.append(t)}if(e){const t=this.createToolbarItem("zoom-in",ae["zoom-in"]),n=this.createToolbarItem("zoom-out",ae["zoom-out"]);t.addEventListener("click",(()=>{i(.1)})),n.addEventListener("click",(()=>{i(-.1)})),u.append(t,n)}if(n){const t=this.createToolbarItem("fit-screen",ae["fit-screen"]);t.addEventListener("click",(()=>{r()})),u.append(t)}null==(o=this.element)||o.append(u)}}const he={},le=[];function fe(t,n){if(Array.isArray(t))for(const e of t)fe(e,n);else if("object"!=typeof t)de(Object.getOwnPropertyNames(n)),he[t]=Object.assign(he[t]||{},n);else for(const e in t)fe(e,t[e])}function pe(t){return he[t]||{}}function de(t){le.push(...t)}function ve(t,n){let e;const r=t.length,i=[];for(e=0;e<r;e++)i.push(n(t[e]));return i}function ge(t){return t%360*Math.PI/180}function _e(t){return t.charAt(0).toUpperCase()+t.slice(1)}function me(t,n,e,r){return null!=n&&null!=e||(r=r||t.bbox(),null==n?n=r.width/r.height*e:null==e&&(e=r.height/r.width*n)),{width:n,height:e}}function ye(t,n){const e=t.origin;let r=null!=t.ox?t.ox:null!=t.originX?t.originX:"center",i=null!=t.oy?t.oy:null!=t.originY?t.originY:"center";null!=e&&([r,i]=Array.isArray(e)?e:"object"==typeof e?[e.x,e.y]:[e,e]);const o="string"==typeof r,s="string"==typeof i;if(o||s){const{height:t,width:e,x:u,y:a}=n.bbox();o&&(r=r.includes("left")?u:r.includes("right")?u+e:u+e/2),s&&(i=i.includes("top")?a:i.includes("bottom")?a+t:a+t/2)}return[r,i]}const we=new Set(["desc","metadata","title"]),be=t=>we.has(t.nodeName),xe=(t,n,e={})=>{const r={...n};for(const i in r)r[i].valueOf()===e[i]&&delete r[i];Object.keys(r).length?t.node.setAttribute("data-svgjs",JSON.stringify(r)):(t.node.removeAttribute("data-svgjs"),t.node.removeAttribute("svgjs:data"))},Ee="http://www.w3.org/2000/svg",Ae="http://www.w3.org/2000/xmlns/",je="http://www.w3.org/1999/xlink",Oe={window:"undefined"==typeof window?null:window,document:"undefined"==typeof document?null:document};class Me{}const ke={},Se="___SYMBOL___ROOT___";function Ce(t,n=Ee){return Oe.document.createElementNS(n,t)}function Te(t,n=!1){if(t instanceof Me)return t;if("object"==typeof t)return ze(t);if(null==t)return new ke[Se];if("string"==typeof t&&"<"!==t.charAt(0))return ze(Oe.document.querySelector(t));const e=n?Oe.document.createElement("div"):Ce("svg");return e.innerHTML=t,t=ze(e.firstChild),e.removeChild(e.firstChild),t}function Ie(t,n){return n&&(n instanceof Oe.window.Node||n.ownerDocument&&n instanceof n.ownerDocument.defaultView.Node)?n:Ce(t)}function Ne(t){if(!t)return null;if(t.instance instanceof Me)return t.instance;if("#document-fragment"===t.nodeName)return new ke.Fragment(t);let n=_e(t.nodeName||"Dom");return"LinearGradient"===n||"RadialGradient"===n?n="Gradient":ke[n]||(n="Dom"),new ke[n](t)}let ze=Ne;function Re(t,n=t.name,e=!1){return ke[n]=t,e&&(ke[Se]=t),de(Object.getOwnPropertyNames(t.prototype)),t}let Le=1e3;function De(t){return"Svgjs"+_e(t)+Le++}function Pe(t){for(let n=t.children.length-1;n>=0;n--)Pe(t.children[n]);return t.id?(t.id=De(t.nodeName),t):t}function Fe(t,n){let e,r;for(r=(t=Array.isArray(t)?t:[t]).length-1;r>=0;r--)for(e in n)t[r].prototype[e]=n[e]}function $e(t){return function(...n){const e=n[n.length-1];return!e||e.constructor!==Object||e instanceof Array?t.apply(this,n):t.apply(this,n.slice(0,-1)).attr(e)}}fe("Dom",{siblings:function(){return this.parent().children()},position:function(){return this.parent().index(this)},next:function(){return this.siblings()[this.position()+1]},prev:function(){return this.siblings()[this.position()-1]},forward:function(){const t=this.position();return this.parent().add(this.remove(),t+1),this},backward:function(){const t=this.position();return this.parent().add(this.remove(),t?t-1:0),this},front:function(){return this.parent().add(this.remove()),this},back:function(){return this.parent().add(this.remove(),0),this},before:function(t){(t=Te(t)).remove();const n=this.position();return this.parent().add(t,n),this},after:function(t){(t=Te(t)).remove();const n=this.position();return this.parent().add(t,n+1),this},insertBefore:function(t){return(t=Te(t)).before(this),this},insertAfter:function(t){return(t=Te(t)).after(this),this}});const Be=/^([+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?)([a-z%]*)$/i,qe=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i,Ue=/rgb\((\d+),(\d+),(\d+)\)/,We=/(#[a-z_][a-z0-9\-_]*)/i,Ye=/\)\s*,?\s*/,Ve=/\s/g,Xe=/^#[a-f0-9]{3}$|^#[a-f0-9]{6}$/i,Ge=/^rgb\(/,Ze=/^(\s+)?$/,He=/^[+-]?(\d+(\.\d*)?|\.\d+)(e[+-]?\d+)?$/i,Qe=/\.(jpg|jpeg|png|gif|svg)(\?[^=]+.*)?/i,Je=/[\s,]+/,Ke=/[MLHVCSQTAZ]/i;function tr(t){const n=Math.round(t),e=Math.max(0,Math.min(255,n)).toString(16);return 1===e.length?"0"+e:e}function nr(t,n){for(let e=n.length;e--;)if(null==t[n[e]])return!1;return!0}function er(t,n,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?t+6*(n-t)*e:e<.5?n:e<2/3?t+(n-t)*(2/3-e)*6:t}fe("Dom",{classes:function(){const t=this.attr("class");return null==t?[]:t.trim().split(Je)},hasClass:function(t){return-1!==this.classes().indexOf(t)},addClass:function(t){if(!this.hasClass(t)){const n=this.classes();n.push(t),this.attr("class",n.join(" "))}return this},removeClass:function(t){return this.hasClass(t)&&this.attr("class",this.classes().filter((function(n){return n!==t})).join(" ")),this},toggleClass:function(t){return this.hasClass(t)?this.removeClass(t):this.addClass(t)}}),fe("Dom",{css:function(t,n){const e={};if(0===arguments.length)return this.node.style.cssText.split(/\s*;\s*/).filter((function(t){return!!t.length})).forEach((function(t){const n=t.split(/\s*:\s*/);e[n[0]]=n[1]})),e;if(arguments.length<2){if(Array.isArray(t)){for(const n of t){const t=n;e[n]=this.node.style.getPropertyValue(t)}return e}if("string"==typeof t)return this.node.style.getPropertyValue(t);if("object"==typeof t)for(const n in t)this.node.style.setProperty(n,null==t[n]||Ze.test(t[n])?"":t[n])}return 2===arguments.length&&this.node.style.setProperty(t,null==n||Ze.test(n)?"":n),this},show:function(){return this.css("display","")},hide:function(){return this.css("display","none")},visible:function(){return"none"!==this.css("display")}}),fe("Dom",{data:function(t,n,e){if(null==t)return this.data(ve(function(t,n){let e;const r=t.length,i=[];for(e=0;e<r;e++)n(t[e])&&i.push(t[e]);return i}(this.node.attributes,(t=>0===t.nodeName.indexOf("data-"))),(t=>t.nodeName.slice(5))));if(t instanceof Array){const n={};for(const e of t)n[e]=this.data(e);return n}if("object"==typeof t)for(n in t)this.data(n,t[n]);else if(arguments.length<2)try{return JSON.parse(this.attr("data-"+t))}catch(r){return this.attr("data-"+t)}else this.attr("data-"+t,null===n?null:!0===e||"string"==typeof n||"number"==typeof n?n:JSON.stringify(n));return this}}),fe("Dom",{remember:function(t,n){if("object"==typeof arguments[0])for(const e in t)this.remember(e,t[e]);else{if(1===arguments.length)return this.memory()[t];this.memory()[t]=n}return this},forget:function(){if(0===arguments.length)this._memory={};else for(let t=arguments.length-1;t>=0;t--)delete this.memory()[arguments[t]];return this},memory:function(){return this._memory=this._memory||{}}});class rr{constructor(...t){this.init(...t)}static isColor(t){return t&&(t instanceof rr||this.isRgb(t)||this.test(t))}static isRgb(t){return t&&"number"==typeof t.r&&"number"==typeof t.g&&"number"==typeof t.b}static random(t="vibrant",n){const{random:e,round:r,sin:i,PI:o}=Math;if("vibrant"===t){const t=24*e()+57,n=38*e()+45,r=360*e();return new rr(t,n,r,"lch")}if("sine"===t){const t=r(80*i(2*o*(n=null==n?e():n)/.5+.01)+150),s=r(50*i(2*o*n/.5+4.6)+200),u=r(100*i(2*o*n/.5+2.3)+150);return new rr(t,s,u)}if("pastel"===t){const t=8*e()+86,n=17*e()+9,r=360*e();return new rr(t,n,r,"lch")}if("dark"===t){const t=10+10*e(),n=50*e()+86,r=360*e();return new rr(t,n,r,"lch")}if("rgb"===t){const t=255*e(),n=255*e(),r=255*e();return new rr(t,n,r)}if("lab"===t){const t=100*e(),n=256*e()-128,r=256*e()-128;return new rr(t,n,r,"lab")}if("grey"===t){const t=255*e();return new rr(t,t,t)}throw new Error("Unsupported random color mode")}static test(t){return"string"==typeof t&&(Xe.test(t)||Ge.test(t))}cmyk(){const{_a:t,_b:n,_c:e}=this.rgb(),[r,i,o]=[t,n,e].map((t=>t/255)),s=Math.min(1-r,1-i,1-o);if(1===s)return new rr(0,0,0,1,"cmyk");return new rr((1-r-s)/(1-s),(1-i-s)/(1-s),(1-o-s)/(1-s),s,"cmyk")}hsl(){const{_a:t,_b:n,_c:e}=this.rgb(),[r,i,o]=[t,n,e].map((t=>t/255)),s=Math.max(r,i,o),u=Math.min(r,i,o),a=(s+u)/2,c=s===u,h=s-u;return new rr(360*(c?0:s===r?((i-o)/h+(i<o?6:0))/6:s===i?((o-r)/h+2)/6:s===o?((r-i)/h+4)/6:0),100*(c?0:a>.5?h/(2-s-u):h/(s+u)),100*a,"hsl")}init(t=0,n=0,e=0,r=0,i="rgb"){if(t=t||0,this.space)for(const l in this.space)delete this[this.space[l]];if("number"==typeof t)i="string"==typeof r?r:i,r="string"==typeof r?0:r,Object.assign(this,{_a:t,_b:n,_c:e,_d:r,space:i});else if(t instanceof Array)this.space=n||("string"==typeof t[3]?t[3]:t[4])||"rgb",Object.assign(this,{_a:t[0],_b:t[1],_c:t[2],_d:t[3]||0});else if(t instanceof Object){const e=function(t,n){const e=nr(t,"rgb")?{_a:t.r,_b:t.g,_c:t.b,_d:0,space:"rgb"}:nr(t,"xyz")?{_a:t.x,_b:t.y,_c:t.z,_d:0,space:"xyz"}:nr(t,"hsl")?{_a:t.h,_b:t.s,_c:t.l,_d:0,space:"hsl"}:nr(t,"lab")?{_a:t.l,_b:t.a,_c:t.b,_d:0,space:"lab"}:nr(t,"lch")?{_a:t.l,_b:t.c,_c:t.h,_d:0,space:"lch"}:nr(t,"cmyk")?{_a:t.c,_b:t.m,_c:t.y,_d:t.k,space:"cmyk"}:{_a:0,_b:0,_c:0,space:"rgb"};return e.space=n||e.space,e}(t,n);Object.assign(this,e)}else if("string"==typeof t)if(Ge.test(t)){const n=t.replace(Ve,""),[e,r,i]=Ue.exec(n).slice(1,4).map((t=>parseInt(t)));Object.assign(this,{_a:e,_b:r,_c:i,_d:0,space:"rgb"})}else{if(!Xe.test(t))throw Error("Unsupported string format, can't construct Color");{const n=t=>parseInt(t,16),[,e,r,i]=qe.exec((o=t,4===o.length?["#",o.substring(1,2),o.substring(1,2),o.substring(2,3),o.substring(2,3),o.substring(3,4),o.substring(3,4)].join(""):o)).map(n);Object.assign(this,{_a:e,_b:r,_c:i,_d:0,space:"rgb"})}}var o;const{_a:s,_b:u,_c:a,_d:c}=this,h="rgb"===this.space?{r:s,g:u,b:a}:"xyz"===this.space?{x:s,y:u,z:a}:"hsl"===this.space?{h:s,s:u,l:a}:"lab"===this.space?{l:s,a:u,b:a}:"lch"===this.space?{l:s,c:u,h:a}:"cmyk"===this.space?{c:s,m:u,y:a,k:c}:{};Object.assign(this,h)}lab(){const{x:t,y:n,z:e}=this.xyz();return new rr(116*n-16,500*(t-n),200*(n-e),"lab")}lch(){const{l:t,a:n,b:e}=this.lab(),r=Math.sqrt(n**2+e**2);let i=180*Math.atan2(e,n)/Math.PI;i<0&&(i*=-1,i=360-i);return new rr(t,r,i,"lch")}rgb(){if("rgb"===this.space)return this;if("lab"===(t=this.space)||"xyz"===t||"lch"===t){let{x:t,y:n,z:e}=this;if("lab"===this.space||"lch"===this.space){let{l:r,a:i,b:o}=this;if("lch"===this.space){const{c:t,h:n}=this,e=Math.PI/180;i=t*Math.cos(e*n),o=t*Math.sin(e*n)}const s=(r+16)/116,u=i/500+s,a=s-o/200,c=16/116,h=.008856,l=7.787;t=.95047*(u**3>h?u**3:(u-c)/l),n=1*(s**3>h?s**3:(s-c)/l),e=1.08883*(a**3>h?a**3:(a-c)/l)}const r=3.2406*t+-1.5372*n+-.4986*e,i=-.9689*t+1.8758*n+.0415*e,o=.0557*t+-.204*n+1.057*e,s=Math.pow,u=.0031308,a=r>u?1.055*s(r,1/2.4)-.055:12.92*r,c=i>u?1.055*s(i,1/2.4)-.055:12.92*i,h=o>u?1.055*s(o,1/2.4)-.055:12.92*o;return new rr(255*a,255*c,255*h)}if("hsl"===this.space){let{h:t,s:n,l:e}=this;if(t/=360,n/=100,e/=100,0===n){e*=255;return new rr(e,e,e)}const r=e<.5?e*(1+n):e+n-e*n,i=2*e-r,o=255*er(i,r,t+1/3),s=255*er(i,r,t),u=255*er(i,r,t-1/3);return new rr(o,s,u)}if("cmyk"===this.space){const{c:t,m:n,y:e,k:r}=this,i=255*(1-Math.min(1,t*(1-r)+r)),o=255*(1-Math.min(1,n*(1-r)+r)),s=255*(1-Math.min(1,e*(1-r)+r));return new rr(i,o,s)}return this;var t}toArray(){const{_a:t,_b:n,_c:e,_d:r,space:i}=this;return[t,n,e,r,i]}toHex(){const[t,n,e]=this._clamped().map(tr);return`#${t}${n}${e}`}toRgb(){const[t,n,e]=this._clamped();return`rgb(${t},${n},${e})`}toString(){return this.toHex()}xyz(){const{_a:t,_b:n,_c:e}=this.rgb(),[r,i,o]=[t,n,e].map((t=>t/255)),s=r>.04045?Math.pow((r+.055)/1.055,2.4):r/12.92,u=i>.04045?Math.pow((i+.055)/1.055,2.4):i/12.92,a=o>.04045?Math.pow((o+.055)/1.055,2.4):o/12.92,c=(.4124*s+.3576*u+.1805*a)/.95047,h=(.2126*s+.7152*u+.0722*a)/1,l=(.0193*s+.1192*u+.9505*a)/1.08883,f=c>.008856?Math.pow(c,1/3):7.787*c+16/116,p=h>.008856?Math.pow(h,1/3):7.787*h+16/116,d=l>.008856?Math.pow(l,1/3):7.787*l+16/116;return new rr(f,p,d,"xyz")}_clamped(){const{_a:t,_b:n,_c:e}=this.rgb(),{max:r,min:i,round:o}=Math;return[t,n,e].map((t=>r(0,i(o(t),255))))}}class ir{constructor(...t){this.init(...t)}clone(){return new ir(this)}init(t,n){const e=0,r=0,i=Array.isArray(t)?{x:t[0],y:t[1]}:"object"==typeof t?{x:t.x,y:t.y}:{x:t,y:n};return this.x=null==i.x?e:i.x,this.y=null==i.y?r:i.y,this}toArray(){return[this.x,this.y]}transform(t){return this.clone().transformO(t)}transformO(t){sr.isMatrixLike(t)||(t=new sr(t));const{x:n,y:e}=this;return this.x=t.a*n+t.c*e+t.e,this.y=t.b*n+t.d*e+t.f,this}}function or(t,n,e){return Math.abs(n-t)<1e-6}class sr{constructor(...t){this.init(...t)}static formatTransforms(t){const n="both"===t.flip||!0===t.flip,e=t.flip&&(n||"x"===t.flip)?-1:1,r=t.flip&&(n||"y"===t.flip)?-1:1,i=t.skew&&t.skew.length?t.skew[0]:isFinite(t.skew)?t.skew:isFinite(t.skewX)?t.skewX:0,o=t.skew&&t.skew.length?t.skew[1]:isFinite(t.skew)?t.skew:isFinite(t.skewY)?t.skewY:0,s=t.scale&&t.scale.length?t.scale[0]*e:isFinite(t.scale)?t.scale*e:isFinite(t.scaleX)?t.scaleX*e:e,u=t.scale&&t.scale.length?t.scale[1]*r:isFinite(t.scale)?t.scale*r:isFinite(t.scaleY)?t.scaleY*r:r,a=t.shear||0,c=t.rotate||t.theta||0,h=new ir(t.origin||t.around||t.ox||t.originX,t.oy||t.originY),l=h.x,f=h.y,p=new ir(t.position||t.px||t.positionX||NaN,t.py||t.positionY||NaN),d=p.x,v=p.y,g=new ir(t.translate||t.tx||t.translateX,t.ty||t.translateY),_=g.x,m=g.y,y=new ir(t.relative||t.rx||t.relativeX,t.ry||t.relativeY);return{scaleX:s,scaleY:u,skewX:i,skewY:o,shear:a,theta:c,rx:y.x,ry:y.y,tx:_,ty:m,ox:l,oy:f,px:d,py:v}}static fromArray(t){return{a:t[0],b:t[1],c:t[2],d:t[3],e:t[4],f:t[5]}}static isMatrixLike(t){return null!=t.a||null!=t.b||null!=t.c||null!=t.d||null!=t.e||null!=t.f}static matrixMultiply(t,n,e){const r=t.a*n.a+t.c*n.b,i=t.b*n.a+t.d*n.b,o=t.a*n.c+t.c*n.d,s=t.b*n.c+t.d*n.d,u=t.e+t.a*n.e+t.c*n.f,a=t.f+t.b*n.e+t.d*n.f;return e.a=r,e.b=i,e.c=o,e.d=s,e.e=u,e.f=a,e}around(t,n,e){return this.clone().aroundO(t,n,e)}aroundO(t,n,e){const r=t||0,i=n||0;return this.translateO(-r,-i).lmultiplyO(e).translateO(r,i)}clone(){return new sr(this)}decompose(t=0,n=0){const e=this.a,r=this.b,i=this.c,o=this.d,s=this.e,u=this.f,a=e*o-r*i,c=a>0?1:-1,h=c*Math.sqrt(e*e+r*r),l=Math.atan2(c*r,c*e),f=180/Math.PI*l,p=Math.cos(l),d=Math.sin(l),v=(e*i+r*o)/a,g=i*h/(v*e-r)||o*h/(v*r+e);return{scaleX:h,scaleY:g,shear:v,rotate:f,translateX:s-t+t*p*h+n*(v*p*h-d*g),translateY:u-n+t*d*h+n*(v*d*h+p*g),originX:t,originY:n,a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}equals(t){if(t===this)return!0;const n=new sr(t);return or(this.a,n.a)&&or(this.b,n.b)&&or(this.c,n.c)&&or(this.d,n.d)&&or(this.e,n.e)&&or(this.f,n.f)}flip(t,n){return this.clone().flipO(t,n)}flipO(t,n){return"x"===t?this.scaleO(-1,1,n,0):"y"===t?this.scaleO(1,-1,0,n):this.scaleO(-1,-1,t,n||t)}init(t){const n=sr.fromArray([1,0,0,1,0,0]);return t=t instanceof Tr?t.matrixify():"string"==typeof t?sr.fromArray(t.split(Je).map(parseFloat)):Array.isArray(t)?sr.fromArray(t):"object"==typeof t&&sr.isMatrixLike(t)?t:"object"==typeof t?(new sr).transform(t):6===arguments.length?sr.fromArray([].slice.call(arguments)):n,this.a=null!=t.a?t.a:n.a,this.b=null!=t.b?t.b:n.b,this.c=null!=t.c?t.c:n.c,this.d=null!=t.d?t.d:n.d,this.e=null!=t.e?t.e:n.e,this.f=null!=t.f?t.f:n.f,this}inverse(){return this.clone().inverseO()}inverseO(){const t=this.a,n=this.b,e=this.c,r=this.d,i=this.e,o=this.f,s=t*r-n*e;if(!s)throw new Error("Cannot invert "+this);const u=r/s,a=-n/s,c=-e/s,h=t/s,l=-(u*i+c*o),f=-(a*i+h*o);return this.a=u,this.b=a,this.c=c,this.d=h,this.e=l,this.f=f,this}lmultiply(t){return this.clone().lmultiplyO(t)}lmultiplyO(t){const n=t instanceof sr?t:new sr(t);return sr.matrixMultiply(n,this,this)}multiply(t){return this.clone().multiplyO(t)}multiplyO(t){const n=t instanceof sr?t:new sr(t);return sr.matrixMultiply(this,n,this)}rotate(t,n,e){return this.clone().rotateO(t,n,e)}rotateO(t,n=0,e=0){t=ge(t);const r=Math.cos(t),i=Math.sin(t),{a:o,b:s,c:u,d:a,e:c,f:h}=this;return this.a=o*r-s*i,this.b=s*r+o*i,this.c=u*r-a*i,this.d=a*r+u*i,this.e=c*r-h*i+e*i-n*r+n,this.f=h*r+c*i-n*i-e*r+e,this}scale(){return this.clone().scaleO(...arguments)}scaleO(t,n=t,e=0,r=0){3===arguments.length&&(r=e,e=n,n=t);const{a:i,b:o,c:s,d:u,e:a,f:c}=this;return this.a=i*t,this.b=o*n,this.c=s*t,this.d=u*n,this.e=a*t-e*t+e,this.f=c*n-r*n+r,this}shear(t,n,e){return this.clone().shearO(t,n,e)}shearO(t,n=0,e=0){const{a:r,b:i,c:o,d:s,e:u,f:a}=this;return this.a=r+i*t,this.c=o+s*t,this.e=u+a*t-e*t,this}skew(){return this.clone().skewO(...arguments)}skewO(t,n=t,e=0,r=0){3===arguments.length&&(r=e,e=n,n=t),t=ge(t),n=ge(n);const i=Math.tan(t),o=Math.tan(n),{a:s,b:u,c:a,d:c,e:h,f:l}=this;return this.a=s+u*i,this.b=u+s*o,this.c=a+c*i,this.d=c+a*o,this.e=h+l*i-r*i,this.f=l+h*o-e*o,this}skewX(t,n,e){return this.skew(t,0,n,e)}skewY(t,n,e){return this.skew(0,t,n,e)}toArray(){return[this.a,this.b,this.c,this.d,this.e,this.f]}toString(){return"matrix("+this.a+","+this.b+","+this.c+","+this.d+","+this.e+","+this.f+")"}transform(t){if(sr.isMatrixLike(t)){return new sr(t).multiplyO(this)}const n=sr.formatTransforms(t),{x:e,y:r}=new ir(n.ox,n.oy).transform(this),i=(new sr).translateO(n.rx,n.ry).lmultiplyO(this).translateO(-e,-r).scaleO(n.scaleX,n.scaleY).skewO(n.skewX,n.skewY).shearO(n.shear).rotateO(n.theta).translateO(e,r);if(isFinite(n.px)||isFinite(n.py)){const t=new ir(e,r).transform(i),o=isFinite(n.px)?n.px-t.x:0,s=isFinite(n.py)?n.py-t.y:0;i.translateO(o,s)}return i.translateO(n.tx,n.ty),i}translate(t,n){return this.clone().translateO(t,n)}translateO(t,n){return this.e+=t||0,this.f+=n||0,this}valueOf(){return{a:this.a,b:this.b,c:this.c,d:this.d,e:this.e,f:this.f}}}function ur(){if(!ur.nodes){const t=Te().size(2,0);t.node.style.cssText=["opacity: 0","position: absolute","left: -100%","top: -100%","overflow: hidden"].join(";"),t.attr("focusable","false"),t.attr("aria-hidden","true");const n=t.path().node;ur.nodes={svg:t,path:n}}if(!ur.nodes.svg.node.parentNode){const t=Oe.document.body||Oe.document.documentElement;ur.nodes.svg.addTo(t)}return ur.nodes}function ar(t){return!(t.width||t.height||t.x||t.y)}Re(sr,"Matrix");class cr{constructor(...t){this.init(...t)}addOffset(){return this.x+=Oe.window.pageXOffset,this.y+=Oe.window.pageYOffset,new cr(this)}init(t){return t="string"==typeof t?t.split(Je).map(parseFloat):Array.isArray(t)?t:"object"==typeof t?[null!=t.left?t.left:t.x,null!=t.top?t.top:t.y,t.width,t.height]:4===arguments.length?[].slice.call(arguments):[0,0,0,0],this.x=t[0]||0,this.y=t[1]||0,this.width=this.w=t[2]||0,this.height=this.h=t[3]||0,this.x2=this.x+this.w,this.y2=this.y+this.h,this.cx=this.x+this.w/2,this.cy=this.y+this.h/2,this}isNulled(){return ar(this)}merge(t){const n=Math.min(this.x,t.x),e=Math.min(this.y,t.y),r=Math.max(this.x+this.width,t.x+t.width)-n,i=Math.max(this.y+this.height,t.y+t.height)-e;return new cr(n,e,r,i)}toArray(){return[this.x,this.y,this.width,this.height]}toString(){return this.x+" "+this.y+" "+this.width+" "+this.height}transform(t){t instanceof sr||(t=new sr(t));let n=1/0,e=-1/0,r=1/0,i=-1/0;return[new ir(this.x,this.y),new ir(this.x2,this.y),new ir(this.x,this.y2),new ir(this.x2,this.y2)].forEach((function(o){o=o.transform(t),n=Math.min(n,o.x),e=Math.max(e,o.x),r=Math.min(r,o.y),i=Math.max(i,o.y)})),new cr(n,r,e-n,i-r)}}function hr(t,n,e){let r;try{if(r=n(t.node),ar(r)&&((i=t.node)!==Oe.document&&!(Oe.document.documentElement.contains||function(t){for(;t.parentNode;)t=t.parentNode;return t===Oe.document}).call(Oe.document.documentElement,i)))throw new Error("Element not in the dom")}catch(o){r=e(t)}var i;return r}fe({viewbox:{viewbox(t,n,e,r){return null==t?new cr(this.attr("viewBox")):this.attr("viewBox",new cr(t,n,e,r))},zoom(t,n){let{width:e,height:r}=this.attr(["width","height"]);if((e||r)&&"string"!=typeof e&&"string"!=typeof r||(e=this.node.clientWidth,r=this.node.clientHeight),!e||!r)throw new Error("Impossible to get absolute width and height. Please provide an absolute width and height attribute on the zooming element");const i=this.viewbox(),o=e/i.width,s=r/i.height,u=Math.min(o,s);if(null==t)return u;let a=u/t;a===1/0&&(a=Number.MAX_SAFE_INTEGER/100),n=n||new ir(e/2/o+i.x,r/2/s+i.y);const c=new cr(i).transform(new sr({scale:a,origin:n}));return this.viewbox(c)}}}),Re(cr,"Box");class lr extends Array{constructor(t=[],...n){if(super(t,...n),"number"==typeof t)return this;this.length=0,this.push(...t)}}Fe([lr],{each(t,...n){return"function"==typeof t?this.map(((n,e,r)=>t.call(n,n,e,r))):this.map((e=>e[t](...n)))},toArray(){return Array.prototype.concat.apply([],this)}});const fr=["toArray","constructor","each"];function pr(t,n){return new lr(ve((n||Oe.document).querySelectorAll(t),(function(t){return Ne(t)})))}lr.extend=function(t){t=t.reduce(((t,n)=>(fr.includes(n)||"_"===n[0]||(n in Array.prototype&&(t["$"+n]=Array.prototype[n]),t[n]=function(...t){return this.each(n,...t)}),t)),{}),Fe([lr],t)};let dr=0;const vr={};function gr(t){let n=t.getEventHolder();return n===Oe.window&&(n=vr),n.events||(n.events={}),n.events}function _r(t){return t.getEventTarget()}function mr(t,n,e,r,i){const o=e.bind(r||t),s=Te(t),u=gr(s),a=_r(s);n=Array.isArray(n)?n:n.split(Je),e._svgjsListenerId||(e._svgjsListenerId=++dr),n.forEach((function(t){const n=t.split(".")[0],r=t.split(".")[1]||"*";u[n]=u[n]||{},u[n][r]=u[n][r]||{},u[n][r][e._svgjsListenerId]=o,a.addEventListener(n,o,i||!1)}))}function yr(t,n,e,r){const i=Te(t),o=gr(i),s=_r(i);("function"!=typeof e||(e=e._svgjsListenerId))&&(n=Array.isArray(n)?n:(n||"").split(Je)).forEach((function(t){const n=t&&t.split(".")[0],u=t&&t.split(".")[1];let a,c;if(e)o[n]&&o[n][u||"*"]&&(s.removeEventListener(n,o[n][u||"*"][e],r||!1),delete o[n][u||"*"][e]);else if(n&&u){if(o[n]&&o[n][u]){for(c in o[n][u])yr(s,[n,u].join("."),c);delete o[n][u]}}else if(u)for(t in o)for(a in o[t])u===a&&yr(s,[t,u].join("."));else if(n){if(o[n]){for(a in o[n])yr(s,[n,a].join("."));delete o[n]}}else{for(t in o)yr(s,t);!function(t){let n=t.getEventHolder();n===Oe.window&&(n=vr),n.events&&(n.events={})}(i)}}))}class wr extends Me{addEventListener(){}dispatch(t,n,e){return function(t,n,e,r){const i=_r(t);return n instanceof Oe.window.Event||(n=new Oe.window.CustomEvent(n,{detail:e,cancelable:!0,...r})),i.dispatchEvent(n),n}(this,t,n,e)}dispatchEvent(t){const n=this.getEventHolder().events;if(!n)return!0;const e=n[t.type];for(const r in e)for(const n in e[r])e[r][n](t);return!t.defaultPrevented}fire(t,n,e){return this.dispatch(t,n,e),this}getEventHolder(){return this}getEventTarget(){return this}off(t,n,e){return yr(this,t,n,e),this}on(t,n,e,r){return mr(this,t,n,e,r),this}removeEventListener(){}}function br(){}Re(wr,"EventTarget");const xr=400,Er=">",Ar=0,jr={"fill-opacity":1,"stroke-opacity":1,"stroke-width":0,"stroke-linejoin":"miter","stroke-linecap":"butt",fill:"#000000",stroke:"#000000",opacity:1,x:0,y:0,cx:0,cy:0,width:0,height:0,r:0,rx:0,ry:0,offset:0,"stop-opacity":1,"stop-color":"#000000","text-anchor":"start"};class Or extends Array{constructor(...t){super(...t),this.init(...t)}clone(){return new this.constructor(this)}init(t){return"number"==typeof t||(this.length=0,this.push(...this.parse(t))),this}parse(t=[]){return t instanceof Array?t:t.trim().split(Je).map(parseFloat)}toArray(){return Array.prototype.concat.apply([],this)}toSet(){return new Set(this)}toString(){return this.join(" ")}valueOf(){const t=[];return t.push(...this),t}}class Mr{constructor(...t){this.init(...t)}convert(t){return new Mr(this.value,t)}divide(t){return t=new Mr(t),new Mr(this/t,this.unit||t.unit)}init(t,n){return n=Array.isArray(t)?t[1]:n,t=Array.isArray(t)?t[0]:t,this.value=0,this.unit=n||"","number"==typeof t?this.value=isNaN(t)?0:isFinite(t)?t:t<0?-34e37:34e37:"string"==typeof t?(n=t.match(Be))&&(this.value=parseFloat(n[1]),"%"===n[5]?this.value/=100:"s"===n[5]&&(this.value*=1e3),this.unit=n[5]):t instanceof Mr&&(this.value=t.valueOf(),this.unit=t.unit),this}minus(t){return t=new Mr(t),new Mr(this-t,this.unit||t.unit)}plus(t){return t=new Mr(t),new Mr(this+t,this.unit||t.unit)}times(t){return t=new Mr(t),new Mr(this*t,this.unit||t.unit)}toArray(){return[this.value,this.unit]}toJSON(){return this.toString()}toString(){return("%"===this.unit?~~(1e8*this.value)/1e6:"s"===this.unit?this.value/1e3:this.value)+this.unit}valueOf(){return this.value}}const kr=new Set(["fill","stroke","color","bgcolor","stop-color","flood-color","lighting-color"]),Sr=[];class Cr extends wr{constructor(t,n){super(),this.node=t,this.type=t.nodeName,n&&t!==n&&this.attr(n)}add(t,n){return(t=Te(t)).removeNamespace&&this.node instanceof Oe.window.SVGElement&&t.removeNamespace(),null==n?this.node.appendChild(t.node):t.node!==this.node.childNodes[n]&&this.node.insertBefore(t.node,this.node.childNodes[n]),this}addTo(t,n){return Te(t).put(this,n)}children(){return new lr(ve(this.node.children,(function(t){return Ne(t)})))}clear(){for(;this.node.hasChildNodes();)this.node.removeChild(this.node.lastChild);return this}clone(t=!0,n=!0){this.writeDataToDom();let e=this.node.cloneNode(t);return n&&(e=Pe(e)),new this.constructor(e)}each(t,n){const e=this.children();let r,i;for(r=0,i=e.length;r<i;r++)t.apply(e[r],[r,e]),n&&e[r].each(t,n);return this}element(t,n){return this.put(new Cr(Ce(t),n))}first(){return Ne(this.node.firstChild)}get(t){return Ne(this.node.childNodes[t])}getEventHolder(){return this.node}getEventTarget(){return this.node}has(t){return this.index(t)>=0}html(t,n){return this.xml(t,n,"http://www.w3.org/1999/xhtml")}id(t){return void 0!==t||this.node.id||(this.node.id=De(this.type)),this.attr("id",t)}index(t){return[].slice.call(this.node.childNodes).indexOf(t.node)}last(){return Ne(this.node.lastChild)}matches(t){const n=this.node,e=n.matches||n.matchesSelector||n.msMatchesSelector||n.mozMatchesSelector||n.webkitMatchesSelector||n.oMatchesSelector||null;return e&&e.call(n,t)}parent(t){let n=this;if(!n.node.parentNode)return null;if(n=Ne(n.node.parentNode),!t)return n;do{if("string"==typeof t?n.matches(t):n instanceof t)return n}while(n=Ne(n.node.parentNode));return n}put(t,n){return t=Te(t),this.add(t,n),t}putIn(t,n){return Te(t).add(this,n)}remove(){return this.parent()&&this.parent().removeElement(this),this}removeElement(t){return this.node.removeChild(t.node),this}replace(t){return t=Te(t),this.node.parentNode&&this.node.parentNode.replaceChild(t.node,this.node),t}round(t=2,n=null){const e=10**t,r=this.attr(n);for(const i in r)"number"==typeof r[i]&&(r[i]=Math.round(r[i]*e)/e);return this.attr(r),this}svg(t,n){return this.xml(t,n,Ee)}toString(){return this.id()}words(t){return this.node.textContent=t,this}wrap(t){const n=this.parent();if(!n)return this.addTo(t);const e=n.index(this);return n.put(t,e).put(this)}writeDataToDom(){return this.each((function(){this.writeDataToDom()})),this}xml(t,n,e){if("boolean"==typeof t&&(e=n,n=t,t=null),null==t||"function"==typeof t){n=null==n||n,this.writeDataToDom();let e=this;if(null!=t){if(e=Ne(e.node.cloneNode(!0)),n){const n=t(e);if(e=n||e,!1===n)return""}e.each((function(){const n=t(this),e=n||this;!1===n?this.remove():n&&this!==e&&this.replace(e)}),!0)}return n?e.node.outerHTML:e.node.innerHTML}n=null!=n&&n;const r=Ce("wrapper",e),i=Oe.document.createDocumentFragment();r.innerHTML=t;for(let s=r.children.length;s--;)i.appendChild(r.firstElementChild);const o=this.parent();return n?this.replace(i)&&o:this.add(i)}}Fe(Cr,{attr:function(t,n,e){if(null==t){t={},n=this.node.attributes;for(const e of n)t[e.nodeName]=He.test(e.nodeValue)?parseFloat(e.nodeValue):e.nodeValue;return t}if(t instanceof Array)return t.reduce(((t,n)=>(t[n]=this.attr(n),t)),{});if("object"==typeof t&&t.constructor===Object)for(n in t)this.attr(n,t[n]);else if(null===n)this.node.removeAttribute(t);else{if(null==n)return null==(n=this.node.getAttribute(t))?jr[t]:He.test(n)?parseFloat(n):n;"number"==typeof(n=Sr.reduce(((n,e)=>e(t,n,this)),n))?n=new Mr(n):kr.has(t)&&rr.isColor(n)?n=new rr(n):n.constructor===Array&&(n=new Or(n)),"leading"===t?this.leading&&this.leading(n):"string"==typeof e?this.node.setAttributeNS(e,t,n.toString()):this.node.setAttribute(t,n.toString()),!this.rebuild||"font-size"!==t&&"x"!==t||this.rebuild()}return this},find:function(t){return pr(t,this.node)},findOne:function(t){return Ne(this.node.querySelector(t))}}),Re(Cr,"Dom");class Tr extends Cr{constructor(t,n){super(t,n),this.dom={},this.node.instance=this,(t.hasAttribute("data-svgjs")||t.hasAttribute("svgjs:data"))&&this.setData(JSON.parse(t.getAttribute("data-svgjs"))??JSON.parse(t.getAttribute("svgjs:data"))??{})}center(t,n){return this.cx(t).cy(n)}cx(t){return null==t?this.x()+this.width()/2:this.x(t-this.width()/2)}cy(t){return null==t?this.y()+this.height()/2:this.y(t-this.height()/2)}defs(){const t=this.root();return t&&t.defs()}dmove(t,n){return this.dx(t).dy(n)}dx(t=0){return this.x(new Mr(t).plus(this.x()))}dy(t=0){return this.y(new Mr(t).plus(this.y()))}getEventHolder(){return this}height(t){return this.attr("height",t)}move(t,n){return this.x(t).y(n)}parents(t=this.root()){const n="string"==typeof t;n||(t=Te(t));const e=new lr;let r=this;for(;(r=r.parent())&&r.node!==Oe.document&&"#document-fragment"!==r.nodeName&&(e.push(r),n||r.node!==t.node)&&(!n||!r.matches(t));)if(r.node===this.root().node)return null;return e}reference(t){if(!(t=this.attr(t)))return null;const n=(t+"").match(We);return n?Te(n[1]):null}root(){const t=this.parent(ke[Se]);return t&&t.root()}setData(t){return this.dom=t,this}size(t,n){const e=me(this,t,n);return this.width(new Mr(e.width)).height(new Mr(e.height))}width(t){return this.attr("width",t)}writeDataToDom(){return xe(this,this.dom),super.writeDataToDom()}x(t){return this.attr("x",t)}y(t){return this.attr("y",t)}}Fe(Tr,{bbox:function(){const t=hr(this,(t=>t.getBBox()),(t=>{try{const n=t.clone().addTo(ur().svg).show(),e=n.node.getBBox();return n.remove(),e}catch(n){throw new Error(`Getting bbox of element "${t.node.nodeName}" is not possible: ${n.toString()}`)}}));return new cr(t)},rbox:function(t){const n=hr(this,(t=>t.getBoundingClientRect()),(t=>{throw new Error(`Getting rbox of element "${t.node.nodeName}" is not possible`)})),e=new cr(n);return t?e.transform(t.screenCTM().inverseO()):e.addOffset()},inside:function(t,n){const e=this.bbox();return t>e.x&&n>e.y&&t<e.x+e.width&&n<e.y+e.height},point:function(t,n){return new ir(t,n).transformO(this.screenCTM().inverseO())},ctm:function(){return new sr(this.node.getCTM())},screenCTM:function(){try{if("function"==typeof this.isRoot&&!this.isRoot()){const t=this.rect(1,1),n=t.node.getScreenCTM();return t.remove(),new sr(n)}return new sr(this.node.getScreenCTM())}catch(t){return console.warn(`Cannot get CTM from SVG node ${this.node.nodeName}. Is the element rendered?`),new sr}}}),Re(Tr,"Element");const Ir={stroke:["color","width","opacity","linecap","linejoin","miterlimit","dasharray","dashoffset"],fill:["color","opacity","rule"],prefix:function(t,n){return"color"===n?t:t+"-"+n}};["fill","stroke"].forEach((function(t){const n={};let e;n[t]=function(n){if(void 0===n)return this.attr(t);if("string"==typeof n||n instanceof rr||rr.isRgb(n)||n instanceof Tr)this.attr(t,n);else for(e=Ir[t].length-1;e>=0;e--)null!=n[Ir[t][e]]&&this.attr(Ir.prefix(t,Ir[t][e]),n[Ir[t][e]]);return this},fe(["Element","Runner"],n)})),fe(["Element","Runner"],{matrix:function(t,n,e,r,i,o){return null==t?new sr(this):this.attr("transform",new sr(t,n,e,r,i,o))},rotate:function(t,n,e){return this.transform({rotate:t,ox:n,oy:e},!0)},skew:function(t,n,e,r){return 1===arguments.length||3===arguments.length?this.transform({skew:t,ox:n,oy:e},!0):this.transform({skew:[t,n],ox:e,oy:r},!0)},shear:function(t,n,e){return this.transform({shear:t,ox:n,oy:e},!0)},scale:function(t,n,e,r){return 1===arguments.length||3===arguments.length?this.transform({scale:t,ox:n,oy:e},!0):this.transform({scale:[t,n],ox:e,oy:r},!0)},translate:function(t,n){return this.transform({translate:[t,n]},!0)},relative:function(t,n){return this.transform({relative:[t,n]},!0)},flip:function(t="both",n="center"){return-1==="xybothtrue".indexOf(t)&&(n=t,t="both"),this.transform({flip:t,origin:n},!0)},opacity:function(t){return this.attr("opacity",t)}}),fe("radius",{radius:function(t,n=t){return"radialGradient"===(this._element||this).type?this.attr("r",new Mr(t)):this.rx(t).ry(n)}}),fe("Path",{length:function(){return this.node.getTotalLength()},pointAt:function(t){return new ir(this.node.getPointAtLength(t))}}),fe(["Element","Runner"],{font:function(t,n){if("object"==typeof t){for(n in t)this.font(n,t[n]);return this}return"leading"===t?this.leading(n):"anchor"===t?this.attr("text-anchor",n):"size"===t||"family"===t||"weight"===t||"stretch"===t||"variant"===t||"style"===t?this.attr("font-"+t,n):this.attr(t,n)}});fe("Element",["click","dblclick","mousedown","mouseup","mouseover","mouseout","mousemove","mouseenter","mouseleave","touchstart","touchmove","touchleave","touchend","touchcancel","contextmenu","wheel","pointerdown","pointermove","pointerup","pointerleave","pointercancel"].reduce((function(t,n){return t[n]=function(t){return null===t?this.off(n):this.on(n,t),this},t}),{})),fe("Element",{untransform:function(){return this.attr("transform",null)},matrixify:function(){return(this.attr("transform")||"").split(Ye).slice(0,-1).map((function(t){const n=t.trim().split("(");return[n[0],n[1].split(Je).map((function(t){return parseFloat(t)}))]})).reverse().reduce((function(t,n){return"matrix"===n[0]?t.lmultiply(sr.fromArray(n[1])):t[n[0]].apply(t,n[1])}),new sr)},toParent:function(t,n){if(this===t)return this;if(be(this.node))return this.addTo(t,n);const e=this.screenCTM(),r=t.screenCTM().inverse();return this.addTo(t,n).untransform().transform(r.multiply(e)),this},toRoot:function(t){return this.toParent(this.root(),t)},transform:function(t,n){if(null==t||"string"==typeof t){const n=new sr(this).decompose();return null==t?n:n[t]}sr.isMatrixLike(t)||(t={...t,origin:ye(t,this)});const e=new sr(!0===n?this:n||!1).transform(t);return this.attr("transform",e)}});class Nr extends Tr{flatten(){return this.each((function(){if(this instanceof Nr)return this.flatten().ungroup()})),this}ungroup(t=this.parent(),n=t.index(this)){return n=-1===n?t.children().length:n,this.each((function(e,r){return r[r.length-e-1].toParent(t,n)})),this.remove()}}Re(Nr,"Container");class zr extends Nr{constructor(t,n=t){super(Ie("defs",t),n)}flatten(){return this}ungroup(){return this}}Re(zr,"Defs");class Rr extends Tr{}function Lr(t){return this.attr("rx",t)}function Dr(t){return this.attr("ry",t)}function Pr(t){return null==t?this.cx()-this.rx():this.cx(t+this.rx())}function Fr(t){return null==t?this.cy()-this.ry():this.cy(t+this.ry())}function $r(t){return this.attr("cx",t)}function Br(t){return this.attr("cy",t)}function qr(t){return null==t?2*this.rx():this.rx(new Mr(t).divide(2))}function Ur(t){return null==t?2*this.ry():this.ry(new Mr(t).divide(2))}Re(Rr,"Shape");const Wr=Object.freeze(Object.defineProperty({__proto__:null,cx:$r,cy:Br,height:Ur,rx:Lr,ry:Dr,width:qr,x:Pr,y:Fr},Symbol.toStringTag,{value:"Module"}));class Yr extends Rr{constructor(t,n=t){super(Ie("ellipse",t),n)}size(t,n){const e=me(this,t,n);return this.rx(new Mr(e.width).divide(2)).ry(new Mr(e.height).divide(2))}}Fe(Yr,Wr),fe("Container",{ellipse:$e((function(t=0,n=t){return this.put(new Yr).size(t,n).move(0,0)}))}),Re(Yr,"Ellipse");class Vr extends Cr{constructor(t=Oe.document.createDocumentFragment()){super(t)}xml(t,n,e){if("boolean"==typeof t&&(e=n,n=t,t=null),null==t||"function"==typeof t){const t=new Cr(Ce("wrapper",e));return t.add(this.node.cloneNode(!0)),t.xml(!1,e)}return super.xml(t,!1,e)}}function Xr(t,n){return"radialGradient"===(this._element||this).type?this.attr({fx:new Mr(t),fy:new Mr(n)}):this.attr({x1:new Mr(t),y1:new Mr(n)})}function Gr(t,n){return"radialGradient"===(this._element||this).type?this.attr({cx:new Mr(t),cy:new Mr(n)}):this.attr({x2:new Mr(t),y2:new Mr(n)})}Re(Vr,"Fragment");const Zr=Object.freeze(Object.defineProperty({__proto__:null,from:Xr,to:Gr},Symbol.toStringTag,{value:"Module"}));class Hr extends Nr{constructor(t,n){super(Ie(t+"Gradient","string"==typeof t?null:t),n)}attr(t,n,e){return"transform"===t&&(t="gradientTransform"),super.attr(t,n,e)}bbox(){return new cr}targets(){return pr("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}Fe(Hr,Zr),fe({Container:{gradient(...t){return this.defs().gradient(...t)}},Defs:{gradient:$e((function(t,n){return this.put(new Hr(t)).update(n)}))}}),Re(Hr,"Gradient");class Qr extends Nr{constructor(t,n=t){super(Ie("pattern",t),n)}attr(t,n,e){return"transform"===t&&(t="patternTransform"),super.attr(t,n,e)}bbox(){return new cr}targets(){return pr("svg [fill*="+this.id()+"]")}toString(){return this.url()}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}url(){return"url(#"+this.id()+")"}}fe({Container:{pattern(...t){return this.defs().pattern(...t)}},Defs:{pattern:$e((function(t,n,e){return this.put(new Qr).update(e).attr({x:0,y:0,width:t,height:n,patternUnits:"userSpaceOnUse"})}))}}),Re(Qr,"Pattern");let Jr=class extends Rr{constructor(t,n=t){super(Ie("image",t),n)}load(t,n){if(!t)return this;const e=new Oe.window.Image;return mr(e,"load",(function(t){const r=this.parent(Qr);0===this.width()&&0===this.height()&&this.size(e.width,e.height),r instanceof Qr&&0===r.width()&&0===r.height()&&r.size(this.width(),this.height()),"function"==typeof n&&n.call(this,t)}),this),mr(e,"load error",(function(){yr(e)})),this.attr("href",e.src=t,je)}};!function(t){Sr.push(t)}((function(t,n,e){return"fill"!==t&&"stroke"!==t||Qe.test(n)&&(n=e.root().defs().image(n)),n instanceof Jr&&(n=e.root().defs().pattern(0,0,(t=>{t.add(n)}))),n})),fe({Container:{image:$e((function(t,n){return this.put(new Jr).size(0,0).load(t,n)}))}}),Re(Jr,"Image");class Kr extends Or{bbox(){let t=-1/0,n=-1/0,e=1/0,r=1/0;return this.forEach((function(i){t=Math.max(i[0],t),n=Math.max(i[1],n),e=Math.min(i[0],e),r=Math.min(i[1],r)})),new cr(e,r,t-e,n-r)}move(t,n){const e=this.bbox();if(t-=e.x,n-=e.y,!isNaN(t)&&!isNaN(n))for(let r=this.length-1;r>=0;r--)this[r]=[this[r][0]+t,this[r][1]+n];return this}parse(t=[0,0]){const n=[];(t=t instanceof Array?Array.prototype.concat.apply([],t):t.trim().split(Je).map(parseFloat)).length%2!=0&&t.pop();for(let e=0,r=t.length;e<r;e+=2)n.push([t[e],t[e+1]]);return n}size(t,n){let e;const r=this.bbox();for(e=this.length-1;e>=0;e--)r.width&&(this[e][0]=(this[e][0]-r.x)*t/r.width+r.x),r.height&&(this[e][1]=(this[e][1]-r.y)*n/r.height+r.y);return this}toLine(){return{x1:this[0][0],y1:this[0][1],x2:this[1][0],y2:this[1][1]}}toString(){const t=[];for(let n=0,e=this.length;n<e;n++)t.push(this[n].join(","));return t.join(" ")}transform(t){return this.clone().transformO(t)}transformO(t){sr.isMatrixLike(t)||(t=new sr(t));for(let n=this.length;n--;){const[e,r]=this[n];this[n][0]=t.a*e+t.c*r+t.e,this[n][1]=t.b*e+t.d*r+t.f}return this}}const ti=Kr;const ni=Object.freeze(Object.defineProperty({__proto__:null,MorphArray:ti,height:function(t){const n=this.bbox();return null==t?n.height:this.size(n.width,t)},width:function(t){const n=this.bbox();return null==t?n.width:this.size(t,n.height)},x:function(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)},y:function(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}},Symbol.toStringTag,{value:"Module"}));class ei extends Rr{constructor(t,n=t){super(Ie("line",t),n)}array(){return new Kr([[this.attr("x1"),this.attr("y1")],[this.attr("x2"),this.attr("y2")]])}move(t,n){return this.attr(this.array().move(t,n).toLine())}plot(t,n,e,r){return null==t?this.array():(t=void 0!==n?{x1:t,y1:n,x2:e,y2:r}:new Kr(t).toLine(),this.attr(t))}size(t,n){const e=me(this,t,n);return this.attr(this.array().size(e.width,e.height).toLine())}}Fe(ei,ni),fe({Container:{line:$e((function(...t){return ei.prototype.plot.apply(this.put(new ei),null!=t[0]?t:[0,0,0,0])}))}}),Re(ei,"Line");class ri extends Nr{constructor(t,n=t){super(Ie("marker",t),n)}height(t){return this.attr("markerHeight",t)}orient(t){return this.attr("orient",t)}ref(t,n){return this.attr("refX",t).attr("refY",n)}toString(){return"url(#"+this.id()+")"}update(t){return this.clear(),"function"==typeof t&&t.call(this,this),this}width(t){return this.attr("markerWidth",t)}}function ii(t,n){return function(e){return null==e?this[t]:(this[t]=e,n&&n.call(this),this)}}fe({Container:{marker(...t){return this.defs().marker(...t)}},Defs:{marker:$e((function(t,n,e){return this.put(new ri).size(t,n).ref(t/2,n/2).viewbox(0,0,t,n).attr("orient","auto").update(e)}))},marker:{marker(t,n,e,r){let i=["marker"];return"all"!==t&&i.push(t),i=i.join("-"),t=arguments[1]instanceof ri?arguments[1]:this.defs().marker(n,e,r),this.attr(i,t)}}}),Re(ri,"Marker");const oi={"-":function(t){return t},"<>":function(t){return-Math.cos(t*Math.PI)/2+.5},">":function(t){return Math.sin(t*Math.PI/2)},"<":function(t){return 1-Math.cos(t*Math.PI/2)},bezier:function(t,n,e,r){return function(i){return i<0?t>0?n/t*i:e>0?r/e*i:0:i>1?e<1?(1-r)/(1-e)*i+(r-e)/(1-e):t<1?(1-n)/(1-t)*i+(n-t)/(1-t):1:3*i*(1-i)**2*n+3*i**2*(1-i)*r+i**3}},steps:function(t,n="end"){n=n.split("-").reverse()[0];let e=t;return"none"===n?--e:"both"===n&&++e,(r,i=!1)=>{let o=Math.floor(r*t);const s=r*o%1==0;return"start"!==n&&"both"!==n||++o,i&&s&&--o,r>=0&&o<0&&(o=0),r<=1&&o>e&&(o=e),o/e}}};class si{done(){return!1}}class ui extends si{constructor(t=Er){super(),this.ease=oi[t]||t}step(t,n,e){return"number"!=typeof t?e<1?t:n:t+(n-t)*this.ease(e)}}class ai extends si{constructor(t){super(),this.stepper=t}done(t){return t.done}step(t,n,e,r){return this.stepper(t,n,e,r)}}function ci(){const t=(this._duration||500)/1e3,n=this._overshoot||0,e=Math.PI,r=Math.log(n/100+1e-10),i=-r/Math.sqrt(e*e+r*r),o=3.9/(i*t);this.d=2*i*o,this.k=o*o}Fe(class extends ai{constructor(t=500,n=0){super(),this.duration(t).overshoot(n)}step(t,n,e,r){if("string"==typeof t)return t;if(r.done=e===1/0,e===1/0)return n;if(0===e)return t;e>100&&(e=16),e/=1e3;const i=r.velocity||0,o=-this.d*i-this.k*(t-n),s=t+i*e+o*e*e/2;return r.velocity=i+o*e,r.done=Math.abs(n-s)+Math.abs(i)<.002,r.done?n:s}},{duration:ii("_duration",ci),overshoot:ii("_overshoot",ci)});Fe(class extends ai{constructor(t=.1,n=.01,e=0,r=1e3){super(),this.p(t).i(n).d(e).windup(r)}step(t,n,e,r){if("string"==typeof t)return t;if(r.done=e===1/0,e===1/0)return n;if(0===e)return t;const i=n-t;let o=(r.integral||0)+i*e;const s=(i-(r.error||0))/e,u=this._windup;return!1!==u&&(o=Math.max(-u,Math.min(o,u))),r.error=i,r.integral=o,r.done=Math.abs(i)<.001,r.done?n:t+(this.P*i+this.I*o+this.D*s)}},{windup:ii("_windup"),p:ii("P"),i:ii("I"),d:ii("D")});const hi={M:2,L:2,H:1,V:1,C:6,S:4,Q:4,T:2,A:7,Z:0},li={M:function(t,n,e){return n.x=e.x=t[0],n.y=e.y=t[1],["M",n.x,n.y]},L:function(t,n){return n.x=t[0],n.y=t[1],["L",t[0],t[1]]},H:function(t,n){return n.x=t[0],["H",t[0]]},V:function(t,n){return n.y=t[0],["V",t[0]]},C:function(t,n){return n.x=t[4],n.y=t[5],["C",t[0],t[1],t[2],t[3],t[4],t[5]]},S:function(t,n){return n.x=t[2],n.y=t[3],["S",t[0],t[1],t[2],t[3]]},Q:function(t,n){return n.x=t[2],n.y=t[3],["Q",t[0],t[1],t[2],t[3]]},T:function(t,n){return n.x=t[0],n.y=t[1],["T",t[0],t[1]]},Z:function(t,n,e){return n.x=e.x,n.y=e.y,["Z"]},A:function(t,n){return n.x=t[5],n.y=t[6],["A",t[0],t[1],t[2],t[3],t[4],t[5],t[6]]}},fi="mlhvqtcsaz".split("");for(let Wv=0,Yv=fi.length;Wv<Yv;++Wv)li[fi[Wv]]=function(t){return function(n,e,r){if("H"===t)n[0]=n[0]+e.x;else if("V"===t)n[0]=n[0]+e.y;else if("A"===t)n[5]=n[5]+e.x,n[6]=n[6]+e.y;else for(let t=0,i=n.length;t<i;++t)n[t]=n[t]+(t%2?e.y:e.x);return li[t](n,e,r)}}(fi[Wv].toUpperCase());function pi(t){return t.segment.length&&t.segment.length-1===hi[t.segment[0].toUpperCase()]}function di(t,n){t.inNumber&&vi(t,!1);const e=Ke.test(n);if(e)t.segment=[n];else{const n=t.lastCommand,e=n.toLowerCase(),r=n===e;t.segment=["m"===e?r?"l":"L":n]}return t.inSegment=!0,t.lastCommand=t.segment[0],e}function vi(t,n){if(!t.inNumber)throw new Error("Parser Error");t.number&&t.segment.push(parseFloat(t.number)),t.inNumber=n,t.number="",t.pointSeen=!1,t.hasExponent=!1,pi(t)&&gi(t)}function gi(t){t.inSegment=!1,t.absolute&&(t.segment=function(t){const n=t.segment[0];return li[n](t.segment.slice(1),t.p,t.p0)}(t)),t.segments.push(t.segment)}function _i(t){if(!t.segment.length)return!1;const n="A"===t.segment[0].toUpperCase(),e=t.segment.length;return n&&(4===e||5===e)}function mi(t){return"E"===t.lastToken.toUpperCase()}const yi=new Set([" ",",","\t","\n","\r","\f"]);class wi extends Or{bbox(){return ur().path.setAttribute("d",this.toString()),new cr(ur.nodes.path.getBBox())}move(t,n){const e=this.bbox();if(t-=e.x,n-=e.y,!isNaN(t)&&!isNaN(n))for(let r,i=this.length-1;i>=0;i--)r=this[i][0],"M"===r||"L"===r||"T"===r?(this[i][1]+=t,this[i][2]+=n):"H"===r?this[i][1]+=t:"V"===r?this[i][1]+=n:"C"===r||"S"===r||"Q"===r?(this[i][1]+=t,this[i][2]+=n,this[i][3]+=t,this[i][4]+=n,"C"===r&&(this[i][5]+=t,this[i][6]+=n)):"A"===r&&(this[i][6]+=t,this[i][7]+=n);return this}parse(t="M0 0"){return Array.isArray(t)&&(t=Array.prototype.concat.apply([],t).toString()),function(t,n=!0){let e=0,r="";const i={segment:[],inNumber:!1,number:"",lastToken:"",inSegment:!1,segments:[],pointSeen:!1,hasExponent:!1,absolute:n,p0:new ir,p:new ir};for(;i.lastToken=r,r=t.charAt(e++);)if(i.inSegment||!di(i,r))if("."!==r)if(isNaN(parseInt(r)))if(yi.has(r))i.inNumber&&vi(i,!1);else if("-"!==r&&"+"!==r)if("E"!==r.toUpperCase()){if(Ke.test(r)){if(i.inNumber)vi(i,!1);else{if(!pi(i))throw new Error("parser Error");gi(i)}--e}}else i.number+=r,i.hasExponent=!0;else{if(i.inNumber&&!mi(i)){vi(i,!1),--e;continue}i.number+=r,i.inNumber=!0}else{if("0"===i.number||_i(i)){i.inNumber=!0,i.number=r,vi(i,!0);continue}i.inNumber=!0,i.number+=r}else{if(i.pointSeen||i.hasExponent){vi(i,!1),--e;continue}i.inNumber=!0,i.pointSeen=!0,i.number+=r}return i.inNumber&&vi(i,!1),i.inSegment&&pi(i)&&gi(i),i.segments}(t)}size(t,n){const e=this.bbox();let r,i;for(e.width=0===e.width?1:e.width,e.height=0===e.height?1:e.height,r=this.length-1;r>=0;r--)i=this[r][0],"M"===i||"L"===i||"T"===i?(this[r][1]=(this[r][1]-e.x)*t/e.width+e.x,this[r][2]=(this[r][2]-e.y)*n/e.height+e.y):"H"===i?this[r][1]=(this[r][1]-e.x)*t/e.width+e.x:"V"===i?this[r][1]=(this[r][1]-e.y)*n/e.height+e.y:"C"===i||"S"===i||"Q"===i?(this[r][1]=(this[r][1]-e.x)*t/e.width+e.x,this[r][2]=(this[r][2]-e.y)*n/e.height+e.y,this[r][3]=(this[r][3]-e.x)*t/e.width+e.x,this[r][4]=(this[r][4]-e.y)*n/e.height+e.y,"C"===i&&(this[r][5]=(this[r][5]-e.x)*t/e.width+e.x,this[r][6]=(this[r][6]-e.y)*n/e.height+e.y)):"A"===i&&(this[r][1]=this[r][1]*t/e.width,this[r][2]=this[r][2]*n/e.height,this[r][6]=(this[r][6]-e.x)*t/e.width+e.x,this[r][7]=(this[r][7]-e.y)*n/e.height+e.y);return this}toString(){return function(t){let n="";for(let e=0,r=t.length;e<r;e++)n+=t[e][0],null!=t[e][1]&&(n+=t[e][1],null!=t[e][2]&&(n+=" ",n+=t[e][2],null!=t[e][3]&&(n+=" ",n+=t[e][3],n+=" ",n+=t[e][4],null!=t[e][5]&&(n+=" ",n+=t[e][5],n+=" ",n+=t[e][6],null!=t[e][7]&&(n+=" ",n+=t[e][7])))));return n+" "}(this)}}const bi=t=>{const n=typeof t;return"number"===n?Mr:"string"===n?rr.isColor(t)?rr:Je.test(t)?Ke.test(t)?wi:Or:Be.test(t)?Mr:Ei:Mi.indexOf(t.constructor)>-1?t.constructor:Array.isArray(t)?Or:"object"===n?Oi:Ei};class xi{constructor(t){this._stepper=t||new ui("-"),this._from=null,this._to=null,this._type=null,this._context=null,this._morphObj=null}at(t){return this._morphObj.morph(this._from,this._to,t,this._stepper,this._context)}done(){return this._context.map(this._stepper.done).reduce((function(t,n){return t&&n}),!0)}from(t){return null==t?this._from:(this._from=this._set(t),this)}stepper(t){return null==t?this._stepper:(this._stepper=t,this)}to(t){return null==t?this._to:(this._to=this._set(t),this)}type(t){return null==t?this._type:(this._type=t,this)}_set(t){this._type||this.type(bi(t));let n=new this._type(t);return this._type===rr&&(n=this._to?n[this._to[4]]():this._from?n[this._from[4]]():n),this._type===Oi&&(n=this._to?n.align(this._to):this._from?n.align(this._from):n),n=n.toConsumable(),this._morphObj=this._morphObj||new this._type,this._context=this._context||Array.apply(null,Array(n.length)).map(Object).map((function(t){return t.done=!0,t})),n}}class Ei{constructor(...t){this.init(...t)}init(t){return t=Array.isArray(t)?t[0]:t,this.value=t,this}toArray(){return[this.value]}valueOf(){return this.value}}class Ai{constructor(...t){this.init(...t)}init(t){return Array.isArray(t)&&(t={scaleX:t[0],scaleY:t[1],shear:t[2],rotate:t[3],translateX:t[4],translateY:t[5],originX:t[6],originY:t[7]}),Object.assign(this,Ai.defaults,t),this}toArray(){const t=this;return[t.scaleX,t.scaleY,t.shear,t.rotate,t.translateX,t.translateY,t.originX,t.originY]}}Ai.defaults={scaleX:1,scaleY:1,shear:0,rotate:0,translateX:0,translateY:0,originX:0,originY:0};const ji=(t,n)=>t[0]<n[0]?-1:t[0]>n[0]?1:0;class Oi{constructor(...t){this.init(...t)}align(t){const n=this.values;for(let e=0,r=n.length;e<r;++e){if(n[e+1]===t[e+1]){if(n[e+1]===rr&&t[e+7]!==n[e+7]){const n=t[e+7],r=new rr(this.values.splice(e+3,5))[n]().toArray();this.values.splice(e+3,0,...r)}e+=n[e+2]+2;continue}if(!t[e+1])return this;const r=(new t[e+1]).toArray(),i=n[e+2]+3;n.splice(e,i,t[e],t[e+1],t[e+2],...r),e+=n[e+2]+2}return this}init(t){if(this.values=[],Array.isArray(t))return void(this.values=t.slice());t=t||{};const n=[];for(const e in t){const r=bi(t[e]),i=new r(t[e]).toArray();n.push([e,r,i.length,...i])}return n.sort(ji),this.values=n.reduce(((t,n)=>t.concat(n)),[]),this}toArray(){return this.values}valueOf(){const t={},n=this.values;for(;n.length;){const e=n.shift(),r=n.shift(),i=n.shift(),o=n.splice(0,i);t[e]=new r(o)}return t}}const Mi=[Ei,Ai,Oi];class ki extends Rr{constructor(t,n=t){super(Ie("path",t),n)}array(){return this._array||(this._array=new wi(this.attr("d")))}clear(){return delete this._array,this}height(t){return null==t?this.bbox().height:this.size(this.bbox().width,t)}move(t,n){return this.attr("d",this.array().move(t,n))}plot(t){return null==t?this.array():this.clear().attr("d","string"==typeof t?t:this._array=new wi(t))}size(t,n){const e=me(this,t,n);return this.attr("d",this.array().size(e.width,e.height))}width(t){return null==t?this.bbox().width:this.size(t,this.bbox().height)}x(t){return null==t?this.bbox().x:this.move(t,this.bbox().y)}y(t){return null==t?this.bbox().y:this.move(this.bbox().x,t)}}ki.prototype.MorphArray=wi,fe({Container:{path:$e((function(t){return this.put(new ki).plot(t||new wi)}))}}),Re(ki,"Path");const Si=Object.freeze(Object.defineProperty({__proto__:null,array:function(){return this._array||(this._array=new Kr(this.attr("points")))},clear:function(){return delete this._array,this},move:function(t,n){return this.attr("points",this.array().move(t,n))},plot:function(t){return null==t?this.array():this.clear().attr("points","string"==typeof t?t:this._array=new Kr(t))},size:function(t,n){const e=me(this,t,n);return this.attr("points",this.array().size(e.width,e.height))}},Symbol.toStringTag,{value:"Module"}));class Ci extends Rr{constructor(t,n=t){super(Ie("polygon",t),n)}}fe({Container:{polygon:$e((function(t){return this.put(new Ci).plot(t||new Kr)}))}}),Fe(Ci,ni),Fe(Ci,Si),Re(Ci,"Polygon");class Ti extends Rr{constructor(t,n=t){super(Ie("polyline",t),n)}}fe({Container:{polyline:$e((function(t){return this.put(new Ti).plot(t||new Kr)}))}}),Fe(Ti,ni),Fe(Ti,Si),Re(Ti,"Polyline");class Ii extends Rr{constructor(t,n=t){super(Ie("rect",t),n)}}Fe(Ii,{rx:Lr,ry:Dr}),fe({Container:{rect:$e((function(t,n){return this.put(new Ii).size(t,n)}))}}),Re(Ii,"Rect");class Ni{constructor(){this._first=null,this._last=null}first(){return this._first&&this._first.value}last(){return this._last&&this._last.value}push(t){const n=void 0!==t.next?t:{value:t,next:null,prev:null};return this._last?(n.prev=this._last,this._last.next=n,this._last=n):(this._last=n,this._first=n),n}remove(t){t.prev&&(t.prev.next=t.next),t.next&&(t.next.prev=t.prev),t===this._last&&(this._last=t.prev),t===this._first&&(this._first=t.next),t.prev=null,t.next=null}shift(){const t=this._first;return t?(this._first=t.next,this._first&&(this._first.prev=null),this._last=this._first?this._last:null,t.value):null}}const zi={nextDraw:null,frames:new Ni,timeouts:new Ni,immediates:new Ni,timer:()=>Oe.window.performance||Oe.window.Date,transforms:[],frame(t){const n=zi.frames.push({run:t});return null===zi.nextDraw&&(zi.nextDraw=Oe.window.requestAnimationFrame(zi._draw)),n},timeout(t,n){n=n||0;const e=zi.timer().now()+n,r=zi.timeouts.push({run:t,time:e});return null===zi.nextDraw&&(zi.nextDraw=Oe.window.requestAnimationFrame(zi._draw)),r},immediate(t){const n=zi.immediates.push(t);return null===zi.nextDraw&&(zi.nextDraw=Oe.window.requestAnimationFrame(zi._draw)),n},cancelFrame(t){null!=t&&zi.frames.remove(t)},clearTimeout(t){null!=t&&zi.timeouts.remove(t)},cancelImmediate(t){null!=t&&zi.immediates.remove(t)},_draw(t){let n=null;const e=zi.timeouts.last();for(;(n=zi.timeouts.shift())&&(t>=n.time?n.run():zi.timeouts.push(n),n!==e););let r=null;const i=zi.frames.last();for(;r!==i&&(r=zi.frames.shift());)r.run(t);let o=null;for(;o=zi.immediates.shift();)o();zi.nextDraw=zi.timeouts.first()||zi.frames.first()?Oe.window.requestAnimationFrame(zi._draw):null}},Ri=function(t){const n=t.start,e=t.runner.duration();return{start:n,duration:e,end:n+e,runner:t.runner}},Li=function(){const t=Oe.window;return(t.performance||t.Date).now()};class Di extends wr{constructor(t=Li){super(),this._timeSource=t,this.terminate()}active(){return!!this._nextFrame}finish(){return this.time(this.getEndTimeOfTimeline()+1),this.pause()}getEndTime(){const t=this.getLastRunnerInfo(),n=t?t.runner.duration():0;return(t?t.start:this._time)+n}getEndTimeOfTimeline(){const t=this._runners.map((t=>t.start+t.runner.duration()));return Math.max(0,...t)}getLastRunnerInfo(){return this.getRunnerInfoById(this._lastRunnerId)}getRunnerInfoById(t){return this._runners[this._runnerIds.indexOf(t)]||null}pause(){return this._paused=!0,this._continue()}persist(t){return null==t?this._persist:(this._persist=t,this)}play(){return this._paused=!1,this.updateTime()._continue()}reverse(t){const n=this.speed();if(null==t)return this.speed(-n);const e=Math.abs(n);return this.speed(t?-e:e)}schedule(t,n,e){if(null==t)return this._runners.map(Ri);let r=0;const i=this.getEndTime();if(n=n||0,null==e||"last"===e||"after"===e)r=i;else if("absolute"===e||"start"===e)r=n,n=0;else if("now"===e)r=this._time;else if("relative"===e){const e=this.getRunnerInfoById(t.id);e&&(r=e.start+n,n=0)}else{if("with-last"!==e)throw new Error('Invalid value for the "when" parameter');{const t=this.getLastRunnerInfo();r=t?t.start:this._time}}t.unschedule(),t.timeline(this);const o=t.persist(),s={persist:null===o?this._persist:o,start:r+n,runner:t};return this._lastRunnerId=t.id,this._runners.push(s),this._runners.sort(((t,n)=>t.start-n.start)),this._runnerIds=this._runners.map((t=>t.runner.id)),this.updateTime()._continue(),this}seek(t){return this.time(this._time+t)}source(t){return null==t?this._timeSource:(this._timeSource=t,this)}speed(t){return null==t?this._speed:(this._speed=t,this)}stop(){return this.time(0),this.pause()}time(t){return null==t?this._time:(this._time=t,this._continue(!0))}unschedule(t){const n=this._runnerIds.indexOf(t.id);return n<0||(this._runners.splice(n,1),this._runnerIds.splice(n,1),t.timeline(null)),this}updateTime(){return this.active()||(this._lastSourceTime=this._timeSource()),this}_continue(t=!1){return zi.cancelFrame(this._nextFrame),this._nextFrame=null,t?this._stepImmediate():(this._paused||(this._nextFrame=zi.frame(this._step)),this)}_stepFn(t=!1){const n=this._timeSource();let e=n-this._lastSourceTime;t&&(e=0);const r=this._speed*e+(this._time-this._lastStepTime);this._lastSourceTime=n,t||(this._time+=r,this._time=this._time<0?0:this._time),this._lastStepTime=this._time,this.fire("time",this._time);for(let o=this._runners.length;o--;){const t=this._runners[o],n=t.runner;this._time-t.start<=0&&n.reset()}let i=!1;for(let o=0,s=this._runners.length;o<s;o++){const t=this._runners[o],n=t.runner;let e=r;const u=this._time-t.start;if(u<=0){i=!0;continue}if(u<e&&(e=u),!n.active())continue;if(n.step(e).done){if(!0!==t.persist){n.duration()-n.time()+this._time+t.persist<this._time&&(n.unschedule(),--o,--s)}}else i=!0}return i&&!(this._speed<0&&0===this._time)||this._runnerIds.length&&this._speed<0&&this._time>0?this._continue():(this.pause(),this.fire("finished")),this}terminate(){this._startTime=0,this._speed=1,this._persist=0,this._nextFrame=null,this._paused=!0,this._runners=[],this._runnerIds=[],this._lastRunnerId=-1,this._time=0,this._lastSourceTime=0,this._lastStepTime=0,this._step=this._stepFn.bind(this,!1),this._stepImmediate=this._stepFn.bind(this,!0)}}fe({Element:{timeline:function(t){return null==t?(this._timeline=this._timeline||new Di,this._timeline):(this._timeline=t,this)}}});class Pi extends wr{constructor(t){super(),this.id=Pi.id++,t="function"==typeof(t=null==t?xr:t)?new ai(t):t,this._element=null,this._timeline=null,this.done=!1,this._queue=[],this._duration="number"==typeof t&&t,this._isDeclarative=t instanceof ai,this._stepper=this._isDeclarative?t:new ui,this._history={},this.enabled=!0,this._time=0,this._lastTime=0,this._reseted=!0,this.transforms=new sr,this.transformId=1,this._haveReversed=!1,this._reverse=!1,this._loopsDone=0,this._swing=!1,this._wait=0,this._times=1,this._frameId=null,this._persist=!!this._isDeclarative||null}static sanitise(t,n,e){let r=1,i=!1,o=0;return n=n??Ar,e=e||"last","object"!=typeof(t=t??xr)||t instanceof si||(n=t.delay??n,e=t.when??e,i=t.swing||i,r=t.times??r,o=t.wait??o,t=t.duration??xr),{duration:t,delay:n,swing:i,times:r,wait:o,when:e}}active(t){return null==t?this.enabled:(this.enabled=t,this)}addTransform(t){return this.transforms.lmultiplyO(t),this}after(t){return this.on("finished",t)}animate(t,n,e){const r=Pi.sanitise(t,n,e),i=new Pi(r.duration);return this._timeline&&i.timeline(this._timeline),this._element&&i.element(this._element),i.loop(r).schedule(r.delay,r.when)}clearTransform(){return this.transforms=new sr,this}clearTransformsFromQueue(){this.done&&this._timeline&&this._timeline._runnerIds.includes(this.id)||(this._queue=this._queue.filter((t=>!t.isTransform)))}delay(t){return this.animate(0,t)}duration(){return this._times*(this._wait+this._duration)-this._wait}during(t){return this.queue(null,t)}ease(t){return this._stepper=new ui(t),this}element(t){return null==t?this._element:(this._element=t,t._prepareRunner(),this)}finish(){return this.step(1/0)}loop(t,n,e){return"object"==typeof t&&(n=t.swing,e=t.wait,t=t.times),this._times=t||1/0,this._swing=n||!1,this._wait=e||0,!0===this._times&&(this._times=1/0),this}loops(t){const n=this._duration+this._wait;if(null==t){const t=Math.floor(this._time/n),e=(this._time-t*n)/this._duration;return Math.min(t+e,this._times)}const e=t%1,r=n*Math.floor(t)+this._duration*e;return this.time(r)}persist(t){return null==t?this._persist:(this._persist=t,this)}position(t){const n=this._time,e=this._duration,r=this._wait,i=this._times,o=this._swing,s=this._reverse;let u;if(null==t){const t=function(t){const n=o*Math.floor(t%(2*(r+e))/(r+e)),i=n&&!s||!n&&s,u=Math.pow(-1,i)*(t%(r+e))/e+i;return Math.max(Math.min(u,1),0)},a=i*(r+e)-r;return u=n<=0?Math.round(t(1e-5)):n<a?t(n):Math.round(t(a-1e-5)),u}const a=Math.floor(this.loops()),c=o&&a%2==0;return u=a+(c&&!s||s&&c?t:1-t),this.loops(u)}progress(t){return null==t?Math.min(1,this._time/this.duration()):this.time(t*this.duration())}queue(t,n,e,r){this._queue.push({initialiser:t||br,runner:n||br,retarget:e,isTransform:r,initialised:!1,finished:!1});return this.timeline()&&this.timeline()._continue(),this}reset(){return this._reseted||(this.time(0),this._reseted=!0),this}reverse(t){return this._reverse=null==t?!this._reverse:t,this}schedule(t,n,e){if(t instanceof Di||(e=n,n=t,t=this.timeline()),!t)throw Error("Runner cannot be scheduled without timeline");return t.schedule(this,n,e),this}step(t){if(!this.enabled)return this;t=null==t?16:t,this._time+=t;const n=this.position(),e=this._lastPosition!==n&&this._time>=0;this._lastPosition=n;const r=this.duration(),i=this._lastTime<=0&&this._time>0,o=this._lastTime<r&&this._time>=r;this._lastTime=this._time,i&&this.fire("start",this);const s=this._isDeclarative;this.done=!s&&!o&&this._time>=r,this._reseted=!1;let u=!1;return(e||s)&&(this._initialise(e),this.transforms=new sr,u=this._run(s?t:n),this.fire("step",this)),this.done=this.done||u&&s,o&&this.fire("finished",this),this}time(t){if(null==t)return this._time;const n=t-this._time;return this.step(n),this}timeline(t){return void 0===t?this._timeline:(this._timeline=t,this)}unschedule(){const t=this.timeline();return t&&t.unschedule(this),this}_initialise(t){if(t||this._isDeclarative)for(let n=0,e=this._queue.length;n<e;++n){const e=this._queue[n],r=this._isDeclarative||!e.initialised&&t;t=!e.finished,r&&t&&(e.initialiser.call(this),e.initialised=!0)}}_rememberMorpher(t,n){if(this._history[t]={morpher:n,caller:this._queue[this._queue.length-1]},this._isDeclarative){const t=this.timeline();t&&t.play()}}_run(t){let n=!0;for(let e=0,r=this._queue.length;e<r;++e){const r=this._queue[e],i=r.runner.call(this,t);r.finished=r.finished||!0===i,n=n&&r.finished}return n}_tryRetarget(t,n,e){if(this._history[t]){if(!this._history[t].caller.initialised){const n=this._queue.indexOf(this._history[t].caller);return this._queue.splice(n,1),!1}this._history[t].caller.retarget?this._history[t].caller.retarget.call(this,n,e):this._history[t].morpher.to(n),this._history[t].caller.finished=!1;const r=this.timeline();return r&&r.play(),!0}return!1}}Pi.id=0;class Fi{constructor(t=new sr,n=-1,e=!0){this.transforms=t,this.id=n,this.done=e}clearTransformsFromQueue(){}}Fe([Pi,Fi],{mergeWith(t){return new Fi(t.transforms.lmultiply(this.transforms),t.id)}});const $i=(t,n)=>t.lmultiplyO(n),Bi=t=>t.transforms;function qi(){const t=this._transformationRunners.runners.map(Bi).reduce($i,new sr);this.transform(t),this._transformationRunners.merge(),1===this._transformationRunners.length()&&(this._frameId=null)}class Ui{constructor(){this.runners=[],this.ids=[]}add(t){if(this.runners.includes(t))return;const n=t.id+1;return this.runners.push(t),this.ids.push(n),this}clearBefore(t){const n=this.ids.indexOf(t+1)||1;return this.ids.splice(0,n,0),this.runners.splice(0,n,new Fi).forEach((t=>t.clearTransformsFromQueue())),this}edit(t,n){const e=this.ids.indexOf(t+1);return this.ids.splice(e,1,t+1),this.runners.splice(e,1,n),this}getByID(t){return this.runners[this.ids.indexOf(t+1)]}length(){return this.ids.length}merge(){let t=null;for(let n=0;n<this.runners.length;++n){const e=this.runners[n];if(t&&e.done&&t.done&&(!e._timeline||!e._timeline._runnerIds.includes(e.id))&&(!t._timeline||!t._timeline._runnerIds.includes(t.id))){this.remove(e.id);const r=e.mergeWith(t);this.edit(t.id,r),t=r,--n}else t=e}return this}remove(t){const n=this.ids.indexOf(t+1);return this.ids.splice(n,1),this.runners.splice(n,1),this}}fe({Element:{animate(t,n,e){const r=Pi.sanitise(t,n,e),i=this.timeline();return new Pi(r.duration).loop(r).element(this).timeline(i.play()).schedule(r.delay,r.when)},delay(t,n){return this.animate(0,t,n)},_clearTransformRunnersBefore(t){this._transformationRunners.clearBefore(t.id)},_currentTransform(t){return this._transformationRunners.runners.filter((n=>n.id<=t.id)).map(Bi).reduce($i,new sr)},_addRunner(t){this._transformationRunners.add(t),zi.cancelImmediate(this._frameId),this._frameId=zi.immediate(qi.bind(this))},_prepareRunner(){null==this._frameId&&(this._transformationRunners=(new Ui).add(new Fi(new sr(this))))}}});Fe(Pi,{attr(t,n){return this.styleAttr("attr",t,n)},css(t,n){return this.styleAttr("css",t,n)},styleAttr(t,n,e){if("string"==typeof n)return this.styleAttr(t,{[n]:e});let r=n;if(this._tryRetarget(t,r))return this;let i=new xi(this._stepper).to(r),o=Object.keys(r);return this.queue((function(){i=i.from(this.element()[t](o))}),(function(n){return this.element()[t](i.at(n).valueOf()),i.done()}),(function(n){const e=Object.keys(n),s=(u=o,e.filter((t=>!u.includes(t))));var u;if(s.length){const n=this.element()[t](s),e=new Oi(i.from()).valueOf();Object.assign(e,n),i.from(e)}const a=new Oi(i.to()).valueOf();Object.assign(a,n),i.to(a),o=e,r=n})),this._rememberMorpher(t,i),this},zoom(t,n){if(this._tryRetarget("zoom",t,n))return this;let e=new xi(this._stepper).to(new Mr(t));return this.queue((function(){e=e.from(this.element().zoom())}),(function(t){return this.element().zoom(e.at(t),n),e.done()}),(function(t,r){n=r,e.to(t)})),this._rememberMorpher("zoom",e),this},transform(t,n,e){if(n=t.relative||n,this._isDeclarative&&!n&&this._tryRetarget("transform",t))return this;const r=sr.isMatrixLike(t);e=null!=t.affine?t.affine:null!=e?e:!r;const i=new xi(this._stepper).type(e?Ai:sr);let o,s,u,a,c;return this.queue((function(){s=s||this.element(),o=o||ye(t,s),c=new sr(n?void 0:s),s._addRunner(this),n||s._clearTransformRunnersBefore(this)}),(function(h){n||this.clearTransform();const{x:l,y:f}=new ir(o).transform(s._currentTransform(this));let p=new sr({...t,origin:[l,f]}),d=this._isDeclarative&&u?u:c;if(e){p=p.decompose(l,f),d=d.decompose(l,f);const t=p.rotate,n=d.rotate,e=[t-360,t,t+360],r=e.map((t=>Math.abs(t-n))),i=Math.min(...r),o=r.indexOf(i);p.rotate=e[o]}n&&(r||(p.rotate=t.rotate||0),this._isDeclarative&&a&&(d.rotate=a)),i.from(d),i.to(p);const v=i.at(h);return a=v.rotate,u=new sr(v),this.addTransform(u),s._addRunner(this),i.done()}),(function(n){(n.origin||"center").toString()!==(t.origin||"center").toString()&&(o=ye(n,s)),t={...n,origin:o}}),!0),this._isDeclarative&&this._rememberMorpher("transform",i),this},x(t){return this._queueNumber("x",t)},y(t){return this._queueNumber("y",t)},ax(t){return this._queueNumber("ax",t)},ay(t){return this._queueNumber("ay",t)},dx(t=0){return this._queueNumberDelta("x",t)},dy(t=0){return this._queueNumberDelta("y",t)},dmove(t,n){return this.dx(t).dy(n)},_queueNumberDelta(t,n){if(n=new Mr(n),this._tryRetarget(t,n))return this;const e=new xi(this._stepper).to(n);let r=null;return this.queue((function(){r=this.element()[t](),e.from(r),e.to(r+n)}),(function(n){return this.element()[t](e.at(n)),e.done()}),(function(t){e.to(r+new Mr(t))})),this._rememberMorpher(t,e),this},_queueObject(t,n){if(this._tryRetarget(t,n))return this;const e=new xi(this._stepper).to(n);return this.queue((function(){e.from(this.element()[t]())}),(function(n){return this.element()[t](e.at(n)),e.done()})),this._rememberMorpher(t,e),this},_queueNumber(t,n){return this._queueObject(t,new Mr(n))},cx(t){return this._queueNumber("cx",t)},cy(t){return this._queueNumber("cy",t)},move(t,n){return this.x(t).y(n)},amove(t,n){return this.ax(t).ay(n)},center(t,n){return this.cx(t).cy(n)},size(t,n){let e;return t&&n||(e=this._element.bbox()),t||(t=e.width/e.height*n),n||(n=e.height/e.width*t),this.width(t).height(n)},width(t){return this._queueNumber("width",t)},height(t){return this._queueNumber("height",t)},plot(t,n,e,r){if(4===arguments.length)return this.plot([t,n,e,r]);if(this._tryRetarget("plot",t))return this;const i=new xi(this._stepper).type(this._element.MorphArray).to(t);return this.queue((function(){i.from(this._element.array())}),(function(t){return this._element.plot(i.at(t)),i.done()})),this._rememberMorpher("plot",i),this},leading(t){return this._queueNumber("leading",t)},viewbox(t,n,e,r){return this._queueObject("viewbox",new cr(t,n,e,r))},update(t){return"object"!=typeof t?this.update({offset:arguments[0],color:arguments[1],opacity:arguments[2]}):(null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",t.offset),this)}}),Fe(Pi,{rx:Lr,ry:Dr,from:Xr,to:Gr}),Re(Pi,"Runner");class Wi extends Nr{constructor(t,n=t){super(Ie("svg",t),n),this.namespace()}defs(){return this.isRoot()?Ne(this.node.querySelector("defs"))||this.put(new zr):this.root().defs()}isRoot(){return!this.node.parentNode||!(this.node.parentNode instanceof Oe.window.SVGElement)&&"#document-fragment"!==this.node.parentNode.nodeName}namespace(){return this.isRoot()?this.attr({xmlns:Ee,version:"1.1"}).attr("xmlns:xlink",je,Ae):this.root().namespace()}removeNamespace(){return this.attr({xmlns:null,version:null}).attr("xmlns:xlink",null,Ae).attr("xmlns:svgjs",null,Ae)}root(){return this.isRoot()?this:super.root()}}fe({Container:{nested:$e((function(){return this.put(new Wi)}))}}),Re(Wi,"Svg",!0);let Yi=class extends Nr{constructor(t,n=t){super(Ie("symbol",t),n)}};fe({Container:{symbol:$e((function(){return this.put(new Yi)}))}}),Re(Yi,"Symbol");const Vi=Object.freeze(Object.defineProperty({__proto__:null,amove:function(t,n){return this.ax(t).ay(n)},ax:function(t){return this.attr("x",t)},ay:function(t){return this.attr("y",t)},build:function(t){return this._build=!!t,this},center:function(t,n,e=this.bbox()){return this.cx(t,e).cy(n,e)},cx:function(t,n=this.bbox()){return null==t?n.cx:this.attr("x",this.attr("x")+t-n.cx)},cy:function(t,n=this.bbox()){return null==t?n.cy:this.attr("y",this.attr("y")+t-n.cy)},length:function(){return this.node.getComputedTextLength()},move:function(t,n,e=this.bbox()){return this.x(t,e).y(n,e)},plain:function(t){return!1===this._build&&this.clear(),this.node.appendChild(Oe.document.createTextNode(t)),this},x:function(t,n=this.bbox()){return null==t?n.x:this.attr("x",this.attr("x")+t-n.x)},y:function(t,n=this.bbox()){return null==t?n.y:this.attr("y",this.attr("y")+t-n.y)}},Symbol.toStringTag,{value:"Module"}));class Xi extends Rr{constructor(t,n=t){super(Ie("text",t),n),this.dom.leading=this.dom.leading??new Mr(1.3),this._rebuild=!0,this._build=!1}leading(t){return null==t?this.dom.leading:(this.dom.leading=new Mr(t),this.rebuild())}rebuild(t){if("boolean"==typeof t&&(this._rebuild=t),this._rebuild){const t=this;let n=0;const e=this.dom.leading;this.each((function(r){if(be(this.node))return;const i=Oe.window.getComputedStyle(this.node).getPropertyValue("font-size"),o=e*new Mr(i);this.dom.newLined&&(this.attr("x",t.attr("x")),"\n"===this.text()?n+=o:(this.attr("dy",r?o+n:0),n=0))})),this.fire("rebuild")}return this}setData(t){return this.dom=t,this.dom.leading=new Mr(t.leading||1.3),this}writeDataToDom(){return xe(this,this.dom,{leading:1.3}),this}text(t){if(void 0===t){const n=this.node.childNodes;let e=0;t="";for(let r=0,i=n.length;r<i;++r)"textPath"===n[r].nodeName||be(n[r])?0===r&&(e=r+1):(r!==e&&3!==n[r].nodeType&&!0===Ne(n[r]).dom.newLined&&(t+="\n"),t+=n[r].textContent);return t}if(this.clear().build(!0),"function"==typeof t)t.call(this,this);else for(let n=0,e=(t=(t+"").split("\n")).length;n<e;n++)this.newLine(t[n]);return this.build(!1).rebuild()}}Fe(Xi,Vi),fe({Container:{text:$e((function(t=""){return this.put(new Xi).text(t)})),plain:$e((function(t=""){return this.put(new Xi).plain(t)}))}}),Re(Xi,"Text");class Gi extends Rr{constructor(t,n=t){super(Ie("tspan",t),n),this._build=!1}dx(t){return this.attr("dx",t)}dy(t){return this.attr("dy",t)}newLine(){this.dom.newLined=!0;const t=this.parent();if(!(t instanceof Xi))return this;const n=t.index(this),e=Oe.window.getComputedStyle(this.node).getPropertyValue("font-size"),r=t.dom.leading*new Mr(e);return this.dy(n?r:0).attr("x",t.x())}text(t){return null==t?this.node.textContent+(this.dom.newLined?"\n":""):("function"==typeof t?(this.clear().build(!0),t.call(this,this),this.build(!1)):this.plain(t),this)}}Fe(Gi,Vi),fe({Tspan:{tspan:$e((function(t=""){const n=new Gi;return this._build||this.clear(),this.put(n).text(t)}))},Text:{newLine:function(t=""){return this.tspan(t).newLine()}}}),Re(Gi,"Tspan");class Zi extends Rr{constructor(t,n=t){super(Ie("circle",t),n)}radius(t){return this.attr("r",t)}rx(t){return this.attr("r",t)}ry(t){return this.rx(t)}size(t){return this.radius(new Mr(t).divide(2))}}Fe(Zi,{x:Pr,y:Fr,cx:$r,cy:Br,width:qr,height:Ur}),fe({Container:{circle:$e((function(t=0){return this.put(new Zi).size(t).move(0,0)}))}}),Re(Zi,"Circle");class Hi extends Nr{constructor(t,n=t){super(Ie("clipPath",t),n)}remove(){return this.targets().forEach((function(t){t.unclip()})),super.remove()}targets(){return pr("svg [clip-path*="+this.id()+"]")}}fe({Container:{clip:$e((function(){return this.defs().put(new Hi)}))},Element:{clipper(){return this.reference("clip-path")},clipWith(t){const n=t instanceof Hi?t:this.parent().clip().add(t);return this.attr("clip-path","url(#"+n.id()+")")},unclip(){return this.attr("clip-path",null)}}}),Re(Hi,"ClipPath");class Qi extends Tr{constructor(t,n=t){super(Ie("foreignObject",t),n)}}fe({Container:{foreignObject:$e((function(t,n){return this.put(new Qi).size(t,n)}))}}),Re(Qi,"ForeignObject");const Ji=Object.freeze(Object.defineProperty({__proto__:null,dmove:function(t,n){return this.children().forEach((e=>{let r;try{r=e.node instanceof Oe.window.SVGSVGElement?new cr(e.attr(["x","y","width","height"])):e.bbox()}catch(u){return}const i=new sr(e),o=i.translate(t,n).transform(i.inverse()),s=new ir(r.x,r.y).transform(o);e.move(s.x,s.y)})),this},dx:function(t){return this.dmove(t,0)},dy:function(t){return this.dmove(0,t)},height:function(t,n=this.bbox()){return null==t?n.height:this.size(n.width,t,n)},move:function(t=0,n=0,e=this.bbox()){const r=t-e.x,i=n-e.y;return this.dmove(r,i)},size:function(t,n,e=this.bbox()){const r=me(this,t,n,e),i=r.width/e.width,o=r.height/e.height;return this.children().forEach((t=>{const n=new ir(e).transform(new sr(t).inverse());t.scale(i,o,n.x,n.y)})),this},width:function(t,n=this.bbox()){return null==t?n.width:this.size(t,n.height,n)},x:function(t,n=this.bbox()){return null==t?n.x:this.move(t,n.y,n)},y:function(t,n=this.bbox()){return null==t?n.y:this.move(n.x,t,n)}},Symbol.toStringTag,{value:"Module"}));class Ki extends Nr{constructor(t,n=t){super(Ie("g",t),n)}}Fe(Ki,Ji),fe({Container:{group:$e((function(){return this.put(new Ki)}))}}),Re(Ki,"G");class to extends Nr{constructor(t,n=t){super(Ie("a",t),n)}target(t){return this.attr("target",t)}to(t){return this.attr("href",t,je)}}Fe(to,Ji),fe({Container:{link:$e((function(t){return this.put(new to).to(t)}))},Element:{unlink(){const t=this.linker();if(!t)return this;const n=t.parent();if(!n)return this.remove();const e=n.index(t);return n.add(this,e),t.remove(),this},linkTo(t){let n=this.linker();return n||(n=new to,this.wrap(n)),"function"==typeof t?t.call(n,n):n.to(t),this},linker(){const t=this.parent();return t&&"a"===t.node.nodeName.toLowerCase()?t:null}}}),Re(to,"A");class no extends Nr{constructor(t,n=t){super(Ie("mask",t),n)}remove(){return this.targets().forEach((function(t){t.unmask()})),super.remove()}targets(){return pr("svg [mask*="+this.id()+"]")}}fe({Container:{mask:$e((function(){return this.defs().put(new no)}))},Element:{masker(){return this.reference("mask")},maskWith(t){const n=t instanceof no?t:this.parent().mask().add(t);return this.attr("mask","url(#"+n.id()+")")},unmask(){return this.attr("mask",null)}}}),Re(no,"Mask");class eo extends Tr{constructor(t,n=t){super(Ie("stop",t),n)}update(t){return("number"==typeof t||t instanceof Mr)&&(t={offset:arguments[0],color:arguments[1],opacity:arguments[2]}),null!=t.opacity&&this.attr("stop-opacity",t.opacity),null!=t.color&&this.attr("stop-color",t.color),null!=t.offset&&this.attr("offset",new Mr(t.offset)),this}}fe({Gradient:{stop:function(t,n,e){return this.put(new eo).update(t,n,e)}}}),Re(eo,"Stop");class ro extends Tr{constructor(t,n=t){super(Ie("style",t),n)}addText(t=""){return this.node.textContent+=t,this}font(t,n,e={}){return this.rule("@font-face",{fontFamily:t,src:n,...e})}rule(t,n){return this.addText(function(t,n){if(!t)return"";if(!n)return t;let e=t+"{";for(const r in n)e+=r.replace(/([A-Z])/g,(function(t,n){return"-"+n.toLowerCase()}))+":"+n[r]+";";return e+="}",e}(t,n))}}fe("Dom",{style(t,n){return this.put(new ro).rule(t,n)},fontface(t,n,e){return this.put(new ro).font(t,n,e)}}),Re(ro,"Style");class io extends Xi{constructor(t,n=t){super(Ie("textPath",t),n)}array(){const t=this.track();return t?t.array():null}plot(t){const n=this.track();let e=null;return n&&(e=n.plot(t)),null==t?e:this}track(){return this.reference("href")}}fe({Container:{textPath:$e((function(t,n){return t instanceof Xi||(t=this.text(t)),t.path(n)}))},Text:{path:$e((function(t,n=!0){const e=new io;let r;if(t instanceof ki||(t=this.defs().path(t)),e.attr("href","#"+t,je),n)for(;r=this.node.firstChild;)e.node.appendChild(r);return this.put(e)})),textPath(){return this.findOne("textPath")}},Path:{text:$e((function(t){return t instanceof Xi||(t=(new Xi).addTo(this.parent()).text(t)),t.path(this)})),targets(){return pr("svg textPath").filter((t=>(t.attr("href")||"").includes(this.id())))}}}),io.prototype.MorphArray=wi,Re(io,"TextPath");class oo extends Rr{constructor(t,n=t){super(Ie("use",t),n)}use(t,n){return this.attr("href",(n||"")+"#"+t,je)}}fe({Container:{use:$e((function(t,n){return this.put(new oo).use(t,n)}))}}),Re(oo,"Use");const so=Te;Fe([Wi,Yi,Jr,Qr,ri],pe("viewbox")),Fe([ei,Ti,Ci,ki],pe("marker")),Fe(Xi,pe("Text")),Fe(ki,pe("Path")),Fe(zr,pe("Defs")),Fe([Xi,Gi],pe("Tspan")),Fe([Ii,Yr,Hr,Pi],pe("radius")),Fe(wr,pe("EventTarget")),Fe(Cr,pe("Dom")),Fe(Tr,pe("Element")),Fe(Rr,pe("Shape")),Fe([Nr,Vr],pe("Container")),Fe(Hr,pe("Gradient")),Fe(Pi,pe("Runner")),lr.extend([...new Set(le)]),function(t=[]){Mi.push(...[].concat(t))}([Mr,rr,cr,sr,Or,Kr,wi,ir]),Fe(Mi,{to(t){return(new xi).type(this.constructor).from(this.toArray()).to(t)},fromArray(t){return this.init(t),this},toConsumable(){return this.toArray()},morph(t,n,e,r,i){return this.fromArray(t.map((function(t,o){return r.step(t,n[o],e,i[o],i)})))}});var uo={exports:{}};
10
+ /**
11
+ * @license
12
+ * Lodash <https://lodash.com/>
13
+ * Copyright OpenJS Foundation and other contributors <https://openjsf.org/>
14
+ * Released under MIT license <https://lodash.com/license>
15
+ * Based on Underscore.js 1.8.3 <http://underscorejs.org/LICENSE>
16
+ * Copyright Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors
17
+ */!function(t,e){(function(){var r,i="Expected a function",o="__lodash_hash_undefined__",s="__lodash_placeholder__",u=16,a=32,c=64,h=128,l=256,f=1/0,p=9007199254740991,d=NaN,v=4294967295,g=[["ary",h],["bind",1],["bindKey",2],["curry",8],["curryRight",u],["flip",512],["partial",a],["partialRight",c],["rearg",l]],_="[object Arguments]",m="[object Array]",y="[object Boolean]",w="[object Date]",b="[object Error]",x="[object Function]",E="[object GeneratorFunction]",A="[object Map]",j="[object Number]",O="[object Object]",M="[object Promise]",k="[object RegExp]",S="[object Set]",C="[object String]",T="[object Symbol]",I="[object WeakMap]",N="[object ArrayBuffer]",z="[object DataView]",R="[object Float32Array]",L="[object Float64Array]",D="[object Int8Array]",P="[object Int16Array]",F="[object Int32Array]",$="[object Uint8Array]",B="[object Uint8ClampedArray]",q="[object Uint16Array]",U="[object Uint32Array]",W=/\b__p \+= '';/g,Y=/\b(__p \+=) '' \+/g,V=/(__e\(.*?\)|\b__t\)) \+\n'';/g,X=/&(?:amp|lt|gt|quot|#39);/g,G=/[&<>"']/g,Z=RegExp(X.source),H=RegExp(G.source),Q=/<%-([\s\S]+?)%>/g,J=/<%([\s\S]+?)%>/g,K=/<%=([\s\S]+?)%>/g,tt=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nt=/^\w*$/,et=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,rt=/[\\^$.*+?()[\]{}|]/g,it=RegExp(rt.source),ot=/^\s+/,st=/\s/,ut=/\{(?:\n\/\* \[wrapped with .+\] \*\/)?\n?/,at=/\{\n\/\* \[wrapped with (.+)\] \*/,ct=/,? & /,ht=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,lt=/[()=,{}\[\]\/\s]/,ft=/\\(\\)?/g,pt=/\$\{([^\\}]*(?:\\.[^\\}]*)*)\}/g,dt=/\w*$/,vt=/^[-+]0x[0-9a-f]+$/i,gt=/^0b[01]+$/i,_t=/^\[object .+?Constructor\]$/,mt=/^0o[0-7]+$/i,yt=/^(?:0|[1-9]\d*)$/,wt=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,bt=/($^)/,xt=/['\n\r\u2028\u2029\\]/g,Et="\\ud800-\\udfff",At="\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff",jt="\\u2700-\\u27bf",Ot="a-z\\xdf-\\xf6\\xf8-\\xff",Mt="A-Z\\xc0-\\xd6\\xd8-\\xde",kt="\\ufe0e\\ufe0f",St="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",Ct="['’]",Tt="["+Et+"]",It="["+St+"]",Nt="["+At+"]",zt="\\d+",Rt="["+jt+"]",Lt="["+Ot+"]",Dt="[^"+Et+St+zt+jt+Ot+Mt+"]",Pt="\\ud83c[\\udffb-\\udfff]",Ft="[^"+Et+"]",$t="(?:\\ud83c[\\udde6-\\uddff]){2}",Bt="[\\ud800-\\udbff][\\udc00-\\udfff]",qt="["+Mt+"]",Ut="\\u200d",Wt="(?:"+Lt+"|"+Dt+")",Yt="(?:"+qt+"|"+Dt+")",Vt="(?:['’](?:d|ll|m|re|s|t|ve))?",Xt="(?:['’](?:D|LL|M|RE|S|T|VE))?",Gt="(?:"+Nt+"|"+Pt+")"+"?",Zt="["+kt+"]?",Ht=Zt+Gt+("(?:"+Ut+"(?:"+[Ft,$t,Bt].join("|")+")"+Zt+Gt+")*"),Qt="(?:"+[Rt,$t,Bt].join("|")+")"+Ht,Jt="(?:"+[Ft+Nt+"?",Nt,$t,Bt,Tt].join("|")+")",Kt=RegExp(Ct,"g"),tn=RegExp(Nt,"g"),nn=RegExp(Pt+"(?="+Pt+")|"+Jt+Ht,"g"),en=RegExp([qt+"?"+Lt+"+"+Vt+"(?="+[It,qt,"$"].join("|")+")",Yt+"+"+Xt+"(?="+[It,qt+Wt,"$"].join("|")+")",qt+"?"+Wt+"+"+Vt,qt+"+"+Xt,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])","\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])",zt,Qt].join("|"),"g"),rn=RegExp("["+Ut+Et+At+kt+"]"),on=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,sn=["Array","Buffer","DataView","Date","Error","Float32Array","Float64Array","Function","Int8Array","Int16Array","Int32Array","Map","Math","Object","Promise","RegExp","Set","String","Symbol","TypeError","Uint8Array","Uint8ClampedArray","Uint16Array","Uint32Array","WeakMap","_","clearTimeout","isFinite","parseInt","setTimeout"],un=-1,an={};an[R]=an[L]=an[D]=an[P]=an[F]=an[$]=an[B]=an[q]=an[U]=!0,an[_]=an[m]=an[N]=an[y]=an[z]=an[w]=an[b]=an[x]=an[A]=an[j]=an[O]=an[k]=an[S]=an[C]=an[I]=!1;var cn={};cn[_]=cn[m]=cn[N]=cn[z]=cn[y]=cn[w]=cn[R]=cn[L]=cn[D]=cn[P]=cn[F]=cn[A]=cn[j]=cn[O]=cn[k]=cn[S]=cn[C]=cn[T]=cn[$]=cn[B]=cn[q]=cn[U]=!0,cn[b]=cn[x]=cn[I]=!1;var hn={"\\":"\\","'":"'","\n":"n","\r":"r","\u2028":"u2028","\u2029":"u2029"},ln=parseFloat,fn=parseInt,pn="object"==typeof n&&n&&n.Object===Object&&n,dn="object"==typeof self&&self&&self.Object===Object&&self,vn=pn||dn||Function("return this")(),gn=e&&!e.nodeType&&e,_n=gn&&t&&!t.nodeType&&t,mn=_n&&_n.exports===gn,yn=mn&&pn.process,wn=function(){try{var t=_n&&_n.require&&_n.require("util").types;return t||yn&&yn.binding&&yn.binding("util")}catch(n){}}(),bn=wn&&wn.isArrayBuffer,xn=wn&&wn.isDate,En=wn&&wn.isMap,An=wn&&wn.isRegExp,jn=wn&&wn.isSet,On=wn&&wn.isTypedArray;function Mn(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}function kn(t,n,e,r){for(var i=-1,o=null==t?0:t.length;++i<o;){var s=t[i];n(r,s,e(s),t)}return r}function Sn(t,n){for(var e=-1,r=null==t?0:t.length;++e<r&&!1!==n(t[e],e,t););return t}function Cn(t,n){for(var e=null==t?0:t.length;e--&&!1!==n(t[e],e,t););return t}function Tn(t,n){for(var e=-1,r=null==t?0:t.length;++e<r;)if(!n(t[e],e,t))return!1;return!0}function In(t,n){for(var e=-1,r=null==t?0:t.length,i=0,o=[];++e<r;){var s=t[e];n(s,e,t)&&(o[i++]=s)}return o}function Nn(t,n){return!!(null==t?0:t.length)&&Un(t,n,0)>-1}function zn(t,n,e){for(var r=-1,i=null==t?0:t.length;++r<i;)if(e(n,t[r]))return!0;return!1}function Rn(t,n){for(var e=-1,r=null==t?0:t.length,i=Array(r);++e<r;)i[e]=n(t[e],e,t);return i}function Ln(t,n){for(var e=-1,r=n.length,i=t.length;++e<r;)t[i+e]=n[e];return t}function Dn(t,n,e,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(e=t[++i]);++i<o;)e=n(e,t[i],i,t);return e}function Pn(t,n,e,r){var i=null==t?0:t.length;for(r&&i&&(e=t[--i]);i--;)e=n(e,t[i],i,t);return e}function Fn(t,n){for(var e=-1,r=null==t?0:t.length;++e<r;)if(n(t[e],e,t))return!0;return!1}var $n=Xn("length");function Bn(t,n,e){var r;return e(t,(function(t,e,i){if(n(t,e,i))return r=e,!1})),r}function qn(t,n,e,r){for(var i=t.length,o=e+(r?1:-1);r?o--:++o<i;)if(n(t[o],o,t))return o;return-1}function Un(t,n,e){return n==n?function(t,n,e){var r=e-1,i=t.length;for(;++r<i;)if(t[r]===n)return r;return-1}(t,n,e):qn(t,Yn,e)}function Wn(t,n,e,r){for(var i=e-1,o=t.length;++i<o;)if(r(t[i],n))return i;return-1}function Yn(t){return t!=t}function Vn(t,n){var e=null==t?0:t.length;return e?Hn(t,n)/e:d}function Xn(t){return function(n){return null==n?r:n[t]}}function Gn(t){return function(n){return null==t?r:t[n]}}function Zn(t,n,e,r,i){return i(t,(function(t,i,o){e=r?(r=!1,t):n(e,t,i,o)})),e}function Hn(t,n){for(var e,i=-1,o=t.length;++i<o;){var s=n(t[i]);s!==r&&(e=e===r?s:e+s)}return e}function Qn(t,n){for(var e=-1,r=Array(t);++e<t;)r[e]=n(e);return r}function Jn(t){return t?t.slice(0,de(t)+1).replace(ot,""):t}function Kn(t){return function(n){return t(n)}}function te(t,n){return Rn(n,(function(n){return t[n]}))}function ne(t,n){return t.has(n)}function ee(t,n){for(var e=-1,r=t.length;++e<r&&Un(n,t[e],0)>-1;);return e}function re(t,n){for(var e=t.length;e--&&Un(n,t[e],0)>-1;);return e}var ie=Gn({"À":"A","Á":"A","Â":"A","Ã":"A","Ä":"A","Å":"A","à":"a","á":"a","â":"a","ã":"a","ä":"a","å":"a","Ç":"C","ç":"c","Ð":"D","ð":"d","È":"E","É":"E","Ê":"E","Ë":"E","è":"e","é":"e","ê":"e","ë":"e","Ì":"I","Í":"I","Î":"I","Ï":"I","ì":"i","í":"i","î":"i","ï":"i","Ñ":"N","ñ":"n","Ò":"O","Ó":"O","Ô":"O","Õ":"O","Ö":"O","Ø":"O","ò":"o","ó":"o","ô":"o","õ":"o","ö":"o","ø":"o","Ù":"U","Ú":"U","Û":"U","Ü":"U","ù":"u","ú":"u","û":"u","ü":"u","Ý":"Y","ý":"y","ÿ":"y","Æ":"Ae","æ":"ae","Þ":"Th","þ":"th","ß":"ss","Ā":"A","Ă":"A","Ą":"A","ā":"a","ă":"a","ą":"a","Ć":"C","Ĉ":"C","Ċ":"C","Č":"C","ć":"c","ĉ":"c","ċ":"c","č":"c","Ď":"D","Đ":"D","ď":"d","đ":"d","Ē":"E","Ĕ":"E","Ė":"E","Ę":"E","Ě":"E","ē":"e","ĕ":"e","ė":"e","ę":"e","ě":"e","Ĝ":"G","Ğ":"G","Ġ":"G","Ģ":"G","ĝ":"g","ğ":"g","ġ":"g","ģ":"g","Ĥ":"H","Ħ":"H","ĥ":"h","ħ":"h","Ĩ":"I","Ī":"I","Ĭ":"I","Į":"I","İ":"I","ĩ":"i","ī":"i","ĭ":"i","į":"i","ı":"i","Ĵ":"J","ĵ":"j","Ķ":"K","ķ":"k","ĸ":"k","Ĺ":"L","Ļ":"L","Ľ":"L","Ŀ":"L","Ł":"L","ĺ":"l","ļ":"l","ľ":"l","ŀ":"l","ł":"l","Ń":"N","Ņ":"N","Ň":"N","Ŋ":"N","ń":"n","ņ":"n","ň":"n","ŋ":"n","Ō":"O","Ŏ":"O","Ő":"O","ō":"o","ŏ":"o","ő":"o","Ŕ":"R","Ŗ":"R","Ř":"R","ŕ":"r","ŗ":"r","ř":"r","Ś":"S","Ŝ":"S","Ş":"S","Š":"S","ś":"s","ŝ":"s","ş":"s","š":"s","Ţ":"T","Ť":"T","Ŧ":"T","ţ":"t","ť":"t","ŧ":"t","Ũ":"U","Ū":"U","Ŭ":"U","Ů":"U","Ű":"U","Ų":"U","ũ":"u","ū":"u","ŭ":"u","ů":"u","ű":"u","ų":"u","Ŵ":"W","ŵ":"w","Ŷ":"Y","ŷ":"y","Ÿ":"Y","Ź":"Z","Ż":"Z","Ž":"Z","ź":"z","ż":"z","ž":"z","IJ":"IJ","ij":"ij","Œ":"Oe","œ":"oe","ʼn":"'n","ſ":"s"}),oe=Gn({"&":"&amp;","<":"&lt;",">":"&gt;",'"':"&quot;","'":"&#39;"});function se(t){return"\\"+hn[t]}function ue(t){return rn.test(t)}function ae(t){var n=-1,e=Array(t.size);return t.forEach((function(t,r){e[++n]=[r,t]})),e}function ce(t,n){return function(e){return t(n(e))}}function he(t,n){for(var e=-1,r=t.length,i=0,o=[];++e<r;){var u=t[e];u!==n&&u!==s||(t[e]=s,o[i++]=e)}return o}function le(t){var n=-1,e=Array(t.size);return t.forEach((function(t){e[++n]=t})),e}function fe(t){return ue(t)?function(t){var n=nn.lastIndex=0;for(;nn.test(t);)++n;return n}(t):$n(t)}function pe(t){return ue(t)?function(t){return t.match(nn)||[]}(t):function(t){return t.split("")}(t)}function de(t){for(var n=t.length;n--&&st.test(t.charAt(n)););return n}var ve=Gn({"&amp;":"&","&lt;":"<","&gt;":">","&quot;":'"',"&#39;":"'"});var ge=function t(n){var e,st=(n=null==n?vn:ge.defaults(vn.Object(),n,ge.pick(vn,sn))).Array,Et=n.Date,At=n.Error,jt=n.Function,Ot=n.Math,Mt=n.Object,kt=n.RegExp,St=n.String,Ct=n.TypeError,Tt=st.prototype,It=jt.prototype,Nt=Mt.prototype,zt=n["__core-js_shared__"],Rt=It.toString,Lt=Nt.hasOwnProperty,Dt=0,Pt=(e=/[^.]+$/.exec(zt&&zt.keys&&zt.keys.IE_PROTO||""))?"Symbol(src)_1."+e:"",Ft=Nt.toString,$t=Rt.call(Mt),Bt=vn._,qt=kt("^"+Rt.call(Lt).replace(rt,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$"),Ut=mn?n.Buffer:r,Wt=n.Symbol,Yt=n.Uint8Array,Vt=Ut?Ut.allocUnsafe:r,Xt=ce(Mt.getPrototypeOf,Mt),Gt=Mt.create,Zt=Nt.propertyIsEnumerable,Ht=Tt.splice,Qt=Wt?Wt.isConcatSpreadable:r,Jt=Wt?Wt.iterator:r,nn=Wt?Wt.toStringTag:r,rn=function(){try{var t=lo(Mt,"defineProperty");return t({},"",{}),t}catch(n){}}(),hn=n.clearTimeout!==vn.clearTimeout&&n.clearTimeout,pn=Et&&Et.now!==vn.Date.now&&Et.now,dn=n.setTimeout!==vn.setTimeout&&n.setTimeout,gn=Ot.ceil,_n=Ot.floor,yn=Mt.getOwnPropertySymbols,wn=Ut?Ut.isBuffer:r,$n=n.isFinite,Gn=Tt.join,_e=ce(Mt.keys,Mt),me=Ot.max,ye=Ot.min,we=Et.now,be=n.parseInt,xe=Ot.random,Ee=Tt.reverse,Ae=lo(n,"DataView"),je=lo(n,"Map"),Oe=lo(n,"Promise"),Me=lo(n,"Set"),ke=lo(n,"WeakMap"),Se=lo(Mt,"create"),Ce=ke&&new ke,Te={},Ie=Bo(Ae),Ne=Bo(je),ze=Bo(Oe),Re=Bo(Me),Le=Bo(ke),De=Wt?Wt.prototype:r,Pe=De?De.valueOf:r,Fe=De?De.toString:r;function $e(t){if(iu(t)&&!Xs(t)&&!(t instanceof We)){if(t instanceof Ue)return t;if(Lt.call(t,"__wrapped__"))return qo(t)}return new Ue(t)}var Be=function(){function t(){}return function(n){if(!ru(n))return{};if(Gt)return Gt(n);t.prototype=n;var e=new t;return t.prototype=r,e}}();function qe(){}function Ue(t,n){this.__wrapped__=t,this.__actions__=[],this.__chain__=!!n,this.__index__=0,this.__values__=r}function We(t){this.__wrapped__=t,this.__actions__=[],this.__dir__=1,this.__filtered__=!1,this.__iteratees__=[],this.__takeCount__=v,this.__views__=[]}function Ye(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function Ve(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function Xe(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}function Ge(t){var n=-1,e=null==t?0:t.length;for(this.__data__=new Xe;++n<e;)this.add(t[n])}function Ze(t){var n=this.__data__=new Ve(t);this.size=n.size}function He(t,n){var e=Xs(t),r=!e&&Vs(t),i=!e&&!r&&Qs(t),o=!e&&!r&&!i&&fu(t),s=e||r||i||o,u=s?Qn(t.length,St):[],a=u.length;for(var c in t)!n&&!Lt.call(t,c)||s&&("length"==c||i&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||yo(c,a))||u.push(c);return u}function Qe(t){var n=t.length;return n?t[Gr(0,n-1)]:r}function Je(t,n){return Ro(Si(t),ur(n,0,t.length))}function Ke(t){return Ro(Si(t))}function tr(t,n,e){(e!==r&&!Us(t[n],e)||e===r&&!(n in t))&&or(t,n,e)}function nr(t,n,e){var i=t[n];Lt.call(t,n)&&Us(i,e)&&(e!==r||n in t)||or(t,n,e)}function er(t,n){for(var e=t.length;e--;)if(Us(t[e][0],n))return e;return-1}function rr(t,n,e,r){return fr(t,(function(t,i,o){n(r,t,e(t),o)})),r}function ir(t,n){return t&&Ci(n,zu(n),t)}function or(t,n,e){"__proto__"==n&&rn?rn(t,n,{configurable:!0,enumerable:!0,value:e,writable:!0}):t[n]=e}function sr(t,n){for(var e=-1,i=n.length,o=st(i),s=null==t;++e<i;)o[e]=s?r:Su(t,n[e]);return o}function ur(t,n,e){return t==t&&(e!==r&&(t=t<=e?t:e),n!==r&&(t=t>=n?t:n)),t}function ar(t,n,e,i,o,s){var u,a=1&n,c=2&n,h=4&n;if(e&&(u=o?e(t,i,o,s):e(t)),u!==r)return u;if(!ru(t))return t;var l=Xs(t);if(l){if(u=function(t){var n=t.length,e=new t.constructor(n);n&&"string"==typeof t[0]&&Lt.call(t,"index")&&(e.index=t.index,e.input=t.input);return e}(t),!a)return Si(t,u)}else{var f=vo(t),p=f==x||f==E;if(Qs(t))return Ei(t,a);if(f==O||f==_||p&&!o){if(u=c||p?{}:_o(t),!a)return c?function(t,n){return Ci(t,po(t),n)}(t,function(t,n){return t&&Ci(n,Ru(n),t)}(u,t)):function(t,n){return Ci(t,fo(t),n)}(t,ir(u,t))}else{if(!cn[f])return o?t:{};u=function(t,n,e){var r=t.constructor;switch(n){case N:return Ai(t);case y:case w:return new r(+t);case z:return function(t,n){var e=n?Ai(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.byteLength)}(t,e);case R:case L:case D:case P:case F:case $:case B:case q:case U:return ji(t,e);case A:return new r;case j:case C:return new r(t);case k:return function(t){var n=new t.constructor(t.source,dt.exec(t));return n.lastIndex=t.lastIndex,n}(t);case S:return new r;case T:return i=t,Pe?Mt(Pe.call(i)):{}}var i}(t,f,a)}}s||(s=new Ze);var d=s.get(t);if(d)return d;s.set(t,u),cu(t)?t.forEach((function(r){u.add(ar(r,n,e,r,t,s))})):ou(t)&&t.forEach((function(r,i){u.set(i,ar(r,n,e,i,t,s))}));var v=l?r:(h?c?io:ro:c?Ru:zu)(t);return Sn(v||t,(function(r,i){v&&(r=t[i=r]),nr(u,i,ar(r,n,e,i,t,s))})),u}function cr(t,n,e){var i=e.length;if(null==t)return!i;for(t=Mt(t);i--;){var o=e[i],s=n[o],u=t[o];if(u===r&&!(o in t)||!s(u))return!1}return!0}function hr(t,n,e){if("function"!=typeof t)throw new Ct(i);return To((function(){t.apply(r,e)}),n)}function lr(t,n,e,r){var i=-1,o=Nn,s=!0,u=t.length,a=[],c=n.length;if(!u)return a;e&&(n=Rn(n,Kn(e))),r?(o=zn,s=!1):n.length>=200&&(o=ne,s=!1,n=new Ge(n));t:for(;++i<u;){var h=t[i],l=null==e?h:e(h);if(h=r||0!==h?h:0,s&&l==l){for(var f=c;f--;)if(n[f]===l)continue t;a.push(h)}else o(n,l,r)||a.push(h)}return a}$e.templateSettings={escape:Q,evaluate:J,interpolate:K,variable:"",imports:{_:$e}},$e.prototype=qe.prototype,$e.prototype.constructor=$e,Ue.prototype=Be(qe.prototype),Ue.prototype.constructor=Ue,We.prototype=Be(qe.prototype),We.prototype.constructor=We,Ye.prototype.clear=function(){this.__data__=Se?Se(null):{},this.size=0},Ye.prototype.delete=function(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n},Ye.prototype.get=function(t){var n=this.__data__;if(Se){var e=n[t];return e===o?r:e}return Lt.call(n,t)?n[t]:r},Ye.prototype.has=function(t){var n=this.__data__;return Se?n[t]!==r:Lt.call(n,t)},Ye.prototype.set=function(t,n){var e=this.__data__;return this.size+=this.has(t)?0:1,e[t]=Se&&n===r?o:n,this},Ve.prototype.clear=function(){this.__data__=[],this.size=0},Ve.prototype.delete=function(t){var n=this.__data__,e=er(n,t);return!(e<0)&&(e==n.length-1?n.pop():Ht.call(n,e,1),--this.size,!0)},Ve.prototype.get=function(t){var n=this.__data__,e=er(n,t);return e<0?r:n[e][1]},Ve.prototype.has=function(t){return er(this.__data__,t)>-1},Ve.prototype.set=function(t,n){var e=this.__data__,r=er(e,t);return r<0?(++this.size,e.push([t,n])):e[r][1]=n,this},Xe.prototype.clear=function(){this.size=0,this.__data__={hash:new Ye,map:new(je||Ve),string:new Ye}},Xe.prototype.delete=function(t){var n=co(this,t).delete(t);return this.size-=n?1:0,n},Xe.prototype.get=function(t){return co(this,t).get(t)},Xe.prototype.has=function(t){return co(this,t).has(t)},Xe.prototype.set=function(t,n){var e=co(this,t),r=e.size;return e.set(t,n),this.size+=e.size==r?0:1,this},Ge.prototype.add=Ge.prototype.push=function(t){return this.__data__.set(t,o),this},Ge.prototype.has=function(t){return this.__data__.has(t)},Ze.prototype.clear=function(){this.__data__=new Ve,this.size=0},Ze.prototype.delete=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e},Ze.prototype.get=function(t){return this.__data__.get(t)},Ze.prototype.has=function(t){return this.__data__.has(t)},Ze.prototype.set=function(t,n){var e=this.__data__;if(e instanceof Ve){var r=e.__data__;if(!je||r.length<199)return r.push([t,n]),this.size=++e.size,this;e=this.__data__=new Xe(r)}return e.set(t,n),this.size=e.size,this};var fr=Ni(wr),pr=Ni(br,!0);function dr(t,n){var e=!0;return fr(t,(function(t,r,i){return e=!!n(t,r,i)})),e}function vr(t,n,e){for(var i=-1,o=t.length;++i<o;){var s=t[i],u=n(s);if(null!=u&&(a===r?u==u&&!lu(u):e(u,a)))var a=u,c=s}return c}function gr(t,n){var e=[];return fr(t,(function(t,r,i){n(t,r,i)&&e.push(t)})),e}function _r(t,n,e,r,i){var o=-1,s=t.length;for(e||(e=mo),i||(i=[]);++o<s;){var u=t[o];n>0&&e(u)?n>1?_r(u,n-1,e,r,i):Ln(i,u):r||(i[i.length]=u)}return i}var mr=zi(),yr=zi(!0);function wr(t,n){return t&&mr(t,n,zu)}function br(t,n){return t&&yr(t,n,zu)}function xr(t,n){return In(n,(function(n){return tu(t[n])}))}function Er(t,n){for(var e=0,i=(n=yi(n,t)).length;null!=t&&e<i;)t=t[$o(n[e++])];return e&&e==i?t:r}function Ar(t,n,e){var r=n(t);return Xs(t)?r:Ln(r,e(t))}function jr(t){return null==t?t===r?"[object Undefined]":"[object Null]":nn&&nn in Mt(t)?function(t){var n=Lt.call(t,nn),e=t[nn];try{t[nn]=r;var i=!0}catch(s){}var o=Ft.call(t);i&&(n?t[nn]=e:delete t[nn]);return o}(t):function(t){return Ft.call(t)}(t)}function Or(t,n){return t>n}function Mr(t,n){return null!=t&&Lt.call(t,n)}function kr(t,n){return null!=t&&n in Mt(t)}function Sr(t,n,e){for(var i=e?zn:Nn,o=t[0].length,s=t.length,u=s,a=st(s),c=1/0,h=[];u--;){var l=t[u];u&&n&&(l=Rn(l,Kn(n))),c=ye(l.length,c),a[u]=!e&&(n||o>=120&&l.length>=120)?new Ge(u&&l):r}l=t[0];var f=-1,p=a[0];t:for(;++f<o&&h.length<c;){var d=l[f],v=n?n(d):d;if(d=e||0!==d?d:0,!(p?ne(p,v):i(h,v,e))){for(u=s;--u;){var g=a[u];if(!(g?ne(g,v):i(t[u],v,e)))continue t}p&&p.push(v),h.push(d)}}return h}function Cr(t,n,e){var i=null==(t=ko(t,n=yi(n,t)))?t:t[$o(Ko(n))];return null==i?r:Mn(i,t,e)}function Tr(t){return iu(t)&&jr(t)==_}function Ir(t,n,e,i,o){return t===n||(null==t||null==n||!iu(t)&&!iu(n)?t!=t&&n!=n:function(t,n,e,i,o,s){var u=Xs(t),a=Xs(n),c=u?m:vo(t),h=a?m:vo(n),l=(c=c==_?O:c)==O,f=(h=h==_?O:h)==O,p=c==h;if(p&&Qs(t)){if(!Qs(n))return!1;u=!0,l=!1}if(p&&!l)return s||(s=new Ze),u||fu(t)?no(t,n,e,i,o,s):function(t,n,e,r,i,o,s){switch(e){case z:if(t.byteLength!=n.byteLength||t.byteOffset!=n.byteOffset)return!1;t=t.buffer,n=n.buffer;case N:return!(t.byteLength!=n.byteLength||!o(new Yt(t),new Yt(n)));case y:case w:case j:return Us(+t,+n);case b:return t.name==n.name&&t.message==n.message;case k:case C:return t==n+"";case A:var u=ae;case S:var a=1&r;if(u||(u=le),t.size!=n.size&&!a)return!1;var c=s.get(t);if(c)return c==n;r|=2,s.set(t,n);var h=no(u(t),u(n),r,i,o,s);return s.delete(t),h;case T:if(Pe)return Pe.call(t)==Pe.call(n)}return!1}(t,n,c,e,i,o,s);if(!(1&e)){var d=l&&Lt.call(t,"__wrapped__"),v=f&&Lt.call(n,"__wrapped__");if(d||v){var g=d?t.value():t,x=v?n.value():n;return s||(s=new Ze),o(g,x,e,i,s)}}if(!p)return!1;return s||(s=new Ze),function(t,n,e,i,o,s){var u=1&e,a=ro(t),c=a.length,h=ro(n),l=h.length;if(c!=l&&!u)return!1;var f=c;for(;f--;){var p=a[f];if(!(u?p in n:Lt.call(n,p)))return!1}var d=s.get(t),v=s.get(n);if(d&&v)return d==n&&v==t;var g=!0;s.set(t,n),s.set(n,t);var _=u;for(;++f<c;){var m=t[p=a[f]],y=n[p];if(i)var w=u?i(y,m,p,n,t,s):i(m,y,p,t,n,s);if(!(w===r?m===y||o(m,y,e,i,s):w)){g=!1;break}_||(_="constructor"==p)}if(g&&!_){var b=t.constructor,x=n.constructor;b==x||!("constructor"in t)||!("constructor"in n)||"function"==typeof b&&b instanceof b&&"function"==typeof x&&x instanceof x||(g=!1)}return s.delete(t),s.delete(n),g}(t,n,e,i,o,s)}(t,n,e,i,Ir,o))}function Nr(t,n,e,i){var o=e.length,s=o,u=!i;if(null==t)return!s;for(t=Mt(t);o--;){var a=e[o];if(u&&a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++o<s;){var c=(a=e[o])[0],h=t[c],l=a[1];if(u&&a[2]){if(h===r&&!(c in t))return!1}else{var f=new Ze;if(i)var p=i(h,l,c,t,n,f);if(!(p===r?Ir(l,h,3,i,f):p))return!1}}return!0}function zr(t){return!(!ru(t)||(n=t,Pt&&Pt in n))&&(tu(t)?qt:_t).test(Bo(t));var n}function Rr(t){return"function"==typeof t?t:null==t?sa:"object"==typeof t?Xs(t)?Br(t[0],t[1]):$r(t):va(t)}function Lr(t){if(!Ao(t))return _e(t);var n=[];for(var e in Mt(t))Lt.call(t,e)&&"constructor"!=e&&n.push(e);return n}function Dr(t){if(!ru(t))return function(t){var n=[];if(null!=t)for(var e in Mt(t))n.push(e);return n}(t);var n=Ao(t),e=[];for(var r in t)("constructor"!=r||!n&&Lt.call(t,r))&&e.push(r);return e}function Pr(t,n){return t<n}function Fr(t,n){var e=-1,r=Zs(t)?st(t.length):[];return fr(t,(function(t,i,o){r[++e]=n(t,i,o)})),r}function $r(t){var n=ho(t);return 1==n.length&&n[0][2]?Oo(n[0][0],n[0][1]):function(e){return e===t||Nr(e,t,n)}}function Br(t,n){return bo(t)&&jo(n)?Oo($o(t),n):function(e){var i=Su(e,t);return i===r&&i===n?Cu(e,t):Ir(n,i,3)}}function qr(t,n,e,i,o){t!==n&&mr(n,(function(s,u){if(o||(o=new Ze),ru(s))!function(t,n,e,i,o,s,u){var a=So(t,e),c=So(n,e),h=u.get(c);if(h)return void tr(t,e,h);var l=s?s(a,c,e+"",t,n,u):r,f=l===r;if(f){var p=Xs(c),d=!p&&Qs(c),v=!p&&!d&&fu(c);l=c,p||d||v?Xs(a)?l=a:Hs(a)?l=Si(a):d?(f=!1,l=Ei(c,!0)):v?(f=!1,l=ji(c,!0)):l=[]:uu(c)||Vs(c)?(l=a,Vs(a)?l=wu(a):ru(a)&&!tu(a)||(l=_o(c))):f=!1}f&&(u.set(c,l),o(l,c,i,s,u),u.delete(c));tr(t,e,l)}(t,n,u,e,qr,i,o);else{var a=i?i(So(t,u),s,u+"",t,n,o):r;a===r&&(a=s),tr(t,u,a)}}),Ru)}function Ur(t,n){var e=t.length;if(e)return yo(n+=n<0?e:0,e)?t[n]:r}function Wr(t,n,e){n=n.length?Rn(n,(function(t){return Xs(t)?function(n){return Er(n,1===t.length?t[0]:t)}:t})):[sa];var r=-1;return n=Rn(n,Kn(ao())),function(t,n){var e=t.length;for(t.sort(n);e--;)t[e]=t[e].value;return t}(Fr(t,(function(t,e,i){return{criteria:Rn(n,(function(n){return n(t)})),index:++r,value:t}})),(function(t,n){return function(t,n,e){var r=-1,i=t.criteria,o=n.criteria,s=i.length,u=e.length;for(;++r<s;){var a=Oi(i[r],o[r]);if(a)return r>=u?a:a*("desc"==e[r]?-1:1)}return t.index-n.index}(t,n,e)}))}function Yr(t,n,e){for(var r=-1,i=n.length,o={};++r<i;){var s=n[r],u=Er(t,s);e(u,s)&&Kr(o,yi(s,t),u)}return o}function Vr(t,n,e,r){var i=r?Wn:Un,o=-1,s=n.length,u=t;for(t===n&&(n=Si(n)),e&&(u=Rn(t,Kn(e)));++o<s;)for(var a=0,c=n[o],h=e?e(c):c;(a=i(u,h,a,r))>-1;)u!==t&&Ht.call(u,a,1),Ht.call(t,a,1);return t}function Xr(t,n){for(var e=t?n.length:0,r=e-1;e--;){var i=n[e];if(e==r||i!==o){var o=i;yo(i)?Ht.call(t,i,1):li(t,i)}}return t}function Gr(t,n){return t+_n(xe()*(n-t+1))}function Zr(t,n){var e="";if(!t||n<1||n>p)return e;do{n%2&&(e+=t),(n=_n(n/2))&&(t+=t)}while(n);return e}function Hr(t,n){return Io(Mo(t,n,sa),t+"")}function Qr(t){return Qe(Uu(t))}function Jr(t,n){var e=Uu(t);return Ro(e,ur(n,0,e.length))}function Kr(t,n,e,i){if(!ru(t))return t;for(var o=-1,s=(n=yi(n,t)).length,u=s-1,a=t;null!=a&&++o<s;){var c=$o(n[o]),h=e;if("__proto__"===c||"constructor"===c||"prototype"===c)return t;if(o!=u){var l=a[c];(h=i?i(l,c,a):r)===r&&(h=ru(l)?l:yo(n[o+1])?[]:{})}nr(a,c,h),a=a[c]}return t}var ti=Ce?function(t,n){return Ce.set(t,n),t}:sa,ni=rn?function(t,n){return rn(t,"toString",{configurable:!0,enumerable:!1,value:ra(n),writable:!0})}:sa;function ei(t){return Ro(Uu(t))}function ri(t,n,e){var r=-1,i=t.length;n<0&&(n=-n>i?0:i+n),(e=e>i?i:e)<0&&(e+=i),i=n>e?0:e-n>>>0,n>>>=0;for(var o=st(i);++r<i;)o[r]=t[r+n];return o}function ii(t,n){var e;return fr(t,(function(t,r,i){return!(e=n(t,r,i))})),!!e}function oi(t,n,e){var r=0,i=null==t?r:t.length;if("number"==typeof n&&n==n&&i<=2147483647){for(;r<i;){var o=r+i>>>1,s=t[o];null!==s&&!lu(s)&&(e?s<=n:s<n)?r=o+1:i=o}return i}return si(t,n,sa,e)}function si(t,n,e,i){var o=0,s=null==t?0:t.length;if(0===s)return 0;for(var u=(n=e(n))!=n,a=null===n,c=lu(n),h=n===r;o<s;){var l=_n((o+s)/2),f=e(t[l]),p=f!==r,d=null===f,v=f==f,g=lu(f);if(u)var _=i||v;else _=h?v&&(i||p):a?v&&p&&(i||!d):c?v&&p&&!d&&(i||!g):!d&&!g&&(i?f<=n:f<n);_?o=l+1:s=l}return ye(s,4294967294)}function ui(t,n){for(var e=-1,r=t.length,i=0,o=[];++e<r;){var s=t[e],u=n?n(s):s;if(!e||!Us(u,a)){var a=u;o[i++]=0===s?0:s}}return o}function ai(t){return"number"==typeof t?t:lu(t)?d:+t}function ci(t){if("string"==typeof t)return t;if(Xs(t))return Rn(t,ci)+"";if(lu(t))return Fe?Fe.call(t):"";var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}function hi(t,n,e){var r=-1,i=Nn,o=t.length,s=!0,u=[],a=u;if(e)s=!1,i=zn;else if(o>=200){var c=n?null:Zi(t);if(c)return le(c);s=!1,i=ne,a=new Ge}else a=n?[]:u;t:for(;++r<o;){var h=t[r],l=n?n(h):h;if(h=e||0!==h?h:0,s&&l==l){for(var f=a.length;f--;)if(a[f]===l)continue t;n&&a.push(l),u.push(h)}else i(a,l,e)||(a!==u&&a.push(l),u.push(h))}return u}function li(t,n){return null==(t=ko(t,n=yi(n,t)))||delete t[$o(Ko(n))]}function fi(t,n,e,r){return Kr(t,n,e(Er(t,n)),r)}function pi(t,n,e,r){for(var i=t.length,o=r?i:-1;(r?o--:++o<i)&&n(t[o],o,t););return e?ri(t,r?0:o,r?o+1:i):ri(t,r?o+1:0,r?i:o)}function di(t,n){var e=t;return e instanceof We&&(e=e.value()),Dn(n,(function(t,n){return n.func.apply(n.thisArg,Ln([t],n.args))}),e)}function vi(t,n,e){var r=t.length;if(r<2)return r?hi(t[0]):[];for(var i=-1,o=st(r);++i<r;)for(var s=t[i],u=-1;++u<r;)u!=i&&(o[i]=lr(o[i]||s,t[u],n,e));return hi(_r(o,1),n,e)}function gi(t,n,e){for(var i=-1,o=t.length,s=n.length,u={};++i<o;){var a=i<s?n[i]:r;e(u,t[i],a)}return u}function _i(t){return Hs(t)?t:[]}function mi(t){return"function"==typeof t?t:sa}function yi(t,n){return Xs(t)?t:bo(t,n)?[t]:Fo(bu(t))}var wi=Hr;function bi(t,n,e){var i=t.length;return e=e===r?i:e,!n&&e>=i?t:ri(t,n,e)}var xi=hn||function(t){return vn.clearTimeout(t)};function Ei(t,n){if(n)return t.slice();var e=t.length,r=Vt?Vt(e):new t.constructor(e);return t.copy(r),r}function Ai(t){var n=new t.constructor(t.byteLength);return new Yt(n).set(new Yt(t)),n}function ji(t,n){var e=n?Ai(t.buffer):t.buffer;return new t.constructor(e,t.byteOffset,t.length)}function Oi(t,n){if(t!==n){var e=t!==r,i=null===t,o=t==t,s=lu(t),u=n!==r,a=null===n,c=n==n,h=lu(n);if(!a&&!h&&!s&&t>n||s&&u&&c&&!a&&!h||i&&u&&c||!e&&c||!o)return 1;if(!i&&!s&&!h&&t<n||h&&e&&o&&!i&&!s||a&&e&&o||!u&&o||!c)return-1}return 0}function Mi(t,n,e,r){for(var i=-1,o=t.length,s=e.length,u=-1,a=n.length,c=me(o-s,0),h=st(a+c),l=!r;++u<a;)h[u]=n[u];for(;++i<s;)(l||i<o)&&(h[e[i]]=t[i]);for(;c--;)h[u++]=t[i++];return h}function ki(t,n,e,r){for(var i=-1,o=t.length,s=-1,u=e.length,a=-1,c=n.length,h=me(o-u,0),l=st(h+c),f=!r;++i<h;)l[i]=t[i];for(var p=i;++a<c;)l[p+a]=n[a];for(;++s<u;)(f||i<o)&&(l[p+e[s]]=t[i++]);return l}function Si(t,n){var e=-1,r=t.length;for(n||(n=st(r));++e<r;)n[e]=t[e];return n}function Ci(t,n,e,i){var o=!e;e||(e={});for(var s=-1,u=n.length;++s<u;){var a=n[s],c=i?i(e[a],t[a],a,e,t):r;c===r&&(c=t[a]),o?or(e,a,c):nr(e,a,c)}return e}function Ti(t,n){return function(e,r){var i=Xs(e)?kn:rr,o=n?n():{};return i(e,t,ao(r,2),o)}}function Ii(t){return Hr((function(n,e){var i=-1,o=e.length,s=o>1?e[o-1]:r,u=o>2?e[2]:r;for(s=t.length>3&&"function"==typeof s?(o--,s):r,u&&wo(e[0],e[1],u)&&(s=o<3?r:s,o=1),n=Mt(n);++i<o;){var a=e[i];a&&t(n,a,i,s)}return n}))}function Ni(t,n){return function(e,r){if(null==e)return e;if(!Zs(e))return t(e,r);for(var i=e.length,o=n?i:-1,s=Mt(e);(n?o--:++o<i)&&!1!==r(s[o],o,s););return e}}function zi(t){return function(n,e,r){for(var i=-1,o=Mt(n),s=r(n),u=s.length;u--;){var a=s[t?u:++i];if(!1===e(o[a],a,o))break}return n}}function Ri(t){return function(n){var e=ue(n=bu(n))?pe(n):r,i=e?e[0]:n.charAt(0),o=e?bi(e,1).join(""):n.slice(1);return i[t]()+o}}function Li(t){return function(n){return Dn(ta(Vu(n).replace(Kt,"")),t,"")}}function Di(t){return function(){var n=arguments;switch(n.length){case 0:return new t;case 1:return new t(n[0]);case 2:return new t(n[0],n[1]);case 3:return new t(n[0],n[1],n[2]);case 4:return new t(n[0],n[1],n[2],n[3]);case 5:return new t(n[0],n[1],n[2],n[3],n[4]);case 6:return new t(n[0],n[1],n[2],n[3],n[4],n[5]);case 7:return new t(n[0],n[1],n[2],n[3],n[4],n[5],n[6])}var e=Be(t.prototype),r=t.apply(e,n);return ru(r)?r:e}}function Pi(t){return function(n,e,i){var o=Mt(n);if(!Zs(n)){var s=ao(e,3);n=zu(n),e=function(t){return s(o[t],t,o)}}var u=t(n,e,i);return u>-1?o[s?n[u]:u]:r}}function Fi(t){return eo((function(n){var e=n.length,o=e,s=Ue.prototype.thru;for(t&&n.reverse();o--;){var u=n[o];if("function"!=typeof u)throw new Ct(i);if(s&&!a&&"wrapper"==so(u))var a=new Ue([],!0)}for(o=a?o:e;++o<e;){var c=so(u=n[o]),h="wrapper"==c?oo(u):r;a=h&&xo(h[0])&&424==h[1]&&!h[4].length&&1==h[9]?a[so(h[0])].apply(a,h[3]):1==u.length&&xo(u)?a[c]():a.thru(u)}return function(){var t=arguments,r=t[0];if(a&&1==t.length&&Xs(r))return a.plant(r).value();for(var i=0,o=e?n[i].apply(this,t):r;++i<e;)o=n[i].call(this,o);return o}}))}function $i(t,n,e,i,o,s,u,a,c,l){var f=n&h,p=1&n,d=2&n,v=24&n,g=512&n,_=d?r:Di(t);return function h(){for(var m=arguments.length,y=st(m),w=m;w--;)y[w]=arguments[w];if(v)var b=uo(h),x=function(t,n){for(var e=t.length,r=0;e--;)t[e]===n&&++r;return r}(y,b);if(i&&(y=Mi(y,i,o,v)),s&&(y=ki(y,s,u,v)),m-=x,v&&m<l){var E=he(y,b);return Xi(t,n,$i,h.placeholder,e,y,E,a,c,l-m)}var A=p?e:this,j=d?A[t]:t;return m=y.length,a?y=function(t,n){var e=t.length,i=ye(n.length,e),o=Si(t);for(;i--;){var s=n[i];t[i]=yo(s,e)?o[s]:r}return t}(y,a):g&&m>1&&y.reverse(),f&&c<m&&(y.length=c),this&&this!==vn&&this instanceof h&&(j=_||Di(j)),j.apply(A,y)}}function Bi(t,n){return function(e,r){return function(t,n,e,r){return wr(t,(function(t,i,o){n(r,e(t),i,o)})),r}(e,t,n(r),{})}}function qi(t,n){return function(e,i){var o;if(e===r&&i===r)return n;if(e!==r&&(o=e),i!==r){if(o===r)return i;"string"==typeof e||"string"==typeof i?(e=ci(e),i=ci(i)):(e=ai(e),i=ai(i)),o=t(e,i)}return o}}function Ui(t){return eo((function(n){return n=Rn(n,Kn(ao())),Hr((function(e){var r=this;return t(n,(function(t){return Mn(t,r,e)}))}))}))}function Wi(t,n){var e=(n=n===r?" ":ci(n)).length;if(e<2)return e?Zr(n,t):n;var i=Zr(n,gn(t/fe(n)));return ue(n)?bi(pe(i),0,t).join(""):i.slice(0,t)}function Yi(t){return function(n,e,i){return i&&"number"!=typeof i&&wo(n,e,i)&&(e=i=r),n=gu(n),e===r?(e=n,n=0):e=gu(e),function(t,n,e,r){for(var i=-1,o=me(gn((n-t)/(e||1)),0),s=st(o);o--;)s[r?o:++i]=t,t+=e;return s}(n,e,i=i===r?n<e?1:-1:gu(i),t)}}function Vi(t){return function(n,e){return"string"==typeof n&&"string"==typeof e||(n=yu(n),e=yu(e)),t(n,e)}}function Xi(t,n,e,i,o,s,u,h,l,f){var p=8&n;n|=p?a:c,4&(n&=~(p?c:a))||(n&=-4);var d=[t,n,o,p?s:r,p?u:r,p?r:s,p?r:u,h,l,f],v=e.apply(r,d);return xo(t)&&Co(v,d),v.placeholder=i,No(v,t,n)}function Gi(t){var n=Ot[t];return function(t,e){if(t=yu(t),(e=null==e?0:ye(_u(e),292))&&$n(t)){var r=(bu(t)+"e").split("e");return+((r=(bu(n(r[0]+"e"+(+r[1]+e)))+"e").split("e"))[0]+"e"+(+r[1]-e))}return n(t)}}var Zi=Me&&1/le(new Me([,-0]))[1]==f?function(t){return new Me(t)}:la;function Hi(t){return function(n){var e=vo(n);return e==A?ae(n):e==S?function(t){var n=-1,e=Array(t.size);return t.forEach((function(t){e[++n]=[t,t]})),e}(n):function(t,n){return Rn(n,(function(n){return[n,t[n]]}))}(n,t(n))}}function Qi(t,n,e,o,f,p,d,v){var g=2&n;if(!g&&"function"!=typeof t)throw new Ct(i);var _=o?o.length:0;if(_||(n&=-97,o=f=r),d=d===r?d:me(_u(d),0),v=v===r?v:_u(v),_-=f?f.length:0,n&c){var m=o,y=f;o=f=r}var w=g?r:oo(t),b=[t,n,e,o,f,m,y,p,d,v];if(w&&function(t,n){var e=t[1],r=n[1],i=e|r,o=i<131,u=r==h&&8==e||r==h&&e==l&&t[7].length<=n[8]||384==r&&n[7].length<=n[8]&&8==e;if(!o&&!u)return t;1&r&&(t[2]=n[2],i|=1&e?0:4);var a=n[3];if(a){var c=t[3];t[3]=c?Mi(c,a,n[4]):a,t[4]=c?he(t[3],s):n[4]}(a=n[5])&&(c=t[5],t[5]=c?ki(c,a,n[6]):a,t[6]=c?he(t[5],s):n[6]);(a=n[7])&&(t[7]=a);r&h&&(t[8]=null==t[8]?n[8]:ye(t[8],n[8]));null==t[9]&&(t[9]=n[9]);t[0]=n[0],t[1]=i}(b,w),t=b[0],n=b[1],e=b[2],o=b[3],f=b[4],!(v=b[9]=b[9]===r?g?0:t.length:me(b[9]-_,0))&&24&n&&(n&=-25),n&&1!=n)x=8==n||n==u?function(t,n,e){var i=Di(t);return function o(){for(var s=arguments.length,u=st(s),a=s,c=uo(o);a--;)u[a]=arguments[a];var h=s<3&&u[0]!==c&&u[s-1]!==c?[]:he(u,c);return(s-=h.length)<e?Xi(t,n,$i,o.placeholder,r,u,h,r,r,e-s):Mn(this&&this!==vn&&this instanceof o?i:t,this,u)}}(t,n,v):n!=a&&33!=n||f.length?$i.apply(r,b):function(t,n,e,r){var i=1&n,o=Di(t);return function n(){for(var s=-1,u=arguments.length,a=-1,c=r.length,h=st(c+u),l=this&&this!==vn&&this instanceof n?o:t;++a<c;)h[a]=r[a];for(;u--;)h[a++]=arguments[++s];return Mn(l,i?e:this,h)}}(t,n,e,o);else var x=function(t,n,e){var r=1&n,i=Di(t);return function n(){return(this&&this!==vn&&this instanceof n?i:t).apply(r?e:this,arguments)}}(t,n,e);return No((w?ti:Co)(x,b),t,n)}function Ji(t,n,e,i){return t===r||Us(t,Nt[e])&&!Lt.call(i,e)?n:t}function Ki(t,n,e,i,o,s){return ru(t)&&ru(n)&&(s.set(n,t),qr(t,n,r,Ki,s),s.delete(n)),t}function to(t){return uu(t)?r:t}function no(t,n,e,i,o,s){var u=1&e,a=t.length,c=n.length;if(a!=c&&!(u&&c>a))return!1;var h=s.get(t),l=s.get(n);if(h&&l)return h==n&&l==t;var f=-1,p=!0,d=2&e?new Ge:r;for(s.set(t,n),s.set(n,t);++f<a;){var v=t[f],g=n[f];if(i)var _=u?i(g,v,f,n,t,s):i(v,g,f,t,n,s);if(_!==r){if(_)continue;p=!1;break}if(d){if(!Fn(n,(function(t,n){if(!ne(d,n)&&(v===t||o(v,t,e,i,s)))return d.push(n)}))){p=!1;break}}else if(v!==g&&!o(v,g,e,i,s)){p=!1;break}}return s.delete(t),s.delete(n),p}function eo(t){return Io(Mo(t,r,Go),t+"")}function ro(t){return Ar(t,zu,fo)}function io(t){return Ar(t,Ru,po)}var oo=Ce?function(t){return Ce.get(t)}:la;function so(t){for(var n=t.name+"",e=Te[n],r=Lt.call(Te,n)?e.length:0;r--;){var i=e[r],o=i.func;if(null==o||o==t)return i.name}return n}function uo(t){return(Lt.call($e,"placeholder")?$e:t).placeholder}function ao(){var t=$e.iteratee||ua;return t=t===ua?Rr:t,arguments.length?t(arguments[0],arguments[1]):t}function co(t,n){var e,r,i=t.__data__;return("string"==(r=typeof(e=n))||"number"==r||"symbol"==r||"boolean"==r?"__proto__"!==e:null===e)?i["string"==typeof n?"string":"hash"]:i.map}function ho(t){for(var n=zu(t),e=n.length;e--;){var r=n[e],i=t[r];n[e]=[r,i,jo(i)]}return n}function lo(t,n){var e=function(t,n){return null==t?r:t[n]}(t,n);return zr(e)?e:r}var fo=yn?function(t){return null==t?[]:(t=Mt(t),In(yn(t),(function(n){return Zt.call(t,n)})))}:ma,po=yn?function(t){for(var n=[];t;)Ln(n,fo(t)),t=Xt(t);return n}:ma,vo=jr;function go(t,n,e){for(var r=-1,i=(n=yi(n,t)).length,o=!1;++r<i;){var s=$o(n[r]);if(!(o=null!=t&&e(t,s)))break;t=t[s]}return o||++r!=i?o:!!(i=null==t?0:t.length)&&eu(i)&&yo(s,i)&&(Xs(t)||Vs(t))}function _o(t){return"function"!=typeof t.constructor||Ao(t)?{}:Be(Xt(t))}function mo(t){return Xs(t)||Vs(t)||!!(Qt&&t&&t[Qt])}function yo(t,n){var e=typeof t;return!!(n=null==n?p:n)&&("number"==e||"symbol"!=e&&yt.test(t))&&t>-1&&t%1==0&&t<n}function wo(t,n,e){if(!ru(e))return!1;var r=typeof n;return!!("number"==r?Zs(e)&&yo(n,e.length):"string"==r&&n in e)&&Us(e[n],t)}function bo(t,n){if(Xs(t))return!1;var e=typeof t;return!("number"!=e&&"symbol"!=e&&"boolean"!=e&&null!=t&&!lu(t))||(nt.test(t)||!tt.test(t)||null!=n&&t in Mt(n))}function xo(t){var n=so(t),e=$e[n];if("function"!=typeof e||!(n in We.prototype))return!1;if(t===e)return!0;var r=oo(e);return!!r&&t===r[0]}(Ae&&vo(new Ae(new ArrayBuffer(1)))!=z||je&&vo(new je)!=A||Oe&&vo(Oe.resolve())!=M||Me&&vo(new Me)!=S||ke&&vo(new ke)!=I)&&(vo=function(t){var n=jr(t),e=n==O?t.constructor:r,i=e?Bo(e):"";if(i)switch(i){case Ie:return z;case Ne:return A;case ze:return M;case Re:return S;case Le:return I}return n});var Eo=zt?tu:ya;function Ao(t){var n=t&&t.constructor;return t===("function"==typeof n&&n.prototype||Nt)}function jo(t){return t==t&&!ru(t)}function Oo(t,n){return function(e){return null!=e&&(e[t]===n&&(n!==r||t in Mt(e)))}}function Mo(t,n,e){return n=me(n===r?t.length-1:n,0),function(){for(var r=arguments,i=-1,o=me(r.length-n,0),s=st(o);++i<o;)s[i]=r[n+i];i=-1;for(var u=st(n+1);++i<n;)u[i]=r[i];return u[n]=e(s),Mn(t,this,u)}}function ko(t,n){return n.length<2?t:Er(t,ri(n,0,-1))}function So(t,n){if(("constructor"!==n||"function"!=typeof t[n])&&"__proto__"!=n)return t[n]}var Co=zo(ti),To=dn||function(t,n){return vn.setTimeout(t,n)},Io=zo(ni);function No(t,n,e){var r=n+"";return Io(t,function(t,n){var e=n.length;if(!e)return t;var r=e-1;return n[r]=(e>1?"& ":"")+n[r],n=n.join(e>2?", ":" "),t.replace(ut,"{\n/* [wrapped with "+n+"] */\n")}(r,function(t,n){return Sn(g,(function(e){var r="_."+e[0];n&e[1]&&!Nn(t,r)&&t.push(r)})),t.sort()}(function(t){var n=t.match(at);return n?n[1].split(ct):[]}(r),e)))}function zo(t){var n=0,e=0;return function(){var i=we(),o=16-(i-e);if(e=i,o>0){if(++n>=800)return arguments[0]}else n=0;return t.apply(r,arguments)}}function Ro(t,n){var e=-1,i=t.length,o=i-1;for(n=n===r?i:n;++e<n;){var s=Gr(e,o),u=t[s];t[s]=t[e],t[e]=u}return t.length=n,t}var Lo,Do,Po,Fo=(Lo=function(t){var n=[];return 46===t.charCodeAt(0)&&n.push(""),t.replace(et,(function(t,e,r,i){n.push(r?i.replace(ft,"$1"):e||t)})),n},Do=Ds(Lo,(function(t){return 500===Po.size&&Po.clear(),t})),Po=Do.cache,Do);function $o(t){if("string"==typeof t||lu(t))return t;var n=t+"";return"0"==n&&1/t==-1/0?"-0":n}function Bo(t){if(null!=t){try{return Rt.call(t)}catch(n){}try{return t+""}catch(n){}}return""}function qo(t){if(t instanceof We)return t.clone();var n=new Ue(t.__wrapped__,t.__chain__);return n.__actions__=Si(t.__actions__),n.__index__=t.__index__,n.__values__=t.__values__,n}var Uo=Hr((function(t,n){return Hs(t)?lr(t,_r(n,1,Hs,!0)):[]})),Wo=Hr((function(t,n){var e=Ko(n);return Hs(e)&&(e=r),Hs(t)?lr(t,_r(n,1,Hs,!0),ao(e,2)):[]})),Yo=Hr((function(t,n){var e=Ko(n);return Hs(e)&&(e=r),Hs(t)?lr(t,_r(n,1,Hs,!0),r,e):[]}));function Vo(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var i=null==e?0:_u(e);return i<0&&(i=me(r+i,0)),qn(t,ao(n,3),i)}function Xo(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var o=i-1;return e!==r&&(o=_u(e),o=e<0?me(i+o,0):ye(o,i-1)),qn(t,ao(n,3),o,!0)}function Go(t){return(null==t?0:t.length)?_r(t,1):[]}function Zo(t){return t&&t.length?t[0]:r}var Ho=Hr((function(t){var n=Rn(t,_i);return n.length&&n[0]===t[0]?Sr(n):[]})),Qo=Hr((function(t){var n=Ko(t),e=Rn(t,_i);return n===Ko(e)?n=r:e.pop(),e.length&&e[0]===t[0]?Sr(e,ao(n,2)):[]})),Jo=Hr((function(t){var n=Ko(t),e=Rn(t,_i);return(n="function"==typeof n?n:r)&&e.pop(),e.length&&e[0]===t[0]?Sr(e,r,n):[]}));function Ko(t){var n=null==t?0:t.length;return n?t[n-1]:r}var ts=Hr(ns);function ns(t,n){return t&&t.length&&n&&n.length?Vr(t,n):t}var es=eo((function(t,n){var e=null==t?0:t.length,r=sr(t,n);return Xr(t,Rn(n,(function(t){return yo(t,e)?+t:t})).sort(Oi)),r}));function rs(t){return null==t?t:Ee.call(t)}var is=Hr((function(t){return hi(_r(t,1,Hs,!0))})),os=Hr((function(t){var n=Ko(t);return Hs(n)&&(n=r),hi(_r(t,1,Hs,!0),ao(n,2))})),ss=Hr((function(t){var n=Ko(t);return n="function"==typeof n?n:r,hi(_r(t,1,Hs,!0),r,n)}));function us(t){if(!t||!t.length)return[];var n=0;return t=In(t,(function(t){if(Hs(t))return n=me(t.length,n),!0})),Qn(n,(function(n){return Rn(t,Xn(n))}))}function as(t,n){if(!t||!t.length)return[];var e=us(t);return null==n?e:Rn(e,(function(t){return Mn(n,r,t)}))}var cs=Hr((function(t,n){return Hs(t)?lr(t,n):[]})),hs=Hr((function(t){return vi(In(t,Hs))})),ls=Hr((function(t){var n=Ko(t);return Hs(n)&&(n=r),vi(In(t,Hs),ao(n,2))})),fs=Hr((function(t){var n=Ko(t);return n="function"==typeof n?n:r,vi(In(t,Hs),r,n)})),ps=Hr(us);var ds=Hr((function(t){var n=t.length,e=n>1?t[n-1]:r;return e="function"==typeof e?(t.pop(),e):r,as(t,e)}));function vs(t){var n=$e(t);return n.__chain__=!0,n}function gs(t,n){return n(t)}var _s=eo((function(t){var n=t.length,e=n?t[0]:0,i=this.__wrapped__,o=function(n){return sr(n,t)};return!(n>1||this.__actions__.length)&&i instanceof We&&yo(e)?((i=i.slice(e,+e+(n?1:0))).__actions__.push({func:gs,args:[o],thisArg:r}),new Ue(i,this.__chain__).thru((function(t){return n&&!t.length&&t.push(r),t}))):this.thru(o)}));var ms=Ti((function(t,n,e){Lt.call(t,e)?++t[e]:or(t,e,1)}));var ys=Pi(Vo),ws=Pi(Xo);function bs(t,n){return(Xs(t)?Sn:fr)(t,ao(n,3))}function xs(t,n){return(Xs(t)?Cn:pr)(t,ao(n,3))}var Es=Ti((function(t,n,e){Lt.call(t,e)?t[e].push(n):or(t,e,[n])}));var As=Hr((function(t,n,e){var r=-1,i="function"==typeof n,o=Zs(t)?st(t.length):[];return fr(t,(function(t){o[++r]=i?Mn(n,t,e):Cr(t,n,e)})),o})),js=Ti((function(t,n,e){or(t,e,n)}));function Os(t,n){return(Xs(t)?Rn:Fr)(t,ao(n,3))}var Ms=Ti((function(t,n,e){t[e?0:1].push(n)}),(function(){return[[],[]]}));var ks=Hr((function(t,n){if(null==t)return[];var e=n.length;return e>1&&wo(t,n[0],n[1])?n=[]:e>2&&wo(n[0],n[1],n[2])&&(n=[n[0]]),Wr(t,_r(n,1),[])})),Ss=pn||function(){return vn.Date.now()};function Cs(t,n,e){return n=e?r:n,n=t&&null==n?t.length:n,Qi(t,h,r,r,r,r,n)}function Ts(t,n){var e;if("function"!=typeof n)throw new Ct(i);return t=_u(t),function(){return--t>0&&(e=n.apply(this,arguments)),t<=1&&(n=r),e}}var Is=Hr((function(t,n,e){var r=1;if(e.length){var i=he(e,uo(Is));r|=a}return Qi(t,r,n,e,i)})),Ns=Hr((function(t,n,e){var r=3;if(e.length){var i=he(e,uo(Ns));r|=a}return Qi(n,r,t,e,i)}));function zs(t,n,e){var o,s,u,a,c,h,l=0,f=!1,p=!1,d=!0;if("function"!=typeof t)throw new Ct(i);function v(n){var e=o,i=s;return o=s=r,l=n,a=t.apply(i,e)}function g(t){var e=t-h;return h===r||e>=n||e<0||p&&t-l>=u}function _(){var t=Ss();if(g(t))return m(t);c=To(_,function(t){var e=n-(t-h);return p?ye(e,u-(t-l)):e}(t))}function m(t){return c=r,d&&o?v(t):(o=s=r,a)}function y(){var t=Ss(),e=g(t);if(o=arguments,s=this,h=t,e){if(c===r)return function(t){return l=t,c=To(_,n),f?v(t):a}(h);if(p)return xi(c),c=To(_,n),v(h)}return c===r&&(c=To(_,n)),a}return n=yu(n)||0,ru(e)&&(f=!!e.leading,u=(p="maxWait"in e)?me(yu(e.maxWait)||0,n):u,d="trailing"in e?!!e.trailing:d),y.cancel=function(){c!==r&&xi(c),l=0,o=h=s=c=r},y.flush=function(){return c===r?a:m(Ss())},y}var Rs=Hr((function(t,n){return hr(t,1,n)})),Ls=Hr((function(t,n,e){return hr(t,yu(n)||0,e)}));function Ds(t,n){if("function"!=typeof t||null!=n&&"function"!=typeof n)throw new Ct(i);var e=function(){var r=arguments,i=n?n.apply(this,r):r[0],o=e.cache;if(o.has(i))return o.get(i);var s=t.apply(this,r);return e.cache=o.set(i,s)||o,s};return e.cache=new(Ds.Cache||Xe),e}function Ps(t){if("function"!=typeof t)throw new Ct(i);return function(){var n=arguments;switch(n.length){case 0:return!t.call(this);case 1:return!t.call(this,n[0]);case 2:return!t.call(this,n[0],n[1]);case 3:return!t.call(this,n[0],n[1],n[2])}return!t.apply(this,n)}}Ds.Cache=Xe;var Fs=wi((function(t,n){var e=(n=1==n.length&&Xs(n[0])?Rn(n[0],Kn(ao())):Rn(_r(n,1),Kn(ao()))).length;return Hr((function(r){for(var i=-1,o=ye(r.length,e);++i<o;)r[i]=n[i].call(this,r[i]);return Mn(t,this,r)}))})),$s=Hr((function(t,n){var e=he(n,uo($s));return Qi(t,a,r,n,e)})),Bs=Hr((function(t,n){var e=he(n,uo(Bs));return Qi(t,c,r,n,e)})),qs=eo((function(t,n){return Qi(t,l,r,r,r,n)}));function Us(t,n){return t===n||t!=t&&n!=n}var Ws=Vi(Or),Ys=Vi((function(t,n){return t>=n})),Vs=Tr(function(){return arguments}())?Tr:function(t){return iu(t)&&Lt.call(t,"callee")&&!Zt.call(t,"callee")},Xs=st.isArray,Gs=bn?Kn(bn):function(t){return iu(t)&&jr(t)==N};function Zs(t){return null!=t&&eu(t.length)&&!tu(t)}function Hs(t){return iu(t)&&Zs(t)}var Qs=wn||ya,Js=xn?Kn(xn):function(t){return iu(t)&&jr(t)==w};function Ks(t){if(!iu(t))return!1;var n=jr(t);return n==b||"[object DOMException]"==n||"string"==typeof t.message&&"string"==typeof t.name&&!uu(t)}function tu(t){if(!ru(t))return!1;var n=jr(t);return n==x||n==E||"[object AsyncFunction]"==n||"[object Proxy]"==n}function nu(t){return"number"==typeof t&&t==_u(t)}function eu(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=p}function ru(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}function iu(t){return null!=t&&"object"==typeof t}var ou=En?Kn(En):function(t){return iu(t)&&vo(t)==A};function su(t){return"number"==typeof t||iu(t)&&jr(t)==j}function uu(t){if(!iu(t)||jr(t)!=O)return!1;var n=Xt(t);if(null===n)return!0;var e=Lt.call(n,"constructor")&&n.constructor;return"function"==typeof e&&e instanceof e&&Rt.call(e)==$t}var au=An?Kn(An):function(t){return iu(t)&&jr(t)==k};var cu=jn?Kn(jn):function(t){return iu(t)&&vo(t)==S};function hu(t){return"string"==typeof t||!Xs(t)&&iu(t)&&jr(t)==C}function lu(t){return"symbol"==typeof t||iu(t)&&jr(t)==T}var fu=On?Kn(On):function(t){return iu(t)&&eu(t.length)&&!!an[jr(t)]};var pu=Vi(Pr),du=Vi((function(t,n){return t<=n}));function vu(t){if(!t)return[];if(Zs(t))return hu(t)?pe(t):Si(t);if(Jt&&t[Jt])return function(t){for(var n,e=[];!(n=t.next()).done;)e.push(n.value);return e}(t[Jt]());var n=vo(t);return(n==A?ae:n==S?le:Uu)(t)}function gu(t){return t?(t=yu(t))===f||t===-1/0?17976931348623157e292*(t<0?-1:1):t==t?t:0:0===t?t:0}function _u(t){var n=gu(t),e=n%1;return n==n?e?n-e:n:0}function mu(t){return t?ur(_u(t),0,v):0}function yu(t){if("number"==typeof t)return t;if(lu(t))return d;if(ru(t)){var n="function"==typeof t.valueOf?t.valueOf():t;t=ru(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=Jn(t);var e=gt.test(t);return e||mt.test(t)?fn(t.slice(2),e?2:8):vt.test(t)?d:+t}function wu(t){return Ci(t,Ru(t))}function bu(t){return null==t?"":ci(t)}var xu=Ii((function(t,n){if(Ao(n)||Zs(n))Ci(n,zu(n),t);else for(var e in n)Lt.call(n,e)&&nr(t,e,n[e])})),Eu=Ii((function(t,n){Ci(n,Ru(n),t)})),Au=Ii((function(t,n,e,r){Ci(n,Ru(n),t,r)})),ju=Ii((function(t,n,e,r){Ci(n,zu(n),t,r)})),Ou=eo(sr);var Mu=Hr((function(t,n){t=Mt(t);var e=-1,i=n.length,o=i>2?n[2]:r;for(o&&wo(n[0],n[1],o)&&(i=1);++e<i;)for(var s=n[e],u=Ru(s),a=-1,c=u.length;++a<c;){var h=u[a],l=t[h];(l===r||Us(l,Nt[h])&&!Lt.call(t,h))&&(t[h]=s[h])}return t})),ku=Hr((function(t){return t.push(r,Ki),Mn(Du,r,t)}));function Su(t,n,e){var i=null==t?r:Er(t,n);return i===r?e:i}function Cu(t,n){return null!=t&&go(t,n,kr)}var Tu=Bi((function(t,n,e){null!=n&&"function"!=typeof n.toString&&(n=Ft.call(n)),t[n]=e}),ra(sa)),Iu=Bi((function(t,n,e){null!=n&&"function"!=typeof n.toString&&(n=Ft.call(n)),Lt.call(t,n)?t[n].push(e):t[n]=[e]}),ao),Nu=Hr(Cr);function zu(t){return Zs(t)?He(t):Lr(t)}function Ru(t){return Zs(t)?He(t,!0):Dr(t)}var Lu=Ii((function(t,n,e){qr(t,n,e)})),Du=Ii((function(t,n,e,r){qr(t,n,e,r)})),Pu=eo((function(t,n){var e={};if(null==t)return e;var r=!1;n=Rn(n,(function(n){return n=yi(n,t),r||(r=n.length>1),n})),Ci(t,io(t),e),r&&(e=ar(e,7,to));for(var i=n.length;i--;)li(e,n[i]);return e}));var Fu=eo((function(t,n){return null==t?{}:function(t,n){return Yr(t,n,(function(n,e){return Cu(t,e)}))}(t,n)}));function $u(t,n){if(null==t)return{};var e=Rn(io(t),(function(t){return[t]}));return n=ao(n),Yr(t,e,(function(t,e){return n(t,e[0])}))}var Bu=Hi(zu),qu=Hi(Ru);function Uu(t){return null==t?[]:te(t,zu(t))}var Wu=Li((function(t,n,e){return n=n.toLowerCase(),t+(e?Yu(n):n)}));function Yu(t){return Ku(bu(t).toLowerCase())}function Vu(t){return(t=bu(t))&&t.replace(wt,ie).replace(tn,"")}var Xu=Li((function(t,n,e){return t+(e?"-":"")+n.toLowerCase()})),Gu=Li((function(t,n,e){return t+(e?" ":"")+n.toLowerCase()})),Zu=Ri("toLowerCase");var Hu=Li((function(t,n,e){return t+(e?"_":"")+n.toLowerCase()}));var Qu=Li((function(t,n,e){return t+(e?" ":"")+Ku(n)}));var Ju=Li((function(t,n,e){return t+(e?" ":"")+n.toUpperCase()})),Ku=Ri("toUpperCase");function ta(t,n,e){return t=bu(t),(n=e?r:n)===r?function(t){return on.test(t)}(t)?function(t){return t.match(en)||[]}(t):function(t){return t.match(ht)||[]}(t):t.match(n)||[]}var na=Hr((function(t,n){try{return Mn(t,r,n)}catch(e){return Ks(e)?e:new At(e)}})),ea=eo((function(t,n){return Sn(n,(function(n){n=$o(n),or(t,n,Is(t[n],t))})),t}));function ra(t){return function(){return t}}var ia=Fi(),oa=Fi(!0);function sa(t){return t}function ua(t){return Rr("function"==typeof t?t:ar(t,1))}var aa=Hr((function(t,n){return function(e){return Cr(e,t,n)}})),ca=Hr((function(t,n){return function(e){return Cr(t,e,n)}}));function ha(t,n,e){var r=zu(n),i=xr(n,r);null!=e||ru(n)&&(i.length||!r.length)||(e=n,n=t,t=this,i=xr(n,zu(n)));var o=!(ru(e)&&"chain"in e&&!e.chain),s=tu(t);return Sn(i,(function(e){var r=n[e];t[e]=r,s&&(t.prototype[e]=function(){var n=this.__chain__;if(o||n){var e=t(this.__wrapped__);return(e.__actions__=Si(this.__actions__)).push({func:r,args:arguments,thisArg:t}),e.__chain__=n,e}return r.apply(t,Ln([this.value()],arguments))})})),t}function la(){}var fa=Ui(Rn),pa=Ui(Tn),da=Ui(Fn);function va(t){return bo(t)?Xn($o(t)):function(t){return function(n){return Er(n,t)}}(t)}var ga=Yi(),_a=Yi(!0);function ma(){return[]}function ya(){return!1}var wa=qi((function(t,n){return t+n}),0),ba=Gi("ceil"),xa=qi((function(t,n){return t/n}),1),Ea=Gi("floor");var Aa,ja=qi((function(t,n){return t*n}),1),Oa=Gi("round"),Ma=qi((function(t,n){return t-n}),0);return $e.after=function(t,n){if("function"!=typeof n)throw new Ct(i);return t=_u(t),function(){if(--t<1)return n.apply(this,arguments)}},$e.ary=Cs,$e.assign=xu,$e.assignIn=Eu,$e.assignInWith=Au,$e.assignWith=ju,$e.at=Ou,$e.before=Ts,$e.bind=Is,$e.bindAll=ea,$e.bindKey=Ns,$e.castArray=function(){if(!arguments.length)return[];var t=arguments[0];return Xs(t)?t:[t]},$e.chain=vs,$e.chunk=function(t,n,e){n=(e?wo(t,n,e):n===r)?1:me(_u(n),0);var i=null==t?0:t.length;if(!i||n<1)return[];for(var o=0,s=0,u=st(gn(i/n));o<i;)u[s++]=ri(t,o,o+=n);return u},$e.compact=function(t){for(var n=-1,e=null==t?0:t.length,r=0,i=[];++n<e;){var o=t[n];o&&(i[r++]=o)}return i},$e.concat=function(){var t=arguments.length;if(!t)return[];for(var n=st(t-1),e=arguments[0],r=t;r--;)n[r-1]=arguments[r];return Ln(Xs(e)?Si(e):[e],_r(n,1))},$e.cond=function(t){var n=null==t?0:t.length,e=ao();return t=n?Rn(t,(function(t){if("function"!=typeof t[1])throw new Ct(i);return[e(t[0]),t[1]]})):[],Hr((function(e){for(var r=-1;++r<n;){var i=t[r];if(Mn(i[0],this,e))return Mn(i[1],this,e)}}))},$e.conforms=function(t){return function(t){var n=zu(t);return function(e){return cr(e,t,n)}}(ar(t,1))},$e.constant=ra,$e.countBy=ms,$e.create=function(t,n){var e=Be(t);return null==n?e:ir(e,n)},$e.curry=function t(n,e,i){var o=Qi(n,8,r,r,r,r,r,e=i?r:e);return o.placeholder=t.placeholder,o},$e.curryRight=function t(n,e,i){var o=Qi(n,u,r,r,r,r,r,e=i?r:e);return o.placeholder=t.placeholder,o},$e.debounce=zs,$e.defaults=Mu,$e.defaultsDeep=ku,$e.defer=Rs,$e.delay=Ls,$e.difference=Uo,$e.differenceBy=Wo,$e.differenceWith=Yo,$e.drop=function(t,n,e){var i=null==t?0:t.length;return i?ri(t,(n=e||n===r?1:_u(n))<0?0:n,i):[]},$e.dropRight=function(t,n,e){var i=null==t?0:t.length;return i?ri(t,0,(n=i-(n=e||n===r?1:_u(n)))<0?0:n):[]},$e.dropRightWhile=function(t,n){return t&&t.length?pi(t,ao(n,3),!0,!0):[]},$e.dropWhile=function(t,n){return t&&t.length?pi(t,ao(n,3),!0):[]},$e.fill=function(t,n,e,i){var o=null==t?0:t.length;return o?(e&&"number"!=typeof e&&wo(t,n,e)&&(e=0,i=o),function(t,n,e,i){var o=t.length;for((e=_u(e))<0&&(e=-e>o?0:o+e),(i=i===r||i>o?o:_u(i))<0&&(i+=o),i=e>i?0:mu(i);e<i;)t[e++]=n;return t}(t,n,e,i)):[]},$e.filter=function(t,n){return(Xs(t)?In:gr)(t,ao(n,3))},$e.flatMap=function(t,n){return _r(Os(t,n),1)},$e.flatMapDeep=function(t,n){return _r(Os(t,n),f)},$e.flatMapDepth=function(t,n,e){return e=e===r?1:_u(e),_r(Os(t,n),e)},$e.flatten=Go,$e.flattenDeep=function(t){return(null==t?0:t.length)?_r(t,f):[]},$e.flattenDepth=function(t,n){return(null==t?0:t.length)?_r(t,n=n===r?1:_u(n)):[]},$e.flip=function(t){return Qi(t,512)},$e.flow=ia,$e.flowRight=oa,$e.fromPairs=function(t){for(var n=-1,e=null==t?0:t.length,r={};++n<e;){var i=t[n];r[i[0]]=i[1]}return r},$e.functions=function(t){return null==t?[]:xr(t,zu(t))},$e.functionsIn=function(t){return null==t?[]:xr(t,Ru(t))},$e.groupBy=Es,$e.initial=function(t){return(null==t?0:t.length)?ri(t,0,-1):[]},$e.intersection=Ho,$e.intersectionBy=Qo,$e.intersectionWith=Jo,$e.invert=Tu,$e.invertBy=Iu,$e.invokeMap=As,$e.iteratee=ua,$e.keyBy=js,$e.keys=zu,$e.keysIn=Ru,$e.map=Os,$e.mapKeys=function(t,n){var e={};return n=ao(n,3),wr(t,(function(t,r,i){or(e,n(t,r,i),t)})),e},$e.mapValues=function(t,n){var e={};return n=ao(n,3),wr(t,(function(t,r,i){or(e,r,n(t,r,i))})),e},$e.matches=function(t){return $r(ar(t,1))},$e.matchesProperty=function(t,n){return Br(t,ar(n,1))},$e.memoize=Ds,$e.merge=Lu,$e.mergeWith=Du,$e.method=aa,$e.methodOf=ca,$e.mixin=ha,$e.negate=Ps,$e.nthArg=function(t){return t=_u(t),Hr((function(n){return Ur(n,t)}))},$e.omit=Pu,$e.omitBy=function(t,n){return $u(t,Ps(ao(n)))},$e.once=function(t){return Ts(2,t)},$e.orderBy=function(t,n,e,i){return null==t?[]:(Xs(n)||(n=null==n?[]:[n]),Xs(e=i?r:e)||(e=null==e?[]:[e]),Wr(t,n,e))},$e.over=fa,$e.overArgs=Fs,$e.overEvery=pa,$e.overSome=da,$e.partial=$s,$e.partialRight=Bs,$e.partition=Ms,$e.pick=Fu,$e.pickBy=$u,$e.property=va,$e.propertyOf=function(t){return function(n){return null==t?r:Er(t,n)}},$e.pull=ts,$e.pullAll=ns,$e.pullAllBy=function(t,n,e){return t&&t.length&&n&&n.length?Vr(t,n,ao(e,2)):t},$e.pullAllWith=function(t,n,e){return t&&t.length&&n&&n.length?Vr(t,n,r,e):t},$e.pullAt=es,$e.range=ga,$e.rangeRight=_a,$e.rearg=qs,$e.reject=function(t,n){return(Xs(t)?In:gr)(t,Ps(ao(n,3)))},$e.remove=function(t,n){var e=[];if(!t||!t.length)return e;var r=-1,i=[],o=t.length;for(n=ao(n,3);++r<o;){var s=t[r];n(s,r,t)&&(e.push(s),i.push(r))}return Xr(t,i),e},$e.rest=function(t,n){if("function"!=typeof t)throw new Ct(i);return Hr(t,n=n===r?n:_u(n))},$e.reverse=rs,$e.sampleSize=function(t,n,e){return n=(e?wo(t,n,e):n===r)?1:_u(n),(Xs(t)?Je:Jr)(t,n)},$e.set=function(t,n,e){return null==t?t:Kr(t,n,e)},$e.setWith=function(t,n,e,i){return i="function"==typeof i?i:r,null==t?t:Kr(t,n,e,i)},$e.shuffle=function(t){return(Xs(t)?Ke:ei)(t)},$e.slice=function(t,n,e){var i=null==t?0:t.length;return i?(e&&"number"!=typeof e&&wo(t,n,e)?(n=0,e=i):(n=null==n?0:_u(n),e=e===r?i:_u(e)),ri(t,n,e)):[]},$e.sortBy=ks,$e.sortedUniq=function(t){return t&&t.length?ui(t):[]},$e.sortedUniqBy=function(t,n){return t&&t.length?ui(t,ao(n,2)):[]},$e.split=function(t,n,e){return e&&"number"!=typeof e&&wo(t,n,e)&&(n=e=r),(e=e===r?v:e>>>0)?(t=bu(t))&&("string"==typeof n||null!=n&&!au(n))&&!(n=ci(n))&&ue(t)?bi(pe(t),0,e):t.split(n,e):[]},$e.spread=function(t,n){if("function"!=typeof t)throw new Ct(i);return n=null==n?0:me(_u(n),0),Hr((function(e){var r=e[n],i=bi(e,0,n);return r&&Ln(i,r),Mn(t,this,i)}))},$e.tail=function(t){var n=null==t?0:t.length;return n?ri(t,1,n):[]},$e.take=function(t,n,e){return t&&t.length?ri(t,0,(n=e||n===r?1:_u(n))<0?0:n):[]},$e.takeRight=function(t,n,e){var i=null==t?0:t.length;return i?ri(t,(n=i-(n=e||n===r?1:_u(n)))<0?0:n,i):[]},$e.takeRightWhile=function(t,n){return t&&t.length?pi(t,ao(n,3),!1,!0):[]},$e.takeWhile=function(t,n){return t&&t.length?pi(t,ao(n,3)):[]},$e.tap=function(t,n){return n(t),t},$e.throttle=function(t,n,e){var r=!0,o=!0;if("function"!=typeof t)throw new Ct(i);return ru(e)&&(r="leading"in e?!!e.leading:r,o="trailing"in e?!!e.trailing:o),zs(t,n,{leading:r,maxWait:n,trailing:o})},$e.thru=gs,$e.toArray=vu,$e.toPairs=Bu,$e.toPairsIn=qu,$e.toPath=function(t){return Xs(t)?Rn(t,$o):lu(t)?[t]:Si(Fo(bu(t)))},$e.toPlainObject=wu,$e.transform=function(t,n,e){var r=Xs(t),i=r||Qs(t)||fu(t);if(n=ao(n,4),null==e){var o=t&&t.constructor;e=i?r?new o:[]:ru(t)&&tu(o)?Be(Xt(t)):{}}return(i?Sn:wr)(t,(function(t,r,i){return n(e,t,r,i)})),e},$e.unary=function(t){return Cs(t,1)},$e.union=is,$e.unionBy=os,$e.unionWith=ss,$e.uniq=function(t){return t&&t.length?hi(t):[]},$e.uniqBy=function(t,n){return t&&t.length?hi(t,ao(n,2)):[]},$e.uniqWith=function(t,n){return n="function"==typeof n?n:r,t&&t.length?hi(t,r,n):[]},$e.unset=function(t,n){return null==t||li(t,n)},$e.unzip=us,$e.unzipWith=as,$e.update=function(t,n,e){return null==t?t:fi(t,n,mi(e))},$e.updateWith=function(t,n,e,i){return i="function"==typeof i?i:r,null==t?t:fi(t,n,mi(e),i)},$e.values=Uu,$e.valuesIn=function(t){return null==t?[]:te(t,Ru(t))},$e.without=cs,$e.words=ta,$e.wrap=function(t,n){return $s(mi(n),t)},$e.xor=hs,$e.xorBy=ls,$e.xorWith=fs,$e.zip=ps,$e.zipObject=function(t,n){return gi(t||[],n||[],nr)},$e.zipObjectDeep=function(t,n){return gi(t||[],n||[],Kr)},$e.zipWith=ds,$e.entries=Bu,$e.entriesIn=qu,$e.extend=Eu,$e.extendWith=Au,ha($e,$e),$e.add=wa,$e.attempt=na,$e.camelCase=Wu,$e.capitalize=Yu,$e.ceil=ba,$e.clamp=function(t,n,e){return e===r&&(e=n,n=r),e!==r&&(e=(e=yu(e))==e?e:0),n!==r&&(n=(n=yu(n))==n?n:0),ur(yu(t),n,e)},$e.clone=function(t){return ar(t,4)},$e.cloneDeep=function(t){return ar(t,5)},$e.cloneDeepWith=function(t,n){return ar(t,5,n="function"==typeof n?n:r)},$e.cloneWith=function(t,n){return ar(t,4,n="function"==typeof n?n:r)},$e.conformsTo=function(t,n){return null==n||cr(t,n,zu(n))},$e.deburr=Vu,$e.defaultTo=function(t,n){return null==t||t!=t?n:t},$e.divide=xa,$e.endsWith=function(t,n,e){t=bu(t),n=ci(n);var i=t.length,o=e=e===r?i:ur(_u(e),0,i);return(e-=n.length)>=0&&t.slice(e,o)==n},$e.eq=Us,$e.escape=function(t){return(t=bu(t))&&H.test(t)?t.replace(G,oe):t},$e.escapeRegExp=function(t){return(t=bu(t))&&it.test(t)?t.replace(rt,"\\$&"):t},$e.every=function(t,n,e){var i=Xs(t)?Tn:dr;return e&&wo(t,n,e)&&(n=r),i(t,ao(n,3))},$e.find=ys,$e.findIndex=Vo,$e.findKey=function(t,n){return Bn(t,ao(n,3),wr)},$e.findLast=ws,$e.findLastIndex=Xo,$e.findLastKey=function(t,n){return Bn(t,ao(n,3),br)},$e.floor=Ea,$e.forEach=bs,$e.forEachRight=xs,$e.forIn=function(t,n){return null==t?t:mr(t,ao(n,3),Ru)},$e.forInRight=function(t,n){return null==t?t:yr(t,ao(n,3),Ru)},$e.forOwn=function(t,n){return t&&wr(t,ao(n,3))},$e.forOwnRight=function(t,n){return t&&br(t,ao(n,3))},$e.get=Su,$e.gt=Ws,$e.gte=Ys,$e.has=function(t,n){return null!=t&&go(t,n,Mr)},$e.hasIn=Cu,$e.head=Zo,$e.identity=sa,$e.includes=function(t,n,e,r){t=Zs(t)?t:Uu(t),e=e&&!r?_u(e):0;var i=t.length;return e<0&&(e=me(i+e,0)),hu(t)?e<=i&&t.indexOf(n,e)>-1:!!i&&Un(t,n,e)>-1},$e.indexOf=function(t,n,e){var r=null==t?0:t.length;if(!r)return-1;var i=null==e?0:_u(e);return i<0&&(i=me(r+i,0)),Un(t,n,i)},$e.inRange=function(t,n,e){return n=gu(n),e===r?(e=n,n=0):e=gu(e),function(t,n,e){return t>=ye(n,e)&&t<me(n,e)}(t=yu(t),n,e)},$e.invoke=Nu,$e.isArguments=Vs,$e.isArray=Xs,$e.isArrayBuffer=Gs,$e.isArrayLike=Zs,$e.isArrayLikeObject=Hs,$e.isBoolean=function(t){return!0===t||!1===t||iu(t)&&jr(t)==y},$e.isBuffer=Qs,$e.isDate=Js,$e.isElement=function(t){return iu(t)&&1===t.nodeType&&!uu(t)},$e.isEmpty=function(t){if(null==t)return!0;if(Zs(t)&&(Xs(t)||"string"==typeof t||"function"==typeof t.splice||Qs(t)||fu(t)||Vs(t)))return!t.length;var n=vo(t);if(n==A||n==S)return!t.size;if(Ao(t))return!Lr(t).length;for(var e in t)if(Lt.call(t,e))return!1;return!0},$e.isEqual=function(t,n){return Ir(t,n)},$e.isEqualWith=function(t,n,e){var i=(e="function"==typeof e?e:r)?e(t,n):r;return i===r?Ir(t,n,r,e):!!i},$e.isError=Ks,$e.isFinite=function(t){return"number"==typeof t&&$n(t)},$e.isFunction=tu,$e.isInteger=nu,$e.isLength=eu,$e.isMap=ou,$e.isMatch=function(t,n){return t===n||Nr(t,n,ho(n))},$e.isMatchWith=function(t,n,e){return e="function"==typeof e?e:r,Nr(t,n,ho(n),e)},$e.isNaN=function(t){return su(t)&&t!=+t},$e.isNative=function(t){if(Eo(t))throw new At("Unsupported core-js use. Try https://npms.io/search?q=ponyfill.");return zr(t)},$e.isNil=function(t){return null==t},$e.isNull=function(t){return null===t},$e.isNumber=su,$e.isObject=ru,$e.isObjectLike=iu,$e.isPlainObject=uu,$e.isRegExp=au,$e.isSafeInteger=function(t){return nu(t)&&t>=-9007199254740991&&t<=p},$e.isSet=cu,$e.isString=hu,$e.isSymbol=lu,$e.isTypedArray=fu,$e.isUndefined=function(t){return t===r},$e.isWeakMap=function(t){return iu(t)&&vo(t)==I},$e.isWeakSet=function(t){return iu(t)&&"[object WeakSet]"==jr(t)},$e.join=function(t,n){return null==t?"":Gn.call(t,n)},$e.kebabCase=Xu,$e.last=Ko,$e.lastIndexOf=function(t,n,e){var i=null==t?0:t.length;if(!i)return-1;var o=i;return e!==r&&(o=(o=_u(e))<0?me(i+o,0):ye(o,i-1)),n==n?function(t,n,e){for(var r=e+1;r--;)if(t[r]===n)return r;return r}(t,n,o):qn(t,Yn,o,!0)},$e.lowerCase=Gu,$e.lowerFirst=Zu,$e.lt=pu,$e.lte=du,$e.max=function(t){return t&&t.length?vr(t,sa,Or):r},$e.maxBy=function(t,n){return t&&t.length?vr(t,ao(n,2),Or):r},$e.mean=function(t){return Vn(t,sa)},$e.meanBy=function(t,n){return Vn(t,ao(n,2))},$e.min=function(t){return t&&t.length?vr(t,sa,Pr):r},$e.minBy=function(t,n){return t&&t.length?vr(t,ao(n,2),Pr):r},$e.stubArray=ma,$e.stubFalse=ya,$e.stubObject=function(){return{}},$e.stubString=function(){return""},$e.stubTrue=function(){return!0},$e.multiply=ja,$e.nth=function(t,n){return t&&t.length?Ur(t,_u(n)):r},$e.noConflict=function(){return vn._===this&&(vn._=Bt),this},$e.noop=la,$e.now=Ss,$e.pad=function(t,n,e){t=bu(t);var r=(n=_u(n))?fe(t):0;if(!n||r>=n)return t;var i=(n-r)/2;return Wi(_n(i),e)+t+Wi(gn(i),e)},$e.padEnd=function(t,n,e){t=bu(t);var r=(n=_u(n))?fe(t):0;return n&&r<n?t+Wi(n-r,e):t},$e.padStart=function(t,n,e){t=bu(t);var r=(n=_u(n))?fe(t):0;return n&&r<n?Wi(n-r,e)+t:t},$e.parseInt=function(t,n,e){return e||null==n?n=0:n&&(n=+n),be(bu(t).replace(ot,""),n||0)},$e.random=function(t,n,e){if(e&&"boolean"!=typeof e&&wo(t,n,e)&&(n=e=r),e===r&&("boolean"==typeof n?(e=n,n=r):"boolean"==typeof t&&(e=t,t=r)),t===r&&n===r?(t=0,n=1):(t=gu(t),n===r?(n=t,t=0):n=gu(n)),t>n){var i=t;t=n,n=i}if(e||t%1||n%1){var o=xe();return ye(t+o*(n-t+ln("1e-"+((o+"").length-1))),n)}return Gr(t,n)},$e.reduce=function(t,n,e){var r=Xs(t)?Dn:Zn,i=arguments.length<3;return r(t,ao(n,4),e,i,fr)},$e.reduceRight=function(t,n,e){var r=Xs(t)?Pn:Zn,i=arguments.length<3;return r(t,ao(n,4),e,i,pr)},$e.repeat=function(t,n,e){return n=(e?wo(t,n,e):n===r)?1:_u(n),Zr(bu(t),n)},$e.replace=function(){var t=arguments,n=bu(t[0]);return t.length<3?n:n.replace(t[1],t[2])},$e.result=function(t,n,e){var i=-1,o=(n=yi(n,t)).length;for(o||(o=1,t=r);++i<o;){var s=null==t?r:t[$o(n[i])];s===r&&(i=o,s=e),t=tu(s)?s.call(t):s}return t},$e.round=Oa,$e.runInContext=t,$e.sample=function(t){return(Xs(t)?Qe:Qr)(t)},$e.size=function(t){if(null==t)return 0;if(Zs(t))return hu(t)?fe(t):t.length;var n=vo(t);return n==A||n==S?t.size:Lr(t).length},$e.snakeCase=Hu,$e.some=function(t,n,e){var i=Xs(t)?Fn:ii;return e&&wo(t,n,e)&&(n=r),i(t,ao(n,3))},$e.sortedIndex=function(t,n){return oi(t,n)},$e.sortedIndexBy=function(t,n,e){return si(t,n,ao(e,2))},$e.sortedIndexOf=function(t,n){var e=null==t?0:t.length;if(e){var r=oi(t,n);if(r<e&&Us(t[r],n))return r}return-1},$e.sortedLastIndex=function(t,n){return oi(t,n,!0)},$e.sortedLastIndexBy=function(t,n,e){return si(t,n,ao(e,2),!0)},$e.sortedLastIndexOf=function(t,n){if(null==t?0:t.length){var e=oi(t,n,!0)-1;if(Us(t[e],n))return e}return-1},$e.startCase=Qu,$e.startsWith=function(t,n,e){return t=bu(t),e=null==e?0:ur(_u(e),0,t.length),n=ci(n),t.slice(e,e+n.length)==n},$e.subtract=Ma,$e.sum=function(t){return t&&t.length?Hn(t,sa):0},$e.sumBy=function(t,n){return t&&t.length?Hn(t,ao(n,2)):0},$e.template=function(t,n,e){var i=$e.templateSettings;e&&wo(t,n,e)&&(n=r),t=bu(t),n=Au({},n,i,Ji);var o,s,u=Au({},n.imports,i.imports,Ji),a=zu(u),c=te(u,a),h=0,l=n.interpolate||bt,f="__p += '",p=kt((n.escape||bt).source+"|"+l.source+"|"+(l===K?pt:bt).source+"|"+(n.evaluate||bt).source+"|$","g"),d="//# sourceURL="+(Lt.call(n,"sourceURL")?(n.sourceURL+"").replace(/\s/g," "):"lodash.templateSources["+ ++un+"]")+"\n";t.replace(p,(function(n,e,r,i,u,a){return r||(r=i),f+=t.slice(h,a).replace(xt,se),e&&(o=!0,f+="' +\n__e("+e+") +\n'"),u&&(s=!0,f+="';\n"+u+";\n__p += '"),r&&(f+="' +\n((__t = ("+r+")) == null ? '' : __t) +\n'"),h=a+n.length,n})),f+="';\n";var v=Lt.call(n,"variable")&&n.variable;if(v){if(lt.test(v))throw new At("Invalid `variable` option passed into `_.template`")}else f="with (obj) {\n"+f+"\n}\n";f=(s?f.replace(W,""):f).replace(Y,"$1").replace(V,"$1;"),f="function("+(v||"obj")+") {\n"+(v?"":"obj || (obj = {});\n")+"var __t, __p = ''"+(o?", __e = _.escape":"")+(s?", __j = Array.prototype.join;\nfunction print() { __p += __j.call(arguments, '') }\n":";\n")+f+"return __p\n}";var g=na((function(){return jt(a,d+"return "+f).apply(r,c)}));if(g.source=f,Ks(g))throw g;return g},$e.times=function(t,n){if((t=_u(t))<1||t>p)return[];var e=v,r=ye(t,v);n=ao(n),t-=v;for(var i=Qn(r,n);++e<t;)n(e);return i},$e.toFinite=gu,$e.toInteger=_u,$e.toLength=mu,$e.toLower=function(t){return bu(t).toLowerCase()},$e.toNumber=yu,$e.toSafeInteger=function(t){return t?ur(_u(t),-9007199254740991,p):0===t?t:0},$e.toString=bu,$e.toUpper=function(t){return bu(t).toUpperCase()},$e.trim=function(t,n,e){if((t=bu(t))&&(e||n===r))return Jn(t);if(!t||!(n=ci(n)))return t;var i=pe(t),o=pe(n);return bi(i,ee(i,o),re(i,o)+1).join("")},$e.trimEnd=function(t,n,e){if((t=bu(t))&&(e||n===r))return t.slice(0,de(t)+1);if(!t||!(n=ci(n)))return t;var i=pe(t);return bi(i,0,re(i,pe(n))+1).join("")},$e.trimStart=function(t,n,e){if((t=bu(t))&&(e||n===r))return t.replace(ot,"");if(!t||!(n=ci(n)))return t;var i=pe(t);return bi(i,ee(i,pe(n))).join("")},$e.truncate=function(t,n){var e=30,i="...";if(ru(n)){var o="separator"in n?n.separator:o;e="length"in n?_u(n.length):e,i="omission"in n?ci(n.omission):i}var s=(t=bu(t)).length;if(ue(t)){var u=pe(t);s=u.length}if(e>=s)return t;var a=e-fe(i);if(a<1)return i;var c=u?bi(u,0,a).join(""):t.slice(0,a);if(o===r)return c+i;if(u&&(a+=c.length-a),au(o)){if(t.slice(a).search(o)){var h,l=c;for(o.global||(o=kt(o.source,bu(dt.exec(o))+"g")),o.lastIndex=0;h=o.exec(l);)var f=h.index;c=c.slice(0,f===r?a:f)}}else if(t.indexOf(ci(o),a)!=a){var p=c.lastIndexOf(o);p>-1&&(c=c.slice(0,p))}return c+i},$e.unescape=function(t){return(t=bu(t))&&Z.test(t)?t.replace(X,ve):t},$e.uniqueId=function(t){var n=++Dt;return bu(t)+n},$e.upperCase=Ju,$e.upperFirst=Ku,$e.each=bs,$e.eachRight=xs,$e.first=Zo,ha($e,(Aa={},wr($e,(function(t,n){Lt.call($e.prototype,n)||(Aa[n]=t)})),Aa),{chain:!1}),$e.VERSION="4.17.21",Sn(["bind","bindKey","curry","curryRight","partial","partialRight"],(function(t){$e[t].placeholder=$e})),Sn(["drop","take"],(function(t,n){We.prototype[t]=function(e){e=e===r?1:me(_u(e),0);var i=this.__filtered__&&!n?new We(this):this.clone();return i.__filtered__?i.__takeCount__=ye(e,i.__takeCount__):i.__views__.push({size:ye(e,v),type:t+(i.__dir__<0?"Right":"")}),i},We.prototype[t+"Right"]=function(n){return this.reverse()[t](n).reverse()}})),Sn(["filter","map","takeWhile"],(function(t,n){var e=n+1,r=1==e||3==e;We.prototype[t]=function(t){var n=this.clone();return n.__iteratees__.push({iteratee:ao(t,3),type:e}),n.__filtered__=n.__filtered__||r,n}})),Sn(["head","last"],(function(t,n){var e="take"+(n?"Right":"");We.prototype[t]=function(){return this[e](1).value()[0]}})),Sn(["initial","tail"],(function(t,n){var e="drop"+(n?"":"Right");We.prototype[t]=function(){return this.__filtered__?new We(this):this[e](1)}})),We.prototype.compact=function(){return this.filter(sa)},We.prototype.find=function(t){return this.filter(t).head()},We.prototype.findLast=function(t){return this.reverse().find(t)},We.prototype.invokeMap=Hr((function(t,n){return"function"==typeof t?new We(this):this.map((function(e){return Cr(e,t,n)}))})),We.prototype.reject=function(t){return this.filter(Ps(ao(t)))},We.prototype.slice=function(t,n){t=_u(t);var e=this;return e.__filtered__&&(t>0||n<0)?new We(e):(t<0?e=e.takeRight(-t):t&&(e=e.drop(t)),n!==r&&(e=(n=_u(n))<0?e.dropRight(-n):e.take(n-t)),e)},We.prototype.takeRightWhile=function(t){return this.reverse().takeWhile(t).reverse()},We.prototype.toArray=function(){return this.take(v)},wr(We.prototype,(function(t,n){var e=/^(?:filter|find|map|reject)|While$/.test(n),i=/^(?:head|last)$/.test(n),o=$e[i?"take"+("last"==n?"Right":""):n],s=i||/^find/.test(n);o&&($e.prototype[n]=function(){var n=this.__wrapped__,u=i?[1]:arguments,a=n instanceof We,c=u[0],h=a||Xs(n),l=function(t){var n=o.apply($e,Ln([t],u));return i&&f?n[0]:n};h&&e&&"function"==typeof c&&1!=c.length&&(a=h=!1);var f=this.__chain__,p=!!this.__actions__.length,d=s&&!f,v=a&&!p;if(!s&&h){n=v?n:new We(this);var g=t.apply(n,u);return g.__actions__.push({func:gs,args:[l],thisArg:r}),new Ue(g,f)}return d&&v?t.apply(this,u):(g=this.thru(l),d?i?g.value()[0]:g.value():g)})})),Sn(["pop","push","shift","sort","splice","unshift"],(function(t){var n=Tt[t],e=/^(?:push|sort|unshift)$/.test(t)?"tap":"thru",r=/^(?:pop|shift)$/.test(t);$e.prototype[t]=function(){var t=arguments;if(r&&!this.__chain__){var i=this.value();return n.apply(Xs(i)?i:[],t)}return this[e]((function(e){return n.apply(Xs(e)?e:[],t)}))}})),wr(We.prototype,(function(t,n){var e=$e[n];if(e){var r=e.name+"";Lt.call(Te,r)||(Te[r]=[]),Te[r].push({name:n,func:e})}})),Te[$i(r,2).name]=[{name:"wrapper",func:r}],We.prototype.clone=function(){var t=new We(this.__wrapped__);return t.__actions__=Si(this.__actions__),t.__dir__=this.__dir__,t.__filtered__=this.__filtered__,t.__iteratees__=Si(this.__iteratees__),t.__takeCount__=this.__takeCount__,t.__views__=Si(this.__views__),t},We.prototype.reverse=function(){if(this.__filtered__){var t=new We(this);t.__dir__=-1,t.__filtered__=!0}else(t=this.clone()).__dir__*=-1;return t},We.prototype.value=function(){var t=this.__wrapped__.value(),n=this.__dir__,e=Xs(t),r=n<0,i=e?t.length:0,o=function(t,n,e){var r=-1,i=e.length;for(;++r<i;){var o=e[r],s=o.size;switch(o.type){case"drop":t+=s;break;case"dropRight":n-=s;break;case"take":n=ye(n,t+s);break;case"takeRight":t=me(t,n-s)}}return{start:t,end:n}}(0,i,this.__views__),s=o.start,u=o.end,a=u-s,c=r?u:s-1,h=this.__iteratees__,l=h.length,f=0,p=ye(a,this.__takeCount__);if(!e||!r&&i==a&&p==a)return di(t,this.__actions__);var d=[];t:for(;a--&&f<p;){for(var v=-1,g=t[c+=n];++v<l;){var _=h[v],m=_.iteratee,y=_.type,w=m(g);if(2==y)g=w;else if(!w){if(1==y)continue t;break t}}d[f++]=g}return d},$e.prototype.at=_s,$e.prototype.chain=function(){return vs(this)},$e.prototype.commit=function(){return new Ue(this.value(),this.__chain__)},$e.prototype.next=function(){this.__values__===r&&(this.__values__=vu(this.value()));var t=this.__index__>=this.__values__.length;return{done:t,value:t?r:this.__values__[this.__index__++]}},$e.prototype.plant=function(t){for(var n,e=this;e instanceof qe;){var i=qo(e);i.__index__=0,i.__values__=r,n?o.__wrapped__=i:n=i;var o=i;e=e.__wrapped__}return o.__wrapped__=t,n},$e.prototype.reverse=function(){var t=this.__wrapped__;if(t instanceof We){var n=t;return this.__actions__.length&&(n=new We(this)),(n=n.reverse()).__actions__.push({func:gs,args:[rs],thisArg:r}),new Ue(n,this.__chain__)}return this.thru(rs)},$e.prototype.toJSON=$e.prototype.valueOf=$e.prototype.value=function(){return di(this.__wrapped__,this.__actions__)},$e.prototype.first=$e.prototype.head,Jt&&($e.prototype[Jt]=function(){return this}),$e}();_n?((_n.exports=ge)._=ge,gn._=ge):vn._=ge}).call(n)}(uo,uo.exports);var ao,co,ho,lo,fo,po,vo,go,_o,mo,yo,wo,bo,xo,Eo,Ao,jo,Oo,Mo,ko,So,Co,To,Io,No,zo,Ro,Lo,Do,Po,Fo,$o,Bo,qo,Uo,Wo,Yo,Vo,Xo,Go,Zo,Ho,Qo,Jo,Ko,ts,ns,es,rs,is,os,ss,us,as,cs,hs,ls,fs,ps,ds,vs,gs,_s,ms,ys,ws,bs,xs,Es,As,js,Os,Ms,ks,Ss,Cs,Ts,Is,Ns,zs,Rs,Ls,Ds,Ps,Fs,$s,Bs,qs,Us,Ws,Ys,Vs,Xs,Gs,Zs,Hs,Qs,Js,Ks,tu,nu,eu,ru,iu,ou,su,uu,au,cu=uo.exports;function hu(t,n){if(null===n.w)return 0;if(null===n.v)return 0;if(n.w===n.v)return Math.PI/2;const e=t.node(n.v),r=t.node(n.w);return Math.atan2(r.y-e.y,r.x-e.x)}function lu(t,n){const e=t.inEdges(n),r=t.outEdges(n),i=new Map;[...e,...r].forEach((t=>{i.has(t.name)||i.set(t.name,[]),i.get(t.name).push(t)}));const o=new Map(Array.from(i.entries()).map((([e,r])=>{const i=cu.sumBy(r,(n=>t.edge(n).value));return[e,cu.sumBy(r,(e=>t.edge(e).value*function(e){if(e.v===n)return t.node(e.w).y;if(e.w===n)return t.node(e.v).y;throw new Error}(e)))/i]}))),s=Array.from(o.keys());return s.sort(),s}function fu(t,n=!0){return function(e,r){const i=hu(t,e),o=hu(t,r),s=n?1:-1;return e.v===r.v&&e.w===r.w?"number"==typeof e.name&&"number"==typeof r.name?e.name-r.name:"string"==typeof e.name&&"string"==typeof r.name?e.name.localeCompare(r.name):0:Math.abs(i-o)<.001?e.v&&e.w&&r.v&&r.w?e.w===r.w?-1*(t.node(e.v).y-t.node(r.v).y):e.v===r.v?-1*(t.node(e.w).y-t.node(r.w).y):0:0:s*(i-o)}}function pu(t,n,e=!0){return function(r,i){if(r.name!==i.name)return n.indexOf(r.name)-n.indexOf(i.name);const o=hu(t,r),s=hu(t,i),u=e?1:-1;return Math.abs(o-s)<.001?r.v&&r.w&&i.v&&i.w?r.w===i.w?u*(o>0?-1:1)*(t.node(r.v).y-t.node(i.v).y):r.v===i.v?u*(o>0?-1:1)*(t.node(r.w).y-t.node(i.w).y):0:0:u*(o-s)}}function du(t,n){let e=null;for(let r=0;r<t.length;++r)if(n(t[r])){e=r;break}return e}function vu(t,n){if(0===t.length)return;let e,r=0;for(let o=t.length-1;o>=0;--o)e=t[o].dy/2,t[o][n]-e<r&&(t[o][n]=Math.min(t[o].Rmax,r+e)),r=t[o][n]+e;let i=t[0].Rmax+t[0].dy/2;for(let o=0;o<t.length;++o)e=t[o].dy/2,t[o][n]+e>i&&(t[o][n]=Math.max(e,i-e)),i=t[o][n]-e}function gu(t){return function(n){!function(t,n){t.nodes().forEach((e=>{const r=t.node(e);let i=0,o=0;r.outgoing.forEach((e=>{const o=t.edge(e);o.x0=r.x+n.nodeWidth/2,o.y0=r.y+i+o.dy/2,o.d0=r.direction||"r",i+=o.dy})),r.incoming.forEach((e=>{const i=t.edge(e);i.x1=r.x-n.nodeWidth/2,i.y1=r.y+o+i.dy/2,i.d1=r.direction||"r",o+=i.dy}))}))}(n,t),function(t){t.nodes().forEach((n=>{const e=t.node(n),r=e.outgoing.map((n=>t.edge(n))),i=e.incoming.map((n=>t.edge(n)));r.sort(((t,n)=>t.y0-n.y0)),i.sort(((t,n)=>t.y1-n.y1)),_u(r,"r0"),_u(i,"r1")}))}(n);const e=[];return n.edges().forEach((t=>{const r=n.edge(t);r.id=`${t.v}-${t.w}-${t.name}`,e.push(r)})),e}}function _u(t,n){t.forEach((t=>{t.Rmax=function(t){const n=t.x1-t.x0,e=t.y1-t.y0;return t.d0!==t.d1?Math.abs(e)/2.1:0!==e?(n*n+e*e)/Math.abs(4*e):1/0}(t),t[n]=Math.max(t.dy/2,t.d0===t.d1?.6*t.Rmax:5+t.dy/2)}));let e=du(t,"r0"===n?t=>t.y1>t.y0:t=>t.y0>t.y1);if(null===e&&(e=t.length),vu(t.slice(e),n),e>0){const r=[];for(let n=e-1;n>=0;n--)r.push(t[n]);vu(r,n)}}function mu(t,n,e,r,i){if(0===r.length)return;const o=r.map((e=>{const r=`__${n.v}_${n.w}_${e}`;return t.setNode(r,{data:null,direction:i,dummy:!0,rank:e}),r})),s=[n.v,...o,n.w];s.forEach(((r,i)=>{i+1<s.length&&t.setEdge(s[i],s[i+1],{data:t.edge(n).data,origEdge:n,origLabel:e,source:t.node(n.v),target:t.node(n.w),value:t.edge(n).value},n.name)})),t.removeEdge(n)}function yu(t,n,e){return function(t,n,e){let r,i,o;n.length>e.length?(r=n,o=e):(r=e,o=n);const s=[];r.forEach((n=>{o.forEach(((e,r)=>{(t.hasEdge(n,e)||t.hasEdge(e,n))&&s.push(r)}))}));let u=1;for(;u<i;)u*=2;const a=2*u-1;u-=1;const c=new Array(a);for(let l=0;l<a;l++)c[l]=0;let h=0;return s.forEach((t=>{let n=t+u;for(c[n]++;n>0;)n%2&&(h+=c[n+1]),n=Math.floor((n-1)/2),c[n]++})),h}(t,n,e)}function wu(){if(lo)return ho;return lo=1,ho=function(t,n){return t===n||t!=t&&n!=n}}function bu(){if(po)return fo;po=1;var t=wu();return fo=function(n,e){for(var r=n.length;r--;)if(t(n[r][0],e))return r;return-1}}function xu(){if(Ao)return Eo;Ao=1;var t=co?ao:(co=1,ao=function(){this.__data__=[],this.size=0}),n=function(){if(go)return vo;go=1;var t=bu(),n=Array.prototype.splice;return vo=function(e){var r=this.__data__,i=t(r,e);return!(i<0||(i==r.length-1?r.pop():n.call(r,i,1),--this.size,0))}}(),e=function(){if(mo)return _o;mo=1;var t=bu();return _o=function(n){var e=this.__data__,r=t(e,n);return r<0?void 0:e[r][1]}}(),r=function(){if(wo)return yo;wo=1;var t=bu();return yo=function(n){return t(this.__data__,n)>-1}}(),i=function(){if(xo)return bo;xo=1;var t=bu();return bo=function(n,e){var r=this.__data__,i=t(r,n);return i<0?(++this.size,r.push([n,e])):r[i][1]=e,this}}();function o(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}return o.prototype.clear=t,o.prototype.delete=n,o.prototype.get=e,o.prototype.has=r,o.prototype.set=i,Eo=o}function Eu(){if(zo)return No;zo=1;var t="object"==typeof n&&n&&n.Object===Object&&n;return No=t}function Au(){if(Lo)return Ro;Lo=1;var t=Eu(),n="object"==typeof self&&self&&self.Object===Object&&self,e=t||n||Function("return this")();return Ro=e}function ju(){if(Po)return Do;Po=1;var t=Au().Symbol;return Do=t}function Ou(){if(Wo)return Uo;Wo=1;var t=ju(),n=function(){if($o)return Fo;$o=1;var t=ju(),n=Object.prototype,e=n.hasOwnProperty,r=n.toString,i=t?t.toStringTag:void 0;return Fo=function(t){var n=e.call(t,i),o=t[i];try{t[i]=void 0;var s=!0}catch(a){}var u=r.call(t);return s&&(n?t[i]=o:delete t[i]),u}}(),e=function(){if(qo)return Bo;qo=1;var t=Object.prototype.toString;return Bo=function(n){return t.call(n)}}(),r=t?t.toStringTag:void 0;return Uo=function(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":r&&r in Object(t)?n(t):e(t)}}function Mu(){if(Vo)return Yo;return Vo=1,Yo=function(t){var n=typeof t;return null!=t&&("object"==n||"function"==n)}}function ku(){if(Go)return Xo;Go=1;var t=Ou(),n=Mu();return Xo=function(e){if(!n(e))return!1;var r=t(e);return"[object Function]"==r||"[object GeneratorFunction]"==r||"[object AsyncFunction]"==r||"[object Proxy]"==r}}function Su(){if(Jo)return Qo;Jo=1;var t,n=function(){if(Ho)return Zo;Ho=1;var t=Au()["__core-js_shared__"];return Zo=t}(),e=(t=/[^.]+$/.exec(n&&n.keys&&n.keys.IE_PROTO||""))?"Symbol(src)_1."+t:"";return Qo=function(t){return!!e&&e in t}}function Cu(){if(ts)return Ko;ts=1;var t=Function.prototype.toString;return Ko=function(n){if(null!=n){try{return t.call(n)}catch(e){}try{return n+""}catch(e){}}return""}}function Tu(){if(ss)return os;ss=1;var t=function(){if(es)return ns;es=1;var t=ku(),n=Su(),e=Mu(),r=Cu(),i=/^\[object .+?Constructor\]$/,o=Function.prototype,s=Object.prototype,u=o.toString,a=s.hasOwnProperty,c=RegExp("^"+u.call(a).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");return ns=function(o){return!(!e(o)||n(o))&&(t(o)?c:i).test(r(o))}}(),n=is?rs:(is=1,rs=function(t,n){return null==t?void 0:t[n]});return os=function(e,r){var i=n(e,r);return t(i)?i:void 0}}function Iu(){if(as)return us;as=1;var t=Tu()(Au(),"Map");return us=t}function Nu(){if(hs)return cs;hs=1;var t=Tu()(Object,"create");return cs=t}function zu(){if(xs)return bs;xs=1;var t=function(){if(fs)return ls;fs=1;var t=Nu();return ls=function(){this.__data__=t?t(null):{},this.size=0}}(),n=ds?ps:(ds=1,ps=function(t){var n=this.has(t)&&delete this.__data__[t];return this.size-=n?1:0,n}),e=function(){if(gs)return vs;gs=1;var t=Nu(),n=Object.prototype.hasOwnProperty;return vs=function(e){var r=this.__data__;if(t){var i=r[e];return"__lodash_hash_undefined__"===i?void 0:i}return n.call(r,e)?r[e]:void 0}}(),r=function(){if(ms)return _s;ms=1;var t=Nu(),n=Object.prototype.hasOwnProperty;return _s=function(e){var r=this.__data__;return t?void 0!==r[e]:n.call(r,e)}}(),i=function(){if(ws)return ys;ws=1;var t=Nu();return ys=function(n,e){var r=this.__data__;return this.size+=this.has(n)?0:1,r[n]=t&&void 0===e?"__lodash_hash_undefined__":e,this}}();function o(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}return o.prototype.clear=t,o.prototype.delete=n,o.prototype.get=e,o.prototype.has=r,o.prototype.set=i,bs=o}function Ru(){if(ks)return Ms;ks=1;var t=Os?js:(Os=1,js=function(t){var n=typeof t;return"string"==n||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==t:null===t});return Ms=function(n,e){var r=n.__data__;return t(e)?r["string"==typeof e?"string":"hash"]:r.map}}function Lu(){if(Ps)return Ds;Ps=1;var t=function(){if(As)return Es;As=1;var t=zu(),n=xu(),e=Iu();return Es=function(){this.size=0,this.__data__={hash:new t,map:new(e||n),string:new t}}}(),n=function(){if(Cs)return Ss;Cs=1;var t=Ru();return Ss=function(n){var e=t(this,n).delete(n);return this.size-=e?1:0,e}}(),e=function(){if(Is)return Ts;Is=1;var t=Ru();return Ts=function(n){return t(this,n).get(n)}}(),r=function(){if(zs)return Ns;zs=1;var t=Ru();return Ns=function(n){return t(this,n).has(n)}}(),i=function(){if(Ls)return Rs;Ls=1;var t=Ru();return Rs=function(n,e){var r=t(this,n),i=r.size;return r.set(n,e),this.size+=r.size==i?0:1,this}}();function o(t){var n=-1,e=null==t?0:t.length;for(this.clear();++n<e;){var r=t[n];this.set(r[0],r[1])}}return o.prototype.clear=t,o.prototype.delete=n,o.prototype.get=e,o.prototype.has=r,o.prototype.set=i,Ds=o}function Du(){if(qs)return Bs;qs=1;var t=xu(),n=function(){if(Oo)return jo;Oo=1;var t=xu();return jo=function(){this.__data__=new t,this.size=0}}(),e=ko?Mo:(ko=1,Mo=function(t){var n=this.__data__,e=n.delete(t);return this.size=n.size,e}),r=Co?So:(Co=1,So=function(t){return this.__data__.get(t)}),i=Io?To:(Io=1,To=function(t){return this.__data__.has(t)}),o=function(){if($s)return Fs;$s=1;var t=xu(),n=Iu(),e=Lu();return Fs=function(r,i){var o=this.__data__;if(o instanceof t){var s=o.__data__;if(!n||s.length<199)return s.push([r,i]),this.size=++o.size,this;o=this.__data__=new e(s)}return o.set(r,i),this.size=o.size,this}}();function s(n){var e=this.__data__=new t(n);this.size=e.size}return s.prototype.clear=n,s.prototype.delete=e,s.prototype.get=r,s.prototype.has=i,s.prototype.set=o,Bs=s}function Pu(){if(Ws)return Us;return Ws=1,Us=function(t,n){for(var e=-1,r=null==t?0:t.length;++e<r&&!1!==n(t[e],e,t););return t}}function Fu(){if(Vs)return Ys;Vs=1;var t=Tu(),n=function(){try{var n=t(Object,"defineProperty");return n({},"",{}),n}catch(e){}}();return Ys=n}function $u(){if(Gs)return Xs;Gs=1;var t=Fu();return Xs=function(n,e,r){"__proto__"==e&&t?t(n,e,{configurable:!0,enumerable:!0,value:r,writable:!0}):n[e]=r}}function Bu(){if(Hs)return Zs;Hs=1;var t=$u(),n=wu(),e=Object.prototype.hasOwnProperty;return Zs=function(r,i,o){var s=r[i];e.call(r,i)&&n(s,o)&&(void 0!==o||i in r)||t(r,i,o)}}function qu(){if(Js)return Qs;Js=1;var t=Bu(),n=$u();return Qs=function(e,r,i,o){var s=!i;i||(i={});for(var u=-1,a=r.length;++u<a;){var c=r[u],h=o?o(i[c],e[c],c,i,e):void 0;void 0===h&&(h=e[c]),s?n(i,c,h):t(i,c,h)}return i}}function Uu(){if(eu)return nu;return eu=1,nu=function(t){return null!=t&&"object"==typeof t}}function Wu(){if(su)return ou;su=1;var t=function(){if(iu)return ru;iu=1;var t=Ou(),n=Uu();return ru=function(e){return n(e)&&"[object Arguments]"==t(e)}}(),n=Uu(),e=Object.prototype,r=e.hasOwnProperty,i=e.propertyIsEnumerable,o=t(function(){return arguments}())?t:function(t){return n(t)&&r.call(t,"callee")&&!i.call(t,"callee")};return ou=o}function Yu(){if(au)return uu;au=1;var t=Array.isArray;return uu=t}var Vu,Xu,Gu,Zu,Hu,Qu,Ju,Ku,ta,na,ea,ra={exports:{}};function ia(){return Gu||(Gu=1,function(t,n){var e=Au(),r=Xu?Vu:(Xu=1,Vu=function(){return!1}),i=n&&!n.nodeType&&n,o=i&&t&&!t.nodeType&&t,s=o&&o.exports===i?e.Buffer:void 0,u=(s?s.isBuffer:void 0)||r;t.exports=u}(ra,ra.exports)),ra.exports}function oa(){if(Hu)return Zu;Hu=1;var t=/^(?:0|[1-9]\d*)$/;return Zu=function(n,e){var r=typeof n;return!!(e=null==e?9007199254740991:e)&&("number"==r||"symbol"!=r&&t.test(n))&&n>-1&&n%1==0&&n<e}}function sa(){if(Ju)return Qu;Ju=1;return Qu=function(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=9007199254740991}}function ua(){if(ea)return na;return ea=1,na=function(t){return function(n){return t(n)}}}ra.exports;var aa,ca,ha,la,fa,pa,da,va,ga,_a,ma,ya,wa,ba,xa,Ea,Aa,ja,Oa,Ma,ka,Sa,Ca,Ta,Ia,Na,za,Ra={exports:{}};function La(){return aa||(aa=1,function(t,n){var e=Eu(),r=n&&!n.nodeType&&n,i=r&&t&&!t.nodeType&&t,o=i&&i.exports===r&&e.process,s=function(){try{var t=i&&i.require&&i.require("util").types;return t||o&&o.binding&&o.binding("util")}catch(n){}}();t.exports=s}(Ra,Ra.exports)),Ra.exports}function Da(){if(ha)return ca;ha=1;var t=function(){if(ta)return Ku;ta=1;var t=Ou(),n=sa(),e=Uu(),r={};return r["[object Float32Array]"]=r["[object Float64Array]"]=r["[object Int8Array]"]=r["[object Int16Array]"]=r["[object Int32Array]"]=r["[object Uint8Array]"]=r["[object Uint8ClampedArray]"]=r["[object Uint16Array]"]=r["[object Uint32Array]"]=!0,r["[object Arguments]"]=r["[object Array]"]=r["[object ArrayBuffer]"]=r["[object Boolean]"]=r["[object DataView]"]=r["[object Date]"]=r["[object Error]"]=r["[object Function]"]=r["[object Map]"]=r["[object Number]"]=r["[object Object]"]=r["[object RegExp]"]=r["[object Set]"]=r["[object String]"]=r["[object WeakMap]"]=!1,Ku=function(i){return e(i)&&n(i.length)&&!!r[t(i)]}}(),n=ua(),e=La(),r=e&&e.isTypedArray,i=r?n(r):t;return ca=i}function Pa(){if(fa)return la;fa=1;var t=tu?Ks:(tu=1,Ks=function(t,n){for(var e=-1,r=Array(t);++e<t;)r[e]=n(e);return r}),n=Wu(),e=Yu(),r=ia(),i=oa(),o=Da(),s=Object.prototype.hasOwnProperty;return la=function(u,a){var c=e(u),h=!c&&n(u),l=!c&&!h&&r(u),f=!c&&!h&&!l&&o(u),p=c||h||l||f,d=p?t(u.length,String):[],v=d.length;for(var g in u)!a&&!s.call(u,g)||p&&("length"==g||l&&("offset"==g||"parent"==g)||f&&("buffer"==g||"byteLength"==g||"byteOffset"==g)||i(g,v))||d.push(g);return d}}function Fa(){if(da)return pa;da=1;var t=Object.prototype;return pa=function(n){var e=n&&n.constructor;return n===("function"==typeof e&&e.prototype||t)}}function $a(){if(ga)return va;return ga=1,va=function(t,n){return function(e){return t(n(e))}}}function Ba(){if(wa)return ya;wa=1;var t=Fa(),n=function(){if(ma)return _a;ma=1;var t=$a()(Object.keys,Object);return _a=t}(),e=Object.prototype.hasOwnProperty;return ya=function(r){if(!t(r))return n(r);var i=[];for(var o in Object(r))e.call(r,o)&&"constructor"!=o&&i.push(o);return i}}function qa(){if(xa)return ba;xa=1;var t=ku(),n=sa();return ba=function(e){return null!=e&&n(e.length)&&!t(e)}}function Ua(){if(Aa)return Ea;Aa=1;var t=Pa(),n=Ba(),e=qa();return Ea=function(r){return e(r)?t(r):n(r)}}function Wa(){if(Ca)return Sa;Ca=1;var t=Mu(),n=Fa(),e=ka?Ma:(ka=1,Ma=function(t){var n=[];if(null!=t)for(var e in Object(t))n.push(e);return n}),r=Object.prototype.hasOwnProperty;return Sa=function(i){if(!t(i))return e(i);var o=n(i),s=[];for(var u in i)("constructor"!=u||!o&&r.call(i,u))&&s.push(u);return s}}function Ya(){if(Ia)return Ta;Ia=1;var t=Pa(),n=Wa(),e=qa();return Ta=function(r){return e(r)?t(r,!0):n(r)}}Ra.exports;var Va,Xa,Ga,Za,Ha,Qa,Ja,Ka,tc,nc,ec,rc,ic,oc,sc,uc,ac,cc,hc,lc,fc,pc,dc,vc,gc,_c,mc,yc,wc,bc,xc,Ec,Ac,jc,Oc,Mc,kc,Sc,Cc,Tc,Ic,Nc,zc,Rc,Lc,Dc,Pc,Fc,$c,Bc,qc,Uc,Wc,Yc,Vc,Xc,Gc,Zc,Hc,Qc,Jc,Kc,th,nh,eh,rh,ih,oh,sh,uh,ah,ch,hh,lh,fh,ph,dh,vh,gh,_h,mh,yh,wh,bh,xh,Eh,Ah,jh,Oh,Mh,kh,Sh,Ch,Th,Ih,Nh,zh,Rh,Lh,Dh,Ph,Fh,$h,Bh,qh,Uh,Wh,Yh,Vh,Xh,Gh,Zh,Hh,Qh,Jh,Kh,tl,nl,el,rl,il,ol,sl,ul,al,cl,hl,ll,fl,pl,dl,vl,gl,_l,ml,yl,wl,bl,xl,El,Al,jl,Ol,Ml,kl,Sl,Cl,Tl,Il,Nl,zl,Rl,Ll,Dl,Pl,Fl,$l,Bl,ql,Ul,Wl,Yl,Vl,Xl,Gl,Zl,Hl,Ql,Jl,Kl,tf,nf,ef,rf,of,sf,uf,af,cf,hf,lf,ff,pf,df,vf,gf,_f,mf,yf,wf,bf,xf,Ef,Af,jf,Of,Mf,kf,Sf,Cf,Tf,If,Nf,zf,Rf,Lf,Df,Pf,Ff,$f,Bf,qf,Uf,Wf,Yf,Vf,Xf,Gf,Zf,Hf,Qf,Jf,Kf,tp,np,ep,rp,ip,op,sp,up,ap,cp,hp,lp,fp,pp,dp,vp,gp,_p={exports:{}};function mp(){if(Ha)return Za;return Ha=1,Za=function(t,n){for(var e=-1,r=null==t?0:t.length,i=0,o=[];++e<r;){var s=t[e];n(s,e,t)&&(o[i++]=s)}return o}}function yp(){if(Ja)return Qa;return Ja=1,Qa=function(){return[]}}function wp(){if(tc)return Ka;tc=1;var t=mp(),n=yp(),e=Object.prototype.propertyIsEnumerable,r=Object.getOwnPropertySymbols;return Ka=r?function(n){return null==n?[]:(n=Object(n),t(r(n),(function(t){return e.call(n,t)})))}:n}function bp(){if(ic)return rc;return ic=1,rc=function(t,n){for(var e=-1,r=n.length,i=t.length;++e<r;)t[i+e]=n[e];return t}}function xp(){if(sc)return oc;sc=1;var t=$a()(Object.getPrototypeOf,Object);return oc=t}function Ep(){if(ac)return uc;ac=1;var t=bp(),n=xp(),e=wp(),r=yp(),i=Object.getOwnPropertySymbols;return uc=i?function(r){for(var i=[];r;)t(i,e(r)),r=n(r);return i}:r}function Ap(){if(fc)return lc;fc=1;var t=bp(),n=Yu();return lc=function(e,r,i){var o=r(e);return n(e)?o:t(o,i(e))}}function jp(){if(dc)return pc;dc=1;var t=Ap(),n=wp(),e=Ua();return pc=function(r){return t(r,e,n)}}function Op(){if(xc)return bc;xc=1;var t=Tu()(Au(),"Set");return bc=t}function Mp(){if(Oc)return jc;Oc=1;var t=function(){if(mc)return _c;mc=1;var t=Tu()(Au(),"DataView");return _c=t}(),n=Iu(),e=function(){if(wc)return yc;wc=1;var t=Tu()(Au(),"Promise");return yc=t}(),r=Op(),i=function(){if(Ac)return Ec;Ac=1;var t=Tu()(Au(),"WeakMap");return Ec=t}(),o=Ou(),s=Cu(),u="[object Map]",a="[object Promise]",c="[object Set]",h="[object WeakMap]",l="[object DataView]",f=s(t),p=s(n),d=s(e),v=s(r),g=s(i),_=o;return(t&&_(new t(new ArrayBuffer(1)))!=l||n&&_(new n)!=u||e&&_(e.resolve())!=a||r&&_(new r)!=c||i&&_(new i)!=h)&&(_=function(t){var n=o(t),e="[object Object]"==n?t.constructor:void 0,r=e?s(e):"";if(r)switch(r){case f:return l;case p:return u;case d:return a;case v:return c;case g:return h}return n}),jc=_}function kp(){if(Cc)return Sc;Cc=1;var t=Au().Uint8Array;return Sc=t}function Sp(){if(Ic)return Tc;Ic=1;var t=kp();return Tc=function(n){var e=new n.constructor(n.byteLength);return new t(e).set(new t(n)),e}}function Cp(){if(qc)return Bc;qc=1;var t=Sp(),n=function(){if(zc)return Nc;zc=1;var t=Sp();return Nc=function(n,e){var r=e?t(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.byteLength)}}(),e=function(){if(Lc)return Rc;Lc=1;var t=/\w*$/;return Rc=function(n){var e=new n.constructor(n.source,t.exec(n));return e.lastIndex=n.lastIndex,e}}(),r=function(){if(Pc)return Dc;Pc=1;var t=ju(),n=t?t.prototype:void 0,e=n?n.valueOf:void 0;return Dc=function(t){return e?Object(e.call(t)):{}}}(),i=function(){if($c)return Fc;$c=1;var t=Sp();return Fc=function(n,e){var r=e?t(n.buffer):n.buffer;return new n.constructor(r,n.byteOffset,n.length)}}();return Bc=function(o,s,u){var a=o.constructor;switch(s){case"[object ArrayBuffer]":return t(o);case"[object Boolean]":case"[object Date]":return new a(+o);case"[object DataView]":return n(o,u);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 i(o,u);case"[object Map]":case"[object Set]":return new a;case"[object Number]":case"[object String]":return new a(o);case"[object RegExp]":return e(o);case"[object Symbol]":return r(o)}}}function Tp(){if(Wc)return Uc;Wc=1;var t=Mu(),n=Object.create;return Uc=function(){function e(){}return function(r){if(!t(r))return{};if(n)return n(r);e.prototype=r;var i=new e;return e.prototype=void 0,i}}()}function Ip(){if(Hc)return Zc;Hc=1;var t=function(){if(Gc)return Xc;Gc=1;var t=Mp(),n=Uu();return Xc=function(e){return n(e)&&"[object Map]"==t(e)}}(),n=ua(),e=La(),r=e&&e.isMap,i=r?n(r):t;return Zc=i}function Np(){if(th)return Kc;th=1;var t=function(){if(Jc)return Qc;Jc=1;var t=Mp(),n=Uu();return Qc=function(e){return n(e)&&"[object Set]"==t(e)}}(),n=ua(),e=La(),r=e&&e.isSet,i=r?n(r):t;return Kc=i}function zp(){if(eh)return nh;eh=1;var t=Du(),n=Pu(),e=Bu(),r=function(){if(Oa)return ja;Oa=1;var t=qu(),n=Ua();return ja=function(e,r){return e&&t(r,n(r),e)}}(),i=function(){if(za)return Na;za=1;var t=qu(),n=Ya();return Na=function(e,r){return e&&t(r,n(r),e)}}(),o=(Va||(Va=1,function(t,n){var e=Au(),r=n&&!n.nodeType&&n,i=r&&t&&!t.nodeType&&t,o=i&&i.exports===r?e.Buffer:void 0,s=o?o.allocUnsafe:void 0;t.exports=function(t,n){if(n)return t.slice();var e=t.length,r=s?s(e):new t.constructor(e);return t.copy(r),r}}(_p,_p.exports)),_p.exports),s=Ga?Xa:(Ga=1,Xa=function(t,n){var e=-1,r=t.length;for(n||(n=Array(r));++e<r;)n[e]=t[e];return n}),u=function(){if(ec)return nc;ec=1;var t=qu(),n=wp();return nc=function(e,r){return t(e,n(e),r)}}(),a=function(){if(hc)return cc;hc=1;var t=qu(),n=Ep();return cc=function(e,r){return t(e,n(e),r)}}(),c=jp(),h=function(){if(gc)return vc;gc=1;var t=Ap(),n=Ep(),e=Ya();return vc=function(r){return t(r,e,n)}}(),l=Mp(),f=function(){if(kc)return Mc;kc=1;var t=Object.prototype.hasOwnProperty;return Mc=function(n){var e=n.length,r=new n.constructor(e);return e&&"string"==typeof n[0]&&t.call(n,"index")&&(r.index=n.index,r.input=n.input),r}}(),p=Cp(),d=function(){if(Vc)return Yc;Vc=1;var t=Tp(),n=xp(),e=Fa();return Yc=function(r){return"function"!=typeof r.constructor||e(r)?{}:t(n(r))}}(),v=Yu(),g=ia(),_=Ip(),m=Mu(),y=Np(),w=Ua(),b=Ya(),x="[object Arguments]",E="[object Function]",A="[object Object]",j={};return j[x]=j["[object Array]"]=j["[object ArrayBuffer]"]=j["[object DataView]"]=j["[object Boolean]"]=j["[object Date]"]=j["[object Float32Array]"]=j["[object Float64Array]"]=j["[object Int8Array]"]=j["[object Int16Array]"]=j["[object Int32Array]"]=j["[object Map]"]=j["[object Number]"]=j[A]=j["[object RegExp]"]=j["[object Set]"]=j["[object String]"]=j["[object Symbol]"]=j["[object Uint8Array]"]=j["[object Uint8ClampedArray]"]=j["[object Uint16Array]"]=j["[object Uint32Array]"]=!0,j["[object Error]"]=j[E]=j["[object WeakMap]"]=!1,nh=function O(M,k,S,C,T,I){var N,z=1&k,R=2&k,L=4&k;if(S&&(N=T?S(M,C,T,I):S(M)),void 0!==N)return N;if(!m(M))return M;var D=v(M);if(D){if(N=f(M),!z)return s(M,N)}else{var P=l(M),F=P==E||"[object GeneratorFunction]"==P;if(g(M))return o(M,z);if(P==A||P==x||F&&!T){if(N=R||F?{}:d(M),!z)return R?a(M,i(N,M)):u(M,r(N,M))}else{if(!j[P])return T?M:{};N=p(M,P,z)}}I||(I=new t);var $=I.get(M);if($)return $;I.set(M,N),y(M)?M.forEach((function(t){N.add(O(t,k,S,t,M,I))})):_(M)&&M.forEach((function(t,n){N.set(n,O(t,k,S,n,M,I))}));var B=D?void 0:(L?R?h:c:R?b:w)(M);return n(B||M,(function(t,n){B&&(t=M[n=t]),e(N,n,O(t,k,S,n,M,I))})),N},nh}function Rp(){if(sh)return oh;return sh=1,oh=function(t){return function(){return t}}}function Lp(){if(hh)return ch;hh=1;var t=(ah?uh:(ah=1,uh=function(t){return function(n,e,r){for(var i=-1,o=Object(n),s=r(n),u=s.length;u--;){var a=s[t?u:++i];if(!1===e(o[a],a,o))break}return n}}))();return ch=t}function Dp(){if(fh)return lh;fh=1;var t=Lp(),n=Ua();return lh=function(e,r){return e&&t(e,r,n)}}function Pp(){if(gh)return vh;gh=1;var t=Dp(),n=function(){if(dh)return ph;dh=1;var t=qa();return ph=function(n,e){return function(r,i){if(null==r)return r;if(!t(r))return n(r,i);for(var o=r.length,s=e?o:-1,u=Object(r);(e?s--:++s<o)&&!1!==i(u[s],s,u););return r}}}()(t);return vh=n}function Fp(){if(mh)return _h;return mh=1,_h=function(t){return t}}function $p(){if(xh)return bh;xh=1;var t=Pu(),n=Pp(),e=function(){if(wh)return yh;wh=1;var t=Fp();return yh=function(n){return"function"==typeof n?n:t}}(),r=Yu();return bh=function(i,o){return(r(i)?t:n)(i,e(o))}}function Bp(){if(Ih)return Th;Ih=1;var t=Lu(),n=kh?Mh:(kh=1,Mh=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this}),e=Ch?Sh:(Ch=1,Sh=function(t){return this.__data__.has(t)});function r(n){var e=-1,r=null==n?0:n.length;for(this.__data__=new t;++e<r;)this.add(n[e])}return r.prototype.add=r.prototype.push=n,r.prototype.has=e,Th=r}function qp(){if(Lh)return Rh;return Lh=1,Rh=function(t,n){return t.has(n)}}function Up(){if(Ph)return Dh;Ph=1;var t=Bp(),n=zh?Nh:(zh=1,Nh=function(t,n){for(var e=-1,r=null==t?0:t.length;++e<r;)if(n(t[e],e,t))return!0;return!1}),e=qp();return Dh=function(r,i,o,s,u,a){var c=1&o,h=r.length,l=i.length;if(h!=l&&!(c&&l>h))return!1;var f=a.get(r),p=a.get(i);if(f&&p)return f==i&&p==r;var d=-1,v=!0,g=2&o?new t:void 0;for(a.set(r,i),a.set(i,r);++d<h;){var _=r[d],m=i[d];if(s)var y=c?s(m,_,d,i,r,a):s(_,m,d,r,i,a);if(void 0!==y){if(y)continue;v=!1;break}if(g){if(!n(i,(function(t,n){if(!e(g,n)&&(_===t||u(_,t,o,s,a)))return g.push(n)}))){v=!1;break}}else if(_!==m&&!u(_,m,o,s,a)){v=!1;break}}return a.delete(r),a.delete(i),v}}function Wp(){if(qh)return Bh;return qh=1,Bh=function(t){var n=-1,e=Array(t.size);return t.forEach((function(t){e[++n]=t})),e}}function Yp(){if(Wh)return Uh;Wh=1;var t=ju(),n=kp(),e=wu(),r=Up(),i=$h?Fh:($h=1,Fh=function(t){var n=-1,e=Array(t.size);return t.forEach((function(t,r){e[++n]=[r,t]})),e}),o=Wp(),s=t?t.prototype:void 0,u=s?s.valueOf:void 0;return Uh=function(t,s,a,c,h,l,f){switch(a){case"[object DataView]":if(t.byteLength!=s.byteLength||t.byteOffset!=s.byteOffset)return!1;t=t.buffer,s=s.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=s.byteLength||!l(new n(t),new n(s)));case"[object Boolean]":case"[object Date]":case"[object Number]":return e(+t,+s);case"[object Error]":return t.name==s.name&&t.message==s.message;case"[object RegExp]":case"[object String]":return t==s+"";case"[object Map]":var p=i;case"[object Set]":var d=1&c;if(p||(p=o),t.size!=s.size&&!d)return!1;var v=f.get(t);if(v)return v==s;c|=2,f.set(t,s);var g=r(p(t),p(s),c,h,l,f);return f.delete(t),g;case"[object Symbol]":if(u)return u.call(t)==u.call(s)}return!1}}function Vp(){if(Gh)return Xh;Gh=1;var t=Du(),n=Up(),e=Yp(),r=function(){if(Vh)return Yh;Vh=1;var t=jp(),n=Object.prototype.hasOwnProperty;return Yh=function(e,r,i,o,s,u){var a=1&i,c=t(e),h=c.length;if(h!=t(r).length&&!a)return!1;for(var l=h;l--;){var f=c[l];if(!(a?f in r:n.call(r,f)))return!1}var p=u.get(e),d=u.get(r);if(p&&d)return p==r&&d==e;var v=!0;u.set(e,r),u.set(r,e);for(var g=a;++l<h;){var _=e[f=c[l]],m=r[f];if(o)var y=a?o(m,_,f,r,e,u):o(_,m,f,e,r,u);if(!(void 0===y?_===m||s(_,m,i,o,u):y)){v=!1;break}g||(g="constructor"==f)}if(v&&!g){var w=e.constructor,b=r.constructor;w==b||!("constructor"in e)||!("constructor"in r)||"function"==typeof w&&w instanceof w&&"function"==typeof b&&b instanceof b||(v=!1)}return u.delete(e),u.delete(r),v}}(),i=Mp(),o=Yu(),s=ia(),u=Da(),a="[object Arguments]",c="[object Array]",h="[object Object]",l=Object.prototype.hasOwnProperty;return Xh=function(f,p,d,v,g,_){var m=o(f),y=o(p),w=m?c:i(f),b=y?c:i(p),x=(w=w==a?h:w)==h,E=(b=b==a?h:b)==h,A=w==b;if(A&&s(f)){if(!s(p))return!1;m=!0,x=!1}if(A&&!x)return _||(_=new t),m||u(f)?n(f,p,d,v,g,_):e(f,p,w,d,v,g,_);if(!(1&d)){var j=x&&l.call(f,"__wrapped__"),O=E&&l.call(p,"__wrapped__");if(j||O){var M=j?f.value():f,k=O?p.value():p;return _||(_=new t),g(M,k,d,v,_)}}return!!A&&(_||(_=new t),r(f,p,d,v,g,_))}}function Xp(){if(Hh)return Zh;Hh=1;var t=Vp(),n=Uu();return Zh=function e(r,i,o,s,u){return r===i||(null==r||null==i||!n(r)&&!n(i)?r!=r&&i!=i:t(r,i,o,s,e,u))},Zh}function Gp(){if(tl)return Kh;tl=1;var t=Mu();return Kh=function(n){return n==n&&!t(n)}}function Zp(){if(il)return rl;return il=1,rl=function(t,n){return function(e){return null!=e&&(e[t]===n&&(void 0!==n||t in Object(e)))}}}function Hp(){if(sl)return ol;sl=1;var t=function(){if(Jh)return Qh;Jh=1;var t=Du(),n=Xp();return Qh=function(e,r,i,o){var s=i.length,u=s,a=!o;if(null==e)return!u;for(e=Object(e);s--;){var c=i[s];if(a&&c[2]?c[1]!==e[c[0]]:!(c[0]in e))return!1}for(;++s<u;){var h=(c=i[s])[0],l=e[h],f=c[1];if(a&&c[2]){if(void 0===l&&!(h in e))return!1}else{var p=new t;if(o)var d=o(l,f,h,e,r,p);if(!(void 0===d?n(f,l,3,o,p):d))return!1}}return!0}}(),n=function(){if(el)return nl;el=1;var t=Gp(),n=Ua();return nl=function(e){for(var r=n(e),i=r.length;i--;){var o=r[i],s=e[o];r[i]=[o,s,t(s)]}return r}}(),e=Zp();return ol=function(r){var i=n(r);return 1==i.length&&i[0][2]?e(i[0][0],i[0][1]):function(n){return n===r||t(n,r,i)}}}function Qp(){if(al)return ul;al=1;var t=Ou(),n=Uu();return ul=function(e){return"symbol"==typeof e||n(e)&&"[object Symbol]"==t(e)}}function Jp(){if(hl)return cl;hl=1;var t=Yu(),n=Qp(),e=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,r=/^\w*$/;return cl=function(i,o){if(t(i))return!1;var s=typeof i;return!("number"!=s&&"symbol"!=s&&"boolean"!=s&&null!=i&&!n(i))||(r.test(i)||!e.test(i)||null!=o&&i in Object(o))}}function Kp(){if(dl)return pl;dl=1;var t=function(){if(fl)return ll;fl=1;var t=Lu();function n(e,r){if("function"!=typeof e||null!=r&&"function"!=typeof r)throw new TypeError("Expected a function");var i=function(){var t=arguments,n=r?r.apply(this,t):t[0],o=i.cache;if(o.has(n))return o.get(n);var s=e.apply(this,t);return i.cache=o.set(n,s)||o,s};return i.cache=new(n.Cache||t),i}return n.Cache=t,ll=n}();return pl=function(n){var e=t(n,(function(t){return 500===r.size&&r.clear(),t})),r=e.cache;return e}}function td(){if(ml)return _l;return ml=1,_l=function(t,n){for(var e=-1,r=null==t?0:t.length,i=Array(r);++e<r;)i[e]=n(t[e],e,t);return i}}function nd(){if(xl)return bl;xl=1;var t=function(){if(wl)return yl;wl=1;var t=ju(),n=td(),e=Yu(),r=Qp(),i=t?t.prototype:void 0,o=i?i.toString:void 0;return yl=function t(i){if("string"==typeof i)return i;if(e(i))return n(i,t)+"";if(r(i))return o?o.call(i):"";var s=i+"";return"0"==s&&1/i==-1/0?"-0":s},yl}();return bl=function(n){return null==n?"":t(n)}}function ed(){if(Al)return El;Al=1;var t=Yu(),n=Jp(),e=function(){if(gl)return vl;gl=1;var t=Kp(),n=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,e=/\\(\\)?/g,r=t((function(t){var r=[];return 46===t.charCodeAt(0)&&r.push(""),t.replace(n,(function(t,n,i,o){r.push(i?o.replace(e,"$1"):n||t)})),r}));return vl=r}(),r=nd();return El=function(i,o){return t(i)?i:n(i,o)?[i]:e(r(i))}}function rd(){if(Ol)return jl;Ol=1;var t=Qp();return jl=function(n){if("string"==typeof n||t(n))return n;var e=n+"";return"0"==e&&1/n==-1/0?"-0":e}}function id(){if(kl)return Ml;kl=1;var t=ed(),n=rd();return Ml=function(e,r){for(var i=0,o=(r=t(r,e)).length;null!=e&&i<o;)e=e[n(r[i++])];return i&&i==o?e:void 0}}function od(){if(zl)return Nl;zl=1;var t=ed(),n=Wu(),e=Yu(),r=oa(),i=sa(),o=rd();return Nl=function(s,u,a){for(var c=-1,h=(u=t(u,s)).length,l=!1;++c<h;){var f=o(u[c]);if(!(l=null!=s&&a(s,f)))break;s=s[f]}return l||++c!=h?l:!!(h=null==s?0:s.length)&&i(h)&&r(f,h)&&(e(s)||n(s))}}function sd(){if(Ll)return Rl;Ll=1;var t=Il?Tl:(Il=1,Tl=function(t,n){return null!=t&&n in Object(t)}),n=od();return Rl=function(e,r){return null!=e&&n(e,r,t)}}function ud(){if(Pl)return Dl;Pl=1;var t=Xp(),n=function(){if(Cl)return Sl;Cl=1;var t=id();return Sl=function(n,e,r){var i=null==n?void 0:t(n,e);return void 0===i?r:i}}(),e=sd(),r=Jp(),i=Gp(),o=Zp(),s=rd();return Dl=function(u,a){return r(u)&&i(a)?o(s(u),a):function(r){var i=n(r,u);return void 0===i&&i===a?e(r,u):t(a,i,3)}}}function ad(){if($l)return Fl;return $l=1,Fl=function(t){return function(n){return null==n?void 0:n[t]}}}function cd(){if(Wl)return Ul;Wl=1;var t=ad(),n=function(){if(ql)return Bl;ql=1;var t=id();return Bl=function(n){return function(e){return t(e,n)}}}(),e=Jp(),r=rd();return Ul=function(i){return e(i)?t(r(i)):n(i)}}function hd(){if(Vl)return Yl;Vl=1;var t=Hp(),n=ud(),e=Fp(),r=Yu(),i=cd();return Yl=function(o){return"function"==typeof o?o:null==o?e:"object"==typeof o?r(o)?n(o[0],o[1]):t(o):i(o)}}function ld(){if(Ef)return xf;Ef=1;var t=function(){if(_f)return gf;_f=1;var t=ad()("length");return gf=t}(),n=function(){if(yf)return mf;yf=1;var t=RegExp("[\\u200d\\ud800-\\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]");return mf=function(n){return t.test(n)}}(),e=function(){if(bf)return wf;bf=1;var t="\\ud800-\\udfff",n="["+t+"]",e="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",r="\\ud83c[\\udffb-\\udfff]",i="[^"+t+"]",o="(?:\\ud83c[\\udde6-\\uddff]){2}",s="[\\ud800-\\udbff][\\udc00-\\udfff]",u="(?:"+e+"|"+r+")?",a="[\\ufe0e\\ufe0f]?",c=a+u+"(?:\\u200d(?:"+[i,o,s].join("|")+")"+a+u+")*",h="(?:"+[i+e+"?",e,o,s,n].join("|")+")",l=RegExp(r+"(?="+r+")|"+h+c,"g");return wf=function(t){for(var n=l.lastIndex=0;l.test(t);)++n;return n}}();return xf=function(r){return n(r)?e(r):t(r)}}function fd(){if(Tf)return Cf;Tf=1;var t=bp(),n=function(){if(Sf)return kf;Sf=1;var t=ju(),n=Wu(),e=Yu(),r=t?t.isConcatSpreadable:void 0;return kf=function(t){return e(t)||n(t)||!!(r&&t&&t[r])}}();return Cf=function e(r,i,o,s,u){var a=-1,c=r.length;for(o||(o=n),u||(u=[]);++a<c;){var h=r[a];i>0&&o(h)?i>1?e(h,i-1,o,s,u):t(u,h):s||(u[u.length]=h)}return u},Cf}function pd(){if(Rf)return zf;Rf=1;var t=Nf?If:(Nf=1,If=function(t,n,e){switch(e.length){case 0:return t.call(n);case 1:return t.call(n,e[0]);case 2:return t.call(n,e[0],e[1]);case 3:return t.call(n,e[0],e[1],e[2])}return t.apply(n,e)}),n=Math.max;return zf=function(e,r,i){return r=n(void 0===r?e.length-1:r,0),function(){for(var o=arguments,s=-1,u=n(o.length-r,0),a=Array(u);++s<u;)a[s]=o[r+s];s=-1;for(var c=Array(r+1);++s<r;)c[s]=o[s];return c[r]=i(a),t(e,this,c)}},zf}function dd(){if(Bf)return $f;Bf=1;var t=function(){if(Df)return Lf;Df=1;var t=Rp(),n=Fu(),e=Fp();return Lf=n?function(e,r){return n(e,"toString",{configurable:!0,enumerable:!1,value:t(r),writable:!0})}:e}(),n=function(){if(Ff)return Pf;Ff=1;var t=Date.now;return Pf=function(n){var e=0,r=0;return function(){var i=t(),o=16-(i-r);if(r=i,o>0){if(++e>=800)return arguments[0]}else e=0;return n.apply(void 0,arguments)}},Pf}(),e=n(t);return $f=e}function vd(){if(Qf)return Hf;Qf=1;var t=Yf?Wf:(Yf=1,Wf=function(t,n,e,r){for(var i=t.length,o=e+(r?1:-1);r?o--:++o<i;)if(n(t[o],o,t))return o;return-1}),n=Xf?Vf:(Xf=1,Vf=function(t){return t!=t}),e=Zf?Gf:(Zf=1,Gf=function(t,n,e){for(var r=e-1,i=t.length;++r<i;)if(t[r]===n)return r;return-1});return Hf=function(r,i,o){return i==i?e(r,i,o):t(r,n,o)}}function gd(){if(op)return ip;op=1;var t=Op(),n=rp?ep:(rp=1,ep=function(){}),e=Wp(),r=t&&1/e(new t([,-0]))[1]==1/0?function(n){return new t(n)}:n;return ip=r}function _d(){if(up)return sp;up=1;var t=Bp(),n=function(){if(Kf)return Jf;Kf=1;var t=vd();return Jf=function(n,e){return!(null==n||!n.length)&&t(n,e,0)>-1}}(),e=np?tp:(np=1,tp=function(t,n,e){for(var r=-1,i=null==t?0:t.length;++r<i;)if(e(n,t[r]))return!0;return!1}),r=qp(),i=gd(),o=Wp();return sp=function(s,u,a){var c=-1,h=n,l=s.length,f=!0,p=[],d=p;if(a)f=!1,h=e;else if(l>=200){var v=u?null:i(s);if(v)return o(v);f=!1,h=r,d=new t}else d=u?[]:p;t:for(;++c<l;){var g=s[c],_=u?u(g):g;if(g=a||0!==g?g:0,f&&_==_){for(var m=d.length;m--;)if(d[m]===_)continue t;u&&d.push(_),p.push(g)}else h(d,_,a)||(d!==p&&d.push(_),p.push(g))}return p}}_p.exports;try{gp={clone:function(){if(ih)return rh;ih=1;var t=zp();return rh=function(n){return t(n,4)}}(),constant:Rp(),each:Ah?Eh:(Ah=1,Eh=$p()),filter:function(){if(Gl)return Xl;Gl=1;var t=mp(),n=function(){if(Oh)return jh;Oh=1;var t=Pp();return jh=function(n,e){var r=[];return t(n,(function(t,n,i){e(t,n,i)&&r.push(t)})),r}}(),e=hd(),r=Yu();return Xl=function(i,o){return(r(i)?t:n)(i,e(o,3))}}(),has:function(){if(Jl)return Ql;Jl=1;var t=function(){if(Hl)return Zl;Hl=1;var t=Object.prototype.hasOwnProperty;return Zl=function(n,e){return null!=n&&t.call(n,e)}}(),n=od();return Ql=function(e,r){return null!=e&&n(e,r,t)}}(),isArray:Yu(),isEmpty:function(){if(tf)return Kl;tf=1;var t=Ba(),n=Mp(),e=Wu(),r=Yu(),i=qa(),o=ia(),s=Fa(),u=Da(),a=Object.prototype.hasOwnProperty;return Kl=function(c){if(null==c)return!0;if(i(c)&&(r(c)||"string"==typeof c||"function"==typeof c.splice||o(c)||u(c)||e(c)))return!c.length;var h=n(c);if("[object Map]"==h||"[object Set]"==h)return!c.size;if(s(c))return!t(c).length;for(var l in c)if(a.call(c,l))return!1;return!0}}(),isFunction:ku(),isUndefined:ef?nf:(ef=1,nf=function(t){return void 0===t}),keys:Ua(),map:function(){if(uf)return sf;uf=1;var t=td(),n=hd(),e=function(){if(of)return rf;of=1;var t=Pp(),n=qa();return rf=function(e,r){var i=-1,o=n(e)?Array(e.length):[];return t(e,(function(t,n,e){o[++i]=r(t,n,e)})),o}}(),r=Yu();return sf=function(i,o){return(r(i)?t:e)(i,n(o,3))}}(),reduce:function(){if(pf)return ff;pf=1;var t=cf?af:(cf=1,af=function(t,n,e,r){var i=-1,o=null==t?0:t.length;for(r&&o&&(e=t[++i]);++i<o;)e=n(e,t[i],i,t);return e}),n=Pp(),e=hd(),r=lf?hf:(lf=1,hf=function(t,n,e,r,i){return i(t,(function(t,i,o){e=r?(r=!1,t):n(e,t,i,o)})),e}),i=Yu();return ff=function(o,s,u){var a=i(o)?t:r,c=arguments.length<3;return a(o,e(s,4),u,c,n)},ff}(),size:function(){if(jf)return Af;jf=1;var t=Ba(),n=Mp(),e=qa(),r=function(){if(vf)return df;vf=1;var t=Ou(),n=Yu(),e=Uu();return df=function(r){return"string"==typeof r||!n(r)&&e(r)&&"[object String]"==t(r)}}(),i=ld();return Af=function(o){if(null==o)return 0;if(e(o))return r(o)?i(o):o.length;var s=n(o);return"[object Map]"==s||"[object Set]"==s?o.size:t(o).length}}(),transform:function(){if(Mf)return Of;Mf=1;var t=Pu(),n=Tp(),e=Dp(),r=hd(),i=xp(),o=Yu(),s=ia(),u=ku(),a=Mu(),c=Da();return Of=function(h,l,f){var p=o(h),d=p||s(h)||c(h);if(l=r(l,4),null==f){var v=h&&h.constructor;f=d?p?new v:[]:a(h)&&u(v)?n(i(h)):{}}return(d?t:e)(h,(function(t,n,e){return l(f,t,n,e)})),f}}(),union:function(){if(lp)return hp;lp=1;var t=fd(),n=function(){if(Uf)return qf;Uf=1;var t=Fp(),n=pd(),e=dd();return qf=function(r,i){return e(n(r,i,t),r+"")}}(),e=_d(),r=function(){if(cp)return ap;cp=1;var t=qa(),n=Uu();return ap=function(e){return n(e)&&t(e)}}(),i=n((function(n){return e(t(n,1,r,!0))}));return hp=i}(),values:function(){if(vp)return dp;vp=1;var t=function(){if(pp)return fp;pp=1;var t=td();return fp=function(n,e){return t(e,(function(t){return n[t]}))}}(),n=Ua();return dp=function(e){return null==e?[]:t(e,n(e))}}()}}catch(Uv){}gp||(gp=window._);var md=gp,yd=md,wd=Ad,bd="\0",xd="\0",Ed="";function Ad(t){this._isDirected=!yd.has(t,"directed")||t.directed,this._isMultigraph=!!yd.has(t,"multigraph")&&t.multigraph,this._isCompound=!!yd.has(t,"compound")&&t.compound,this._label=void 0,this._defaultNodeLabelFn=yd.constant(void 0),this._defaultEdgeLabelFn=yd.constant(void 0),this._nodes={},this._isCompound&&(this._parent={},this._children={},this._children[xd]={}),this._in={},this._preds={},this._out={},this._sucs={},this._edgeObjs={},this._edgeLabels={}}function jd(t,n){t[n]?t[n]++:t[n]=1}function Od(t,n){--t[n]||delete t[n]}function Md(t,n,e,r){var i=""+n,o=""+e;if(!t&&i>o){var s=i;i=o,o=s}return i+Ed+o+Ed+(yd.isUndefined(r)?bd:r)}function kd(t,n){return Md(t,n.v,n.w,n.name)}Ad.prototype._nodeCount=0,Ad.prototype._edgeCount=0,Ad.prototype.isDirected=function(){return this._isDirected},Ad.prototype.isMultigraph=function(){return this._isMultigraph},Ad.prototype.isCompound=function(){return this._isCompound},Ad.prototype.setGraph=function(t){return this._label=t,this},Ad.prototype.graph=function(){return this._label},Ad.prototype.setDefaultNodeLabel=function(t){return yd.isFunction(t)||(t=yd.constant(t)),this._defaultNodeLabelFn=t,this},Ad.prototype.nodeCount=function(){return this._nodeCount},Ad.prototype.nodes=function(){return yd.keys(this._nodes)},Ad.prototype.sources=function(){var t=this;return yd.filter(this.nodes(),(function(n){return yd.isEmpty(t._in[n])}))},Ad.prototype.sinks=function(){var t=this;return yd.filter(this.nodes(),(function(n){return yd.isEmpty(t._out[n])}))},Ad.prototype.setNodes=function(t,n){var e=arguments,r=this;return yd.each(t,(function(t){e.length>1?r.setNode(t,n):r.setNode(t)})),this},Ad.prototype.setNode=function(t,n){return yd.has(this._nodes,t)?(arguments.length>1&&(this._nodes[t]=n),this):(this._nodes[t]=arguments.length>1?n:this._defaultNodeLabelFn(t),this._isCompound&&(this._parent[t]=xd,this._children[t]={},this._children[xd][t]=!0),this._in[t]={},this._preds[t]={},this._out[t]={},this._sucs[t]={},++this._nodeCount,this)},Ad.prototype.node=function(t){return this._nodes[t]},Ad.prototype.hasNode=function(t){return yd.has(this._nodes,t)},Ad.prototype.removeNode=function(t){var n=this;if(yd.has(this._nodes,t)){var e=function(t){n.removeEdge(n._edgeObjs[t])};delete this._nodes[t],this._isCompound&&(this._removeFromParentsChildList(t),delete this._parent[t],yd.each(this.children(t),(function(t){n.setParent(t)})),delete this._children[t]),yd.each(yd.keys(this._in[t]),e),delete this._in[t],delete this._preds[t],yd.each(yd.keys(this._out[t]),e),delete this._out[t],delete this._sucs[t],--this._nodeCount}return this},Ad.prototype.setParent=function(t,n){if(!this._isCompound)throw new Error("Cannot set parent in a non-compound graph");if(yd.isUndefined(n))n=xd;else{for(var e=n+="";!yd.isUndefined(e);e=this.parent(e))if(e===t)throw new Error("Setting "+n+" as parent of "+t+" would create a cycle");this.setNode(n)}return this.setNode(t),this._removeFromParentsChildList(t),this._parent[t]=n,this._children[n][t]=!0,this},Ad.prototype._removeFromParentsChildList=function(t){delete this._children[this._parent[t]][t]},Ad.prototype.parent=function(t){if(this._isCompound){var n=this._parent[t];if(n!==xd)return n}},Ad.prototype.children=function(t){if(yd.isUndefined(t)&&(t=xd),this._isCompound){var n=this._children[t];if(n)return yd.keys(n)}else{if(t===xd)return this.nodes();if(this.hasNode(t))return[]}},Ad.prototype.predecessors=function(t){var n=this._preds[t];if(n)return yd.keys(n)},Ad.prototype.successors=function(t){var n=this._sucs[t];if(n)return yd.keys(n)},Ad.prototype.neighbors=function(t){var n=this.predecessors(t);if(n)return yd.union(n,this.successors(t))},Ad.prototype.isLeaf=function(t){return 0===(this.isDirected()?this.successors(t):this.neighbors(t)).length},Ad.prototype.filterNodes=function(t){var n=new this.constructor({directed:this._isDirected,multigraph:this._isMultigraph,compound:this._isCompound});n.setGraph(this.graph());var e=this;yd.each(this._nodes,(function(e,r){t(r)&&n.setNode(r,e)})),yd.each(this._edgeObjs,(function(t){n.hasNode(t.v)&&n.hasNode(t.w)&&n.setEdge(t,e.edge(t))}));var r={};function i(t){var o=e.parent(t);return void 0===o||n.hasNode(o)?(r[t]=o,o):o in r?r[o]:i(o)}return this._isCompound&&yd.each(n.nodes(),(function(t){n.setParent(t,i(t))})),n},Ad.prototype.setDefaultEdgeLabel=function(t){return yd.isFunction(t)||(t=yd.constant(t)),this._defaultEdgeLabelFn=t,this},Ad.prototype.edgeCount=function(){return this._edgeCount},Ad.prototype.edges=function(){return yd.values(this._edgeObjs)},Ad.prototype.setPath=function(t,n){var e=this,r=arguments;return yd.reduce(t,(function(t,i){return r.length>1?e.setEdge(t,i,n):e.setEdge(t,i),i})),this},Ad.prototype.setEdge=function(){var t,n,e,r,i=!1,o=arguments[0];"object"==typeof o&&null!==o&&"v"in o?(t=o.v,n=o.w,e=o.name,2===arguments.length&&(r=arguments[1],i=!0)):(t=o,n=arguments[1],e=arguments[3],arguments.length>2&&(r=arguments[2],i=!0)),t=""+t,n=""+n,yd.isUndefined(e)||(e=""+e);var s=Md(this._isDirected,t,n,e);if(yd.has(this._edgeLabels,s))return i&&(this._edgeLabels[s]=r),this;if(!yd.isUndefined(e)&&!this._isMultigraph)throw new Error("Cannot set a named edge when isMultigraph = false");this.setNode(t),this.setNode(n),this._edgeLabels[s]=i?r:this._defaultEdgeLabelFn(t,n,e);var u=function(t,n,e,r){var i=""+n,o=""+e;if(!t&&i>o){var s=i;i=o,o=s}var u={v:i,w:o};r&&(u.name=r);return u}(this._isDirected,t,n,e);return t=u.v,n=u.w,Object.freeze(u),this._edgeObjs[s]=u,jd(this._preds[n],t),jd(this._sucs[t],n),this._in[n][s]=u,this._out[t][s]=u,this._edgeCount++,this},Ad.prototype.edge=function(t,n,e){var r=1===arguments.length?kd(this._isDirected,arguments[0]):Md(this._isDirected,t,n,e);return this._edgeLabels[r]},Ad.prototype.hasEdge=function(t,n,e){var r=1===arguments.length?kd(this._isDirected,arguments[0]):Md(this._isDirected,t,n,e);return yd.has(this._edgeLabels,r)},Ad.prototype.removeEdge=function(t,n,e){var r=1===arguments.length?kd(this._isDirected,arguments[0]):Md(this._isDirected,t,n,e),i=this._edgeObjs[r];return i&&(t=i.v,n=i.w,delete this._edgeLabels[r],delete this._edgeObjs[r],Od(this._preds[n],t),Od(this._sucs[t],n),delete this._in[n][r],delete this._out[t][r],this._edgeCount--),this},Ad.prototype.inEdges=function(t,n){var e=this._in[t];if(e){var r=yd.values(e);return n?yd.filter(r,(function(t){return t.v===n})):r}},Ad.prototype.outEdges=function(t,n){var e=this._out[t];if(e){var r=yd.values(e);return n?yd.filter(r,(function(t){return t.w===n})):r}},Ad.prototype.nodeEdges=function(t,n){var e=this.inEdges(t,n);if(e)return e.concat(this.outEdges(t,n))};var Sd={Graph:wd,version:"2.1.8"},Cd=md,Td=wd,Id={write:function(t){var n={options:{directed:t.isDirected(),multigraph:t.isMultigraph(),compound:t.isCompound()},nodes:Nd(t),edges:zd(t)};Cd.isUndefined(t.graph())||(n.value=Cd.clone(t.graph()));return n},read:function(t){var n=new Td(t.options).setGraph(t.value);return Cd.each(t.nodes,(function(t){n.setNode(t.v,t.value),t.parent&&n.setParent(t.v,t.parent)})),Cd.each(t.edges,(function(t){n.setEdge({v:t.v,w:t.w,name:t.name},t.value)})),n}};function Nd(t){return Cd.map(t.nodes(),(function(n){var e=t.node(n),r=t.parent(n),i={v:n};return Cd.isUndefined(e)||(i.value=e),Cd.isUndefined(r)||(i.parent=r),i}))}function zd(t){return Cd.map(t.edges(),(function(n){var e=t.edge(n),r={v:n.v,w:n.w};return Cd.isUndefined(n.name)||(r.name=n.name),Cd.isUndefined(e)||(r.value=e),r}))}var Rd=md,Ld=function(t){var n,e={},r=[];function i(r){Rd.has(e,r)||(e[r]=!0,n.push(r),Rd.each(t.successors(r),i),Rd.each(t.predecessors(r),i))}return Rd.each(t.nodes(),(function(t){n=[],i(t),n.length&&r.push(n)})),r};var Dd=md,Pd=Fd;function Fd(){this._arr=[],this._keyIndices={}}Fd.prototype.size=function(){return this._arr.length},Fd.prototype.keys=function(){return this._arr.map((function(t){return t.key}))},Fd.prototype.has=function(t){return Dd.has(this._keyIndices,t)},Fd.prototype.priority=function(t){var n=this._keyIndices[t];if(void 0!==n)return this._arr[n].priority},Fd.prototype.min=function(){if(0===this.size())throw new Error("Queue underflow");return this._arr[0].key},Fd.prototype.add=function(t,n){var e=this._keyIndices;if(t=String(t),!Dd.has(e,t)){var r=this._arr,i=r.length;return e[t]=i,r.push({key:t,priority:n}),this._decrease(i),!0}return!1},Fd.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},Fd.prototype.decrease=function(t,n){var e=this._keyIndices[t];if(n>this._arr[e].priority)throw new Error("New priority is greater than current priority. Key: "+t+" Old: "+this._arr[e].priority+" New: "+n);this._arr[e].priority=n,this._decrease(e)},Fd.prototype._heapify=function(t){var n=this._arr,e=2*t,r=e+1,i=t;e<n.length&&(i=n[e].priority<n[i].priority?e:i,r<n.length&&(i=n[r].priority<n[i].priority?r:i),i!==t&&(this._swap(t,i),this._heapify(i)))},Fd.prototype._decrease=function(t){for(var n,e=this._arr,r=e[t].priority;0!==t&&!(e[n=t>>1].priority<r);)this._swap(t,n),t=n},Fd.prototype._swap=function(t,n){var e=this._arr,r=this._keyIndices,i=e[t],o=e[n];e[t]=o,e[n]=i,r[o.key]=t,r[i.key]=n};var $d=Pd,Bd=function(t,n,e,r){return function(t,n,e,r){var i,o,s={},u=new $d,a=function(t){var n=t.v!==i?t.v:t.w,r=s[n],a=e(t),c=o.distance+a;if(a<0)throw new Error("dijkstra does not allow negative edge weights. Bad edge: "+t+" Weight: "+a);c<r.distance&&(r.distance=c,r.predecessor=i,u.decrease(n,c))};t.nodes().forEach((function(t){var e=t===n?0:Number.POSITIVE_INFINITY;s[t]={distance:e},u.add(t,e)}));for(;u.size()>0&&(i=u.removeMin(),(o=s[i]).distance!==Number.POSITIVE_INFINITY);)r(i).forEach(a);return s}(t,String(n),e||qd,r||function(n){return t.outEdges(n)})},qd=md.constant(1);var Ud=Bd,Wd=md,Yd=function(t,n,e){return Wd.transform(t.nodes(),(function(r,i){r[i]=Ud(t,i,n,e)}),{})};var Vd=md,Xd=function(t){var n=0,e=[],r={},i=[];function o(s){var u=r[s]={onStack:!0,lowlink:n,index:n++};if(e.push(s),t.successors(s).forEach((function(t){Vd.has(r,t)?r[t].onStack&&(u.lowlink=Math.min(u.lowlink,r[t].index)):(o(t),u.lowlink=Math.min(u.lowlink,r[t].lowlink))})),u.lowlink===u.index){var a,c=[];do{a=e.pop(),r[a].onStack=!1,c.push(a)}while(s!==a);i.push(c)}}return t.nodes().forEach((function(t){Vd.has(r,t)||o(t)})),i};var Gd=md,Zd=Xd,Hd=function(t){return Gd.filter(Zd(t),(function(n){return n.length>1||1===n.length&&t.hasEdge(n[0],n[0])}))};var Qd=function(t,n,e){return function(t,n,e){var r={},i=t.nodes();return i.forEach((function(t){r[t]={},r[t][t]={distance:0},i.forEach((function(n){t!==n&&(r[t][n]={distance:Number.POSITIVE_INFINITY})})),e(t).forEach((function(e){var i=e.v===t?e.w:e.v,o=n(e);r[t][i]={distance:o,predecessor:t}}))})),i.forEach((function(t){var n=r[t];i.forEach((function(e){var o=r[e];i.forEach((function(e){var r=o[t],i=n[e],s=o[e],u=r.distance+i.distance;u<s.distance&&(s.distance=u,s.predecessor=i.predecessor)}))}))})),r}(t,n||Jd,e||function(n){return t.outEdges(n)})},Jd=md.constant(1);var Kd=md,tv=nv;function nv(t){var n={},e={},r=[];if(Kd.each(t.sinks(),(function i(o){if(Kd.has(e,o))throw new ev;Kd.has(n,o)||(e[o]=!0,n[o]=!0,Kd.each(t.predecessors(o),i),delete e[o],r.push(o))})),Kd.size(n)!==t.nodeCount())throw new ev;return r}function ev(){}nv.CycleException=ev,ev.prototype=new Error;var rv=tv;var iv=md,ov=function(t,n,e){iv.isArray(n)||(n=[n]);var r=(t.isDirected()?t.successors:t.neighbors).bind(t),i=[],o={};return iv.each(n,(function(n){if(!t.hasNode(n))throw new Error("Graph does not have node: "+n);sv(t,n,"post"===e,o,r,i)})),i};function sv(t,n,e,r,i,o){iv.has(r,n)||(r[n]=!0,e||o.push(n),iv.each(i(n),(function(n){sv(t,n,e,r,i,o)})),e&&o.push(n))}var uv=ov;var av=ov;var cv=md,hv=wd,lv=Pd;var fv={Graph:Sd.Graph,json:Id,alg:{components:Ld,dijkstra:Bd,dijkstraAll:Yd,findCycles:Hd,floydWarshall:Qd,isAcyclic:function(t){try{rv(t)}catch(Uv){if(Uv instanceof rv.CycleException)return!1;throw Uv}return!0},postorder:function(t,n){return uv(t,n,"post")},preorder:function(t,n){return av(t,n,"pre")},prim:function(t,n){var e,r=new hv,i={},o=new lv;function s(t){var r=t.v===e?t.w:t.v,s=o.priority(r);if(void 0!==s){var u=n(t);u<s&&(i[r]=e,o.decrease(r,u))}}if(0===t.nodeCount())return r;cv.each(t.nodes(),(function(t){o.add(t,Number.POSITIVE_INFINITY),r.setNode(t)})),o.decrease(t.nodes()[0],0);var u=!1;for(;o.size()>0;){if(e=o.removeMin(),cv.has(i,e))r.setEdge(e,i[e]);else{if(u)throw new Error("Input graph is not connected: "+t);u=!0}t.nodeEdges(e).forEach(s)}return r},tarjan:Xd,topsort:tv},version:Sd.version};function pv(t,n){let e=!0;for(;e;){e=!1;for(let r=0;r<n.length;++r)for(let i=0;i<n[r].length-1;++i){const o=dv(t,n,r);vv(n[r],i,i+1);dv(t,n,r)<o?e=!0:vv(n[r],i,i+1)}}}function dv(t,n,e){let r=0;return e>0&&(r+=yu(t,n[e-1],n[e])),e+1<n.length&&(r+=yu(t,n[e],n[e+1])),r}function vv(t,n,e){const r=t[n];t[n]=t[e],t[e]=r}function gv(t){const n=Math.floor(t.length/2);if(0===t.length)return-1;if(t.length%2==1)return t[n];if(2===t.length)return(t[0]+t[1])/2;const e=t[n-1]-t[0],r=t[t.length-1]-t[n];return(t[n-1]*r+t[n]*e)/(e+r)}function _v(t,n,e=1,r=!1){if(e>0)for(let i=1;i<n.length;++i){const e=new Map;n[i].forEach((o=>{const s=gv(mv(t,n,i,i-1,o,r));e.set(o,s)})),yv(n[i],e)}else for(let i=n.length-2;i>=0;--i){const e=new Map;n[i].forEach((o=>{const s=gv(mv(t,n,i,i+1,o,r));e.set(o,s)})),yv(n[i],e)}}function mv(t,n,e,r,i,o=!1){const s=n[e],u=n[r],a=[];return u.forEach(((n,e)=>{t.nodeEdges(n,i).length>0&&a.push(e)})),0===a.length&&o&&s.forEach(((n,e)=>{t.nodeEdges(n,i).length>0&&a.push(e+.5)})),a.sort(((t,n)=>t-n)),a}function yv(t,n){const e=new Map(t.map(((t,n)=>[t,n])));for(let r=1;r<t.length;++r)for(let i=r;i>0;--i){let r=i-1,o=n.get(t[r]),s=n.get(t[i]);for(;-1===(o=n.get(t[r]))&&r>0;)r--;if(-1===s||-1===o)break;if(o===s&&(o=e.get(t[r]),s=e.get(t[i])),s>=o)break;[t[i],t[r]]=[t[r],t[i]]}}function wv(t,n=25){const e=function(t){const n=[];let e=t.nodes().filter((n=>0===t.node(n).rank)).concat(t.sources());return 0===e.length&&(e=t.nodes().slice(0,1)),fv.alg.preorder(t,e).forEach((e=>{const r=t.node(e).rank;for(;r>=n.length;)n.push([]);n[r].push(e)})),n}(t);let r=e,i=0;for(;i++<n;)_v(t,e,i%2==0?1:0),pv(t,e),bv(t,e)<bv(t,r)&&(r=xv(e));return r=r.map((t=>[t])),r}function bv(t,n){let e=0;for(let r=0;r<n.length-1;++r)e+=yu(t,n[r],n[r+1]);return e}function xv(t){const n=[];for(const e of t){const t=[];n.push(t);for(const n of e)t.push(n)}return n}function Ev(){let t=[100,100],n=null,e=.5,r=function(t,n,e){return 1};const i=function(t){return t.data.value},o=function(t){return t.data?t.data.direction:"r"};function s(u,a){null===n&&s.scaleToFit(u,a),Av(u,i,o),function(t,n,e){t.nodes().forEach((n=>{const r=t.node(n);r.dy=r.value*e})),t.edges().forEach((r=>{const i=t.edge(r);i.value=n(i),i.dy=i.value*e}))}(u,i,n);const c=jv(u,a);a.forEach((n=>{let i=0;n.forEach(((n,o)=>{const s=c[o]/cu.sumBy(c)*t[1],a=0===i?0:e*s/5,h=s-2*a,l=cu.sumBy(n,(t=>u.node(t).dy)),f=n.map(((t,e)=>u.node(t).value&&n[e+1]?r(n[e],n[e+1],u):0)),p=Math.max(0,h-l),d=cu.sumBy(f)?p/cu.sumBy(f):0;let v=i+a;1===n.length&&(v+=(h-u.node(n[0]).dy)/2);let g=Number.MAX_VALUE;n.forEach(((t,n)=>{const e=u.node(t);e.y=v,e.spaceAbove=g,e.spaceBelow=f[n]*d,v+=e.dy+e.spaceBelow,g=e.spaceBelow,e.data&&void 0!==e.data.forceY&&(e.y=a+e.data.forceY*(h-e.dy))})),n.length>0&&(u.node(n[n.length-1]).spaceBelow=Number.MAX_VALUE),i+=s}))}));const h=function(t,n){const e=[];return n.forEach(((r,i)=>{if(i===n.length-1)return;let o=0;r.forEach((n=>{n.forEach((n=>{t.outEdges(n).forEach((n=>{const e=t.edge(n).dy,r=t.node(n.w).y-t.node(n.v).y,i=Math.abs(r)-e,s=e*e-i*i,u=s>=0?Math.sqrt(s):e;u>o&&(o=u)}))}))})),e.push(o)})),e}(u,a);!function(t,n,e,r){const i=cu.sumBy(r);let o;if(i>e)o=r.map((t=>e*t/i));else{const t=e-i;o=r.map((e=>e+t/(n.length-1)))}let s=0;n.forEach(((n,e)=>{n.forEach((n=>{n.forEach((n=>{t.node(n).x=s}))})),s+=o[e]}))}(u,a,t[0],h);const l=[];return u.nodes().forEach((t=>{const n=u.node(t);n.id=t,l.push(n)})),l}return s.scaleToFit=function(r,s){Av(r,i,o);const u=cu.sumBy(jv(r,s));u<=0?n=1:(n=t[1]/u,1!==e&&(n*=1-e))},s.size=function(n){return arguments.length?(t=n,s):t},s.separation=function(t){return arguments.length?(r=cu.isFunction(t)?t:()=>t,s):r},s.whitespace=function(t){return arguments.length?(e=t,s):e},s.scale=function(t){return arguments.length?(n=t,s):n},s}function Av(t,n,e){t.nodes().forEach((r=>{const i=cu.sumBy(t.inEdges(r),(e=>n(t.edge(e)))),o=cu.sumBy(t.outEdges(r),(e=>n(t.edge(e))));let s=t.node(r);s||t.setNode(r,s={}),s.value=Math.max(i,o),void 0===s.direction&&(s.direction=e(s)||"r")}))}function jv(t,n){if(0===n.length||0===n[0].length)return[];const e=n[0].length,r=new Array(e);for(let i=0;i<e;i++)r[i]=0;return n.forEach((n=>{n.forEach(((n,e)=>{const i=cu.sumBy(n,(n=>t.node(n).value));r[e]=Math.max(r[e],i)}))})),r}var Ov=function(){for(var t=0;t<arguments.length;t++)if(void 0!==arguments[t])return arguments[t]};const Mv=e(Ov);function kv(t,n){const e=function(t,n){const e=new Set,r=new fv.Graph({directed:!0}),i=[];if(!t.hasNode(n))throw Error("node not in graph");return Sv(t,n,e,r,i),t.nodes().forEach((n=>{e.has(n)||Sv(t,n,e,r,i)})),i.forEach(((t,n)=>{r.node(t).thread=n+1<i.length?i[n+1]:i[0]})),r}(t,n);return t.edges().forEach((n=>{const r=function(t,n,e){const r=t.node(n),i=t.node(e);if(r.depth<i.depth){let n=r.thread;for(;t.node(n).depth>r.depth;){if(n===e)return 1;n=t.node(n).thread}}else if(i.depth<r.depth){let e=i.thread;for(;t.node(e).depth>i.depth;){if(e===n)return-1;e=t.node(e).thread}}return 0}(e,n.v,n.w);if(r<0){const e=t.edge(n)||{};e.reversed=!0,t.removeEdge(n),t.setEdge(n.w,n.v,e)}})),t}function Sv(t,n,e,r,i,o=0){if(!e.has(n)){e.add(n),i.push(n),r.setNode(n,{depth:o});t.outEdges(n).map((t=>t.w)).forEach((s=>{e.has(s)||r.setEdge(n,s,{delta:1}),Sv(t,s,e,r,i,o+1)}))}}function Cv(t,n){if(0===t.nodes().length)return;const e=function(t,n){const e=new fv.Graph({directed:!0});let r=!1;for(const s of n)if("min"===s.type){r=!0;break}if(!r){const e=t.sources();n=e.length>0?[{nodes:[e[0]],type:"min"},...n]:[{nodes:[t.nodes()[0]],type:"min"},...n]}const i=new Map;let o=0;return n.forEach((t=>{if(!t.nodes||0===t.nodes.length)return;const n=""+o++;t.nodes.forEach((t=>{i.set(t,n)})),e.setNode(n,{nodes:t.nodes,type:t.type})})),t.nodes().forEach((t=>{if(!i.has(t)){const n=""+o++,r={nodes:[t],type:"same"};i.set(t,n),e.setNode(n,r)}})),t.edges().forEach((n=>{const r=i.has(n.v)?i.get(n.v):n.v,o=i.has(n.w)?i.get(n.w):n.w,s=t.node(n.v)||{},u=t.node(n.w)||{},a=e.edge(r,o)||{delta:0};r===o?(a.delta=0,e.setEdge(r,o,a)):"l"===s.direction?(a.delta=Math.max(a.delta,"l"===u.direction?1:0),e.setEdge(o,r,a)):(a.delta=Math.max(a.delta,"l"===u.direction?0:1),e.setEdge(r,o,a))})),e}(t,n);!function(t){t.sources().forEach((n=>{"0"!==n&&t.setEdge("0",n,{delta:0,temp:!0})}))}(e),kv(e,"0"),function(t){var n;const e=t.sources(),r=new Set,i=new Set;for(t.edges().forEach((t=>{t.v===t.w&&i.add(t)}));e.length>0;){const o=e.shift();r.add(o);let s=t.node(o);s||t.setNode(o,s={}),s.rank=0;for(const e of t.inEdges(o)){const r=Mv(null==(n=t.edge(e)||{})?void 0:n.delta,1);s.rank=Math.max(s.rank,t.node(e.v).rank+r)}for(const n of t.outEdges(o))i.add(n);for(const n of t.nodes())e.indexOf(n)<0&&!r.has(n)&&!t.inEdges(n).some((t=>!i.has(t)))&&e.push(n)}}(e),function(t){function n(n){const e=t.node(n),r=cu.min(t.outEdges(n).map((n=>t.node(n.w).rank-t.edge(n).delta)));void 0!==r&&(e.rank=r)}t.edges().forEach((e=>{t.edge(e).temp&&n(e.w)}))}(e),t.nodes().forEach((n=>{t.node(n)||t.setNode(n,{})})),e.nodes().forEach((n=>{const r=e.node(n);r.nodes.forEach((n=>{t.node(n).rank=r.rank}))}))}function Tv(t){const n=Ev(),e=gu(t);let r=[],i=[],o=null;function s(t=[],s=[],u={}){const a=function(t=[],n=[]){const e=new fv.Graph({directed:!0,multigraph:!0});return n.forEach((t=>{e.setEdge(t.source,t.target,{data:t,points:[]},t.type)})),e.nodes().forEach((t=>e.setNode(t,{data:{}}))),t.forEach((t=>{e.hasNode(t.id)&&(e.node(t.id).data=t,void 0!==t.direction&&(e.node(t.id).direction=t.direction))})),e.edges().forEach((t=>{e.edge(t).source=e.node(t.v),e.edge(t).target=e.node(t.w)})),e}(s,t);var c;return u.order?(Cv(a,u.rankSets||[]),o=u.order,o.length>0&&o[0].length>0&&!cu.isArray(o[0][0])&&(o=o.map((t=>[t]))),o=o.map((t=>t.map((t=>t.filter((t=>void 0!==a.node(t)))))))):(Cv(a,u.rankSets||[]),(c=a).edges().forEach((t=>{const n=c.node(t.v),e=c.node(t.w),r=c.edge(t);let i=n.rank;const o=[];if(i+1<=e.rank){for("l"===n.direction&&o.push(i);++i<e.rank;)o.push(i);"l"===e.direction&&o.push(i),mu(c,t,r,o,"r")}else if(i>e.rank){for("l"!==n.direction&&o.push(i);i-- >e.rank+1;)o.push(i);"l"!==e.direction&&o.push(i),mu(c,t,r,o,"l")}})),o=wv(a)),r=n(a,o),function(t,{alignLinkTypes:n=!1}={}){t.nodes().forEach((e=>{const r=t.node(e);if(r.incoming=t.inEdges(e),r.outgoing=t.outEdges(e),n){const n=lu(t,e);r.incoming.sort(pu(t,n,!1)),r.outgoing.sort(pu(t,n,!0))}else r.incoming.sort(fu(t,!1)),r.outgoing.sort(fu(t,!0))}))}(a,{alignLinkTypes:u.alignLinkTypes||!1}),i=e(a),function(t){t.nodes().filter((t=>t.startsWith("__"))).forEach((n=>{var e;let r=t.node(n);if(!r)return;let i=(null==(e=t.inEdges(n))?void 0:e.map((n=>t.edge(n))))||[];i.forEach((n=>{n.origLabel.dy=n.dy,n.origLabel.x0=n.x0,n.origLabel.y0=n.y0,n.origLabel.r0=n.r0,n.origLabel.d0=n.d0,n.origLabel.value=n.value,t.setEdge(n.origEdge,n.origLabel)}));let o,s=i.map((t=>t.r1));for(;r.dummy;)i=t.outEdges(n).map((n=>t.edge(n))),i.forEach(((t,n)=>{t.origLabel.points||(t.origLabel.points=[]),t.origLabel.points.push({d:t.d0,r0:t.r0,r1:s[n],x:r.x,y:t.y0})})),s=i.map((t=>t.r1)),o=t.successors(n)[0],t.removeNode(n),r=t.node(n=o);i.forEach((t=>{t.origLabel.x1=t.x1,t.origLabel.y1=t.y1,t.origLabel.r1=t.r1,t.origLabel.d1=t.d1}))}))}(a),function(t){t.edges().forEach((n=>{const e=t.edge(n);e.points.unshift({d:e.d0,ro:e.r0,x:e.x0,y:e.y0}),e.points.push({d:e.d1,ri:e.r1,x:e.x1,y:e.y1})}))}(a),a}return s.nodes=function(){return r},s.links=function(){return i},s.order=function(){return o},s.size=function(t){return arguments.length?(n.size(t),s):n.size()},s.separation=function(t){return arguments.length?(n.separation(t),s):n.separation()},s.whitespace=function(t){return arguments.length?(n.whitespace(t),s):n.whitespace()},s.edgeValue=function(t){return s},s.scale=function(t){return arguments.length?(n.scale(t),s):n.scale()},s}const Iv=["#ACD5FC","#E37816","#07CC80","#0871D4","#CB8E55","#9FAE29","#427565","#6D55A6","#FEF445","#E177C2","#F48B7B","#D74B05","#AA896F","#14A14D","#C5114D"],Nv=t=>0===t.dy?0:2;function zv(t){const n=Math.max(Nv(t),t.dy)/2;let{x0:e}=t,{x1:r}=t,{y0:i}=t,{y1:o}=t;r<e&&([e,r]=[r,e],[i,o]=[o,i]);const s=o>i?1:-1,u=function(t){const n=t.x1-t.x0,e=t.y1-t.y0;return[t.dy/2,(n*n+e*e)/Math.abs(4*e)]}(t),a=Math.max(u[0],Math.min(u[1],(r-e)/3));let c=Math.max(u[0],Math.min(u[1],t.r0||a)),h=Math.max(u[0],Math.min(u[1],t.r1||a));const l=r-e,f=o-i-s*(c+h),p=Math.sqrt(l*l+f*f),d=-s*Math.acos(Math.min(1,(c+h)/p)),v=Math.atan2(f,l);let g=Math.PI/2+s*(v+d),_=n*s*Math.sin(g),m=n*Math.cos(g),y=e+1*c*Math.sin(Math.abs(g)),w=r-1*h*Math.sin(Math.abs(g)),b=i+c*s*(1-Math.cos(g)),x=o-h*s*(1-Math.cos(g));function E(t,e){const r=t*(o-i)>0?1:0;let s=1*t*(o-i)>0?e+n:e-n;return 0===g&&(s=e),`A${s} ${s} ${Math.abs(g)} 0 ${r} `}(cu.isNaN(g)||Math.abs(g)<.001)&&(g=0,c=0,h=0,y=e,w=r,b=i,x=o,_=0,m=n);return`M${[e,i-n]} ${E(1,c)}${[y+_,b-m]} L${[w+_,x-m]} ${E(-1,h)}${[r,o-n]} L${[r,o+n]} ${E(1,h)}${[w-_,x+m]} L${[y-_,b+m]} ${E(-1,c)}${[e,i+n]} Z`}function Rv(t){var n;if(1===(null==(n=t.points)?void 0:n.length))return function(t){const n=t.points[0],e=Math.max(Nv(t),t.dy)/2;return"down-right"===n.style?`M${[n.x-20,n.y-e]} L${[n.x,n.y-e]} L${[n.x,n.y+e]} L${[n.x-20,n.y+e]} Z`:"right-down"===n.style?`M${[n.x,n.y-e]} L${[n.x+20,n.y-e]} L${[n.x+20,n.y+e]} L${[n.x,n.y+e]} Z`:null}(t);let e,r="";for(let i=0;i<t.points.length-1;++i)e={d0:t.points[i].d,d1:t.points[i+1].d,dy:t.dy,r0:t.points[i].ro,r1:t.points[i+1].ri,x0:t.points[i].x,x1:t.points[i+1].x,y0:t.points[i].y,y1:t.points[i+1].y},r+=zv(e);return r}const Lv=(t,n)=>{const e=void 0!==t.title?t.title:t.id;return n&&e.length>n?`${e.substr(0,15)}...`:e};function Dv(t,{fontColor:n,maxRank:e,nodeWidth:r}){const{data:i}=t,o=function(t,n){let e=!1,r=!1;return t.rank<n/2&&(r=!0,e=!1),{right:r,top:e}}(t,e),{x:s,y:u}=function(t,n,e){const r=n.top?-25:t.dy/2-10;let i;return i=n.top?n.right?4:-4:n.right?10+e/2:-e/2-10,{x:t.x+i,y:t.y+r}}(t,o,r),a=function(t="",{fontColor:n="#666767",pointerEvents:e="all",textAnchor:r="start",x:i,y:o}){const s=new Gn;return s.font({fill:n}),s.tspan(t),void 0!==i&&void 0!==o&&s.move(i,o),s.attr({"pointer-events":e,"text-anchor":r}),s}(Lv(i,o.top?25:15),{fontColor:n,pointerEvents:"none",textAnchor:o.top?"middle":o.right?"start":"end",x:s,y:u});return a}function Pv(t,n,e){var r,i;const{dy:o,x:s,y:u}=t,{fontColor:a,fontSize:c,nodeBorderColor:h,nodeBorderWidth:l,nodeWidth:f,onNodeClick:p}=e,d=new Ki({class:"node"}),v=function({borderColor:t="#caced0",color:n="#97cbe6",height:e=0,opacity:r=1,radius:i=0,width:o=0,x:s=0,y:u=0}={}){const a=new Nn;return a.attr({height:e,opacity:r,rx:i,ry:i,width:o,x:s,y:u}),a.fill(n),a.stroke({color:t,width:1}),a}({height:o,width:f,x:s-f/2,y:u});if(v.fill(null==(r=t.data)?void 0:r.color),v.stroke({color:h??(null==(i=t.data)?void 0:i.color),width:l}),v.on("click",(()=>{"function"==typeof p&&p(t)})),d.add(v),t.data&&o>Number.parseInt(c,10)){const e=Dv(t,{fontColor:a,maxRank:n,nodeWidth:f});d.add(e)}return d}var Fv=function(t){return t.touches||[{clientX:t.clientX,clientY:t.clientY}]};Fe(Wi,{panZoom:function(t){var n,e,r,i,o,s,u,a,c,h,l,f,p=this;if(this.off(".panZoom"),!1===t)return this;var d,v,g=null!=(e=(t=null!=(n=t)?n:{}).zoomFactor)?e:2,_=null!=(r=t.zoomMin)?r:Number.MIN_VALUE,m=null!=(i=t.zoomMax)?i:Number.MAX_VALUE,y=null==(o=t.wheelZoom)||o,w=null==(s=t.pinchZoom)||s,b=null==(u=t.panning)||u,x=null!=(a=t.panButton)?a:0,E=null!=(c=t.oneFingerPan)&&c,A=null!=(h=t.margins)&&h,j=null!=(l=t.wheelZoomDeltaModeLinePixels)?l:17,O=null!=(f=t.wheelZoomDeltaModeScreenPixels)?f:53,M=!1,k=this.viewbox(),S=function(t){if(!A)return t;var n=A.top,e=A.left,r=A.bottom,i=A.right,o=p.attr(["width","height"]),s=o.width,u=o.height,a=p.node.preserveAspectRatio.baseVal,c=0,h=0,l=0,f=0;if(a.align!==a.SVG_PRESERVEASPECTRATIO_NONE){var d=s/u,v=k.width/k.height;if(v!==d){var g=a.meetOrSlice!==a.SVG_MEETORSLICE_SLICE,_=d>v?"width":"height",m="width"===_,y=g&&m||!g&&!m,w=y?d/v:v/d,b=t[_]-t[_]*w;y?a.align===a.SVG_PRESERVEASPECTRATIO_XMIDYMIN||a.align===a.SVG_PRESERVEASPECTRATIO_XMIDYMID||a.align===a.SVG_PRESERVEASPECTRATIO_XMIDYMAX?(c=b/2,h=-b/2):a.align===a.SVG_PRESERVEASPECTRATIO_XMINYMIN||a.align===a.SVG_PRESERVEASPECTRATIO_XMINYMID||a.align===a.SVG_PRESERVEASPECTRATIO_XMINYMAX?h=-b:a.align!==a.SVG_PRESERVEASPECTRATIO_XMAXYMIN&&a.align!==a.SVG_PRESERVEASPECTRATIO_XMAXYMID&&a.align!==a.SVG_PRESERVEASPECTRATIO_XMAXYMAX||(c=b):a.align===a.SVG_PRESERVEASPECTRATIO_XMINYMID||a.align===a.SVG_PRESERVEASPECTRATIO_XMIDYMID||a.align===a.SVG_PRESERVEASPECTRATIO_XMAXYMID?(l=b/2,f=-b/2):a.align===a.SVG_PRESERVEASPECTRATIO_XMINYMIN||a.align===a.SVG_PRESERVEASPECTRATIO_XMIDYMIN||a.align===a.SVG_PRESERVEASPECTRATIO_XMAXYMIN?f=-b:a.align!==a.SVG_PRESERVEASPECTRATIO_XMINYMAX&&a.align!==a.SVG_PRESERVEASPECTRATIO_XMIDYMAX&&a.align!==a.SVG_PRESERVEASPECTRATIO_XMAXYMAX||(l=b)}}var x=k.width+k.x-e-c,E=k.x+i-t.width-h,j=k.height+k.y-n-l,O=k.y+r-t.height-f;return t.x=Math.min(x,Math.max(E,t.x)),t.y=Math.min(j,Math.max(O,t.y)),t},C=function t(n){(v=Fv(n)).length<2?b&&E&&N.call(this,n):(b&&E&&z.call(this,n),n.preventDefault(),this.dispatch("pinchZoomStart",{event:n}).defaultPrevented||(this.off("touchstart.panZoom",t),M=!0,mr(document,"touchmove.panZoom",I,this,{passive:!1}),mr(document,"touchend.panZoom",T,this,{passive:!1})))},T=function t(n){n.preventDefault();var e=Fv(n);e.length>1||(M=!1,this.dispatch("pinchZoomEnd",{event:n}),yr(document,"touchmove.panZoom",I),yr(document,"touchend.panZoom",t),this.on("touchstart.panZoom",C),e.length&&b&&E&&N.call(this,n))},I=function(t){t.preventDefault();var n=Fv(t),e=this.zoom(),r=Math.sqrt(Math.pow(v[0].clientX-v[1].clientX,2)+Math.pow(v[0].clientY-v[1].clientY,2))/Math.sqrt(Math.pow(n[0].clientX-n[1].clientX,2)+Math.pow(n[0].clientY-n[1].clientY,2));(e<_&&r>1||e>m&&r<1)&&(r=1);var i={x:n[0].clientX+.5*(n[1].clientX-n[0].clientX),y:n[0].clientY+.5*(n[1].clientY-n[0].clientY)},o=v[0].clientX+.5*(v[1].clientX-v[0].clientX),s=v[0].clientY+.5*(v[1].clientY-v[0].clientY),u=this.point(i.x,i.y),a=this.point(2*i.x-o,2*i.y-s),c=new cr(this.viewbox()).transform((new sr).translate(-a.x,-a.y).scale(r,0,0).translate(u.x,u.y));S(c),this.viewbox(c),v=n,this.dispatch("zoom",{box:c,focus:a})},N=function t(n){n.type.indexOf("mouse")>-1&&n.button!==x&&n.which!==x+1||(n.preventDefault(),this.off("mousedown.panZoom",t),v=Fv(n),M||(this.dispatch("panStart",{event:n}),d={x:v[0].clientX,y:v[0].clientY},mr(document,"touchmove.panZoom mousemove.panZoom",R,this,{passive:!1}),mr(document,"touchend.panZoom mouseup.panZoom",z,this,{passive:!1})))},z=function t(n){n.preventDefault(),yr(document,"touchmove.panZoom mousemove.panZoom",R),yr(document,"touchend.panZoom mouseup.panZoom",t),this.on("mousedown.panZoom",N),this.dispatch("panEnd",{event:n})},R=function(t){t.preventDefault();var n=Fv(t),e={x:n[0].clientX,y:n[0].clientY},r=this.point(e.x,e.y),i=this.point(d.x,d.y),o=[i.x-r.x,i.y-r.y];if(o[0]||o[1]){var s=new cr(this.viewbox()).transform((new sr).translate(o[0],o[1]));d=e,S(s),this.dispatch("panning",{box:s,event:t}).defaultPrevented||this.viewbox(s)}};return y&&this.on("wheel.panZoom",(function(t){var n;switch(t.preventDefault(),t.deltaMode){case 1:n=t.deltaY*j;break;case 2:n=t.deltaY*O;break;default:n=t.deltaY}var e=Math.pow(1+g,-1*n/100)*this.zoom(),r=this.point(t.clientX,t.clientY);if(e>m&&(e=m),e<_&&(e=_),this.dispatch("zoom",{level:e,focus:r}).defaultPrevented)return this;if(this.zoom(e,r),A){var i=S(this.viewbox());this.viewbox(i)}}),this,{passive:!1}),w&&this.on("touchstart.panZoom",C,this,{passive:!1}),b&&this.on("mousedown.panZoom",N,this,{passive:!1}),this}});class $v{constructor(t,n){this.element=t,this.options=n,this.canvas=so().addTo(t).size("100%","100%").viewbox(`-${this.spacing} -${this.spacing+this.getYShift()} ${this.width+2*this.spacing} ${this.height+this.spacing+this.getYShift()}`).attr({style:this.options.canvasStyle})}getYShift(){return this.options.enableToolbar?30:0}add(t){this.canvas.add(t)}clear(){this.canvas.clear().viewbox(`-${this.spacing} -${this.spacing+this.getYShift()} ${this.width+2*this.spacing} ${this.height+this.spacing+this.getYShift()}`)}resetViewBox(){this.canvas.viewbox(`-${this.spacing} -${this.spacing+this.getYShift()} ${this.width+2*this.spacing} ${this.height+this.spacing+this.getYShift()}`)}updateViewBox(t,n,e,r){this.canvas.viewbox(`${t} ${n} ${e} ${r}`)}zoom(t){const n=this.canvas.zoom()+t;n>=.1&&this.canvas.zoom(n)}get height(){return this.options.viewPortHeight}get spacing(){return this.options.spacing}get width(){return this.options.viewPortWidth}}class Bv extends $v{construct(t){const{nodeWidth:n,spacing:e,viewPortHeight:r,viewPortWidth:i}=this.options,o=Tv({nodeWidth:n});o.size([i-n,r-e]);const s=t.nodes.map(((t,n)=>{const e=n%Iv.length;return{...t,color:t.color??Iv[e],colorIndex:e}})),u=o(t.edges,s,t.options);this.maxRank=o.order().length-1,this.graph=u}render({keepOldPosition:t=!1}={}){var n,e;const{enableTooltip:r,fontColor:i,fontFamily:o,fontSize:s,fontWeight:u,nodeBorderColor:c,nodeBorderWidth:h,nodeWidth:l,onNodeClick:f,tooltipId:p}=this.options,d=this.canvas.viewbox();this.clear();const v=a({color:i,fontFamily:o,fontSize:s,fontWeight:u}),g=ue(l/2,0);g.attr("style",v);const _=(null==(n=this.graph)?void 0:n.nodes())||[],m=(null==(e=this.graph)?void 0:e.edges())||[],y=ue();m.forEach((t=>{this.renderEdge(t,y)})),g.add(y);const w=ue();if(_.forEach((t=>{const n=this.graph.node(t);if(n.dummy)return;const e=Pv(n,this.maxRank,{fontColor:i,fontSize:s,nodeBorderColor:c,nodeBorderWidth:h,nodeWidth:l,onNodeClick:f});w.add(e)})),g.add(w),this.add(g),t&&this.updateViewBox(d.x,d.y,d.width,d.height),r){const t=((t="apex-tooltip-container")=>{const n=document.getElementById(t)||document.createElement("div");return n.id=t,n})(p);(document.body||document.getElementsByTagName("body")[0]).append(t)}}renderEdge(t,n){const{edgeGradientFill:e,edgeOpacity:r,enableTooltip:i,fontColor:o,fontFamily:s,fontSize:c,fontWeight:h,nodeWidth:l,tooltipBGColor:f,tooltipBorderColor:p,tooltipId:d,tooltipTemplate:v}=this.options,g=this.graph.edge(t.v,t.w,t.name),_=this.graph.node(t.v),m=this.graph.node(t.w),y=g.source,w=g.target;_.dummy&&(g.x0-=l/2),m.dummy&&(g.x1+=l/2);const b=function(t,{edgeColor:n,id:e="",opacity:r=1}={}){const i=new Sn({d:t});return i.id(e),i.fill(n).opacity(r),i}(Rv(g),{edgeColor:this.canvas.gradient("linear",(t=>{var n,r,i;t.stop(0,null==(n=y.data)?void 0:n.color),t.stop(1,e?null==(r=w.data)?void 0:r.color:null==(i=y.data)?void 0:i.color)})),id:`${t.v}-${t.w}`,opacity:r});if(i&&y.data&&w.data){const t=v?v({source:{...y.data,value:y.value},target:{...w.data,value:w.value},value:g.value}):null;b.on("mousemove",(n=>{var e;const r=a({color:o,fontFamily:s,fontSize:c,fontWeight:h}),i=(({bgColor:t,borderColor:n,maxWidth:e,padding:r,x:i,y:o})=>{const s=["position: absolute;",`left: ${i+20}px;`,`top: ${o+20}px;`,`border: 1px solid ${n};`,"border-radius: 5px;"];return t&&s.push(`background-color: ${t};`),e&&s.push(`max-width: ${e}px`),void 0!==r&&s.push(`padding: ${r}px`),s.join(" ")})({bgColor:f,borderColor:p,x:n.pageX,y:n.pageY});null==(e=so(`[id="${n.target.id}"]`))||e.front().opacity(1),u(d,i+r,t)})),b.on("mouseout",(t=>{var n;u(d),null==(n=so(`[id="${t.target.id}"]`))||n.front().opacity(r)}))}n.add(b)}}const qv={canvasStyle:"border: 1px solid #caced0; box-sizing: border-box",edgeGradientFill:!0,edgeOpacity:.4,enableToolbar:!0,enableTooltip:!0,fontColor:"#212121",fontFamily:"",fontSize:"14px",fontWeight:400,height:"auto",nodeBorderColor:null,nodeBorderWidth:1,nodeWidth:20,onNodeClick:void 0,spacing:20,tooltipBGColor:"#FFFFFF",tooltipBorderColor:"#BCBCBC",tooltipId:"apexsankey-tooltip-container",tooltipTemplate:({source:t,target:n,value:e})=>`\n <div style='display:flex;align-items:center;gap:5px;padding:5px 10px;'>\n <div style='width:12px;height:12px;background-color:${t.color}'></div>\n <div>${t.title}</div>\n <div>=></div>\n <div style='width:12px;height:12px;background-color:${n.color}'></div>\n <div>${n.title}</div>\n <div>: ${e}</div> \n </div>\n `,viewPortHeight:500,viewPortWidth:800,width:"100%"};return class{constructor(t,n){this.element=t,this.options=n,this.options={...qv,...n};const{height:e,width:r}=this.options;this.graph=new Bv(this.element,this.options);let i=!1,o=0;"string"==typeof r&&/^\d+(\.\d+)?%$/.test(r)?(o=Number(r.substring(0,r.length-1)),i=!0):o=Number(r);const s="auto"===e?o/1.6:e;this.element.style.width=`${o}${i?"%":"px"}`,this.element.style.height=`${s}${i?"%":"px"}`,this.element.style.position="relative"}render(t){if(!this.element)throw new Error("Element not found");if(this.graph.construct(t),this.graph.render(),this.options.enableToolbar){new ce(this.element,this.graph.canvas,"apex-sankey").render({enableExport:!0})}return this.graph}}}));